nemar-cli 0.9.16-PR1270.77e63ab → 0.9.16-PR1270.c5dddae
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +3 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -81,7 +81,7 @@ ${Mr.cursorShow}`)}releaseCursor(){if(this.extraLinesUnderPrompt>0)wb(this.rl,th
|
|
|
81
81
|
${t}`,Ewe,Swe,$we=(e,t,r)=>{let n=r===""?"":`with ${r.trim()}() `,i=Dwe.bind(null,n,t.toString());Object.defineProperty(i,"name",Swe);let{writable:o,enumerable:s,configurable:a}=Ewe;Object.defineProperty(e,"toString",{value:i,writable:o,enumerable:s,configurable:a})};var D_=O(()=>{Ewe=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),Swe=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name")});var wm,P5=(e,t={})=>{if(typeof e!=="function")throw TypeError("Expected a function");let r,n=0,i=e.displayName||e.name||"<anonymous>",o=function(...s){if(wm.set(o,++n),n===1)r=e.apply(this,s),e=void 0;else if(t.throw===!0)throw Error(`Function \`${i}\` can only be called once`);return r};return Eu(o,e),wm.set(o,n),o},I5;var T5=O(()=>{D_();wm=new WeakMap;P5.callCount=(e)=>{if(!wm.has(e))throw Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return wm.get(e)};I5=P5});var Ps;var N5=O(()=>{Ps=[];Ps.push("SIGHUP","SIGINT","SIGTERM");if(process.platform!=="win32")Ps.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");if(process.platform==="linux")Ps.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT")});class q5{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(S_[E_])return S_[E_];Cwe(S_,E_,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(e,t){this.listeners[e].push(t)}removeListener(e,t){let r=this.listeners[e],n=r.indexOf(t);if(n===-1)return;if(n===0&&r.length===1)r.length=0;else r.splice(n,1)}emit(e,t,r){if(this.emitted[e])return!1;this.emitted[e]=!0;let n=!1;for(let i of this.listeners[e])n=i(t,r)===!0||n;if(e==="exit")n=this.emit("afterExit",t,r)||n;return n}}class C_{}var Dm=(e)=>!!e&&typeof e==="object"&&typeof e.removeListener==="function"&&typeof e.emit==="function"&&typeof e.reallyExit==="function"&&typeof e.listeners==="function"&&typeof e.kill==="function"&&typeof e.pid==="number"&&typeof e.on==="function",E_,S_,Cwe,Rwe=(e)=>({onExit(t,r){return e.onExit(t,r)},load(){return e.load()},unload(){return e.unload()}}),j5,M5,$_,B5,AQe,FQe;var L5=O(()=>{N5();E_=Symbol.for("signal-exit emitter"),S_=globalThis,Cwe=Object.defineProperty.bind(Object);j5=class j5 extends C_{onExit(){return()=>{}}load(){}unload(){}};M5=class M5 extends C_{#r=$_.platform==="win32"?"SIGINT":"SIGHUP";#t=new q5;#e;#i;#f;#n={};#s=!1;constructor(e){super();this.#e=e,this.#n={};for(let t of Ps)this.#n[t]=()=>{let r=this.#e.listeners(t),{count:n}=this.#t,i=e;if(typeof i.__signal_exit_emitter__==="object"&&typeof i.__signal_exit_emitter__.count==="number")n+=i.__signal_exit_emitter__.count;if(r.length===n){this.unload();let o=this.#t.emit("exit",null,t),s=t==="SIGHUP"?this.#r:t;if(!o)e.kill(e.pid,s)}};this.#f=e.reallyExit,this.#i=e.emit}onExit(e,t){if(!Dm(this.#e))return()=>{};if(this.#s===!1)this.load();let r=t?.alwaysLast?"afterExit":"exit";return this.#t.on(r,e),()=>{if(this.#t.removeListener(r,e),this.#t.listeners.exit.length===0&&this.#t.listeners.afterExit.length===0)this.unload()}}load(){if(this.#s)return;this.#s=!0,this.#t.count+=1;for(let e of Ps)try{let t=this.#n[e];if(t)this.#e.on(e,t)}catch(t){}this.#e.emit=(e,...t)=>this.#p(e,...t),this.#e.reallyExit=(e)=>this.#o(e)}unload(){if(!this.#s)return;this.#s=!1,Ps.forEach((e)=>{let t=this.#n[e];if(!t)throw Error("Listener not defined for signal: "+e);try{this.#e.removeListener(e,t)}catch(r){}}),this.#e.emit=this.#i,this.#e.reallyExit=this.#f,this.#t.count-=1}#o(e){if(!Dm(this.#e))return 0;return this.#e.exitCode=e||0,this.#t.emit("exit",this.#e.exitCode,null),this.#f.call(this.#e,this.#e.exitCode)}#p(e,...t){let r=this.#i;if(e==="exit"&&Dm(this.#e)){if(typeof t[0]==="number")this.#e.exitCode=t[0];let n=r.call(this.#e,e,...t);return this.#t.emit("exit",this.#e.exitCode,null),n}else return r.call(this.#e,e,...t)}};$_=globalThis.process,{onExit:B5,load:AQe,unload:FQe}=Rwe(Dm($_)?new M5($_):new j5)});import Em from"process";var U5,Owe,V5;var G5=O(()=>{T5();L5();U5=Em.stderr.isTTY?Em.stderr:Em.stdout.isTTY?Em.stdout:void 0,Owe=U5?I5(()=>{B5(()=>{U5.write("\x1B[?25h")},{alwaysLast:!0})}):()=>{},V5=Owe});import z5 from"process";var Sm=!1,gc,R_;var H5=O(()=>{G5();gc={};gc.show=(e=z5.stderr)=>{if(!e.isTTY)return;Sm=!1,e.write("\x1B[?25h")};gc.hide=(e=z5.stderr)=>{if(!e.isTTY)return;V5(),Sm=!0,e.write("\x1B[?25l")};gc.toggle=(e,t)=>{if(e!==void 0)Sm=e;if(Sm)gc.show(t);else gc.hide(t)};R_=gc});import Sn from"process";function O_(){if(Sn.platform!=="win32")return Sn.env.TERM!=="linux";return Boolean(Sn.env.CI)||Boolean(Sn.env.WT_SESSION)||Boolean(Sn.env.TERMINUS_SUBLIME)||Sn.env.ConEmuTask==="{cmd::Cmder}"||Sn.env.TERM_PROGRAM==="Terminus-Sublime"||Sn.env.TERM_PROGRAM==="vscode"||Sn.env.TERM==="xterm-256color"||Sn.env.TERM==="alacritty"||Sn.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var W5=()=>{};var kwe,Awe,Fwe,Su;var K5=O(()=>{Ke();W5();kwe={info:l.blue("\u2139"),success:l.green("\u2714"),warning:l.yellow("\u26A0"),error:l.red("\u2716")},Awe={info:l.blue("i"),success:l.green("\u221A"),warning:l.yellow("\u203C"),error:l.red("\xD7")},Fwe=O_()?kwe:Awe,Su=Fwe});function k_({onlyFirst:e=!1}={}){return new RegExp("(?:\\u001B\\][\\s\\S]*?(?:\\u0007|\\u001B\\u005C|\\u009C))|[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]",e?void 0:"g")}function $u(e){if(typeof e!=="string")throw TypeError(`Expected a \`string\`, got \`${typeof e}\``);return e.replace(Pwe,"")}var Pwe;var A_=O(()=>{Pwe=k_()});function Y5(e){return e===161||e===164||e===167||e===168||e===170||e===173||e===174||e>=176&&e<=180||e>=182&&e<=186||e>=188&&e<=191||e===198||e===208||e===215||e===216||e>=222&&e<=225||e===230||e>=232&&e<=234||e===236||e===237||e===240||e===242||e===243||e>=247&&e<=250||e===252||e===254||e===257||e===273||e===275||e===283||e===294||e===295||e===299||e>=305&&e<=307||e===312||e>=319&&e<=322||e===324||e>=328&&e<=331||e===333||e===338||e===339||e===358||e===359||e===363||e===462||e===464||e===466||e===468||e===470||e===472||e===474||e===476||e===593||e===609||e===708||e===711||e>=713&&e<=715||e===717||e===720||e>=728&&e<=731||e===733||e===735||e>=768&&e<=879||e>=913&&e<=929||e>=931&&e<=937||e>=945&&e<=961||e>=963&&e<=969||e===1025||e>=1040&&e<=1103||e===1105||e===8208||e>=8211&&e<=8214||e===8216||e===8217||e===8220||e===8221||e>=8224&&e<=8226||e>=8228&&e<=8231||e===8240||e===8242||e===8243||e===8245||e===8251||e===8254||e===8308||e===8319||e>=8321&&e<=8324||e===8364||e===8451||e===8453||e===8457||e===8467||e===8470||e===8481||e===8482||e===8486||e===8491||e===8531||e===8532||e>=8539&&e<=8542||e>=8544&&e<=8555||e>=8560&&e<=8569||e===8585||e>=8592&&e<=8601||e===8632||e===8633||e===8658||e===8660||e===8679||e===8704||e===8706||e===8707||e===8711||e===8712||e===8715||e===8719||e===8721||e===8725||e===8730||e>=8733&&e<=8736||e===8739||e===8741||e>=8743&&e<=8748||e===8750||e>=8756&&e<=8759||e===8764||e===8765||e===8776||e===8780||e===8786||e===8800||e===8801||e>=8804&&e<=8807||e===8810||e===8811||e===8814||e===8815||e===8834||e===8835||e===8838||e===8839||e===8853||e===8857||e===8869||e===8895||e===8978||e>=9312&&e<=9449||e>=9451&&e<=9547||e>=9552&&e<=9587||e>=9600&&e<=9615||e>=9618&&e<=9621||e===9632||e===9633||e>=9635&&e<=9641||e===9650||e===9651||e===9654||e===9655||e===9660||e===9661||e===9664||e===9665||e>=9670&&e<=9672||e===9675||e>=9678&&e<=9681||e>=9698&&e<=9701||e===9711||e===9733||e===9734||e===9737||e===9742||e===9743||e===9756||e===9758||e===9792||e===9794||e===9824||e===9825||e>=9827&&e<=9829||e>=9831&&e<=9834||e===9836||e===9837||e===9839||e===9886||e===9887||e===9919||e>=9926&&e<=9933||e>=9935&&e<=9939||e>=9941&&e<=9953||e===9955||e===9960||e===9961||e>=9963&&e<=9969||e===9972||e>=9974&&e<=9977||e===9979||e===9980||e===9982||e===9983||e===10045||e>=10102&&e<=10111||e>=11094&&e<=11097||e>=12872&&e<=12879||e>=57344&&e<=63743||e>=65024&&e<=65039||e===65533||e>=127232&&e<=127242||e>=127248&&e<=127277||e>=127280&&e<=127337||e>=127344&&e<=127373||e===127375||e===127376||e>=127387&&e<=127404||e>=917760&&e<=917999||e>=983040&&e<=1048573||e>=1048576&&e<=1114109}function J5(e){return e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510}function X5(e){return e>=4352&&e<=4447||e===8986||e===8987||e===9001||e===9002||e>=9193&&e<=9196||e===9200||e===9203||e===9725||e===9726||e===9748||e===9749||e>=9776&&e<=9783||e>=9800&&e<=9811||e===9855||e>=9866&&e<=9871||e===9875||e===9889||e===9898||e===9899||e===9917||e===9918||e===9924||e===9925||e===9934||e===9940||e===9962||e===9970||e===9971||e===9973||e===9978||e===9981||e===9989||e===9994||e===9995||e===10024||e===10060||e===10062||e>=10067&&e<=10069||e===10071||e>=10133&&e<=10135||e===10160||e===10175||e===11035||e===11036||e===11088||e===11093||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12773||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=94176&&e<=94180||e>=94192&&e<=94198||e>=94208&&e<=101589||e>=101631&&e<=101662||e>=101760&&e<=101874||e>=110576&&e<=110579||e>=110581&&e<=110587||e===110589||e===110590||e>=110592&&e<=110882||e===110898||e>=110928&&e<=110930||e===110933||e>=110948&&e<=110951||e>=110960&&e<=111355||e>=119552&&e<=119638||e>=119648&&e<=119670||e===126980||e===127183||e===127374||e>=127377&&e<=127386||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||e===127568||e===127569||e>=127584&&e<=127589||e>=127744&&e<=127776||e>=127789&&e<=127797||e>=127799&&e<=127868||e>=127870&&e<=127891||e>=127904&&e<=127946||e>=127951&&e<=127955||e>=127968&&e<=127984||e===127988||e>=127992&&e<=128062||e===128064||e>=128066&&e<=128252||e>=128255&&e<=128317||e>=128331&&e<=128334||e>=128336&&e<=128359||e===128378||e===128405||e===128406||e===128420||e>=128507&&e<=128591||e>=128640&&e<=128709||e===128716||e>=128720&&e<=128722||e>=128725&&e<=128728||e>=128732&&e<=128735||e===128747||e===128748||e>=128756&&e<=128764||e>=128992&&e<=129003||e===129008||e>=129292&&e<=129338||e>=129340&&e<=129349||e>=129351&&e<=129535||e>=129648&&e<=129660||e>=129664&&e<=129674||e>=129678&&e<=129734||e===129736||e>=129741&&e<=129756||e>=129759&&e<=129770||e>=129775&&e<=129784||e>=131072&&e<=196605||e>=196608&&e<=262141}var Q5=()=>{};function Iwe(e){if(!Number.isSafeInteger(e))throw TypeError(`Expected a code point, got \`${typeof e}\`.`)}function Z5(e,{ambiguousAsWide:t=!1}={}){if(Iwe(e),J5(e)||X5(e)||t&&Y5(e))return 2;return 1}var eN=O(()=>{Q5()});var tN=()=>/[#*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;function F_(e,t={}){if(typeof e!=="string"||e.length===0)return 0;let{ambiguousIsNarrow:r=!0,countAnsiEscapeCodes:n=!1}=t;if(!n)e=$u(e);if(e.length===0)return 0;let i=0,o={ambiguousAsWide:!r};for(let{segment:s}of Twe.segment(e)){let a=s.codePointAt(0);if(a<=31||a>=127&&a<=159)continue;if(a>=8203&&a<=8207||a===65279)continue;if(a>=768&&a<=879||a>=6832&&a<=6911||a>=7616&&a<=7679||a>=8400&&a<=8447||a>=65056&&a<=65071)continue;if(a>=55296&&a<=57343)continue;if(a>=65024&&a<=65039)continue;if(Nwe.test(s))continue;if(tN().test(s)){i+=2;continue}i+=Z5(a,o)}return i}var Twe,Nwe;var rN=O(()=>{A_();eN();Twe=new Intl.Segmenter,Nwe=/^\p{Default_Ignorable_Code_Point}$/u});function P_({stream:e=process.stdout}={}){return Boolean(e&&e.isTTY&&process.env.TERM!=="dumb"&&!("CI"in process.env))}import nN from"process";function I_(){let{env:e}=nN,{TERM:t,TERM_PROGRAM:r}=e;if(nN.platform!=="win32")return t!=="linux";return Boolean(e.WT_SESSION)||Boolean(e.TERMINUS_SUBLIME)||e.ConEmuTask==="{cmd::Cmder}"||r==="Terminus-Sublime"||r==="vscode"||t==="xterm-256color"||t==="alacritty"||t==="rxvt-unicode"||t==="rxvt-unicode-256color"||e.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var iN=()=>{};import ci from"process";class oN{#r=0;start(){if(this.#r++,this.#r===1)this.#t()}stop(){if(this.#r<=0)throw Error("`stop` called more times than `start`");if(this.#r--,this.#r===0)this.#e()}#t(){if(ci.platform==="win32"||!ci.stdin.isTTY)return;ci.stdin.setRawMode(!0),ci.stdin.on("data",this.#i),ci.stdin.resume()}#e(){if(!ci.stdin.isTTY)return;ci.stdin.off("data",this.#i),ci.stdin.pause(),ci.stdin.setRawMode(!1)}#i(e){if(e[0]===qwe)ci.emit("SIGINT")}}var qwe=3,jwe,T_;var sN=O(()=>{jwe=new oN,T_=jwe});import $m from"process";class aN{#r=0;#t=!1;#e=0;#i=-1;#f=0;#n;#s;#o;#p;#h;#l;#u;#d;#g;#a;#c;color;constructor(e){if(typeof e==="string")e={text:e};if(this.#n={color:"cyan",stream:$m.stderr,discardStdin:!0,hideCursor:!0,...e},this.color=this.#n.color,this.spinner=this.#n.spinner,this.#h=this.#n.interval,this.#o=this.#n.stream,this.#l=typeof this.#n.isEnabled==="boolean"?this.#n.isEnabled:P_({stream:this.#o}),this.#u=typeof this.#n.isSilent==="boolean"?this.#n.isSilent:!1,this.text=this.#n.text,this.prefixText=this.#n.prefixText,this.suffixText=this.#n.suffixText,this.indent=this.#n.indent,$m.env.NODE_ENV==="test")this._stream=this.#o,this._isEnabled=this.#l,Object.defineProperty(this,"_linesToClear",{get(){return this.#r},set(t){this.#r=t}}),Object.defineProperty(this,"_frameIndex",{get(){return this.#i}}),Object.defineProperty(this,"_lineCount",{get(){return this.#e}})}get indent(){return this.#d}set indent(e=0){if(!(e>=0&&Number.isInteger(e)))throw Error("The `indent` option must be an integer from 0 and up");this.#d=e,this.#m()}get interval(){return this.#h??this.#s.interval??100}get spinner(){return this.#s}set spinner(e){if(this.#i=-1,this.#h=void 0,typeof e==="object"){if(e.frames===void 0)throw Error("The given spinner must have a `frames` property");this.#s=e}else if(!I_())this.#s=Cu.default.line;else if(e===void 0)this.#s=Cu.default.dots;else if(e!=="default"&&Cu.default[e])this.#s=Cu.default[e];else throw Error(`There is no built-in spinner named '${e}'. See https://github.com/sindresorhus/cli-spinners/blob/main/spinners.json for a full list.`)}get text(){return this.#g}set text(e=""){this.#g=e,this.#m()}get prefixText(){return this.#a}set prefixText(e=""){this.#a=e,this.#m()}get suffixText(){return this.#c}set suffixText(e=""){this.#c=e,this.#m()}get isSpinning(){return this.#p!==void 0}#y(e=this.#a,t=" "){if(typeof e==="string"&&e!=="")return e+t;if(typeof e==="function")return e()+t;return""}#x(e=this.#c,t=" "){if(typeof e==="string"&&e!=="")return t+e;if(typeof e==="function")return t+e();return""}#m(){let e=this.#o.columns??80,t=this.#y(this.#a,"-"),r=this.#x(this.#c,"-"),n=" ".repeat(this.#d)+t+"--"+this.#g+"--"+r;this.#e=0;for(let i of $u(n).split(`
|
|
82
82
|
`))this.#e+=Math.max(1,Math.ceil(F_(i,{countAnsiEscapeCodes:!0})/e))}get isEnabled(){return this.#l&&!this.#u}set isEnabled(e){if(typeof e!=="boolean")throw TypeError("The `isEnabled` option must be a boolean");this.#l=e}get isSilent(){return this.#u}set isSilent(e){if(typeof e!=="boolean")throw TypeError("The `isSilent` option must be a boolean");this.#u=e}frame(){let e=Date.now();if(this.#i===-1||e-this.#f>=this.interval)this.#i=++this.#i%this.#s.frames.length,this.#f=e;let{frames:t}=this.#s,r=t[this.#i];if(this.color)r=l[this.color](r);let n=typeof this.#a==="string"&&this.#a!==""?this.#a+" ":"",i=typeof this.text==="string"?" "+this.text:"",o=typeof this.#c==="string"&&this.#c!==""?" "+this.#c:"";return n+r+i+o}clear(){if(!this.#l||!this.#o.isTTY)return this;this.#o.cursorTo(0);for(let e=0;e<this.#r;e++){if(e>0)this.#o.moveCursor(0,-1);this.#o.clearLine(1)}if(this.#d||this.lastIndent!==this.#d)this.#o.cursorTo(this.#d);return this.lastIndent=this.#d,this.#r=0,this}render(){if(this.#u)return this;return this.clear(),this.#o.write(this.frame()),this.#r=this.#e,this}start(e){if(e)this.text=e;if(this.#u)return this;if(!this.#l){if(this.text)this.#o.write(`- ${this.text}
|
|
83
83
|
`);return this}if(this.isSpinning)return this;if(this.#n.hideCursor)R_.hide(this.#o);if(this.#n.discardStdin&&$m.stdin.isTTY)this.#t=!0,T_.start();return this.render(),this.#p=setInterval(this.render.bind(this),this.interval),this}stop(){if(!this.#l)return this;if(clearInterval(this.#p),this.#p=void 0,this.#i=0,this.clear(),this.#n.hideCursor)R_.show(this.#o);if(this.#n.discardStdin&&$m.stdin.isTTY&&this.#t)T_.stop(),this.#t=!1;return this}succeed(e){return this.stopAndPersist({symbol:Su.success,text:e})}fail(e){return this.stopAndPersist({symbol:Su.error,text:e})}warn(e){return this.stopAndPersist({symbol:Su.warning,text:e})}info(e){return this.stopAndPersist({symbol:Su.info,text:e})}stopAndPersist(e={}){if(this.#u)return this;let t=e.prefixText??this.#a,r=this.#y(t," "),n=e.symbol??" ",i=e.text??this.text,s=typeof i==="string"?(n?" ":"")+i:"",a=e.suffixText??this.#c,c=this.#x(a," "),u=r+n+s+c+`
|
|
84
|
-
`;return this.stop(),this.#o.write(u),this}}function w(e){return new aN(e)}var Cu,Mwe;var $n=O(()=>{Ke();H5();K5();A_();rN();iN();sN();Cu=ce(_p(),1),Mwe=ce(_p(),1)});var Ee,uN,V,Bi=(e)=>{switch(typeof e){case"undefined":return V.undefined;case"string":return V.string;case"number":return Number.isNaN(e)?V.nan:V.number;case"boolean":return V.boolean;case"function":return V.function;case"bigint":return V.bigint;case"symbol":return V.symbol;case"object":if(Array.isArray(e))return V.array;if(e===null)return V.null;if(e.then&&typeof e.then==="function"&&e.catch&&typeof e.catch==="function")return V.promise;if(typeof Map<"u"&&e instanceof Map)return V.map;if(typeof Set<"u"&&e instanceof Set)return V.set;if(typeof Date<"u"&&e instanceof Date)return V.date;return V.object;default:return V.unknown}};var Ru=O(()=>{(function(e){e.assertEqual=(i)=>{};function t(i){}e.assertIs=t;function r(i){throw Error()}e.assertNever=r,e.arrayToEnum=(i)=>{let o={};for(let s of i)o[s]=s;return o},e.getValidEnumValues=(i)=>{let o=e.objectKeys(i).filter((a)=>typeof i[i[a]]!=="number"),s={};for(let a of o)s[a]=i[a];return e.objectValues(s)},e.objectValues=(i)=>e.objectKeys(i).map(function(o){return i[o]}),e.objectKeys=typeof Object.keys==="function"?(i)=>Object.keys(i):(i)=>{let o=[];for(let s in i)if(Object.prototype.hasOwnProperty.call(i,s))o.push(s);return o},e.find=(i,o)=>{for(let s of i)if(o(s))return s;return},e.isInteger=typeof Number.isInteger==="function"?(i)=>Number.isInteger(i):(i)=>typeof i==="number"&&Number.isFinite(i)&&Math.floor(i)===i;function n(i,o=" | "){return i.map((s)=>typeof s==="string"?`'${s}'`:s).join(o)}e.joinValues=n,e.jsonStringifyReplacer=(i,o)=>{if(typeof o==="bigint")return o.toString();return o}})(Ee||(Ee={}));(function(e){e.mergeShapes=(t,r)=>({...t,...r})})(uN||(uN={}));V=Ee.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"])});var I,Gr;var Cm=O(()=>{Ru();I=Ee.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"]);Gr=class Gr extends Error{get errors(){return this.issues}constructor(e){super();this.issues=[],this.addIssue=(r)=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};let t=new.target.prototype;if(Object.setPrototypeOf)Object.setPrototypeOf(this,t);else this.__proto__=t;this.name="ZodError",this.issues=e}format(e){let t=e||function(i){return i.message},r={_errors:[]},n=(i)=>{for(let o of i.issues)if(o.code==="invalid_union")o.unionErrors.map(n);else if(o.code==="invalid_return_type")n(o.returnTypeError);else if(o.code==="invalid_arguments")n(o.argumentsError);else if(o.path.length===0)r._errors.push(t(o));else{let s=r,a=0;while(a<o.path.length){let c=o.path[a];if(a!==o.path.length-1)s[c]=s[c]||{_errors:[]};else s[c]=s[c]||{_errors:[]},s[c]._errors.push(t(o));s=s[c],a++}}};return n(this),r}static assert(e){if(!(e instanceof Gr))throw Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Ee.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=(t)=>t.message){let t={},r=[];for(let n of this.issues)if(n.path.length>0){let i=n.path[0];t[i]=t[i]||[],t[i].push(e(n))}else r.push(e(n));return{formErrors:r,fieldErrors:t}}get formErrors(){return this.flatten()}};Gr.create=(e)=>new Gr(e)});var Bwe=(e,t)=>{let r;switch(e.code){case I.invalid_type:if(e.received===V.undefined)r="Required";else r=`Expected ${e.expected}, received ${e.received}`;break;case I.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,Ee.jsonStringifyReplacer)}`;break;case I.unrecognized_keys:r=`Unrecognized key(s) in object: ${Ee.joinValues(e.keys,", ")}`;break;case I.invalid_union:r="Invalid input";break;case I.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${Ee.joinValues(e.options)}`;break;case I.invalid_enum_value:r=`Invalid enum value. Expected ${Ee.joinValues(e.options)}, received '${e.received}'`;break;case I.invalid_arguments:r="Invalid function arguments";break;case I.invalid_return_type:r="Invalid function return type";break;case I.invalid_date:r="Invalid date";break;case I.invalid_string:if(typeof e.validation==="object")if("includes"in e.validation){if(r=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position==="number")r=`${r} at one or more positions greater than or equal to ${e.validation.position}`}else if("startsWith"in e.validation)r=`Invalid input: must start with "${e.validation.startsWith}"`;else if("endsWith"in e.validation)r=`Invalid input: must end with "${e.validation.endsWith}"`;else Ee.assertNever(e.validation);else if(e.validation!=="regex")r=`Invalid ${e.validation}`;else r="Invalid";break;case I.too_small:if(e.type==="array")r=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`;else if(e.type==="string")r=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`;else if(e.type==="number")r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`;else if(e.type==="bigint")r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`;else if(e.type==="date")r=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`;else r="Invalid input";break;case I.too_big:if(e.type==="array")r=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`;else if(e.type==="string")r=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`;else if(e.type==="number")r=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`;else if(e.type==="bigint")r=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`;else if(e.type==="date")r=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`;else r="Invalid input";break;case I.custom:r="Invalid input";break;case I.invalid_intersection_types:r="Intersection results could not be merged";break;case I.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case I.not_finite:r="Number must be finite";break;default:r=t.defaultError,Ee.assertNever(e)}return{message:r}},Vo;var N_=O(()=>{Cm();Ru();Vo=Bwe});function Ou(){return Lwe}var Lwe;var Rm=O(()=>{N_();Lwe=Vo});function L(e,t){let r=Ou(),n=Om({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,r,r===Vo?void 0:Vo].filter((i)=>!!i)});e.common.issues.push(n)}class Zt{constructor(){this.value="valid"}dirty(){if(this.value==="valid")this.value="dirty"}abort(){if(this.value!=="aborted")this.value="aborted"}static mergeArray(e,t){let r=[];for(let n of t){if(n.status==="aborted")return ne;if(n.status==="dirty")e.dirty();r.push(n.value)}return{status:e.value,value:r}}static async mergeObjectAsync(e,t){let r=[];for(let n of t){let i=await n.key,o=await n.value;r.push({key:i,value:o})}return Zt.mergeObjectSync(e,r)}static mergeObjectSync(e,t){let r={};for(let n of t){let{key:i,value:o}=n;if(i.status==="aborted")return ne;if(o.status==="aborted")return ne;if(i.status==="dirty")e.dirty();if(o.status==="dirty")e.dirty();if(i.value!=="__proto__"&&(typeof o.value<"u"||n.alwaysSet))r[i.value]=o.value}return{status:e.value,value:r}}}var Om=(e)=>{let{data:t,path:r,errorMaps:n,issueData:i}=e,o=[...r,...i.path||[]],s={...i,path:o};if(i.message!==void 0)return{...i,path:o,message:i.message};let a="",c=n.filter((u)=>!!u).slice().reverse();for(let u of c)a=u(s,{data:t,defaultError:a}).message;return{...i,path:o,message:a}},ne,yc=(e)=>({status:"dirty",value:e}),dr=(e)=>({status:"valid",value:e}),q_=(e)=>e.status==="aborted",j_=(e)=>e.status==="dirty",Is=(e)=>e.status==="valid",ku=(e)=>typeof Promise<"u"&&e instanceof Promise;var M_=O(()=>{Rm();N_();ne=Object.freeze({status:"aborted"})});var dN=()=>{};var J;var fN=O(()=>{(function(e){e.errToObj=(t)=>typeof t==="string"?{message:t}:t||{},e.toString=(t)=>typeof t==="string"?t:t?.message})(J||(J={}))});class Cn{constructor(e,t,r,n){this._cachedPath=[],this.parent=e,this.data=t,this._path=r,this._key=n}get path(){if(!this._cachedPath.length)if(Array.isArray(this._key))this._cachedPath.push(...this._path,...this._key);else this._cachedPath.push(...this._path,this._key);return this._cachedPath}}function me(e){if(!e)return{};let{errorMap:t,invalid_type_error:r,required_error:n,description:i}=e;if(t&&(r||n))throw Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);if(t)return{errorMap:t,description:i};return{errorMap:(s,a)=>{let{message:c}=e;if(s.code==="invalid_enum_value")return{message:c??a.defaultError};if(typeof a.data>"u")return{message:c??n??a.defaultError};if(s.code!=="invalid_type")return{message:a.defaultError};return{message:c??r??a.defaultError}},description:i}}class we{get description(){return this._def.description}_getType(e){return Bi(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:Bi(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new Zt,ctx:{common:e.parent.common,data:e.data,parsedType:Bi(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let t=this._parse(e);if(ku(t))throw Error("Synchronous parse encountered promise.");return t}_parseAsync(e){let t=this._parse(e);return Promise.resolve(t)}parse(e,t){let r=this.safeParse(e,t);if(r.success)return r.data;throw r.error}safeParse(e,t){let r={common:{issues:[],async:t?.async??!1,contextualErrorMap:t?.errorMap},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Bi(e)},n=this._parseSync({data:e,path:r.path,parent:r});return pN(r,n)}"~validate"(e){let t={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Bi(e)};if(!this["~standard"].async)try{let r=this._parseSync({data:e,path:[],parent:t});return Is(r)?{value:r.value}:{issues:t.common.issues}}catch(r){if(r?.message?.toLowerCase()?.includes("encountered"))this["~standard"].async=!0;t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then((r)=>Is(r)?{value:r.value}:{issues:t.common.issues})}async parseAsync(e,t){let r=await this.safeParseAsync(e,t);if(r.success)return r.data;throw r.error}async safeParseAsync(e,t){let r={common:{issues:[],contextualErrorMap:t?.errorMap,async:!0},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Bi(e)},n=this._parse({data:e,path:r.path,parent:r}),i=await(ku(n)?n:Promise.resolve(n));return pN(r,i)}refine(e,t){let r=(n)=>{if(typeof t==="string"||typeof t>"u")return{message:t};else if(typeof t==="function")return t(n);else return t};return this._refinement((n,i)=>{let o=e(n),s=()=>i.addIssue({code:I.custom,...r(n)});if(typeof Promise<"u"&&o instanceof Promise)return o.then((a)=>{if(!a)return s(),!1;else return!0});if(!o)return s(),!1;else return!0})}refinement(e,t){return this._refinement((r,n)=>{if(!e(r))return n.addIssue(typeof t==="function"?t(r,n):t),!1;else return!0})}_refinement(e){return new di({schema:this,typeName:ie.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:(t)=>this["~validate"](t)}}optional(){return ui.create(this,this._def)}nullable(){return Go.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return li.create(this)}promise(){return wc.create(this,this._def)}or(e){return Tu.create([this,e],this._def)}and(e){return Nu.create(this,e,this._def)}transform(e){return new di({...me(this._def),schema:this,typeName:ie.ZodEffects,effect:{type:"transform",transform:e}})}default(e){let t=typeof e==="function"?e:()=>e;return new Bu({...me(this._def),innerType:this,defaultValue:t,typeName:ie.ZodDefault})}brand(){return new V_({typeName:ie.ZodBranded,type:this,...me(this._def)})}catch(e){let t=typeof e==="function"?e:()=>e;return new Lu({...me(this._def),innerType:this,catchValue:t,typeName:ie.ZodCatch})}describe(e){return new this.constructor({...this._def,description:e})}pipe(e){return qm.create(this,e)}readonly(){return Uu.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}function hN(e){let t="[0-5]\\d";if(e.precision)t=`${t}\\.\\d{${e.precision}}`;else if(e.precision==null)t=`${t}(\\.\\d+)?`;let r=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${r}`}function iDe(e){return new RegExp(`^${hN(e)}$`)}function oDe(e){let t=`${mN}T${hN(e)}`,r=[];if(r.push(e.local?"Z?":"Z"),e.offset)r.push("([+-]\\d{2}:?\\d{2})");return t=`${t}(${r.join("|")})`,new RegExp(`^${t}$`)}function sDe(e,t){if((t==="v4"||!t)&&Xwe.test(e))return!0;if((t==="v6"||!t)&&Zwe.test(e))return!0;return!1}function aDe(e,t){if(!Wwe.test(e))return!1;try{let[r]=e.split(".");if(!r)return!1;let n=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),i=JSON.parse(atob(n));if(typeof i!=="object"||i===null)return!1;if("typ"in i&&i?.typ!=="JWT")return!1;if(!i.alg)return!1;if(t&&i.alg!==t)return!1;return!0}catch{return!1}}function cDe(e,t){if((t==="v4"||!t)&&Qwe.test(e))return!0;if((t==="v6"||!t)&&eDe.test(e))return!0;return!1}function lDe(e,t){let r=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,i=r>n?r:n,o=Number.parseInt(e.toFixed(i).replace(".","")),s=Number.parseInt(t.toFixed(i).replace(".",""));return o%s/10**i}function xc(e){if(e instanceof vt){let t={};for(let r in e.shape){let n=e.shape[r];t[r]=ui.create(xc(n))}return new vt({...e._def,shape:()=>t})}else if(e instanceof li)return new li({...e._def,type:xc(e.element)});else if(e instanceof ui)return ui.create(xc(e.unwrap()));else if(e instanceof Go)return Go.create(xc(e.unwrap()));else if(e instanceof Gi)return Gi.create(e.items.map((t)=>xc(t)));else return e}function L_(e,t){let r=Bi(e),n=Bi(t);if(e===t)return{valid:!0,data:e};else if(r===V.object&&n===V.object){let i=Ee.objectKeys(t),o=Ee.objectKeys(e).filter((a)=>i.indexOf(a)!==-1),s={...e,...t};for(let a of o){let c=L_(e[a],t[a]);if(!c.valid)return{valid:!1};s[a]=c.data}return{valid:!0,data:s}}else if(r===V.array&&n===V.array){if(e.length!==t.length)return{valid:!1};let i=[];for(let o=0;o<e.length;o++){let s=e[o],a=t[o],c=L_(s,a);if(!c.valid)return{valid:!1};i.push(c.data)}return{valid:!0,data:i}}else if(r===V.date&&n===V.date&&+e===+t)return{valid:!0,data:e};else return{valid:!1}}function gN(e,t){return new Ns({values:e,typeName:ie.ZodEnum,...me(t)})}var pN=(e,t)=>{if(Is(t))return{success:!0,data:t.value};else{if(!e.common.issues.length)throw Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let r=new Gr(e.common.issues);return this._error=r,this._error}}}},Uwe,Vwe,Gwe,zwe,Hwe,Wwe,Kwe,Ywe,Jwe="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",B_,Xwe,Qwe,Zwe,eDe,tDe,rDe,mN="((\\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])))",nDe,Ui,bc,_c,km,Fu,Am,Pu,Iu,Fm,Ts,Vi,Pm,li,vt,Tu,Li=(e)=>{if(e instanceof qu)return Li(e.schema);else if(e instanceof di)return Li(e.innerType());else if(e instanceof ju)return[e.value];else if(e instanceof Ns)return e.options;else if(e instanceof Mu)return Ee.objectValues(e.enum);else if(e instanceof Bu)return Li(e._def.innerType);else if(e instanceof Pu)return[void 0];else if(e instanceof Iu)return[null];else if(e instanceof ui)return[void 0,...Li(e.unwrap())];else if(e instanceof Go)return[null,...Li(e.unwrap())];else if(e instanceof V_)return Li(e.unwrap());else if(e instanceof Uu)return Li(e.unwrap());else if(e instanceof Lu)return Li(e._def.innerType);else return[]},U_,Nu,Gi,Im,Tm,vc,Au,qu,ju,Ns,Mu,wc,di,ui,Go,Bu,Lu,Nm,qZe,V_,qm,Uu,jZe,ie,k,K,MZe,BZe,Ut,LZe,UZe,VZe,GZe,zZe,HZe,WZe,KZe,mt,Xe,YZe,uDe,JZe,XZe,QZe,yN,ZZe,eet,tet,ret,qs,St,net,iet,oet,set,aet,cet,uet;var xN=O(()=>{Cm();Rm();fN();M_();Ru();Uwe=/^c[^\s-]{8,}$/i,Vwe=/^[0-9a-z]+$/,Gwe=/^[0-9A-HJKMNP-TV-Z]{26}$/i,zwe=/^[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,Hwe=/^[a-z0-9_-]{21}$/i,Wwe=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Kwe=/^[-+]?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)?)??$/,Ywe=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Xwe=/^(?:(?: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])$/,Qwe=/^(?:(?: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])$/,Zwe=/^(([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]))$/,eDe=/^(([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])$/,tDe=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,rDe=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nDe=new RegExp(`^${mN}$`);Ui=class Ui extends we{_parse(e){if(this._def.coerce)e.data=String(e.data);if(this._getType(e)!==V.string){let i=this._getOrReturnCtx(e);return L(i,{code:I.invalid_type,expected:V.string,received:i.parsedType}),ne}let r=new Zt,n=void 0;for(let i of this._def.checks)if(i.kind==="min"){if(e.data.length<i.value)n=this._getOrReturnCtx(e,n),L(n,{code:I.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty()}else if(i.kind==="max"){if(e.data.length>i.value)n=this._getOrReturnCtx(e,n),L(n,{code:I.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty()}else if(i.kind==="length"){let o=e.data.length>i.value,s=e.data.length<i.value;if(o||s){if(n=this._getOrReturnCtx(e,n),o)L(n,{code:I.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message});else if(s)L(n,{code:I.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message});r.dirty()}}else if(i.kind==="email"){if(!Ywe.test(e.data))n=this._getOrReturnCtx(e,n),L(n,{validation:"email",code:I.invalid_string,message:i.message}),r.dirty()}else if(i.kind==="emoji"){if(!B_)B_=new RegExp(Jwe,"u");if(!B_.test(e.data))n=this._getOrReturnCtx(e,n),L(n,{validation:"emoji",code:I.invalid_string,message:i.message}),r.dirty()}else if(i.kind==="uuid"){if(!zwe.test(e.data))n=this._getOrReturnCtx(e,n),L(n,{validation:"uuid",code:I.invalid_string,message:i.message}),r.dirty()}else if(i.kind==="nanoid"){if(!Hwe.test(e.data))n=this._getOrReturnCtx(e,n),L(n,{validation:"nanoid",code:I.invalid_string,message:i.message}),r.dirty()}else if(i.kind==="cuid"){if(!Uwe.test(e.data))n=this._getOrReturnCtx(e,n),L(n,{validation:"cuid",code:I.invalid_string,message:i.message}),r.dirty()}else if(i.kind==="cuid2"){if(!Vwe.test(e.data))n=this._getOrReturnCtx(e,n),L(n,{validation:"cuid2",code:I.invalid_string,message:i.message}),r.dirty()}else if(i.kind==="ulid"){if(!Gwe.test(e.data))n=this._getOrReturnCtx(e,n),L(n,{validation:"ulid",code:I.invalid_string,message:i.message}),r.dirty()}else if(i.kind==="url")try{new URL(e.data)}catch{n=this._getOrReturnCtx(e,n),L(n,{validation:"url",code:I.invalid_string,message:i.message}),r.dirty()}else if(i.kind==="regex"){if(i.regex.lastIndex=0,!i.regex.test(e.data))n=this._getOrReturnCtx(e,n),L(n,{validation:"regex",code:I.invalid_string,message:i.message}),r.dirty()}else if(i.kind==="trim")e.data=e.data.trim();else if(i.kind==="includes"){if(!e.data.includes(i.value,i.position))n=this._getOrReturnCtx(e,n),L(n,{code:I.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),r.dirty()}else if(i.kind==="toLowerCase")e.data=e.data.toLowerCase();else if(i.kind==="toUpperCase")e.data=e.data.toUpperCase();else if(i.kind==="startsWith"){if(!e.data.startsWith(i.value))n=this._getOrReturnCtx(e,n),L(n,{code:I.invalid_string,validation:{startsWith:i.value},message:i.message}),r.dirty()}else if(i.kind==="endsWith"){if(!e.data.endsWith(i.value))n=this._getOrReturnCtx(e,n),L(n,{code:I.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()}else if(i.kind==="datetime"){if(!oDe(i).test(e.data))n=this._getOrReturnCtx(e,n),L(n,{code:I.invalid_string,validation:"datetime",message:i.message}),r.dirty()}else if(i.kind==="date"){if(!nDe.test(e.data))n=this._getOrReturnCtx(e,n),L(n,{code:I.invalid_string,validation:"date",message:i.message}),r.dirty()}else if(i.kind==="time"){if(!iDe(i).test(e.data))n=this._getOrReturnCtx(e,n),L(n,{code:I.invalid_string,validation:"time",message:i.message}),r.dirty()}else if(i.kind==="duration"){if(!Kwe.test(e.data))n=this._getOrReturnCtx(e,n),L(n,{validation:"duration",code:I.invalid_string,message:i.message}),r.dirty()}else if(i.kind==="ip"){if(!sDe(e.data,i.version))n=this._getOrReturnCtx(e,n),L(n,{validation:"ip",code:I.invalid_string,message:i.message}),r.dirty()}else if(i.kind==="jwt"){if(!aDe(e.data,i.alg))n=this._getOrReturnCtx(e,n),L(n,{validation:"jwt",code:I.invalid_string,message:i.message}),r.dirty()}else if(i.kind==="cidr"){if(!cDe(e.data,i.version))n=this._getOrReturnCtx(e,n),L(n,{validation:"cidr",code:I.invalid_string,message:i.message}),r.dirty()}else if(i.kind==="base64"){if(!tDe.test(e.data))n=this._getOrReturnCtx(e,n),L(n,{validation:"base64",code:I.invalid_string,message:i.message}),r.dirty()}else if(i.kind==="base64url"){if(!rDe.test(e.data))n=this._getOrReturnCtx(e,n),L(n,{validation:"base64url",code:I.invalid_string,message:i.message}),r.dirty()}else Ee.assertNever(i);return{status:r.value,value:e.data}}_regex(e,t,r){return this.refinement((n)=>e.test(n),{validation:t,code:I.invalid_string,...J.errToObj(r)})}_addCheck(e){return new Ui({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...J.errToObj(e)})}url(e){return this._addCheck({kind:"url",...J.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...J.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...J.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...J.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...J.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...J.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...J.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...J.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...J.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...J.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...J.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...J.errToObj(e)})}datetime(e){if(typeof e==="string")return this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e});return this._addCheck({kind:"datetime",precision:typeof e?.precision>"u"?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...J.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){if(typeof e==="string")return this._addCheck({kind:"time",precision:null,message:e});return this._addCheck({kind:"time",precision:typeof e?.precision>"u"?null:e?.precision,...J.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...J.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...J.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t?.position,...J.errToObj(t?.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...J.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...J.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...J.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...J.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...J.errToObj(t)})}nonempty(e){return this.min(1,J.errToObj(e))}trim(){return new Ui({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Ui({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Ui({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find((e)=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find((e)=>e.kind==="date")}get isTime(){return!!this._def.checks.find((e)=>e.kind==="time")}get isDuration(){return!!this._def.checks.find((e)=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find((e)=>e.kind==="email")}get isURL(){return!!this._def.checks.find((e)=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find((e)=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find((e)=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find((e)=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find((e)=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find((e)=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find((e)=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find((e)=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find((e)=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find((e)=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find((e)=>e.kind==="base64url")}get minLength(){let e=null;for(let t of this._def.checks)if(t.kind==="min"){if(e===null||t.value>e)e=t.value}return e}get maxLength(){let e=null;for(let t of this._def.checks)if(t.kind==="max"){if(e===null||t.value<e)e=t.value}return e}};Ui.create=(e)=>new Ui({checks:[],typeName:ie.ZodString,coerce:e?.coerce??!1,...me(e)});bc=class bc extends we{constructor(){super(...arguments);this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce)e.data=Number(e.data);if(this._getType(e)!==V.number){let i=this._getOrReturnCtx(e);return L(i,{code:I.invalid_type,expected:V.number,received:i.parsedType}),ne}let r=void 0,n=new Zt;for(let i of this._def.checks)if(i.kind==="int"){if(!Ee.isInteger(e.data))r=this._getOrReturnCtx(e,r),L(r,{code:I.invalid_type,expected:"integer",received:"float",message:i.message}),n.dirty()}else if(i.kind==="min"){if(i.inclusive?e.data<i.value:e.data<=i.value)r=this._getOrReturnCtx(e,r),L(r,{code:I.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),n.dirty()}else if(i.kind==="max"){if(i.inclusive?e.data>i.value:e.data>=i.value)r=this._getOrReturnCtx(e,r),L(r,{code:I.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),n.dirty()}else if(i.kind==="multipleOf"){if(lDe(e.data,i.value)!==0)r=this._getOrReturnCtx(e,r),L(r,{code:I.not_multiple_of,multipleOf:i.value,message:i.message}),n.dirty()}else if(i.kind==="finite"){if(!Number.isFinite(e.data))r=this._getOrReturnCtx(e,r),L(r,{code:I.not_finite,message:i.message}),n.dirty()}else Ee.assertNever(i);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,J.toString(t))}gt(e,t){return this.setLimit("min",e,!1,J.toString(t))}lte(e,t){return this.setLimit("max",e,!0,J.toString(t))}lt(e,t){return this.setLimit("max",e,!1,J.toString(t))}setLimit(e,t,r,n){return new bc({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:J.toString(n)}]})}_addCheck(e){return new bc({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:J.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:J.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:J.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:J.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:J.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:J.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:J.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:J.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:J.toString(e)})}get minValue(){let e=null;for(let t of this._def.checks)if(t.kind==="min"){if(e===null||t.value>e)e=t.value}return e}get maxValue(){let e=null;for(let t of this._def.checks)if(t.kind==="max"){if(e===null||t.value<e)e=t.value}return e}get isInt(){return!!this._def.checks.find((e)=>e.kind==="int"||e.kind==="multipleOf"&&Ee.isInteger(e.value))}get isFinite(){let e=null,t=null;for(let r of this._def.checks)if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;else if(r.kind==="min"){if(t===null||r.value>t)t=r.value}else if(r.kind==="max"){if(e===null||r.value<e)e=r.value}return Number.isFinite(t)&&Number.isFinite(e)}};bc.create=(e)=>new bc({checks:[],typeName:ie.ZodNumber,coerce:e?.coerce||!1,...me(e)});_c=class _c extends we{constructor(){super(...arguments);this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==V.bigint)return this._getInvalidInput(e);let r=void 0,n=new Zt;for(let i of this._def.checks)if(i.kind==="min"){if(i.inclusive?e.data<i.value:e.data<=i.value)r=this._getOrReturnCtx(e,r),L(r,{code:I.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),n.dirty()}else if(i.kind==="max"){if(i.inclusive?e.data>i.value:e.data>=i.value)r=this._getOrReturnCtx(e,r),L(r,{code:I.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),n.dirty()}else if(i.kind==="multipleOf"){if(e.data%i.value!==BigInt(0))r=this._getOrReturnCtx(e,r),L(r,{code:I.not_multiple_of,multipleOf:i.value,message:i.message}),n.dirty()}else Ee.assertNever(i);return{status:n.value,value:e.data}}_getInvalidInput(e){let t=this._getOrReturnCtx(e);return L(t,{code:I.invalid_type,expected:V.bigint,received:t.parsedType}),ne}gte(e,t){return this.setLimit("min",e,!0,J.toString(t))}gt(e,t){return this.setLimit("min",e,!1,J.toString(t))}lte(e,t){return this.setLimit("max",e,!0,J.toString(t))}lt(e,t){return this.setLimit("max",e,!1,J.toString(t))}setLimit(e,t,r,n){return new _c({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:J.toString(n)}]})}_addCheck(e){return new _c({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:J.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:J.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:J.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:J.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:J.toString(t)})}get minValue(){let e=null;for(let t of this._def.checks)if(t.kind==="min"){if(e===null||t.value>e)e=t.value}return e}get maxValue(){let e=null;for(let t of this._def.checks)if(t.kind==="max"){if(e===null||t.value<e)e=t.value}return e}};_c.create=(e)=>new _c({checks:[],typeName:ie.ZodBigInt,coerce:e?.coerce??!1,...me(e)});km=class km extends we{_parse(e){if(this._def.coerce)e.data=Boolean(e.data);if(this._getType(e)!==V.boolean){let r=this._getOrReturnCtx(e);return L(r,{code:I.invalid_type,expected:V.boolean,received:r.parsedType}),ne}return dr(e.data)}};km.create=(e)=>new km({typeName:ie.ZodBoolean,coerce:e?.coerce||!1,...me(e)});Fu=class Fu extends we{_parse(e){if(this._def.coerce)e.data=new Date(e.data);if(this._getType(e)!==V.date){let i=this._getOrReturnCtx(e);return L(i,{code:I.invalid_type,expected:V.date,received:i.parsedType}),ne}if(Number.isNaN(e.data.getTime())){let i=this._getOrReturnCtx(e);return L(i,{code:I.invalid_date}),ne}let r=new Zt,n=void 0;for(let i of this._def.checks)if(i.kind==="min"){if(e.data.getTime()<i.value)n=this._getOrReturnCtx(e,n),L(n,{code:I.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),r.dirty()}else if(i.kind==="max"){if(e.data.getTime()>i.value)n=this._getOrReturnCtx(e,n),L(n,{code:I.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()}else Ee.assertNever(i);return{status:r.value,value:new Date(e.data.getTime())}}_addCheck(e){return new Fu({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:J.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:J.toString(t)})}get minDate(){let e=null;for(let t of this._def.checks)if(t.kind==="min"){if(e===null||t.value>e)e=t.value}return e!=null?new Date(e):null}get maxDate(){let e=null;for(let t of this._def.checks)if(t.kind==="max"){if(e===null||t.value<e)e=t.value}return e!=null?new Date(e):null}};Fu.create=(e)=>new Fu({checks:[],coerce:e?.coerce||!1,typeName:ie.ZodDate,...me(e)});Am=class Am extends we{_parse(e){if(this._getType(e)!==V.symbol){let r=this._getOrReturnCtx(e);return L(r,{code:I.invalid_type,expected:V.symbol,received:r.parsedType}),ne}return dr(e.data)}};Am.create=(e)=>new Am({typeName:ie.ZodSymbol,...me(e)});Pu=class Pu extends we{_parse(e){if(this._getType(e)!==V.undefined){let r=this._getOrReturnCtx(e);return L(r,{code:I.invalid_type,expected:V.undefined,received:r.parsedType}),ne}return dr(e.data)}};Pu.create=(e)=>new Pu({typeName:ie.ZodUndefined,...me(e)});Iu=class Iu extends we{_parse(e){if(this._getType(e)!==V.null){let r=this._getOrReturnCtx(e);return L(r,{code:I.invalid_type,expected:V.null,received:r.parsedType}),ne}return dr(e.data)}};Iu.create=(e)=>new Iu({typeName:ie.ZodNull,...me(e)});Fm=class Fm extends we{constructor(){super(...arguments);this._any=!0}_parse(e){return dr(e.data)}};Fm.create=(e)=>new Fm({typeName:ie.ZodAny,...me(e)});Ts=class Ts extends we{constructor(){super(...arguments);this._unknown=!0}_parse(e){return dr(e.data)}};Ts.create=(e)=>new Ts({typeName:ie.ZodUnknown,...me(e)});Vi=class Vi extends we{_parse(e){let t=this._getOrReturnCtx(e);return L(t,{code:I.invalid_type,expected:V.never,received:t.parsedType}),ne}};Vi.create=(e)=>new Vi({typeName:ie.ZodNever,...me(e)});Pm=class Pm extends we{_parse(e){if(this._getType(e)!==V.undefined){let r=this._getOrReturnCtx(e);return L(r,{code:I.invalid_type,expected:V.void,received:r.parsedType}),ne}return dr(e.data)}};Pm.create=(e)=>new Pm({typeName:ie.ZodVoid,...me(e)});li=class li extends we{_parse(e){let{ctx:t,status:r}=this._processInputParams(e),n=this._def;if(t.parsedType!==V.array)return L(t,{code:I.invalid_type,expected:V.array,received:t.parsedType}),ne;if(n.exactLength!==null){let o=t.data.length>n.exactLength.value,s=t.data.length<n.exactLength.value;if(o||s)L(t,{code:o?I.too_big:I.too_small,minimum:s?n.exactLength.value:void 0,maximum:o?n.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:n.exactLength.message}),r.dirty()}if(n.minLength!==null){if(t.data.length<n.minLength.value)L(t,{code:I.too_small,minimum:n.minLength.value,type:"array",inclusive:!0,exact:!1,message:n.minLength.message}),r.dirty()}if(n.maxLength!==null){if(t.data.length>n.maxLength.value)L(t,{code:I.too_big,maximum:n.maxLength.value,type:"array",inclusive:!0,exact:!1,message:n.maxLength.message}),r.dirty()}if(t.common.async)return Promise.all([...t.data].map((o,s)=>n.type._parseAsync(new Cn(t,o,t.path,s)))).then((o)=>Zt.mergeArray(r,o));let i=[...t.data].map((o,s)=>n.type._parseSync(new Cn(t,o,t.path,s)));return Zt.mergeArray(r,i)}get element(){return this._def.type}min(e,t){return new li({...this._def,minLength:{value:e,message:J.toString(t)}})}max(e,t){return new li({...this._def,maxLength:{value:e,message:J.toString(t)}})}length(e,t){return new li({...this._def,exactLength:{value:e,message:J.toString(t)}})}nonempty(e){return this.min(1,e)}};li.create=(e,t)=>new li({type:e,minLength:null,maxLength:null,exactLength:null,typeName:ie.ZodArray,...me(t)});vt=class vt extends we{constructor(){super(...arguments);this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),t=Ee.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==V.object){let c=this._getOrReturnCtx(e);return L(c,{code:I.invalid_type,expected:V.object,received:c.parsedType}),ne}let{status:r,ctx:n}=this._processInputParams(e),{shape:i,keys:o}=this._getCached(),s=[];if(!(this._def.catchall instanceof Vi&&this._def.unknownKeys==="strip")){for(let c in n.data)if(!o.includes(c))s.push(c)}let a=[];for(let c of o){let u=i[c],d=n.data[c];a.push({key:{status:"valid",value:c},value:u._parse(new Cn(n,d,n.path,c)),alwaysSet:c in n.data})}if(this._def.catchall instanceof Vi){let c=this._def.unknownKeys;if(c==="passthrough")for(let u of s)a.push({key:{status:"valid",value:u},value:{status:"valid",value:n.data[u]}});else if(c==="strict"){if(s.length>0)L(n,{code:I.unrecognized_keys,keys:s}),r.dirty()}else if(c==="strip");else throw Error("Internal ZodObject error: invalid unknownKeys value.")}else{let c=this._def.catchall;for(let u of s){let d=n.data[u];a.push({key:{status:"valid",value:u},value:c._parse(new Cn(n,d,n.path,u)),alwaysSet:u in n.data})}}if(n.common.async)return Promise.resolve().then(async()=>{let c=[];for(let u of a){let d=await u.key,f=await u.value;c.push({key:d,value:f,alwaysSet:u.alwaysSet})}return c}).then((c)=>Zt.mergeObjectSync(r,c));else return Zt.mergeObjectSync(r,a)}get shape(){return this._def.shape()}strict(e){return J.errToObj,new vt({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(t,r)=>{let n=this._def.errorMap?.(t,r).message??r.defaultError;if(t.code==="unrecognized_keys")return{message:J.errToObj(e).message??n};return{message:n}}}:{}})}strip(){return new vt({...this._def,unknownKeys:"strip"})}passthrough(){return new vt({...this._def,unknownKeys:"passthrough"})}extend(e){return new vt({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new vt({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:ie.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new vt({...this._def,catchall:e})}pick(e){let t={};for(let r of Ee.objectKeys(e))if(e[r]&&this.shape[r])t[r]=this.shape[r];return new vt({...this._def,shape:()=>t})}omit(e){let t={};for(let r of Ee.objectKeys(this.shape))if(!e[r])t[r]=this.shape[r];return new vt({...this._def,shape:()=>t})}deepPartial(){return xc(this)}partial(e){let t={};for(let r of Ee.objectKeys(this.shape)){let n=this.shape[r];if(e&&!e[r])t[r]=n;else t[r]=n.optional()}return new vt({...this._def,shape:()=>t})}required(e){let t={};for(let r of Ee.objectKeys(this.shape))if(e&&!e[r])t[r]=this.shape[r];else{let i=this.shape[r];while(i instanceof ui)i=i._def.innerType;t[r]=i}return new vt({...this._def,shape:()=>t})}keyof(){return gN(Ee.objectKeys(this.shape))}};vt.create=(e,t)=>new vt({shape:()=>e,unknownKeys:"strip",catchall:Vi.create(),typeName:ie.ZodObject,...me(t)});vt.strictCreate=(e,t)=>new vt({shape:()=>e,unknownKeys:"strict",catchall:Vi.create(),typeName:ie.ZodObject,...me(t)});vt.lazycreate=(e,t)=>new vt({shape:e,unknownKeys:"strip",catchall:Vi.create(),typeName:ie.ZodObject,...me(t)});Tu=class Tu extends we{_parse(e){let{ctx:t}=this._processInputParams(e),r=this._def.options;function n(i){for(let s of i)if(s.result.status==="valid")return s.result;for(let s of i)if(s.result.status==="dirty")return t.common.issues.push(...s.ctx.common.issues),s.result;let o=i.map((s)=>new Gr(s.ctx.common.issues));return L(t,{code:I.invalid_union,unionErrors:o}),ne}if(t.common.async)return Promise.all(r.map(async(i)=>{let o={...t,common:{...t.common,issues:[]},parent:null};return{result:await i._parseAsync({data:t.data,path:t.path,parent:o}),ctx:o}})).then(n);else{let i=void 0,o=[];for(let a of r){let c={...t,common:{...t.common,issues:[]},parent:null},u=a._parseSync({data:t.data,path:t.path,parent:c});if(u.status==="valid")return u;else if(u.status==="dirty"&&!i)i={result:u,ctx:c};if(c.common.issues.length)o.push(c.common.issues)}if(i)return t.common.issues.push(...i.ctx.common.issues),i.result;let s=o.map((a)=>new Gr(a));return L(t,{code:I.invalid_union,unionErrors:s}),ne}}get options(){return this._def.options}};Tu.create=(e,t)=>new Tu({options:e,typeName:ie.ZodUnion,...me(t)});U_=class U_ extends we{_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==V.object)return L(t,{code:I.invalid_type,expected:V.object,received:t.parsedType}),ne;let r=this.discriminator,n=t.data[r],i=this.optionsMap.get(n);if(!i)return L(t,{code:I.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),ne;if(t.common.async)return i._parseAsync({data:t.data,path:t.path,parent:t});else return i._parseSync({data:t.data,path:t.path,parent:t})}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,r){let n=new Map;for(let i of t){let o=Li(i.shape[e]);if(!o.length)throw Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let s of o){if(n.has(s))throw Error(`Discriminator property ${String(e)} has duplicate value ${String(s)}`);n.set(s,i)}}return new U_({typeName:ie.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:n,...me(r)})}};Nu=class Nu extends we{_parse(e){let{status:t,ctx:r}=this._processInputParams(e),n=(i,o)=>{if(q_(i)||q_(o))return ne;let s=L_(i.value,o.value);if(!s.valid)return L(r,{code:I.invalid_intersection_types}),ne;if(j_(i)||j_(o))t.dirty();return{status:t.value,value:s.data}};if(r.common.async)return Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([i,o])=>n(i,o));else return n(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}};Nu.create=(e,t,r)=>new Nu({left:e,right:t,typeName:ie.ZodIntersection,...me(r)});Gi=class Gi extends we{_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==V.array)return L(r,{code:I.invalid_type,expected:V.array,received:r.parsedType}),ne;if(r.data.length<this._def.items.length)return L(r,{code:I.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),ne;if(!this._def.rest&&r.data.length>this._def.items.length)L(r,{code:I.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty();let i=[...r.data].map((o,s)=>{let a=this._def.items[s]||this._def.rest;if(!a)return null;return a._parse(new Cn(r,o,r.path,s))}).filter((o)=>!!o);if(r.common.async)return Promise.all(i).then((o)=>Zt.mergeArray(t,o));else return Zt.mergeArray(t,i)}get items(){return this._def.items}rest(e){return new Gi({...this._def,rest:e})}};Gi.create=(e,t)=>{if(!Array.isArray(e))throw Error("You must pass an array of schemas to z.tuple([ ... ])");return new Gi({items:e,typeName:ie.ZodTuple,rest:null,...me(t)})};Im=class Im extends we{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==V.object)return L(r,{code:I.invalid_type,expected:V.object,received:r.parsedType}),ne;let n=[],i=this._def.keyType,o=this._def.valueType;for(let s in r.data)n.push({key:i._parse(new Cn(r,s,r.path,s)),value:o._parse(new Cn(r,r.data[s],r.path,s)),alwaysSet:s in r.data});if(r.common.async)return Zt.mergeObjectAsync(t,n);else return Zt.mergeObjectSync(t,n)}get element(){return this._def.valueType}static create(e,t,r){if(t instanceof we)return new Im({keyType:e,valueType:t,typeName:ie.ZodRecord,...me(r)});return new Im({keyType:Ui.create(),valueType:e,typeName:ie.ZodRecord,...me(t)})}};Tm=class Tm extends we{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==V.map)return L(r,{code:I.invalid_type,expected:V.map,received:r.parsedType}),ne;let n=this._def.keyType,i=this._def.valueType,o=[...r.data.entries()].map(([s,a],c)=>({key:n._parse(new Cn(r,s,r.path,[c,"key"])),value:i._parse(new Cn(r,a,r.path,[c,"value"]))}));if(r.common.async){let s=new Map;return Promise.resolve().then(async()=>{for(let a of o){let c=await a.key,u=await a.value;if(c.status==="aborted"||u.status==="aborted")return ne;if(c.status==="dirty"||u.status==="dirty")t.dirty();s.set(c.value,u.value)}return{status:t.value,value:s}})}else{let s=new Map;for(let a of o){let{key:c,value:u}=a;if(c.status==="aborted"||u.status==="aborted")return ne;if(c.status==="dirty"||u.status==="dirty")t.dirty();s.set(c.value,u.value)}return{status:t.value,value:s}}}};Tm.create=(e,t,r)=>new Tm({valueType:t,keyType:e,typeName:ie.ZodMap,...me(r)});vc=class vc extends we{_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==V.set)return L(r,{code:I.invalid_type,expected:V.set,received:r.parsedType}),ne;let n=this._def;if(n.minSize!==null){if(r.data.size<n.minSize.value)L(r,{code:I.too_small,minimum:n.minSize.value,type:"set",inclusive:!0,exact:!1,message:n.minSize.message}),t.dirty()}if(n.maxSize!==null){if(r.data.size>n.maxSize.value)L(r,{code:I.too_big,maximum:n.maxSize.value,type:"set",inclusive:!0,exact:!1,message:n.maxSize.message}),t.dirty()}let i=this._def.valueType;function o(a){let c=new Set;for(let u of a){if(u.status==="aborted")return ne;if(u.status==="dirty")t.dirty();c.add(u.value)}return{status:t.value,value:c}}let s=[...r.data.values()].map((a,c)=>i._parse(new Cn(r,a,r.path,c)));if(r.common.async)return Promise.all(s).then((a)=>o(a));else return o(s)}min(e,t){return new vc({...this._def,minSize:{value:e,message:J.toString(t)}})}max(e,t){return new vc({...this._def,maxSize:{value:e,message:J.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}};vc.create=(e,t)=>new vc({valueType:e,minSize:null,maxSize:null,typeName:ie.ZodSet,...me(t)});Au=class Au extends we{constructor(){super(...arguments);this.validate=this.implement}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==V.function)return L(t,{code:I.invalid_type,expected:V.function,received:t.parsedType}),ne;function r(s,a){return Om({data:s,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,Ou(),Vo].filter((c)=>!!c),issueData:{code:I.invalid_arguments,argumentsError:a}})}function n(s,a){return Om({data:s,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,Ou(),Vo].filter((c)=>!!c),issueData:{code:I.invalid_return_type,returnTypeError:a}})}let i={errorMap:t.common.contextualErrorMap},o=t.data;if(this._def.returns instanceof wc){let s=this;return dr(async function(...a){let c=new Gr([]),u=await s._def.args.parseAsync(a,i).catch((m)=>{throw c.addIssue(r(a,m)),c}),d=await Reflect.apply(o,this,u);return await s._def.returns._def.type.parseAsync(d,i).catch((m)=>{throw c.addIssue(n(d,m)),c})})}else{let s=this;return dr(function(...a){let c=s._def.args.safeParse(a,i);if(!c.success)throw new Gr([r(a,c.error)]);let u=Reflect.apply(o,this,c.data),d=s._def.returns.safeParse(u,i);if(!d.success)throw new Gr([n(u,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new Au({...this._def,args:Gi.create(e).rest(Ts.create())})}returns(e){return new Au({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,r){return new Au({args:e?e:Gi.create([]).rest(Ts.create()),returns:t||Ts.create(),typeName:ie.ZodFunction,...me(r)})}};qu=class qu extends we{get schema(){return this._def.getter()}_parse(e){let{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}};qu.create=(e,t)=>new qu({getter:e,typeName:ie.ZodLazy,...me(t)});ju=class ju extends we{_parse(e){if(e.data!==this._def.value){let t=this._getOrReturnCtx(e);return L(t,{received:t.data,code:I.invalid_literal,expected:this._def.value}),ne}return{status:"valid",value:e.data}}get value(){return this._def.value}};ju.create=(e,t)=>new ju({value:e,typeName:ie.ZodLiteral,...me(t)});Ns=class Ns extends we{_parse(e){if(typeof e.data!=="string"){let t=this._getOrReturnCtx(e),r=this._def.values;return L(t,{expected:Ee.joinValues(r),received:t.parsedType,code:I.invalid_type}),ne}if(!this._cache)this._cache=new Set(this._def.values);if(!this._cache.has(e.data)){let t=this._getOrReturnCtx(e),r=this._def.values;return L(t,{received:t.data,code:I.invalid_enum_value,options:r}),ne}return dr(e.data)}get options(){return this._def.values}get enum(){let e={};for(let t of this._def.values)e[t]=t;return e}get Values(){let e={};for(let t of this._def.values)e[t]=t;return e}get Enum(){let e={};for(let t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return Ns.create(e,{...this._def,...t})}exclude(e,t=this._def){return Ns.create(this.options.filter((r)=>!e.includes(r)),{...this._def,...t})}};Ns.create=gN;Mu=class Mu extends we{_parse(e){let t=Ee.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==V.string&&r.parsedType!==V.number){let n=Ee.objectValues(t);return L(r,{expected:Ee.joinValues(n),received:r.parsedType,code:I.invalid_type}),ne}if(!this._cache)this._cache=new Set(Ee.getValidEnumValues(this._def.values));if(!this._cache.has(e.data)){let n=Ee.objectValues(t);return L(r,{received:r.data,code:I.invalid_enum_value,options:n}),ne}return dr(e.data)}get enum(){return this._def.values}};Mu.create=(e,t)=>new Mu({values:e,typeName:ie.ZodNativeEnum,...me(t)});wc=class wc extends we{unwrap(){return this._def.type}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==V.promise&&t.common.async===!1)return L(t,{code:I.invalid_type,expected:V.promise,received:t.parsedType}),ne;let r=t.parsedType===V.promise?t.data:Promise.resolve(t.data);return dr(r.then((n)=>this._def.type.parseAsync(n,{path:t.path,errorMap:t.common.contextualErrorMap})))}};wc.create=(e,t)=>new wc({type:e,typeName:ie.ZodPromise,...me(t)});di=class di extends we{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ie.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:t,ctx:r}=this._processInputParams(e),n=this._def.effect||null,i={addIssue:(o)=>{if(L(r,o),o.fatal)t.abort();else t.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),n.type==="preprocess"){let o=n.transform(r.data,i);if(r.common.async)return Promise.resolve(o).then(async(s)=>{if(t.value==="aborted")return ne;let a=await this._def.schema._parseAsync({data:s,path:r.path,parent:r});if(a.status==="aborted")return ne;if(a.status==="dirty")return yc(a.value);if(t.value==="dirty")return yc(a.value);return a});else{if(t.value==="aborted")return ne;let s=this._def.schema._parseSync({data:o,path:r.path,parent:r});if(s.status==="aborted")return ne;if(s.status==="dirty")return yc(s.value);if(t.value==="dirty")return yc(s.value);return s}}if(n.type==="refinement"){let o=(s)=>{let a=n.refinement(s,i);if(r.common.async)return Promise.resolve(a);if(a instanceof Promise)throw Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return s};if(r.common.async===!1){let s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(s.status==="aborted")return ne;if(s.status==="dirty")t.dirty();return o(s.value),{status:t.value,value:s.value}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then((s)=>{if(s.status==="aborted")return ne;if(s.status==="dirty")t.dirty();return o(s.value).then(()=>({status:t.value,value:s.value}))})}if(n.type==="transform")if(r.common.async===!1){let o=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!Is(o))return ne;let s=n.transform(o.value,i);if(s instanceof Promise)throw Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:s}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then((o)=>{if(!Is(o))return ne;return Promise.resolve(n.transform(o.value,i)).then((s)=>({status:t.value,value:s}))});Ee.assertNever(n)}};di.create=(e,t,r)=>new di({schema:e,typeName:ie.ZodEffects,effect:t,...me(r)});di.createWithPreprocess=(e,t,r)=>new di({schema:t,effect:{type:"preprocess",transform:e},typeName:ie.ZodEffects,...me(r)});ui=class ui extends we{_parse(e){if(this._getType(e)===V.undefined)return dr(void 0);return this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};ui.create=(e,t)=>new ui({innerType:e,typeName:ie.ZodOptional,...me(t)});Go=class Go extends we{_parse(e){if(this._getType(e)===V.null)return dr(null);return this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};Go.create=(e,t)=>new Go({innerType:e,typeName:ie.ZodNullable,...me(t)});Bu=class Bu extends we{_parse(e){let{ctx:t}=this._processInputParams(e),r=t.data;if(t.parsedType===V.undefined)r=this._def.defaultValue();return this._def.innerType._parse({data:r,path:t.path,parent:t})}removeDefault(){return this._def.innerType}};Bu.create=(e,t)=>new Bu({innerType:e,typeName:ie.ZodDefault,defaultValue:typeof t.default==="function"?t.default:()=>t.default,...me(t)});Lu=class Lu extends we{_parse(e){let{ctx:t}=this._processInputParams(e),r={...t,common:{...t.common,issues:[]}},n=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});if(ku(n))return n.then((i)=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Gr(r.common.issues)},input:r.data})}));else return{status:"valid",value:n.status==="valid"?n.value:this._def.catchValue({get error(){return new Gr(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}};Lu.create=(e,t)=>new Lu({innerType:e,typeName:ie.ZodCatch,catchValue:typeof t.catch==="function"?t.catch:()=>t.catch,...me(t)});Nm=class Nm extends we{_parse(e){if(this._getType(e)!==V.nan){let r=this._getOrReturnCtx(e);return L(r,{code:I.invalid_type,expected:V.nan,received:r.parsedType}),ne}return{status:"valid",value:e.data}}};Nm.create=(e)=>new Nm({typeName:ie.ZodNaN,...me(e)});qZe=Symbol("zod_brand");V_=class V_ extends we{_parse(e){let{ctx:t}=this._processInputParams(e),r=t.data;return this._def.type._parse({data:r,path:t.path,parent:t})}unwrap(){return this._def.type}};qm=class qm extends we{_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.common.async)return(async()=>{let i=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});if(i.status==="aborted")return ne;if(i.status==="dirty")return t.dirty(),yc(i.value);else return this._def.out._parseAsync({data:i.value,path:r.path,parent:r})})();else{let n=this._def.in._parseSync({data:r.data,path:r.path,parent:r});if(n.status==="aborted")return ne;if(n.status==="dirty")return t.dirty(),{status:"dirty",value:n.value};else return this._def.out._parseSync({data:n.value,path:r.path,parent:r})}}static create(e,t){return new qm({in:e,out:t,typeName:ie.ZodPipeline})}};Uu=class Uu extends we{_parse(e){let t=this._def.innerType._parse(e),r=(n)=>{if(Is(n))n.value=Object.freeze(n.value);return n};return ku(t)?t.then((n)=>r(n)):r(t)}unwrap(){return this._def.innerType}};Uu.create=(e,t)=>new Uu({innerType:e,typeName:ie.ZodReadonly,...me(t)});jZe={object:vt.lazycreate};(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(ie||(ie={}));k=Ui.create,K=bc.create,MZe=Nm.create,BZe=_c.create,Ut=km.create,LZe=Fu.create,UZe=Am.create,VZe=Pu.create,GZe=Iu.create,zZe=Fm.create,HZe=Ts.create,WZe=Vi.create,KZe=Pm.create,mt=li.create,Xe=vt.create,YZe=vt.strictCreate,uDe=Tu.create,JZe=U_.create,XZe=Nu.create,QZe=Gi.create,yN=Im.create,ZZe=Tm.create,eet=vc.create,tet=Au.create,ret=qu.create,qs=ju.create,St=Ns.create,net=Mu.create,iet=wc.create,oet=di.create,set=ui.create,aet=Go.create,cet=di.createWithPreprocess,uet=qm.create});var G_=O(()=>{Rm();M_();dN();Ru();xN();Cm()});var Hi=O(()=>{G_();G_()});function pDe(e){return e.startsWith("v")?e:`v${e}`}var dDe,fDe,bN,vet;var z_=O(()=>{Hi();dDe=/^v?\d+\.\d+\.\d+(?:-(?:rc|alpha|beta)\d*)?$/,fDe=/^v\d+\.\d+\.\d+(?:-(?:rc|alpha|beta)\d*)?$/;bN=k().regex(dDe,"must be a semver version, optionally v-prefixed").transform(pDe),vet=k().regex(fDe,"must be the canonical v-prefixed tag (vX.Y.Z)")});var mDe,hDe,_N,gDe,yDe,vN,xDe,wN,Eet,$et,Cet,bDe,DN,_De,EN,H_=20,W_=500,vDe,Ret;var jm=O(()=>{Hi();mDe=St(["pending","verified","approved","revoked"]),hDe=St(["active","pending","revoked"]),_N=Xe({field:k(),blocks:mt(k()).optional(),set_on:mt(k()).optional()}).passthrough(),gDe=Xe({id:K().int(),username:k().nullable(),email:k(),github_username:k().nullable(),role:k(),orcid:k().nullable().optional(),created_at:k().optional(),approved_at:k().nullable().optional(),dataset_count:K().int().optional(),sandbox_completed:Ut().optional(),sandbox_completed_at:k().nullable().optional(),sandbox_dataset_id:k().nullable().optional(),service_access:Ut().optional(),status:mDe.optional(),email_verified:Ut().optional(),orcid_verified:Ut().optional(),given_name:k().nullable().optional(),family_name:k().nullable().optional(),profile_gaps:mt(_N).optional(),username_auto_assigned:Ut().optional()}).passthrough(),yDe=Xe({prefix:k(),created_at:k(),last_used_at:k().nullable()}).passthrough().nullable(),vN=Xe({user:gDe,token:yDe.optional()}).passthrough(),xDe=Xe({id:K().int(),username:k().nullable(),email:k(),github_username:k().nullable(),status:k(),email_verified:K().int().nullable().optional(),role:k().nullable(),created_at:k(),approved_at:k().nullable().optional(),revoked_at:k().nullable().optional(),signup_source:k().nullable().optional(),service_access:K().int().nullable().optional(),service_access_granted_at:k().nullable().optional(),given_name:k().nullable().optional(),family_name:k().nullable().optional(),orcid:k().nullable().optional(),upload_access_requested_at:k().nullable().optional()}).passthrough(),wN=Xe({users:mt(xDe),count:K().int()}).passthrough(),Eet=St(["assigned","would_assign","single_name","no_name","lookup_failed","conflict","exhausted"]),$et=St(["sent","already_verified","skipped_fence","rate_limited","failed","not_attempted"]),Cet=Xe({suggestion:k().nullable(),based_on:St(["name","unavailable","exhausted"])}).passthrough(),bDe=St(["why_required","email_not_verified","profile_incomplete","github_username_unverified","github_unavailable","already_approved"]),DN=bDe.options,_De=St(["invalid_github_username","city_required","country_required","empty_patch","username_too_short","username_too_long","username_charset","given_name_required","family_name_required","username_taken","username_locked","name_is_orcid_canonical","account_revoked","github_unavailable","same_email","code_expired","code_incorrect","orcid_already_have","orcid_unavailable"]),EN=_De.options,vDe=Xe({id:K().int(),email:k(),username:k().nullable(),role:k(),status:hDe,email_verified:Ut(),given_name:k().nullable(),family_name:k().nullable(),orcid:k().nullable(),orcid_verified:Ut(),github_username:k().nullable(),city:k().nullable(),country:k().nullable(),affiliation:k().nullable(),service_access:Ut(),service_access_granted_at:k().nullable(),upload_access_requested_at:k().nullable(),profile_gaps:mt(_N),username_auto_assigned:Ut()}).passthrough(),Ret=Xe({user:vDe.nullable()}).passthrough()});function $N(e,t){if(e.zarr_index_url!=null&&e.zarr_status!=="ready")t.addIssue({code:I.custom,message:"zarr_index_url must be null/absent unless zarr_status is 'ready'",path:["zarr_index_url"]})}function CN(e,t){if(e.zarr_verified_at!=null&&e.zarr_verify_status==null)t.addIssue({code:I.custom,message:"zarr_verified_at must be null/absent unless zarr_verify_status is non-null",path:["zarr_verified_at"]})}var wDe="0.4.0",K_,Dc,SN,DDe,EDe,SDe,RN,Fet,ON,Pet,Wi,$De,Mm,Iet;var Y_=O(()=>{Hi();z_();K_=St(["openneuro","nemar","gin","other"]),Dc=uDe([qs(0),qs(1)]).nullable(),SN=Xe({dataset_id:k(),id:k().optional(),name:k(),description:k().nullable().optional(),status:k(),visibility:k(),concept_doi:k().nullable().optional(),doi:k().nullable().optional(),created_at:k(),updated_at:k().optional(),owner_username:k().nullable().optional(),source:k().nullable().optional(),modalities:k().optional(),participants:K().int().nonnegative(),tasks:k().optional(),authors:k().optional(),license:k().optional(),file_size:K().nonnegative(),file_size_formatted:k().optional(),total_files:K().nonnegative().nullable().optional(),num_citations:K().int().nonnegative().optional(),n_channels:K().int().nullable().optional(),electrode_system:k().nullable().optional(),has_hed:Dc.optional(),hed_version:k().nullable().optional(),data_complete:Dc.optional(),bytes_present:K().nonnegative().nullable().optional(),latest_version:bN.nullable().optional(),subject_count:K().int().nullable().optional(),file_size_bytes:K().nullable().optional(),sessions_count:K().int().nullable().optional(),age_min:K().nullable().optional(),age_max:K().nullable().optional(),bids_version:k().nullable().optional(),zarr_status:St(["pending","ready","failed"]).nullable().optional(),zarr_store_count:K().int().nullable().optional(),zarr_converted_at:k().nullable().optional(),zarr_source_commit:k().nullable().optional(),zarr_errors:K().int().nullable().optional(),zarr_failure_count:K().int().nullable().optional(),zarr_deterministic:Dc.optional(),zarr_failed_at:k().nullable().optional(),zarr_index_url:k().nullable().optional(),zarr_verify_status:St(["verified","failed","unverifiable"]).nullable().optional(),zarr_verified_at:k().nullable().optional(),total_recording_duration:K().nullable().optional(),recording_duration_min:K().nullable().optional(),recording_duration_max:K().nullable().optional(),recording_count:K().int().nullable().optional(),recordings_unavailable:K().int().nullable().optional(),channel_count_min:K().int().nullable().optional(),channel_count_max:K().int().nullable().optional(),sampling_frequency:K().nullable().optional(),power_line_frequency:K().nullable().optional(),eeg_reference:k().nullable().optional(),placement_scheme:k().nullable().optional()}).passthrough();DDe=SN.superRefine((e,t)=>{$N(e,t),CN(e,t)}),EDe=SN.extend({file_size:K().nonnegative().nullable(),file_size_formatted:k().nullable().optional(),modalities:k().nullable().optional(),tasks:k().nullable().optional(),authors:k().nullable().optional(),license:k().nullable().optional(),owner_github:k().nullable().optional(),attestation_deposit_type:St(["owner","redistribution"]).nullable().optional(),attestation_key_status:St(["destroyed","retained"]).nullable().optional(),attestation_deidentified:Dc.optional(),attestation_no_duplicate:Dc.optional(),attestation_upstream_source:k().nullable().optional(),attestation_accepted_at:k().nullable().optional(),zarr_data_failures:Xe({count:K().int().nonnegative(),detail_ref:k(),compacted_by:k().optional(),pending:K().int().nonnegative().optional(),discovered:K().int().nonnegative().optional(),events_upload_failed:qs(!0).optional(),manifest_upload_failed:qs(!0).optional()}).passthrough().nullable().optional()}).passthrough().superRefine((e,t)=>{$N(e,t),CN(e,t)}),SDe=Xe({id:k(),name:k(),modalities:k().nullable().optional(),participants:K().int().nullable().optional(),doi:k().nullable().optional(),tasks:k().nullable().optional(),authors:k().nullable().optional(),has_hed:Dc.optional(),score:K().optional(),snippet:k().optional()}).passthrough(),RN=yN(k(),K().int().nonnegative()),Fet=Xe({datasets:mt(DDe),count:K().int().nonnegative(),total_count:K().int().nonnegative().optional(),limit:K().int().optional(),offset:K().int().optional(),excluded_unknown:K().int().nonnegative().optional(),excluded_unknown_by_facet:RN.optional()}).passthrough(),ON=Xe({results:mt(SDe),count:K().int().nonnegative(),returned:K().int().nonnegative().optional(),offset:K().int().nonnegative().optional(),limit:K().int().optional(),candidate_ceiling:K().int().optional(),truncated:Ut().optional(),method:St(["exact_id","text","text_fallback","semantic","unavailable"]).optional(),min_score:K().optional(),warning:k().optional(),excluded_unknown:K().int().nonnegative().optional(),excluded_unknown_by_facet:RN.optional()}).passthrough(),Pet=Xe({dataset:EDe}).passthrough(),Wi=Xe({value:k(),count:K().int().nonnegative()}),$De=Xe({values:mt(Wi),distinct_total:K().int().nonnegative(),truncated:Ut()}),Mm=Xe({"electrode-system":mt(Wi).optional(),source:mt(Wi).optional(),zarr:mt(Wi).optional(),powerline:mt(Wi).optional(),"bids-version":mt(Wi).optional(),"hed-version":mt(Wi).optional(),license:mt(Wi).optional(),modality:mt(Wi).optional(),task:$De.optional(),warning:k().optional()}).passthrough(),Iet=Xe({schema_version:qs(wDe),doc_type:qs("dataset"),dataset_id:k().regex(/^[a-z]{2}\d+$/,"neuroschema dataset_id pattern"),name:k(),source:K_,recording_modality:mt(k()).min(1),description:k().nullable().optional(),bids_version:k().nullable().optional(),license:k().nullable().optional()}).passthrough()});var CDe,qet,jet,Met,Bet;var kN=O(()=>{Hi();CDe=/^\d{4}-\d{4}-\d{4}-\d{3}[\dX]$/,qet=k().regex(CDe,"ORCID must be in format 0000-0000-0000-000X"),jet=St(["found","no_public_name","lookup_failed"]),Met=St(["bids_validation_failed","bids_validation_pending","bids_validation_in_progress","prescreen_failed","min_requirements_failed","owner_name_missing"]),Bet=St(["filled","would_fill","no_public_name","lookup_failed"])});var RDe,AN,Vu="https://nemar.org/settings",Vet,ODe,kDe,ADe,FN,PN;var J_=O(()=>{Hi();RDe=St(["orcid_in_use","orcid_already_linked","orcid_linked_other","email_in_use","github_in_use","identity_conflict_remains"]),AN=RDe.options,Vet={orcid_in_use:`That ORCID iD already belongs to a NEMAR account. Sign in to that account instead; if you want the iD on a different account, unlink it there first (Settings, ${Vu}).`,orcid_already_linked:`That ORCID iD already belongs to a NEMAR account. Sign in to that account instead; if you want the iD on a different account, unlink it there first (Settings, ${Vu}).`,orcid_linked_other:`That ORCID iD is linked to a different NEMAR account. Unlink it there first (Settings, ${Vu}), then link it here.`,email_in_use:`That email address already belongs to a NEMAR account. Sign in to that account instead, or change its address first (Settings, ${Vu}).`,github_in_use:`That GitHub account is already linked to a NEMAR account. Sign in to that account instead, or change its GitHub username first (Settings, ${Vu}).`,identity_conflict_remains:"The collision that flagged this account is still there. Resolve it on the other account first (change its email or GitHub username, or unlink its ORCID iD), or delete that account, then clear the flag."},ODe=St(["orcid","email","github"]),kDe=Xe({id:K().int(),username:k().nullable(),email:k(),created_at:k(),has_oauth_identity:Ut(),dataset_count:K().int(),identity_conflict:K().int(),canonical:Ut()}).passthrough(),ADe=Xe({kind:ODe,value:k(),canonical_user_id:K().int(),accounts:mt(kDe)}).passthrough(),FN=Xe({groups:mt(ADe),group_count:K().int(),flagged_count:K().int()}).passthrough(),PN=Xe({ok:qs(!0),id:K().int(),cleared:Ut()}).passthrough()});function $t(e){return wt[e]}function Ki(e,t){return e.replace(/\{(\w+)\}/g,(r,n)=>Object.hasOwn(t,n)?t[n]:r)}var wt;var Ec=O(()=>{wt={"tier.unverified.label":"Email not verified","tier.base.label":"Base access","tier.upload.label":"Upload access","tier.unverified.lede":"Verify your email address to activate your account.","upload_access.section.title":"Upload access","upload_access.section.lede":"A one-time admin grant. Reviewed against export-control and local-jurisdiction rules.","upload_access.state.granted":"Granted","upload_access.state.requested":"Requested","upload_access.state.not_requested":"Not requested","upload_access.invite.title":"Want to contribute a dataset?","upload_access.invite.body":"Browsing, searching and downloading are open to your account already. Uploading needs one extra grant: an admin checks your GitHub handle and location against export-control and local-jurisdiction rules, once.","upload_access.gate.title":"Ask for upload access first","upload_access.gate.body":"Your account can browse, search and download everything public already. Uploading needs one extra grant: an admin checks your GitHub handle and where you\u2019re based against export-control and local-jurisdiction rules. You ask once, and it is answered by email.","upload_access.request.cta":"Request upload access","upload_access.request.form_body":"Tell us what you plan to deposit. An admin reviews this alongside your name, username, GitHub handle and location, then grants access once.","upload_access.request.why_label":"What do you intend to upload?","upload_access.request.why_hint":"Describe what you intend to upload in 20-500 characters","upload_access.requested.title":"Your request is with an admin","upload_access.requested.lede":"An admin is reviewing your request.","upload_access.requested.lede_dated":"An admin is reviewing your request from {date}.","upload_access.requested.body.upload":"We\u2019ll email you when there\u2019s a decision, and this page will let you upload as soon as it\u2019s granted.","upload_access.requested.body":"We\u2019ll email you when there\u2019s a decision. Everything else on your account keeps working in the meantime.","upload_access.requested.cta":"See the request","upload_access.granted.body":"You can upload datasets from the upload page. Publishing one is a separate, per-dataset review you start from your dashboard.","upload_access.unverified.body":"Verify your email address first \u2014 the review happens over email.","upload_access.docs_link":"How upload access works","gap.sentence":"{label} is missing: needed {blocks}.","gap.set_on.both":"Set it in {web} or run `{cli}`.","gap.set_on.web":"Set it in {web}.","gap.blocks.verified":"to activate your account","gap.blocks.upload_access":"to request upload access","gap.blocks.publication":"to publish a dataset","gap.blocks.unknown":"to finish setting up your account","gap.blocks.noun.verified":"account activation","gap.blocks.noun.upload_access":"upload access","gap.blocks.noun.publication":"publication","gap.set_on.default_web":"Settings","gap.field.email_verified.label":"A verified email address","gap.field.username.label":"Username","gap.field.given_name.label":"Given name","gap.field.family_name.label":"Family name","gap.field.orcid_verified.label":"Verified ORCID iD","gap.field.github_username.label":"GitHub handle","gap.field.city.label":"City","gap.field.country.label":"Country","gap.field.why.label":"A description of what you intend to upload","gap.field.email_verified.set_on.web":"the verify step on your dashboard","gap.field.email_verified.set_on.cli":"nemar auth resend-verification","gap.field.username.set_on.web":"Settings","gap.field.username.set_on.cli":"nemar auth profile set-username","gap.field.given_name.set_on.web":"Settings","gap.field.given_name.set_on.cli":"nemar auth profile set-name","gap.field.family_name.set_on.web":"Settings","gap.field.family_name.set_on.cli":"nemar auth profile set-name","gap.field.given_name.set_on.web.orcid":"your ORCID record at orcid.org, then sign in again","gap.field.family_name.set_on.web.orcid":"your ORCID record at orcid.org, then sign in again","gap.field.orcid_verified.set_on.web":"Settings","gap.field.orcid_verified.set_on.cli":"nemar auth profile orcid link","gap.field.github_username.set_on.web":"Settings","gap.field.github_username.set_on.cli":"nemar auth profile set-github","gap.field.city.set_on.web":"Settings","gap.field.city.set_on.cli":"nemar auth profile set-location","gap.field.country.set_on.web":"Settings","gap.field.country.set_on.cli":"nemar auth profile set-location","gap.field.why.set_on.web":"the request form in Settings","gap.field.why.set_on.cli":"nemar auth request-upload-access","gaps.title":"What is still missing","gaps.none":"Nothing outstanding \u2014 every field NEMAR needs is filled in.","gaps.nudge.title":"Your profile isn\u2019t finished yet","gaps.nudge.cta":"Complete your profile","gaps.upload.title":"Before you can ask, your account still needs:","gaps.request.title":"Finish these first:","gaps.admin.title":"Still missing","gaps.admin.item":"{label} \u2014 blocks {blocks}","gaps.admin.none":"Nothing missing \u2014 every field the request needs is filled in.","gaps.admin.not_loaded":"Not loaded \u2014 open the user page to see what is still missing.","onboarding.username.auto_assigned.title":"We chose your username from your name","onboarding.username.auto_assigned.body":"Your account needed a username to be listed as a dataset owner, so one was made from your name when you signed in. You can change it once, here, until an admin grants you upload access.","welcome.unverified.title":"Verify your email address","welcome.unverified.body":"Authorizing with ORCID created your NEMAR account and signed you in. One step left: enter the 6-digit code we emailed you. That activates the account \u2014 no admin approval is involved.","welcome.active.title":"Your account is active","welcome.active.body":"Authorizing with ORCID created your NEMAR account and signed you in. There is no separate sign-up step and no approval queue: browse, search, and your dashboard all work right now.","welcome.upload_access.title":"Ask for upload access when you\u2019re ready to contribute","welcome.upload_access.body":"Reading is open to every verified account. Uploading and compute need one extra grant, because an admin has to check your GitHub handle and location against export-control and local-jurisdiction rules first. You ask once, from Settings.","cli.gaps.section.title":"Profile","cli.gaps.unknown":"not checked \u2014 run 'nemar auth status --refresh'","cli.gaps.unreported":"not reported by this backend","cli.gap.set_on.cli_only":"Run `{cli}`.","cli.gap.field.sandbox.label":"Sandbox training","cli.gap.blocks.sandbox":"to upload a dataset from the CLI","cli.gap.field.sandbox.set_on.cli":"nemar sandbox","cli.upload.preflight.title":"Upload access is not granted yet","cli.upload.preflight.body":"Browsing, searching and downloading are open to your account already. Uploading needs one extra grant: an admin checks your GitHub handle and location against export-control and local-jurisdiction rules, once.","cli.upload_access.cta":"Ask for it with `nemar auth request-upload-access`.","cli.upload.preflight.unchecked":"Upload access could not be checked ({reason}); continuing.","cli.upload.preflight.gaps_unknown":"Could not determine what is still missing; run `nemar auth profile` for the list.","cli.upload.preflight.dry_run":"Continuing anyway: --dry-run uploads nothing."}});function PDe(e){return e==="verified"||e==="upload_access"||e==="publication"}function Sc(e){return(e??"").trim().length===0}function NN(e,t={}){let r=t.orcidVerified===!0,n=Object.hasOwn(Bm,e)?Bm[e]:void 0;if(!n)return{field:e,label:e,blocks:t.blocks??[],setOnWeb:wt["gap.set_on.default_web"],setOnCli:null,known:!1};let i=r&&n.orcidWebKey!==void 0;return{field:e,blocks:t.blocks??n.blocks,label:wt[n.labelKey],setOnWeb:wt[i?n.orcidWebKey:n.webKey],setOnCli:i||n.cliKey===null?null:wt[n.cliKey],known:!0}}function IN(e){let t=X_.indexOf(e);return t===-1?X_.length:t}function qN(e,t={}){return e.map((r)=>NN(r,{orcidVerified:t.orcidVerified}))}function Lm(e,t={}){return e.filter((r)=>!!r&&typeof r.field==="string").map((r)=>{let n=Array.isArray(r.blocks)?r.blocks.filter(PDe):[];return NN(r.field,{orcidVerified:t.orcidVerified,blocks:n.length>0?n:void 0})}).sort((r,n)=>IN(r.field)-IN(n.field))}function Q_(e){let t=e.blocks[0],r=t?wt[FDe[t]]:wt["gap.blocks.unknown"],n=Ki(wt["gap.sentence"],{label:"",blocks:r}).trimStart(),i=e.setOnCli?Ki(wt["gap.set_on.both"],{web:e.setOnWeb,cli:e.setOnCli}):Ki(wt["gap.set_on.web"],{web:e.setOnWeb});return`${n} ${i}`}function jN(e){return`${e.label} ${Q_(e)}`}function Um(){let e=Ki(wt["gap.sentence"],{label:TN.label,blocks:wt["cli.gap.blocks.sandbox"]}),t=Ki(wt["cli.gap.set_on.cli_only"],{cli:TN.command});return`${e} ${t}`}var Bm,X_,Wet,FDe,TN;var $c=O(()=>{Ec();Bm={email_verified:{blocks:["verified","upload_access"],labelKey:"gap.field.email_verified.label",webKey:"gap.field.email_verified.set_on.web",cliKey:"gap.field.email_verified.set_on.cli",isMissing:(e)=>e.status==="pending"||e.email_verified===!1},username:{blocks:["upload_access"],labelKey:"gap.field.username.label",webKey:"gap.field.username.set_on.web",cliKey:"gap.field.username.set_on.cli",isMissing:(e)=>e.username!==void 0&&Sc(e.username)},given_name:{blocks:["upload_access","publication"],labelKey:"gap.field.given_name.label",webKey:"gap.field.given_name.set_on.web",cliKey:"gap.field.given_name.set_on.cli",orcidWebKey:"gap.field.given_name.set_on.web.orcid",isMissing:(e)=>Sc(e.given_name)},family_name:{blocks:["upload_access","publication"],labelKey:"gap.field.family_name.label",webKey:"gap.field.family_name.set_on.web",cliKey:"gap.field.family_name.set_on.cli",orcidWebKey:"gap.field.family_name.set_on.web.orcid",isMissing:(e)=>Sc(e.family_name)},github_username:{blocks:["upload_access","publication"],labelKey:"gap.field.github_username.label",webKey:"gap.field.github_username.set_on.web",cliKey:"gap.field.github_username.set_on.cli",isMissing:(e)=>Sc(e.github_username)},city:{blocks:["upload_access"],labelKey:"gap.field.city.label",webKey:"gap.field.city.set_on.web",cliKey:"gap.field.city.set_on.cli",isMissing:(e)=>Sc(e.city)},country:{blocks:["upload_access"],labelKey:"gap.field.country.label",webKey:"gap.field.country.set_on.web",cliKey:"gap.field.country.set_on.cli",isMissing:(e)=>Sc(e.country)},why:{blocks:["upload_access"],labelKey:"gap.field.why.label",webKey:"gap.field.why.set_on.web",cliKey:"gap.field.why.set_on.cli",isMissing:null}},X_=Object.keys(Bm),Wet=X_.filter((e)=>Bm[e].isMissing!==null),FDe={verified:"gap.blocks.verified",upload_access:"gap.blocks.upload_access",publication:"gap.blocks.publication"};TN={field:"sandbox",label:wt["cli.gap.field.sandbox.label"],command:wt["cli.gap.field.sandbox.set_on.cli"]}});var Gu=O(()=>{z_();jm();Y_();kN();J_();Ec();$c()});function Vm(e){let t=[],r="",n="start",i=!1;for(let o of e)switch(o){case"\\":{if(n==="index")throw Error("Invalid character in an index");if(n==="indexEnd")throw Error("Invalid character after an index");if(i)r+=o;n="property",i=!i;break}case".":{if(n==="index")throw Error("Invalid character in an index");if(n==="indexEnd"){n="property";break}if(i){i=!1,r+=o;break}if(Z_.has(r))return[];t.push(r),r="",n="property";break}case"[":{if(n==="index")throw Error("Invalid character in an index");if(n==="indexEnd"){n="index";break}if(i){i=!1,r+=o;break}if(n==="property"){if(Z_.has(r))return[];t.push(r),r=""}n="index";break}case"]":{if(n==="index"){t.push(Number.parseInt(r,10)),r="",n="indexEnd";break}if(n==="indexEnd")throw Error("Invalid character after an index")}default:{if(n==="index"&&!IDe.has(o))throw Error("Invalid character in an index");if(n==="indexEnd")throw Error("Invalid character after an index");if(n==="start")n="property";if(i)i=!1,r+="\\";r+=o}}if(i)r+="\\";switch(n){case"property":{if(Z_.has(r))return[];t.push(r);break}case"index":throw Error("Index was not closed");case"start":{t.push("");break}}return t}function ev(e,t){if(typeof t!=="number"&&Array.isArray(e)){let r=Number.parseInt(t,10);return Number.isInteger(r)&&e[r]===e[t]}return!1}function MN(e,t){if(ev(e,t))throw Error("Cannot use string index")}function BN(e,t,r){if(!js(e)||typeof t!=="string")return r===void 0?e:r;let n=Vm(t);if(n.length===0)return r;for(let i=0;i<n.length;i++){let o=n[i];if(ev(e,o))e=i===n.length-1?void 0:null;else e=e[o];if(e===void 0||e===null){if(i!==n.length-1)return r;break}}return e===void 0?r:e}function tv(e,t,r){if(!js(e)||typeof t!=="string")return e;let n=e,i=Vm(t);for(let o=0;o<i.length;o++){let s=i[o];if(MN(e,s),o===i.length-1)e[s]=r;else if(!js(e[s]))e[s]=typeof i[o+1]==="number"?[]:{};e=e[s]}return n}function LN(e,t){if(!js(e)||typeof t!=="string")return!1;let r=Vm(t);for(let n=0;n<r.length;n++){let i=r[n];if(MN(e,i),n===r.length-1)return delete e[i],!0;if(e=e[i],!js(e))return!1}}function UN(e,t){if(!js(e)||typeof t!=="string")return!1;let r=Vm(t);if(r.length===0)return!1;for(let n of r){if(!js(e)||!(n in e)||ev(e,n))return!1;e=e[n]}return!0}var js=(e)=>{let t=typeof e;return e!==null&&(t==="object"||t==="function")},Z_,IDe;var VN=O(()=>{Z_=new Set(["__proto__","prototype","constructor"]),IDe=new Set("0123456789")});import yt from"path";import GN from"os";import rv from"process";function iv(e,{suffix:t="nodejs"}={}){if(typeof e!=="string")throw TypeError(`Expected a string, got ${typeof e}`);if(t)e+=`-${t}`;if(rv.platform==="darwin")return TDe(e);if(rv.platform==="win32")return NDe(e);return qDe(e)}var zo,nv,Cc,TDe=(e)=>{let t=yt.join(zo,"Library");return{data:yt.join(t,"Application Support",e),config:yt.join(t,"Preferences",e),cache:yt.join(t,"Caches",e),log:yt.join(t,"Logs",e),temp:yt.join(nv,e)}},NDe=(e)=>{let t=Cc.APPDATA||yt.join(zo,"AppData","Roaming"),r=Cc.LOCALAPPDATA||yt.join(zo,"AppData","Local");return{data:yt.join(r,e,"Data"),config:yt.join(t,e,"Config"),cache:yt.join(r,e,"Cache"),log:yt.join(r,e,"Log"),temp:yt.join(nv,e)}},qDe=(e)=>{let t=yt.basename(zo);return{data:yt.join(Cc.XDG_DATA_HOME||yt.join(zo,".local","share"),e),config:yt.join(Cc.XDG_CONFIG_HOME||yt.join(zo,".config"),e),cache:yt.join(Cc.XDG_CACHE_HOME||yt.join(zo,".cache"),e),log:yt.join(Cc.XDG_STATE_HOME||yt.join(zo,".local","state"),e),temp:yt.join(nv,t,e)}};var zN=O(()=>{zo=GN.homedir(),nv=GN.tmpdir(),{env:Cc}=rv});var jDe=(e,t)=>{let{onError:r}=t;return function(...i){return e.apply(void 0,i).catch(r)}},fi;var HN=O(()=>{fi=jDe});var MDe=(e,t)=>{let{onError:r}=t;return function(...i){try{return e.apply(void 0,i)}catch(o){return r(o)}}},Rn;var WN=O(()=>{Rn=MDe});var KN=250;var YN=()=>{};var BDe=(e,t)=>{let{isRetriable:r}=t;return function(i){let{timeout:o}=i,s=i.interval??KN,a=Date.now()+o;return function c(...u){return e.apply(void 0,u).catch((d)=>{if(!r(d))throw d;if(Date.now()>=a)throw d;let f=Math.round(s*Math.random());if(f>0)return new Promise((p)=>setTimeout(p,f)).then(()=>c.apply(void 0,u));else return c.apply(void 0,u)})}}},pi;var JN=O(()=>{YN();pi=BDe});var LDe=(e,t)=>{let{isRetriable:r}=t;return function(i){let{timeout:o}=i,s=Date.now()+o;return function(...c){while(!0)try{return e.apply(void 0,c)}catch(u){if(!r(u))throw u;if(Date.now()>=s)throw u;continue}}}},mi;var XN=O(()=>{mi=LDe});var ov=O(()=>{HN();WN();JN();XN()});var zu,sv;var QN=O(()=>{av();zu={isChangeErrorOk:(e)=>{if(!zu.isNodeError(e))return!1;let{code:t}=e;if(t==="ENOSYS")return!0;if(!ZN&&(t==="EINVAL"||t==="EPERM"))return!0;return!1},isNodeError:(e)=>e instanceof Error,isRetriableError:(e)=>{if(!zu.isNodeError(e))return!1;let{code:t}=e;if(t==="EMFILE"||t==="ENFILE"||t==="EAGAIN"||t==="EBUSY"||t==="EACCESS"||t==="EACCES"||t==="EACCS"||t==="EPERM")return!0;return!1},onChangeError:(e)=>{if(!zu.isNodeError(e))throw e;if(zu.isChangeErrorOk(e))return;throw e}},sv=zu});import eq from"process";var Hu,Cr,ZN,Vt;var av=O(()=>{QN();Hu={onError:sv.onChangeError},Cr={onError:()=>{return}},ZN=eq.getuid?!eq.getuid():!1,Vt={isRetriable:sv.isRetriableError}});import Ne from"fs";import{promisify as er}from"util";var UDe,Tt;var cv=O(()=>{ov();ov();av();UDe={attempt:{chmod:fi(er(Ne.chmod),Hu),chown:fi(er(Ne.chown),Hu),close:fi(er(Ne.close),Cr),fsync:fi(er(Ne.fsync),Cr),mkdir:fi(er(Ne.mkdir),Cr),realpath:fi(er(Ne.realpath),Cr),stat:fi(er(Ne.stat),Cr),unlink:fi(er(Ne.unlink),Cr),chmodSync:Rn(Ne.chmodSync,Hu),chownSync:Rn(Ne.chownSync,Hu),closeSync:Rn(Ne.closeSync,Cr),existsSync:Rn(Ne.existsSync,Cr),fsyncSync:Rn(Ne.fsync,Cr),mkdirSync:Rn(Ne.mkdirSync,Cr),realpathSync:Rn(Ne.realpathSync,Cr),statSync:Rn(Ne.statSync,Cr),unlinkSync:Rn(Ne.unlinkSync,Cr)},retry:{close:pi(er(Ne.close),Vt),fsync:pi(er(Ne.fsync),Vt),open:pi(er(Ne.open),Vt),readFile:pi(er(Ne.readFile),Vt),rename:pi(er(Ne.rename),Vt),stat:pi(er(Ne.stat),Vt),write:pi(er(Ne.write),Vt),writeFile:pi(er(Ne.writeFile),Vt),closeSync:mi(Ne.closeSync,Vt),fsyncSync:mi(Ne.fsyncSync,Vt),openSync:mi(Ne.openSync,Vt),readFileSync:mi(Ne.readFileSync,Vt),renameSync:mi(Ne.renameSync,Vt),statSync:mi(Ne.statSync,Vt),writeSync:mi(Ne.writeSync,Vt),writeFileSync:mi(Ne.writeFileSync,Vt)}},Tt=UDe});import Ms from"process";var tq="utf8",lv=438,rq=511,nq,iq,oq,sq=1000,aq,Att,uv=128;var dv=O(()=>{nq={},iq=Ms.geteuid?Ms.geteuid():-1,oq=Ms.getegid?Ms.getegid():-1,aq=!!Ms.getuid,Att=Ms.getuid?!Ms.getuid():!1});var cq=(e)=>e instanceof Error&&("code"in e),fv=(e)=>typeof e==="string",Gm=(e)=>e===void 0;var lq=()=>{};var uq=()=>{};import dq from"process";var fq,zm;var pv=O(()=>{fq=dq.platform==="linux",zm=dq.platform==="win32"});var mv,pq;var mq=O(()=>{pv();mv=["SIGHUP","SIGINT","SIGTERM"];if(!zm)mv.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");if(fq)mv.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");pq=mv});import Rc from"process";class hq{constructor(){this.callbacks=new Set,this.exited=!1,this.exit=(e)=>{if(this.exited)return;this.exited=!0;for(let t of this.callbacks)t();if(e)if(zm&&(e!=="SIGINT"&&e!=="SIGTERM"&&e!=="SIGKILL"))Rc.kill(Rc.pid,"SIGTERM");else Rc.kill(Rc.pid,e)},this.hook=()=>{Rc.once("exit",()=>this.exit());for(let e of pq)try{Rc.once(e,()=>this.exit(e))}catch{}},this.register=(e)=>(this.callbacks.add(e),()=>{this.callbacks.delete(e)}),this.hook()}}var gq;var yq=O(()=>{pv();mq();gq=new hq});var VDe,xq;var bq=O(()=>{yq();VDe=gq.register,xq=VDe});import GDe from"path";var zr,Wu;var _q=O(()=>{cv();bq();dv();zr={store:{},create:(e)=>{let t=`000000${Math.floor(Math.random()*16777215).toString(16)}`.slice(-6),r=Date.now().toString().slice(-10),n="tmp-",i=`.tmp-${r}${t}`;return`${e}${i}`},get:(e,t,r=!0)=>{let n=zr.truncate(t(e));if(n in zr.store)return zr.get(e,t,r);return zr.store[n]=r,[n,()=>delete zr.store[n]]},purge:(e)=>{if(!zr.store[e])return;delete zr.store[e],Tt.attempt.unlink(e)},purgeSync:(e)=>{if(!zr.store[e])return;delete zr.store[e],Tt.attempt.unlinkSync(e)},purgeSyncAll:()=>{for(let e in zr.store)zr.purgeSync(e)},truncate:(e)=>{let t=GDe.basename(e);if(t.length<=uv)return e;let r=/^(\.?)(.*?)((?:\.[^.]+)?(?:\.tmp-\d{10}[a-f0-9]{6})?)$/.exec(t);if(!r)return e;let n=t.length-uv;return`${e.slice(0,-t.length)}${r[1]}${r[2].slice(0,-n)}${r[3]}`}};xq(zr.purgeSyncAll);Wu=zr});import zDe from"path";function hv(e,t,r=nq){if(fv(r))return hv(e,t,{encoding:r});let i={timeout:r.timeout??sq},o=null,s=null,a=null;try{let c=Tt.attempt.realpathSync(e),u=!!c;e=c||e,[s,o]=Wu.get(e,r.tmpCreate||Wu.create,r.tmpPurge!==!1);let d=aq&&Gm(r.chown),f=Gm(r.mode);if(u&&(d||f)){let m=Tt.attempt.statSync(e);if(m){if(r={...r},d)r.chown={uid:m.uid,gid:m.gid};if(f)r.mode=m.mode}}if(!u){let m=zDe.dirname(e);Tt.attempt.mkdirSync(m,{mode:rq,recursive:!0})}if(a=Tt.retry.openSync(i)(s,"w",r.mode||lv),r.tmpCreated)r.tmpCreated(s);if(fv(t))Tt.retry.writeSync(i)(a,t,0,r.encoding||tq);else if(!Gm(t))Tt.retry.writeSync(i)(a,t,0,t.length,0);if(r.fsync!==!1)if(r.fsyncWait!==!1)Tt.retry.fsyncSync(i)(a);else Tt.attempt.fsync(a);if(Tt.retry.closeSync(i)(a),a=null,r.chown&&(r.chown.uid!==iq||r.chown.gid!==oq))Tt.attempt.chownSync(s,r.chown.uid,r.chown.gid);if(r.mode&&r.mode!==lv)Tt.attempt.chmodSync(s,r.mode);try{Tt.retry.renameSync(i)(s,e)}catch(m){if(!cq(m))throw m;if(m.code!=="ENAMETOOLONG")throw m;Tt.retry.renameSync(i)(s,Wu.truncate(e))}o(),s=null}finally{if(a)Tt.attempt.closeSync(a);if(s)Wu.purge(s)}}var vq=O(()=>{cv();dv();lq();uq();_q()});var Yu=h(function(Eq){Object.defineProperty(Eq,"__esModule",{value:!0});Eq.regexpCode=Eq.getEsmExportName=Eq.getProperty=Eq.safeStringify=Eq.stringify=Eq.strConcat=Eq.addCodeArg=Eq.str=Eq._=Eq.nil=Eq._Code=Eq.Name=Eq.IDENTIFIER=Eq._CodeOrName=void 0;class Hm{}Eq._CodeOrName=Hm;Eq.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class Oc extends Hm{constructor(e){super();if(!Eq.IDENTIFIER.test(e))throw Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}Eq.Name=Oc;class On extends Hm{constructor(e){super();this._items=typeof e==="string"?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let e=this._items[0];return e===""||e==='""'}get str(){var e;return(e=this._str)!==null&&e!==void 0?e:this._str=this._items.reduce((t,r)=>`${t}${r}`,"")}get names(){var e;return(e=this._names)!==null&&e!==void 0?e:this._names=this._items.reduce((t,r)=>{if(r instanceof Oc)t[r.str]=(t[r.str]||0)+1;return t},{})}}Eq._Code=On;Eq.nil=new On("");function wq(e,...t){let r=[e[0]],n=0;while(n<t.length)yv(r,t[n]),r.push(e[++n]);return new On(r)}Eq._=wq;var gv=new On("+");function Dq(e,...t){let r=[Ku(e[0])],n=0;while(n<t.length)r.push(gv),yv(r,t[n]),r.push(gv,Ku(e[++n]));return HDe(r),new On(r)}Eq.str=Dq;function yv(e,t){if(t instanceof On)e.push(...t._items);else if(t instanceof Oc)e.push(t);else e.push(YDe(t))}Eq.addCodeArg=yv;function HDe(e){let t=1;while(t<e.length-1){if(e[t]===gv){let r=WDe(e[t-1],e[t+1]);if(r!==void 0){e.splice(t-1,3,r);continue}e[t++]="+"}t++}}function WDe(e,t){if(t==='""')return e;if(e==='""')return t;if(typeof e=="string"){if(t instanceof Oc||e[e.length-1]!=='"')return;if(typeof t!="string")return`${e.slice(0,-1)}${t}"`;if(t[0]==='"')return e.slice(0,-1)+t.slice(1);return}if(typeof t=="string"&&t[0]==='"'&&!(e instanceof Oc))return`"${e}${t.slice(1)}`;return}function KDe(e,t){return t.emptyStr()?e:e.emptyStr()?t:Dq`${e}${t}`}Eq.strConcat=KDe;function YDe(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:Ku(Array.isArray(e)?e.join(","):e)}function JDe(e){return new On(Ku(e))}Eq.stringify=JDe;function Ku(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}Eq.safeStringify=Ku;function XDe(e){return typeof e=="string"&&Eq.IDENTIFIER.test(e)?new On(`.${e}`):wq`[${e}]`}Eq.getProperty=XDe;function QDe(e){if(typeof e=="string"&&Eq.IDENTIFIER.test(e))return new On(`${e}`);throw Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}Eq.getEsmExportName=QDe;function ZDe(e){return new On(e.toString())}Eq.regexpCode=ZDe});var vv=h(function(Rq){Object.defineProperty(Rq,"__esModule",{value:!0});Rq.ValueScope=Rq.ValueScopeName=Rq.Scope=Rq.varKinds=Rq.UsedValueState=void 0;var Rr=Yu();class $q extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`);this.value=e.value}}var Km;(function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"})(Km||(Rq.UsedValueState=Km={}));Rq.varKinds={const:new Rr.Name("const"),let:new Rr.Name("let"),var:new Rr.Name("var")};class bv{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t}toName(e){return e instanceof Rr.Name?e:this.name(e)}name(e){return new Rr.Name(this._newName(e))}_newName(e){let t=this._names[e]||this._nameGroup(e);return`${e}${t.index++}`}_nameGroup(e){var t,r;if(((r=(t=this._parent)===null||t===void 0?void 0:t._prefixes)===null||r===void 0?void 0:r.has(e))||this._prefixes&&!this._prefixes.has(e))throw Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}}Rq.Scope=bv;class _v extends Rr.Name{constructor(e,t){super(t);this.prefix=e}setValue(e,{property:t,itemIndex:r}){this.value=e,this.scopePath=Rr._`.${new Rr.Name(t)}[${r}]`}}Rq.ValueScopeName=_v;var f2e=Rr._`\n`;class Cq extends bv{constructor(e){super(e);this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?f2e:Rr.nil}}get(){return this._scope}name(e){return new _v(e,this._newName(e))}value(e,t){var r;if(t.ref===void 0)throw Error("CodeGen: ref must be passed in value");let n=this.toName(e),{prefix:i}=n,o=(r=t.key)!==null&&r!==void 0?r:t.ref,s=this._values[i];if(s){let u=s.get(o);if(u)return u}else s=this._values[i]=new Map;s.set(o,n);let a=this._scope[i]||(this._scope[i]=[]),c=a.length;return a[c]=t.ref,n.setValue(t,{property:i,itemIndex:c}),n}getValue(e,t){let r=this._values[e];if(!r)return;return r.get(t)}scopeRefs(e,t=this._values){return this._reduceValues(t,(r)=>{if(r.scopePath===void 0)throw Error(`CodeGen: name "${r}" has no value`);return Rr._`${e}${r.scopePath}`})}scopeCode(e=this._values,t,r){return this._reduceValues(e,(n)=>{if(n.value===void 0)throw Error(`CodeGen: name "${n}" has no value`);return n.value.code},t,r)}_reduceValues(e,t,r={},n){let i=Rr.nil;for(let o in e){let s=e[o];if(!s)continue;let a=r[o]=r[o]||new Map;s.forEach((c)=>{if(a.has(c))return;a.set(c,Km.Started);let u=t(c);if(u){let d=this.opts.es5?Rq.varKinds.var:Rq.varKinds.const;i=Rr._`${i}${d} ${c} = ${u};${this.opts._n}`}else if(u=n===null||n===void 0?void 0:n(c))i=Rr._`${i}${u}${this.opts._n}`;else throw new $q(c);a.set(c,Km.Completed)})}return i}}Rq.ValueScope=Cq});var he=h(function(Or){Object.defineProperty(Or,"__esModule",{value:!0});Or.or=Or.and=Or.not=Or.CodeGen=Or.operators=Or.varKinds=Or.ValueScopeName=Or.ValueScope=Or.Scope=Or.Name=Or.regexpCode=Or.stringify=Or.getProperty=Or.nil=Or.strConcat=Or.str=Or._=void 0;var Ce=Yu(),kn=vv(),Ho=Yu();Object.defineProperty(Or,"_",{enumerable:!0,get:function(){return Ho._}});Object.defineProperty(Or,"str",{enumerable:!0,get:function(){return Ho.str}});Object.defineProperty(Or,"strConcat",{enumerable:!0,get:function(){return Ho.strConcat}});Object.defineProperty(Or,"nil",{enumerable:!0,get:function(){return Ho.nil}});Object.defineProperty(Or,"getProperty",{enumerable:!0,get:function(){return Ho.getProperty}});Object.defineProperty(Or,"stringify",{enumerable:!0,get:function(){return Ho.stringify}});Object.defineProperty(Or,"regexpCode",{enumerable:!0,get:function(){return Ho.regexpCode}});Object.defineProperty(Or,"Name",{enumerable:!0,get:function(){return Ho.Name}});var eh=vv();Object.defineProperty(Or,"Scope",{enumerable:!0,get:function(){return eh.Scope}});Object.defineProperty(Or,"ValueScope",{enumerable:!0,get:function(){return eh.ValueScope}});Object.defineProperty(Or,"ValueScopeName",{enumerable:!0,get:function(){return eh.ValueScopeName}});Object.defineProperty(Or,"varKinds",{enumerable:!0,get:function(){return eh.varKinds}});Or.operators={GT:new Ce._Code(">"),GTE:new Ce._Code(">="),LT:new Ce._Code("<"),LTE:new Ce._Code("<="),EQ:new Ce._Code("==="),NEQ:new Ce._Code("!=="),NOT:new Ce._Code("!"),OR:new Ce._Code("||"),AND:new Ce._Code("&&"),ADD:new Ce._Code("+")};class Wo{optimizeNodes(){return this}optimizeNames(e,t){return this}}class kq extends Wo{constructor(e,t,r){super();this.varKind=e,this.name=t,this.rhs=r}render({es5:e,_n:t}){let r=e?kn.varKinds.var:this.varKind,n=this.rhs===void 0?"":` = ${this.rhs}`;return`${r} ${this.name}${n};`+t}optimizeNames(e,t){if(!e[this.name.str])return;if(this.rhs)this.rhs=Ac(this.rhs,e,t);return this}get names(){return this.rhs instanceof Ce._CodeOrName?this.rhs.names:{}}}class Ev extends Wo{constructor(e,t,r){super();this.lhs=e,this.rhs=t,this.sideEffects=r}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,t){if(this.lhs instanceof Ce.Name&&!e[this.lhs.str]&&!this.sideEffects)return;return this.rhs=Ac(this.rhs,e,t),this}get names(){let e=this.lhs instanceof Ce.Name?{}:{...this.lhs.names};return Zm(e,this.rhs)}}class Aq extends Ev{constructor(e,t,r,n){super(e,r,n);this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}}class Fq extends Wo{constructor(e){super();this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}}class Pq extends Wo{constructor(e){super();this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}}class Iq extends Wo{constructor(e){super();this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}}class Tq extends Wo{constructor(e){super();this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,t){return this.code=Ac(this.code,e,t),this}get names(){return this.code instanceof Ce._CodeOrName?this.code.names:{}}}class th extends Wo{constructor(e=[]){super();this.nodes=e}render(e){return this.nodes.reduce((t,r)=>t+r.render(e),"")}optimizeNodes(){let{nodes:e}=this,t=e.length;while(t--){let r=e[t].optimizeNodes();if(Array.isArray(r))e.splice(t,1,...r);else if(r)e[t]=r;else e.splice(t,1)}return e.length>0?this:void 0}optimizeNames(e,t){let{nodes:r}=this,n=r.length;while(n--){let i=r[n];if(i.optimizeNames(e,t))continue;g2e(e,i.names),r.splice(n,1)}return r.length>0?this:void 0}get names(){return this.nodes.reduce((e,t)=>Bs(e,t.names),{})}}class Ko extends th{render(e){return"{"+e._n+super.render(e)+"}"+e._n}}class Nq extends th{}class Ju extends Ko{}Ju.kind="else";class Yi extends Ko{constructor(e,t){super(t);this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);if(this.else)t+="else "+this.else.render(e);return t}optimizeNodes(){super.optimizeNodes();let e=this.condition;if(e===!0)return this.nodes;let t=this.else;if(t){let r=t.optimizeNodes();t=this.else=Array.isArray(r)?new Ju(r):r}if(t){if(e===!1)return t instanceof Yi?t:t.nodes;if(this.nodes.length)return this;return new Yi(Lq(e),t instanceof Yi?[t]:t.nodes)}if(e===!1||!this.nodes.length)return;return this}optimizeNames(e,t){var r;if(this.else=(r=this.else)===null||r===void 0?void 0:r.optimizeNames(e,t),!(super.optimizeNames(e,t)||this.else))return;return this.condition=Ac(this.condition,e,t),this}get names(){let e=super.names;if(Zm(e,this.condition),this.else)Bs(e,this.else.names);return e}}Yi.kind="if";class kc extends Ko{}kc.kind="for";class qq extends kc{constructor(e){super();this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,t){if(!super.optimizeNames(e,t))return;return this.iteration=Ac(this.iteration,e,t),this}get names(){return Bs(super.names,this.iteration.names)}}class jq extends kc{constructor(e,t,r,n){super();this.varKind=e,this.name=t,this.from=r,this.to=n}render(e){let t=e.es5?kn.varKinds.var:this.varKind,{name:r,from:n,to:i}=this;return`for(${t} ${r}=${n}; ${r}<${i}; ${r}++)`+super.render(e)}get names(){let e=Zm(super.names,this.from);return Zm(e,this.to)}}class wv extends kc{constructor(e,t,r,n){super();this.loop=e,this.varKind=t,this.name=r,this.iterable=n}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,t){if(!super.optimizeNames(e,t))return;return this.iterable=Ac(this.iterable,e,t),this}get names(){return Bs(super.names,this.iterable.names)}}class Ym extends Ko{constructor(e,t,r){super();this.name=e,this.args=t,this.async=r}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}}Ym.kind="func";class Jm extends th{render(e){return"return "+super.render(e)}}Jm.kind="return";class Mq extends Ko{render(e){let t="try"+super.render(e);if(this.catch)t+=this.catch.render(e);if(this.finally)t+=this.finally.render(e);return t}optimizeNodes(){var e,t;return super.optimizeNodes(),(e=this.catch)===null||e===void 0||e.optimizeNodes(),(t=this.finally)===null||t===void 0||t.optimizeNodes(),this}optimizeNames(e,t){var r,n;return super.optimizeNames(e,t),(r=this.catch)===null||r===void 0||r.optimizeNames(e,t),(n=this.finally)===null||n===void 0||n.optimizeNames(e,t),this}get names(){let e=super.names;if(this.catch)Bs(e,this.catch.names);if(this.finally)Bs(e,this.finally.names);return e}}class Xm extends Ko{constructor(e){super();this.error=e}render(e){return`catch(${this.error})`+super.render(e)}}Xm.kind="catch";class Qm extends Ko{render(e){return"finally"+super.render(e)}}Qm.kind="finally";class Bq{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...t,_n:t.lines?`
|
|
84
|
+
`;return this.stop(),this.#o.write(u),this}}function w(e){return new aN(e)}var Cu,Mwe;var $n=O(()=>{Ke();H5();K5();A_();rN();iN();sN();Cu=ce(_p(),1),Mwe=ce(_p(),1)});var Ee,uN,V,Bi=(e)=>{switch(typeof e){case"undefined":return V.undefined;case"string":return V.string;case"number":return Number.isNaN(e)?V.nan:V.number;case"boolean":return V.boolean;case"function":return V.function;case"bigint":return V.bigint;case"symbol":return V.symbol;case"object":if(Array.isArray(e))return V.array;if(e===null)return V.null;if(e.then&&typeof e.then==="function"&&e.catch&&typeof e.catch==="function")return V.promise;if(typeof Map<"u"&&e instanceof Map)return V.map;if(typeof Set<"u"&&e instanceof Set)return V.set;if(typeof Date<"u"&&e instanceof Date)return V.date;return V.object;default:return V.unknown}};var Ru=O(()=>{(function(e){e.assertEqual=(i)=>{};function t(i){}e.assertIs=t;function r(i){throw Error()}e.assertNever=r,e.arrayToEnum=(i)=>{let o={};for(let s of i)o[s]=s;return o},e.getValidEnumValues=(i)=>{let o=e.objectKeys(i).filter((a)=>typeof i[i[a]]!=="number"),s={};for(let a of o)s[a]=i[a];return e.objectValues(s)},e.objectValues=(i)=>e.objectKeys(i).map(function(o){return i[o]}),e.objectKeys=typeof Object.keys==="function"?(i)=>Object.keys(i):(i)=>{let o=[];for(let s in i)if(Object.prototype.hasOwnProperty.call(i,s))o.push(s);return o},e.find=(i,o)=>{for(let s of i)if(o(s))return s;return},e.isInteger=typeof Number.isInteger==="function"?(i)=>Number.isInteger(i):(i)=>typeof i==="number"&&Number.isFinite(i)&&Math.floor(i)===i;function n(i,o=" | "){return i.map((s)=>typeof s==="string"?`'${s}'`:s).join(o)}e.joinValues=n,e.jsonStringifyReplacer=(i,o)=>{if(typeof o==="bigint")return o.toString();return o}})(Ee||(Ee={}));(function(e){e.mergeShapes=(t,r)=>({...t,...r})})(uN||(uN={}));V=Ee.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"])});var I,Gr;var Cm=O(()=>{Ru();I=Ee.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"]);Gr=class Gr extends Error{get errors(){return this.issues}constructor(e){super();this.issues=[],this.addIssue=(r)=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};let t=new.target.prototype;if(Object.setPrototypeOf)Object.setPrototypeOf(this,t);else this.__proto__=t;this.name="ZodError",this.issues=e}format(e){let t=e||function(i){return i.message},r={_errors:[]},n=(i)=>{for(let o of i.issues)if(o.code==="invalid_union")o.unionErrors.map(n);else if(o.code==="invalid_return_type")n(o.returnTypeError);else if(o.code==="invalid_arguments")n(o.argumentsError);else if(o.path.length===0)r._errors.push(t(o));else{let s=r,a=0;while(a<o.path.length){let c=o.path[a];if(a!==o.path.length-1)s[c]=s[c]||{_errors:[]};else s[c]=s[c]||{_errors:[]},s[c]._errors.push(t(o));s=s[c],a++}}};return n(this),r}static assert(e){if(!(e instanceof Gr))throw Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Ee.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=(t)=>t.message){let t={},r=[];for(let n of this.issues)if(n.path.length>0){let i=n.path[0];t[i]=t[i]||[],t[i].push(e(n))}else r.push(e(n));return{formErrors:r,fieldErrors:t}}get formErrors(){return this.flatten()}};Gr.create=(e)=>new Gr(e)});var Bwe=(e,t)=>{let r;switch(e.code){case I.invalid_type:if(e.received===V.undefined)r="Required";else r=`Expected ${e.expected}, received ${e.received}`;break;case I.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,Ee.jsonStringifyReplacer)}`;break;case I.unrecognized_keys:r=`Unrecognized key(s) in object: ${Ee.joinValues(e.keys,", ")}`;break;case I.invalid_union:r="Invalid input";break;case I.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${Ee.joinValues(e.options)}`;break;case I.invalid_enum_value:r=`Invalid enum value. Expected ${Ee.joinValues(e.options)}, received '${e.received}'`;break;case I.invalid_arguments:r="Invalid function arguments";break;case I.invalid_return_type:r="Invalid function return type";break;case I.invalid_date:r="Invalid date";break;case I.invalid_string:if(typeof e.validation==="object")if("includes"in e.validation){if(r=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position==="number")r=`${r} at one or more positions greater than or equal to ${e.validation.position}`}else if("startsWith"in e.validation)r=`Invalid input: must start with "${e.validation.startsWith}"`;else if("endsWith"in e.validation)r=`Invalid input: must end with "${e.validation.endsWith}"`;else Ee.assertNever(e.validation);else if(e.validation!=="regex")r=`Invalid ${e.validation}`;else r="Invalid";break;case I.too_small:if(e.type==="array")r=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`;else if(e.type==="string")r=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`;else if(e.type==="number")r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`;else if(e.type==="bigint")r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`;else if(e.type==="date")r=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`;else r="Invalid input";break;case I.too_big:if(e.type==="array")r=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`;else if(e.type==="string")r=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`;else if(e.type==="number")r=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`;else if(e.type==="bigint")r=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`;else if(e.type==="date")r=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`;else r="Invalid input";break;case I.custom:r="Invalid input";break;case I.invalid_intersection_types:r="Intersection results could not be merged";break;case I.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case I.not_finite:r="Number must be finite";break;default:r=t.defaultError,Ee.assertNever(e)}return{message:r}},Vo;var N_=O(()=>{Cm();Ru();Vo=Bwe});function Ou(){return Lwe}var Lwe;var Rm=O(()=>{N_();Lwe=Vo});function L(e,t){let r=Ou(),n=Om({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,r,r===Vo?void 0:Vo].filter((i)=>!!i)});e.common.issues.push(n)}class Zt{constructor(){this.value="valid"}dirty(){if(this.value==="valid")this.value="dirty"}abort(){if(this.value!=="aborted")this.value="aborted"}static mergeArray(e,t){let r=[];for(let n of t){if(n.status==="aborted")return ne;if(n.status==="dirty")e.dirty();r.push(n.value)}return{status:e.value,value:r}}static async mergeObjectAsync(e,t){let r=[];for(let n of t){let i=await n.key,o=await n.value;r.push({key:i,value:o})}return Zt.mergeObjectSync(e,r)}static mergeObjectSync(e,t){let r={};for(let n of t){let{key:i,value:o}=n;if(i.status==="aborted")return ne;if(o.status==="aborted")return ne;if(i.status==="dirty")e.dirty();if(o.status==="dirty")e.dirty();if(i.value!=="__proto__"&&(typeof o.value<"u"||n.alwaysSet))r[i.value]=o.value}return{status:e.value,value:r}}}var Om=(e)=>{let{data:t,path:r,errorMaps:n,issueData:i}=e,o=[...r,...i.path||[]],s={...i,path:o};if(i.message!==void 0)return{...i,path:o,message:i.message};let a="",c=n.filter((u)=>!!u).slice().reverse();for(let u of c)a=u(s,{data:t,defaultError:a}).message;return{...i,path:o,message:a}},ne,yc=(e)=>({status:"dirty",value:e}),dr=(e)=>({status:"valid",value:e}),q_=(e)=>e.status==="aborted",j_=(e)=>e.status==="dirty",Is=(e)=>e.status==="valid",ku=(e)=>typeof Promise<"u"&&e instanceof Promise;var M_=O(()=>{Rm();N_();ne=Object.freeze({status:"aborted"})});var dN=()=>{};var J;var fN=O(()=>{(function(e){e.errToObj=(t)=>typeof t==="string"?{message:t}:t||{},e.toString=(t)=>typeof t==="string"?t:t?.message})(J||(J={}))});class Cn{constructor(e,t,r,n){this._cachedPath=[],this.parent=e,this.data=t,this._path=r,this._key=n}get path(){if(!this._cachedPath.length)if(Array.isArray(this._key))this._cachedPath.push(...this._path,...this._key);else this._cachedPath.push(...this._path,this._key);return this._cachedPath}}function me(e){if(!e)return{};let{errorMap:t,invalid_type_error:r,required_error:n,description:i}=e;if(t&&(r||n))throw Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);if(t)return{errorMap:t,description:i};return{errorMap:(s,a)=>{let{message:c}=e;if(s.code==="invalid_enum_value")return{message:c??a.defaultError};if(typeof a.data>"u")return{message:c??n??a.defaultError};if(s.code!=="invalid_type")return{message:a.defaultError};return{message:c??r??a.defaultError}},description:i}}class we{get description(){return this._def.description}_getType(e){return Bi(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:Bi(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new Zt,ctx:{common:e.parent.common,data:e.data,parsedType:Bi(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let t=this._parse(e);if(ku(t))throw Error("Synchronous parse encountered promise.");return t}_parseAsync(e){let t=this._parse(e);return Promise.resolve(t)}parse(e,t){let r=this.safeParse(e,t);if(r.success)return r.data;throw r.error}safeParse(e,t){let r={common:{issues:[],async:t?.async??!1,contextualErrorMap:t?.errorMap},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Bi(e)},n=this._parseSync({data:e,path:r.path,parent:r});return pN(r,n)}"~validate"(e){let t={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Bi(e)};if(!this["~standard"].async)try{let r=this._parseSync({data:e,path:[],parent:t});return Is(r)?{value:r.value}:{issues:t.common.issues}}catch(r){if(r?.message?.toLowerCase()?.includes("encountered"))this["~standard"].async=!0;t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then((r)=>Is(r)?{value:r.value}:{issues:t.common.issues})}async parseAsync(e,t){let r=await this.safeParseAsync(e,t);if(r.success)return r.data;throw r.error}async safeParseAsync(e,t){let r={common:{issues:[],contextualErrorMap:t?.errorMap,async:!0},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Bi(e)},n=this._parse({data:e,path:r.path,parent:r}),i=await(ku(n)?n:Promise.resolve(n));return pN(r,i)}refine(e,t){let r=(n)=>{if(typeof t==="string"||typeof t>"u")return{message:t};else if(typeof t==="function")return t(n);else return t};return this._refinement((n,i)=>{let o=e(n),s=()=>i.addIssue({code:I.custom,...r(n)});if(typeof Promise<"u"&&o instanceof Promise)return o.then((a)=>{if(!a)return s(),!1;else return!0});if(!o)return s(),!1;else return!0})}refinement(e,t){return this._refinement((r,n)=>{if(!e(r))return n.addIssue(typeof t==="function"?t(r,n):t),!1;else return!0})}_refinement(e){return new di({schema:this,typeName:ie.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:(t)=>this["~validate"](t)}}optional(){return ui.create(this,this._def)}nullable(){return Go.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return li.create(this)}promise(){return wc.create(this,this._def)}or(e){return Tu.create([this,e],this._def)}and(e){return Nu.create(this,e,this._def)}transform(e){return new di({...me(this._def),schema:this,typeName:ie.ZodEffects,effect:{type:"transform",transform:e}})}default(e){let t=typeof e==="function"?e:()=>e;return new Bu({...me(this._def),innerType:this,defaultValue:t,typeName:ie.ZodDefault})}brand(){return new V_({typeName:ie.ZodBranded,type:this,...me(this._def)})}catch(e){let t=typeof e==="function"?e:()=>e;return new Lu({...me(this._def),innerType:this,catchValue:t,typeName:ie.ZodCatch})}describe(e){return new this.constructor({...this._def,description:e})}pipe(e){return qm.create(this,e)}readonly(){return Uu.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}function hN(e){let t="[0-5]\\d";if(e.precision)t=`${t}\\.\\d{${e.precision}}`;else if(e.precision==null)t=`${t}(\\.\\d+)?`;let r=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${r}`}function iDe(e){return new RegExp(`^${hN(e)}$`)}function oDe(e){let t=`${mN}T${hN(e)}`,r=[];if(r.push(e.local?"Z?":"Z"),e.offset)r.push("([+-]\\d{2}:?\\d{2})");return t=`${t}(${r.join("|")})`,new RegExp(`^${t}$`)}function sDe(e,t){if((t==="v4"||!t)&&Xwe.test(e))return!0;if((t==="v6"||!t)&&Zwe.test(e))return!0;return!1}function aDe(e,t){if(!Wwe.test(e))return!1;try{let[r]=e.split(".");if(!r)return!1;let n=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),i=JSON.parse(atob(n));if(typeof i!=="object"||i===null)return!1;if("typ"in i&&i?.typ!=="JWT")return!1;if(!i.alg)return!1;if(t&&i.alg!==t)return!1;return!0}catch{return!1}}function cDe(e,t){if((t==="v4"||!t)&&Qwe.test(e))return!0;if((t==="v6"||!t)&&eDe.test(e))return!0;return!1}function lDe(e,t){let r=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,i=r>n?r:n,o=Number.parseInt(e.toFixed(i).replace(".","")),s=Number.parseInt(t.toFixed(i).replace(".",""));return o%s/10**i}function xc(e){if(e instanceof vt){let t={};for(let r in e.shape){let n=e.shape[r];t[r]=ui.create(xc(n))}return new vt({...e._def,shape:()=>t})}else if(e instanceof li)return new li({...e._def,type:xc(e.element)});else if(e instanceof ui)return ui.create(xc(e.unwrap()));else if(e instanceof Go)return Go.create(xc(e.unwrap()));else if(e instanceof Gi)return Gi.create(e.items.map((t)=>xc(t)));else return e}function L_(e,t){let r=Bi(e),n=Bi(t);if(e===t)return{valid:!0,data:e};else if(r===V.object&&n===V.object){let i=Ee.objectKeys(t),o=Ee.objectKeys(e).filter((a)=>i.indexOf(a)!==-1),s={...e,...t};for(let a of o){let c=L_(e[a],t[a]);if(!c.valid)return{valid:!1};s[a]=c.data}return{valid:!0,data:s}}else if(r===V.array&&n===V.array){if(e.length!==t.length)return{valid:!1};let i=[];for(let o=0;o<e.length;o++){let s=e[o],a=t[o],c=L_(s,a);if(!c.valid)return{valid:!1};i.push(c.data)}return{valid:!0,data:i}}else if(r===V.date&&n===V.date&&+e===+t)return{valid:!0,data:e};else return{valid:!1}}function gN(e,t){return new Ns({values:e,typeName:ie.ZodEnum,...me(t)})}var pN=(e,t)=>{if(Is(t))return{success:!0,data:t.value};else{if(!e.common.issues.length)throw Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let r=new Gr(e.common.issues);return this._error=r,this._error}}}},Uwe,Vwe,Gwe,zwe,Hwe,Wwe,Kwe,Ywe,Jwe="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",B_,Xwe,Qwe,Zwe,eDe,tDe,rDe,mN="((\\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])))",nDe,Ui,bc,_c,km,Fu,Am,Pu,Iu,Fm,Ts,Vi,Pm,li,vt,Tu,Li=(e)=>{if(e instanceof qu)return Li(e.schema);else if(e instanceof di)return Li(e.innerType());else if(e instanceof ju)return[e.value];else if(e instanceof Ns)return e.options;else if(e instanceof Mu)return Ee.objectValues(e.enum);else if(e instanceof Bu)return Li(e._def.innerType);else if(e instanceof Pu)return[void 0];else if(e instanceof Iu)return[null];else if(e instanceof ui)return[void 0,...Li(e.unwrap())];else if(e instanceof Go)return[null,...Li(e.unwrap())];else if(e instanceof V_)return Li(e.unwrap());else if(e instanceof Uu)return Li(e.unwrap());else if(e instanceof Lu)return Li(e._def.innerType);else return[]},U_,Nu,Gi,Im,Tm,vc,Au,qu,ju,Ns,Mu,wc,di,ui,Go,Bu,Lu,Nm,qZe,V_,qm,Uu,jZe,ie,k,K,MZe,BZe,Ut,LZe,UZe,VZe,GZe,zZe,HZe,WZe,KZe,mt,Xe,YZe,uDe,JZe,XZe,QZe,yN,ZZe,eet,tet,ret,qs,St,net,iet,oet,set,aet,cet,uet;var xN=O(()=>{Cm();Rm();fN();M_();Ru();Uwe=/^c[^\s-]{8,}$/i,Vwe=/^[0-9a-z]+$/,Gwe=/^[0-9A-HJKMNP-TV-Z]{26}$/i,zwe=/^[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,Hwe=/^[a-z0-9_-]{21}$/i,Wwe=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Kwe=/^[-+]?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)?)??$/,Ywe=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Xwe=/^(?:(?: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])$/,Qwe=/^(?:(?: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])$/,Zwe=/^(([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]))$/,eDe=/^(([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])$/,tDe=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,rDe=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nDe=new RegExp(`^${mN}$`);Ui=class Ui extends we{_parse(e){if(this._def.coerce)e.data=String(e.data);if(this._getType(e)!==V.string){let i=this._getOrReturnCtx(e);return L(i,{code:I.invalid_type,expected:V.string,received:i.parsedType}),ne}let r=new Zt,n=void 0;for(let i of this._def.checks)if(i.kind==="min"){if(e.data.length<i.value)n=this._getOrReturnCtx(e,n),L(n,{code:I.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty()}else if(i.kind==="max"){if(e.data.length>i.value)n=this._getOrReturnCtx(e,n),L(n,{code:I.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty()}else if(i.kind==="length"){let o=e.data.length>i.value,s=e.data.length<i.value;if(o||s){if(n=this._getOrReturnCtx(e,n),o)L(n,{code:I.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message});else if(s)L(n,{code:I.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message});r.dirty()}}else if(i.kind==="email"){if(!Ywe.test(e.data))n=this._getOrReturnCtx(e,n),L(n,{validation:"email",code:I.invalid_string,message:i.message}),r.dirty()}else if(i.kind==="emoji"){if(!B_)B_=new RegExp(Jwe,"u");if(!B_.test(e.data))n=this._getOrReturnCtx(e,n),L(n,{validation:"emoji",code:I.invalid_string,message:i.message}),r.dirty()}else if(i.kind==="uuid"){if(!zwe.test(e.data))n=this._getOrReturnCtx(e,n),L(n,{validation:"uuid",code:I.invalid_string,message:i.message}),r.dirty()}else if(i.kind==="nanoid"){if(!Hwe.test(e.data))n=this._getOrReturnCtx(e,n),L(n,{validation:"nanoid",code:I.invalid_string,message:i.message}),r.dirty()}else if(i.kind==="cuid"){if(!Uwe.test(e.data))n=this._getOrReturnCtx(e,n),L(n,{validation:"cuid",code:I.invalid_string,message:i.message}),r.dirty()}else if(i.kind==="cuid2"){if(!Vwe.test(e.data))n=this._getOrReturnCtx(e,n),L(n,{validation:"cuid2",code:I.invalid_string,message:i.message}),r.dirty()}else if(i.kind==="ulid"){if(!Gwe.test(e.data))n=this._getOrReturnCtx(e,n),L(n,{validation:"ulid",code:I.invalid_string,message:i.message}),r.dirty()}else if(i.kind==="url")try{new URL(e.data)}catch{n=this._getOrReturnCtx(e,n),L(n,{validation:"url",code:I.invalid_string,message:i.message}),r.dirty()}else if(i.kind==="regex"){if(i.regex.lastIndex=0,!i.regex.test(e.data))n=this._getOrReturnCtx(e,n),L(n,{validation:"regex",code:I.invalid_string,message:i.message}),r.dirty()}else if(i.kind==="trim")e.data=e.data.trim();else if(i.kind==="includes"){if(!e.data.includes(i.value,i.position))n=this._getOrReturnCtx(e,n),L(n,{code:I.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),r.dirty()}else if(i.kind==="toLowerCase")e.data=e.data.toLowerCase();else if(i.kind==="toUpperCase")e.data=e.data.toUpperCase();else if(i.kind==="startsWith"){if(!e.data.startsWith(i.value))n=this._getOrReturnCtx(e,n),L(n,{code:I.invalid_string,validation:{startsWith:i.value},message:i.message}),r.dirty()}else if(i.kind==="endsWith"){if(!e.data.endsWith(i.value))n=this._getOrReturnCtx(e,n),L(n,{code:I.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()}else if(i.kind==="datetime"){if(!oDe(i).test(e.data))n=this._getOrReturnCtx(e,n),L(n,{code:I.invalid_string,validation:"datetime",message:i.message}),r.dirty()}else if(i.kind==="date"){if(!nDe.test(e.data))n=this._getOrReturnCtx(e,n),L(n,{code:I.invalid_string,validation:"date",message:i.message}),r.dirty()}else if(i.kind==="time"){if(!iDe(i).test(e.data))n=this._getOrReturnCtx(e,n),L(n,{code:I.invalid_string,validation:"time",message:i.message}),r.dirty()}else if(i.kind==="duration"){if(!Kwe.test(e.data))n=this._getOrReturnCtx(e,n),L(n,{validation:"duration",code:I.invalid_string,message:i.message}),r.dirty()}else if(i.kind==="ip"){if(!sDe(e.data,i.version))n=this._getOrReturnCtx(e,n),L(n,{validation:"ip",code:I.invalid_string,message:i.message}),r.dirty()}else if(i.kind==="jwt"){if(!aDe(e.data,i.alg))n=this._getOrReturnCtx(e,n),L(n,{validation:"jwt",code:I.invalid_string,message:i.message}),r.dirty()}else if(i.kind==="cidr"){if(!cDe(e.data,i.version))n=this._getOrReturnCtx(e,n),L(n,{validation:"cidr",code:I.invalid_string,message:i.message}),r.dirty()}else if(i.kind==="base64"){if(!tDe.test(e.data))n=this._getOrReturnCtx(e,n),L(n,{validation:"base64",code:I.invalid_string,message:i.message}),r.dirty()}else if(i.kind==="base64url"){if(!rDe.test(e.data))n=this._getOrReturnCtx(e,n),L(n,{validation:"base64url",code:I.invalid_string,message:i.message}),r.dirty()}else Ee.assertNever(i);return{status:r.value,value:e.data}}_regex(e,t,r){return this.refinement((n)=>e.test(n),{validation:t,code:I.invalid_string,...J.errToObj(r)})}_addCheck(e){return new Ui({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...J.errToObj(e)})}url(e){return this._addCheck({kind:"url",...J.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...J.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...J.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...J.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...J.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...J.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...J.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...J.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...J.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...J.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...J.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...J.errToObj(e)})}datetime(e){if(typeof e==="string")return this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e});return this._addCheck({kind:"datetime",precision:typeof e?.precision>"u"?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...J.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){if(typeof e==="string")return this._addCheck({kind:"time",precision:null,message:e});return this._addCheck({kind:"time",precision:typeof e?.precision>"u"?null:e?.precision,...J.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...J.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...J.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t?.position,...J.errToObj(t?.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...J.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...J.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...J.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...J.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...J.errToObj(t)})}nonempty(e){return this.min(1,J.errToObj(e))}trim(){return new Ui({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Ui({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Ui({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find((e)=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find((e)=>e.kind==="date")}get isTime(){return!!this._def.checks.find((e)=>e.kind==="time")}get isDuration(){return!!this._def.checks.find((e)=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find((e)=>e.kind==="email")}get isURL(){return!!this._def.checks.find((e)=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find((e)=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find((e)=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find((e)=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find((e)=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find((e)=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find((e)=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find((e)=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find((e)=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find((e)=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find((e)=>e.kind==="base64url")}get minLength(){let e=null;for(let t of this._def.checks)if(t.kind==="min"){if(e===null||t.value>e)e=t.value}return e}get maxLength(){let e=null;for(let t of this._def.checks)if(t.kind==="max"){if(e===null||t.value<e)e=t.value}return e}};Ui.create=(e)=>new Ui({checks:[],typeName:ie.ZodString,coerce:e?.coerce??!1,...me(e)});bc=class bc extends we{constructor(){super(...arguments);this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce)e.data=Number(e.data);if(this._getType(e)!==V.number){let i=this._getOrReturnCtx(e);return L(i,{code:I.invalid_type,expected:V.number,received:i.parsedType}),ne}let r=void 0,n=new Zt;for(let i of this._def.checks)if(i.kind==="int"){if(!Ee.isInteger(e.data))r=this._getOrReturnCtx(e,r),L(r,{code:I.invalid_type,expected:"integer",received:"float",message:i.message}),n.dirty()}else if(i.kind==="min"){if(i.inclusive?e.data<i.value:e.data<=i.value)r=this._getOrReturnCtx(e,r),L(r,{code:I.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),n.dirty()}else if(i.kind==="max"){if(i.inclusive?e.data>i.value:e.data>=i.value)r=this._getOrReturnCtx(e,r),L(r,{code:I.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),n.dirty()}else if(i.kind==="multipleOf"){if(lDe(e.data,i.value)!==0)r=this._getOrReturnCtx(e,r),L(r,{code:I.not_multiple_of,multipleOf:i.value,message:i.message}),n.dirty()}else if(i.kind==="finite"){if(!Number.isFinite(e.data))r=this._getOrReturnCtx(e,r),L(r,{code:I.not_finite,message:i.message}),n.dirty()}else Ee.assertNever(i);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,J.toString(t))}gt(e,t){return this.setLimit("min",e,!1,J.toString(t))}lte(e,t){return this.setLimit("max",e,!0,J.toString(t))}lt(e,t){return this.setLimit("max",e,!1,J.toString(t))}setLimit(e,t,r,n){return new bc({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:J.toString(n)}]})}_addCheck(e){return new bc({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:J.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:J.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:J.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:J.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:J.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:J.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:J.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:J.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:J.toString(e)})}get minValue(){let e=null;for(let t of this._def.checks)if(t.kind==="min"){if(e===null||t.value>e)e=t.value}return e}get maxValue(){let e=null;for(let t of this._def.checks)if(t.kind==="max"){if(e===null||t.value<e)e=t.value}return e}get isInt(){return!!this._def.checks.find((e)=>e.kind==="int"||e.kind==="multipleOf"&&Ee.isInteger(e.value))}get isFinite(){let e=null,t=null;for(let r of this._def.checks)if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;else if(r.kind==="min"){if(t===null||r.value>t)t=r.value}else if(r.kind==="max"){if(e===null||r.value<e)e=r.value}return Number.isFinite(t)&&Number.isFinite(e)}};bc.create=(e)=>new bc({checks:[],typeName:ie.ZodNumber,coerce:e?.coerce||!1,...me(e)});_c=class _c extends we{constructor(){super(...arguments);this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==V.bigint)return this._getInvalidInput(e);let r=void 0,n=new Zt;for(let i of this._def.checks)if(i.kind==="min"){if(i.inclusive?e.data<i.value:e.data<=i.value)r=this._getOrReturnCtx(e,r),L(r,{code:I.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),n.dirty()}else if(i.kind==="max"){if(i.inclusive?e.data>i.value:e.data>=i.value)r=this._getOrReturnCtx(e,r),L(r,{code:I.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),n.dirty()}else if(i.kind==="multipleOf"){if(e.data%i.value!==BigInt(0))r=this._getOrReturnCtx(e,r),L(r,{code:I.not_multiple_of,multipleOf:i.value,message:i.message}),n.dirty()}else Ee.assertNever(i);return{status:n.value,value:e.data}}_getInvalidInput(e){let t=this._getOrReturnCtx(e);return L(t,{code:I.invalid_type,expected:V.bigint,received:t.parsedType}),ne}gte(e,t){return this.setLimit("min",e,!0,J.toString(t))}gt(e,t){return this.setLimit("min",e,!1,J.toString(t))}lte(e,t){return this.setLimit("max",e,!0,J.toString(t))}lt(e,t){return this.setLimit("max",e,!1,J.toString(t))}setLimit(e,t,r,n){return new _c({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:J.toString(n)}]})}_addCheck(e){return new _c({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:J.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:J.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:J.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:J.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:J.toString(t)})}get minValue(){let e=null;for(let t of this._def.checks)if(t.kind==="min"){if(e===null||t.value>e)e=t.value}return e}get maxValue(){let e=null;for(let t of this._def.checks)if(t.kind==="max"){if(e===null||t.value<e)e=t.value}return e}};_c.create=(e)=>new _c({checks:[],typeName:ie.ZodBigInt,coerce:e?.coerce??!1,...me(e)});km=class km extends we{_parse(e){if(this._def.coerce)e.data=Boolean(e.data);if(this._getType(e)!==V.boolean){let r=this._getOrReturnCtx(e);return L(r,{code:I.invalid_type,expected:V.boolean,received:r.parsedType}),ne}return dr(e.data)}};km.create=(e)=>new km({typeName:ie.ZodBoolean,coerce:e?.coerce||!1,...me(e)});Fu=class Fu extends we{_parse(e){if(this._def.coerce)e.data=new Date(e.data);if(this._getType(e)!==V.date){let i=this._getOrReturnCtx(e);return L(i,{code:I.invalid_type,expected:V.date,received:i.parsedType}),ne}if(Number.isNaN(e.data.getTime())){let i=this._getOrReturnCtx(e);return L(i,{code:I.invalid_date}),ne}let r=new Zt,n=void 0;for(let i of this._def.checks)if(i.kind==="min"){if(e.data.getTime()<i.value)n=this._getOrReturnCtx(e,n),L(n,{code:I.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),r.dirty()}else if(i.kind==="max"){if(e.data.getTime()>i.value)n=this._getOrReturnCtx(e,n),L(n,{code:I.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()}else Ee.assertNever(i);return{status:r.value,value:new Date(e.data.getTime())}}_addCheck(e){return new Fu({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:J.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:J.toString(t)})}get minDate(){let e=null;for(let t of this._def.checks)if(t.kind==="min"){if(e===null||t.value>e)e=t.value}return e!=null?new Date(e):null}get maxDate(){let e=null;for(let t of this._def.checks)if(t.kind==="max"){if(e===null||t.value<e)e=t.value}return e!=null?new Date(e):null}};Fu.create=(e)=>new Fu({checks:[],coerce:e?.coerce||!1,typeName:ie.ZodDate,...me(e)});Am=class Am extends we{_parse(e){if(this._getType(e)!==V.symbol){let r=this._getOrReturnCtx(e);return L(r,{code:I.invalid_type,expected:V.symbol,received:r.parsedType}),ne}return dr(e.data)}};Am.create=(e)=>new Am({typeName:ie.ZodSymbol,...me(e)});Pu=class Pu extends we{_parse(e){if(this._getType(e)!==V.undefined){let r=this._getOrReturnCtx(e);return L(r,{code:I.invalid_type,expected:V.undefined,received:r.parsedType}),ne}return dr(e.data)}};Pu.create=(e)=>new Pu({typeName:ie.ZodUndefined,...me(e)});Iu=class Iu extends we{_parse(e){if(this._getType(e)!==V.null){let r=this._getOrReturnCtx(e);return L(r,{code:I.invalid_type,expected:V.null,received:r.parsedType}),ne}return dr(e.data)}};Iu.create=(e)=>new Iu({typeName:ie.ZodNull,...me(e)});Fm=class Fm extends we{constructor(){super(...arguments);this._any=!0}_parse(e){return dr(e.data)}};Fm.create=(e)=>new Fm({typeName:ie.ZodAny,...me(e)});Ts=class Ts extends we{constructor(){super(...arguments);this._unknown=!0}_parse(e){return dr(e.data)}};Ts.create=(e)=>new Ts({typeName:ie.ZodUnknown,...me(e)});Vi=class Vi extends we{_parse(e){let t=this._getOrReturnCtx(e);return L(t,{code:I.invalid_type,expected:V.never,received:t.parsedType}),ne}};Vi.create=(e)=>new Vi({typeName:ie.ZodNever,...me(e)});Pm=class Pm extends we{_parse(e){if(this._getType(e)!==V.undefined){let r=this._getOrReturnCtx(e);return L(r,{code:I.invalid_type,expected:V.void,received:r.parsedType}),ne}return dr(e.data)}};Pm.create=(e)=>new Pm({typeName:ie.ZodVoid,...me(e)});li=class li extends we{_parse(e){let{ctx:t,status:r}=this._processInputParams(e),n=this._def;if(t.parsedType!==V.array)return L(t,{code:I.invalid_type,expected:V.array,received:t.parsedType}),ne;if(n.exactLength!==null){let o=t.data.length>n.exactLength.value,s=t.data.length<n.exactLength.value;if(o||s)L(t,{code:o?I.too_big:I.too_small,minimum:s?n.exactLength.value:void 0,maximum:o?n.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:n.exactLength.message}),r.dirty()}if(n.minLength!==null){if(t.data.length<n.minLength.value)L(t,{code:I.too_small,minimum:n.minLength.value,type:"array",inclusive:!0,exact:!1,message:n.minLength.message}),r.dirty()}if(n.maxLength!==null){if(t.data.length>n.maxLength.value)L(t,{code:I.too_big,maximum:n.maxLength.value,type:"array",inclusive:!0,exact:!1,message:n.maxLength.message}),r.dirty()}if(t.common.async)return Promise.all([...t.data].map((o,s)=>n.type._parseAsync(new Cn(t,o,t.path,s)))).then((o)=>Zt.mergeArray(r,o));let i=[...t.data].map((o,s)=>n.type._parseSync(new Cn(t,o,t.path,s)));return Zt.mergeArray(r,i)}get element(){return this._def.type}min(e,t){return new li({...this._def,minLength:{value:e,message:J.toString(t)}})}max(e,t){return new li({...this._def,maxLength:{value:e,message:J.toString(t)}})}length(e,t){return new li({...this._def,exactLength:{value:e,message:J.toString(t)}})}nonempty(e){return this.min(1,e)}};li.create=(e,t)=>new li({type:e,minLength:null,maxLength:null,exactLength:null,typeName:ie.ZodArray,...me(t)});vt=class vt extends we{constructor(){super(...arguments);this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),t=Ee.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==V.object){let c=this._getOrReturnCtx(e);return L(c,{code:I.invalid_type,expected:V.object,received:c.parsedType}),ne}let{status:r,ctx:n}=this._processInputParams(e),{shape:i,keys:o}=this._getCached(),s=[];if(!(this._def.catchall instanceof Vi&&this._def.unknownKeys==="strip")){for(let c in n.data)if(!o.includes(c))s.push(c)}let a=[];for(let c of o){let u=i[c],d=n.data[c];a.push({key:{status:"valid",value:c},value:u._parse(new Cn(n,d,n.path,c)),alwaysSet:c in n.data})}if(this._def.catchall instanceof Vi){let c=this._def.unknownKeys;if(c==="passthrough")for(let u of s)a.push({key:{status:"valid",value:u},value:{status:"valid",value:n.data[u]}});else if(c==="strict"){if(s.length>0)L(n,{code:I.unrecognized_keys,keys:s}),r.dirty()}else if(c==="strip");else throw Error("Internal ZodObject error: invalid unknownKeys value.")}else{let c=this._def.catchall;for(let u of s){let d=n.data[u];a.push({key:{status:"valid",value:u},value:c._parse(new Cn(n,d,n.path,u)),alwaysSet:u in n.data})}}if(n.common.async)return Promise.resolve().then(async()=>{let c=[];for(let u of a){let d=await u.key,f=await u.value;c.push({key:d,value:f,alwaysSet:u.alwaysSet})}return c}).then((c)=>Zt.mergeObjectSync(r,c));else return Zt.mergeObjectSync(r,a)}get shape(){return this._def.shape()}strict(e){return J.errToObj,new vt({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(t,r)=>{let n=this._def.errorMap?.(t,r).message??r.defaultError;if(t.code==="unrecognized_keys")return{message:J.errToObj(e).message??n};return{message:n}}}:{}})}strip(){return new vt({...this._def,unknownKeys:"strip"})}passthrough(){return new vt({...this._def,unknownKeys:"passthrough"})}extend(e){return new vt({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new vt({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:ie.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new vt({...this._def,catchall:e})}pick(e){let t={};for(let r of Ee.objectKeys(e))if(e[r]&&this.shape[r])t[r]=this.shape[r];return new vt({...this._def,shape:()=>t})}omit(e){let t={};for(let r of Ee.objectKeys(this.shape))if(!e[r])t[r]=this.shape[r];return new vt({...this._def,shape:()=>t})}deepPartial(){return xc(this)}partial(e){let t={};for(let r of Ee.objectKeys(this.shape)){let n=this.shape[r];if(e&&!e[r])t[r]=n;else t[r]=n.optional()}return new vt({...this._def,shape:()=>t})}required(e){let t={};for(let r of Ee.objectKeys(this.shape))if(e&&!e[r])t[r]=this.shape[r];else{let i=this.shape[r];while(i instanceof ui)i=i._def.innerType;t[r]=i}return new vt({...this._def,shape:()=>t})}keyof(){return gN(Ee.objectKeys(this.shape))}};vt.create=(e,t)=>new vt({shape:()=>e,unknownKeys:"strip",catchall:Vi.create(),typeName:ie.ZodObject,...me(t)});vt.strictCreate=(e,t)=>new vt({shape:()=>e,unknownKeys:"strict",catchall:Vi.create(),typeName:ie.ZodObject,...me(t)});vt.lazycreate=(e,t)=>new vt({shape:e,unknownKeys:"strip",catchall:Vi.create(),typeName:ie.ZodObject,...me(t)});Tu=class Tu extends we{_parse(e){let{ctx:t}=this._processInputParams(e),r=this._def.options;function n(i){for(let s of i)if(s.result.status==="valid")return s.result;for(let s of i)if(s.result.status==="dirty")return t.common.issues.push(...s.ctx.common.issues),s.result;let o=i.map((s)=>new Gr(s.ctx.common.issues));return L(t,{code:I.invalid_union,unionErrors:o}),ne}if(t.common.async)return Promise.all(r.map(async(i)=>{let o={...t,common:{...t.common,issues:[]},parent:null};return{result:await i._parseAsync({data:t.data,path:t.path,parent:o}),ctx:o}})).then(n);else{let i=void 0,o=[];for(let a of r){let c={...t,common:{...t.common,issues:[]},parent:null},u=a._parseSync({data:t.data,path:t.path,parent:c});if(u.status==="valid")return u;else if(u.status==="dirty"&&!i)i={result:u,ctx:c};if(c.common.issues.length)o.push(c.common.issues)}if(i)return t.common.issues.push(...i.ctx.common.issues),i.result;let s=o.map((a)=>new Gr(a));return L(t,{code:I.invalid_union,unionErrors:s}),ne}}get options(){return this._def.options}};Tu.create=(e,t)=>new Tu({options:e,typeName:ie.ZodUnion,...me(t)});U_=class U_ extends we{_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==V.object)return L(t,{code:I.invalid_type,expected:V.object,received:t.parsedType}),ne;let r=this.discriminator,n=t.data[r],i=this.optionsMap.get(n);if(!i)return L(t,{code:I.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),ne;if(t.common.async)return i._parseAsync({data:t.data,path:t.path,parent:t});else return i._parseSync({data:t.data,path:t.path,parent:t})}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,r){let n=new Map;for(let i of t){let o=Li(i.shape[e]);if(!o.length)throw Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let s of o){if(n.has(s))throw Error(`Discriminator property ${String(e)} has duplicate value ${String(s)}`);n.set(s,i)}}return new U_({typeName:ie.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:n,...me(r)})}};Nu=class Nu extends we{_parse(e){let{status:t,ctx:r}=this._processInputParams(e),n=(i,o)=>{if(q_(i)||q_(o))return ne;let s=L_(i.value,o.value);if(!s.valid)return L(r,{code:I.invalid_intersection_types}),ne;if(j_(i)||j_(o))t.dirty();return{status:t.value,value:s.data}};if(r.common.async)return Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([i,o])=>n(i,o));else return n(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}};Nu.create=(e,t,r)=>new Nu({left:e,right:t,typeName:ie.ZodIntersection,...me(r)});Gi=class Gi extends we{_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==V.array)return L(r,{code:I.invalid_type,expected:V.array,received:r.parsedType}),ne;if(r.data.length<this._def.items.length)return L(r,{code:I.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),ne;if(!this._def.rest&&r.data.length>this._def.items.length)L(r,{code:I.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty();let i=[...r.data].map((o,s)=>{let a=this._def.items[s]||this._def.rest;if(!a)return null;return a._parse(new Cn(r,o,r.path,s))}).filter((o)=>!!o);if(r.common.async)return Promise.all(i).then((o)=>Zt.mergeArray(t,o));else return Zt.mergeArray(t,i)}get items(){return this._def.items}rest(e){return new Gi({...this._def,rest:e})}};Gi.create=(e,t)=>{if(!Array.isArray(e))throw Error("You must pass an array of schemas to z.tuple([ ... ])");return new Gi({items:e,typeName:ie.ZodTuple,rest:null,...me(t)})};Im=class Im extends we{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==V.object)return L(r,{code:I.invalid_type,expected:V.object,received:r.parsedType}),ne;let n=[],i=this._def.keyType,o=this._def.valueType;for(let s in r.data)n.push({key:i._parse(new Cn(r,s,r.path,s)),value:o._parse(new Cn(r,r.data[s],r.path,s)),alwaysSet:s in r.data});if(r.common.async)return Zt.mergeObjectAsync(t,n);else return Zt.mergeObjectSync(t,n)}get element(){return this._def.valueType}static create(e,t,r){if(t instanceof we)return new Im({keyType:e,valueType:t,typeName:ie.ZodRecord,...me(r)});return new Im({keyType:Ui.create(),valueType:e,typeName:ie.ZodRecord,...me(t)})}};Tm=class Tm extends we{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==V.map)return L(r,{code:I.invalid_type,expected:V.map,received:r.parsedType}),ne;let n=this._def.keyType,i=this._def.valueType,o=[...r.data.entries()].map(([s,a],c)=>({key:n._parse(new Cn(r,s,r.path,[c,"key"])),value:i._parse(new Cn(r,a,r.path,[c,"value"]))}));if(r.common.async){let s=new Map;return Promise.resolve().then(async()=>{for(let a of o){let c=await a.key,u=await a.value;if(c.status==="aborted"||u.status==="aborted")return ne;if(c.status==="dirty"||u.status==="dirty")t.dirty();s.set(c.value,u.value)}return{status:t.value,value:s}})}else{let s=new Map;for(let a of o){let{key:c,value:u}=a;if(c.status==="aborted"||u.status==="aborted")return ne;if(c.status==="dirty"||u.status==="dirty")t.dirty();s.set(c.value,u.value)}return{status:t.value,value:s}}}};Tm.create=(e,t,r)=>new Tm({valueType:t,keyType:e,typeName:ie.ZodMap,...me(r)});vc=class vc extends we{_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==V.set)return L(r,{code:I.invalid_type,expected:V.set,received:r.parsedType}),ne;let n=this._def;if(n.minSize!==null){if(r.data.size<n.minSize.value)L(r,{code:I.too_small,minimum:n.minSize.value,type:"set",inclusive:!0,exact:!1,message:n.minSize.message}),t.dirty()}if(n.maxSize!==null){if(r.data.size>n.maxSize.value)L(r,{code:I.too_big,maximum:n.maxSize.value,type:"set",inclusive:!0,exact:!1,message:n.maxSize.message}),t.dirty()}let i=this._def.valueType;function o(a){let c=new Set;for(let u of a){if(u.status==="aborted")return ne;if(u.status==="dirty")t.dirty();c.add(u.value)}return{status:t.value,value:c}}let s=[...r.data.values()].map((a,c)=>i._parse(new Cn(r,a,r.path,c)));if(r.common.async)return Promise.all(s).then((a)=>o(a));else return o(s)}min(e,t){return new vc({...this._def,minSize:{value:e,message:J.toString(t)}})}max(e,t){return new vc({...this._def,maxSize:{value:e,message:J.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}};vc.create=(e,t)=>new vc({valueType:e,minSize:null,maxSize:null,typeName:ie.ZodSet,...me(t)});Au=class Au extends we{constructor(){super(...arguments);this.validate=this.implement}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==V.function)return L(t,{code:I.invalid_type,expected:V.function,received:t.parsedType}),ne;function r(s,a){return Om({data:s,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,Ou(),Vo].filter((c)=>!!c),issueData:{code:I.invalid_arguments,argumentsError:a}})}function n(s,a){return Om({data:s,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,Ou(),Vo].filter((c)=>!!c),issueData:{code:I.invalid_return_type,returnTypeError:a}})}let i={errorMap:t.common.contextualErrorMap},o=t.data;if(this._def.returns instanceof wc){let s=this;return dr(async function(...a){let c=new Gr([]),u=await s._def.args.parseAsync(a,i).catch((m)=>{throw c.addIssue(r(a,m)),c}),d=await Reflect.apply(o,this,u);return await s._def.returns._def.type.parseAsync(d,i).catch((m)=>{throw c.addIssue(n(d,m)),c})})}else{let s=this;return dr(function(...a){let c=s._def.args.safeParse(a,i);if(!c.success)throw new Gr([r(a,c.error)]);let u=Reflect.apply(o,this,c.data),d=s._def.returns.safeParse(u,i);if(!d.success)throw new Gr([n(u,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new Au({...this._def,args:Gi.create(e).rest(Ts.create())})}returns(e){return new Au({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,r){return new Au({args:e?e:Gi.create([]).rest(Ts.create()),returns:t||Ts.create(),typeName:ie.ZodFunction,...me(r)})}};qu=class qu extends we{get schema(){return this._def.getter()}_parse(e){let{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}};qu.create=(e,t)=>new qu({getter:e,typeName:ie.ZodLazy,...me(t)});ju=class ju extends we{_parse(e){if(e.data!==this._def.value){let t=this._getOrReturnCtx(e);return L(t,{received:t.data,code:I.invalid_literal,expected:this._def.value}),ne}return{status:"valid",value:e.data}}get value(){return this._def.value}};ju.create=(e,t)=>new ju({value:e,typeName:ie.ZodLiteral,...me(t)});Ns=class Ns extends we{_parse(e){if(typeof e.data!=="string"){let t=this._getOrReturnCtx(e),r=this._def.values;return L(t,{expected:Ee.joinValues(r),received:t.parsedType,code:I.invalid_type}),ne}if(!this._cache)this._cache=new Set(this._def.values);if(!this._cache.has(e.data)){let t=this._getOrReturnCtx(e),r=this._def.values;return L(t,{received:t.data,code:I.invalid_enum_value,options:r}),ne}return dr(e.data)}get options(){return this._def.values}get enum(){let e={};for(let t of this._def.values)e[t]=t;return e}get Values(){let e={};for(let t of this._def.values)e[t]=t;return e}get Enum(){let e={};for(let t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return Ns.create(e,{...this._def,...t})}exclude(e,t=this._def){return Ns.create(this.options.filter((r)=>!e.includes(r)),{...this._def,...t})}};Ns.create=gN;Mu=class Mu extends we{_parse(e){let t=Ee.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==V.string&&r.parsedType!==V.number){let n=Ee.objectValues(t);return L(r,{expected:Ee.joinValues(n),received:r.parsedType,code:I.invalid_type}),ne}if(!this._cache)this._cache=new Set(Ee.getValidEnumValues(this._def.values));if(!this._cache.has(e.data)){let n=Ee.objectValues(t);return L(r,{received:r.data,code:I.invalid_enum_value,options:n}),ne}return dr(e.data)}get enum(){return this._def.values}};Mu.create=(e,t)=>new Mu({values:e,typeName:ie.ZodNativeEnum,...me(t)});wc=class wc extends we{unwrap(){return this._def.type}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==V.promise&&t.common.async===!1)return L(t,{code:I.invalid_type,expected:V.promise,received:t.parsedType}),ne;let r=t.parsedType===V.promise?t.data:Promise.resolve(t.data);return dr(r.then((n)=>this._def.type.parseAsync(n,{path:t.path,errorMap:t.common.contextualErrorMap})))}};wc.create=(e,t)=>new wc({type:e,typeName:ie.ZodPromise,...me(t)});di=class di extends we{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ie.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:t,ctx:r}=this._processInputParams(e),n=this._def.effect||null,i={addIssue:(o)=>{if(L(r,o),o.fatal)t.abort();else t.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),n.type==="preprocess"){let o=n.transform(r.data,i);if(r.common.async)return Promise.resolve(o).then(async(s)=>{if(t.value==="aborted")return ne;let a=await this._def.schema._parseAsync({data:s,path:r.path,parent:r});if(a.status==="aborted")return ne;if(a.status==="dirty")return yc(a.value);if(t.value==="dirty")return yc(a.value);return a});else{if(t.value==="aborted")return ne;let s=this._def.schema._parseSync({data:o,path:r.path,parent:r});if(s.status==="aborted")return ne;if(s.status==="dirty")return yc(s.value);if(t.value==="dirty")return yc(s.value);return s}}if(n.type==="refinement"){let o=(s)=>{let a=n.refinement(s,i);if(r.common.async)return Promise.resolve(a);if(a instanceof Promise)throw Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return s};if(r.common.async===!1){let s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(s.status==="aborted")return ne;if(s.status==="dirty")t.dirty();return o(s.value),{status:t.value,value:s.value}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then((s)=>{if(s.status==="aborted")return ne;if(s.status==="dirty")t.dirty();return o(s.value).then(()=>({status:t.value,value:s.value}))})}if(n.type==="transform")if(r.common.async===!1){let o=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!Is(o))return ne;let s=n.transform(o.value,i);if(s instanceof Promise)throw Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:s}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then((o)=>{if(!Is(o))return ne;return Promise.resolve(n.transform(o.value,i)).then((s)=>({status:t.value,value:s}))});Ee.assertNever(n)}};di.create=(e,t,r)=>new di({schema:e,typeName:ie.ZodEffects,effect:t,...me(r)});di.createWithPreprocess=(e,t,r)=>new di({schema:t,effect:{type:"preprocess",transform:e},typeName:ie.ZodEffects,...me(r)});ui=class ui extends we{_parse(e){if(this._getType(e)===V.undefined)return dr(void 0);return this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};ui.create=(e,t)=>new ui({innerType:e,typeName:ie.ZodOptional,...me(t)});Go=class Go extends we{_parse(e){if(this._getType(e)===V.null)return dr(null);return this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};Go.create=(e,t)=>new Go({innerType:e,typeName:ie.ZodNullable,...me(t)});Bu=class Bu extends we{_parse(e){let{ctx:t}=this._processInputParams(e),r=t.data;if(t.parsedType===V.undefined)r=this._def.defaultValue();return this._def.innerType._parse({data:r,path:t.path,parent:t})}removeDefault(){return this._def.innerType}};Bu.create=(e,t)=>new Bu({innerType:e,typeName:ie.ZodDefault,defaultValue:typeof t.default==="function"?t.default:()=>t.default,...me(t)});Lu=class Lu extends we{_parse(e){let{ctx:t}=this._processInputParams(e),r={...t,common:{...t.common,issues:[]}},n=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});if(ku(n))return n.then((i)=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Gr(r.common.issues)},input:r.data})}));else return{status:"valid",value:n.status==="valid"?n.value:this._def.catchValue({get error(){return new Gr(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}};Lu.create=(e,t)=>new Lu({innerType:e,typeName:ie.ZodCatch,catchValue:typeof t.catch==="function"?t.catch:()=>t.catch,...me(t)});Nm=class Nm extends we{_parse(e){if(this._getType(e)!==V.nan){let r=this._getOrReturnCtx(e);return L(r,{code:I.invalid_type,expected:V.nan,received:r.parsedType}),ne}return{status:"valid",value:e.data}}};Nm.create=(e)=>new Nm({typeName:ie.ZodNaN,...me(e)});qZe=Symbol("zod_brand");V_=class V_ extends we{_parse(e){let{ctx:t}=this._processInputParams(e),r=t.data;return this._def.type._parse({data:r,path:t.path,parent:t})}unwrap(){return this._def.type}};qm=class qm extends we{_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.common.async)return(async()=>{let i=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});if(i.status==="aborted")return ne;if(i.status==="dirty")return t.dirty(),yc(i.value);else return this._def.out._parseAsync({data:i.value,path:r.path,parent:r})})();else{let n=this._def.in._parseSync({data:r.data,path:r.path,parent:r});if(n.status==="aborted")return ne;if(n.status==="dirty")return t.dirty(),{status:"dirty",value:n.value};else return this._def.out._parseSync({data:n.value,path:r.path,parent:r})}}static create(e,t){return new qm({in:e,out:t,typeName:ie.ZodPipeline})}};Uu=class Uu extends we{_parse(e){let t=this._def.innerType._parse(e),r=(n)=>{if(Is(n))n.value=Object.freeze(n.value);return n};return ku(t)?t.then((n)=>r(n)):r(t)}unwrap(){return this._def.innerType}};Uu.create=(e,t)=>new Uu({innerType:e,typeName:ie.ZodReadonly,...me(t)});jZe={object:vt.lazycreate};(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(ie||(ie={}));k=Ui.create,K=bc.create,MZe=Nm.create,BZe=_c.create,Ut=km.create,LZe=Fu.create,UZe=Am.create,VZe=Pu.create,GZe=Iu.create,zZe=Fm.create,HZe=Ts.create,WZe=Vi.create,KZe=Pm.create,mt=li.create,Xe=vt.create,YZe=vt.strictCreate,uDe=Tu.create,JZe=U_.create,XZe=Nu.create,QZe=Gi.create,yN=Im.create,ZZe=Tm.create,eet=vc.create,tet=Au.create,ret=qu.create,qs=ju.create,St=Ns.create,net=Mu.create,iet=wc.create,oet=di.create,set=ui.create,aet=Go.create,cet=di.createWithPreprocess,uet=qm.create});var G_=O(()=>{Rm();M_();dN();Ru();xN();Cm()});var Hi=O(()=>{G_();G_()});function pDe(e){return e.startsWith("v")?e:`v${e}`}var dDe,fDe,bN,vet;var z_=O(()=>{Hi();dDe=/^v?\d+\.\d+\.\d+(?:-(?:rc|alpha|beta)\d*)?$/,fDe=/^v\d+\.\d+\.\d+(?:-(?:rc|alpha|beta)\d*)?$/;bN=k().regex(dDe,"must be a semver version, optionally v-prefixed").transform(pDe),vet=k().regex(fDe,"must be the canonical v-prefixed tag (vX.Y.Z)")});var mDe,hDe,_N,gDe,yDe,vN,xDe,wN,Eet,$et,Cet,bDe,DN,_De,EN,H_=20,W_=500,vDe,Ret;var jm=O(()=>{Hi();mDe=St(["pending","verified","approved","revoked"]),hDe=St(["active","pending","revoked"]),_N=Xe({field:k(),blocks:mt(k()).optional(),set_on:mt(k()).optional()}).passthrough(),gDe=Xe({id:K().int(),username:k().nullable(),email:k(),github_username:k().nullable(),role:k(),orcid:k().nullable().optional(),created_at:k().optional(),approved_at:k().nullable().optional(),dataset_count:K().int().optional(),sandbox_completed:Ut().optional(),sandbox_completed_at:k().nullable().optional(),sandbox_dataset_id:k().nullable().optional(),service_access:Ut().optional(),status:mDe.optional(),email_verified:Ut().optional(),orcid_verified:Ut().optional(),given_name:k().nullable().optional(),family_name:k().nullable().optional(),profile_gaps:mt(_N).optional(),username_auto_assigned:Ut().optional()}).passthrough(),yDe=Xe({prefix:k(),created_at:k(),last_used_at:k().nullable()}).passthrough().nullable(),vN=Xe({user:gDe,token:yDe.optional()}).passthrough(),xDe=Xe({id:K().int(),username:k().nullable(),email:k(),github_username:k().nullable(),status:k(),email_verified:K().int().nullable().optional(),role:k().nullable(),created_at:k(),approved_at:k().nullable().optional(),revoked_at:k().nullable().optional(),signup_source:k().nullable().optional(),service_access:K().int().nullable().optional(),service_access_granted_at:k().nullable().optional(),given_name:k().nullable().optional(),family_name:k().nullable().optional(),orcid:k().nullable().optional(),upload_access_requested_at:k().nullable().optional()}).passthrough(),wN=Xe({users:mt(xDe),count:K().int()}).passthrough(),Eet=St(["assigned","would_assign","single_name","no_name","lookup_failed","conflict","exhausted"]),$et=St(["sent","already_verified","skipped_fence","rate_limited","failed","not_attempted"]),Cet=Xe({suggestion:k().nullable(),based_on:St(["name","unavailable","exhausted"])}).passthrough(),bDe=St(["why_required","email_not_verified","profile_incomplete","github_username_unverified","github_unavailable","already_approved"]),DN=bDe.options,_De=St(["invalid_github_username","city_required","country_required","empty_patch","username_too_short","username_too_long","username_charset","given_name_required","family_name_required","username_taken","username_locked","name_is_orcid_canonical","account_revoked","github_unavailable","same_email","code_expired","code_incorrect","orcid_already_have","orcid_unavailable"]),EN=_De.options,vDe=Xe({id:K().int(),email:k(),username:k().nullable(),role:k(),status:hDe,email_verified:Ut(),given_name:k().nullable(),family_name:k().nullable(),orcid:k().nullable(),orcid_verified:Ut(),github_username:k().nullable(),city:k().nullable(),country:k().nullable(),affiliation:k().nullable(),service_access:Ut(),service_access_granted_at:k().nullable(),upload_access_requested_at:k().nullable(),profile_gaps:mt(_N),username_auto_assigned:Ut()}).passthrough(),Ret=Xe({user:vDe.nullable()}).passthrough()});function $N(e,t){if(e.zarr_index_url!=null&&e.zarr_status!=="ready")t.addIssue({code:I.custom,message:"zarr_index_url must be null/absent unless zarr_status is 'ready'",path:["zarr_index_url"]})}function CN(e,t){if(e.zarr_verified_at!=null&&e.zarr_verify_status==null)t.addIssue({code:I.custom,message:"zarr_verified_at must be null/absent unless zarr_verify_status is non-null",path:["zarr_verified_at"]})}var wDe="0.4.0",K_,Dc,SN,DDe,EDe,SDe,RN,Fet,ON,Pet,Wi,$De,Mm,Iet;var Y_=O(()=>{Hi();z_();K_=St(["openneuro","nemar","gin","other"]),Dc=uDe([qs(0),qs(1)]).nullable(),SN=Xe({dataset_id:k(),id:k().optional(),name:k(),description:k().nullable().optional(),status:k(),visibility:k(),concept_doi:k().nullable().optional(),doi:k().nullable().optional(),created_at:k(),updated_at:k().optional(),owner_username:k().nullable().optional(),source:k().nullable().optional(),modalities:k().optional(),participants:K().int().nonnegative(),tasks:k().optional(),authors:k().optional(),license:k().optional(),file_size:K().nonnegative(),file_size_formatted:k().optional(),total_files:K().nonnegative().nullable().optional(),num_citations:K().int().nonnegative().optional(),n_channels:K().int().nullable().optional(),electrode_system:k().nullable().optional(),has_hed:Dc.optional(),hed_version:k().nullable().optional(),data_complete:Dc.optional(),bytes_present:K().nonnegative().nullable().optional(),latest_version:bN.nullable().optional(),subject_count:K().int().nullable().optional(),file_size_bytes:K().nullable().optional(),sessions_count:K().int().nullable().optional(),age_min:K().nullable().optional(),age_max:K().nullable().optional(),bids_version:k().nullable().optional(),zarr_status:St(["pending","ready","failed"]).nullable().optional(),zarr_store_count:K().int().nullable().optional(),zarr_converted_at:k().nullable().optional(),zarr_source_commit:k().nullable().optional(),zarr_errors:K().int().nullable().optional(),zarr_failure_count:K().int().nullable().optional(),zarr_deterministic:Dc.optional(),zarr_failed_at:k().nullable().optional(),zarr_index_url:k().nullable().optional(),zarr_verify_status:St(["verified","failed","unverifiable"]).nullable().optional(),zarr_verified_at:k().nullable().optional(),total_recording_duration:K().nullable().optional(),recording_duration_min:K().nullable().optional(),recording_duration_max:K().nullable().optional(),recording_count:K().int().nullable().optional(),recordings_unavailable:K().int().nullable().optional(),channel_count_min:K().int().nullable().optional(),channel_count_max:K().int().nullable().optional(),sampling_frequency:K().nullable().optional(),power_line_frequency:K().nullable().optional(),eeg_reference:k().nullable().optional(),placement_scheme:k().nullable().optional()}).passthrough();DDe=SN.superRefine((e,t)=>{$N(e,t),CN(e,t)}),EDe=SN.extend({file_size:K().nonnegative().nullable(),file_size_formatted:k().nullable().optional(),modalities:k().nullable().optional(),tasks:k().nullable().optional(),authors:k().nullable().optional(),license:k().nullable().optional(),owner_github:k().nullable().optional(),attestation_deposit_type:St(["owner","redistribution"]).nullable().optional(),attestation_key_status:St(["destroyed","retained"]).nullable().optional(),attestation_deidentified:Dc.optional(),attestation_no_duplicate:Dc.optional(),attestation_upstream_source:k().nullable().optional(),attestation_accepted_at:k().nullable().optional(),zarr_data_failures:Xe({count:K().int().nonnegative(),detail_ref:k(),compacted_by:k().optional(),pending:K().int().nonnegative().optional(),discovered:K().int().nonnegative().optional(),events_upload_failed:qs(!0).optional(),manifest_upload_failed:qs(!0).optional()}).passthrough().nullable().optional()}).passthrough().superRefine((e,t)=>{$N(e,t),CN(e,t)}),SDe=Xe({id:k(),name:k(),modalities:k().nullable().optional(),participants:K().int().nullable().optional(),doi:k().nullable().optional(),tasks:k().nullable().optional(),authors:k().nullable().optional(),has_hed:Dc.optional(),score:K().optional(),snippet:k().optional()}).passthrough(),RN=yN(k(),K().int().nonnegative()),Fet=Xe({datasets:mt(DDe),count:K().int().nonnegative(),total_count:K().int().nonnegative().optional(),limit:K().int().optional(),offset:K().int().optional(),excluded_unknown:K().int().nonnegative().optional(),excluded_unknown_by_facet:RN.optional()}).passthrough(),ON=Xe({results:mt(SDe),count:K().int().nonnegative(),returned:K().int().nonnegative().optional(),offset:K().int().nonnegative().optional(),limit:K().int().optional(),candidate_ceiling:K().int().optional(),truncated:Ut().optional(),method:St(["exact_id","text","text_fallback","semantic","unavailable"]).optional(),min_score:K().optional(),warning:k().optional(),excluded_unknown:K().int().nonnegative().optional(),excluded_unknown_by_facet:RN.optional()}).passthrough(),Pet=Xe({dataset:EDe}).passthrough(),Wi=Xe({value:k(),count:K().int().nonnegative()}),$De=Xe({values:mt(Wi),distinct_total:K().int().nonnegative(),truncated:Ut()}),Mm=Xe({"electrode-system":mt(Wi).optional(),source:mt(Wi).optional(),zarr:mt(Wi).optional(),powerline:mt(Wi).optional(),"bids-version":mt(Wi).optional(),"hed-version":mt(Wi).optional(),license:mt(Wi).optional(),modality:mt(Wi).optional(),task:$De.optional(),warning:k().optional()}).passthrough(),Iet=Xe({schema_version:qs(wDe),doc_type:qs("dataset"),dataset_id:k().regex(/^[a-z]{2}\d+$/,"neuroschema dataset_id pattern"),name:k(),source:K_,recording_modality:mt(k()).min(1),description:k().nullable().optional(),bids_version:k().nullable().optional(),license:k().nullable().optional()}).passthrough()});var CDe,qet,jet,Met,Bet;var kN=O(()=>{Hi();CDe=/^\d{4}-\d{4}-\d{4}-\d{3}[\dX]$/,qet=k().regex(CDe,"ORCID must be in format 0000-0000-0000-000X"),jet=St(["found","no_public_name","lookup_failed"]),Met=St(["bids_validation_failed","bids_validation_pending","bids_validation_in_progress","prescreen_failed","min_requirements_failed","owner_name_missing"]),Bet=St(["filled","would_fill","no_public_name","lookup_failed"])});var RDe,AN,Vu="https://nemar.org/settings",Vet,ODe,kDe,ADe,FN,PN;var J_=O(()=>{Hi();RDe=St(["orcid_in_use","orcid_already_linked","orcid_linked_other","email_in_use","github_in_use","identity_conflict_remains"]),AN=RDe.options,Vet={orcid_in_use:`That ORCID iD already belongs to a NEMAR account. Sign in to that account instead; if you want the iD on a different account, unlink it there first (Settings, ${Vu}).`,orcid_already_linked:`That ORCID iD already belongs to a NEMAR account. Sign in to that account instead; if you want the iD on a different account, unlink it there first (Settings, ${Vu}).`,orcid_linked_other:`That ORCID iD is linked to a different NEMAR account. Unlink it there first (Settings, ${Vu}), then link it here.`,email_in_use:`That email address already belongs to a NEMAR account. Sign in to that account instead, or change its address first (Settings, ${Vu}).`,github_in_use:`That GitHub account is already linked to a NEMAR account. Sign in to that account instead, or change its GitHub username first (Settings, ${Vu}).`,identity_conflict_remains:"The collision that flagged this account is still there. Resolve it on the other account first (change its email or GitHub username, or unlink its ORCID iD), or delete that account, then clear the flag."},ODe=St(["orcid","email","github"]),kDe=Xe({id:K().int(),username:k().nullable(),email:k(),created_at:k(),has_oauth_identity:Ut(),dataset_count:K().int(),identity_conflict:K().int(),canonical:Ut()}).passthrough(),ADe=Xe({kind:ODe,value:k(),canonical_user_id:K().int(),accounts:mt(kDe)}).passthrough(),FN=Xe({groups:mt(ADe),group_count:K().int(),flagged_count:K().int()}).passthrough(),PN=Xe({ok:qs(!0),id:K().int(),cleared:Ut()}).passthrough()});function $t(e){return wt[e]}function Ki(e,t){return e.replace(/\{(\w+)\}/g,(r,n)=>Object.hasOwn(t,n)?t[n]:r)}var wt;var Ec=O(()=>{wt={"tier.unverified.label":"Email not verified","tier.base.label":"Base access","tier.upload.label":"Upload access","tier.unverified.lede":"Verify your email address to activate your account.","upload_access.section.title":"Upload access","upload_access.section.lede":"A one-time admin grant. Reviewed against export-control and local-jurisdiction rules.","upload_access.state.granted":"Granted","upload_access.state.requested":"Requested","upload_access.state.not_requested":"Not requested","upload_access.invite.title":"Want to contribute a dataset?","upload_access.invite.body":"Browsing, searching and downloading are open to your account already. Uploading needs one extra grant: an admin checks your GitHub handle and location against export-control and local-jurisdiction rules, once.","upload_access.gate.title":"Ask for upload access first","upload_access.gate.body":"Your account can browse, search and download everything public already. Uploading needs one extra grant: an admin checks your GitHub handle and where you\u2019re based against export-control and local-jurisdiction rules. You ask once, and it is answered by email.","upload_access.request.cta":"Request upload access","upload_access.request.form_body":"Tell us what you plan to deposit. An admin reviews this alongside your name, username, GitHub handle and location, then grants access once.","upload_access.request.why_label":"What do you intend to upload?","upload_access.request.why_hint":"Describe what you intend to upload in 20-500 characters","upload_access.requested.title":"Your request is with an admin","upload_access.requested.lede":"An admin is reviewing your request.","upload_access.requested.lede_dated":"An admin is reviewing your request from {date}.","upload_access.requested.body.upload":"We\u2019ll email you when there\u2019s a decision, and this page will let you upload as soon as it\u2019s granted.","upload_access.requested.body":"We\u2019ll email you when there\u2019s a decision. Everything else on your account keeps working in the meantime.","upload_access.requested.cta":"See the request","upload_access.granted.body":"You can upload datasets from the upload page. Publishing one is a separate, per-dataset review you start from your dashboard.","upload_access.unverified.body":"Verify your email address first \u2014 the review happens over email.","upload_access.docs_link":"How upload access works","gap.sentence":"{label} is missing: needed {blocks}.","gap.set_on.both":"Set it in {web} or run `{cli}`.","gap.set_on.web":"Set it in {web}.","gap.blocks.verified":"to activate your account","gap.blocks.upload_access":"to request upload access","gap.blocks.publication":"to publish a dataset","gap.blocks.unknown":"to finish setting up your account","gap.blocks.noun.verified":"account activation","gap.blocks.noun.upload_access":"upload access","gap.blocks.noun.publication":"publication","gap.set_on.default_web":"Settings","gap.field.email_verified.label":"A verified email address","gap.field.username.label":"Username","gap.field.given_name.label":"Given name","gap.field.family_name.label":"Family name","gap.field.github_username.label":"GitHub handle","gap.field.city.label":"City","gap.field.country.label":"Country","gap.field.why.label":"A description of what you intend to upload","gap.field.email_verified.set_on.web":"the verify step on your dashboard","gap.field.email_verified.set_on.cli":"nemar auth resend-verification","gap.field.username.set_on.web":"Settings","gap.field.username.set_on.cli":"nemar auth profile set-username","gap.field.given_name.set_on.web":"Settings","gap.field.given_name.set_on.cli":"nemar auth profile set-name","gap.field.family_name.set_on.web":"Settings","gap.field.family_name.set_on.cli":"nemar auth profile set-name","gap.field.given_name.set_on.web.orcid":"your ORCID record at orcid.org, then sign in again","gap.field.family_name.set_on.web.orcid":"your ORCID record at orcid.org, then sign in again","gap.field.github_username.set_on.web":"Settings","gap.field.github_username.set_on.cli":"nemar auth profile set-github","gap.field.city.set_on.web":"Settings","gap.field.city.set_on.cli":"nemar auth profile set-location","gap.field.country.set_on.web":"Settings","gap.field.country.set_on.cli":"nemar auth profile set-location","gap.field.why.set_on.web":"the request form in Settings","gap.field.why.set_on.cli":"nemar auth request-upload-access","gaps.title":"What is still missing","gaps.none":"Nothing outstanding \u2014 every field NEMAR needs is filled in.","gaps.nudge.title":"Your profile isn\u2019t finished yet","gaps.nudge.cta":"Complete your profile","gaps.upload.title":"Before you can ask, your account still needs:","gaps.request.title":"Finish these first:","gaps.admin.title":"Still missing","gaps.admin.item":"{label} \u2014 blocks {blocks}","gaps.admin.none":"Nothing missing \u2014 every field the request needs is filled in.","gaps.admin.not_loaded":"Not loaded \u2014 open the user page to see what is still missing.","onboarding.username.auto_assigned.title":"We chose your username from your name","onboarding.username.auto_assigned.body":"Your account needed a username to be listed as a dataset owner, so one was made from your name when you signed in. You can change it once, here, until an admin grants you upload access.","welcome.unverified.title":"Verify your email address","welcome.unverified.body":"Authorizing with ORCID created your NEMAR account and signed you in. One step left: enter the 6-digit code we emailed you. That activates the account \u2014 no admin approval is involved.","welcome.active.title":"Your account is active","welcome.active.body":"Authorizing with ORCID created your NEMAR account and signed you in. There is no separate sign-up step and no approval queue: browse, search, and your dashboard all work right now.","welcome.upload_access.title":"Ask for upload access when you\u2019re ready to contribute","welcome.upload_access.body":"Reading is open to every verified account. Uploading and compute need one extra grant, because an admin has to check your GitHub handle and location against export-control and local-jurisdiction rules first. You ask once, from Settings.","cli.gaps.section.title":"Profile","cli.gaps.unknown":"not checked \u2014 run 'nemar auth status --refresh'","cli.gaps.unreported":"not reported by this backend","cli.gap.set_on.cli_only":"Run `{cli}`.","cli.gap.field.sandbox.label":"Sandbox training","cli.gap.blocks.sandbox":"to upload a dataset from the CLI","cli.gap.field.sandbox.set_on.cli":"nemar sandbox","cli.upload.preflight.title":"Upload access is not granted yet","cli.upload.preflight.body":"Browsing, searching and downloading are open to your account already. Uploading needs one extra grant: an admin checks your GitHub handle and location against export-control and local-jurisdiction rules, once.","cli.upload_access.cta":"Ask for it with `nemar auth request-upload-access`.","cli.upload.preflight.unchecked":"Upload access could not be checked ({reason}); continuing.","cli.upload.preflight.gaps_unknown":"Could not determine what is still missing; run `nemar auth profile` for the list.","cli.upload.preflight.dry_run":"Continuing anyway: --dry-run uploads nothing."}});function PDe(e){return e==="verified"||e==="upload_access"||e==="publication"}function Sc(e){return(e??"").trim().length===0}function NN(e,t={}){let r=t.orcidVerified===!0,n=Object.hasOwn(Bm,e)?Bm[e]:void 0;if(!n)return{field:e,label:e,blocks:t.blocks??[],setOnWeb:wt["gap.set_on.default_web"],setOnCli:null,known:!1};let i=r&&n.orcidWebKey!==void 0;return{field:e,blocks:t.blocks??n.blocks,label:wt[n.labelKey],setOnWeb:wt[i?n.orcidWebKey:n.webKey],setOnCli:i||n.cliKey===null?null:wt[n.cliKey],known:!0}}function IN(e){let t=X_.indexOf(e);return t===-1?X_.length:t}function qN(e,t={}){return e.map((r)=>NN(r,{orcidVerified:t.orcidVerified}))}function Lm(e,t={}){return e.filter((r)=>!!r&&typeof r.field==="string").map((r)=>{let n=Array.isArray(r.blocks)?r.blocks.filter(PDe):[];return NN(r.field,{orcidVerified:t.orcidVerified,blocks:n.length>0?n:void 0})}).sort((r,n)=>IN(r.field)-IN(n.field))}function Q_(e){let t=e.blocks[0],r=t?wt[FDe[t]]:wt["gap.blocks.unknown"],n=Ki(wt["gap.sentence"],{label:"",blocks:r}).trimStart(),i=e.setOnCli?Ki(wt["gap.set_on.both"],{web:e.setOnWeb,cli:e.setOnCli}):Ki(wt["gap.set_on.web"],{web:e.setOnWeb});return`${n} ${i}`}function jN(e){return`${e.label} ${Q_(e)}`}function Um(){let e=Ki(wt["gap.sentence"],{label:TN.label,blocks:wt["cli.gap.blocks.sandbox"]}),t=Ki(wt["cli.gap.set_on.cli_only"],{cli:TN.command});return`${e} ${t}`}var Bm,X_,Wet,FDe,TN;var $c=O(()=>{Ec();Bm={email_verified:{blocks:["verified","upload_access"],labelKey:"gap.field.email_verified.label",webKey:"gap.field.email_verified.set_on.web",cliKey:"gap.field.email_verified.set_on.cli",isMissing:(e)=>e.status==="pending"||e.email_verified===!1},username:{blocks:["upload_access"],labelKey:"gap.field.username.label",webKey:"gap.field.username.set_on.web",cliKey:"gap.field.username.set_on.cli",isMissing:(e)=>e.username!==void 0&&Sc(e.username)},given_name:{blocks:["upload_access","publication"],labelKey:"gap.field.given_name.label",webKey:"gap.field.given_name.set_on.web",cliKey:"gap.field.given_name.set_on.cli",orcidWebKey:"gap.field.given_name.set_on.web.orcid",isMissing:(e)=>Sc(e.given_name)},family_name:{blocks:["upload_access","publication"],labelKey:"gap.field.family_name.label",webKey:"gap.field.family_name.set_on.web",cliKey:"gap.field.family_name.set_on.cli",orcidWebKey:"gap.field.family_name.set_on.web.orcid",isMissing:(e)=>Sc(e.family_name)},github_username:{blocks:["upload_access","publication"],labelKey:"gap.field.github_username.label",webKey:"gap.field.github_username.set_on.web",cliKey:"gap.field.github_username.set_on.cli",isMissing:(e)=>Sc(e.github_username)},city:{blocks:["upload_access"],labelKey:"gap.field.city.label",webKey:"gap.field.city.set_on.web",cliKey:"gap.field.city.set_on.cli",isMissing:(e)=>Sc(e.city)},country:{blocks:["upload_access"],labelKey:"gap.field.country.label",webKey:"gap.field.country.set_on.web",cliKey:"gap.field.country.set_on.cli",isMissing:(e)=>Sc(e.country)},why:{blocks:["upload_access"],labelKey:"gap.field.why.label",webKey:"gap.field.why.set_on.web",cliKey:"gap.field.why.set_on.cli",isMissing:null}},X_=Object.keys(Bm),Wet=X_.filter((e)=>Bm[e].isMissing!==null),FDe={verified:"gap.blocks.verified",upload_access:"gap.blocks.upload_access",publication:"gap.blocks.publication"};TN={field:"sandbox",label:wt["cli.gap.field.sandbox.label"],command:wt["cli.gap.field.sandbox.set_on.cli"]}});var Gu=O(()=>{z_();jm();Y_();kN();J_();Ec();$c()});function Vm(e){let t=[],r="",n="start",i=!1;for(let o of e)switch(o){case"\\":{if(n==="index")throw Error("Invalid character in an index");if(n==="indexEnd")throw Error("Invalid character after an index");if(i)r+=o;n="property",i=!i;break}case".":{if(n==="index")throw Error("Invalid character in an index");if(n==="indexEnd"){n="property";break}if(i){i=!1,r+=o;break}if(Z_.has(r))return[];t.push(r),r="",n="property";break}case"[":{if(n==="index")throw Error("Invalid character in an index");if(n==="indexEnd"){n="index";break}if(i){i=!1,r+=o;break}if(n==="property"){if(Z_.has(r))return[];t.push(r),r=""}n="index";break}case"]":{if(n==="index"){t.push(Number.parseInt(r,10)),r="",n="indexEnd";break}if(n==="indexEnd")throw Error("Invalid character after an index")}default:{if(n==="index"&&!IDe.has(o))throw Error("Invalid character in an index");if(n==="indexEnd")throw Error("Invalid character after an index");if(n==="start")n="property";if(i)i=!1,r+="\\";r+=o}}if(i)r+="\\";switch(n){case"property":{if(Z_.has(r))return[];t.push(r);break}case"index":throw Error("Index was not closed");case"start":{t.push("");break}}return t}function ev(e,t){if(typeof t!=="number"&&Array.isArray(e)){let r=Number.parseInt(t,10);return Number.isInteger(r)&&e[r]===e[t]}return!1}function MN(e,t){if(ev(e,t))throw Error("Cannot use string index")}function BN(e,t,r){if(!js(e)||typeof t!=="string")return r===void 0?e:r;let n=Vm(t);if(n.length===0)return r;for(let i=0;i<n.length;i++){let o=n[i];if(ev(e,o))e=i===n.length-1?void 0:null;else e=e[o];if(e===void 0||e===null){if(i!==n.length-1)return r;break}}return e===void 0?r:e}function tv(e,t,r){if(!js(e)||typeof t!=="string")return e;let n=e,i=Vm(t);for(let o=0;o<i.length;o++){let s=i[o];if(MN(e,s),o===i.length-1)e[s]=r;else if(!js(e[s]))e[s]=typeof i[o+1]==="number"?[]:{};e=e[s]}return n}function LN(e,t){if(!js(e)||typeof t!=="string")return!1;let r=Vm(t);for(let n=0;n<r.length;n++){let i=r[n];if(MN(e,i),n===r.length-1)return delete e[i],!0;if(e=e[i],!js(e))return!1}}function UN(e,t){if(!js(e)||typeof t!=="string")return!1;let r=Vm(t);if(r.length===0)return!1;for(let n of r){if(!js(e)||!(n in e)||ev(e,n))return!1;e=e[n]}return!0}var js=(e)=>{let t=typeof e;return e!==null&&(t==="object"||t==="function")},Z_,IDe;var VN=O(()=>{Z_=new Set(["__proto__","prototype","constructor"]),IDe=new Set("0123456789")});import yt from"path";import GN from"os";import rv from"process";function iv(e,{suffix:t="nodejs"}={}){if(typeof e!=="string")throw TypeError(`Expected a string, got ${typeof e}`);if(t)e+=`-${t}`;if(rv.platform==="darwin")return TDe(e);if(rv.platform==="win32")return NDe(e);return qDe(e)}var zo,nv,Cc,TDe=(e)=>{let t=yt.join(zo,"Library");return{data:yt.join(t,"Application Support",e),config:yt.join(t,"Preferences",e),cache:yt.join(t,"Caches",e),log:yt.join(t,"Logs",e),temp:yt.join(nv,e)}},NDe=(e)=>{let t=Cc.APPDATA||yt.join(zo,"AppData","Roaming"),r=Cc.LOCALAPPDATA||yt.join(zo,"AppData","Local");return{data:yt.join(r,e,"Data"),config:yt.join(t,e,"Config"),cache:yt.join(r,e,"Cache"),log:yt.join(r,e,"Log"),temp:yt.join(nv,e)}},qDe=(e)=>{let t=yt.basename(zo);return{data:yt.join(Cc.XDG_DATA_HOME||yt.join(zo,".local","share"),e),config:yt.join(Cc.XDG_CONFIG_HOME||yt.join(zo,".config"),e),cache:yt.join(Cc.XDG_CACHE_HOME||yt.join(zo,".cache"),e),log:yt.join(Cc.XDG_STATE_HOME||yt.join(zo,".local","state"),e),temp:yt.join(nv,t,e)}};var zN=O(()=>{zo=GN.homedir(),nv=GN.tmpdir(),{env:Cc}=rv});var jDe=(e,t)=>{let{onError:r}=t;return function(...i){return e.apply(void 0,i).catch(r)}},fi;var HN=O(()=>{fi=jDe});var MDe=(e,t)=>{let{onError:r}=t;return function(...i){try{return e.apply(void 0,i)}catch(o){return r(o)}}},Rn;var WN=O(()=>{Rn=MDe});var KN=250;var YN=()=>{};var BDe=(e,t)=>{let{isRetriable:r}=t;return function(i){let{timeout:o}=i,s=i.interval??KN,a=Date.now()+o;return function c(...u){return e.apply(void 0,u).catch((d)=>{if(!r(d))throw d;if(Date.now()>=a)throw d;let f=Math.round(s*Math.random());if(f>0)return new Promise((p)=>setTimeout(p,f)).then(()=>c.apply(void 0,u));else return c.apply(void 0,u)})}}},pi;var JN=O(()=>{YN();pi=BDe});var LDe=(e,t)=>{let{isRetriable:r}=t;return function(i){let{timeout:o}=i,s=Date.now()+o;return function(...c){while(!0)try{return e.apply(void 0,c)}catch(u){if(!r(u))throw u;if(Date.now()>=s)throw u;continue}}}},mi;var XN=O(()=>{mi=LDe});var ov=O(()=>{HN();WN();JN();XN()});var zu,sv;var QN=O(()=>{av();zu={isChangeErrorOk:(e)=>{if(!zu.isNodeError(e))return!1;let{code:t}=e;if(t==="ENOSYS")return!0;if(!ZN&&(t==="EINVAL"||t==="EPERM"))return!0;return!1},isNodeError:(e)=>e instanceof Error,isRetriableError:(e)=>{if(!zu.isNodeError(e))return!1;let{code:t}=e;if(t==="EMFILE"||t==="ENFILE"||t==="EAGAIN"||t==="EBUSY"||t==="EACCESS"||t==="EACCES"||t==="EACCS"||t==="EPERM")return!0;return!1},onChangeError:(e)=>{if(!zu.isNodeError(e))throw e;if(zu.isChangeErrorOk(e))return;throw e}},sv=zu});import eq from"process";var Hu,Cr,ZN,Vt;var av=O(()=>{QN();Hu={onError:sv.onChangeError},Cr={onError:()=>{return}},ZN=eq.getuid?!eq.getuid():!1,Vt={isRetriable:sv.isRetriableError}});import Ne from"fs";import{promisify as er}from"util";var UDe,Tt;var cv=O(()=>{ov();ov();av();UDe={attempt:{chmod:fi(er(Ne.chmod),Hu),chown:fi(er(Ne.chown),Hu),close:fi(er(Ne.close),Cr),fsync:fi(er(Ne.fsync),Cr),mkdir:fi(er(Ne.mkdir),Cr),realpath:fi(er(Ne.realpath),Cr),stat:fi(er(Ne.stat),Cr),unlink:fi(er(Ne.unlink),Cr),chmodSync:Rn(Ne.chmodSync,Hu),chownSync:Rn(Ne.chownSync,Hu),closeSync:Rn(Ne.closeSync,Cr),existsSync:Rn(Ne.existsSync,Cr),fsyncSync:Rn(Ne.fsync,Cr),mkdirSync:Rn(Ne.mkdirSync,Cr),realpathSync:Rn(Ne.realpathSync,Cr),statSync:Rn(Ne.statSync,Cr),unlinkSync:Rn(Ne.unlinkSync,Cr)},retry:{close:pi(er(Ne.close),Vt),fsync:pi(er(Ne.fsync),Vt),open:pi(er(Ne.open),Vt),readFile:pi(er(Ne.readFile),Vt),rename:pi(er(Ne.rename),Vt),stat:pi(er(Ne.stat),Vt),write:pi(er(Ne.write),Vt),writeFile:pi(er(Ne.writeFile),Vt),closeSync:mi(Ne.closeSync,Vt),fsyncSync:mi(Ne.fsyncSync,Vt),openSync:mi(Ne.openSync,Vt),readFileSync:mi(Ne.readFileSync,Vt),renameSync:mi(Ne.renameSync,Vt),statSync:mi(Ne.statSync,Vt),writeSync:mi(Ne.writeSync,Vt),writeFileSync:mi(Ne.writeFileSync,Vt)}},Tt=UDe});import Ms from"process";var tq="utf8",lv=438,rq=511,nq,iq,oq,sq=1000,aq,Att,uv=128;var dv=O(()=>{nq={},iq=Ms.geteuid?Ms.geteuid():-1,oq=Ms.getegid?Ms.getegid():-1,aq=!!Ms.getuid,Att=Ms.getuid?!Ms.getuid():!1});var cq=(e)=>e instanceof Error&&("code"in e),fv=(e)=>typeof e==="string",Gm=(e)=>e===void 0;var lq=()=>{};var uq=()=>{};import dq from"process";var fq,zm;var pv=O(()=>{fq=dq.platform==="linux",zm=dq.platform==="win32"});var mv,pq;var mq=O(()=>{pv();mv=["SIGHUP","SIGINT","SIGTERM"];if(!zm)mv.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");if(fq)mv.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");pq=mv});import Rc from"process";class hq{constructor(){this.callbacks=new Set,this.exited=!1,this.exit=(e)=>{if(this.exited)return;this.exited=!0;for(let t of this.callbacks)t();if(e)if(zm&&(e!=="SIGINT"&&e!=="SIGTERM"&&e!=="SIGKILL"))Rc.kill(Rc.pid,"SIGTERM");else Rc.kill(Rc.pid,e)},this.hook=()=>{Rc.once("exit",()=>this.exit());for(let e of pq)try{Rc.once(e,()=>this.exit(e))}catch{}},this.register=(e)=>(this.callbacks.add(e),()=>{this.callbacks.delete(e)}),this.hook()}}var gq;var yq=O(()=>{pv();mq();gq=new hq});var VDe,xq;var bq=O(()=>{yq();VDe=gq.register,xq=VDe});import GDe from"path";var zr,Wu;var _q=O(()=>{cv();bq();dv();zr={store:{},create:(e)=>{let t=`000000${Math.floor(Math.random()*16777215).toString(16)}`.slice(-6),r=Date.now().toString().slice(-10),n="tmp-",i=`.tmp-${r}${t}`;return`${e}${i}`},get:(e,t,r=!0)=>{let n=zr.truncate(t(e));if(n in zr.store)return zr.get(e,t,r);return zr.store[n]=r,[n,()=>delete zr.store[n]]},purge:(e)=>{if(!zr.store[e])return;delete zr.store[e],Tt.attempt.unlink(e)},purgeSync:(e)=>{if(!zr.store[e])return;delete zr.store[e],Tt.attempt.unlinkSync(e)},purgeSyncAll:()=>{for(let e in zr.store)zr.purgeSync(e)},truncate:(e)=>{let t=GDe.basename(e);if(t.length<=uv)return e;let r=/^(\.?)(.*?)((?:\.[^.]+)?(?:\.tmp-\d{10}[a-f0-9]{6})?)$/.exec(t);if(!r)return e;let n=t.length-uv;return`${e.slice(0,-t.length)}${r[1]}${r[2].slice(0,-n)}${r[3]}`}};xq(zr.purgeSyncAll);Wu=zr});import zDe from"path";function hv(e,t,r=nq){if(fv(r))return hv(e,t,{encoding:r});let i={timeout:r.timeout??sq},o=null,s=null,a=null;try{let c=Tt.attempt.realpathSync(e),u=!!c;e=c||e,[s,o]=Wu.get(e,r.tmpCreate||Wu.create,r.tmpPurge!==!1);let d=aq&&Gm(r.chown),f=Gm(r.mode);if(u&&(d||f)){let m=Tt.attempt.statSync(e);if(m){if(r={...r},d)r.chown={uid:m.uid,gid:m.gid};if(f)r.mode=m.mode}}if(!u){let m=zDe.dirname(e);Tt.attempt.mkdirSync(m,{mode:rq,recursive:!0})}if(a=Tt.retry.openSync(i)(s,"w",r.mode||lv),r.tmpCreated)r.tmpCreated(s);if(fv(t))Tt.retry.writeSync(i)(a,t,0,r.encoding||tq);else if(!Gm(t))Tt.retry.writeSync(i)(a,t,0,t.length,0);if(r.fsync!==!1)if(r.fsyncWait!==!1)Tt.retry.fsyncSync(i)(a);else Tt.attempt.fsync(a);if(Tt.retry.closeSync(i)(a),a=null,r.chown&&(r.chown.uid!==iq||r.chown.gid!==oq))Tt.attempt.chownSync(s,r.chown.uid,r.chown.gid);if(r.mode&&r.mode!==lv)Tt.attempt.chmodSync(s,r.mode);try{Tt.retry.renameSync(i)(s,e)}catch(m){if(!cq(m))throw m;if(m.code!=="ENAMETOOLONG")throw m;Tt.retry.renameSync(i)(s,Wu.truncate(e))}o(),s=null}finally{if(a)Tt.attempt.closeSync(a);if(s)Wu.purge(s)}}var vq=O(()=>{cv();dv();lq();uq();_q()});var Yu=h(function(Eq){Object.defineProperty(Eq,"__esModule",{value:!0});Eq.regexpCode=Eq.getEsmExportName=Eq.getProperty=Eq.safeStringify=Eq.stringify=Eq.strConcat=Eq.addCodeArg=Eq.str=Eq._=Eq.nil=Eq._Code=Eq.Name=Eq.IDENTIFIER=Eq._CodeOrName=void 0;class Hm{}Eq._CodeOrName=Hm;Eq.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class Oc extends Hm{constructor(e){super();if(!Eq.IDENTIFIER.test(e))throw Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}Eq.Name=Oc;class On extends Hm{constructor(e){super();this._items=typeof e==="string"?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let e=this._items[0];return e===""||e==='""'}get str(){var e;return(e=this._str)!==null&&e!==void 0?e:this._str=this._items.reduce((t,r)=>`${t}${r}`,"")}get names(){var e;return(e=this._names)!==null&&e!==void 0?e:this._names=this._items.reduce((t,r)=>{if(r instanceof Oc)t[r.str]=(t[r.str]||0)+1;return t},{})}}Eq._Code=On;Eq.nil=new On("");function wq(e,...t){let r=[e[0]],n=0;while(n<t.length)yv(r,t[n]),r.push(e[++n]);return new On(r)}Eq._=wq;var gv=new On("+");function Dq(e,...t){let r=[Ku(e[0])],n=0;while(n<t.length)r.push(gv),yv(r,t[n]),r.push(gv,Ku(e[++n]));return HDe(r),new On(r)}Eq.str=Dq;function yv(e,t){if(t instanceof On)e.push(...t._items);else if(t instanceof Oc)e.push(t);else e.push(YDe(t))}Eq.addCodeArg=yv;function HDe(e){let t=1;while(t<e.length-1){if(e[t]===gv){let r=WDe(e[t-1],e[t+1]);if(r!==void 0){e.splice(t-1,3,r);continue}e[t++]="+"}t++}}function WDe(e,t){if(t==='""')return e;if(e==='""')return t;if(typeof e=="string"){if(t instanceof Oc||e[e.length-1]!=='"')return;if(typeof t!="string")return`${e.slice(0,-1)}${t}"`;if(t[0]==='"')return e.slice(0,-1)+t.slice(1);return}if(typeof t=="string"&&t[0]==='"'&&!(e instanceof Oc))return`"${e}${t.slice(1)}`;return}function KDe(e,t){return t.emptyStr()?e:e.emptyStr()?t:Dq`${e}${t}`}Eq.strConcat=KDe;function YDe(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:Ku(Array.isArray(e)?e.join(","):e)}function JDe(e){return new On(Ku(e))}Eq.stringify=JDe;function Ku(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}Eq.safeStringify=Ku;function XDe(e){return typeof e=="string"&&Eq.IDENTIFIER.test(e)?new On(`.${e}`):wq`[${e}]`}Eq.getProperty=XDe;function QDe(e){if(typeof e=="string"&&Eq.IDENTIFIER.test(e))return new On(`${e}`);throw Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}Eq.getEsmExportName=QDe;function ZDe(e){return new On(e.toString())}Eq.regexpCode=ZDe});var vv=h(function(Rq){Object.defineProperty(Rq,"__esModule",{value:!0});Rq.ValueScope=Rq.ValueScopeName=Rq.Scope=Rq.varKinds=Rq.UsedValueState=void 0;var Rr=Yu();class $q extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`);this.value=e.value}}var Km;(function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"})(Km||(Rq.UsedValueState=Km={}));Rq.varKinds={const:new Rr.Name("const"),let:new Rr.Name("let"),var:new Rr.Name("var")};class bv{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t}toName(e){return e instanceof Rr.Name?e:this.name(e)}name(e){return new Rr.Name(this._newName(e))}_newName(e){let t=this._names[e]||this._nameGroup(e);return`${e}${t.index++}`}_nameGroup(e){var t,r;if(((r=(t=this._parent)===null||t===void 0?void 0:t._prefixes)===null||r===void 0?void 0:r.has(e))||this._prefixes&&!this._prefixes.has(e))throw Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}}Rq.Scope=bv;class _v extends Rr.Name{constructor(e,t){super(t);this.prefix=e}setValue(e,{property:t,itemIndex:r}){this.value=e,this.scopePath=Rr._`.${new Rr.Name(t)}[${r}]`}}Rq.ValueScopeName=_v;var f2e=Rr._`\n`;class Cq extends bv{constructor(e){super(e);this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?f2e:Rr.nil}}get(){return this._scope}name(e){return new _v(e,this._newName(e))}value(e,t){var r;if(t.ref===void 0)throw Error("CodeGen: ref must be passed in value");let n=this.toName(e),{prefix:i}=n,o=(r=t.key)!==null&&r!==void 0?r:t.ref,s=this._values[i];if(s){let u=s.get(o);if(u)return u}else s=this._values[i]=new Map;s.set(o,n);let a=this._scope[i]||(this._scope[i]=[]),c=a.length;return a[c]=t.ref,n.setValue(t,{property:i,itemIndex:c}),n}getValue(e,t){let r=this._values[e];if(!r)return;return r.get(t)}scopeRefs(e,t=this._values){return this._reduceValues(t,(r)=>{if(r.scopePath===void 0)throw Error(`CodeGen: name "${r}" has no value`);return Rr._`${e}${r.scopePath}`})}scopeCode(e=this._values,t,r){return this._reduceValues(e,(n)=>{if(n.value===void 0)throw Error(`CodeGen: name "${n}" has no value`);return n.value.code},t,r)}_reduceValues(e,t,r={},n){let i=Rr.nil;for(let o in e){let s=e[o];if(!s)continue;let a=r[o]=r[o]||new Map;s.forEach((c)=>{if(a.has(c))return;a.set(c,Km.Started);let u=t(c);if(u){let d=this.opts.es5?Rq.varKinds.var:Rq.varKinds.const;i=Rr._`${i}${d} ${c} = ${u};${this.opts._n}`}else if(u=n===null||n===void 0?void 0:n(c))i=Rr._`${i}${u}${this.opts._n}`;else throw new $q(c);a.set(c,Km.Completed)})}return i}}Rq.ValueScope=Cq});var he=h(function(Or){Object.defineProperty(Or,"__esModule",{value:!0});Or.or=Or.and=Or.not=Or.CodeGen=Or.operators=Or.varKinds=Or.ValueScopeName=Or.ValueScope=Or.Scope=Or.Name=Or.regexpCode=Or.stringify=Or.getProperty=Or.nil=Or.strConcat=Or.str=Or._=void 0;var Ce=Yu(),kn=vv(),Ho=Yu();Object.defineProperty(Or,"_",{enumerable:!0,get:function(){return Ho._}});Object.defineProperty(Or,"str",{enumerable:!0,get:function(){return Ho.str}});Object.defineProperty(Or,"strConcat",{enumerable:!0,get:function(){return Ho.strConcat}});Object.defineProperty(Or,"nil",{enumerable:!0,get:function(){return Ho.nil}});Object.defineProperty(Or,"getProperty",{enumerable:!0,get:function(){return Ho.getProperty}});Object.defineProperty(Or,"stringify",{enumerable:!0,get:function(){return Ho.stringify}});Object.defineProperty(Or,"regexpCode",{enumerable:!0,get:function(){return Ho.regexpCode}});Object.defineProperty(Or,"Name",{enumerable:!0,get:function(){return Ho.Name}});var eh=vv();Object.defineProperty(Or,"Scope",{enumerable:!0,get:function(){return eh.Scope}});Object.defineProperty(Or,"ValueScope",{enumerable:!0,get:function(){return eh.ValueScope}});Object.defineProperty(Or,"ValueScopeName",{enumerable:!0,get:function(){return eh.ValueScopeName}});Object.defineProperty(Or,"varKinds",{enumerable:!0,get:function(){return eh.varKinds}});Or.operators={GT:new Ce._Code(">"),GTE:new Ce._Code(">="),LT:new Ce._Code("<"),LTE:new Ce._Code("<="),EQ:new Ce._Code("==="),NEQ:new Ce._Code("!=="),NOT:new Ce._Code("!"),OR:new Ce._Code("||"),AND:new Ce._Code("&&"),ADD:new Ce._Code("+")};class Wo{optimizeNodes(){return this}optimizeNames(e,t){return this}}class kq extends Wo{constructor(e,t,r){super();this.varKind=e,this.name=t,this.rhs=r}render({es5:e,_n:t}){let r=e?kn.varKinds.var:this.varKind,n=this.rhs===void 0?"":` = ${this.rhs}`;return`${r} ${this.name}${n};`+t}optimizeNames(e,t){if(!e[this.name.str])return;if(this.rhs)this.rhs=Ac(this.rhs,e,t);return this}get names(){return this.rhs instanceof Ce._CodeOrName?this.rhs.names:{}}}class Ev extends Wo{constructor(e,t,r){super();this.lhs=e,this.rhs=t,this.sideEffects=r}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,t){if(this.lhs instanceof Ce.Name&&!e[this.lhs.str]&&!this.sideEffects)return;return this.rhs=Ac(this.rhs,e,t),this}get names(){let e=this.lhs instanceof Ce.Name?{}:{...this.lhs.names};return Zm(e,this.rhs)}}class Aq extends Ev{constructor(e,t,r,n){super(e,r,n);this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}}class Fq extends Wo{constructor(e){super();this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}}class Pq extends Wo{constructor(e){super();this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}}class Iq extends Wo{constructor(e){super();this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}}class Tq extends Wo{constructor(e){super();this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,t){return this.code=Ac(this.code,e,t),this}get names(){return this.code instanceof Ce._CodeOrName?this.code.names:{}}}class th extends Wo{constructor(e=[]){super();this.nodes=e}render(e){return this.nodes.reduce((t,r)=>t+r.render(e),"")}optimizeNodes(){let{nodes:e}=this,t=e.length;while(t--){let r=e[t].optimizeNodes();if(Array.isArray(r))e.splice(t,1,...r);else if(r)e[t]=r;else e.splice(t,1)}return e.length>0?this:void 0}optimizeNames(e,t){let{nodes:r}=this,n=r.length;while(n--){let i=r[n];if(i.optimizeNames(e,t))continue;g2e(e,i.names),r.splice(n,1)}return r.length>0?this:void 0}get names(){return this.nodes.reduce((e,t)=>Bs(e,t.names),{})}}class Ko extends th{render(e){return"{"+e._n+super.render(e)+"}"+e._n}}class Nq extends th{}class Ju extends Ko{}Ju.kind="else";class Yi extends Ko{constructor(e,t){super(t);this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);if(this.else)t+="else "+this.else.render(e);return t}optimizeNodes(){super.optimizeNodes();let e=this.condition;if(e===!0)return this.nodes;let t=this.else;if(t){let r=t.optimizeNodes();t=this.else=Array.isArray(r)?new Ju(r):r}if(t){if(e===!1)return t instanceof Yi?t:t.nodes;if(this.nodes.length)return this;return new Yi(Lq(e),t instanceof Yi?[t]:t.nodes)}if(e===!1||!this.nodes.length)return;return this}optimizeNames(e,t){var r;if(this.else=(r=this.else)===null||r===void 0?void 0:r.optimizeNames(e,t),!(super.optimizeNames(e,t)||this.else))return;return this.condition=Ac(this.condition,e,t),this}get names(){let e=super.names;if(Zm(e,this.condition),this.else)Bs(e,this.else.names);return e}}Yi.kind="if";class kc extends Ko{}kc.kind="for";class qq extends kc{constructor(e){super();this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,t){if(!super.optimizeNames(e,t))return;return this.iteration=Ac(this.iteration,e,t),this}get names(){return Bs(super.names,this.iteration.names)}}class jq extends kc{constructor(e,t,r,n){super();this.varKind=e,this.name=t,this.from=r,this.to=n}render(e){let t=e.es5?kn.varKinds.var:this.varKind,{name:r,from:n,to:i}=this;return`for(${t} ${r}=${n}; ${r}<${i}; ${r}++)`+super.render(e)}get names(){let e=Zm(super.names,this.from);return Zm(e,this.to)}}class wv extends kc{constructor(e,t,r,n){super();this.loop=e,this.varKind=t,this.name=r,this.iterable=n}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,t){if(!super.optimizeNames(e,t))return;return this.iterable=Ac(this.iterable,e,t),this}get names(){return Bs(super.names,this.iterable.names)}}class Ym extends Ko{constructor(e,t,r){super();this.name=e,this.args=t,this.async=r}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}}Ym.kind="func";class Jm extends th{render(e){return"return "+super.render(e)}}Jm.kind="return";class Mq extends Ko{render(e){let t="try"+super.render(e);if(this.catch)t+=this.catch.render(e);if(this.finally)t+=this.finally.render(e);return t}optimizeNodes(){var e,t;return super.optimizeNodes(),(e=this.catch)===null||e===void 0||e.optimizeNodes(),(t=this.finally)===null||t===void 0||t.optimizeNodes(),this}optimizeNames(e,t){var r,n;return super.optimizeNames(e,t),(r=this.catch)===null||r===void 0||r.optimizeNames(e,t),(n=this.finally)===null||n===void 0||n.optimizeNames(e,t),this}get names(){let e=super.names;if(this.catch)Bs(e,this.catch.names);if(this.finally)Bs(e,this.finally.names);return e}}class Xm extends Ko{constructor(e){super();this.error=e}render(e){return`catch(${this.error})`+super.render(e)}}Xm.kind="catch";class Qm extends Ko{render(e){return"finally"+super.render(e)}}Qm.kind="finally";class Bq{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...t,_n:t.lines?`
|
|
85
85
|
`:""},this._extScope=e,this._scope=new kn.Scope({parent:e}),this._nodes=[new Nq]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,t){let r=this._extScope.value(e,t);return(this._values[r.prefix]||(this._values[r.prefix]=new Set)).add(r),r}getScopeValue(e,t){return this._extScope.getValue(e,t)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,t,r,n){let i=this._scope.toName(t);if(r!==void 0&&n)this._constants[i.str]=r;return this._leafNode(new kq(e,i,r)),i}const(e,t,r){return this._def(kn.varKinds.const,e,t,r)}let(e,t,r){return this._def(kn.varKinds.let,e,t,r)}var(e,t,r){return this._def(kn.varKinds.var,e,t,r)}assign(e,t,r){return this._leafNode(new Ev(e,t,r))}add(e,t){return this._leafNode(new Aq(e,Or.operators.ADD,t))}code(e){if(typeof e=="function")e();else if(e!==Ce.nil)this._leafNode(new Tq(e));return this}object(...e){let t=["{"];for(let[r,n]of e){if(t.length>1)t.push(",");if(t.push(r),r!==n||this.opts.es5)t.push(":"),Ce.addCodeArg(t,n)}return t.push("}"),new Ce._Code(t)}if(e,t,r){if(this._blockNode(new Yi(e)),t&&r)this.code(t).else().code(r).endIf();else if(t)this.code(t).endIf();else if(r)throw Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new Yi(e))}else(){return this._elseNode(new Ju)}endIf(){return this._endBlockNode(Yi,Ju)}_for(e,t){if(this._blockNode(e),t)this.code(t).endFor();return this}for(e,t){return this._for(new qq(e),t)}forRange(e,t,r,n,i=this.opts.es5?kn.varKinds.var:kn.varKinds.let){let o=this._scope.toName(e);return this._for(new jq(i,o,t,r),()=>n(o))}forOf(e,t,r,n=kn.varKinds.const){let i=this._scope.toName(e);if(this.opts.es5){let o=t instanceof Ce.Name?t:this.var("_arr",t);return this.forRange("_i",0,Ce._`${o}.length`,(s)=>{this.var(i,Ce._`${o}[${s}]`),r(i)})}return this._for(new wv("of",n,i,t),()=>r(i))}forIn(e,t,r,n=this.opts.es5?kn.varKinds.var:kn.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,Ce._`Object.keys(${t})`,r);let i=this._scope.toName(e);return this._for(new wv("in",n,i,t),()=>r(i))}endFor(){return this._endBlockNode(kc)}label(e){return this._leafNode(new Fq(e))}break(e){return this._leafNode(new Pq(e))}return(e){let t=new Jm;if(this._blockNode(t),this.code(e),t.nodes.length!==1)throw Error('CodeGen: "return" should have one node');return this._endBlockNode(Jm)}try(e,t,r){if(!t&&!r)throw Error('CodeGen: "try" without "catch" and "finally"');let n=new Mq;if(this._blockNode(n),this.code(e),t){let i=this.name("e");this._currNode=n.catch=new Xm(i),t(i)}if(r)this._currNode=n.finally=new Qm,this.code(r);return this._endBlockNode(Xm,Qm)}throw(e){return this._leafNode(new Iq(e))}block(e,t){if(this._blockStarts.push(this._nodes.length),e)this.code(e).endBlock(t);return this}endBlock(e){let t=this._blockStarts.pop();if(t===void 0)throw Error("CodeGen: not in self-balancing block");let r=this._nodes.length-t;if(r<0||e!==void 0&&r!==e)throw Error(`CodeGen: wrong number of nodes: ${r} vs ${e} expected`);return this._nodes.length=t,this}func(e,t=Ce.nil,r,n){if(this._blockNode(new Ym(e,t,r)),n)this.code(n).endFunc();return this}endFunc(){return this._endBlockNode(Ym)}optimize(e=1){while(e-- >0)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,t){let r=this._currNode;if(r instanceof e||t&&r instanceof t)return this._nodes.pop(),this;throw Error(`CodeGen: not in block "${t?`${e.kind}/${t.kind}`:e.kind}"`)}_elseNode(e){let t=this._currNode;if(!(t instanceof Yi))throw Error('CodeGen: "else" without "if"');return this._currNode=t.else=e,this}get _root(){return this._nodes[0]}get _currNode(){let e=this._nodes;return e[e.length-1]}set _currNode(e){let t=this._nodes;t[t.length-1]=e}}Or.CodeGen=Bq;function Bs(e,t){for(let r in t)e[r]=(e[r]||0)+(t[r]||0);return e}function Zm(e,t){return t instanceof Ce._CodeOrName?Bs(e,t.names):e}function Ac(e,t,r){if(e instanceof Ce.Name)return n(e);if(!i(e))return e;return new Ce._Code(e._items.reduce((o,s)=>{if(s instanceof Ce.Name)s=n(s);if(s instanceof Ce._Code)o.push(...s._items);else o.push(s);return o},[]));function n(o){let s=r[o.str];if(s===void 0||t[o.str]!==1)return o;return delete t[o.str],s}function i(o){return o instanceof Ce._Code&&o._items.some((s)=>s instanceof Ce.Name&&t[s.str]===1&&r[s.str]!==void 0)}}function g2e(e,t){for(let r in t)e[r]=(e[r]||0)-(t[r]||0)}function Lq(e){return typeof e=="boolean"||typeof e=="number"||e===null?!e:Ce._`!${Dv(e)}`}Or.not=Lq;var y2e=Uq(Or.operators.AND);function x2e(...e){return e.reduce(y2e)}Or.and=x2e;var b2e=Uq(Or.operators.OR);function _2e(...e){return e.reduce(b2e)}Or.or=_2e;function Uq(e){return(t,r)=>t===Ce.nil?r:r===Ce.nil?t:Ce._`${Dv(t)} ${e} ${Dv(r)}`}function Dv(e){return e instanceof Ce.Name?e:Ce._`(${e})`}});var De=h(function(Xq){Object.defineProperty(Xq,"__esModule",{value:!0});Xq.checkStrictMode=Xq.getErrorPath=Xq.Type=Xq.useFunc=Xq.setEvaluated=Xq.evaluatedPropsToName=Xq.mergeEvaluated=Xq.eachItem=Xq.unescapeJsonPointer=Xq.escapeJsonPointer=Xq.escapeFragment=Xq.unescapeFragment=Xq.schemaRefOrVal=Xq.schemaHasRulesButRef=Xq.schemaHasRules=Xq.checkUnknownRules=Xq.alwaysValidSchema=Xq.toHash=void 0;var Ze=he(),E2e=Yu();function S2e(e){let t={};for(let r of e)t[r]=!0;return t}Xq.toHash=S2e;function $2e(e,t){if(typeof t=="boolean")return t;if(Object.keys(t).length===0)return!0;return Hq(e,t),!Wq(t,e.self.RULES.all)}Xq.alwaysValidSchema=$2e;function Hq(e,t=e.schema){let{opts:r,self:n}=e;if(!r.strictSchema)return;if(typeof t==="boolean")return;let i=n.RULES.keywords;for(let o in t)if(!i[o])Jq(e,`unknown keyword: "${o}"`)}Xq.checkUnknownRules=Hq;function Wq(e,t){if(typeof e=="boolean")return!e;for(let r in e)if(t[r])return!0;return!1}Xq.schemaHasRules=Wq;function C2e(e,t){if(typeof e=="boolean")return!e;for(let r in e)if(r!=="$ref"&&t.all[r])return!0;return!1}Xq.schemaHasRulesButRef=C2e;function R2e({topSchemaRef:e,schemaPath:t},r,n,i){if(!i){if(typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="string")return Ze._`${r}`}return Ze._`${e}${t}${Ze.getProperty(n)}`}Xq.schemaRefOrVal=R2e;function O2e(e){return Kq(decodeURIComponent(e))}Xq.unescapeFragment=O2e;function k2e(e){return encodeURIComponent($v(e))}Xq.escapeFragment=k2e;function $v(e){if(typeof e=="number")return`${e}`;return e.replace(/~/g,"~0").replace(/\//g,"~1")}Xq.escapeJsonPointer=$v;function Kq(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}Xq.unescapeJsonPointer=Kq;function A2e(e,t){if(Array.isArray(e))for(let r of e)t(r);else t(e)}Xq.eachItem=A2e;function Gq({mergeNames:e,mergeToName:t,mergeValues:r,resultToName:n}){return(i,o,s,a)=>{let c=s===void 0?o:s instanceof Ze.Name?(o instanceof Ze.Name?e(i,o,s):t(i,o,s),s):o instanceof Ze.Name?(t(i,s,o),o):r(o,s);return a===Ze.Name&&!(c instanceof Ze.Name)?n(i,c):c}}Xq.mergeEvaluated={props:Gq({mergeNames:(e,t,r)=>e.if(Ze._`${r} !== true && ${t} !== undefined`,()=>{e.if(Ze._`${t} === true`,()=>e.assign(r,!0),()=>e.assign(r,Ze._`${r} || {}`).code(Ze._`Object.assign(${r}, ${t})`))}),mergeToName:(e,t,r)=>e.if(Ze._`${r} !== true`,()=>{if(t===!0)e.assign(r,!0);else e.assign(r,Ze._`${r} || {}`),Cv(e,r,t)}),mergeValues:(e,t)=>e===!0?!0:{...e,...t},resultToName:Yq}),items:Gq({mergeNames:(e,t,r)=>e.if(Ze._`${r} !== true && ${t} !== undefined`,()=>e.assign(r,Ze._`${t} === true ? true : ${r} > ${t} ? ${r} : ${t}`)),mergeToName:(e,t,r)=>e.if(Ze._`${r} !== true`,()=>e.assign(r,t===!0?!0:Ze._`${r} > ${t} ? ${r} : ${t}`)),mergeValues:(e,t)=>e===!0?!0:Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})};function Yq(e,t){if(t===!0)return e.var("props",!0);let r=e.var("props",Ze._`{}`);if(t!==void 0)Cv(e,r,t);return r}Xq.evaluatedPropsToName=Yq;function Cv(e,t,r){Object.keys(r).forEach((n)=>e.assign(Ze._`${t}${Ze.getProperty(n)}`,!0))}Xq.setEvaluated=Cv;var zq={};function F2e(e,t){return e.scopeValue("func",{ref:t,code:zq[t.code]||(zq[t.code]=new E2e._Code(t.code))})}Xq.useFunc=F2e;var Sv;(function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"})(Sv||(Xq.Type=Sv={}));function P2e(e,t,r){if(e instanceof Ze.Name){let n=t===Sv.Num;return r?n?Ze._`"[" + ${e} + "]"`:Ze._`"['" + ${e} + "']"`:n?Ze._`"/" + ${e}`:Ze._`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?Ze.getProperty(e).toString():"/"+$v(e)}Xq.getErrorPath=P2e;function Jq(e,t,r=e.opts.strictSchema){if(!r)return;if(t=`strict mode: ${t}`,r===!0)throw Error(t);e.self.logger.warn(t)}Xq.checkStrictMode=Jq});var an=h(function(Zq){Object.defineProperty(Zq,"__esModule",{value:!0});var tr=he(),X2e={data:new tr.Name("data"),valCxt:new tr.Name("valCxt"),instancePath:new tr.Name("instancePath"),parentData:new tr.Name("parentData"),parentDataProperty:new tr.Name("parentDataProperty"),rootData:new tr.Name("rootData"),dynamicAnchors:new tr.Name("dynamicAnchors"),vErrors:new tr.Name("vErrors"),errors:new tr.Name("errors"),this:new tr.Name("this"),self:new tr.Name("self"),scope:new tr.Name("scope"),json:new tr.Name("json"),jsonPos:new tr.Name("jsonPos"),jsonLen:new tr.Name("jsonLen"),jsonPart:new tr.Name("jsonPart")};Zq.default=X2e});var Xu=h(function(n9){Object.defineProperty(n9,"__esModule",{value:!0});n9.extendErrors=n9.resetErrorsCount=n9.reportExtraError=n9.reportError=n9.keyword$DataError=n9.keywordError=void 0;var Ae=he(),nh=De(),fr=an();n9.keywordError={message:({keyword:e})=>Ae.str`must pass "${e}" keyword validation`};n9.keyword$DataError={message:({keyword:e,schemaType:t})=>t?Ae.str`"${e}" keyword must be ${t} ($data)`:Ae.str`"${e}" keyword is invalid ($data)`};function Z2e(e,t=n9.keywordError,r,n){let{it:i}=e,{gen:o,compositeRule:s,allErrors:a}=i,c=r9(e,t,r);if(n!==null&&n!==void 0?n:s||a)e9(o,c);else t9(i,Ae._`[${c}]`)}n9.reportError=Z2e;function eEe(e,t=n9.keywordError,r){let{it:n}=e,{gen:i,compositeRule:o,allErrors:s}=n,a=r9(e,t,r);if(e9(i,a),!(o||s))t9(n,fr.default.vErrors)}n9.reportExtraError=eEe;function tEe(e,t){e.assign(fr.default.errors,t),e.if(Ae._`${fr.default.vErrors} !== null`,()=>e.if(t,()=>e.assign(Ae._`${fr.default.vErrors}.length`,t),()=>e.assign(fr.default.vErrors,null)))}n9.resetErrorsCount=tEe;function rEe({gen:e,keyword:t,schemaValue:r,data:n,errsCount:i,it:o}){if(i===void 0)throw Error("ajv implementation error");let s=e.name("err");e.forRange("i",i,fr.default.errors,(a)=>{if(e.const(s,Ae._`${fr.default.vErrors}[${a}]`),e.if(Ae._`${s}.instancePath === undefined`,()=>e.assign(Ae._`${s}.instancePath`,Ae.strConcat(fr.default.instancePath,o.errorPath))),e.assign(Ae._`${s}.schemaPath`,Ae.str`${o.errSchemaPath}/${t}`),o.opts.verbose)e.assign(Ae._`${s}.schema`,r),e.assign(Ae._`${s}.data`,n)})}n9.extendErrors=rEe;function e9(e,t){let r=e.const("err",t);e.if(Ae._`${fr.default.vErrors} === null`,()=>e.assign(fr.default.vErrors,Ae._`[${r}]`),Ae._`${fr.default.vErrors}.push(${r})`),e.code(Ae._`${fr.default.errors}++`)}function t9(e,t){let{gen:r,validateName:n,schemaEnv:i}=e;if(i.$async)r.throw(Ae._`new ${e.ValidationError}(${t})`);else r.assign(Ae._`${n}.errors`,t),r.return(!1)}var Ls={keyword:new Ae.Name("keyword"),schemaPath:new Ae.Name("schemaPath"),params:new Ae.Name("params"),propertyName:new Ae.Name("propertyName"),message:new Ae.Name("message"),schema:new Ae.Name("schema"),parentSchema:new Ae.Name("parentSchema")};function r9(e,t,r){let{createErrors:n}=e.it;if(n===!1)return Ae._`{}`;return nEe(e,t,r)}function nEe(e,t,r={}){let{gen:n,it:i}=e,o=[iEe(i,r),oEe(e,r)];return sEe(e,t,o),n.object(...o)}function iEe({errorPath:e},{instancePath:t}){let r=t?Ae.str`${e}${nh.getErrorPath(t,nh.Type.Str)}`:e;return[fr.default.instancePath,Ae.strConcat(fr.default.instancePath,r)]}function oEe({keyword:e,it:{errSchemaPath:t}},{schemaPath:r,parentSchema:n}){let i=n?t:Ae.str`${t}/${e}`;if(r)i=Ae.str`${i}${nh.getErrorPath(r,nh.Type.Str)}`;return[Ls.schemaPath,i]}function sEe(e,{params:t,message:r},n){let{keyword:i,data:o,schemaValue:s,it:a}=e,{opts:c,propertyName:u,topSchemaRef:d,schemaPath:f}=a;if(n.push([Ls.keyword,i],[Ls.params,typeof t=="function"?t(e):t||Ae._`{}`]),c.messages)n.push([Ls.message,typeof r=="function"?r(e):r]);if(c.verbose)n.push([Ls.schema,s],[Ls.parentSchema,Ae._`${d}${f}`],[fr.default.data,o]);if(u)n.push([Ls.propertyName,u])}});var c9=h(function(s9){Object.defineProperty(s9,"__esModule",{value:!0});s9.boolOrEmptySchema=s9.topBoolOrEmptySchema=void 0;var dEe=Xu(),fEe=he(),pEe=an(),mEe={message:"boolean schema is false"};function hEe(e){let{gen:t,schema:r,validateName:n}=e;if(r===!1)o9(e,!1);else if(typeof r=="object"&&r.$async===!0)t.return(pEe.default.data);else t.assign(fEe._`${n}.errors`,null),t.return(!0)}s9.topBoolOrEmptySchema=hEe;function gEe(e,t){let{gen:r,schema:n}=e;if(n===!1)r.var(t,!1),o9(e);else r.var(t,!0)}s9.boolOrEmptySchema=gEe;function o9(e,t){let{gen:r,data:n}=e;dEe.reportError({gen:r,keyword:"false schema",data:n,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e},mEe,void 0,t)}});var Ov=h(function(l9){Object.defineProperty(l9,"__esModule",{value:!0});l9.getRules=l9.isJSONType=void 0;var xEe=["string","number","integer","boolean","null","object","array"],bEe=new Set(xEe);function _Ee(e){return typeof e=="string"&&bEe.has(e)}l9.isJSONType=_Ee;function vEe(){let e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}l9.getRules=vEe});var kv=h(function(p9){Object.defineProperty(p9,"__esModule",{value:!0});p9.shouldUseRule=p9.shouldUseGroup=p9.schemaHasRulesForType=void 0;function DEe({schema:e,self:t},r){let n=t.RULES.types[r];return n&&n!==!0&&d9(e,n)}p9.schemaHasRulesForType=DEe;function d9(e,t){return t.rules.some((r)=>f9(e,r))}p9.shouldUseGroup=d9;function f9(e,t){var r;return e[t.keyword]!==void 0||((r=t.definition.implements)===null||r===void 0?void 0:r.some((n)=>e[n]!==void 0))}p9.shouldUseRule=f9});var Qu=h(function(x9){Object.defineProperty(x9,"__esModule",{value:!0});x9.reportTypeError=x9.checkDataTypes=x9.checkDataType=x9.coerceAndCheckDataType=x9.getJSONTypes=x9.getSchemaTypes=x9.DataType=void 0;var $Ee=Ov(),CEe=kv(),REe=Xu(),ye=he(),h9=De(),Fc;(function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"})(Fc||(x9.DataType=Fc={}));function OEe(e){let t=g9(e.type);if(t.includes("null")){if(e.nullable===!1)throw Error("type: null contradicts nullable: false")}else{if(!t.length&&e.nullable!==void 0)throw Error('"nullable" cannot be used without "type"');if(e.nullable===!0)t.push("null")}return t}x9.getSchemaTypes=OEe;function g9(e){let t=Array.isArray(e)?e:e?[e]:[];if(t.every($Ee.isJSONType))return t;throw Error("type must be JSONType or JSONType[]: "+t.join(","))}x9.getJSONTypes=g9;function kEe(e,t){let{gen:r,data:n,opts:i}=e,o=AEe(t,i.coerceTypes),s=t.length>0&&!(o.length===0&&t.length===1&&CEe.schemaHasRulesForType(e,t[0]));if(s){let a=Fv(t,n,i.strictNumbers,Fc.Wrong);r.if(a,()=>{if(o.length)FEe(e,t,o);else Pv(e)})}return s}x9.coerceAndCheckDataType=kEe;var y9=new Set(["string","number","integer","boolean","null"]);function AEe(e,t){return t?e.filter((r)=>y9.has(r)||t==="array"&&r==="array"):[]}function FEe(e,t,r){let{gen:n,data:i,opts:o}=e,s=n.let("dataType",ye._`typeof ${i}`),a=n.let("coerced",ye._`undefined`);if(o.coerceTypes==="array")n.if(ye._`${s} == 'object' && Array.isArray(${i}) && ${i}.length == 1`,()=>n.assign(i,ye._`${i}[0]`).assign(s,ye._`typeof ${i}`).if(Fv(t,i,o.strictNumbers),()=>n.assign(a,i)));n.if(ye._`${a} !== undefined`);for(let u of r)if(y9.has(u)||u==="array"&&o.coerceTypes==="array")c(u);n.else(),Pv(e),n.endIf(),n.if(ye._`${a} !== undefined`,()=>{n.assign(i,a),PEe(e,a)});function c(u){switch(u){case"string":n.elseIf(ye._`${s} == "number" || ${s} == "boolean"`).assign(a,ye._`"" + ${i}`).elseIf(ye._`${i} === null`).assign(a,ye._`""`);return;case"number":n.elseIf(ye._`${s} == "boolean" || ${i} === null
|
|
86
86
|
|| (${s} == "string" && ${i} && ${i} == +${i})`).assign(a,ye._`+${i}`);return;case"integer":n.elseIf(ye._`${s} === "boolean" || ${i} === null
|
|
87
87
|
|| (${s} === "string" && ${i} && ${i} == +${i} && !(${i} % 1))`).assign(a,ye._`+${i}`);return;case"boolean":n.elseIf(ye._`${i} === "false" || ${i} === 0 || ${i} === null`).assign(a,!1).elseIf(ye._`${i} === "true" || ${i} === 1`).assign(a,!0);return;case"null":n.elseIf(ye._`${i} === "" || ${i} === 0 || ${i} === false`),n.assign(a,null);return;case"array":n.elseIf(ye._`${s} === "string" || ${s} === "number"
|
|
@@ -101,7 +101,7 @@ ${t}`,Ewe,Swe,$we=(e,t,r)=>{let n=r===""?"":`with ${r.trim()}() `,i=Dwe.bind(nul
|
|
|
101
101
|
`)}var kw=!1;var{spawn:Nqe}=globalThis.Bun;async function R(e,t={}){let r={...process.env,GIT_TERMINAL_PROMPT:"0",...t.env};for(let u of t.unsetEnv??[])delete r[u];let n=Nqe({cmd:e,cwd:t.cwd,stdout:"pipe",stderr:"pipe",env:r}),i=!1,o;if(t.timeout)o=setTimeout(()=>{i=!0,n.kill()},t.timeout);if(Aw()){let u=t.cwd?` (cwd=${t.cwd})`:"";Qd(l.dim(`$ ${e.join(" ")}${u}`))}let s=await new Response(n.stdout).text(),a=await new Response(n.stderr).text(),c=await n.exited;if(o)clearTimeout(o);if(Aw()){if(s.trim())Qd(l.dim(s.trimEnd()));if(a.trim())Qd(l.yellow(a.trimEnd()));Qd(l.dim(`(exit ${c})`))}if(i)return{stdout:s,stderr:a||`Command timed out after ${Math.round(t.timeout/1000)}s`,exitCode:c??1,timedOut:!0};return{stdout:s,stderr:a,exitCode:c,timedOut:!1}}var or=O(()=>{Ke()});function jqe(){if(process.platform==="darwin")return"macos";if(process.platform==="win32")return"windows";return"linux"}function KH(e,t=jqe()){return e.installInstructions[t]}function Mqe(e){let t=e.match(/(\d+\.\d+(?:\.\d+)?)/);return t?t[1]:void 0}function Lqe(){let e=Number(process.env.TEST_PROBE_TIMEOUT_MS);return Number.isFinite(e)&&e>0?e:Bqe}async function YH(e){try{let{exitCode:t,stdout:r,timedOut:n}=await R(e.cmd,{timeout:Lqe()});if(n)return{available:!1,timedOut:!0};if(t!==0)return{available:!1};return{available:!0,version:Mqe(r)}}catch(t){let r=t instanceof Error?t.message:String(t);if(!r.includes("ENOENT")&&!r.includes("not found"))console.error(` Warning: ${e.name} check failed unexpectedly: ${r}`);return{available:!1}}}async function Zd(){let e=Object.entries(WH);return Promise.all(e.map(async([t,r])=>{let{available:n,version:i,timedOut:o}=await YH(r);return{key:t,name:r.name,purpose:r.purpose,required:r.required,available:n,version:i,timedOut:o,installInstruction:KH(r)}}))}async function JH(){let t=(await Zd()).filter((r)=>r.required&&!r.available);if(t.length===0)return[];console.warn(`
|
|
102
102
|
Heads up: some tools NEMAR needs for uploading/validating aren't installed yet:`);for(let r of t)console.warn(` - ${r.name} (${r.purpose})`),console.warn(` Install: ${r.installInstruction}`);return console.warn("Run `nemar doctor` anytime to re-check. You can finish signup without them.\n"),t}async function ia(e){let r=qqe[e].map((s)=>WH[s]).filter(Boolean),n=await Promise.all(r.map(async(s)=>{let a=await YH(s);return{check:s,available:a.available,timedOut:a.timedOut}}));for(let s of n)if(s.timedOut&&s.check.required)console.warn(`Warning: ${s.check.name} did not respond to a version check in time; continuing anyway.`);let i=n.filter((s)=>!s.available&&!s.timedOut&&s.check.required).map((s)=>({tool:s.check.name,installInstruction:KH(s.check)}));if(i.length===0)return;let o=[`
|
|
103
103
|
Missing required tools:`];for(let s of i)o.push(` ${s.tool} not installed`),o.push(` Install: ${s.installInstruction}`);throw Error(o.join(`
|
|
104
|
-
`))}var WH,qqe,Bqe=4000;var ef=O(()=>{or();WH={git:{name:"git",purpose:"version control for dataset metadata",cmd:["git","--version"],required:!0,installInstructions:{macos:"brew install git (or install Xcode Command Line Tools)",linux:"sudo apt-get install git OR sudo dnf install git",windows:"winget install Git.Git (or https://git-scm.com/download/win)"}},"git-annex":{name:"git-annex",purpose:"large-file data transfer (upload/download)",cmd:["git-annex","version"],required:!0,installInstructions:{macos:"brew install git-annex",linux:"sudo apt-get install git-annex OR sudo dnf install git-annex",windows:"Download the installer from https://git-annex.branchable.com/install/Windows/"}},gh:{name:"GitHub CLI (gh)",purpose:"GitHub authentication + repository operations",cmd:["gh","--version"],required:!0,installInstructions:{macos:"brew install gh",linux:"See https://cli.github.com/manual/installation",windows:"winget install GitHub.cli (or: scoop install gh)"}},aws:{name:"AWS CLI",purpose:"S3 data upload/download",cmd:["aws","--version"],required:!0,installInstructions:{macos:"brew install awscli",linux:"pip install awscli OR sudo snap install aws-cli --classic",windows:"winget install Amazon.AWSCLI (or the MSI from https://aws.amazon.com/cli/)"}},deno:{name:"Deno",purpose:"BIDS validation",cmd:["deno","--version"],required:!0,installInstructions:{macos:"brew install deno (or: curl -fsSL https://deno.land/install.sh | sh)",linux:"curl -fsSL https://deno.land/install.sh | sh",windows:"winget install DenoLand.Deno (or: irm https://deno.land/install.ps1 | iex)"}}},qqe={upload:["git-annex","gh","aws","deno"],download:["gh"],clone:["git","gh"],push:["git-annex","gh"],publish:["gh","aws"],update:["git","gh"],release:["git","gh"]}});var QH;var XH=O(()=>{QH={name:"nemar-cli",version:"0.9.16-PR1270.
|
|
104
|
+
`))}var WH,qqe,Bqe=4000;var ef=O(()=>{or();WH={git:{name:"git",purpose:"version control for dataset metadata",cmd:["git","--version"],required:!0,installInstructions:{macos:"brew install git (or install Xcode Command Line Tools)",linux:"sudo apt-get install git OR sudo dnf install git",windows:"winget install Git.Git (or https://git-scm.com/download/win)"}},"git-annex":{name:"git-annex",purpose:"large-file data transfer (upload/download)",cmd:["git-annex","version"],required:!0,installInstructions:{macos:"brew install git-annex",linux:"sudo apt-get install git-annex OR sudo dnf install git-annex",windows:"Download the installer from https://git-annex.branchable.com/install/Windows/"}},gh:{name:"GitHub CLI (gh)",purpose:"GitHub authentication + repository operations",cmd:["gh","--version"],required:!0,installInstructions:{macos:"brew install gh",linux:"See https://cli.github.com/manual/installation",windows:"winget install GitHub.cli (or: scoop install gh)"}},aws:{name:"AWS CLI",purpose:"S3 data upload/download",cmd:["aws","--version"],required:!0,installInstructions:{macos:"brew install awscli",linux:"pip install awscli OR sudo snap install aws-cli --classic",windows:"winget install Amazon.AWSCLI (or the MSI from https://aws.amazon.com/cli/)"}},deno:{name:"Deno",purpose:"BIDS validation",cmd:["deno","--version"],required:!0,installInstructions:{macos:"brew install deno (or: curl -fsSL https://deno.land/install.sh | sh)",linux:"curl -fsSL https://deno.land/install.sh | sh",windows:"winget install DenoLand.Deno (or: irm https://deno.land/install.ps1 | iex)"}}},qqe={upload:["git-annex","gh","aws","deno"],download:["gh"],clone:["git","gh"],push:["git-annex","gh"],publish:["gh","aws"],update:["git","gh"],release:["git","gh"]}});var QH;var XH=O(()=>{QH={name:"nemar-cli",version:"0.9.16-PR1270.c5dddae",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/","migrations:d1-check":"bun run scripts/d1-migration-check.ts","lint:fix":"biome check --fix src/",format:"biome format --write src/",typecheck:"tsc --noEmit && tsc --noEmit -p backend","generate-openapi":"bun run scripts/generate-openapi.ts",prepublishOnly:"bun run build",prepare:"husky",postinstall:"bun scripts/postinstall-check.mjs",deploy:"wrangler deploy",preview:"wrangler dev"},keywords:["nemar","bids","neuroimaging","eeg","emg","datalad","cli"],author:"NEMAR Team",license:"CC-BY-NC-ND-4.0",repository:{type:"git",url:"git+https://github.com/nemarOrg/nemar-cli.git"},bugs:{url:"https://github.com/nemarOrg/nemar-cli/issues"},homepage:"https://docs.nemar.org",engines:{bun:">=1.0.0"},files:["dist","scripts/postinstall-check.mjs","scripts/recover-datasets.json","scripts/withdrawn-datasets.json","README.md","LICENSE"],dependencies:{chalk:"^5.3.0",commander:"^12.1.0",conf:"^13.0.1",inquirer:"^9.2.15",ora:"^8.0.1",semver:"^7.8.5",zod:"^3.23.8"},"lint-staged":{"src/**/*.{ts,tsx}":["biome check --fix"],"backend/src/**/*.{ts,tsx}":["biome check --fix"]},devDependencies:{"@asteasolutions/zod-to-openapi":"^7.3.4","@biomejs/biome":"1.9.4","@types/bun":"latest","@types/inquirer":"^9.0.7","@types/semver":"^7.8.0",ajv:"^8.20.0","ajv-formats":"^3.0.1",bcryptjs:"^3.0.3",husky:"^9.1.7","lint-staged":"^16.3.2",typescript:"^5.5.4",wrangler:"^4.70.0",yaml:"^2.8.4"}}});var io;var tf=O(()=>{XH();io=QH.version});import{mkdirSync as Vqe,readdirSync as Gqe,unlinkSync as zqe,writeFileSync as Hqe}from"fs";import{join as Fw}from"path";function nW(){Zc=!0}function oa(){return Zc}function iW(e,t=process.env){return e.includes("--debug")||t.NEMAR_DEBUG==="1"}function nf(e){rW=e,Ln(`Step: ${e}`)}function oW(){tW=!0}function sW(){return tW}function Ln(e){if(Zc)process.stderr.write(`[debug] ${e}
|
|
105
105
|
`)}function Jqe(e){let t={};for(let[r,n]of Object.entries(e))t[r]=Yqe.has(r.toLowerCase())?"[REDACTED]":n;return t}function cW(e){let t=e.indexOf("@");if(t<=0)return"***";return`${e[0]}***${e.slice(t)}`}function Pw(e,t,r=0){if(r>Qqe)return"[REDACTED: depth]";if(Array.isArray(t))return t.map((n)=>Pw(e,n,r+1));if(t&&typeof t==="object"){let n={};for(let[i,o]of Object.entries(t))n[i]=Pw(i,o,r+1);return n}if(typeof t==="string"){if(Xqe.test(e))return"[REDACTED]";return t.replace(aW,cW)}return t}function Iw(e){return e.replace(Zqe,"Bearer [REDACTED]").replace(e9e,"[REDACTED_AWS_KEY]").replace(t9e,"$1[REDACTED]").replace(r9e,"$1$2=[REDACTED]").replace(aW,cW)}function n9e(e){return Iw(e)}function ZH(e,t=Kqe){if(e===void 0)return;let r=e;try{let n=JSON.parse(e);r=JSON.stringify(Pw("",n))}catch{}if(r=Iw(r),Buffer.byteLength(r,"utf8")>t)r=`${Buffer.from(r,"utf8").subarray(0,t).toString("utf8")}... [truncated]`;return r}function R0(e){if(!Zc)return;let t=n9e(e.url);try{let r={...e,url:t,requestHeaders:e.requestHeaders?Jqe(e.requestHeaders):void 0,requestBody:ZH(e.requestBody),responseBody:ZH(e.responseBody)};C0.push(r),Ln(`${e.method} ${t} -> ${e.status??"ERROR"} (${e.durationMs}ms)`)}catch(r){let n=T(r);C0.push({method:e.method,url:t,status:e.status,durationMs:e.durationMs,note:`redaction failed: ${n}`}),Ln(`redaction failed for ${e.method} ${t}: ${n}`)}}async function i9e(){let e=[];try{let t=process.versions.bun?`Bun ${process.versions.bun}`:`Node ${process.version}`;e.push(`CLI version: ${io}`),e.push(`OS/Arch: ${process.platform}/${process.arch}`),e.push(`Runtime: ${t}`)}catch(t){e.push(`(could not read CLI/OS/runtime info: ${T(t)})`)}e.push(""),e.push("Active account:");try{let t=at();if(t.apiKey){if(t.username)e.push(` Username: ${t.username}`);if(e.push(` API URL: ${t.apiUrl}`),t.role)e.push(` Role: ${t.role}`);e.push(` Sandbox completed: ${!!t.sandboxCompleted}`)}else e.push(" (not authenticated)")}catch(t){e.push(` (could not read account config: ${T(t)})`)}e.push(""),e.push("External tools:");try{let t=await Zd();for(let r of t){let n=r.available?r.version??"installed":r.timedOut?"(timed out)":"not installed";e.push(` ${r.name}: ${n}`)}}catch(t){e.push(` (could not probe external tools: ${T(t)})`)}return e}async function Tw(){return(await i9e()).join(`
|
|
106
106
|
`)}async function lW(){if(!Zc||$0!==void 0)return;try{$0=await Tw()}catch(e){let t=T(e);$0=`(could not build environment report: ${t})`,Ln(`environment snapshot failed: ${t}`)}}function uW(e){if(eW.has(e))return{flag:e};for(let t of eW){if(!e.startsWith(t)||e.length<=t.length)continue;if(t.length===2)return{flag:t,kind:"short-attached"};if(e[t.length]==="=")return{flag:t,kind:"long-eq"}}return null}function o9e(e){let t=[];for(let r=0;r<e.length;r++){let n=e[r],i=uW(n);if(!i){t.push(n);continue}if(i.kind==="long-eq")t.push(`${i.flag}=[REDACTED]`);else if(i.kind==="short-attached")t.push(`${i.flag}[REDACTED]`);else if(t.push(n),r+1<e.length)t.push("[REDACTED]"),r++}return t}function s9e(e){let t=[];for(let r=0;r<e.length;r++){let n=e[r],i=uW(n);if(!i){t.push(n);continue}if(!i.kind&&r+1<e.length)r++}return t}function a9e(e){let t=[];for(let n of s9e(e)){if(n.startsWith("-"))continue;if(t.push(n),t.length===2)break}return(t.length>0?t.join("-"):"nemar").replace(/[^a-zA-Z0-9_-]/g,"_")}function c9e(e,t){let r=[];if(r.push("NEMAR CLI Debug Log"),r.push(`Generated: ${new Date().toISOString()}`),r.push(`Command: nemar ${Iw(o9e(e).join(" "))}`),r.push(""),r.push($0??"(environment snapshot unavailable)"),r.push(""),r.push("HTTP requests:"),C0.length===0)r.push(" (none)");else C0.forEach((n,i)=>{if(r.push(` [${i+1}] ${n.method} ${n.url} -> ${n.status??"ERROR"} (${n.durationMs}ms)`),n.error)r.push(` Error: ${n.error}`);if(n.note)r.push(` Note: ${n.note}`);if(n.requestHeaders)r.push(` Request headers: ${JSON.stringify(n.requestHeaders)}`);if(n.requestBody)r.push(` Request body: ${n.requestBody}`);if(n.responseBody)r.push(` Response body: ${n.responseBody}`)});return r.push(""),r.push(`Failing step: ${rW??"(none recorded)"}`),r.push(`Exit code: ${t}`),`${r.join(`
|
|
107
107
|
`)}
|
|
@@ -474,7 +474,7 @@ Exemplar Fleet (${n.length})
|
|
|
474
474
|
${i} finding(s). Preview the remediation with: nemar admin doctor fix <check> --dry-run`))}catch(n){r.fail("Doctor scan failed"),console.error(l.red(T(n))),process.exit(1)}});QD.command("fix").description("Apply a check's remediation (writes; use --dry-run first)").argument("<check>","Check name (see: nemar admin doctor scan)").argument("[dataset-id]","Narrow to one dataset").option("--dry-run","List what would be fixed without writing").option("--json","Output raw JSON instead of the human summary").action(async(e,t,r)=>{if(!te())return;if(r.dryRun){let c=w(`Listing ${e} findings (dry run)...`).start();try{let u=await Ww({check:e,datasetId:t,dryRun:!0});if(c.stop(),r.json){console.log(JSON.stringify(u,null,2));return}console.log(`Would fix ${u.would_fix} finding(s) for ${l.bold(e)}:`);for(let d of u.findings)console.log(` ${d.dataset_id}${d.version?`@v${d.version}`:""}`)}catch(u){c.fail("Dry run failed"),console.error(l.red(T(u))),process.exit(1)}return}let n=w(`Scanning for ${e} findings...`).start(),i;try{i=(await Hw({check:e,datasetId:t})).results[e]?.findings??[]}catch(c){n.fail("Doctor scan failed"),console.error(l.red(T(c))),process.exit(1);return}if(i.length===0){if(n.succeed(`${e}: nothing to fix`),r.json)console.log(JSON.stringify({check:e,total:0,results:[]},null,2));return}n.stop(),console.log(`${l.bold(e)}: ${i.length} finding(s) to fix`);let o=[...new Set(i.map((c)=>c.dataset_id))];n.start();let{totals:s,results:a}=await ILe(o,(c,u)=>{let d=i.filter((f)=>f.dataset_id===c&&f.version).map((f)=>`v${f.version}`).join(", ");return n.text=`Fixing ${c}${d?` (${d})`:""} [${u+1}/${o.length}]...`,Ww({check:e,datasetId:c})},{onDataset:(c,u)=>{if(n.stop(),u.length===0)console.log(` resolved ${c}: healed between the scan and its fix turn`);for(let d of u){let f=`${d.dataset_id}${d.version?`@v${d.version}`:""}`;if(d.status==="fixed")console.log(` ${l.green("fixed")} ${f}`);else if(d.status==="skipped")console.log(` skipped ${f}: ${d.message??"already healthy"}`);else console.log(` ${l.red("FAILED")} ${f}: ${d.message??"unknown error"}`)}n.start()}});if(n.stop(),r.json)console.log(JSON.stringify({check:e,total:i.length,...s,results:a},null,2));else{let c=s.resolved>0?`, ${s.resolved} already resolved`:"";console.log(`
|
|
475
475
|
${l.bold(e)}: ${l.green(`${s.fixed} fixed`)}, ${s.skipped} skipped, ${s.failed>0?l.red(`${s.failed} failed`):"0 failed"}${c}`)}if(s.failed>0)process.exit(1)});async function ILe(e,t,r){let n={fixed:0,skipped:0,failed:0,resolved:0},i=[];for(let[o,s]of e.entries()){let a;try{let c=await t(s,o);if(a=c.results,a.length===0)n.resolved++;else n.fixed+=c.fixed,n.skipped+=c.skipped,n.failed+=c.failed}catch(c){n.failed++,a=[{dataset_id:s,status:"failed",message:T(c)}]}i.push(...a),r?.onDataset?.(s,a)}return{totals:n,results:i}}_e.addCommand(QD);var ZD=new le("email-preferences").description("Manage email notification preferences");ZD.command("show").description("Show email notification preferences").option("--user <username>","(owner only) show another user's preferences").action(async(e)=>{if(!Me())console.error(l.red("Not authenticated. Run: nemar auth login")),process.exit(1);let t=w("Fetching email preferences...").start();try{let r=await YW(e.user),n=r.username?`${r.username}'s`:"Your";t.succeed(`${n} email notification preferences:`),console.log();let i=[{key:"user_approval",label:"User approval notifications"},{key:"publication_request",label:"Publication request notifications"},{key:"announcements",label:"Announcement emails"}];for(let o of i){let a=r[o.key]?l.green("enabled"):l.dim("disabled");console.log(` ${o.label.padEnd(40)} ${a}`)}console.log(),console.log(l.dim(" Use 'nemar admin email-preferences update' to change settings."))}catch(r){t.fail("Failed to fetch preferences"),console.error(l.red(T(r)))}});ZD.command("update").description("Update email notification preferences").option("--user-approval <bool>","Enable/disable user approval notifications").option("--publication-request <bool>","Enable/disable publication request notifications").option("--announcements <bool>","Enable/disable announcement emails").option("--all <bool>","Enable/disable all notifications").option("--user <username>","(owner only) update another user's preferences").action(async(e)=>{if(!Me())console.error(l.red("Not authenticated. Run: nemar auth login")),process.exit(1);function t(i){if(i===void 0)return;let o=i.toLowerCase();if(o==="true"||o==="1"||o==="on"||o==="yes")return!0;if(o==="false"||o==="0"||o==="off"||o==="no")return!1;console.error(l.red(`Invalid boolean value: "${i}". Use true/false, on/off, yes/no.`)),process.exit(1)}let r={};if(e.all!==void 0){let i=t(e.all);r.user_approval=i,r.publication_request=i,r.announcements=i}else{let i=t(e.userApproval),o=t(e.publicationRequest),s=t(e.announcements);if(i===void 0&&o===void 0&&s===void 0)console.error(l.red("No preferences specified.")),console.log(" --user-approval <bool> User approval notifications"),console.log(" --publication-request <bool> Publication request notifications"),console.log(" --announcements <bool> Announcement emails"),console.log(" --all <bool> All notifications"),process.exit(1);if(i!==void 0)r.user_approval=i;if(o!==void 0)r.publication_request=o;if(s!==void 0)r.announcements=s}let n=w("Updating email preferences...").start();try{let i=await JW(r,e.user),o=i.username?`${i.username}'s`:"Your";n.succeed(`${o} email preferences updated:`),console.log(),console.log(` User approval: ${i.user_approval?l.green("enabled"):l.dim("disabled")}`),console.log(` Publication request: ${i.publication_request?l.green("enabled"):l.dim("disabled")}`),console.log(` Announcements: ${i.announcements?l.green("enabled"):l.dim("disabled")}`)}catch(i){n.fail("Failed to update preferences"),console.error(l.red(T(i)))}});_e.addCommand(ZD);var Eg=new le("notice").description("Manage system notices displayed to CLI users");Eg.command("list").description("List all notices (including expired)").action(async()=>{if(!Me())console.error(l.red("Not authenticated. Run: nemar auth login")),process.exit(1);let e=w("Fetching notices...").start();try{let{notices:t}=await _K();if(t.length===0){e.succeed("No notices found.");return}e.succeed(`${t.length} notice(s):`),console.log();for(let r of t){let i={critical:l.red.bold,warning:l.yellow,maintenance:l.magenta,announcement:l.green,tip:l.blue,info:l.blue}[r.level]||l.white,o=r.expires_at&&new Date(r.expires_at)<new Date?l.dim(" (expired)"):"";if(console.log(` ${l.dim(`#${r.id}`)} ${i(`[${r.level.toUpperCase()}]`)} ${l.dim(`scope:${r.scope}`)}${o}`),console.log(` ${r.message}`),console.log(` ${l.dim(`Created: ${r.created_at}`)}`),r.expires_at)console.log(` ${l.dim(`Expires: ${r.expires_at}`)}`);console.log()}}catch(t){nt(t,e,"Failed to fetch notices")}});Eg.command("set").description("Create a new system notice").requiredOption("-m, --message <text>","Notice message text").option("-l, --level <level>","Notice level: tip, announcement, maintenance, warning, critical","tip").option("-s, --scope <scope>","Target scope: all, admins, members","all").option("-e, --expires <datetime>","Expiry datetime (ISO 8601)").action(async(e)=>{if(!Me())console.error(l.red("Not authenticated. Run: nemar auth login")),process.exit(1);if(![...Jw,"info"].includes(e.level))console.error(l.red(`Invalid level: ${e.level}. Use ${Jw.join(", ")}.`)),process.exit(1);if(!["all","admins","members"].includes(e.scope))console.error(l.red(`Invalid scope: ${e.scope}. Use all, admins, or members.`)),process.exit(1);let t=w("Creating notice...").start();try{let r=await vK({message:e.message,level:e.level,scope:e.scope,expires_at:e.expires});if(t.succeed(`Notice created (ID: ${r.id})`),console.log(` Level: ${r.level}`),console.log(` Scope: ${r.scope}`),console.log(` Message: ${r.message}`),r.expires_at)console.log(` Expires: ${r.expires_at}`)}catch(r){nt(r,t,"Failed to create notice")}});Eg.command("clear <id>").description("Delete a notice by ID").option(Pe,Ie).option(Ve,Be).action(async(e,t)=>{if(!Me())console.error(l.red("Not authenticated. Run: nemar auth login")),process.exit(1);let r=Number.parseInt(e,10);if(Number.isNaN(r))console.error(l.red("Invalid notice ID")),process.exit(1);if(!await Oe(`Delete notice #${r}?`,t,!1))return;let i=w("Deleting notice...").start();try{await wK(r),i.succeed(`Notice #${r} deleted`)}catch(o){nt(o,i,"Failed to delete notice")}});_e.addCommand(Eg);_e.command("notify").description("Send an email to a group or a single user").option("--to <group>","Recipient group: all, admins, members").option("--user <username>","Send to a single user by username").requiredOption("--subject <text>","Email subject line").option("--body <text>","Email body (markdown)").option("--body-file <path>","Read email body from file (markdown)").option("--dry-run","Preview recipients without sending").option(Pe,Ie).option(Ve,Be).action(async(e)=>{if(!Me())console.error(l.red("Not authenticated. Run: nemar auth login")),process.exit(1);if(e.to&&e.user)console.error(l.red("--to and --user are mutually exclusive. Provide exactly one.")),process.exit(1);if(!e.to&&!e.user)console.error(l.red("Provide either --to <group> or --user <username>.")),process.exit(1);if(e.to&&!["all","admins","members"].includes(e.to))console.error(l.red(`Invalid group: ${e.to}. Use all, admins, or members.`)),process.exit(1);let t;if(e.bodyFile){if(!_g(e.bodyFile))console.error(l.red(`File not found: ${e.bodyFile}`)),process.exit(1);t=DLe(e.bodyFile,"utf-8")}else if(e.body)t=e.body;else console.error(l.red("Email body required. Use --body or --body-file.")),process.exit(1);let r=e.user?`user:${e.user}`:e.to,n=e.user?{user:e.user,subject:e.subject,body:t}:{to:e.to,subject:e.subject,body:t};if(e.dryRun){let a=w("Checking recipients...").start();try{let c=await zw({...n,dry_run:!0});if("dry_run"in c){a.succeed(`Dry run: ${c.recipient_count} recipient(s) for "${c.recipient_group}"`),console.log();for(let u of c.recipients)console.log(` ${u}`)}}catch(c){nt(c,a,"Failed to check recipients")}return}console.log(l.bold("Email preview:")),console.log(` To: ${l.cyan(r)}`),console.log(` Subject: ${e.subject}`),console.log(` Body: ${t.length>100?`${t.substring(0,100)}...`:t}`),console.log();let i=e.user?`Send this email to ${e.user}?`:"Send this broadcast email?";if(!await Oe(i,e,!1))return;let s=w(e.user?`Sending to ${e.user}...`:"Sending broadcast...").start();try{let a=await zw(n);if("broadcast_id"in a)if(a.failure_count>0){s.warn(`Email send: ${a.recipient_count} delivered, ${a.failure_count} failed`);for(let c of a.failed_recipients)console.log(l.red(` Failed: ${c}`))}else{let c=e.user?`Email sent to ${e.user}`:`Broadcast sent to ${a.recipient_count} recipient(s)`;s.succeed(`${c} (ID: ${a.broadcast_id})`)}}catch(a){nt(a,s,"Failed to send email")}});var TLe=1500;function NLe(e){switch(e.kind){case"ok":return l.green(`ok ${e.schema_version}`);case"stale":return l.yellow(`stale ${e.schema_version}`);case"missing":return l.red("missing");case"error":return l.red(`error ${e.status||"?"}: ${e.message}`)}}function qLe(e){return e.kind==="stale"||e.kind==="missing"}function jLe(e){let r=e.replace(/[.+^${}()|[\]\\]/g,"\\$&").replace(/\*/g,".*").replace(/\?/g,".");return new RegExp(`^${r}$`)}var fQ=new le("summary").description("summary.json coverage across published dataset versions");fQ.command("check").description("Report which (dataset_id, version) pairs have stale or missing summary.json").option("--fix","Dispatch generate-manifest for every stale/missing version").option("--id <id>","Limit to a single dataset_id (exact match)").option("--match <glob>","Limit to dataset_ids matching a glob pattern: `*` matches any run of chars, `?` matches one char. Examples: `on*`, `nm00010?`, `*99999`. Can be combined with --id (id wins if both passed).").option("--only-stale","Print only rows that are not ok (suppresses ok rows)").option("--json","Emit the full report as JSON instead of a table").option(Pe,Ie).option(Ve,Be).action(async(e)=>{if(!te())return;let t=w("Building coverage report...").start(),r;try{r=await XW()}catch(m){nt(m,t,"Failed to fetch coverage report");return}t.succeed(`Coverage: target=schema ${r.target_schema}, versions=${r.totals.versions}`);let n=r.versions,i=null;if(e.id){if(n=n.filter((m)=>m.dataset_id===e.id),i=`dataset_id=${e.id}`,n.length===0){console.log(l.yellow(`No rows for ${i}`));return}}else if(e.match){let m=jLe(e.match);if(n=n.filter((p)=>m.test(p.dataset_id)),i=`--match ${e.match}`,n.length===0){console.log(l.yellow(`No rows match ${i}`));return}console.log(l.dim(`Scoped to ${n.length} version(s) matching ${e.match}`))}if(e.json){console.log(JSON.stringify(i?{...r,versions:n,totals:QX(n)}:r,null,2));return}let o=e.onlyStale?n.filter((m)=>m.state.kind!=="ok"):n;if(o.length===0)console.log(l.green("All versions at target schema \u2014 no drift."));else{let m=Math.max(...o.map((g)=>g.dataset_id.length),10),p=Math.max(...o.map((g)=>g.version.length),7);for(let g of o)console.log(` ${g.dataset_id.padEnd(m)} ${g.version.padEnd(p)} ${NLe(g.state)}`)}let s=i?QX(n):r.totals;if(console.log(),console.log(` Total: ${s.versions} ${l.green(`ok=${s.ok}`)} ${l.yellow(`stale=${s.stale}`)} ${l.red(`missing=${s.missing}`)} ${l.red(`error=${s.error}`)}`),!e.fix){if(s.stale+s.missing>0)console.log(l.dim(`
|
|
476
476
|
Run with --fix to dispatch generate-manifest for the ${s.stale+s.missing} drifted version(s).`));return}let a=n.filter((m)=>qLe(m.state));if(a.length===0){console.log(l.green(`
|
|
477
|
-
Nothing to dispatch.`));return}let c=i?` (scoped to ${i})`:"",u=await Oe(`Dispatch generate-manifest for ${a.length} version(s)${c}? Each dispatch queues a runner job on nemarDatasets/.github.`,e);if(u!=="confirmed"){console.log(l.dim(u==="declined"?"Skipped":"Cancelled"));return}let d=0,f=0;console.log();for(let[m,p]of a.entries()){let g=`${p.dataset_id}@${p.version}`,y=w(`[${m+1}/${a.length}] dispatching ${g}...`).start();try{await QW(p.dataset_id,p.version),y.succeed(`[${m+1}/${a.length}] dispatched ${g}`),d++}catch(x){y.fail(`[${m+1}/${a.length}] ${g}: ${T(x)}`),f++}if(m<a.length-1)await new Promise((x)=>setTimeout(x,TLe))}if(console.log(),console.log(f===0?l.green(`All ${d} dispatches succeeded.`):l.yellow(`${d} succeeded, ${f} failed.`)),console.log(l.dim("Workflow runs will appear on https://github.com/nemarDatasets/.github/actions. Re-run `nemar admin summary check` once they complete to verify drift cleared.")),f>0)process.exitCode=1});function QX(e){return{versions:e.length,ok:e.filter((t)=>t.state.kind==="ok").length,stale:e.filter((t)=>t.state.kind==="stale").length,missing:e.filter((t)=>t.state.kind==="missing").length,error:e.filter((t)=>t.state.kind==="error").length}}_e.addCommand(fQ);var pQ=new le("zarr-catalog").description("Top-level Zarr discovery catalog (zarr-catalog.json)");pQ.command("publish").description("Rebuild and republish zarr-catalog.json to this environment's bucket").action(async()=>{if(!te())return;let e=w("Publishing zarr-catalog.json...").start();try{let t=await ZW();e.succeed(`Published zarr-catalog.json: ${t.count} dataset(s), ${t.bytes} bytes`)}catch(t){nt(t,e,"Failed to publish zarr catalog"),process.exit(1)}});_e.addCommand(pQ);var mQ=new le("backfill-names").description("Fill missing researcher names from users' public ORCID records (dry run by default)");mQ.option("--apply","Write the names (without this flag, only report what would change)").option("--limit <n>","Users per batch (server clamps to [1,100])","25").option("--json","Output raw JSON instead of the human summary").action(async(e)=>{if(!te())return;let t=Number.parseInt(e.limit??"25",10)||25,r=e.apply===!0,n=w(r?"Backfilling names from ORCID...":"Checking ORCID for missing names...").start(),i;try{i=await tK({apply:r,limit:t}),n.stop()}catch(o){n.fail("Name backfill failed"),console.error(l.red(T(o))),process.exit(1);return}if(i.lookup_failed>0||i.remaining===null)process.exitCode=1;if(e.json){console.log(JSON.stringify(i,null,2));return}if(console.log(),!i.apply)console.log(l.yellow("DRY RUN \u2014 nothing was written. Re-run with --apply."));console.log(l.cyan(`scanned=${i.scanned} ${i.apply?"filled":"would_fill"}=${i.apply?i.filled:i.would_fill} no_public_name=${i.no_public_name} lookup_failed=${i.lookup_failed} remaining=${i.remaining??"unknown"}`));for(let o of i.results){let s=o.username??`id ${o.id} <${o.email}>`;if(o.outcome==="filled"||o.outcome==="would_fill"){let a=o.outcome==="filled"?l.green("filled "):l.cyan("would fill");console.log(` ${a} ${s}: ${o.given_name} ${o.family_name} (${o.orcid})`)}else if(o.outcome==="no_public_name")console.log(` ${l.yellow("no name ")} ${s}: ORCID ${o.orcid} does not publish a full name`);else console.log(` ${l.red("error ")} ${s}: ${o.error}`)}if(i.warning)console.log(l.yellow(` Warning: ${i.warning}`));if(i.no_public_name>0)console.log(),console.log(l.dim("These accounts must make their name public on their ORCID record and sign in again; NEMAR cannot type a name in for an ORCID-linked account, because the record is re-read on every sign-in and would overwrite it. An account with no verified ORCID can set its name in Settings (ADR 0042)."))});_e.addCommand(mQ);var hQ=new le("backfill-usernames").description("Give username-less accounts a username from their name (dry run by default)");hQ.option("--apply","Write the usernames and send verification messages").option("--limit <n>","Users per batch (server clamps to [1,100])","25").option("--json","Output raw JSON instead of the human summary").action(async(e)=>{if(!te())return;let t=Number.parseInt(e.limit??"25",10)||25,r=e.apply===!0,n=w(r?"Assigning usernames...":"Checking which accounts need a username...").start(),i;try{i=await rK({apply:r,limit:t}),n.stop()}catch(o){n.fail("Username backfill failed"),console.error(l.red(T(o))),process.exit(1);return}if(i.lookup_failed>0||i.conflict>0||(i.exhausted??0)>0||(i.verify_failed??0)>0||(i.verify_rate_limited??0)>0||i.remaining===null)process.exitCode=1;if(e.json){console.log(JSON.stringify(i,null,2));return}if(console.log(),!i.apply)console.log(l.yellow("DRY RUN \u2014 nothing was written. Re-run with --apply."));console.log(l.cyan(`scanned=${i.scanned} ${i.apply?"assigned":"would_assign"}=${i.apply?i.assigned:i.would_assign} single_name=${i.single_name} no_name=${i.no_name} lookup_failed=${i.lookup_failed} conflict=${i.conflict} exhausted=${i.exhausted??0} verify_sent=${i.verify_sent} verify_failed=${i.verify_failed??0} verify_rate_limited=${i.verify_rate_limited??0} remaining=${i.remaining??"unknown"}`));for(let o of i.results){let s=`id ${o.id} <${o.email}>`,a=[o.given_name,o.family_name].filter(Boolean).join(" ");if(o.outcome==="assigned"||o.outcome==="would_assign"){let c=o.outcome==="assigned"?l.green("assigned "):l.cyan("would give"),u=o.outcome==="assigned"?` [verify: ${o.verify}]`:"";console.log(` ${c} ${s}: ${l.cyan(o.username??"?")} (${a})${u}`)}else if(o.outcome==="single_name")console.log(` ${l.yellow("one name ")} ${s}: only "${a}" on record; pick a username by hand`);else if(o.outcome==="no_name")console.log(` ${l.yellow("no name ")} ${s}: run 'nemar admin backfill-names --apply' first`);else if(o.outcome==="conflict")console.log(` ${l.yellow("conflict ")} ${s}: ${o.error}`);else if(o.outcome==="exhausted")console.log(` ${l.yellow("exhausted ")} ${s}: ${o.error}; pick a username by hand`);else console.log(` ${l.red("error ")} ${s}: ${o.error}`)}for(let o of i.verify_retries??[]){let s=o.verify==="sent"?l.green("re-sent "):o.verify==="not_attempted"?l.cyan("would send"):l.yellow(`verify ${o.verify}`);console.log(` ${s} id ${o.id} <${o.email}>`)}if(i.warning)console.log(l.yellow(` Warning: ${i.warning}`));if(i.single_name>0||i.no_name>0)console.log(),console.log(l.dim("Accounts with one name or none are listed, never guessed at: a username derived from an email address is a handle the person never chose."))});_e.addCommand(hQ);var gQ=new le("duplicates").description("Report live accounts sharing an ORCID iD, email, or GitHub handle");function MLe(e){let t=e.username??l.dim("(no username)"),r=[];if(e.canonical)r.push(l.green("canonical"));if(e.identity_conflict===1)r.push(l.yellow("flagged"));if(e.has_oauth_identity)r.push(l.dim("orcid-login"));let n=r.length>0?` [${r.join(", ")}]`:"",i=`created ${e.created_at} datasets=${e.dataset_count}`;console.log(` id ${String(e.id).padEnd(5)} ${t} <${e.email}> ${i}${n}`)}gQ.option("--json","Output raw JSON instead of the human report").option("--clear <id>","Clear one account's identity-conflict flag (refuses while the collision remains)").action(async(e)=>{if(!te())return;if(e.clear!==void 0){let n=Number.parseInt(e.clear,10);if(!Number.isInteger(n)||n<=0){console.error(l.red(`Invalid user id: ${e.clear}`)),process.exit(1);return}let i=w(`Clearing identity-conflict flag on user ${n}...`).start();try{let o=await iK(n);if(i.stop(),e.json){console.log(JSON.stringify(o,null,2));return}console.log(o.cleared?l.green(`Cleared the identity-conflict flag on user ${n}.`):l.dim(`User ${n} was not flagged; nothing to clear.`))}catch(o){i.fail(o instanceof N&&o.statusCode===409?"Still colliding; flag not cleared":"Failed to clear the identity-conflict flag"),console.error(l.red(T(o))),process.exit(1)}return}let t=w("Checking for duplicate accounts...").start(),r;try{r=await nK(),t.stop()}catch(n){t.fail("Duplicate report failed"),console.error(l.red(T(n))),process.exit(1);return}if(e.json){console.log(JSON.stringify(r,null,2));return}if(console.log(),r.groups.length===0){if(console.log(l.green("No duplicate accounts.")),r.flagged_count>0)console.log(l.yellow(`${r.flagged_count} account(s) still carry an identity-conflict flag with no remaining collision.`)),console.log(l.dim(" Clear each with 'nemar admin duplicates --clear <id>'."));return}console.log(l.cyan(`${r.group_count} duplicate group(s); ${r.flagged_count} account(s) flagged`));for(let n of r.groups){console.log(),console.log(` ${l.bold(n.kind)} ${n.value}`);for(let i of n.accounts)MLe(i)}console.log(),console.log(l.dim("The fix is self-service on the surviving account: change its email or GitHub username, or unlink/re-link its ORCID iD, in Settings on nemar.org. Merging two accounts is manual.")),process.exitCode=1});_e.addCommand(gQ);Ke();ai();$n();Ec();$c();jm();Ke();Ec();$c();var BLe=wt["cli.gaps.section.title"];function yQ(e){if(e.gaps===void 0)return[e.unknownReason??wt["cli.gaps.unknown"]];let t=Lm(e.gaps,{orcidVerified:e.orcidVerified}).map(jN);if(e.sandboxCompleted===!1)t.push(Um());return t.length>0?t:[wt["gaps.none"]]}function LLe(e){let t=yQ(e);return t.length===1&&t[0]===wt["gaps.none"]}function e2(e){let t=e.gaps===void 0||LLe(e);console.log(),console.log(l.bold(BLe));for(let r of yQ(e))console.log(` ${t?l.dim(r):l.yellow(r)}`)}function Sg(e,t,r={}){let n=r.indent??" ";console.log(),console.log(`${n}${e}`);for(let i of t)console.log(`${n} ${l.yellow(i.label)} ${Q_(i)}`)}Gu();ss();async function xQ(e){return F(`/auth/check-username?username=${encodeURIComponent(e)}`)}async function bQ(e){return F(`/auth/check-github?username=${encodeURIComponent(e)}`)}async function _Q(e){return F(`/auth/orcid-name?orcid=${encodeURIComponent(e)}`)}async function vQ(e){return F("/auth/signup",{method:"POST",body:JSON.stringify(e)})}async function t2(e){return F("/auth/login",{method:"POST",body:JSON.stringify({api_key:e})})}async function wQ(e){return F("/auth/resend-verification",{method:"POST",body:JSON.stringify({email:e})})}async function DQ(e,t){return F("/auth/retrieve-key",{method:"POST",body:JSON.stringify({email:e,password:t})})}async function EQ(e){return F("/auth/request-key-regeneration",{method:"POST",body:JSON.stringify({email:e})})}async function $i(){return(await F("/users/me",{},!0,vN)).user}async function SQ(e){return F("/sandbox/complete",{method:"POST",body:JSON.stringify({dataset_id:e})},!0)}async function $Q(){return F("/sandbox/reset",{method:"POST"},!0)}async function CQ(){return F("/sandbox/status",{},!0)}async function RQ(e){return F("/users/me/upload-access/request",{method:"POST",body:JSON.stringify({why:e})},!0)}async function OQ(e){return F("/auth/email/change/request",{method:"POST",body:JSON.stringify({email:e})},!0)}async function kQ(e,t){return F("/auth/email/change/verify",{method:"POST",body:JSON.stringify({email:e,code:t})},!0)}async function AQ(e){return F("/auth/profile",{method:"PATCH",body:JSON.stringify(e)},!0)}async function FQ(e){return F("/auth/orcid/cli-start",{method:"POST",body:JSON.stringify({mode:e})},!0)}async function PQ(){return F("/auth/orcid/unlink",{method:"POST"},!0)}Ht();sa();import{spawn as ULe}from"child_process";function VLe(e,t){if(e==="darwin")return{command:"open",args:[t]};if(e==="win32")return{command:"cmd",args:["/c","start","",t]};if(e==="linux")return{command:"xdg-open",args:[t]};return null}function IQ(e){if(process.env.NEMAR_NO_BROWSER==="1")return!1;let t=VLe(process.platform,e);if(!t)return!1;try{let r=ULe(t.command,t.args,{stdio:"ignore",detached:!0});return r.on("error",(n)=>{Ln(`openInBrowser: ${t.command} failed: ${n instanceof Error?n.message:n}`)}),r.unref(),!0}catch(r){return Ln(`openInBrowser: could not spawn ${t.command}: ${r instanceof Error?r.message:r}`),!1}}pl();no();sa();ef();import{appendFileSync as GLe,existsSync as ms,mkdirSync as TQ,readFileSync as Cg,writeFileSync as zLe}from"fs";import{homedir as HLe}from"os";import{join as $g}from"path";var{spawn:NQ}=globalThis.Bun;function da(){let e=$g(HLe(),".ssh");return{sshDir:e,privateKey:$g(e,"nemar_ed25519"),publicKey:$g(e,"nemar_ed25519.pub"),configFile:$g(e,"config")}}function qQ(){let e=da();return ms(e.privateKey)&&ms(e.publicKey)}async function jQ(e){let t=da();if(!ms(t.sshDir))try{TQ(t.sshDir,{mode:448})}catch(r){return{success:!1,error:`Cannot create ~/.ssh directory: ${r.message}`}}if(ms(t.privateKey))try{return{success:!0,publicKey:Cg(t.publicKey,"utf-8").trim()}}catch(r){return{success:!1,error:`NEMAR SSH key exists but cannot read public key: ${r.message}`}}try{let r=NQ({cmd:["ssh-keygen","-t","ed25519","-f",t.privateKey,"-N","","-C",`nemar-cli-${e}`],stdout:"pipe",stderr:"pipe"}),n=await new Response(r.stderr).text();if(await r.exited!==0)return{success:!1,error:`ssh-keygen failed: ${n}`};return{success:!0,publicKey:Cg(t.publicKey,"utf-8").trim()}}catch(r){return{success:!1,error:`Failed to generate SSH key: ${r.message}`}}}function MQ(){let e=da();if(!ms(e.publicKey))return null;try{return Cg(e.publicKey,"utf-8").trim()}catch{return null}}function WLe(){let e=da();if(!ms(e.configFile))return!1;try{let t=Cg(e.configFile,"utf-8");return t.includes("IdentityFile ~/.ssh/nemar_ed25519")||t.includes(`IdentityFile ${e.privateKey}`)}catch{return!1}}function BQ(){let e=da();if(!ms(e.sshDir))try{TQ(e.sshDir,{mode:448})}catch(r){return{success:!1,error:`Cannot create ~/.ssh directory: ${r.message}`}}if(WLe())return{success:!0};let t=`
|
|
477
|
+
Nothing to dispatch.`));return}let c=i?` (scoped to ${i})`:"",u=await Oe(`Dispatch generate-manifest for ${a.length} version(s)${c}? Each dispatch queues a runner job on nemarDatasets/.github.`,e);if(u!=="confirmed"){console.log(l.dim(u==="declined"?"Skipped":"Cancelled"));return}let d=0,f=0;console.log();for(let[m,p]of a.entries()){let g=`${p.dataset_id}@${p.version}`,y=w(`[${m+1}/${a.length}] dispatching ${g}...`).start();try{await QW(p.dataset_id,p.version),y.succeed(`[${m+1}/${a.length}] dispatched ${g}`),d++}catch(x){y.fail(`[${m+1}/${a.length}] ${g}: ${T(x)}`),f++}if(m<a.length-1)await new Promise((x)=>setTimeout(x,TLe))}if(console.log(),console.log(f===0?l.green(`All ${d} dispatches succeeded.`):l.yellow(`${d} succeeded, ${f} failed.`)),console.log(l.dim("Workflow runs will appear on https://github.com/nemarDatasets/.github/actions. Re-run `nemar admin summary check` once they complete to verify drift cleared.")),f>0)process.exitCode=1});function QX(e){return{versions:e.length,ok:e.filter((t)=>t.state.kind==="ok").length,stale:e.filter((t)=>t.state.kind==="stale").length,missing:e.filter((t)=>t.state.kind==="missing").length,error:e.filter((t)=>t.state.kind==="error").length}}_e.addCommand(fQ);var pQ=new le("zarr-catalog").description("Top-level Zarr discovery catalog (zarr-catalog.json)");pQ.command("publish").description("Rebuild and republish zarr-catalog.json to this environment's bucket").action(async()=>{if(!te())return;let e=w("Publishing zarr-catalog.json...").start();try{let t=await ZW();e.succeed(`Published zarr-catalog.json: ${t.count} dataset(s), ${t.bytes} bytes`)}catch(t){nt(t,e,"Failed to publish zarr catalog"),process.exit(1)}});_e.addCommand(pQ);var mQ=new le("backfill-names").description("Fill missing researcher names from users' public ORCID records (dry run by default)");mQ.option("--apply","Write the names (without this flag, only report what would change)").option("--limit <n>","Users per batch (server clamps to [1,100])","25").option("--json","Output raw JSON instead of the human summary").action(async(e)=>{if(!te())return;let t=Number.parseInt(e.limit??"25",10)||25,r=e.apply===!0,n=w(r?"Backfilling names from ORCID...":"Checking ORCID for missing names...").start(),i;try{i=await tK({apply:r,limit:t}),n.stop()}catch(o){n.fail("Name backfill failed"),console.error(l.red(T(o))),process.exit(1);return}if(e.json){console.log(JSON.stringify(i,null,2));return}if(console.log(),!i.apply)console.log(l.yellow("DRY RUN \u2014 nothing was written. Re-run with --apply."));console.log(l.cyan(`scanned=${i.scanned} ${i.apply?"filled":"would_fill"}=${i.apply?i.filled:i.would_fill} no_public_name=${i.no_public_name} lookup_failed=${i.lookup_failed} remaining=${i.remaining??"unknown"}`));for(let o of i.results){let s=o.username??`id ${o.id} <${o.email}>`;if(o.outcome==="filled"||o.outcome==="would_fill"){let a=o.outcome==="filled"?l.green("filled "):l.cyan("would fill");console.log(` ${a} ${s}: ${o.given_name} ${o.family_name} (${o.orcid})`)}else if(o.outcome==="no_public_name")console.log(` ${l.yellow("no name ")} ${s}: ORCID ${o.orcid} does not publish a full name`);else console.log(` ${l.red("error ")} ${s}: ${o.error}`)}if(i.warning)console.log(l.yellow(` Warning: ${i.warning}`));if(i.no_public_name>0)console.log(),console.log(l.dim("These accounts must make their name public on their ORCID record and sign in again; NEMAR cannot type a name in for an ORCID-linked account, because the record is re-read on every sign-in and would overwrite it. An account with no verified ORCID can set its name in Settings (ADR 0042)."));if(i.lookup_failed>0||i.remaining===null)process.exitCode=1});_e.addCommand(mQ);var hQ=new le("backfill-usernames").description("Give username-less accounts a username from their name (dry run by default)");hQ.option("--apply","Write the usernames and send verification messages").option("--limit <n>","Users per batch (server clamps to [1,100])","25").option("--json","Output raw JSON instead of the human summary").action(async(e)=>{if(!te())return;let t=Number.parseInt(e.limit??"25",10)||25,r=e.apply===!0,n=w(r?"Assigning usernames...":"Checking which accounts need a username...").start(),i;try{i=await rK({apply:r,limit:t}),n.stop()}catch(o){n.fail("Username backfill failed"),console.error(l.red(T(o))),process.exit(1);return}if(e.json){console.log(JSON.stringify(i,null,2));return}if(console.log(),!i.apply)console.log(l.yellow("DRY RUN \u2014 nothing was written. Re-run with --apply."));console.log(l.cyan(`scanned=${i.scanned} ${i.apply?"assigned":"would_assign"}=${i.apply?i.assigned:i.would_assign} single_name=${i.single_name} no_name=${i.no_name} lookup_failed=${i.lookup_failed} conflict=${i.conflict} exhausted=${i.exhausted??0} verify_sent=${i.verify_sent} verify_failed=${i.verify_failed??0} verify_rate_limited=${i.verify_rate_limited??0} remaining=${i.remaining??"unknown"}`));for(let o of i.results){let s=`id ${o.id} <${o.email}>`,a=[o.given_name,o.family_name].filter(Boolean).join(" ");if(o.outcome==="assigned"||o.outcome==="would_assign"){let c=o.outcome==="assigned"?l.green("assigned "):l.cyan("would give"),u=o.outcome==="assigned"?` [verify: ${o.verify}]`:"";console.log(` ${c} ${s}: ${l.cyan(o.username??"?")} (${a})${u}`)}else if(o.outcome==="single_name")console.log(` ${l.yellow("one name ")} ${s}: only "${a}" on record; pick a username by hand`);else if(o.outcome==="no_name")console.log(` ${l.yellow("no name ")} ${s}: run 'nemar admin backfill-names --apply' first`);else if(o.outcome==="conflict")console.log(` ${l.yellow("conflict ")} ${s}: ${o.error}`);else if(o.outcome==="exhausted")console.log(` ${l.yellow("exhausted ")} ${s}: ${o.error}; pick a username by hand`);else console.log(` ${l.red("error ")} ${s}: ${o.error}`)}for(let o of i.verify_retries??[]){let s=o.verify==="sent"?l.green("re-sent "):o.verify==="not_attempted"?l.cyan("would send"):l.yellow(`verify ${o.verify}`);console.log(` ${s} id ${o.id} <${o.email}>`)}if(i.warning)console.log(l.yellow(` Warning: ${i.warning}`));if(i.single_name>0||i.no_name>0)console.log(),console.log(l.dim("Accounts with one name or none are listed, never guessed at: a username derived from an email address is a handle the person never chose."));if(i.lookup_failed>0||i.conflict>0||(i.exhausted??0)>0||(i.verify_failed??0)>0||(i.verify_rate_limited??0)>0||i.remaining===null)process.exitCode=1});_e.addCommand(hQ);var gQ=new le("duplicates").description("Report live accounts sharing an ORCID iD, email, or GitHub handle");function MLe(e){let t=e.username??l.dim("(no username)"),r=[];if(e.canonical)r.push(l.green("canonical"));if(e.identity_conflict===1)r.push(l.yellow("flagged"));if(e.has_oauth_identity)r.push(l.dim("orcid-login"));let n=r.length>0?` [${r.join(", ")}]`:"",i=`created ${e.created_at} datasets=${e.dataset_count}`;console.log(` id ${String(e.id).padEnd(5)} ${t} <${e.email}> ${i}${n}`)}gQ.option("--json","Output raw JSON instead of the human report").option("--clear <id>","Clear one account's identity-conflict flag (refuses while the collision remains)").action(async(e)=>{if(!te())return;if(e.clear!==void 0){let n=Number.parseInt(e.clear,10);if(!Number.isInteger(n)||n<=0){console.error(l.red(`Invalid user id: ${e.clear}`)),process.exit(1);return}let i=w(`Clearing identity-conflict flag on user ${n}...`).start();try{let o=await iK(n);if(i.stop(),e.json){console.log(JSON.stringify(o,null,2));return}console.log(o.cleared?l.green(`Cleared the identity-conflict flag on user ${n}.`):l.dim(`User ${n} was not flagged; nothing to clear.`))}catch(o){i.fail(o instanceof N&&o.statusCode===409?"Still colliding; flag not cleared":"Failed to clear the identity-conflict flag"),console.error(l.red(T(o))),process.exit(1)}return}let t=w("Checking for duplicate accounts...").start(),r;try{r=await nK(),t.stop()}catch(n){t.fail("Duplicate report failed"),console.error(l.red(T(n))),process.exit(1);return}if(e.json){console.log(JSON.stringify(r,null,2));return}if(console.log(),r.groups.length===0){if(console.log(l.green("No duplicate accounts.")),r.flagged_count>0)console.log(l.yellow(`${r.flagged_count} account(s) still carry an identity-conflict flag with no remaining collision.`)),console.log(l.dim(" Clear each with 'nemar admin duplicates --clear <id>'."));return}console.log(l.cyan(`${r.group_count} duplicate group(s); ${r.flagged_count} account(s) flagged`));for(let n of r.groups){console.log(),console.log(` ${l.bold(n.kind)} ${n.value}`);for(let i of n.accounts)MLe(i)}console.log(),console.log(l.dim("The fix is self-service on the surviving account: change its email or GitHub username, or unlink/re-link its ORCID iD, in Settings on nemar.org. Merging two accounts is manual.")),process.exitCode=1});_e.addCommand(gQ);Ke();ai();$n();Ec();$c();jm();Ke();Ec();$c();var BLe=wt["cli.gaps.section.title"];function yQ(e){if(e.gaps===void 0)return[e.unknownReason??wt["cli.gaps.unknown"]];let t=Lm(e.gaps,{orcidVerified:e.orcidVerified}).map(jN);if(e.sandboxCompleted===!1)t.push(Um());return t.length>0?t:[wt["gaps.none"]]}function LLe(e){let t=yQ(e);return t.length===1&&t[0]===wt["gaps.none"]}function e2(e){let t=e.gaps===void 0||LLe(e);console.log(),console.log(l.bold(BLe));for(let r of yQ(e))console.log(` ${t?l.dim(r):l.yellow(r)}`)}function Sg(e,t,r={}){let n=r.indent??" ";console.log(),console.log(`${n}${e}`);for(let i of t)console.log(`${n} ${l.yellow(i.label)} ${Q_(i)}`)}Gu();ss();async function xQ(e){return F(`/auth/check-username?username=${encodeURIComponent(e)}`)}async function bQ(e){return F(`/auth/check-github?username=${encodeURIComponent(e)}`)}async function _Q(e){return F(`/auth/orcid-name?orcid=${encodeURIComponent(e)}`)}async function vQ(e){return F("/auth/signup",{method:"POST",body:JSON.stringify(e)})}async function t2(e){return F("/auth/login",{method:"POST",body:JSON.stringify({api_key:e})})}async function wQ(e){return F("/auth/resend-verification",{method:"POST",body:JSON.stringify({email:e})})}async function DQ(e,t){return F("/auth/retrieve-key",{method:"POST",body:JSON.stringify({email:e,password:t})})}async function EQ(e){return F("/auth/request-key-regeneration",{method:"POST",body:JSON.stringify({email:e})})}async function $i(){return(await F("/users/me",{},!0,vN)).user}async function SQ(e){return F("/sandbox/complete",{method:"POST",body:JSON.stringify({dataset_id:e})},!0)}async function $Q(){return F("/sandbox/reset",{method:"POST"},!0)}async function CQ(){return F("/sandbox/status",{},!0)}async function RQ(e){return F("/users/me/upload-access/request",{method:"POST",body:JSON.stringify({why:e})},!0)}async function OQ(e){return F("/auth/email/change/request",{method:"POST",body:JSON.stringify({email:e})},!0)}async function kQ(e,t){return F("/auth/email/change/verify",{method:"POST",body:JSON.stringify({email:e,code:t})},!0)}async function AQ(e){return F("/auth/profile",{method:"PATCH",body:JSON.stringify(e)},!0)}async function FQ(e){return F("/auth/orcid/cli-start",{method:"POST",body:JSON.stringify({mode:e})},!0)}async function PQ(){return F("/auth/orcid/unlink",{method:"POST"},!0)}Ht();sa();import{spawn as ULe}from"child_process";function VLe(e,t){if(e==="darwin")return{command:"open",args:[t]};if(e==="win32")return{command:"cmd",args:["/c","start","",t]};if(e==="linux")return{command:"xdg-open",args:[t]};return null}function IQ(e){if(process.env.NEMAR_NO_BROWSER==="1")return!1;let t=VLe(process.platform,e);if(!t)return!1;try{let r=ULe(t.command,t.args,{stdio:"ignore",detached:!0});return r.on("error",(n)=>{Ln(`openInBrowser: ${t.command} failed: ${n instanceof Error?n.message:n}`)}),r.unref(),!0}catch(r){return Ln(`openInBrowser: could not spawn ${t.command}: ${r instanceof Error?r.message:r}`),!1}}pl();no();sa();ef();import{appendFileSync as GLe,existsSync as ms,mkdirSync as TQ,readFileSync as Cg,writeFileSync as zLe}from"fs";import{homedir as HLe}from"os";import{join as $g}from"path";var{spawn:NQ}=globalThis.Bun;function da(){let e=$g(HLe(),".ssh");return{sshDir:e,privateKey:$g(e,"nemar_ed25519"),publicKey:$g(e,"nemar_ed25519.pub"),configFile:$g(e,"config")}}function qQ(){let e=da();return ms(e.privateKey)&&ms(e.publicKey)}async function jQ(e){let t=da();if(!ms(t.sshDir))try{TQ(t.sshDir,{mode:448})}catch(r){return{success:!1,error:`Cannot create ~/.ssh directory: ${r.message}`}}if(ms(t.privateKey))try{return{success:!0,publicKey:Cg(t.publicKey,"utf-8").trim()}}catch(r){return{success:!1,error:`NEMAR SSH key exists but cannot read public key: ${r.message}`}}try{let r=NQ({cmd:["ssh-keygen","-t","ed25519","-f",t.privateKey,"-N","","-C",`nemar-cli-${e}`],stdout:"pipe",stderr:"pipe"}),n=await new Response(r.stderr).text();if(await r.exited!==0)return{success:!1,error:`ssh-keygen failed: ${n}`};return{success:!0,publicKey:Cg(t.publicKey,"utf-8").trim()}}catch(r){return{success:!1,error:`Failed to generate SSH key: ${r.message}`}}}function MQ(){let e=da();if(!ms(e.publicKey))return null;try{return Cg(e.publicKey,"utf-8").trim()}catch{return null}}function WLe(){let e=da();if(!ms(e.configFile))return!1;try{let t=Cg(e.configFile,"utf-8");return t.includes("IdentityFile ~/.ssh/nemar_ed25519")||t.includes(`IdentityFile ${e.privateKey}`)}catch{return!1}}function BQ(){let e=da();if(!ms(e.sshDir))try{TQ(e.sshDir,{mode:448})}catch(r){return{success:!1,error:`Cannot create ~/.ssh directory: ${r.message}`}}if(WLe())return{success:!0};let t=`
|
|
478
478
|
# NEMAR CLI SSH key (auto-generated)
|
|
479
479
|
Host github.com
|
|
480
480
|
AddKeysToAgent yes
|
package/package.json
CHANGED