nemar-cli 0.4.0-PR131.f8c1d25 → 0.4.0-PR132.bad97bd

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +39 -39
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -35,7 +35,7 @@ Calls to async() callback can have unexpected results.`);return V=!0,function(N,
35
35
  `)+$,J=B+1,B=D.indexOf(`
36
36
  `,J)}while(B!==-1);return Q+=D.substr(J),Q};JM.exports={stringReplaceAll:Ye,stringEncaseCRLFWithFirstIndex:Ge}});var WM=q((VzD,HM)=>{var He=/(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,XM=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,We=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,Ee=/\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi,qe=new Map([["n",`
37
37
  `],["r","\r"],["t","\t"],["b","\b"],["f","\f"],["v","\v"],["0","\x00"],["\\","\\"],["e","\x1B"],["a","\x07"]]);function GM(D){let F=D[0]==="u",$=D[1]==="{";if(F&&!$&&D.length===5||D[0]==="x"&&D.length===3)return String.fromCharCode(parseInt(D.slice(1),16));if(F&&$)return String.fromCodePoint(parseInt(D.slice(2,-1),16));return qe.get(D)||D}function Ke(D,F){let $=[],B=F.trim().split(/\s*,\s*/g),J;for(let Q of B){let X=Number(Q);if(!Number.isNaN(X))$.push(X);else if(J=Q.match(We))$.push(J[2].replace(Ee,(Y,G,H)=>G?GM(G):H));else throw Error(`Invalid Chalk template style argument: ${Q} (in style '${D}')`)}return $}function ze(D){XM.lastIndex=0;let F=[],$;while(($=XM.exec(D))!==null){let B=$[1];if($[2]){let J=Ke(B,$[2]);F.push([B].concat(J))}else F.push([B])}return F}function YM(D,F){let $={};for(let J of F)for(let Q of J.styles)$[Q[0]]=J.inverse?null:Q.slice(1);let B=D;for(let[J,Q]of Object.entries($)){if(!Array.isArray(Q))continue;if(!(J in B))throw Error(`Unknown Chalk style: ${J}`);B=Q.length>0?B[J](...Q):B[J]}return B}HM.exports=(D,F)=>{let $=[],B=[],J=[];if(F.replace(He,(Q,X,Y,G,H,E)=>{if(X)J.push(GM(X));else if(G){let K=J.join("");J=[],B.push($.length===0?K:YM(D,$)(K)),$.push({inverse:Y,styles:ze(G)})}else if(H){if($.length===0)throw Error("Found extraneous } in Chalk template literal");B.push(YM(D,$)(J.join(""))),J=[],$.pop()}else J.push(E)}),B.push(J.join("")),$.length>0){let Q=`Chalk template literal is missing ${$.length} closing bracket${$.length===1?"":"s"} (\`}\`)`;throw Error(Q)}return B.join("")}});var fJ=q((AzD,ZM)=>{var eF=OJ(),{stdout:yJ,stderr:xJ}=BM(),{stringReplaceAll:Ve,stringEncaseCRLFWithFirstIndex:Ae}=QM(),{isArray:t5}=Array,qM=["ansi","ansi","ansi256","ansi16m"],v4=Object.create(null),Ze=(D,F={})=>{if(F.level&&!(Number.isInteger(F.level)&&F.level>=0&&F.level<=3))throw Error("The `level` option should be an integer from 0 to 3");let $=yJ?yJ.level:0;D.level=F.level===void 0?$:F.level};class KM{constructor(D){return zM(D)}}var zM=(D)=>{let F={};return Ze(F,D),F.template=(...$)=>AM(F.template,...$),Object.setPrototypeOf(F,e5.prototype),Object.setPrototypeOf(F.template,F),F.template.constructor=()=>{throw Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.")},F.template.Instance=KM,F.template};function e5(D){return zM(D)}for(let[D,F]of Object.entries(eF))v4[D]={get(){let $=D9(this,_J(F.open,F.close,this._styler),this._isEmpty);return Object.defineProperty(this,D,{value:$}),$}};v4.visible={get(){let D=D9(this,this._styler,!0);return Object.defineProperty(this,"visible",{value:D}),D}};var VM=["rgb","hex","keyword","hsl","hsv","hwb","ansi","ansi256"];for(let D of VM)v4[D]={get(){let{level:F}=this;return function(...$){let B=_J(eF.color[qM[F]][D](...$),eF.color.close,this._styler);return D9(this,B,this._isEmpty)}}};for(let D of VM){let F="bg"+D[0].toUpperCase()+D.slice(1);v4[F]={get(){let{level:$}=this;return function(...B){let J=_J(eF.bgColor[qM[$]][D](...B),eF.bgColor.close,this._styler);return D9(this,J,this._isEmpty)}}}}var Ue=Object.defineProperties(()=>{},{...v4,level:{enumerable:!0,get(){return this._generator.level},set(D){this._generator.level=D}}}),_J=(D,F,$)=>{let B,J;if($===void 0)B=D,J=F;else B=$.openAll+D,J=F+$.closeAll;return{open:D,close:F,openAll:B,closeAll:J,parent:$}},D9=(D,F,$)=>{let B=(...J)=>{if(t5(J[0])&&t5(J[0].raw))return EM(B,AM(B,...J));return EM(B,J.length===1?""+J[0]:J.join(" "))};return Object.setPrototypeOf(B,Ue),B._generator=D,B._styler=F,B._isEmpty=$,B},EM=(D,F)=>{if(D.level<=0||!F)return D._isEmpty?"":F;let $=D._styler;if($===void 0)return F;let{openAll:B,closeAll:J}=$;if(F.indexOf("\x1B")!==-1)while($!==void 0)F=Ve(F,$.close,$.open),$=$.parent;let Q=F.indexOf(`
38
- `);if(Q!==-1)F=Ae(F,J,B,Q);return B+F+J},vJ,AM=(D,...F)=>{let[$]=F;if(!t5($)||!t5($.raw))return F.join(" ");let B=F.slice(1),J=[$.raw[0]];for(let Q=1;Q<$.length;Q++)J.push(String(B[Q-1]).replace(/[{}\\]/g,"\\$&"),String($.raw[Q]));if(vJ===void 0)vJ=WM();return vJ(D,J.join(""))};Object.defineProperties(e5.prototype,v4);var F9=e5();F9.supportsColor=yJ;F9.stderr=e5({level:xJ?xJ.level:0});F9.stderr.supportsColor=xJ;ZM.exports=F9});var LM=q((ZzD,gJ)=>{var UM=(D,F)=>{for(let $ of Reflect.ownKeys(F))Object.defineProperty(D,$,Object.getOwnPropertyDescriptor(F,$));return D};gJ.exports=UM;gJ.exports.default=UM});var NM=q((UzD,B9)=>{var Le=LM(),$9=new WeakMap,MM=(D,F={})=>{if(typeof D!=="function")throw TypeError("Expected a function");let $,B=0,J=D.displayName||D.name||"<anonymous>",Q=function(...X){if($9.set(Q,++B),B===1)$=D.apply(this,X),D=null;else if(F.throw===!0)throw Error(`Function \`${J}\` can only be called once`);return $};return Le(Q,D),$9.set(Q,B),Q};B9.exports=MM;B9.exports.default=MM;B9.exports.callCount=(D)=>{if(!$9.has(D))throw Error(`The given function \`${D.name}\` is not wrapped by the \`onetime\` package`);return $9.get(D)}});var CM=q((LzD,J9)=>{J9.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];if(process.platform!=="win32")J9.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");if(process.platform==="linux")J9.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")});var RM=q((MzD,x4)=>{var wD=global.process,Z6=function(D){return D&&typeof D==="object"&&typeof D.removeListener==="function"&&typeof D.emit==="function"&&typeof D.reallyExit==="function"&&typeof D.listeners==="function"&&typeof D.kill==="function"&&typeof D.pid==="number"&&typeof D.on==="function"};if(!Z6(wD))x4.exports=function(){return function(){}};else{if(hJ=XD("assert"),U6=CM(),bJ=/^win/i.test(wD.platform),y4=XD("events"),typeof y4!=="function")y4=y4.EventEmitter;if(wD.__signal_exit_emitter__)uD=wD.__signal_exit_emitter__;else uD=wD.__signal_exit_emitter__=new y4,uD.count=0,uD.emitted={};if(!uD.infinite)uD.setMaxListeners(1/0),uD.infinite=!0;x4.exports=function(D,F){if(!Z6(global.process))return function(){};if(hJ.equal(typeof D,"function","a callback must be provided for exit handler"),L6===!1)Q9();var $="exit";if(F&&F.alwaysLast)$="afterexit";var B=function(){if(uD.removeListener($,D),uD.listeners("exit").length===0&&uD.listeners("afterexit").length===0)D3()};return uD.on($,D),B},D3=function(){if(!L6||!Z6(global.process))return;L6=!1,U6.forEach(function(F){try{wD.removeListener(F,F3[F])}catch($){}}),wD.emit=$3,wD.reallyExit=X9,uD.count-=1},x4.exports.unload=D3,l8=function(F,$,B){if(uD.emitted[F])return;uD.emitted[F]=!0,uD.emit(F,$,B)},F3={},U6.forEach(function(D){F3[D]=function(){if(!Z6(global.process))return;var $=wD.listeners(D);if($.length===uD.count){if(D3(),l8("exit",null,D),l8("afterexit",null,D),bJ&&D==="SIGHUP")D="SIGINT";wD.kill(wD.pid,D)}}}),x4.exports.signals=function(){return U6},L6=!1,Q9=function(){if(L6||!Z6(global.process))return;L6=!0,uD.count+=1,U6=U6.filter(function(F){try{return wD.on(F,F3[F]),!0}catch($){return!1}}),wD.emit=mJ,wD.reallyExit=uJ},x4.exports.load=Q9,X9=wD.reallyExit,uJ=function(F){if(!Z6(global.process))return;wD.exitCode=F||0,l8("exit",wD.exitCode,null),l8("afterexit",wD.exitCode,null),X9.call(wD,wD.exitCode)},$3=wD.emit,mJ=function(F,$){if(F==="exit"&&Z6(global.process)){if($!==void 0)wD.exitCode=$;var B=$3.apply(this,arguments);return l8("exit",wD.exitCode,null),l8("afterexit",wD.exitCode,null),B}else return $3.apply(this,arguments)}}var hJ,U6,bJ,y4,uD,D3,l8,F3,L6,Q9,X9,uJ,$3,mJ});var TM=q((NzD,wM)=>{var Me=NM(),Ne=RM();wM.exports=Me(()=>{Ne(()=>{process.stderr.write("\x1B[?25h")},{alwaysLast:!0})})});var IM=q((Re)=>{var Ce=TM(),Y9=!1;Re.show=(D=process.stderr)=>{if(!D.isTTY)return;Y9=!1,D.write("\x1B[?25h")};Re.hide=(D=process.stderr)=>{if(!D.isTTY)return;Ce(),Y9=!0,D.write("\x1B[?25l")};Re.toggle=(D,F)=>{if(D!==void 0)Y9=D;if(Y9)Re.show(F);else Re.hide(F)}});var PM=q((RzD,Te)=>{Te.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 H9=q((wzD,kM)=>{var G9=Object.assign({},PM()),SM=Object.keys(G9);Object.defineProperty(G9,"random",{get(){let D=Math.floor(Math.random()*SM.length),F=SM[D];return G9[F]}});kM.exports=G9});var lJ=q((TzD,vM)=>{vM.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 xM=q((jzD,yM)=>{var d8=fJ(),je=lJ(),Oe={info:d8.blue("\u2139"),success:d8.green("\u2714"),warning:d8.yellow("\u26A0"),error:d8.red("\u2716")},Ie={info:d8.blue("i"),success:d8.green("\u221A"),warning:d8.yellow("\u203C"),error:d8.red("\xD7")};yM.exports=je()?Oe:Ie});var _M=q((OzD,W9)=>{var Pe=function(){function D(X,Y,G,H){var E;if(typeof Y==="object")G=Y.depth,H=Y.prototype,E=Y.filter,Y=Y.circular;var K=[],V=[],A=typeof Buffer<"u";if(typeof Y>"u")Y=!0;if(typeof G>"u")G=1/0;function Z(U,L){if(U===null)return null;if(L==0)return U;var M,N;if(typeof U!="object")return U;if(D.__isArray(U))M=[];else if(D.__isRegExp(U)){if(M=new RegExp(U.source,Q(U)),U.lastIndex)M.lastIndex=U.lastIndex}else if(D.__isDate(U))M=new Date(U.getTime());else if(A&&Buffer.isBuffer(U)){if(Buffer.allocUnsafe)M=Buffer.allocUnsafe(U.length);else M=new Buffer(U.length);return U.copy(M),M}else if(typeof H>"u")N=Object.getPrototypeOf(U),M=Object.create(N);else M=Object.create(H),N=H;if(Y){var O=K.indexOf(U);if(O!=-1)return V[O];K.push(U),V.push(M)}for(var b in U){var T;if(N)T=Object.getOwnPropertyDescriptor(N,b);if(T&&T.set==null)continue;M[b]=Z(U[b],L-1)}return M}return Z(X,G)}D.clonePrototype=function(Y){if(Y===null)return null;var G=function(){};return G.prototype=Y,new G};function F(X){return Object.prototype.toString.call(X)}D.__objToStr=F;function $(X){return typeof X==="object"&&F(X)==="[object Date]"}D.__isDate=$;function B(X){return typeof X==="object"&&F(X)==="[object Array]"}D.__isArray=B;function J(X){return typeof X==="object"&&F(X)==="[object RegExp]"}D.__isRegExp=J;function Q(X){var Y="";if(X.global)Y+="g";if(X.ignoreCase)Y+="i";if(X.multiline)Y+="m";return Y}return D.__getRegExpFlags=Q,D}();if(typeof W9==="object"&&W9.exports)W9.exports=Pe});var gM=q((IzD,fM)=>{var Se=_M();fM.exports=function(D,F){return D=D||{},Object.keys(F).forEach(function($){if(typeof D[$]>"u")D[$]=Se(F[$])}),D}});var bM=q((PzD,hM)=>{hM.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 dM=q((SzD,dJ)=>{var ke=gM(),B3=bM(),mM={nul:0,control:0};dJ.exports=function(F){return lM(F,mM)};dJ.exports.config=function(D){return D=ke(D||{},mM),function($){return lM($,D)}};function lM(D,F){if(typeof D!=="string")return uM(D,F);var $=0;for(var B=0;B<D.length;B++){var J=uM(D.charCodeAt(B),F);if(J<0)return-1;$+=J}return $}function uM(D,F){if(D===0)return F.nul;if(D<32||D>=127&&D<160)return F.control;if(ve(D))return 0;return 1+(D>=4352&&(D<=4447||D==9001||D==9002||D>=11904&&D<=42191&&D!=12351||D>=44032&&D<=55203||D>=63744&&D<=64255||D>=65040&&D<=65049||D>=65072&&D<=65135||D>=65280&&D<=65376||D>=65504&&D<=65510||D>=131072&&D<=196605||D>=196608&&D<=262141))}function ve(D){var F=0,$=B3.length-1,B;if(D<B3[0][0]||D>B3[$][1])return!1;while($>=F)if(B=Math.floor((F+$)/2),D>B3[B][1])F=B+1;else if(D<B3[B][0])$=B-1;else return!0;return!1}});var cM=q((kzD,pM)=>{pM.exports=({stream:D=process.stdout}={})=>{return Boolean(D&&D.isTTY&&process.env.TERM!=="dumb"&&!("CI"in process.env))}});var rM=q((vzD,sM)=>{function nM(D,F){var $=Object.keys(D);if(Object.getOwnPropertySymbols){var B=Object.getOwnPropertySymbols(D);F&&(B=B.filter(function(J){return Object.getOwnPropertyDescriptor(D,J).enumerable})),$.push.apply($,B)}return $}function iM(D){for(var F=1;F<arguments.length;F++){var $=arguments[F]!=null?arguments[F]:{};F%2?nM(Object($),!0).forEach(function(B){ye(D,B,$[B])}):Object.getOwnPropertyDescriptors?Object.defineProperties(D,Object.getOwnPropertyDescriptors($)):nM(Object($)).forEach(function(B){Object.defineProperty(D,B,Object.getOwnPropertyDescriptor($,B))})}return D}function ye(D,F,$){if(F=oM(F),F in D)Object.defineProperty(D,F,{value:$,enumerable:!0,configurable:!0,writable:!0});else D[F]=$;return D}function xe(D,F){if(!(D instanceof F))throw TypeError("Cannot call a class as a function")}function aM(D,F){for(var $=0;$<F.length;$++){var B=F[$];if(B.enumerable=B.enumerable||!1,B.configurable=!0,"value"in B)B.writable=!0;Object.defineProperty(D,oM(B.key),B)}}function _e(D,F,$){if(F)aM(D.prototype,F);if($)aM(D,$);return Object.defineProperty(D,"prototype",{writable:!1}),D}function oM(D){var F=fe(D,"string");return typeof F==="symbol"?F:String(F)}function fe(D,F){if(typeof D!=="object"||D===null)return D;var $=D[Symbol.toPrimitive];if($!==void 0){var B=$.call(D,F||"default");if(typeof B!=="object")return B;throw TypeError("@@toPrimitive must return a primitive value.")}return(F==="string"?String:Number)(D)}var ge=XD("buffer"),E9=ge.Buffer,he=XD("util"),pJ=he.inspect,be=pJ&&pJ.custom||"inspect";function ue(D,F,$){E9.prototype.copy.call(D,F,$)}sM.exports=function(){function D(){xe(this,D),this.head=null,this.tail=null,this.length=0}return _e(D,[{key:"push",value:function($){var B={data:$,next:null};if(this.length>0)this.tail.next=B;else this.head=B;this.tail=B,++this.length}},{key:"unshift",value:function($){var B={data:$,next:this.head};if(this.length===0)this.tail=B;this.head=B,++this.length}},{key:"shift",value:function(){if(this.length===0)return;var $=this.head.data;if(this.length===1)this.head=this.tail=null;else this.head=this.head.next;return--this.length,$}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function($){if(this.length===0)return"";var B=this.head,J=""+B.data;while(B=B.next)J+=$+B.data;return J}},{key:"concat",value:function($){if(this.length===0)return E9.alloc(0);var B=E9.allocUnsafe($>>>0),J=this.head,Q=0;while(J)ue(J.data,B,Q),Q+=J.data.length,J=J.next;return B}},{key:"consume",value:function($,B){var J;if($<this.head.data.length)J=this.head.data.slice(0,$),this.head.data=this.head.data.slice($);else if($===this.head.data.length)J=this.shift();else J=B?this._getString($):this._getBuffer($);return J}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function($){var B=this.head,J=1,Q=B.data;$-=Q.length;while(B=B.next){var X=B.data,Y=$>X.length?X.length:$;if(Y===X.length)Q+=X;else Q+=X.slice(0,$);if($-=Y,$===0){if(Y===X.length)if(++J,B.next)this.head=B.next;else this.head=this.tail=null;else this.head=B,B.data=X.slice(Y);break}++J}return this.length-=J,Q}},{key:"_getBuffer",value:function($){var B=E9.allocUnsafe($),J=this.head,Q=1;J.data.copy(B),$-=J.data.length;while(J=J.next){var X=J.data,Y=$>X.length?X.length:$;if(X.copy(B,B.length-$,0,Y),$-=Y,$===0){if(Y===X.length)if(++Q,J.next)this.head=J.next;else this.head=this.tail=null;else this.head=J,J.data=X.slice(Y);break}++Q}return this.length-=Q,B}},{key:be,value:function($,B){return pJ(this,iM(iM({},B),{},{depth:0,customInspect:!1}))}}]),D}()});var nJ=q((yzD,eM)=>{function me(D,F){var $=this,B=this._readableState&&this._readableState.destroyed,J=this._writableState&&this._writableState.destroyed;if(B||J){if(F)F(D);else if(D){if(!this._writableState)process.nextTick(cJ,this,D);else if(!this._writableState.errorEmitted)this._writableState.errorEmitted=!0,process.nextTick(cJ,this,D)}return this}if(this._readableState)this._readableState.destroyed=!0;if(this._writableState)this._writableState.destroyed=!0;return this._destroy(D||null,function(Q){if(!F&&Q)if(!$._writableState)process.nextTick(tM,$,Q);else if(!$._writableState.errorEmitted)$._writableState.errorEmitted=!0,process.nextTick(tM,$,Q);else process.nextTick(q9,$);else if(F)process.nextTick(q9,$),F(Q);else process.nextTick(q9,$)}),this}function tM(D,F){cJ(D,F),q9(D)}function q9(D){if(D._writableState&&!D._writableState.emitClose)return;if(D._readableState&&!D._readableState.emitClose)return;D.emit("close")}function le(){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 cJ(D,F){D.emit("error",F)}function de(D,F){var{_readableState:$,_writableState:B}=D;if($&&$.autoDestroy||B&&B.autoDestroy)D.destroy(F);else D.emit("error",F)}eM.exports={destroy:me,undestroy:le,errorOrDestroy:de}});var p8=q((ie,$N)=>{var FN={};function m0(D,F,$){if(!$)$=Error;function B(Q,X,Y){if(typeof F==="string")return F;else return F(Q,X,Y)}class J extends ${constructor(Q,X,Y){super(B(Q,X,Y))}}J.prototype.name=$.name,J.prototype.code=D,FN[D]=J}function DN(D,F){if(Array.isArray(D)){let $=D.length;if(D=D.map((B)=>String(B)),$>2)return`one of ${F} ${D.slice(0,$-1).join(", ")}, or `+D[$-1];else if($===2)return`one of ${F} ${D[0]} or ${D[1]}`;else return`of ${F} ${D[0]}`}else return`of ${F} ${String(D)}`}function pe(D,F,$){return D.substr(!$||$<0?0:+$,F.length)===F}function ce(D,F,$){if($===void 0||$>D.length)$=D.length;return D.substring($-F.length,$)===F}function ne(D,F,$){if(typeof $!=="number")$=0;if($+F.length>D.length)return!1;else return D.indexOf(F,$)!==-1}m0("ERR_INVALID_OPT_VALUE",function(D,F){return'The value "'+F+'" is invalid for option "'+D+'"'},TypeError);m0("ERR_INVALID_ARG_TYPE",function(D,F,$){let B;if(typeof F==="string"&&pe(F,"not "))B="must not be",F=F.replace(/^not /,"");else B="must be";let J;if(ce(D," argument"))J=`The ${D} ${B} ${DN(F,"type")}`;else{let Q=ne(D,".")?"property":"argument";J=`The "${D}" ${Q} ${B} ${DN(F,"type")}`}return J+=`. Received type ${typeof $}`,J},TypeError);m0("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");m0("ERR_METHOD_NOT_IMPLEMENTED",function(D){return"The "+D+" method is not implemented"});m0("ERR_STREAM_PREMATURE_CLOSE","Premature close");m0("ERR_STREAM_DESTROYED",function(D){return"Cannot call "+D+" after a stream was destroyed"});m0("ERR_MULTIPLE_CALLBACK","Callback called multiple times");m0("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");m0("ERR_STREAM_WRITE_AFTER_END","write after end");m0("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);m0("ERR_UNKNOWN_ENCODING",function(D){return"Unknown encoding: "+D},TypeError);m0("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");ie.codes=FN});var iJ=q((xzD,BN)=>{var oe=p8().codes.ERR_INVALID_OPT_VALUE;function se(D,F,$){return D.highWaterMark!=null?D.highWaterMark:F?D[$]:null}function re(D,F,$,B){var J=se(F,B,$);if(J!=null){if(!(isFinite(J)&&Math.floor(J)===J)||J<0){var Q=B?$:"highWaterMark";throw new oe(Q,J)}return Math.floor(J)}return D.objectMode?16:16384}BN.exports={getHighWaterMark:re}});var JN=q((_zD,aJ)=>{if(typeof Object.create==="function")aJ.exports=function(F,$){if($)F.super_=$,F.prototype=Object.create($.prototype,{constructor:{value:F,enumerable:!1,writable:!0,configurable:!0}})};else aJ.exports=function(F,$){if($){F.super_=$;var B=function(){};B.prototype=$.prototype,F.prototype=new B,F.prototype.constructor=F}}});var M6=q((fzD,oJ)=>{try{if(K9=XD("util"),typeof K9.inherits!=="function")throw"";oJ.exports=K9.inherits}catch(D){oJ.exports=JN()}var K9});var XN=q((gzD,QN)=>{QN.exports=XD("util").deprecate});var tJ=q((hzD,qN)=>{qN.exports=vD;function GN(D){var F=this;this.next=null,this.entry=null,this.finish=function(){wDD(F,D)}}var _4;vD.WritableState=Q3;var te={deprecate:XN()},HN=XD("stream"),V9=XD("buffer").Buffer,ee=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function DDD(D){return V9.from(D)}function FDD(D){return V9.isBuffer(D)||D instanceof ee}var rJ=nJ(),$DD=iJ(),BDD=$DD.getHighWaterMark,c8=p8().codes,JDD=c8.ERR_INVALID_ARG_TYPE,QDD=c8.ERR_METHOD_NOT_IMPLEMENTED,XDD=c8.ERR_MULTIPLE_CALLBACK,YDD=c8.ERR_STREAM_CANNOT_PIPE,GDD=c8.ERR_STREAM_DESTROYED,HDD=c8.ERR_STREAM_NULL_VALUES,WDD=c8.ERR_STREAM_WRITE_AFTER_END,EDD=c8.ERR_UNKNOWN_ENCODING,f4=rJ.errorOrDestroy;M6()(vD,HN);function qDD(){}function Q3(D,F,$){if(_4=_4||N6(),D=D||{},typeof $!=="boolean")$=F instanceof _4;if(this.objectMode=!!D.objectMode,$)this.objectMode=this.objectMode||!!D.writableObjectMode;this.highWaterMark=BDD(this,D,"writableHighWaterMark",$),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var B=D.decodeStrings===!1;this.decodeStrings=!B,this.defaultEncoding=D.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(J){LDD(F,J)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=D.emitClose!==!1,this.autoDestroy=!!D.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new GN(this)}Q3.prototype.getBuffer=function(){var F=this.bufferedRequest,$=[];while(F)$.push(F),F=F.next;return $};(function(){try{Object.defineProperty(Q3.prototype,"buffer",{get:te.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(D){}})();var z9;if(typeof Symbol==="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]==="function")z9=Function.prototype[Symbol.hasInstance],Object.defineProperty(vD,Symbol.hasInstance,{value:function(F){if(z9.call(this,F))return!0;if(this!==vD)return!1;return F&&F._writableState instanceof Q3}});else z9=function(F){return F instanceof this};function vD(D){_4=_4||N6();var F=this instanceof _4;if(!F&&!z9.call(vD,this))return new vD(D);if(this._writableState=new Q3(D,this,F),this.writable=!0,D){if(typeof D.write==="function")this._write=D.write;if(typeof D.writev==="function")this._writev=D.writev;if(typeof D.destroy==="function")this._destroy=D.destroy;if(typeof D.final==="function")this._final=D.final}HN.call(this)}vD.prototype.pipe=function(){f4(this,new YDD)};function KDD(D,F){var $=new WDD;f4(D,$),process.nextTick(F,$)}function zDD(D,F,$,B){var J;if($===null)J=new HDD;else if(typeof $!=="string"&&!F.objectMode)J=new JDD("chunk",["string","Buffer"],$);if(J)return f4(D,J),process.nextTick(B,J),!1;return!0}vD.prototype.write=function(D,F,$){var B=this._writableState,J=!1,Q=!B.objectMode&&FDD(D);if(Q&&!V9.isBuffer(D))D=DDD(D);if(typeof F==="function")$=F,F=null;if(Q)F="buffer";else if(!F)F=B.defaultEncoding;if(typeof $!=="function")$=qDD;if(B.ending)KDD(this,$);else if(Q||zDD(this,B,D,$))B.pendingcb++,J=ADD(this,B,Q,D,F,$);return J};vD.prototype.cork=function(){this._writableState.corked++};vD.prototype.uncork=function(){var D=this._writableState;if(D.corked){if(D.corked--,!D.writing&&!D.corked&&!D.bufferProcessing&&D.bufferedRequest)WN(this,D)}};vD.prototype.setDefaultEncoding=function(F){if(typeof F==="string")F=F.toLowerCase();if(!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((F+"").toLowerCase())>-1))throw new EDD(F);return this._writableState.defaultEncoding=F,this};Object.defineProperty(vD.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function VDD(D,F,$){if(!D.objectMode&&D.decodeStrings!==!1&&typeof F==="string")F=V9.from(F,$);return F}Object.defineProperty(vD.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function ADD(D,F,$,B,J,Q){if(!$){var X=VDD(F,B,J);if(B!==X)$=!0,J="buffer",B=X}var Y=F.objectMode?1:B.length;F.length+=Y;var G=F.length<F.highWaterMark;if(!G)F.needDrain=!0;if(F.writing||F.corked){var H=F.lastBufferedRequest;if(F.lastBufferedRequest={chunk:B,encoding:J,isBuf:$,callback:Q,next:null},H)H.next=F.lastBufferedRequest;else F.bufferedRequest=F.lastBufferedRequest;F.bufferedRequestCount+=1}else sJ(D,F,!1,Y,B,J,Q);return G}function sJ(D,F,$,B,J,Q,X){if(F.writelen=B,F.writecb=X,F.writing=!0,F.sync=!0,F.destroyed)F.onwrite(new GDD("write"));else if($)D._writev(J,F.onwrite);else D._write(J,Q,F.onwrite);F.sync=!1}function ZDD(D,F,$,B,J){if(--F.pendingcb,$)process.nextTick(J,B),process.nextTick(J3,D,F),D._writableState.errorEmitted=!0,f4(D,B);else J(B),D._writableState.errorEmitted=!0,f4(D,B),J3(D,F)}function UDD(D){D.writing=!1,D.writecb=null,D.length-=D.writelen,D.writelen=0}function LDD(D,F){var $=D._writableState,B=$.sync,J=$.writecb;if(typeof J!=="function")throw new XDD;if(UDD($),F)ZDD(D,$,B,F,J);else{var Q=EN($)||D.destroyed;if(!Q&&!$.corked&&!$.bufferProcessing&&$.bufferedRequest)WN(D,$);if(B)process.nextTick(YN,D,$,Q,J);else YN(D,$,Q,J)}}function YN(D,F,$,B){if(!$)MDD(D,F);F.pendingcb--,B(),J3(D,F)}function MDD(D,F){if(F.length===0&&F.needDrain)F.needDrain=!1,D.emit("drain")}function WN(D,F){F.bufferProcessing=!0;var $=F.bufferedRequest;if(D._writev&&$&&$.next){var B=F.bufferedRequestCount,J=Array(B),Q=F.corkedRequestsFree;Q.entry=$;var X=0,Y=!0;while($){if(J[X]=$,!$.isBuf)Y=!1;$=$.next,X+=1}if(J.allBuffers=Y,sJ(D,F,!0,F.length,J,"",Q.finish),F.pendingcb++,F.lastBufferedRequest=null,Q.next)F.corkedRequestsFree=Q.next,Q.next=null;else F.corkedRequestsFree=new GN(F);F.bufferedRequestCount=0}else{while($){var{chunk:G,encoding:H,callback:E}=$,K=F.objectMode?1:G.length;if(sJ(D,F,!1,K,G,H,E),$=$.next,F.bufferedRequestCount--,F.writing)break}if($===null)F.lastBufferedRequest=null}F.bufferedRequest=$,F.bufferProcessing=!1}vD.prototype._write=function(D,F,$){$(new QDD("_write()"))};vD.prototype._writev=null;vD.prototype.end=function(D,F,$){var B=this._writableState;if(typeof D==="function")$=D,D=null,F=null;else if(typeof F==="function")$=F,F=null;if(D!==null&&D!==void 0)this.write(D,F);if(B.corked)B.corked=1,this.uncork();if(!B.ending)RDD(this,B,$);return this};Object.defineProperty(vD.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function EN(D){return D.ending&&D.length===0&&D.bufferedRequest===null&&!D.finished&&!D.writing}function NDD(D,F){D._final(function($){if(F.pendingcb--,$)f4(D,$);F.prefinished=!0,D.emit("prefinish"),J3(D,F)})}function CDD(D,F){if(!F.prefinished&&!F.finalCalled)if(typeof D._final==="function"&&!F.destroyed)F.pendingcb++,F.finalCalled=!0,process.nextTick(NDD,D,F);else F.prefinished=!0,D.emit("prefinish")}function J3(D,F){var $=EN(F);if($){if(CDD(D,F),F.pendingcb===0){if(F.finished=!0,D.emit("finish"),F.autoDestroy){var B=D._readableState;if(!B||B.autoDestroy&&B.endEmitted)D.destroy()}}}return $}function RDD(D,F,$){if(F.ending=!0,J3(D,F),$)if(F.finished)process.nextTick($);else D.once("finish",$);F.ended=!0,D.writable=!1}function wDD(D,F,$){var B=D.entry;D.entry=null;while(B){var J=B.callback;F.pendingcb--,J($),B=B.next}F.corkedRequestsFree.next=D}Object.defineProperty(vD.prototype,"destroyed",{enumerable:!1,get:function(){if(this._writableState===void 0)return!1;return this._writableState.destroyed},set:function(F){if(!this._writableState)return;this._writableState.destroyed=F}});vD.prototype.destroy=rJ.destroy;vD.prototype._undestroy=rJ.undestroy;vD.prototype._destroy=function(D,F){F(D)}});var N6=q((bzD,zN)=>{var TDD=Object.keys||function(D){var F=[];for(var $ in D)F.push($);return F};zN.exports=v1;var KN=DQ(),eJ=tJ();M6()(v1,KN);{A9=TDD(eJ.prototype);for(X3=0;X3<A9.length;X3++)if(Y3=A9[X3],!v1.prototype[Y3])v1.prototype[Y3]=eJ.prototype[Y3]}var A9,Y3,X3;function v1(D){if(!(this instanceof v1))return new v1(D);if(KN.call(this,D),eJ.call(this,D),this.allowHalfOpen=!0,D){if(D.readable===!1)this.readable=!1;if(D.writable===!1)this.writable=!1;if(D.allowHalfOpen===!1)this.allowHalfOpen=!1,this.once("end",jDD)}}Object.defineProperty(v1.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});Object.defineProperty(v1.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});Object.defineProperty(v1.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function jDD(){if(this._writableState.ended)return;process.nextTick(ODD,this)}function ODD(D){D.end()}Object.defineProperty(v1.prototype,"destroyed",{enumerable:!1,get:function(){if(this._readableState===void 0||this._writableState===void 0)return!1;return this._readableState.destroyed&&this._writableState.destroyed},set:function(F){if(this._readableState===void 0||this._writableState===void 0)return;this._readableState.destroyed=F,this._writableState.destroyed=F}})});var ZN=q((FQ,AN)=>{/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var Z9=XD("buffer"),y1=Z9.Buffer;function VN(D,F){for(var $ in D)F[$]=D[$]}if(y1.from&&y1.alloc&&y1.allocUnsafe&&y1.allocUnsafeSlow)AN.exports=Z9;else VN(Z9,FQ),FQ.Buffer=C6;function C6(D,F,$){return y1(D,F,$)}C6.prototype=Object.create(y1.prototype);VN(y1,C6);C6.from=function(D,F,$){if(typeof D==="number")throw TypeError("Argument must not be a number");return y1(D,F,$)};C6.alloc=function(D,F,$){if(typeof D!=="number")throw TypeError("Argument must be a number");var B=y1(D);if(F!==void 0)if(typeof $==="string")B.fill(F,$);else B.fill(F);else B.fill(0);return B};C6.allocUnsafe=function(D){if(typeof D!=="number")throw TypeError("Argument must be a number");return y1(D)};C6.allocUnsafeSlow=function(D){if(typeof D!=="number")throw TypeError("Argument must be a number");return Z9.SlowBuffer(D)}});var JQ=q((mDD)=>{var BQ=ZN().Buffer,UN=BQ.isEncoding||function(D){switch(D=""+D,D&&D.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function IDD(D){if(!D)return"utf8";var F;while(!0)switch(D){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return D;default:if(F)return;D=(""+D).toLowerCase(),F=!0}}function PDD(D){var F=IDD(D);if(typeof F!=="string"&&(BQ.isEncoding===UN||!UN(D)))throw Error("Unknown encoding: "+D);return F||D}mDD.StringDecoder=G3;function G3(D){this.encoding=PDD(D);var F;switch(this.encoding){case"utf16le":this.text=_DD,this.end=fDD,F=4;break;case"utf8":this.fillLast=vDD,F=4;break;case"base64":this.text=gDD,this.end=hDD,F=3;break;default:this.write=bDD,this.end=uDD;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=BQ.allocUnsafe(F)}G3.prototype.write=function(D){if(D.length===0)return"";var F,$;if(this.lastNeed){if(F=this.fillLast(D),F===void 0)return"";$=this.lastNeed,this.lastNeed=0}else $=0;if($<D.length)return F?F+this.text(D,$):this.text(D,$);return F||""};G3.prototype.end=xDD;G3.prototype.text=yDD;G3.prototype.fillLast=function(D){if(this.lastNeed<=D.length)return D.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);D.copy(this.lastChar,this.lastTotal-this.lastNeed,0,D.length),this.lastNeed-=D.length};function $Q(D){if(D<=127)return 0;else if(D>>5===6)return 2;else if(D>>4===14)return 3;else if(D>>3===30)return 4;return D>>6===2?-1:-2}function SDD(D,F,$){var B=F.length-1;if(B<$)return 0;var J=$Q(F[B]);if(J>=0){if(J>0)D.lastNeed=J-1;return J}if(--B<$||J===-2)return 0;if(J=$Q(F[B]),J>=0){if(J>0)D.lastNeed=J-2;return J}if(--B<$||J===-2)return 0;if(J=$Q(F[B]),J>=0){if(J>0)if(J===2)J=0;else D.lastNeed=J-3;return J}return 0}function kDD(D,F,$){if((F[0]&192)!==128)return D.lastNeed=0,"\uFFFD";if(D.lastNeed>1&&F.length>1){if((F[1]&192)!==128)return D.lastNeed=1,"\uFFFD";if(D.lastNeed>2&&F.length>2){if((F[2]&192)!==128)return D.lastNeed=2,"\uFFFD"}}}function vDD(D){var F=this.lastTotal-this.lastNeed,$=kDD(this,D,F);if($!==void 0)return $;if(this.lastNeed<=D.length)return D.copy(this.lastChar,F,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);D.copy(this.lastChar,F,0,D.length),this.lastNeed-=D.length}function yDD(D,F){var $=SDD(this,D,F);if(!this.lastNeed)return D.toString("utf8",F);this.lastTotal=$;var B=D.length-($-this.lastNeed);return D.copy(this.lastChar,0,B),D.toString("utf8",F,B)}function xDD(D){var F=D&&D.length?this.write(D):"";if(this.lastNeed)return F+"\uFFFD";return F}function _DD(D,F){if((D.length-F)%2===0){var $=D.toString("utf16le",F);if($){var B=$.charCodeAt($.length-1);if(B>=55296&&B<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=D[D.length-2],this.lastChar[1]=D[D.length-1],$.slice(0,-1)}return $}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=D[D.length-1],D.toString("utf16le",F,D.length-1)}function fDD(D){var F=D&&D.length?this.write(D):"";if(this.lastNeed){var $=this.lastTotal-this.lastNeed;return F+this.lastChar.toString("utf16le",0,$)}return F}function gDD(D,F){var $=(D.length-F)%3;if($===0)return D.toString("base64",F);if(this.lastNeed=3-$,this.lastTotal=3,$===1)this.lastChar[0]=D[D.length-1];else this.lastChar[0]=D[D.length-2],this.lastChar[1]=D[D.length-1];return D.toString("base64",F,D.length-$)}function hDD(D){var F=D&&D.length?this.write(D):"";if(this.lastNeed)return F+this.lastChar.toString("base64",0,3-this.lastNeed);return F}function bDD(D){return D.toString(this.encoding)}function uDD(D){return D&&D.length?this.write(D):""}});var U9=q((mzD,NN)=>{var LN=p8().codes.ERR_STREAM_PREMATURE_CLOSE;function dDD(D){var F=!1;return function(){if(F)return;F=!0;for(var $=arguments.length,B=Array($),J=0;J<$;J++)B[J]=arguments[J];D.apply(this,B)}}function pDD(){}function cDD(D){return D.setHeader&&typeof D.abort==="function"}function MN(D,F,$){if(typeof F==="function")return MN(D,null,F);if(!F)F={};$=dDD($||pDD);var B=F.readable||F.readable!==!1&&D.readable,J=F.writable||F.writable!==!1&&D.writable,Q=function(){if(!D.writable)Y()},X=D._writableState&&D._writableState.finished,Y=function(){if(J=!1,X=!0,!B)$.call(D)},G=D._readableState&&D._readableState.endEmitted,H=function(){if(B=!1,G=!0,!J)$.call(D)},E=function(Z){$.call(D,Z)},K=function(){var Z;if(B&&!G){if(!D._readableState||!D._readableState.ended)Z=new LN;return $.call(D,Z)}if(J&&!X){if(!D._writableState||!D._writableState.ended)Z=new LN;return $.call(D,Z)}},V=function(){D.req.on("finish",Y)};if(cDD(D))if(D.on("complete",Y),D.on("abort",K),D.req)V();else D.on("request",V);else if(J&&!D._writableState)D.on("end",Q),D.on("close",Q);if(D.on("end",H),D.on("finish",Y),F.error!==!1)D.on("error",E);return D.on("close",K),function(){if(D.removeListener("complete",Y),D.removeListener("abort",K),D.removeListener("request",V),D.req)D.req.removeListener("finish",Y);D.removeListener("end",Q),D.removeListener("close",Q),D.removeListener("finish",Y),D.removeListener("end",H),D.removeListener("error",E),D.removeListener("close",K)}}NN.exports=MN});var RN=q((lzD,CN)=>{var L9;function n8(D,F,$){if(F=nDD(F),F in D)Object.defineProperty(D,F,{value:$,enumerable:!0,configurable:!0,writable:!0});else D[F]=$;return D}function nDD(D){var F=iDD(D,"string");return typeof F==="symbol"?F:String(F)}function iDD(D,F){if(typeof D!=="object"||D===null)return D;var $=D[Symbol.toPrimitive];if($!==void 0){var B=$.call(D,F||"default");if(typeof B!=="object")return B;throw TypeError("@@toPrimitive must return a primitive value.")}return(F==="string"?String:Number)(D)}var aDD=U9(),i8=Symbol("lastResolve"),R6=Symbol("lastReject"),H3=Symbol("error"),M9=Symbol("ended"),w6=Symbol("lastPromise"),QQ=Symbol("handlePromise"),T6=Symbol("stream");function a8(D,F){return{value:D,done:F}}function oDD(D){var F=D[i8];if(F!==null){var $=D[T6].read();if($!==null)D[w6]=null,D[i8]=null,D[R6]=null,F(a8($,!1))}}function sDD(D){process.nextTick(oDD,D)}function rDD(D,F){return function($,B){D.then(function(){if(F[M9]){$(a8(void 0,!0));return}F[QQ]($,B)},B)}}var tDD=Object.getPrototypeOf(function(){}),eDD=Object.setPrototypeOf((L9={get stream(){return this[T6]},next:function(){var F=this,$=this[H3];if($!==null)return Promise.reject($);if(this[M9])return Promise.resolve(a8(void 0,!0));if(this[T6].destroyed)return new Promise(function(X,Y){process.nextTick(function(){if(F[H3])Y(F[H3]);else X(a8(void 0,!0))})});var B=this[w6],J;if(B)J=new Promise(rDD(B,this));else{var Q=this[T6].read();if(Q!==null)return Promise.resolve(a8(Q,!1));J=new Promise(this[QQ])}return this[w6]=J,J}},n8(L9,Symbol.asyncIterator,function(){return this}),n8(L9,"return",function(){var F=this;return new Promise(function($,B){F[T6].destroy(null,function(J){if(J){B(J);return}$(a8(void 0,!0))})})}),L9),tDD),D0D=function(F){var $,B=Object.create(eDD,($={},n8($,T6,{value:F,writable:!0}),n8($,i8,{value:null,writable:!0}),n8($,R6,{value:null,writable:!0}),n8($,H3,{value:null,writable:!0}),n8($,M9,{value:F._readableState.endEmitted,writable:!0}),n8($,QQ,{value:function(Q,X){var Y=B[T6].read();if(Y)B[w6]=null,B[i8]=null,B[R6]=null,Q(a8(Y,!1));else B[i8]=Q,B[R6]=X},writable:!0}),$));return B[w6]=null,aDD(F,function(J){if(J&&J.code!=="ERR_STREAM_PREMATURE_CLOSE"){var Q=B[R6];if(Q!==null)B[w6]=null,B[i8]=null,B[R6]=null,Q(J);B[H3]=J;return}var X=B[i8];if(X!==null)B[w6]=null,B[i8]=null,B[R6]=null,X(a8(void 0,!0));B[M9]=!0}),F.on("readable",sDD.bind(null,B)),B};CN.exports=D0D});var ON=q((dzD,jN)=>{function wN(D,F,$,B,J,Q,X){try{var Y=D[Q](X),G=Y.value}catch(H){$(H);return}if(Y.done)F(G);else Promise.resolve(G).then(B,J)}function F0D(D){return function(){var F=this,$=arguments;return new Promise(function(B,J){var Q=D.apply(F,$);function X(G){wN(Q,B,J,X,Y,"next",G)}function Y(G){wN(Q,B,J,X,Y,"throw",G)}X(void 0)})}}function TN(D,F){var $=Object.keys(D);if(Object.getOwnPropertySymbols){var B=Object.getOwnPropertySymbols(D);F&&(B=B.filter(function(J){return Object.getOwnPropertyDescriptor(D,J).enumerable})),$.push.apply($,B)}return $}function $0D(D){for(var F=1;F<arguments.length;F++){var $=arguments[F]!=null?arguments[F]:{};F%2?TN(Object($),!0).forEach(function(B){B0D(D,B,$[B])}):Object.getOwnPropertyDescriptors?Object.defineProperties(D,Object.getOwnPropertyDescriptors($)):TN(Object($)).forEach(function(B){Object.defineProperty(D,B,Object.getOwnPropertyDescriptor($,B))})}return D}function B0D(D,F,$){if(F=J0D(F),F in D)Object.defineProperty(D,F,{value:$,enumerable:!0,configurable:!0,writable:!0});else D[F]=$;return D}function J0D(D){var F=Q0D(D,"string");return typeof F==="symbol"?F:String(F)}function Q0D(D,F){if(typeof D!=="object"||D===null)return D;var $=D[Symbol.toPrimitive];if($!==void 0){var B=$.call(D,F||"default");if(typeof B!=="object")return B;throw TypeError("@@toPrimitive must return a primitive value.")}return(F==="string"?String:Number)(D)}var X0D=p8().codes.ERR_INVALID_ARG_TYPE;function Y0D(D,F,$){var B;if(F&&typeof F.next==="function")B=F;else if(F&&F[Symbol.asyncIterator])B=F[Symbol.asyncIterator]();else if(F&&F[Symbol.iterator])B=F[Symbol.iterator]();else throw new X0D("iterable",["Iterable"],F);var J=new D($0D({objectMode:!0},$)),Q=!1;J._read=function(){if(!Q)Q=!0,X()};function X(){return Y.apply(this,arguments)}function Y(){return Y=F0D(function*(){try{var G=yield B.next(),H=G.value,E=G.done;if(E)J.push(null);else if(J.push(yield H))X();else Q=!1}catch(K){J.destroy(K)}}),Y.apply(this,arguments)}return J}jN.exports=Y0D});var DQ=q((czD,gN)=>{gN.exports=HD;var g4;HD.ReadableState=kN;var pzD=XD("events").EventEmitter,SN=function(F,$){return F.listeners($).length},E3=XD("stream"),N9=XD("buffer").Buffer,G0D=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function H0D(D){return N9.from(D)}function W0D(D){return N9.isBuffer(D)||D instanceof G0D}var XQ=XD("util"),DD;if(XQ&&XQ.debuglog)DD=XQ.debuglog("stream");else DD=function(){};var E0D=rM(),KQ=nJ(),q0D=iJ(),K0D=q0D.getHighWaterMark,C9=p8().codes,z0D=C9.ERR_INVALID_ARG_TYPE,V0D=C9.ERR_STREAM_PUSH_AFTER_EOF,A0D=C9.ERR_METHOD_NOT_IMPLEMENTED,Z0D=C9.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,h4,YQ,GQ;M6()(HD,E3);var W3=KQ.errorOrDestroy,HQ=["error","close","destroy","pause","resume"];function U0D(D,F,$){if(typeof D.prependListener==="function")return D.prependListener(F,$);if(!D._events||!D._events[F])D.on(F,$);else if(Array.isArray(D._events[F]))D._events[F].unshift($);else D._events[F]=[$,D._events[F]]}function kN(D,F,$){if(g4=g4||N6(),D=D||{},typeof $!=="boolean")$=F instanceof g4;if(this.objectMode=!!D.objectMode,$)this.objectMode=this.objectMode||!!D.readableObjectMode;if(this.highWaterMark=K0D(this,D,"readableHighWaterMark",$),this.buffer=new E0D,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=D.emitClose!==!1,this.autoDestroy=!!D.autoDestroy,this.destroyed=!1,this.defaultEncoding=D.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,D.encoding){if(!h4)h4=JQ().StringDecoder;this.decoder=new h4(D.encoding),this.encoding=D.encoding}}function HD(D){if(g4=g4||N6(),!(this instanceof HD))return new HD(D);var F=this instanceof g4;if(this._readableState=new kN(D,this,F),this.readable=!0,D){if(typeof D.read==="function")this._read=D.read;if(typeof D.destroy==="function")this._destroy=D.destroy}E3.call(this)}Object.defineProperty(HD.prototype,"destroyed",{enumerable:!1,get:function(){if(this._readableState===void 0)return!1;return this._readableState.destroyed},set:function(F){if(!this._readableState)return;this._readableState.destroyed=F}});HD.prototype.destroy=KQ.destroy;HD.prototype._undestroy=KQ.undestroy;HD.prototype._destroy=function(D,F){F(D)};HD.prototype.push=function(D,F){var $=this._readableState,B;if(!$.objectMode){if(typeof D==="string"){if(F=F||$.defaultEncoding,F!==$.encoding)D=N9.from(D,F),F="";B=!0}}else B=!0;return vN(this,D,F,!1,B)};HD.prototype.unshift=function(D){return vN(this,D,null,!0,!1)};function vN(D,F,$,B,J){DD("readableAddChunk",F);var Q=D._readableState;if(F===null)Q.reading=!1,N0D(D,Q);else{var X;if(!J)X=L0D(Q,F);if(X)W3(D,X);else if(Q.objectMode||F&&F.length>0){if(typeof F!=="string"&&!Q.objectMode&&Object.getPrototypeOf(F)!==N9.prototype)F=H0D(F);if(B)if(Q.endEmitted)W3(D,new Z0D);else WQ(D,Q,F,!0);else if(Q.ended)W3(D,new V0D);else if(Q.destroyed)return!1;else if(Q.reading=!1,Q.decoder&&!$)if(F=Q.decoder.write(F),Q.objectMode||F.length!==0)WQ(D,Q,F,!1);else qQ(D,Q);else WQ(D,Q,F,!1)}else if(!B)Q.reading=!1,qQ(D,Q)}return!Q.ended&&(Q.length<Q.highWaterMark||Q.length===0)}function WQ(D,F,$,B){if(F.flowing&&F.length===0&&!F.sync)F.awaitDrain=0,D.emit("data",$);else{if(F.length+=F.objectMode?1:$.length,B)F.buffer.unshift($);else F.buffer.push($);if(F.needReadable)R9(D)}qQ(D,F)}function L0D(D,F){var $;if(!W0D(F)&&typeof F!=="string"&&F!==void 0&&!D.objectMode)$=new z0D("chunk",["string","Buffer","Uint8Array"],F);return $}HD.prototype.isPaused=function(){return this._readableState.flowing===!1};HD.prototype.setEncoding=function(D){if(!h4)h4=JQ().StringDecoder;var F=new h4(D);this._readableState.decoder=F,this._readableState.encoding=this._readableState.decoder.encoding;var $=this._readableState.buffer.head,B="";while($!==null)B+=F.write($.data),$=$.next;if(this._readableState.buffer.clear(),B!=="")this._readableState.buffer.push(B);return this._readableState.length=B.length,this};var IN=1073741824;function M0D(D){if(D>=IN)D=IN;else D--,D|=D>>>1,D|=D>>>2,D|=D>>>4,D|=D>>>8,D|=D>>>16,D++;return D}function PN(D,F){if(D<=0||F.length===0&&F.ended)return 0;if(F.objectMode)return 1;if(D!==D)if(F.flowing&&F.length)return F.buffer.head.data.length;else return F.length;if(D>F.highWaterMark)F.highWaterMark=M0D(D);if(D<=F.length)return D;if(!F.ended)return F.needReadable=!0,0;return F.length}HD.prototype.read=function(D){DD("read",D),D=parseInt(D,10);var F=this._readableState,$=D;if(D!==0)F.emittedReadable=!1;if(D===0&&F.needReadable&&((F.highWaterMark!==0?F.length>=F.highWaterMark:F.length>0)||F.ended)){if(DD("read: emitReadable",F.length,F.ended),F.length===0&&F.ended)EQ(this);else R9(this);return null}if(D=PN(D,F),D===0&&F.ended){if(F.length===0)EQ(this);return null}var B=F.needReadable;if(DD("need readable",B),F.length===0||F.length-D<F.highWaterMark)B=!0,DD("length less than watermark",B);if(F.ended||F.reading)B=!1,DD("reading or ended",B);else if(B){if(DD("do read"),F.reading=!0,F.sync=!0,F.length===0)F.needReadable=!0;if(this._read(F.highWaterMark),F.sync=!1,!F.reading)D=PN($,F)}var J;if(D>0)J=_N(D,F);else J=null;if(J===null)F.needReadable=F.length<=F.highWaterMark,D=0;else F.length-=D,F.awaitDrain=0;if(F.length===0){if(!F.ended)F.needReadable=!0;if($!==D&&F.ended)EQ(this)}if(J!==null)this.emit("data",J);return J};function N0D(D,F){if(DD("onEofChunk"),F.ended)return;if(F.decoder){var $=F.decoder.end();if($&&$.length)F.buffer.push($),F.length+=F.objectMode?1:$.length}if(F.ended=!0,F.sync)R9(D);else if(F.needReadable=!1,!F.emittedReadable)F.emittedReadable=!0,yN(D)}function R9(D){var F=D._readableState;if(DD("emitReadable",F.needReadable,F.emittedReadable),F.needReadable=!1,!F.emittedReadable)DD("emitReadable",F.flowing),F.emittedReadable=!0,process.nextTick(yN,D)}function yN(D){var F=D._readableState;if(DD("emitReadable_",F.destroyed,F.length,F.ended),!F.destroyed&&(F.length||F.ended))D.emit("readable"),F.emittedReadable=!1;F.needReadable=!F.flowing&&!F.ended&&F.length<=F.highWaterMark,zQ(D)}function qQ(D,F){if(!F.readingMore)F.readingMore=!0,process.nextTick(C0D,D,F)}function C0D(D,F){while(!F.reading&&!F.ended&&(F.length<F.highWaterMark||F.flowing&&F.length===0)){var $=F.length;if(DD("maybeReadMore read 0"),D.read(0),$===F.length)break}F.readingMore=!1}HD.prototype._read=function(D){W3(this,new A0D("_read()"))};HD.prototype.pipe=function(D,F){var $=this,B=this._readableState;switch(B.pipesCount){case 0:B.pipes=D;break;case 1:B.pipes=[B.pipes,D];break;default:B.pipes.push(D);break}B.pipesCount+=1,DD("pipe count=%d opts=%j",B.pipesCount,F);var J=(!F||F.end!==!1)&&D!==process.stdout&&D!==process.stderr,Q=J?Y:U;if(B.endEmitted)process.nextTick(Q);else $.once("end",Q);D.on("unpipe",X);function X(L,M){if(DD("onunpipe"),L===$){if(M&&M.hasUnpiped===!1)M.hasUnpiped=!0,E()}}function Y(){DD("onend"),D.end()}var G=R0D($);D.on("drain",G);var H=!1;function E(){if(DD("cleanup"),D.removeListener("close",A),D.removeListener("finish",Z),D.removeListener("drain",G),D.removeListener("error",V),D.removeListener("unpipe",X),$.removeListener("end",Y),$.removeListener("end",U),$.removeListener("data",K),H=!0,B.awaitDrain&&(!D._writableState||D._writableState.needDrain))G()}$.on("data",K);function K(L){DD("ondata");var M=D.write(L);if(DD("dest.write",M),M===!1){if((B.pipesCount===1&&B.pipes===D||B.pipesCount>1&&fN(B.pipes,D)!==-1)&&!H)DD("false write response, pause",B.awaitDrain),B.awaitDrain++;$.pause()}}function V(L){if(DD("onerror",L),U(),D.removeListener("error",V),SN(D,"error")===0)W3(D,L)}U0D(D,"error",V);function A(){D.removeListener("finish",Z),U()}D.once("close",A);function Z(){DD("onfinish"),D.removeListener("close",A),U()}D.once("finish",Z);function U(){DD("unpipe"),$.unpipe(D)}if(D.emit("pipe",$),!B.flowing)DD("pipe resume"),$.resume();return D};function R0D(D){return function(){var $=D._readableState;if(DD("pipeOnDrain",$.awaitDrain),$.awaitDrain)$.awaitDrain--;if($.awaitDrain===0&&SN(D,"data"))$.flowing=!0,zQ(D)}}HD.prototype.unpipe=function(D){var F=this._readableState,$={hasUnpiped:!1};if(F.pipesCount===0)return this;if(F.pipesCount===1){if(D&&D!==F.pipes)return this;if(!D)D=F.pipes;if(F.pipes=null,F.pipesCount=0,F.flowing=!1,D)D.emit("unpipe",this,$);return this}if(!D){var{pipes:B,pipesCount:J}=F;F.pipes=null,F.pipesCount=0,F.flowing=!1;for(var Q=0;Q<J;Q++)B[Q].emit("unpipe",this,{hasUnpiped:!1});return this}var X=fN(F.pipes,D);if(X===-1)return this;if(F.pipes.splice(X,1),F.pipesCount-=1,F.pipesCount===1)F.pipes=F.pipes[0];return D.emit("unpipe",this,$),this};HD.prototype.on=function(D,F){var $=E3.prototype.on.call(this,D,F),B=this._readableState;if(D==="data"){if(B.readableListening=this.listenerCount("readable")>0,B.flowing!==!1)this.resume()}else if(D==="readable"){if(!B.endEmitted&&!B.readableListening){if(B.readableListening=B.needReadable=!0,B.flowing=!1,B.emittedReadable=!1,DD("on readable",B.length,B.reading),B.length)R9(this);else if(!B.reading)process.nextTick(w0D,this)}}return $};HD.prototype.addListener=HD.prototype.on;HD.prototype.removeListener=function(D,F){var $=E3.prototype.removeListener.call(this,D,F);if(D==="readable")process.nextTick(xN,this);return $};HD.prototype.removeAllListeners=function(D){var F=E3.prototype.removeAllListeners.apply(this,arguments);if(D==="readable"||D===void 0)process.nextTick(xN,this);return F};function xN(D){var F=D._readableState;if(F.readableListening=D.listenerCount("readable")>0,F.resumeScheduled&&!F.paused)F.flowing=!0;else if(D.listenerCount("data")>0)D.resume()}function w0D(D){DD("readable nexttick read 0"),D.read(0)}HD.prototype.resume=function(){var D=this._readableState;if(!D.flowing)DD("resume"),D.flowing=!D.readableListening,T0D(this,D);return D.paused=!1,this};function T0D(D,F){if(!F.resumeScheduled)F.resumeScheduled=!0,process.nextTick(j0D,D,F)}function j0D(D,F){if(DD("resume",F.reading),!F.reading)D.read(0);if(F.resumeScheduled=!1,D.emit("resume"),zQ(D),F.flowing&&!F.reading)D.read(0)}HD.prototype.pause=function(){if(DD("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1)DD("pause"),this._readableState.flowing=!1,this.emit("pause");return this._readableState.paused=!0,this};function zQ(D){var F=D._readableState;DD("flow",F.flowing);while(F.flowing&&D.read()!==null);}HD.prototype.wrap=function(D){var F=this,$=this._readableState,B=!1;D.on("end",function(){if(DD("wrapped end"),$.decoder&&!$.ended){var X=$.decoder.end();if(X&&X.length)F.push(X)}F.push(null)}),D.on("data",function(X){if(DD("wrapped data"),$.decoder)X=$.decoder.write(X);if($.objectMode&&(X===null||X===void 0))return;else if(!$.objectMode&&(!X||!X.length))return;var Y=F.push(X);if(!Y)B=!0,D.pause()});for(var J in D)if(this[J]===void 0&&typeof D[J]==="function")this[J]=function(Y){return function(){return D[Y].apply(D,arguments)}}(J);for(var Q=0;Q<HQ.length;Q++)D.on(HQ[Q],this.emit.bind(this,HQ[Q]));return this._read=function(X){if(DD("wrapped _read",X),B)B=!1,D.resume()},this};if(typeof Symbol==="function")HD.prototype[Symbol.asyncIterator]=function(){if(YQ===void 0)YQ=RN();return YQ(this)};Object.defineProperty(HD.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});Object.defineProperty(HD.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}});Object.defineProperty(HD.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(F){if(this._readableState)this._readableState.flowing=F}});HD._fromList=_N;Object.defineProperty(HD.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function _N(D,F){if(F.length===0)return null;var $;if(F.objectMode)$=F.buffer.shift();else if(!D||D>=F.length){if(F.decoder)$=F.buffer.join("");else if(F.buffer.length===1)$=F.buffer.first();else $=F.buffer.concat(F.length);F.buffer.clear()}else $=F.buffer.consume(D,F.decoder);return $}function EQ(D){var F=D._readableState;if(DD("endReadable",F.endEmitted),!F.endEmitted)F.ended=!0,process.nextTick(O0D,F,D)}function O0D(D,F){if(DD("endReadableNT",D.endEmitted,D.length),!D.endEmitted&&D.length===0){if(D.endEmitted=!0,F.readable=!1,F.emit("end"),D.autoDestroy){var $=F._writableState;if(!$||$.autoDestroy&&$.finished)F.destroy()}}}if(typeof Symbol==="function")HD.from=function(D,F){if(GQ===void 0)GQ=ON();return GQ(HD,D,F)};function fN(D,F){for(var $=0,B=D.length;$<B;$++)if(D[$]===F)return $;return-1}});var VQ=q((nzD,bN)=>{bN.exports=$8;var w9=p8().codes,I0D=w9.ERR_METHOD_NOT_IMPLEMENTED,P0D=w9.ERR_MULTIPLE_CALLBACK,S0D=w9.ERR_TRANSFORM_ALREADY_TRANSFORMING,k0D=w9.ERR_TRANSFORM_WITH_LENGTH_0,T9=N6();M6()($8,T9);function v0D(D,F){var $=this._transformState;$.transforming=!1;var B=$.writecb;if(B===null)return this.emit("error",new P0D);if($.writechunk=null,$.writecb=null,F!=null)this.push(F);B(D);var J=this._readableState;if(J.reading=!1,J.needReadable||J.length<J.highWaterMark)this._read(J.highWaterMark)}function $8(D){if(!(this instanceof $8))return new $8(D);if(T9.call(this,D),this._transformState={afterTransform:v0D.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,D){if(typeof D.transform==="function")this._transform=D.transform;if(typeof D.flush==="function")this._flush=D.flush}this.on("prefinish",y0D)}function y0D(){var D=this;if(typeof this._flush==="function"&&!this._readableState.destroyed)this._flush(function(F,$){hN(D,F,$)});else hN(this,null,null)}$8.prototype.push=function(D,F){return this._transformState.needTransform=!1,T9.prototype.push.call(this,D,F)};$8.prototype._transform=function(D,F,$){$(new I0D("_transform()"))};$8.prototype._write=function(D,F,$){var B=this._transformState;if(B.writecb=$,B.writechunk=D,B.writeencoding=F,!B.transforming){var J=this._readableState;if(B.needTransform||J.needReadable||J.length<J.highWaterMark)this._read(J.highWaterMark)}};$8.prototype._read=function(D){var F=this._transformState;if(F.writechunk!==null&&!F.transforming)F.transforming=!0,this._transform(F.writechunk,F.writeencoding,F.afterTransform);else F.needTransform=!0};$8.prototype._destroy=function(D,F){T9.prototype._destroy.call(this,D,function($){F($)})};function hN(D,F,$){if(F)return D.emit("error",F);if($!=null)D.push($);if(D._writableState.length)throw new k0D;if(D._transformState.transforming)throw new S0D;return D.push(null)}});var lN=q((izD,mN)=>{mN.exports=q3;var uN=VQ();M6()(q3,uN);function q3(D){if(!(this instanceof q3))return new q3(D);uN.call(this,D)}q3.prototype._transform=function(D,F,$){$(null,D)}});var iN=q((azD,nN)=>{var AQ;function x0D(D){var F=!1;return function(){if(F)return;F=!0,D.apply(void 0,arguments)}}var cN=p8().codes,_0D=cN.ERR_MISSING_ARGS,f0D=cN.ERR_STREAM_DESTROYED;function dN(D){if(D)throw D}function g0D(D){return D.setHeader&&typeof D.abort==="function"}function h0D(D,F,$,B){B=x0D(B);var J=!1;if(D.on("close",function(){J=!0}),AQ===void 0)AQ=U9();AQ(D,{readable:F,writable:$},function(X){if(X)return B(X);J=!0,B()});var Q=!1;return function(X){if(J)return;if(Q)return;if(Q=!0,g0D(D))return D.abort();if(typeof D.destroy==="function")return D.destroy();B(X||new f0D("pipe"))}}function pN(D){D()}function b0D(D,F){return D.pipe(F)}function u0D(D){if(!D.length)return dN;if(typeof D[D.length-1]!=="function")return dN;return D.pop()}function m0D(){for(var D=arguments.length,F=Array(D),$=0;$<D;$++)F[$]=arguments[$];var B=u0D(F);if(Array.isArray(F[0]))F=F[0];if(F.length<2)throw new _0D("streams");var J,Q=F.map(function(X,Y){var G=Y<F.length-1,H=Y>0;return h0D(X,G,H,function(E){if(!J)J=E;if(E)Q.forEach(pN);if(G)return;Q.forEach(pN),B(J)})});return F.reduce(b0D)}nN.exports=m0D});var aN=q((l0,z3)=>{var K3=XD("stream");if(process.env.READABLE_STREAM==="disable"&&K3)z3.exports=K3.Readable,Object.assign(z3.exports,K3),z3.exports.Stream=K3;else l0=z3.exports=DQ(),l0.Stream=K3||l0,l0.Readable=l0,l0.Writable=tJ(),l0.Duplex=N6(),l0.Transform=VQ(),l0.PassThrough=lN(),l0.finished=U9(),l0.pipeline=iN()});var rN=q((ozD,sN)=>{var{Buffer:B1}=XD("buffer"),oN=Symbol.for("BufferList");function UD(D){if(!(this instanceof UD))return new UD(D);UD._init.call(this,D)}UD._init=function(F){if(Object.defineProperty(this,oN,{value:!0}),this._bufs=[],this.length=0,F)this.append(F)};UD.prototype._new=function(F){return new UD(F)};UD.prototype._offset=function(F){if(F===0)return[0,0];let $=0;for(let B=0;B<this._bufs.length;B++){let J=$+this._bufs[B].length;if(F<J||B===this._bufs.length-1)return[B,F-$];$=J}};UD.prototype._reverseOffset=function(D){let F=D[0],$=D[1];for(let B=0;B<F;B++)$+=this._bufs[B].length;return $};UD.prototype.get=function(F){if(F>this.length||F<0)return;let $=this._offset(F);return this._bufs[$[0]][$[1]]};UD.prototype.slice=function(F,$){if(typeof F==="number"&&F<0)F+=this.length;if(typeof $==="number"&&$<0)$+=this.length;return this.copy(null,0,F,$)};UD.prototype.copy=function(F,$,B,J){if(typeof B!=="number"||B<0)B=0;if(typeof J!=="number"||J>this.length)J=this.length;if(B>=this.length)return F||B1.alloc(0);if(J<=0)return F||B1.alloc(0);let Q=!!F,X=this._offset(B),Y=J-B,G=Y,H=Q&&$||0,E=X[1];if(B===0&&J===this.length){if(!Q)return this._bufs.length===1?this._bufs[0]:B1.concat(this._bufs,this.length);for(let K=0;K<this._bufs.length;K++)this._bufs[K].copy(F,H),H+=this._bufs[K].length;return F}if(G<=this._bufs[X[0]].length-E)return Q?this._bufs[X[0]].copy(F,$,E,E+G):this._bufs[X[0]].slice(E,E+G);if(!Q)F=B1.allocUnsafe(Y);for(let K=X[0];K<this._bufs.length;K++){let V=this._bufs[K].length-E;if(G>V)this._bufs[K].copy(F,H,E),H+=V;else{this._bufs[K].copy(F,H,E,E+G),H+=V;break}if(G-=V,E)E=0}if(F.length>H)return F.slice(0,H);return F};UD.prototype.shallowSlice=function(F,$){if(F=F||0,$=typeof $!=="number"?this.length:$,F<0)F+=this.length;if($<0)$+=this.length;if(F===$)return this._new();let B=this._offset(F),J=this._offset($),Q=this._bufs.slice(B[0],J[0]+1);if(J[1]===0)Q.pop();else Q[Q.length-1]=Q[Q.length-1].slice(0,J[1]);if(B[1]!==0)Q[0]=Q[0].slice(B[1]);return this._new(Q)};UD.prototype.toString=function(F,$,B){return this.slice($,B).toString(F)};UD.prototype.consume=function(F){if(F=Math.trunc(F),Number.isNaN(F)||F<=0)return this;while(this._bufs.length)if(F>=this._bufs[0].length)F-=this._bufs[0].length,this.length-=this._bufs[0].length,this._bufs.shift();else{this._bufs[0]=this._bufs[0].slice(F),this.length-=F;break}return this};UD.prototype.duplicate=function(){let F=this._new();for(let $=0;$<this._bufs.length;$++)F.append(this._bufs[$]);return F};UD.prototype.append=function(F){if(F==null)return this;if(F.buffer)this._appendBuffer(B1.from(F.buffer,F.byteOffset,F.byteLength));else if(Array.isArray(F))for(let $=0;$<F.length;$++)this.append(F[$]);else if(this._isBufferList(F))for(let $=0;$<F._bufs.length;$++)this.append(F._bufs[$]);else{if(typeof F==="number")F=F.toString();this._appendBuffer(B1.from(F))}return this};UD.prototype._appendBuffer=function(F){this._bufs.push(F),this.length+=F.length};UD.prototype.indexOf=function(D,F,$){if($===void 0&&typeof F==="string")$=F,F=void 0;if(typeof D==="function"||Array.isArray(D))throw TypeError('The "value" argument must be one of type string, Buffer, BufferList, or Uint8Array.');else if(typeof D==="number")D=B1.from([D]);else if(typeof D==="string")D=B1.from(D,$);else if(this._isBufferList(D))D=D.slice();else if(Array.isArray(D.buffer))D=B1.from(D.buffer,D.byteOffset,D.byteLength);else if(!B1.isBuffer(D))D=B1.from(D);if(F=Number(F||0),isNaN(F))F=0;if(F<0)F=this.length+F;if(F<0)F=0;if(D.length===0)return F>this.length?this.length:F;let B=this._offset(F),J=B[0],Q=B[1];for(;J<this._bufs.length;J++){let X=this._bufs[J];while(Q<X.length)if(X.length-Q>=D.length){let G=X.indexOf(D,Q);if(G!==-1)return this._reverseOffset([J,G]);Q=X.length-D.length+1}else{let G=this._reverseOffset([J,Q]);if(this._match(G,D))return G;Q++}Q=0}return-1};UD.prototype._match=function(D,F){if(this.length-D<F.length)return!1;for(let $=0;$<F.length;$++)if(this.get(D+$)!==F[$])return!1;return!0};(function(){let D={readDoubleBE:8,readDoubleLE:8,readFloatBE:4,readFloatLE:4,readInt32BE:4,readInt32LE:4,readUInt32BE:4,readUInt32LE:4,readInt16BE:2,readInt16LE:2,readUInt16BE:2,readUInt16LE:2,readInt8:1,readUInt8:1,readIntBE:null,readIntLE:null,readUIntBE:null,readUIntLE:null};for(let F in D)(function($){if(D[$]===null)UD.prototype[$]=function(B,J){return this.slice(B,B+J)[$](0,J)};else UD.prototype[$]=function(B=0){return this.slice(B,B+D[$])[$](0)}})(F)})();UD.prototype._isBufferList=function(F){return F instanceof UD||UD.isBufferList(F)};UD.isBufferList=function(F){return F!=null&&F[oN]};sN.exports=UD});var tN=q((szD,j9)=>{var ZQ=aN().Duplex,l0D=M6(),V3=rN();function J0(D){if(!(this instanceof J0))return new J0(D);if(typeof D==="function"){this._callback=D;let F=function(B){if(this._callback)this._callback(B),this._callback=null}.bind(this);this.on("pipe",function(B){B.on("error",F)}),this.on("unpipe",function(B){B.removeListener("error",F)}),D=null}V3._init.call(this,D),ZQ.call(this)}l0D(J0,ZQ);Object.assign(J0.prototype,V3.prototype);J0.prototype._new=function(F){return new J0(F)};J0.prototype._write=function(F,$,B){if(this._appendBuffer(F),typeof B==="function")B()};J0.prototype._read=function(F){if(!this.length)return this.push(null);F=Math.min(F,this.length),this.push(this.slice(0,F)),this.consume(F)};J0.prototype.end=function(F){if(ZQ.prototype.end.call(this,F),this._callback)this._callback(null,this.slice()),this._callback=null};J0.prototype._destroy=function(F,$){this._bufs.length=0,this.length=0,$(F)};J0.prototype._isBufferList=function(F){return F instanceof J0||F instanceof V3||J0.isBufferList(F)};J0.isBufferList=V3.isBufferList;j9.exports=J0;j9.exports.BufferListStream=J0;j9.exports.BufferList=V3});var FC=q((rzD,NQ)=>{var d0D=XD("readline"),p0D=fJ(),eN=IM(),O9=H9(),I9=xM(),c0D=sF(),n0D=dM(),i0D=cM(),a0D=lJ(),{BufferListStream:o0D}=tN(),UQ=Symbol("text"),LQ=Symbol("prefixText");class DC{constructor(){this.requests=0,this.mutedStream=new o0D,this.mutedStream.pipe(process.stdout);let D=this;this.ourEmit=function(F,$,...B){let{stdin:J}=process;if(D.requests>0||J.emit===D.ourEmit){if(F==="keypress")return;if(F==="data"&&$.includes(3))process.emit("SIGINT");Reflect.apply(D.oldEmit,this,[F,$,...B])}else Reflect.apply(process.stdin.emit,this,[F,$,...B])}}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=d0D.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 P9;class MQ{constructor(D){if(!P9)P9=new DC;if(typeof D==="string")D={text:D};this.options={text:"",color:"cyan",stream:process.stderr,discardStdin:!0,...D},this.spinner=this.options.spinner,this.color=this.options.color,this.hideCursor=this.options.hideCursor!==!1,this.interval=this.options.interval||this.spinner.interval||100,this.stream=this.options.stream,this.id=void 0,this.isEnabled=typeof this.options.isEnabled==="boolean"?this.options.isEnabled:i0D({stream:this.stream}),this.isSilent=typeof this.options.isSilent==="boolean"?this.options.isSilent:!1,this.text=this.options.text,this.prefixText=this.options.prefixText,this.linesToClear=0,this.indent=this.options.indent,this.discardStdin=this.options.discardStdin,this.isDiscardingStdin=!1}get indent(){return this._indent}set indent(D=0){if(!(D>=0&&Number.isInteger(D)))throw Error("The `indent` option must be an integer from 0 and up");this._indent=D}_updateInterval(D){if(D!==void 0)this.interval=D}get spinner(){return this._spinner}set spinner(D){if(this.frameIndex=0,typeof D==="object"){if(D.frames===void 0)throw Error("The given spinner must have a `frames` property");this._spinner=D}else if(!a0D())this._spinner=O9.line;else if(D===void 0)this._spinner=O9.dots;else if(D!=="default"&&O9[D])this._spinner=O9[D];else throw Error(`There is no built-in spinner named '${D}'. See https://github.com/sindresorhus/cli-spinners/blob/main/spinners.json for a full list.`);this._updateInterval(this._spinner.interval)}get text(){return this[UQ]}set text(D){this[UQ]=D,this.updateLineCount()}get prefixText(){return this[LQ]}set prefixText(D){this[LQ]=D,this.updateLineCount()}get isSpinning(){return this.id!==void 0}getFullPrefixText(D=this[LQ],F=" "){if(typeof D==="string")return D+F;if(typeof D==="function")return D()+F;return""}updateLineCount(){let D=this.stream.columns||80,F=this.getFullPrefixText(this.prefixText,"-");this.lineCount=0;for(let $ of c0D(F+"--"+this[UQ]).split(`
38
+ `);if(Q!==-1)F=Ae(F,J,B,Q);return B+F+J},vJ,AM=(D,...F)=>{let[$]=F;if(!t5($)||!t5($.raw))return F.join(" ");let B=F.slice(1),J=[$.raw[0]];for(let Q=1;Q<$.length;Q++)J.push(String(B[Q-1]).replace(/[{}\\]/g,"\\$&"),String($.raw[Q]));if(vJ===void 0)vJ=WM();return vJ(D,J.join(""))};Object.defineProperties(e5.prototype,v4);var F9=e5();F9.supportsColor=yJ;F9.stderr=e5({level:xJ?xJ.level:0});F9.stderr.supportsColor=xJ;ZM.exports=F9});var LM=q((ZzD,gJ)=>{var UM=(D,F)=>{for(let $ of Reflect.ownKeys(F))Object.defineProperty(D,$,Object.getOwnPropertyDescriptor(F,$));return D};gJ.exports=UM;gJ.exports.default=UM});var NM=q((UzD,B9)=>{var Le=LM(),$9=new WeakMap,MM=(D,F={})=>{if(typeof D!=="function")throw TypeError("Expected a function");let $,B=0,J=D.displayName||D.name||"<anonymous>",Q=function(...X){if($9.set(Q,++B),B===1)$=D.apply(this,X),D=null;else if(F.throw===!0)throw Error(`Function \`${J}\` can only be called once`);return $};return Le(Q,D),$9.set(Q,B),Q};B9.exports=MM;B9.exports.default=MM;B9.exports.callCount=(D)=>{if(!$9.has(D))throw Error(`The given function \`${D.name}\` is not wrapped by the \`onetime\` package`);return $9.get(D)}});var CM=q((LzD,J9)=>{J9.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];if(process.platform!=="win32")J9.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");if(process.platform==="linux")J9.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")});var RM=q((MzD,x4)=>{var wD=global.process,Z6=function(D){return D&&typeof D==="object"&&typeof D.removeListener==="function"&&typeof D.emit==="function"&&typeof D.reallyExit==="function"&&typeof D.listeners==="function"&&typeof D.kill==="function"&&typeof D.pid==="number"&&typeof D.on==="function"};if(!Z6(wD))x4.exports=function(){return function(){}};else{if(hJ=XD("assert"),U6=CM(),bJ=/^win/i.test(wD.platform),y4=XD("events"),typeof y4!=="function")y4=y4.EventEmitter;if(wD.__signal_exit_emitter__)mD=wD.__signal_exit_emitter__;else mD=wD.__signal_exit_emitter__=new y4,mD.count=0,mD.emitted={};if(!mD.infinite)mD.setMaxListeners(1/0),mD.infinite=!0;x4.exports=function(D,F){if(!Z6(global.process))return function(){};if(hJ.equal(typeof D,"function","a callback must be provided for exit handler"),L6===!1)Q9();var $="exit";if(F&&F.alwaysLast)$="afterexit";var B=function(){if(mD.removeListener($,D),mD.listeners("exit").length===0&&mD.listeners("afterexit").length===0)D3()};return mD.on($,D),B},D3=function(){if(!L6||!Z6(global.process))return;L6=!1,U6.forEach(function(F){try{wD.removeListener(F,F3[F])}catch($){}}),wD.emit=$3,wD.reallyExit=X9,mD.count-=1},x4.exports.unload=D3,l8=function(F,$,B){if(mD.emitted[F])return;mD.emitted[F]=!0,mD.emit(F,$,B)},F3={},U6.forEach(function(D){F3[D]=function(){if(!Z6(global.process))return;var $=wD.listeners(D);if($.length===mD.count){if(D3(),l8("exit",null,D),l8("afterexit",null,D),bJ&&D==="SIGHUP")D="SIGINT";wD.kill(wD.pid,D)}}}),x4.exports.signals=function(){return U6},L6=!1,Q9=function(){if(L6||!Z6(global.process))return;L6=!0,mD.count+=1,U6=U6.filter(function(F){try{return wD.on(F,F3[F]),!0}catch($){return!1}}),wD.emit=mJ,wD.reallyExit=uJ},x4.exports.load=Q9,X9=wD.reallyExit,uJ=function(F){if(!Z6(global.process))return;wD.exitCode=F||0,l8("exit",wD.exitCode,null),l8("afterexit",wD.exitCode,null),X9.call(wD,wD.exitCode)},$3=wD.emit,mJ=function(F,$){if(F==="exit"&&Z6(global.process)){if($!==void 0)wD.exitCode=$;var B=$3.apply(this,arguments);return l8("exit",wD.exitCode,null),l8("afterexit",wD.exitCode,null),B}else return $3.apply(this,arguments)}}var hJ,U6,bJ,y4,mD,D3,l8,F3,L6,Q9,X9,uJ,$3,mJ});var TM=q((NzD,wM)=>{var Me=NM(),Ne=RM();wM.exports=Me(()=>{Ne(()=>{process.stderr.write("\x1B[?25h")},{alwaysLast:!0})})});var IM=q((Re)=>{var Ce=TM(),Y9=!1;Re.show=(D=process.stderr)=>{if(!D.isTTY)return;Y9=!1,D.write("\x1B[?25h")};Re.hide=(D=process.stderr)=>{if(!D.isTTY)return;Ce(),Y9=!0,D.write("\x1B[?25l")};Re.toggle=(D,F)=>{if(D!==void 0)Y9=D;if(Y9)Re.show(F);else Re.hide(F)}});var PM=q((RzD,Te)=>{Te.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 H9=q((wzD,kM)=>{var G9=Object.assign({},PM()),SM=Object.keys(G9);Object.defineProperty(G9,"random",{get(){let D=Math.floor(Math.random()*SM.length),F=SM[D];return G9[F]}});kM.exports=G9});var lJ=q((TzD,vM)=>{vM.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 xM=q((jzD,yM)=>{var d8=fJ(),je=lJ(),Oe={info:d8.blue("\u2139"),success:d8.green("\u2714"),warning:d8.yellow("\u26A0"),error:d8.red("\u2716")},Ie={info:d8.blue("i"),success:d8.green("\u221A"),warning:d8.yellow("\u203C"),error:d8.red("\xD7")};yM.exports=je()?Oe:Ie});var _M=q((OzD,W9)=>{var Pe=function(){function D(X,Y,G,H){var E;if(typeof Y==="object")G=Y.depth,H=Y.prototype,E=Y.filter,Y=Y.circular;var K=[],V=[],A=typeof Buffer<"u";if(typeof Y>"u")Y=!0;if(typeof G>"u")G=1/0;function Z(U,L){if(U===null)return null;if(L==0)return U;var M,N;if(typeof U!="object")return U;if(D.__isArray(U))M=[];else if(D.__isRegExp(U)){if(M=new RegExp(U.source,Q(U)),U.lastIndex)M.lastIndex=U.lastIndex}else if(D.__isDate(U))M=new Date(U.getTime());else if(A&&Buffer.isBuffer(U)){if(Buffer.allocUnsafe)M=Buffer.allocUnsafe(U.length);else M=new Buffer(U.length);return U.copy(M),M}else if(typeof H>"u")N=Object.getPrototypeOf(U),M=Object.create(N);else M=Object.create(H),N=H;if(Y){var O=K.indexOf(U);if(O!=-1)return V[O];K.push(U),V.push(M)}for(var b in U){var T;if(N)T=Object.getOwnPropertyDescriptor(N,b);if(T&&T.set==null)continue;M[b]=Z(U[b],L-1)}return M}return Z(X,G)}D.clonePrototype=function(Y){if(Y===null)return null;var G=function(){};return G.prototype=Y,new G};function F(X){return Object.prototype.toString.call(X)}D.__objToStr=F;function $(X){return typeof X==="object"&&F(X)==="[object Date]"}D.__isDate=$;function B(X){return typeof X==="object"&&F(X)==="[object Array]"}D.__isArray=B;function J(X){return typeof X==="object"&&F(X)==="[object RegExp]"}D.__isRegExp=J;function Q(X){var Y="";if(X.global)Y+="g";if(X.ignoreCase)Y+="i";if(X.multiline)Y+="m";return Y}return D.__getRegExpFlags=Q,D}();if(typeof W9==="object"&&W9.exports)W9.exports=Pe});var gM=q((IzD,fM)=>{var Se=_M();fM.exports=function(D,F){return D=D||{},Object.keys(F).forEach(function($){if(typeof D[$]>"u")D[$]=Se(F[$])}),D}});var bM=q((PzD,hM)=>{hM.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 dM=q((SzD,dJ)=>{var ke=gM(),B3=bM(),mM={nul:0,control:0};dJ.exports=function(F){return lM(F,mM)};dJ.exports.config=function(D){return D=ke(D||{},mM),function($){return lM($,D)}};function lM(D,F){if(typeof D!=="string")return uM(D,F);var $=0;for(var B=0;B<D.length;B++){var J=uM(D.charCodeAt(B),F);if(J<0)return-1;$+=J}return $}function uM(D,F){if(D===0)return F.nul;if(D<32||D>=127&&D<160)return F.control;if(ve(D))return 0;return 1+(D>=4352&&(D<=4447||D==9001||D==9002||D>=11904&&D<=42191&&D!=12351||D>=44032&&D<=55203||D>=63744&&D<=64255||D>=65040&&D<=65049||D>=65072&&D<=65135||D>=65280&&D<=65376||D>=65504&&D<=65510||D>=131072&&D<=196605||D>=196608&&D<=262141))}function ve(D){var F=0,$=B3.length-1,B;if(D<B3[0][0]||D>B3[$][1])return!1;while($>=F)if(B=Math.floor((F+$)/2),D>B3[B][1])F=B+1;else if(D<B3[B][0])$=B-1;else return!0;return!1}});var cM=q((kzD,pM)=>{pM.exports=({stream:D=process.stdout}={})=>{return Boolean(D&&D.isTTY&&process.env.TERM!=="dumb"&&!("CI"in process.env))}});var rM=q((vzD,sM)=>{function nM(D,F){var $=Object.keys(D);if(Object.getOwnPropertySymbols){var B=Object.getOwnPropertySymbols(D);F&&(B=B.filter(function(J){return Object.getOwnPropertyDescriptor(D,J).enumerable})),$.push.apply($,B)}return $}function iM(D){for(var F=1;F<arguments.length;F++){var $=arguments[F]!=null?arguments[F]:{};F%2?nM(Object($),!0).forEach(function(B){ye(D,B,$[B])}):Object.getOwnPropertyDescriptors?Object.defineProperties(D,Object.getOwnPropertyDescriptors($)):nM(Object($)).forEach(function(B){Object.defineProperty(D,B,Object.getOwnPropertyDescriptor($,B))})}return D}function ye(D,F,$){if(F=oM(F),F in D)Object.defineProperty(D,F,{value:$,enumerable:!0,configurable:!0,writable:!0});else D[F]=$;return D}function xe(D,F){if(!(D instanceof F))throw TypeError("Cannot call a class as a function")}function aM(D,F){for(var $=0;$<F.length;$++){var B=F[$];if(B.enumerable=B.enumerable||!1,B.configurable=!0,"value"in B)B.writable=!0;Object.defineProperty(D,oM(B.key),B)}}function _e(D,F,$){if(F)aM(D.prototype,F);if($)aM(D,$);return Object.defineProperty(D,"prototype",{writable:!1}),D}function oM(D){var F=fe(D,"string");return typeof F==="symbol"?F:String(F)}function fe(D,F){if(typeof D!=="object"||D===null)return D;var $=D[Symbol.toPrimitive];if($!==void 0){var B=$.call(D,F||"default");if(typeof B!=="object")return B;throw TypeError("@@toPrimitive must return a primitive value.")}return(F==="string"?String:Number)(D)}var ge=XD("buffer"),E9=ge.Buffer,he=XD("util"),pJ=he.inspect,be=pJ&&pJ.custom||"inspect";function ue(D,F,$){E9.prototype.copy.call(D,F,$)}sM.exports=function(){function D(){xe(this,D),this.head=null,this.tail=null,this.length=0}return _e(D,[{key:"push",value:function($){var B={data:$,next:null};if(this.length>0)this.tail.next=B;else this.head=B;this.tail=B,++this.length}},{key:"unshift",value:function($){var B={data:$,next:this.head};if(this.length===0)this.tail=B;this.head=B,++this.length}},{key:"shift",value:function(){if(this.length===0)return;var $=this.head.data;if(this.length===1)this.head=this.tail=null;else this.head=this.head.next;return--this.length,$}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function($){if(this.length===0)return"";var B=this.head,J=""+B.data;while(B=B.next)J+=$+B.data;return J}},{key:"concat",value:function($){if(this.length===0)return E9.alloc(0);var B=E9.allocUnsafe($>>>0),J=this.head,Q=0;while(J)ue(J.data,B,Q),Q+=J.data.length,J=J.next;return B}},{key:"consume",value:function($,B){var J;if($<this.head.data.length)J=this.head.data.slice(0,$),this.head.data=this.head.data.slice($);else if($===this.head.data.length)J=this.shift();else J=B?this._getString($):this._getBuffer($);return J}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function($){var B=this.head,J=1,Q=B.data;$-=Q.length;while(B=B.next){var X=B.data,Y=$>X.length?X.length:$;if(Y===X.length)Q+=X;else Q+=X.slice(0,$);if($-=Y,$===0){if(Y===X.length)if(++J,B.next)this.head=B.next;else this.head=this.tail=null;else this.head=B,B.data=X.slice(Y);break}++J}return this.length-=J,Q}},{key:"_getBuffer",value:function($){var B=E9.allocUnsafe($),J=this.head,Q=1;J.data.copy(B),$-=J.data.length;while(J=J.next){var X=J.data,Y=$>X.length?X.length:$;if(X.copy(B,B.length-$,0,Y),$-=Y,$===0){if(Y===X.length)if(++Q,J.next)this.head=J.next;else this.head=this.tail=null;else this.head=J,J.data=X.slice(Y);break}++Q}return this.length-=Q,B}},{key:be,value:function($,B){return pJ(this,iM(iM({},B),{},{depth:0,customInspect:!1}))}}]),D}()});var nJ=q((yzD,eM)=>{function me(D,F){var $=this,B=this._readableState&&this._readableState.destroyed,J=this._writableState&&this._writableState.destroyed;if(B||J){if(F)F(D);else if(D){if(!this._writableState)process.nextTick(cJ,this,D);else if(!this._writableState.errorEmitted)this._writableState.errorEmitted=!0,process.nextTick(cJ,this,D)}return this}if(this._readableState)this._readableState.destroyed=!0;if(this._writableState)this._writableState.destroyed=!0;return this._destroy(D||null,function(Q){if(!F&&Q)if(!$._writableState)process.nextTick(tM,$,Q);else if(!$._writableState.errorEmitted)$._writableState.errorEmitted=!0,process.nextTick(tM,$,Q);else process.nextTick(q9,$);else if(F)process.nextTick(q9,$),F(Q);else process.nextTick(q9,$)}),this}function tM(D,F){cJ(D,F),q9(D)}function q9(D){if(D._writableState&&!D._writableState.emitClose)return;if(D._readableState&&!D._readableState.emitClose)return;D.emit("close")}function le(){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 cJ(D,F){D.emit("error",F)}function de(D,F){var{_readableState:$,_writableState:B}=D;if($&&$.autoDestroy||B&&B.autoDestroy)D.destroy(F);else D.emit("error",F)}eM.exports={destroy:me,undestroy:le,errorOrDestroy:de}});var p8=q((ie,$N)=>{var FN={};function m0(D,F,$){if(!$)$=Error;function B(Q,X,Y){if(typeof F==="string")return F;else return F(Q,X,Y)}class J extends ${constructor(Q,X,Y){super(B(Q,X,Y))}}J.prototype.name=$.name,J.prototype.code=D,FN[D]=J}function DN(D,F){if(Array.isArray(D)){let $=D.length;if(D=D.map((B)=>String(B)),$>2)return`one of ${F} ${D.slice(0,$-1).join(", ")}, or `+D[$-1];else if($===2)return`one of ${F} ${D[0]} or ${D[1]}`;else return`of ${F} ${D[0]}`}else return`of ${F} ${String(D)}`}function pe(D,F,$){return D.substr(!$||$<0?0:+$,F.length)===F}function ce(D,F,$){if($===void 0||$>D.length)$=D.length;return D.substring($-F.length,$)===F}function ne(D,F,$){if(typeof $!=="number")$=0;if($+F.length>D.length)return!1;else return D.indexOf(F,$)!==-1}m0("ERR_INVALID_OPT_VALUE",function(D,F){return'The value "'+F+'" is invalid for option "'+D+'"'},TypeError);m0("ERR_INVALID_ARG_TYPE",function(D,F,$){let B;if(typeof F==="string"&&pe(F,"not "))B="must not be",F=F.replace(/^not /,"");else B="must be";let J;if(ce(D," argument"))J=`The ${D} ${B} ${DN(F,"type")}`;else{let Q=ne(D,".")?"property":"argument";J=`The "${D}" ${Q} ${B} ${DN(F,"type")}`}return J+=`. Received type ${typeof $}`,J},TypeError);m0("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");m0("ERR_METHOD_NOT_IMPLEMENTED",function(D){return"The "+D+" method is not implemented"});m0("ERR_STREAM_PREMATURE_CLOSE","Premature close");m0("ERR_STREAM_DESTROYED",function(D){return"Cannot call "+D+" after a stream was destroyed"});m0("ERR_MULTIPLE_CALLBACK","Callback called multiple times");m0("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");m0("ERR_STREAM_WRITE_AFTER_END","write after end");m0("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);m0("ERR_UNKNOWN_ENCODING",function(D){return"Unknown encoding: "+D},TypeError);m0("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");ie.codes=FN});var iJ=q((xzD,BN)=>{var oe=p8().codes.ERR_INVALID_OPT_VALUE;function se(D,F,$){return D.highWaterMark!=null?D.highWaterMark:F?D[$]:null}function re(D,F,$,B){var J=se(F,B,$);if(J!=null){if(!(isFinite(J)&&Math.floor(J)===J)||J<0){var Q=B?$:"highWaterMark";throw new oe(Q,J)}return Math.floor(J)}return D.objectMode?16:16384}BN.exports={getHighWaterMark:re}});var JN=q((_zD,aJ)=>{if(typeof Object.create==="function")aJ.exports=function(F,$){if($)F.super_=$,F.prototype=Object.create($.prototype,{constructor:{value:F,enumerable:!1,writable:!0,configurable:!0}})};else aJ.exports=function(F,$){if($){F.super_=$;var B=function(){};B.prototype=$.prototype,F.prototype=new B,F.prototype.constructor=F}}});var M6=q((fzD,oJ)=>{try{if(K9=XD("util"),typeof K9.inherits!=="function")throw"";oJ.exports=K9.inherits}catch(D){oJ.exports=JN()}var K9});var XN=q((gzD,QN)=>{QN.exports=XD("util").deprecate});var tJ=q((hzD,qN)=>{qN.exports=vD;function GN(D){var F=this;this.next=null,this.entry=null,this.finish=function(){wDD(F,D)}}var _4;vD.WritableState=Q3;var te={deprecate:XN()},HN=XD("stream"),V9=XD("buffer").Buffer,ee=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function DDD(D){return V9.from(D)}function FDD(D){return V9.isBuffer(D)||D instanceof ee}var rJ=nJ(),$DD=iJ(),BDD=$DD.getHighWaterMark,c8=p8().codes,JDD=c8.ERR_INVALID_ARG_TYPE,QDD=c8.ERR_METHOD_NOT_IMPLEMENTED,XDD=c8.ERR_MULTIPLE_CALLBACK,YDD=c8.ERR_STREAM_CANNOT_PIPE,GDD=c8.ERR_STREAM_DESTROYED,HDD=c8.ERR_STREAM_NULL_VALUES,WDD=c8.ERR_STREAM_WRITE_AFTER_END,EDD=c8.ERR_UNKNOWN_ENCODING,f4=rJ.errorOrDestroy;M6()(vD,HN);function qDD(){}function Q3(D,F,$){if(_4=_4||N6(),D=D||{},typeof $!=="boolean")$=F instanceof _4;if(this.objectMode=!!D.objectMode,$)this.objectMode=this.objectMode||!!D.writableObjectMode;this.highWaterMark=BDD(this,D,"writableHighWaterMark",$),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var B=D.decodeStrings===!1;this.decodeStrings=!B,this.defaultEncoding=D.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(J){LDD(F,J)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=D.emitClose!==!1,this.autoDestroy=!!D.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new GN(this)}Q3.prototype.getBuffer=function(){var F=this.bufferedRequest,$=[];while(F)$.push(F),F=F.next;return $};(function(){try{Object.defineProperty(Q3.prototype,"buffer",{get:te.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(D){}})();var z9;if(typeof Symbol==="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]==="function")z9=Function.prototype[Symbol.hasInstance],Object.defineProperty(vD,Symbol.hasInstance,{value:function(F){if(z9.call(this,F))return!0;if(this!==vD)return!1;return F&&F._writableState instanceof Q3}});else z9=function(F){return F instanceof this};function vD(D){_4=_4||N6();var F=this instanceof _4;if(!F&&!z9.call(vD,this))return new vD(D);if(this._writableState=new Q3(D,this,F),this.writable=!0,D){if(typeof D.write==="function")this._write=D.write;if(typeof D.writev==="function")this._writev=D.writev;if(typeof D.destroy==="function")this._destroy=D.destroy;if(typeof D.final==="function")this._final=D.final}HN.call(this)}vD.prototype.pipe=function(){f4(this,new YDD)};function KDD(D,F){var $=new WDD;f4(D,$),process.nextTick(F,$)}function zDD(D,F,$,B){var J;if($===null)J=new HDD;else if(typeof $!=="string"&&!F.objectMode)J=new JDD("chunk",["string","Buffer"],$);if(J)return f4(D,J),process.nextTick(B,J),!1;return!0}vD.prototype.write=function(D,F,$){var B=this._writableState,J=!1,Q=!B.objectMode&&FDD(D);if(Q&&!V9.isBuffer(D))D=DDD(D);if(typeof F==="function")$=F,F=null;if(Q)F="buffer";else if(!F)F=B.defaultEncoding;if(typeof $!=="function")$=qDD;if(B.ending)KDD(this,$);else if(Q||zDD(this,B,D,$))B.pendingcb++,J=ADD(this,B,Q,D,F,$);return J};vD.prototype.cork=function(){this._writableState.corked++};vD.prototype.uncork=function(){var D=this._writableState;if(D.corked){if(D.corked--,!D.writing&&!D.corked&&!D.bufferProcessing&&D.bufferedRequest)WN(this,D)}};vD.prototype.setDefaultEncoding=function(F){if(typeof F==="string")F=F.toLowerCase();if(!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((F+"").toLowerCase())>-1))throw new EDD(F);return this._writableState.defaultEncoding=F,this};Object.defineProperty(vD.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function VDD(D,F,$){if(!D.objectMode&&D.decodeStrings!==!1&&typeof F==="string")F=V9.from(F,$);return F}Object.defineProperty(vD.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function ADD(D,F,$,B,J,Q){if(!$){var X=VDD(F,B,J);if(B!==X)$=!0,J="buffer",B=X}var Y=F.objectMode?1:B.length;F.length+=Y;var G=F.length<F.highWaterMark;if(!G)F.needDrain=!0;if(F.writing||F.corked){var H=F.lastBufferedRequest;if(F.lastBufferedRequest={chunk:B,encoding:J,isBuf:$,callback:Q,next:null},H)H.next=F.lastBufferedRequest;else F.bufferedRequest=F.lastBufferedRequest;F.bufferedRequestCount+=1}else sJ(D,F,!1,Y,B,J,Q);return G}function sJ(D,F,$,B,J,Q,X){if(F.writelen=B,F.writecb=X,F.writing=!0,F.sync=!0,F.destroyed)F.onwrite(new GDD("write"));else if($)D._writev(J,F.onwrite);else D._write(J,Q,F.onwrite);F.sync=!1}function ZDD(D,F,$,B,J){if(--F.pendingcb,$)process.nextTick(J,B),process.nextTick(J3,D,F),D._writableState.errorEmitted=!0,f4(D,B);else J(B),D._writableState.errorEmitted=!0,f4(D,B),J3(D,F)}function UDD(D){D.writing=!1,D.writecb=null,D.length-=D.writelen,D.writelen=0}function LDD(D,F){var $=D._writableState,B=$.sync,J=$.writecb;if(typeof J!=="function")throw new XDD;if(UDD($),F)ZDD(D,$,B,F,J);else{var Q=EN($)||D.destroyed;if(!Q&&!$.corked&&!$.bufferProcessing&&$.bufferedRequest)WN(D,$);if(B)process.nextTick(YN,D,$,Q,J);else YN(D,$,Q,J)}}function YN(D,F,$,B){if(!$)MDD(D,F);F.pendingcb--,B(),J3(D,F)}function MDD(D,F){if(F.length===0&&F.needDrain)F.needDrain=!1,D.emit("drain")}function WN(D,F){F.bufferProcessing=!0;var $=F.bufferedRequest;if(D._writev&&$&&$.next){var B=F.bufferedRequestCount,J=Array(B),Q=F.corkedRequestsFree;Q.entry=$;var X=0,Y=!0;while($){if(J[X]=$,!$.isBuf)Y=!1;$=$.next,X+=1}if(J.allBuffers=Y,sJ(D,F,!0,F.length,J,"",Q.finish),F.pendingcb++,F.lastBufferedRequest=null,Q.next)F.corkedRequestsFree=Q.next,Q.next=null;else F.corkedRequestsFree=new GN(F);F.bufferedRequestCount=0}else{while($){var{chunk:G,encoding:H,callback:E}=$,K=F.objectMode?1:G.length;if(sJ(D,F,!1,K,G,H,E),$=$.next,F.bufferedRequestCount--,F.writing)break}if($===null)F.lastBufferedRequest=null}F.bufferedRequest=$,F.bufferProcessing=!1}vD.prototype._write=function(D,F,$){$(new QDD("_write()"))};vD.prototype._writev=null;vD.prototype.end=function(D,F,$){var B=this._writableState;if(typeof D==="function")$=D,D=null,F=null;else if(typeof F==="function")$=F,F=null;if(D!==null&&D!==void 0)this.write(D,F);if(B.corked)B.corked=1,this.uncork();if(!B.ending)RDD(this,B,$);return this};Object.defineProperty(vD.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function EN(D){return D.ending&&D.length===0&&D.bufferedRequest===null&&!D.finished&&!D.writing}function NDD(D,F){D._final(function($){if(F.pendingcb--,$)f4(D,$);F.prefinished=!0,D.emit("prefinish"),J3(D,F)})}function CDD(D,F){if(!F.prefinished&&!F.finalCalled)if(typeof D._final==="function"&&!F.destroyed)F.pendingcb++,F.finalCalled=!0,process.nextTick(NDD,D,F);else F.prefinished=!0,D.emit("prefinish")}function J3(D,F){var $=EN(F);if($){if(CDD(D,F),F.pendingcb===0){if(F.finished=!0,D.emit("finish"),F.autoDestroy){var B=D._readableState;if(!B||B.autoDestroy&&B.endEmitted)D.destroy()}}}return $}function RDD(D,F,$){if(F.ending=!0,J3(D,F),$)if(F.finished)process.nextTick($);else D.once("finish",$);F.ended=!0,D.writable=!1}function wDD(D,F,$){var B=D.entry;D.entry=null;while(B){var J=B.callback;F.pendingcb--,J($),B=B.next}F.corkedRequestsFree.next=D}Object.defineProperty(vD.prototype,"destroyed",{enumerable:!1,get:function(){if(this._writableState===void 0)return!1;return this._writableState.destroyed},set:function(F){if(!this._writableState)return;this._writableState.destroyed=F}});vD.prototype.destroy=rJ.destroy;vD.prototype._undestroy=rJ.undestroy;vD.prototype._destroy=function(D,F){F(D)}});var N6=q((bzD,zN)=>{var TDD=Object.keys||function(D){var F=[];for(var $ in D)F.push($);return F};zN.exports=v1;var KN=DQ(),eJ=tJ();M6()(v1,KN);{A9=TDD(eJ.prototype);for(X3=0;X3<A9.length;X3++)if(Y3=A9[X3],!v1.prototype[Y3])v1.prototype[Y3]=eJ.prototype[Y3]}var A9,Y3,X3;function v1(D){if(!(this instanceof v1))return new v1(D);if(KN.call(this,D),eJ.call(this,D),this.allowHalfOpen=!0,D){if(D.readable===!1)this.readable=!1;if(D.writable===!1)this.writable=!1;if(D.allowHalfOpen===!1)this.allowHalfOpen=!1,this.once("end",jDD)}}Object.defineProperty(v1.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});Object.defineProperty(v1.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});Object.defineProperty(v1.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function jDD(){if(this._writableState.ended)return;process.nextTick(ODD,this)}function ODD(D){D.end()}Object.defineProperty(v1.prototype,"destroyed",{enumerable:!1,get:function(){if(this._readableState===void 0||this._writableState===void 0)return!1;return this._readableState.destroyed&&this._writableState.destroyed},set:function(F){if(this._readableState===void 0||this._writableState===void 0)return;this._readableState.destroyed=F,this._writableState.destroyed=F}})});var ZN=q((FQ,AN)=>{/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var Z9=XD("buffer"),y1=Z9.Buffer;function VN(D,F){for(var $ in D)F[$]=D[$]}if(y1.from&&y1.alloc&&y1.allocUnsafe&&y1.allocUnsafeSlow)AN.exports=Z9;else VN(Z9,FQ),FQ.Buffer=C6;function C6(D,F,$){return y1(D,F,$)}C6.prototype=Object.create(y1.prototype);VN(y1,C6);C6.from=function(D,F,$){if(typeof D==="number")throw TypeError("Argument must not be a number");return y1(D,F,$)};C6.alloc=function(D,F,$){if(typeof D!=="number")throw TypeError("Argument must be a number");var B=y1(D);if(F!==void 0)if(typeof $==="string")B.fill(F,$);else B.fill(F);else B.fill(0);return B};C6.allocUnsafe=function(D){if(typeof D!=="number")throw TypeError("Argument must be a number");return y1(D)};C6.allocUnsafeSlow=function(D){if(typeof D!=="number")throw TypeError("Argument must be a number");return Z9.SlowBuffer(D)}});var JQ=q((mDD)=>{var BQ=ZN().Buffer,UN=BQ.isEncoding||function(D){switch(D=""+D,D&&D.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function IDD(D){if(!D)return"utf8";var F;while(!0)switch(D){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return D;default:if(F)return;D=(""+D).toLowerCase(),F=!0}}function PDD(D){var F=IDD(D);if(typeof F!=="string"&&(BQ.isEncoding===UN||!UN(D)))throw Error("Unknown encoding: "+D);return F||D}mDD.StringDecoder=G3;function G3(D){this.encoding=PDD(D);var F;switch(this.encoding){case"utf16le":this.text=_DD,this.end=fDD,F=4;break;case"utf8":this.fillLast=vDD,F=4;break;case"base64":this.text=gDD,this.end=hDD,F=3;break;default:this.write=bDD,this.end=uDD;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=BQ.allocUnsafe(F)}G3.prototype.write=function(D){if(D.length===0)return"";var F,$;if(this.lastNeed){if(F=this.fillLast(D),F===void 0)return"";$=this.lastNeed,this.lastNeed=0}else $=0;if($<D.length)return F?F+this.text(D,$):this.text(D,$);return F||""};G3.prototype.end=xDD;G3.prototype.text=yDD;G3.prototype.fillLast=function(D){if(this.lastNeed<=D.length)return D.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);D.copy(this.lastChar,this.lastTotal-this.lastNeed,0,D.length),this.lastNeed-=D.length};function $Q(D){if(D<=127)return 0;else if(D>>5===6)return 2;else if(D>>4===14)return 3;else if(D>>3===30)return 4;return D>>6===2?-1:-2}function SDD(D,F,$){var B=F.length-1;if(B<$)return 0;var J=$Q(F[B]);if(J>=0){if(J>0)D.lastNeed=J-1;return J}if(--B<$||J===-2)return 0;if(J=$Q(F[B]),J>=0){if(J>0)D.lastNeed=J-2;return J}if(--B<$||J===-2)return 0;if(J=$Q(F[B]),J>=0){if(J>0)if(J===2)J=0;else D.lastNeed=J-3;return J}return 0}function kDD(D,F,$){if((F[0]&192)!==128)return D.lastNeed=0,"\uFFFD";if(D.lastNeed>1&&F.length>1){if((F[1]&192)!==128)return D.lastNeed=1,"\uFFFD";if(D.lastNeed>2&&F.length>2){if((F[2]&192)!==128)return D.lastNeed=2,"\uFFFD"}}}function vDD(D){var F=this.lastTotal-this.lastNeed,$=kDD(this,D,F);if($!==void 0)return $;if(this.lastNeed<=D.length)return D.copy(this.lastChar,F,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);D.copy(this.lastChar,F,0,D.length),this.lastNeed-=D.length}function yDD(D,F){var $=SDD(this,D,F);if(!this.lastNeed)return D.toString("utf8",F);this.lastTotal=$;var B=D.length-($-this.lastNeed);return D.copy(this.lastChar,0,B),D.toString("utf8",F,B)}function xDD(D){var F=D&&D.length?this.write(D):"";if(this.lastNeed)return F+"\uFFFD";return F}function _DD(D,F){if((D.length-F)%2===0){var $=D.toString("utf16le",F);if($){var B=$.charCodeAt($.length-1);if(B>=55296&&B<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=D[D.length-2],this.lastChar[1]=D[D.length-1],$.slice(0,-1)}return $}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=D[D.length-1],D.toString("utf16le",F,D.length-1)}function fDD(D){var F=D&&D.length?this.write(D):"";if(this.lastNeed){var $=this.lastTotal-this.lastNeed;return F+this.lastChar.toString("utf16le",0,$)}return F}function gDD(D,F){var $=(D.length-F)%3;if($===0)return D.toString("base64",F);if(this.lastNeed=3-$,this.lastTotal=3,$===1)this.lastChar[0]=D[D.length-1];else this.lastChar[0]=D[D.length-2],this.lastChar[1]=D[D.length-1];return D.toString("base64",F,D.length-$)}function hDD(D){var F=D&&D.length?this.write(D):"";if(this.lastNeed)return F+this.lastChar.toString("base64",0,3-this.lastNeed);return F}function bDD(D){return D.toString(this.encoding)}function uDD(D){return D&&D.length?this.write(D):""}});var U9=q((mzD,NN)=>{var LN=p8().codes.ERR_STREAM_PREMATURE_CLOSE;function dDD(D){var F=!1;return function(){if(F)return;F=!0;for(var $=arguments.length,B=Array($),J=0;J<$;J++)B[J]=arguments[J];D.apply(this,B)}}function pDD(){}function cDD(D){return D.setHeader&&typeof D.abort==="function"}function MN(D,F,$){if(typeof F==="function")return MN(D,null,F);if(!F)F={};$=dDD($||pDD);var B=F.readable||F.readable!==!1&&D.readable,J=F.writable||F.writable!==!1&&D.writable,Q=function(){if(!D.writable)Y()},X=D._writableState&&D._writableState.finished,Y=function(){if(J=!1,X=!0,!B)$.call(D)},G=D._readableState&&D._readableState.endEmitted,H=function(){if(B=!1,G=!0,!J)$.call(D)},E=function(Z){$.call(D,Z)},K=function(){var Z;if(B&&!G){if(!D._readableState||!D._readableState.ended)Z=new LN;return $.call(D,Z)}if(J&&!X){if(!D._writableState||!D._writableState.ended)Z=new LN;return $.call(D,Z)}},V=function(){D.req.on("finish",Y)};if(cDD(D))if(D.on("complete",Y),D.on("abort",K),D.req)V();else D.on("request",V);else if(J&&!D._writableState)D.on("end",Q),D.on("close",Q);if(D.on("end",H),D.on("finish",Y),F.error!==!1)D.on("error",E);return D.on("close",K),function(){if(D.removeListener("complete",Y),D.removeListener("abort",K),D.removeListener("request",V),D.req)D.req.removeListener("finish",Y);D.removeListener("end",Q),D.removeListener("close",Q),D.removeListener("finish",Y),D.removeListener("end",H),D.removeListener("error",E),D.removeListener("close",K)}}NN.exports=MN});var RN=q((lzD,CN)=>{var L9;function n8(D,F,$){if(F=nDD(F),F in D)Object.defineProperty(D,F,{value:$,enumerable:!0,configurable:!0,writable:!0});else D[F]=$;return D}function nDD(D){var F=iDD(D,"string");return typeof F==="symbol"?F:String(F)}function iDD(D,F){if(typeof D!=="object"||D===null)return D;var $=D[Symbol.toPrimitive];if($!==void 0){var B=$.call(D,F||"default");if(typeof B!=="object")return B;throw TypeError("@@toPrimitive must return a primitive value.")}return(F==="string"?String:Number)(D)}var aDD=U9(),i8=Symbol("lastResolve"),R6=Symbol("lastReject"),H3=Symbol("error"),M9=Symbol("ended"),w6=Symbol("lastPromise"),QQ=Symbol("handlePromise"),T6=Symbol("stream");function a8(D,F){return{value:D,done:F}}function oDD(D){var F=D[i8];if(F!==null){var $=D[T6].read();if($!==null)D[w6]=null,D[i8]=null,D[R6]=null,F(a8($,!1))}}function sDD(D){process.nextTick(oDD,D)}function rDD(D,F){return function($,B){D.then(function(){if(F[M9]){$(a8(void 0,!0));return}F[QQ]($,B)},B)}}var tDD=Object.getPrototypeOf(function(){}),eDD=Object.setPrototypeOf((L9={get stream(){return this[T6]},next:function(){var F=this,$=this[H3];if($!==null)return Promise.reject($);if(this[M9])return Promise.resolve(a8(void 0,!0));if(this[T6].destroyed)return new Promise(function(X,Y){process.nextTick(function(){if(F[H3])Y(F[H3]);else X(a8(void 0,!0))})});var B=this[w6],J;if(B)J=new Promise(rDD(B,this));else{var Q=this[T6].read();if(Q!==null)return Promise.resolve(a8(Q,!1));J=new Promise(this[QQ])}return this[w6]=J,J}},n8(L9,Symbol.asyncIterator,function(){return this}),n8(L9,"return",function(){var F=this;return new Promise(function($,B){F[T6].destroy(null,function(J){if(J){B(J);return}$(a8(void 0,!0))})})}),L9),tDD),D0D=function(F){var $,B=Object.create(eDD,($={},n8($,T6,{value:F,writable:!0}),n8($,i8,{value:null,writable:!0}),n8($,R6,{value:null,writable:!0}),n8($,H3,{value:null,writable:!0}),n8($,M9,{value:F._readableState.endEmitted,writable:!0}),n8($,QQ,{value:function(Q,X){var Y=B[T6].read();if(Y)B[w6]=null,B[i8]=null,B[R6]=null,Q(a8(Y,!1));else B[i8]=Q,B[R6]=X},writable:!0}),$));return B[w6]=null,aDD(F,function(J){if(J&&J.code!=="ERR_STREAM_PREMATURE_CLOSE"){var Q=B[R6];if(Q!==null)B[w6]=null,B[i8]=null,B[R6]=null,Q(J);B[H3]=J;return}var X=B[i8];if(X!==null)B[w6]=null,B[i8]=null,B[R6]=null,X(a8(void 0,!0));B[M9]=!0}),F.on("readable",sDD.bind(null,B)),B};CN.exports=D0D});var ON=q((dzD,jN)=>{function wN(D,F,$,B,J,Q,X){try{var Y=D[Q](X),G=Y.value}catch(H){$(H);return}if(Y.done)F(G);else Promise.resolve(G).then(B,J)}function F0D(D){return function(){var F=this,$=arguments;return new Promise(function(B,J){var Q=D.apply(F,$);function X(G){wN(Q,B,J,X,Y,"next",G)}function Y(G){wN(Q,B,J,X,Y,"throw",G)}X(void 0)})}}function TN(D,F){var $=Object.keys(D);if(Object.getOwnPropertySymbols){var B=Object.getOwnPropertySymbols(D);F&&(B=B.filter(function(J){return Object.getOwnPropertyDescriptor(D,J).enumerable})),$.push.apply($,B)}return $}function $0D(D){for(var F=1;F<arguments.length;F++){var $=arguments[F]!=null?arguments[F]:{};F%2?TN(Object($),!0).forEach(function(B){B0D(D,B,$[B])}):Object.getOwnPropertyDescriptors?Object.defineProperties(D,Object.getOwnPropertyDescriptors($)):TN(Object($)).forEach(function(B){Object.defineProperty(D,B,Object.getOwnPropertyDescriptor($,B))})}return D}function B0D(D,F,$){if(F=J0D(F),F in D)Object.defineProperty(D,F,{value:$,enumerable:!0,configurable:!0,writable:!0});else D[F]=$;return D}function J0D(D){var F=Q0D(D,"string");return typeof F==="symbol"?F:String(F)}function Q0D(D,F){if(typeof D!=="object"||D===null)return D;var $=D[Symbol.toPrimitive];if($!==void 0){var B=$.call(D,F||"default");if(typeof B!=="object")return B;throw TypeError("@@toPrimitive must return a primitive value.")}return(F==="string"?String:Number)(D)}var X0D=p8().codes.ERR_INVALID_ARG_TYPE;function Y0D(D,F,$){var B;if(F&&typeof F.next==="function")B=F;else if(F&&F[Symbol.asyncIterator])B=F[Symbol.asyncIterator]();else if(F&&F[Symbol.iterator])B=F[Symbol.iterator]();else throw new X0D("iterable",["Iterable"],F);var J=new D($0D({objectMode:!0},$)),Q=!1;J._read=function(){if(!Q)Q=!0,X()};function X(){return Y.apply(this,arguments)}function Y(){return Y=F0D(function*(){try{var G=yield B.next(),H=G.value,E=G.done;if(E)J.push(null);else if(J.push(yield H))X();else Q=!1}catch(K){J.destroy(K)}}),Y.apply(this,arguments)}return J}jN.exports=Y0D});var DQ=q((czD,gN)=>{gN.exports=HD;var g4;HD.ReadableState=kN;var pzD=XD("events").EventEmitter,SN=function(F,$){return F.listeners($).length},E3=XD("stream"),N9=XD("buffer").Buffer,G0D=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function H0D(D){return N9.from(D)}function W0D(D){return N9.isBuffer(D)||D instanceof G0D}var XQ=XD("util"),DD;if(XQ&&XQ.debuglog)DD=XQ.debuglog("stream");else DD=function(){};var E0D=rM(),KQ=nJ(),q0D=iJ(),K0D=q0D.getHighWaterMark,C9=p8().codes,z0D=C9.ERR_INVALID_ARG_TYPE,V0D=C9.ERR_STREAM_PUSH_AFTER_EOF,A0D=C9.ERR_METHOD_NOT_IMPLEMENTED,Z0D=C9.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,h4,YQ,GQ;M6()(HD,E3);var W3=KQ.errorOrDestroy,HQ=["error","close","destroy","pause","resume"];function U0D(D,F,$){if(typeof D.prependListener==="function")return D.prependListener(F,$);if(!D._events||!D._events[F])D.on(F,$);else if(Array.isArray(D._events[F]))D._events[F].unshift($);else D._events[F]=[$,D._events[F]]}function kN(D,F,$){if(g4=g4||N6(),D=D||{},typeof $!=="boolean")$=F instanceof g4;if(this.objectMode=!!D.objectMode,$)this.objectMode=this.objectMode||!!D.readableObjectMode;if(this.highWaterMark=K0D(this,D,"readableHighWaterMark",$),this.buffer=new E0D,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=D.emitClose!==!1,this.autoDestroy=!!D.autoDestroy,this.destroyed=!1,this.defaultEncoding=D.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,D.encoding){if(!h4)h4=JQ().StringDecoder;this.decoder=new h4(D.encoding),this.encoding=D.encoding}}function HD(D){if(g4=g4||N6(),!(this instanceof HD))return new HD(D);var F=this instanceof g4;if(this._readableState=new kN(D,this,F),this.readable=!0,D){if(typeof D.read==="function")this._read=D.read;if(typeof D.destroy==="function")this._destroy=D.destroy}E3.call(this)}Object.defineProperty(HD.prototype,"destroyed",{enumerable:!1,get:function(){if(this._readableState===void 0)return!1;return this._readableState.destroyed},set:function(F){if(!this._readableState)return;this._readableState.destroyed=F}});HD.prototype.destroy=KQ.destroy;HD.prototype._undestroy=KQ.undestroy;HD.prototype._destroy=function(D,F){F(D)};HD.prototype.push=function(D,F){var $=this._readableState,B;if(!$.objectMode){if(typeof D==="string"){if(F=F||$.defaultEncoding,F!==$.encoding)D=N9.from(D,F),F="";B=!0}}else B=!0;return vN(this,D,F,!1,B)};HD.prototype.unshift=function(D){return vN(this,D,null,!0,!1)};function vN(D,F,$,B,J){DD("readableAddChunk",F);var Q=D._readableState;if(F===null)Q.reading=!1,N0D(D,Q);else{var X;if(!J)X=L0D(Q,F);if(X)W3(D,X);else if(Q.objectMode||F&&F.length>0){if(typeof F!=="string"&&!Q.objectMode&&Object.getPrototypeOf(F)!==N9.prototype)F=H0D(F);if(B)if(Q.endEmitted)W3(D,new Z0D);else WQ(D,Q,F,!0);else if(Q.ended)W3(D,new V0D);else if(Q.destroyed)return!1;else if(Q.reading=!1,Q.decoder&&!$)if(F=Q.decoder.write(F),Q.objectMode||F.length!==0)WQ(D,Q,F,!1);else qQ(D,Q);else WQ(D,Q,F,!1)}else if(!B)Q.reading=!1,qQ(D,Q)}return!Q.ended&&(Q.length<Q.highWaterMark||Q.length===0)}function WQ(D,F,$,B){if(F.flowing&&F.length===0&&!F.sync)F.awaitDrain=0,D.emit("data",$);else{if(F.length+=F.objectMode?1:$.length,B)F.buffer.unshift($);else F.buffer.push($);if(F.needReadable)R9(D)}qQ(D,F)}function L0D(D,F){var $;if(!W0D(F)&&typeof F!=="string"&&F!==void 0&&!D.objectMode)$=new z0D("chunk",["string","Buffer","Uint8Array"],F);return $}HD.prototype.isPaused=function(){return this._readableState.flowing===!1};HD.prototype.setEncoding=function(D){if(!h4)h4=JQ().StringDecoder;var F=new h4(D);this._readableState.decoder=F,this._readableState.encoding=this._readableState.decoder.encoding;var $=this._readableState.buffer.head,B="";while($!==null)B+=F.write($.data),$=$.next;if(this._readableState.buffer.clear(),B!=="")this._readableState.buffer.push(B);return this._readableState.length=B.length,this};var IN=1073741824;function M0D(D){if(D>=IN)D=IN;else D--,D|=D>>>1,D|=D>>>2,D|=D>>>4,D|=D>>>8,D|=D>>>16,D++;return D}function PN(D,F){if(D<=0||F.length===0&&F.ended)return 0;if(F.objectMode)return 1;if(D!==D)if(F.flowing&&F.length)return F.buffer.head.data.length;else return F.length;if(D>F.highWaterMark)F.highWaterMark=M0D(D);if(D<=F.length)return D;if(!F.ended)return F.needReadable=!0,0;return F.length}HD.prototype.read=function(D){DD("read",D),D=parseInt(D,10);var F=this._readableState,$=D;if(D!==0)F.emittedReadable=!1;if(D===0&&F.needReadable&&((F.highWaterMark!==0?F.length>=F.highWaterMark:F.length>0)||F.ended)){if(DD("read: emitReadable",F.length,F.ended),F.length===0&&F.ended)EQ(this);else R9(this);return null}if(D=PN(D,F),D===0&&F.ended){if(F.length===0)EQ(this);return null}var B=F.needReadable;if(DD("need readable",B),F.length===0||F.length-D<F.highWaterMark)B=!0,DD("length less than watermark",B);if(F.ended||F.reading)B=!1,DD("reading or ended",B);else if(B){if(DD("do read"),F.reading=!0,F.sync=!0,F.length===0)F.needReadable=!0;if(this._read(F.highWaterMark),F.sync=!1,!F.reading)D=PN($,F)}var J;if(D>0)J=_N(D,F);else J=null;if(J===null)F.needReadable=F.length<=F.highWaterMark,D=0;else F.length-=D,F.awaitDrain=0;if(F.length===0){if(!F.ended)F.needReadable=!0;if($!==D&&F.ended)EQ(this)}if(J!==null)this.emit("data",J);return J};function N0D(D,F){if(DD("onEofChunk"),F.ended)return;if(F.decoder){var $=F.decoder.end();if($&&$.length)F.buffer.push($),F.length+=F.objectMode?1:$.length}if(F.ended=!0,F.sync)R9(D);else if(F.needReadable=!1,!F.emittedReadable)F.emittedReadable=!0,yN(D)}function R9(D){var F=D._readableState;if(DD("emitReadable",F.needReadable,F.emittedReadable),F.needReadable=!1,!F.emittedReadable)DD("emitReadable",F.flowing),F.emittedReadable=!0,process.nextTick(yN,D)}function yN(D){var F=D._readableState;if(DD("emitReadable_",F.destroyed,F.length,F.ended),!F.destroyed&&(F.length||F.ended))D.emit("readable"),F.emittedReadable=!1;F.needReadable=!F.flowing&&!F.ended&&F.length<=F.highWaterMark,zQ(D)}function qQ(D,F){if(!F.readingMore)F.readingMore=!0,process.nextTick(C0D,D,F)}function C0D(D,F){while(!F.reading&&!F.ended&&(F.length<F.highWaterMark||F.flowing&&F.length===0)){var $=F.length;if(DD("maybeReadMore read 0"),D.read(0),$===F.length)break}F.readingMore=!1}HD.prototype._read=function(D){W3(this,new A0D("_read()"))};HD.prototype.pipe=function(D,F){var $=this,B=this._readableState;switch(B.pipesCount){case 0:B.pipes=D;break;case 1:B.pipes=[B.pipes,D];break;default:B.pipes.push(D);break}B.pipesCount+=1,DD("pipe count=%d opts=%j",B.pipesCount,F);var J=(!F||F.end!==!1)&&D!==process.stdout&&D!==process.stderr,Q=J?Y:U;if(B.endEmitted)process.nextTick(Q);else $.once("end",Q);D.on("unpipe",X);function X(L,M){if(DD("onunpipe"),L===$){if(M&&M.hasUnpiped===!1)M.hasUnpiped=!0,E()}}function Y(){DD("onend"),D.end()}var G=R0D($);D.on("drain",G);var H=!1;function E(){if(DD("cleanup"),D.removeListener("close",A),D.removeListener("finish",Z),D.removeListener("drain",G),D.removeListener("error",V),D.removeListener("unpipe",X),$.removeListener("end",Y),$.removeListener("end",U),$.removeListener("data",K),H=!0,B.awaitDrain&&(!D._writableState||D._writableState.needDrain))G()}$.on("data",K);function K(L){DD("ondata");var M=D.write(L);if(DD("dest.write",M),M===!1){if((B.pipesCount===1&&B.pipes===D||B.pipesCount>1&&fN(B.pipes,D)!==-1)&&!H)DD("false write response, pause",B.awaitDrain),B.awaitDrain++;$.pause()}}function V(L){if(DD("onerror",L),U(),D.removeListener("error",V),SN(D,"error")===0)W3(D,L)}U0D(D,"error",V);function A(){D.removeListener("finish",Z),U()}D.once("close",A);function Z(){DD("onfinish"),D.removeListener("close",A),U()}D.once("finish",Z);function U(){DD("unpipe"),$.unpipe(D)}if(D.emit("pipe",$),!B.flowing)DD("pipe resume"),$.resume();return D};function R0D(D){return function(){var $=D._readableState;if(DD("pipeOnDrain",$.awaitDrain),$.awaitDrain)$.awaitDrain--;if($.awaitDrain===0&&SN(D,"data"))$.flowing=!0,zQ(D)}}HD.prototype.unpipe=function(D){var F=this._readableState,$={hasUnpiped:!1};if(F.pipesCount===0)return this;if(F.pipesCount===1){if(D&&D!==F.pipes)return this;if(!D)D=F.pipes;if(F.pipes=null,F.pipesCount=0,F.flowing=!1,D)D.emit("unpipe",this,$);return this}if(!D){var{pipes:B,pipesCount:J}=F;F.pipes=null,F.pipesCount=0,F.flowing=!1;for(var Q=0;Q<J;Q++)B[Q].emit("unpipe",this,{hasUnpiped:!1});return this}var X=fN(F.pipes,D);if(X===-1)return this;if(F.pipes.splice(X,1),F.pipesCount-=1,F.pipesCount===1)F.pipes=F.pipes[0];return D.emit("unpipe",this,$),this};HD.prototype.on=function(D,F){var $=E3.prototype.on.call(this,D,F),B=this._readableState;if(D==="data"){if(B.readableListening=this.listenerCount("readable")>0,B.flowing!==!1)this.resume()}else if(D==="readable"){if(!B.endEmitted&&!B.readableListening){if(B.readableListening=B.needReadable=!0,B.flowing=!1,B.emittedReadable=!1,DD("on readable",B.length,B.reading),B.length)R9(this);else if(!B.reading)process.nextTick(w0D,this)}}return $};HD.prototype.addListener=HD.prototype.on;HD.prototype.removeListener=function(D,F){var $=E3.prototype.removeListener.call(this,D,F);if(D==="readable")process.nextTick(xN,this);return $};HD.prototype.removeAllListeners=function(D){var F=E3.prototype.removeAllListeners.apply(this,arguments);if(D==="readable"||D===void 0)process.nextTick(xN,this);return F};function xN(D){var F=D._readableState;if(F.readableListening=D.listenerCount("readable")>0,F.resumeScheduled&&!F.paused)F.flowing=!0;else if(D.listenerCount("data")>0)D.resume()}function w0D(D){DD("readable nexttick read 0"),D.read(0)}HD.prototype.resume=function(){var D=this._readableState;if(!D.flowing)DD("resume"),D.flowing=!D.readableListening,T0D(this,D);return D.paused=!1,this};function T0D(D,F){if(!F.resumeScheduled)F.resumeScheduled=!0,process.nextTick(j0D,D,F)}function j0D(D,F){if(DD("resume",F.reading),!F.reading)D.read(0);if(F.resumeScheduled=!1,D.emit("resume"),zQ(D),F.flowing&&!F.reading)D.read(0)}HD.prototype.pause=function(){if(DD("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1)DD("pause"),this._readableState.flowing=!1,this.emit("pause");return this._readableState.paused=!0,this};function zQ(D){var F=D._readableState;DD("flow",F.flowing);while(F.flowing&&D.read()!==null);}HD.prototype.wrap=function(D){var F=this,$=this._readableState,B=!1;D.on("end",function(){if(DD("wrapped end"),$.decoder&&!$.ended){var X=$.decoder.end();if(X&&X.length)F.push(X)}F.push(null)}),D.on("data",function(X){if(DD("wrapped data"),$.decoder)X=$.decoder.write(X);if($.objectMode&&(X===null||X===void 0))return;else if(!$.objectMode&&(!X||!X.length))return;var Y=F.push(X);if(!Y)B=!0,D.pause()});for(var J in D)if(this[J]===void 0&&typeof D[J]==="function")this[J]=function(Y){return function(){return D[Y].apply(D,arguments)}}(J);for(var Q=0;Q<HQ.length;Q++)D.on(HQ[Q],this.emit.bind(this,HQ[Q]));return this._read=function(X){if(DD("wrapped _read",X),B)B=!1,D.resume()},this};if(typeof Symbol==="function")HD.prototype[Symbol.asyncIterator]=function(){if(YQ===void 0)YQ=RN();return YQ(this)};Object.defineProperty(HD.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});Object.defineProperty(HD.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}});Object.defineProperty(HD.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(F){if(this._readableState)this._readableState.flowing=F}});HD._fromList=_N;Object.defineProperty(HD.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function _N(D,F){if(F.length===0)return null;var $;if(F.objectMode)$=F.buffer.shift();else if(!D||D>=F.length){if(F.decoder)$=F.buffer.join("");else if(F.buffer.length===1)$=F.buffer.first();else $=F.buffer.concat(F.length);F.buffer.clear()}else $=F.buffer.consume(D,F.decoder);return $}function EQ(D){var F=D._readableState;if(DD("endReadable",F.endEmitted),!F.endEmitted)F.ended=!0,process.nextTick(O0D,F,D)}function O0D(D,F){if(DD("endReadableNT",D.endEmitted,D.length),!D.endEmitted&&D.length===0){if(D.endEmitted=!0,F.readable=!1,F.emit("end"),D.autoDestroy){var $=F._writableState;if(!$||$.autoDestroy&&$.finished)F.destroy()}}}if(typeof Symbol==="function")HD.from=function(D,F){if(GQ===void 0)GQ=ON();return GQ(HD,D,F)};function fN(D,F){for(var $=0,B=D.length;$<B;$++)if(D[$]===F)return $;return-1}});var VQ=q((nzD,bN)=>{bN.exports=$8;var w9=p8().codes,I0D=w9.ERR_METHOD_NOT_IMPLEMENTED,P0D=w9.ERR_MULTIPLE_CALLBACK,S0D=w9.ERR_TRANSFORM_ALREADY_TRANSFORMING,k0D=w9.ERR_TRANSFORM_WITH_LENGTH_0,T9=N6();M6()($8,T9);function v0D(D,F){var $=this._transformState;$.transforming=!1;var B=$.writecb;if(B===null)return this.emit("error",new P0D);if($.writechunk=null,$.writecb=null,F!=null)this.push(F);B(D);var J=this._readableState;if(J.reading=!1,J.needReadable||J.length<J.highWaterMark)this._read(J.highWaterMark)}function $8(D){if(!(this instanceof $8))return new $8(D);if(T9.call(this,D),this._transformState={afterTransform:v0D.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,D){if(typeof D.transform==="function")this._transform=D.transform;if(typeof D.flush==="function")this._flush=D.flush}this.on("prefinish",y0D)}function y0D(){var D=this;if(typeof this._flush==="function"&&!this._readableState.destroyed)this._flush(function(F,$){hN(D,F,$)});else hN(this,null,null)}$8.prototype.push=function(D,F){return this._transformState.needTransform=!1,T9.prototype.push.call(this,D,F)};$8.prototype._transform=function(D,F,$){$(new I0D("_transform()"))};$8.prototype._write=function(D,F,$){var B=this._transformState;if(B.writecb=$,B.writechunk=D,B.writeencoding=F,!B.transforming){var J=this._readableState;if(B.needTransform||J.needReadable||J.length<J.highWaterMark)this._read(J.highWaterMark)}};$8.prototype._read=function(D){var F=this._transformState;if(F.writechunk!==null&&!F.transforming)F.transforming=!0,this._transform(F.writechunk,F.writeencoding,F.afterTransform);else F.needTransform=!0};$8.prototype._destroy=function(D,F){T9.prototype._destroy.call(this,D,function($){F($)})};function hN(D,F,$){if(F)return D.emit("error",F);if($!=null)D.push($);if(D._writableState.length)throw new k0D;if(D._transformState.transforming)throw new S0D;return D.push(null)}});var lN=q((izD,mN)=>{mN.exports=q3;var uN=VQ();M6()(q3,uN);function q3(D){if(!(this instanceof q3))return new q3(D);uN.call(this,D)}q3.prototype._transform=function(D,F,$){$(null,D)}});var iN=q((azD,nN)=>{var AQ;function x0D(D){var F=!1;return function(){if(F)return;F=!0,D.apply(void 0,arguments)}}var cN=p8().codes,_0D=cN.ERR_MISSING_ARGS,f0D=cN.ERR_STREAM_DESTROYED;function dN(D){if(D)throw D}function g0D(D){return D.setHeader&&typeof D.abort==="function"}function h0D(D,F,$,B){B=x0D(B);var J=!1;if(D.on("close",function(){J=!0}),AQ===void 0)AQ=U9();AQ(D,{readable:F,writable:$},function(X){if(X)return B(X);J=!0,B()});var Q=!1;return function(X){if(J)return;if(Q)return;if(Q=!0,g0D(D))return D.abort();if(typeof D.destroy==="function")return D.destroy();B(X||new f0D("pipe"))}}function pN(D){D()}function b0D(D,F){return D.pipe(F)}function u0D(D){if(!D.length)return dN;if(typeof D[D.length-1]!=="function")return dN;return D.pop()}function m0D(){for(var D=arguments.length,F=Array(D),$=0;$<D;$++)F[$]=arguments[$];var B=u0D(F);if(Array.isArray(F[0]))F=F[0];if(F.length<2)throw new _0D("streams");var J,Q=F.map(function(X,Y){var G=Y<F.length-1,H=Y>0;return h0D(X,G,H,function(E){if(!J)J=E;if(E)Q.forEach(pN);if(G)return;Q.forEach(pN),B(J)})});return F.reduce(b0D)}nN.exports=m0D});var aN=q((l0,z3)=>{var K3=XD("stream");if(process.env.READABLE_STREAM==="disable"&&K3)z3.exports=K3.Readable,Object.assign(z3.exports,K3),z3.exports.Stream=K3;else l0=z3.exports=DQ(),l0.Stream=K3||l0,l0.Readable=l0,l0.Writable=tJ(),l0.Duplex=N6(),l0.Transform=VQ(),l0.PassThrough=lN(),l0.finished=U9(),l0.pipeline=iN()});var rN=q((ozD,sN)=>{var{Buffer:B1}=XD("buffer"),oN=Symbol.for("BufferList");function UD(D){if(!(this instanceof UD))return new UD(D);UD._init.call(this,D)}UD._init=function(F){if(Object.defineProperty(this,oN,{value:!0}),this._bufs=[],this.length=0,F)this.append(F)};UD.prototype._new=function(F){return new UD(F)};UD.prototype._offset=function(F){if(F===0)return[0,0];let $=0;for(let B=0;B<this._bufs.length;B++){let J=$+this._bufs[B].length;if(F<J||B===this._bufs.length-1)return[B,F-$];$=J}};UD.prototype._reverseOffset=function(D){let F=D[0],$=D[1];for(let B=0;B<F;B++)$+=this._bufs[B].length;return $};UD.prototype.get=function(F){if(F>this.length||F<0)return;let $=this._offset(F);return this._bufs[$[0]][$[1]]};UD.prototype.slice=function(F,$){if(typeof F==="number"&&F<0)F+=this.length;if(typeof $==="number"&&$<0)$+=this.length;return this.copy(null,0,F,$)};UD.prototype.copy=function(F,$,B,J){if(typeof B!=="number"||B<0)B=0;if(typeof J!=="number"||J>this.length)J=this.length;if(B>=this.length)return F||B1.alloc(0);if(J<=0)return F||B1.alloc(0);let Q=!!F,X=this._offset(B),Y=J-B,G=Y,H=Q&&$||0,E=X[1];if(B===0&&J===this.length){if(!Q)return this._bufs.length===1?this._bufs[0]:B1.concat(this._bufs,this.length);for(let K=0;K<this._bufs.length;K++)this._bufs[K].copy(F,H),H+=this._bufs[K].length;return F}if(G<=this._bufs[X[0]].length-E)return Q?this._bufs[X[0]].copy(F,$,E,E+G):this._bufs[X[0]].slice(E,E+G);if(!Q)F=B1.allocUnsafe(Y);for(let K=X[0];K<this._bufs.length;K++){let V=this._bufs[K].length-E;if(G>V)this._bufs[K].copy(F,H,E),H+=V;else{this._bufs[K].copy(F,H,E,E+G),H+=V;break}if(G-=V,E)E=0}if(F.length>H)return F.slice(0,H);return F};UD.prototype.shallowSlice=function(F,$){if(F=F||0,$=typeof $!=="number"?this.length:$,F<0)F+=this.length;if($<0)$+=this.length;if(F===$)return this._new();let B=this._offset(F),J=this._offset($),Q=this._bufs.slice(B[0],J[0]+1);if(J[1]===0)Q.pop();else Q[Q.length-1]=Q[Q.length-1].slice(0,J[1]);if(B[1]!==0)Q[0]=Q[0].slice(B[1]);return this._new(Q)};UD.prototype.toString=function(F,$,B){return this.slice($,B).toString(F)};UD.prototype.consume=function(F){if(F=Math.trunc(F),Number.isNaN(F)||F<=0)return this;while(this._bufs.length)if(F>=this._bufs[0].length)F-=this._bufs[0].length,this.length-=this._bufs[0].length,this._bufs.shift();else{this._bufs[0]=this._bufs[0].slice(F),this.length-=F;break}return this};UD.prototype.duplicate=function(){let F=this._new();for(let $=0;$<this._bufs.length;$++)F.append(this._bufs[$]);return F};UD.prototype.append=function(F){if(F==null)return this;if(F.buffer)this._appendBuffer(B1.from(F.buffer,F.byteOffset,F.byteLength));else if(Array.isArray(F))for(let $=0;$<F.length;$++)this.append(F[$]);else if(this._isBufferList(F))for(let $=0;$<F._bufs.length;$++)this.append(F._bufs[$]);else{if(typeof F==="number")F=F.toString();this._appendBuffer(B1.from(F))}return this};UD.prototype._appendBuffer=function(F){this._bufs.push(F),this.length+=F.length};UD.prototype.indexOf=function(D,F,$){if($===void 0&&typeof F==="string")$=F,F=void 0;if(typeof D==="function"||Array.isArray(D))throw TypeError('The "value" argument must be one of type string, Buffer, BufferList, or Uint8Array.');else if(typeof D==="number")D=B1.from([D]);else if(typeof D==="string")D=B1.from(D,$);else if(this._isBufferList(D))D=D.slice();else if(Array.isArray(D.buffer))D=B1.from(D.buffer,D.byteOffset,D.byteLength);else if(!B1.isBuffer(D))D=B1.from(D);if(F=Number(F||0),isNaN(F))F=0;if(F<0)F=this.length+F;if(F<0)F=0;if(D.length===0)return F>this.length?this.length:F;let B=this._offset(F),J=B[0],Q=B[1];for(;J<this._bufs.length;J++){let X=this._bufs[J];while(Q<X.length)if(X.length-Q>=D.length){let G=X.indexOf(D,Q);if(G!==-1)return this._reverseOffset([J,G]);Q=X.length-D.length+1}else{let G=this._reverseOffset([J,Q]);if(this._match(G,D))return G;Q++}Q=0}return-1};UD.prototype._match=function(D,F){if(this.length-D<F.length)return!1;for(let $=0;$<F.length;$++)if(this.get(D+$)!==F[$])return!1;return!0};(function(){let D={readDoubleBE:8,readDoubleLE:8,readFloatBE:4,readFloatLE:4,readInt32BE:4,readInt32LE:4,readUInt32BE:4,readUInt32LE:4,readInt16BE:2,readInt16LE:2,readUInt16BE:2,readUInt16LE:2,readInt8:1,readUInt8:1,readIntBE:null,readIntLE:null,readUIntBE:null,readUIntLE:null};for(let F in D)(function($){if(D[$]===null)UD.prototype[$]=function(B,J){return this.slice(B,B+J)[$](0,J)};else UD.prototype[$]=function(B=0){return this.slice(B,B+D[$])[$](0)}})(F)})();UD.prototype._isBufferList=function(F){return F instanceof UD||UD.isBufferList(F)};UD.isBufferList=function(F){return F!=null&&F[oN]};sN.exports=UD});var tN=q((szD,j9)=>{var ZQ=aN().Duplex,l0D=M6(),V3=rN();function J0(D){if(!(this instanceof J0))return new J0(D);if(typeof D==="function"){this._callback=D;let F=function(B){if(this._callback)this._callback(B),this._callback=null}.bind(this);this.on("pipe",function(B){B.on("error",F)}),this.on("unpipe",function(B){B.removeListener("error",F)}),D=null}V3._init.call(this,D),ZQ.call(this)}l0D(J0,ZQ);Object.assign(J0.prototype,V3.prototype);J0.prototype._new=function(F){return new J0(F)};J0.prototype._write=function(F,$,B){if(this._appendBuffer(F),typeof B==="function")B()};J0.prototype._read=function(F){if(!this.length)return this.push(null);F=Math.min(F,this.length),this.push(this.slice(0,F)),this.consume(F)};J0.prototype.end=function(F){if(ZQ.prototype.end.call(this,F),this._callback)this._callback(null,this.slice()),this._callback=null};J0.prototype._destroy=function(F,$){this._bufs.length=0,this.length=0,$(F)};J0.prototype._isBufferList=function(F){return F instanceof J0||F instanceof V3||J0.isBufferList(F)};J0.isBufferList=V3.isBufferList;j9.exports=J0;j9.exports.BufferListStream=J0;j9.exports.BufferList=V3});var FC=q((rzD,NQ)=>{var d0D=XD("readline"),p0D=fJ(),eN=IM(),O9=H9(),I9=xM(),c0D=sF(),n0D=dM(),i0D=cM(),a0D=lJ(),{BufferListStream:o0D}=tN(),UQ=Symbol("text"),LQ=Symbol("prefixText");class DC{constructor(){this.requests=0,this.mutedStream=new o0D,this.mutedStream.pipe(process.stdout);let D=this;this.ourEmit=function(F,$,...B){let{stdin:J}=process;if(D.requests>0||J.emit===D.ourEmit){if(F==="keypress")return;if(F==="data"&&$.includes(3))process.emit("SIGINT");Reflect.apply(D.oldEmit,this,[F,$,...B])}else Reflect.apply(process.stdin.emit,this,[F,$,...B])}}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=d0D.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 P9;class MQ{constructor(D){if(!P9)P9=new DC;if(typeof D==="string")D={text:D};this.options={text:"",color:"cyan",stream:process.stderr,discardStdin:!0,...D},this.spinner=this.options.spinner,this.color=this.options.color,this.hideCursor=this.options.hideCursor!==!1,this.interval=this.options.interval||this.spinner.interval||100,this.stream=this.options.stream,this.id=void 0,this.isEnabled=typeof this.options.isEnabled==="boolean"?this.options.isEnabled:i0D({stream:this.stream}),this.isSilent=typeof this.options.isSilent==="boolean"?this.options.isSilent:!1,this.text=this.options.text,this.prefixText=this.options.prefixText,this.linesToClear=0,this.indent=this.options.indent,this.discardStdin=this.options.discardStdin,this.isDiscardingStdin=!1}get indent(){return this._indent}set indent(D=0){if(!(D>=0&&Number.isInteger(D)))throw Error("The `indent` option must be an integer from 0 and up");this._indent=D}_updateInterval(D){if(D!==void 0)this.interval=D}get spinner(){return this._spinner}set spinner(D){if(this.frameIndex=0,typeof D==="object"){if(D.frames===void 0)throw Error("The given spinner must have a `frames` property");this._spinner=D}else if(!a0D())this._spinner=O9.line;else if(D===void 0)this._spinner=O9.dots;else if(D!=="default"&&O9[D])this._spinner=O9[D];else throw Error(`There is no built-in spinner named '${D}'. See https://github.com/sindresorhus/cli-spinners/blob/main/spinners.json for a full list.`);this._updateInterval(this._spinner.interval)}get text(){return this[UQ]}set text(D){this[UQ]=D,this.updateLineCount()}get prefixText(){return this[LQ]}set prefixText(D){this[LQ]=D,this.updateLineCount()}get isSpinning(){return this.id!==void 0}getFullPrefixText(D=this[LQ],F=" "){if(typeof D==="string")return D+F;if(typeof D==="function")return D()+F;return""}updateLineCount(){let D=this.stream.columns||80,F=this.getFullPrefixText(this.prefixText,"-");this.lineCount=0;for(let $ of c0D(F+"--"+this[UQ]).split(`
39
39
  `))this.lineCount+=Math.max(1,Math.ceil(n0D($)/D))}get isEnabled(){return this._isEnabled&&!this.isSilent}set isEnabled(D){if(typeof D!=="boolean")throw TypeError("The `isEnabled` option must be a boolean");this._isEnabled=D}get isSilent(){return this._isSilent}set isSilent(D){if(typeof D!=="boolean")throw TypeError("The `isSilent` option must be a boolean");this._isSilent=D}frame(){let{frames:D}=this.spinner,F=D[this.frameIndex];if(this.color)F=p0D[this.color](F);this.frameIndex=++this.frameIndex%D.length;let $=typeof this.prefixText==="string"&&this.prefixText!==""?this.prefixText+" ":"",B=typeof this.text==="string"?" "+this.text:"";return $+F+B}clear(){if(!this.isEnabled||!this.stream.isTTY)return this;for(let D=0;D<this.linesToClear;D++){if(D>0)this.stream.moveCursor(0,-1);this.stream.clearLine(),this.stream.cursorTo(this.indent)}return this.linesToClear=0,this}render(){if(this.isSilent)return this;return this.clear(),this.stream.write(this.frame()),this.linesToClear=this.lineCount,this}start(D){if(D)this.text=D;if(this.isSilent)return this;if(!this.isEnabled){if(this.text)this.stream.write(`- ${this.text}
40
40
  `);return this}if(this.isSpinning)return this;if(this.hideCursor)eN.hide(this.stream);if(this.discardStdin&&process.stdin.isTTY)this.isDiscardingStdin=!0,P9.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)eN.show(this.stream);if(this.discardStdin&&process.stdin.isTTY&&this.isDiscardingStdin)P9.stop(),this.isDiscardingStdin=!1;return this}succeed(D){return this.stopAndPersist({symbol:I9.success,text:D})}fail(D){return this.stopAndPersist({symbol:I9.error,text:D})}warn(D){return this.stopAndPersist({symbol:I9.warning,text:D})}info(D){return this.stopAndPersist({symbol:I9.info,text:D})}stopAndPersist(D={}){if(this.isSilent)return this;let F=D.prefixText||this.prefixText,$=D.text||this.text,B=typeof $==="string"?" "+$:"";return this.stop(),this.stream.write(`${this.getFullPrefixText(F," ")}${D.symbol||" "}${B}
41
41
  `),this}}var s0D=function(D){return new MQ(D)};NQ.exports=s0D;NQ.exports.promise=(D,F)=>{if(typeof D.then!=="function")throw TypeError("Parameter `action` must be a Promise");let $=new MQ(F);return $.start(),(async()=>{try{await D,$.succeed()}catch{$.fail()}})(),$}});var UC=q((ZC,jQ)=>{Object.defineProperty(ZC,"__esModule",{value:!0});var c9;ZC.default=()=>{if(typeof jQ==="object"&&typeof ZC==="object")return c9=c9?c9:XD("fs"),c9;throw Error("File system is not available")}});var I6=q((LC)=>{Object.defineProperty(LC,"__esModule",{value:!0});LC.default=(D,F,$)=>({confidence:$,name:F.name(D),lang:F.language?F.language():void 0})});var CC=q((Z3)=>{var J1D=Z3&&Z3.__importDefault||function(D){return D&&D.__esModule?D:{default:D}};Object.defineProperty(Z3,"__esModule",{value:!0});var MC=J1D(I6());class NC{name(){return"ASCII"}match(D){let F=D.rawInput;for(let $=0;$<D.rawLen;$++){let B=F[$];if(B<32||B>126)return(0,MC.default)(D,this,0)}return(0,MC.default)(D,this,100)}}Z3.default=NC});var wC=q((U3)=>{var Q1D=U3&&U3.__importDefault||function(D){return D&&D.__esModule?D:{default:D}};Object.defineProperty(U3,"__esModule",{value:!0});var X1D=Q1D(I6());class RC{name(){return"UTF-8"}match(D){let F=!1,$=0,B=0,J=0,Q,X=D.rawInput;if(D.rawLen>=3&&(X[0]&255)==239&&(X[1]&255)==187&&(X[2]&255)==191)F=!0;for(let Y=0;Y<D.rawLen;Y++){let G=X[Y];if((G&128)==0)continue;if((G&224)==192)J=1;else if((G&240)==224)J=2;else if((G&248)==240)J=3;else{if(B++,B>5)break;J=0}for(;;){if(Y++,Y>=D.rawLen)break;if((X[Y]&192)!=128){B++;break}if(--J==0){$++;break}}}if(Q=0,F&&B==0)Q=100;else if(F&&$>B*10)Q=80;else if($>3&&B==0)Q=100;else if($>0&&B==0)Q=80;else if($==0&&B==0)Q=10;else if($>B*10)Q=25;else return null;return(0,X1D.default)(D,this,Q)}}U3.default=RC});var PC=q((d0)=>{var Y1D=d0&&d0.__importDefault||function(D){return D&&D.__esModule?D:{default:D}};Object.defineProperty(d0,"__esModule",{value:!0});d0.UTF_32LE=d0.UTF_32BE=d0.UTF_16LE=d0.UTF_16BE=void 0;var OQ=Y1D(I6());class TC{name(){return"UTF-16BE"}match(D){let F=D.rawInput;if(F.length>=2&&(F[0]&255)==254&&(F[1]&255)==255)return(0,OQ.default)(D,this,100);return null}}d0.UTF_16BE=TC;class jC{name(){return"UTF-16LE"}match(D){let F=D.rawInput;if(F.length>=2&&(F[0]&255)==255&&(F[1]&255)==254){if(F.length>=4&&F[2]==0&&F[3]==0)return null;return(0,OQ.default)(D,this,100)}return null}}d0.UTF_16LE=jC;class IQ{name(){return"UTF-32"}getChar(D,F){return-1}match(D){let F=0,$=0,B=!1,J=0,Q=D.rawLen/4*4,X=D.rawInput;if(Q==0)return null;if(this.getChar(X,0)==65279)B=!0;for(let Y=0;Y<Q;Y+=4){let G=this.getChar(X,Y);if(G<0||G>=1114111||G>=55296&&G<=57343)$+=1;else F+=1}if(B&&$==0)J=100;else if(B&&F>$*10)J=80;else if(F>3&&$==0)J=100;else if(F>0&&$==0)J=80;else if(F>$*10)J=25;return J==0?null:(0,OQ.default)(D,this,J)}}class OC extends IQ{name(){return"UTF-32BE"}getChar(D,F){return(D[F+0]&255)<<24|(D[F+1]&255)<<16|(D[F+2]&255)<<8|D[F+3]&255}}d0.UTF_32BE=OC;class IC extends IQ{name(){return"UTF-32LE"}getChar(D,F){return(D[F+3]&255)<<24|(D[F+2]&255)<<16|(D[F+1]&255)<<8|D[F+0]&255}}d0.UTF_32LE=IC});var gC=q((N0)=>{var G1D=N0&&N0.__importDefault||function(D){return D&&D.__esModule?D:{default:D}};Object.defineProperty(N0,"__esModule",{value:!0});N0.gb_18030=N0.euc_kr=N0.euc_jp=N0.big5=N0.sjis=void 0;var H1D=G1D(I6());function W1D(D,F){let $=(B,J,Q,X)=>{if(X<Q)return-1;let Y=Math.floor(Q+X>>>1);if(J>B[Y])return $(B,J,Y+1,X);if(J<B[Y])return $(B,J,Q,Y-1);return Y};return $(D,F,0,D.length-1)}class SC{constructor(){this.charValue=0,this.index=0,this.nextIndex=0,this.error=!1,this.done=!1}reset(){this.charValue=0,this.index=-1,this.nextIndex=0,this.error=!1,this.done=!1}nextByte(D){if(this.nextIndex>=D.rawLen)return this.done=!0,-1;return D.rawInput[this.nextIndex++]&255}}class d4{constructor(){this.commonChars=[]}name(){return"mbcs"}match(D){let F=0,$=0,B=0,J=0,Q=0,X=new SC;D:{for(X.reset();this.nextChar(X,D);){if(J++,X.error)B++;else{let Y=X.charValue&4294967295;if(Y>255){if(F++,this.commonChars!=null){if(W1D(this.commonChars,Y)>=0)$++}}}if(B>=2&&B*5>=F)break D}if(F<=10&&B==0){if(F==0&&J<10)Q=0;else Q=10;break D}if(F<20*B){Q=0;break D}if(this.commonChars==null){if(Q=30+F-20*B,Q>100)Q=100}else{let G=90/Math.log(F/4);Q=Math.floor(Math.log($+1)*G+10),Q=Math.min(Q,100)}}return Q==0?null:(0,H1D.default)(D,this,Q)}nextChar(D,F){return!0}}class kC extends d4{constructor(){super(...arguments);this.commonChars=[33088,33089,33090,33093,33115,33129,33130,33141,33142,33440,33442,33444,33449,33450,33451,33453,33455,33457,33459,33461,33463,33469,33470,33473,33476,33477,33478,33480,33481,33484,33485,33500,33504,33511,33512,33513,33514,33520,33521,33601,33603,33614,33615,33624,33630,33634,33639,33653,33654,33673,33674,33675,33677,33683,36502,37882,38314]}name(){return"Shift_JIS"}language(){return"ja"}nextChar(D,F){D.index=D.nextIndex,D.error=!1;let $=D.charValue=D.nextByte(F);if($<0)return!1;if($<=127||$>160&&$<=223)return!0;let B=D.nextByte(F);if(B<0)return!1;if(D.charValue=$<<8|B,!(B>=64&&B<=127||B>=128&&B<=255))D.error=!0;return!0}}N0.sjis=kC;class vC extends d4{constructor(){super(...arguments);this.commonChars=[41280,41281,41282,41283,41287,41289,41333,41334,42048,42054,42055,42056,42065,42068,42071,42084,42090,42092,42103,42147,42148,42151,42177,42190,42193,42207,42216,42237,42304,42312,42328,42345,42445,42471,42583,42593,42594,42600,42608,42664,42675,42681,42707,42715,42726,42738,42816,42833,42841,42970,43171,43173,43181,43217,43219,43236,43260,43456,43474,43507,43627,43706,43710,43724,43772,44103,44111,44208,44242,44377,44745,45024,45290,45423,45747,45764,45935,46156,46158,46412,46501,46525,46544,46552,46705,47085,47207,47428,47832,47940,48033,48593,49860,50105,50240,50271]}name(){return"Big5"}language(){return"zh"}nextChar(D,F){D.index=D.nextIndex,D.error=!1;let $=D.charValue=D.nextByte(F);if($<0)return!1;if($<=127||$==255)return!0;let B=D.nextByte(F);if(B<0)return!1;if(D.charValue=D.charValue<<8|B,B<64||B==127||B==255)D.error=!0;return!0}}N0.big5=vC;function yC(D,F){D.index=D.nextIndex,D.error=!1;let $=0,B=0,J=0;D:{if($=D.charValue=D.nextByte(F),$<0){D.done=!0;break D}if($<=141)break D;if(B=D.nextByte(F),D.charValue=D.charValue<<8|B,$>=161&&$<=254){if(B<161)D.error=!0;break D}if($==142){if(B<161)D.error=!0;break D}if($==143){if(J=D.nextByte(F),D.charValue=D.charValue<<8|J,J<161)D.error=!0}}return D.done==!1}class xC extends d4{constructor(){super(...arguments);this.commonChars=[41377,41378,41379,41382,41404,41418,41419,41430,41431,42146,42148,42150,42152,42154,42155,42156,42157,42159,42161,42163,42165,42167,42169,42171,42173,42175,42176,42177,42179,42180,42182,42183,42184,42185,42186,42187,42190,42191,42192,42206,42207,42209,42210,42212,42216,42217,42218,42219,42220,42223,42226,42227,42402,42403,42404,42406,42407,42410,42413,42415,42416,42419,42421,42423,42424,42425,42431,42435,42438,42439,42440,42441,42443,42448,42453,42454,42455,42462,42464,42465,42469,42473,42474,42475,42476,42477,42483,47273,47572,47854,48072,48880,49079,50410,50940,51133,51896,51955,52188,52689],this.nextChar=yC}name(){return"EUC-JP"}language(){return"ja"}}N0.euc_jp=xC;class _C extends d4{constructor(){super(...arguments);this.commonChars=[45217,45235,45253,45261,45268,45286,45293,45304,45306,45308,45496,45497,45511,45527,45538,45994,46011,46274,46287,46297,46315,46501,46517,46527,46535,46569,46835,47023,47042,47054,47270,47278,47286,47288,47291,47337,47531,47534,47564,47566,47613,47800,47822,47824,47857,48103,48115,48125,48301,48314,48338,48374,48570,48576,48579,48581,48838,48840,48863,48878,48888,48890,49057,49065,49088,49124,49131,49132,49144,49319,49327,49336,49338,49339,49341,49351,49356,49358,49359,49366,49370,49381,49403,49404,49572,49574,49590,49622,49631,49654,49656,50337,50637,50862,51151,51153,51154,51160,51173,51373],this.nextChar=yC}name(){return"EUC-KR"}language(){return"ko"}}N0.euc_kr=_C;class fC extends d4{constructor(){super(...arguments);this.commonChars=[41377,41378,41379,41380,41392,41393,41457,41459,41889,41900,41914,45480,45496,45502,45755,46025,46070,46323,46525,46532,46563,46767,46804,46816,47010,47016,47037,47062,47069,47284,47327,47350,47531,47561,47576,47610,47613,47821,48039,48086,48097,48122,48316,48347,48382,48588,48845,48861,49076,49094,49097,49332,49389,49611,49883,50119,50396,50410,50636,50935,51192,51371,51403,51413,51431,51663,51706,51889,51893,51911,51920,51926,51957,51965,52460,52728,52906,52932,52946,52965,53173,53186,53206,53442,53445,53456,53460,53671,53930,53938,53941,53947,53972,54211,54224,54269,54466,54490,54754,54992]}name(){return"GB18030"}language(){return"zh"}nextChar(D,F){D.index=D.nextIndex,D.error=!1;let $=0,B=0,J=0,Q=0;D:{if($=D.charValue=D.nextByte(F),$<0){D.done=!0;break D}if($<=128)break D;if(B=D.nextByte(F),D.charValue=D.charValue<<8|B,$>=129&&$<=254){if(B>=64&&B<=126||B>=80&&B<=254)break D;if(B>=48&&B<=57){if(J=D.nextByte(F),J>=129&&J<=254){if(Q=D.nextByte(F),Q>=48&&Q<=57){D.charValue=D.charValue<<16|J<<8|Q;break D}}}D.error=!0;break D}}return D.done==!1}}N0.gb_18030=fC});var oC=q((TD)=>{var E1D=TD&&TD.__importDefault||function(D){return D&&D.__esModule?D:{default:D}};Object.defineProperty(TD,"__esModule",{value:!0});TD.KOI8_R=TD.windows_1256=TD.windows_1251=TD.ISO_8859_9=TD.ISO_8859_8=TD.ISO_8859_7=TD.ISO_8859_6=TD.ISO_8859_5=TD.ISO_8859_2=TD.ISO_8859_1=void 0;var hC=E1D(I6()),q1D=16777215;class PQ{constructor(D,F){this.byteIndex=0,this.ngram=0,this.ngramCount=0,this.hitCount=0,this.spaceChar=32,this.ngramList=D,this.byteMap=F}search(D,F){let $=0;if(D[$+32]<=F)$+=32;if(D[$+16]<=F)$+=16;if(D[$+8]<=F)$+=8;if(D[$+4]<=F)$+=4;if(D[$+2]<=F)$+=2;if(D[$+1]<=F)$+=1;if(D[$]>F)$-=1;if($<0||D[$]!=F)return-1;return $}lookup(D){if(this.ngramCount+=1,this.search(this.ngramList,D)>=0)this.hitCount+=1}addByte(D){this.ngram=(this.ngram<<8)+(D&255)&q1D,this.lookup(this.ngram)}nextByte(D){if(this.byteIndex>=D.inputLen)return-1;return D.inputBytes[this.byteIndex++]&255}parse(D,F){let $,B=!1;this.spaceChar=F;while(($=this.nextByte(D))>=0){let Q=this.byteMap[$];if(Q!=0){if(!(Q==this.spaceChar&&B))this.addByte(Q);B=Q==this.spaceChar}}this.addByte(this.spaceChar);let J=this.hitCount/this.ngramCount;if(J>0.33)return 98;return Math.floor(J*300)}}class sD{constructor(D,F){this.fLang=D,this.fNGrams=F}}var K1D=(D)=>Array.isArray(D)&&isFinite(D[0]);class Q1{constructor(){this.spaceChar=32,this.nGramLang=void 0}ngrams(){return[]}byteMap(){return[]}name(D){return"sbcs"}language(){return this.nGramLang}match(D){this.nGramLang=void 0;let F=this.ngrams();if(K1D(F)){let J=new PQ(F,this.byteMap()).parse(D,this.spaceChar);return J<=0?null:(0,hC.default)(D,this,J)}let $=-1;for(let B=F.length-1;B>=0;B--){let J=F[B],X=new PQ(J.fNGrams,this.byteMap()).parse(D,this.spaceChar);if(X>$)$=X,this.nGramLang=J.fLang}return $<=0?null:(0,hC.default)(D,this,$)}}class bC extends Q1{byteMap(){return[32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,0,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,32,32,32,32,32,32,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,170,32,32,32,32,32,32,32,32,32,32,181,32,32,32,32,186,32,32,32,32,32,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,32,248,249,250,251,252,253,254,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,32,248,249,250,251,252,253,254,255]}ngrams(){return[new sD("da",[2122086,2122100,2122853,2123118,2123122,2123375,2123873,2124064,2125157,2125671,2126053,2126697,2126708,2126953,2127465,6383136,6385184,6385252,6386208,6386720,6579488,6579566,6579570,6579572,6627443,6644768,6644837,6647328,6647396,6648352,6648421,6648608,6648864,6713202,6776096,6776174,6776178,6907749,6908960,6909543,7038240,7039845,7103858,7104871,7105637,7169380,7234661,7234848,7235360,7235429,7300896,7302432,7303712,7398688,7479396,7479397,7479411,7496992,7566437,7610483,7628064,7628146,7629164,7759218]),new sD("de",[2122094,2122101,2122341,2122849,2122853,2122857,2123113,2123621,2123873,2124142,2125161,2126691,2126693,2127214,2127461,2127471,2127717,2128501,6448498,6514720,6514789,6514804,6578547,6579566,6579570,6580581,6627428,6627443,6646126,6646132,6647328,6648352,6648608,6776174,6841710,6845472,6906728,6907168,6909472,6909541,6911008,7104867,7105637,7217249,7217252,7217267,7234592,7234661,7234848,7235360,7235429,7238757,7479396,7496805,7497065,7562088,7566437,7610468,7628064,7628142,7628146,7695972,7695975,7759218]),new sD("en",[2122016,2122094,2122341,2122607,2123375,2123873,2123877,2124142,2125153,2125670,2125938,2126437,2126689,2126708,2126952,2126959,2127720,6383972,6384672,6385184,6385252,6386464,6386720,6386789,6386793,6561889,6561908,6627425,6627443,6627444,6644768,6647412,6648352,6648608,6713202,6840692,6841632,6841714,6906912,6909472,6909543,6909806,6910752,7217249,7217268,7234592,7235360,7238688,7300640,7302688,7303712,7496992,7500576,7544929,7544948,7561577,7566368,7610484,7628146,7628897,7628901,7629167,7630624,7631648]),new sD("es",[2122016,2122593,2122607,2122853,2123116,2123118,2123123,2124142,2124897,2124911,2125921,2125935,2125938,2126197,2126437,2126693,2127214,2128160,6365283,6365284,6365285,6365292,6365296,6382441,6382703,6384672,6386208,6386464,6515187,6516590,6579488,6579564,6582048,6627428,6627429,6627436,6646816,6647328,6647412,6648608,6648692,6907246,6943598,7102752,7106419,7217253,7238757,7282788,7282789,7302688,7303712,7303968,7364978,7435621,7495968,7497075,7544932,7544933,7544944,7562528,7628064,7630624,7693600,15953440]),new sD("fr",[2122101,2122607,2122849,2122853,2122869,2123118,2123124,2124897,2124901,2125921,2125935,2125938,2126197,2126693,2126703,2127214,2154528,6385268,6386793,6513952,6516590,6579488,6579571,6583584,6627425,6627427,6627428,6627429,6627436,6627440,6627443,6647328,6647412,6648352,6648608,6648864,6649202,6909806,6910752,6911008,7102752,7103776,7103859,7169390,7217252,7234848,7238432,7238688,7302688,7302772,7304562,7435621,7479404,7496992,7544929,7544932,7544933,7544940,7544944,7610468,7628064,7629167,7693600,7696928]),new sD("it",[2122092,2122600,2122607,2122853,2122857,2123040,2124140,2124142,2124897,2125925,2125938,2127214,6365283,6365284,6365296,6365299,6386799,6514789,6516590,6579564,6580512,6627425,6627427,6627428,6627433,6627436,6627440,6627443,6646816,6646892,6647412,6648352,6841632,6889569,6889571,6889572,6889587,6906144,6908960,6909472,6909806,7102752,7103776,7104800,7105633,7234848,7235872,7237408,7238757,7282785,7282788,7282793,7282803,7302688,7302757,7366002,7495968,7496992,7563552,7627040,7628064,7629088,7630624,8022383]),new sD("nl",[2122092,2122341,2122849,2122853,2122857,2123109,2123118,2123621,2123877,2124142,2125153,2125157,2125680,2126949,2127457,2127461,2127471,2127717,2128489,6381934,6381938,6385184,6385252,6386208,6386720,6514804,6579488,6579566,6579570,6627426,6627446,6645102,6645106,6647328,6648352,6648435,6648864,6776174,6841716,6907168,6909472,6909543,6910752,7217250,7217252,7217253,7217256,7217263,7217270,7234661,7235360,7302756,7303026,7303200,7303712,7562088,7566437,7610468,7628064,7628142,7628146,7758190,7759218,7761775]),new sD("no",[2122100,2122102,2122853,2123118,2123122,2123375,2123873,2124064,2125157,2125671,2126053,2126693,2126699,2126703,2126708,2126953,2127465,2155808,6385252,6386208,6386720,6579488,6579566,6579572,6627443,6644768,6647328,6647397,6648352,6648421,6648864,6648948,6713202,6776174,6908779,6908960,6909543,7038240,7039845,7103776,7105637,7169380,7169390,7217267,7234848,7235360,7235429,7237221,7300896,7302432,7303712,7398688,7479411,7496992,7565165,7566437,7610483,7628064,7628142,7628146,7629164,7631904,7631973,7759218]),new sD("pt",[2122016,2122607,2122849,2122853,2122863,2123040,2123123,2125153,2125423,2125600,2125921,2125935,2125938,2126197,2126437,2126693,2127213,6365281,6365283,6365284,6365296,6382693,6382703,6384672,6386208,6386273,6386464,6516589,6516590,6578464,6579488,6582048,6582131,6627425,6627428,6647072,6647412,6648608,6648692,6906144,6906721,7169390,7238757,7238767,7282785,7282787,7282788,7282789,7282800,7303968,7364978,7435621,7495968,7497075,7544929,7544932,7544933,7544944,7566433,7628064,7630624,7693600,14905120,15197039]),new sD("sv",[2122100,2122102,2122853,2123118,2123510,2123873,2124064,2124142,2124655,2125157,2125667,2126053,2126699,2126703,2126708,2126953,2127457,2127465,2155634,6382693,6385184,6385252,6386208,6386804,6514720,6579488,6579566,6579570,6579572,6644768,6647328,6648352,6648864,6747762,6776174,6909036,6909543,7037216,7105568,7169380,7217267,7233824,7234661,7235360,7235429,7235950,7299944,7302432,7302688,7398688,7479393,7479411,7495968,7564129,7565165,7610483,7627040,7628064,7628146,7629164,7631904,7758194,14971424,16151072])]}name(D){return D&&D.c1Bytes?"windows-1252":"ISO-8859-1"}}TD.ISO_8859_1=bC;class uC extends Q1{byteMap(){return[32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,0,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,32,32,32,32,32,32,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,177,32,179,32,181,182,32,32,185,186,187,188,32,190,191,32,177,32,179,32,181,182,183,32,185,186,187,188,32,190,191,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,32,248,249,250,251,252,253,254,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,32,248,249,250,251,252,253,254,32]}ngrams(){return[new sD("cs",[2122016,2122361,2122863,2124389,2125409,2125413,2125600,2125668,2125935,2125938,2126072,2126447,2126693,2126703,2126708,2126959,2127392,2127481,2128481,6365296,6513952,6514720,6627440,6627443,6627446,6647072,6647533,6844192,6844260,6910836,6972704,7042149,7103776,7104800,7233824,7268640,7269408,7269664,7282800,7300206,7301737,7304052,7304480,7304801,7368548,7368554,7369327,7403621,7562528,7565173,7566433,7566441,7566446,7628146,7630573,7630624,7676016,12477728,14773997,15296623,15540336,15540339,15559968,16278884]),new sD("hu",[2122016,2122106,2122341,2123111,2123116,2123365,2123873,2123887,2124147,2124645,2124649,2124790,2124901,2125153,2125157,2125161,2125413,2126714,2126949,2156915,6365281,6365291,6365293,6365299,6384416,6385184,6388256,6447470,6448494,6645625,6646560,6646816,6646885,6647072,6647328,6648421,6648864,6648933,6648948,6781216,6844263,6909556,6910752,7020641,7075450,7169383,7170414,7217249,7233899,7234923,7234925,7238688,7300985,7544929,7567973,7567988,7568097,7596391,7610465,7631904,7659891,8021362,14773792,15299360]),new sD("pl",[2122618,2122863,2124064,2124389,2124655,2125153,2125161,2125409,2125417,2125668,2125935,2125938,2126697,2127648,2127721,2127737,2128416,2128481,6365296,6365303,6385257,6514720,6519397,6519417,6582048,6584937,6627440,6627443,6627447,6627450,6645615,6646304,6647072,6647401,6778656,6906144,6907168,6907242,7037216,7039264,7039333,7170405,7233824,7235937,7235941,7282800,7305057,7305065,7368556,7369313,7369327,7369338,7502437,7502457,7563754,7564137,7566433,7825765,7955304,7957792,8021280,8022373,8026400,15955744]),new sD("ro",[2122016,2122083,2122593,2122597,2122607,2122613,2122853,2122857,2124897,2125153,2125925,2125938,2126693,2126819,2127214,2144873,2158190,6365283,6365284,6386277,6386720,6386789,6386976,6513010,6516590,6518048,6546208,6579488,6627425,6627427,6627428,6627440,6627443,6644000,6646048,6646885,6647412,6648692,6889569,6889571,6889572,6889584,6907168,6908192,6909472,7102752,7103776,7106418,7107945,7234848,7238770,7303712,7365998,7496992,7497057,7501088,7594784,7628064,7631477,7660320,7694624,7695392,12216608,15625760])]}name(D){return D&&D.c1Bytes?"windows-1250":"ISO-8859-2"}}TD.ISO_8859_2=uC;class mC extends Q1{byteMap(){return[32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,0,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,32,32,32,32,32,32,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,241,242,243,244,245,246,247,248,249,250,251,252,32,254,255,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,32,241,242,243,244,245,246,247,248,249,250,251,252,32,254,255]}ngrams(){return[2150944,2151134,2151646,2152400,2152480,2153168,2153182,2153936,2153941,2154193,2154462,2154464,2154704,2154974,2154978,2155230,2156514,2158050,13688280,13689580,13884960,14015468,14015960,14016994,14017056,14164191,14210336,14211104,14216992,14407133,14407712,14413021,14536736,14538016,14538965,14538991,14540320,14540498,14557394,14557407,14557409,14602784,14602960,14603230,14604576,14605292,14605344,14606818,14671579,14672085,14672088,14672094,14733522,14734804,14803664,14803666,14803672,14806816,14865883,14868000,14868192,14871584,15196894,15459616]}name(){return"ISO-8859-5"}language(){return"ru"}}TD.ISO_8859_5=mC;class lC extends Q1{byteMap(){return[32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,0,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,32,32,32,32,32,32,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,32,32,32,32,32,224,225,226,227,228,229,230,231,232,233,234,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32]}ngrams(){return[2148324,2148326,2148551,2152932,2154986,2155748,2156006,2156743,13050055,13091104,13093408,13095200,13100064,13100227,13100231,13100232,13100234,13100236,13100237,13100239,13100243,13100249,13100258,13100261,13100264,13100266,13100320,13100576,13100746,13115591,13181127,13181153,13181156,13181157,13181160,13246663,13574343,13617440,13705415,13748512,13836487,14229703,14279913,14805536,14950599,14993696,15001888,15002144,15016135,15058720,15059232,15066656,15081671,15147207,15189792,15255524,15263264,15278279,15343815,15343845,15343848,15386912,15388960,15394336]}name(){return"ISO-8859-6"}language(){return"ar"}}TD.ISO_8859_6=lC;class dC extends Q1{byteMap(){return[32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,0,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,32,32,32,32,32,32,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,161,162,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,220,32,221,222,223,32,252,32,253,254,192,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,32,243,244,245,246,247,248,249,250,251,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,32]}ngrams(){return[2154989,2154992,2155497,2155753,2156016,2156320,2157281,2157797,2158049,2158368,2158817,2158831,2158833,2159604,2159605,2159847,2159855,14672160,14754017,14754036,14805280,14806304,14807292,14807584,14936545,15067424,15069728,15147252,15199520,15200800,15278324,15327520,15330014,15331872,15393257,15393268,15525152,15540449,15540453,15540464,15589664,15725088,15725856,15790069,15790575,15793184,15868129,15868133,15868138,15868144,15868148,15983904,15984416,15987951,16048416,16048617,16050157,16050162,16050666,16052000,16052213,16054765,16379168,16706848]}name(D){return D&&D.c1Bytes?"windows-1253":"ISO-8859-7"}language(){return"el"}}TD.ISO_8859_7=dC;class pC extends Q1{byteMap(){return[32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,0,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,32,32,32,32,32,32,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,181,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,32,32,32,32,32]}ngrams(){return[new sD("he",[2154725,2154727,2154729,2154746,2154985,2154990,2155744,2155749,2155753,2155758,2155762,2155769,2155770,2157792,2157796,2158304,2159340,2161132,14744096,14950624,14950625,14950628,14950636,14950638,14950649,15001056,15065120,15068448,15068960,15071264,15071776,15278308,15328288,15328762,15329773,15330592,15331104,15333408,15333920,15474912,15474916,15523872,15524896,15540448,15540449,15540452,15540460,15540462,15540473,15655968,15671524,15787040,15788320,15788525,15920160,16261348,16312813,16378912,16392416,16392417,16392420,16392428,16392430,16392441]),new sD("he",[2154725,2154732,2155753,2155756,2155758,2155760,2157040,2157810,2157817,2158053,2158057,2158565,2158569,2160869,2160873,2161376,2161381,2161385,14688484,14688492,14688493,14688506,14738464,14738916,14740512,14741024,14754020,14754029,14754042,14950628,14950633,14950636,14950637,14950639,14950648,14950650,15002656,15065120,15066144,15196192,15327264,15327520,15328288,15474916,15474925,15474938,15528480,15530272,15591913,15591920,15591928,15605988,15605997,15606010,15655200,15655968,15918112,16326884,16326893,16326906,16376864,16441376,16442400,16442857])]}name(D){return D&&D.c1Bytes?"windows-1255":"ISO-8859-8"}language(){return"he"}}TD.ISO_8859_8=pC;class cC extends Q1{byteMap(){return[32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,0,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,32,32,32,32,32,32,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,170,32,32,32,32,32,32,32,32,32,32,181,32,32,32,32,186,32,32,32,32,32,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,32,248,249,250,251,252,105,254,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,32,248,249,250,251,252,253,254,255]}ngrams(){return[2122337,2122345,2122357,2122849,2122853,2123621,2123873,2124140,2124641,2124655,2125153,2125676,2126689,2126945,2127461,2128225,6365282,6384416,6384737,6384993,6385184,6385405,6386208,6386273,6386429,6386685,6388065,6449522,6578464,6579488,6580512,6627426,6627435,6644841,6647328,6648352,6648425,6648681,6909029,6909472,6909545,6910496,7102830,7102834,7103776,7103858,7217249,7217250,7217259,7234657,7234661,7234848,7235872,7235950,7273760,7498094,7535982,7759136,7954720,7958386,16608800,16608868,16609021,16642301]}name(D){return D&&D.c1Bytes?"windows-1254":"ISO-8859-9"}language(){return"tr"}}TD.ISO_8859_9=cC;class nC extends Q1{byteMap(){return[32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,0,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,32,32,32,32,32,32,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,32,32,32,32,32,144,131,32,131,32,32,32,32,32,32,154,32,156,157,158,159,144,32,32,32,32,32,32,32,32,32,154,32,156,157,158,159,32,162,162,188,32,180,32,32,184,32,186,32,32,32,32,191,32,32,179,179,180,181,32,32,184,32,186,32,188,190,190,191,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255]}ngrams(){return[2155040,2155246,2155758,2156512,2156576,2157280,2157294,2158048,2158053,2158305,2158574,2158576,2158816,2159086,2159090,2159342,2160626,2162162,14740968,14742268,14937632,15068156,15068648,15069682,15069728,15212783,15263008,15263776,15269664,15459821,15460384,15465709,15589408,15590688,15591653,15591679,15592992,15593186,15605986,15605999,15606001,15655456,15655648,15655918,15657248,15657980,15658016,15659506,15724267,15724773,15724776,15724782,15786210,15787492,15856352,15856354,15856360,15859488,15918571,15920672,15920880,15924256,16249582,16512288]}name(){return"windows-1251"}language(){return"ru"}}TD.windows_1251=nC;class iC extends Q1{byteMap(){return[32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,0,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,32,32,32,32,32,32,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,32,32,32,32,32,32,129,32,131,32,32,32,32,136,32,138,32,156,141,142,143,144,32,32,32,32,32,32,32,152,32,154,32,156,32,32,159,32,32,32,32,32,32,32,32,32,32,170,32,32,32,32,32,32,32,32,32,32,181,32,32,32,32,32,32,32,32,32,32,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,32,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,32,32,32,32,244,32,32,32,32,249,32,251,252,32,32,255]}ngrams(){return[2148321,2148324,2148551,2153185,2153965,2154977,2155492,2156231,13050055,13091104,13093408,13095200,13099296,13099459,13099463,13099464,13099466,13099468,13099469,13099471,13099475,13099482,13099486,13099491,13099494,13099501,13099808,13100064,13100234,13115591,13181127,13181149,13181153,13181155,13181158,13246663,13574343,13617440,13705415,13748512,13836487,14295239,14344684,14544160,14753991,14797088,14806048,14806304,14885063,14927648,14928160,14935072,14950599,15016135,15058720,15124449,15131680,15474887,15540423,15540451,15540454,15583520,15585568,15590432]}name(){return"windows-1256"}language(){return"ar"}}TD.windows_1256=iC;class aC extends Q1{byteMap(){return[32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,0,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,32,32,32,32,32,32,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,163,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,163,32,32,32,32,32,32,32,32,32,32,32,32,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223]}ngrams(){return[2147535,2148640,2149313,2149327,2150081,2150085,2150338,2150607,2150610,2151105,2151375,2151380,2151631,2152224,2152399,2153153,2153684,2154196,12701385,12702936,12963032,12963529,12964820,12964896,13094688,13181136,13223200,13224224,13226272,13419982,13420832,13424846,13549856,13550880,13552069,13552081,13553440,13553623,13574352,13574355,13574359,13617103,13617696,13618392,13618464,13620180,13621024,13621185,13684684,13685445,13685449,13685455,13812183,13813188,13881632,13882561,13882569,13882583,13944268,13946656,13946834,13948960,14272544,14603471]}name(){return"KOI8-R"}language(){return"ru"}}TD.KOI8_R=aC});var eC=q((_1)=>{var z1D=_1&&_1.__importDefault||function(D){return D&&D.__esModule?D:{default:D}};Object.defineProperty(_1,"__esModule",{value:!0});_1.ISO_2022_CN=_1.ISO_2022_KR=_1.ISO_2022_JP=void 0;var V1D=z1D(I6());class n9{constructor(){this.escapeSequences=[]}name(){return"ISO_2022"}match(D){let F,$,B,J=0,Q=0,X=0,Y,G=D.inputBytes,H=D.inputLen;D:for(F=0;F<H;F++){if(G[F]==27){F:for(B=0;B<this.escapeSequences.length;B++){let E=this.escapeSequences[B];if(H-F<E.length)continue F;for($=1;$<E.length;$++)if(E[$]!=G[F+$])continue F;J++,F+=E.length-1;continue D}Q++}if(G[F]==14||G[F]==15)X++}if(J==0)return null;if(Y=(100*J-100*Q)/(J+Q),J+X<5)Y-=(5-(J+X))*10;return Y<=0?null:(0,V1D.default)(D,this,Y)}}class sC extends n9{constructor(){super(...arguments);this.escapeSequences=[[27,36,40,67],[27,36,40,68],[27,36,64],[27,36,65],[27,36,66],[27,38,64],[27,40,66],[27,40,72],[27,40,73],[27,40,74],[27,46,65],[27,46,70]]}name(){return"ISO-2022-JP"}language(){return"ja"}}_1.ISO_2022_JP=sC;class rC extends n9{constructor(){super(...arguments);this.escapeSequences=[[27,36,41,67]]}name(){return"ISO-2022-KR"}language(){return"kr"}}_1.ISO_2022_KR=rC;class tC extends n9{constructor(){super(...arguments);this.escapeSequences=[[27,36,41,65],[27,36,41,71],[27,36,42,72],[27,36,41,69],[27,36,43,73],[27,36,43,74],[27,36,43,75],[27,36,43,76],[27,36,43,77],[27,78],[27,79]]}name(){return"ISO-2022-CN"}language(){return"zh"}}_1.ISO_2022_CN=tC});var $R=q((DR)=>{Object.defineProperty(DR,"__esModule",{value:!0});DR.isByteArray=void 0;var A1D=(D)=>{if(D==null||typeof D!="object")return!1;return isFinite(D.length)&&D.length>=0};DR.isByteArray=A1D});var JR=q((AD)=>{var Z1D=AD&&AD.__createBinding||(Object.create?function(D,F,$,B){if(B===void 0)B=$;var J=Object.getOwnPropertyDescriptor(F,$);if(!J||("get"in J?!F.__esModule:J.writable||J.configurable))J={enumerable:!0,get:function(){return F[$]}};Object.defineProperty(D,B,J)}:function(D,F,$,B){if(B===void 0)B=$;D[B]=F[$]}),U1D=AD&&AD.__setModuleDefault||(Object.create?function(D,F){Object.defineProperty(D,"default",{enumerable:!0,value:F})}:function(D,F){D.default=F}),a9=AD&&AD.__importStar||function(){var D=function(F){return D=Object.getOwnPropertyNames||function($){var B=[];for(var J in $)if(Object.prototype.hasOwnProperty.call($,J))B[B.length]=J;return B},D(F)};return function(F){if(F&&F.__esModule)return F;var $={};if(F!=null){for(var B=D(F),J=0;J<B.length;J++)if(B[J]!=="default")Z1D($,F,B[J])}return U1D($,F),$}}(),kQ=AD&&AD.__importDefault||function(D){return D&&D.__esModule?D:{default:D}};Object.defineProperty(AD,"__esModule",{value:!0});AD.detectFileSync=AD.detectFile=AD.analyse=AD.detect=void 0;var BR=kQ(UC()),L1D=kQ(CC()),M1D=kQ(wC()),i9=a9(PC()),L3=a9(gC()),f1=a9(oC()),SQ=a9(eC()),N1D=$R(),C1D=[new M1D.default,new i9.UTF_16BE,new i9.UTF_16LE,new i9.UTF_32BE,new i9.UTF_32LE,new L3.sjis,new L3.big5,new L3.euc_jp,new L3.euc_kr,new L3.gb_18030,new SQ.ISO_2022_JP,new SQ.ISO_2022_KR,new SQ.ISO_2022_CN,new f1.ISO_8859_1,new f1.ISO_8859_2,new f1.ISO_8859_5,new f1.ISO_8859_6,new f1.ISO_8859_7,new f1.ISO_8859_8,new f1.ISO_8859_9,new f1.windows_1251,new f1.windows_1256,new f1.KOI8_R,new L1D.default],R1D=(D)=>{let F=(0,AD.analyse)(D);return F.length>0?F[0].name:null};AD.detect=R1D;var w1D=(D)=>{if(!(0,N1D.isByteArray)(D))throw Error("Input must be a byte array, e.g. Buffer or Uint8Array");let F=[];for(let Q=0;Q<256;Q++)F[Q]=0;for(let Q=D.length-1;Q>=0;Q--)F[D[Q]&255]++;let $=!1;for(let Q=128;Q<=159;Q+=1)if(F[Q]!==0){$=!0;break}let B={byteStats:F,c1Bytes:$,rawInput:D,rawLen:D.length,inputBytes:D,inputLen:D.length};return C1D.map((Q)=>{return Q.match(B)}).filter((Q)=>{return!!Q}).sort((Q,X)=>{return X.confidence-Q.confidence})};AD.analyse=w1D;var T1D=(D,F={})=>new Promise(($,B)=>{let J,Q=(0,BR.default)(),X=(G,H)=>{if(J)Q.closeSync(J);if(G)B(G);else if(H)$((0,AD.detect)(H));else B(Error("No error and no buffer received"))},Y=(F===null||F===void 0?void 0:F.sampleSize)||0;if(Y>0){J=Q.openSync(D,"r");let G=Buffer.allocUnsafe(Y);Q.read(J,G,0,Y,F.offset,(H,E)=>{if(H)X(H,null);else{if(E<Y)G=G.subarray(0,E);X(null,G)}});return}Q.readFile(D,X)});AD.detectFile=T1D;var j1D=(D,F={})=>{let $=(0,BR.default)();if(F&&F.sampleSize){let B=$.openSync(D,"r"),J=Buffer.allocUnsafe(F.sampleSize),Q=$.readSync(B,J,0,F.sampleSize,F.offset);if(Q<F.sampleSize)J=J.subarray(0,Q);return $.closeSync(B),(0,AD.detect)(J)}return(0,AD.detect)($.readFileSync(D))};AD.detectFileSync=j1D;AD.default={analyse:AD.analyse,detect:AD.detect,detectFileSync:AD.detectFileSync,detectFile:AD.detectFile}});var J8=q((cVD,QR)=>{var o9=XD("buffer"),p4=o9.Buffer,p0={},c0;for(c0 in o9){if(!o9.hasOwnProperty(c0))continue;if(c0==="SlowBuffer"||c0==="Buffer")continue;p0[c0]=o9[c0]}var c4=p0.Buffer={};for(c0 in p4){if(!p4.hasOwnProperty(c0))continue;if(c0==="allocUnsafe"||c0==="allocUnsafeSlow")continue;c4[c0]=p4[c0]}p0.Buffer.prototype=p4.prototype;if(!c4.from||c4.from===Uint8Array.from)c4.from=function(D,F,$){if(typeof D==="number")throw TypeError('The "value" argument must not be of type number. Received type '+typeof D);if(D&&typeof D.length>"u")throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof D);return p4(D,F,$)};if(!c4.alloc)c4.alloc=function(D,F,$){if(typeof D!=="number")throw TypeError('The "size" argument must be of type number. Received type '+typeof D);if(D<0||D>=2147483648)throw RangeError('The value "'+D+'" is invalid for option "size"');var B=p4(D);if(!F||F.length===0)B.fill(0);else if(typeof $==="string")B.fill(F,$);else B.fill(F);return B};if(!p0.kStringMaxLength)try{p0.kStringMaxLength=process.binding("buffer").kStringMaxLength}catch(D){}if(!p0.constants){if(p0.constants={MAX_LENGTH:p0.kMaxLength},p0.kStringMaxLength)p0.constants.MAX_STRING_LENGTH=p0.kStringMaxLength}QR.exports=p0});var YR=q((O1D)=>{var XR="\uFEFF";O1D.PrependBOM=vQ;function vQ(D,F){this.encoder=D,this.addBOM=!0}vQ.prototype.write=function(D){if(this.addBOM)D=XR+D,this.addBOM=!1;return this.encoder.write(D)};vQ.prototype.end=function(){return this.encoder.end()};O1D.StripBOM=yQ;function yQ(D,F){this.decoder=D,this.pass=!1,this.options=F||{}}yQ.prototype.write=function(D){var F=this.decoder.write(D);if(this.pass||!F)return F;if(F[0]===XR){if(F=F.slice(1),typeof this.options.stripBOM==="function")this.options.stripBOM()}return this.pass=!0,F};yQ.prototype.end=function(){return this.decoder.end()}});var xQ=q((iVD,GR)=>{var S1D=typeof Object.hasOwn>"u"?Function.call.bind(Object.prototype.hasOwnProperty):Object.hasOwn;function k1D(D,F){for(var $ in F)if(S1D(F,$))D[$]=F[$]}GR.exports=k1D});var WR=q((aVD,HR)=>{var Q8=J8().Buffer;HR.exports={utf8:{type:"_internal",bomAware:!0},cesu8:{type:"_internal",bomAware:!0},unicode11utf8:"utf8",ucs2:{type:"_internal",bomAware:!0},utf16le:"ucs2",binary:{type:"_internal"},base64:{type:"_internal"},hex:{type:"_internal"},_internal:_Q};function _Q(D,F){if(this.enc=D.encodingName,this.bomAware=D.bomAware,this.enc==="base64")this.encoder=hQ;else if(this.enc==="utf8")this.encoder=mQ;else if(this.enc==="cesu8"){if(this.enc="utf8",this.encoder=bQ,Q8.from("eda0bdedb2a9","hex").toString()!=="\uD83D\uDCA9")this.decoder=uQ,this.defaultCharUnicode=F.defaultCharUnicode}}_Q.prototype.encoder=gQ;_Q.prototype.decoder=fQ;var v1D=XD("string_decoder").StringDecoder;function fQ(D,F){this.decoder=new v1D(F.enc)}fQ.prototype.write=function(D){if(!Q8.isBuffer(D))D=Q8.from(D);return this.decoder.write(D)};fQ.prototype.end=function(){return this.decoder.end()};function gQ(D,F){this.enc=F.enc}gQ.prototype.write=function(D){return Q8.from(D,this.enc)};gQ.prototype.end=function(){};function hQ(D,F){this.prevStr=""}hQ.prototype.write=function(D){D=this.prevStr+D;var F=D.length-D.length%4;return this.prevStr=D.slice(F),D=D.slice(0,F),Q8.from(D,"base64")};hQ.prototype.end=function(){return Q8.from(this.prevStr,"base64")};function bQ(D,F){}bQ.prototype.write=function(D){var F=Q8.alloc(D.length*3),$=0;for(var B=0;B<D.length;B++){var J=D.charCodeAt(B);if(J<128)F[$++]=J;else if(J<2048)F[$++]=192+(J>>>6),F[$++]=128+(J&63);else F[$++]=224+(J>>>12),F[$++]=128+(J>>>6&63),F[$++]=128+(J&63)}return F.slice(0,$)};bQ.prototype.end=function(){};function uQ(D,F){this.acc=0,this.contBytes=0,this.accBytes=0,this.defaultCharUnicode=F.defaultCharUnicode}uQ.prototype.write=function(D){var F=this.acc,$=this.contBytes,B=this.accBytes,J="";for(var Q=0;Q<D.length;Q++){var X=D[Q];if((X&192)!==128){if($>0)J+=this.defaultCharUnicode,$=0;if(X<128)J+=String.fromCharCode(X);else if(X<224)F=X&31,$=1,B=1;else if(X<240)F=X&15,$=2,B=1;else J+=this.defaultCharUnicode}else if($>0){if(F=F<<6|X&63,$--,B++,$===0)if(B===2&&F<128&&F>0)J+=this.defaultCharUnicode;else if(B===3&&F<2048)J+=this.defaultCharUnicode;else J+=String.fromCharCode(F)}else J+=this.defaultCharUnicode}return this.acc=F,this.contBytes=$,this.accBytes=B,J};uQ.prototype.end=function(){var D=0;if(this.contBytes>0)D+=this.defaultCharUnicode;return D};function mQ(D,F){this.highSurrogate=""}mQ.prototype.write=function(D){if(this.highSurrogate)D=this.highSurrogate+D,this.highSurrogate="";if(D.length>0){var F=D.charCodeAt(D.length-1);if(F>=55296&&F<56320)this.highSurrogate=D[D.length-1],D=D.slice(0,D.length-1)}return Q8.from(D,this.enc)};mQ.prototype.end=function(){if(this.highSurrogate){var D=this.highSurrogate;return this.highSurrogate="",Q8.from(D,this.enc)}}});var KR=q((y1D)=>{var s9=J8().Buffer;y1D._utf32=lQ;function lQ(D,F){this.iconv=F,this.bomAware=!0,this.isLE=D.isLE}y1D.utf32le={type:"_utf32",isLE:!0};y1D.utf32be={type:"_utf32",isLE:!1};y1D.ucs4le="utf32le";y1D.ucs4be="utf32be";lQ.prototype.encoder=dQ;lQ.prototype.decoder=pQ;function dQ(D,F){this.isLE=F.isLE,this.highSurrogate=0}dQ.prototype.write=function(D){var F=s9.from(D,"ucs2"),$=s9.alloc(F.length*2),B=this.isLE?$.writeUInt32LE:$.writeUInt32BE,J=0;for(var Q=0;Q<F.length;Q+=2){var X=F.readUInt16LE(Q),Y=X>=55296&&X<56320,G=X>=56320&&X<57344;if(this.highSurrogate)if(Y||!G)B.call($,this.highSurrogate,J),J+=4;else{var H=(this.highSurrogate-55296<<10|X-56320)+65536;B.call($,H,J),J+=4,this.highSurrogate=0;continue}if(Y)this.highSurrogate=X;else B.call($,X,J),J+=4,this.highSurrogate=0}if(J<$.length)$=$.slice(0,J);return $};dQ.prototype.end=function(){if(!this.highSurrogate)return;var D=s9.alloc(4);if(this.isLE)D.writeUInt32LE(this.highSurrogate,0);else D.writeUInt32BE(this.highSurrogate,0);return this.highSurrogate=0,D};function pQ(D,F){this.isLE=F.isLE,this.badChar=F.iconv.defaultCharUnicode.charCodeAt(0),this.overflow=[]}pQ.prototype.write=function(D){if(D.length===0)return"";var F=0,$=0,B=s9.alloc(D.length+4),J=0,Q=this.isLE,X=this.overflow,Y=this.badChar;if(X.length>0){for(;F<D.length&&X.length<4;F++)X.push(D[F]);if(X.length===4){if(Q)$=X[F]|X[F+1]<<8|X[F+2]<<16|X[F+3]<<24;else $=X[F+3]|X[F+2]<<8|X[F+1]<<16|X[F]<<24;X.length=0,J=ER(B,J,$,Y)}}for(;F<D.length-3;F+=4){if(Q)$=D[F]|D[F+1]<<8|D[F+2]<<16|D[F+3]<<24;else $=D[F+3]|D[F+2]<<8|D[F+1]<<16|D[F]<<24;J=ER(B,J,$,Y)}for(;F<D.length;F++)X.push(D[F]);return B.slice(0,J).toString("ucs2")};function ER(D,F,$,B){if($<0||$>1114111)$=B;if($>=65536){$-=65536;var J=55296|$>>10;D[F++]=J&255,D[F++]=J>>8;var $=56320|$&1023}return D[F++]=$&255,D[F++]=$>>8,F}pQ.prototype.end=function(){this.overflow.length=0};y1D.utf32=cQ;y1D.ucs4="utf32";function cQ(D,F){this.iconv=F}cQ.prototype.encoder=nQ;cQ.prototype.decoder=iQ;function nQ(D,F){if(D=D||{},D.addBOM===void 0)D.addBOM=!0;this.encoder=F.iconv.getEncoder(D.defaultEncoding||"utf-32le",D)}nQ.prototype.write=function(D){return this.encoder.write(D)};nQ.prototype.end=function(){return this.encoder.end()};function iQ(D,F){this.decoder=null,this.initialBufs=[],this.initialBufsLen=0,this.options=D||{},this.iconv=F.iconv}iQ.prototype.write=function(D){if(!this.decoder){if(this.initialBufs.push(D),this.initialBufsLen+=D.length,this.initialBufsLen<32)return"";var F=qR(this.initialBufs,this.options.defaultEncoding);this.decoder=this.iconv.getDecoder(F,this.options);var $="";for(var B=0;B<this.initialBufs.length;B++)$+=this.decoder.write(this.initialBufs[B]);return this.initialBufs.length=this.initialBufsLen=0,$}return this.decoder.write(D)};iQ.prototype.end=function(){if(!this.decoder){var D=qR(this.initialBufs,this.options.defaultEncoding);this.decoder=this.iconv.getDecoder(D,this.options);var F="";for(var $=0;$<this.initialBufs.length;$++)F+=this.decoder.write(this.initialBufs[$]);var B=this.decoder.end();if(B)F+=B;return this.initialBufs.length=this.initialBufsLen=0,F}return this.decoder.end()};function qR(D,F){var $=[],B=0,J=0,Q=0,X=0,Y=0;D:for(var G=0;G<D.length;G++){var H=D[G];for(var E=0;E<H.length;E++)if($.push(H[E]),$.length===4){if(B===0){if($[0]===255&&$[1]===254&&$[2]===0&&$[3]===0)return"utf-32le";if($[0]===0&&$[1]===0&&$[2]===254&&$[3]===255)return"utf-32be"}if($[0]!==0||$[1]>16)Q++;if($[3]!==0||$[2]>16)J++;if($[0]===0&&$[1]===0&&($[2]!==0||$[3]!==0))Y++;if(($[0]!==0||$[1]!==0)&&$[2]===0&&$[3]===0)X++;if($.length=0,B++,B>=100)break D}}if(Y-Q>X-J)return"utf-32be";if(Y-Q<X-J)return"utf-32le";return F||"utf-32le"}});var AR=q((m1D)=>{var zR=J8().Buffer;m1D.utf16be=r9;function r9(){}r9.prototype.encoder=aQ;r9.prototype.decoder=oQ;r9.prototype.bomAware=!0;function aQ(){}aQ.prototype.write=function(D){var F=zR.from(D,"ucs2");for(var $=0;$<F.length;$+=2){var B=F[$];F[$]=F[$+1],F[$+1]=B}return F};aQ.prototype.end=function(){};function oQ(){this.overflowByte=-1}oQ.prototype.write=function(D){if(D.length==0)return"";var F=zR.alloc(D.length+1),$=0,B=0;if(this.overflowByte!==-1)F[0]=D[0],F[1]=this.overflowByte,$=1,B=2;for(;$<D.length-1;$+=2,B+=2)F[B]=D[$+1],F[B+1]=D[$];return this.overflowByte=$==D.length-1?D[D.length-1]:-1,F.slice(0,B).toString("ucs2")};oQ.prototype.end=function(){this.overflowByte=-1};m1D.utf16=sQ;function sQ(D,F){this.iconv=F}sQ.prototype.encoder=rQ;sQ.prototype.decoder=tQ;function rQ(D,F){if(D=D||{},D.addBOM===void 0)D.addBOM=!0;this.encoder=F.iconv.getEncoder("utf-16le",D)}rQ.prototype.write=function(D){return this.encoder.write(D)};rQ.prototype.end=function(){return this.encoder.end()};function tQ(D,F){this.decoder=null,this.initialBufs=[],this.initialBufsLen=0,this.options=D||{},this.iconv=F.iconv}tQ.prototype.write=function(D){if(!this.decoder){if(this.initialBufs.push(D),this.initialBufsLen+=D.length,this.initialBufsLen<16)return"";var F=VR(this.initialBufs,this.options.defaultEncoding);this.decoder=this.iconv.getDecoder(F,this.options);var $="";for(var B=0;B<this.initialBufs.length;B++)$+=this.decoder.write(this.initialBufs[B]);return this.initialBufs.length=this.initialBufsLen=0,$}return this.decoder.write(D)};tQ.prototype.end=function(){if(!this.decoder){var D=VR(this.initialBufs,this.options.defaultEncoding);this.decoder=this.iconv.getDecoder(D,this.options);var F="";for(var $=0;$<this.initialBufs.length;$++)F+=this.decoder.write(this.initialBufs[$]);var B=this.decoder.end();if(B)F+=B;return this.initialBufs.length=this.initialBufsLen=0,F}return this.decoder.end()};function VR(D,F){var $=[],B=0,J=0,Q=0;D:for(var X=0;X<D.length;X++){var Y=D[X];for(var G=0;G<Y.length;G++)if($.push(Y[G]),$.length===2){if(B===0){if($[0]===255&&$[1]===254)return"utf-16le";if($[0]===254&&$[1]===255)return"utf-16be"}if($[0]===0&&$[1]!==0)Q++;if($[0]!==0&&$[1]===0)J++;if($.length=0,B++,B>=100)break D}}if(Q>J)return"utf-16be";if(Q<J)return"utf-16le";return F||"utf-16le"}});var UR=q((i1D)=>{var g1=J8().Buffer;i1D.utf7=t9;i1D.unicode11utf7="utf7";function t9(D,F){this.iconv=F}t9.prototype.encoder=DX;t9.prototype.decoder=FX;t9.prototype.bomAware=!0;var p1D=/[^A-Za-z0-9'\(\),-\.\/:\? \n\r\t]+/g;function DX(D,F){this.iconv=F.iconv}DX.prototype.write=function(D){return g1.from(D.replace(p1D,function(F){return"+"+(F==="+"?"":this.iconv.encode(F,"utf16-be").toString("base64").replace(/=+$/,""))+"-"}.bind(this)))};DX.prototype.end=function(){};function FX(D,F){this.iconv=F.iconv,this.inBase64=!1,this.base64Accum=""}var c1D=/[A-Za-z0-9\/+]/,$X=[];for(n4=0;n4<256;n4++)$X[n4]=c1D.test(String.fromCharCode(n4));var n4,n1D=43,P6=45,eQ=38;FX.prototype.write=function(D){var F="",$=0,B=this.inBase64,J=this.base64Accum;for(var Q=0;Q<D.length;Q++)if(!B){if(D[Q]==n1D)F+=this.iconv.decode(D.slice($,Q),"ascii"),$=Q+1,B=!0}else if(!$X[D[Q]]){if(Q==$&&D[Q]==P6)F+="+";else{var X=J+this.iconv.decode(D.slice($,Q),"ascii");F+=this.iconv.decode(g1.from(X,"base64"),"utf16-be")}if(D[Q]!=P6)Q--;$=Q+1,B=!1,J=""}if(!B)F+=this.iconv.decode(D.slice($),"ascii");else{var X=J+this.iconv.decode(D.slice($),"ascii"),Y=X.length-X.length%8;J=X.slice(Y),X=X.slice(0,Y),F+=this.iconv.decode(g1.from(X,"base64"),"utf16-be")}return this.inBase64=B,this.base64Accum=J,F};FX.prototype.end=function(){var D="";if(this.inBase64&&this.base64Accum.length>0)D=this.iconv.decode(g1.from(this.base64Accum,"base64"),"utf16-be");return this.inBase64=!1,this.base64Accum="",D};i1D.utf7imap=e9;function e9(D,F){this.iconv=F}e9.prototype.encoder=BX;e9.prototype.decoder=JX;e9.prototype.bomAware=!0;function BX(D,F){this.iconv=F.iconv,this.inBase64=!1,this.base64Accum=g1.alloc(6),this.base64AccumIdx=0}BX.prototype.write=function(D){var F=this.inBase64,$=this.base64Accum,B=this.base64AccumIdx,J=g1.alloc(D.length*5+10),Q=0;for(var X=0;X<D.length;X++){var Y=D.charCodeAt(X);if(Y>=32&&Y<=126){if(F){if(B>0)Q+=J.write($.slice(0,B).toString("base64").replace(/\//g,",").replace(/=+$/,""),Q),B=0;J[Q++]=P6,F=!1}if(!F){if(J[Q++]=Y,Y===eQ)J[Q++]=P6}}else{if(!F)J[Q++]=eQ,F=!0;if(F){if($[B++]=Y>>8,$[B++]=Y&255,B==$.length)Q+=J.write($.toString("base64").replace(/\//g,","),Q),B=0}}}return this.inBase64=F,this.base64AccumIdx=B,J.slice(0,Q)};BX.prototype.end=function(){var D=g1.alloc(10),F=0;if(this.inBase64){if(this.base64AccumIdx>0)F+=D.write(this.base64Accum.slice(0,this.base64AccumIdx).toString("base64").replace(/\//g,",").replace(/=+$/,""),F),this.base64AccumIdx=0;D[F++]=P6,this.inBase64=!1}return D.slice(0,F)};function JX(D,F){this.iconv=F.iconv,this.inBase64=!1,this.base64Accum=""}var ZR=$X.slice();ZR[44]=!0;JX.prototype.write=function(D){var F="",$=0,B=this.inBase64,J=this.base64Accum;for(var Q=0;Q<D.length;Q++)if(!B){if(D[Q]==eQ)F+=this.iconv.decode(D.slice($,Q),"ascii"),$=Q+1,B=!0}else if(!ZR[D[Q]]){if(Q==$&&D[Q]==P6)F+="&";else{var X=J+this.iconv.decode(D.slice($,Q),"ascii").replace(/,/g,"/");F+=this.iconv.decode(g1.from(X,"base64"),"utf16-be")}if(D[Q]!=P6)Q--;$=Q+1,B=!1,J=""}if(!B)F+=this.iconv.decode(D.slice($),"ascii");else{var X=J+this.iconv.decode(D.slice($),"ascii").replace(/,/g,"/"),Y=X.length-X.length%8;J=X.slice(Y),X=X.slice(0,Y),F+=this.iconv.decode(g1.from(X,"base64"),"utf16-be")}return this.inBase64=B,this.base64Accum=J,F};JX.prototype.end=function(){var D="";if(this.inBase64&&this.base64Accum.length>0)D=this.iconv.decode(g1.from(this.base64Accum,"base64"),"utf16-be");return this.inBase64=!1,this.base64Accum="",D}});var LR=q((r1D)=>{var D7=J8().Buffer;r1D._sbcs=QX;function QX(D,F){if(!D)throw Error("SBCS codec is called without the data.");if(!D.chars||D.chars.length!==128&&D.chars.length!==256)throw Error("Encoding '"+D.type+"' has incorrect 'chars' (must be of len 128 or 256)");if(D.chars.length===128){var $="";for(var B=0;B<128;B++)$+=String.fromCharCode(B);D.chars=$+D.chars}this.decodeBuf=D7.from(D.chars,"ucs2");var J=D7.alloc(65536,F.defaultCharSingleByte.charCodeAt(0));for(var B=0;B<D.chars.length;B++)J[D.chars.charCodeAt(B)]=B;this.encodeBuf=J}QX.prototype.encoder=XX;QX.prototype.decoder=YX;function XX(D,F){this.encodeBuf=F.encodeBuf}XX.prototype.write=function(D){var F=D7.alloc(D.length);for(var $=0;$<D.length;$++)F[$]=this.encodeBuf[D.charCodeAt($)];return F};XX.prototype.end=function(){};function YX(D,F){this.decodeBuf=F.decodeBuf}YX.prototype.write=function(D){var F=this.decodeBuf,$=D7.alloc(D.length*2),B=0,J=0;for(var Q=0;Q<D.length;Q++)B=D[Q]*2,J=Q*2,$[J]=F[B],$[J+1]=F[B+1];return $.toString("ucs2")};YX.prototype.end=function(){}});var NR=q((eVD,MR)=>{MR.exports={10029:"maccenteuro",maccenteuro:{type:"_sbcs",chars:"\xC4\u0100\u0101\xC9\u0104\xD6\xDC\xE1\u0105\u010C\xE4\u010D\u0106\u0107\xE9\u0179\u017A\u010E\xED\u010F\u0112\u0113\u0116\xF3\u0117\xF4\xF6\xF5\xFA\u011A\u011B\xFC\u2020\xB0\u0118\xA3\xA7\u2022\xB6\xDF\xAE\xA9\u2122\u0119\xA8\u2260\u0123\u012E\u012F\u012A\u2264\u2265\u012B\u0136\u2202\u2211\u0142\u013B\u013C\u013D\u013E\u0139\u013A\u0145\u0146\u0143\xAC\u221A\u0144\u0147\u2206\xAB\xBB\u2026\xA0\u0148\u0150\xD5\u0151\u014C\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u25CA\u014D\u0154\u0155\u0158\u2039\u203A\u0159\u0156\u0157\u0160\u201A\u201E\u0161\u015A\u015B\xC1\u0164\u0165\xCD\u017D\u017E\u016A\xD3\xD4\u016B\u016E\xDA\u016F\u0170\u0171\u0172\u0173\xDD\xFD\u0137\u017B\u0141\u017C\u0122\u02C7"},808:"cp808",ibm808:"cp808",cp808:{type:"_sbcs",chars:"\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042A\u042B\u042C\u042D\u042E\u042F\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255D\u255C\u255B\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u255E\u255F\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256B\u256A\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044A\u044B\u044C\u044D\u044E\u044F\u0401\u0451\u0404\u0454\u0407\u0457\u040E\u045E\xB0\u2219\xB7\u221A\u2116\u20AC\u25A0\xA0"},mik:{type:"_sbcs",chars:"\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042A\u042B\u042C\u042D\u042E\u042F\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044A\u044B\u044C\u044D\u044E\u044F\u2514\u2534\u252C\u251C\u2500\u253C\u2563\u2551\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2510\u2591\u2592\u2593\u2502\u2524\u2116\xA7\u2557\u255D\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u03B1\xDF\u0393\u03C0\u03A3\u03C3\xB5\u03C4\u03A6\u0398\u03A9\u03B4\u221E\u03C6\u03B5\u2229\u2261\xB1\u2265\u2264\u2320\u2321\xF7\u2248\xB0\u2219\xB7\u221A\u207F\xB2\u25A0\xA0"},cp720:{type:"_sbcs",chars:"\x80\x81\xE9\xE2\x84\xE0\x86\xE7\xEA\xEB\xE8\xEF\xEE\x8D\x8E\x8F\x90\u0651\u0652\xF4\xA4\u0640\xFB\xF9\u0621\u0622\u0623\u0624\xA3\u0625\u0626\u0627\u0628\u0629\u062A\u062B\u062C\u062D\u062E\u062F\u0630\u0631\u0632\u0633\u0634\u0635\xAB\xBB\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255D\u255C\u255B\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u255E\u255F\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256B\u256A\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u0636\u0637\u0638\u0639\u063A\u0641\xB5\u0642\u0643\u0644\u0645\u0646\u0647\u0648\u0649\u064A\u2261\u064B\u064C\u064D\u064E\u064F\u0650\u2248\xB0\u2219\xB7\u221A\u207F\xB2\u25A0\xA0"},ascii8bit:"ascii",usascii:"ascii",ansix34:"ascii",ansix341968:"ascii",ansix341986:"ascii",csascii:"ascii",cp367:"ascii",ibm367:"ascii",isoir6:"ascii",iso646us:"ascii",iso646irv:"ascii",us:"ascii",latin1:"iso88591",latin2:"iso88592",latin3:"iso88593",latin4:"iso88594",latin5:"iso88599",latin6:"iso885910",latin7:"iso885913",latin8:"iso885914",latin9:"iso885915",latin10:"iso885916",csisolatin1:"iso88591",csisolatin2:"iso88592",csisolatin3:"iso88593",csisolatin4:"iso88594",csisolatincyrillic:"iso88595",csisolatinarabic:"iso88596",csisolatingreek:"iso88597",csisolatinhebrew:"iso88598",csisolatin5:"iso88599",csisolatin6:"iso885910",l1:"iso88591",l2:"iso88592",l3:"iso88593",l4:"iso88594",l5:"iso88599",l6:"iso885910",l7:"iso885913",l8:"iso885914",l9:"iso885915",l10:"iso885916",isoir14:"iso646jp",isoir57:"iso646cn",isoir100:"iso88591",isoir101:"iso88592",isoir109:"iso88593",isoir110:"iso88594",isoir144:"iso88595",isoir127:"iso88596",isoir126:"iso88597",isoir138:"iso88598",isoir148:"iso88599",isoir157:"iso885910",isoir166:"tis620",isoir179:"iso885913",isoir199:"iso885914",isoir203:"iso885915",isoir226:"iso885916",cp819:"iso88591",ibm819:"iso88591",cyrillic:"iso88595",arabic:"iso88596",arabic8:"iso88596",ecma114:"iso88596",asmo708:"iso88596",greek:"iso88597",greek8:"iso88597",ecma118:"iso88597",elot928:"iso88597",hebrew:"iso88598",hebrew8:"iso88598",turkish:"iso88599",turkish8:"iso88599",thai:"iso885911",thai8:"iso885911",celtic:"iso885914",celtic8:"iso885914",isoceltic:"iso885914",tis6200:"tis620",tis62025291:"tis620",tis62025330:"tis620",1e4:"macroman",10006:"macgreek",10007:"maccyrillic",10079:"maciceland",10081:"macturkish",cspc8codepage437:"cp437",cspc775baltic:"cp775",cspc850multilingual:"cp850",cspcp852:"cp852",cspc862latinhebrew:"cp862",cpgr:"cp869",msee:"cp1250",mscyrl:"cp1251",msansi:"cp1252",msgreek:"cp1253",msturk:"cp1254",mshebr:"cp1255",msarab:"cp1256",winbaltrim:"cp1257",cp20866:"koi8r",20866:"koi8r",ibm878:"koi8r",cskoi8r:"koi8r",cp21866:"koi8u",21866:"koi8u",ibm1168:"koi8u",strk10482002:"rk1048",tcvn5712:"tcvn",tcvn57121:"tcvn",gb198880:"iso646cn",cn:"iso646cn",csiso14jisc6220ro:"iso646jp",jisc62201969ro:"iso646jp",jp:"iso646jp",cshproman8:"hproman8",r8:"hproman8",roman8:"hproman8",xroman8:"hproman8",ibm1051:"hproman8",mac:"macintosh",csmacintosh:"macintosh"}});var RR=q((DAD,CR)=>{CR.exports={"437":"cp437","737":"cp737","775":"cp775","850":"cp850","852":"cp852","855":"cp855","856":"cp856","857":"cp857","858":"cp858","860":"cp860","861":"cp861","862":"cp862","863":"cp863","864":"cp864","865":"cp865","866":"cp866","869":"cp869","874":"windows874","922":"cp922","1046":"cp1046","1124":"cp1124","1125":"cp1125","1129":"cp1129","1133":"cp1133","1161":"cp1161","1162":"cp1162","1163":"cp1163","1250":"windows1250","1251":"windows1251","1252":"windows1252","1253":"windows1253","1254":"windows1254","1255":"windows1255","1256":"windows1256","1257":"windows1257","1258":"windows1258","28591":"iso88591","28592":"iso88592","28593":"iso88593","28594":"iso88594","28595":"iso88595","28596":"iso88596","28597":"iso88597","28598":"iso88598","28599":"iso88599","28600":"iso885910","28601":"iso885911","28603":"iso885913","28604":"iso885914","28605":"iso885915","28606":"iso885916",windows874:{type:"_sbcs",chars:"\u20AC\uFFFD\uFFFD\uFFFD\uFFFD\u2026\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u2018\u2019\u201C\u201D\u2022\u2013\u2014\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\xA0\u0E01\u0E02\u0E03\u0E04\u0E05\u0E06\u0E07\u0E08\u0E09\u0E0A\u0E0B\u0E0C\u0E0D\u0E0E\u0E0F\u0E10\u0E11\u0E12\u0E13\u0E14\u0E15\u0E16\u0E17\u0E18\u0E19\u0E1A\u0E1B\u0E1C\u0E1D\u0E1E\u0E1F\u0E20\u0E21\u0E22\u0E23\u0E24\u0E25\u0E26\u0E27\u0E28\u0E29\u0E2A\u0E2B\u0E2C\u0E2D\u0E2E\u0E2F\u0E30\u0E31\u0E32\u0E33\u0E34\u0E35\u0E36\u0E37\u0E38\u0E39\u0E3A\uFFFD\uFFFD\uFFFD\uFFFD\u0E3F\u0E40\u0E41\u0E42\u0E43\u0E44\u0E45\u0E46\u0E47\u0E48\u0E49\u0E4A\u0E4B\u0E4C\u0E4D\u0E4E\u0E4F\u0E50\u0E51\u0E52\u0E53\u0E54\u0E55\u0E56\u0E57\u0E58\u0E59\u0E5A\u0E5B\uFFFD\uFFFD\uFFFD\uFFFD"},win874:"windows874",cp874:"windows874",windows1250:{type:"_sbcs",chars:"\u20AC\uFFFD\u201A\uFFFD\u201E\u2026\u2020\u2021\uFFFD\u2030\u0160\u2039\u015A\u0164\u017D\u0179\uFFFD\u2018\u2019\u201C\u201D\u2022\u2013\u2014\uFFFD\u2122\u0161\u203A\u015B\u0165\u017E\u017A\xA0\u02C7\u02D8\u0141\xA4\u0104\xA6\xA7\xA8\xA9\u015E\xAB\xAC\xAD\xAE\u017B\xB0\xB1\u02DB\u0142\xB4\xB5\xB6\xB7\xB8\u0105\u015F\xBB\u013D\u02DD\u013E\u017C\u0154\xC1\xC2\u0102\xC4\u0139\u0106\xC7\u010C\xC9\u0118\xCB\u011A\xCD\xCE\u010E\u0110\u0143\u0147\xD3\xD4\u0150\xD6\xD7\u0158\u016E\xDA\u0170\xDC\xDD\u0162\xDF\u0155\xE1\xE2\u0103\xE4\u013A\u0107\xE7\u010D\xE9\u0119\xEB\u011B\xED\xEE\u010F\u0111\u0144\u0148\xF3\xF4\u0151\xF6\xF7\u0159\u016F\xFA\u0171\xFC\xFD\u0163\u02D9"},win1250:"windows1250",cp1250:"windows1250",windows1251:{type:"_sbcs",chars:"\u0402\u0403\u201A\u0453\u201E\u2026\u2020\u2021\u20AC\u2030\u0409\u2039\u040A\u040C\u040B\u040F\u0452\u2018\u2019\u201C\u201D\u2022\u2013\u2014\uFFFD\u2122\u0459\u203A\u045A\u045C\u045B\u045F\xA0\u040E\u045E\u0408\xA4\u0490\xA6\xA7\u0401\xA9\u0404\xAB\xAC\xAD\xAE\u0407\xB0\xB1\u0406\u0456\u0491\xB5\xB6\xB7\u0451\u2116\u0454\xBB\u0458\u0405\u0455\u0457\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042A\u042B\u042C\u042D\u042E\u042F\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044A\u044B\u044C\u044D\u044E\u044F"},win1251:"windows1251",cp1251:"windows1251",windows1252:{type:"_sbcs",chars:"\u20AC\uFFFD\u201A\u0192\u201E\u2026\u2020\u2021\u02C6\u2030\u0160\u2039\u0152\uFFFD\u017D\uFFFD\uFFFD\u2018\u2019\u201C\u201D\u2022\u2013\u2014\u02DC\u2122\u0161\u203A\u0153\uFFFD\u017E\u0178\xA0\xA1\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xAA\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xBA\xBB\xBC\xBD\xBE\xBF\xC0\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\xD0\xD1\xD2\xD3\xD4\xD5\xD6\xD7\xD8\xD9\xDA\xDB\xDC\xDD\xDE\xDF\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\xF0\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\xFA\xFB\xFC\xFD\xFE\xFF"},win1252:"windows1252",cp1252:"windows1252",windows1253:{type:"_sbcs",chars:"\u20AC\uFFFD\u201A\u0192\u201E\u2026\u2020\u2021\uFFFD\u2030\uFFFD\u2039\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u2018\u2019\u201C\u201D\u2022\u2013\u2014\uFFFD\u2122\uFFFD\u203A\uFFFD\uFFFD\uFFFD\uFFFD\xA0\u0385\u0386\xA3\xA4\xA5\xA6\xA7\xA8\xA9\uFFFD\xAB\xAC\xAD\xAE\u2015\xB0\xB1\xB2\xB3\u0384\xB5\xB6\xB7\u0388\u0389\u038A\xBB\u038C\xBD\u038E\u038F\u0390\u0391\u0392\u0393\u0394\u0395\u0396\u0397\u0398\u0399\u039A\u039B\u039C\u039D\u039E\u039F\u03A0\u03A1\uFFFD\u03A3\u03A4\u03A5\u03A6\u03A7\u03A8\u03A9\u03AA\u03AB\u03AC\u03AD\u03AE\u03AF\u03B0\u03B1\u03B2\u03B3\u03B4\u03B5\u03B6\u03B7\u03B8\u03B9\u03BA\u03BB\u03BC\u03BD\u03BE\u03BF\u03C0\u03C1\u03C2\u03C3\u03C4\u03C5\u03C6\u03C7\u03C8\u03C9\u03CA\u03CB\u03CC\u03CD\u03CE\uFFFD"},win1253:"windows1253",cp1253:"windows1253",windows1254:{type:"_sbcs",chars:"\u20AC\uFFFD\u201A\u0192\u201E\u2026\u2020\u2021\u02C6\u2030\u0160\u2039\u0152\uFFFD\uFFFD\uFFFD\uFFFD\u2018\u2019\u201C\u201D\u2022\u2013\u2014\u02DC\u2122\u0161\u203A\u0153\uFFFD\uFFFD\u0178\xA0\xA1\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xAA\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xBA\xBB\xBC\xBD\xBE\xBF\xC0\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\u011E\xD1\xD2\xD3\xD4\xD5\xD6\xD7\xD8\xD9\xDA\xDB\xDC\u0130\u015E\xDF\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\u011F\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\xFA\xFB\xFC\u0131\u015F\xFF"},win1254:"windows1254",cp1254:"windows1254",windows1255:{type:"_sbcs",chars:"\u20AC\uFFFD\u201A\u0192\u201E\u2026\u2020\u2021\u02C6\u2030\uFFFD\u2039\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u2018\u2019\u201C\u201D\u2022\u2013\u2014\u02DC\u2122\uFFFD\u203A\uFFFD\uFFFD\uFFFD\uFFFD\xA0\xA1\xA2\xA3\u20AA\xA5\xA6\xA7\xA8\xA9\xD7\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xF7\xBB\xBC\xBD\xBE\xBF\u05B0\u05B1\u05B2\u05B3\u05B4\u05B5\u05B6\u05B7\u05B8\u05B9\u05BA\u05BB\u05BC\u05BD\u05BE\u05BF\u05C0\u05C1\u05C2\u05C3\u05F0\u05F1\u05F2\u05F3\u05F4\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u05D0\u05D1\u05D2\u05D3\u05D4\u05D5\u05D6\u05D7\u05D8\u05D9\u05DA\u05DB\u05DC\u05DD\u05DE\u05DF\u05E0\u05E1\u05E2\u05E3\u05E4\u05E5\u05E6\u05E7\u05E8\u05E9\u05EA\uFFFD\uFFFD\u200E\u200F\uFFFD"},win1255:"windows1255",cp1255:"windows1255",windows1256:{type:"_sbcs",chars:"\u20AC\u067E\u201A\u0192\u201E\u2026\u2020\u2021\u02C6\u2030\u0679\u2039\u0152\u0686\u0698\u0688\u06AF\u2018\u2019\u201C\u201D\u2022\u2013\u2014\u06A9\u2122\u0691\u203A\u0153\u200C\u200D\u06BA\xA0\u060C\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\u06BE\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\u061B\xBB\xBC\xBD\xBE\u061F\u06C1\u0621\u0622\u0623\u0624\u0625\u0626\u0627\u0628\u0629\u062A\u062B\u062C\u062D\u062E\u062F\u0630\u0631\u0632\u0633\u0634\u0635\u0636\xD7\u0637\u0638\u0639\u063A\u0640\u0641\u0642\u0643\xE0\u0644\xE2\u0645\u0646\u0647\u0648\xE7\xE8\xE9\xEA\xEB\u0649\u064A\xEE\xEF\u064B\u064C\u064D\u064E\xF4\u064F\u0650\xF7\u0651\xF9\u0652\xFB\xFC\u200E\u200F\u06D2"},win1256:"windows1256",cp1256:"windows1256",windows1257:{type:"_sbcs",chars:"\u20AC\uFFFD\u201A\uFFFD\u201E\u2026\u2020\u2021\uFFFD\u2030\uFFFD\u2039\uFFFD\xA8\u02C7\xB8\uFFFD\u2018\u2019\u201C\u201D\u2022\u2013\u2014\uFFFD\u2122\uFFFD\u203A\uFFFD\xAF\u02DB\uFFFD\xA0\uFFFD\xA2\xA3\xA4\uFFFD\xA6\xA7\xD8\xA9\u0156\xAB\xAC\xAD\xAE\xC6\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xF8\xB9\u0157\xBB\xBC\xBD\xBE\xE6\u0104\u012E\u0100\u0106\xC4\xC5\u0118\u0112\u010C\xC9\u0179\u0116\u0122\u0136\u012A\u013B\u0160\u0143\u0145\xD3\u014C\xD5\xD6\xD7\u0172\u0141\u015A\u016A\xDC\u017B\u017D\xDF\u0105\u012F\u0101\u0107\xE4\xE5\u0119\u0113\u010D\xE9\u017A\u0117\u0123\u0137\u012B\u013C\u0161\u0144\u0146\xF3\u014D\xF5\xF6\xF7\u0173\u0142\u015B\u016B\xFC\u017C\u017E\u02D9"},win1257:"windows1257",cp1257:"windows1257",windows1258:{type:"_sbcs",chars:"\u20AC\uFFFD\u201A\u0192\u201E\u2026\u2020\u2021\u02C6\u2030\uFFFD\u2039\u0152\uFFFD\uFFFD\uFFFD\uFFFD\u2018\u2019\u201C\u201D\u2022\u2013\u2014\u02DC\u2122\uFFFD\u203A\u0153\uFFFD\uFFFD\u0178\xA0\xA1\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xAA\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xBA\xBB\xBC\xBD\xBE\xBF\xC0\xC1\xC2\u0102\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\u0300\xCD\xCE\xCF\u0110\xD1\u0309\xD3\xD4\u01A0\xD6\xD7\xD8\xD9\xDA\xDB\xDC\u01AF\u0303\xDF\xE0\xE1\xE2\u0103\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\u0301\xED\xEE\xEF\u0111\xF1\u0323\xF3\xF4\u01A1\xF6\xF7\xF8\xF9\xFA\xFB\xFC\u01B0\u20AB\xFF"},win1258:"windows1258",cp1258:"windows1258",iso88591:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\xA1\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xAA\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xBA\xBB\xBC\xBD\xBE\xBF\xC0\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\xD0\xD1\xD2\xD3\xD4\xD5\xD6\xD7\xD8\xD9\xDA\xDB\xDC\xDD\xDE\xDF\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\xF0\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\xFA\xFB\xFC\xFD\xFE\xFF"},cp28591:"iso88591",iso88592:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\u0104\u02D8\u0141\xA4\u013D\u015A\xA7\xA8\u0160\u015E\u0164\u0179\xAD\u017D\u017B\xB0\u0105\u02DB\u0142\xB4\u013E\u015B\u02C7\xB8\u0161\u015F\u0165\u017A\u02DD\u017E\u017C\u0154\xC1\xC2\u0102\xC4\u0139\u0106\xC7\u010C\xC9\u0118\xCB\u011A\xCD\xCE\u010E\u0110\u0143\u0147\xD3\xD4\u0150\xD6\xD7\u0158\u016E\xDA\u0170\xDC\xDD\u0162\xDF\u0155\xE1\xE2\u0103\xE4\u013A\u0107\xE7\u010D\xE9\u0119\xEB\u011B\xED\xEE\u010F\u0111\u0144\u0148\xF3\xF4\u0151\xF6\xF7\u0159\u016F\xFA\u0171\xFC\xFD\u0163\u02D9"},cp28592:"iso88592",iso88593:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\u0126\u02D8\xA3\xA4\uFFFD\u0124\xA7\xA8\u0130\u015E\u011E\u0134\xAD\uFFFD\u017B\xB0\u0127\xB2\xB3\xB4\xB5\u0125\xB7\xB8\u0131\u015F\u011F\u0135\xBD\uFFFD\u017C\xC0\xC1\xC2\uFFFD\xC4\u010A\u0108\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\uFFFD\xD1\xD2\xD3\xD4\u0120\xD6\xD7\u011C\xD9\xDA\xDB\xDC\u016C\u015C\xDF\xE0\xE1\xE2\uFFFD\xE4\u010B\u0109\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\uFFFD\xF1\xF2\xF3\xF4\u0121\xF6\xF7\u011D\xF9\xFA\xFB\xFC\u016D\u015D\u02D9"},cp28593:"iso88593",iso88594:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\u0104\u0138\u0156\xA4\u0128\u013B\xA7\xA8\u0160\u0112\u0122\u0166\xAD\u017D\xAF\xB0\u0105\u02DB\u0157\xB4\u0129\u013C\u02C7\xB8\u0161\u0113\u0123\u0167\u014A\u017E\u014B\u0100\xC1\xC2\xC3\xC4\xC5\xC6\u012E\u010C\xC9\u0118\xCB\u0116\xCD\xCE\u012A\u0110\u0145\u014C\u0136\xD4\xD5\xD6\xD7\xD8\u0172\xDA\xDB\xDC\u0168\u016A\xDF\u0101\xE1\xE2\xE3\xE4\xE5\xE6\u012F\u010D\xE9\u0119\xEB\u0117\xED\xEE\u012B\u0111\u0146\u014D\u0137\xF4\xF5\xF6\xF7\xF8\u0173\xFA\xFB\xFC\u0169\u016B\u02D9"},cp28594:"iso88594",iso88595:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\u0401\u0402\u0403\u0404\u0405\u0406\u0407\u0408\u0409\u040A\u040B\u040C\xAD\u040E\u040F\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042A\u042B\u042C\u042D\u042E\u042F\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044A\u044B\u044C\u044D\u044E\u044F\u2116\u0451\u0452\u0453\u0454\u0455\u0456\u0457\u0458\u0459\u045A\u045B\u045C\xA7\u045E\u045F"},cp28595:"iso88595",iso88596:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\uFFFD\uFFFD\uFFFD\xA4\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u060C\xAD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u061B\uFFFD\uFFFD\uFFFD\u061F\uFFFD\u0621\u0622\u0623\u0624\u0625\u0626\u0627\u0628\u0629\u062A\u062B\u062C\u062D\u062E\u062F\u0630\u0631\u0632\u0633\u0634\u0635\u0636\u0637\u0638\u0639\u063A\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u0640\u0641\u0642\u0643\u0644\u0645\u0646\u0647\u0648\u0649\u064A\u064B\u064C\u064D\u064E\u064F\u0650\u0651\u0652\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD"},cp28596:"iso88596",iso88597:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\u2018\u2019\xA3\u20AC\u20AF\xA6\xA7\xA8\xA9\u037A\xAB\xAC\xAD\uFFFD\u2015\xB0\xB1\xB2\xB3\u0384\u0385\u0386\xB7\u0388\u0389\u038A\xBB\u038C\xBD\u038E\u038F\u0390\u0391\u0392\u0393\u0394\u0395\u0396\u0397\u0398\u0399\u039A\u039B\u039C\u039D\u039E\u039F\u03A0\u03A1\uFFFD\u03A3\u03A4\u03A5\u03A6\u03A7\u03A8\u03A9\u03AA\u03AB\u03AC\u03AD\u03AE\u03AF\u03B0\u03B1\u03B2\u03B3\u03B4\u03B5\u03B6\u03B7\u03B8\u03B9\u03BA\u03BB\u03BC\u03BD\u03BE\u03BF\u03C0\u03C1\u03C2\u03C3\u03C4\u03C5\u03C6\u03C7\u03C8\u03C9\u03CA\u03CB\u03CC\u03CD\u03CE\uFFFD"},cp28597:"iso88597",iso88598:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\uFFFD\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xD7\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xF7\xBB\xBC\xBD\xBE\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u2017\u05D0\u05D1\u05D2\u05D3\u05D4\u05D5\u05D6\u05D7\u05D8\u05D9\u05DA\u05DB\u05DC\u05DD\u05DE\u05DF\u05E0\u05E1\u05E2\u05E3\u05E4\u05E5\u05E6\u05E7\u05E8\u05E9\u05EA\uFFFD\uFFFD\u200E\u200F\uFFFD"},cp28598:"iso88598",iso88599:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\xA1\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xAA\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xBA\xBB\xBC\xBD\xBE\xBF\xC0\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\u011E\xD1\xD2\xD3\xD4\xD5\xD6\xD7\xD8\xD9\xDA\xDB\xDC\u0130\u015E\xDF\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\u011F\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\xFA\xFB\xFC\u0131\u015F\xFF"},cp28599:"iso88599",iso885910:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\u0104\u0112\u0122\u012A\u0128\u0136\xA7\u013B\u0110\u0160\u0166\u017D\xAD\u016A\u014A\xB0\u0105\u0113\u0123\u012B\u0129\u0137\xB7\u013C\u0111\u0161\u0167\u017E\u2015\u016B\u014B\u0100\xC1\xC2\xC3\xC4\xC5\xC6\u012E\u010C\xC9\u0118\xCB\u0116\xCD\xCE\xCF\xD0\u0145\u014C\xD3\xD4\xD5\xD6\u0168\xD8\u0172\xDA\xDB\xDC\xDD\xDE\xDF\u0101\xE1\xE2\xE3\xE4\xE5\xE6\u012F\u010D\xE9\u0119\xEB\u0117\xED\xEE\xEF\xF0\u0146\u014D\xF3\xF4\xF5\xF6\u0169\xF8\u0173\xFA\xFB\xFC\xFD\xFE\u0138"},cp28600:"iso885910",iso885911:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\u0E01\u0E02\u0E03\u0E04\u0E05\u0E06\u0E07\u0E08\u0E09\u0E0A\u0E0B\u0E0C\u0E0D\u0E0E\u0E0F\u0E10\u0E11\u0E12\u0E13\u0E14\u0E15\u0E16\u0E17\u0E18\u0E19\u0E1A\u0E1B\u0E1C\u0E1D\u0E1E\u0E1F\u0E20\u0E21\u0E22\u0E23\u0E24\u0E25\u0E26\u0E27\u0E28\u0E29\u0E2A\u0E2B\u0E2C\u0E2D\u0E2E\u0E2F\u0E30\u0E31\u0E32\u0E33\u0E34\u0E35\u0E36\u0E37\u0E38\u0E39\u0E3A\uFFFD\uFFFD\uFFFD\uFFFD\u0E3F\u0E40\u0E41\u0E42\u0E43\u0E44\u0E45\u0E46\u0E47\u0E48\u0E49\u0E4A\u0E4B\u0E4C\u0E4D\u0E4E\u0E4F\u0E50\u0E51\u0E52\u0E53\u0E54\u0E55\u0E56\u0E57\u0E58\u0E59\u0E5A\u0E5B\uFFFD\uFFFD\uFFFD\uFFFD"},cp28601:"iso885911",iso885913:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\u201D\xA2\xA3\xA4\u201E\xA6\xA7\xD8\xA9\u0156\xAB\xAC\xAD\xAE\xC6\xB0\xB1\xB2\xB3\u201C\xB5\xB6\xB7\xF8\xB9\u0157\xBB\xBC\xBD\xBE\xE6\u0104\u012E\u0100\u0106\xC4\xC5\u0118\u0112\u010C\xC9\u0179\u0116\u0122\u0136\u012A\u013B\u0160\u0143\u0145\xD3\u014C\xD5\xD6\xD7\u0172\u0141\u015A\u016A\xDC\u017B\u017D\xDF\u0105\u012F\u0101\u0107\xE4\xE5\u0119\u0113\u010D\xE9\u017A\u0117\u0123\u0137\u012B\u013C\u0161\u0144\u0146\xF3\u014D\xF5\xF6\xF7\u0173\u0142\u015B\u016B\xFC\u017C\u017E\u2019"},cp28603:"iso885913",iso885914:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\u1E02\u1E03\xA3\u010A\u010B\u1E0A\xA7\u1E80\xA9\u1E82\u1E0B\u1EF2\xAD\xAE\u0178\u1E1E\u1E1F\u0120\u0121\u1E40\u1E41\xB6\u1E56\u1E81\u1E57\u1E83\u1E60\u1EF3\u1E84\u1E85\u1E61\xC0\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\u0174\xD1\xD2\xD3\xD4\xD5\xD6\u1E6A\xD8\xD9\xDA\xDB\xDC\xDD\u0176\xDF\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\u0175\xF1\xF2\xF3\xF4\xF5\xF6\u1E6B\xF8\xF9\xFA\xFB\xFC\xFD\u0177\xFF"},cp28604:"iso885914",iso885915:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\xA1\xA2\xA3\u20AC\xA5\u0160\xA7\u0161\xA9\xAA\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\u017D\xB5\xB6\xB7\u017E\xB9\xBA\xBB\u0152\u0153\u0178\xBF\xC0\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\xD0\xD1\xD2\xD3\xD4\xD5\xD6\xD7\xD8\xD9\xDA\xDB\xDC\xDD\xDE\xDF\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\xF0\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\xFA\xFB\xFC\xFD\xFE\xFF"},cp28605:"iso885915",iso885916:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\u0104\u0105\u0141\u20AC\u201E\u0160\xA7\u0161\xA9\u0218\xAB\u0179\xAD\u017A\u017B\xB0\xB1\u010C\u0142\u017D\u201D\xB6\xB7\u017E\u010D\u0219\xBB\u0152\u0153\u0178\u017C\xC0\xC1\xC2\u0102\xC4\u0106\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\u0110\u0143\xD2\xD3\xD4\u0150\xD6\u015A\u0170\xD9\xDA\xDB\xDC\u0118\u021A\xDF\xE0\xE1\xE2\u0103\xE4\u0107\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\u0111\u0144\xF2\xF3\xF4\u0151\xF6\u015B\u0171\xF9\xFA\xFB\xFC\u0119\u021B\xFF"},cp28606:"iso885916",cp437:{type:"_sbcs",chars:"\xC7\xFC\xE9\xE2\xE4\xE0\xE5\xE7\xEA\xEB\xE8\xEF\xEE\xEC\xC4\xC5\xC9\xE6\xC6\xF4\xF6\xF2\xFB\xF9\xFF\xD6\xDC\xA2\xA3\xA5\u20A7\u0192\xE1\xED\xF3\xFA\xF1\xD1\xAA\xBA\xBF\u2310\xAC\xBD\xBC\xA1\xAB\xBB\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255D\u255C\u255B\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u255E\u255F\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256B\u256A\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u03B1\xDF\u0393\u03C0\u03A3\u03C3\xB5\u03C4\u03A6\u0398\u03A9\u03B4\u221E\u03C6\u03B5\u2229\u2261\xB1\u2265\u2264\u2320\u2321\xF7\u2248\xB0\u2219\xB7\u221A\u207F\xB2\u25A0\xA0"},ibm437:"cp437",csibm437:"cp437",cp737:{type:"_sbcs",chars:"\u0391\u0392\u0393\u0394\u0395\u0396\u0397\u0398\u0399\u039A\u039B\u039C\u039D\u039E\u039F\u03A0\u03A1\u03A3\u03A4\u03A5\u03A6\u03A7\u03A8\u03A9\u03B1\u03B2\u03B3\u03B4\u03B5\u03B6\u03B7\u03B8\u03B9\u03BA\u03BB\u03BC\u03BD\u03BE\u03BF\u03C0\u03C1\u03C3\u03C2\u03C4\u03C5\u03C6\u03C7\u03C8\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255D\u255C\u255B\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u255E\u255F\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256B\u256A\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u03C9\u03AC\u03AD\u03AE\u03CA\u03AF\u03CC\u03CD\u03CB\u03CE\u0386\u0388\u0389\u038A\u038C\u038E\u038F\xB1\u2265\u2264\u03AA\u03AB\xF7\u2248\xB0\u2219\xB7\u221A\u207F\xB2\u25A0\xA0"},ibm737:"cp737",csibm737:"cp737",cp775:{type:"_sbcs",chars:"\u0106\xFC\xE9\u0101\xE4\u0123\xE5\u0107\u0142\u0113\u0156\u0157\u012B\u0179\xC4\xC5\xC9\xE6\xC6\u014D\xF6\u0122\xA2\u015A\u015B\xD6\xDC\xF8\xA3\xD8\xD7\xA4\u0100\u012A\xF3\u017B\u017C\u017A\u201D\xA6\xA9\xAE\xAC\xBD\xBC\u0141\xAB\xBB\u2591\u2592\u2593\u2502\u2524\u0104\u010C\u0118\u0116\u2563\u2551\u2557\u255D\u012E\u0160\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u0172\u016A\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u017D\u0105\u010D\u0119\u0117\u012F\u0161\u0173\u016B\u017E\u2518\u250C\u2588\u2584\u258C\u2590\u2580\xD3\xDF\u014C\u0143\xF5\xD5\xB5\u0144\u0136\u0137\u013B\u013C\u0146\u0112\u0145\u2019\xAD\xB1\u201C\xBE\xB6\xA7\xF7\u201E\xB0\u2219\xB7\xB9\xB3\xB2\u25A0\xA0"},ibm775:"cp775",csibm775:"cp775",cp850:{type:"_sbcs",chars:"\xC7\xFC\xE9\xE2\xE4\xE0\xE5\xE7\xEA\xEB\xE8\xEF\xEE\xEC\xC4\xC5\xC9\xE6\xC6\xF4\xF6\xF2\xFB\xF9\xFF\xD6\xDC\xF8\xA3\xD8\xD7\u0192\xE1\xED\xF3\xFA\xF1\xD1\xAA\xBA\xBF\xAE\xAC\xBD\xBC\xA1\xAB\xBB\u2591\u2592\u2593\u2502\u2524\xC1\xC2\xC0\xA9\u2563\u2551\u2557\u255D\xA2\xA5\u2510\u2514\u2534\u252C\u251C\u2500\u253C\xE3\xC3\u255A\u2554\u2569\u2566\u2560\u2550\u256C\xA4\xF0\xD0\xCA\xCB\xC8\u0131\xCD\xCE\xCF\u2518\u250C\u2588\u2584\xA6\xCC\u2580\xD3\xDF\xD4\xD2\xF5\xD5\xB5\xFE\xDE\xDA\xDB\xD9\xFD\xDD\xAF\xB4\xAD\xB1\u2017\xBE\xB6\xA7\xF7\xB8\xB0\xA8\xB7\xB9\xB3\xB2\u25A0\xA0"},ibm850:"cp850",csibm850:"cp850",cp852:{type:"_sbcs",chars:"\xC7\xFC\xE9\xE2\xE4\u016F\u0107\xE7\u0142\xEB\u0150\u0151\xEE\u0179\xC4\u0106\xC9\u0139\u013A\xF4\xF6\u013D\u013E\u015A\u015B\xD6\xDC\u0164\u0165\u0141\xD7\u010D\xE1\xED\xF3\xFA\u0104\u0105\u017D\u017E\u0118\u0119\xAC\u017A\u010C\u015F\xAB\xBB\u2591\u2592\u2593\u2502\u2524\xC1\xC2\u011A\u015E\u2563\u2551\u2557\u255D\u017B\u017C\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u0102\u0103\u255A\u2554\u2569\u2566\u2560\u2550\u256C\xA4\u0111\u0110\u010E\xCB\u010F\u0147\xCD\xCE\u011B\u2518\u250C\u2588\u2584\u0162\u016E\u2580\xD3\xDF\xD4\u0143\u0144\u0148\u0160\u0161\u0154\xDA\u0155\u0170\xFD\xDD\u0163\xB4\xAD\u02DD\u02DB\u02C7\u02D8\xA7\xF7\xB8\xB0\xA8\u02D9\u0171\u0158\u0159\u25A0\xA0"},ibm852:"cp852",csibm852:"cp852",cp855:{type:"_sbcs",chars:"\u0452\u0402\u0453\u0403\u0451\u0401\u0454\u0404\u0455\u0405\u0456\u0406\u0457\u0407\u0458\u0408\u0459\u0409\u045A\u040A\u045B\u040B\u045C\u040C\u045E\u040E\u045F\u040F\u044E\u042E\u044A\u042A\u0430\u0410\u0431\u0411\u0446\u0426\u0434\u0414\u0435\u0415\u0444\u0424\u0433\u0413\xAB\xBB\u2591\u2592\u2593\u2502\u2524\u0445\u0425\u0438\u0418\u2563\u2551\u2557\u255D\u0439\u0419\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u043A\u041A\u255A\u2554\u2569\u2566\u2560\u2550\u256C\xA4\u043B\u041B\u043C\u041C\u043D\u041D\u043E\u041E\u043F\u2518\u250C\u2588\u2584\u041F\u044F\u2580\u042F\u0440\u0420\u0441\u0421\u0442\u0422\u0443\u0423\u0436\u0416\u0432\u0412\u044C\u042C\u2116\xAD\u044B\u042B\u0437\u0417\u0448\u0428\u044D\u042D\u0449\u0429\u0447\u0427\xA7\u25A0\xA0"},ibm855:"cp855",csibm855:"cp855",cp856:{type:"_sbcs",chars:"\u05D0\u05D1\u05D2\u05D3\u05D4\u05D5\u05D6\u05D7\u05D8\u05D9\u05DA\u05DB\u05DC\u05DD\u05DE\u05DF\u05E0\u05E1\u05E2\u05E3\u05E4\u05E5\u05E6\u05E7\u05E8\u05E9\u05EA\uFFFD\xA3\uFFFD\xD7\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\xAE\xAC\xBD\xBC\uFFFD\xAB\xBB\u2591\u2592\u2593\u2502\u2524\uFFFD\uFFFD\uFFFD\xA9\u2563\u2551\u2557\u255D\xA2\xA5\u2510\u2514\u2534\u252C\u251C\u2500\u253C\uFFFD\uFFFD\u255A\u2554\u2569\u2566\u2560\u2550\u256C\xA4\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u2518\u250C\u2588\u2584\xA6\uFFFD\u2580\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\xB5\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\xAF\xB4\xAD\xB1\u2017\xBE\xB6\xA7\xF7\xB8\xB0\xA8\xB7\xB9\xB3\xB2\u25A0\xA0"},ibm856:"cp856",csibm856:"cp856",cp857:{type:"_sbcs",chars:"\xC7\xFC\xE9\xE2\xE4\xE0\xE5\xE7\xEA\xEB\xE8\xEF\xEE\u0131\xC4\xC5\xC9\xE6\xC6\xF4\xF6\xF2\xFB\xF9\u0130\xD6\xDC\xF8\xA3\xD8\u015E\u015F\xE1\xED\xF3\xFA\xF1\xD1\u011E\u011F\xBF\xAE\xAC\xBD\xBC\xA1\xAB\xBB\u2591\u2592\u2593\u2502\u2524\xC1\xC2\xC0\xA9\u2563\u2551\u2557\u255D\xA2\xA5\u2510\u2514\u2534\u252C\u251C\u2500\u253C\xE3\xC3\u255A\u2554\u2569\u2566\u2560\u2550\u256C\xA4\xBA\xAA\xCA\xCB\xC8\uFFFD\xCD\xCE\xCF\u2518\u250C\u2588\u2584\xA6\xCC\u2580\xD3\xDF\xD4\xD2\xF5\xD5\xB5\uFFFD\xD7\xDA\xDB\xD9\xEC\xFF\xAF\xB4\xAD\xB1\uFFFD\xBE\xB6\xA7\xF7\xB8\xB0\xA8\xB7\xB9\xB3\xB2\u25A0\xA0"},ibm857:"cp857",csibm857:"cp857",cp858:{type:"_sbcs",chars:"\xC7\xFC\xE9\xE2\xE4\xE0\xE5\xE7\xEA\xEB\xE8\xEF\xEE\xEC\xC4\xC5\xC9\xE6\xC6\xF4\xF6\xF2\xFB\xF9\xFF\xD6\xDC\xF8\xA3\xD8\xD7\u0192\xE1\xED\xF3\xFA\xF1\xD1\xAA\xBA\xBF\xAE\xAC\xBD\xBC\xA1\xAB\xBB\u2591\u2592\u2593\u2502\u2524\xC1\xC2\xC0\xA9\u2563\u2551\u2557\u255D\xA2\xA5\u2510\u2514\u2534\u252C\u251C\u2500\u253C\xE3\xC3\u255A\u2554\u2569\u2566\u2560\u2550\u256C\xA4\xF0\xD0\xCA\xCB\xC8\u20AC\xCD\xCE\xCF\u2518\u250C\u2588\u2584\xA6\xCC\u2580\xD3\xDF\xD4\xD2\xF5\xD5\xB5\xFE\xDE\xDA\xDB\xD9\xFD\xDD\xAF\xB4\xAD\xB1\u2017\xBE\xB6\xA7\xF7\xB8\xB0\xA8\xB7\xB9\xB3\xB2\u25A0\xA0"},ibm858:"cp858",csibm858:"cp858",cp860:{type:"_sbcs",chars:"\xC7\xFC\xE9\xE2\xE3\xE0\xC1\xE7\xEA\xCA\xE8\xCD\xD4\xEC\xC3\xC2\xC9\xC0\xC8\xF4\xF5\xF2\xDA\xF9\xCC\xD5\xDC\xA2\xA3\xD9\u20A7\xD3\xE1\xED\xF3\xFA\xF1\xD1\xAA\xBA\xBF\xD2\xAC\xBD\xBC\xA1\xAB\xBB\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255D\u255C\u255B\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u255E\u255F\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256B\u256A\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u03B1\xDF\u0393\u03C0\u03A3\u03C3\xB5\u03C4\u03A6\u0398\u03A9\u03B4\u221E\u03C6\u03B5\u2229\u2261\xB1\u2265\u2264\u2320\u2321\xF7\u2248\xB0\u2219\xB7\u221A\u207F\xB2\u25A0\xA0"},ibm860:"cp860",csibm860:"cp860",cp861:{type:"_sbcs",chars:"\xC7\xFC\xE9\xE2\xE4\xE0\xE5\xE7\xEA\xEB\xE8\xD0\xF0\xDE\xC4\xC5\xC9\xE6\xC6\xF4\xF6\xFE\xFB\xDD\xFD\xD6\xDC\xF8\xA3\xD8\u20A7\u0192\xE1\xED\xF3\xFA\xC1\xCD\xD3\xDA\xBF\u2310\xAC\xBD\xBC\xA1\xAB\xBB\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255D\u255C\u255B\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u255E\u255F\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256B\u256A\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u03B1\xDF\u0393\u03C0\u03A3\u03C3\xB5\u03C4\u03A6\u0398\u03A9\u03B4\u221E\u03C6\u03B5\u2229\u2261\xB1\u2265\u2264\u2320\u2321\xF7\u2248\xB0\u2219\xB7\u221A\u207F\xB2\u25A0\xA0"},ibm861:"cp861",csibm861:"cp861",cp862:{type:"_sbcs",chars:"\u05D0\u05D1\u05D2\u05D3\u05D4\u05D5\u05D6\u05D7\u05D8\u05D9\u05DA\u05DB\u05DC\u05DD\u05DE\u05DF\u05E0\u05E1\u05E2\u05E3\u05E4\u05E5\u05E6\u05E7\u05E8\u05E9\u05EA\xA2\xA3\xA5\u20A7\u0192\xE1\xED\xF3\xFA\xF1\xD1\xAA\xBA\xBF\u2310\xAC\xBD\xBC\xA1\xAB\xBB\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255D\u255C\u255B\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u255E\u255F\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256B\u256A\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u03B1\xDF\u0393\u03C0\u03A3\u03C3\xB5\u03C4\u03A6\u0398\u03A9\u03B4\u221E\u03C6\u03B5\u2229\u2261\xB1\u2265\u2264\u2320\u2321\xF7\u2248\xB0\u2219\xB7\u221A\u207F\xB2\u25A0\xA0"},ibm862:"cp862",csibm862:"cp862",cp863:{type:"_sbcs",chars:"\xC7\xFC\xE9\xE2\xC2\xE0\xB6\xE7\xEA\xEB\xE8\xEF\xEE\u2017\xC0\xA7\xC9\xC8\xCA\xF4\xCB\xCF\xFB\xF9\xA4\xD4\xDC\xA2\xA3\xD9\xDB\u0192\xA6\xB4\xF3\xFA\xA8\xB8\xB3\xAF\xCE\u2310\xAC\xBD\xBC\xBE\xAB\xBB\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255D\u255C\u255B\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u255E\u255F\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256B\u256A\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u03B1\xDF\u0393\u03C0\u03A3\u03C3\xB5\u03C4\u03A6\u0398\u03A9\u03B4\u221E\u03C6\u03B5\u2229\u2261\xB1\u2265\u2264\u2320\u2321\xF7\u2248\xB0\u2219\xB7\u221A\u207F\xB2\u25A0\xA0"},ibm863:"cp863",csibm863:"cp863",cp864:{type:"_sbcs",chars:`\x00\x01\x02\x03\x04\x05\x06\x07\b
@@ -82,7 +82,7 @@ Rules:
82
82
  `:`
83
83
  `)+$,J=B+1,B=D.indexOf(`
84
84
  `,J)}while(B!==-1);return Q+=D.slice(J),Q}var{stdout:zG,stderr:VG}=EG,FB=Symbol("GENERATOR"),s6=Symbol("STYLER"),kF=Symbol("IS_EMPTY"),AG=["ansi","ansi","ansi256","ansi16m"],r6=Object.create(null),ix=(D,F={})=>{if(F.level&&!(Number.isInteger(F.level)&&F.level>=0&&F.level<=3))throw Error("The `level` option should be an integer from 0 to 3");let $=zG?zG.level:0;D.level=F.level===void 0?$:F.level};var ax=(D)=>{let F=(...$)=>$.join(" ");return ix(F,D),Object.setPrototypeOf(F,vF.prototype),F};function vF(D){return ax(D)}Object.setPrototypeOf(vF.prototype,Function.prototype);for(let[D,F]of Object.entries(e0))r6[D]={get(){let $=I5(this,BB(F.open,F.close,this[s6]),this[kF]);return Object.defineProperty(this,D,{value:$}),$}};r6.visible={get(){let D=I5(this,this[s6],!0);return Object.defineProperty(this,"visible",{value:D}),D}};var $B=(D,F,$,...B)=>{if(D==="rgb"){if(F==="ansi16m")return e0[$].ansi16m(...B);if(F==="ansi256")return e0[$].ansi256(e0.rgbToAnsi256(...B));return e0[$].ansi(e0.rgbToAnsi(...B))}if(D==="hex")return $B("rgb",F,$,...e0.hexToRgb(...B));return e0[$][D](...B)},ox=["rgb","hex","ansi256"];for(let D of ox){r6[D]={get(){let{level:$}=this;return function(...B){let J=BB($B(D,AG[$],"color",...B),e0.color.close,this[s6]);return I5(this,J,this[kF])}}};let F="bg"+D[0].toUpperCase()+D.slice(1);r6[F]={get(){let{level:$}=this;return function(...B){let J=BB($B(D,AG[$],"bgColor",...B),e0.bgColor.close,this[s6]);return I5(this,J,this[kF])}}}}var sx=Object.defineProperties(()=>{},{...r6,level:{enumerable:!0,get(){return this[FB].level},set(D){this[FB].level=D}}}),BB=(D,F,$)=>{let B,J;if($===void 0)B=D,J=F;else B=$.openAll+D,J=F+$.closeAll;return{open:D,close:F,openAll:B,closeAll:J,parent:$}},I5=(D,F,$)=>{let B=(...J)=>rx(B,J.length===1?""+J[0]:J.join(" "));return Object.setPrototypeOf(B,sx),B[FB]=D,B[s6]=F,B[kF]=$,B},rx=(D,F)=>{if(D.level<=0||!F)return D[kF]?"":F;let $=D[s6];if($===void 0)return F;let{openAll:B,closeAll:J}=$;if(F.includes("\x1B"))while($!==void 0)F=qG(F,$.close,$.open),$=$.parent;let Q=F.indexOf(`
85
- `);if(Q!==-1)F=KG(F,J,B,Q);return B+F+J};Object.defineProperties(vF.prototype,r6);var tx=vF(),SHD=vF({level:VG?VG.level:0});var W=tx;var qC=l(xF(),1),v9=l(h0(),1);import T1 from"process";function B_(){if(T1.platform!=="win32")return T1.env.TERM!=="linux";return Boolean(T1.env.WT_SESSION)||Boolean(T1.env.TERMINUS_SUBLIME)||T1.env.ConEmuTask==="{cmd::Cmder}"||T1.env.TERM_PROGRAM==="Terminus-Sublime"||T1.env.TERM_PROGRAM==="vscode"||T1.env.TERM==="xterm-256color"||T1.env.TERM==="alacritty"||T1.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var LG={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"},MG={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"},J_={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"},Q_={...LG,...MG},X_={...LG,...J_},Y_=B_(),G_=Y_?Q_:X_,U8=G_,xHD=Object.entries(MG);var KC=l(_F(),1),x1=l(k0(),1);var OD=l(k0(),1);function gt(D,F){return{value:D,key:F||{}}}function oD(D){let F=OD.fromEvent(D.input,"keypress",gt).pipe(OD.takeUntil(OD.fromEvent(D,"close"))).pipe(OD.filter(({key:$})=>$.name!=="enter"&&$.name!=="return"));return{line:OD.fromEvent(D,"line"),keypress:F,normalizedUpKey:F.pipe(OD.filter(({key:$})=>$.name==="up"||$.name==="k"||$.name==="p"&&$.ctrl),OD.share()),normalizedDownKey:F.pipe(OD.filter(({key:$})=>$.name==="down"||$.name==="j"||$.name==="n"&&$.ctrl),OD.share()),numberKey:F.pipe(OD.filter(($)=>$.value&&"123456789".includes($.value)),OD.map(($)=>Number($.value)),OD.share()),spaceKey:F.pipe(OD.filter(({key:$})=>$&&$.name==="space"),OD.share()),aKey:F.pipe(OD.filter(({key:$})=>$&&$.name==="a"),OD.share()),iKey:F.pipe(OD.filter(({key:$})=>$&&$.name==="i"),OD.share())}}var wL=l(h0(),1);class k1{constructor(D,F={}){let{isInfinite:$=!0}=F;this.lastIndex=0,this.screen=D,this.isInfinite=$}paginate(D,F,$){$||=7;let B=D.split(`
85
+ `);if(Q!==-1)F=KG(F,J,B,Q);return B+F+J};Object.defineProperties(vF.prototype,r6);var tx=vF(),SHD=vF({level:VG?VG.level:0});var W=tx;var qC=l(xF(),1),v9=l(h0(),1);import T1 from"process";function B_(){if(T1.platform!=="win32")return T1.env.TERM!=="linux";return Boolean(T1.env.WT_SESSION)||Boolean(T1.env.TERMINUS_SUBLIME)||T1.env.ConEmuTask==="{cmd::Cmder}"||T1.env.TERM_PROGRAM==="Terminus-Sublime"||T1.env.TERM_PROGRAM==="vscode"||T1.env.TERM==="xterm-256color"||T1.env.TERM==="alacritty"||T1.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var LG={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"},MG={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"},J_={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"},Q_={...LG,...MG},X_={...LG,...J_},Y_=B_(),G_=Y_?Q_:X_,U8=G_,xHD=Object.entries(MG);var KC=l(_F(),1),x1=l(k0(),1);var jD=l(k0(),1);function gt(D,F){return{value:D,key:F||{}}}function oD(D){let F=jD.fromEvent(D.input,"keypress",gt).pipe(jD.takeUntil(jD.fromEvent(D,"close"))).pipe(jD.filter(({key:$})=>$.name!=="enter"&&$.name!=="return"));return{line:jD.fromEvent(D,"line"),keypress:F,normalizedUpKey:F.pipe(jD.filter(({key:$})=>$.name==="up"||$.name==="k"||$.name==="p"&&$.ctrl),jD.share()),normalizedDownKey:F.pipe(jD.filter(({key:$})=>$.name==="down"||$.name==="j"||$.name==="n"&&$.ctrl),jD.share()),numberKey:F.pipe(jD.filter(($)=>$.value&&"123456789".includes($.value)),jD.map(($)=>Number($.value)),jD.share()),spaceKey:F.pipe(jD.filter(({key:$})=>$&&$.name==="space"),jD.share()),aKey:F.pipe(jD.filter(({key:$})=>$&&$.name==="a"),jD.share()),iKey:F.pipe(jD.filter(({key:$})=>$&&$.name==="i"),jD.share())}}var wL=l(h0(),1);class k1{constructor(D,F={}){let{isInfinite:$=!0}=F;this.lastIndex=0,this.screen=D,this.isInfinite=$}paginate(D,F,$){$||=7;let B=D.split(`
86
86
  `);if(this.screen)B=this.screen.breakLines(B),F=B.map((Q)=>Q.length).splice(0,F).reduce((Q,X)=>Q+X,0),B=B.flat();if(B.length<=$)return D;let J=this.isInfinite?this.getInfiniteLines(B,F,$):this.getFiniteLines(B,F,$);return this.lastIndex=F,J.join(`
87
87
  `)+`
88
88
  `+wL.default.dim("(Move up and down to reveal more choices)")}getInfiniteLines(D,F,$){if(this.pointer===void 0)this.pointer=0;let B=Math.floor($/2);if(this.pointer<B&&this.lastIndex<F&&F-this.lastIndex<$)this.pointer=Math.min(B,this.pointer+F-this.lastIndex);let J=[D,D,D].flat(),Q=Math.max(0,F+D.length-this.pointer);return J.splice(Q,$)}getFiniteLines(D,F,$){let B=F-$/2;if(B<0)B=0;else if(B+$>D.length)B=D.length-$;return D.splice(B,$)}}function F8(D,F,$){let B=$.choices.realLength,J="loop"in $?Boolean($.loop):!0;if(F==="up"){if(D>0)return D-1;return J?B-1:D}if(F==="down"){if(D<B-1)return D+1;return J?0:D}throw Error("dir must be up or down")}var j6=l(h0(),1),wQ=l(_F(),1),J1=l(k0(),1);import jL from"assert";var TL=l(h0(),1);class v0{constructor(D){this.type="separator",this.line=TL.default.dim(D||Array.from({length:15}).join(U8.line))}static exclude(D){return D.type!=="separator"}toString(){return this.line}}class I4{constructor(D,F){if(D instanceof I4||D.type==="separator")return D;if(typeof D==="string"||typeof D==="number")this.name=String(D),this.value=D,this.short=String(D);else Object.assign(this,D,{name:D.name||D.value,value:"value"in D?D.value:D.name,short:D.short||D.name||D.value});this.disabled=typeof D.disabled==="function"?D.disabled(F):D.disabled}}class o5{constructor(D,F){this.choices=D.map(($)=>{if($.type==="separator"){if(!($ instanceof v0))$=new v0($.line);return $}return new I4($,F)}),this.realChoices=this.choices.filter(v0.exclude).filter(($)=>!$.disabled),Object.defineProperty(this,"length",{get(){return this.choices.length},set($){this.choices.length=$}}),Object.defineProperty(this,"realLength",{get(){return this.realChoices.length},set(){throw Error("Cannot set `realLength` of a Choices collection")}})}[Symbol.iterator](){let D=this.choices,F=-1;return{next:()=>({value:D[++F],done:!(F in D)})}}getChoice(D){return jL(typeof D==="number"),this.realChoices[D]}get(D){return jL(typeof D==="number"),this.choices[D]}where(D){let F;if(typeof D==="function")F=D;else{let[$,B]=Object.entries(D)[0];F=(J)=>J[$]===B}return this.realChoices.filter(F)}pluck(D){return this.realChoices.map((F)=>F[D])}indexOf(...D){return this.choices.indexOf(...D)}forEach(...D){return this.choices.forEach(...D)}filter(...D){return this.choices.filter(...D)}reduce(...D){return this.choices.reduce(...D)}find(D){return this.choices.find(D)}some(D){return this.choices.some(D)}push(...D){let F=D.map(($)=>new I4($));return this.choices.push(...F),this.realChoices=this.choices.filter(v0.exclude).filter(($)=>!$.disabled),this.choices}}var YC=l(xF(),1),GC=l(IL(),1),HC=l(tL(),1),WC=l(sF(),1),EC=l(RJ(),1),RQ=l(FC(),1);var b4=l(xF(),1),S9=function(D,F){D.output.write(b4.default.cursorBackward(F))},$C=function(D,F){D.output.write(b4.default.cursorForward(F))},BC=function(D,F){D.output.write(b4.default.cursorUp(F))},CQ=function(D,F){D.output.write(b4.default.cursorDown(F))},A3=function(D,F){D.output.write(b4.default.eraseLines(F))};function QC(D){return D.split(`
@@ -112,11 +112,11 @@ ${YC.default.cursorShow}`)}releaseCursor(){if(this.extraLinesUnderPrompt>0)CQ(th
112
112
  `}),$.replaceAll(/\n$/g,"")}function F1D(D){return D?y0.default.green(U8.radioOn):U8.radioOff}var O6=l(h0(),1),d9=l(k0(),1);function AC(D,F){if(D=String(D),F=typeof F==="string"?F:"*",D.length===0)return"";return Array.from({length:D.length+1}).join(F)}class p9 extends pD{_run(D){this.done=D;let F=oD(this.rl),$=F.line.pipe(d9.map(this.filterInput.bind(this))),B=this.handleSubmitEvents($);return B.success.forEach(this.onEnd.bind(this)),B.error.forEach(this.onError.bind(this)),F.keypress.pipe(d9.takeUntil(B.success)).forEach(this.onKeypress.bind(this)),this.render(),this}render(D){let F=this.getQuestion(),$="";if(F+=this.status==="answered"?this.getMaskedValue(this.answer):this.getMaskedValue(this.rl.line||""),D)$=`
113
113
  `+O6.default.red(">> ")+D;this.screen.render(F,$)}getMaskedValue(D){if(this.status==="answered")return this.opt.mask?O6.default.cyan(AC(D,this.opt.mask)):O6.default.italic(O6.default.dim("[hidden]"));return this.opt.mask?AC(D,this.opt.mask):O6.default.italic(O6.default.dim("[input is hidden] "))}getSpinningValue(D){return this.getMaskedValue(D)}filterInput(D){if(!D)return this.opt.default==null?"":this.opt.default;return D}onEnd(D){this.status="answered",this.answer=D.value,this.render(),this.screen.done(),this.done(D.value)}onError(D){this.render(D.isValid)}onKeypress(){this.opt.default&&=void 0,this.render()}}var X7=l(h0(),1);var aR=l(JR(),1),UX=l(nR(),1);import{spawn as w8D,spawnSync as T8D}from"child_process";import{readFileSync as j8D,unlinkSync as O8D,writeFileSync as I8D}from"fs";import ZX from"path";import P8D from"os";import{randomUUID as S8D}from"crypto";class zX extends Error{originalError;constructor(D){super(`Failed to create temporary file. ${D.message}`);this.originalError=D}}class Q7 extends Error{originalError;constructor(D){super(`Failed to launch editor. ${D.message}`);this.originalError=D}}class VX extends Error{originalError;constructor(D){super(`Failed to read temporary file. ${D.message}`);this.originalError=D}}class AX extends Error{originalError;constructor(D){super(`Failed to remove temporary file. ${D.message}`);this.originalError=D}}function oR(D="",F,$){let B=new sR(D,$);B.runAsync((J,Q)=>{if(J)setImmediate(F,J,void 0);else try{B.cleanup(),setImmediate(F,void 0,Q)}catch(X){setImmediate(F,X,void 0)}})}function iR(D){if(!D)return"";return D.replace(/[^a-zA-Z0-9_.-]/g,"_")}function k8D(D){let F=[],$="";for(let B=0;B<D.length;B++){let J=D.charAt(B);if(B>0&&J===" "&&D[B-1]!=="\\"&&$.length>0)F.push($),$="";else $=`${$}${J}`}if($.length>0)F.push($);return F}class sR{text="";tempFile;editor;lastExitStatus=0;fileOptions={};get temp_file(){return console.log("DEPRECATED: temp_file. Use tempFile moving forward."),this.tempFile}get last_exit_status(){return console.log("DEPRECATED: last_exit_status. Use lastExitStatus moving forward."),this.lastExitStatus}constructor(D="",F){if(this.text=D,F)this.fileOptions=F;this.determineEditor(),this.createTemporaryFile()}run(){return this.launchEditor(),this.readTemporaryFile(),this.text}runAsync(D){try{this.launchEditorAsync(()=>{try{this.readTemporaryFile(),setImmediate(D,void 0,this.text)}catch(F){setImmediate(D,F,void 0)}})}catch(F){setImmediate(D,F,void 0)}}cleanup(){this.removeTemporaryFile()}determineEditor(){let D=process.env.VISUAL?process.env.VISUAL:process.env.EDITOR?process.env.EDITOR:process.platform.startsWith("win")?"notepad":"vim",F=k8D(D).map((B)=>B.replace("\\ "," ")),$=F.shift();this.editor={args:F,bin:$}}createTemporaryFile(){try{let D=this.fileOptions.dir??P8D.tmpdir(),F=S8D(),$=iR(this.fileOptions.prefix),B=iR(this.fileOptions.postfix),J=`${$}${F}${B}`,Q=ZX.resolve(D,J),X=ZX.resolve(D)+ZX.sep;if(!Q.startsWith(X))throw Error("Resolved temporary file escaped the base directory");this.tempFile=Q;let Y={encoding:"utf8",flag:"wx"};if(Object.prototype.hasOwnProperty.call(this.fileOptions,"mode"))Y.mode=this.fileOptions.mode;I8D(this.tempFile,this.text,Y)}catch(D){throw new zX(D)}}readTemporaryFile(){try{let D=j8D(this.tempFile);if(D.length===0)this.text="";else{let F=aR.detect(D)??"utf8";if(!UX.default.encodingExists(F))F="utf8";this.text=UX.default.decode(D,F)}}catch(D){throw new VX(D)}}removeTemporaryFile(){try{O8D(this.tempFile)}catch(D){throw new AX(D)}}launchEditor(){try{let D=T8D(this.editor.bin,this.editor.args.concat([this.tempFile]),{stdio:"inherit"});this.lastExitStatus=D.status??0}catch(D){throw new Q7(D)}}launchEditorAsync(D){try{w8D(this.editor.bin,this.editor.args.concat([this.tempFile]),{stdio:"inherit"}).on("exit",($)=>{this.lastExitStatus=$,setImmediate(D)})}catch(F){throw new Q7(F)}}}var rR=l(k0(),1);class Y7 extends pD{_run(D){this.done=D,this.editorResult=new rR.Subject;let F=oD(this.rl);this.lineSubscription=F.line.subscribe(this.startExternalEditor.bind(this));let $=this.opt.waitUserInput===void 0?!0:this.opt.waitUserInput,B=this.handleSubmitEvents(this.editorResult);if(B.success.forEach(this.onEnd.bind(this)),B.error.forEach(this.onError.bind(this)),this.currentText=this.opt.default,this.opt.default=null,$)this.render();else this.startExternalEditor();return this}render(D){let F="",$=this.getQuestion();if($+=this.status==="answered"?X7.default.dim("Received"):X7.default.dim("Press <enter> to launch your preferred editor."),D)F=X7.default.red(">> ")+D;this.screen.render($,F)}startExternalEditor(){this.rl.pause(),oR(this.currentText,this.endExternalEditor.bind(this),{postfix:this.opt.postfix??".txt"})}endExternalEditor(D,F){if(this.rl.resume(),D)this.editorResult.error(D);else this.editorResult.next(F)}onEnd(D){this.editorResult.unsubscribe(),this.lineSubscription.unsubscribe(),this.answer=D.value,this.status="answered",this.render(),this.screen.done(),this.done(this.answer)}onError(D){this.render(D.isValid)}}import{Writable as _8D}from"stream";var Fw=l(Dw(),1);import y8D from"readline";class a4{constructor(D){this.rl||=y8D.createInterface(x8D(D)),this.rl.resume(),this.onForceClose=this.onForceClose.bind(this),process.on("exit",this.onForceClose),this.rl.on("SIGINT",this.onForceClose)}onForceClose(){this.close(),process.kill(process.pid,"SIGINT"),console.log("")}close(){if(this.rl.removeListener("SIGINT",this.onForceClose),process.removeListener("exit",this.onForceClose),this.rl.output.unmute(),this.activePrompt&&typeof this.activePrompt.close==="function")this.activePrompt.close();this.rl.output.end(),this.rl.pause(),this.rl.close()}}function x8D(D={}){D.skipTTYChecks=D.skipTTYChecks===void 0?!0:D.skipTTYChecks;let F=D.input||process.stdin;if(!D.skipTTYChecks&&!F.isTTY){let J=Error("Prompts can not be meaningfully rendered in non-TTY environments");throw J.isTtyError=!0,J}let $=new Fw.default;return $.pipe(D.output||process.stdout),{terminal:!0,...D,input:F,output:$}}class G7 extends a4{constructor(D={}){super(D);this.log=new _8D({write:(F,$,B)=>{this.writeLog(F),B()}}),this.bottomBar=D.bottomBar||"",this.render()}render(){return this.write(this.bottomBar),this}clean(){return A3(this.rl,this.bottomBar.split(`
114
114
  `).length),this}updateBottomBar(D){return A3(this.rl,1),this.rl.output.unmute(),this.clean(),this.bottomBar=D,this.render(),this.rl.output.mute(),this}writeLog(D){return this.rl.output.unmute(),this.clean(),this.rl.output.write(this.enforceLF(D.toString())),this.render(),this.rl.output.mute(),this}enforceLF(D){return/[\n\r]$/.test(D)?D:D+`
115
- `}write(D){let F=D.split(/\n/);if(this.height=F.length,this.rl.setPrompt(F.at(-1)),this.rl.output.rows===0&&this.rl.output.columns===0)S9(this.rl,D.length+this.rl.line.length);this.rl.output.write(D)}}var YD=l(k0(),1),Jw=l(_F(),1);var H7=l(k0(),1),$w=l(_F(),1),W7=function(D,F,$){if(typeof D[F]!=="function")return H7.of(D);return H7.from($w.default(D[F])($).then((B)=>{return D[F]=B,D}))};var Bw={set:(D,F="",$)=>{let B=D;F.split(".").forEach((J,Q,X)=>{if(J==="__proto__"||J==="constructor")return;if(Q===X.length-1)B[J]=$;else if(!(J in B)||typeof B[J]!=="object")B[J]={};B=B[J]})},get:(D,F="",$)=>{let B=(Q)=>String.prototype.split.call(F,Q).filter(Boolean).reduce((X,Y)=>X!==null&&X!==void 0?X[Y]:X,D),J=B(/[,[\]]+?/)||B(/[,.[\]]+?/);return J===void 0||J===D?$:J}};class T3 extends a4{constructor(D,F){super(F);this.prompts=D}run(D,F){this.answers=typeof F==="object"?{...F}:{};let $;if(Array.isArray(D))$=YD.from(D);else if(YD.isObservable(D))$=D;else if(Object.values(D).every((B)=>typeof B==="object"&&!Array.isArray(B)&&B!=null))$=YD.from(Object.entries(D).map(([B,J])=>({name:B,...J})));else $=YD.from([D]);return this.process=$.pipe(YD.concatMap(this.processQuestion.bind(this)),YD.publish()),this.process.connect(),this.process.pipe(YD.reduce((B,J)=>{return Bw.set(B,J.name,J.answer),B},this.answers)).toPromise(Promise).then(this.onCompletion.bind(this),this.onError.bind(this))}onCompletion(){return this.close(),this.answers}onError(D){return this.close(),Promise.reject(D)}processQuestion(D){return D={...D},YD.defer(()=>{return YD.of(D).pipe(YD.concatMap(this.setDefaultType.bind(this)),YD.concatMap(this.filterIfRunnable.bind(this)),YD.concatMap(()=>W7(D,"message",this.answers)),YD.concatMap(()=>W7(D,"default",this.answers)),YD.concatMap(()=>W7(D,"choices",this.answers)),YD.concatMap(this.fetchAnswer.bind(this)))})}fetchAnswer(D){let F=this.prompts[D.type];return this.activePrompt=new F(D,this.rl,this.answers),YD.defer(()=>YD.from(this.activePrompt.run().then(($)=>({name:D.name,answer:$}))))}setDefaultType(D){if(!this.prompts[D.type])D.type="input";return YD.defer(()=>YD.of(D))}filterIfRunnable(D){if(D.askAnswered!==!0&&Bw.get(this.answers,D.name)!==void 0)return YD.EMPTY;if(D.when===!1)return YD.EMPTY;if(typeof D.when!=="function")return YD.of(D);let{answers:F}=this;return YD.defer(()=>YD.from(Jw.default(D.when)(F).then(($)=>{if($)return D})).pipe(YD.filter(($)=>$!=null)))}}function Qw(D){let F=function($,B){let J;try{J=new T3(F.prompts,D)}catch(X){return Promise.reject(X)}let Q=J.run($,B);return Q.ui=J,Q};return F.prompts={},F.registerPrompt=function($,B){return F.prompts[$]=B,this},F.restoreDefaultPrompts=function(){this.registerPrompt("list",y9),this.registerPrompt("input",u4),this.registerPrompt("number",_9),this.registerPrompt("confirm",g9),this.registerPrompt("rawlist",b9),this.registerPrompt("expand",m9),this.registerPrompt("checkbox",l9),this.registerPrompt("password",p9),this.registerPrompt("editor",Y7)},F.restoreDefaultPrompts(),F}var LX=Qw();function g8D(D,F){LX.registerPrompt(D,F)}function h8D(){LX.restoreDefaultPrompts()}var b8D={prompt:LX,ui:{BottomBar:G7,Prompt:T3},createPromptModule:Qw,registerPrompt:g8D,restoreDefaultPrompts:h8D,Separator:v0},ID=b8D;import V7 from"process";import zw from"process";import K7 from"process";var u8D=(D,F,$,B)=>{if($==="length"||$==="prototype")return;if($==="arguments"||$==="caller")return;let J=Object.getOwnPropertyDescriptor(D,$),Q=Object.getOwnPropertyDescriptor(F,$);if(!m8D(J,Q)&&B)return;Object.defineProperty(D,$,Q)},m8D=function(D,F){return D===void 0||D.configurable||D.writable===F.writable&&D.enumerable===F.enumerable&&D.configurable===F.configurable&&(D.writable||D.value===F.value)},l8D=(D,F)=>{let $=Object.getPrototypeOf(F);if($===Object.getPrototypeOf(D))return;Object.setPrototypeOf(D,$)},d8D=(D,F)=>`/* Wrapped ${D}*/
115
+ `}write(D){let F=D.split(/\n/);if(this.height=F.length,this.rl.setPrompt(F.at(-1)),this.rl.output.rows===0&&this.rl.output.columns===0)S9(this.rl,D.length+this.rl.line.length);this.rl.output.write(D)}}var YD=l(k0(),1),Jw=l(_F(),1);var H7=l(k0(),1),$w=l(_F(),1),W7=function(D,F,$){if(typeof D[F]!=="function")return H7.of(D);return H7.from($w.default(D[F])($).then((B)=>{return D[F]=B,D}))};var Bw={set:(D,F="",$)=>{let B=D;F.split(".").forEach((J,Q,X)=>{if(J==="__proto__"||J==="constructor")return;if(Q===X.length-1)B[J]=$;else if(!(J in B)||typeof B[J]!=="object")B[J]={};B=B[J]})},get:(D,F="",$)=>{let B=(Q)=>String.prototype.split.call(F,Q).filter(Boolean).reduce((X,Y)=>X!==null&&X!==void 0?X[Y]:X,D),J=B(/[,[\]]+?/)||B(/[,.[\]]+?/);return J===void 0||J===D?$:J}};class T3 extends a4{constructor(D,F){super(F);this.prompts=D}run(D,F){this.answers=typeof F==="object"?{...F}:{};let $;if(Array.isArray(D))$=YD.from(D);else if(YD.isObservable(D))$=D;else if(Object.values(D).every((B)=>typeof B==="object"&&!Array.isArray(B)&&B!=null))$=YD.from(Object.entries(D).map(([B,J])=>({name:B,...J})));else $=YD.from([D]);return this.process=$.pipe(YD.concatMap(this.processQuestion.bind(this)),YD.publish()),this.process.connect(),this.process.pipe(YD.reduce((B,J)=>{return Bw.set(B,J.name,J.answer),B},this.answers)).toPromise(Promise).then(this.onCompletion.bind(this),this.onError.bind(this))}onCompletion(){return this.close(),this.answers}onError(D){return this.close(),Promise.reject(D)}processQuestion(D){return D={...D},YD.defer(()=>{return YD.of(D).pipe(YD.concatMap(this.setDefaultType.bind(this)),YD.concatMap(this.filterIfRunnable.bind(this)),YD.concatMap(()=>W7(D,"message",this.answers)),YD.concatMap(()=>W7(D,"default",this.answers)),YD.concatMap(()=>W7(D,"choices",this.answers)),YD.concatMap(this.fetchAnswer.bind(this)))})}fetchAnswer(D){let F=this.prompts[D.type];return this.activePrompt=new F(D,this.rl,this.answers),YD.defer(()=>YD.from(this.activePrompt.run().then(($)=>({name:D.name,answer:$}))))}setDefaultType(D){if(!this.prompts[D.type])D.type="input";return YD.defer(()=>YD.of(D))}filterIfRunnable(D){if(D.askAnswered!==!0&&Bw.get(this.answers,D.name)!==void 0)return YD.EMPTY;if(D.when===!1)return YD.EMPTY;if(typeof D.when!=="function")return YD.of(D);let{answers:F}=this;return YD.defer(()=>YD.from(Jw.default(D.when)(F).then(($)=>{if($)return D})).pipe(YD.filter(($)=>$!=null)))}}function Qw(D){let F=function($,B){let J;try{J=new T3(F.prompts,D)}catch(X){return Promise.reject(X)}let Q=J.run($,B);return Q.ui=J,Q};return F.prompts={},F.registerPrompt=function($,B){return F.prompts[$]=B,this},F.restoreDefaultPrompts=function(){this.registerPrompt("list",y9),this.registerPrompt("input",u4),this.registerPrompt("number",_9),this.registerPrompt("confirm",g9),this.registerPrompt("rawlist",b9),this.registerPrompt("expand",m9),this.registerPrompt("checkbox",l9),this.registerPrompt("password",p9),this.registerPrompt("editor",Y7)},F.restoreDefaultPrompts(),F}var LX=Qw();function g8D(D,F){LX.registerPrompt(D,F)}function h8D(){LX.restoreDefaultPrompts()}var b8D={prompt:LX,ui:{BottomBar:G7,Prompt:T3},createPromptModule:Qw,registerPrompt:g8D,restoreDefaultPrompts:h8D,Separator:v0},OD=b8D;import V7 from"process";import zw from"process";import K7 from"process";var u8D=(D,F,$,B)=>{if($==="length"||$==="prototype")return;if($==="arguments"||$==="caller")return;let J=Object.getOwnPropertyDescriptor(D,$),Q=Object.getOwnPropertyDescriptor(F,$);if(!m8D(J,Q)&&B)return;Object.defineProperty(D,$,Q)},m8D=function(D,F){return D===void 0||D.configurable||D.writable===F.writable&&D.enumerable===F.enumerable&&D.configurable===F.configurable&&(D.writable||D.value===F.value)},l8D=(D,F)=>{let $=Object.getPrototypeOf(F);if($===Object.getPrototypeOf(D))return;Object.setPrototypeOf(D,$)},d8D=(D,F)=>`/* Wrapped ${D}*/
116
116
  ${F}`,p8D=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),c8D=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),n8D=(D,F,$)=>{let B=$===""?"":`with ${$.trim()}() `,J=d8D.bind(null,B,F.toString());Object.defineProperty(J,"name",c8D);let{writable:Q,enumerable:X,configurable:Y}=p8D;Object.defineProperty(D,"toString",{value:J,writable:Q,enumerable:X,configurable:Y})};function j3(D,F,{ignoreNonConfigurable:$=!1}={}){let{name:B}=D;for(let J of Reflect.ownKeys(F))u8D(D,F,J,$);return l8D(D,F),n8D(D,F,B),D}var E7=new WeakMap,Xw=(D,F={})=>{if(typeof D!=="function")throw TypeError("Expected a function");let $,B=0,J=D.displayName||D.name||"<anonymous>",Q=function(...X){if(E7.set(Q,++B),B===1)$=D.apply(this,X),D=void 0;else if(F.throw===!0)throw Error(`Function \`${J}\` can only be called once`);return $};return j3(Q,D),E7.set(Q,B),Q};Xw.callCount=(D)=>{if(!E7.has(D))throw Error(`The given function \`${D.name}\` is not wrapped by the \`onetime\` package`);return E7.get(D)};var Yw=Xw;var S6=[];S6.push("SIGHUP","SIGINT","SIGTERM");if(process.platform!=="win32")S6.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");if(process.platform==="linux")S6.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");var q7=(D)=>!!D&&typeof D==="object"&&typeof D.removeListener==="function"&&typeof D.emit==="function"&&typeof D.reallyExit==="function"&&typeof D.listeners==="function"&&typeof D.kill==="function"&&typeof D.pid==="number"&&typeof D.on==="function",MX=Symbol.for("signal-exit emitter"),NX=globalThis,i8D=Object.defineProperty.bind(Object);class Gw{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(NX[MX])return NX[MX];i8D(NX,MX,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(D,F){this.listeners[D].push(F)}removeListener(D,F){let $=this.listeners[D],B=$.indexOf(F);if(B===-1)return;if(B===0&&$.length===1)$.length=0;else $.splice(B,1)}emit(D,F,$){if(this.emitted[D])return!1;this.emitted[D]=!0;let B=!1;for(let J of this.listeners[D])B=J(F,$)===!0||B;if(D==="exit")B=this.emit("afterExit",F,$)||B;return B}}class RX{}var a8D=(D)=>{return{onExit(F,$){return D.onExit(F,$)},load(){return D.load()},unload(){return D.unload()}}};class Hw extends RX{onExit(){return()=>{}}load(){}unload(){}}class Ww extends RX{#$=CX.platform==="win32"?"SIGINT":"SIGHUP";#F=new Gw;#D;#J;#q;#B={};#X=!1;constructor(D){super();this.#D=D,this.#B={};for(let F of S6)this.#B[F]=()=>{let $=this.#D.listeners(F),{count:B}=this.#F,J=D;if(typeof J.__signal_exit_emitter__==="object"&&typeof J.__signal_exit_emitter__.count==="number")B+=J.__signal_exit_emitter__.count;if($.length===B){this.unload();let Q=this.#F.emit("exit",null,F),X=F==="SIGHUP"?this.#$:F;if(!Q)D.kill(D.pid,X)}};this.#q=D.reallyExit,this.#J=D.emit}onExit(D,F){if(!q7(this.#D))return()=>{};if(this.#X===!1)this.load();let $=F?.alwaysLast?"afterExit":"exit";return this.#F.on($,D),()=>{if(this.#F.removeListener($,D),this.#F.listeners.exit.length===0&&this.#F.listeners.afterExit.length===0)this.unload()}}load(){if(this.#X)return;this.#X=!0,this.#F.count+=1;for(let D of S6)try{let F=this.#B[D];if(F)this.#D.on(D,F)}catch(F){}this.#D.emit=(D,...F)=>{return this.#K(D,...F)},this.#D.reallyExit=(D)=>{return this.#Q(D)}}unload(){if(!this.#X)return;this.#X=!1,S6.forEach((D)=>{let F=this.#B[D];if(!F)throw Error("Listener not defined for signal: "+D);try{this.#D.removeListener(D,F)}catch($){}}),this.#D.emit=this.#J,this.#D.reallyExit=this.#q,this.#F.count-=1}#Q(D){if(!q7(this.#D))return 0;return this.#D.exitCode=D||0,this.#F.emit("exit",this.#D.exitCode,null),this.#q.call(this.#D,this.#D.exitCode)}#K(D,...F){let $=this.#J;if(D==="exit"&&q7(this.#D)){if(typeof F[0]==="number")this.#D.exitCode=F[0];let B=$.call(this.#D,D,...F);return this.#F.emit("exit",this.#D.exitCode,null),B}else return $.call(this.#D,D,...F)}}var CX=globalThis.process,{onExit:Ew,load:$ZD,unload:BZD}=a8D(q7(CX)?new Ww(CX):new Hw);var qw=K7.stderr.isTTY?K7.stderr:K7.stdout.isTTY?K7.stdout:void 0,o8D=qw?Yw(()=>{Ew(()=>{qw.write("\x1B[?25h")},{alwaysLast:!0})}):()=>{},Kw=o8D;var z7=!1,o4={};o4.show=(D=zw.stderr)=>{if(!D.isTTY)return;z7=!1,D.write("\x1B[?25h")};o4.hide=(D=zw.stderr)=>{if(!D.isTTY)return;Kw(),z7=!0,D.write("\x1B[?25l")};o4.toggle=(D,F)=>{if(D!==void 0)z7=D;if(z7)o4.show(F);else o4.hide(F)};var wX=o4;var P3=l(H9(),1);import X1 from"process";function TX(){if(X1.platform!=="win32")return X1.env.TERM!=="linux";return Boolean(X1.env.CI)||Boolean(X1.env.WT_SESSION)||Boolean(X1.env.TERMINUS_SUBLIME)||X1.env.ConEmuTask==="{cmd::Cmder}"||X1.env.TERM_PROGRAM==="Terminus-Sublime"||X1.env.TERM_PROGRAM==="vscode"||X1.env.TERM==="xterm-256color"||X1.env.TERM==="alacritty"||X1.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var s8D={info:W.blue("\u2139"),success:W.green("\u2714"),warning:W.yellow("\u26A0"),error:W.red("\u2716")},r8D={info:W.blue("i"),success:W.green("\u221A"),warning:W.yellow("\u203C"),error:W.red("\xD7")},t8D=TX()?s8D:r8D,O3=t8D;function jX({onlyFirst:D=!1}={}){return new RegExp("(?:\\u001B\\][\\s\\S]*?(?:\\u0007|\\u001B\\u005C|\\u009C))|[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]",D?void 0:"g")}var e8D=jX();function I3(D){if(typeof D!=="string")throw TypeError(`Expected a \`string\`, got \`${typeof D}\``);return D.replace(e8D,"")}function Vw(D){return D===161||D===164||D===167||D===168||D===170||D===173||D===174||D>=176&&D<=180||D>=182&&D<=186||D>=188&&D<=191||D===198||D===208||D===215||D===216||D>=222&&D<=225||D===230||D>=232&&D<=234||D===236||D===237||D===240||D===242||D===243||D>=247&&D<=250||D===252||D===254||D===257||D===273||D===275||D===283||D===294||D===295||D===299||D>=305&&D<=307||D===312||D>=319&&D<=322||D===324||D>=328&&D<=331||D===333||D===338||D===339||D===358||D===359||D===363||D===462||D===464||D===466||D===468||D===470||D===472||D===474||D===476||D===593||D===609||D===708||D===711||D>=713&&D<=715||D===717||D===720||D>=728&&D<=731||D===733||D===735||D>=768&&D<=879||D>=913&&D<=929||D>=931&&D<=937||D>=945&&D<=961||D>=963&&D<=969||D===1025||D>=1040&&D<=1103||D===1105||D===8208||D>=8211&&D<=8214||D===8216||D===8217||D===8220||D===8221||D>=8224&&D<=8226||D>=8228&&D<=8231||D===8240||D===8242||D===8243||D===8245||D===8251||D===8254||D===8308||D===8319||D>=8321&&D<=8324||D===8364||D===8451||D===8453||D===8457||D===8467||D===8470||D===8481||D===8482||D===8486||D===8491||D===8531||D===8532||D>=8539&&D<=8542||D>=8544&&D<=8555||D>=8560&&D<=8569||D===8585||D>=8592&&D<=8601||D===8632||D===8633||D===8658||D===8660||D===8679||D===8704||D===8706||D===8707||D===8711||D===8712||D===8715||D===8719||D===8721||D===8725||D===8730||D>=8733&&D<=8736||D===8739||D===8741||D>=8743&&D<=8748||D===8750||D>=8756&&D<=8759||D===8764||D===8765||D===8776||D===8780||D===8786||D===8800||D===8801||D>=8804&&D<=8807||D===8810||D===8811||D===8814||D===8815||D===8834||D===8835||D===8838||D===8839||D===8853||D===8857||D===8869||D===8895||D===8978||D>=9312&&D<=9449||D>=9451&&D<=9547||D>=9552&&D<=9587||D>=9600&&D<=9615||D>=9618&&D<=9621||D===9632||D===9633||D>=9635&&D<=9641||D===9650||D===9651||D===9654||D===9655||D===9660||D===9661||D===9664||D===9665||D>=9670&&D<=9672||D===9675||D>=9678&&D<=9681||D>=9698&&D<=9701||D===9711||D===9733||D===9734||D===9737||D===9742||D===9743||D===9756||D===9758||D===9792||D===9794||D===9824||D===9825||D>=9827&&D<=9829||D>=9831&&D<=9834||D===9836||D===9837||D===9839||D===9886||D===9887||D===9919||D>=9926&&D<=9933||D>=9935&&D<=9939||D>=9941&&D<=9953||D===9955||D===9960||D===9961||D>=9963&&D<=9969||D===9972||D>=9974&&D<=9977||D===9979||D===9980||D===9982||D===9983||D===10045||D>=10102&&D<=10111||D>=11094&&D<=11097||D>=12872&&D<=12879||D>=57344&&D<=63743||D>=65024&&D<=65039||D===65533||D>=127232&&D<=127242||D>=127248&&D<=127277||D>=127280&&D<=127337||D>=127344&&D<=127373||D===127375||D===127376||D>=127387&&D<=127404||D>=917760&&D<=917999||D>=983040&&D<=1048573||D>=1048576&&D<=1114109}function Aw(D){return D===12288||D>=65281&&D<=65376||D>=65504&&D<=65510}function Zw(D){return D>=4352&&D<=4447||D===8986||D===8987||D===9001||D===9002||D>=9193&&D<=9196||D===9200||D===9203||D===9725||D===9726||D===9748||D===9749||D>=9776&&D<=9783||D>=9800&&D<=9811||D===9855||D>=9866&&D<=9871||D===9875||D===9889||D===9898||D===9899||D===9917||D===9918||D===9924||D===9925||D===9934||D===9940||D===9962||D===9970||D===9971||D===9973||D===9978||D===9981||D===9989||D===9994||D===9995||D===10024||D===10060||D===10062||D>=10067&&D<=10069||D===10071||D>=10133&&D<=10135||D===10160||D===10175||D===11035||D===11036||D===11088||D===11093||D>=11904&&D<=11929||D>=11931&&D<=12019||D>=12032&&D<=12245||D>=12272&&D<=12287||D>=12289&&D<=12350||D>=12353&&D<=12438||D>=12441&&D<=12543||D>=12549&&D<=12591||D>=12593&&D<=12686||D>=12688&&D<=12773||D>=12783&&D<=12830||D>=12832&&D<=12871||D>=12880&&D<=42124||D>=42128&&D<=42182||D>=43360&&D<=43388||D>=44032&&D<=55203||D>=63744&&D<=64255||D>=65040&&D<=65049||D>=65072&&D<=65106||D>=65108&&D<=65126||D>=65128&&D<=65131||D>=94176&&D<=94180||D>=94192&&D<=94198||D>=94208&&D<=101589||D>=101631&&D<=101662||D>=101760&&D<=101874||D>=110576&&D<=110579||D>=110581&&D<=110587||D===110589||D===110590||D>=110592&&D<=110882||D===110898||D>=110928&&D<=110930||D===110933||D>=110948&&D<=110951||D>=110960&&D<=111355||D>=119552&&D<=119638||D>=119648&&D<=119670||D===126980||D===127183||D===127374||D>=127377&&D<=127386||D>=127488&&D<=127490||D>=127504&&D<=127547||D>=127552&&D<=127560||D===127568||D===127569||D>=127584&&D<=127589||D>=127744&&D<=127776||D>=127789&&D<=127797||D>=127799&&D<=127868||D>=127870&&D<=127891||D>=127904&&D<=127946||D>=127951&&D<=127955||D>=127968&&D<=127984||D===127988||D>=127992&&D<=128062||D===128064||D>=128066&&D<=128252||D>=128255&&D<=128317||D>=128331&&D<=128334||D>=128336&&D<=128359||D===128378||D===128405||D===128406||D===128420||D>=128507&&D<=128591||D>=128640&&D<=128709||D===128716||D>=128720&&D<=128722||D>=128725&&D<=128728||D>=128732&&D<=128735||D===128747||D===128748||D>=128756&&D<=128764||D>=128992&&D<=129003||D===129008||D>=129292&&D<=129338||D>=129340&&D<=129349||D>=129351&&D<=129535||D>=129648&&D<=129660||D>=129664&&D<=129674||D>=129678&&D<=129734||D===129736||D>=129741&&D<=129756||D>=129759&&D<=129770||D>=129775&&D<=129784||D>=131072&&D<=196605||D>=196608&&D<=262141}function D6D(D){if(!Number.isSafeInteger(D))throw TypeError(`Expected a code point, got \`${typeof D}\`.`)}function Uw(D,{ambiguousAsWide:F=!1}={}){if(D6D(D),Aw(D)||Zw(D)||F&&Vw(D))return 2;return 1}var Lw=()=>{return/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E-\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED8\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])))?))?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3C-\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE8A\uDE8E-\uDEC2\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF]|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g};var F6D=new Intl.Segmenter,$6D=/^\p{Default_Ignorable_Code_Point}$/u;function OX(D,F={}){if(typeof D!=="string"||D.length===0)return 0;let{ambiguousIsNarrow:$=!0,countAnsiEscapeCodes:B=!1}=F;if(!B)D=I3(D);if(D.length===0)return 0;let J=0,Q={ambiguousAsWide:!$};for(let{segment:X}of F6D.segment(D)){let Y=X.codePointAt(0);if(Y<=31||Y>=127&&Y<=159)continue;if(Y>=8203&&Y<=8207||Y===65279)continue;if(Y>=768&&Y<=879||Y>=6832&&Y<=6911||Y>=7616&&Y<=7679||Y>=8400&&Y<=8447||Y>=65056&&Y<=65071)continue;if(Y>=55296&&Y<=57343)continue;if(Y>=65024&&Y<=65039)continue;if($6D.test(X))continue;if(Lw().test(X)){J+=2;continue}J+=Uw(Y,Q)}return J}function IX({stream:D=process.stdout}={}){return Boolean(D&&D.isTTY&&process.env.TERM!=="dumb"&&!("CI"in process.env))}import Mw from"process";function PX(){let{env:D}=Mw,{TERM:F,TERM_PROGRAM:$}=D;if(Mw.platform!=="win32")return F!=="linux";return Boolean(D.WT_SESSION)||Boolean(D.TERMINUS_SUBLIME)||D.ConEmuTask==="{cmd::Cmder}"||$==="Terminus-Sublime"||$==="vscode"||F==="xterm-256color"||F==="alacritty"||F==="rxvt-unicode"||F==="rxvt-unicode-256color"||D.TERMINAL_EMULATOR==="JetBrains-JediTerm"}import h1 from"process";var B6D=3;class Nw{#$=0;start(){if(this.#$++,this.#$===1)this.#F()}stop(){if(this.#$<=0)throw Error("`stop` called more times than `start`");if(this.#$--,this.#$===0)this.#D()}#F(){if(h1.platform==="win32"||!h1.stdin.isTTY)return;h1.stdin.setRawMode(!0),h1.stdin.on("data",this.#J),h1.stdin.resume()}#D(){if(!h1.stdin.isTTY)return;h1.stdin.off("data",this.#J),h1.stdin.pause(),h1.stdin.setRawMode(!1)}#J(D){if(D[0]===B6D)h1.emit("SIGINT")}}var J6D=new Nw,SX=J6D;var Q6D=l(H9(),1);class Cw{#$=0;#F=!1;#D=0;#J=-1;#q=0;#B;#X;#Q;#K;#V;#H;#W;#E;#A;#Y;#G;color;constructor(D){if(typeof D==="string")D={text:D};if(this.#B={color:"cyan",stream:V7.stderr,discardStdin:!0,hideCursor:!0,...D},this.color=this.#B.color,this.spinner=this.#B.spinner,this.#V=this.#B.interval,this.#Q=this.#B.stream,this.#H=typeof this.#B.isEnabled==="boolean"?this.#B.isEnabled:IX({stream:this.#Q}),this.#W=typeof this.#B.isSilent==="boolean"?this.#B.isSilent:!1,this.text=this.#B.text,this.prefixText=this.#B.prefixText,this.suffixText=this.#B.suffixText,this.indent=this.#B.indent,V7.env.NODE_ENV==="test")this._stream=this.#Q,this._isEnabled=this.#H,Object.defineProperty(this,"_linesToClear",{get(){return this.#$},set(F){this.#$=F}}),Object.defineProperty(this,"_frameIndex",{get(){return this.#J}}),Object.defineProperty(this,"_lineCount",{get(){return this.#D}})}get indent(){return this.#E}set indent(D=0){if(!(D>=0&&Number.isInteger(D)))throw Error("The `indent` option must be an integer from 0 and up");this.#E=D,this.#z()}get interval(){return this.#V??this.#X.interval??100}get spinner(){return this.#X}set spinner(D){if(this.#J=-1,this.#V=void 0,typeof D==="object"){if(D.frames===void 0)throw Error("The given spinner must have a `frames` property");this.#X=D}else if(!PX())this.#X=P3.default.line;else if(D===void 0)this.#X=P3.default.dots;else if(D!=="default"&&P3.default[D])this.#X=P3.default[D];else throw Error(`There is no built-in spinner named '${D}'. See https://github.com/sindresorhus/cli-spinners/blob/main/spinners.json for a full list.`)}get text(){return this.#A}set text(D=""){this.#A=D,this.#z()}get prefixText(){return this.#Y}set prefixText(D=""){this.#Y=D,this.#z()}get suffixText(){return this.#G}set suffixText(D=""){this.#G=D,this.#z()}get isSpinning(){return this.#K!==void 0}#Z(D=this.#Y,F=" "){if(typeof D==="string"&&D!=="")return D+F;if(typeof D==="function")return D()+F;return""}#U(D=this.#G,F=" "){if(typeof D==="string"&&D!=="")return F+D;if(typeof D==="function")return F+D();return""}#z(){let D=this.#Q.columns??80,F=this.#Z(this.#Y,"-"),$=this.#U(this.#G,"-"),B=" ".repeat(this.#E)+F+"--"+this.#A+"--"+$;this.#D=0;for(let J of I3(B).split(`
117
117
  `))this.#D+=Math.max(1,Math.ceil(OX(J,{countAnsiEscapeCodes:!0})/D))}get isEnabled(){return this.#H&&!this.#W}set isEnabled(D){if(typeof D!=="boolean")throw TypeError("The `isEnabled` option must be a boolean");this.#H=D}get isSilent(){return this.#W}set isSilent(D){if(typeof D!=="boolean")throw TypeError("The `isSilent` option must be a boolean");this.#W=D}frame(){let D=Date.now();if(this.#J===-1||D-this.#q>=this.interval)this.#J=++this.#J%this.#X.frames.length,this.#q=D;let{frames:F}=this.#X,$=F[this.#J];if(this.color)$=W[this.color]($);let B=typeof this.#Y==="string"&&this.#Y!==""?this.#Y+" ":"",J=typeof this.text==="string"?" "+this.text:"",Q=typeof this.#G==="string"&&this.#G!==""?" "+this.#G:"";return B+$+J+Q}clear(){if(!this.#H||!this.#Q.isTTY)return this;this.#Q.cursorTo(0);for(let D=0;D<this.#$;D++){if(D>0)this.#Q.moveCursor(0,-1);this.#Q.clearLine(1)}if(this.#E||this.lastIndent!==this.#E)this.#Q.cursorTo(this.#E);return this.lastIndent=this.#E,this.#$=0,this}render(){if(this.#W)return this;return this.clear(),this.#Q.write(this.frame()),this.#$=this.#D,this}start(D){if(D)this.text=D;if(this.#W)return this;if(!this.#H){if(this.text)this.#Q.write(`- ${this.text}
118
118
  `);return this}if(this.isSpinning)return this;if(this.#B.hideCursor)wX.hide(this.#Q);if(this.#B.discardStdin&&V7.stdin.isTTY)this.#F=!0,SX.start();return this.render(),this.#K=setInterval(this.render.bind(this),this.interval),this}stop(){if(!this.#H)return this;if(clearInterval(this.#K),this.#K=void 0,this.#J=0,this.clear(),this.#B.hideCursor)wX.show(this.#Q);if(this.#B.discardStdin&&V7.stdin.isTTY&&this.#F)SX.stop(),this.#F=!1;return this}succeed(D){return this.stopAndPersist({symbol:O3.success,text:D})}fail(D){return this.stopAndPersist({symbol:O3.error,text:D})}warn(D){return this.stopAndPersist({symbol:O3.warning,text:D})}info(D){return this.stopAndPersist({symbol:O3.info,text:D})}stopAndPersist(D={}){if(this.#W)return this;let F=D.prefixText??this.#Y,$=this.#Z(F," "),B=D.symbol??" ",J=D.text??this.text,X=typeof J==="string"?(B?" ":"")+J:"",Y=D.suffixText??this.#G,G=this.#U(Y," "),H=$+B+X+G+`
119
- `;return this.stop(),this.#Q.write(H),this}}function R(D){return new Cw(D)}import{isDeepStrictEqual as D2D}from"util";import tk from"process";import m6 from"fs";import ek from"path";import E5 from"crypto";import F2D from"assert";var k6=(D)=>{let F=typeof D;return D!==null&&(F==="object"||F==="function")};var kX=new Set(["__proto__","prototype","constructor"]),X6D=new Set("0123456789");function A7(D){let F=[],$="",B="start",J=!1;for(let Q of D)switch(Q){case"\\":{if(B==="index")throw Error("Invalid character in an index");if(B==="indexEnd")throw Error("Invalid character after an index");if(J)$+=Q;B="property",J=!J;break}case".":{if(B==="index")throw Error("Invalid character in an index");if(B==="indexEnd"){B="property";break}if(J){J=!1,$+=Q;break}if(kX.has($))return[];F.push($),$="",B="property";break}case"[":{if(B==="index")throw Error("Invalid character in an index");if(B==="indexEnd"){B="index";break}if(J){J=!1,$+=Q;break}if(B==="property"){if(kX.has($))return[];F.push($),$=""}B="index";break}case"]":{if(B==="index"){F.push(Number.parseInt($,10)),$="",B="indexEnd";break}if(B==="indexEnd")throw Error("Invalid character after an index")}default:{if(B==="index"&&!X6D.has(Q))throw Error("Invalid character in an index");if(B==="indexEnd")throw Error("Invalid character after an index");if(B==="start")B="property";if(J)J=!1,$+="\\";$+=Q}}if(J)$+="\\";switch(B){case"property":{if(kX.has($))return[];F.push($);break}case"index":throw Error("Index was not closed");case"start":{F.push("");break}}return F}function vX(D,F){if(typeof F!=="number"&&Array.isArray(D)){let $=Number.parseInt(F,10);return Number.isInteger($)&&D[$]===D[F]}return!1}function Rw(D,F){if(vX(D,F))throw Error("Cannot use string index")}function ww(D,F,$){if(!k6(D)||typeof F!=="string")return $===void 0?D:$;let B=A7(F);if(B.length===0)return $;for(let J=0;J<B.length;J++){let Q=B[J];if(vX(D,Q))D=J===B.length-1?void 0:null;else D=D[Q];if(D===void 0||D===null){if(J!==B.length-1)return $;break}}return D===void 0?$:D}function yX(D,F,$){if(!k6(D)||typeof F!=="string")return D;let B=D,J=A7(F);for(let Q=0;Q<J.length;Q++){let X=J[Q];if(Rw(D,X),Q===J.length-1)D[X]=$;else if(!k6(D[X]))D[X]=typeof J[Q+1]==="number"?[]:{};D=D[X]}return B}function Tw(D,F){if(!k6(D)||typeof F!=="string")return!1;let $=A7(F);for(let B=0;B<$.length;B++){let J=$[B];if(Rw(D,J),B===$.length-1)return delete D[J],!0;if(D=D[J],!k6(D))return!1}}function jw(D,F){if(!k6(D)||typeof F!=="string")return!1;let $=A7(F);if($.length===0)return!1;for(let B of $){if(!k6(D)||!(B in D)||vX(D,B))return!1;D=D[B]}return!0}import PD from"path";import Ow from"os";import xX from"process";var o8=Ow.homedir(),_X=Ow.tmpdir(),{env:s4}=xX,Y6D=(D)=>{let F=PD.join(o8,"Library");return{data:PD.join(F,"Application Support",D),config:PD.join(F,"Preferences",D),cache:PD.join(F,"Caches",D),log:PD.join(F,"Logs",D),temp:PD.join(_X,D)}},G6D=(D)=>{let F=s4.APPDATA||PD.join(o8,"AppData","Roaming"),$=s4.LOCALAPPDATA||PD.join(o8,"AppData","Local");return{data:PD.join($,D,"Data"),config:PD.join(F,D,"Config"),cache:PD.join($,D,"Cache"),log:PD.join($,D,"Log"),temp:PD.join(_X,D)}},H6D=(D)=>{let F=PD.basename(o8);return{data:PD.join(s4.XDG_DATA_HOME||PD.join(o8,".local","share"),D),config:PD.join(s4.XDG_CONFIG_HOME||PD.join(o8,".config"),D),cache:PD.join(s4.XDG_CACHE_HOME||PD.join(o8,".cache"),D),log:PD.join(s4.XDG_STATE_HOME||PD.join(o8,".local","state"),D),temp:PD.join(_X,F,D)}};function fX(D,{suffix:F="nodejs"}={}){if(typeof D!=="string")throw TypeError(`Expected a string, got ${typeof D}`);if(F)D+=`-${F}`;if(xX.platform==="darwin")return Y6D(D);if(xX.platform==="win32")return G6D(D);return H6D(D)}import Z6D from"path";import WD from"fs";import{promisify as Q0}from"util";var W6D=(D,F)=>{let{onError:$}=F;return function(...J){return D.apply(void 0,J).catch($)}},b1=W6D;var E6D=(D,F)=>{let{onError:$}=F;return function(...J){try{return D.apply(void 0,J)}catch(Q){return $(Q)}}},Y1=E6D;var Iw=250;var q6D=(D,F)=>{let{isRetriable:$}=F;return function(J){let{timeout:Q}=J,X=J.interval??Iw,Y=Date.now()+Q;return function G(...H){return D.apply(void 0,H).catch((E)=>{if(!$(E))throw E;if(Date.now()>=Y)throw E;let K=Math.round(X*Math.random());if(K>0)return new Promise((A)=>setTimeout(A,K)).then(()=>G.apply(void 0,H));else return G.apply(void 0,H)})}}},u1=q6D;var K6D=(D,F)=>{let{isRetriable:$}=F;return function(J){let{timeout:Q}=J,X=Date.now()+Q;return function(...G){while(!0)try{return D.apply(void 0,G)}catch(H){if(!$(H))throw H;if(Date.now()>=X)throw H;continue}}}},m1=K6D;import Sw from"process";var S3={isChangeErrorOk:(D)=>{if(!S3.isNodeError(D))return!1;let{code:F}=D;if(F==="ENOSYS")return!0;if(!Pw&&(F==="EINVAL"||F==="EPERM"))return!0;return!1},isNodeError:(D)=>{return D instanceof Error},isRetriableError:(D)=>{if(!S3.isNodeError(D))return!1;let{code:F}=D;if(F==="EMFILE"||F==="ENFILE"||F==="EAGAIN"||F==="EBUSY"||F==="EACCESS"||F==="EACCES"||F==="EACCS"||F==="EPERM")return!0;return!1},onChangeError:(D)=>{if(!S3.isNodeError(D))throw D;if(S3.isChangeErrorOk(D))return;throw D}},gX=S3;var k3={onError:gX.onChangeError},C0={onError:()=>{return}},Pw=Sw.getuid?!Sw.getuid():!1,tD={isRetriable:gX.isRetriableError};var z6D={attempt:{chmod:b1(Q0(WD.chmod),k3),chown:b1(Q0(WD.chown),k3),close:b1(Q0(WD.close),C0),fsync:b1(Q0(WD.fsync),C0),mkdir:b1(Q0(WD.mkdir),C0),realpath:b1(Q0(WD.realpath),C0),stat:b1(Q0(WD.stat),C0),unlink:b1(Q0(WD.unlink),C0),chmodSync:Y1(WD.chmodSync,k3),chownSync:Y1(WD.chownSync,k3),closeSync:Y1(WD.closeSync,C0),existsSync:Y1(WD.existsSync,C0),fsyncSync:Y1(WD.fsync,C0),mkdirSync:Y1(WD.mkdirSync,C0),realpathSync:Y1(WD.realpathSync,C0),statSync:Y1(WD.statSync,C0),unlinkSync:Y1(WD.unlinkSync,C0)},retry:{close:u1(Q0(WD.close),tD),fsync:u1(Q0(WD.fsync),tD),open:u1(Q0(WD.open),tD),readFile:u1(Q0(WD.readFile),tD),rename:u1(Q0(WD.rename),tD),stat:u1(Q0(WD.stat),tD),write:u1(Q0(WD.write),tD),writeFile:u1(Q0(WD.writeFile),tD),closeSync:m1(WD.closeSync,tD),fsyncSync:m1(WD.fsyncSync,tD),openSync:m1(WD.openSync,tD),readFileSync:m1(WD.readFileSync,tD),renameSync:m1(WD.renameSync,tD),statSync:m1(WD.statSync,tD),writeSync:m1(WD.writeSync,tD),writeFileSync:m1(WD.writeFileSync,tD)}},cD=z6D;import v6 from"process";var kw="utf8",hX=438,vw=511;var yw={},xw=v6.geteuid?v6.geteuid():-1,_w=v6.getegid?v6.getegid():-1;var fw=1000,gw=!!v6.getuid,UUD=v6.getuid?!v6.getuid():!1,bX=128;var hw=(D)=>{return D instanceof Error&&"code"in D};var uX=(D)=>{return typeof D==="string"},Z7=(D)=>{return D===void 0};import A6D from"path";import r4 from"process";import bw from"process";var uw=bw.platform==="linux",U7=bw.platform==="win32";var mX=["SIGHUP","SIGINT","SIGTERM"];if(!U7)mX.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");if(uw)mX.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");var mw=mX;class lw{constructor(){this.callbacks=new Set,this.exited=!1,this.exit=(D)=>{if(this.exited)return;this.exited=!0;for(let F of this.callbacks)F();if(D)if(U7&&(D!=="SIGINT"&&D!=="SIGTERM"&&D!=="SIGKILL"))r4.kill(r4.pid,"SIGTERM");else r4.kill(r4.pid,D)},this.hook=()=>{r4.once("exit",()=>this.exit());for(let D of mw)try{r4.once(D,()=>this.exit(D))}catch{}},this.register=(D)=>{return this.callbacks.add(D),()=>{this.callbacks.delete(D)}},this.hook()}}var dw=new lw;var V6D=dw.register,pw=V6D;var x0={store:{},create:(D)=>{let F=`000000${Math.floor(Math.random()*16777215).toString(16)}`.slice(-6),$=Date.now().toString().slice(-10),B="tmp-",J=`.tmp-${$}${F}`;return`${D}${J}`},get:(D,F,$=!0)=>{let B=x0.truncate(F(D));if(B in x0.store)return x0.get(D,F,$);return x0.store[B]=$,[B,()=>delete x0.store[B]]},purge:(D)=>{if(!x0.store[D])return;delete x0.store[D],cD.attempt.unlink(D)},purgeSync:(D)=>{if(!x0.store[D])return;delete x0.store[D],cD.attempt.unlinkSync(D)},purgeSyncAll:()=>{for(let D in x0.store)x0.purgeSync(D)},truncate:(D)=>{let F=A6D.basename(D);if(F.length<=bX)return D;let $=/^(\.?)(.*?)((?:\.[^.]+)?(?:\.tmp-\d{10}[a-f0-9]{6})?)$/.exec(F);if(!$)return D;let B=F.length-bX;return`${D.slice(0,-F.length)}${$[1]}${$[2].slice(0,-B)}${$[3]}`}};pw(x0.purgeSyncAll);var v3=x0;function lX(D,F,$=yw){if(uX($))return lX(D,F,{encoding:$});let J={timeout:$.timeout??fw},Q=null,X=null,Y=null;try{let G=cD.attempt.realpathSync(D),H=!!G;D=G||D,[X,Q]=v3.get(D,$.tmpCreate||v3.create,$.tmpPurge!==!1);let E=gw&&Z7($.chown),K=Z7($.mode);if(H&&(E||K)){let V=cD.attempt.statSync(D);if(V){if($={...$},E)$.chown={uid:V.uid,gid:V.gid};if(K)$.mode=V.mode}}if(!H){let V=Z6D.dirname(D);cD.attempt.mkdirSync(V,{mode:vw,recursive:!0})}if(Y=cD.retry.openSync(J)(X,"w",$.mode||hX),$.tmpCreated)$.tmpCreated(X);if(uX(F))cD.retry.writeSync(J)(Y,F,0,$.encoding||kw);else if(!Z7(F))cD.retry.writeSync(J)(Y,F,0,F.length,0);if($.fsync!==!1)if($.fsyncWait!==!1)cD.retry.fsyncSync(J)(Y);else cD.attempt.fsync(Y);if(cD.retry.closeSync(J)(Y),Y=null,$.chown&&($.chown.uid!==xw||$.chown.gid!==_w))cD.attempt.chownSync(X,$.chown.uid,$.chown.gid);if($.mode&&$.mode!==hX)cD.attempt.chmodSync(X,$.mode);try{cD.retry.renameSync(J)(X,D)}catch(V){if(!hw(V))throw V;if(V.code!=="ENAMETOOLONG")throw V;cD.retry.renameSync(J)(X,v3.truncate(D))}Q(),X=null}finally{if(Y)cD.attempt.closeSync(Y);if(X)v3.purge(X)}}var Fv=l(fP(),1),$v=l(JS(),1);var DQD=(D,F={})=>{if(typeof D!=="function")throw TypeError(`Expected the first argument to be a function, got \`${typeof D}\``);let{wait:$=0,maxWait:B=Number.POSITIVE_INFINITY,before:J=!1,after:Q=!0}=F;if($<0||B<0)throw RangeError("`wait` and `maxWait` must not be negative.");if(!J&&!Q)throw Error("Both `before` and `after` are false, function wouldn't be called.");let X,Y,G,H=function(...E){let K=this,V=()=>{if(X=void 0,Y)clearTimeout(Y),Y=void 0;if(Q)G=D.apply(K,E)},A=()=>{if(Y=void 0,X)clearTimeout(X),X=void 0;if(Q)G=D.apply(K,E)},Z=J&&!X;if(clearTimeout(X),X=setTimeout(V,$),B>0&&B!==Number.POSITIVE_INFINITY&&!Y)Y=setTimeout(A,B);if(Z)G=D.apply(K,E);return G};return j3(H,D),H.cancel=()=>{if(X)clearTimeout(X),X=void 0;if(Y)clearTimeout(Y),Y=void 0},H},B2=DQD;var l6=l(ak(),1);var iYD=Object.prototype.toString;function sk(D,F,$){if(!D)return!1;if(D.constructor===F)return!0;return iYD.call(D)===$}function rk(D){return sk(D,Uint8Array,"[object Uint8Array]")}function aYD(D){return sk(D,ArrayBuffer,"[object ArrayBuffer]")}function oYD(D){return rk(D)||aYD(D)}function sYD(D){if(!rk(D))throw TypeError(`Expected \`Uint8Array\`, got \`${typeof D}\``)}function rYD(D){if(!oYD(D))throw TypeError(`Expected \`Uint8Array\` or \`ArrayBuffer\`, got \`${typeof D}\``)}function L2(D,F){if(D.length===0)return new Uint8Array(0);F??=D.reduce((J,Q)=>J+Q.length,0);let $=new Uint8Array(F),B=0;for(let J of D)sYD(J),$.set(J,B),B+=J.length;return $}var ok={utf8:new globalThis.TextDecoder("utf8")};function M2(D,F="utf8"){return rYD(D),ok[F]??=new globalThis.TextDecoder(F),ok[F].decode(D)}function tYD(D){if(typeof D!=="string")throw TypeError(`Expected \`string\`, got \`${typeof D}\``)}var eYD=new globalThis.TextEncoder;function A$(D){return tYD(D),eYD.encode(D)}var JCD=Array.from({length:256},(D,F)=>F.toString(16).padStart(2,"0"));var $2D=$v.default.default,Dv="aes-256-cbc",KF=()=>Object.create(null),B2D=(D)=>D!==void 0&&D!==null,J2D=(D,F)=>{let $=new Set(["undefined","symbol","function"]),B=typeof F;if($.has(B))throw TypeError(`Setting a value of type \`${B}\` for key \`${D}\` is not allowed as it's not supported by JSON`)},Z$="__internal__",N2=`${Z$}.migrations.version`;class U${path;events;#$;#F;#D;#J={};constructor(D={}){let F={configName:"config",fileExtension:"json",projectSuffix:"nodejs",clearInvalidConfig:!1,accessPropertiesByDotNotation:!0,configFileMode:438,...D};if(!F.cwd){if(!F.projectName)throw Error("Please specify the `projectName` option.");F.cwd=fX(F.projectName,{suffix:F.projectSuffix}).config}if(this.#D=F,F.schema??F.ajvOptions??F.rootSchema){if(F.schema&&typeof F.schema!=="object")throw TypeError("The `schema` option must be an object.");let Q=new Fv.Ajv2020({allErrors:!0,useDefaults:!0,...F.ajvOptions});$2D(Q);let X={...F.rootSchema,type:"object",properties:F.schema};this.#$=Q.compile(X);for(let[Y,G]of Object.entries(F.schema??{}))if(G?.default)this.#J[Y]=G.default}if(F.defaults)this.#J={...this.#J,...F.defaults};if(F.serialize)this._serialize=F.serialize;if(F.deserialize)this._deserialize=F.deserialize;this.events=new EventTarget,this.#F=F.encryptionKey;let $=F.fileExtension?`.${F.fileExtension}`:"";this.path=ek.resolve(F.cwd,`${F.configName??"config"}${$}`);let B=this.store,J=Object.assign(KF(),F.defaults,B);if(F.migrations){if(!F.projectVersion)throw Error("Please specify the `projectVersion` option.");this._migrate(F.migrations,F.projectVersion,F.beforeEachMigration)}this._validate(J);try{F2D.deepEqual(B,J)}catch{this.store=J}if(F.watch)this._watch()}get(D,F){if(this.#D.accessPropertiesByDotNotation)return this._get(D,F);let{store:$}=this;return D in $?$[D]:F}set(D,F){if(typeof D!=="string"&&typeof D!=="object")throw TypeError(`Expected \`key\` to be of type \`string\` or \`object\`, got ${typeof D}`);if(typeof D!=="object"&&F===void 0)throw TypeError("Use `delete()` to clear values");if(this._containsReservedKey(D))throw TypeError(`Please don't use the ${Z$} key, as it's used to manage this module internal operations.`);let{store:$}=this,B=(J,Q)=>{if(J2D(J,Q),this.#D.accessPropertiesByDotNotation)yX($,J,Q);else $[J]=Q};if(typeof D==="object"){let J=D;for(let[Q,X]of Object.entries(J))B(Q,X)}else B(D,F);this.store=$}has(D){if(this.#D.accessPropertiesByDotNotation)return jw(this.store,D);return D in this.store}reset(...D){for(let F of D)if(B2D(this.#J[F]))this.set(F,this.#J[F])}delete(D){let{store:F}=this;if(this.#D.accessPropertiesByDotNotation)Tw(F,D);else delete F[D];this.store=F}clear(){this.store=KF();for(let D of Object.keys(this.#J))this.reset(D)}onDidChange(D,F){if(typeof D!=="string")throw TypeError(`Expected \`key\` to be of type \`string\`, got ${typeof D}`);if(typeof F!=="function")throw TypeError(`Expected \`callback\` to be of type \`function\`, got ${typeof F}`);return this._handleChange(()=>this.get(D),F)}onDidAnyChange(D){if(typeof D!=="function")throw TypeError(`Expected \`callback\` to be of type \`function\`, got ${typeof D}`);return this._handleChange(()=>this.store,D)}get size(){return Object.keys(this.store).length}get store(){try{let D=m6.readFileSync(this.path,this.#F?null:"utf8"),F=this._encryptData(D),$=this._deserialize(F);return this._validate($),Object.assign(KF(),$)}catch(D){if(D?.code==="ENOENT")return this._ensureDirectory(),KF();if(this.#D.clearInvalidConfig&&D.name==="SyntaxError")return KF();throw D}}set store(D){this._ensureDirectory(),this._validate(D),this._write(D),this.events.dispatchEvent(new Event("change"))}*[Symbol.iterator](){for(let[D,F]of Object.entries(this.store))yield[D,F]}_encryptData(D){if(!this.#F)return typeof D==="string"?D:M2(D);try{let F=D.slice(0,16),$=E5.pbkdf2Sync(this.#F,F.toString(),1e4,32,"sha512"),B=E5.createDecipheriv(Dv,$,F),J=D.slice(17),Q=typeof J==="string"?A$(J):J;return M2(L2([B.update(Q),B.final()]))}catch{}return D.toString()}_handleChange(D,F){let $=D(),B=()=>{let J=$,Q=D();if(D2D(Q,J))return;$=Q,F.call(this,Q,J)};return this.events.addEventListener("change",B),()=>{this.events.removeEventListener("change",B)}}_deserialize=(D)=>JSON.parse(D);_serialize=(D)=>JSON.stringify(D,void 0,"\t");_validate(D){if(!this.#$)return;if(this.#$(D)||!this.#$.errors)return;let $=this.#$.errors.map(({instancePath:B,message:J=""})=>`\`${B.slice(1)}\` ${J}`);throw Error("Config schema violation: "+$.join("; "))}_ensureDirectory(){m6.mkdirSync(ek.dirname(this.path),{recursive:!0})}_write(D){let F=this._serialize(D);if(this.#F){let $=E5.randomBytes(16),B=E5.pbkdf2Sync(this.#F,$.toString(),1e4,32,"sha512"),J=E5.createCipheriv(Dv,B,$);F=L2([$,A$(":"),J.update(A$(F)),J.final()])}if(tk.env.SNAP)m6.writeFileSync(this.path,F,{mode:this.#D.configFileMode});else try{lX(this.path,F,{mode:this.#D.configFileMode})}catch($){if($?.code==="EXDEV"){m6.writeFileSync(this.path,F,{mode:this.#D.configFileMode});return}throw $}}_watch(){if(this._ensureDirectory(),!m6.existsSync(this.path))this._write(KF());if(tk.platform==="win32")m6.watch(this.path,{persistent:!1},B2(()=>{this.events.dispatchEvent(new Event("change"))},{wait:100}));else m6.watchFile(this.path,{persistent:!1},B2(()=>{this.events.dispatchEvent(new Event("change"))},{wait:5000}))}_migrate(D,F,$){let B=this._get(N2,"0.0.0"),J=Object.keys(D).filter((X)=>this._shouldPerformMigration(X,B,F)),Q={...this.store};for(let X of J)try{if($)$(this,{fromVersion:B,toVersion:X,finalVersion:F,versions:J});let Y=D[X];Y?.(this),this._set(N2,X),B=X,Q={...this.store}}catch(Y){throw this.store=Q,Error(`Something went wrong during the migration! Changes applied to the store until this failed migration will be restored. ${Y}`)}if(this._isVersionInRangeFormat(B)||!l6.default.eq(B,F))this._set(N2,F)}_containsReservedKey(D){if(typeof D==="object"){if(Object.keys(D)[0]===Z$)return!0}if(typeof D!=="string")return!1;if(this.#D.accessPropertiesByDotNotation){if(D.startsWith(`${Z$}.`))return!0;return!1}return!1}_isVersionInRangeFormat(D){return l6.default.clean(D)===null}_shouldPerformMigration(D,F,$){if(this._isVersionInRangeFormat(D)){if(F!=="0.0.0"&&l6.default.satisfies(F,D))return!1;return l6.default.satisfies($,D)}if(l6.default.lte(D,F))return!1;if(l6.default.gt(D,$))return!1;return!0}_get(D,F){return ww(this.store,D,F)}_set(D,F){let{store:$}=this;yX($,D,F),this.store=$}}var M1={};d2(M1,{void:()=>l2D,util:()=>$D,unknown:()=>u2D,union:()=>n2D,undefined:()=>g2D,tuple:()=>o2D,transformer:()=>QGD,symbol:()=>f2D,string:()=>Ev,strictObject:()=>c2D,setErrorMap:()=>Y2D,set:()=>t2D,record:()=>s2D,quotelessJson:()=>Q2D,promise:()=>JGD,preprocess:()=>GGD,pipeline:()=>HGD,ostring:()=>WGD,optional:()=>XGD,onumber:()=>EGD,oboolean:()=>qGD,objectUtil:()=>C2,object:()=>p2D,number:()=>qv,nullable:()=>YGD,null:()=>h2D,never:()=>m2D,nativeEnum:()=>BGD,nan:()=>y2D,map:()=>r2D,makeIssue:()=>q5,literal:()=>FGD,lazy:()=>DGD,late:()=>k2D,isValid:()=>J6,isDirty:()=>M$,isAsync:()=>VF,isAborted:()=>L$,intersection:()=>a2D,instanceof:()=>v2D,getParsedType:()=>n1,getErrorMap:()=>zF,function:()=>e2D,enum:()=>$GD,effect:()=>QGD,discriminatedUnion:()=>i2D,defaultErrorMap:()=>E8,datetimeRegex:()=>Gv,date:()=>_2D,custom:()=>Wv,coerce:()=>KGD,boolean:()=>Kv,bigint:()=>x2D,array:()=>d2D,any:()=>b2D,addIssueToContext:()=>j,ZodVoid:()=>z5,ZodUnknown:()=>Q6,ZodUnion:()=>NF,ZodUndefined:()=>LF,ZodType:()=>e,ZodTuple:()=>a1,ZodTransformer:()=>L1,ZodSymbol:()=>K5,ZodString:()=>V1,ZodSet:()=>n6,ZodSchema:()=>e,ZodRecord:()=>V5,ZodReadonly:()=>IF,ZodPromise:()=>i6,ZodPipeline:()=>U5,ZodParsedType:()=>w,ZodOptional:()=>Z1,ZodObject:()=>SD,ZodNumber:()=>X6,ZodNullable:()=>K8,ZodNull:()=>MF,ZodNever:()=>i1,ZodNativeEnum:()=>TF,ZodNaN:()=>Z5,ZodMap:()=>A5,ZodLiteral:()=>wF,ZodLazy:()=>RF,ZodIssueCode:()=>C,ZodIntersection:()=>CF,ZodFunction:()=>ZF,ZodFirstPartyTypeKind:()=>h,ZodError:()=>I0,ZodEnum:()=>G6,ZodEffects:()=>L1,ZodDiscriminatedUnion:()=>N$,ZodDefault:()=>jF,ZodDate:()=>p6,ZodCatch:()=>OF,ZodBranded:()=>C$,ZodBoolean:()=>UF,ZodBigInt:()=>Y6,ZodArray:()=>A1,ZodAny:()=>c6,Schema:()=>e,ParseStatus:()=>D0,OK:()=>H0,NEVER:()=>zGD,INVALID:()=>g,EMPTY_PATH:()=>G2D,DIRTY:()=>d6,BRAND:()=>S2D});var $D;(function(D){D.assertEqual=(J)=>{};function F(J){}D.assertIs=F;function $(J){throw Error()}D.assertNever=$,D.arrayToEnum=(J)=>{let Q={};for(let X of J)Q[X]=X;return Q},D.getValidEnumValues=(J)=>{let Q=D.objectKeys(J).filter((Y)=>typeof J[J[Y]]!=="number"),X={};for(let Y of Q)X[Y]=J[Y];return D.objectValues(X)},D.objectValues=(J)=>{return D.objectKeys(J).map(function(Q){return J[Q]})},D.objectKeys=typeof Object.keys==="function"?(J)=>Object.keys(J):(J)=>{let Q=[];for(let X in J)if(Object.prototype.hasOwnProperty.call(J,X))Q.push(X);return Q},D.find=(J,Q)=>{for(let X of J)if(Q(X))return X;return},D.isInteger=typeof Number.isInteger==="function"?(J)=>Number.isInteger(J):(J)=>typeof J==="number"&&Number.isFinite(J)&&Math.floor(J)===J;function B(J,Q=" | "){return J.map((X)=>typeof X==="string"?`'${X}'`:X).join(Q)}D.joinValues=B,D.jsonStringifyReplacer=(J,Q)=>{if(typeof Q==="bigint")return Q.toString();return Q}})($D||($D={}));var C2;(function(D){D.mergeShapes=(F,$)=>{return{...F,...$}}})(C2||(C2={}));var w=$D.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),n1=(D)=>{switch(typeof D){case"undefined":return w.undefined;case"string":return w.string;case"number":return Number.isNaN(D)?w.nan:w.number;case"boolean":return w.boolean;case"function":return w.function;case"bigint":return w.bigint;case"symbol":return w.symbol;case"object":if(Array.isArray(D))return w.array;if(D===null)return w.null;if(D.then&&typeof D.then==="function"&&D.catch&&typeof D.catch==="function")return w.promise;if(typeof Map<"u"&&D instanceof Map)return w.map;if(typeof Set<"u"&&D instanceof Set)return w.set;if(typeof Date<"u"&&D instanceof Date)return w.date;return w.object;default:return w.unknown}};var C=$D.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"]),Q2D=(D)=>{return JSON.stringify(D,null,2).replace(/"([^"]+)":/g,"$1:")};class I0 extends Error{get errors(){return this.issues}constructor(D){super();this.issues=[],this.addIssue=($)=>{this.issues=[...this.issues,$]},this.addIssues=($=[])=>{this.issues=[...this.issues,...$]};let F=new.target.prototype;if(Object.setPrototypeOf)Object.setPrototypeOf(this,F);else this.__proto__=F;this.name="ZodError",this.issues=D}format(D){let F=D||function(J){return J.message},$={_errors:[]},B=(J)=>{for(let Q of J.issues)if(Q.code==="invalid_union")Q.unionErrors.map(B);else if(Q.code==="invalid_return_type")B(Q.returnTypeError);else if(Q.code==="invalid_arguments")B(Q.argumentsError);else if(Q.path.length===0)$._errors.push(F(Q));else{let X=$,Y=0;while(Y<Q.path.length){let G=Q.path[Y];if(Y!==Q.path.length-1)X[G]=X[G]||{_errors:[]};else X[G]=X[G]||{_errors:[]},X[G]._errors.push(F(Q));X=X[G],Y++}}};return B(this),$}static assert(D){if(!(D instanceof I0))throw Error(`Not a ZodError: ${D}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,$D.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(D=(F)=>F.message){let F={},$=[];for(let B of this.issues)if(B.path.length>0){let J=B.path[0];F[J]=F[J]||[],F[J].push(D(B))}else $.push(D(B));return{formErrors:$,fieldErrors:F}}get formErrors(){return this.flatten()}}I0.create=(D)=>{return new I0(D)};var X2D=(D,F)=>{let $;switch(D.code){case C.invalid_type:if(D.received===w.undefined)$="Required";else $=`Expected ${D.expected}, received ${D.received}`;break;case C.invalid_literal:$=`Invalid literal value, expected ${JSON.stringify(D.expected,$D.jsonStringifyReplacer)}`;break;case C.unrecognized_keys:$=`Unrecognized key(s) in object: ${$D.joinValues(D.keys,", ")}`;break;case C.invalid_union:$="Invalid input";break;case C.invalid_union_discriminator:$=`Invalid discriminator value. Expected ${$D.joinValues(D.options)}`;break;case C.invalid_enum_value:$=`Invalid enum value. Expected ${$D.joinValues(D.options)}, received '${D.received}'`;break;case C.invalid_arguments:$="Invalid function arguments";break;case C.invalid_return_type:$="Invalid function return type";break;case C.invalid_date:$="Invalid date";break;case C.invalid_string:if(typeof D.validation==="object")if("includes"in D.validation){if($=`Invalid input: must include "${D.validation.includes}"`,typeof D.validation.position==="number")$=`${$} at one or more positions greater than or equal to ${D.validation.position}`}else if("startsWith"in D.validation)$=`Invalid input: must start with "${D.validation.startsWith}"`;else if("endsWith"in D.validation)$=`Invalid input: must end with "${D.validation.endsWith}"`;else $D.assertNever(D.validation);else if(D.validation!=="regex")$=`Invalid ${D.validation}`;else $="Invalid";break;case C.too_small:if(D.type==="array")$=`Array must contain ${D.exact?"exactly":D.inclusive?"at least":"more than"} ${D.minimum} element(s)`;else if(D.type==="string")$=`String must contain ${D.exact?"exactly":D.inclusive?"at least":"over"} ${D.minimum} character(s)`;else if(D.type==="number")$=`Number must be ${D.exact?"exactly equal to ":D.inclusive?"greater than or equal to ":"greater than "}${D.minimum}`;else if(D.type==="bigint")$=`Number must be ${D.exact?"exactly equal to ":D.inclusive?"greater than or equal to ":"greater than "}${D.minimum}`;else if(D.type==="date")$=`Date must be ${D.exact?"exactly equal to ":D.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(D.minimum))}`;else $="Invalid input";break;case C.too_big:if(D.type==="array")$=`Array must contain ${D.exact?"exactly":D.inclusive?"at most":"less than"} ${D.maximum} element(s)`;else if(D.type==="string")$=`String must contain ${D.exact?"exactly":D.inclusive?"at most":"under"} ${D.maximum} character(s)`;else if(D.type==="number")$=`Number must be ${D.exact?"exactly":D.inclusive?"less than or equal to":"less than"} ${D.maximum}`;else if(D.type==="bigint")$=`BigInt must be ${D.exact?"exactly":D.inclusive?"less than or equal to":"less than"} ${D.maximum}`;else if(D.type==="date")$=`Date must be ${D.exact?"exactly":D.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(D.maximum))}`;else $="Invalid input";break;case C.custom:$="Invalid input";break;case C.invalid_intersection_types:$="Intersection results could not be merged";break;case C.not_multiple_of:$=`Number must be a multiple of ${D.multipleOf}`;break;case C.not_finite:$="Number must be finite";break;default:$=F.defaultError,$D.assertNever(D)}return{message:$}},E8=X2D;var Bv=E8;function Y2D(D){Bv=D}function zF(){return Bv}var q5=(D)=>{let{data:F,path:$,errorMaps:B,issueData:J}=D,Q=[...$,...J.path||[]],X={...J,path:Q};if(J.message!==void 0)return{...J,path:Q,message:J.message};let Y="",G=B.filter((H)=>!!H).slice().reverse();for(let H of G)Y=H(X,{data:F,defaultError:Y}).message;return{...J,path:Q,message:Y}},G2D=[];function j(D,F){let $=zF(),B=q5({issueData:F,data:D.data,path:D.path,errorMaps:[D.common.contextualErrorMap,D.schemaErrorMap,$,$===E8?void 0:E8].filter((J)=>!!J)});D.common.issues.push(B)}class D0{constructor(){this.value="valid"}dirty(){if(this.value==="valid")this.value="dirty"}abort(){if(this.value!=="aborted")this.value="aborted"}static mergeArray(D,F){let $=[];for(let B of F){if(B.status==="aborted")return g;if(B.status==="dirty")D.dirty();$.push(B.value)}return{status:D.value,value:$}}static async mergeObjectAsync(D,F){let $=[];for(let B of F){let J=await B.key,Q=await B.value;$.push({key:J,value:Q})}return D0.mergeObjectSync(D,$)}static mergeObjectSync(D,F){let $={};for(let B of F){let{key:J,value:Q}=B;if(J.status==="aborted")return g;if(Q.status==="aborted")return g;if(J.status==="dirty")D.dirty();if(Q.status==="dirty")D.dirty();if(J.value!=="__proto__"&&(typeof Q.value<"u"||B.alwaysSet))$[J.value]=Q.value}return{status:D.value,value:$}}}var g=Object.freeze({status:"aborted"}),d6=(D)=>({status:"dirty",value:D}),H0=(D)=>({status:"valid",value:D}),L$=(D)=>D.status==="aborted",M$=(D)=>D.status==="dirty",J6=(D)=>D.status==="valid",VF=(D)=>typeof Promise<"u"&&D instanceof Promise;var x;(function(D){D.errToObj=(F)=>typeof F==="string"?{message:F}:F||{},D.toString=(F)=>typeof F==="string"?F:F?.message})(x||(x={}));class U1{constructor(D,F,$,B){this._cachedPath=[],this.parent=D,this.data=F,this._path=$,this._key=B}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}}var Jv=(D,F)=>{if(J6(F))return{success:!0,data:F.value};else{if(!D.common.issues.length)throw Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let $=new I0(D.common.issues);return this._error=$,this._error}}}};function o(D){if(!D)return{};let{errorMap:F,invalid_type_error:$,required_error:B,description:J}=D;if(F&&($||B))throw Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);if(F)return{errorMap:F,description:J};return{errorMap:(X,Y)=>{let{message:G}=D;if(X.code==="invalid_enum_value")return{message:G??Y.defaultError};if(typeof Y.data>"u")return{message:G??B??Y.defaultError};if(X.code!=="invalid_type")return{message:Y.defaultError};return{message:G??$??Y.defaultError}},description:J}}class e{get description(){return this._def.description}_getType(D){return n1(D.data)}_getOrReturnCtx(D,F){return F||{common:D.parent.common,data:D.data,parsedType:n1(D.data),schemaErrorMap:this._def.errorMap,path:D.path,parent:D.parent}}_processInputParams(D){return{status:new D0,ctx:{common:D.parent.common,data:D.data,parsedType:n1(D.data),schemaErrorMap:this._def.errorMap,path:D.path,parent:D.parent}}}_parseSync(D){let F=this._parse(D);if(VF(F))throw Error("Synchronous parse encountered promise.");return F}_parseAsync(D){let F=this._parse(D);return Promise.resolve(F)}parse(D,F){let $=this.safeParse(D,F);if($.success)return $.data;throw $.error}safeParse(D,F){let $={common:{issues:[],async:F?.async??!1,contextualErrorMap:F?.errorMap},path:F?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:D,parsedType:n1(D)},B=this._parseSync({data:D,path:$.path,parent:$});return Jv($,B)}"~validate"(D){let F={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:D,parsedType:n1(D)};if(!this["~standard"].async)try{let $=this._parseSync({data:D,path:[],parent:F});return J6($)?{value:$.value}:{issues:F.common.issues}}catch($){if($?.message?.toLowerCase()?.includes("encountered"))this["~standard"].async=!0;F.common={issues:[],async:!0}}return this._parseAsync({data:D,path:[],parent:F}).then(($)=>J6($)?{value:$.value}:{issues:F.common.issues})}async parseAsync(D,F){let $=await this.safeParseAsync(D,F);if($.success)return $.data;throw $.error}async safeParseAsync(D,F){let $={common:{issues:[],contextualErrorMap:F?.errorMap,async:!0},path:F?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:D,parsedType:n1(D)},B=this._parse({data:D,path:$.path,parent:$}),J=await(VF(B)?B:Promise.resolve(B));return Jv($,J)}refine(D,F){let $=(B)=>{if(typeof F==="string"||typeof F>"u")return{message:F};else if(typeof F==="function")return F(B);else return F};return this._refinement((B,J)=>{let Q=D(B),X=()=>J.addIssue({code:C.custom,...$(B)});if(typeof Promise<"u"&&Q instanceof Promise)return Q.then((Y)=>{if(!Y)return X(),!1;else return!0});if(!Q)return X(),!1;else return!0})}refinement(D,F){return this._refinement(($,B)=>{if(!D($))return B.addIssue(typeof F==="function"?F($,B):F),!1;else return!0})}_refinement(D){return new L1({schema:this,typeName:h.ZodEffects,effect:{type:"refinement",refinement:D}})}superRefine(D){return this._refinement(D)}constructor(D){this.spa=this.safeParseAsync,this._def=D,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:(F)=>this["~validate"](F)}}optional(){return Z1.create(this,this._def)}nullable(){return K8.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return A1.create(this)}promise(){return i6.create(this,this._def)}or(D){return NF.create([this,D],this._def)}and(D){return CF.create(this,D,this._def)}transform(D){return new L1({...o(this._def),schema:this,typeName:h.ZodEffects,effect:{type:"transform",transform:D}})}default(D){let F=typeof D==="function"?D:()=>D;return new jF({...o(this._def),innerType:this,defaultValue:F,typeName:h.ZodDefault})}brand(){return new C$({typeName:h.ZodBranded,type:this,...o(this._def)})}catch(D){let F=typeof D==="function"?D:()=>D;return new OF({...o(this._def),innerType:this,catchValue:F,typeName:h.ZodCatch})}describe(D){return new this.constructor({...this._def,description:D})}pipe(D){return U5.create(this,D)}readonly(){return IF.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}var H2D=/^c[^\s-]{8,}$/i,W2D=/^[0-9a-z]+$/,E2D=/^[0-9A-HJKMNP-TV-Z]{26}$/i,q2D=/^[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,K2D=/^[a-z0-9_-]{21}$/i,z2D=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,V2D=/^[-+]?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)?)??$/,A2D=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Z2D="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",R2,U2D=/^(?:(?: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])$/,L2D=/^(?:(?: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])$/,M2D=/^(([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]))$/,N2D=/^(([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])$/,C2D=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,R2D=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Xv="((\\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])))",w2D=new RegExp(`^${Xv}$`);function Yv(D){let F="[0-5]\\d";if(D.precision)F=`${F}\\.\\d{${D.precision}}`;else if(D.precision==null)F=`${F}(\\.\\d+)?`;let $=D.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${F})${$}`}function T2D(D){return new RegExp(`^${Yv(D)}$`)}function Gv(D){let F=`${Xv}T${Yv(D)}`,$=[];if($.push(D.local?"Z?":"Z"),D.offset)$.push("([+-]\\d{2}:?\\d{2})");return F=`${F}(${$.join("|")})`,new RegExp(`^${F}$`)}function j2D(D,F){if((F==="v4"||!F)&&U2D.test(D))return!0;if((F==="v6"||!F)&&M2D.test(D))return!0;return!1}function O2D(D,F){if(!z2D.test(D))return!1;try{let[$]=D.split(".");if(!$)return!1;let B=$.replace(/-/g,"+").replace(/_/g,"/").padEnd($.length+(4-$.length%4)%4,"="),J=JSON.parse(atob(B));if(typeof J!=="object"||J===null)return!1;if("typ"in J&&J?.typ!=="JWT")return!1;if(!J.alg)return!1;if(F&&J.alg!==F)return!1;return!0}catch{return!1}}function I2D(D,F){if((F==="v4"||!F)&&L2D.test(D))return!0;if((F==="v6"||!F)&&N2D.test(D))return!0;return!1}class V1 extends e{_parse(D){if(this._def.coerce)D.data=String(D.data);if(this._getType(D)!==w.string){let J=this._getOrReturnCtx(D);return j(J,{code:C.invalid_type,expected:w.string,received:J.parsedType}),g}let $=new D0,B=void 0;for(let J of this._def.checks)if(J.kind==="min"){if(D.data.length<J.value)B=this._getOrReturnCtx(D,B),j(B,{code:C.too_small,minimum:J.value,type:"string",inclusive:!0,exact:!1,message:J.message}),$.dirty()}else if(J.kind==="max"){if(D.data.length>J.value)B=this._getOrReturnCtx(D,B),j(B,{code:C.too_big,maximum:J.value,type:"string",inclusive:!0,exact:!1,message:J.message}),$.dirty()}else if(J.kind==="length"){let Q=D.data.length>J.value,X=D.data.length<J.value;if(Q||X){if(B=this._getOrReturnCtx(D,B),Q)j(B,{code:C.too_big,maximum:J.value,type:"string",inclusive:!0,exact:!0,message:J.message});else if(X)j(B,{code:C.too_small,minimum:J.value,type:"string",inclusive:!0,exact:!0,message:J.message});$.dirty()}}else if(J.kind==="email"){if(!A2D.test(D.data))B=this._getOrReturnCtx(D,B),j(B,{validation:"email",code:C.invalid_string,message:J.message}),$.dirty()}else if(J.kind==="emoji"){if(!R2)R2=new RegExp(Z2D,"u");if(!R2.test(D.data))B=this._getOrReturnCtx(D,B),j(B,{validation:"emoji",code:C.invalid_string,message:J.message}),$.dirty()}else if(J.kind==="uuid"){if(!q2D.test(D.data))B=this._getOrReturnCtx(D,B),j(B,{validation:"uuid",code:C.invalid_string,message:J.message}),$.dirty()}else if(J.kind==="nanoid"){if(!K2D.test(D.data))B=this._getOrReturnCtx(D,B),j(B,{validation:"nanoid",code:C.invalid_string,message:J.message}),$.dirty()}else if(J.kind==="cuid"){if(!H2D.test(D.data))B=this._getOrReturnCtx(D,B),j(B,{validation:"cuid",code:C.invalid_string,message:J.message}),$.dirty()}else if(J.kind==="cuid2"){if(!W2D.test(D.data))B=this._getOrReturnCtx(D,B),j(B,{validation:"cuid2",code:C.invalid_string,message:J.message}),$.dirty()}else if(J.kind==="ulid"){if(!E2D.test(D.data))B=this._getOrReturnCtx(D,B),j(B,{validation:"ulid",code:C.invalid_string,message:J.message}),$.dirty()}else if(J.kind==="url")try{new URL(D.data)}catch{B=this._getOrReturnCtx(D,B),j(B,{validation:"url",code:C.invalid_string,message:J.message}),$.dirty()}else if(J.kind==="regex"){if(J.regex.lastIndex=0,!J.regex.test(D.data))B=this._getOrReturnCtx(D,B),j(B,{validation:"regex",code:C.invalid_string,message:J.message}),$.dirty()}else if(J.kind==="trim")D.data=D.data.trim();else if(J.kind==="includes"){if(!D.data.includes(J.value,J.position))B=this._getOrReturnCtx(D,B),j(B,{code:C.invalid_string,validation:{includes:J.value,position:J.position},message:J.message}),$.dirty()}else if(J.kind==="toLowerCase")D.data=D.data.toLowerCase();else if(J.kind==="toUpperCase")D.data=D.data.toUpperCase();else if(J.kind==="startsWith"){if(!D.data.startsWith(J.value))B=this._getOrReturnCtx(D,B),j(B,{code:C.invalid_string,validation:{startsWith:J.value},message:J.message}),$.dirty()}else if(J.kind==="endsWith"){if(!D.data.endsWith(J.value))B=this._getOrReturnCtx(D,B),j(B,{code:C.invalid_string,validation:{endsWith:J.value},message:J.message}),$.dirty()}else if(J.kind==="datetime"){if(!Gv(J).test(D.data))B=this._getOrReturnCtx(D,B),j(B,{code:C.invalid_string,validation:"datetime",message:J.message}),$.dirty()}else if(J.kind==="date"){if(!w2D.test(D.data))B=this._getOrReturnCtx(D,B),j(B,{code:C.invalid_string,validation:"date",message:J.message}),$.dirty()}else if(J.kind==="time"){if(!T2D(J).test(D.data))B=this._getOrReturnCtx(D,B),j(B,{code:C.invalid_string,validation:"time",message:J.message}),$.dirty()}else if(J.kind==="duration"){if(!V2D.test(D.data))B=this._getOrReturnCtx(D,B),j(B,{validation:"duration",code:C.invalid_string,message:J.message}),$.dirty()}else if(J.kind==="ip"){if(!j2D(D.data,J.version))B=this._getOrReturnCtx(D,B),j(B,{validation:"ip",code:C.invalid_string,message:J.message}),$.dirty()}else if(J.kind==="jwt"){if(!O2D(D.data,J.alg))B=this._getOrReturnCtx(D,B),j(B,{validation:"jwt",code:C.invalid_string,message:J.message}),$.dirty()}else if(J.kind==="cidr"){if(!I2D(D.data,J.version))B=this._getOrReturnCtx(D,B),j(B,{validation:"cidr",code:C.invalid_string,message:J.message}),$.dirty()}else if(J.kind==="base64"){if(!C2D.test(D.data))B=this._getOrReturnCtx(D,B),j(B,{validation:"base64",code:C.invalid_string,message:J.message}),$.dirty()}else if(J.kind==="base64url"){if(!R2D.test(D.data))B=this._getOrReturnCtx(D,B),j(B,{validation:"base64url",code:C.invalid_string,message:J.message}),$.dirty()}else $D.assertNever(J);return{status:$.value,value:D.data}}_regex(D,F,$){return this.refinement((B)=>D.test(B),{validation:F,code:C.invalid_string,...x.errToObj($)})}_addCheck(D){return new V1({...this._def,checks:[...this._def.checks,D]})}email(D){return this._addCheck({kind:"email",...x.errToObj(D)})}url(D){return this._addCheck({kind:"url",...x.errToObj(D)})}emoji(D){return this._addCheck({kind:"emoji",...x.errToObj(D)})}uuid(D){return this._addCheck({kind:"uuid",...x.errToObj(D)})}nanoid(D){return this._addCheck({kind:"nanoid",...x.errToObj(D)})}cuid(D){return this._addCheck({kind:"cuid",...x.errToObj(D)})}cuid2(D){return this._addCheck({kind:"cuid2",...x.errToObj(D)})}ulid(D){return this._addCheck({kind:"ulid",...x.errToObj(D)})}base64(D){return this._addCheck({kind:"base64",...x.errToObj(D)})}base64url(D){return this._addCheck({kind:"base64url",...x.errToObj(D)})}jwt(D){return this._addCheck({kind:"jwt",...x.errToObj(D)})}ip(D){return this._addCheck({kind:"ip",...x.errToObj(D)})}cidr(D){return this._addCheck({kind:"cidr",...x.errToObj(D)})}datetime(D){if(typeof D==="string")return this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:D});return this._addCheck({kind:"datetime",precision:typeof D?.precision>"u"?null:D?.precision,offset:D?.offset??!1,local:D?.local??!1,...x.errToObj(D?.message)})}date(D){return this._addCheck({kind:"date",message:D})}time(D){if(typeof D==="string")return this._addCheck({kind:"time",precision:null,message:D});return this._addCheck({kind:"time",precision:typeof D?.precision>"u"?null:D?.precision,...x.errToObj(D?.message)})}duration(D){return this._addCheck({kind:"duration",...x.errToObj(D)})}regex(D,F){return this._addCheck({kind:"regex",regex:D,...x.errToObj(F)})}includes(D,F){return this._addCheck({kind:"includes",value:D,position:F?.position,...x.errToObj(F?.message)})}startsWith(D,F){return this._addCheck({kind:"startsWith",value:D,...x.errToObj(F)})}endsWith(D,F){return this._addCheck({kind:"endsWith",value:D,...x.errToObj(F)})}min(D,F){return this._addCheck({kind:"min",value:D,...x.errToObj(F)})}max(D,F){return this._addCheck({kind:"max",value:D,...x.errToObj(F)})}length(D,F){return this._addCheck({kind:"length",value:D,...x.errToObj(F)})}nonempty(D){return this.min(1,x.errToObj(D))}trim(){return new V1({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new V1({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new V1({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find((D)=>D.kind==="datetime")}get isDate(){return!!this._def.checks.find((D)=>D.kind==="date")}get isTime(){return!!this._def.checks.find((D)=>D.kind==="time")}get isDuration(){return!!this._def.checks.find((D)=>D.kind==="duration")}get isEmail(){return!!this._def.checks.find((D)=>D.kind==="email")}get isURL(){return!!this._def.checks.find((D)=>D.kind==="url")}get isEmoji(){return!!this._def.checks.find((D)=>D.kind==="emoji")}get isUUID(){return!!this._def.checks.find((D)=>D.kind==="uuid")}get isNANOID(){return!!this._def.checks.find((D)=>D.kind==="nanoid")}get isCUID(){return!!this._def.checks.find((D)=>D.kind==="cuid")}get isCUID2(){return!!this._def.checks.find((D)=>D.kind==="cuid2")}get isULID(){return!!this._def.checks.find((D)=>D.kind==="ulid")}get isIP(){return!!this._def.checks.find((D)=>D.kind==="ip")}get isCIDR(){return!!this._def.checks.find((D)=>D.kind==="cidr")}get isBase64(){return!!this._def.checks.find((D)=>D.kind==="base64")}get isBase64url(){return!!this._def.checks.find((D)=>D.kind==="base64url")}get minLength(){let D=null;for(let F of this._def.checks)if(F.kind==="min"){if(D===null||F.value>D)D=F.value}return D}get maxLength(){let D=null;for(let F of this._def.checks)if(F.kind==="max"){if(D===null||F.value<D)D=F.value}return D}}V1.create=(D)=>{return new V1({checks:[],typeName:h.ZodString,coerce:D?.coerce??!1,...o(D)})};function P2D(D,F){let $=(D.toString().split(".")[1]||"").length,B=(F.toString().split(".")[1]||"").length,J=$>B?$:B,Q=Number.parseInt(D.toFixed(J).replace(".","")),X=Number.parseInt(F.toFixed(J).replace(".",""));return Q%X/10**J}class X6 extends e{constructor(){super(...arguments);this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(D){if(this._def.coerce)D.data=Number(D.data);if(this._getType(D)!==w.number){let J=this._getOrReturnCtx(D);return j(J,{code:C.invalid_type,expected:w.number,received:J.parsedType}),g}let $=void 0,B=new D0;for(let J of this._def.checks)if(J.kind==="int"){if(!$D.isInteger(D.data))$=this._getOrReturnCtx(D,$),j($,{code:C.invalid_type,expected:"integer",received:"float",message:J.message}),B.dirty()}else if(J.kind==="min"){if(J.inclusive?D.data<J.value:D.data<=J.value)$=this._getOrReturnCtx(D,$),j($,{code:C.too_small,minimum:J.value,type:"number",inclusive:J.inclusive,exact:!1,message:J.message}),B.dirty()}else if(J.kind==="max"){if(J.inclusive?D.data>J.value:D.data>=J.value)$=this._getOrReturnCtx(D,$),j($,{code:C.too_big,maximum:J.value,type:"number",inclusive:J.inclusive,exact:!1,message:J.message}),B.dirty()}else if(J.kind==="multipleOf"){if(P2D(D.data,J.value)!==0)$=this._getOrReturnCtx(D,$),j($,{code:C.not_multiple_of,multipleOf:J.value,message:J.message}),B.dirty()}else if(J.kind==="finite"){if(!Number.isFinite(D.data))$=this._getOrReturnCtx(D,$),j($,{code:C.not_finite,message:J.message}),B.dirty()}else $D.assertNever(J);return{status:B.value,value:D.data}}gte(D,F){return this.setLimit("min",D,!0,x.toString(F))}gt(D,F){return this.setLimit("min",D,!1,x.toString(F))}lte(D,F){return this.setLimit("max",D,!0,x.toString(F))}lt(D,F){return this.setLimit("max",D,!1,x.toString(F))}setLimit(D,F,$,B){return new X6({...this._def,checks:[...this._def.checks,{kind:D,value:F,inclusive:$,message:x.toString(B)}]})}_addCheck(D){return new X6({...this._def,checks:[...this._def.checks,D]})}int(D){return this._addCheck({kind:"int",message:x.toString(D)})}positive(D){return this._addCheck({kind:"min",value:0,inclusive:!1,message:x.toString(D)})}negative(D){return this._addCheck({kind:"max",value:0,inclusive:!1,message:x.toString(D)})}nonpositive(D){return this._addCheck({kind:"max",value:0,inclusive:!0,message:x.toString(D)})}nonnegative(D){return this._addCheck({kind:"min",value:0,inclusive:!0,message:x.toString(D)})}multipleOf(D,F){return this._addCheck({kind:"multipleOf",value:D,message:x.toString(F)})}finite(D){return this._addCheck({kind:"finite",message:x.toString(D)})}safe(D){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:x.toString(D)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:x.toString(D)})}get minValue(){let D=null;for(let F of this._def.checks)if(F.kind==="min"){if(D===null||F.value>D)D=F.value}return D}get maxValue(){let D=null;for(let F of this._def.checks)if(F.kind==="max"){if(D===null||F.value<D)D=F.value}return D}get isInt(){return!!this._def.checks.find((D)=>D.kind==="int"||D.kind==="multipleOf"&&$D.isInteger(D.value))}get isFinite(){let D=null,F=null;for(let $ of this._def.checks)if($.kind==="finite"||$.kind==="int"||$.kind==="multipleOf")return!0;else if($.kind==="min"){if(F===null||$.value>F)F=$.value}else if($.kind==="max"){if(D===null||$.value<D)D=$.value}return Number.isFinite(F)&&Number.isFinite(D)}}X6.create=(D)=>{return new X6({checks:[],typeName:h.ZodNumber,coerce:D?.coerce||!1,...o(D)})};class Y6 extends e{constructor(){super(...arguments);this.min=this.gte,this.max=this.lte}_parse(D){if(this._def.coerce)try{D.data=BigInt(D.data)}catch{return this._getInvalidInput(D)}if(this._getType(D)!==w.bigint)return this._getInvalidInput(D);let $=void 0,B=new D0;for(let J of this._def.checks)if(J.kind==="min"){if(J.inclusive?D.data<J.value:D.data<=J.value)$=this._getOrReturnCtx(D,$),j($,{code:C.too_small,type:"bigint",minimum:J.value,inclusive:J.inclusive,message:J.message}),B.dirty()}else if(J.kind==="max"){if(J.inclusive?D.data>J.value:D.data>=J.value)$=this._getOrReturnCtx(D,$),j($,{code:C.too_big,type:"bigint",maximum:J.value,inclusive:J.inclusive,message:J.message}),B.dirty()}else if(J.kind==="multipleOf"){if(D.data%J.value!==BigInt(0))$=this._getOrReturnCtx(D,$),j($,{code:C.not_multiple_of,multipleOf:J.value,message:J.message}),B.dirty()}else $D.assertNever(J);return{status:B.value,value:D.data}}_getInvalidInput(D){let F=this._getOrReturnCtx(D);return j(F,{code:C.invalid_type,expected:w.bigint,received:F.parsedType}),g}gte(D,F){return this.setLimit("min",D,!0,x.toString(F))}gt(D,F){return this.setLimit("min",D,!1,x.toString(F))}lte(D,F){return this.setLimit("max",D,!0,x.toString(F))}lt(D,F){return this.setLimit("max",D,!1,x.toString(F))}setLimit(D,F,$,B){return new Y6({...this._def,checks:[...this._def.checks,{kind:D,value:F,inclusive:$,message:x.toString(B)}]})}_addCheck(D){return new Y6({...this._def,checks:[...this._def.checks,D]})}positive(D){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:x.toString(D)})}negative(D){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:x.toString(D)})}nonpositive(D){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:x.toString(D)})}nonnegative(D){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:x.toString(D)})}multipleOf(D,F){return this._addCheck({kind:"multipleOf",value:D,message:x.toString(F)})}get minValue(){let D=null;for(let F of this._def.checks)if(F.kind==="min"){if(D===null||F.value>D)D=F.value}return D}get maxValue(){let D=null;for(let F of this._def.checks)if(F.kind==="max"){if(D===null||F.value<D)D=F.value}return D}}Y6.create=(D)=>{return new Y6({checks:[],typeName:h.ZodBigInt,coerce:D?.coerce??!1,...o(D)})};class UF extends e{_parse(D){if(this._def.coerce)D.data=Boolean(D.data);if(this._getType(D)!==w.boolean){let $=this._getOrReturnCtx(D);return j($,{code:C.invalid_type,expected:w.boolean,received:$.parsedType}),g}return H0(D.data)}}UF.create=(D)=>{return new UF({typeName:h.ZodBoolean,coerce:D?.coerce||!1,...o(D)})};class p6 extends e{_parse(D){if(this._def.coerce)D.data=new Date(D.data);if(this._getType(D)!==w.date){let J=this._getOrReturnCtx(D);return j(J,{code:C.invalid_type,expected:w.date,received:J.parsedType}),g}if(Number.isNaN(D.data.getTime())){let J=this._getOrReturnCtx(D);return j(J,{code:C.invalid_date}),g}let $=new D0,B=void 0;for(let J of this._def.checks)if(J.kind==="min"){if(D.data.getTime()<J.value)B=this._getOrReturnCtx(D,B),j(B,{code:C.too_small,message:J.message,inclusive:!0,exact:!1,minimum:J.value,type:"date"}),$.dirty()}else if(J.kind==="max"){if(D.data.getTime()>J.value)B=this._getOrReturnCtx(D,B),j(B,{code:C.too_big,message:J.message,inclusive:!0,exact:!1,maximum:J.value,type:"date"}),$.dirty()}else $D.assertNever(J);return{status:$.value,value:new Date(D.data.getTime())}}_addCheck(D){return new p6({...this._def,checks:[...this._def.checks,D]})}min(D,F){return this._addCheck({kind:"min",value:D.getTime(),message:x.toString(F)})}max(D,F){return this._addCheck({kind:"max",value:D.getTime(),message:x.toString(F)})}get minDate(){let D=null;for(let F of this._def.checks)if(F.kind==="min"){if(D===null||F.value>D)D=F.value}return D!=null?new Date(D):null}get maxDate(){let D=null;for(let F of this._def.checks)if(F.kind==="max"){if(D===null||F.value<D)D=F.value}return D!=null?new Date(D):null}}p6.create=(D)=>{return new p6({checks:[],coerce:D?.coerce||!1,typeName:h.ZodDate,...o(D)})};class K5 extends e{_parse(D){if(this._getType(D)!==w.symbol){let $=this._getOrReturnCtx(D);return j($,{code:C.invalid_type,expected:w.symbol,received:$.parsedType}),g}return H0(D.data)}}K5.create=(D)=>{return new K5({typeName:h.ZodSymbol,...o(D)})};class LF extends e{_parse(D){if(this._getType(D)!==w.undefined){let $=this._getOrReturnCtx(D);return j($,{code:C.invalid_type,expected:w.undefined,received:$.parsedType}),g}return H0(D.data)}}LF.create=(D)=>{return new LF({typeName:h.ZodUndefined,...o(D)})};class MF extends e{_parse(D){if(this._getType(D)!==w.null){let $=this._getOrReturnCtx(D);return j($,{code:C.invalid_type,expected:w.null,received:$.parsedType}),g}return H0(D.data)}}MF.create=(D)=>{return new MF({typeName:h.ZodNull,...o(D)})};class c6 extends e{constructor(){super(...arguments);this._any=!0}_parse(D){return H0(D.data)}}c6.create=(D)=>{return new c6({typeName:h.ZodAny,...o(D)})};class Q6 extends e{constructor(){super(...arguments);this._unknown=!0}_parse(D){return H0(D.data)}}Q6.create=(D)=>{return new Q6({typeName:h.ZodUnknown,...o(D)})};class i1 extends e{_parse(D){let F=this._getOrReturnCtx(D);return j(F,{code:C.invalid_type,expected:w.never,received:F.parsedType}),g}}i1.create=(D)=>{return new i1({typeName:h.ZodNever,...o(D)})};class z5 extends e{_parse(D){if(this._getType(D)!==w.undefined){let $=this._getOrReturnCtx(D);return j($,{code:C.invalid_type,expected:w.void,received:$.parsedType}),g}return H0(D.data)}}z5.create=(D)=>{return new z5({typeName:h.ZodVoid,...o(D)})};class A1 extends e{_parse(D){let{ctx:F,status:$}=this._processInputParams(D),B=this._def;if(F.parsedType!==w.array)return j(F,{code:C.invalid_type,expected:w.array,received:F.parsedType}),g;if(B.exactLength!==null){let Q=F.data.length>B.exactLength.value,X=F.data.length<B.exactLength.value;if(Q||X)j(F,{code:Q?C.too_big:C.too_small,minimum:X?B.exactLength.value:void 0,maximum:Q?B.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:B.exactLength.message}),$.dirty()}if(B.minLength!==null){if(F.data.length<B.minLength.value)j(F,{code:C.too_small,minimum:B.minLength.value,type:"array",inclusive:!0,exact:!1,message:B.minLength.message}),$.dirty()}if(B.maxLength!==null){if(F.data.length>B.maxLength.value)j(F,{code:C.too_big,maximum:B.maxLength.value,type:"array",inclusive:!0,exact:!1,message:B.maxLength.message}),$.dirty()}if(F.common.async)return Promise.all([...F.data].map((Q,X)=>{return B.type._parseAsync(new U1(F,Q,F.path,X))})).then((Q)=>{return D0.mergeArray($,Q)});let J=[...F.data].map((Q,X)=>{return B.type._parseSync(new U1(F,Q,F.path,X))});return D0.mergeArray($,J)}get element(){return this._def.type}min(D,F){return new A1({...this._def,minLength:{value:D,message:x.toString(F)}})}max(D,F){return new A1({...this._def,maxLength:{value:D,message:x.toString(F)}})}length(D,F){return new A1({...this._def,exactLength:{value:D,message:x.toString(F)}})}nonempty(D){return this.min(1,D)}}A1.create=(D,F)=>{return new A1({type:D,minLength:null,maxLength:null,exactLength:null,typeName:h.ZodArray,...o(F)})};function AF(D){if(D instanceof SD){let F={};for(let $ in D.shape){let B=D.shape[$];F[$]=Z1.create(AF(B))}return new SD({...D._def,shape:()=>F})}else if(D instanceof A1)return new A1({...D._def,type:AF(D.element)});else if(D instanceof Z1)return Z1.create(AF(D.unwrap()));else if(D instanceof K8)return K8.create(AF(D.unwrap()));else if(D instanceof a1)return a1.create(D.items.map((F)=>AF(F)));else return D}class SD extends e{constructor(){super(...arguments);this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let D=this._def.shape(),F=$D.objectKeys(D);return this._cached={shape:D,keys:F},this._cached}_parse(D){if(this._getType(D)!==w.object){let G=this._getOrReturnCtx(D);return j(G,{code:C.invalid_type,expected:w.object,received:G.parsedType}),g}let{status:$,ctx:B}=this._processInputParams(D),{shape:J,keys:Q}=this._getCached(),X=[];if(!(this._def.catchall instanceof i1&&this._def.unknownKeys==="strip")){for(let G in B.data)if(!Q.includes(G))X.push(G)}let Y=[];for(let G of Q){let H=J[G],E=B.data[G];Y.push({key:{status:"valid",value:G},value:H._parse(new U1(B,E,B.path,G)),alwaysSet:G in B.data})}if(this._def.catchall instanceof i1){let G=this._def.unknownKeys;if(G==="passthrough")for(let H of X)Y.push({key:{status:"valid",value:H},value:{status:"valid",value:B.data[H]}});else if(G==="strict"){if(X.length>0)j(B,{code:C.unrecognized_keys,keys:X}),$.dirty()}else if(G==="strip");else throw Error("Internal ZodObject error: invalid unknownKeys value.")}else{let G=this._def.catchall;for(let H of X){let E=B.data[H];Y.push({key:{status:"valid",value:H},value:G._parse(new U1(B,E,B.path,H)),alwaysSet:H in B.data})}}if(B.common.async)return Promise.resolve().then(async()=>{let G=[];for(let H of Y){let E=await H.key,K=await H.value;G.push({key:E,value:K,alwaysSet:H.alwaysSet})}return G}).then((G)=>{return D0.mergeObjectSync($,G)});else return D0.mergeObjectSync($,Y)}get shape(){return this._def.shape()}strict(D){return x.errToObj,new SD({...this._def,unknownKeys:"strict",...D!==void 0?{errorMap:(F,$)=>{let B=this._def.errorMap?.(F,$).message??$.defaultError;if(F.code==="unrecognized_keys")return{message:x.errToObj(D).message??B};return{message:B}}}:{}})}strip(){return new SD({...this._def,unknownKeys:"strip"})}passthrough(){return new SD({...this._def,unknownKeys:"passthrough"})}extend(D){return new SD({...this._def,shape:()=>({...this._def.shape(),...D})})}merge(D){return new SD({unknownKeys:D._def.unknownKeys,catchall:D._def.catchall,shape:()=>({...this._def.shape(),...D._def.shape()}),typeName:h.ZodObject})}setKey(D,F){return this.augment({[D]:F})}catchall(D){return new SD({...this._def,catchall:D})}pick(D){let F={};for(let $ of $D.objectKeys(D))if(D[$]&&this.shape[$])F[$]=this.shape[$];return new SD({...this._def,shape:()=>F})}omit(D){let F={};for(let $ of $D.objectKeys(this.shape))if(!D[$])F[$]=this.shape[$];return new SD({...this._def,shape:()=>F})}deepPartial(){return AF(this)}partial(D){let F={};for(let $ of $D.objectKeys(this.shape)){let B=this.shape[$];if(D&&!D[$])F[$]=B;else F[$]=B.optional()}return new SD({...this._def,shape:()=>F})}required(D){let F={};for(let $ of $D.objectKeys(this.shape))if(D&&!D[$])F[$]=this.shape[$];else{let J=this.shape[$];while(J instanceof Z1)J=J._def.innerType;F[$]=J}return new SD({...this._def,shape:()=>F})}keyof(){return Hv($D.objectKeys(this.shape))}}SD.create=(D,F)=>{return new SD({shape:()=>D,unknownKeys:"strip",catchall:i1.create(),typeName:h.ZodObject,...o(F)})};SD.strictCreate=(D,F)=>{return new SD({shape:()=>D,unknownKeys:"strict",catchall:i1.create(),typeName:h.ZodObject,...o(F)})};SD.lazycreate=(D,F)=>{return new SD({shape:D,unknownKeys:"strip",catchall:i1.create(),typeName:h.ZodObject,...o(F)})};class NF extends e{_parse(D){let{ctx:F}=this._processInputParams(D),$=this._def.options;function B(J){for(let X of J)if(X.result.status==="valid")return X.result;for(let X of J)if(X.result.status==="dirty")return F.common.issues.push(...X.ctx.common.issues),X.result;let Q=J.map((X)=>new I0(X.ctx.common.issues));return j(F,{code:C.invalid_union,unionErrors:Q}),g}if(F.common.async)return Promise.all($.map(async(J)=>{let Q={...F,common:{...F.common,issues:[]},parent:null};return{result:await J._parseAsync({data:F.data,path:F.path,parent:Q}),ctx:Q}})).then(B);else{let J=void 0,Q=[];for(let Y of $){let G={...F,common:{...F.common,issues:[]},parent:null},H=Y._parseSync({data:F.data,path:F.path,parent:G});if(H.status==="valid")return H;else if(H.status==="dirty"&&!J)J={result:H,ctx:G};if(G.common.issues.length)Q.push(G.common.issues)}if(J)return F.common.issues.push(...J.ctx.common.issues),J.result;let X=Q.map((Y)=>new I0(Y));return j(F,{code:C.invalid_union,unionErrors:X}),g}}get options(){return this._def.options}}NF.create=(D,F)=>{return new NF({options:D,typeName:h.ZodUnion,...o(F)})};var q8=(D)=>{if(D instanceof RF)return q8(D.schema);else if(D instanceof L1)return q8(D.innerType());else if(D instanceof wF)return[D.value];else if(D instanceof G6)return D.options;else if(D instanceof TF)return $D.objectValues(D.enum);else if(D instanceof jF)return q8(D._def.innerType);else if(D instanceof LF)return[void 0];else if(D instanceof MF)return[null];else if(D instanceof Z1)return[void 0,...q8(D.unwrap())];else if(D instanceof K8)return[null,...q8(D.unwrap())];else if(D instanceof C$)return q8(D.unwrap());else if(D instanceof IF)return q8(D.unwrap());else if(D instanceof OF)return q8(D._def.innerType);else return[]};class N$ extends e{_parse(D){let{ctx:F}=this._processInputParams(D);if(F.parsedType!==w.object)return j(F,{code:C.invalid_type,expected:w.object,received:F.parsedType}),g;let $=this.discriminator,B=F.data[$],J=this.optionsMap.get(B);if(!J)return j(F,{code:C.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[$]}),g;if(F.common.async)return J._parseAsync({data:F.data,path:F.path,parent:F});else return J._parseSync({data:F.data,path:F.path,parent:F})}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(D,F,$){let B=new Map;for(let J of F){let Q=q8(J.shape[D]);if(!Q.length)throw Error(`A discriminator value for key \`${D}\` could not be extracted from all schema options`);for(let X of Q){if(B.has(X))throw Error(`Discriminator property ${String(D)} has duplicate value ${String(X)}`);B.set(X,J)}}return new N$({typeName:h.ZodDiscriminatedUnion,discriminator:D,options:F,optionsMap:B,...o($)})}}function w2(D,F){let $=n1(D),B=n1(F);if(D===F)return{valid:!0,data:D};else if($===w.object&&B===w.object){let J=$D.objectKeys(F),Q=$D.objectKeys(D).filter((Y)=>J.indexOf(Y)!==-1),X={...D,...F};for(let Y of Q){let G=w2(D[Y],F[Y]);if(!G.valid)return{valid:!1};X[Y]=G.data}return{valid:!0,data:X}}else if($===w.array&&B===w.array){if(D.length!==F.length)return{valid:!1};let J=[];for(let Q=0;Q<D.length;Q++){let X=D[Q],Y=F[Q],G=w2(X,Y);if(!G.valid)return{valid:!1};J.push(G.data)}return{valid:!0,data:J}}else if($===w.date&&B===w.date&&+D===+F)return{valid:!0,data:D};else return{valid:!1}}class CF extends e{_parse(D){let{status:F,ctx:$}=this._processInputParams(D),B=(J,Q)=>{if(L$(J)||L$(Q))return g;let X=w2(J.value,Q.value);if(!X.valid)return j($,{code:C.invalid_intersection_types}),g;if(M$(J)||M$(Q))F.dirty();return{status:F.value,value:X.data}};if($.common.async)return Promise.all([this._def.left._parseAsync({data:$.data,path:$.path,parent:$}),this._def.right._parseAsync({data:$.data,path:$.path,parent:$})]).then(([J,Q])=>B(J,Q));else return B(this._def.left._parseSync({data:$.data,path:$.path,parent:$}),this._def.right._parseSync({data:$.data,path:$.path,parent:$}))}}CF.create=(D,F,$)=>{return new CF({left:D,right:F,typeName:h.ZodIntersection,...o($)})};class a1 extends e{_parse(D){let{status:F,ctx:$}=this._processInputParams(D);if($.parsedType!==w.array)return j($,{code:C.invalid_type,expected:w.array,received:$.parsedType}),g;if($.data.length<this._def.items.length)return j($,{code:C.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),g;if(!this._def.rest&&$.data.length>this._def.items.length)j($,{code:C.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),F.dirty();let J=[...$.data].map((Q,X)=>{let Y=this._def.items[X]||this._def.rest;if(!Y)return null;return Y._parse(new U1($,Q,$.path,X))}).filter((Q)=>!!Q);if($.common.async)return Promise.all(J).then((Q)=>{return D0.mergeArray(F,Q)});else return D0.mergeArray(F,J)}get items(){return this._def.items}rest(D){return new a1({...this._def,rest:D})}}a1.create=(D,F)=>{if(!Array.isArray(D))throw Error("You must pass an array of schemas to z.tuple([ ... ])");return new a1({items:D,typeName:h.ZodTuple,rest:null,...o(F)})};class V5 extends e{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(D){let{status:F,ctx:$}=this._processInputParams(D);if($.parsedType!==w.object)return j($,{code:C.invalid_type,expected:w.object,received:$.parsedType}),g;let B=[],J=this._def.keyType,Q=this._def.valueType;for(let X in $.data)B.push({key:J._parse(new U1($,X,$.path,X)),value:Q._parse(new U1($,$.data[X],$.path,X)),alwaysSet:X in $.data});if($.common.async)return D0.mergeObjectAsync(F,B);else return D0.mergeObjectSync(F,B)}get element(){return this._def.valueType}static create(D,F,$){if(F instanceof e)return new V5({keyType:D,valueType:F,typeName:h.ZodRecord,...o($)});return new V5({keyType:V1.create(),valueType:D,typeName:h.ZodRecord,...o(F)})}}class A5 extends e{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(D){let{status:F,ctx:$}=this._processInputParams(D);if($.parsedType!==w.map)return j($,{code:C.invalid_type,expected:w.map,received:$.parsedType}),g;let B=this._def.keyType,J=this._def.valueType,Q=[...$.data.entries()].map(([X,Y],G)=>{return{key:B._parse(new U1($,X,$.path,[G,"key"])),value:J._parse(new U1($,Y,$.path,[G,"value"]))}});if($.common.async){let X=new Map;return Promise.resolve().then(async()=>{for(let Y of Q){let G=await Y.key,H=await Y.value;if(G.status==="aborted"||H.status==="aborted")return g;if(G.status==="dirty"||H.status==="dirty")F.dirty();X.set(G.value,H.value)}return{status:F.value,value:X}})}else{let X=new Map;for(let Y of Q){let{key:G,value:H}=Y;if(G.status==="aborted"||H.status==="aborted")return g;if(G.status==="dirty"||H.status==="dirty")F.dirty();X.set(G.value,H.value)}return{status:F.value,value:X}}}}A5.create=(D,F,$)=>{return new A5({valueType:F,keyType:D,typeName:h.ZodMap,...o($)})};class n6 extends e{_parse(D){let{status:F,ctx:$}=this._processInputParams(D);if($.parsedType!==w.set)return j($,{code:C.invalid_type,expected:w.set,received:$.parsedType}),g;let B=this._def;if(B.minSize!==null){if($.data.size<B.minSize.value)j($,{code:C.too_small,minimum:B.minSize.value,type:"set",inclusive:!0,exact:!1,message:B.minSize.message}),F.dirty()}if(B.maxSize!==null){if($.data.size>B.maxSize.value)j($,{code:C.too_big,maximum:B.maxSize.value,type:"set",inclusive:!0,exact:!1,message:B.maxSize.message}),F.dirty()}let J=this._def.valueType;function Q(Y){let G=new Set;for(let H of Y){if(H.status==="aborted")return g;if(H.status==="dirty")F.dirty();G.add(H.value)}return{status:F.value,value:G}}let X=[...$.data.values()].map((Y,G)=>J._parse(new U1($,Y,$.path,G)));if($.common.async)return Promise.all(X).then((Y)=>Q(Y));else return Q(X)}min(D,F){return new n6({...this._def,minSize:{value:D,message:x.toString(F)}})}max(D,F){return new n6({...this._def,maxSize:{value:D,message:x.toString(F)}})}size(D,F){return this.min(D,F).max(D,F)}nonempty(D){return this.min(1,D)}}n6.create=(D,F)=>{return new n6({valueType:D,minSize:null,maxSize:null,typeName:h.ZodSet,...o(F)})};class ZF extends e{constructor(){super(...arguments);this.validate=this.implement}_parse(D){let{ctx:F}=this._processInputParams(D);if(F.parsedType!==w.function)return j(F,{code:C.invalid_type,expected:w.function,received:F.parsedType}),g;function $(X,Y){return q5({data:X,path:F.path,errorMaps:[F.common.contextualErrorMap,F.schemaErrorMap,zF(),E8].filter((G)=>!!G),issueData:{code:C.invalid_arguments,argumentsError:Y}})}function B(X,Y){return q5({data:X,path:F.path,errorMaps:[F.common.contextualErrorMap,F.schemaErrorMap,zF(),E8].filter((G)=>!!G),issueData:{code:C.invalid_return_type,returnTypeError:Y}})}let J={errorMap:F.common.contextualErrorMap},Q=F.data;if(this._def.returns instanceof i6){let X=this;return H0(async function(...Y){let G=new I0([]),H=await X._def.args.parseAsync(Y,J).catch((V)=>{throw G.addIssue($(Y,V)),G}),E=await Reflect.apply(Q,this,H);return await X._def.returns._def.type.parseAsync(E,J).catch((V)=>{throw G.addIssue(B(E,V)),G})})}else{let X=this;return H0(function(...Y){let G=X._def.args.safeParse(Y,J);if(!G.success)throw new I0([$(Y,G.error)]);let H=Reflect.apply(Q,this,G.data),E=X._def.returns.safeParse(H,J);if(!E.success)throw new I0([B(H,E.error)]);return E.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...D){return new ZF({...this._def,args:a1.create(D).rest(Q6.create())})}returns(D){return new ZF({...this._def,returns:D})}implement(D){return this.parse(D)}strictImplement(D){return this.parse(D)}static create(D,F,$){return new ZF({args:D?D:a1.create([]).rest(Q6.create()),returns:F||Q6.create(),typeName:h.ZodFunction,...o($)})}}class RF extends e{get schema(){return this._def.getter()}_parse(D){let{ctx:F}=this._processInputParams(D);return this._def.getter()._parse({data:F.data,path:F.path,parent:F})}}RF.create=(D,F)=>{return new RF({getter:D,typeName:h.ZodLazy,...o(F)})};class wF extends e{_parse(D){if(D.data!==this._def.value){let F=this._getOrReturnCtx(D);return j(F,{received:F.data,code:C.invalid_literal,expected:this._def.value}),g}return{status:"valid",value:D.data}}get value(){return this._def.value}}wF.create=(D,F)=>{return new wF({value:D,typeName:h.ZodLiteral,...o(F)})};function Hv(D,F){return new G6({values:D,typeName:h.ZodEnum,...o(F)})}class G6 extends e{_parse(D){if(typeof D.data!=="string"){let F=this._getOrReturnCtx(D),$=this._def.values;return j(F,{expected:$D.joinValues($),received:F.parsedType,code:C.invalid_type}),g}if(!this._cache)this._cache=new Set(this._def.values);if(!this._cache.has(D.data)){let F=this._getOrReturnCtx(D),$=this._def.values;return j(F,{received:F.data,code:C.invalid_enum_value,options:$}),g}return H0(D.data)}get options(){return this._def.values}get enum(){let D={};for(let F of this._def.values)D[F]=F;return D}get Values(){let D={};for(let F of this._def.values)D[F]=F;return D}get Enum(){let D={};for(let F of this._def.values)D[F]=F;return D}extract(D,F=this._def){return G6.create(D,{...this._def,...F})}exclude(D,F=this._def){return G6.create(this.options.filter(($)=>!D.includes($)),{...this._def,...F})}}G6.create=Hv;class TF extends e{_parse(D){let F=$D.getValidEnumValues(this._def.values),$=this._getOrReturnCtx(D);if($.parsedType!==w.string&&$.parsedType!==w.number){let B=$D.objectValues(F);return j($,{expected:$D.joinValues(B),received:$.parsedType,code:C.invalid_type}),g}if(!this._cache)this._cache=new Set($D.getValidEnumValues(this._def.values));if(!this._cache.has(D.data)){let B=$D.objectValues(F);return j($,{received:$.data,code:C.invalid_enum_value,options:B}),g}return H0(D.data)}get enum(){return this._def.values}}TF.create=(D,F)=>{return new TF({values:D,typeName:h.ZodNativeEnum,...o(F)})};class i6 extends e{unwrap(){return this._def.type}_parse(D){let{ctx:F}=this._processInputParams(D);if(F.parsedType!==w.promise&&F.common.async===!1)return j(F,{code:C.invalid_type,expected:w.promise,received:F.parsedType}),g;let $=F.parsedType===w.promise?F.data:Promise.resolve(F.data);return H0($.then((B)=>{return this._def.type.parseAsync(B,{path:F.path,errorMap:F.common.contextualErrorMap})}))}}i6.create=(D,F)=>{return new i6({type:D,typeName:h.ZodPromise,...o(F)})};class L1 extends e{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===h.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(D){let{status:F,ctx:$}=this._processInputParams(D),B=this._def.effect||null,J={addIssue:(Q)=>{if(j($,Q),Q.fatal)F.abort();else F.dirty()},get path(){return $.path}};if(J.addIssue=J.addIssue.bind(J),B.type==="preprocess"){let Q=B.transform($.data,J);if($.common.async)return Promise.resolve(Q).then(async(X)=>{if(F.value==="aborted")return g;let Y=await this._def.schema._parseAsync({data:X,path:$.path,parent:$});if(Y.status==="aborted")return g;if(Y.status==="dirty")return d6(Y.value);if(F.value==="dirty")return d6(Y.value);return Y});else{if(F.value==="aborted")return g;let X=this._def.schema._parseSync({data:Q,path:$.path,parent:$});if(X.status==="aborted")return g;if(X.status==="dirty")return d6(X.value);if(F.value==="dirty")return d6(X.value);return X}}if(B.type==="refinement"){let Q=(X)=>{let Y=B.refinement(X,J);if($.common.async)return Promise.resolve(Y);if(Y instanceof Promise)throw Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return X};if($.common.async===!1){let X=this._def.schema._parseSync({data:$.data,path:$.path,parent:$});if(X.status==="aborted")return g;if(X.status==="dirty")F.dirty();return Q(X.value),{status:F.value,value:X.value}}else return this._def.schema._parseAsync({data:$.data,path:$.path,parent:$}).then((X)=>{if(X.status==="aborted")return g;if(X.status==="dirty")F.dirty();return Q(X.value).then(()=>{return{status:F.value,value:X.value}})})}if(B.type==="transform")if($.common.async===!1){let Q=this._def.schema._parseSync({data:$.data,path:$.path,parent:$});if(!J6(Q))return g;let X=B.transform(Q.value,J);if(X instanceof Promise)throw Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:F.value,value:X}}else return this._def.schema._parseAsync({data:$.data,path:$.path,parent:$}).then((Q)=>{if(!J6(Q))return g;return Promise.resolve(B.transform(Q.value,J)).then((X)=>({status:F.value,value:X}))});$D.assertNever(B)}}L1.create=(D,F,$)=>{return new L1({schema:D,typeName:h.ZodEffects,effect:F,...o($)})};L1.createWithPreprocess=(D,F,$)=>{return new L1({schema:F,effect:{type:"preprocess",transform:D},typeName:h.ZodEffects,...o($)})};class Z1 extends e{_parse(D){if(this._getType(D)===w.undefined)return H0(void 0);return this._def.innerType._parse(D)}unwrap(){return this._def.innerType}}Z1.create=(D,F)=>{return new Z1({innerType:D,typeName:h.ZodOptional,...o(F)})};class K8 extends e{_parse(D){if(this._getType(D)===w.null)return H0(null);return this._def.innerType._parse(D)}unwrap(){return this._def.innerType}}K8.create=(D,F)=>{return new K8({innerType:D,typeName:h.ZodNullable,...o(F)})};class jF extends e{_parse(D){let{ctx:F}=this._processInputParams(D),$=F.data;if(F.parsedType===w.undefined)$=this._def.defaultValue();return this._def.innerType._parse({data:$,path:F.path,parent:F})}removeDefault(){return this._def.innerType}}jF.create=(D,F)=>{return new jF({innerType:D,typeName:h.ZodDefault,defaultValue:typeof F.default==="function"?F.default:()=>F.default,...o(F)})};class OF extends e{_parse(D){let{ctx:F}=this._processInputParams(D),$={...F,common:{...F.common,issues:[]}},B=this._def.innerType._parse({data:$.data,path:$.path,parent:{...$}});if(VF(B))return B.then((J)=>{return{status:"valid",value:J.status==="valid"?J.value:this._def.catchValue({get error(){return new I0($.common.issues)},input:$.data})}});else return{status:"valid",value:B.status==="valid"?B.value:this._def.catchValue({get error(){return new I0($.common.issues)},input:$.data})}}removeCatch(){return this._def.innerType}}OF.create=(D,F)=>{return new OF({innerType:D,typeName:h.ZodCatch,catchValue:typeof F.catch==="function"?F.catch:()=>F.catch,...o(F)})};class Z5 extends e{_parse(D){if(this._getType(D)!==w.nan){let $=this._getOrReturnCtx(D);return j($,{code:C.invalid_type,expected:w.nan,received:$.parsedType}),g}return{status:"valid",value:D.data}}}Z5.create=(D)=>{return new Z5({typeName:h.ZodNaN,...o(D)})};var S2D=Symbol("zod_brand");class C$ extends e{_parse(D){let{ctx:F}=this._processInputParams(D),$=F.data;return this._def.type._parse({data:$,path:F.path,parent:F})}unwrap(){return this._def.type}}class U5 extends e{_parse(D){let{status:F,ctx:$}=this._processInputParams(D);if($.common.async)return(async()=>{let J=await this._def.in._parseAsync({data:$.data,path:$.path,parent:$});if(J.status==="aborted")return g;if(J.status==="dirty")return F.dirty(),d6(J.value);else return this._def.out._parseAsync({data:J.value,path:$.path,parent:$})})();else{let B=this._def.in._parseSync({data:$.data,path:$.path,parent:$});if(B.status==="aborted")return g;if(B.status==="dirty")return F.dirty(),{status:"dirty",value:B.value};else return this._def.out._parseSync({data:B.value,path:$.path,parent:$})}}static create(D,F){return new U5({in:D,out:F,typeName:h.ZodPipeline})}}class IF extends e{_parse(D){let F=this._def.innerType._parse(D),$=(B)=>{if(J6(B))B.value=Object.freeze(B.value);return B};return VF(F)?F.then((B)=>$(B)):$(F)}unwrap(){return this._def.innerType}}IF.create=(D,F)=>{return new IF({innerType:D,typeName:h.ZodReadonly,...o(F)})};function Qv(D,F){let $=typeof D==="function"?D(F):typeof D==="string"?{message:D}:D;return typeof $==="string"?{message:$}:$}function Wv(D,F={},$){if(D)return c6.create().superRefine((B,J)=>{let Q=D(B);if(Q instanceof Promise)return Q.then((X)=>{if(!X){let Y=Qv(F,B),G=Y.fatal??$??!0;J.addIssue({code:"custom",...Y,fatal:G})}});if(!Q){let X=Qv(F,B),Y=X.fatal??$??!0;J.addIssue({code:"custom",...X,fatal:Y})}return});return c6.create()}var k2D={object:SD.lazycreate},h;(function(D){D.ZodString="ZodString",D.ZodNumber="ZodNumber",D.ZodNaN="ZodNaN",D.ZodBigInt="ZodBigInt",D.ZodBoolean="ZodBoolean",D.ZodDate="ZodDate",D.ZodSymbol="ZodSymbol",D.ZodUndefined="ZodUndefined",D.ZodNull="ZodNull",D.ZodAny="ZodAny",D.ZodUnknown="ZodUnknown",D.ZodNever="ZodNever",D.ZodVoid="ZodVoid",D.ZodArray="ZodArray",D.ZodObject="ZodObject",D.ZodUnion="ZodUnion",D.ZodDiscriminatedUnion="ZodDiscriminatedUnion",D.ZodIntersection="ZodIntersection",D.ZodTuple="ZodTuple",D.ZodRecord="ZodRecord",D.ZodMap="ZodMap",D.ZodSet="ZodSet",D.ZodFunction="ZodFunction",D.ZodLazy="ZodLazy",D.ZodLiteral="ZodLiteral",D.ZodEnum="ZodEnum",D.ZodEffects="ZodEffects",D.ZodNativeEnum="ZodNativeEnum",D.ZodOptional="ZodOptional",D.ZodNullable="ZodNullable",D.ZodDefault="ZodDefault",D.ZodCatch="ZodCatch",D.ZodPromise="ZodPromise",D.ZodBranded="ZodBranded",D.ZodPipeline="ZodPipeline",D.ZodReadonly="ZodReadonly"})(h||(h={}));var v2D=(D,F={message:`Input not instance of ${D.name}`})=>Wv(($)=>$ instanceof D,F),Ev=V1.create,qv=X6.create,y2D=Z5.create,x2D=Y6.create,Kv=UF.create,_2D=p6.create,f2D=K5.create,g2D=LF.create,h2D=MF.create,b2D=c6.create,u2D=Q6.create,m2D=i1.create,l2D=z5.create,d2D=A1.create,p2D=SD.create,c2D=SD.strictCreate,n2D=NF.create,i2D=N$.create,a2D=CF.create,o2D=a1.create,s2D=V5.create,r2D=A5.create,t2D=n6.create,e2D=ZF.create,DGD=RF.create,FGD=wF.create,$GD=G6.create,BGD=TF.create,JGD=i6.create,QGD=L1.create,XGD=Z1.create,YGD=K8.create,GGD=L1.createWithPreprocess,HGD=U5.create,WGD=()=>Ev().optional(),EGD=()=>qv().optional(),qGD=()=>Kv().optional(),KGD={string:(D)=>V1.create({...D,coerce:!0}),number:(D)=>X6.create({...D,coerce:!0}),boolean:(D)=>UF.create({...D,coerce:!0}),bigint:(D)=>Y6.create({...D,coerce:!0}),date:(D)=>p6.create({...D,coerce:!0})};var zGD=g;var nCD=M1.object({apiKey:M1.string().optional(),apiUrl:M1.string().url().default("https://api.osc.earth/nemar"),username:M1.string().optional(),email:M1.string().email().optional(),githubUsername:M1.string().optional(),sandboxCompleted:M1.boolean().optional(),sandboxDatasetId:M1.string().optional()}),_0=new U$({projectName:"nemar",schema:{apiKey:{type:"string"},apiUrl:{type:"string",default:"https://api.osc.earth/nemar"},username:{type:"string"},email:{type:"string"},githubUsername:{type:"string"},sandboxCompleted:{type:"boolean"},sandboxDatasetId:{type:"string"}},...process.env.NEMAR_CONFIG_DIR?{cwd:process.env.NEMAR_CONFIG_DIR}:{}});function F0(){return{apiKey:_0.get("apiKey"),apiUrl:_0.get("apiUrl"),username:_0.get("username"),email:_0.get("email"),githubUsername:_0.get("githubUsername"),sandboxCompleted:_0.get("sandboxCompleted"),sandboxDatasetId:_0.get("sandboxDatasetId")}}function zv(){return!!_0.get("sandboxCompleted")}function V0(D,F){_0.set(D,F)}function T2(D){_0.delete(D)}function Vv(){_0.clear()}function jD(){return!!_0.get("apiKey")}function Av(){return _0.path}var j2="https://api.osc.earth/nemar",R$=/^\d{4}-\d{4}-\d{4}-\d{3}[\dX]$/;function P0(D){if(D instanceof Error)return D.message;return String(D)}class c extends Error{statusCode;details;constructor(D,F,$){super(F);this.statusCode=D;this.details=$;this.name="ApiError"}}var VGD=j2.includes("workers.dev");function Zv(){if(process.env.TEST_API_URL)return process.env.TEST_API_URL;if(VGD)return j2;return F0().apiUrl||j2}async function s(D,F={},$=!1){let B=`${Zv()}${D}`,J={"Content-Type":"application/json",...F.headers};if($){let Y=F0();if(!Y.apiKey&&$===!0)throw new c(401,"Not authenticated. Run 'nemar auth login' first.");if(Y.apiKey)J.Authorization=`Bearer ${Y.apiKey}`}let Q;try{Q=await fetch(B,{...F,headers:J})}catch(Y){throw new c(0,`Network error: Could not connect to ${Zv()}`,{originalError:Y instanceof Error?Y.message:String(Y)})}let X;try{X=await Q.json()}catch{throw new c(Q.status,`Invalid response from server (status ${Q.status})`)}if(!Q.ok)throw new c(Q.status,X.error||X.message||"Request failed",X.details);return X}async function Uv(D){return s(`/auth/check-username?username=${encodeURIComponent(D)}`)}async function Lv(D){return s(`/auth/check-github?username=${encodeURIComponent(D)}`)}async function Mv(D){return s("/auth/signup",{method:"POST",body:JSON.stringify(D)})}async function Nv(D){return s("/auth/login",{method:"POST",body:JSON.stringify({api_key:D})})}async function Cv(D){return s("/auth/resend-verification",{method:"POST",body:JSON.stringify({email:D})})}async function w$(){return s("/users/me",{},!0)}async function Rv(D){let F=D?`?status=${D}`:"";return s(`/admin/users${F}`,{},!0)}async function wv(D){return s(`/admin/approve/${D}`,{method:"POST"},!0)}async function Tv(D){return s(`/admin/revoke/${D}`,{method:"POST"},!0)}async function jv(D,F){return s(`/admin/users/${D}/role`,{method:"POST",body:JSON.stringify({role:F})},!0)}async function Ov(D){return s(`/admin/regenerate-iam/${D}`,{method:"POST"},!0)}async function O2(D,F){return s(`/admin/datasets/${D}/visibility`,{method:"PATCH",body:JSON.stringify({visibility:F})},!0)}async function Iv(D){return s(`/datasets/${D}/publish`,{method:"POST"},!0)}async function Pv(D){return s(`/admin/datasets/${D}/ci`,{},!0)}async function T$(D){return s(`/admin/datasets/${D}/ci`,{method:"POST"},!0)}async function Sv(D){return s(`/datasets/${D}/ci/status`,{},!0)}async function kv(D){return s(`/datasets/${D}/manifest`,{},!0)}async function vv(D,F){return s(`/datasets/${D}/manifest/${F}`,{},!0)}function yv(D){let F=D;if(!["active","archived","deleted"].includes(F.status))throw Error(`Invalid dataset status: ${F.status}`);if(!F.visibility)F.visibility="private";else if(!["public","private"].includes(F.visibility))throw Error(`Invalid dataset visibility: ${F.visibility}`);return F}async function xv(D=!1){let $=await s(`/datasets${D?"?mine=true":""}`,{},D?!0:"optional");return $.datasets=$.datasets.map(yv),$}async function N1(D){let F=await s(`/datasets/${D}`,{},"optional");return yv(F.dataset)}async function j$(D){return s("/datasets",{method:"POST",body:JSON.stringify(D)},!0)}async function O$(D){return s(`/datasets/${D}/finalize`,{method:"POST"},!0)}async function _v(D,F){return s(`/datasets/${D}/upload-urls`,{method:"POST",body:JSON.stringify({files:F})},!0)}async function fv(D,F){return s(`/admin/datasets/${D}/doi/concept`,{method:"POST",body:JSON.stringify(F)},!0)}async function L5(D){return s(`/admin/datasets/${D}/doi`,{},!0)}async function I2(D,F){return s(`/admin/datasets/${D}/doi/update`,{method:"POST",body:JSON.stringify(F)},!0)}async function gv(D){return s(`/datasets/${D}/request-access`,{method:"POST"},!0)}async function hv(D,F){return s(`/datasets/${D}/invite`,{method:"POST",body:JSON.stringify({username:F})},!0)}async function bv(D){return s(`/datasets/${D}/collaborators`,{},!0)}async function uv(D){return s("/sandbox/complete",{method:"POST",body:JSON.stringify({dataset_id:D})},!0)}async function mv(){return s("/sandbox/reset",{method:"POST"},!0)}async function lv(){return s("/sandbox/status",{},!0)}async function dv(D){return s(`/datasets/${D}/publish/request`,{method:"POST"},!0)}async function pv(D){return s(`/datasets/${D}/publish/status`,{},!0)}async function cv(D){return s(`/datasets/${D}/publish/resend`,{method:"POST"},!0)}async function nv(D){let F=D?`?status=${D}`:"";return s(`/admin/publish/requests${F}`,{},!0)}async function iv(D,F){return s(`/admin/publish/${D}/deny`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({reason:F})},!0)}async function av(D,F=!1,$=!1){let B,J;do if(J=await s(`/admin/publish/${D}/approve`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({resume:F,sandbox:$,s3_lock_offset:B})},!0),J.hasMore&&J.s3_lock_offset!==void 0)B=J.s3_lock_offset;else break;while(J.hasMore);return J}async function ov(D,F){return s(`/admin/datasets/${D}/enrichment`,{method:"POST",body:JSON.stringify(F)},!0)}async function sv(D){return s(`/admin/datasets/${D}/files`,{},!0)}async function rv(D){let F=0,$=0,B=[],J=0,Q=!0;while(Q){let X=await s(`/admin/datasets/${D}/s3-lock`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({offset:F})},!0);if($+=X.locked,B.push(...X.failed),J=X.total,Q=X.hasMore,Q)F+=40}return{locked:$,total:J,failed:B}}async function tv(D,F=!1){return s(`/admin/datasets/${D}`,{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({force:F})},!0)}async function gD(D,F,$=!1){if(F.no)return"declined";if(F.yes)return"confirmed";try{let{confirmed:B}=await ID.prompt([{type:"confirm",name:"confirmed",message:D,default:$}]);return B?"confirmed":"cancelled"}catch(B){let J=B instanceof Error?B.message:String(B);if(J.includes("closed")||J.includes("TTY")||J.includes("SIGINT")||J.includes("readline"))console.error("Interactive prompt unavailable (non-interactive terminal or interrupted)"),console.error(" Use --yes or --no flags for non-interactive mode");else console.error("Prompt error:",J);return"cancelled"}}async function ev(D,F,$){if($.no)return"declined";if($.yes)return"confirmed";try{let{input:B}=await ID.prompt([{type:"input",name:"input",message:D,validate:(J)=>{if(J!==F)return`Input does not match. Expected: ${F}`;return!0}}]);return B===F?"confirmed":"cancelled"}catch(B){let J=B instanceof Error?B.message:String(B);if(J.includes("closed")||J.includes("TTY")||J.includes("SIGINT")||J.includes("readline"))console.error("Interactive prompt unavailable (non-interactive terminal or interrupted)"),console.error(" Use --yes or --no flags for non-interactive mode");else console.error("Prompt error:",J);return"cancelled"}}var yD="-y, --yes",hD="-n, --no",xD="Skip confirmation and proceed",bD="Skip confirmation and decline";import{existsSync as $y,statSync as AGD}from"fs";import{join as P2}from"path";var{spawn:ZGD}=globalThis.Bun;async function u(D,F={}){let $=ZGD({cmd:D,cwd:F.cwd,stdout:"pipe",stderr:"pipe",env:{...process.env,...F.env}}),B=await new Response($.stdout).text(),J=await new Response($.stderr).text(),Q=await $.exited;return{stdout:B,stderr:J,exitCode:Q}}function Dy(D){return D.split(".").map((F)=>{let $=Number.parseInt(F.replace(/[^0-9]/g,""),10);return Number.isNaN($)?0:$})}function UGD(D,F){let $=Dy(D),B=Dy(F);for(let J=0;J<Math.max($.length,B.length);J++){let Q=$[J]||0,X=B[J]||0;if(Q>X)return!0;if(Q<X)return!1}return!0}async function By(){try{let{stdout:F,exitCode:$,stderr:B}=await u(["git-annex","version"]);if($!==0)return console.warn("git-annex version returned non-zero exit code:",$),console.warn("stderr:",B),{installed:!1,minVersion:"10.0",error:`Version check failed: ${B.trim()}`};let J=F.match(/version:\s*(\d+\.\d+)/),Q=J?J[1]:void 0;if(!Q)console.warn("Could not parse git-annex version from output:",F);return{installed:!0,version:Q,minVersion:"10.0",compatible:Q?UGD(Q,"10.0"):void 0}}catch(F){let $=F instanceof Error?F.message:String(F);if($.includes("ENOENT")||$.includes("not found"))return console.info("git-annex not found in PATH"),{installed:!1,minVersion:"10.0"};return console.error("Error checking git-annex installation:",$),{installed:!1,minVersion:"10.0",error:$}}}async function LGD(){if(process.env.GH_TOKEN)return{accessible:!0,username:"token-auth",useHttps:!0};try{let{stdout:D,stderr:F}=await u(["ssh","-T","-o","BatchMode=yes","-o","StrictHostKeyChecking=accept-new","-o","ConnectTimeout=10","git@github.com"]),$=D+F,B=$.match(/Hi ([^!]+)!/);if(B)return{accessible:!0,username:B[1]};if($.includes("Permission denied"))return{accessible:!1};return{accessible:$.includes("successfully authenticated")}}catch(D){let F=D instanceof Error?D.message:String(D);if(F.includes("ENOENT")||F.includes("not found"))console.info("SSH command not found");else console.error("Error checking GitHub SSH access:",F);return{accessible:!1}}}function Jy(){let D=process.platform;if(D==="darwin")return"brew install git-annex";if(D==="linux")return"apt install git-annex (Debian/Ubuntu)";return"See https://git-annex.branchable.com/install/"}async function I$(){let[D,F]=await Promise.all([By(),LGD()]),$=[];if(!D.installed)$.push(`git-annex is not installed. Install: ${Jy()}`);else if(D.compatible===!1)$.push(`git-annex version ${D.version} is too old. Required: >= ${D.minVersion}`);if(!F.accessible)$.push("GitHub SSH access not configured. Run 'nemar auth setup-ssh' to configure automatically.");return{gitAnnex:D,githubSSH:F,allPassed:$.length===0,errors:$}}async function z8(D){if(!$y(P2(D,".git")))return!1;try{let{exitCode:F}=await u(["git","annex","info"],{cwd:D});return F===0}catch(F){let $=F instanceof Error?F.message:String(F);if(!$.includes("ENOENT")&&!$.includes("not found"))console.error(`Error checking if ${D} is a git-annex dataset:`,$);return!1}}async function P$(D,F={}){if(!F.force&&await z8(D))return{success:!0};try{let $={};if(F.author)$.GIT_AUTHOR_NAME=F.author.name,$.GIT_AUTHOR_EMAIL=F.author.email,$.GIT_COMMITTER_NAME=F.author.name,$.GIT_COMMITTER_EMAIL=F.author.email;let{stderr:B,exitCode:J}=await u(["git","init",D],{...Object.keys($).length>0?{env:$}:{}});if(J!==0)return{success:!1,error:B.trim()||"Failed to initialize git repository"};let{stderr:Q,exitCode:X}=await u(["git","annex","init"],{cwd:D,...Object.keys($).length>0?{env:$}:{}});if(X!==0)return{success:!1,error:Q.trim()||"Failed to initialize git-annex"};return{success:!0}}catch($){return{success:!1,error:$.message}}}async function Qy(D){try{let{exitCode:F,stderr:$}=await u(["git","annex","info"],{cwd:D});if(F===0)return{success:!0};if($.includes("First run: git-annex init")){let{stderr:B,exitCode:J}=await u(["git","annex","init"],{cwd:D});if(J!==0)return{success:!1,error:B.trim()||"Failed to initialize git-annex"};return{success:!0}}return{success:!1,error:$.trim()||"Failed to check git-annex status"}}catch(F){return{success:!1,error:F.message}}}async function S$(D,F){let B=F||"include=*.edf or include=*.bdf or include=*.set or include=*.fif or include=*.vhdr or include=*.eeg or include=*.cnt or include=*.fdt or largerthan=100kb";try{let{stderr:J,exitCode:Q}=await u(["git","annex","config","--set","annex.largefiles",B],{cwd:D});if(Q!==0)return{success:!1,error:J.trim()||"Failed to configure largefiles"};return{success:!0}}catch(J){return{success:!1,error:J.message}}}async function MGD(){try{let{exitCode:D,stderr:F}=await u(["ssh","-T","-o","BatchMode=yes","-o","ConnectTimeout=5","git@github.com"]),$=F.includes("successfully authenticated");if(!$)console.warn("SSH test to github.com failed:",{exitCode:D,stderr:F.trim().slice(0,500)});return{works:$,error:$?void 0:F.trim().slice(0,500)}}catch(D){let F=D instanceof Error?D.message:String(D);return console.warn("SSH test exception:",F),{works:!1,error:F}}}async function NGD(){try{let{stdout:D,exitCode:F,stderr:$}=await u(["gh","auth","token"]);if(F!==0)return console.warn("gh CLI returned non-zero exit code:",F),console.warn("stderr:",$),{token:null,error:`gh auth token failed: ${$.trim()||"unknown error"}`};if(!D.trim())return console.warn("gh auth token returned empty output"),{token:null,error:"gh CLI returned empty token"};return{token:D.trim()}}catch(D){let F=D instanceof Error?D.message:String(D);if(console.error("Failed to get GitHub token from gh CLI:",F),F.includes("ENOENT")||F.includes("not found"))return{token:null,error:"gh CLI not installed (command not found)"};return{token:null,error:`gh CLI error: ${F}`}}}async function k$(D){try{let{stdout:F,exitCode:$,stderr:B}=await u(["gh","api","user","--jq",".login"]);if($!==0){if(B.includes("not logged in")||B.includes("auth login"))return{authenticated:!1,error:"gh CLI not authenticated. Run 'gh auth login' to authenticate."};return{authenticated:!1,error:`gh CLI error: ${B.trim()||"unknown error"}`}}let J=F.trim();if(!J)return{authenticated:!1,error:"gh CLI returned empty username"};if(D){let Q=J.toLowerCase()===D.toLowerCase();return{authenticated:!0,username:J,matches:Q,error:Q?void 0:`gh CLI authenticated as '${J}', expected '${D}'`}}return{authenticated:!0,username:J}}catch(F){let $=F instanceof Error?F.message:String(F);if($.includes("ENOENT")||$.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: ${$}`}}}async function v$(D){if(!/^[a-zA-Z0-9_.-]+\/[a-zA-Z0-9_.-]+$/.test(D))return{accepted:!1,error:`Invalid repository format: ${D}`};let{stdout:F,exitCode:$,stderr:B}=await u(["gh","api","/user/repository_invitations"]);if($!==0){if(B.includes("not logged in")||B.includes("auth login"))return{accepted:!1,error:"gh CLI not authenticated. Run 'gh auth login' to authenticate."};if(B.includes("API rate limit")||B.includes("403"))return{accepted:!1,error:"GitHub API rate limit exceeded. Please try again in a few minutes."};if(B.includes("ENOENT")||B.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: ${B.trim()||"unknown error"}`}}let J=null;try{J=JSON.parse(F||"[]").find((H)=>H.repository.full_name===D)?.id??null}catch(Y){let G=Y instanceof Error?Y.message:String(Y);return console.error("Failed to parse GitHub invitations response:",G),console.error(" Raw response (first 500 chars):",(F||"").slice(0,500)),{accepted:!1,error:`Failed to parse GitHub API response: ${G}`}}if(!J){let{exitCode:Y}=await u(["gh","api",`/repos/${D}`,"--silent"]);if(Y===0)return{accepted:!0,alreadyCollaborator:!0};return{accepted:!1,error:`No pending invitation found for ${D}. You may need to accept it manually via GitHub.`}}let{exitCode:Q,stderr:X}=await u(["gh","api","--method","PATCH",`/user/repository_invitations/${J}`]);if(Q!==0)return{accepted:!1,error:`Failed to accept invitation: ${X.trim()||"unknown error"}`};return{accepted:!0}}async function y$(D,F,$="origin"){let B=F;if(process.env.GH_TOKEN&&F.startsWith("git@github.com:")){let J=process.env.GH_TOKEN.trim();if(!J||/\s/.test(J))return{success:!1,error:"GH_TOKEN environment variable is set but appears malformed (empty or contains whitespace)"};let Q=F.replace("git@github.com:","");B=`https://${J}@github.com/${Q}`}else if(F.startsWith("git@github.com:")){let J=F.replace("git@github.com:",""),Q=await MGD();if(Q.works)B=F;else{console.warn("GitHub SSH not available, falling back to HTTPS with gh CLI token...");let X=await NGD();if(X.token)B=`https://${X.token}@github.com/${J}`,console.warn("Note: using HTTPS with gh CLI token. If the token expires, re-run 'gh auth login'.");else return{success:!1,error:`GitHub authentication not configured.
119
+ `;return this.stop(),this.#Q.write(H),this}}function R(D){return new Cw(D)}import{isDeepStrictEqual as D2D}from"util";import tk from"process";import m6 from"fs";import ek from"path";import E5 from"crypto";import F2D from"assert";var k6=(D)=>{let F=typeof D;return D!==null&&(F==="object"||F==="function")};var kX=new Set(["__proto__","prototype","constructor"]),X6D=new Set("0123456789");function A7(D){let F=[],$="",B="start",J=!1;for(let Q of D)switch(Q){case"\\":{if(B==="index")throw Error("Invalid character in an index");if(B==="indexEnd")throw Error("Invalid character after an index");if(J)$+=Q;B="property",J=!J;break}case".":{if(B==="index")throw Error("Invalid character in an index");if(B==="indexEnd"){B="property";break}if(J){J=!1,$+=Q;break}if(kX.has($))return[];F.push($),$="",B="property";break}case"[":{if(B==="index")throw Error("Invalid character in an index");if(B==="indexEnd"){B="index";break}if(J){J=!1,$+=Q;break}if(B==="property"){if(kX.has($))return[];F.push($),$=""}B="index";break}case"]":{if(B==="index"){F.push(Number.parseInt($,10)),$="",B="indexEnd";break}if(B==="indexEnd")throw Error("Invalid character after an index")}default:{if(B==="index"&&!X6D.has(Q))throw Error("Invalid character in an index");if(B==="indexEnd")throw Error("Invalid character after an index");if(B==="start")B="property";if(J)J=!1,$+="\\";$+=Q}}if(J)$+="\\";switch(B){case"property":{if(kX.has($))return[];F.push($);break}case"index":throw Error("Index was not closed");case"start":{F.push("");break}}return F}function vX(D,F){if(typeof F!=="number"&&Array.isArray(D)){let $=Number.parseInt(F,10);return Number.isInteger($)&&D[$]===D[F]}return!1}function Rw(D,F){if(vX(D,F))throw Error("Cannot use string index")}function ww(D,F,$){if(!k6(D)||typeof F!=="string")return $===void 0?D:$;let B=A7(F);if(B.length===0)return $;for(let J=0;J<B.length;J++){let Q=B[J];if(vX(D,Q))D=J===B.length-1?void 0:null;else D=D[Q];if(D===void 0||D===null){if(J!==B.length-1)return $;break}}return D===void 0?$:D}function yX(D,F,$){if(!k6(D)||typeof F!=="string")return D;let B=D,J=A7(F);for(let Q=0;Q<J.length;Q++){let X=J[Q];if(Rw(D,X),Q===J.length-1)D[X]=$;else if(!k6(D[X]))D[X]=typeof J[Q+1]==="number"?[]:{};D=D[X]}return B}function Tw(D,F){if(!k6(D)||typeof F!=="string")return!1;let $=A7(F);for(let B=0;B<$.length;B++){let J=$[B];if(Rw(D,J),B===$.length-1)return delete D[J],!0;if(D=D[J],!k6(D))return!1}}function jw(D,F){if(!k6(D)||typeof F!=="string")return!1;let $=A7(F);if($.length===0)return!1;for(let B of $){if(!k6(D)||!(B in D)||vX(D,B))return!1;D=D[B]}return!0}import ID from"path";import Ow from"os";import xX from"process";var o8=Ow.homedir(),_X=Ow.tmpdir(),{env:s4}=xX,Y6D=(D)=>{let F=ID.join(o8,"Library");return{data:ID.join(F,"Application Support",D),config:ID.join(F,"Preferences",D),cache:ID.join(F,"Caches",D),log:ID.join(F,"Logs",D),temp:ID.join(_X,D)}},G6D=(D)=>{let F=s4.APPDATA||ID.join(o8,"AppData","Roaming"),$=s4.LOCALAPPDATA||ID.join(o8,"AppData","Local");return{data:ID.join($,D,"Data"),config:ID.join(F,D,"Config"),cache:ID.join($,D,"Cache"),log:ID.join($,D,"Log"),temp:ID.join(_X,D)}},H6D=(D)=>{let F=ID.basename(o8);return{data:ID.join(s4.XDG_DATA_HOME||ID.join(o8,".local","share"),D),config:ID.join(s4.XDG_CONFIG_HOME||ID.join(o8,".config"),D),cache:ID.join(s4.XDG_CACHE_HOME||ID.join(o8,".cache"),D),log:ID.join(s4.XDG_STATE_HOME||ID.join(o8,".local","state"),D),temp:ID.join(_X,F,D)}};function fX(D,{suffix:F="nodejs"}={}){if(typeof D!=="string")throw TypeError(`Expected a string, got ${typeof D}`);if(F)D+=`-${F}`;if(xX.platform==="darwin")return Y6D(D);if(xX.platform==="win32")return G6D(D);return H6D(D)}import Z6D from"path";import WD from"fs";import{promisify as Q0}from"util";var W6D=(D,F)=>{let{onError:$}=F;return function(...J){return D.apply(void 0,J).catch($)}},b1=W6D;var E6D=(D,F)=>{let{onError:$}=F;return function(...J){try{return D.apply(void 0,J)}catch(Q){return $(Q)}}},Y1=E6D;var Iw=250;var q6D=(D,F)=>{let{isRetriable:$}=F;return function(J){let{timeout:Q}=J,X=J.interval??Iw,Y=Date.now()+Q;return function G(...H){return D.apply(void 0,H).catch((E)=>{if(!$(E))throw E;if(Date.now()>=Y)throw E;let K=Math.round(X*Math.random());if(K>0)return new Promise((A)=>setTimeout(A,K)).then(()=>G.apply(void 0,H));else return G.apply(void 0,H)})}}},u1=q6D;var K6D=(D,F)=>{let{isRetriable:$}=F;return function(J){let{timeout:Q}=J,X=Date.now()+Q;return function(...G){while(!0)try{return D.apply(void 0,G)}catch(H){if(!$(H))throw H;if(Date.now()>=X)throw H;continue}}}},m1=K6D;import Sw from"process";var S3={isChangeErrorOk:(D)=>{if(!S3.isNodeError(D))return!1;let{code:F}=D;if(F==="ENOSYS")return!0;if(!Pw&&(F==="EINVAL"||F==="EPERM"))return!0;return!1},isNodeError:(D)=>{return D instanceof Error},isRetriableError:(D)=>{if(!S3.isNodeError(D))return!1;let{code:F}=D;if(F==="EMFILE"||F==="ENFILE"||F==="EAGAIN"||F==="EBUSY"||F==="EACCESS"||F==="EACCES"||F==="EACCS"||F==="EPERM")return!0;return!1},onChangeError:(D)=>{if(!S3.isNodeError(D))throw D;if(S3.isChangeErrorOk(D))return;throw D}},gX=S3;var k3={onError:gX.onChangeError},C0={onError:()=>{return}},Pw=Sw.getuid?!Sw.getuid():!1,tD={isRetriable:gX.isRetriableError};var z6D={attempt:{chmod:b1(Q0(WD.chmod),k3),chown:b1(Q0(WD.chown),k3),close:b1(Q0(WD.close),C0),fsync:b1(Q0(WD.fsync),C0),mkdir:b1(Q0(WD.mkdir),C0),realpath:b1(Q0(WD.realpath),C0),stat:b1(Q0(WD.stat),C0),unlink:b1(Q0(WD.unlink),C0),chmodSync:Y1(WD.chmodSync,k3),chownSync:Y1(WD.chownSync,k3),closeSync:Y1(WD.closeSync,C0),existsSync:Y1(WD.existsSync,C0),fsyncSync:Y1(WD.fsync,C0),mkdirSync:Y1(WD.mkdirSync,C0),realpathSync:Y1(WD.realpathSync,C0),statSync:Y1(WD.statSync,C0),unlinkSync:Y1(WD.unlinkSync,C0)},retry:{close:u1(Q0(WD.close),tD),fsync:u1(Q0(WD.fsync),tD),open:u1(Q0(WD.open),tD),readFile:u1(Q0(WD.readFile),tD),rename:u1(Q0(WD.rename),tD),stat:u1(Q0(WD.stat),tD),write:u1(Q0(WD.write),tD),writeFile:u1(Q0(WD.writeFile),tD),closeSync:m1(WD.closeSync,tD),fsyncSync:m1(WD.fsyncSync,tD),openSync:m1(WD.openSync,tD),readFileSync:m1(WD.readFileSync,tD),renameSync:m1(WD.renameSync,tD),statSync:m1(WD.statSync,tD),writeSync:m1(WD.writeSync,tD),writeFileSync:m1(WD.writeFileSync,tD)}},cD=z6D;import v6 from"process";var kw="utf8",hX=438,vw=511;var yw={},xw=v6.geteuid?v6.geteuid():-1,_w=v6.getegid?v6.getegid():-1;var fw=1000,gw=!!v6.getuid,UUD=v6.getuid?!v6.getuid():!1,bX=128;var hw=(D)=>{return D instanceof Error&&"code"in D};var uX=(D)=>{return typeof D==="string"},Z7=(D)=>{return D===void 0};import A6D from"path";import r4 from"process";import bw from"process";var uw=bw.platform==="linux",U7=bw.platform==="win32";var mX=["SIGHUP","SIGINT","SIGTERM"];if(!U7)mX.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");if(uw)mX.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");var mw=mX;class lw{constructor(){this.callbacks=new Set,this.exited=!1,this.exit=(D)=>{if(this.exited)return;this.exited=!0;for(let F of this.callbacks)F();if(D)if(U7&&(D!=="SIGINT"&&D!=="SIGTERM"&&D!=="SIGKILL"))r4.kill(r4.pid,"SIGTERM");else r4.kill(r4.pid,D)},this.hook=()=>{r4.once("exit",()=>this.exit());for(let D of mw)try{r4.once(D,()=>this.exit(D))}catch{}},this.register=(D)=>{return this.callbacks.add(D),()=>{this.callbacks.delete(D)}},this.hook()}}var dw=new lw;var V6D=dw.register,pw=V6D;var x0={store:{},create:(D)=>{let F=`000000${Math.floor(Math.random()*16777215).toString(16)}`.slice(-6),$=Date.now().toString().slice(-10),B="tmp-",J=`.tmp-${$}${F}`;return`${D}${J}`},get:(D,F,$=!0)=>{let B=x0.truncate(F(D));if(B in x0.store)return x0.get(D,F,$);return x0.store[B]=$,[B,()=>delete x0.store[B]]},purge:(D)=>{if(!x0.store[D])return;delete x0.store[D],cD.attempt.unlink(D)},purgeSync:(D)=>{if(!x0.store[D])return;delete x0.store[D],cD.attempt.unlinkSync(D)},purgeSyncAll:()=>{for(let D in x0.store)x0.purgeSync(D)},truncate:(D)=>{let F=A6D.basename(D);if(F.length<=bX)return D;let $=/^(\.?)(.*?)((?:\.[^.]+)?(?:\.tmp-\d{10}[a-f0-9]{6})?)$/.exec(F);if(!$)return D;let B=F.length-bX;return`${D.slice(0,-F.length)}${$[1]}${$[2].slice(0,-B)}${$[3]}`}};pw(x0.purgeSyncAll);var v3=x0;function lX(D,F,$=yw){if(uX($))return lX(D,F,{encoding:$});let J={timeout:$.timeout??fw},Q=null,X=null,Y=null;try{let G=cD.attempt.realpathSync(D),H=!!G;D=G||D,[X,Q]=v3.get(D,$.tmpCreate||v3.create,$.tmpPurge!==!1);let E=gw&&Z7($.chown),K=Z7($.mode);if(H&&(E||K)){let V=cD.attempt.statSync(D);if(V){if($={...$},E)$.chown={uid:V.uid,gid:V.gid};if(K)$.mode=V.mode}}if(!H){let V=Z6D.dirname(D);cD.attempt.mkdirSync(V,{mode:vw,recursive:!0})}if(Y=cD.retry.openSync(J)(X,"w",$.mode||hX),$.tmpCreated)$.tmpCreated(X);if(uX(F))cD.retry.writeSync(J)(Y,F,0,$.encoding||kw);else if(!Z7(F))cD.retry.writeSync(J)(Y,F,0,F.length,0);if($.fsync!==!1)if($.fsyncWait!==!1)cD.retry.fsyncSync(J)(Y);else cD.attempt.fsync(Y);if(cD.retry.closeSync(J)(Y),Y=null,$.chown&&($.chown.uid!==xw||$.chown.gid!==_w))cD.attempt.chownSync(X,$.chown.uid,$.chown.gid);if($.mode&&$.mode!==hX)cD.attempt.chmodSync(X,$.mode);try{cD.retry.renameSync(J)(X,D)}catch(V){if(!hw(V))throw V;if(V.code!=="ENAMETOOLONG")throw V;cD.retry.renameSync(J)(X,v3.truncate(D))}Q(),X=null}finally{if(Y)cD.attempt.closeSync(Y);if(X)v3.purge(X)}}var Fv=l(fP(),1),$v=l(JS(),1);var DQD=(D,F={})=>{if(typeof D!=="function")throw TypeError(`Expected the first argument to be a function, got \`${typeof D}\``);let{wait:$=0,maxWait:B=Number.POSITIVE_INFINITY,before:J=!1,after:Q=!0}=F;if($<0||B<0)throw RangeError("`wait` and `maxWait` must not be negative.");if(!J&&!Q)throw Error("Both `before` and `after` are false, function wouldn't be called.");let X,Y,G,H=function(...E){let K=this,V=()=>{if(X=void 0,Y)clearTimeout(Y),Y=void 0;if(Q)G=D.apply(K,E)},A=()=>{if(Y=void 0,X)clearTimeout(X),X=void 0;if(Q)G=D.apply(K,E)},Z=J&&!X;if(clearTimeout(X),X=setTimeout(V,$),B>0&&B!==Number.POSITIVE_INFINITY&&!Y)Y=setTimeout(A,B);if(Z)G=D.apply(K,E);return G};return j3(H,D),H.cancel=()=>{if(X)clearTimeout(X),X=void 0;if(Y)clearTimeout(Y),Y=void 0},H},B2=DQD;var l6=l(ak(),1);var iYD=Object.prototype.toString;function sk(D,F,$){if(!D)return!1;if(D.constructor===F)return!0;return iYD.call(D)===$}function rk(D){return sk(D,Uint8Array,"[object Uint8Array]")}function aYD(D){return sk(D,ArrayBuffer,"[object ArrayBuffer]")}function oYD(D){return rk(D)||aYD(D)}function sYD(D){if(!rk(D))throw TypeError(`Expected \`Uint8Array\`, got \`${typeof D}\``)}function rYD(D){if(!oYD(D))throw TypeError(`Expected \`Uint8Array\` or \`ArrayBuffer\`, got \`${typeof D}\``)}function L2(D,F){if(D.length===0)return new Uint8Array(0);F??=D.reduce((J,Q)=>J+Q.length,0);let $=new Uint8Array(F),B=0;for(let J of D)sYD(J),$.set(J,B),B+=J.length;return $}var ok={utf8:new globalThis.TextDecoder("utf8")};function M2(D,F="utf8"){return rYD(D),ok[F]??=new globalThis.TextDecoder(F),ok[F].decode(D)}function tYD(D){if(typeof D!=="string")throw TypeError(`Expected \`string\`, got \`${typeof D}\``)}var eYD=new globalThis.TextEncoder;function A$(D){return tYD(D),eYD.encode(D)}var JCD=Array.from({length:256},(D,F)=>F.toString(16).padStart(2,"0"));var $2D=$v.default.default,Dv="aes-256-cbc",KF=()=>Object.create(null),B2D=(D)=>D!==void 0&&D!==null,J2D=(D,F)=>{let $=new Set(["undefined","symbol","function"]),B=typeof F;if($.has(B))throw TypeError(`Setting a value of type \`${B}\` for key \`${D}\` is not allowed as it's not supported by JSON`)},Z$="__internal__",N2=`${Z$}.migrations.version`;class U${path;events;#$;#F;#D;#J={};constructor(D={}){let F={configName:"config",fileExtension:"json",projectSuffix:"nodejs",clearInvalidConfig:!1,accessPropertiesByDotNotation:!0,configFileMode:438,...D};if(!F.cwd){if(!F.projectName)throw Error("Please specify the `projectName` option.");F.cwd=fX(F.projectName,{suffix:F.projectSuffix}).config}if(this.#D=F,F.schema??F.ajvOptions??F.rootSchema){if(F.schema&&typeof F.schema!=="object")throw TypeError("The `schema` option must be an object.");let Q=new Fv.Ajv2020({allErrors:!0,useDefaults:!0,...F.ajvOptions});$2D(Q);let X={...F.rootSchema,type:"object",properties:F.schema};this.#$=Q.compile(X);for(let[Y,G]of Object.entries(F.schema??{}))if(G?.default)this.#J[Y]=G.default}if(F.defaults)this.#J={...this.#J,...F.defaults};if(F.serialize)this._serialize=F.serialize;if(F.deserialize)this._deserialize=F.deserialize;this.events=new EventTarget,this.#F=F.encryptionKey;let $=F.fileExtension?`.${F.fileExtension}`:"";this.path=ek.resolve(F.cwd,`${F.configName??"config"}${$}`);let B=this.store,J=Object.assign(KF(),F.defaults,B);if(F.migrations){if(!F.projectVersion)throw Error("Please specify the `projectVersion` option.");this._migrate(F.migrations,F.projectVersion,F.beforeEachMigration)}this._validate(J);try{F2D.deepEqual(B,J)}catch{this.store=J}if(F.watch)this._watch()}get(D,F){if(this.#D.accessPropertiesByDotNotation)return this._get(D,F);let{store:$}=this;return D in $?$[D]:F}set(D,F){if(typeof D!=="string"&&typeof D!=="object")throw TypeError(`Expected \`key\` to be of type \`string\` or \`object\`, got ${typeof D}`);if(typeof D!=="object"&&F===void 0)throw TypeError("Use `delete()` to clear values");if(this._containsReservedKey(D))throw TypeError(`Please don't use the ${Z$} key, as it's used to manage this module internal operations.`);let{store:$}=this,B=(J,Q)=>{if(J2D(J,Q),this.#D.accessPropertiesByDotNotation)yX($,J,Q);else $[J]=Q};if(typeof D==="object"){let J=D;for(let[Q,X]of Object.entries(J))B(Q,X)}else B(D,F);this.store=$}has(D){if(this.#D.accessPropertiesByDotNotation)return jw(this.store,D);return D in this.store}reset(...D){for(let F of D)if(B2D(this.#J[F]))this.set(F,this.#J[F])}delete(D){let{store:F}=this;if(this.#D.accessPropertiesByDotNotation)Tw(F,D);else delete F[D];this.store=F}clear(){this.store=KF();for(let D of Object.keys(this.#J))this.reset(D)}onDidChange(D,F){if(typeof D!=="string")throw TypeError(`Expected \`key\` to be of type \`string\`, got ${typeof D}`);if(typeof F!=="function")throw TypeError(`Expected \`callback\` to be of type \`function\`, got ${typeof F}`);return this._handleChange(()=>this.get(D),F)}onDidAnyChange(D){if(typeof D!=="function")throw TypeError(`Expected \`callback\` to be of type \`function\`, got ${typeof D}`);return this._handleChange(()=>this.store,D)}get size(){return Object.keys(this.store).length}get store(){try{let D=m6.readFileSync(this.path,this.#F?null:"utf8"),F=this._encryptData(D),$=this._deserialize(F);return this._validate($),Object.assign(KF(),$)}catch(D){if(D?.code==="ENOENT")return this._ensureDirectory(),KF();if(this.#D.clearInvalidConfig&&D.name==="SyntaxError")return KF();throw D}}set store(D){this._ensureDirectory(),this._validate(D),this._write(D),this.events.dispatchEvent(new Event("change"))}*[Symbol.iterator](){for(let[D,F]of Object.entries(this.store))yield[D,F]}_encryptData(D){if(!this.#F)return typeof D==="string"?D:M2(D);try{let F=D.slice(0,16),$=E5.pbkdf2Sync(this.#F,F.toString(),1e4,32,"sha512"),B=E5.createDecipheriv(Dv,$,F),J=D.slice(17),Q=typeof J==="string"?A$(J):J;return M2(L2([B.update(Q),B.final()]))}catch{}return D.toString()}_handleChange(D,F){let $=D(),B=()=>{let J=$,Q=D();if(D2D(Q,J))return;$=Q,F.call(this,Q,J)};return this.events.addEventListener("change",B),()=>{this.events.removeEventListener("change",B)}}_deserialize=(D)=>JSON.parse(D);_serialize=(D)=>JSON.stringify(D,void 0,"\t");_validate(D){if(!this.#$)return;if(this.#$(D)||!this.#$.errors)return;let $=this.#$.errors.map(({instancePath:B,message:J=""})=>`\`${B.slice(1)}\` ${J}`);throw Error("Config schema violation: "+$.join("; "))}_ensureDirectory(){m6.mkdirSync(ek.dirname(this.path),{recursive:!0})}_write(D){let F=this._serialize(D);if(this.#F){let $=E5.randomBytes(16),B=E5.pbkdf2Sync(this.#F,$.toString(),1e4,32,"sha512"),J=E5.createCipheriv(Dv,B,$);F=L2([$,A$(":"),J.update(A$(F)),J.final()])}if(tk.env.SNAP)m6.writeFileSync(this.path,F,{mode:this.#D.configFileMode});else try{lX(this.path,F,{mode:this.#D.configFileMode})}catch($){if($?.code==="EXDEV"){m6.writeFileSync(this.path,F,{mode:this.#D.configFileMode});return}throw $}}_watch(){if(this._ensureDirectory(),!m6.existsSync(this.path))this._write(KF());if(tk.platform==="win32")m6.watch(this.path,{persistent:!1},B2(()=>{this.events.dispatchEvent(new Event("change"))},{wait:100}));else m6.watchFile(this.path,{persistent:!1},B2(()=>{this.events.dispatchEvent(new Event("change"))},{wait:5000}))}_migrate(D,F,$){let B=this._get(N2,"0.0.0"),J=Object.keys(D).filter((X)=>this._shouldPerformMigration(X,B,F)),Q={...this.store};for(let X of J)try{if($)$(this,{fromVersion:B,toVersion:X,finalVersion:F,versions:J});let Y=D[X];Y?.(this),this._set(N2,X),B=X,Q={...this.store}}catch(Y){throw this.store=Q,Error(`Something went wrong during the migration! Changes applied to the store until this failed migration will be restored. ${Y}`)}if(this._isVersionInRangeFormat(B)||!l6.default.eq(B,F))this._set(N2,F)}_containsReservedKey(D){if(typeof D==="object"){if(Object.keys(D)[0]===Z$)return!0}if(typeof D!=="string")return!1;if(this.#D.accessPropertiesByDotNotation){if(D.startsWith(`${Z$}.`))return!0;return!1}return!1}_isVersionInRangeFormat(D){return l6.default.clean(D)===null}_shouldPerformMigration(D,F,$){if(this._isVersionInRangeFormat(D)){if(F!=="0.0.0"&&l6.default.satisfies(F,D))return!1;return l6.default.satisfies($,D)}if(l6.default.lte(D,F))return!1;if(l6.default.gt(D,$))return!1;return!0}_get(D,F){return ww(this.store,D,F)}_set(D,F){let{store:$}=this;yX($,D,F),this.store=$}}var M1={};d2(M1,{void:()=>l2D,util:()=>$D,unknown:()=>u2D,union:()=>n2D,undefined:()=>g2D,tuple:()=>o2D,transformer:()=>QGD,symbol:()=>f2D,string:()=>Ev,strictObject:()=>c2D,setErrorMap:()=>Y2D,set:()=>t2D,record:()=>s2D,quotelessJson:()=>Q2D,promise:()=>JGD,preprocess:()=>GGD,pipeline:()=>HGD,ostring:()=>WGD,optional:()=>XGD,onumber:()=>EGD,oboolean:()=>qGD,objectUtil:()=>C2,object:()=>p2D,number:()=>qv,nullable:()=>YGD,null:()=>h2D,never:()=>m2D,nativeEnum:()=>BGD,nan:()=>y2D,map:()=>r2D,makeIssue:()=>q5,literal:()=>FGD,lazy:()=>DGD,late:()=>k2D,isValid:()=>J6,isDirty:()=>M$,isAsync:()=>VF,isAborted:()=>L$,intersection:()=>a2D,instanceof:()=>v2D,getParsedType:()=>n1,getErrorMap:()=>zF,function:()=>e2D,enum:()=>$GD,effect:()=>QGD,discriminatedUnion:()=>i2D,defaultErrorMap:()=>E8,datetimeRegex:()=>Gv,date:()=>_2D,custom:()=>Wv,coerce:()=>KGD,boolean:()=>Kv,bigint:()=>x2D,array:()=>d2D,any:()=>b2D,addIssueToContext:()=>j,ZodVoid:()=>z5,ZodUnknown:()=>Q6,ZodUnion:()=>NF,ZodUndefined:()=>LF,ZodType:()=>e,ZodTuple:()=>a1,ZodTransformer:()=>L1,ZodSymbol:()=>K5,ZodString:()=>V1,ZodSet:()=>n6,ZodSchema:()=>e,ZodRecord:()=>V5,ZodReadonly:()=>IF,ZodPromise:()=>i6,ZodPipeline:()=>U5,ZodParsedType:()=>w,ZodOptional:()=>Z1,ZodObject:()=>PD,ZodNumber:()=>X6,ZodNullable:()=>K8,ZodNull:()=>MF,ZodNever:()=>i1,ZodNativeEnum:()=>TF,ZodNaN:()=>Z5,ZodMap:()=>A5,ZodLiteral:()=>wF,ZodLazy:()=>RF,ZodIssueCode:()=>C,ZodIntersection:()=>CF,ZodFunction:()=>ZF,ZodFirstPartyTypeKind:()=>h,ZodError:()=>I0,ZodEnum:()=>G6,ZodEffects:()=>L1,ZodDiscriminatedUnion:()=>N$,ZodDefault:()=>jF,ZodDate:()=>p6,ZodCatch:()=>OF,ZodBranded:()=>C$,ZodBoolean:()=>UF,ZodBigInt:()=>Y6,ZodArray:()=>A1,ZodAny:()=>c6,Schema:()=>e,ParseStatus:()=>D0,OK:()=>H0,NEVER:()=>zGD,INVALID:()=>g,EMPTY_PATH:()=>G2D,DIRTY:()=>d6,BRAND:()=>S2D});var $D;(function(D){D.assertEqual=(J)=>{};function F(J){}D.assertIs=F;function $(J){throw Error()}D.assertNever=$,D.arrayToEnum=(J)=>{let Q={};for(let X of J)Q[X]=X;return Q},D.getValidEnumValues=(J)=>{let Q=D.objectKeys(J).filter((Y)=>typeof J[J[Y]]!=="number"),X={};for(let Y of Q)X[Y]=J[Y];return D.objectValues(X)},D.objectValues=(J)=>{return D.objectKeys(J).map(function(Q){return J[Q]})},D.objectKeys=typeof Object.keys==="function"?(J)=>Object.keys(J):(J)=>{let Q=[];for(let X in J)if(Object.prototype.hasOwnProperty.call(J,X))Q.push(X);return Q},D.find=(J,Q)=>{for(let X of J)if(Q(X))return X;return},D.isInteger=typeof Number.isInteger==="function"?(J)=>Number.isInteger(J):(J)=>typeof J==="number"&&Number.isFinite(J)&&Math.floor(J)===J;function B(J,Q=" | "){return J.map((X)=>typeof X==="string"?`'${X}'`:X).join(Q)}D.joinValues=B,D.jsonStringifyReplacer=(J,Q)=>{if(typeof Q==="bigint")return Q.toString();return Q}})($D||($D={}));var C2;(function(D){D.mergeShapes=(F,$)=>{return{...F,...$}}})(C2||(C2={}));var w=$D.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),n1=(D)=>{switch(typeof D){case"undefined":return w.undefined;case"string":return w.string;case"number":return Number.isNaN(D)?w.nan:w.number;case"boolean":return w.boolean;case"function":return w.function;case"bigint":return w.bigint;case"symbol":return w.symbol;case"object":if(Array.isArray(D))return w.array;if(D===null)return w.null;if(D.then&&typeof D.then==="function"&&D.catch&&typeof D.catch==="function")return w.promise;if(typeof Map<"u"&&D instanceof Map)return w.map;if(typeof Set<"u"&&D instanceof Set)return w.set;if(typeof Date<"u"&&D instanceof Date)return w.date;return w.object;default:return w.unknown}};var C=$D.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"]),Q2D=(D)=>{return JSON.stringify(D,null,2).replace(/"([^"]+)":/g,"$1:")};class I0 extends Error{get errors(){return this.issues}constructor(D){super();this.issues=[],this.addIssue=($)=>{this.issues=[...this.issues,$]},this.addIssues=($=[])=>{this.issues=[...this.issues,...$]};let F=new.target.prototype;if(Object.setPrototypeOf)Object.setPrototypeOf(this,F);else this.__proto__=F;this.name="ZodError",this.issues=D}format(D){let F=D||function(J){return J.message},$={_errors:[]},B=(J)=>{for(let Q of J.issues)if(Q.code==="invalid_union")Q.unionErrors.map(B);else if(Q.code==="invalid_return_type")B(Q.returnTypeError);else if(Q.code==="invalid_arguments")B(Q.argumentsError);else if(Q.path.length===0)$._errors.push(F(Q));else{let X=$,Y=0;while(Y<Q.path.length){let G=Q.path[Y];if(Y!==Q.path.length-1)X[G]=X[G]||{_errors:[]};else X[G]=X[G]||{_errors:[]},X[G]._errors.push(F(Q));X=X[G],Y++}}};return B(this),$}static assert(D){if(!(D instanceof I0))throw Error(`Not a ZodError: ${D}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,$D.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(D=(F)=>F.message){let F={},$=[];for(let B of this.issues)if(B.path.length>0){let J=B.path[0];F[J]=F[J]||[],F[J].push(D(B))}else $.push(D(B));return{formErrors:$,fieldErrors:F}}get formErrors(){return this.flatten()}}I0.create=(D)=>{return new I0(D)};var X2D=(D,F)=>{let $;switch(D.code){case C.invalid_type:if(D.received===w.undefined)$="Required";else $=`Expected ${D.expected}, received ${D.received}`;break;case C.invalid_literal:$=`Invalid literal value, expected ${JSON.stringify(D.expected,$D.jsonStringifyReplacer)}`;break;case C.unrecognized_keys:$=`Unrecognized key(s) in object: ${$D.joinValues(D.keys,", ")}`;break;case C.invalid_union:$="Invalid input";break;case C.invalid_union_discriminator:$=`Invalid discriminator value. Expected ${$D.joinValues(D.options)}`;break;case C.invalid_enum_value:$=`Invalid enum value. Expected ${$D.joinValues(D.options)}, received '${D.received}'`;break;case C.invalid_arguments:$="Invalid function arguments";break;case C.invalid_return_type:$="Invalid function return type";break;case C.invalid_date:$="Invalid date";break;case C.invalid_string:if(typeof D.validation==="object")if("includes"in D.validation){if($=`Invalid input: must include "${D.validation.includes}"`,typeof D.validation.position==="number")$=`${$} at one or more positions greater than or equal to ${D.validation.position}`}else if("startsWith"in D.validation)$=`Invalid input: must start with "${D.validation.startsWith}"`;else if("endsWith"in D.validation)$=`Invalid input: must end with "${D.validation.endsWith}"`;else $D.assertNever(D.validation);else if(D.validation!=="regex")$=`Invalid ${D.validation}`;else $="Invalid";break;case C.too_small:if(D.type==="array")$=`Array must contain ${D.exact?"exactly":D.inclusive?"at least":"more than"} ${D.minimum} element(s)`;else if(D.type==="string")$=`String must contain ${D.exact?"exactly":D.inclusive?"at least":"over"} ${D.minimum} character(s)`;else if(D.type==="number")$=`Number must be ${D.exact?"exactly equal to ":D.inclusive?"greater than or equal to ":"greater than "}${D.minimum}`;else if(D.type==="bigint")$=`Number must be ${D.exact?"exactly equal to ":D.inclusive?"greater than or equal to ":"greater than "}${D.minimum}`;else if(D.type==="date")$=`Date must be ${D.exact?"exactly equal to ":D.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(D.minimum))}`;else $="Invalid input";break;case C.too_big:if(D.type==="array")$=`Array must contain ${D.exact?"exactly":D.inclusive?"at most":"less than"} ${D.maximum} element(s)`;else if(D.type==="string")$=`String must contain ${D.exact?"exactly":D.inclusive?"at most":"under"} ${D.maximum} character(s)`;else if(D.type==="number")$=`Number must be ${D.exact?"exactly":D.inclusive?"less than or equal to":"less than"} ${D.maximum}`;else if(D.type==="bigint")$=`BigInt must be ${D.exact?"exactly":D.inclusive?"less than or equal to":"less than"} ${D.maximum}`;else if(D.type==="date")$=`Date must be ${D.exact?"exactly":D.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(D.maximum))}`;else $="Invalid input";break;case C.custom:$="Invalid input";break;case C.invalid_intersection_types:$="Intersection results could not be merged";break;case C.not_multiple_of:$=`Number must be a multiple of ${D.multipleOf}`;break;case C.not_finite:$="Number must be finite";break;default:$=F.defaultError,$D.assertNever(D)}return{message:$}},E8=X2D;var Bv=E8;function Y2D(D){Bv=D}function zF(){return Bv}var q5=(D)=>{let{data:F,path:$,errorMaps:B,issueData:J}=D,Q=[...$,...J.path||[]],X={...J,path:Q};if(J.message!==void 0)return{...J,path:Q,message:J.message};let Y="",G=B.filter((H)=>!!H).slice().reverse();for(let H of G)Y=H(X,{data:F,defaultError:Y}).message;return{...J,path:Q,message:Y}},G2D=[];function j(D,F){let $=zF(),B=q5({issueData:F,data:D.data,path:D.path,errorMaps:[D.common.contextualErrorMap,D.schemaErrorMap,$,$===E8?void 0:E8].filter((J)=>!!J)});D.common.issues.push(B)}class D0{constructor(){this.value="valid"}dirty(){if(this.value==="valid")this.value="dirty"}abort(){if(this.value!=="aborted")this.value="aborted"}static mergeArray(D,F){let $=[];for(let B of F){if(B.status==="aborted")return g;if(B.status==="dirty")D.dirty();$.push(B.value)}return{status:D.value,value:$}}static async mergeObjectAsync(D,F){let $=[];for(let B of F){let J=await B.key,Q=await B.value;$.push({key:J,value:Q})}return D0.mergeObjectSync(D,$)}static mergeObjectSync(D,F){let $={};for(let B of F){let{key:J,value:Q}=B;if(J.status==="aborted")return g;if(Q.status==="aborted")return g;if(J.status==="dirty")D.dirty();if(Q.status==="dirty")D.dirty();if(J.value!=="__proto__"&&(typeof Q.value<"u"||B.alwaysSet))$[J.value]=Q.value}return{status:D.value,value:$}}}var g=Object.freeze({status:"aborted"}),d6=(D)=>({status:"dirty",value:D}),H0=(D)=>({status:"valid",value:D}),L$=(D)=>D.status==="aborted",M$=(D)=>D.status==="dirty",J6=(D)=>D.status==="valid",VF=(D)=>typeof Promise<"u"&&D instanceof Promise;var x;(function(D){D.errToObj=(F)=>typeof F==="string"?{message:F}:F||{},D.toString=(F)=>typeof F==="string"?F:F?.message})(x||(x={}));class U1{constructor(D,F,$,B){this._cachedPath=[],this.parent=D,this.data=F,this._path=$,this._key=B}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}}var Jv=(D,F)=>{if(J6(F))return{success:!0,data:F.value};else{if(!D.common.issues.length)throw Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let $=new I0(D.common.issues);return this._error=$,this._error}}}};function o(D){if(!D)return{};let{errorMap:F,invalid_type_error:$,required_error:B,description:J}=D;if(F&&($||B))throw Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);if(F)return{errorMap:F,description:J};return{errorMap:(X,Y)=>{let{message:G}=D;if(X.code==="invalid_enum_value")return{message:G??Y.defaultError};if(typeof Y.data>"u")return{message:G??B??Y.defaultError};if(X.code!=="invalid_type")return{message:Y.defaultError};return{message:G??$??Y.defaultError}},description:J}}class e{get description(){return this._def.description}_getType(D){return n1(D.data)}_getOrReturnCtx(D,F){return F||{common:D.parent.common,data:D.data,parsedType:n1(D.data),schemaErrorMap:this._def.errorMap,path:D.path,parent:D.parent}}_processInputParams(D){return{status:new D0,ctx:{common:D.parent.common,data:D.data,parsedType:n1(D.data),schemaErrorMap:this._def.errorMap,path:D.path,parent:D.parent}}}_parseSync(D){let F=this._parse(D);if(VF(F))throw Error("Synchronous parse encountered promise.");return F}_parseAsync(D){let F=this._parse(D);return Promise.resolve(F)}parse(D,F){let $=this.safeParse(D,F);if($.success)return $.data;throw $.error}safeParse(D,F){let $={common:{issues:[],async:F?.async??!1,contextualErrorMap:F?.errorMap},path:F?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:D,parsedType:n1(D)},B=this._parseSync({data:D,path:$.path,parent:$});return Jv($,B)}"~validate"(D){let F={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:D,parsedType:n1(D)};if(!this["~standard"].async)try{let $=this._parseSync({data:D,path:[],parent:F});return J6($)?{value:$.value}:{issues:F.common.issues}}catch($){if($?.message?.toLowerCase()?.includes("encountered"))this["~standard"].async=!0;F.common={issues:[],async:!0}}return this._parseAsync({data:D,path:[],parent:F}).then(($)=>J6($)?{value:$.value}:{issues:F.common.issues})}async parseAsync(D,F){let $=await this.safeParseAsync(D,F);if($.success)return $.data;throw $.error}async safeParseAsync(D,F){let $={common:{issues:[],contextualErrorMap:F?.errorMap,async:!0},path:F?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:D,parsedType:n1(D)},B=this._parse({data:D,path:$.path,parent:$}),J=await(VF(B)?B:Promise.resolve(B));return Jv($,J)}refine(D,F){let $=(B)=>{if(typeof F==="string"||typeof F>"u")return{message:F};else if(typeof F==="function")return F(B);else return F};return this._refinement((B,J)=>{let Q=D(B),X=()=>J.addIssue({code:C.custom,...$(B)});if(typeof Promise<"u"&&Q instanceof Promise)return Q.then((Y)=>{if(!Y)return X(),!1;else return!0});if(!Q)return X(),!1;else return!0})}refinement(D,F){return this._refinement(($,B)=>{if(!D($))return B.addIssue(typeof F==="function"?F($,B):F),!1;else return!0})}_refinement(D){return new L1({schema:this,typeName:h.ZodEffects,effect:{type:"refinement",refinement:D}})}superRefine(D){return this._refinement(D)}constructor(D){this.spa=this.safeParseAsync,this._def=D,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:(F)=>this["~validate"](F)}}optional(){return Z1.create(this,this._def)}nullable(){return K8.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return A1.create(this)}promise(){return i6.create(this,this._def)}or(D){return NF.create([this,D],this._def)}and(D){return CF.create(this,D,this._def)}transform(D){return new L1({...o(this._def),schema:this,typeName:h.ZodEffects,effect:{type:"transform",transform:D}})}default(D){let F=typeof D==="function"?D:()=>D;return new jF({...o(this._def),innerType:this,defaultValue:F,typeName:h.ZodDefault})}brand(){return new C$({typeName:h.ZodBranded,type:this,...o(this._def)})}catch(D){let F=typeof D==="function"?D:()=>D;return new OF({...o(this._def),innerType:this,catchValue:F,typeName:h.ZodCatch})}describe(D){return new this.constructor({...this._def,description:D})}pipe(D){return U5.create(this,D)}readonly(){return IF.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}var H2D=/^c[^\s-]{8,}$/i,W2D=/^[0-9a-z]+$/,E2D=/^[0-9A-HJKMNP-TV-Z]{26}$/i,q2D=/^[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,K2D=/^[a-z0-9_-]{21}$/i,z2D=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,V2D=/^[-+]?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)?)??$/,A2D=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Z2D="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",R2,U2D=/^(?:(?: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])$/,L2D=/^(?:(?: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])$/,M2D=/^(([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]))$/,N2D=/^(([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])$/,C2D=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,R2D=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Xv="((\\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])))",w2D=new RegExp(`^${Xv}$`);function Yv(D){let F="[0-5]\\d";if(D.precision)F=`${F}\\.\\d{${D.precision}}`;else if(D.precision==null)F=`${F}(\\.\\d+)?`;let $=D.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${F})${$}`}function T2D(D){return new RegExp(`^${Yv(D)}$`)}function Gv(D){let F=`${Xv}T${Yv(D)}`,$=[];if($.push(D.local?"Z?":"Z"),D.offset)$.push("([+-]\\d{2}:?\\d{2})");return F=`${F}(${$.join("|")})`,new RegExp(`^${F}$`)}function j2D(D,F){if((F==="v4"||!F)&&U2D.test(D))return!0;if((F==="v6"||!F)&&M2D.test(D))return!0;return!1}function O2D(D,F){if(!z2D.test(D))return!1;try{let[$]=D.split(".");if(!$)return!1;let B=$.replace(/-/g,"+").replace(/_/g,"/").padEnd($.length+(4-$.length%4)%4,"="),J=JSON.parse(atob(B));if(typeof J!=="object"||J===null)return!1;if("typ"in J&&J?.typ!=="JWT")return!1;if(!J.alg)return!1;if(F&&J.alg!==F)return!1;return!0}catch{return!1}}function I2D(D,F){if((F==="v4"||!F)&&L2D.test(D))return!0;if((F==="v6"||!F)&&N2D.test(D))return!0;return!1}class V1 extends e{_parse(D){if(this._def.coerce)D.data=String(D.data);if(this._getType(D)!==w.string){let J=this._getOrReturnCtx(D);return j(J,{code:C.invalid_type,expected:w.string,received:J.parsedType}),g}let $=new D0,B=void 0;for(let J of this._def.checks)if(J.kind==="min"){if(D.data.length<J.value)B=this._getOrReturnCtx(D,B),j(B,{code:C.too_small,minimum:J.value,type:"string",inclusive:!0,exact:!1,message:J.message}),$.dirty()}else if(J.kind==="max"){if(D.data.length>J.value)B=this._getOrReturnCtx(D,B),j(B,{code:C.too_big,maximum:J.value,type:"string",inclusive:!0,exact:!1,message:J.message}),$.dirty()}else if(J.kind==="length"){let Q=D.data.length>J.value,X=D.data.length<J.value;if(Q||X){if(B=this._getOrReturnCtx(D,B),Q)j(B,{code:C.too_big,maximum:J.value,type:"string",inclusive:!0,exact:!0,message:J.message});else if(X)j(B,{code:C.too_small,minimum:J.value,type:"string",inclusive:!0,exact:!0,message:J.message});$.dirty()}}else if(J.kind==="email"){if(!A2D.test(D.data))B=this._getOrReturnCtx(D,B),j(B,{validation:"email",code:C.invalid_string,message:J.message}),$.dirty()}else if(J.kind==="emoji"){if(!R2)R2=new RegExp(Z2D,"u");if(!R2.test(D.data))B=this._getOrReturnCtx(D,B),j(B,{validation:"emoji",code:C.invalid_string,message:J.message}),$.dirty()}else if(J.kind==="uuid"){if(!q2D.test(D.data))B=this._getOrReturnCtx(D,B),j(B,{validation:"uuid",code:C.invalid_string,message:J.message}),$.dirty()}else if(J.kind==="nanoid"){if(!K2D.test(D.data))B=this._getOrReturnCtx(D,B),j(B,{validation:"nanoid",code:C.invalid_string,message:J.message}),$.dirty()}else if(J.kind==="cuid"){if(!H2D.test(D.data))B=this._getOrReturnCtx(D,B),j(B,{validation:"cuid",code:C.invalid_string,message:J.message}),$.dirty()}else if(J.kind==="cuid2"){if(!W2D.test(D.data))B=this._getOrReturnCtx(D,B),j(B,{validation:"cuid2",code:C.invalid_string,message:J.message}),$.dirty()}else if(J.kind==="ulid"){if(!E2D.test(D.data))B=this._getOrReturnCtx(D,B),j(B,{validation:"ulid",code:C.invalid_string,message:J.message}),$.dirty()}else if(J.kind==="url")try{new URL(D.data)}catch{B=this._getOrReturnCtx(D,B),j(B,{validation:"url",code:C.invalid_string,message:J.message}),$.dirty()}else if(J.kind==="regex"){if(J.regex.lastIndex=0,!J.regex.test(D.data))B=this._getOrReturnCtx(D,B),j(B,{validation:"regex",code:C.invalid_string,message:J.message}),$.dirty()}else if(J.kind==="trim")D.data=D.data.trim();else if(J.kind==="includes"){if(!D.data.includes(J.value,J.position))B=this._getOrReturnCtx(D,B),j(B,{code:C.invalid_string,validation:{includes:J.value,position:J.position},message:J.message}),$.dirty()}else if(J.kind==="toLowerCase")D.data=D.data.toLowerCase();else if(J.kind==="toUpperCase")D.data=D.data.toUpperCase();else if(J.kind==="startsWith"){if(!D.data.startsWith(J.value))B=this._getOrReturnCtx(D,B),j(B,{code:C.invalid_string,validation:{startsWith:J.value},message:J.message}),$.dirty()}else if(J.kind==="endsWith"){if(!D.data.endsWith(J.value))B=this._getOrReturnCtx(D,B),j(B,{code:C.invalid_string,validation:{endsWith:J.value},message:J.message}),$.dirty()}else if(J.kind==="datetime"){if(!Gv(J).test(D.data))B=this._getOrReturnCtx(D,B),j(B,{code:C.invalid_string,validation:"datetime",message:J.message}),$.dirty()}else if(J.kind==="date"){if(!w2D.test(D.data))B=this._getOrReturnCtx(D,B),j(B,{code:C.invalid_string,validation:"date",message:J.message}),$.dirty()}else if(J.kind==="time"){if(!T2D(J).test(D.data))B=this._getOrReturnCtx(D,B),j(B,{code:C.invalid_string,validation:"time",message:J.message}),$.dirty()}else if(J.kind==="duration"){if(!V2D.test(D.data))B=this._getOrReturnCtx(D,B),j(B,{validation:"duration",code:C.invalid_string,message:J.message}),$.dirty()}else if(J.kind==="ip"){if(!j2D(D.data,J.version))B=this._getOrReturnCtx(D,B),j(B,{validation:"ip",code:C.invalid_string,message:J.message}),$.dirty()}else if(J.kind==="jwt"){if(!O2D(D.data,J.alg))B=this._getOrReturnCtx(D,B),j(B,{validation:"jwt",code:C.invalid_string,message:J.message}),$.dirty()}else if(J.kind==="cidr"){if(!I2D(D.data,J.version))B=this._getOrReturnCtx(D,B),j(B,{validation:"cidr",code:C.invalid_string,message:J.message}),$.dirty()}else if(J.kind==="base64"){if(!C2D.test(D.data))B=this._getOrReturnCtx(D,B),j(B,{validation:"base64",code:C.invalid_string,message:J.message}),$.dirty()}else if(J.kind==="base64url"){if(!R2D.test(D.data))B=this._getOrReturnCtx(D,B),j(B,{validation:"base64url",code:C.invalid_string,message:J.message}),$.dirty()}else $D.assertNever(J);return{status:$.value,value:D.data}}_regex(D,F,$){return this.refinement((B)=>D.test(B),{validation:F,code:C.invalid_string,...x.errToObj($)})}_addCheck(D){return new V1({...this._def,checks:[...this._def.checks,D]})}email(D){return this._addCheck({kind:"email",...x.errToObj(D)})}url(D){return this._addCheck({kind:"url",...x.errToObj(D)})}emoji(D){return this._addCheck({kind:"emoji",...x.errToObj(D)})}uuid(D){return this._addCheck({kind:"uuid",...x.errToObj(D)})}nanoid(D){return this._addCheck({kind:"nanoid",...x.errToObj(D)})}cuid(D){return this._addCheck({kind:"cuid",...x.errToObj(D)})}cuid2(D){return this._addCheck({kind:"cuid2",...x.errToObj(D)})}ulid(D){return this._addCheck({kind:"ulid",...x.errToObj(D)})}base64(D){return this._addCheck({kind:"base64",...x.errToObj(D)})}base64url(D){return this._addCheck({kind:"base64url",...x.errToObj(D)})}jwt(D){return this._addCheck({kind:"jwt",...x.errToObj(D)})}ip(D){return this._addCheck({kind:"ip",...x.errToObj(D)})}cidr(D){return this._addCheck({kind:"cidr",...x.errToObj(D)})}datetime(D){if(typeof D==="string")return this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:D});return this._addCheck({kind:"datetime",precision:typeof D?.precision>"u"?null:D?.precision,offset:D?.offset??!1,local:D?.local??!1,...x.errToObj(D?.message)})}date(D){return this._addCheck({kind:"date",message:D})}time(D){if(typeof D==="string")return this._addCheck({kind:"time",precision:null,message:D});return this._addCheck({kind:"time",precision:typeof D?.precision>"u"?null:D?.precision,...x.errToObj(D?.message)})}duration(D){return this._addCheck({kind:"duration",...x.errToObj(D)})}regex(D,F){return this._addCheck({kind:"regex",regex:D,...x.errToObj(F)})}includes(D,F){return this._addCheck({kind:"includes",value:D,position:F?.position,...x.errToObj(F?.message)})}startsWith(D,F){return this._addCheck({kind:"startsWith",value:D,...x.errToObj(F)})}endsWith(D,F){return this._addCheck({kind:"endsWith",value:D,...x.errToObj(F)})}min(D,F){return this._addCheck({kind:"min",value:D,...x.errToObj(F)})}max(D,F){return this._addCheck({kind:"max",value:D,...x.errToObj(F)})}length(D,F){return this._addCheck({kind:"length",value:D,...x.errToObj(F)})}nonempty(D){return this.min(1,x.errToObj(D))}trim(){return new V1({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new V1({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new V1({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find((D)=>D.kind==="datetime")}get isDate(){return!!this._def.checks.find((D)=>D.kind==="date")}get isTime(){return!!this._def.checks.find((D)=>D.kind==="time")}get isDuration(){return!!this._def.checks.find((D)=>D.kind==="duration")}get isEmail(){return!!this._def.checks.find((D)=>D.kind==="email")}get isURL(){return!!this._def.checks.find((D)=>D.kind==="url")}get isEmoji(){return!!this._def.checks.find((D)=>D.kind==="emoji")}get isUUID(){return!!this._def.checks.find((D)=>D.kind==="uuid")}get isNANOID(){return!!this._def.checks.find((D)=>D.kind==="nanoid")}get isCUID(){return!!this._def.checks.find((D)=>D.kind==="cuid")}get isCUID2(){return!!this._def.checks.find((D)=>D.kind==="cuid2")}get isULID(){return!!this._def.checks.find((D)=>D.kind==="ulid")}get isIP(){return!!this._def.checks.find((D)=>D.kind==="ip")}get isCIDR(){return!!this._def.checks.find((D)=>D.kind==="cidr")}get isBase64(){return!!this._def.checks.find((D)=>D.kind==="base64")}get isBase64url(){return!!this._def.checks.find((D)=>D.kind==="base64url")}get minLength(){let D=null;for(let F of this._def.checks)if(F.kind==="min"){if(D===null||F.value>D)D=F.value}return D}get maxLength(){let D=null;for(let F of this._def.checks)if(F.kind==="max"){if(D===null||F.value<D)D=F.value}return D}}V1.create=(D)=>{return new V1({checks:[],typeName:h.ZodString,coerce:D?.coerce??!1,...o(D)})};function P2D(D,F){let $=(D.toString().split(".")[1]||"").length,B=(F.toString().split(".")[1]||"").length,J=$>B?$:B,Q=Number.parseInt(D.toFixed(J).replace(".","")),X=Number.parseInt(F.toFixed(J).replace(".",""));return Q%X/10**J}class X6 extends e{constructor(){super(...arguments);this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(D){if(this._def.coerce)D.data=Number(D.data);if(this._getType(D)!==w.number){let J=this._getOrReturnCtx(D);return j(J,{code:C.invalid_type,expected:w.number,received:J.parsedType}),g}let $=void 0,B=new D0;for(let J of this._def.checks)if(J.kind==="int"){if(!$D.isInteger(D.data))$=this._getOrReturnCtx(D,$),j($,{code:C.invalid_type,expected:"integer",received:"float",message:J.message}),B.dirty()}else if(J.kind==="min"){if(J.inclusive?D.data<J.value:D.data<=J.value)$=this._getOrReturnCtx(D,$),j($,{code:C.too_small,minimum:J.value,type:"number",inclusive:J.inclusive,exact:!1,message:J.message}),B.dirty()}else if(J.kind==="max"){if(J.inclusive?D.data>J.value:D.data>=J.value)$=this._getOrReturnCtx(D,$),j($,{code:C.too_big,maximum:J.value,type:"number",inclusive:J.inclusive,exact:!1,message:J.message}),B.dirty()}else if(J.kind==="multipleOf"){if(P2D(D.data,J.value)!==0)$=this._getOrReturnCtx(D,$),j($,{code:C.not_multiple_of,multipleOf:J.value,message:J.message}),B.dirty()}else if(J.kind==="finite"){if(!Number.isFinite(D.data))$=this._getOrReturnCtx(D,$),j($,{code:C.not_finite,message:J.message}),B.dirty()}else $D.assertNever(J);return{status:B.value,value:D.data}}gte(D,F){return this.setLimit("min",D,!0,x.toString(F))}gt(D,F){return this.setLimit("min",D,!1,x.toString(F))}lte(D,F){return this.setLimit("max",D,!0,x.toString(F))}lt(D,F){return this.setLimit("max",D,!1,x.toString(F))}setLimit(D,F,$,B){return new X6({...this._def,checks:[...this._def.checks,{kind:D,value:F,inclusive:$,message:x.toString(B)}]})}_addCheck(D){return new X6({...this._def,checks:[...this._def.checks,D]})}int(D){return this._addCheck({kind:"int",message:x.toString(D)})}positive(D){return this._addCheck({kind:"min",value:0,inclusive:!1,message:x.toString(D)})}negative(D){return this._addCheck({kind:"max",value:0,inclusive:!1,message:x.toString(D)})}nonpositive(D){return this._addCheck({kind:"max",value:0,inclusive:!0,message:x.toString(D)})}nonnegative(D){return this._addCheck({kind:"min",value:0,inclusive:!0,message:x.toString(D)})}multipleOf(D,F){return this._addCheck({kind:"multipleOf",value:D,message:x.toString(F)})}finite(D){return this._addCheck({kind:"finite",message:x.toString(D)})}safe(D){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:x.toString(D)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:x.toString(D)})}get minValue(){let D=null;for(let F of this._def.checks)if(F.kind==="min"){if(D===null||F.value>D)D=F.value}return D}get maxValue(){let D=null;for(let F of this._def.checks)if(F.kind==="max"){if(D===null||F.value<D)D=F.value}return D}get isInt(){return!!this._def.checks.find((D)=>D.kind==="int"||D.kind==="multipleOf"&&$D.isInteger(D.value))}get isFinite(){let D=null,F=null;for(let $ of this._def.checks)if($.kind==="finite"||$.kind==="int"||$.kind==="multipleOf")return!0;else if($.kind==="min"){if(F===null||$.value>F)F=$.value}else if($.kind==="max"){if(D===null||$.value<D)D=$.value}return Number.isFinite(F)&&Number.isFinite(D)}}X6.create=(D)=>{return new X6({checks:[],typeName:h.ZodNumber,coerce:D?.coerce||!1,...o(D)})};class Y6 extends e{constructor(){super(...arguments);this.min=this.gte,this.max=this.lte}_parse(D){if(this._def.coerce)try{D.data=BigInt(D.data)}catch{return this._getInvalidInput(D)}if(this._getType(D)!==w.bigint)return this._getInvalidInput(D);let $=void 0,B=new D0;for(let J of this._def.checks)if(J.kind==="min"){if(J.inclusive?D.data<J.value:D.data<=J.value)$=this._getOrReturnCtx(D,$),j($,{code:C.too_small,type:"bigint",minimum:J.value,inclusive:J.inclusive,message:J.message}),B.dirty()}else if(J.kind==="max"){if(J.inclusive?D.data>J.value:D.data>=J.value)$=this._getOrReturnCtx(D,$),j($,{code:C.too_big,type:"bigint",maximum:J.value,inclusive:J.inclusive,message:J.message}),B.dirty()}else if(J.kind==="multipleOf"){if(D.data%J.value!==BigInt(0))$=this._getOrReturnCtx(D,$),j($,{code:C.not_multiple_of,multipleOf:J.value,message:J.message}),B.dirty()}else $D.assertNever(J);return{status:B.value,value:D.data}}_getInvalidInput(D){let F=this._getOrReturnCtx(D);return j(F,{code:C.invalid_type,expected:w.bigint,received:F.parsedType}),g}gte(D,F){return this.setLimit("min",D,!0,x.toString(F))}gt(D,F){return this.setLimit("min",D,!1,x.toString(F))}lte(D,F){return this.setLimit("max",D,!0,x.toString(F))}lt(D,F){return this.setLimit("max",D,!1,x.toString(F))}setLimit(D,F,$,B){return new Y6({...this._def,checks:[...this._def.checks,{kind:D,value:F,inclusive:$,message:x.toString(B)}]})}_addCheck(D){return new Y6({...this._def,checks:[...this._def.checks,D]})}positive(D){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:x.toString(D)})}negative(D){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:x.toString(D)})}nonpositive(D){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:x.toString(D)})}nonnegative(D){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:x.toString(D)})}multipleOf(D,F){return this._addCheck({kind:"multipleOf",value:D,message:x.toString(F)})}get minValue(){let D=null;for(let F of this._def.checks)if(F.kind==="min"){if(D===null||F.value>D)D=F.value}return D}get maxValue(){let D=null;for(let F of this._def.checks)if(F.kind==="max"){if(D===null||F.value<D)D=F.value}return D}}Y6.create=(D)=>{return new Y6({checks:[],typeName:h.ZodBigInt,coerce:D?.coerce??!1,...o(D)})};class UF extends e{_parse(D){if(this._def.coerce)D.data=Boolean(D.data);if(this._getType(D)!==w.boolean){let $=this._getOrReturnCtx(D);return j($,{code:C.invalid_type,expected:w.boolean,received:$.parsedType}),g}return H0(D.data)}}UF.create=(D)=>{return new UF({typeName:h.ZodBoolean,coerce:D?.coerce||!1,...o(D)})};class p6 extends e{_parse(D){if(this._def.coerce)D.data=new Date(D.data);if(this._getType(D)!==w.date){let J=this._getOrReturnCtx(D);return j(J,{code:C.invalid_type,expected:w.date,received:J.parsedType}),g}if(Number.isNaN(D.data.getTime())){let J=this._getOrReturnCtx(D);return j(J,{code:C.invalid_date}),g}let $=new D0,B=void 0;for(let J of this._def.checks)if(J.kind==="min"){if(D.data.getTime()<J.value)B=this._getOrReturnCtx(D,B),j(B,{code:C.too_small,message:J.message,inclusive:!0,exact:!1,minimum:J.value,type:"date"}),$.dirty()}else if(J.kind==="max"){if(D.data.getTime()>J.value)B=this._getOrReturnCtx(D,B),j(B,{code:C.too_big,message:J.message,inclusive:!0,exact:!1,maximum:J.value,type:"date"}),$.dirty()}else $D.assertNever(J);return{status:$.value,value:new Date(D.data.getTime())}}_addCheck(D){return new p6({...this._def,checks:[...this._def.checks,D]})}min(D,F){return this._addCheck({kind:"min",value:D.getTime(),message:x.toString(F)})}max(D,F){return this._addCheck({kind:"max",value:D.getTime(),message:x.toString(F)})}get minDate(){let D=null;for(let F of this._def.checks)if(F.kind==="min"){if(D===null||F.value>D)D=F.value}return D!=null?new Date(D):null}get maxDate(){let D=null;for(let F of this._def.checks)if(F.kind==="max"){if(D===null||F.value<D)D=F.value}return D!=null?new Date(D):null}}p6.create=(D)=>{return new p6({checks:[],coerce:D?.coerce||!1,typeName:h.ZodDate,...o(D)})};class K5 extends e{_parse(D){if(this._getType(D)!==w.symbol){let $=this._getOrReturnCtx(D);return j($,{code:C.invalid_type,expected:w.symbol,received:$.parsedType}),g}return H0(D.data)}}K5.create=(D)=>{return new K5({typeName:h.ZodSymbol,...o(D)})};class LF extends e{_parse(D){if(this._getType(D)!==w.undefined){let $=this._getOrReturnCtx(D);return j($,{code:C.invalid_type,expected:w.undefined,received:$.parsedType}),g}return H0(D.data)}}LF.create=(D)=>{return new LF({typeName:h.ZodUndefined,...o(D)})};class MF extends e{_parse(D){if(this._getType(D)!==w.null){let $=this._getOrReturnCtx(D);return j($,{code:C.invalid_type,expected:w.null,received:$.parsedType}),g}return H0(D.data)}}MF.create=(D)=>{return new MF({typeName:h.ZodNull,...o(D)})};class c6 extends e{constructor(){super(...arguments);this._any=!0}_parse(D){return H0(D.data)}}c6.create=(D)=>{return new c6({typeName:h.ZodAny,...o(D)})};class Q6 extends e{constructor(){super(...arguments);this._unknown=!0}_parse(D){return H0(D.data)}}Q6.create=(D)=>{return new Q6({typeName:h.ZodUnknown,...o(D)})};class i1 extends e{_parse(D){let F=this._getOrReturnCtx(D);return j(F,{code:C.invalid_type,expected:w.never,received:F.parsedType}),g}}i1.create=(D)=>{return new i1({typeName:h.ZodNever,...o(D)})};class z5 extends e{_parse(D){if(this._getType(D)!==w.undefined){let $=this._getOrReturnCtx(D);return j($,{code:C.invalid_type,expected:w.void,received:$.parsedType}),g}return H0(D.data)}}z5.create=(D)=>{return new z5({typeName:h.ZodVoid,...o(D)})};class A1 extends e{_parse(D){let{ctx:F,status:$}=this._processInputParams(D),B=this._def;if(F.parsedType!==w.array)return j(F,{code:C.invalid_type,expected:w.array,received:F.parsedType}),g;if(B.exactLength!==null){let Q=F.data.length>B.exactLength.value,X=F.data.length<B.exactLength.value;if(Q||X)j(F,{code:Q?C.too_big:C.too_small,minimum:X?B.exactLength.value:void 0,maximum:Q?B.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:B.exactLength.message}),$.dirty()}if(B.minLength!==null){if(F.data.length<B.minLength.value)j(F,{code:C.too_small,minimum:B.minLength.value,type:"array",inclusive:!0,exact:!1,message:B.minLength.message}),$.dirty()}if(B.maxLength!==null){if(F.data.length>B.maxLength.value)j(F,{code:C.too_big,maximum:B.maxLength.value,type:"array",inclusive:!0,exact:!1,message:B.maxLength.message}),$.dirty()}if(F.common.async)return Promise.all([...F.data].map((Q,X)=>{return B.type._parseAsync(new U1(F,Q,F.path,X))})).then((Q)=>{return D0.mergeArray($,Q)});let J=[...F.data].map((Q,X)=>{return B.type._parseSync(new U1(F,Q,F.path,X))});return D0.mergeArray($,J)}get element(){return this._def.type}min(D,F){return new A1({...this._def,minLength:{value:D,message:x.toString(F)}})}max(D,F){return new A1({...this._def,maxLength:{value:D,message:x.toString(F)}})}length(D,F){return new A1({...this._def,exactLength:{value:D,message:x.toString(F)}})}nonempty(D){return this.min(1,D)}}A1.create=(D,F)=>{return new A1({type:D,minLength:null,maxLength:null,exactLength:null,typeName:h.ZodArray,...o(F)})};function AF(D){if(D instanceof PD){let F={};for(let $ in D.shape){let B=D.shape[$];F[$]=Z1.create(AF(B))}return new PD({...D._def,shape:()=>F})}else if(D instanceof A1)return new A1({...D._def,type:AF(D.element)});else if(D instanceof Z1)return Z1.create(AF(D.unwrap()));else if(D instanceof K8)return K8.create(AF(D.unwrap()));else if(D instanceof a1)return a1.create(D.items.map((F)=>AF(F)));else return D}class PD extends e{constructor(){super(...arguments);this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let D=this._def.shape(),F=$D.objectKeys(D);return this._cached={shape:D,keys:F},this._cached}_parse(D){if(this._getType(D)!==w.object){let G=this._getOrReturnCtx(D);return j(G,{code:C.invalid_type,expected:w.object,received:G.parsedType}),g}let{status:$,ctx:B}=this._processInputParams(D),{shape:J,keys:Q}=this._getCached(),X=[];if(!(this._def.catchall instanceof i1&&this._def.unknownKeys==="strip")){for(let G in B.data)if(!Q.includes(G))X.push(G)}let Y=[];for(let G of Q){let H=J[G],E=B.data[G];Y.push({key:{status:"valid",value:G},value:H._parse(new U1(B,E,B.path,G)),alwaysSet:G in B.data})}if(this._def.catchall instanceof i1){let G=this._def.unknownKeys;if(G==="passthrough")for(let H of X)Y.push({key:{status:"valid",value:H},value:{status:"valid",value:B.data[H]}});else if(G==="strict"){if(X.length>0)j(B,{code:C.unrecognized_keys,keys:X}),$.dirty()}else if(G==="strip");else throw Error("Internal ZodObject error: invalid unknownKeys value.")}else{let G=this._def.catchall;for(let H of X){let E=B.data[H];Y.push({key:{status:"valid",value:H},value:G._parse(new U1(B,E,B.path,H)),alwaysSet:H in B.data})}}if(B.common.async)return Promise.resolve().then(async()=>{let G=[];for(let H of Y){let E=await H.key,K=await H.value;G.push({key:E,value:K,alwaysSet:H.alwaysSet})}return G}).then((G)=>{return D0.mergeObjectSync($,G)});else return D0.mergeObjectSync($,Y)}get shape(){return this._def.shape()}strict(D){return x.errToObj,new PD({...this._def,unknownKeys:"strict",...D!==void 0?{errorMap:(F,$)=>{let B=this._def.errorMap?.(F,$).message??$.defaultError;if(F.code==="unrecognized_keys")return{message:x.errToObj(D).message??B};return{message:B}}}:{}})}strip(){return new PD({...this._def,unknownKeys:"strip"})}passthrough(){return new PD({...this._def,unknownKeys:"passthrough"})}extend(D){return new PD({...this._def,shape:()=>({...this._def.shape(),...D})})}merge(D){return new PD({unknownKeys:D._def.unknownKeys,catchall:D._def.catchall,shape:()=>({...this._def.shape(),...D._def.shape()}),typeName:h.ZodObject})}setKey(D,F){return this.augment({[D]:F})}catchall(D){return new PD({...this._def,catchall:D})}pick(D){let F={};for(let $ of $D.objectKeys(D))if(D[$]&&this.shape[$])F[$]=this.shape[$];return new PD({...this._def,shape:()=>F})}omit(D){let F={};for(let $ of $D.objectKeys(this.shape))if(!D[$])F[$]=this.shape[$];return new PD({...this._def,shape:()=>F})}deepPartial(){return AF(this)}partial(D){let F={};for(let $ of $D.objectKeys(this.shape)){let B=this.shape[$];if(D&&!D[$])F[$]=B;else F[$]=B.optional()}return new PD({...this._def,shape:()=>F})}required(D){let F={};for(let $ of $D.objectKeys(this.shape))if(D&&!D[$])F[$]=this.shape[$];else{let J=this.shape[$];while(J instanceof Z1)J=J._def.innerType;F[$]=J}return new PD({...this._def,shape:()=>F})}keyof(){return Hv($D.objectKeys(this.shape))}}PD.create=(D,F)=>{return new PD({shape:()=>D,unknownKeys:"strip",catchall:i1.create(),typeName:h.ZodObject,...o(F)})};PD.strictCreate=(D,F)=>{return new PD({shape:()=>D,unknownKeys:"strict",catchall:i1.create(),typeName:h.ZodObject,...o(F)})};PD.lazycreate=(D,F)=>{return new PD({shape:D,unknownKeys:"strip",catchall:i1.create(),typeName:h.ZodObject,...o(F)})};class NF extends e{_parse(D){let{ctx:F}=this._processInputParams(D),$=this._def.options;function B(J){for(let X of J)if(X.result.status==="valid")return X.result;for(let X of J)if(X.result.status==="dirty")return F.common.issues.push(...X.ctx.common.issues),X.result;let Q=J.map((X)=>new I0(X.ctx.common.issues));return j(F,{code:C.invalid_union,unionErrors:Q}),g}if(F.common.async)return Promise.all($.map(async(J)=>{let Q={...F,common:{...F.common,issues:[]},parent:null};return{result:await J._parseAsync({data:F.data,path:F.path,parent:Q}),ctx:Q}})).then(B);else{let J=void 0,Q=[];for(let Y of $){let G={...F,common:{...F.common,issues:[]},parent:null},H=Y._parseSync({data:F.data,path:F.path,parent:G});if(H.status==="valid")return H;else if(H.status==="dirty"&&!J)J={result:H,ctx:G};if(G.common.issues.length)Q.push(G.common.issues)}if(J)return F.common.issues.push(...J.ctx.common.issues),J.result;let X=Q.map((Y)=>new I0(Y));return j(F,{code:C.invalid_union,unionErrors:X}),g}}get options(){return this._def.options}}NF.create=(D,F)=>{return new NF({options:D,typeName:h.ZodUnion,...o(F)})};var q8=(D)=>{if(D instanceof RF)return q8(D.schema);else if(D instanceof L1)return q8(D.innerType());else if(D instanceof wF)return[D.value];else if(D instanceof G6)return D.options;else if(D instanceof TF)return $D.objectValues(D.enum);else if(D instanceof jF)return q8(D._def.innerType);else if(D instanceof LF)return[void 0];else if(D instanceof MF)return[null];else if(D instanceof Z1)return[void 0,...q8(D.unwrap())];else if(D instanceof K8)return[null,...q8(D.unwrap())];else if(D instanceof C$)return q8(D.unwrap());else if(D instanceof IF)return q8(D.unwrap());else if(D instanceof OF)return q8(D._def.innerType);else return[]};class N$ extends e{_parse(D){let{ctx:F}=this._processInputParams(D);if(F.parsedType!==w.object)return j(F,{code:C.invalid_type,expected:w.object,received:F.parsedType}),g;let $=this.discriminator,B=F.data[$],J=this.optionsMap.get(B);if(!J)return j(F,{code:C.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[$]}),g;if(F.common.async)return J._parseAsync({data:F.data,path:F.path,parent:F});else return J._parseSync({data:F.data,path:F.path,parent:F})}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(D,F,$){let B=new Map;for(let J of F){let Q=q8(J.shape[D]);if(!Q.length)throw Error(`A discriminator value for key \`${D}\` could not be extracted from all schema options`);for(let X of Q){if(B.has(X))throw Error(`Discriminator property ${String(D)} has duplicate value ${String(X)}`);B.set(X,J)}}return new N$({typeName:h.ZodDiscriminatedUnion,discriminator:D,options:F,optionsMap:B,...o($)})}}function w2(D,F){let $=n1(D),B=n1(F);if(D===F)return{valid:!0,data:D};else if($===w.object&&B===w.object){let J=$D.objectKeys(F),Q=$D.objectKeys(D).filter((Y)=>J.indexOf(Y)!==-1),X={...D,...F};for(let Y of Q){let G=w2(D[Y],F[Y]);if(!G.valid)return{valid:!1};X[Y]=G.data}return{valid:!0,data:X}}else if($===w.array&&B===w.array){if(D.length!==F.length)return{valid:!1};let J=[];for(let Q=0;Q<D.length;Q++){let X=D[Q],Y=F[Q],G=w2(X,Y);if(!G.valid)return{valid:!1};J.push(G.data)}return{valid:!0,data:J}}else if($===w.date&&B===w.date&&+D===+F)return{valid:!0,data:D};else return{valid:!1}}class CF extends e{_parse(D){let{status:F,ctx:$}=this._processInputParams(D),B=(J,Q)=>{if(L$(J)||L$(Q))return g;let X=w2(J.value,Q.value);if(!X.valid)return j($,{code:C.invalid_intersection_types}),g;if(M$(J)||M$(Q))F.dirty();return{status:F.value,value:X.data}};if($.common.async)return Promise.all([this._def.left._parseAsync({data:$.data,path:$.path,parent:$}),this._def.right._parseAsync({data:$.data,path:$.path,parent:$})]).then(([J,Q])=>B(J,Q));else return B(this._def.left._parseSync({data:$.data,path:$.path,parent:$}),this._def.right._parseSync({data:$.data,path:$.path,parent:$}))}}CF.create=(D,F,$)=>{return new CF({left:D,right:F,typeName:h.ZodIntersection,...o($)})};class a1 extends e{_parse(D){let{status:F,ctx:$}=this._processInputParams(D);if($.parsedType!==w.array)return j($,{code:C.invalid_type,expected:w.array,received:$.parsedType}),g;if($.data.length<this._def.items.length)return j($,{code:C.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),g;if(!this._def.rest&&$.data.length>this._def.items.length)j($,{code:C.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),F.dirty();let J=[...$.data].map((Q,X)=>{let Y=this._def.items[X]||this._def.rest;if(!Y)return null;return Y._parse(new U1($,Q,$.path,X))}).filter((Q)=>!!Q);if($.common.async)return Promise.all(J).then((Q)=>{return D0.mergeArray(F,Q)});else return D0.mergeArray(F,J)}get items(){return this._def.items}rest(D){return new a1({...this._def,rest:D})}}a1.create=(D,F)=>{if(!Array.isArray(D))throw Error("You must pass an array of schemas to z.tuple([ ... ])");return new a1({items:D,typeName:h.ZodTuple,rest:null,...o(F)})};class V5 extends e{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(D){let{status:F,ctx:$}=this._processInputParams(D);if($.parsedType!==w.object)return j($,{code:C.invalid_type,expected:w.object,received:$.parsedType}),g;let B=[],J=this._def.keyType,Q=this._def.valueType;for(let X in $.data)B.push({key:J._parse(new U1($,X,$.path,X)),value:Q._parse(new U1($,$.data[X],$.path,X)),alwaysSet:X in $.data});if($.common.async)return D0.mergeObjectAsync(F,B);else return D0.mergeObjectSync(F,B)}get element(){return this._def.valueType}static create(D,F,$){if(F instanceof e)return new V5({keyType:D,valueType:F,typeName:h.ZodRecord,...o($)});return new V5({keyType:V1.create(),valueType:D,typeName:h.ZodRecord,...o(F)})}}class A5 extends e{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(D){let{status:F,ctx:$}=this._processInputParams(D);if($.parsedType!==w.map)return j($,{code:C.invalid_type,expected:w.map,received:$.parsedType}),g;let B=this._def.keyType,J=this._def.valueType,Q=[...$.data.entries()].map(([X,Y],G)=>{return{key:B._parse(new U1($,X,$.path,[G,"key"])),value:J._parse(new U1($,Y,$.path,[G,"value"]))}});if($.common.async){let X=new Map;return Promise.resolve().then(async()=>{for(let Y of Q){let G=await Y.key,H=await Y.value;if(G.status==="aborted"||H.status==="aborted")return g;if(G.status==="dirty"||H.status==="dirty")F.dirty();X.set(G.value,H.value)}return{status:F.value,value:X}})}else{let X=new Map;for(let Y of Q){let{key:G,value:H}=Y;if(G.status==="aborted"||H.status==="aborted")return g;if(G.status==="dirty"||H.status==="dirty")F.dirty();X.set(G.value,H.value)}return{status:F.value,value:X}}}}A5.create=(D,F,$)=>{return new A5({valueType:F,keyType:D,typeName:h.ZodMap,...o($)})};class n6 extends e{_parse(D){let{status:F,ctx:$}=this._processInputParams(D);if($.parsedType!==w.set)return j($,{code:C.invalid_type,expected:w.set,received:$.parsedType}),g;let B=this._def;if(B.minSize!==null){if($.data.size<B.minSize.value)j($,{code:C.too_small,minimum:B.minSize.value,type:"set",inclusive:!0,exact:!1,message:B.minSize.message}),F.dirty()}if(B.maxSize!==null){if($.data.size>B.maxSize.value)j($,{code:C.too_big,maximum:B.maxSize.value,type:"set",inclusive:!0,exact:!1,message:B.maxSize.message}),F.dirty()}let J=this._def.valueType;function Q(Y){let G=new Set;for(let H of Y){if(H.status==="aborted")return g;if(H.status==="dirty")F.dirty();G.add(H.value)}return{status:F.value,value:G}}let X=[...$.data.values()].map((Y,G)=>J._parse(new U1($,Y,$.path,G)));if($.common.async)return Promise.all(X).then((Y)=>Q(Y));else return Q(X)}min(D,F){return new n6({...this._def,minSize:{value:D,message:x.toString(F)}})}max(D,F){return new n6({...this._def,maxSize:{value:D,message:x.toString(F)}})}size(D,F){return this.min(D,F).max(D,F)}nonempty(D){return this.min(1,D)}}n6.create=(D,F)=>{return new n6({valueType:D,minSize:null,maxSize:null,typeName:h.ZodSet,...o(F)})};class ZF extends e{constructor(){super(...arguments);this.validate=this.implement}_parse(D){let{ctx:F}=this._processInputParams(D);if(F.parsedType!==w.function)return j(F,{code:C.invalid_type,expected:w.function,received:F.parsedType}),g;function $(X,Y){return q5({data:X,path:F.path,errorMaps:[F.common.contextualErrorMap,F.schemaErrorMap,zF(),E8].filter((G)=>!!G),issueData:{code:C.invalid_arguments,argumentsError:Y}})}function B(X,Y){return q5({data:X,path:F.path,errorMaps:[F.common.contextualErrorMap,F.schemaErrorMap,zF(),E8].filter((G)=>!!G),issueData:{code:C.invalid_return_type,returnTypeError:Y}})}let J={errorMap:F.common.contextualErrorMap},Q=F.data;if(this._def.returns instanceof i6){let X=this;return H0(async function(...Y){let G=new I0([]),H=await X._def.args.parseAsync(Y,J).catch((V)=>{throw G.addIssue($(Y,V)),G}),E=await Reflect.apply(Q,this,H);return await X._def.returns._def.type.parseAsync(E,J).catch((V)=>{throw G.addIssue(B(E,V)),G})})}else{let X=this;return H0(function(...Y){let G=X._def.args.safeParse(Y,J);if(!G.success)throw new I0([$(Y,G.error)]);let H=Reflect.apply(Q,this,G.data),E=X._def.returns.safeParse(H,J);if(!E.success)throw new I0([B(H,E.error)]);return E.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...D){return new ZF({...this._def,args:a1.create(D).rest(Q6.create())})}returns(D){return new ZF({...this._def,returns:D})}implement(D){return this.parse(D)}strictImplement(D){return this.parse(D)}static create(D,F,$){return new ZF({args:D?D:a1.create([]).rest(Q6.create()),returns:F||Q6.create(),typeName:h.ZodFunction,...o($)})}}class RF extends e{get schema(){return this._def.getter()}_parse(D){let{ctx:F}=this._processInputParams(D);return this._def.getter()._parse({data:F.data,path:F.path,parent:F})}}RF.create=(D,F)=>{return new RF({getter:D,typeName:h.ZodLazy,...o(F)})};class wF extends e{_parse(D){if(D.data!==this._def.value){let F=this._getOrReturnCtx(D);return j(F,{received:F.data,code:C.invalid_literal,expected:this._def.value}),g}return{status:"valid",value:D.data}}get value(){return this._def.value}}wF.create=(D,F)=>{return new wF({value:D,typeName:h.ZodLiteral,...o(F)})};function Hv(D,F){return new G6({values:D,typeName:h.ZodEnum,...o(F)})}class G6 extends e{_parse(D){if(typeof D.data!=="string"){let F=this._getOrReturnCtx(D),$=this._def.values;return j(F,{expected:$D.joinValues($),received:F.parsedType,code:C.invalid_type}),g}if(!this._cache)this._cache=new Set(this._def.values);if(!this._cache.has(D.data)){let F=this._getOrReturnCtx(D),$=this._def.values;return j(F,{received:F.data,code:C.invalid_enum_value,options:$}),g}return H0(D.data)}get options(){return this._def.values}get enum(){let D={};for(let F of this._def.values)D[F]=F;return D}get Values(){let D={};for(let F of this._def.values)D[F]=F;return D}get Enum(){let D={};for(let F of this._def.values)D[F]=F;return D}extract(D,F=this._def){return G6.create(D,{...this._def,...F})}exclude(D,F=this._def){return G6.create(this.options.filter(($)=>!D.includes($)),{...this._def,...F})}}G6.create=Hv;class TF extends e{_parse(D){let F=$D.getValidEnumValues(this._def.values),$=this._getOrReturnCtx(D);if($.parsedType!==w.string&&$.parsedType!==w.number){let B=$D.objectValues(F);return j($,{expected:$D.joinValues(B),received:$.parsedType,code:C.invalid_type}),g}if(!this._cache)this._cache=new Set($D.getValidEnumValues(this._def.values));if(!this._cache.has(D.data)){let B=$D.objectValues(F);return j($,{received:$.data,code:C.invalid_enum_value,options:B}),g}return H0(D.data)}get enum(){return this._def.values}}TF.create=(D,F)=>{return new TF({values:D,typeName:h.ZodNativeEnum,...o(F)})};class i6 extends e{unwrap(){return this._def.type}_parse(D){let{ctx:F}=this._processInputParams(D);if(F.parsedType!==w.promise&&F.common.async===!1)return j(F,{code:C.invalid_type,expected:w.promise,received:F.parsedType}),g;let $=F.parsedType===w.promise?F.data:Promise.resolve(F.data);return H0($.then((B)=>{return this._def.type.parseAsync(B,{path:F.path,errorMap:F.common.contextualErrorMap})}))}}i6.create=(D,F)=>{return new i6({type:D,typeName:h.ZodPromise,...o(F)})};class L1 extends e{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===h.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(D){let{status:F,ctx:$}=this._processInputParams(D),B=this._def.effect||null,J={addIssue:(Q)=>{if(j($,Q),Q.fatal)F.abort();else F.dirty()},get path(){return $.path}};if(J.addIssue=J.addIssue.bind(J),B.type==="preprocess"){let Q=B.transform($.data,J);if($.common.async)return Promise.resolve(Q).then(async(X)=>{if(F.value==="aborted")return g;let Y=await this._def.schema._parseAsync({data:X,path:$.path,parent:$});if(Y.status==="aborted")return g;if(Y.status==="dirty")return d6(Y.value);if(F.value==="dirty")return d6(Y.value);return Y});else{if(F.value==="aborted")return g;let X=this._def.schema._parseSync({data:Q,path:$.path,parent:$});if(X.status==="aborted")return g;if(X.status==="dirty")return d6(X.value);if(F.value==="dirty")return d6(X.value);return X}}if(B.type==="refinement"){let Q=(X)=>{let Y=B.refinement(X,J);if($.common.async)return Promise.resolve(Y);if(Y instanceof Promise)throw Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return X};if($.common.async===!1){let X=this._def.schema._parseSync({data:$.data,path:$.path,parent:$});if(X.status==="aborted")return g;if(X.status==="dirty")F.dirty();return Q(X.value),{status:F.value,value:X.value}}else return this._def.schema._parseAsync({data:$.data,path:$.path,parent:$}).then((X)=>{if(X.status==="aborted")return g;if(X.status==="dirty")F.dirty();return Q(X.value).then(()=>{return{status:F.value,value:X.value}})})}if(B.type==="transform")if($.common.async===!1){let Q=this._def.schema._parseSync({data:$.data,path:$.path,parent:$});if(!J6(Q))return g;let X=B.transform(Q.value,J);if(X instanceof Promise)throw Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:F.value,value:X}}else return this._def.schema._parseAsync({data:$.data,path:$.path,parent:$}).then((Q)=>{if(!J6(Q))return g;return Promise.resolve(B.transform(Q.value,J)).then((X)=>({status:F.value,value:X}))});$D.assertNever(B)}}L1.create=(D,F,$)=>{return new L1({schema:D,typeName:h.ZodEffects,effect:F,...o($)})};L1.createWithPreprocess=(D,F,$)=>{return new L1({schema:F,effect:{type:"preprocess",transform:D},typeName:h.ZodEffects,...o($)})};class Z1 extends e{_parse(D){if(this._getType(D)===w.undefined)return H0(void 0);return this._def.innerType._parse(D)}unwrap(){return this._def.innerType}}Z1.create=(D,F)=>{return new Z1({innerType:D,typeName:h.ZodOptional,...o(F)})};class K8 extends e{_parse(D){if(this._getType(D)===w.null)return H0(null);return this._def.innerType._parse(D)}unwrap(){return this._def.innerType}}K8.create=(D,F)=>{return new K8({innerType:D,typeName:h.ZodNullable,...o(F)})};class jF extends e{_parse(D){let{ctx:F}=this._processInputParams(D),$=F.data;if(F.parsedType===w.undefined)$=this._def.defaultValue();return this._def.innerType._parse({data:$,path:F.path,parent:F})}removeDefault(){return this._def.innerType}}jF.create=(D,F)=>{return new jF({innerType:D,typeName:h.ZodDefault,defaultValue:typeof F.default==="function"?F.default:()=>F.default,...o(F)})};class OF extends e{_parse(D){let{ctx:F}=this._processInputParams(D),$={...F,common:{...F.common,issues:[]}},B=this._def.innerType._parse({data:$.data,path:$.path,parent:{...$}});if(VF(B))return B.then((J)=>{return{status:"valid",value:J.status==="valid"?J.value:this._def.catchValue({get error(){return new I0($.common.issues)},input:$.data})}});else return{status:"valid",value:B.status==="valid"?B.value:this._def.catchValue({get error(){return new I0($.common.issues)},input:$.data})}}removeCatch(){return this._def.innerType}}OF.create=(D,F)=>{return new OF({innerType:D,typeName:h.ZodCatch,catchValue:typeof F.catch==="function"?F.catch:()=>F.catch,...o(F)})};class Z5 extends e{_parse(D){if(this._getType(D)!==w.nan){let $=this._getOrReturnCtx(D);return j($,{code:C.invalid_type,expected:w.nan,received:$.parsedType}),g}return{status:"valid",value:D.data}}}Z5.create=(D)=>{return new Z5({typeName:h.ZodNaN,...o(D)})};var S2D=Symbol("zod_brand");class C$ extends e{_parse(D){let{ctx:F}=this._processInputParams(D),$=F.data;return this._def.type._parse({data:$,path:F.path,parent:F})}unwrap(){return this._def.type}}class U5 extends e{_parse(D){let{status:F,ctx:$}=this._processInputParams(D);if($.common.async)return(async()=>{let J=await this._def.in._parseAsync({data:$.data,path:$.path,parent:$});if(J.status==="aborted")return g;if(J.status==="dirty")return F.dirty(),d6(J.value);else return this._def.out._parseAsync({data:J.value,path:$.path,parent:$})})();else{let B=this._def.in._parseSync({data:$.data,path:$.path,parent:$});if(B.status==="aborted")return g;if(B.status==="dirty")return F.dirty(),{status:"dirty",value:B.value};else return this._def.out._parseSync({data:B.value,path:$.path,parent:$})}}static create(D,F){return new U5({in:D,out:F,typeName:h.ZodPipeline})}}class IF extends e{_parse(D){let F=this._def.innerType._parse(D),$=(B)=>{if(J6(B))B.value=Object.freeze(B.value);return B};return VF(F)?F.then((B)=>$(B)):$(F)}unwrap(){return this._def.innerType}}IF.create=(D,F)=>{return new IF({innerType:D,typeName:h.ZodReadonly,...o(F)})};function Qv(D,F){let $=typeof D==="function"?D(F):typeof D==="string"?{message:D}:D;return typeof $==="string"?{message:$}:$}function Wv(D,F={},$){if(D)return c6.create().superRefine((B,J)=>{let Q=D(B);if(Q instanceof Promise)return Q.then((X)=>{if(!X){let Y=Qv(F,B),G=Y.fatal??$??!0;J.addIssue({code:"custom",...Y,fatal:G})}});if(!Q){let X=Qv(F,B),Y=X.fatal??$??!0;J.addIssue({code:"custom",...X,fatal:Y})}return});return c6.create()}var k2D={object:PD.lazycreate},h;(function(D){D.ZodString="ZodString",D.ZodNumber="ZodNumber",D.ZodNaN="ZodNaN",D.ZodBigInt="ZodBigInt",D.ZodBoolean="ZodBoolean",D.ZodDate="ZodDate",D.ZodSymbol="ZodSymbol",D.ZodUndefined="ZodUndefined",D.ZodNull="ZodNull",D.ZodAny="ZodAny",D.ZodUnknown="ZodUnknown",D.ZodNever="ZodNever",D.ZodVoid="ZodVoid",D.ZodArray="ZodArray",D.ZodObject="ZodObject",D.ZodUnion="ZodUnion",D.ZodDiscriminatedUnion="ZodDiscriminatedUnion",D.ZodIntersection="ZodIntersection",D.ZodTuple="ZodTuple",D.ZodRecord="ZodRecord",D.ZodMap="ZodMap",D.ZodSet="ZodSet",D.ZodFunction="ZodFunction",D.ZodLazy="ZodLazy",D.ZodLiteral="ZodLiteral",D.ZodEnum="ZodEnum",D.ZodEffects="ZodEffects",D.ZodNativeEnum="ZodNativeEnum",D.ZodOptional="ZodOptional",D.ZodNullable="ZodNullable",D.ZodDefault="ZodDefault",D.ZodCatch="ZodCatch",D.ZodPromise="ZodPromise",D.ZodBranded="ZodBranded",D.ZodPipeline="ZodPipeline",D.ZodReadonly="ZodReadonly"})(h||(h={}));var v2D=(D,F={message:`Input not instance of ${D.name}`})=>Wv(($)=>$ instanceof D,F),Ev=V1.create,qv=X6.create,y2D=Z5.create,x2D=Y6.create,Kv=UF.create,_2D=p6.create,f2D=K5.create,g2D=LF.create,h2D=MF.create,b2D=c6.create,u2D=Q6.create,m2D=i1.create,l2D=z5.create,d2D=A1.create,p2D=PD.create,c2D=PD.strictCreate,n2D=NF.create,i2D=N$.create,a2D=CF.create,o2D=a1.create,s2D=V5.create,r2D=A5.create,t2D=n6.create,e2D=ZF.create,DGD=RF.create,FGD=wF.create,$GD=G6.create,BGD=TF.create,JGD=i6.create,QGD=L1.create,XGD=Z1.create,YGD=K8.create,GGD=L1.createWithPreprocess,HGD=U5.create,WGD=()=>Ev().optional(),EGD=()=>qv().optional(),qGD=()=>Kv().optional(),KGD={string:(D)=>V1.create({...D,coerce:!0}),number:(D)=>X6.create({...D,coerce:!0}),boolean:(D)=>UF.create({...D,coerce:!0}),bigint:(D)=>Y6.create({...D,coerce:!0}),date:(D)=>p6.create({...D,coerce:!0})};var zGD=g;var nCD=M1.object({apiKey:M1.string().optional(),apiUrl:M1.string().url().default("https://api.osc.earth/nemar"),username:M1.string().optional(),email:M1.string().email().optional(),githubUsername:M1.string().optional(),sandboxCompleted:M1.boolean().optional(),sandboxDatasetId:M1.string().optional()}),_0=new U$({projectName:"nemar",schema:{apiKey:{type:"string"},apiUrl:{type:"string",default:"https://api.osc.earth/nemar"},username:{type:"string"},email:{type:"string"},githubUsername:{type:"string"},sandboxCompleted:{type:"boolean"},sandboxDatasetId:{type:"string"}},...process.env.NEMAR_CONFIG_DIR?{cwd:process.env.NEMAR_CONFIG_DIR}:{}});function F0(){return{apiKey:_0.get("apiKey"),apiUrl:_0.get("apiUrl"),username:_0.get("username"),email:_0.get("email"),githubUsername:_0.get("githubUsername"),sandboxCompleted:_0.get("sandboxCompleted"),sandboxDatasetId:_0.get("sandboxDatasetId")}}function zv(){return!!_0.get("sandboxCompleted")}function V0(D,F){_0.set(D,F)}function T2(D){_0.delete(D)}function Vv(){_0.clear()}function SD(){return!!_0.get("apiKey")}function Av(){return _0.path}var j2="https://api.osc.earth/nemar",R$=/^\d{4}-\d{4}-\d{4}-\d{3}[\dX]$/;function P0(D){if(D instanceof Error)return D.message;return String(D)}class c extends Error{statusCode;details;constructor(D,F,$){super(F);this.statusCode=D;this.details=$;this.name="ApiError"}}var VGD=j2.includes("workers.dev");function Zv(){if(process.env.TEST_API_URL)return process.env.TEST_API_URL;if(VGD)return j2;return F0().apiUrl||j2}async function s(D,F={},$=!1){let B=`${Zv()}${D}`,J={"Content-Type":"application/json",...F.headers};if($){let Y=F0();if(!Y.apiKey&&$===!0)throw new c(401,"Not authenticated. Run 'nemar auth login' first.");if(Y.apiKey)J.Authorization=`Bearer ${Y.apiKey}`}let Q;try{Q=await fetch(B,{...F,headers:J})}catch(Y){throw new c(0,`Network error: Could not connect to ${Zv()}`,{originalError:Y instanceof Error?Y.message:String(Y)})}let X;try{X=await Q.json()}catch{throw new c(Q.status,`Invalid response from server (status ${Q.status})`)}if(!Q.ok)throw new c(Q.status,X.error||X.message||"Request failed",X.details);return X}async function Uv(D){return s(`/auth/check-username?username=${encodeURIComponent(D)}`)}async function Lv(D){return s(`/auth/check-github?username=${encodeURIComponent(D)}`)}async function Mv(D){return s("/auth/signup",{method:"POST",body:JSON.stringify(D)})}async function Nv(D){return s("/auth/login",{method:"POST",body:JSON.stringify({api_key:D})})}async function Cv(D){return s("/auth/resend-verification",{method:"POST",body:JSON.stringify({email:D})})}async function w$(){return s("/users/me",{},!0)}async function Rv(D){let F=D?`?status=${D}`:"";return s(`/admin/users${F}`,{},!0)}async function wv(D){return s(`/admin/approve/${D}`,{method:"POST"},!0)}async function Tv(D){return s(`/admin/revoke/${D}`,{method:"POST"},!0)}async function jv(D,F){return s(`/admin/users/${D}/role`,{method:"POST",body:JSON.stringify({role:F})},!0)}async function Ov(D){return s(`/admin/regenerate-iam/${D}`,{method:"POST"},!0)}async function O2(D,F){return s(`/admin/datasets/${D}/visibility`,{method:"PATCH",body:JSON.stringify({visibility:F})},!0)}async function Iv(D){return s(`/datasets/${D}/publish`,{method:"POST"},!0)}async function Pv(D){return s(`/admin/datasets/${D}/ci`,{},!0)}async function T$(D){return s(`/admin/datasets/${D}/ci`,{method:"POST"},!0)}async function Sv(D){return s(`/datasets/${D}/ci/status`,{},!0)}async function kv(D){return s(`/datasets/${D}/manifest`,{},!0)}async function vv(D,F){return s(`/datasets/${D}/manifest/${F}`,{},!0)}function yv(D){let F=D;if(!["active","archived","deleted"].includes(F.status))throw Error(`Invalid dataset status: ${F.status}`);if(!F.visibility)F.visibility="private";else if(!["public","private"].includes(F.visibility))throw Error(`Invalid dataset visibility: ${F.visibility}`);return F}async function xv(D=!1){let $=await s(`/datasets${D?"?mine=true":""}`,{},D?!0:"optional");return $.datasets=$.datasets.map(yv),$}async function N1(D){let F=await s(`/datasets/${D}`,{},"optional");return yv(F.dataset)}async function j$(D){return s("/datasets",{method:"POST",body:JSON.stringify(D)},!0)}async function O$(D){return s(`/datasets/${D}/finalize`,{method:"POST"},!0)}async function _v(D,F){return s(`/datasets/${D}/upload-urls`,{method:"POST",body:JSON.stringify({files:F})},!0)}async function fv(D,F){return s(`/admin/datasets/${D}/doi/concept`,{method:"POST",body:JSON.stringify(F)},!0)}async function L5(D){return s(`/admin/datasets/${D}/doi`,{},!0)}async function I2(D,F){return s(`/admin/datasets/${D}/doi/update`,{method:"POST",body:JSON.stringify(F)},!0)}async function gv(D){return s(`/datasets/${D}/request-access`,{method:"POST"},!0)}async function hv(D,F){return s(`/datasets/${D}/invite`,{method:"POST",body:JSON.stringify({username:F})},!0)}async function bv(D){return s(`/datasets/${D}/collaborators`,{},!0)}async function uv(D){return s("/sandbox/complete",{method:"POST",body:JSON.stringify({dataset_id:D})},!0)}async function mv(){return s("/sandbox/reset",{method:"POST"},!0)}async function lv(){return s("/sandbox/status",{},!0)}async function dv(D){return s(`/datasets/${D}/publish/request`,{method:"POST"},!0)}async function pv(D){return s(`/datasets/${D}/publish/status`,{},!0)}async function cv(D){return s(`/datasets/${D}/publish/resend`,{method:"POST"},!0)}async function nv(D){let F=D?`?status=${D}`:"";return s(`/admin/publish/requests${F}`,{},!0)}async function iv(D,F){return s(`/admin/publish/${D}/deny`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({reason:F})},!0)}async function av(D,F=!1,$=!1){let B,J;do if(J=await s(`/admin/publish/${D}/approve`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({resume:F,sandbox:$,s3_lock_offset:B})},!0),J.hasMore&&J.s3_lock_offset!==void 0)B=J.s3_lock_offset;else break;while(J.hasMore);return J}async function ov(D,F){return s(`/admin/datasets/${D}/enrichment`,{method:"POST",body:JSON.stringify(F)},!0)}async function sv(D){return s(`/admin/datasets/${D}/files`,{},!0)}async function rv(D){let F=0,$=0,B=[],J=0,Q=!0;while(Q){let X=await s(`/admin/datasets/${D}/s3-lock`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({offset:F})},!0);if($+=X.locked,B.push(...X.failed),J=X.total,Q=X.hasMore,Q)F+=40}return{locked:$,total:J,failed:B}}async function tv(D,F=!1){return s(`/admin/datasets/${D}`,{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({force:F})},!0)}async function gD(D,F,$=!1){if(F.no)return"declined";if(F.yes)return"confirmed";try{let{confirmed:B}=await OD.prompt([{type:"confirm",name:"confirmed",message:D,default:$}]);return B?"confirmed":"cancelled"}catch(B){let J=B instanceof Error?B.message:String(B);if(J.includes("closed")||J.includes("TTY")||J.includes("SIGINT")||J.includes("readline"))console.error("Interactive prompt unavailable (non-interactive terminal or interrupted)"),console.error(" Use --yes or --no flags for non-interactive mode");else console.error("Prompt error:",J);return"cancelled"}}async function ev(D,F,$){if($.no)return"declined";if($.yes)return"confirmed";try{let{input:B}=await OD.prompt([{type:"input",name:"input",message:D,validate:(J)=>{if(J!==F)return`Input does not match. Expected: ${F}`;return!0}}]);return B===F?"confirmed":"cancelled"}catch(B){let J=B instanceof Error?B.message:String(B);if(J.includes("closed")||J.includes("TTY")||J.includes("SIGINT")||J.includes("readline"))console.error("Interactive prompt unavailable (non-interactive terminal or interrupted)"),console.error(" Use --yes or --no flags for non-interactive mode");else console.error("Prompt error:",J);return"cancelled"}}var yD="-y, --yes",hD="-n, --no",xD="Skip confirmation and proceed",bD="Skip confirmation and decline";import{existsSync as $y,statSync as AGD}from"fs";import{join as P2}from"path";var{spawn:ZGD}=globalThis.Bun;async function u(D,F={}){let $=ZGD({cmd:D,cwd:F.cwd,stdout:"pipe",stderr:"pipe",env:{...process.env,...F.env}}),B=await new Response($.stdout).text(),J=await new Response($.stderr).text(),Q=await $.exited;return{stdout:B,stderr:J,exitCode:Q}}function Dy(D){return D.split(".").map((F)=>{let $=Number.parseInt(F.replace(/[^0-9]/g,""),10);return Number.isNaN($)?0:$})}function UGD(D,F){let $=Dy(D),B=Dy(F);for(let J=0;J<Math.max($.length,B.length);J++){let Q=$[J]||0,X=B[J]||0;if(Q>X)return!0;if(Q<X)return!1}return!0}async function By(){try{let{stdout:F,exitCode:$,stderr:B}=await u(["git-annex","version"]);if($!==0)return console.warn("git-annex version returned non-zero exit code:",$),console.warn("stderr:",B),{installed:!1,minVersion:"10.0",error:`Version check failed: ${B.trim()}`};let J=F.match(/version:\s*(\d+\.\d+)/),Q=J?J[1]:void 0;if(!Q)console.warn("Could not parse git-annex version from output:",F);return{installed:!0,version:Q,minVersion:"10.0",compatible:Q?UGD(Q,"10.0"):void 0}}catch(F){let $=F instanceof Error?F.message:String(F);if($.includes("ENOENT")||$.includes("not found"))return console.info("git-annex not found in PATH"),{installed:!1,minVersion:"10.0"};return console.error("Error checking git-annex installation:",$),{installed:!1,minVersion:"10.0",error:$}}}async function LGD(){if(process.env.GH_TOKEN)return{accessible:!0,username:"token-auth",useHttps:!0};try{let{stdout:D,stderr:F}=await u(["ssh","-T","-o","BatchMode=yes","-o","StrictHostKeyChecking=accept-new","-o","ConnectTimeout=10","git@github.com"]),$=D+F,B=$.match(/Hi ([^!]+)!/);if(B)return{accessible:!0,username:B[1]};if($.includes("Permission denied"))return{accessible:!1};return{accessible:$.includes("successfully authenticated")}}catch(D){let F=D instanceof Error?D.message:String(D);if(F.includes("ENOENT")||F.includes("not found"))console.info("SSH command not found");else console.error("Error checking GitHub SSH access:",F);return{accessible:!1}}}function Jy(){let D=process.platform;if(D==="darwin")return"brew install git-annex";if(D==="linux")return"apt install git-annex (Debian/Ubuntu)";return"See https://git-annex.branchable.com/install/"}async function I$(){let[D,F]=await Promise.all([By(),LGD()]),$=[];if(!D.installed)$.push(`git-annex is not installed. Install: ${Jy()}`);else if(D.compatible===!1)$.push(`git-annex version ${D.version} is too old. Required: >= ${D.minVersion}`);if(!F.accessible)$.push("GitHub SSH access not configured. Run 'nemar auth setup-ssh' to configure automatically.");return{gitAnnex:D,githubSSH:F,allPassed:$.length===0,errors:$}}async function z8(D){if(!$y(P2(D,".git")))return!1;try{let{exitCode:F}=await u(["git","annex","info"],{cwd:D});return F===0}catch(F){let $=F instanceof Error?F.message:String(F);if(!$.includes("ENOENT")&&!$.includes("not found"))console.error(`Error checking if ${D} is a git-annex dataset:`,$);return!1}}async function P$(D,F={}){if(!F.force&&await z8(D))return{success:!0};try{let $={};if(F.author)$.GIT_AUTHOR_NAME=F.author.name,$.GIT_AUTHOR_EMAIL=F.author.email,$.GIT_COMMITTER_NAME=F.author.name,$.GIT_COMMITTER_EMAIL=F.author.email;let{stderr:B,exitCode:J}=await u(["git","init",D],{...Object.keys($).length>0?{env:$}:{}});if(J!==0)return{success:!1,error:B.trim()||"Failed to initialize git repository"};let{stderr:Q,exitCode:X}=await u(["git","annex","init"],{cwd:D,...Object.keys($).length>0?{env:$}:{}});if(X!==0)return{success:!1,error:Q.trim()||"Failed to initialize git-annex"};return{success:!0}}catch($){return{success:!1,error:$.message}}}async function Qy(D){try{let{exitCode:F,stderr:$}=await u(["git","annex","info"],{cwd:D});if(F===0)return{success:!0};if($.includes("First run: git-annex init")){let{stderr:B,exitCode:J}=await u(["git","annex","init"],{cwd:D});if(J!==0)return{success:!1,error:B.trim()||"Failed to initialize git-annex"};return{success:!0}}return{success:!1,error:$.trim()||"Failed to check git-annex status"}}catch(F){return{success:!1,error:F.message}}}async function S$(D,F){let B=F||"include=*.edf or include=*.bdf or include=*.set or include=*.fif or include=*.vhdr or include=*.eeg or include=*.cnt or include=*.fdt or largerthan=100kb";try{let{stderr:J,exitCode:Q}=await u(["git","annex","config","--set","annex.largefiles",B],{cwd:D});if(Q!==0)return{success:!1,error:J.trim()||"Failed to configure largefiles"};return{success:!0}}catch(J){return{success:!1,error:J.message}}}async function MGD(){try{let{exitCode:D,stderr:F}=await u(["ssh","-T","-o","BatchMode=yes","-o","ConnectTimeout=5","git@github.com"]),$=F.includes("successfully authenticated");if(!$)console.warn("SSH test to github.com failed:",{exitCode:D,stderr:F.trim().slice(0,500)});return{works:$,error:$?void 0:F.trim().slice(0,500)}}catch(D){let F=D instanceof Error?D.message:String(D);return console.warn("SSH test exception:",F),{works:!1,error:F}}}async function NGD(){try{let{stdout:D,exitCode:F,stderr:$}=await u(["gh","auth","token"]);if(F!==0)return console.warn("gh CLI returned non-zero exit code:",F),console.warn("stderr:",$),{token:null,error:`gh auth token failed: ${$.trim()||"unknown error"}`};if(!D.trim())return console.warn("gh auth token returned empty output"),{token:null,error:"gh CLI returned empty token"};return{token:D.trim()}}catch(D){let F=D instanceof Error?D.message:String(D);if(console.error("Failed to get GitHub token from gh CLI:",F),F.includes("ENOENT")||F.includes("not found"))return{token:null,error:"gh CLI not installed (command not found)"};return{token:null,error:`gh CLI error: ${F}`}}}async function k$(D){try{let{stdout:F,exitCode:$,stderr:B}=await u(["gh","api","user","--jq",".login"]);if($!==0){if(B.includes("not logged in")||B.includes("auth login"))return{authenticated:!1,error:"gh CLI not authenticated. Run 'gh auth login' to authenticate."};return{authenticated:!1,error:`gh CLI error: ${B.trim()||"unknown error"}`}}let J=F.trim();if(!J)return{authenticated:!1,error:"gh CLI returned empty username"};if(D){let Q=J.toLowerCase()===D.toLowerCase();return{authenticated:!0,username:J,matches:Q,error:Q?void 0:`gh CLI authenticated as '${J}', expected '${D}'`}}return{authenticated:!0,username:J}}catch(F){let $=F instanceof Error?F.message:String(F);if($.includes("ENOENT")||$.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: ${$}`}}}async function v$(D){if(!/^[a-zA-Z0-9_.-]+\/[a-zA-Z0-9_.-]+$/.test(D))return{accepted:!1,error:`Invalid repository format: ${D}`};let{stdout:F,exitCode:$,stderr:B}=await u(["gh","api","/user/repository_invitations"]);if($!==0){if(B.includes("not logged in")||B.includes("auth login"))return{accepted:!1,error:"gh CLI not authenticated. Run 'gh auth login' to authenticate."};if(B.includes("API rate limit")||B.includes("403"))return{accepted:!1,error:"GitHub API rate limit exceeded. Please try again in a few minutes."};if(B.includes("ENOENT")||B.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: ${B.trim()||"unknown error"}`}}let J=null;try{J=JSON.parse(F||"[]").find((H)=>H.repository.full_name===D)?.id??null}catch(Y){let G=Y instanceof Error?Y.message:String(Y);return console.error("Failed to parse GitHub invitations response:",G),console.error(" Raw response (first 500 chars):",(F||"").slice(0,500)),{accepted:!1,error:`Failed to parse GitHub API response: ${G}`}}if(!J){let{exitCode:Y}=await u(["gh","api",`/repos/${D}`,"--silent"]);if(Y===0)return{accepted:!0,alreadyCollaborator:!0};return{accepted:!1,error:`No pending invitation found for ${D}. You may need to accept it manually via GitHub.`}}let{exitCode:Q,stderr:X}=await u(["gh","api","--method","PATCH",`/user/repository_invitations/${J}`]);if(Q!==0)return{accepted:!1,error:`Failed to accept invitation: ${X.trim()||"unknown error"}`};return{accepted:!0}}async function y$(D,F,$="origin"){let B=F;if(process.env.GH_TOKEN&&F.startsWith("git@github.com:")){let J=process.env.GH_TOKEN.trim();if(!J||/\s/.test(J))return{success:!1,error:"GH_TOKEN environment variable is set but appears malformed (empty or contains whitespace)"};let Q=F.replace("git@github.com:","");B=`https://${J}@github.com/${Q}`}else if(F.startsWith("git@github.com:")){let J=F.replace("git@github.com:",""),Q=await MGD();if(Q.works)B=F;else{console.warn("GitHub SSH not available, falling back to HTTPS with gh CLI token...");let X=await NGD();if(X.token)B=`https://${X.token}@github.com/${J}`,console.warn("Note: using HTTPS with gh CLI token. If the token expires, re-run 'gh auth login'.");else return{success:!1,error:`GitHub authentication not configured.
120
120
 
121
121
  SSH failed: ${Q.error||"could not connect"}
122
122
  gh CLI failed: ${X.error||"could not get token"}
@@ -156,27 +156,27 @@ Examples:
156
156
  $ nemar admin repo public nm000104 # Make dataset repo public
157
157
  $ nemar admin ci check nm000104 # Check CI status
158
158
  $ nemar admin s3 regenerate-iam john_doe # Regenerate AWS credentials
159
- $ nemar admin doi create nm000104 # Create concept DOI`);function mD(){if(!jD())return console.log(W.red("Error: Not authenticated")),console.log(W.gray(" Run 'nemar auth login' first")),!1;return!0}A0.command("users").description("List NEMAR users").option("--pending","Show only pending approval").option("--verified","Show only verified (awaiting approval)").option("--approved","Show only approved users").option("--revoked","Show only revoked users").action(async(D)=>{if(!mD())return;let F;if(D.pending)F="pending";else if(D.verified)F="verified";else if(D.approved)F="approved";else if(D.revoked)F="revoked";let $=R("Fetching users...").start();try{let B=await Rv(F);if($.stop(),B.users.length===0){console.log(W.yellow("No users found"));return}console.log(`
159
+ $ nemar admin doi create nm000104 # Create concept DOI`);function uD(){if(!SD())return console.log(W.red("Error: Not authenticated")),console.log(W.gray(" Run 'nemar auth login' first")),!1;return!0}A0.command("users").description("List NEMAR users").option("--pending","Show only pending approval").option("--verified","Show only verified (awaiting approval)").option("--approved","Show only approved users").option("--revoked","Show only revoked users").action(async(D)=>{if(!uD())return;let F;if(D.pending)F="pending";else if(D.verified)F="verified";else if(D.approved)F="approved";else if(D.revoked)F="revoked";let $=R("Fetching users...").start();try{let B=await Rv(F);if($.stop(),B.users.length===0){console.log(W.yellow("No users found"));return}console.log(`
160
160
  ${W.cyan("NEMAR Users")} (${B.count} total)
161
- `);for(let J of B.users){let Q={pending:W.gray,verified:W.yellow,approved:W.green,revoked:W.red}[J.status]||W.white,X=J.role==="owner"?W.red(" [owner]"):J.role==="admin"?W.magenta(" [admin]"):"",Y=J.email_verified?"":W.gray(" (unverified)");console.log(` ${W.cyan(J.username)}${X}`),console.log(` Email: ${J.email}${Y}`),console.log(` GitHub: @${J.github_username}`),console.log(` Status: ${Q(J.status)}`),console.log(` Created: ${new Date(J.created_at).toLocaleDateString()}`),console.log()}}catch(B){f0(B,$,"Failed to fetch users")}});A0.command("approve").description("Approve a pending user").argument("<username>","Username to approve").option(yD,xD).option(hD,bD).action(async(D,F)=>{if(!mD())return;console.log(W.cyan(`
161
+ `);for(let J of B.users){let Q={pending:W.gray,verified:W.yellow,approved:W.green,revoked:W.red}[J.status]||W.white,X=J.role==="owner"?W.red(" [owner]"):J.role==="admin"?W.magenta(" [admin]"):"",Y=J.email_verified?"":W.gray(" (unverified)");console.log(` ${W.cyan(J.username)}${X}`),console.log(` Email: ${J.email}${Y}`),console.log(` GitHub: @${J.github_username}`),console.log(` Status: ${Q(J.status)}`),console.log(` Created: ${new Date(J.created_at).toLocaleDateString()}`),console.log()}}catch(B){f0(B,$,"Failed to fetch users")}});A0.command("approve").description("Approve a pending user").argument("<username>","Username to approve").option(yD,xD).option(hD,bD).action(async(D,F)=>{if(!uD())return;console.log(W.cyan(`
162
162
  Approving user: ${D}
163
- `)),console.log("This will:"),console.log(" 1. Generate an API key for the user"),console.log(" 2. Send them an email with their API key"),console.log();let $=await gD(`Approve ${D}?`,F,!0);if($!=="confirmed"){console.log(W.gray($==="declined"?"Skipped":"Cancelled"));return}let B=R(`Approving ${D}...`).start();try{let J=await wv(D);if(B.succeed(`Approved ${D}`),console.log(),console.log(` Email: ${J.user.email}`),console.log(` Status: ${W.green(J.user.status)}`),J.iam_setup===!0)console.log(` S3 Access: ${W.green("configured")}`);else if(J.iam_setup===!1)console.log(` S3 Access: ${W.red("NOT configured")}`);if(console.log(),console.log(W.yellow("API Key (shown once):")),console.log(W.gray(` ${J.api_key}`)),console.log(),console.log(W.gray("The user has also been emailed their API key")),J.warning)console.log(),console.log(W.yellow(`Warning: ${J.warning}`))}catch(J){f0(J,B,"Failed to approve user",{404:"User not found or not in 'verified' status"})}});A0.command("revoke").description("Revoke user access").argument("<username>","Username to revoke").option(yD,xD).option(hD,bD).action(async(D,F)=>{if(!mD())return;if(F0().username===D){console.log(W.red("Error: Cannot revoke your own access"));return}console.log(W.red(`
163
+ `)),console.log("This will:"),console.log(" 1. Generate an API key for the user"),console.log(" 2. Send them an email with their API key"),console.log();let $=await gD(`Approve ${D}?`,F,!0);if($!=="confirmed"){console.log(W.gray($==="declined"?"Skipped":"Cancelled"));return}let B=R(`Approving ${D}...`).start();try{let J=await wv(D);if(B.succeed(`Approved ${D}`),console.log(),console.log(` Email: ${J.user.email}`),console.log(` Status: ${W.green(J.user.status)}`),J.iam_setup===!0)console.log(` S3 Access: ${W.green("configured")}`);else if(J.iam_setup===!1)console.log(` S3 Access: ${W.red("NOT configured")}`);if(console.log(),console.log(W.yellow("API Key (shown once):")),console.log(W.gray(` ${J.api_key}`)),console.log(),console.log(W.gray("The user has also been emailed their API key")),J.warning)console.log(),console.log(W.yellow(`Warning: ${J.warning}`))}catch(J){f0(J,B,"Failed to approve user",{404:"User not found or not in 'verified' status"})}});A0.command("revoke").description("Revoke user access").argument("<username>","Username to revoke").option(yD,xD).option(hD,bD).action(async(D,F)=>{if(!uD())return;if(F0().username===D){console.log(W.red("Error: Cannot revoke your own access"));return}console.log(W.red(`
164
164
  Revoking access for: ${D}
165
- `)),console.log(W.yellow("This will:")),console.log(" 1. Invalidate all API keys for this user"),console.log(" 2. Remove them from datasets they have access to"),console.log(" 3. Send them a notification email"),console.log();let B=await ev(`Type '${D}' to confirm revocation:`,D,F);if(B!=="confirmed"){console.log(W.gray(B==="declined"?"Skipped":"Cancelled"));return}let J=R(`Revoking ${D}...`).start();try{await Tv(D),J.succeed(`Revoked access for ${D}`)}catch(Q){f0(Q,J,"Failed to revoke user",{404:"User not found"})}});A0.command("role").description("Change a user's role (owner only)").argument("<username>","Username to change role for").argument("<role>","New role: owner, admin, or member").option("-y, --yes","Skip confirmation prompt").action(async(D,F,$)=>{if(!mD())return;if(!["owner","admin","member"].includes(F))console.error(W.red(`Invalid role '${F}'. Must be: owner, admin, or member`)),process.exit(1);if(!$.yes){let{confirmed:J}=await ID.prompt([{type:"confirm",name:"confirmed",message:`Change ${D}'s role to '${F}'?`,default:!1}]);if(!J){console.log(W.gray("Cancelled"));return}}let B=R(`Changing ${D}'s role to '${F}'...`).start();try{let J=await jv(D,F);if(B.succeed(J.message),J.tokens_revoked!==void 0&&J.tokens_revoked>0)console.log(W.yellow(` ${J.tokens_revoked} token(s) revoked (user must re-login)`))}catch(J){f0(J,B,"Failed to change role",{400:"Invalid request (check if you are an owner)",403:"Owner access required",404:"User not found",409:"User already has that role"})}});var y2=new B0("s3").description("S3 and IAM credential management");y2.command("regenerate-iam").description("Regenerate AWS IAM credentials for a user").argument("<username>","Username to regenerate credentials for").option(yD,xD).option(hD,bD).action(Cy);y2.command("lock").description("Apply S3 Object Lock (Governance mode) to a dataset").argument("<dataset-id>","Dataset ID to lock").option(yD,xD).option(hD,bD).action(async(D,F)=>{if(!mD())return;console.log(W.cyan(`
165
+ `)),console.log(W.yellow("This will:")),console.log(" 1. Invalidate all API keys for this user"),console.log(" 2. Remove them from datasets they have access to"),console.log(" 3. Send them a notification email"),console.log();let B=await ev(`Type '${D}' to confirm revocation:`,D,F);if(B!=="confirmed"){console.log(W.gray(B==="declined"?"Skipped":"Cancelled"));return}let J=R(`Revoking ${D}...`).start();try{await Tv(D),J.succeed(`Revoked access for ${D}`)}catch(Q){f0(Q,J,"Failed to revoke user",{404:"User not found"})}});A0.command("role").description("Change a user's role (owner only)").argument("<username>","Username to change role for").argument("<role>","New role: owner, admin, or member").option("-y, --yes","Skip confirmation prompt").action(async(D,F,$)=>{if(!uD())return;if(!["owner","admin","member"].includes(F))console.error(W.red(`Invalid role '${F}'. Must be: owner, admin, or member`)),process.exit(1);if(!$.yes){let{confirmed:J}=await OD.prompt([{type:"confirm",name:"confirmed",message:`Change ${D}'s role to '${F}'?`,default:!1}]);if(!J){console.log(W.gray("Cancelled"));return}}let B=R(`Changing ${D}'s role to '${F}'...`).start();try{let J=await jv(D,F);if(B.succeed(J.message),J.tokens_revoked!==void 0&&J.tokens_revoked>0)console.log(W.yellow(` ${J.tokens_revoked} token(s) revoked (user must re-login)`))}catch(J){f0(J,B,"Failed to change role",{400:"Invalid request (check if you are an owner)",403:"Owner access required",404:"User not found",409:"User already has that role"})}});var y2=new B0("s3").description("S3 and IAM credential management");y2.command("regenerate-iam").description("Regenerate AWS IAM credentials for a user").argument("<username>","Username to regenerate credentials for").option(yD,xD).option(hD,bD).action(Cy);y2.command("lock").description("Apply S3 Object Lock (Governance mode) to a dataset").argument("<dataset-id>","Dataset ID to lock").option(yD,xD).option(hD,bD).action(async(D,F)=>{if(!uD())return;console.log(W.cyan(`
166
166
  Apply S3 Object Lock to ${D}
167
167
  `)),console.log("This will:"),console.log(" \u2022 Set GOVERNANCE mode Object Lock on all objects"),console.log(" \u2022 Retention period: 100 years"),console.log(" \u2022 Objects cannot be deleted or modified without bypass"),console.log();let $=await gD(`Apply S3 Object Lock to ${D}?`,F);if($!=="confirmed"){console.log(W.gray($==="declined"?"Skipped":"Cancelled"));return}let B=R("Applying S3 Object Lock...").start();try{let J=await rv(D);if(J.failed.length>0){B.fail(`Partial lock: ${J.locked}/${J.total} locked, ${J.failed.length} failed`),console.log(W.yellow(`
168
- Failed objects:`));for(let Q of J.failed.slice(0,10))console.log(` \u2022 ${Q}`);if(J.failed.length>10)console.log(` ... and ${J.failed.length-10} more`)}else B.succeed(`All ${J.locked} objects locked successfully`)}catch(J){B.fail("S3 lock failed"),console.log(W.gray(` ${P0(J)}`))}});A0.addCommand(y2);A0.command("regenerate-iam",{hidden:!0}).argument("<username>").option(yD,xD).option(hD,bD).action(Cy);async function Cy(D,F){if(!mD())return;console.log(W.yellow(`
168
+ Failed objects:`));for(let Q of J.failed.slice(0,10))console.log(` \u2022 ${Q}`);if(J.failed.length>10)console.log(` ... and ${J.failed.length-10} more`)}else B.succeed(`All ${J.locked} objects locked successfully`)}catch(J){B.fail("S3 lock failed"),console.log(W.gray(` ${P0(J)}`))}});A0.addCommand(y2);A0.command("regenerate-iam",{hidden:!0}).argument("<username>").option(yD,xD).option(hD,bD).action(Cy);async function Cy(D,F){if(!uD())return;console.log(W.yellow(`
169
169
  Regenerate IAM credentials for: ${D}
170
- `)),console.log("This will:"),console.log(" 1. Create new AWS IAM access keys for the user"),console.log(" 2. Invalidate any existing access keys"),console.log(" 3. Restore S3 access to their datasets"),console.log(),console.log(W.gray("Use this if a user's credentials were compromised or lost.")),console.log();let $=await gD(`Regenerate IAM credentials for ${D}?`,F);if($!=="confirmed"){console.log(W.gray($==="declined"?"Skipped":"Cancelled"));return}let B=R(`Regenerating IAM credentials for ${D}...`).start();try{let J=await Ov(D);if(B.succeed(`Regenerated IAM credentials for ${D}`),console.log(),console.log(` IAM Username: ${W.cyan(J.user.iam_username)}`),J.user.role==="admin"||J.user.role==="owner")console.log(` Access: ${W.magenta("full bucket access (admin/owner)")}`);if(console.log(` Datasets restored: ${W.green(J.datasets_restored)}`),J.warning)console.log(),console.log(W.yellow(` Warning: ${J.warning}`)),console.log(W.gray(" Please verify old credentials are revoked in AWS console."));console.log(),console.log(W.gray("The user can now upload to their datasets again."))}catch(J){f0(J,B,"Failed to regenerate IAM credentials",{404:"User not found or not approved"})}}var x2=new B0("repo").description("Repository visibility management");x2.command("public").description("Make a dataset repository public").argument("<dataset-id>","Dataset ID (e.g., nm000104)").option(yD,xD).option(hD,bD).action(async(D,F)=>{if(!mD())return;console.log(W.cyan(`
170
+ `)),console.log("This will:"),console.log(" 1. Create new AWS IAM access keys for the user"),console.log(" 2. Invalidate any existing access keys"),console.log(" 3. Restore S3 access to their datasets"),console.log(),console.log(W.gray("Use this if a user's credentials were compromised or lost.")),console.log();let $=await gD(`Regenerate IAM credentials for ${D}?`,F);if($!=="confirmed"){console.log(W.gray($==="declined"?"Skipped":"Cancelled"));return}let B=R(`Regenerating IAM credentials for ${D}...`).start();try{let J=await Ov(D);if(B.succeed(`Regenerated IAM credentials for ${D}`),console.log(),console.log(` IAM Username: ${W.cyan(J.user.iam_username)}`),J.user.role==="admin"||J.user.role==="owner")console.log(` Access: ${W.magenta("full bucket access (admin/owner)")}`);if(console.log(` Datasets restored: ${W.green(J.datasets_restored)}`),J.warning)console.log(),console.log(W.yellow(` Warning: ${J.warning}`)),console.log(W.gray(" Please verify old credentials are revoked in AWS console."));console.log(),console.log(W.gray("The user can now upload to their datasets again."))}catch(J){f0(J,B,"Failed to regenerate IAM credentials",{404:"User not found or not approved"})}}var x2=new B0("repo").description("Repository visibility management");x2.command("public").description("Make a dataset repository public").argument("<dataset-id>","Dataset ID (e.g., nm000104)").option(yD,xD).option(hD,bD).action(async(D,F)=>{if(!uD())return;console.log(W.cyan(`
171
171
  Making repository public: ${D}
172
- `)),console.log(W.yellow("Warning: This will make the dataset visible to everyone.")),console.log();let $=await gD(`Make ${D} public?`,F);if($!=="confirmed"){console.log(W.gray($==="declined"?"Skipped":"Cancelled"));return}let B=R(`Setting ${D} to public...`).start();try{await O2(D,"public"),B.succeed(`Repository ${D} is now public`)}catch(J){f0(J,B,"Failed to change visibility",{404:"Dataset not found"})}});x2.command("private").description("Make a dataset repository private").argument("<dataset-id>","Dataset ID (e.g., nm000104)").option(yD,xD).option(hD,bD).action(async(D,F)=>{if(!mD())return;console.log(W.yellow(`
172
+ `)),console.log(W.yellow("Warning: This will make the dataset visible to everyone.")),console.log();let $=await gD(`Make ${D} public?`,F);if($!=="confirmed"){console.log(W.gray($==="declined"?"Skipped":"Cancelled"));return}let B=R(`Setting ${D} to public...`).start();try{await O2(D,"public"),B.succeed(`Repository ${D} is now public`)}catch(J){f0(J,B,"Failed to change visibility",{404:"Dataset not found"})}});x2.command("private").description("Make a dataset repository private").argument("<dataset-id>","Dataset ID (e.g., nm000104)").option(yD,xD).option(hD,bD).action(async(D,F)=>{if(!uD())return;console.log(W.yellow(`
173
173
  Making repository private: ${D}
174
- `)),console.log("This will restrict access to collaborators only."),console.log();let $=await gD(`Make ${D} private?`,F);if($!=="confirmed"){console.log(W.gray($==="declined"?"Skipped":"Cancelled"));return}let B=R(`Setting ${D} to private...`).start();try{await O2(D,"private"),B.succeed(`Repository ${D} is now private`)}catch(J){f0(J,B,"Failed to change visibility",{404:"Dataset not found"})}});A0.addCommand(x2);var _2=new B0("ci").description("CI workflow management");_2.command("check").description("Check CI workflow status for a dataset").argument("<dataset-id>","Dataset ID (e.g., nm000104)").action(async(D)=>{if(!mD())return;let F=R(`Checking CI status for ${D}...`).start();try{let $=await Pv(D);F.stop(),console.log(`
174
+ `)),console.log("This will restrict access to collaborators only."),console.log();let $=await gD(`Make ${D} private?`,F);if($!=="confirmed"){console.log(W.gray($==="declined"?"Skipped":"Cancelled"));return}let B=R(`Setting ${D} to private...`).start();try{await O2(D,"private"),B.succeed(`Repository ${D} is now private`)}catch(J){f0(J,B,"Failed to change visibility",{404:"Dataset not found"})}});A0.addCommand(x2);var _2=new B0("ci").description("CI workflow management");_2.command("check").description("Check CI workflow status for a dataset").argument("<dataset-id>","Dataset ID (e.g., nm000104)").action(async(D)=>{if(!uD())return;let F=R(`Checking CI status for ${D}...`).start();try{let $=await Pv(D);F.stop(),console.log(`
175
175
  ${W.cyan("CI Status:")} ${D}
176
- `);let B=$.bids_validation.present,J=B?W.green("[x]"):W.red("[ ]");if(console.log(` ${J} BIDS Validation`),B){let Y=$.bids_validation.status==="success"?W.green:$.bids_validation.status==="failure"?W.red:W.yellow;if(console.log(` Status: ${Y($.bids_validation.status)}`),$.bids_validation.url)console.log(` URL: ${W.gray($.bids_validation.url)}`)}else console.log(` ${W.gray("Not deployed. Use 'nemar admin ci add' to deploy.")}`);let Q=$.version_check.present,X=Q?W.green("[x]"):W.red("[ ]");if(console.log(` ${X} Version Check`),!Q)console.log(` ${W.gray("Not deployed. Use 'nemar admin ci add' to deploy.")}`);console.log()}catch($){f0($,F,"Failed to check CI status",{404:"Dataset not found"})}});_2.command("add").description("Deploy CI workflows to a dataset repository").argument("<dataset-id>","Dataset ID (e.g., nm000104)").option(yD,xD).option(hD,bD).action(async(D,F)=>{if(!mD())return;console.log(W.cyan(`
176
+ `);let B=$.bids_validation.present,J=B?W.green("[x]"):W.red("[ ]");if(console.log(` ${J} BIDS Validation`),B){let Y=$.bids_validation.status==="success"?W.green:$.bids_validation.status==="failure"?W.red:W.yellow;if(console.log(` Status: ${Y($.bids_validation.status)}`),$.bids_validation.url)console.log(` URL: ${W.gray($.bids_validation.url)}`)}else console.log(` ${W.gray("Not deployed. Use 'nemar admin ci add' to deploy.")}`);let Q=$.version_check.present,X=Q?W.green("[x]"):W.red("[ ]");if(console.log(` ${X} Version Check`),!Q)console.log(` ${W.gray("Not deployed. Use 'nemar admin ci add' to deploy.")}`);console.log()}catch($){f0($,F,"Failed to check CI status",{404:"Dataset not found"})}});_2.command("add").description("Deploy CI workflows to a dataset repository").argument("<dataset-id>","Dataset ID (e.g., nm000104)").option(yD,xD).option(hD,bD).action(async(D,F)=>{if(!uD())return;console.log(W.cyan(`
177
177
  Deploy CI workflows to: ${D}
178
- `)),console.log("This will add the following workflows:"),console.log(" 1. BIDS Validation (runs on PRs)"),console.log(" 2. Version Check (ensures version bump on PRs)"),console.log(" 3. PR Merge Handler (creates releases, publishes DOIs)"),console.log();let $=await gD(`Deploy CI workflows to ${D}?`,F);if($!=="confirmed"){console.log(W.gray($==="declined"?"Skipped":"Cancelled"));return}let B=R(`Deploying CI workflows to ${D}...`).start();try{let J=await T$(D);B.succeed("CI workflows deployed"),console.log();for(let Q of J.workflows_deployed)console.log(` ${W.green("[x]")} ${Q}`);console.log()}catch(J){f0(J,B,"Failed to deploy CI workflows",{404:"Dataset not found"})}});A0.addCommand(_2);var w5=new B0("doi").description("DOI management");w5.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(yD,xD).option(hD,bD).action(async(D,F)=>{if(!mD())return;let $=R("Fetching dataset info...").start(),B;try{B=await N1(D),$.succeed(`Found dataset: ${B.name}`)}catch(G){if(G instanceof c){if($.fail(G.message),G.statusCode===404)console.log(W.gray(" Dataset not found"))}else $.fail("Failed to fetch dataset");return}try{let G=await L5(D);if(G.concept_doi){if(console.log(W.yellow(`
179
- Dataset already has a concept DOI:`)),console.log(` Concept DOI: ${W.cyan(G.concept_doi)}`),G.zenodo_concept_url)console.log(` Zenodo URL: ${G.zenodo_concept_url}`);return}}catch(G){if(process.env.DEBUG)console.error("[debug] DOI info fetch:",G)}if(console.log(),console.log(W.cyan("Dataset Information:")),console.log(` ID: ${B.dataset_id}`),console.log(` Name: ${B.name}`),B.github_repo)console.log(` GitHub: ${B.github_repo}`);if(F.sandbox)console.log(` Mode: ${W.yellow("SANDBOX (test DOI)")}`);console.log();let J=F.provider==="zenodo"?"zenodo":"ezid";if(F.sandbox){if(console.log(W.yellow("\u2501".repeat(60))),console.log(W.yellow.bold(" SANDBOX MODE ENABLED")),console.log(W.yellow("\u2501".repeat(60))),J==="zenodo")console.log(W.yellow(" \u2022 Using Zenodo sandbox (sandbox.zenodo.org)"));else console.log(W.yellow(" \u2022 Using EZID test shoulder (doi:10.5072/FK2)")),console.log(W.yellow(" \u2022 Test DOIs auto-delete after 2 weeks"));console.log(W.yellow(" \u2022 DOI will NOT be indexed by DataCite")),console.log(W.yellow(" \u2022 DOI will NOT resolve in production")),console.log(W.yellow(" \u2022 Use this for testing workflows only")),console.log(W.yellow("\u2501".repeat(60))),console.log()}console.log(W.red("WARNING: DOIs are PERMANENT and cannot be deleted!")),console.log(W.gray("The DOI will be pre-reserved but not published until the first version release.")),console.log(` Provider: ${W.cyan(J.toUpperCase())}`),console.log();let Q=F.sandbox?`Create TEST concept DOI via ${J.toUpperCase()} SANDBOX?`:`Create PERMANENT concept DOI via ${J.toUpperCase()} PRODUCTION?`,X=await gD(Q,F);if(X!=="confirmed"){console.log(W.gray(X==="declined"?"Skipped":"Cancelled"));return}let Y=R(`Creating concept DOI via ${J.toUpperCase()}...`).start();try{let G=await fv(D,{title:F.title,description:F.description,sandbox:F.sandbox,provider:J});Y.succeed("Concept DOI created successfully");let H=R("Applying branch protection...").start();try{let E=await O$(D);if(E.warnings&&E.warnings.length>0){H.warn("Branch protection applied with warnings");for(let K of E.warnings)console.log(W.yellow(` Warning: ${K}`))}else H.succeed("Branch protection applied")}catch(E){if(H.warn("Could not apply branch protection"),E instanceof c){if(console.log(W.gray(` ${E.message}`)),E.statusCode===403)console.log(W.gray(" Check admin credentials and permissions"))}else console.log(W.gray(` ${E instanceof Error?E.message:"Unknown error"}`));console.log(W.gray(" Manual setup: Go to GitHub repo Settings > Branches > Add rule"))}if(console.log(),console.log(W.green("DOI Information:")),console.log(` Concept DOI: ${W.cyan(G.concept_doi)}`),console.log(` Provider: ${G.provider.toUpperCase()}`),G.provider==="ezid")console.log(` DOI URL: ${G.doi_url}`),console.log(` EZID ID: ${G.ezid_identifier}`);else console.log(` Zenodo URL: ${G.zenodo_url}`);if(G.metadata_warning)console.log(W.yellow(` Warning: ${G.metadata_warning}`));if(console.log(),console.log(W.yellow("Next steps:")),console.log(" 1. Set up automatic DOI publishing by running:"),console.log(W.gray(` ${G.setup_command}`)),console.log(" (paste the webhook token when prompted)"),console.log(),console.log(" 2. Update dataset_description.json with DatasetDOI field"),console.log(" 3. Create a PR and merge it to trigger version DOI publication"),console.log(),F.sandbox)console.log(W.gray("Note: This is a sandbox DOI and will not resolve in production."))}catch(G){if(G instanceof c){if(Y.fail(G.message),G.statusCode===403)console.log(W.gray(" This command requires admin privileges"))}else Y.fail("Failed to create concept DOI"),console.log(W.gray(` ${P0(G)}`))}});w5.command("info").description("Get DOI info for a dataset").argument("<dataset-id>","Dataset ID (e.g., nm000104)").action(async(D)=>{if(!mD())return;let F=R("Fetching DOI info...").start();try{let $=await L5(D);if(F.stop(),console.log(),console.log(W.cyan(`DOI Information for ${D}:`)),console.log(` Dataset Name: ${$.name}`),console.log(),$.concept_doi){if(console.log(W.green("Concept DOI:")),console.log(` DOI: ${$.concept_doi}`),console.log(` URL: https://doi.org/${$.concept_doi}`),console.log(` Provider: ${($.doi_provider||"zenodo").toUpperCase()}`),$.doi_provider==="ezid"){if($.ezid_identifier)console.log(` EZID ID: ${$.ezid_identifier}`);if($.ezid_status){let B=$.ezid_status==="public"?W.green:W.yellow;console.log(` Status: ${B($.ezid_status)}`)}}if($.zenodo_concept_url){if(console.log(` Zenodo: ${$.zenodo_concept_url}`),$.zenodo_concept_url.includes("sandbox.zenodo.org"))console.log(),console.log(W.yellow("Mode: SANDBOX (test DOI)")),console.log(W.yellow(" This DOI is not indexed by DataCite and will not resolve in production"))}}else console.log(W.yellow("No concept DOI created yet")),console.log(W.gray(" Use 'nemar admin doi create' to create one"));if(console.log(),$.latest_version_doi){if(console.log(W.green("Latest Version DOI:")),console.log(` DOI: ${$.latest_version_doi}`),console.log(` URL: https://doi.org/${$.latest_version_doi}`),$.zenodo_latest_version_url)console.log(` Zenodo: ${$.zenodo_latest_version_url}`)}else if($.concept_doi)console.log(W.yellow("No version DOI published yet")),console.log(W.gray(" Version DOIs are created automatically on PR merge"))}catch($){if($ instanceof c){if(F.fail($.message),$.statusCode===404)console.log(W.gray(" Dataset not found"));else if($.statusCode===403)console.log(W.gray(" This command requires admin privileges"))}else F.fail("Failed to fetch DOI info")}});w5.command("update").description("Update EZID DOI metadata or status").argument("<dataset-id>","Dataset ID (e.g., nm000104)").option("--make-public","Transition DOI from reserved to public (permanent)").option("--refresh","Refresh metadata from BIDS dataset_description.json").option(yD,xD).option(hD,bD).action(async(D,F)=>{if(!mD())return;if(!F.makePublic&&!F.refresh){console.log(W.yellow("No action specified. Use --make-public and/or --refresh."));return}if(F.makePublic){console.log(W.red("WARNING: Making a DOI public is PERMANENT!")),console.log(W.gray(" The DOI will be findable in DataCite and cannot be reverted.")),console.log();let B=await gD(`Make DOI for ${D} PUBLIC and permanent?`,F);if(B!=="confirmed"){console.log(W.gray(B==="declined"?"Skipped":"Cancelled"));return}}let $=R("Updating DOI...").start();try{let B=await I2(D,{status:F.makePublic?"public":void 0,refresh_metadata:F.refresh});$.succeed("DOI updated successfully"),console.log(),console.log(` EZID ID: ${W.cyan(B.ezid_identifier)}`),console.log(` Status: ${B.status==="public"?W.green(B.status):W.yellow(B.status)}`),console.log(` URL: ${B.doi_url}`)}catch(B){if(B instanceof c){if($.fail(B.message),B.statusCode===400)console.log(W.gray(" DOI update is only supported for EZID-managed DOIs"))}else $.fail("Failed to update DOI"),console.log(W.gray(` ${P0(B)}`))}});w5.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(yD,xD).option(hD,bD).action(async(D,F)=>{if(!mD())return;let $=R("Fetching dataset and existing enrichment...").start(),B;try{B=await N1(D),$.succeed(`Dataset: ${B.name}`)}catch(K){if(K instanceof c)$.fail(K.message);else $.fail("Failed to fetch dataset");return}let J,Q=!1;try{J=await L5(D)}catch(K){if(K instanceof c&&K.statusCode===404);else Q=!0,console.log(W.yellow(` Warning: Could not fetch DOI info: ${P0(K)}`))}if(J?.concept_doi)console.log(` DOI: ${W.cyan(J.concept_doi)}`);let X={version:"1.0"};console.log(),console.log(W.cyan("--- Author ORCIDs ---"));let{updateAuthors:Y}=await ID.prompt([{type:"confirm",name:"updateAuthors",message:"Update author ORCIDs?",default:!1}]);if(Y){let K={},V=!0;while(V){let{authorName:A}=await ID.prompt([{type:"input",name:"authorName",message:'Author name (as in BIDS, e.g., "Shirazi, Yahya"):'}]);if(!A)break;let{orcid:Z}=await ID.prompt([{type:"input",name:"orcid",message:`ORCID for "${A}" (Enter to skip):`,validate:(N)=>{if(!N)return!0;return R$.test(N)||"Invalid ORCID format (XXXX-XXXX-XXXX-XXXX)"}}]),U={};if(Z)U.orcid=Z;let{affiliation:L}=await ID.prompt([{type:"input",name:"affiliation",message:`Affiliation for "${A}" (optional):`}]);if(L)U.affiliation=L;if(U.orcid||U.affiliation)K[A]=U;let{more:M}=await ID.prompt([{type:"confirm",name:"more",message:"Add another author?",default:!0}]);V=M}if(Object.keys(K).length>0)X.authors=K}if(F.llm!==!1){console.log(),console.log(W.cyan("--- Generating enrichment from README ---"));let K=process.env.OPENROUTER_API_KEY;if(!K)console.log(W.yellow(" OPENROUTER_API_KEY not set; skipping LLM enrichment")),console.log(W.gray(" Set it in your environment to enable LLM-based enrichment"));else{let V=R("Analyzing README and dataset metadata...").start();try{let{enrichFromReadme:A}=await Promise.resolve().then(() => (My(),Ly)),Z=B.github_repo;if(!Z)V.warn("No GitHub repository configured for this dataset");else{let U=await Ny(Z,"README");if(!U)V.warn("Could not fetch README from repository");else{let L=await Ny(Z,"dataset_description.json"),M={};if(L)try{M=JSON.parse(L)}catch{console.log(W.yellow(" Warning: Could not parse dataset_description.json; LLM will use README only"))}let N=await A(U,M,K);if(V.succeed("LLM enrichment complete"),N.description)console.log(` Description: ${N.description.slice(0,100)}...`),X.description=N.description;if(N.methodsDescription)X.methodsDescription=N.methodsDescription;if(N.keywords&&N.keywords.length>0)console.log(` Keywords: ${N.keywords.join(", ")}`),X.keywords=N.keywords;if(N.fundingReferences&&N.fundingReferences.length>0)console.log(` Funding: ${N.fundingReferences.map((O)=>`${O.funderName} ${O.awardNumber||""}`).join(", ")}`),X.fundingReferences=N.fundingReferences;if(N.relatedDois&&N.relatedDois.length>0)console.log(` Related DOIs: ${N.relatedDois.map((O)=>`${O.doi} (${O.relationType})`).join(", ")}`),X.relatedDois=N.relatedDois}}}catch(A){V.fail("LLM enrichment failed"),console.log(W.gray(` ${P0(A)}`))}}}console.log(),console.log(W.cyan("--- Dataset stats ---"));let G=R("Computing dataset sizes and formats...").start();try{let K=await sv(D),V=PF(K.total_size);X.sizes=[`${V} (${K.file_count} files)`],X.formats=K.extensions,G.succeed(`Sizes: ${V} (${K.file_count} files), Formats: ${K.extensions.join(", ")}`)}catch(K){G.warn("Could not compute dataset stats"),console.log(W.gray(` ${P0(K)}`))}console.log(),console.log(W.cyan("--- Review ---")),console.log(JSON.stringify(X,null,2)),console.log();let H=await gD("Commit to repo and refresh DOI?",F,!0);if(H!=="confirmed"){console.log(W.gray(H==="declined"?"Skipped":"Cancelled"));return}let E=R("Saving enrichment...").start();try{let K=await ov(D,X);if(E.succeed(K.message),K.bidsignore_updated)console.log(W.gray(" .bidsignore updated to include nemar_metadata.json"));if(!J&&Q)try{J=await L5(D)}catch(V){if(process.env.DEBUG)console.error("[debug] DOI info re-fetch:",V)}if(J?.ezid_identifier){let V=R("Refreshing DOI metadata...").start();try{await I2(D,{refresh_metadata:!0}),V.succeed("DOI metadata refreshed")}catch(A){V.warn("Could not refresh DOI metadata"),console.log(W.gray(` ${P0(A)}`))}}else if(Q)console.log(W.yellow(" DOI refresh skipped: could not verify DOI exists. Run 'nemar admin doi update --refresh' manually."))}catch(K){if(K instanceof c)E.fail(K.message);else E.fail("Failed to save enrichment"),console.log(W.gray(` ${P0(K)}`))}});A0.addCommand(w5);var f$=new B0("publish").description("Publication workflow management");f$.command("list").description("List publication requests").option("-s, --status <status>","Filter by status (requested, approving, published, denied)").addHelpText("after",`
178
+ `)),console.log("This will add the following workflows:"),console.log(" 1. BIDS Validation (runs on PRs)"),console.log(" 2. Version Check (ensures version bump on PRs)"),console.log(" 3. PR Merge Handler (creates releases, publishes DOIs)"),console.log();let $=await gD(`Deploy CI workflows to ${D}?`,F);if($!=="confirmed"){console.log(W.gray($==="declined"?"Skipped":"Cancelled"));return}let B=R(`Deploying CI workflows to ${D}...`).start();try{let J=await T$(D);B.succeed("CI workflows deployed"),console.log();for(let Q of J.workflows_deployed)console.log(` ${W.green("[x]")} ${Q}`);console.log()}catch(J){f0(J,B,"Failed to deploy CI workflows",{404:"Dataset not found"})}});A0.addCommand(_2);var w5=new B0("doi").description("DOI management");w5.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(yD,xD).option(hD,bD).action(async(D,F)=>{if(!uD())return;let $=R("Fetching dataset info...").start(),B;try{B=await N1(D),$.succeed(`Found dataset: ${B.name}`)}catch(G){if(G instanceof c){if($.fail(G.message),G.statusCode===404)console.log(W.gray(" Dataset not found"))}else $.fail("Failed to fetch dataset");return}try{let G=await L5(D);if(G.concept_doi){if(console.log(W.yellow(`
179
+ Dataset already has a concept DOI:`)),console.log(` Concept DOI: ${W.cyan(G.concept_doi)}`),G.zenodo_concept_url)console.log(` Zenodo URL: ${G.zenodo_concept_url}`);return}}catch(G){if(process.env.DEBUG)console.error("[debug] DOI info fetch:",G)}if(console.log(),console.log(W.cyan("Dataset Information:")),console.log(` ID: ${B.dataset_id}`),console.log(` Name: ${B.name}`),B.github_repo)console.log(` GitHub: ${B.github_repo}`);if(F.sandbox)console.log(` Mode: ${W.yellow("SANDBOX (test DOI)")}`);console.log();let J=F.provider==="zenodo"?"zenodo":"ezid";if(F.sandbox){if(console.log(W.yellow("\u2501".repeat(60))),console.log(W.yellow.bold(" SANDBOX MODE ENABLED")),console.log(W.yellow("\u2501".repeat(60))),J==="zenodo")console.log(W.yellow(" \u2022 Using Zenodo sandbox (sandbox.zenodo.org)"));else console.log(W.yellow(" \u2022 Using EZID test shoulder (doi:10.5072/FK2)")),console.log(W.yellow(" \u2022 Test DOIs auto-delete after 2 weeks"));console.log(W.yellow(" \u2022 DOI will NOT be indexed by DataCite")),console.log(W.yellow(" \u2022 DOI will NOT resolve in production")),console.log(W.yellow(" \u2022 Use this for testing workflows only")),console.log(W.yellow("\u2501".repeat(60))),console.log()}console.log(W.red("WARNING: DOIs are PERMANENT and cannot be deleted!")),console.log(W.gray("The DOI will be pre-reserved but not published until the first version release.")),console.log(` Provider: ${W.cyan(J.toUpperCase())}`),console.log();let Q=F.sandbox?`Create TEST concept DOI via ${J.toUpperCase()} SANDBOX?`:`Create PERMANENT concept DOI via ${J.toUpperCase()} PRODUCTION?`,X=await gD(Q,F);if(X!=="confirmed"){console.log(W.gray(X==="declined"?"Skipped":"Cancelled"));return}let Y=R(`Creating concept DOI via ${J.toUpperCase()}...`).start();try{let G=await fv(D,{title:F.title,description:F.description,sandbox:F.sandbox,provider:J});Y.succeed("Concept DOI created successfully");let H=R("Applying branch protection...").start();try{let E=await O$(D);if(E.warnings&&E.warnings.length>0){H.warn("Branch protection applied with warnings");for(let K of E.warnings)console.log(W.yellow(` Warning: ${K}`))}else H.succeed("Branch protection applied")}catch(E){if(H.warn("Could not apply branch protection"),E instanceof c){if(console.log(W.gray(` ${E.message}`)),E.statusCode===403)console.log(W.gray(" Check admin credentials and permissions"))}else console.log(W.gray(` ${E instanceof Error?E.message:"Unknown error"}`));console.log(W.gray(" Manual setup: Go to GitHub repo Settings > Branches > Add rule"))}if(console.log(),console.log(W.green("DOI Information:")),console.log(` Concept DOI: ${W.cyan(G.concept_doi)}`),console.log(` Provider: ${G.provider.toUpperCase()}`),G.provider==="ezid")console.log(` DOI URL: ${G.doi_url}`),console.log(` EZID ID: ${G.ezid_identifier}`);else console.log(` Zenodo URL: ${G.zenodo_url}`);if(G.metadata_warning)console.log(W.yellow(` Warning: ${G.metadata_warning}`));if(console.log(),console.log(W.yellow("Next steps:")),console.log(" 1. Set up automatic DOI publishing by running:"),console.log(W.gray(` ${G.setup_command}`)),console.log(" (paste the webhook token when prompted)"),console.log(),console.log(" 2. Update dataset_description.json with DatasetDOI field"),console.log(" 3. Create a PR and merge it to trigger version DOI publication"),console.log(),F.sandbox)console.log(W.gray("Note: This is a sandbox DOI and will not resolve in production."))}catch(G){if(G instanceof c){if(Y.fail(G.message),G.statusCode===403)console.log(W.gray(" This command requires admin privileges"))}else Y.fail("Failed to create concept DOI"),console.log(W.gray(` ${P0(G)}`))}});w5.command("info").description("Get DOI info for a dataset").argument("<dataset-id>","Dataset ID (e.g., nm000104)").action(async(D)=>{if(!uD())return;let F=R("Fetching DOI info...").start();try{let $=await L5(D);if(F.stop(),console.log(),console.log(W.cyan(`DOI Information for ${D}:`)),console.log(` Dataset Name: ${$.name}`),console.log(),$.concept_doi){if(console.log(W.green("Concept DOI:")),console.log(` DOI: ${$.concept_doi}`),console.log(` URL: https://doi.org/${$.concept_doi}`),console.log(` Provider: ${($.doi_provider||"zenodo").toUpperCase()}`),$.doi_provider==="ezid"){if($.ezid_identifier)console.log(` EZID ID: ${$.ezid_identifier}`);if($.ezid_status){let B=$.ezid_status==="public"?W.green:W.yellow;console.log(` Status: ${B($.ezid_status)}`)}}if($.zenodo_concept_url){if(console.log(` Zenodo: ${$.zenodo_concept_url}`),$.zenodo_concept_url.includes("sandbox.zenodo.org"))console.log(),console.log(W.yellow("Mode: SANDBOX (test DOI)")),console.log(W.yellow(" This DOI is not indexed by DataCite and will not resolve in production"))}}else console.log(W.yellow("No concept DOI created yet")),console.log(W.gray(" Use 'nemar admin doi create' to create one"));if(console.log(),$.latest_version_doi){if(console.log(W.green("Latest Version DOI:")),console.log(` DOI: ${$.latest_version_doi}`),console.log(` URL: https://doi.org/${$.latest_version_doi}`),$.zenodo_latest_version_url)console.log(` Zenodo: ${$.zenodo_latest_version_url}`)}else if($.concept_doi)console.log(W.yellow("No version DOI published yet")),console.log(W.gray(" Version DOIs are created automatically on PR merge"))}catch($){if($ instanceof c){if(F.fail($.message),$.statusCode===404)console.log(W.gray(" Dataset not found"));else if($.statusCode===403)console.log(W.gray(" This command requires admin privileges"))}else F.fail("Failed to fetch DOI info")}});w5.command("update").description("Update EZID DOI metadata or status").argument("<dataset-id>","Dataset ID (e.g., nm000104)").option("--make-public","Transition DOI from reserved to public (permanent)").option("--refresh","Refresh metadata from BIDS dataset_description.json").option(yD,xD).option(hD,bD).action(async(D,F)=>{if(!uD())return;if(!F.makePublic&&!F.refresh){console.log(W.yellow("No action specified. Use --make-public and/or --refresh."));return}if(F.makePublic){console.log(W.red("WARNING: Making a DOI public is PERMANENT!")),console.log(W.gray(" The DOI will be findable in DataCite and cannot be reverted.")),console.log();let B=await gD(`Make DOI for ${D} PUBLIC and permanent?`,F);if(B!=="confirmed"){console.log(W.gray(B==="declined"?"Skipped":"Cancelled"));return}}let $=R("Updating DOI...").start();try{let B=await I2(D,{status:F.makePublic?"public":void 0,refresh_metadata:F.refresh});$.succeed("DOI updated successfully"),console.log(),console.log(` EZID ID: ${W.cyan(B.ezid_identifier)}`),console.log(` Status: ${B.status==="public"?W.green(B.status):W.yellow(B.status)}`),console.log(` URL: ${B.doi_url}`)}catch(B){if(B instanceof c){if($.fail(B.message),B.statusCode===400)console.log(W.gray(" DOI update is only supported for EZID-managed DOIs"))}else $.fail("Failed to update DOI"),console.log(W.gray(` ${P0(B)}`))}});w5.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(yD,xD).option(hD,bD).action(async(D,F)=>{if(!uD())return;let $=R("Fetching dataset and existing enrichment...").start(),B;try{B=await N1(D),$.succeed(`Dataset: ${B.name}`)}catch(K){if(K instanceof c)$.fail(K.message);else $.fail("Failed to fetch dataset");return}let J,Q=!1;try{J=await L5(D)}catch(K){if(K instanceof c&&K.statusCode===404);else Q=!0,console.log(W.yellow(` Warning: Could not fetch DOI info: ${P0(K)}`))}if(J?.concept_doi)console.log(` DOI: ${W.cyan(J.concept_doi)}`);let X={version:"1.0"};console.log(),console.log(W.cyan("--- Author ORCIDs ---"));let{updateAuthors:Y}=await OD.prompt([{type:"confirm",name:"updateAuthors",message:"Update author ORCIDs?",default:!1}]);if(Y){let K={},V=!0;while(V){let{authorName:A}=await OD.prompt([{type:"input",name:"authorName",message:'Author name (as in BIDS, e.g., "Shirazi, Yahya"):'}]);if(!A)break;let{orcid:Z}=await OD.prompt([{type:"input",name:"orcid",message:`ORCID for "${A}" (Enter to skip):`,validate:(N)=>{if(!N)return!0;return R$.test(N)||"Invalid ORCID format (XXXX-XXXX-XXXX-XXXX)"}}]),U={};if(Z)U.orcid=Z;let{affiliation:L}=await OD.prompt([{type:"input",name:"affiliation",message:`Affiliation for "${A}" (optional):`}]);if(L)U.affiliation=L;if(U.orcid||U.affiliation)K[A]=U;let{more:M}=await OD.prompt([{type:"confirm",name:"more",message:"Add another author?",default:!0}]);V=M}if(Object.keys(K).length>0)X.authors=K}if(F.llm!==!1){console.log(),console.log(W.cyan("--- Generating enrichment from README ---"));let K=process.env.OPENROUTER_API_KEY;if(!K)console.log(W.yellow(" OPENROUTER_API_KEY not set; skipping LLM enrichment")),console.log(W.gray(" Set it in your environment to enable LLM-based enrichment"));else{let V=R("Analyzing README and dataset metadata...").start();try{let{enrichFromReadme:A}=await Promise.resolve().then(() => (My(),Ly)),Z=B.github_repo;if(!Z)V.warn("No GitHub repository configured for this dataset");else{let U=await Ny(Z,"README");if(!U)V.warn("Could not fetch README from repository");else{let L=await Ny(Z,"dataset_description.json"),M={};if(L)try{M=JSON.parse(L)}catch{console.log(W.yellow(" Warning: Could not parse dataset_description.json; LLM will use README only"))}let N=await A(U,M,K);if(V.succeed("LLM enrichment complete"),N.description)console.log(` Description: ${N.description.slice(0,100)}...`),X.description=N.description;if(N.methodsDescription)X.methodsDescription=N.methodsDescription;if(N.keywords&&N.keywords.length>0)console.log(` Keywords: ${N.keywords.join(", ")}`),X.keywords=N.keywords;if(N.fundingReferences&&N.fundingReferences.length>0)console.log(` Funding: ${N.fundingReferences.map((O)=>`${O.funderName} ${O.awardNumber||""}`).join(", ")}`),X.fundingReferences=N.fundingReferences;if(N.relatedDois&&N.relatedDois.length>0)console.log(` Related DOIs: ${N.relatedDois.map((O)=>`${O.doi} (${O.relationType})`).join(", ")}`),X.relatedDois=N.relatedDois}}}catch(A){V.fail("LLM enrichment failed"),console.log(W.gray(` ${P0(A)}`))}}}console.log(),console.log(W.cyan("--- Dataset stats ---"));let G=R("Computing dataset sizes and formats...").start();try{let K=await sv(D),V=PF(K.total_size);X.sizes=[`${V} (${K.file_count} files)`],X.formats=K.extensions,G.succeed(`Sizes: ${V} (${K.file_count} files), Formats: ${K.extensions.join(", ")}`)}catch(K){G.warn("Could not compute dataset stats"),console.log(W.gray(` ${P0(K)}`))}console.log(),console.log(W.cyan("--- Review ---")),console.log(JSON.stringify(X,null,2)),console.log();let H=await gD("Commit to repo and refresh DOI?",F,!0);if(H!=="confirmed"){console.log(W.gray(H==="declined"?"Skipped":"Cancelled"));return}let E=R("Saving enrichment...").start();try{let K=await ov(D,X);if(E.succeed(K.message),K.bidsignore_updated)console.log(W.gray(" .bidsignore updated to include nemar_metadata.json"));if(!J&&Q)try{J=await L5(D)}catch(V){if(process.env.DEBUG)console.error("[debug] DOI info re-fetch:",V)}if(J?.ezid_identifier){let V=R("Refreshing DOI metadata...").start();try{await I2(D,{refresh_metadata:!0}),V.succeed("DOI metadata refreshed")}catch(A){V.warn("Could not refresh DOI metadata"),console.log(W.gray(` ${P0(A)}`))}}else if(Q)console.log(W.yellow(" DOI refresh skipped: could not verify DOI exists. Run 'nemar admin doi update --refresh' manually."))}catch(K){if(K instanceof c)E.fail(K.message);else E.fail("Failed to save enrichment"),console.log(W.gray(` ${P0(K)}`))}});A0.addCommand(w5);var f$=new B0("publish").description("Publication workflow management");f$.command("list").description("List publication requests").option("-s, --status <status>","Filter by status (requested, approving, published, denied)").addHelpText("after",`
180
180
  Description:
181
181
  List all publication requests from users, with optional filtering by status.
182
182
  Shows dataset ID, status, requesting user, and current progress.
@@ -191,7 +191,7 @@ Examples:
191
191
  $ nemar admin publish list # All requests
192
192
  $ nemar admin publish list --status requested # Pending only
193
193
  $ nemar admin publish list --status approving # In progress
194
- $ nemar admin publish list --status denied # View denied`).action(async(D)=>{if(!mD())return;let F=R("Fetching publication requests...").start();try{let $=await nv(D.status);if(F.stop(),$.requests.length===0){console.log(W.gray(`
194
+ $ nemar admin publish list --status denied # View denied`).action(async(D)=>{if(!uD())return;let F=R("Fetching publication requests...").start();try{let $=await nv(D.status);if(F.stop(),$.requests.length===0){console.log(W.gray(`
195
195
  No publication requests found.
196
196
  `));return}console.log(`
197
197
  ${W.cyan("Publication Requests")} (${$.count})
@@ -211,7 +211,7 @@ Requirements:
211
211
  Examples:
212
212
  $ nemar admin publish deny nm000104 --reason "BIDS validation failing"
213
213
  $ nemar admin publish deny nm000104 -r "Dataset incomplete - missing subjects"
214
- $ nemar admin publish deny nm000104 # Prompts for reason interactively`).action(async(D,F)=>{if(!mD())return;let $=F.reason;if(!$){let{inputReason:Q}=await ID.prompt([{type:"input",name:"inputReason",message:"Reason for denial:"}]);$=Q}if(!$){console.log(W.red("Reason is required"));return}let B=await gD(`Deny publication of ${D}?`,F);if(B!=="confirmed"){console.log(W.gray(B==="declined"?"Skipped":"Cancelled"));return}let J=R(`Denying publication for ${D}...`).start();try{await iv(D,$),J.succeed(`Publication denied for ${D}`),console.log(W.gray(" User has been notified."))}catch(Q){f0(Q,J,"Failed to deny publication")}});f$.command("approve").description("Approve and publish a dataset (runs orchestrator)").argument("<dataset-id>","Dataset ID").option("--resume","Resume from last failed step").option("--sandbox","Use Zenodo sandbox for testing").option(yD,xD).option(hD,bD).addHelpText("after",`
214
+ $ nemar admin publish deny nm000104 # Prompts for reason interactively`).action(async(D,F)=>{if(!uD())return;let $=F.reason;if(!$){let{inputReason:Q}=await OD.prompt([{type:"input",name:"inputReason",message:"Reason for denial:"}]);$=Q}if(!$){console.log(W.red("Reason is required"));return}let B=await gD(`Deny publication of ${D}?`,F);if(B!=="confirmed"){console.log(W.gray(B==="declined"?"Skipped":"Cancelled"));return}let J=R(`Denying publication for ${D}...`).start();try{await iv(D,$),J.succeed(`Publication denied for ${D}`),console.log(W.gray(" User has been notified."))}catch(Q){f0(Q,J,"Failed to deny publication")}});f$.command("approve").description("Approve and publish a dataset (runs orchestrator)").argument("<dataset-id>","Dataset ID").option("--resume","Resume from last failed step").option("--sandbox","Use Zenodo sandbox for testing").option(yD,xD).option(hD,bD).addHelpText("after",`
215
215
  Description:
216
216
  Approve a publication request and run the automated 14-step orchestrator
217
217
  to make the dataset publicly accessible with a permanent DOI.
@@ -251,13 +251,13 @@ After Approval:
251
251
  - User receives email with DOI and public dataset link
252
252
  - Dataset is publicly visible on GitHub
253
253
  - Tags are protected (prevents version manipulation)
254
- - Data is protected by S3 Object Lock`).action(async(D,F)=>{if(!mD())return;let $=F.resume?`Resume publication of ${D}`:`Approve and publish ${D}`;if(console.log(W.cyan(`
254
+ - Data is protected by S3 Object Lock`).action(async(D,F)=>{if(!uD())return;let $=F.resume?`Resume publication of ${D}`:`Approve and publish ${D}`;if(console.log(W.cyan(`
255
255
  ${$}
256
- `)),console.log("This will run the following 14-step orchestrator:"),console.log(" 1. Check CI 7. Update README"),console.log(" 2. Make repo public 8. Create version tag"),console.log(" 3. S3 public read 9. Create GitHub release"),console.log(" 4. Tag protection 10. Upload to Zenodo"),console.log(F.sandbox?" 5. Create DOI (SANDBOX) 11. Publish DOI (irreversible)":" 5. Create DOI 11. Publish DOI (irreversible)"),console.log(" 6. Update metadata 12. S3 Object Lock"),console.log(" 13. Generate archive"),console.log(" 14. Notify user"),console.log(),F.sandbox)console.log(W.yellow("\u2501".repeat(60))),console.log(W.yellow.bold(" SANDBOX MODE ENABLED")),console.log(W.yellow("\u2501".repeat(60))),console.log(W.yellow(" \u2022 DOI will be created on sandbox.zenodo.org")),console.log(W.yellow(" \u2022 DOI will NOT be indexed by DataCite")),console.log(W.yellow(" \u2022 DOI will NOT resolve in production")),console.log(W.yellow(" \u2022 Use this for testing workflows only")),console.log(W.yellow("\u2501".repeat(60))),console.log();let B=await gD(`${$}?`,F);if(B!=="confirmed"){console.log(W.gray(B==="declined"?"Skipped":"Cancelled"));return}let J=R("Running publication workflow...").start();try{let Q=await av(D,!!F.resume,!!F.sandbox);if(J.succeed(Q.message),Q.steps_completed){console.log();for(let X of Q.steps_completed)console.log(` ${W.green("[x]")} ${X.replace(/_/g," ")}`);console.log()}}catch(Q){f0(Q,J,"Failed to approve publication",{422:"Fix the CI issues and retry with --resume"})}});A0.addCommand(f$);A0.command("revert").description("Revert a dataset to a previous version (creates PR for review)").argument("<dataset-id>","Dataset ID (e.g., nm000104)").argument("[version]","Target version to revert to (e.g., 1.0.0)").option("--list","List available versions without reverting").option("--force","Direct push to main without PR (emergency only)").option("--message <msg>","Custom revert commit message").option("--dir <path>","Use existing local clone instead of cloning fresh").option(yD,xD).option(hD,bD).action(async(D,F,$)=>{if(!mD())return;let B=await C5();if(!B.allPassed){console.log(W.red("Error: Missing prerequisites"));for(let T of B.errors)console.log(W.gray(` - ${T}`));return}let J,Q=!0;if($.dir){if(!SGD($.dir)){console.log(W.red(`Error: Directory not found: ${$.dir}`));return}J=$.dir,Q=!1}else J=kGD(process.cwd(),`${D}-revert-${Date.now()}`);let X=R("Fetching dataset info...").start(),Y;try{Y=await N1(D),X.succeed(`Found dataset: ${Y.name}`)}catch(T){if(T instanceof c){if(X.fail(T.message),T.statusCode===404)console.log(W.gray(" Dataset not found"))}else X.fail("Failed to fetch dataset");return}if(!Y.github_repo){console.log(W.red("Error: Dataset has no GitHub repository"));return}if(Q){let T=R(`Cloning ${D}...`).start(),P=`https://github.com/${Y.github_repo}.git`,QD=await R5(P,J);if(!QD.success){T.fail(`Clone failed: ${QD.error}`);return}T.succeed(`Cloned to ${J}`)}let G=await Wy(J);if(G.length===0){console.log(W.yellow("No versions found for this dataset")),console.log(W.gray(" Dataset may not have any tagged releases yet"));return}if($.list){console.log(`
256
+ `)),console.log("This will run the following 14-step orchestrator:"),console.log(" 1. Check CI 7. Update README"),console.log(" 2. Make repo public 8. Create version tag"),console.log(" 3. S3 public read 9. Create GitHub release"),console.log(" 4. Tag protection 10. Upload to Zenodo"),console.log(F.sandbox?" 5. Create DOI (SANDBOX) 11. Publish DOI (irreversible)":" 5. Create DOI 11. Publish DOI (irreversible)"),console.log(" 6. Update metadata 12. S3 Object Lock"),console.log(" 13. Generate archive"),console.log(" 14. Notify user"),console.log(),F.sandbox)console.log(W.yellow("\u2501".repeat(60))),console.log(W.yellow.bold(" SANDBOX MODE ENABLED")),console.log(W.yellow("\u2501".repeat(60))),console.log(W.yellow(" \u2022 DOI will be created on sandbox.zenodo.org")),console.log(W.yellow(" \u2022 DOI will NOT be indexed by DataCite")),console.log(W.yellow(" \u2022 DOI will NOT resolve in production")),console.log(W.yellow(" \u2022 Use this for testing workflows only")),console.log(W.yellow("\u2501".repeat(60))),console.log();let B=await gD(`${$}?`,F);if(B!=="confirmed"){console.log(W.gray(B==="declined"?"Skipped":"Cancelled"));return}let J=R("Running publication workflow...").start();try{let Q=await av(D,!!F.resume,!!F.sandbox);if(J.succeed(Q.message),Q.steps_completed){console.log();for(let X of Q.steps_completed)console.log(` ${W.green("[x]")} ${X.replace(/_/g," ")}`);console.log()}}catch(Q){f0(Q,J,"Failed to approve publication",{422:"Fix the CI issues and retry with --resume"})}});A0.addCommand(f$);A0.command("revert").description("Revert a dataset to a previous version (creates PR for review)").argument("<dataset-id>","Dataset ID (e.g., nm000104)").argument("[version]","Target version to revert to (e.g., 1.0.0)").option("--list","List available versions without reverting").option("--force","Direct push to main without PR (emergency only)").option("--message <msg>","Custom revert commit message").option("--dir <path>","Use existing local clone instead of cloning fresh").option(yD,xD).option(hD,bD).action(async(D,F,$)=>{if(!uD())return;let B=await C5();if(!B.allPassed){console.log(W.red("Error: Missing prerequisites"));for(let T of B.errors)console.log(W.gray(` - ${T}`));return}let J,Q=!0;if($.dir){if(!SGD($.dir)){console.log(W.red(`Error: Directory not found: ${$.dir}`));return}J=$.dir,Q=!1}else J=kGD(process.cwd(),`${D}-revert-${Date.now()}`);let X=R("Fetching dataset info...").start(),Y;try{Y=await N1(D),X.succeed(`Found dataset: ${Y.name}`)}catch(T){if(T instanceof c){if(X.fail(T.message),T.statusCode===404)console.log(W.gray(" Dataset not found"))}else X.fail("Failed to fetch dataset");return}if(!Y.github_repo){console.log(W.red("Error: Dataset has no GitHub repository"));return}if(Q){let T=R(`Cloning ${D}...`).start(),P=`https://github.com/${Y.github_repo}.git`,QD=await R5(P,J);if(!QD.success){T.fail(`Clone failed: ${QD.error}`);return}T.succeed(`Cloned to ${J}`)}let G=await Wy(J);if(G.length===0){console.log(W.yellow("No versions found for this dataset")),console.log(W.gray(" Dataset may not have any tagged releases yet"));return}if($.list){console.log(`
257
257
  ${W.cyan("Available Versions:")}
258
258
  `);for(let T of G)console.log(` ${W.green(T.version)} ${W.gray(T.date)} ${W.gray(T.commit)}`);return}let H=F;if(!H){console.log(`
259
259
  ${W.cyan("Available Versions:")}
260
- `);for(let P of G)console.log(` ${W.green(P.version)} ${W.gray(P.date)}`);console.log();let{version:T}=await ID.prompt([{type:"list",name:"version",message:"Select version to revert to:",choices:G.map((P)=>({name:`${P.version} (${P.date})`,value:P.version}))}]);H=T}let E=await Ey(J,H);if(!E){console.log(W.red(`Error: Version ${H} not found`)),console.log(W.gray(" Use --list to see available versions"));return}if(console.log(),console.log(W.yellow("Revert Summary:")),console.log(` Dataset: ${W.cyan(D)}`),console.log(` Target version: ${W.green(H)}`),console.log(` Commit: ${W.gray(E)}`),$.force)console.log(` Mode: ${W.red("DIRECT PUSH (--force)")}`);else console.log(` Mode: ${W.green("Pull Request")}`);if(console.log(),$.force)console.log(W.red("WARNING: --force will push directly to main without PR review!")),console.log(W.red("This should only be used in emergencies.")),console.log();let K=$.force?`Directly push revert to ${H}?`:`Create PR to revert to ${H}?`,V=await gD(K,$);if(V!=="confirmed"){console.log(W.gray(V==="declined"?"Skipped":"Cancelled"));return}let A=`revert-to-${H.replace(/\./g,"-")}-${Date.now()}`,Z=R("Creating revert branch...").start(),U=await qy(J,H,A);if(!U.success){Z.fail(`Failed to create branch: ${U.error}`);return}Z.succeed(`Created branch: ${A}`);let L=R("Committing revert...").start(),M=$.message||`Revert to version ${H}`,N=await Ky(J,H,M);if(!N.success){L.fail(`Failed to commit: ${N.error}`);return}L.succeed("Committed revert changes");let O=R("Pushing branch...").start(),b=await zy(J,A);if(!b.success){O.fail(`Failed to push: ${b.error}`);return}if(O.succeed("Pushed branch to GitHub"),!$.force){let T=R("Creating pull request...").start();try{let{spawn:P}=await import("child_process"),QD=`Revert to version ${H}`,fD=`## Revert Request
260
+ `);for(let P of G)console.log(` ${W.green(P.version)} ${W.gray(P.date)}`);console.log();let{version:T}=await OD.prompt([{type:"list",name:"version",message:"Select version to revert to:",choices:G.map((P)=>({name:`${P.version} (${P.date})`,value:P.version}))}]);H=T}let E=await Ey(J,H);if(!E){console.log(W.red(`Error: Version ${H} not found`)),console.log(W.gray(" Use --list to see available versions"));return}if(console.log(),console.log(W.yellow("Revert Summary:")),console.log(` Dataset: ${W.cyan(D)}`),console.log(` Target version: ${W.green(H)}`),console.log(` Commit: ${W.gray(E)}`),$.force)console.log(` Mode: ${W.red("DIRECT PUSH (--force)")}`);else console.log(` Mode: ${W.green("Pull Request")}`);if(console.log(),$.force)console.log(W.red("WARNING: --force will push directly to main without PR review!")),console.log(W.red("This should only be used in emergencies.")),console.log();let K=$.force?`Directly push revert to ${H}?`:`Create PR to revert to ${H}?`,V=await gD(K,$);if(V!=="confirmed"){console.log(W.gray(V==="declined"?"Skipped":"Cancelled"));return}let A=`revert-to-${H.replace(/\./g,"-")}-${Date.now()}`,Z=R("Creating revert branch...").start(),U=await qy(J,H,A);if(!U.success){Z.fail(`Failed to create branch: ${U.error}`);return}Z.succeed(`Created branch: ${A}`);let L=R("Committing revert...").start(),M=$.message||`Revert to version ${H}`,N=await Ky(J,H,M);if(!N.success){L.fail(`Failed to commit: ${N.error}`);return}L.succeed("Committed revert changes");let O=R("Pushing branch...").start(),b=await zy(J,A);if(!b.success){O.fail(`Failed to push: ${b.error}`);return}if(O.succeed("Pushed branch to GitHub"),!$.force){let T=R("Creating pull request...").start();try{let{spawn:P}=await import("child_process"),QD=`Revert to version ${H}`,fD=`## Revert Request
261
261
 
262
262
  This PR reverts the dataset to version ${H}.
263
263
 
@@ -294,16 +294,16 @@ Examples:
294
294
 
295
295
  This will prompt for confirmation by requiring you to type
296
296
  the dataset ID to confirm the permanent action.
297
- `).action(async(D)=>{if(!mD())return;let F=D.trim(),$;try{$=await N1(F)}catch(Q){if(Q instanceof c&&Q.statusCode===404)console.error(W.red(`Dataset '${F}' not found`));else console.error(W.red(`Failed to fetch dataset: ${Q instanceof Error?Q.message:String(Q)}`));process.exit(1)}if(console.log(W.yellow(`
297
+ `).action(async(D)=>{if(!uD())return;let F=D.trim(),$;try{$=await N1(F)}catch(Q){if(Q instanceof c&&Q.statusCode===404)console.error(W.red(`Dataset '${F}' not found`));else console.error(W.red(`Failed to fetch dataset: ${Q instanceof Error?Q.message:String(Q)}`));process.exit(1)}if(console.log(W.yellow(`
298
298
  \u26A0\uFE0F WARNING: Publishing is PERMANENT and IRREVERSIBLE
299
299
  `)),console.log("This will:"),console.log(" 1. Make the GitHub repository PUBLIC"),console.log(" 2. Allow public S3 access to all dataset files"),console.log(` 3. Update git-annex configuration for web access
300
- `),console.log(`Dataset: ${W.cyan($.dataset_id)} - ${$.name}`),$.owner_username)console.log(`Owner: ${$.owner_username}`);if($.github_repo)console.log(`Repository: ${$.github_repo}`);if(console.log(),(await ID.prompt([{type:"input",name:"datasetId",message:`Type '${F}' to confirm:`,validate:(Q)=>{if(Q.trim()===F)return!0;return`Please type exactly '${F}' to confirm`}}])).datasetId!==F)console.log(W.gray("Cancelled.")),process.exit(0);let J=R("Publishing dataset...").start();try{let Q=await Iv(F);J.succeed(W.green("Dataset published successfully")),console.log(`
300
+ `),console.log(`Dataset: ${W.cyan($.dataset_id)} - ${$.name}`),$.owner_username)console.log(`Owner: ${$.owner_username}`);if($.github_repo)console.log(`Repository: ${$.github_repo}`);if(console.log(),(await OD.prompt([{type:"input",name:"datasetId",message:`Type '${F}' to confirm:`,validate:(Q)=>{if(Q.trim()===F)return!0;return`Please type exactly '${F}' to confirm`}}])).datasetId!==F)console.log(W.gray("Cancelled.")),process.exit(0);let J=R("Publishing dataset...").start();try{let Q=await Iv(F);J.succeed(W.green("Dataset published successfully")),console.log(`
301
301
  GitHub: ${W.cyan(Q.github_url)}`),console.log(`S3: ${W.cyan(Q.s3_url)}`)}catch(Q){if(J.fail(W.red("Failed to publish dataset")),Q instanceof c){if(console.error(W.red(`
302
302
  ${Q.message}`)),Q.details)console.error(W.gray(JSON.stringify(Q.details,null,2)));if(Q.statusCode===403)console.log(W.gray(" You must be the dataset owner or an admin to publish"));else if(Q.statusCode===400&&Q.message.includes("sandbox"))console.log(W.gray(" Sandbox datasets cannot be published"))}else console.error(W.red(`
303
- ${Q instanceof Error?Q.message:String(Q)}`));process.exit(1)}});A0.command("delete-dataset").description("Delete a dataset and all associated resources (GitHub, S3, D1)").argument("<dataset-id>","Dataset ID (e.g., nm000108)").option("--force","Force deletion of published datasets with DOIs (owner only)").action(async(D,F)=>{if(!jD())console.log(W.red("Not authenticated. Run: nemar auth login")),process.exit(1);let $=R("Looking up dataset...").start();try{let B=await N1(D);if($.stop(),console.log(W.bold(`
304
- Dataset: ${B.dataset_id}`)),console.log(` Name: ${B.name||"(unnamed)"}`),console.log(` Visibility: ${B.visibility}`),B.concept_doi)console.log(` DOI: ${B.concept_doi}`);if(B.concept_doi){if(console.log(W.yellow(`
305
- WARNING: This dataset has a DOI. Only the NEMAR owner can delete it.`)),!F.force)console.log(W.gray(" Use --force to confirm deletion of published datasets.")),process.exit(1)}let{proceed:J}=await ID.prompt([{type:"confirm",name:"proceed",message:W.red(`Delete dataset ${D}? This will remove the GitHub repo, S3 data, and all database records. This cannot be undone.`),default:!1}]);if(!J){console.log(W.gray("Cancelled."));return}$.start("Deleting dataset...");let Q=await tv(D,F.force??!1);if($.succeed("Dataset deleted"),console.log(W.bold(`
306
- Deletion summary:`)),console.log(` GitHub repo: ${Q.steps.github.success?W.green("deleted"):W.red("failed")}`),Q.steps.s3.skipped)console.log(` S3 objects: ${W.yellow("skipped (published dataset)")}`);else console.log(` S3 objects: ${W.green(`${Q.steps.s3.deleted} deleted`)}${Q.steps.s3.failed.length>0?W.red(`, ${Q.steps.s3.failed.length} failed`):""}`);if(console.log(` Database: ${Q.steps.d1.success?W.green("cleaned up"):W.red("failed")}`),Q.steps.d1.versionsDeleted>0)console.log(W.gray(` ${Q.steps.d1.versionsDeleted} version records removed`));if(Q.steps.d1.pubRequestsDeleted>0)console.log(W.gray(` ${Q.steps.d1.pubRequestsDeleted} publication requests removed`));if(Q.warnings.length>0){console.log(W.yellow(`
303
+ ${Q instanceof Error?Q.message:String(Q)}`));process.exit(1)}});A0.command("delete-dataset").description("Delete a dataset and all associated resources (GitHub, S3, D1)").argument("<dataset-id>","Dataset ID (e.g., nm000108)").option("--force","Force deletion of published datasets with DOIs (owner only)").action(async(D,F)=>{if(!uD())return;let $=R("Looking up dataset...").start();try{let B=await N1(D);if($.stop(),console.log(W.bold(`
304
+ Dataset: ${B.dataset_id}`)),console.log(` Name: ${B.name||"(unnamed)"}`),console.log(` Visibility: ${B.visibility}`),B.concept_doi){if(console.log(` DOI: ${B.concept_doi}`),console.log(W.yellow(`
305
+ WARNING: This dataset has a DOI. Only the NEMAR owner can delete it.`)),!F.force)console.log(W.gray(" Use --force to confirm deletion of published datasets.")),process.exit(1)}let{proceed:J}=await OD.prompt([{type:"confirm",name:"proceed",message:W.red(`Delete dataset ${D}? This will remove the GitHub repo, S3 data, and all database records. This cannot be undone.`),default:!1}]);if(!J){console.log(W.gray("Cancelled."));return}$.start("Deleting dataset...");let Q=await tv(D,F.force??!1);if(!Q.deleted)$.fail("Dataset deletion incomplete");else if(Q.warnings.length>0)$.warn("Dataset deleted with warnings");else $.succeed("Dataset deleted");if(console.log(W.bold(`
306
+ Deletion summary:`)),console.log(` GitHub repo: ${Q.steps.github.success?W.green("deleted"):W.red("failed")}`),Q.steps.s3.skipped)console.log(` S3 objects: ${W.yellow("skipped (published dataset)")}`);else{let X=W.green(`${Q.steps.s3.deleted} deleted`);if(Q.steps.s3.failed.length>0)X+=W.red(`, ${Q.steps.s3.failed.length} failed`);console.log(` S3 objects: ${X}`)}if(console.log(` Database: ${Q.steps.d1.success?W.green("cleaned up"):W.red("failed")}`),Q.steps.d1.versionsDeleted>0)console.log(W.gray(` ${Q.steps.d1.versionsDeleted} version records removed`));if(Q.steps.d1.pubRequestsDeleted>0)console.log(W.gray(` ${Q.steps.d1.pubRequestsDeleted} publication requests removed`));if(Q.warnings.length>0){console.log(W.yellow(`
307
307
  Warnings:`));for(let X of Q.warnings)console.log(W.yellow(` - ${X}`))}}catch(B){f0(B,$,"Failed to delete dataset",{403:"Published datasets can only be deleted by the NEMAR owner",404:"Dataset not found",409:"Cannot delete dataset with active publication requests"}),process.exit(1)}});import{appendFileSync as vGD,existsSync as H6,mkdirSync as Ry,readFileSync as h$,writeFileSync as yGD}from"fs";import{homedir as xGD}from"os";import{join as g$}from"path";var{spawn:wy}=globalThis.Bun;function a6(){let D=g$(xGD(),".ssh");return{sshDir:D,privateKey:g$(D,"nemar_ed25519"),publicKey:g$(D,"nemar_ed25519.pub"),configFile:g$(D,"config")}}function Ty(){let D=a6();return H6(D.privateKey)&&H6(D.publicKey)}async function jy(D){let F=a6();if(!H6(F.sshDir))try{Ry(F.sshDir,{mode:448})}catch($){return{success:!1,error:`Cannot create ~/.ssh directory: ${$.message}`}}if(H6(F.privateKey))try{return{success:!0,publicKey:h$(F.publicKey,"utf-8").trim()}}catch($){return{success:!1,error:`NEMAR SSH key exists but cannot read public key: ${$.message}`}}try{let $=wy({cmd:["ssh-keygen","-t","ed25519","-f",F.privateKey,"-N","","-C",`nemar-cli-${D}`],stdout:"pipe",stderr:"pipe"}),B=await new Response($.stderr).text();if(await $.exited!==0)return{success:!1,error:`ssh-keygen failed: ${B}`};return{success:!0,publicKey:h$(F.publicKey,"utf-8").trim()}}catch($){return{success:!1,error:`Failed to generate SSH key: ${$.message}`}}}function Oy(){let D=a6();if(!H6(D.publicKey))return null;try{return h$(D.publicKey,"utf-8").trim()}catch{return null}}function _GD(){let D=a6();if(!H6(D.configFile))return!1;try{let F=h$(D.configFile,"utf-8");return F.includes("IdentityFile ~/.ssh/nemar_ed25519")||F.includes(`IdentityFile ${D.privateKey}`)}catch{return!1}}function Iy(){let D=a6();if(!H6(D.sshDir))try{Ry(D.sshDir,{mode:448})}catch($){return{success:!1,error:`Cannot create ~/.ssh directory: ${$.message}`}}if(_GD())return{success:!0};let F=`
308
308
  # NEMAR CLI SSH key (auto-generated)
309
309
  Host github.com
@@ -328,7 +328,7 @@ Examples:
328
328
  $ nemar auth login -k <api-key> # Login with API key
329
329
  $ nemar auth status --refresh # Check authentication status
330
330
  $ nemar auth whoami # Alias for status
331
- $ nemar auth logout # Clear credentials`);async function g2(D){if(jD()){let B=F0();if(console.log(W.yellow(`Already logged in as ${B.username||"unknown"}`)),await gD("Do you want to log in with a different account?",D)!=="confirmed")return}let F=D.key||process.env.NEMAR_API_KEY;if(!F)F=(await ID.prompt([{type:"password",name:"apiKey",message:"Enter your API key:",mask:"*",validate:(J)=>{if(!J||J.length<32)return"Please enter a valid API key";return!0}}])).apiKey;if(!F){console.log(W.red("No API key provided"));return}let $=R("Validating API key...").start();try{let B=await Nv(F);if(!B.valid){$.fail("Invalid API key");return}if(V0("apiKey",F),V0("username",B.user.username),V0("email",B.user.email),V0("githubUsername",B.user.github_username),V0("sandboxCompleted",B.user.sandbox_completed),B.user.sandbox_dataset_id)V0("sandboxDatasetId",B.user.sandbox_dataset_id);if($.succeed("Login successful"),console.log(),console.log(` Welcome back, ${W.cyan(B.user.username)}!`),B.user.role==="owner")console.log(` ${W.red("Owner access enabled")}`);else if(B.user.role==="admin")console.log(` ${W.magenta("Admin access enabled")}`);if(!B.user.sandbox_completed)console.log(),console.log(W.yellow(" Note: Sandbox training required before uploading datasets")),console.log(W.gray(" Run 'nemar sandbox' to complete training"))}catch(B){if(B instanceof c){if($.fail(B.message),B.statusCode===401)console.log(W.gray(" Check that your API key is correct"));else if(B.statusCode===403)console.log(W.gray(" Your account may not be approved yet"))}else $.fail("Connection failed"),console.log(W.gray(" Check your internet connection"))}}V8.command("login").description("Authenticate with your NEMAR API key").option("-k, --key <key>","API key (alternative: set NEMAR_API_KEY env var)").option(yD,xD).option(hD,bD).addHelpText("after",`
331
+ $ nemar auth logout # Clear credentials`);async function g2(D){if(SD()){let B=F0();if(console.log(W.yellow(`Already logged in as ${B.username||"unknown"}`)),await gD("Do you want to log in with a different account?",D)!=="confirmed")return}let F=D.key||process.env.NEMAR_API_KEY;if(!F)F=(await OD.prompt([{type:"password",name:"apiKey",message:"Enter your API key:",mask:"*",validate:(J)=>{if(!J||J.length<32)return"Please enter a valid API key";return!0}}])).apiKey;if(!F){console.log(W.red("No API key provided"));return}let $=R("Validating API key...").start();try{let B=await Nv(F);if(!B.valid){$.fail("Invalid API key");return}if(V0("apiKey",F),V0("username",B.user.username),V0("email",B.user.email),V0("githubUsername",B.user.github_username),V0("sandboxCompleted",B.user.sandbox_completed),B.user.sandbox_dataset_id)V0("sandboxDatasetId",B.user.sandbox_dataset_id);if($.succeed("Login successful"),console.log(),console.log(` Welcome back, ${W.cyan(B.user.username)}!`),B.user.role==="owner")console.log(` ${W.red("Owner access enabled")}`);else if(B.user.role==="admin")console.log(` ${W.magenta("Admin access enabled")}`);if(!B.user.sandbox_completed)console.log(),console.log(W.yellow(" Note: Sandbox training required before uploading datasets")),console.log(W.gray(" Run 'nemar sandbox' to complete training"))}catch(B){if(B instanceof c){if($.fail(B.message),B.statusCode===401)console.log(W.gray(" Check that your API key is correct"));else if(B.statusCode===403)console.log(W.gray(" Your account may not be approved yet"))}else $.fail("Connection failed"),console.log(W.gray(" Check your internet connection"))}}V8.command("login").description("Authenticate with your NEMAR API key").option("-k, --key <key>","API key (alternative: set NEMAR_API_KEY env var)").option(yD,xD).option(hD,bD).addHelpText("after",`
332
332
  Environment Variables:
333
333
  NEMAR_API_KEY Your API key (alternative to -k flag)
334
334
 
@@ -336,7 +336,7 @@ Examples:
336
336
  $ nemar auth login # Interactive prompt
337
337
  $ nemar auth login -k nemar_abc123... # Provide key directly
338
338
  $ NEMAR_API_KEY=nemar_abc... nemar auth login`).action(g2);async function b$(){console.log(W.cyan("NEMAR Account Registration")),console.log(W.gray(`Create an account to upload and manage datasets
339
- `));let D=await ID.prompt([{type:"input",name:"username",message:"Choose a username:",validate:async($)=>{if(!$||$.length<3)return"Username must be at least 3 characters";if($.length>30)return"Username must be at most 30 characters";if(!/^[a-zA-Z0-9_-]+$/.test($))return"Username can only contain letters, numbers, underscores, and hyphens";try{let B=await Uv($);if(!B.available)return B.reason||`Username "${$}" is already taken`}catch(B){if(B instanceof c&&B.statusCode===0)return!0;return!0}return!0}},{type:"input",name:"email",message:"Email address:",validate:($)=>{if(!$||!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test($))return"Please enter a valid email address";return!0}},{type:"password",name:"password",message:"Password (min 12 characters):",mask:"*",validate:($)=>{if(!$||$.length<12)return"Password must be at least 12 characters";if($.length>128)return"Password must be at most 128 characters";return!0}},{type:"password",name:"confirmPassword",message:"Confirm password:",mask:"*",validate:($,B)=>{if($!==B?.password)return"Passwords do not match";return!0}},{type:"input",name:"github_username",message:"GitHub username (for PR collaboration):",validate:async($)=>{if(!$||$.length<1)return"GitHub username is required for PR collaboration";if($.length>39)return"GitHub username is too long";try{if(!(await Lv($)).valid)return`GitHub user "${$}" not found. Please check the username.`}catch(B){if(B instanceof c&&B.statusCode===0)return!0;return!0}return!0}},{type:"input",name:"orcid",message:"ORCID iD (optional, e.g. 0000-0002-1825-0097):",validate:($)=>{if(!$||$.trim()==="")return!0;if(!/^\d{4}-\d{4}-\d{4}-\d{3}[\dX]$/.test($.trim()))return"ORCID must be in format 0000-0000-0000-000X";return!0}},{type:"input",name:"description",message:"Why do you need access to NEMAR? (1-2 sentences):",validate:($)=>{let B=$?.trim();if(!B||B.length<20)return"Please provide at least 20 characters describing why you need NEMAR access";if(B.length>500)return"Description must be at most 500 characters";return!0}}]),F=R("Creating account...").start();try{let $=await Mv({username:D.username,email:D.email,password:D.password,github_username:D.github_username,description:D.description.trim(),orcid:D.orcid?.trim()||void 0});F.succeed("Account created"),console.log(),console.log(W.green("Registration successful!")),console.log(),console.log("Next steps:"),$.next_steps.forEach((B,J)=>{console.log(` ${J+1}. ${B}`)}),console.log(),console.log(W.gray("Once approved, use 'nemar auth login' with your API key"))}catch($){if($ instanceof c){if(F.fail($.message),$.details&&Array.isArray($.details))$.details.forEach((B)=>{console.log(W.gray(` - ${B}`))});if($.message.includes("already taken"))console.log(W.gray(" Try a different username"));else if($.message.includes("already registered"))console.log(W.gray(" Use 'nemar auth resend-verification' if you need a new verification link"))}else F.fail("Registration failed"),console.log(W.gray(` ${$ instanceof Error?$.message:"Unknown error"}`))}}V8.command("signup").description("Register for a new NEMAR account").action(b$);async function u$(D){let F=jD(),$=F0();if(!F){console.log(W.yellow("Not authenticated")),console.log(),console.log(" Run 'nemar auth login' to authenticate"),console.log(" Run 'nemar auth signup' to create an account");return}let B;if(D.refresh){let J=R("Fetching user info...").start();try{let Q=await w$();V0("username",Q.username),V0("email",Q.email),V0("githubUsername",Q.github_username),B=Q.role,J.stop()}catch(Q){if(J.fail("Could not refresh user info"),Q instanceof c&&Q.statusCode===401)console.log(W.gray(" Your session may have expired. Try logging in again."))}}if(console.log(W.green("Authenticated")),console.log(),$.username)console.log(` Username: ${W.cyan($.username)}`);if($.email)console.log(` Email: ${$.email}`);if($.githubUsername)console.log(` GitHub: @${$.githubUsername}`);if(B){let J=B==="owner"?W.red("Owner"):B==="admin"?W.magenta("Admin"):W.white("Member");console.log(` Role: ${J}`)}console.log(` Config: ${W.gray(Av())}`)}V8.command("status").description("Check current authentication status").option("--refresh","Refresh user info from server").action(u$);V8.command("whoami").description("Show current user (alias for status)").option("--refresh","Refresh user info from server").action(u$);async function h2(D){if(!jD()){console.log(W.yellow("Not currently authenticated"));return}let F=F0();if(await gD(`Log out ${F.username||"current user"}?`,D)!=="confirmed")return;Vv(),console.log(W.green("Logged out successfully"))}V8.command("logout").description("Clear stored credentials").option(yD,xD).option(hD,bD).action(h2);V8.command("resend-verification").description("Resend email verification link").action(async()=>{let{email:D}=await ID.prompt([{type:"input",name:"email",message:"Enter your email address:",validate:($)=>{if(!$||!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test($))return"Please enter a valid email address";return!0}}]),F=R("Sending verification email...").start();try{let $=await Cv(D);F.succeed($.message)}catch($){if($ instanceof c){if(F.fail($.message),$.statusCode===0)console.log(W.gray(" Check your internet connection"))}else F.fail(`Failed to send verification email: ${$ instanceof Error?$.message:"Unknown error"}`),console.log(W.gray(" Check your internet connection"))}});async function fGD(D){if(!jD()){console.log(W.yellow("Not authenticated")),console.log(),console.log(" Run 'nemar auth login' first to authenticate");return}let F=F0();if(!D.force){let G=R("Checking existing SSH access...").start(),H=await f2();if(H.success){if(G.succeed("SSH access to GitHub already configured"),H.username)console.log(` GitHub user: ${W.cyan(H.username)}`);console.log(),console.log(W.gray("Use --force to regenerate SSH key anyway"));return}G.info("SSH access to GitHub not configured")}console.log(),console.log(W.cyan("Setting up SSH access for GitHub")),console.log(W.gray(`This will generate a dedicated SSH key for NEMAR uploads
339
+ `));let D=await OD.prompt([{type:"input",name:"username",message:"Choose a username:",validate:async($)=>{if(!$||$.length<3)return"Username must be at least 3 characters";if($.length>30)return"Username must be at most 30 characters";if(!/^[a-zA-Z0-9_-]+$/.test($))return"Username can only contain letters, numbers, underscores, and hyphens";try{let B=await Uv($);if(!B.available)return B.reason||`Username "${$}" is already taken`}catch(B){if(B instanceof c&&B.statusCode===0)return!0;return!0}return!0}},{type:"input",name:"email",message:"Email address:",validate:($)=>{if(!$||!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test($))return"Please enter a valid email address";return!0}},{type:"password",name:"password",message:"Password (min 12 characters):",mask:"*",validate:($)=>{if(!$||$.length<12)return"Password must be at least 12 characters";if($.length>128)return"Password must be at most 128 characters";return!0}},{type:"password",name:"confirmPassword",message:"Confirm password:",mask:"*",validate:($,B)=>{if($!==B?.password)return"Passwords do not match";return!0}},{type:"input",name:"github_username",message:"GitHub username (for PR collaboration):",validate:async($)=>{if(!$||$.length<1)return"GitHub username is required for PR collaboration";if($.length>39)return"GitHub username is too long";try{if(!(await Lv($)).valid)return`GitHub user "${$}" not found. Please check the username.`}catch(B){if(B instanceof c&&B.statusCode===0)return!0;return!0}return!0}},{type:"input",name:"orcid",message:"ORCID iD (optional, e.g. 0000-0002-1825-0097):",validate:($)=>{if(!$||$.trim()==="")return!0;if(!/^\d{4}-\d{4}-\d{4}-\d{3}[\dX]$/.test($.trim()))return"ORCID must be in format 0000-0000-0000-000X";return!0}},{type:"input",name:"description",message:"Why do you need access to NEMAR? (1-2 sentences):",validate:($)=>{let B=$?.trim();if(!B||B.length<20)return"Please provide at least 20 characters describing why you need NEMAR access";if(B.length>500)return"Description must be at most 500 characters";return!0}}]),F=R("Creating account...").start();try{let $=await Mv({username:D.username,email:D.email,password:D.password,github_username:D.github_username,description:D.description.trim(),orcid:D.orcid?.trim()||void 0});F.succeed("Account created"),console.log(),console.log(W.green("Registration successful!")),console.log(),console.log("Next steps:"),$.next_steps.forEach((B,J)=>{console.log(` ${J+1}. ${B}`)}),console.log(),console.log(W.gray("Once approved, use 'nemar auth login' with your API key"))}catch($){if($ instanceof c){if(F.fail($.message),$.details&&Array.isArray($.details))$.details.forEach((B)=>{console.log(W.gray(` - ${B}`))});if($.message.includes("already taken"))console.log(W.gray(" Try a different username"));else if($.message.includes("already registered"))console.log(W.gray(" Use 'nemar auth resend-verification' if you need a new verification link"))}else F.fail("Registration failed"),console.log(W.gray(` ${$ instanceof Error?$.message:"Unknown error"}`))}}V8.command("signup").description("Register for a new NEMAR account").action(b$);async function u$(D){let F=SD(),$=F0();if(!F){console.log(W.yellow("Not authenticated")),console.log(),console.log(" Run 'nemar auth login' to authenticate"),console.log(" Run 'nemar auth signup' to create an account");return}let B;if(D.refresh){let J=R("Fetching user info...").start();try{let Q=await w$();V0("username",Q.username),V0("email",Q.email),V0("githubUsername",Q.github_username),B=Q.role,J.stop()}catch(Q){if(J.fail("Could not refresh user info"),Q instanceof c&&Q.statusCode===401)console.log(W.gray(" Your session may have expired. Try logging in again."))}}if(console.log(W.green("Authenticated")),console.log(),$.username)console.log(` Username: ${W.cyan($.username)}`);if($.email)console.log(` Email: ${$.email}`);if($.githubUsername)console.log(` GitHub: @${$.githubUsername}`);if(B){let J=B==="owner"?W.red("Owner"):B==="admin"?W.magenta("Admin"):W.white("Member");console.log(` Role: ${J}`)}console.log(` Config: ${W.gray(Av())}`)}V8.command("status").description("Check current authentication status").option("--refresh","Refresh user info from server").action(u$);V8.command("whoami").description("Show current user (alias for status)").option("--refresh","Refresh user info from server").action(u$);async function h2(D){if(!SD()){console.log(W.yellow("Not currently authenticated"));return}let F=F0();if(await gD(`Log out ${F.username||"current user"}?`,D)!=="confirmed")return;Vv(),console.log(W.green("Logged out successfully"))}V8.command("logout").description("Clear stored credentials").option(yD,xD).option(hD,bD).action(h2);V8.command("resend-verification").description("Resend email verification link").action(async()=>{let{email:D}=await OD.prompt([{type:"input",name:"email",message:"Enter your email address:",validate:($)=>{if(!$||!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test($))return"Please enter a valid email address";return!0}}]),F=R("Sending verification email...").start();try{let $=await Cv(D);F.succeed($.message)}catch($){if($ instanceof c){if(F.fail($.message),$.statusCode===0)console.log(W.gray(" Check your internet connection"))}else F.fail(`Failed to send verification email: ${$ instanceof Error?$.message:"Unknown error"}`),console.log(W.gray(" Check your internet connection"))}});async function fGD(D){if(!SD()){console.log(W.yellow("Not authenticated")),console.log(),console.log(" Run 'nemar auth login' first to authenticate");return}let F=F0();if(!D.force){let G=R("Checking existing SSH access...").start(),H=await f2();if(H.success){if(G.succeed("SSH access to GitHub already configured"),H.username)console.log(` GitHub user: ${W.cyan(H.username)}`);console.log(),console.log(W.gray("Use --force to regenerate SSH key anyway"));return}G.info("SSH access to GitHub not configured")}console.log(),console.log(W.cyan("Setting up SSH access for GitHub")),console.log(W.gray(`This will generate a dedicated SSH key for NEMAR uploads
340
340
  `));let $=null,B=a6();if(Ty()&&!D.force)console.log(W.gray(` Using existing key: ${B.privateKey}`)),$=Oy();else{let G=R("Generating SSH key...").start(),H=await jy(F.email||"nemar-user");if(!H.success){G.fail("Failed to generate SSH key"),console.log(W.gray(` ${H.error}`));return}G.succeed("SSH key generated"),console.log(W.gray(` Private key: ${B.privateKey}`)),console.log(W.gray(` Public key: ${B.publicKey}`)),$=H.publicKey||null}if(!$){console.log(W.red("Could not read public key"));return}let J=R("Configuring SSH...").start(),Q=Iy();if(!Q.success){J.fail("Failed to configure SSH"),console.log(W.gray(` ${Q.error}`));return}J.succeed("SSH configured for GitHub"),console.log();let X=R("Testing SSH connection to GitHub...").start(),Y=await f2();if(Y.success){if(X.succeed("SSH connection verified"),Y.username)console.log(` GitHub user: ${W.cyan(Y.username)}`);console.log(),console.log(W.green("SSH setup complete! You can now upload datasets."));return}X.info("SSH key generated but not yet added to GitHub"),console.log(),console.log(W.yellow("To complete setup, add this SSH key to your GitHub account:")),console.log(),console.log(W.cyan(` ${$}`)),console.log(),console.log("Steps:"),console.log(" 1. Copy the key above"),console.log(` 2. Go to: ${W.underline("https://github.com/settings/ssh/new")}`),console.log(` 3. Title: ${W.gray("NEMAR CLI")}`),console.log(" 4. Paste the key and click 'Add SSH key'"),console.log(),console.log(W.gray("After adding the key, run 'nemar auth setup-ssh' again to verify."))}V8.command("setup-ssh").description("Configure SSH access for GitHub (auto-generates key)").option("-f, --force","Regenerate SSH key even if one exists").addHelpText("after",`
341
341
  Description:
342
342
  Automatically configures SSH access for GitHub, which is required
@@ -407,7 +407,7 @@ Examples:
407
407
  $ nemar dataset upload ./my-eeg-dataset
408
408
  $ nemar dataset upload ./ds -n "My EEG Study" -d "64-channel EEG data"
409
409
  $ nemar dataset upload ./ds --dry-run # Preview without uploading
410
- $ nemar dataset upload ./ds -j 16 # More parallel streams`).action(async(D,F)=>{let $=F0();if(!jD())console.log(W.red("Error: Not authenticated")),console.log("Run 'nemar auth login' first"),process.exit(1);if(!zv())console.log(W.yellow("Sandbox training required")),console.log(),console.log("You must complete sandbox training before uploading real datasets."),console.log("This verifies your setup and familiarizes you with the workflow."),console.log(),console.log("Run sandbox training with:"),console.log(W.cyan(" nemar sandbox")),process.exit(1);let B=A8(D);if(!W6(B))console.log(W.red(`Error: Path does not exist: ${B}`)),process.exit(1);let J=R("Checking prerequisites...").start(),Q=await I$();if(!Q.allPassed){J.fail("Prerequisites check failed"),console.log();for(let v of Q.errors)console.log(W.red(` - ${v}`));process.exit(1)}if(J.succeed("Prerequisites check passed"),console.log(W.gray(` git-annex ${Q.gitAnnex.version}`)),Q.githubSSH.username)console.log(W.gray(` GitHub SSH: ${Q.githubSSH.username}`));console.log(),J=R("Verifying GitHub CLI authentication...").start();let X=await k$($.githubUsername);if(!X.authenticated)J.fail("GitHub CLI not authenticated"),console.log(W.red(` ${X.error}`)),console.log(),console.log("GitHub CLI is required for dataset uploads. Install and authenticate:"),console.log(W.cyan(" brew install gh # or visit https://cli.github.com/")),console.log(W.cyan(" gh auth login")),process.exit(1);if($.githubUsername&&!X.matches)J.warn("GitHub CLI user mismatch"),console.log(W.yellow(` ${X.error}`)),console.log(),console.log("Your gh CLI is authenticated as a different GitHub account than your NEMAR account."),console.log("This may cause issues with repository access. To fix:"),console.log(W.cyan(` gh auth login # Login as ${$.githubUsername}`)),console.log(),console.log(W.yellow("WARNING: If upload fails with permission errors, this mismatch is the likely cause.")),console.log();else J.succeed(`GitHub CLI authenticated as ${X.username}`);if(!F.skipValidation){J=R("Validating BIDS dataset...").start();let v=A8(B,"dataset_description.json");if(!W6(v))J.fail("Not a valid BIDS dataset"),console.log(W.red("Missing required file: dataset_description.json")),process.exit(1);if(!(await l$()).installed)J.fail("Deno is required for BIDS validation"),console.log(),console.log(W.red("Error: Deno is not installed")),console.log(),console.log("The BIDS validator requires Deno runtime to run."),console.log("Install Deno with one of these commands:"),console.log(),console.log(W.cyan(" # macOS/Linux (curl)")),console.log(" curl -fsSL https://deno.land/install.sh | sh"),console.log(),console.log(W.cyan(" # macOS (Homebrew)")),console.log(" brew install deno"),console.log(),console.log(W.cyan(" # Windows (PowerShell)")),console.log(" irm https://deno.land/install.ps1 | iex"),console.log(),console.log("Learn more: https://docs.deno.com/runtime/getting_started/installation/"),console.log(),console.log(W.gray("To skip validation (not recommended): nemar dataset upload --skip-validation")),process.exit(1);try{let ED=await ky(B,{prune:!0});if(!ED.valid)J.fail("Dataset has validation errors"),console.log(),console.log(yy(ED)),console.log(),console.log(W.yellow("Fix the errors above before uploading.")),console.log(W.gray("Or use --skip-validation to upload anyway (not recommended).")),process.exit(1);J.succeed(`Dataset is valid BIDS (${ED.warningCount} warnings)`)}catch(ED){J.fail("Validation failed"),console.log(W.red(ED.message)),process.exit(1)}console.log()}J=R("Analyzing dataset files...").start();let Y=F.name||pGD(B),G=await Vy(B);J.succeed(`Found ${G.files.length} files (${G.dataFiles} data, ${G.metadataFiles} metadata)`);let H;if(!F.skipOrcid&&process.stdin.isTTY){let v=A8(B,"dataset_description.json");if(W6(v))try{let ED=JSON.parse(hy(v,"utf-8")).Authors,Z0=Array.isArray(ED)?ED.filter((w1)=>typeof w1==="string"):[];if(Z0.length>0){let w1,o6;try{let t0=await w$();w1=t0.orcid||void 0,o6=t0.username}catch(t0){console.log(W.gray(` Could not fetch profile: ${P0(t0)}`))}console.log(),console.log(W.cyan("Authors found:"),Z0.join(" | "));let Z8={},o1;if(w1&&o6){let t0=o6.toLowerCase(),q6=Z0.find((K6)=>K6.toLowerCase().includes(t0));if(q6)Z8[q6]={orcid:w1},o1=q6,console.log(` Your ORCID (from profile): ${W.green(w1)} (matched to "${q6}")`)}for(let t0 of Z0){if(t0===o1)continue;let{orcid:q6}=await ID.prompt([{type:"input",name:"orcid",message:`ORCID for "${t0}" (Enter to skip):`,validate:(K6)=>{if(!K6)return!0;return R$.test(K6)||"Invalid ORCID format (XXXX-XXXX-XXXX-XXXX)"}}]);if(q6){let K6={orcid:q6},{affiliation:l2}=await ID.prompt([{type:"input",name:"affiliation",message:` Affiliation for "${t0}" (optional):`}]);if(l2)K6.affiliation=l2;Z8[t0]=K6}}if(Object.keys(Z8).length>0)H={version:"1.0",authors:Z8};console.log()}}catch(qD){if(qD instanceof c)console.log(W.yellow(` Could not fetch profile: ${qD.message}`));else console.log(W.yellow(` Could not collect ORCIDs: ${P0(qD)}`));console.log(W.gray(" Continuing without author enrichment."))}}let E=u2(B);if(console.log(),E)console.log(W.bold.yellow("Resume Upload:")),console.log(` Dataset ID: ${W.cyan(E.dataset_id)}`),console.log(` Last attempt: ${E.last_upload_at||E.created_at}`);else console.log(W.bold("Upload Plan:"));if(console.log(` Name: ${Y}`),console.log(` Path: ${B}`),console.log(` Files: ${G.files.length}`),console.log(` Size: ${PF(G.totalSize)}`),console.log(` Data files: ${G.dataFiles} (will be uploaded to S3)`),console.log(` Metadata files: ${G.metadataFiles} (will be stored in git)`),console.log(` Parallel jobs: ${F.jobs}`),console.log(),F.dryRun){console.log(W.yellow("Dry run mode - no changes made"));return}let K=await gD("Proceed with upload?",{yes:F.yes,no:F.no},!0);if(K!=="confirmed"){console.log(K==="declined"?"Upload skipped.":"Upload cancelled.");return}console.log();let V=G.files.filter((v)=>v.type==="data"),A;if(E!==null){J=R(`Resuming upload for ${E.dataset_id}...`).start();try{await N1(E.dataset_id);let v=await _v(E.dataset_id,V.map((qD)=>qD.path));A={dataset_id:E.dataset_id,ssh_url:E.ssh_url,s3_prefix:E.s3_prefix,github_url:E.github_url,upload_urls:v.upload_urls,s3_config:E.s3_config},J.succeed(`Resuming upload: ${A.dataset_id}`)}catch(v){if(J.fail("Failed to resume upload"),v instanceof c){if(console.log(W.red(` ${v.message}`)),v.statusCode===404)console.log(W.yellow(" The dataset may have been deleted. Try uploading as a new dataset.")),console.log(W.gray(` Remove ${B}/.nemar to start fresh.`))}else console.log(W.red(` ${v.message}`));process.exit(1)}}else{J=R("Creating dataset in NEMAR...").start();try{let v=await j$({name:Y,description:F.description,files:V.map((ED)=>({path:ED.path,size:ED.size,type:ED.type}))});A={dataset_id:v.dataset.dataset_id,ssh_url:v.dataset.ssh_url,s3_prefix:v.dataset.s3_prefix,github_url:v.dataset.github_url,upload_urls:v.upload_urls||{},s3_config:v.s3_config};let qD={dataset_id:A.dataset_id,github_url:A.github_url,ssh_url:A.ssh_url,s3_prefix:A.s3_prefix,s3_config:A.s3_config,created_at:new Date().toISOString()};m2(B,qD),J.succeed(`Dataset created: ${A.dataset_id}`),await new Promise((ED)=>setTimeout(ED,1e4))}catch(v){if(J.fail("Failed to create dataset"),v instanceof c)console.log(W.red(` ${v.message}`));else console.log(W.red(` ${v.message}`));process.exit(1)}}J=R("Accepting GitHub repository invitation...").start();let U=A.github_url?.match(/github\.com\/([a-zA-Z0-9_.-]+\/[a-zA-Z0-9_.-]+)/),L=U?U[1].replace(/\.git$/,""):null;if(!L)J.fail("Invalid GitHub repository URL from backend"),console.log(W.red(` Received: ${A.github_url||"(empty)"}`)),console.log(W.red(" Expected format: https://github.com/owner/repo")),console.log(),console.log("This may indicate a backend issue. Please contact support."),process.exit(1);let M=await v$(L);if(M.accepted)if(M.alreadyCollaborator)J.succeed("Already a collaborator on this repository");else J.succeed("GitHub invitation accepted");else J.warn("Could not auto-accept invitation"),console.log(W.yellow(` ${M.error}`)),console.log(),console.log("You may need to accept the invitation manually:"),console.log(W.cyan(` https://github.com/${L}/invitations`)),console.log();J=R("Initializing git-annex dataset...").start();let N=$.username&&$.email?{name:$.username,email:$.email}:void 0;if(!await z8(B)){let v=await P$(B,{author:N});if(!v.success)J.fail("Failed to initialize git-annex dataset"),console.log(W.red(` ${v.error}`)),process.exit(1)}let b=await Qy(B);if(!b.success)J.fail("Failed to initialize git-annex"),console.log(W.red(` ${b.error}`)),process.exit(1);let T=await S$(B);if(!T.success)J.warn("Could not configure largefiles pattern"),console.log(W.gray(` ${T.error}`));J.succeed("git-annex dataset initialized"),J=R("Configuring GitHub remote...").start();let P=await y$(B,A.ssh_url);if(!P.success)J.fail("Failed to configure GitHub remote"),console.log(W.red(` ${P.error}`)),process.exit(1);J.succeed("GitHub remote configured");let QD=Object.keys(A.upload_urls).length;if(QD>0){J=R(`Uploading ${QD} data files to S3...`).start();let v=0,qD=QD,ED=await x$(B,A.upload_urls,{jobs:Number.parseInt(F.jobs,10),onProgress:(o1)=>{if(o1.status==="completed")v++,J.text=`Uploading data files to S3... (${v}/${qD})`}});if(!ED.success){J.fail(`Failed to upload some files (${ED.failed.length} failed)`);for(let o1 of ED.failed.slice(0,5))console.log(W.red(` - ${o1}`));if(ED.failed.length>5)console.log(W.red(` ... and ${ED.failed.length-5} more`));process.exit(1)}J.succeed(`Uploaded ${ED.uploaded} data files to S3`),J=R("Registering file URLs with git-annex...").start();let{s3_config:Z0,s3_prefix:w1}=A,o6={};for(let o1 of Object.keys(A.upload_urls))o6[o1]=`${Z0.public_url}/${w1}/objects/${o1}`;let Z8=await _$(B,o6);if(!Z8.success)J.warn(`Some URLs could not be registered (${Z8.failed.length} failed)`);else J.succeed(`Registered ${Z8.registered} file URLs with git-annex`)}else console.log(W.gray("No data files to upload to S3"));if(H)try{let v=A8(B,"nemar_metadata.json");by(v,JSON.stringify(H,null,2));let qD=A8(B,".bidsignore"),ED="";if(W6(qD))ED=hy(qD,"utf-8");if(!ED.includes("nemar_metadata.json")){let Z0=ED?`${ED.trimEnd()}
410
+ $ nemar dataset upload ./ds -j 16 # More parallel streams`).action(async(D,F)=>{let $=F0();if(!SD())console.log(W.red("Error: Not authenticated")),console.log("Run 'nemar auth login' first"),process.exit(1);if(!zv())console.log(W.yellow("Sandbox training required")),console.log(),console.log("You must complete sandbox training before uploading real datasets."),console.log("This verifies your setup and familiarizes you with the workflow."),console.log(),console.log("Run sandbox training with:"),console.log(W.cyan(" nemar sandbox")),process.exit(1);let B=A8(D);if(!W6(B))console.log(W.red(`Error: Path does not exist: ${B}`)),process.exit(1);let J=R("Checking prerequisites...").start(),Q=await I$();if(!Q.allPassed){J.fail("Prerequisites check failed"),console.log();for(let v of Q.errors)console.log(W.red(` - ${v}`));process.exit(1)}if(J.succeed("Prerequisites check passed"),console.log(W.gray(` git-annex ${Q.gitAnnex.version}`)),Q.githubSSH.username)console.log(W.gray(` GitHub SSH: ${Q.githubSSH.username}`));console.log(),J=R("Verifying GitHub CLI authentication...").start();let X=await k$($.githubUsername);if(!X.authenticated)J.fail("GitHub CLI not authenticated"),console.log(W.red(` ${X.error}`)),console.log(),console.log("GitHub CLI is required for dataset uploads. Install and authenticate:"),console.log(W.cyan(" brew install gh # or visit https://cli.github.com/")),console.log(W.cyan(" gh auth login")),process.exit(1);if($.githubUsername&&!X.matches)J.warn("GitHub CLI user mismatch"),console.log(W.yellow(` ${X.error}`)),console.log(),console.log("Your gh CLI is authenticated as a different GitHub account than your NEMAR account."),console.log("This may cause issues with repository access. To fix:"),console.log(W.cyan(` gh auth login # Login as ${$.githubUsername}`)),console.log(),console.log(W.yellow("WARNING: If upload fails with permission errors, this mismatch is the likely cause.")),console.log();else J.succeed(`GitHub CLI authenticated as ${X.username}`);if(!F.skipValidation){J=R("Validating BIDS dataset...").start();let v=A8(B,"dataset_description.json");if(!W6(v))J.fail("Not a valid BIDS dataset"),console.log(W.red("Missing required file: dataset_description.json")),process.exit(1);if(!(await l$()).installed)J.fail("Deno is required for BIDS validation"),console.log(),console.log(W.red("Error: Deno is not installed")),console.log(),console.log("The BIDS validator requires Deno runtime to run."),console.log("Install Deno with one of these commands:"),console.log(),console.log(W.cyan(" # macOS/Linux (curl)")),console.log(" curl -fsSL https://deno.land/install.sh | sh"),console.log(),console.log(W.cyan(" # macOS (Homebrew)")),console.log(" brew install deno"),console.log(),console.log(W.cyan(" # Windows (PowerShell)")),console.log(" irm https://deno.land/install.ps1 | iex"),console.log(),console.log("Learn more: https://docs.deno.com/runtime/getting_started/installation/"),console.log(),console.log(W.gray("To skip validation (not recommended): nemar dataset upload --skip-validation")),process.exit(1);try{let ED=await ky(B,{prune:!0});if(!ED.valid)J.fail("Dataset has validation errors"),console.log(),console.log(yy(ED)),console.log(),console.log(W.yellow("Fix the errors above before uploading.")),console.log(W.gray("Or use --skip-validation to upload anyway (not recommended).")),process.exit(1);J.succeed(`Dataset is valid BIDS (${ED.warningCount} warnings)`)}catch(ED){J.fail("Validation failed"),console.log(W.red(ED.message)),process.exit(1)}console.log()}J=R("Analyzing dataset files...").start();let Y=F.name||pGD(B),G=await Vy(B);J.succeed(`Found ${G.files.length} files (${G.dataFiles} data, ${G.metadataFiles} metadata)`);let H;if(!F.skipOrcid&&process.stdin.isTTY){let v=A8(B,"dataset_description.json");if(W6(v))try{let ED=JSON.parse(hy(v,"utf-8")).Authors,Z0=Array.isArray(ED)?ED.filter((w1)=>typeof w1==="string"):[];if(Z0.length>0){let w1,o6;try{let t0=await w$();w1=t0.orcid||void 0,o6=t0.username}catch(t0){console.log(W.gray(` Could not fetch profile: ${P0(t0)}`))}console.log(),console.log(W.cyan("Authors found:"),Z0.join(" | "));let Z8={},o1;if(w1&&o6){let t0=o6.toLowerCase(),q6=Z0.find((K6)=>K6.toLowerCase().includes(t0));if(q6)Z8[q6]={orcid:w1},o1=q6,console.log(` Your ORCID (from profile): ${W.green(w1)} (matched to "${q6}")`)}for(let t0 of Z0){if(t0===o1)continue;let{orcid:q6}=await OD.prompt([{type:"input",name:"orcid",message:`ORCID for "${t0}" (Enter to skip):`,validate:(K6)=>{if(!K6)return!0;return R$.test(K6)||"Invalid ORCID format (XXXX-XXXX-XXXX-XXXX)"}}]);if(q6){let K6={orcid:q6},{affiliation:l2}=await OD.prompt([{type:"input",name:"affiliation",message:` Affiliation for "${t0}" (optional):`}]);if(l2)K6.affiliation=l2;Z8[t0]=K6}}if(Object.keys(Z8).length>0)H={version:"1.0",authors:Z8};console.log()}}catch(qD){if(qD instanceof c)console.log(W.yellow(` Could not fetch profile: ${qD.message}`));else console.log(W.yellow(` Could not collect ORCIDs: ${P0(qD)}`));console.log(W.gray(" Continuing without author enrichment."))}}let E=u2(B);if(console.log(),E)console.log(W.bold.yellow("Resume Upload:")),console.log(` Dataset ID: ${W.cyan(E.dataset_id)}`),console.log(` Last attempt: ${E.last_upload_at||E.created_at}`);else console.log(W.bold("Upload Plan:"));if(console.log(` Name: ${Y}`),console.log(` Path: ${B}`),console.log(` Files: ${G.files.length}`),console.log(` Size: ${PF(G.totalSize)}`),console.log(` Data files: ${G.dataFiles} (will be uploaded to S3)`),console.log(` Metadata files: ${G.metadataFiles} (will be stored in git)`),console.log(` Parallel jobs: ${F.jobs}`),console.log(),F.dryRun){console.log(W.yellow("Dry run mode - no changes made"));return}let K=await gD("Proceed with upload?",{yes:F.yes,no:F.no},!0);if(K!=="confirmed"){console.log(K==="declined"?"Upload skipped.":"Upload cancelled.");return}console.log();let V=G.files.filter((v)=>v.type==="data"),A;if(E!==null){J=R(`Resuming upload for ${E.dataset_id}...`).start();try{await N1(E.dataset_id);let v=await _v(E.dataset_id,V.map((qD)=>qD.path));A={dataset_id:E.dataset_id,ssh_url:E.ssh_url,s3_prefix:E.s3_prefix,github_url:E.github_url,upload_urls:v.upload_urls,s3_config:E.s3_config},J.succeed(`Resuming upload: ${A.dataset_id}`)}catch(v){if(J.fail("Failed to resume upload"),v instanceof c){if(console.log(W.red(` ${v.message}`)),v.statusCode===404)console.log(W.yellow(" The dataset may have been deleted. Try uploading as a new dataset.")),console.log(W.gray(` Remove ${B}/.nemar to start fresh.`))}else console.log(W.red(` ${v.message}`));process.exit(1)}}else{J=R("Creating dataset in NEMAR...").start();try{let v=await j$({name:Y,description:F.description,files:V.map((ED)=>({path:ED.path,size:ED.size,type:ED.type}))});A={dataset_id:v.dataset.dataset_id,ssh_url:v.dataset.ssh_url,s3_prefix:v.dataset.s3_prefix,github_url:v.dataset.github_url,upload_urls:v.upload_urls||{},s3_config:v.s3_config};let qD={dataset_id:A.dataset_id,github_url:A.github_url,ssh_url:A.ssh_url,s3_prefix:A.s3_prefix,s3_config:A.s3_config,created_at:new Date().toISOString()};m2(B,qD),J.succeed(`Dataset created: ${A.dataset_id}`),await new Promise((ED)=>setTimeout(ED,1e4))}catch(v){if(J.fail("Failed to create dataset"),v instanceof c)console.log(W.red(` ${v.message}`));else console.log(W.red(` ${v.message}`));process.exit(1)}}J=R("Accepting GitHub repository invitation...").start();let U=A.github_url?.match(/github\.com\/([a-zA-Z0-9_.-]+\/[a-zA-Z0-9_.-]+)/),L=U?U[1].replace(/\.git$/,""):null;if(!L)J.fail("Invalid GitHub repository URL from backend"),console.log(W.red(` Received: ${A.github_url||"(empty)"}`)),console.log(W.red(" Expected format: https://github.com/owner/repo")),console.log(),console.log("This may indicate a backend issue. Please contact support."),process.exit(1);let M=await v$(L);if(M.accepted)if(M.alreadyCollaborator)J.succeed("Already a collaborator on this repository");else J.succeed("GitHub invitation accepted");else J.warn("Could not auto-accept invitation"),console.log(W.yellow(` ${M.error}`)),console.log(),console.log("You may need to accept the invitation manually:"),console.log(W.cyan(` https://github.com/${L}/invitations`)),console.log();J=R("Initializing git-annex dataset...").start();let N=$.username&&$.email?{name:$.username,email:$.email}:void 0;if(!await z8(B)){let v=await P$(B,{author:N});if(!v.success)J.fail("Failed to initialize git-annex dataset"),console.log(W.red(` ${v.error}`)),process.exit(1)}let b=await Qy(B);if(!b.success)J.fail("Failed to initialize git-annex"),console.log(W.red(` ${b.error}`)),process.exit(1);let T=await S$(B);if(!T.success)J.warn("Could not configure largefiles pattern"),console.log(W.gray(` ${T.error}`));J.succeed("git-annex dataset initialized"),J=R("Configuring GitHub remote...").start();let P=await y$(B,A.ssh_url);if(!P.success)J.fail("Failed to configure GitHub remote"),console.log(W.red(` ${P.error}`)),process.exit(1);J.succeed("GitHub remote configured");let QD=Object.keys(A.upload_urls).length;if(QD>0){J=R(`Uploading ${QD} data files to S3...`).start();let v=0,qD=QD,ED=await x$(B,A.upload_urls,{jobs:Number.parseInt(F.jobs,10),onProgress:(o1)=>{if(o1.status==="completed")v++,J.text=`Uploading data files to S3... (${v}/${qD})`}});if(!ED.success){J.fail(`Failed to upload some files (${ED.failed.length} failed)`);for(let o1 of ED.failed.slice(0,5))console.log(W.red(` - ${o1}`));if(ED.failed.length>5)console.log(W.red(` ... and ${ED.failed.length-5} more`));process.exit(1)}J.succeed(`Uploaded ${ED.uploaded} data files to S3`),J=R("Registering file URLs with git-annex...").start();let{s3_config:Z0,s3_prefix:w1}=A,o6={};for(let o1 of Object.keys(A.upload_urls))o6[o1]=`${Z0.public_url}/${w1}/objects/${o1}`;let Z8=await _$(B,o6);if(!Z8.success)J.warn(`Some URLs could not be registered (${Z8.failed.length} failed)`);else J.succeed(`Registered ${Z8.registered} file URLs with git-annex`)}else console.log(W.gray("No data files to upload to S3"));if(H)try{let v=A8(B,"nemar_metadata.json");by(v,JSON.stringify(H,null,2));let qD=A8(B,".bidsignore"),ED="";if(W6(qD))ED=hy(qD,"utf-8");if(!ED.includes("nemar_metadata.json")){let Z0=ED?`${ED.trimEnd()}
411
411
  nemar_metadata.json
412
412
  `:`nemar_metadata.json
413
413
  `;by(qD,Z0)}console.log(W.gray(" Saved nemar_metadata.json with author ORCIDs"))}catch(v){console.log(W.yellow(` Warning: Could not save nemar_metadata.json: ${P0(v)}`)),console.log(W.gray(" Upload will continue without author enrichment."))}J=R("Saving dataset changes...").start();let fD=await M5(B,"Initial NEMAR dataset upload",N);if(!fD.success)J.fail("Failed to save dataset"),console.log(W.red(` ${fD.error}`)),process.exit(1);J.succeed("Dataset changes saved"),J=R("Pushing metadata to GitHub...").start();let $0=await N5(B);if(!$0.success)J.fail("Failed to push to GitHub"),console.log(W.red(` ${$0.error}`)),process.exit(1);J.succeed("Metadata pushed to GitHub"),J=R("Setting up BIDS validation CI...").start();try{await T$(A.dataset_id),J.succeed("BIDS validation CI configured")}catch(v){if(v instanceof c&&v.statusCode===403)J.info("CI workflow will be configured by an admin");else{let qD=v instanceof Error?v.message:String(v);J.warn(`Could not configure CI: ${qD}`),console.log(W.gray(` An admin can add it later with: nemar admin ci add ${A.dataset_id}`))}}gy(B),console.log(),console.log(W.green.bold("Upload complete!")),console.log(),console.log(` Dataset ID: ${W.cyan(A.dataset_id)}`),console.log(` GitHub: ${W.cyan(A.github_url)}`),console.log(),console.log(W.gray("To clone this dataset:")),console.log(W.gray(` git clone ${A.ssh_url}`))});lD.command("download").description("Download a dataset from NEMAR").argument("<dataset-id>","Dataset ID (e.g., nm000104)").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)").addHelpText("after",`
@@ -450,7 +450,7 @@ Examples:
450
450
  $ nemar dataset list # List public datasets only
451
451
  $ nemar dataset list --mine # List YOUR datasets (private + public)
452
452
  $ nemar dataset list --json # JSON output for scripting
453
- $ nemar dataset list --limit 10 # Show only 10 datasets`).action(async(D)=>{if(D.mine&&!jD())console.log(W.red("Error: Not authenticated")),console.log("Run 'nemar auth login' to see your datasets"),process.exit(1);let F=R("Fetching datasets...").start(),$;try{$=await xv(!!D.mine),F.stop()}catch(E){if(F.fail("Failed to fetch datasets"),E instanceof c)console.log(W.red(` ${E.message}`));else console.log(W.red(` ${E.message}`));process.exit(1)}let B=$.datasets;if(D.mine){let K=F0().username;B=B.filter((V)=>V.owner_username===K)}let J=Number.parseInt(D.limit,10);if(B.length>J)B=B.slice(0,J);if(D.json){console.log(JSON.stringify(B,null,2));return}if(B.length===0){if(console.log(),D.mine)console.log(W.yellow("You don't have any datasets yet.")),console.log(W.gray("Create one with: nemar dataset upload <path>"));else console.log(W.yellow("No datasets found."));return}console.log(),console.log(W.bold(`Datasets (${B.length}${$.count>B.length?` of ${$.count}`:""}):`)),console.log();let Q=Math.max(10,...B.map((E)=>E.dataset_id.length)),X=Math.min(30,Math.max(10,...B.map((E)=>E.name.length))),Y=Math.max(8,...B.map((E)=>E.owner_username.length)),G=10,H=["ID".padEnd(Q),"Name".padEnd(X),"Owner".padEnd(Y),"Visibility".padEnd(G),"Status"].join(" ");console.log(W.gray(H)),console.log(W.gray("-".repeat(H.length)));for(let E of B){let K=E.name.length>X?`${E.name.substring(0,X-3)}...`:E.name,V=E.visibility==="public"?W.green("public"):W.yellow("private"),A=[W.cyan(E.dataset_id.padEnd(Q)),K.padEnd(X),E.owner_username.padEnd(Y),V.padEnd(G+(V.length-E.visibility.length)),my(E.status)].join(" ");console.log(A)}console.log(),console.log(W.gray("For details: nemar dataset status <dataset-id>"))});lD.command("version").description("Create a new version of a dataset with DOI").argument("<dataset-id>","Dataset ID (e.g., nm000104)").argument("<version>","Version tag (e.g., v1.1.0)").option("-m, --message <msg>","Version description").action(async(D,F,$)=>{if(!jD())console.log(W.red("Error: Not authenticated")),console.log("Run 'nemar auth login' first"),process.exit(1);console.log(W.yellow("Version command not yet implemented")),console.log(`Would create version ${F} for dataset ${D}`),console.log("Requires existing concept DOI (created by admin)")});lD.command("request-access").description("Request collaborator access to a dataset").argument("<dataset-id>","Dataset ID (e.g., nm000104)").addHelpText("after",`
453
+ $ nemar dataset list --limit 10 # Show only 10 datasets`).action(async(D)=>{if(D.mine&&!SD())console.log(W.red("Error: Not authenticated")),console.log("Run 'nemar auth login' to see your datasets"),process.exit(1);let F=R("Fetching datasets...").start(),$;try{$=await xv(!!D.mine),F.stop()}catch(E){if(F.fail("Failed to fetch datasets"),E instanceof c)console.log(W.red(` ${E.message}`));else console.log(W.red(` ${E.message}`));process.exit(1)}let B=$.datasets;if(D.mine){let K=F0().username;B=B.filter((V)=>V.owner_username===K)}let J=Number.parseInt(D.limit,10);if(B.length>J)B=B.slice(0,J);if(D.json){console.log(JSON.stringify(B,null,2));return}if(B.length===0){if(console.log(),D.mine)console.log(W.yellow("You don't have any datasets yet.")),console.log(W.gray("Create one with: nemar dataset upload <path>"));else console.log(W.yellow("No datasets found."));return}console.log(),console.log(W.bold(`Datasets (${B.length}${$.count>B.length?` of ${$.count}`:""}):`)),console.log();let Q=Math.max(10,...B.map((E)=>E.dataset_id.length)),X=Math.min(30,Math.max(10,...B.map((E)=>E.name.length))),Y=Math.max(8,...B.map((E)=>E.owner_username.length)),G=10,H=["ID".padEnd(Q),"Name".padEnd(X),"Owner".padEnd(Y),"Visibility".padEnd(G),"Status"].join(" ");console.log(W.gray(H)),console.log(W.gray("-".repeat(H.length)));for(let E of B){let K=E.name.length>X?`${E.name.substring(0,X-3)}...`:E.name,V=E.visibility==="public"?W.green("public"):W.yellow("private"),A=[W.cyan(E.dataset_id.padEnd(Q)),K.padEnd(X),E.owner_username.padEnd(Y),V.padEnd(G+(V.length-E.visibility.length)),my(E.status)].join(" ");console.log(A)}console.log(),console.log(W.gray("For details: nemar dataset status <dataset-id>"))});lD.command("version").description("Create a new version of a dataset with DOI").argument("<dataset-id>","Dataset ID (e.g., nm000104)").argument("<version>","Version tag (e.g., v1.1.0)").option("-m, --message <msg>","Version description").action(async(D,F,$)=>{if(!SD())console.log(W.red("Error: Not authenticated")),console.log("Run 'nemar auth login' first"),process.exit(1);console.log(W.yellow("Version command not yet implemented")),console.log(`Would create version ${F} for dataset ${D}`),console.log("Requires existing concept DOI (created by admin)")});lD.command("request-access").description("Request collaborator access to a dataset").argument("<dataset-id>","Dataset ID (e.g., nm000104)").addHelpText("after",`
454
454
  Description:
455
455
  Request access to a NEMAR dataset to push data via git-annex.
456
456
  Access is automatically granted for public repositories.
@@ -463,7 +463,7 @@ Requirements:
463
463
  - Approved user status
464
464
 
465
465
  Examples:
466
- $ nemar dataset request-access nm000104`).action(async(D)=>{if(!jD())console.log(W.red("Error: Not authenticated")),console.log("Run 'nemar auth login' first"),process.exit(1);let F=R(`Requesting access to ${D}...`).start();try{let $=await gv(D);F.succeed($.message),console.log(),console.log(` GitHub: https://github.com/${$.github_repo}`),console.log(),console.log(W.gray("You can now push data to this dataset via git-annex."))}catch($){if($ instanceof c)F.fail($.message);else F.fail("Failed to request access"),console.log(W.red(` ${$.message}`));process.exit(1)}});lD.command("invite").description("Invite a user as collaborator to your dataset").argument("<username>","Username to invite").argument("<dataset-id>","Dataset ID (e.g., nm000104)").addHelpText("after",`
466
+ $ nemar dataset request-access nm000104`).action(async(D)=>{if(!SD())console.log(W.red("Error: Not authenticated")),console.log("Run 'nemar auth login' first"),process.exit(1);let F=R(`Requesting access to ${D}...`).start();try{let $=await gv(D);F.succeed($.message),console.log(),console.log(` GitHub: https://github.com/${$.github_repo}`),console.log(),console.log(W.gray("You can now push data to this dataset via git-annex."))}catch($){if($ instanceof c)F.fail($.message);else F.fail("Failed to request access"),console.log(W.red(` ${$.message}`));process.exit(1)}});lD.command("invite").description("Invite a user as collaborator to your dataset").argument("<username>","Username to invite").argument("<dataset-id>","Dataset ID (e.g., nm000104)").addHelpText("after",`
467
467
  Description:
468
468
  Invite a NEMAR user as a collaborator to your dataset.
469
469
  Only dataset owners and admins can invite collaborators.
@@ -475,14 +475,14 @@ Requirements:
475
475
  - Dataset ownership or admin status
476
476
 
477
477
  Examples:
478
- $ nemar dataset invite johndoe nm000104`).action(async(D,F)=>{if(!jD())console.log(W.red("Error: Not authenticated")),console.log("Run 'nemar auth login' first"),process.exit(1);let $=R(`Inviting ${D} to ${F}...`).start();try{let B=await hv(F,D);$.succeed(B.message)}catch(B){if(B instanceof c)$.fail(B.message);else $.fail("Failed to invite user"),console.log(W.red(` ${B.message}`));process.exit(1)}});lD.command("collaborators").description("List collaborators for a dataset").argument("<dataset-id>","Dataset ID (e.g., nm000104)").option("--json","Output as JSON for scripting").addHelpText("after",`
478
+ $ nemar dataset invite johndoe nm000104`).action(async(D,F)=>{if(!SD())console.log(W.red("Error: Not authenticated")),console.log("Run 'nemar auth login' first"),process.exit(1);let $=R(`Inviting ${D} to ${F}...`).start();try{let B=await hv(F,D);$.succeed(B.message)}catch(B){if(B instanceof c)$.fail(B.message);else $.fail("Failed to invite user"),console.log(W.red(` ${B.message}`));process.exit(1)}});lD.command("collaborators").description("List collaborators for a dataset").argument("<dataset-id>","Dataset ID (e.g., nm000104)").option("--json","Output as JSON for scripting").addHelpText("after",`
479
479
  Description:
480
480
  List all collaborators who have access to a dataset.
481
481
  Only dataset owners and admins can view collaborators.
482
482
 
483
483
  Examples:
484
484
  $ nemar dataset collaborators nm000104
485
- $ nemar dataset collaborators nm000104 --json`).action(async(D,F)=>{if(!jD())console.log(W.red("Error: Not authenticated")),console.log("Run 'nemar auth login' first"),process.exit(1);let $=R(`Fetching collaborators for ${D}...`).start();try{let B=await bv(D);if($.stop(),F.json){console.log(JSON.stringify(B,null,2));return}if(console.log(),console.log(W.bold(`Collaborators for ${D} (${B.count}):`)),console.log(),B.collaborators.length===0){console.log(W.gray(" No collaborators yet.")),console.log(),console.log(W.gray(`Invite users with: nemar dataset invite <username> ${D}`));return}let J=["Username","GitHub","Access","Granted"].join(" ");console.log(W.gray(` ${J}`)),console.log(W.gray(` ${"-".repeat(J.length)}`));for(let Q of B.collaborators){let X=new Date(Q.granted_at).toLocaleDateString(),Y=Q.access_type==="invited"?"invited":"requested",G=[Q.username.padEnd(10),`@${Q.github_username}`.padEnd(15),Y.padEnd(10),X].join(" ");console.log(` ${G}`)}console.log()}catch(B){if(B instanceof c)$.fail(B.message);else $.fail("Failed to fetch collaborators"),console.log(W.red(` ${B.message}`));process.exit(1)}});var d$=new B0("publish").description("Publication workflow management");d$.command("request").description("Request publication of a dataset").argument("<dataset-id>","Dataset ID (e.g., nm000104)").addHelpText("after",`
485
+ $ nemar dataset collaborators nm000104 --json`).action(async(D,F)=>{if(!SD())console.log(W.red("Error: Not authenticated")),console.log("Run 'nemar auth login' first"),process.exit(1);let $=R(`Fetching collaborators for ${D}...`).start();try{let B=await bv(D);if($.stop(),F.json){console.log(JSON.stringify(B,null,2));return}if(console.log(),console.log(W.bold(`Collaborators for ${D} (${B.count}):`)),console.log(),B.collaborators.length===0){console.log(W.gray(" No collaborators yet.")),console.log(),console.log(W.gray(`Invite users with: nemar dataset invite <username> ${D}`));return}let J=["Username","GitHub","Access","Granted"].join(" ");console.log(W.gray(` ${J}`)),console.log(W.gray(` ${"-".repeat(J.length)}`));for(let Q of B.collaborators){let X=new Date(Q.granted_at).toLocaleDateString(),Y=Q.access_type==="invited"?"invited":"requested",G=[Q.username.padEnd(10),`@${Q.github_username}`.padEnd(15),Y.padEnd(10),X].join(" ");console.log(` ${G}`)}console.log()}catch(B){if(B instanceof c)$.fail(B.message);else $.fail("Failed to fetch collaborators"),console.log(W.red(` ${B.message}`));process.exit(1)}});var d$=new B0("publish").description("Publication workflow management");d$.command("request").description("Request publication of a dataset").argument("<dataset-id>","Dataset ID (e.g., nm000104)").addHelpText("after",`
486
486
  Description:
487
487
  Submit a publication request to make your private dataset publicly accessible.
488
488
  NEMAR admins will be notified and can approve or deny your request.
@@ -500,7 +500,7 @@ Status Flow:
500
500
 
501
501
  Examples:
502
502
  $ nemar dataset publish request nm000104
503
- $ nemar dataset publish status nm000104 # Check request status`).action(async(D)=>{if(!jD())console.log(W.red("Error: Not authenticated")),console.log("Run 'nemar auth login' first"),process.exit(1);let F=R(`Requesting publication for ${D}...`).start();try{let $=await dv(D);F.succeed($.message),console.log(W.gray(`
503
+ $ nemar dataset publish status nm000104 # Check request status`).action(async(D)=>{if(!SD())console.log(W.red("Error: Not authenticated")),console.log("Run 'nemar auth login' first"),process.exit(1);let F=R(`Requesting publication for ${D}...`).start();try{let $=await dv(D);F.succeed($.message),console.log(W.gray(`
504
504
  Admins have been notified. Use 'nemar dataset publish status' to check progress.`))}catch($){if($ instanceof c){if(F.fail($.message),console.log(W.gray(` ${$.message}`)),$.statusCode===409)console.log(W.gray(" Use 'nemar dataset publish resend' to remind admins."));else if($.statusCode===403)console.log(W.gray(" Only the dataset owner can request publication."))}else{F.fail("Failed to request publication");let B=$ instanceof Error?$.message:String($);console.log(W.gray(` Error details: ${B}`))}}});d$.command("status").description("Check publication status of a dataset").argument("<dataset-id>","Dataset ID (e.g., nm000104)").addHelpText("after",`
505
505
  Description:
506
506
  Check the status of your publication request and see progress through
@@ -529,7 +529,7 @@ Steps in Approval Process:
529
529
  14. Notify user - Send publication confirmation email
530
530
 
531
531
  Examples:
532
- $ nemar dataset publish status nm000104`).action(async(D)=>{if(!jD())console.log(W.red("Error: Not authenticated")),console.log("Run 'nemar auth login' first"),process.exit(1);let F=R(`Checking publication status for ${D}...`).start();try{let $=await pv(D);F.stop(),console.log(`
532
+ $ nemar dataset publish status nm000104`).action(async(D)=>{if(!SD())console.log(W.red("Error: Not authenticated")),console.log("Run 'nemar auth login' first"),process.exit(1);let F=R(`Checking publication status for ${D}...`).start();try{let $=await pv(D);F.stop(),console.log(`
533
533
  ${W.cyan("Publication Status:")} ${D}
534
534
  `);let J={published:W.green,denied:W.red,approving:W.yellow}[$.status]||W.gray;if(console.log(` Status: ${J($.status)}`),$.requested_at)console.log(` Requested: ${W.gray($.requested_at)}`);if($.requested_by)console.log(` Requested by: ${W.gray($.requested_by)}`);if($.status==="denied"&&$.denied_reason)console.log(`
535
535
  ${W.red("Reason:")} ${$.denied_reason}`);if($.status==="approving"){let Q=["ci_check","repo_public","s3_public_read","tag_protect","doi_create","update_metadata","update_readme","create_tag","create_release","upload_to_zenodo","publish_doi","s3_lock","generate_archive","notify_user"],X=$.steps_completed||[];console.log(`
@@ -547,7 +547,7 @@ When to Use:
547
547
  - Your request status is still "requested"
548
548
 
549
549
  Examples:
550
- $ nemar dataset publish resend nm000104`).action(async(D)=>{if(!jD())console.log(W.red("Error: Not authenticated")),console.log("Run 'nemar auth login' first"),process.exit(1);let F=R(`Resending notification for ${D}...`).start();try{let $=await cv(D);F.succeed($.message)}catch($){if($ instanceof c){if(F.fail($.message),console.log(W.gray(` ${$.message}`)),$.statusCode===404)console.log(W.gray(" Publication request not found for this dataset."))}else{F.fail("Failed to resend notification");let B=$ instanceof Error?$.message:String($);console.log(W.gray(` Error details: ${B}`))}}});lD.addCommand(d$);lD.command("clone").description("Clone a dataset from NEMAR").argument("<dataset-id>","Dataset ID (e.g., nm000104)").option("-o, --output <path>","Output directory (default: ./<dataset-id>)").addHelpText("after",`
550
+ $ nemar dataset publish resend nm000104`).action(async(D)=>{if(!SD())console.log(W.red("Error: Not authenticated")),console.log("Run 'nemar auth login' first"),process.exit(1);let F=R(`Resending notification for ${D}...`).start();try{let $=await cv(D);F.succeed($.message)}catch($){if($ instanceof c){if(F.fail($.message),console.log(W.gray(` ${$.message}`)),$.statusCode===404)console.log(W.gray(" Publication request not found for this dataset."))}else{F.fail("Failed to resend notification");let B=$ instanceof Error?$.message:String($);console.log(W.gray(` Error details: ${B}`))}}});lD.addCommand(d$);lD.command("clone").description("Clone a dataset from NEMAR").argument("<dataset-id>","Dataset ID (e.g., nm000104)").option("-o, --output <path>","Output directory (default: ./<dataset-id>)").addHelpText("after",`
551
551
  Description:
552
552
  Clone a NEMAR dataset repository with git-annex initialized.
553
553
  Data files are not downloaded; use 'nemar dataset get' afterward.
@@ -603,7 +603,7 @@ Description:
603
603
 
604
604
  Examples:
605
605
  $ nemar dataset ci # Auto-detect from CWD
606
- $ nemar dataset ci nm000104 # Explicit dataset ID`).action(async(D)=>{if(!jD())console.log(W.red("Error: Not authenticated")),console.log("Run 'nemar auth login' first"),process.exit(1);let F=D;if(!F){let B=process.cwd();if(await z8(B))F=await v2(B);if(!F)console.log(W.red("Error: Could not detect dataset ID from current directory")),console.log(W.gray("Provide dataset ID explicitly: nemar dataset ci <id>")),process.exit(1)}let $=R(`Checking CI status for ${F}...`).start();try{let B=await Sv(F);$.stop(),console.log(W.bold(`CI Status: ${F}`)),console.log();let{bids_validation:J}=B;if(!J.present)console.log(` BIDS Validation: ${W.gray("not configured")}`),console.log(W.gray(` Ask an admin to run: nemar admin ci add ${F}`));else{let Q=J.status==="success"?W.green:J.status==="failure"?W.red:W.yellow;if(console.log(` BIDS Validation: ${Q(J.status)}`),J.url)console.log(` Latest run: ${W.cyan(J.url)}`)}console.log()}catch(B){if(B instanceof c)$.fail(B.message);else{$.fail("Failed to check CI status");let J=B instanceof Error?B.message:String(B);console.log(W.gray(` ${J}`))}process.exit(1)}});lD.command("manifest").description("View version manifests for a dataset").argument("[version]","Version to view (lists available if omitted)").option("-d, --dataset <id>","Dataset ID (auto-detected from git remote if omitted)").option("--json","Output raw JSON").addHelpText("after",`
606
+ $ nemar dataset ci nm000104 # Explicit dataset ID`).action(async(D)=>{if(!SD())console.log(W.red("Error: Not authenticated")),console.log("Run 'nemar auth login' first"),process.exit(1);let F=D;if(!F){let B=process.cwd();if(await z8(B))F=await v2(B);if(!F)console.log(W.red("Error: Could not detect dataset ID from current directory")),console.log(W.gray("Provide dataset ID explicitly: nemar dataset ci <id>")),process.exit(1)}let $=R(`Checking CI status for ${F}...`).start();try{let B=await Sv(F);$.stop(),console.log(W.bold(`CI Status: ${F}`)),console.log();let{bids_validation:J}=B;if(!J.present)console.log(` BIDS Validation: ${W.gray("not configured")}`),console.log(W.gray(` Ask an admin to run: nemar admin ci add ${F}`));else{let Q=J.status==="success"?W.green:J.status==="failure"?W.red:W.yellow;if(console.log(` BIDS Validation: ${Q(J.status)}`),J.url)console.log(` Latest run: ${W.cyan(J.url)}`)}console.log()}catch(B){if(B instanceof c)$.fail(B.message);else{$.fail("Failed to check CI status");let J=B instanceof Error?B.message:String(B);console.log(W.gray(` ${J}`))}process.exit(1)}});lD.command("manifest").description("View version manifests for a dataset").argument("[version]","Version to view (lists available if omitted)").option("-d, --dataset <id>","Dataset ID (auto-detected from git remote if omitted)").option("--json","Output raw JSON").addHelpText("after",`
607
607
  Description:
608
608
  View version manifests that map file paths to S3 annex keys.
609
609
  Manifests are generated when a version DOI is published.
@@ -614,7 +614,7 @@ Examples:
614
614
  $ nemar dataset manifest # List available versions
615
615
  $ nemar dataset manifest v1.0.0 # View specific version
616
616
  $ nemar dataset manifest v1.0.0 --json # Raw JSON output
617
- $ nemar dataset manifest -d nm000104 # Explicit dataset ID`).action(async(D,F)=>{if(!jD())console.log(W.red("Error: Not authenticated")),console.log("Run 'nemar auth login' first"),process.exit(1);let $=F.dataset;if(!$){let J=process.cwd();if(await z8(J))$=await v2(J);if(!$)console.log(W.red("Error: Could not detect dataset ID")),console.log(W.gray("Provide dataset ID: nemar dataset manifest -d <id>")),process.exit(1)}let B=R("Fetching manifest info...").start();try{if(!D){let J=await kv($);if(B.stop(),console.log(W.bold(`Manifests: ${$}`)),console.log(),J.versions.length===0)console.log(W.gray(" No manifests available yet.")),console.log(W.gray(" Manifests are generated when a version DOI is published."));else for(let Q of J.versions)console.log(` ${W.cyan(Q)}`);console.log()}else{let J=await vv($,D);if(B.stop(),F.json)console.log(JSON.stringify(J,null,2));else{if(console.log(W.bold(`Manifest: ${$} ${J.version}`)),J.doi)console.log(` DOI: ${W.cyan(J.doi)}`);if(J.concept_doi)console.log(` Concept DOI: ${W.gray(J.concept_doi)}`);console.log(` Created: ${J.created}`),console.log();let Q=Object.entries(J.files),X=Q.filter(([,G])=>!G.key.startsWith("git:")),Y=Q.filter(([,G])=>G.key.startsWith("git:"));if(X.length>0){console.log(W.bold(` Annexed files (${X.length}):`));for(let[G,H]of X){let E=uy(H.size);console.log(` ${G} ${W.gray(`(${E})`)}`)}}if(Y.length>0){console.log(),console.log(W.bold(` Metadata files (${Y.length}):`));for(let[G,H]of Y){let E=uy(H.size);console.log(` ${G} ${W.gray(`(${E})`)}`)}}console.log()}}}catch(J){if(J instanceof c)B.fail(J.message);else{B.fail("Failed to fetch manifest");let Q=J instanceof Error?J.message:String(J);console.log(W.gray(` ${Q}`))}process.exit(1)}});function uy(D){if(D===0)return"0 B";let F=["B","KB","MB","GB","TB"],$=Math.floor(Math.log(D)/Math.log(1024));return`${(D/1024**$).toFixed($>0?1:0)} ${F[$]}`}import{mkdirSync as iGD,rmSync as aGD,writeFileSync as T5}from"fs";import{tmpdir as oGD}from"os";import{join as E6}from"path";function sGD(D){let F=E6(D,"sub-01"),$=E6(F,"eeg");return{root:D,datasetDescription:E6(D,"dataset_description.json"),participants:E6(D,"participants.tsv"),readme:E6(D,"README"),subjectDir:F,eegDir:$,edfFile:E6($,"sub-01_task-rest_eeg.edf"),sidecarJson:E6($,"sub-01_task-rest_eeg.json")}}function ly(D){let F=D||E6(oGD(),`nemar-sandbox-${Date.now()}`),$=sGD(F);iGD($.eegDir,{recursive:!0});let B={Name:"NEMAR Sandbox Training Dataset",BIDSVersion:"1.9.0",DatasetType:"raw",License:"CC0",Authors:["NEMAR CLI Training"],HowToAcknowledge:"This is a sandbox dataset for testing the NEMAR upload workflow.",DatasetDOI:"n/a"};T5($.datasetDescription,JSON.stringify(B,null,2));let J=`participant_id age sex
617
+ $ nemar dataset manifest -d nm000104 # Explicit dataset ID`).action(async(D,F)=>{if(!SD())console.log(W.red("Error: Not authenticated")),console.log("Run 'nemar auth login' first"),process.exit(1);let $=F.dataset;if(!$){let J=process.cwd();if(await z8(J))$=await v2(J);if(!$)console.log(W.red("Error: Could not detect dataset ID")),console.log(W.gray("Provide dataset ID: nemar dataset manifest -d <id>")),process.exit(1)}let B=R("Fetching manifest info...").start();try{if(!D){let J=await kv($);if(B.stop(),console.log(W.bold(`Manifests: ${$}`)),console.log(),J.versions.length===0)console.log(W.gray(" No manifests available yet.")),console.log(W.gray(" Manifests are generated when a version DOI is published."));else for(let Q of J.versions)console.log(` ${W.cyan(Q)}`);console.log()}else{let J=await vv($,D);if(B.stop(),F.json)console.log(JSON.stringify(J,null,2));else{if(console.log(W.bold(`Manifest: ${$} ${J.version}`)),J.doi)console.log(` DOI: ${W.cyan(J.doi)}`);if(J.concept_doi)console.log(` Concept DOI: ${W.gray(J.concept_doi)}`);console.log(` Created: ${J.created}`),console.log();let Q=Object.entries(J.files),X=Q.filter(([,G])=>!G.key.startsWith("git:")),Y=Q.filter(([,G])=>G.key.startsWith("git:"));if(X.length>0){console.log(W.bold(` Annexed files (${X.length}):`));for(let[G,H]of X){let E=uy(H.size);console.log(` ${G} ${W.gray(`(${E})`)}`)}}if(Y.length>0){console.log(),console.log(W.bold(` Metadata files (${Y.length}):`));for(let[G,H]of Y){let E=uy(H.size);console.log(` ${G} ${W.gray(`(${E})`)}`)}}console.log()}}}catch(J){if(J instanceof c)B.fail(J.message);else{B.fail("Failed to fetch manifest");let Q=J instanceof Error?J.message:String(J);console.log(W.gray(` ${Q}`))}process.exit(1)}});function uy(D){if(D===0)return"0 B";let F=["B","KB","MB","GB","TB"],$=Math.floor(Math.log(D)/Math.log(1024));return`${(D/1024**$).toFixed($>0?1:0)} ${F[$]}`}import{mkdirSync as iGD,rmSync as aGD,writeFileSync as T5}from"fs";import{tmpdir as oGD}from"os";import{join as E6}from"path";function sGD(D){let F=E6(D,"sub-01"),$=E6(F,"eeg");return{root:D,datasetDescription:E6(D,"dataset_description.json"),participants:E6(D,"participants.tsv"),readme:E6(D,"README"),subjectDir:F,eegDir:$,edfFile:E6($,"sub-01_task-rest_eeg.edf"),sidecarJson:E6($,"sub-01_task-rest_eeg.json")}}function ly(D){let F=D||E6(oGD(),`nemar-sandbox-${Date.now()}`),$=sGD(F);iGD($.eegDir,{recursive:!0});let B={Name:"NEMAR Sandbox Training Dataset",BIDSVersion:"1.9.0",DatasetType:"raw",License:"CC0",Authors:["NEMAR CLI Training"],HowToAcknowledge:"This is a sandbox dataset for testing the NEMAR upload workflow.",DatasetDOI:"n/a"};T5($.datasetDescription,JSON.stringify(B,null,2));let J=`participant_id age sex
618
618
  sub-01 25 M
619
619
  `;T5($.participants,J);let Q=`# NEMAR Sandbox Training Dataset
620
620
 
@@ -649,7 +649,7 @@ Examples:
649
649
  $ nemar sandbox # Run sandbox training
650
650
  $ nemar sandbox status # Check if training is completed
651
651
  $ nemar sandbox reset # Reset for re-training
652
- `).action(tGD);async function tGD(){if(console.log(),console.log(W.bold("NEMAR Sandbox Training")),console.log(W.gray("Verify your setup and learn the upload workflow")),console.log(),!jD()){console.log(W.red("Not authenticated")),console.log(W.gray("Run 'nemar auth login' first"));return}let D=F0();if(D.sandboxCompleted){console.log(W.green("Sandbox training already completed!")),console.log(W.gray(`Dataset ID: ${D.sandboxDatasetId}`)),console.log(),console.log("You can upload real datasets with:"),console.log(W.cyan(" nemar dataset upload ./your-dataset")),console.log(),console.log(W.gray("To re-run training, use: nemar sandbox reset"));return}console.log(W.bold("Step 1/6: Checking prerequisites..."));let F=R("Checking git-annex and SSH...").start(),$=await I$();if(!$.allPassed){F.fail("Prerequisites check failed"),console.log(),console.log(W.red("Missing requirements:"));for(let P of $.errors)console.log(W.yellow(` - ${P}`));if(!$.githubSSH.accessible)console.log(W.gray(" Run 'nemar auth setup-ssh' to configure SSH"));return}F.succeed("All prerequisites met");let B=R("Verifying GitHub CLI authentication...").start(),J=await k$(D.githubUsername);if(!J.authenticated){B.fail("GitHub CLI not authenticated"),console.log(W.red(` ${J.error}`)),console.log(),console.log("GitHub CLI is required for sandbox training. Install and authenticate:"),console.log(W.cyan(" brew install gh # or visit https://cli.github.com/")),console.log(W.cyan(" gh auth login"));return}if(D.githubUsername&&!J.matches)B.warn("GitHub CLI user mismatch"),console.log(W.yellow(` ${J.error}`)),console.log(),console.log("Your gh CLI is authenticated as a different GitHub account than your NEMAR account."),console.log("This may cause issues with repository access. To fix:"),console.log(W.cyan(` gh auth login # Login as ${D.githubUsername}`)),console.log(),console.log(W.yellow("WARNING: If upload fails with permission errors, this mismatch is the likely cause.")),console.log();else B.succeed(`GitHub CLI authenticated as ${J.username}`);console.log(),console.log(W.bold("Step 2/6: Generating test dataset..."));let Q=R("Creating minimal BIDS structure...").start(),X;try{let P=ly();X=P.root;let QD=dy(P);Q.succeed(`Test dataset created (${PF(QD)})`),console.log(W.gray(` Location: ${X}`))}catch(P){Q.fail("Failed to generate test dataset"),console.log(W.red(` ${P instanceof Error?P.message:"Unknown error"}`));return}console.log(),console.log(W.bold("Step 3/6: Registering sandbox dataset..."));let Y=R("Creating dataset on NEMAR...").start(),G,H,E,K,V,A;try{let P=await j$({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});G=P.dataset.dataset_id,H=P.dataset.ssh_url,E=P.dataset.github_url,K=P.s3_config,V=P.dataset.s3_prefix,A=P.upload_urls||{},Y.succeed(`Sandbox dataset created: ${W.cyan(G)}`),console.log(W.gray(` GitHub: ${E}`)),await new Promise((QD)=>setTimeout(QD,1e4))}catch(P){if(Y.fail("Failed to create sandbox dataset"),P instanceof c)console.log(W.red(` ${P.message}`));else console.log(W.red(` ${P instanceof Error?P.message:"Unknown error"}`));C1(X);return}let Z=R("Accepting GitHub repository invitation...").start(),U=E?.match(/github\.com\/([a-zA-Z0-9_.-]+\/[a-zA-Z0-9_.-]+)/),L=U?U[1].replace(/\.git$/,""):null;if(!L){Z.fail("Invalid GitHub repository URL from backend"),console.log(W.red(` Received: ${E||"(empty)"}`)),console.log(W.red(" Expected format: https://github.com/owner/repo")),console.log(),console.log("This may indicate a backend issue. Please contact support."),C1(X);return}let M=await v$(L);if(M.accepted)if(M.alreadyCollaborator)Z.succeed("Already a collaborator on this repository");else Z.succeed("GitHub invitation accepted");else Z.warn("Could not auto-accept invitation"),console.log(W.yellow(` ${M.error}`)),console.log(),console.log("You may need to accept the invitation manually:"),console.log(W.cyan(` https://github.com/${L}/invitations`)),console.log();console.log(),console.log(W.bold("Step 4/6: Initializing repository..."));let N=R("Setting up git-annex...").start(),O=D.username&&D.email?{name:D.username,email:D.email}:void 0;try{await P$(X,{author:O}),await S$(X),await y$(X,H),N.succeed("Repository initialized")}catch(P){N.fail("Failed to initialize repository"),console.log(W.red(` ${P instanceof Error?P.message:"Unknown error"}`)),C1(X);return}if(console.log(),console.log(W.bold("Step 5/6: Uploading to S3...")),Object.keys(A).length===0)console.log(W.yellow(" No data files to upload (metadata only)"));else{let P=R("Uploading test data...").start();try{let fD=0,$0=Object.keys(A).length,v=await x$(X,A,{jobs:4,onProgress:(qD)=>{if(qD.status==="completed"||qD.status==="failed")fD++,P.text=`Uploading... ${fD}/${$0} files`}});if(v.failed.length>0){P.fail(`Upload failed for ${v.failed.length} file(s)`);for(let qD of v.failed)console.log(W.red(` Failed: ${qD}`));if(v.error)console.log(W.red(` Error: ${v.error}`));console.log(),console.log(W.yellow("Sandbox training aborted due to upload failures.")),console.log(W.gray("Please check your network connection and try again.")),C1(X);return}P.succeed(`Uploaded ${v.uploaded} file(s)`)}catch(fD){P.fail("Upload failed"),console.log(W.red(` ${fD instanceof Error?fD.message:"Unknown error"}`)),C1(X);return}let QD=R("Registering file URLs...").start();try{let fD={};for(let v of Object.keys(A))fD[v]=`${K.public_url}/${V}/objects/${v}`;let $0=await _$(X,fD);if(!$0.success){QD.fail(`URL registration failed for ${$0.failed.length} file(s)`);for(let v of $0.failed)console.log(W.red(` Failed: ${v}`));console.log(),console.log(W.yellow("Sandbox training aborted due to URL registration failures.")),console.log(W.gray("This may indicate a git-annex configuration issue.")),C1(X);return}QD.succeed(`Registered ${$0.registered} file URLs`)}catch(fD){QD.fail("Failed to register URLs"),console.log(W.red(` ${fD instanceof Error?fD.message:"Unknown error"}`)),C1(X);return}}console.log(),console.log(W.bold("Step 6/6: Pushing to GitHub..."));let b=R("Saving and pushing...").start();try{await M5(X,"Initial sandbox training upload",O),await N5(X),b.succeed("Pushed to GitHub")}catch(P){b.fail("Failed to push to GitHub"),console.log(W.red(` ${P instanceof Error?P.message:"Unknown error"}`)),C1(X);return}let T=R("Finalizing...").start();try{await O$(G),await uv(G),V0("sandboxCompleted",!0),V0("sandboxDatasetId",G),T.succeed("Sandbox training complete!")}catch(P){T.fail("Failed to finalize"),console.log(W.red(` ${P instanceof Error?P.message:"Unknown error"}`)),C1(X);return}C1(X),console.log(),console.log(W.green.bold("Congratulations! Sandbox training completed successfully.")),console.log(),console.log("Your setup is verified and you're ready to upload real datasets:"),console.log(W.cyan(" nemar dataset upload ./your-dataset")),console.log(),console.log(W.gray(`Sandbox dataset: ${G}`))}p$.command("status").description("Check sandbox training completion status").option("--refresh","Fetch latest status from server").action(async(D)=>{if(!jD()){console.log(W.red("Not authenticated")),console.log(W.gray("Run 'nemar auth login' first"));return}if(D.refresh){let F=R("Checking status...").start();try{let $=await lv();if(V0("sandboxCompleted",$.sandbox_completed),$.sandbox_dataset_id)V0("sandboxDatasetId",$.sandbox_dataset_id);if(F.stop(),$.sandbox_completed){if(console.log(W.green("Sandbox training: Completed")),console.log(W.gray(` Dataset ID: ${$.sandbox_dataset_id}`)),$.sandbox_completed_at)console.log(W.gray(` Completed: ${$.sandbox_completed_at}`))}else console.log(W.yellow("Sandbox training: Not completed")),console.log(),console.log("Run sandbox training with:"),console.log(W.cyan(" nemar sandbox"))}catch($){if(F.fail("Failed to check status"),$ instanceof c)console.log(W.red(` ${$.message}`))}}else{let F=F0();if(F.sandboxCompleted)console.log(W.green("Sandbox training: Completed")),console.log(W.gray(` Dataset ID: ${F.sandboxDatasetId}`));else console.log(W.yellow("Sandbox training: Not completed")),console.log(),console.log("Run sandbox training with:"),console.log(W.cyan(" nemar sandbox"))}});p$.command("reset").description("Reset sandbox training status for re-training").option(yD,xD).option(hD,bD).action(async(D)=>{if(!jD()){console.log(W.red("Not authenticated")),console.log(W.gray("Run 'nemar auth login' first"));return}if(!F0().sandboxCompleted){console.log(W.yellow("Sandbox training not yet completed")),console.log(W.gray("Nothing to reset"));return}let $=await gD("Reset sandbox training status? You will need to complete training again.",D);if($!=="confirmed"){console.log(W.gray($==="declined"?"Skipped":"Cancelled"));return}let B=R("Resetting sandbox status...").start();try{await mv(),T2("sandboxCompleted"),T2("sandboxDatasetId"),B.succeed("Sandbox status reset"),console.log(),console.log("Run sandbox training again with:"),console.log(W.cyan(" nemar sandbox"))}catch(J){if(B.fail("Failed to reset"),J instanceof c)console.log(W.red(` ${J.message}`));else console.log(W.red(` ${J instanceof Error?J.message:"Unknown error"}`))}});var py={name:"nemar-cli",version:"0.4.0-PR131.f8c1d25",description:"CLI for NEMAR (Neuroelectromagnetic Data Archive and Tools Resource) dataset management",type:"module",main:"dist/index.js",bin:{nemar:"dist/index.js"},scripts:{dev:"bun run src/index.ts",build:"bun build src/index.ts --outdir dist --target bun --minify && sed '1s|#!/usr/bin/env node|#!/usr/bin/env bun|' dist/index.js > dist/index.js.tmp && mv dist/index.js.tmp dist/index.js",test:"bun test",lint:"biome check src/","lint:fix":"biome check --fix src/",format:"biome format --write src/",typecheck:"tsc --noEmit",prepublishOnly:"bun run build","docs:generate":"bun run scripts/generate-docs.ts","docs:serve":"mkdocs serve","docs:build":"mkdocs build"},keywords:["nemar","bids","neuroimaging","eeg","emg","datalad","cli"],author:"NEMAR Team",license:"MIT",repository:{type:"git",url:"git+https://github.com/nemarOrg/nemar-cli.git"},bugs:{url:"https://github.com/nemarOrg/nemar-cli/issues"},homepage:"https://nemar-cli.pages.dev",engines:{bun:">=1.0.0"},files:["dist","README.md","LICENSE"],dependencies:{chalk:"^5.3.0",commander:"^12.1.0",conf:"^13.0.1",inquirer:"^9.2.15",ora:"^8.0.1",zod:"^3.23.8"},devDependencies:{"@biomejs/biome":"1.9.4","@types/bcryptjs":"^3.0.0","@types/bun":"latest","@types/inquirer":"^9.0.7",bcryptjs:"^3.0.3",typescript:"^5.5.4"}};var cy=py.version;var R1=new B0;R1.name("nemar").description(`CLI for NEMAR (Neuroelectromagnetic Data Archive and Tools Resource)
652
+ `).action(tGD);async function tGD(){if(console.log(),console.log(W.bold("NEMAR Sandbox Training")),console.log(W.gray("Verify your setup and learn the upload workflow")),console.log(),!SD()){console.log(W.red("Not authenticated")),console.log(W.gray("Run 'nemar auth login' first"));return}let D=F0();if(D.sandboxCompleted){console.log(W.green("Sandbox training already completed!")),console.log(W.gray(`Dataset ID: ${D.sandboxDatasetId}`)),console.log(),console.log("You can upload real datasets with:"),console.log(W.cyan(" nemar dataset upload ./your-dataset")),console.log(),console.log(W.gray("To re-run training, use: nemar sandbox reset"));return}console.log(W.bold("Step 1/6: Checking prerequisites..."));let F=R("Checking git-annex and SSH...").start(),$=await I$();if(!$.allPassed){F.fail("Prerequisites check failed"),console.log(),console.log(W.red("Missing requirements:"));for(let P of $.errors)console.log(W.yellow(` - ${P}`));if(!$.githubSSH.accessible)console.log(W.gray(" Run 'nemar auth setup-ssh' to configure SSH"));return}F.succeed("All prerequisites met");let B=R("Verifying GitHub CLI authentication...").start(),J=await k$(D.githubUsername);if(!J.authenticated){B.fail("GitHub CLI not authenticated"),console.log(W.red(` ${J.error}`)),console.log(),console.log("GitHub CLI is required for sandbox training. Install and authenticate:"),console.log(W.cyan(" brew install gh # or visit https://cli.github.com/")),console.log(W.cyan(" gh auth login"));return}if(D.githubUsername&&!J.matches)B.warn("GitHub CLI user mismatch"),console.log(W.yellow(` ${J.error}`)),console.log(),console.log("Your gh CLI is authenticated as a different GitHub account than your NEMAR account."),console.log("This may cause issues with repository access. To fix:"),console.log(W.cyan(` gh auth login # Login as ${D.githubUsername}`)),console.log(),console.log(W.yellow("WARNING: If upload fails with permission errors, this mismatch is the likely cause.")),console.log();else B.succeed(`GitHub CLI authenticated as ${J.username}`);console.log(),console.log(W.bold("Step 2/6: Generating test dataset..."));let Q=R("Creating minimal BIDS structure...").start(),X;try{let P=ly();X=P.root;let QD=dy(P);Q.succeed(`Test dataset created (${PF(QD)})`),console.log(W.gray(` Location: ${X}`))}catch(P){Q.fail("Failed to generate test dataset"),console.log(W.red(` ${P instanceof Error?P.message:"Unknown error"}`));return}console.log(),console.log(W.bold("Step 3/6: Registering sandbox dataset..."));let Y=R("Creating dataset on NEMAR...").start(),G,H,E,K,V,A;try{let P=await j$({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});G=P.dataset.dataset_id,H=P.dataset.ssh_url,E=P.dataset.github_url,K=P.s3_config,V=P.dataset.s3_prefix,A=P.upload_urls||{},Y.succeed(`Sandbox dataset created: ${W.cyan(G)}`),console.log(W.gray(` GitHub: ${E}`)),await new Promise((QD)=>setTimeout(QD,1e4))}catch(P){if(Y.fail("Failed to create sandbox dataset"),P instanceof c)console.log(W.red(` ${P.message}`));else console.log(W.red(` ${P instanceof Error?P.message:"Unknown error"}`));C1(X);return}let Z=R("Accepting GitHub repository invitation...").start(),U=E?.match(/github\.com\/([a-zA-Z0-9_.-]+\/[a-zA-Z0-9_.-]+)/),L=U?U[1].replace(/\.git$/,""):null;if(!L){Z.fail("Invalid GitHub repository URL from backend"),console.log(W.red(` Received: ${E||"(empty)"}`)),console.log(W.red(" Expected format: https://github.com/owner/repo")),console.log(),console.log("This may indicate a backend issue. Please contact support."),C1(X);return}let M=await v$(L);if(M.accepted)if(M.alreadyCollaborator)Z.succeed("Already a collaborator on this repository");else Z.succeed("GitHub invitation accepted");else Z.warn("Could not auto-accept invitation"),console.log(W.yellow(` ${M.error}`)),console.log(),console.log("You may need to accept the invitation manually:"),console.log(W.cyan(` https://github.com/${L}/invitations`)),console.log();console.log(),console.log(W.bold("Step 4/6: Initializing repository..."));let N=R("Setting up git-annex...").start(),O=D.username&&D.email?{name:D.username,email:D.email}:void 0;try{await P$(X,{author:O}),await S$(X),await y$(X,H),N.succeed("Repository initialized")}catch(P){N.fail("Failed to initialize repository"),console.log(W.red(` ${P instanceof Error?P.message:"Unknown error"}`)),C1(X);return}if(console.log(),console.log(W.bold("Step 5/6: Uploading to S3...")),Object.keys(A).length===0)console.log(W.yellow(" No data files to upload (metadata only)"));else{let P=R("Uploading test data...").start();try{let fD=0,$0=Object.keys(A).length,v=await x$(X,A,{jobs:4,onProgress:(qD)=>{if(qD.status==="completed"||qD.status==="failed")fD++,P.text=`Uploading... ${fD}/${$0} files`}});if(v.failed.length>0){P.fail(`Upload failed for ${v.failed.length} file(s)`);for(let qD of v.failed)console.log(W.red(` Failed: ${qD}`));if(v.error)console.log(W.red(` Error: ${v.error}`));console.log(),console.log(W.yellow("Sandbox training aborted due to upload failures.")),console.log(W.gray("Please check your network connection and try again.")),C1(X);return}P.succeed(`Uploaded ${v.uploaded} file(s)`)}catch(fD){P.fail("Upload failed"),console.log(W.red(` ${fD instanceof Error?fD.message:"Unknown error"}`)),C1(X);return}let QD=R("Registering file URLs...").start();try{let fD={};for(let v of Object.keys(A))fD[v]=`${K.public_url}/${V}/objects/${v}`;let $0=await _$(X,fD);if(!$0.success){QD.fail(`URL registration failed for ${$0.failed.length} file(s)`);for(let v of $0.failed)console.log(W.red(` Failed: ${v}`));console.log(),console.log(W.yellow("Sandbox training aborted due to URL registration failures.")),console.log(W.gray("This may indicate a git-annex configuration issue.")),C1(X);return}QD.succeed(`Registered ${$0.registered} file URLs`)}catch(fD){QD.fail("Failed to register URLs"),console.log(W.red(` ${fD instanceof Error?fD.message:"Unknown error"}`)),C1(X);return}}console.log(),console.log(W.bold("Step 6/6: Pushing to GitHub..."));let b=R("Saving and pushing...").start();try{await M5(X,"Initial sandbox training upload",O),await N5(X),b.succeed("Pushed to GitHub")}catch(P){b.fail("Failed to push to GitHub"),console.log(W.red(` ${P instanceof Error?P.message:"Unknown error"}`)),C1(X);return}let T=R("Finalizing...").start();try{await O$(G),await uv(G),V0("sandboxCompleted",!0),V0("sandboxDatasetId",G),T.succeed("Sandbox training complete!")}catch(P){T.fail("Failed to finalize"),console.log(W.red(` ${P instanceof Error?P.message:"Unknown error"}`)),C1(X);return}C1(X),console.log(),console.log(W.green.bold("Congratulations! Sandbox training completed successfully.")),console.log(),console.log("Your setup is verified and you're ready to upload real datasets:"),console.log(W.cyan(" nemar dataset upload ./your-dataset")),console.log(),console.log(W.gray(`Sandbox dataset: ${G}`))}p$.command("status").description("Check sandbox training completion status").option("--refresh","Fetch latest status from server").action(async(D)=>{if(!SD()){console.log(W.red("Not authenticated")),console.log(W.gray("Run 'nemar auth login' first"));return}if(D.refresh){let F=R("Checking status...").start();try{let $=await lv();if(V0("sandboxCompleted",$.sandbox_completed),$.sandbox_dataset_id)V0("sandboxDatasetId",$.sandbox_dataset_id);if(F.stop(),$.sandbox_completed){if(console.log(W.green("Sandbox training: Completed")),console.log(W.gray(` Dataset ID: ${$.sandbox_dataset_id}`)),$.sandbox_completed_at)console.log(W.gray(` Completed: ${$.sandbox_completed_at}`))}else console.log(W.yellow("Sandbox training: Not completed")),console.log(),console.log("Run sandbox training with:"),console.log(W.cyan(" nemar sandbox"))}catch($){if(F.fail("Failed to check status"),$ instanceof c)console.log(W.red(` ${$.message}`))}}else{let F=F0();if(F.sandboxCompleted)console.log(W.green("Sandbox training: Completed")),console.log(W.gray(` Dataset ID: ${F.sandboxDatasetId}`));else console.log(W.yellow("Sandbox training: Not completed")),console.log(),console.log("Run sandbox training with:"),console.log(W.cyan(" nemar sandbox"))}});p$.command("reset").description("Reset sandbox training status for re-training").option(yD,xD).option(hD,bD).action(async(D)=>{if(!SD()){console.log(W.red("Not authenticated")),console.log(W.gray("Run 'nemar auth login' first"));return}if(!F0().sandboxCompleted){console.log(W.yellow("Sandbox training not yet completed")),console.log(W.gray("Nothing to reset"));return}let $=await gD("Reset sandbox training status? You will need to complete training again.",D);if($!=="confirmed"){console.log(W.gray($==="declined"?"Skipped":"Cancelled"));return}let B=R("Resetting sandbox status...").start();try{await mv(),T2("sandboxCompleted"),T2("sandboxDatasetId"),B.succeed("Sandbox status reset"),console.log(),console.log("Run sandbox training again with:"),console.log(W.cyan(" nemar sandbox"))}catch(J){if(B.fail("Failed to reset"),J instanceof c)console.log(W.red(` ${J.message}`));else console.log(W.red(` ${J instanceof Error?J.message:"Unknown error"}`))}});var py={name:"nemar-cli",version:"0.4.0-PR132.bad97bd",description:"CLI for NEMAR (Neuroelectromagnetic Data Archive and Tools Resource) dataset management",type:"module",main:"dist/index.js",bin:{nemar:"dist/index.js"},scripts:{dev:"bun run src/index.ts",build:"bun build src/index.ts --outdir dist --target bun --minify && sed '1s|#!/usr/bin/env node|#!/usr/bin/env bun|' dist/index.js > dist/index.js.tmp && mv dist/index.js.tmp dist/index.js",test:"bun test",lint:"biome check src/","lint:fix":"biome check --fix src/",format:"biome format --write src/",typecheck:"tsc --noEmit",prepublishOnly:"bun run build","docs:generate":"bun run scripts/generate-docs.ts","docs:serve":"mkdocs serve","docs:build":"mkdocs build"},keywords:["nemar","bids","neuroimaging","eeg","emg","datalad","cli"],author:"NEMAR Team",license:"MIT",repository:{type:"git",url:"git+https://github.com/nemarOrg/nemar-cli.git"},bugs:{url:"https://github.com/nemarOrg/nemar-cli/issues"},homepage:"https://nemar-cli.pages.dev",engines:{bun:">=1.0.0"},files:["dist","README.md","LICENSE"],dependencies:{chalk:"^5.3.0",commander:"^12.1.0",conf:"^13.0.1",inquirer:"^9.2.15",ora:"^8.0.1",zod:"^3.23.8"},devDependencies:{"@biomejs/biome":"1.9.4","@types/bcryptjs":"^3.0.0","@types/bun":"latest","@types/inquirer":"^9.0.7",bcryptjs:"^3.0.3",typescript:"^5.5.4"}};var cy=py.version;var R1=new B0;R1.name("nemar").description(`CLI for NEMAR (Neuroelectromagnetic Data Archive and Tools Resource)
653
653
 
654
654
  NEMAR is a curated repository for neurophysiology data in BIDS format.
655
655
  This CLI provides tools for uploading, downloading, and managing datasets.`).version(cy,"-v, --version","Output the current version").option("--no-color","Disable colored output").option("--verbose","Enable verbose output").addHelpText("after",`