From 3e58ebf45da51156593e96d9aa1de1915254f353 Mon Sep 17 00:00:00 2001 From: AloeSapling Date: Wed, 20 Aug 2025 21:42:20 +0200 Subject: [PATCH] Build --- build/build.js | 1 - dist/BlueMarble.user.css | 2 +- dist/BlueMarble.user.js | 2 +- dist/index.js | 2 +- dist/manifest.json | 2 +- package.json | 2 -- src/createTemplate.ts | 6 +++++- 7 files changed, 9 insertions(+), 8 deletions(-) diff --git a/build/build.js b/build/build.js index d5205a6..d770e0b 100644 --- a/build/build.js +++ b/build/build.js @@ -14,7 +14,6 @@ import fs from "fs"; import { execSync } from "child_process"; import { consoleStyle } from "./utils.js"; import { createRequire } from "module"; -import { minify } from "html-minifier-terser"; const require = createRequire(import.meta.url); // CommonJS imports (require) const terser = require("terser"); diff --git a/dist/BlueMarble.user.css b/dist/BlueMarble.user.css index b9069b3..8a6c666 100644 --- a/dist/BlueMarble.user.css +++ b/dist/BlueMarble.user.css @@ -1 +1 @@ -#bm-overlay{position:fixed;background-color:#153063e6;color:#fff;padding:10px;border-radius:8px;z-index:9000;transition:all .3s ease,transform 0s;max-width:300px;width:auto;will-change:transform;backface-visibility:hidden;-webkit-backface-visibility:hidden;transform-style:preserve-3d;-webkit-transform-style:preserve-3d}#bm-contain-userinfo,#bm-overlay hr,#bm-contain-automation,#bm-contain-buttons-action{transition:opacity .2s ease,height .2s ease}div#bm-overlay{font-family:Roboto Mono,Courier New,Monaco,DejaVu Sans Mono,monospace,Arial;letter-spacing:.05em}#bm-bar-drag{margin-bottom:.5em;background:url('data:image/svg+xml;utf8,') repeat;cursor:grab;width:100%;height:1em}#bm-bar-drag.dragging{cursor:grabbing}#bm-overlay:has(#bm-bar-drag.dragging){pointer-events:none;user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none}#bm-bar-drag.dragging{pointer-events:auto}#bm-contain-header{margin-bottom:.5em}#bm-contain-header[style*="text-align: center"]{display:flex;flex-direction:column;align-items:center;justify-content:center}#bm-overlay[style*="padding: 5px"]{width:auto!important;max-width:300px;min-width:200px}#bm-overlay img{display:inline-block;height:2.5em;margin-right:1ch;vertical-align:middle;transition:opacity .2s ease}#bm-contain-header[style*="text-align: center"] img{display:block;margin:0 auto}#bm-bar-drag{transition:margin-bottom .2s ease}#bm-overlay h1{display:inline-block;font-size:x-large;font-weight:700;vertical-align:middle}#bm-contain-automation input[type=checkbox]{vertical-align:middle;margin-right:.5ch}#bm-contain-automation label{margin-right:.5ch}.bm-help{border:white 1px solid;height:1.5em;width:1.5em;margin-top:2px;text-align:center;line-height:1em;padding:0!important}#bm-button-coords{vertical-align:middle}#bm-button-coords svg{width:50%;margin:0 auto;fill:#111}div:has(>#bm-button-teleport){display:flex;gap:.5ch}#bm-button-favorite svg,#bm-button-template svg{height:1em;margin:2px auto 0;text-align:center;line-height:1em;vertical-align:bottom}#bm-contain-coords input[type=number]{appearance:auto;-moz-appearance:textfield;width:5.5ch;margin-left:1ch;background-color:#0003;padding:0 .5ch;font-size:small}#bm-contain-coords input[type=number]::-webkit-outer-spin-button,#bm-contain-coords input[type=number]::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}#bm-contain-buttons-template{display:flex;flex-direction:row;flex-wrap:wrap;align-content:center;justify-content:center;align-items:center;gap:1ch}div:has(>#bm-input-file-template)>button{width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}#bm-input-file-template,input[type=file][id*=template]{display:none!important;visibility:hidden!important;position:absolute!important;left:-9999px!important;top:-9999px!important;width:0!important;height:0!important;opacity:0!important;z-index:-9999!important;pointer-events:none!important}#bm-output-status{font-size:small;background-color:#0003;padding:0 .5ch;height:3.75em;width:100%}#bm-contain-buttons-action{display:flex;justify-content:space-between}#bm-overlay small{font-size:x-small;color:#d3d3d3}#bm-contain-userinfo,#bm-contain-automation,#bm-contain-coords,#bm-contain-buttons-template,div:has(>#bm-input-file-template),#bm-output-status{margin-top:.5em}#bm-overlay button{background-color:#144eb9;border-radius:1em;padding:0 .75ch}#bm-overlay button:hover,#bm-overlay button:focus-visible{background-color:#1061e5}#bm-overlay button:active,#bm-overlay button:disabled{background-color:#2e97ff}#bm-overlay button:disabled{text-decoration:line-through} +#bm-main-overlay{position:fixed;background-color:#153063e6;color:#fff;padding:10px;border-radius:8px;z-index:9000;transition:all .3s ease,transform 0s;max-width:300px;width:auto;will-change:transform;backface-visibility:hidden;-webkit-backface-visibility:hidden;transform-style:preserve-3d;-webkit-transform-style:preserve-3d}#bm-contain-userinfo,#bm-main-overlay hr,#bm-contain-automation,#bm-contain-buttons-action{transition:opacity .2s ease,height .2s ease}div#bm-main-overlay{font-family:Roboto Mono,Courier New,Monaco,DejaVu Sans Mono,monospace,Arial;letter-spacing:.05em}#bm-bar-drag{margin-bottom:.5em;background:url('data:image/svg+xml;utf8,') repeat;cursor:grab;width:100%;height:1em}#bm-bar-drag.dragging{cursor:grabbing}#bm-main-overlay:has(#bm-bar-drag.dragging){pointer-events:none;user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none}#bm-bar-drag.dragging{pointer-events:auto}#bm-contain-header{margin-bottom:.5em}#bm-contain-header[style*="text-align: center"]{display:flex;flex-direction:column;align-items:center;justify-content:center}#bm-main-overlay[style*="padding: 5px"]{width:auto!important;max-width:300px;min-width:200px}#bm-main-overlay img{display:inline-block;height:2.5em;margin-right:1ch;vertical-align:middle;transition:opacity .2s ease}#bm-contain-header[style*="text-align: center"] img{display:block;margin:0 auto}#bm-bar-drag{transition:margin-bottom .2s ease}#bm-main-overlay h1{display:inline-block;font-size:x-large;font-weight:700;vertical-align:middle}#bm-contain-automation input[type=checkbox]{vertical-align:middle;margin-right:.5ch}#bm-contain-automation label{margin-right:.5ch}.bm-help{border:white 1px solid;height:1.5em;width:1.5em;margin-top:2px;text-align:center;line-height:1em;padding:0!important}#bm-button-coords{vertical-align:middle}#bm-button-coords svg{width:50%;margin:0 auto;fill:#111}div:has(>#bm-button-teleport){display:flex;gap:.5ch}#bm-button-favorite svg,#bm-button-template svg{height:1em;margin:2px auto 0;text-align:center;line-height:1em;vertical-align:bottom}#bm-contain-coords input[type=number]{appearance:auto;-moz-appearance:textfield;width:5.5ch;margin-left:1ch;background-color:#0003;padding:0 .5ch;font-size:small}#bm-contain-coords input[type=number]::-webkit-outer-spin-button,#bm-contain-coords input[type=number]::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}#bm-contain-buttons-template{display:flex;flex-direction:row;flex-wrap:wrap;align-content:center;justify-content:center;align-items:center;gap:1ch}div:has(>#bm-input-file-template)>button{width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}#bm-input-file-template,input[type=file][id*=template]{display:none!important;visibility:hidden!important;position:absolute!important;left:-9999px!important;top:-9999px!important;width:0!important;height:0!important;opacity:0!important;z-index:-9999!important;pointer-events:none!important}#bm-output-status{font-size:small;background-color:#0003;padding:0 .5ch;height:3.75em;width:100%}#bm-contain-buttons-action{display:flex;justify-content:space-between}#bm-main-overlay small{font-size:x-small;color:#d3d3d3}#bm-contain-userinfo,#bm-contain-automation,#bm-contain-coords,#bm-contain-buttons-template,div:has(>#bm-input-file-template),#bm-output-status{margin-top:.5em}#bm-main-overlay button{background-color:#144eb9;border-radius:1em;padding:0 .75ch}#bm-main-overlay button:hover,#bm-main-overlay button:focus-visible{background-color:#1061e5}#bm-main-overlay button:active,#bm-main-overlay button:disabled{background-color:#2e97ff}#bm-main-overlay button:disabled{text-decoration:line-through} diff --git a/dist/BlueMarble.user.js b/dist/BlueMarble.user.js index 78886f9..9c73406 100644 --- a/dist/BlueMarble.user.js +++ b/dist/BlueMarble.user.js @@ -1 +1 @@ -(()=>{var t=document.createElement("style");t.textContent='#bm-overlay{position:fixed;background-color:#153063e6;color:#fff;padding:10px;border-radius:8px;z-index:9000;transition:all .3s ease,transform 0s;max-width:300px;width:auto;will-change:transform;backface-visibility:hidden;-webkit-backface-visibility:hidden;transform-style:preserve-3d;-webkit-transform-style:preserve-3d}#bm-contain-userinfo,#bm-overlay hr,#bm-contain-automation,#bm-contain-buttons-action{transition:opacity .2s ease,height .2s ease}div#bm-overlay{font-family:Roboto Mono,Courier New,Monaco,DejaVu Sans Mono,monospace,Arial;letter-spacing:.05em}#bm-bar-drag{margin-bottom:.5em;background:url(\'data:image/svg+xml;utf8,\') repeat;cursor:grab;width:100%;height:1em}#bm-bar-drag.dragging{cursor:grabbing}#bm-overlay:has(#bm-bar-drag.dragging){pointer-events:none;user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none}#bm-bar-drag.dragging{pointer-events:auto}#bm-contain-header{margin-bottom:.5em}#bm-contain-header[style*="text-align: center"]{display:flex;flex-direction:column;align-items:center;justify-content:center}#bm-overlay[style*="padding: 5px"]{width:auto!important;max-width:300px;min-width:200px}#bm-overlay img{display:inline-block;height:2.5em;margin-right:1ch;vertical-align:middle;transition:opacity .2s ease}#bm-contain-header[style*="text-align: center"] img{display:block;margin:0 auto}#bm-bar-drag{transition:margin-bottom .2s ease}#bm-overlay h1{display:inline-block;font-size:x-large;font-weight:700;vertical-align:middle}#bm-contain-automation input[type=checkbox]{vertical-align:middle;margin-right:.5ch}#bm-contain-automation label{margin-right:.5ch}.bm-help{border:white 1px solid;height:1.5em;width:1.5em;margin-top:2px;text-align:center;line-height:1em;padding:0!important}#bm-button-coords{vertical-align:middle}#bm-button-coords svg{width:50%;margin:0 auto;fill:#111}div:has(>#bm-button-teleport){display:flex;gap:.5ch}#bm-button-favorite svg,#bm-button-template svg{height:1em;margin:2px auto 0;text-align:center;line-height:1em;vertical-align:bottom}#bm-contain-coords input[type=number]{appearance:auto;-moz-appearance:textfield;width:5.5ch;margin-left:1ch;background-color:#0003;padding:0 .5ch;font-size:small}#bm-contain-coords input[type=number]::-webkit-outer-spin-button,#bm-contain-coords input[type=number]::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}#bm-contain-buttons-template{display:flex;flex-direction:row;flex-wrap:wrap;align-content:center;justify-content:center;align-items:center;gap:1ch}div:has(>#bm-input-file-template)>button{width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}#bm-input-file-template,input[type=file][id*=template]{display:none!important;visibility:hidden!important;position:absolute!important;left:-9999px!important;top:-9999px!important;width:0!important;height:0!important;opacity:0!important;z-index:-9999!important;pointer-events:none!important}#bm-output-status{font-size:small;background-color:#0003;padding:0 .5ch;height:3.75em;width:100%}#bm-contain-buttons-action{display:flex;justify-content:space-between}#bm-overlay small{font-size:x-small;color:#d3d3d3}#bm-contain-userinfo,#bm-contain-automation,#bm-contain-coords,#bm-contain-buttons-template,div:has(>#bm-input-file-template),#bm-output-status{margin-top:.5em}#bm-overlay button{background-color:#144eb9;border-radius:1em;padding:0 .75ch}#bm-overlay button:hover,#bm-overlay button:focus-visible{background-color:#1061e5}#bm-overlay button:active,#bm-overlay button:disabled{background-color:#2e97ff}#bm-overlay button:disabled{text-decoration:line-through}\n',document.body.appendChild(t),document.querySelector("body").innerHTML+='\x3c!-- body --\x3e\n
\n
\n
\n \n

VAR_name

\n
\n
\n
\n

Name:

\n

Droplets:

\n

Next level in...

\n
\n
\n
\n
\n \n \n \n \n \n
\n \n
\n \n \n \n
\n \n
\n \n

Made by SwingTheVine

\n
\n
\n \n\n',console.log("I'm blue marble!")})(); \ No newline at end of file +(()=>{var t=Object.defineProperty,e=(e,n,i)=>((e,n,i)=>n in e?t(e,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[n]=i)(e,"symbol"!=typeof n?n+"":n,i);function n(t,e){const n=document.createElement(t);return e&&Object.entries(e).forEach(([t,e])=>{"className"===t?n.setAttribute("class",e):n.setAttribute(t,e)}),n}function i(){return window.charity.game.map.on("click","",t=>{console.log(t)}),[]}new Blob;var s,r,a,o={};((e,n)=>{for(var i in n)t(e,i,{get:n[i],enumerable:!0})})(o,{t:()=>Lt,i:()=>N,o:()=>b,u:()=>A,NEVER:()=>je,OK:()=>_,l:()=>k,h:()=>D,ZodAny:()=>ht,ZodArray:()=>vt,ZodBigInt:()=>at,ZodBoolean:()=>ot,ZodBranded:()=>Ut,ZodCatch:()=>Ct,ZodDate:()=>ut,ZodDefault:()=>Ot,ZodDiscriminatedUnion:()=>wt,ZodEffects:()=>jt,ZodEnum:()=>Tt,m:()=>h,p:()=>Kt,ZodFunction:()=>Et,ZodIntersection:()=>At,v:()=>d,ZodLazy:()=>It,ZodLiteral:()=>Mt,ZodMap:()=>Zt,ZodNaN:()=>zt,ZodNativeEnum:()=>St,ZodNever:()=>pt,ZodNull:()=>lt,ZodNullable:()=>Pt,ZodNumber:()=>rt,ZodObject:()=>bt,ZodOptional:()=>Bt,k:()=>u,ZodPipeline:()=>Vt,ZodPromise:()=>Dt,ZodReadonly:()=>Rt,ZodRecord:()=>_t,A:()=>D,ZodSet:()=>$t,ZodString:()=>it,ZodSymbol:()=>ct,N:()=>jt,ZodTuple:()=>Nt,_:()=>D,ZodUndefined:()=>dt,ZodUnion:()=>yt,ZodUnknown:()=>mt,ZodVoid:()=>ft,Z:()=>y,any:()=>ae,$:()=>de,I:()=>te,M:()=>ee,F:()=>De,T:()=>qt,S:()=>ne,D:()=>X,j:()=>m,B:()=>pe,effect:()=>Ze,P:()=>Ae,O:()=>xe,C:()=>v,L:()=>c,U:()=>Yt,intersection:()=>fe,V:()=>Z,R:()=>I,W:()=>$,q:()=>E,K:()=>Jt,H:()=>we,J:()=>ke,Y:()=>g,map:()=>be,G:()=>Xt,X:()=>Ne,tt:()=>ue,null:()=>re,et:()=>Ee,number:()=>Qt,object:()=>le,nt:()=>a,it:()=>Se,st:()=>Te,rt:()=>$e,ot:()=>Fe,ut:()=>Me,ct:()=>Ie,promise:()=>_e,dt:()=>l,lt:()=>ge,set:()=>ye,ht:()=>f,ft:()=>he,string:()=>Gt,vt:()=>ie,gt:()=>Ze,bt:()=>ve,undefined:()=>se,union:()=>me,yt:()=>oe,xt:()=>s,wt:()=>ce}),(r=s||(s={})).kt=t=>{},r.At=function(t){},r.Nt=function(t){throw new Error},r._t=t=>{const e={};for(const n of t)e[n]=n;return e},r.Zt=t=>{const e=r.$t(t).filter(e=>"number"!=typeof t[t[e]]),n={};for(const i of e)n[i]=t[i];return r.Et(n)},r.Et=t=>r.$t(t).map(function(e){return t[e]}),r.$t="function"==typeof Object.keys?t=>Object.keys(t):t=>{const e=[];for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.push(n);return e},r.find=(t,e)=>{for(const n of t)if(e(n))return n},r.isInteger="function"==typeof Number.isInteger?t=>Number.isInteger(t):t=>"number"==typeof t&&Number.isFinite(t)&&Math.floor(t)===t,r.It=function(t,e=" | "){return t.map(t=>"string"==typeof t?`'${t}'`:t).join(e)},r.Mt=(t,e)=>"bigint"==typeof e?e.toString():e,(a||(a={})).Ft=(t,e)=>({...t,...e});var u=s._t(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),c=t=>{switch(typeof t){case"undefined":return u.undefined;case"string":return u.string;case"number":return Number.isNaN(t)?u.G:u.number;case"boolean":return u.M;case"function":return u.O;case"bigint":return u.I;case"symbol":return u.vt;case"object":return Array.isArray(t)?u.$:null===t?u.null:t.then&&"function"==typeof t.then&&t.catch&&"function"==typeof t.catch?u.promise:"undefined"!=typeof Map&&t instanceof Map?u.map:"undefined"!=typeof Set&&t instanceof Set?u.set:"undefined"!=typeof Date&&t instanceof Date?u.S:u.object;default:return u.yt}},d=s._t(["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"]),l=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:"),h=class t extends Error{get Tt(){return this.St}constructor(t){super(),this.St=[],this.Dt=t=>{this.St=[...this.St,t]},this.jt=(t=[])=>{this.St=[...this.St,...t]};const e=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,e):this.__proto__=e,this.name="ZodError",this.St=t}format(t){const e=t||function(t){return t.message},n={Bt:[]},i=t=>{for(const s of t.St)if("invalid_union"===s.code)s.Pt.map(i);else if("invalid_return_type"===s.code)i(s.Ot);else if("invalid_arguments"===s.code)i(s.Ct);else if(0===s.path.length)n.Bt.push(e(s));else{let t=n,i=0;for(;it.message){const e={},n=[];for(const i of this.St)if(i.path.length>0){const n=i.path[0];e[n]=e[n]||[],e[n].push(t(i))}else n.push(t(i));return{Ut:n,Vt:e}}get Ut(){return this.Lt()}};h.create=t=>new h(t);var m=(t,e)=>{let n;switch(t.code){case d.Rt:n=t.Wt===u.undefined?"Required":`Expected ${t.qt}, received ${t.Wt}`;break;case d.Kt:n=`Invalid literal value, expected ${JSON.stringify(t.qt,s.Mt)}`;break;case d.Ht:n=`Unrecognized key(s) in object: ${s.It(t.keys,", ")}`;break;case d.Jt:n="Invalid input";break;case d.Yt:n=`Invalid discriminator value. Expected ${s.It(t.options)}`;break;case d.Gt:n=`Invalid enum value. Expected ${s.It(t.options)}, received '${t.Wt}'`;break;case d.Qt:n="Invalid function arguments";break;case d.Xt:n="Invalid function return type";break;case d.te:n="Invalid date";break;case d.ee:"object"==typeof t.ne?"includes"in t.ne?(n=`Invalid input: must include "${t.ne.includes}"`,"number"==typeof t.ne.position&&(n=`${n} at one or more positions greater than or equal to ${t.ne.position}`)):"startsWith"in t.ne?n=`Invalid input: must start with "${t.ne.startsWith}"`:"endsWith"in t.ne?n=`Invalid input: must end with "${t.ne.endsWith}"`:s.Nt(t.ne):n="regex"!==t.ne?`Invalid ${t.ne}`:"Invalid";break;case d.ie:n="array"===t.type?`Array must contain ${t.se?"exactly":t.re?"at least":"more than"} ${t.ae} element(s)`:"string"===t.type?`String must contain ${t.se?"exactly":t.re?"at least":"over"} ${t.ae} character(s)`:"number"===t.type||"bigint"===t.type?`Number must be ${t.se?"exactly equal to ":t.re?"greater than or equal to ":"greater than "}${t.ae}`:"date"===t.type?`Date must be ${t.se?"exactly equal to ":t.re?"greater than or equal to ":"greater than "}${new Date(Number(t.ae))}`:"Invalid input";break;case d.oe:n="array"===t.type?`Array must contain ${t.se?"exactly":t.re?"at most":"less than"} ${t.ue} element(s)`:"string"===t.type?`String must contain ${t.se?"exactly":t.re?"at most":"under"} ${t.ue} character(s)`:"number"===t.type?`Number must be ${t.se?"exactly":t.re?"less than or equal to":"less than"} ${t.ue}`:"bigint"===t.type?`BigInt must be ${t.se?"exactly":t.re?"less than or equal to":"less than"} ${t.ue}`:"date"===t.type?`Date must be ${t.se?"exactly":t.re?"smaller than or equal to":"smaller than"} ${new Date(Number(t.ue))}`:"Invalid input";break;case d.T:n="Invalid input";break;case d.ce:n="Intersection results could not be merged";break;case d.de:n=`Number must be a multiple of ${t.le}`;break;case d.he:n="Number must be finite";break;default:n=e.me,s.Nt(t)}return{message:n}},p=m;function f(t){p=t}function v(){return p}var g=t=>{const{data:e,path:n,pe:i,fe:s}=t,r=[...n,...s.path||[]],a={...s,path:r};if(void 0!==s.message)return{...s,path:r,message:s.message};let o="";const u=i.filter(t=>!!t).slice().reverse();for(const t of u)o=t(a,{data:e,me:o}).message;return{...s,path:r,message:o}},b=[];function y(t,e){const n=v(),i=g({fe:e,data:t.data,path:t.path,pe:[t.ge.ve,t.be,n,n===m?void 0:m].filter(t=>!!t)});t.ge.St.push(i)}var x,w,k=class t{constructor(){this.value="valid"}ye(){"valid"===this.value&&(this.value="dirty")}abort(){"aborted"!==this.value&&(this.value="aborted")}static xe(t,e){const n=[];for(const i of e){if("aborted"===i.status)return A;"dirty"===i.status&&t.ye(),n.push(i.value)}return{status:t.value,value:n}}static async we(e,n){const i=[];for(const t of n){const e=await t.key,n=await t.value;i.push({key:e,value:n})}return t.ke(e,i)}static ke(t,e){const n={};for(const i of e){const{key:e,value:s}=i;if("aborted"===e.status)return A;if("aborted"===s.status)return A;"dirty"===e.status&&t.ye(),"dirty"===s.status&&t.ye(),"__proto__"===e.value||void 0===s.value&&!i.Ae||(n[e.value]=s.value)}return{status:t.value,value:n}}},A=Object.freeze({status:"aborted"}),N=t=>({status:"dirty",value:t}),_=t=>({status:"valid",value:t}),Z=t=>"aborted"===t.status,$=t=>"dirty"===t.status,E=t=>"valid"===t.status,I=t=>"undefined"!=typeof Promise&&t instanceof Promise;(w=x||(x={})).Ne=t=>"string"==typeof t?{message:t}:t||{},w.toString=t=>"string"==typeof t?t:t?.message;var M=class{constructor(t,e,n,i){this._e=[],this.parent=t,this.data=e,this.Ze=n,this.$e=i}get path(){return this._e.length||(Array.isArray(this.$e)?this._e.push(...this.Ze,...this.$e):this._e.push(...this.Ze,this.$e)),this._e}},F=(t,e)=>{if(E(e))return{Ee:!0,data:e.value};if(!t.ge.St.length)throw new Error("Validation failed but no issues detected.");return{Ee:!1,get error(){if(this.Ie)return this.Ie;const e=new h(t.ge.St);return this.Ie=e,this.Ie}}};function T(t){if(!t)return{};const{Me:e,Fe:n,Te:i,description:s}=t;if(e&&(n||i))throw new Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');return e?{Me:e,description:s}:{Me:(e,s)=>{const{message:r}=t;return"invalid_enum_value"===e.code?{message:r??s.me}:void 0===s.data?{message:r??i??s.me}:"invalid_type"!==e.code?{message:s.me}:{message:r??n??s.me}},description:s}}var S,D=class{get description(){return this.Se.description}De(t){return c(t.data)}je(t,e){return e||{ge:t.parent.ge,data:t.data,Be:c(t.data),be:this.Se.Me,path:t.path,parent:t.parent}}Pe(t){return{status:new k,Oe:{ge:t.parent.ge,data:t.data,Be:c(t.data),be:this.Se.Me,path:t.path,parent:t.parent}}}Ce(t){const e=this.ze(t);if(I(e))throw new Error("Synchronous parse encountered promise.");return e}Le(t){const e=this.ze(t);return Promise.resolve(e)}parse(t,e){const n=this.Ue(t,e);if(n.Ee)return n.data;throw n.error}Ue(t,e){const n={ge:{St:[],async:e?.async??!1,ve:e?.Me},path:e?.path||[],be:this.Se.Me,parent:null,data:t,Be:c(t)},i=this.Ce({data:t,path:n.path,parent:n});return F(n,i)}"~validate"(t){const e={ge:{St:[],async:!!this["~standard"].async},path:[],be:this.Se.Me,parent:null,data:t,Be:c(t)};if(!this["~standard"].async)try{const n=this.Ce({data:t,path:[],parent:e});return E(n)?{value:n.value}:{St:e.ge.St}}catch(t){t?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),e.ge={St:[],async:!0}}return this.Le({data:t,path:[],parent:e}).then(t=>E(t)?{value:t.value}:{St:e.ge.St})}async Ve(t,e){const n=await this.Re(t,e);if(n.Ee)return n.data;throw n.error}async Re(t,e){const n={ge:{St:[],ve:e?.Me,async:!0},path:e?.path||[],be:this.Se.Me,parent:null,data:t,Be:c(t)},i=this.ze({data:t,path:n.path,parent:n}),s=await(I(i)?i:Promise.resolve(i));return F(n,s)}We(t,e){const n=t=>"string"==typeof e||void 0===e?{message:e}:"function"==typeof e?e(t):e;return this.qe((e,i)=>{const s=t(e),r=()=>i.Dt({code:d.T,...n(e)});return"undefined"!=typeof Promise&&s instanceof Promise?s.then(t=>!!t||(r(),!1)):!!s||(r(),!1)})}Ke(t,e){return this.qe((n,i)=>!!t(n)||(i.Dt("function"==typeof e?e(n,i):e),!1))}qe(t){return new jt({He:this,Je:Kt.ZodEffects,effect:{type:"refinement",Ke:t}})}Ye(t){return this.qe(t)}constructor(t){this.Ge=this.Re,this.Se=t,this.parse=this.parse.bind(this),this.Ue=this.Ue.bind(this),this.Ve=this.Ve.bind(this),this.Re=this.Re.bind(this),this.Ge=this.Ge.bind(this),this.We=this.We.bind(this),this.Ke=this.Ke.bind(this),this.Ye=this.Ye.bind(this),this.rt=this.rt.bind(this),this.et=this.et.bind(this),this.Qe=this.Qe.bind(this),this.$=this.$.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.Xe=this.Xe.bind(this),this.tn=this.tn.bind(this),this.en=this.en.bind(this),this.nn=this.nn.bind(this),this.sn=this.sn.bind(this),this["~standard"]={version:1,vendor:"zod",validate:t=>this["~validate"](t)}}rt(){return Bt.create(this,this.Se)}et(){return Pt.create(this,this.Se)}Qe(){return this.et().rt()}$(){return vt.create(this)}promise(){return Dt.create(this,this.Se)}or(t){return yt.create([this,t],this.Se)}and(t){return At.create(this,t,this.Se)}transform(t){return new jt({...T(this.Se),He:this,Je:Kt.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const e="function"==typeof t?t:()=>t;return new Ot({...T(this.Se),rn:this,defaultValue:e,Je:Kt.ZodDefault})}brand(){return new Ut({Je:Kt.ZodBranded,type:this,...T(this.Se)})}catch(t){const e="function"==typeof t?t:()=>t;return new Ct({...T(this.Se),rn:this,an:e,Je:Kt.ZodCatch})}Xe(t){return new(0,this.constructor)({...this.Se,description:t})}tn(t){return Vt.create(this,t)}en(){return Rt.create(this)}sn(){return this.Ue(void 0).Ee}nn(){return this.Ue(null).Ee}},j=/^c[^\s-]{8,}$/i,B=/^[0-9a-z]+$/,P=/^[0-9A-HJKMNP-TV-Z]{26}$/i,O=/^[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,C=/^[a-z0-9_-]{21}$/i,z=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,L=/^[-+]?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)?)??$/,U=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,V=/^(?:(?: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])$/,R=/^(?:(?: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])$/,W=/^(([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]))$/,q=/^(([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])$/,K=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,H=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,J="((\\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])))",Y=new RegExp(`^${J}$`);function G(t){let e="[0-5]\\d";return t.precision?e=`${e}\\.\\d{${t.precision}}`:null==t.precision&&(e=`${e}(\\.\\d+)?`),`([01]\\d|2[0-3]):[0-5]\\d(:${e})${t.precision?"+":"?"}`}function Q(t){return new RegExp(`^${G(t)}$`)}function X(t){let e=`${J}T${G(t)}`;const n=[];return n.push(t.un?"Z?":"Z"),t.offset&&n.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${n.join("|")})`,new RegExp(`^${e}$`)}function tt(t,e){return!("v4"!==e&&e||!V.test(t))||!("v6"!==e&&e||!W.test(t))}function et(t,e){if(!z.test(t))return!1;try{const[n]=t.split(".");if(!n)return!1;const i=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),s=JSON.parse(atob(i));return!("object"!=typeof s||null===s||"cn"in s&&"JWT"!==s?.cn||!s.dn||e&&s.dn!==e)}catch{return!1}}function nt(t,e){return!("v4"!==e&&e||!R.test(t))||!("v6"!==e&&e||!q.test(t))}var it=class t extends D{ze(t){if(this.Se.F&&(t.data=String(t.data)),this.De(t)!==u.string){const e=this.je(t);return y(e,{code:d.Rt,qt:u.string,Wt:e.Be}),A}const e=new k;let n;for(const i of this.Se.ln)if("min"===i.kind)t.data.lengthi.value&&(n=this.je(t,n),y(n,{code:d.oe,ue:i.value,type:"string",re:!0,se:!1,message:i.message}),e.ye());else if("length"===i.kind){const s=t.data.length>i.value,r=t.data.lengtht.test(e),{ne:e,code:d.ee,...x.Ne(n)})}pn(e){return new t({...this.Se,ln:[...this.Se.ln,e]})}email(t){return this.pn({kind:"email",...x.Ne(t)})}url(t){return this.pn({kind:"url",...x.Ne(t)})}fn(t){return this.pn({kind:"emoji",...x.Ne(t)})}uuid(t){return this.pn({kind:"uuid",...x.Ne(t)})}vn(t){return this.pn({kind:"nanoid",...x.Ne(t)})}gn(t){return this.pn({kind:"cuid",...x.Ne(t)})}bn(t){return this.pn({kind:"cuid2",...x.Ne(t)})}yn(t){return this.pn({kind:"ulid",...x.Ne(t)})}xn(t){return this.pn({kind:"base64",...x.Ne(t)})}wn(t){return this.pn({kind:"base64url",...x.Ne(t)})}kn(t){return this.pn({kind:"jwt",...x.Ne(t)})}An(t){return this.pn({kind:"ip",...x.Ne(t)})}Nn(t){return this.pn({kind:"cidr",...x.Ne(t)})}_n(t){return"string"==typeof t?this.pn({kind:"datetime",precision:null,offset:!1,un:!1,message:t}):this.pn({kind:"datetime",precision:void 0===t?.precision?null:t?.precision,offset:t?.offset??!1,un:t?.un??!1,...x.Ne(t?.message)})}S(t){return this.pn({kind:"date",message:t})}time(t){return"string"==typeof t?this.pn({kind:"time",precision:null,message:t}):this.pn({kind:"time",precision:void 0===t?.precision?null:t?.precision,...x.Ne(t?.message)})}duration(t){return this.pn({kind:"duration",...x.Ne(t)})}hn(t,e){return this.pn({kind:"regex",hn:t,...x.Ne(e)})}includes(t,e){return this.pn({kind:"includes",value:t,position:e?.position,...x.Ne(e?.message)})}startsWith(t,e){return this.pn({kind:"startsWith",value:t,...x.Ne(e)})}endsWith(t,e){return this.pn({kind:"endsWith",value:t,...x.Ne(e)})}min(t,e){return this.pn({kind:"min",value:t,...x.Ne(e)})}max(t,e){return this.pn({kind:"max",value:t,...x.Ne(e)})}length(t,e){return this.pn({kind:"length",value:t,...x.Ne(e)})}Zn(t){return this.min(1,x.Ne(t))}trim(){return new t({...this.Se,ln:[...this.Se.ln,{kind:"trim"}]})}toLowerCase(){return new t({...this.Se,ln:[...this.Se.ln,{kind:"toLowerCase"}]})}toUpperCase(){return new t({...this.Se,ln:[...this.Se.ln,{kind:"toUpperCase"}]})}get $n(){return!!this.Se.ln.find(t=>"datetime"===t.kind)}get En(){return!!this.Se.ln.find(t=>"date"===t.kind)}get In(){return!!this.Se.ln.find(t=>"time"===t.kind)}get Mn(){return!!this.Se.ln.find(t=>"duration"===t.kind)}get Fn(){return!!this.Se.ln.find(t=>"email"===t.kind)}get Tn(){return!!this.Se.ln.find(t=>"url"===t.kind)}get Sn(){return!!this.Se.ln.find(t=>"emoji"===t.kind)}get Dn(){return!!this.Se.ln.find(t=>"uuid"===t.kind)}get jn(){return!!this.Se.ln.find(t=>"nanoid"===t.kind)}get Bn(){return!!this.Se.ln.find(t=>"cuid"===t.kind)}get Pn(){return!!this.Se.ln.find(t=>"cuid2"===t.kind)}get On(){return!!this.Se.ln.find(t=>"ulid"===t.kind)}get Cn(){return!!this.Se.ln.find(t=>"ip"===t.kind)}get zn(){return!!this.Se.ln.find(t=>"cidr"===t.kind)}get Ln(){return!!this.Se.ln.find(t=>"base64"===t.kind)}get Un(){return!!this.Se.ln.find(t=>"base64url"===t.kind)}get minLength(){let t=null;for(const e of this.Se.ln)"min"===e.kind&&(null===t||e.value>t)&&(t=e.value);return t}get maxLength(){let t=null;for(const e of this.Se.ln)"max"===e.kind&&(null===t||e.valuei?n:i;return Number.parseInt(t.toFixed(s).replace(".",""))%Number.parseInt(e.toFixed(s).replace(".",""))/10**s}it.create=t=>new it({ln:[],Je:Kt.ZodString,F:t?.F??!1,...T(t)});var rt=class t extends D{constructor(){super(...arguments),this.min=this.Vn,this.max=this.Rn,this.step=this.le}ze(t){if(this.Se.F&&(t.data=Number(t.data)),this.De(t)!==u.number){const e=this.je(t);return y(e,{code:d.Rt,qt:u.number,Wt:e.Be}),A}let e;const n=new k;for(const i of this.Se.ln)"int"===i.kind?s.isInteger(t.data)||(e=this.je(t,e),y(e,{code:d.Rt,qt:"integer",Wt:"float",message:i.message}),n.ye()):"min"===i.kind?(i.re?t.datai.value:t.data>=i.value)&&(e=this.je(t,e),y(e,{code:d.oe,ue:i.value,type:"number",re:i.re,se:!1,message:i.message}),n.ye()):"multipleOf"===i.kind?0!==st(t.data,i.value)&&(e=this.je(t,e),y(e,{code:d.de,le:i.value,message:i.message}),n.ye()):"finite"===i.kind?Number.isFinite(t.data)||(e=this.je(t,e),y(e,{code:d.he,message:i.message}),n.ye()):s.Nt(i);return{status:n.value,value:t.data}}Vn(t,e){return this.Wn("min",t,!0,x.toString(e))}qn(t,e){return this.Wn("min",t,!1,x.toString(e))}Rn(t,e){return this.Wn("max",t,!0,x.toString(e))}Kn(t,e){return this.Wn("max",t,!1,x.toString(e))}Wn(e,n,i,s){return new t({...this.Se,ln:[...this.Se.ln,{kind:e,value:n,re:i,message:x.toString(s)}]})}pn(e){return new t({...this.Se,ln:[...this.Se.ln,e]})}Hn(t){return this.pn({kind:"int",message:x.toString(t)})}Jn(t){return this.pn({kind:"min",value:0,re:!1,message:x.toString(t)})}negative(t){return this.pn({kind:"max",value:0,re:!1,message:x.toString(t)})}Yn(t){return this.pn({kind:"max",value:0,re:!0,message:x.toString(t)})}Gn(t){return this.pn({kind:"min",value:0,re:!0,message:x.toString(t)})}le(t,e){return this.pn({kind:"multipleOf",value:t,message:x.toString(e)})}Qn(t){return this.pn({kind:"finite",message:x.toString(t)})}Xn(t){return this.pn({kind:"min",re:!0,value:Number.MIN_SAFE_INTEGER,message:x.toString(t)}).pn({kind:"max",re:!0,value:Number.MAX_SAFE_INTEGER,message:x.toString(t)})}get minValue(){let t=null;for(const e of this.Se.ln)"min"===e.kind&&(null===t||e.value>t)&&(t=e.value);return t}get maxValue(){let t=null;for(const e of this.Se.ln)"max"===e.kind&&(null===t||e.value"int"===t.kind||"multipleOf"===t.kind&&s.isInteger(t.value))}get isFinite(){let t=null,e=null;for(const n of this.Se.ln){if("finite"===n.kind||"int"===n.kind||"multipleOf"===n.kind)return!0;"min"===n.kind?(null===e||n.value>e)&&(e=n.value):"max"===n.kind&&(null===t||n.valuenew rt({ln:[],Je:Kt.ZodNumber,F:t?.F||!1,...T(t)});var at=class t extends D{constructor(){super(...arguments),this.min=this.Vn,this.max=this.Rn}ze(t){if(this.Se.F)try{t.data=BigInt(t.data)}catch{return this.ei(t)}if(this.De(t)!==u.I)return this.ei(t);let e;const n=new k;for(const i of this.Se.ln)"min"===i.kind?(i.re?t.datai.value:t.data>=i.value)&&(e=this.je(t,e),y(e,{code:d.oe,type:"bigint",ue:i.value,re:i.re,message:i.message}),n.ye()):"multipleOf"===i.kind?t.data%i.value!==BigInt(0)&&(e=this.je(t,e),y(e,{code:d.de,le:i.value,message:i.message}),n.ye()):s.Nt(i);return{status:n.value,value:t.data}}ei(t){const e=this.je(t);return y(e,{code:d.Rt,qt:u.I,Wt:e.Be}),A}Vn(t,e){return this.Wn("min",t,!0,x.toString(e))}qn(t,e){return this.Wn("min",t,!1,x.toString(e))}Rn(t,e){return this.Wn("max",t,!0,x.toString(e))}Kn(t,e){return this.Wn("max",t,!1,x.toString(e))}Wn(e,n,i,s){return new t({...this.Se,ln:[...this.Se.ln,{kind:e,value:n,re:i,message:x.toString(s)}]})}pn(e){return new t({...this.Se,ln:[...this.Se.ln,e]})}Jn(t){return this.pn({kind:"min",value:BigInt(0),re:!1,message:x.toString(t)})}negative(t){return this.pn({kind:"max",value:BigInt(0),re:!1,message:x.toString(t)})}Yn(t){return this.pn({kind:"max",value:BigInt(0),re:!0,message:x.toString(t)})}Gn(t){return this.pn({kind:"min",value:BigInt(0),re:!0,message:x.toString(t)})}le(t,e){return this.pn({kind:"multipleOf",value:t,message:x.toString(e)})}get minValue(){let t=null;for(const e of this.Se.ln)"min"===e.kind&&(null===t||e.value>t)&&(t=e.value);return t}get maxValue(){let t=null;for(const e of this.Se.ln)"max"===e.kind&&(null===t||e.valuenew at({ln:[],Je:Kt.ZodBigInt,F:t?.F??!1,...T(t)});var ot=class extends D{ze(t){if(this.Se.F&&(t.data=Boolean(t.data)),this.De(t)!==u.M){const e=this.je(t);return y(e,{code:d.Rt,qt:u.M,Wt:e.Be}),A}return _(t.data)}};ot.create=t=>new ot({Je:Kt.ZodBoolean,F:t?.F||!1,...T(t)});var ut=class t extends D{ze(t){if(this.Se.F&&(t.data=new Date(t.data)),this.De(t)!==u.S){const e=this.je(t);return y(e,{code:d.Rt,qt:u.S,Wt:e.Be}),A}if(Number.isNaN(t.data.getTime()))return y(this.je(t),{code:d.te}),A;const e=new k;let n;for(const i of this.Se.ln)"min"===i.kind?t.data.getTime()i.value&&(n=this.je(t,n),y(n,{code:d.oe,message:i.message,re:!0,se:!1,ue:i.value,type:"date"}),e.ye()):s.Nt(i);return{status:e.value,value:new Date(t.data.getTime())}}pn(e){return new t({...this.Se,ln:[...this.Se.ln,e]})}min(t,e){return this.pn({kind:"min",value:t.getTime(),message:x.toString(e)})}max(t,e){return this.pn({kind:"max",value:t.getTime(),message:x.toString(e)})}get ni(){let t=null;for(const e of this.Se.ln)"min"===e.kind&&(null===t||e.value>t)&&(t=e.value);return null!=t?new Date(t):null}get ii(){let t=null;for(const e of this.Se.ln)"max"===e.kind&&(null===t||e.valuenew ut({ln:[],F:t?.F||!1,Je:Kt.ZodDate,...T(t)});var ct=class extends D{ze(t){if(this.De(t)!==u.vt){const e=this.je(t);return y(e,{code:d.Rt,qt:u.vt,Wt:e.Be}),A}return _(t.data)}};ct.create=t=>new ct({Je:Kt.ZodSymbol,...T(t)});var dt=class extends D{ze(t){if(this.De(t)!==u.undefined){const e=this.je(t);return y(e,{code:d.Rt,qt:u.undefined,Wt:e.Be}),A}return _(t.data)}};dt.create=t=>new dt({Je:Kt.ZodUndefined,...T(t)});var lt=class extends D{ze(t){if(this.De(t)!==u.null){const e=this.je(t);return y(e,{code:d.Rt,qt:u.null,Wt:e.Be}),A}return _(t.data)}};lt.create=t=>new lt({Je:Kt.ZodNull,...T(t)});var ht=class extends D{constructor(){super(...arguments),this.si=!0}ze(t){return _(t.data)}};ht.create=t=>new ht({Je:Kt.ZodAny,...T(t)});var mt=class extends D{constructor(){super(...arguments),this.ri=!0}ze(t){return _(t.data)}};mt.create=t=>new mt({Je:Kt.ZodUnknown,...T(t)});var pt=class extends D{ze(t){const e=this.je(t);return y(e,{code:d.Rt,qt:u.tt,Wt:e.Be}),A}};pt.create=t=>new pt({Je:Kt.ZodNever,...T(t)});var ft=class extends D{ze(t){if(this.De(t)!==u.undefined){const e=this.je(t);return y(e,{code:d.Rt,qt:u.wt,Wt:e.Be}),A}return _(t.data)}};ft.create=t=>new ft({Je:Kt.ZodVoid,...T(t)});var vt=class t extends D{ze(t){const{Oe:e,status:n}=this.Pe(t),i=this.Se;if(e.Be!==u.$)return y(e,{code:d.Rt,qt:u.$,Wt:e.Be}),A;if(null!==i.ai){const t=e.data.length>i.ai.value,s=e.data.lengthi.maxLength.value&&(y(e,{code:d.oe,ue:i.maxLength.value,type:"array",re:!0,se:!1,message:i.maxLength.message}),n.ye()),e.ge.async)return Promise.all([...e.data].map((t,n)=>i.type.Le(new M(e,t,e.path,n)))).then(t=>k.xe(n,t));const s=[...e.data].map((t,n)=>i.type.Ce(new M(e,t,e.path,n)));return k.xe(n,s)}get element(){return this.Se.type}min(e,n){return new t({...this.Se,minLength:{value:e,message:x.toString(n)}})}max(e,n){return new t({...this.Se,maxLength:{value:e,message:x.toString(n)}})}length(e,n){return new t({...this.Se,ai:{value:e,message:x.toString(n)}})}Zn(t){return this.min(1,t)}};function gt(t){if(t instanceof bt){const e={};for(const n in t.shape){const i=t.shape[n];e[n]=Bt.create(gt(i))}return new bt({...t.Se,shape:()=>e})}return t instanceof vt?new vt({...t.Se,type:gt(t.element)}):t instanceof Bt?Bt.create(gt(t.oi())):t instanceof Pt?Pt.create(gt(t.oi())):t instanceof Nt?Nt.create(t.items.map(t=>gt(t))):t}vt.create=(t,e)=>new vt({type:t,minLength:null,maxLength:null,ai:null,Je:Kt.ZodArray,...T(e)});var bt=class t extends D{constructor(){super(...arguments),this.ui=null,this.ci=this.di,this.li=this.extend}hi(){if(null!==this.ui)return this.ui;const t=this.Se.shape(),e=s.$t(t);return this.ui={shape:t,keys:e},this.ui}ze(t){if(this.De(t)!==u.object){const e=this.je(t);return y(e,{code:d.Rt,qt:u.object,Wt:e.Be}),A}const{status:e,Oe:n}=this.Pe(t),{shape:i,keys:s}=this.hi(),r=[];if(!(this.Se.mi instanceof pt&&"strip"===this.Se.pi))for(const t in n.data)s.includes(t)||r.push(t);const a=[];for(const t of s){const e=i[t],s=n.data[t];a.push({key:{status:"valid",value:t},value:e.ze(new M(n,s,n.path,t)),Ae:t in n.data})}if(this.Se.mi instanceof pt){const t=this.Se.pi;if("passthrough"===t)for(const t of r)a.push({key:{status:"valid",value:t},value:{status:"valid",value:n.data[t]}});else if("strict"===t)r.length>0&&(y(n,{code:d.Ht,keys:r}),e.ye());else if("strip"!==t)throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const t=this.Se.mi;for(const e of r){const i=n.data[e];a.push({key:{status:"valid",value:e},value:t.ze(new M(n,i,n.path,e)),Ae:e in n.data})}}return n.ge.async?Promise.resolve().then(async()=>{const t=[];for(const e of a){const n=await e.key,i=await e.value;t.push({key:n,value:i,Ae:e.Ae})}return t}).then(t=>k.ke(e,t)):k.ke(e,a)}get shape(){return this.Se.shape()}fi(e){return x.Ne,new t({...this.Se,pi:"strict",...void 0!==e?{Me:(t,n)=>{const i=this.Se.Me?.(t,n).message??n.me;return"unrecognized_keys"===t.code?{message:x.Ne(e).message??i}:{message:i}}}:{}})}gi(){return new t({...this.Se,pi:"strip"})}di(){return new t({...this.Se,pi:"passthrough"})}extend(e){return new t({...this.Se,shape:()=>({...this.Se.shape(),...e})})}bi(e){return new t({pi:e.Se.pi,mi:e.Se.mi,shape:()=>({...this.Se.shape(),...e.Se.shape()}),Je:Kt.ZodObject})}yi(t,e){return this.li({[t]:e})}mi(e){return new t({...this.Se,mi:e})}xi(e){const n={};for(const t of s.$t(e))e[t]&&this.shape[t]&&(n[t]=this.shape[t]);return new t({...this.Se,shape:()=>n})}wi(e){const n={};for(const t of s.$t(this.shape))e[t]||(n[t]=this.shape[t]);return new t({...this.Se,shape:()=>n})}ki(){return gt(this)}Ai(e){const n={};for(const t of s.$t(this.shape)){const i=this.shape[t];e&&!e[t]?n[t]=i:n[t]=i.rt()}return new t({...this.Se,shape:()=>n})}required(e){const n={};for(const t of s.$t(this.shape))if(e&&!e[t])n[t]=this.shape[t];else{let e=this.shape[t];for(;e instanceof Bt;)e=e.Se.rn;n[t]=e}return new t({...this.Se,shape:()=>n})}Ni(){return Ft(s.$t(this.shape))}};bt.create=(t,e)=>new bt({shape:()=>t,pi:"strip",mi:pt.create(),Je:Kt.ZodObject,...T(e)}),bt._i=(t,e)=>new bt({shape:()=>t,pi:"strict",mi:pt.create(),Je:Kt.ZodObject,...T(e)}),bt.Zi=(t,e)=>new bt({shape:t,pi:"strip",mi:pt.create(),Je:Kt.ZodObject,...T(e)});var yt=class extends D{ze(t){const{Oe:e}=this.Pe(t),n=this.Se.options;if(e.ge.async)return Promise.all(n.map(async t=>{const n={...e,ge:{...e.ge,St:[]},parent:null};return{result:await t.Le({data:e.data,path:e.path,parent:n}),Oe:n}})).then(function(t){for(const e of t)if("valid"===e.result.status)return e.result;for(const n of t)if("dirty"===n.result.status)return e.ge.St.push(...n.Oe.ge.St),n.result;const n=t.map(t=>new h(t.Oe.ge.St));return y(e,{code:d.Jt,Pt:n}),A});{let t;const i=[];for(const s of n){const n={...e,ge:{...e.ge,St:[]},parent:null},r=s.Ce({data:e.data,path:e.path,parent:n});if("valid"===r.status)return r;"dirty"!==r.status||t||(t={result:r,Oe:n}),n.ge.St.length&&i.push(n.ge.St)}if(t)return e.ge.St.push(...t.Oe.ge.St),t.result;const s=i.map(t=>new h(t));return y(e,{code:d.Jt,Pt:s}),A}}get options(){return this.Se.options}};yt.create=(t,e)=>new yt({options:t,Je:Kt.ZodUnion,...T(e)});var xt=t=>t instanceof It?xt(t.He):t instanceof jt?xt(t.rn()):t instanceof Mt?[t.value]:t instanceof Tt?t.options:t instanceof St?s.Et(t.P):t instanceof Ot?xt(t.Se.rn):t instanceof dt?[void 0]:t instanceof lt?[null]:t instanceof Bt?[void 0,...xt(t.oi())]:t instanceof Pt?[null,...xt(t.oi())]:t instanceof Ut||t instanceof Rt?xt(t.oi()):t instanceof Ct?xt(t.Se.rn):[],wt=class t extends D{ze(t){const{Oe:e}=this.Pe(t);if(e.Be!==u.object)return y(e,{code:d.Rt,qt:u.object,Wt:e.Be}),A;const n=this.$i,i=e.data[n],s=this.Ei.get(i);return s?e.ge.async?s.Le({data:e.data,path:e.path,parent:e}):s.Ce({data:e.data,path:e.path,parent:e}):(y(e,{code:d.Yt,options:Array.from(this.Ei.keys()),path:[n]}),A)}get $i(){return this.Se.$i}get options(){return this.Se.options}get Ei(){return this.Se.Ei}static create(e,n,i){const s=new Map;for(const t of n){const n=xt(t.shape[e]);if(!n.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const i of n){if(s.has(i))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(i)}`);s.set(i,t)}}return new t({Je:Kt.ZodDiscriminatedUnion,$i:e,options:n,Ei:s,...T(i)})}};function kt(t,e){const n=c(t),i=c(e);if(t===e)return{valid:!0,data:t};if(n===u.object&&i===u.object){const n=s.$t(e),i=s.$t(t).filter(t=>-1!==n.indexOf(t)),r={...t,...e};for(const n of i){const i=kt(t[n],e[n]);if(!i.valid)return{valid:!1};r[n]=i.data}return{valid:!0,data:r}}if(n===u.$&&i===u.$){if(t.length!==e.length)return{valid:!1};const n=[];for(let i=0;i{if(Z(t)||Z(i))return A;const s=kt(t.value,i.value);return s.valid?(($(t)||$(i))&&e.ye(),{status:e.value,value:s.data}):(y(n,{code:d.ce}),A)};return n.ge.async?Promise.all([this.Se.left.Le({data:n.data,path:n.path,parent:n}),this.Se.right.Le({data:n.data,path:n.path,parent:n})]).then(([t,e])=>i(t,e)):i(this.Se.left.Ce({data:n.data,path:n.path,parent:n}),this.Se.right.Ce({data:n.data,path:n.path,parent:n}))}};At.create=(t,e,n)=>new At({left:t,right:e,Je:Kt.ZodIntersection,...T(n)});var Nt=class t extends D{ze(t){const{status:e,Oe:n}=this.Pe(t);if(n.Be!==u.$)return y(n,{code:d.Rt,qt:u.$,Wt:n.Be}),A;if(n.data.lengththis.Se.items.length&&(y(n,{code:d.oe,ue:this.Se.items.length,re:!0,se:!1,type:"array"}),e.ye());const i=[...n.data].map((t,e)=>{const i=this.Se.items[e]||this.Se.Ii;return i?i.ze(new M(n,t,n.path,e)):null}).filter(t=>!!t);return n.ge.async?Promise.all(i).then(t=>k.xe(e,t)):k.xe(e,i)}get items(){return this.Se.items}Ii(e){return new t({...this.Se,Ii:e})}};Nt.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Nt({items:t,Je:Kt.ZodTuple,Ii:null,...T(e)})};var _t=class t extends D{get Mi(){return this.Se.Fi}get Ti(){return this.Se.valueType}ze(t){const{status:e,Oe:n}=this.Pe(t);if(n.Be!==u.object)return y(n,{code:d.Rt,qt:u.object,Wt:n.Be}),A;const i=[],s=this.Se.Fi,r=this.Se.valueType;for(const t in n.data)i.push({key:s.ze(new M(n,t,n.path,t)),value:r.ze(new M(n,n.data[t],n.path,t)),Ae:t in n.data});return n.ge.async?k.we(e,i):k.ke(e,i)}get element(){return this.Se.valueType}static create(e,n,i){return new t(n instanceof D?{Fi:e,valueType:n,Je:Kt.ZodRecord,...T(i)}:{Fi:it.create(),valueType:e,Je:Kt.ZodRecord,...T(n)})}},Zt=class extends D{get Mi(){return this.Se.Fi}get Ti(){return this.Se.valueType}ze(t){const{status:e,Oe:n}=this.Pe(t);if(n.Be!==u.map)return y(n,{code:d.Rt,qt:u.map,Wt:n.Be}),A;const i=this.Se.Fi,s=this.Se.valueType,r=[...n.data.entries()].map(([t,e],r)=>({key:i.ze(new M(n,t,n.path,[r,"key"])),value:s.ze(new M(n,e,n.path,[r,"value"]))}));if(n.ge.async){const t=new Map;return Promise.resolve().then(async()=>{for(const n of r){const i=await n.key,s=await n.value;if("aborted"===i.status||"aborted"===s.status)return A;"dirty"!==i.status&&"dirty"!==s.status||e.ye(),t.set(i.value,s.value)}return{status:e.value,value:t}})}{const t=new Map;for(const n of r){const i=n.key,s=n.value;if("aborted"===i.status||"aborted"===s.status)return A;"dirty"!==i.status&&"dirty"!==s.status||e.ye(),t.set(i.value,s.value)}return{status:e.value,value:t}}}};Zt.create=(t,e,n)=>new Zt({valueType:e,Fi:t,Je:Kt.ZodMap,...T(n)});var $t=class t extends D{ze(t){const{status:e,Oe:n}=this.Pe(t);if(n.Be!==u.set)return y(n,{code:d.Rt,qt:u.set,Wt:n.Be}),A;const i=this.Se;null!==i.Si&&n.data.sizei.Di.value&&(y(n,{code:d.oe,ue:i.Di.value,type:"set",re:!0,se:!1,message:i.Di.message}),e.ye());const s=this.Se.valueType;function r(t){const n=new Set;for(const i of t){if("aborted"===i.status)return A;"dirty"===i.status&&e.ye(),n.add(i.value)}return{status:e.value,value:n}}const a=[...n.data.values()].map((t,e)=>s.ze(new M(n,t,n.path,e)));return n.ge.async?Promise.all(a).then(t=>r(t)):r(a)}min(e,n){return new t({...this.Se,Si:{value:e,message:x.toString(n)}})}max(e,n){return new t({...this.Se,Di:{value:e,message:x.toString(n)}})}size(t,e){return this.min(t,e).max(t,e)}Zn(t){return this.min(1,t)}};$t.create=(t,e)=>new $t({valueType:t,Si:null,Di:null,Je:Kt.ZodSet,...T(e)});var Et=class t extends D{constructor(){super(...arguments),this.validate=this.ji}ze(t){const{Oe:e}=this.Pe(t);if(e.Be!==u.O)return y(e,{code:d.Rt,qt:u.O,Wt:e.Be}),A;function n(t,n){return g({data:t,path:e.path,pe:[e.ge.ve,e.be,v(),m].filter(t=>!!t),fe:{code:d.Qt,Ct:n}})}function i(t,n){return g({data:t,path:e.path,pe:[e.ge.ve,e.be,v(),m].filter(t=>!!t),fe:{code:d.Xt,Ot:n}})}const s={Me:e.ge.ve},r=e.data;if(this.Se.Bi instanceof Dt){const t=this;return _(async function(...e){const a=new h([]),o=await t.Se.Pi.Ve(e,s).catch(t=>{throw a.Dt(n(e,t)),a}),u=await Reflect.apply(r,this,o);return await t.Se.Bi.Se.type.Ve(u,s).catch(t=>{throw a.Dt(i(u,t)),a})})}{const t=this;return _(function(...e){const a=t.Se.Pi.Ue(e,s);if(!a.Ee)throw new h([n(e,a.error)]);const o=Reflect.apply(r,this,a.data),u=t.Se.Bi.Ue(o,s);if(!u.Ee)throw new h([i(o,u.error)]);return u.data})}}parameters(){return this.Se.Pi}Oi(){return this.Se.Bi}Pi(...e){return new t({...this.Se,Pi:Nt.create(e).Ii(mt.create())})}Bi(e){return new t({...this.Se,Bi:e})}ji(t){return this.parse(t)}Ci(t){return this.parse(t)}static create(e,n,i){return new t({Pi:e||Nt.create([]).Ii(mt.create()),Bi:n||mt.create(),Je:Kt.ZodFunction,...T(i)})}},It=class extends D{get He(){return this.Se.zi()}ze(t){const{Oe:e}=this.Pe(t);return this.Se.zi().ze({data:e.data,path:e.path,parent:e})}};It.create=(t,e)=>new It({zi:t,Je:Kt.ZodLazy,...T(e)});var Mt=class extends D{ze(t){if(t.data!==this.Se.value){const e=this.je(t);return y(e,{Wt:e.data,code:d.Kt,qt:this.Se.value}),A}return{status:"valid",value:t.data}}get value(){return this.Se.value}};function Ft(t,e){return new Tt({values:t,Je:Kt.ZodEnum,...T(e)})}Mt.create=(t,e)=>new Mt({value:t,Je:Kt.ZodLiteral,...T(e)});var Tt=class t extends D{ze(t){if("string"!=typeof t.data){const e=this.je(t),n=this.Se.values;return y(e,{qt:s.It(n),Wt:e.Be,code:d.Rt}),A}if(this.Li||(this.Li=new Set(this.Se.values)),!this.Li.has(t.data)){const e=this.je(t),n=this.Se.values;return y(e,{Wt:e.data,code:d.Gt,options:n}),A}return _(t.data)}get options(){return this.Se.values}get P(){const t={};for(const e of this.Se.values)t[e]=e;return t}get Ui(){const t={};for(const e of this.Se.values)t[e]=e;return t}get Vi(){const t={};for(const e of this.Se.values)t[e]=e;return t}Ri(e,n=this.Se){return t.create(e,{...this.Se,...n})}Wi(e,n=this.Se){return t.create(this.options.filter(t=>!e.includes(t)),{...this.Se,...n})}};Tt.create=Ft;var St=class extends D{ze(t){const e=s.Zt(this.Se.values),n=this.je(t);if(n.Be!==u.string&&n.Be!==u.number){const t=s.Et(e);return y(n,{qt:s.It(t),Wt:n.Be,code:d.Rt}),A}if(this.Li||(this.Li=new Set(s.Zt(this.Se.values))),!this.Li.has(t.data)){const t=s.Et(e);return y(n,{Wt:n.data,code:d.Gt,options:t}),A}return _(t.data)}get P(){return this.Se.values}};St.create=(t,e)=>new St({values:t,Je:Kt.ZodNativeEnum,...T(e)});var Dt=class extends D{oi(){return this.Se.type}ze(t){const{Oe:e}=this.Pe(t);if(e.Be!==u.promise&&!1===e.ge.async)return y(e,{code:d.Rt,qt:u.promise,Wt:e.Be}),A;const n=e.Be===u.promise?e.data:Promise.resolve(e.data);return _(n.then(t=>this.Se.type.Ve(t,{path:e.path,Me:e.ge.ve})))}};Dt.create=(t,e)=>new Dt({type:t,Je:Kt.ZodPromise,...T(e)});var jt=class extends D{rn(){return this.Se.He}qi(){return this.Se.He.Se.Je===Kt.ZodEffects?this.Se.He.qi():this.Se.He}ze(t){const{status:e,Oe:n}=this.Pe(t),i=this.Se.effect||null,r={Dt:t=>{y(n,t),t.fatal?e.abort():e.ye()},get path(){return n.path}};if(r.Dt=r.Dt.bind(r),"preprocess"===i.type){const t=i.transform(n.data,r);if(n.ge.async)return Promise.resolve(t).then(async t=>{if("aborted"===e.value)return A;const i=await this.Se.He.Le({data:t,path:n.path,parent:n});return"aborted"===i.status?A:"dirty"===i.status||"dirty"===e.value?N(i.value):i});{if("aborted"===e.value)return A;const i=this.Se.He.Ce({data:t,path:n.path,parent:n});return"aborted"===i.status?A:"dirty"===i.status||"dirty"===e.value?N(i.value):i}}if("refinement"===i.type){const t=t=>{const e=i.Ke(t,r);if(n.ge.async)return Promise.resolve(e);if(e instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return t};if(!1===n.ge.async){const i=this.Se.He.Ce({data:n.data,path:n.path,parent:n});return"aborted"===i.status?A:("dirty"===i.status&&e.ye(),t(i.value),{status:e.value,value:i.value})}return this.Se.He.Le({data:n.data,path:n.path,parent:n}).then(n=>"aborted"===n.status?A:("dirty"===n.status&&e.ye(),t(n.value).then(()=>({status:e.value,value:n.value}))))}if("transform"===i.type){if(!1===n.ge.async){const t=this.Se.He.Ce({data:n.data,path:n.path,parent:n});if(!E(t))return A;const s=i.transform(t.value,r);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:e.value,value:s}}return this.Se.He.Le({data:n.data,path:n.path,parent:n}).then(t=>E(t)?Promise.resolve(i.transform(t.value,r)).then(t=>({status:e.value,value:t})):A)}s.Nt(i)}};jt.create=(t,e,n)=>new jt({He:t,Je:Kt.ZodEffects,effect:e,...T(n)}),jt.Ki=(t,e,n)=>new jt({He:e,effect:{type:"preprocess",transform:t},Je:Kt.ZodEffects,...T(n)});var Bt=class extends D{ze(t){return this.De(t)===u.undefined?_(void 0):this.Se.rn.ze(t)}oi(){return this.Se.rn}};Bt.create=(t,e)=>new Bt({rn:t,Je:Kt.ZodOptional,...T(e)});var Pt=class extends D{ze(t){return this.De(t)===u.null?_(null):this.Se.rn.ze(t)}oi(){return this.Se.rn}};Pt.create=(t,e)=>new Pt({rn:t,Je:Kt.ZodNullable,...T(e)});var Ot=class extends D{ze(t){const{Oe:e}=this.Pe(t);let n=e.data;return e.Be===u.undefined&&(n=this.Se.defaultValue()),this.Se.rn.ze({data:n,path:e.path,parent:e})}Hi(){return this.Se.rn}};Ot.create=(t,e)=>new Ot({rn:t,Je:Kt.ZodDefault,defaultValue:"function"==typeof e.default?e.default:()=>e.default,...T(e)});var Ct=class extends D{ze(t){const{Oe:e}=this.Pe(t),n={...e,ge:{...e.ge,St:[]}},i=this.Se.rn.ze({data:n.data,path:n.path,parent:{...n}});return I(i)?i.then(t=>({status:"valid",value:"valid"===t.status?t.value:this.Se.an({get error(){return new h(n.ge.St)},input:n.data})})):{status:"valid",value:"valid"===i.status?i.value:this.Se.an({get error(){return new h(n.ge.St)},input:n.data})}}Ji(){return this.Se.rn}};Ct.create=(t,e)=>new Ct({rn:t,Je:Kt.ZodCatch,an:"function"==typeof e.catch?e.catch:()=>e.catch,...T(e)});var zt=class extends D{ze(t){if(this.De(t)!==u.G){const e=this.je(t);return y(e,{code:d.Rt,qt:u.G,Wt:e.Be}),A}return{status:"valid",value:t.data}}};zt.create=t=>new zt({Je:Kt.ZodNaN,...T(t)});var Lt=Symbol("zod_brand"),Ut=class extends D{ze(t){const{Oe:e}=this.Pe(t),n=e.data;return this.Se.type.ze({data:n,path:e.path,parent:e})}oi(){return this.Se.type}},Vt=class t extends D{ze(t){const{status:e,Oe:n}=this.Pe(t);if(n.ge.async)return(async()=>{const t=await this.Se.in.Le({data:n.data,path:n.path,parent:n});return"aborted"===t.status?A:"dirty"===t.status?(e.ye(),N(t.value)):this.Se.Yi.Le({data:t.value,path:n.path,parent:n})})();{const t=this.Se.in.Ce({data:n.data,path:n.path,parent:n});return"aborted"===t.status?A:"dirty"===t.status?(e.ye(),{status:"dirty",value:t.value}):this.Se.Yi.Ce({data:t.value,path:n.path,parent:n})}}static create(e,n){return new t({in:e,Yi:n,Je:Kt.ZodPipeline})}},Rt=class extends D{ze(t){const e=this.Se.rn.ze(t),n=t=>(E(t)&&(t.value=Object.freeze(t.value)),t);return I(e)?e.then(t=>n(t)):n(e)}oi(){return this.Se.rn}};function Wt(t,e){const n="function"==typeof t?t(e):"string"==typeof t?{message:t}:t;return"string"==typeof n?{message:n}:n}function qt(t,e={},n){return t?ht.create().Ye((i,s)=>{const r=t(i);if(r instanceof Promise)return r.then(t=>{if(!t){const t=Wt(e,i),r=t.fatal??n??!0;s.Dt({code:"custom",...t,fatal:r})}});if(!r){const t=Wt(e,i),r=t.fatal??n??!0;s.Dt({code:"custom",...t,fatal:r})}}):ht.create()}Rt.create=(t,e)=>new Rt({rn:t,Je:Kt.ZodReadonly,...T(e)});var Kt,Ht,Jt={object:bt.Zi};(Ht=Kt||(Kt={})).ZodString="ZodString",Ht.ZodNumber="ZodNumber",Ht.ZodNaN="ZodNaN",Ht.ZodBigInt="ZodBigInt",Ht.ZodBoolean="ZodBoolean",Ht.ZodDate="ZodDate",Ht.ZodSymbol="ZodSymbol",Ht.ZodUndefined="ZodUndefined",Ht.ZodNull="ZodNull",Ht.ZodAny="ZodAny",Ht.ZodUnknown="ZodUnknown",Ht.ZodNever="ZodNever",Ht.ZodVoid="ZodVoid",Ht.ZodArray="ZodArray",Ht.ZodObject="ZodObject",Ht.ZodUnion="ZodUnion",Ht.ZodDiscriminatedUnion="ZodDiscriminatedUnion",Ht.ZodIntersection="ZodIntersection",Ht.ZodTuple="ZodTuple",Ht.ZodRecord="ZodRecord",Ht.ZodMap="ZodMap",Ht.ZodSet="ZodSet",Ht.ZodFunction="ZodFunction",Ht.ZodLazy="ZodLazy",Ht.ZodLiteral="ZodLiteral",Ht.ZodEnum="ZodEnum",Ht.ZodEffects="ZodEffects",Ht.ZodNativeEnum="ZodNativeEnum",Ht.ZodOptional="ZodOptional",Ht.ZodNullable="ZodNullable",Ht.ZodDefault="ZodDefault",Ht.ZodCatch="ZodCatch",Ht.ZodPromise="ZodPromise",Ht.ZodBranded="ZodBranded",Ht.ZodPipeline="ZodPipeline",Ht.ZodReadonly="ZodReadonly";var Yt=(t,e={message:`Input not instance of ${t.name}`})=>qt(e=>e instanceof t,e),Gt=it.create,Qt=rt.create,Xt=zt.create,te=at.create,ee=ot.create,ne=ut.create,ie=ct.create,se=dt.create,re=lt.create,ae=ht.create,oe=mt.create,ue=pt.create,ce=ft.create,de=vt.create,le=bt.create,he=bt._i,me=yt.create,pe=wt.create,fe=At.create,ve=Nt.create,ge=_t.create,be=Zt.create,ye=$t.create,xe=Et.create,we=It.create,ke=Mt.create,Ae=Tt.create,Ne=St.create,_e=Dt.create,Ze=jt.create,$e=Bt.create,Ee=Pt.create,Ie=jt.Ki,Me=Vt.create,Fe=()=>Gt().rt(),Te=()=>Qt().rt(),Se=()=>ee().rt(),De={string:t=>it.create({...t,F:!0}),number:t=>rt.create({...t,F:!0}),M:t=>ot.create({...t,F:!0}),I:t=>at.create({...t,F:!0}),S:t=>ut.create({...t,F:!0})},je=A,Be=o,Pe=Be.object({Gi:Be.object({Qi:Be.string(),Xi:Be.string().We(t=>t.match("^0|([1-9]d*)([.](0|([1-9]d*))){2}$")),ts:Be.string().We(t=>t.match("^0|([1-9]d*)([.](0|([1-9]d*))){2}$")).rt()}),es:Be.object({name:Be.string(),ns:Be.string()}).rt(),ss:Be.$(Be.object({name:Be.string().rt(),enabled:Be.M(),coords:Be.object({rs:Be.number(),us:Be.number(),px:Be.number(),cs:Be.number()}),sources:Be.$(Be.string()),ds:Be.number().rt(),animation:Be.object({ls:Be.number().rt(),hs:Be.number().rt(),frameCount:Be.number().rt(),ps:Be.number().rt(),fs:Be.number().rt(),vs:Be.number().rt(),gs:Be.number().rt(),startTime:Be.number().rt(),looping:Be.M().rt()}).rt(),uuid:Be.string()})),bs:Be.$(Be.object({name:Be.string().rt(),url:Be.string()})),ys:Be.$(Be.object({name:Be.string().rt(),url:Be.string()}))}),Oe=Be.object({name:Be.string().rt(),coords:Be.$(Be.number()),xs:Be.number().rt(),enabled:Be.M(),ws:Be.string().rt(),uuid:Be.string()}),Ce=Be.object({name:Be.string().rt(),url:Be.string(),ks:Be.$(Be.object({xs:Be.number().rt(),uuid:Be.string()})).rt()}),ze=Be.object({Qi:Be.string(),ts:Be.string().We(t=>t.match("^0|([1-9]d*)([.](0|([1-9]d*))){2}$")).rt(),Xi:Be.string().We(t=>t.match("^0|([1-9]d*)([.](0|([1-9]d*))){2}$")),ss:Be.$(Oe),links:Be.$(Ce).rt()}),Le=document.querySelector("#bm-manage-templates table");Le&&"TABLE"===Le.nodeName.toLocaleUpperCase()&&(Le=Le.children[0])&&"BM"===Re.getType()&&Re.get().ss.forEach((t,e)=>{const i=n("tr",{id:"main-row"}),s=n("td",{textContent:e.toString()}),r=n("td",{textContent:t.name||"unnamed-0"}),a=document.createElement("td"),o=n("button",{id:"enable"});a.appendChild(o);const u=document.createElement("td"),c=n("button",{id:"exportAdd"});u.appendChild(c);const d=document.createElement("td"),l=n("div",{className:"shifts-container"}),h=n("button",{id:"up"}),m=n("button",{id:"down"});l.append(h,m),d.appendChild(l),i.append(s,r,a,u,d)});var Ue={"bm-create-template":"flex","bm-main-overlay":"flex","bm-manage-links":"flex","bm-manage-templates":"flex"},Ve=document.createElement("style");Ve.textContent='#bm-overlay{position:fixed;background-color:#153063e6;color:#fff;padding:10px;border-radius:8px;z-index:9000;transition:all .3s ease,transform 0s;max-width:300px;width:auto;will-change:transform;backface-visibility:hidden;-webkit-backface-visibility:hidden;transform-style:preserve-3d;-webkit-transform-style:preserve-3d}#bm-contain-userinfo,#bm-overlay hr,#bm-contain-automation,#bm-contain-buttons-action{transition:opacity .2s ease,height .2s ease}div#bm-overlay{font-family:Roboto Mono,Courier New,Monaco,DejaVu Sans Mono,monospace,Arial;letter-spacing:.05em}#bm-bar-drag{margin-bottom:.5em;background:url(\'data:image/svg+xml;utf8,\') repeat;cursor:grab;width:100%;height:1em}#bm-bar-drag.dragging{cursor:grabbing}#bm-overlay:has(#bm-bar-drag.dragging){pointer-events:none;user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none}#bm-bar-drag.dragging{pointer-events:auto}#bm-contain-header{margin-bottom:.5em}#bm-contain-header[style*="text-align: center"]{display:flex;flex-direction:column;align-items:center;justify-content:center}#bm-overlay[style*="padding: 5px"]{width:auto!important;max-width:300px;min-width:200px}#bm-overlay img{display:inline-block;height:2.5em;margin-right:1ch;vertical-align:middle;transition:opacity .2s ease}#bm-contain-header[style*="text-align: center"] img{display:block;margin:0 auto}#bm-bar-drag{transition:margin-bottom .2s ease}#bm-overlay h1{display:inline-block;font-size:x-large;font-weight:700;vertical-align:middle}#bm-contain-automation input[type=checkbox]{vertical-align:middle;margin-right:.5ch}#bm-contain-automation label{margin-right:.5ch}.bm-help{border:white 1px solid;height:1.5em;width:1.5em;margin-top:2px;text-align:center;line-height:1em;padding:0!important}#bm-button-coords{vertical-align:middle}#bm-button-coords svg{width:50%;margin:0 auto;fill:#111}div:has(>#bm-button-teleport){display:flex;gap:.5ch}#bm-button-favorite svg,#bm-button-template svg{height:1em;margin:2px auto 0;text-align:center;line-height:1em;vertical-align:bottom}#bm-contain-coords input[type=number]{appearance:auto;-moz-appearance:textfield;width:5.5ch;margin-left:1ch;background-color:#0003;padding:0 .5ch;font-size:small}#bm-contain-coords input[type=number]::-webkit-outer-spin-button,#bm-contain-coords input[type=number]::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}#bm-contain-buttons-template{display:flex;flex-direction:row;flex-wrap:wrap;align-content:center;justify-content:center;align-items:center;gap:1ch}div:has(>#bm-input-file-template)>button{width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}#bm-input-file-template,input[type=file][id*=template]{display:none!important;visibility:hidden!important;position:absolute!important;left:-9999px!important;top:-9999px!important;width:0!important;height:0!important;opacity:0!important;z-index:-9999!important;pointer-events:none!important}#bm-output-status{font-size:small;background-color:#0003;padding:0 .5ch;height:3.75em;width:100%}#bm-contain-buttons-action{display:flex;justify-content:space-between}#bm-overlay small{font-size:x-small;color:#d3d3d3}#bm-contain-userinfo,#bm-contain-automation,#bm-contain-coords,#bm-contain-buttons-template,div:has(>#bm-input-file-template),#bm-output-status{margin-top:.5em}#bm-overlay button{background-color:#144eb9;border-radius:1em;padding:0 .75ch}#bm-overlay button:hover,#bm-overlay button:focus-visible{background-color:#1061e5}#bm-overlay button:active,#bm-overlay button:disabled{background-color:#2e97ff}#bm-overlay button:disabled{text-decoration:line-through}\n',document.body.appendChild(Ve),document.querySelector("body").innerHTML+='\x3c!-- body --\x3e\n
\n
\n
\n

Create new template

\n \n
\n
\n
\n \n
\n \n \n \n \n \n
\n
\n

Drag and drop an image here

\n

-- or --

\n \n
\n
\n \n
\n
',document.querySelector("body").innerHTML+='\x3c!-- body --\x3e\n
\n
\n
\n

Blue Marble

\n \n
\n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n
Name:
Droplets:
Next level in...
\n
\n \n \n
\n
\n

Made by SwingTheVine

\n
\n\n',document.querySelector("body").innerHTML+='\x3c!-- body --\x3e\n ',document.querySelector("body").innerHTML+='\x3c!-- body --\x3e\n
\n
\n
\n

Template manager

\n \n
\n
\n \n \n \n
\n \n \n \n \n \n \n \x3c!--list of templates goes here--\x3e\n
\n #\n \n \n Name\n \n Enabled\n \n Export\n
\n
\n \n
';var Re=new class{constructor(t){e(this,"object"),e(this,"type"),this.object=t,t&&(Pe.Ue(t).Ee?this.type="CHA":ze.Ue(t).Ee?this.type="BM":this.type="N/A")}update(t){if(ze.Ue(t).Ee)this.type="BM";else{if(!Pe.Ue(t).Ee)return;this.type="CHA"}this.object=t}get(){return this.object}getType(){return this.type}As(){"N/A"!==this.type&&"CHA"!==this.type&&("BM"===this.type&&(this.object=this.object,this.object={Gi:{Qi:"Charity",Xi:"0.1.0",ts:this.object.ts},ss:this.object.ss.map(t=>({name:t.name,enabled:t.enabled||!1,coords:{rs:t.coords[0],us:t.coords[1],px:t.coords[2],cs:t.coords[3]},sources:[t.ws||""],ds:t.xs,uuid:t.uuid})),bs:[],ys:[]}),this.type="CHA")}Ns(){"N/A"!==this.type&&"BM"!==this.type&&("CHA"===this.type&&(this.object=this.object,this.object={Qi:"BlueMarble",Xi:"0.1.0",ts:this.object.Gi.ts,ss:this.object.ss.map(t=>({name:t.name,coords:Object.values(t.coords),_s:t.ds,enabled:t.enabled,ws:t.sources[0],uuid:t.uuid}))}),this.type="BM")}appendData(t){"BM"===this.type&&(this.object=this.object,Pe.parse(t)?this.object.ss.push(...t.ss.map(t=>({name:t.name,coords:Object.values(t.coords),_s:t.ds,enabled:t.enabled,ws:t.sources[0],uuid:t.uuid}))):ze.parse(t)&&(this.object.ss.push(...t.ss),this.object.links?t.links&&this.object.links.push(...t.links):this.object.links=t.links))}Zs(t){"BM"===this.type&&this.object.ss.push(t)}$s(t){"BM"===this.type&&(this.object=this.object,this.object.links?this.object.links.push(t):this.object.links=[t])}Es(t,e){if("N/A"===this.type)return null;if(this.object.hasOwnProperty("links")){const n=this.object;return{...n,ss:t?t.map(t=>!!(Number.isInteger(t)&&t>=0&&n.ss.length!!(Number.isInteger(t)&&t>=0&&n.links.length!!(Number.isInteger(t)&&t>=0&&n.ss.length {(()=>{console.log("I'm blue marble!")})();},});})(); \ No newline at end of file +(function (){ return ({ patches: [], load: () => {(()=>{var t=Object.defineProperty,e=(e,n,i)=>((e,n,i)=>n in e?t(e,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[n]=i)(e,"symbol"!=typeof n?n+"":n,i);function n(t,e){const n=document.createElement(t);return e&&Object.entries(e).forEach(([t,e])=>{"className"===t?n.setAttribute("class",e):n.setAttribute(t,e)}),n}function i(){return window.charity.game.map.on("click","",t=>{console.log(t)}),[]}new Blob;var s,r,a,o={};((e,n)=>{for(var i in n)t(e,i,{get:n[i],enumerable:!0})})(o,{t:()=>Lt,i:()=>N,o:()=>b,u:()=>A,NEVER:()=>je,OK:()=>_,l:()=>k,h:()=>D,ZodAny:()=>ht,ZodArray:()=>vt,ZodBigInt:()=>at,ZodBoolean:()=>ot,ZodBranded:()=>Ut,ZodCatch:()=>Ct,ZodDate:()=>ut,ZodDefault:()=>Ot,ZodDiscriminatedUnion:()=>wt,ZodEffects:()=>jt,ZodEnum:()=>Tt,m:()=>h,p:()=>Kt,ZodFunction:()=>Et,ZodIntersection:()=>At,v:()=>d,ZodLazy:()=>It,ZodLiteral:()=>Mt,ZodMap:()=>Zt,ZodNaN:()=>zt,ZodNativeEnum:()=>St,ZodNever:()=>pt,ZodNull:()=>lt,ZodNullable:()=>Pt,ZodNumber:()=>rt,ZodObject:()=>bt,ZodOptional:()=>Bt,k:()=>u,ZodPipeline:()=>Vt,ZodPromise:()=>Dt,ZodReadonly:()=>Rt,ZodRecord:()=>_t,A:()=>D,ZodSet:()=>$t,ZodString:()=>it,ZodSymbol:()=>ct,N:()=>jt,ZodTuple:()=>Nt,_:()=>D,ZodUndefined:()=>dt,ZodUnion:()=>yt,ZodUnknown:()=>mt,ZodVoid:()=>ft,Z:()=>y,any:()=>ae,$:()=>de,I:()=>te,M:()=>ee,F:()=>De,T:()=>qt,S:()=>ne,D:()=>X,j:()=>m,B:()=>pe,effect:()=>Ze,P:()=>Ae,O:()=>xe,C:()=>v,L:()=>c,U:()=>Yt,intersection:()=>fe,V:()=>Z,R:()=>I,W:()=>$,q:()=>E,K:()=>Jt,H:()=>we,J:()=>ke,Y:()=>g,map:()=>be,G:()=>Xt,X:()=>Ne,tt:()=>ue,null:()=>re,et:()=>Ee,number:()=>Qt,object:()=>le,nt:()=>a,it:()=>Se,st:()=>Te,rt:()=>$e,ot:()=>Fe,ut:()=>Me,ct:()=>Ie,promise:()=>_e,dt:()=>l,lt:()=>ge,set:()=>ye,ht:()=>f,ft:()=>he,string:()=>Gt,vt:()=>ie,gt:()=>Ze,bt:()=>ve,undefined:()=>se,union:()=>me,yt:()=>oe,xt:()=>s,wt:()=>ce}),(r=s||(s={})).kt=t=>{},r.At=function(t){},r.Nt=function(t){throw new Error},r._t=t=>{const e={};for(const n of t)e[n]=n;return e},r.Zt=t=>{const e=r.$t(t).filter(e=>"number"!=typeof t[t[e]]),n={};for(const i of e)n[i]=t[i];return r.Et(n)},r.Et=t=>r.$t(t).map(function(e){return t[e]}),r.$t="function"==typeof Object.keys?t=>Object.keys(t):t=>{const e=[];for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.push(n);return e},r.find=(t,e)=>{for(const n of t)if(e(n))return n},r.isInteger="function"==typeof Number.isInteger?t=>Number.isInteger(t):t=>"number"==typeof t&&Number.isFinite(t)&&Math.floor(t)===t,r.It=function(t,e=" | "){return t.map(t=>"string"==typeof t?`'${t}'`:t).join(e)},r.Mt=(t,e)=>"bigint"==typeof e?e.toString():e,(a||(a={})).Ft=(t,e)=>({...t,...e});var u=s._t(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),c=t=>{switch(typeof t){case"undefined":return u.undefined;case"string":return u.string;case"number":return Number.isNaN(t)?u.G:u.number;case"boolean":return u.M;case"function":return u.O;case"bigint":return u.I;case"symbol":return u.vt;case"object":return Array.isArray(t)?u.$:null===t?u.null:t.then&&"function"==typeof t.then&&t.catch&&"function"==typeof t.catch?u.promise:"undefined"!=typeof Map&&t instanceof Map?u.map:"undefined"!=typeof Set&&t instanceof Set?u.set:"undefined"!=typeof Date&&t instanceof Date?u.S:u.object;default:return u.yt}},d=s._t(["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"]),l=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:"),h=class t extends Error{get Tt(){return this.St}constructor(t){super(),this.St=[],this.Dt=t=>{this.St=[...this.St,t]},this.jt=(t=[])=>{this.St=[...this.St,...t]};const e=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,e):this.__proto__=e,this.name="ZodError",this.St=t}format(t){const e=t||function(t){return t.message},n={Bt:[]},i=t=>{for(const s of t.St)if("invalid_union"===s.code)s.Pt.map(i);else if("invalid_return_type"===s.code)i(s.Ot);else if("invalid_arguments"===s.code)i(s.Ct);else if(0===s.path.length)n.Bt.push(e(s));else{let t=n,i=0;for(;it.message){const e={},n=[];for(const i of this.St)if(i.path.length>0){const n=i.path[0];e[n]=e[n]||[],e[n].push(t(i))}else n.push(t(i));return{Ut:n,Vt:e}}get Ut(){return this.Lt()}};h.create=t=>new h(t);var m=(t,e)=>{let n;switch(t.code){case d.Rt:n=t.Wt===u.undefined?"Required":`Expected ${t.qt}, received ${t.Wt}`;break;case d.Kt:n=`Invalid literal value, expected ${JSON.stringify(t.qt,s.Mt)}`;break;case d.Ht:n=`Unrecognized key(s) in object: ${s.It(t.keys,", ")}`;break;case d.Jt:n="Invalid input";break;case d.Yt:n=`Invalid discriminator value. Expected ${s.It(t.options)}`;break;case d.Gt:n=`Invalid enum value. Expected ${s.It(t.options)}, received '${t.Wt}'`;break;case d.Qt:n="Invalid function arguments";break;case d.Xt:n="Invalid function return type";break;case d.te:n="Invalid date";break;case d.ee:"object"==typeof t.ne?"includes"in t.ne?(n=`Invalid input: must include "${t.ne.includes}"`,"number"==typeof t.ne.position&&(n=`${n} at one or more positions greater than or equal to ${t.ne.position}`)):"startsWith"in t.ne?n=`Invalid input: must start with "${t.ne.startsWith}"`:"endsWith"in t.ne?n=`Invalid input: must end with "${t.ne.endsWith}"`:s.Nt(t.ne):n="regex"!==t.ne?`Invalid ${t.ne}`:"Invalid";break;case d.ie:n="array"===t.type?`Array must contain ${t.se?"exactly":t.re?"at least":"more than"} ${t.ae} element(s)`:"string"===t.type?`String must contain ${t.se?"exactly":t.re?"at least":"over"} ${t.ae} character(s)`:"number"===t.type||"bigint"===t.type?`Number must be ${t.se?"exactly equal to ":t.re?"greater than or equal to ":"greater than "}${t.ae}`:"date"===t.type?`Date must be ${t.se?"exactly equal to ":t.re?"greater than or equal to ":"greater than "}${new Date(Number(t.ae))}`:"Invalid input";break;case d.oe:n="array"===t.type?`Array must contain ${t.se?"exactly":t.re?"at most":"less than"} ${t.ue} element(s)`:"string"===t.type?`String must contain ${t.se?"exactly":t.re?"at most":"under"} ${t.ue} character(s)`:"number"===t.type?`Number must be ${t.se?"exactly":t.re?"less than or equal to":"less than"} ${t.ue}`:"bigint"===t.type?`BigInt must be ${t.se?"exactly":t.re?"less than or equal to":"less than"} ${t.ue}`:"date"===t.type?`Date must be ${t.se?"exactly":t.re?"smaller than or equal to":"smaller than"} ${new Date(Number(t.ue))}`:"Invalid input";break;case d.T:n="Invalid input";break;case d.ce:n="Intersection results could not be merged";break;case d.de:n=`Number must be a multiple of ${t.le}`;break;case d.he:n="Number must be finite";break;default:n=e.me,s.Nt(t)}return{message:n}},p=m;function f(t){p=t}function v(){return p}var g=t=>{const{data:e,path:n,pe:i,fe:s}=t,r=[...n,...s.path||[]],a={...s,path:r};if(void 0!==s.message)return{...s,path:r,message:s.message};let o="";const u=i.filter(t=>!!t).slice().reverse();for(const t of u)o=t(a,{data:e,me:o}).message;return{...s,path:r,message:o}},b=[];function y(t,e){const n=v(),i=g({fe:e,data:t.data,path:t.path,pe:[t.ge.ve,t.be,n,n===m?void 0:m].filter(t=>!!t)});t.ge.St.push(i)}var x,w,k=class t{constructor(){this.value="valid"}ye(){"valid"===this.value&&(this.value="dirty")}abort(){"aborted"!==this.value&&(this.value="aborted")}static xe(t,e){const n=[];for(const i of e){if("aborted"===i.status)return A;"dirty"===i.status&&t.ye(),n.push(i.value)}return{status:t.value,value:n}}static async we(e,n){const i=[];for(const t of n){const e=await t.key,n=await t.value;i.push({key:e,value:n})}return t.ke(e,i)}static ke(t,e){const n={};for(const i of e){const{key:e,value:s}=i;if("aborted"===e.status)return A;if("aborted"===s.status)return A;"dirty"===e.status&&t.ye(),"dirty"===s.status&&t.ye(),"__proto__"===e.value||void 0===s.value&&!i.Ae||(n[e.value]=s.value)}return{status:t.value,value:n}}},A=Object.freeze({status:"aborted"}),N=t=>({status:"dirty",value:t}),_=t=>({status:"valid",value:t}),Z=t=>"aborted"===t.status,$=t=>"dirty"===t.status,E=t=>"valid"===t.status,I=t=>"undefined"!=typeof Promise&&t instanceof Promise;(w=x||(x={})).Ne=t=>"string"==typeof t?{message:t}:t||{},w.toString=t=>"string"==typeof t?t:t?.message;var M=class{constructor(t,e,n,i){this._e=[],this.parent=t,this.data=e,this.Ze=n,this.$e=i}get path(){return this._e.length||(Array.isArray(this.$e)?this._e.push(...this.Ze,...this.$e):this._e.push(...this.Ze,this.$e)),this._e}},F=(t,e)=>{if(E(e))return{Ee:!0,data:e.value};if(!t.ge.St.length)throw new Error("Validation failed but no issues detected.");return{Ee:!1,get error(){if(this.Ie)return this.Ie;const e=new h(t.ge.St);return this.Ie=e,this.Ie}}};function T(t){if(!t)return{};const{Me:e,Fe:n,Te:i,description:s}=t;if(e&&(n||i))throw new Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');return e?{Me:e,description:s}:{Me:(e,s)=>{const{message:r}=t;return"invalid_enum_value"===e.code?{message:r??s.me}:void 0===s.data?{message:r??i??s.me}:"invalid_type"!==e.code?{message:s.me}:{message:r??n??s.me}},description:s}}var S,D=class{get description(){return this.Se.description}De(t){return c(t.data)}je(t,e){return e||{ge:t.parent.ge,data:t.data,Be:c(t.data),be:this.Se.Me,path:t.path,parent:t.parent}}Pe(t){return{status:new k,Oe:{ge:t.parent.ge,data:t.data,Be:c(t.data),be:this.Se.Me,path:t.path,parent:t.parent}}}Ce(t){const e=this.ze(t);if(I(e))throw new Error("Synchronous parse encountered promise.");return e}Le(t){const e=this.ze(t);return Promise.resolve(e)}parse(t,e){const n=this.Ue(t,e);if(n.Ee)return n.data;throw n.error}Ue(t,e){const n={ge:{St:[],async:e?.async??!1,ve:e?.Me},path:e?.path||[],be:this.Se.Me,parent:null,data:t,Be:c(t)},i=this.Ce({data:t,path:n.path,parent:n});return F(n,i)}"~validate"(t){const e={ge:{St:[],async:!!this["~standard"].async},path:[],be:this.Se.Me,parent:null,data:t,Be:c(t)};if(!this["~standard"].async)try{const n=this.Ce({data:t,path:[],parent:e});return E(n)?{value:n.value}:{St:e.ge.St}}catch(t){t?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),e.ge={St:[],async:!0}}return this.Le({data:t,path:[],parent:e}).then(t=>E(t)?{value:t.value}:{St:e.ge.St})}async Ve(t,e){const n=await this.Re(t,e);if(n.Ee)return n.data;throw n.error}async Re(t,e){const n={ge:{St:[],ve:e?.Me,async:!0},path:e?.path||[],be:this.Se.Me,parent:null,data:t,Be:c(t)},i=this.ze({data:t,path:n.path,parent:n}),s=await(I(i)?i:Promise.resolve(i));return F(n,s)}We(t,e){const n=t=>"string"==typeof e||void 0===e?{message:e}:"function"==typeof e?e(t):e;return this.qe((e,i)=>{const s=t(e),r=()=>i.Dt({code:d.T,...n(e)});return"undefined"!=typeof Promise&&s instanceof Promise?s.then(t=>!!t||(r(),!1)):!!s||(r(),!1)})}Ke(t,e){return this.qe((n,i)=>!!t(n)||(i.Dt("function"==typeof e?e(n,i):e),!1))}qe(t){return new jt({He:this,Je:Kt.ZodEffects,effect:{type:"refinement",Ke:t}})}Ye(t){return this.qe(t)}constructor(t){this.Ge=this.Re,this.Se=t,this.parse=this.parse.bind(this),this.Ue=this.Ue.bind(this),this.Ve=this.Ve.bind(this),this.Re=this.Re.bind(this),this.Ge=this.Ge.bind(this),this.We=this.We.bind(this),this.Ke=this.Ke.bind(this),this.Ye=this.Ye.bind(this),this.rt=this.rt.bind(this),this.et=this.et.bind(this),this.Qe=this.Qe.bind(this),this.$=this.$.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.Xe=this.Xe.bind(this),this.tn=this.tn.bind(this),this.en=this.en.bind(this),this.nn=this.nn.bind(this),this.sn=this.sn.bind(this),this["~standard"]={version:1,vendor:"zod",validate:t=>this["~validate"](t)}}rt(){return Bt.create(this,this.Se)}et(){return Pt.create(this,this.Se)}Qe(){return this.et().rt()}$(){return vt.create(this)}promise(){return Dt.create(this,this.Se)}or(t){return yt.create([this,t],this.Se)}and(t){return At.create(this,t,this.Se)}transform(t){return new jt({...T(this.Se),He:this,Je:Kt.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const e="function"==typeof t?t:()=>t;return new Ot({...T(this.Se),rn:this,defaultValue:e,Je:Kt.ZodDefault})}brand(){return new Ut({Je:Kt.ZodBranded,type:this,...T(this.Se)})}catch(t){const e="function"==typeof t?t:()=>t;return new Ct({...T(this.Se),rn:this,an:e,Je:Kt.ZodCatch})}Xe(t){return new(0,this.constructor)({...this.Se,description:t})}tn(t){return Vt.create(this,t)}en(){return Rt.create(this)}sn(){return this.Ue(void 0).Ee}nn(){return this.Ue(null).Ee}},j=/^c[^\s-]{8,}$/i,B=/^[0-9a-z]+$/,P=/^[0-9A-HJKMNP-TV-Z]{26}$/i,O=/^[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,C=/^[a-z0-9_-]{21}$/i,z=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,L=/^[-+]?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)?)??$/,U=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,V=/^(?:(?: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])$/,R=/^(?:(?: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])$/,W=/^(([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]))$/,q=/^(([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])$/,K=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,H=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,J="((\\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])))",Y=new RegExp(`^${J}$`);function G(t){let e="[0-5]\\d";return t.precision?e=`${e}\\.\\d{${t.precision}}`:null==t.precision&&(e=`${e}(\\.\\d+)?`),`([01]\\d|2[0-3]):[0-5]\\d(:${e})${t.precision?"+":"?"}`}function Q(t){return new RegExp(`^${G(t)}$`)}function X(t){let e=`${J}T${G(t)}`;const n=[];return n.push(t.un?"Z?":"Z"),t.offset&&n.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${n.join("|")})`,new RegExp(`^${e}$`)}function tt(t,e){return!("v4"!==e&&e||!V.test(t))||!("v6"!==e&&e||!W.test(t))}function et(t,e){if(!z.test(t))return!1;try{const[n]=t.split(".");if(!n)return!1;const i=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),s=JSON.parse(atob(i));return!("object"!=typeof s||null===s||"cn"in s&&"JWT"!==s?.cn||!s.dn||e&&s.dn!==e)}catch{return!1}}function nt(t,e){return!("v4"!==e&&e||!R.test(t))||!("v6"!==e&&e||!q.test(t))}var it=class t extends D{ze(t){if(this.Se.F&&(t.data=String(t.data)),this.De(t)!==u.string){const e=this.je(t);return y(e,{code:d.Rt,qt:u.string,Wt:e.Be}),A}const e=new k;let n;for(const i of this.Se.ln)if("min"===i.kind)t.data.lengthi.value&&(n=this.je(t,n),y(n,{code:d.oe,ue:i.value,type:"string",re:!0,se:!1,message:i.message}),e.ye());else if("length"===i.kind){const s=t.data.length>i.value,r=t.data.lengtht.test(e),{ne:e,code:d.ee,...x.Ne(n)})}pn(e){return new t({...this.Se,ln:[...this.Se.ln,e]})}email(t){return this.pn({kind:"email",...x.Ne(t)})}url(t){return this.pn({kind:"url",...x.Ne(t)})}fn(t){return this.pn({kind:"emoji",...x.Ne(t)})}uuid(t){return this.pn({kind:"uuid",...x.Ne(t)})}vn(t){return this.pn({kind:"nanoid",...x.Ne(t)})}gn(t){return this.pn({kind:"cuid",...x.Ne(t)})}bn(t){return this.pn({kind:"cuid2",...x.Ne(t)})}yn(t){return this.pn({kind:"ulid",...x.Ne(t)})}xn(t){return this.pn({kind:"base64",...x.Ne(t)})}wn(t){return this.pn({kind:"base64url",...x.Ne(t)})}kn(t){return this.pn({kind:"jwt",...x.Ne(t)})}An(t){return this.pn({kind:"ip",...x.Ne(t)})}Nn(t){return this.pn({kind:"cidr",...x.Ne(t)})}_n(t){return"string"==typeof t?this.pn({kind:"datetime",precision:null,offset:!1,un:!1,message:t}):this.pn({kind:"datetime",precision:void 0===t?.precision?null:t?.precision,offset:t?.offset??!1,un:t?.un??!1,...x.Ne(t?.message)})}S(t){return this.pn({kind:"date",message:t})}time(t){return"string"==typeof t?this.pn({kind:"time",precision:null,message:t}):this.pn({kind:"time",precision:void 0===t?.precision?null:t?.precision,...x.Ne(t?.message)})}duration(t){return this.pn({kind:"duration",...x.Ne(t)})}hn(t,e){return this.pn({kind:"regex",hn:t,...x.Ne(e)})}includes(t,e){return this.pn({kind:"includes",value:t,position:e?.position,...x.Ne(e?.message)})}startsWith(t,e){return this.pn({kind:"startsWith",value:t,...x.Ne(e)})}endsWith(t,e){return this.pn({kind:"endsWith",value:t,...x.Ne(e)})}min(t,e){return this.pn({kind:"min",value:t,...x.Ne(e)})}max(t,e){return this.pn({kind:"max",value:t,...x.Ne(e)})}length(t,e){return this.pn({kind:"length",value:t,...x.Ne(e)})}Zn(t){return this.min(1,x.Ne(t))}trim(){return new t({...this.Se,ln:[...this.Se.ln,{kind:"trim"}]})}toLowerCase(){return new t({...this.Se,ln:[...this.Se.ln,{kind:"toLowerCase"}]})}toUpperCase(){return new t({...this.Se,ln:[...this.Se.ln,{kind:"toUpperCase"}]})}get $n(){return!!this.Se.ln.find(t=>"datetime"===t.kind)}get En(){return!!this.Se.ln.find(t=>"date"===t.kind)}get In(){return!!this.Se.ln.find(t=>"time"===t.kind)}get Mn(){return!!this.Se.ln.find(t=>"duration"===t.kind)}get Fn(){return!!this.Se.ln.find(t=>"email"===t.kind)}get Tn(){return!!this.Se.ln.find(t=>"url"===t.kind)}get Sn(){return!!this.Se.ln.find(t=>"emoji"===t.kind)}get Dn(){return!!this.Se.ln.find(t=>"uuid"===t.kind)}get jn(){return!!this.Se.ln.find(t=>"nanoid"===t.kind)}get Bn(){return!!this.Se.ln.find(t=>"cuid"===t.kind)}get Pn(){return!!this.Se.ln.find(t=>"cuid2"===t.kind)}get On(){return!!this.Se.ln.find(t=>"ulid"===t.kind)}get Cn(){return!!this.Se.ln.find(t=>"ip"===t.kind)}get zn(){return!!this.Se.ln.find(t=>"cidr"===t.kind)}get Ln(){return!!this.Se.ln.find(t=>"base64"===t.kind)}get Un(){return!!this.Se.ln.find(t=>"base64url"===t.kind)}get minLength(){let t=null;for(const e of this.Se.ln)"min"===e.kind&&(null===t||e.value>t)&&(t=e.value);return t}get maxLength(){let t=null;for(const e of this.Se.ln)"max"===e.kind&&(null===t||e.valuei?n:i;return Number.parseInt(t.toFixed(s).replace(".",""))%Number.parseInt(e.toFixed(s).replace(".",""))/10**s}it.create=t=>new it({ln:[],Je:Kt.ZodString,F:t?.F??!1,...T(t)});var rt=class t extends D{constructor(){super(...arguments),this.min=this.Vn,this.max=this.Rn,this.step=this.le}ze(t){if(this.Se.F&&(t.data=Number(t.data)),this.De(t)!==u.number){const e=this.je(t);return y(e,{code:d.Rt,qt:u.number,Wt:e.Be}),A}let e;const n=new k;for(const i of this.Se.ln)"int"===i.kind?s.isInteger(t.data)||(e=this.je(t,e),y(e,{code:d.Rt,qt:"integer",Wt:"float",message:i.message}),n.ye()):"min"===i.kind?(i.re?t.datai.value:t.data>=i.value)&&(e=this.je(t,e),y(e,{code:d.oe,ue:i.value,type:"number",re:i.re,se:!1,message:i.message}),n.ye()):"multipleOf"===i.kind?0!==st(t.data,i.value)&&(e=this.je(t,e),y(e,{code:d.de,le:i.value,message:i.message}),n.ye()):"finite"===i.kind?Number.isFinite(t.data)||(e=this.je(t,e),y(e,{code:d.he,message:i.message}),n.ye()):s.Nt(i);return{status:n.value,value:t.data}}Vn(t,e){return this.Wn("min",t,!0,x.toString(e))}qn(t,e){return this.Wn("min",t,!1,x.toString(e))}Rn(t,e){return this.Wn("max",t,!0,x.toString(e))}Kn(t,e){return this.Wn("max",t,!1,x.toString(e))}Wn(e,n,i,s){return new t({...this.Se,ln:[...this.Se.ln,{kind:e,value:n,re:i,message:x.toString(s)}]})}pn(e){return new t({...this.Se,ln:[...this.Se.ln,e]})}Hn(t){return this.pn({kind:"int",message:x.toString(t)})}Jn(t){return this.pn({kind:"min",value:0,re:!1,message:x.toString(t)})}negative(t){return this.pn({kind:"max",value:0,re:!1,message:x.toString(t)})}Yn(t){return this.pn({kind:"max",value:0,re:!0,message:x.toString(t)})}Gn(t){return this.pn({kind:"min",value:0,re:!0,message:x.toString(t)})}le(t,e){return this.pn({kind:"multipleOf",value:t,message:x.toString(e)})}Qn(t){return this.pn({kind:"finite",message:x.toString(t)})}Xn(t){return this.pn({kind:"min",re:!0,value:Number.MIN_SAFE_INTEGER,message:x.toString(t)}).pn({kind:"max",re:!0,value:Number.MAX_SAFE_INTEGER,message:x.toString(t)})}get minValue(){let t=null;for(const e of this.Se.ln)"min"===e.kind&&(null===t||e.value>t)&&(t=e.value);return t}get maxValue(){let t=null;for(const e of this.Se.ln)"max"===e.kind&&(null===t||e.value"int"===t.kind||"multipleOf"===t.kind&&s.isInteger(t.value))}get isFinite(){let t=null,e=null;for(const n of this.Se.ln){if("finite"===n.kind||"int"===n.kind||"multipleOf"===n.kind)return!0;"min"===n.kind?(null===e||n.value>e)&&(e=n.value):"max"===n.kind&&(null===t||n.valuenew rt({ln:[],Je:Kt.ZodNumber,F:t?.F||!1,...T(t)});var at=class t extends D{constructor(){super(...arguments),this.min=this.Vn,this.max=this.Rn}ze(t){if(this.Se.F)try{t.data=BigInt(t.data)}catch{return this.ei(t)}if(this.De(t)!==u.I)return this.ei(t);let e;const n=new k;for(const i of this.Se.ln)"min"===i.kind?(i.re?t.datai.value:t.data>=i.value)&&(e=this.je(t,e),y(e,{code:d.oe,type:"bigint",ue:i.value,re:i.re,message:i.message}),n.ye()):"multipleOf"===i.kind?t.data%i.value!==BigInt(0)&&(e=this.je(t,e),y(e,{code:d.de,le:i.value,message:i.message}),n.ye()):s.Nt(i);return{status:n.value,value:t.data}}ei(t){const e=this.je(t);return y(e,{code:d.Rt,qt:u.I,Wt:e.Be}),A}Vn(t,e){return this.Wn("min",t,!0,x.toString(e))}qn(t,e){return this.Wn("min",t,!1,x.toString(e))}Rn(t,e){return this.Wn("max",t,!0,x.toString(e))}Kn(t,e){return this.Wn("max",t,!1,x.toString(e))}Wn(e,n,i,s){return new t({...this.Se,ln:[...this.Se.ln,{kind:e,value:n,re:i,message:x.toString(s)}]})}pn(e){return new t({...this.Se,ln:[...this.Se.ln,e]})}Jn(t){return this.pn({kind:"min",value:BigInt(0),re:!1,message:x.toString(t)})}negative(t){return this.pn({kind:"max",value:BigInt(0),re:!1,message:x.toString(t)})}Yn(t){return this.pn({kind:"max",value:BigInt(0),re:!0,message:x.toString(t)})}Gn(t){return this.pn({kind:"min",value:BigInt(0),re:!0,message:x.toString(t)})}le(t,e){return this.pn({kind:"multipleOf",value:t,message:x.toString(e)})}get minValue(){let t=null;for(const e of this.Se.ln)"min"===e.kind&&(null===t||e.value>t)&&(t=e.value);return t}get maxValue(){let t=null;for(const e of this.Se.ln)"max"===e.kind&&(null===t||e.valuenew at({ln:[],Je:Kt.ZodBigInt,F:t?.F??!1,...T(t)});var ot=class extends D{ze(t){if(this.Se.F&&(t.data=Boolean(t.data)),this.De(t)!==u.M){const e=this.je(t);return y(e,{code:d.Rt,qt:u.M,Wt:e.Be}),A}return _(t.data)}};ot.create=t=>new ot({Je:Kt.ZodBoolean,F:t?.F||!1,...T(t)});var ut=class t extends D{ze(t){if(this.Se.F&&(t.data=new Date(t.data)),this.De(t)!==u.S){const e=this.je(t);return y(e,{code:d.Rt,qt:u.S,Wt:e.Be}),A}if(Number.isNaN(t.data.getTime()))return y(this.je(t),{code:d.te}),A;const e=new k;let n;for(const i of this.Se.ln)"min"===i.kind?t.data.getTime()i.value&&(n=this.je(t,n),y(n,{code:d.oe,message:i.message,re:!0,se:!1,ue:i.value,type:"date"}),e.ye()):s.Nt(i);return{status:e.value,value:new Date(t.data.getTime())}}pn(e){return new t({...this.Se,ln:[...this.Se.ln,e]})}min(t,e){return this.pn({kind:"min",value:t.getTime(),message:x.toString(e)})}max(t,e){return this.pn({kind:"max",value:t.getTime(),message:x.toString(e)})}get ni(){let t=null;for(const e of this.Se.ln)"min"===e.kind&&(null===t||e.value>t)&&(t=e.value);return null!=t?new Date(t):null}get ii(){let t=null;for(const e of this.Se.ln)"max"===e.kind&&(null===t||e.valuenew ut({ln:[],F:t?.F||!1,Je:Kt.ZodDate,...T(t)});var ct=class extends D{ze(t){if(this.De(t)!==u.vt){const e=this.je(t);return y(e,{code:d.Rt,qt:u.vt,Wt:e.Be}),A}return _(t.data)}};ct.create=t=>new ct({Je:Kt.ZodSymbol,...T(t)});var dt=class extends D{ze(t){if(this.De(t)!==u.undefined){const e=this.je(t);return y(e,{code:d.Rt,qt:u.undefined,Wt:e.Be}),A}return _(t.data)}};dt.create=t=>new dt({Je:Kt.ZodUndefined,...T(t)});var lt=class extends D{ze(t){if(this.De(t)!==u.null){const e=this.je(t);return y(e,{code:d.Rt,qt:u.null,Wt:e.Be}),A}return _(t.data)}};lt.create=t=>new lt({Je:Kt.ZodNull,...T(t)});var ht=class extends D{constructor(){super(...arguments),this.si=!0}ze(t){return _(t.data)}};ht.create=t=>new ht({Je:Kt.ZodAny,...T(t)});var mt=class extends D{constructor(){super(...arguments),this.ri=!0}ze(t){return _(t.data)}};mt.create=t=>new mt({Je:Kt.ZodUnknown,...T(t)});var pt=class extends D{ze(t){const e=this.je(t);return y(e,{code:d.Rt,qt:u.tt,Wt:e.Be}),A}};pt.create=t=>new pt({Je:Kt.ZodNever,...T(t)});var ft=class extends D{ze(t){if(this.De(t)!==u.undefined){const e=this.je(t);return y(e,{code:d.Rt,qt:u.wt,Wt:e.Be}),A}return _(t.data)}};ft.create=t=>new ft({Je:Kt.ZodVoid,...T(t)});var vt=class t extends D{ze(t){const{Oe:e,status:n}=this.Pe(t),i=this.Se;if(e.Be!==u.$)return y(e,{code:d.Rt,qt:u.$,Wt:e.Be}),A;if(null!==i.ai){const t=e.data.length>i.ai.value,s=e.data.lengthi.maxLength.value&&(y(e,{code:d.oe,ue:i.maxLength.value,type:"array",re:!0,se:!1,message:i.maxLength.message}),n.ye()),e.ge.async)return Promise.all([...e.data].map((t,n)=>i.type.Le(new M(e,t,e.path,n)))).then(t=>k.xe(n,t));const s=[...e.data].map((t,n)=>i.type.Ce(new M(e,t,e.path,n)));return k.xe(n,s)}get element(){return this.Se.type}min(e,n){return new t({...this.Se,minLength:{value:e,message:x.toString(n)}})}max(e,n){return new t({...this.Se,maxLength:{value:e,message:x.toString(n)}})}length(e,n){return new t({...this.Se,ai:{value:e,message:x.toString(n)}})}Zn(t){return this.min(1,t)}};function gt(t){if(t instanceof bt){const e={};for(const n in t.shape){const i=t.shape[n];e[n]=Bt.create(gt(i))}return new bt({...t.Se,shape:()=>e})}return t instanceof vt?new vt({...t.Se,type:gt(t.element)}):t instanceof Bt?Bt.create(gt(t.oi())):t instanceof Pt?Pt.create(gt(t.oi())):t instanceof Nt?Nt.create(t.items.map(t=>gt(t))):t}vt.create=(t,e)=>new vt({type:t,minLength:null,maxLength:null,ai:null,Je:Kt.ZodArray,...T(e)});var bt=class t extends D{constructor(){super(...arguments),this.ui=null,this.ci=this.di,this.li=this.extend}hi(){if(null!==this.ui)return this.ui;const t=this.Se.shape(),e=s.$t(t);return this.ui={shape:t,keys:e},this.ui}ze(t){if(this.De(t)!==u.object){const e=this.je(t);return y(e,{code:d.Rt,qt:u.object,Wt:e.Be}),A}const{status:e,Oe:n}=this.Pe(t),{shape:i,keys:s}=this.hi(),r=[];if(!(this.Se.mi instanceof pt&&"strip"===this.Se.pi))for(const t in n.data)s.includes(t)||r.push(t);const a=[];for(const t of s){const e=i[t],s=n.data[t];a.push({key:{status:"valid",value:t},value:e.ze(new M(n,s,n.path,t)),Ae:t in n.data})}if(this.Se.mi instanceof pt){const t=this.Se.pi;if("passthrough"===t)for(const t of r)a.push({key:{status:"valid",value:t},value:{status:"valid",value:n.data[t]}});else if("strict"===t)r.length>0&&(y(n,{code:d.Ht,keys:r}),e.ye());else if("strip"!==t)throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const t=this.Se.mi;for(const e of r){const i=n.data[e];a.push({key:{status:"valid",value:e},value:t.ze(new M(n,i,n.path,e)),Ae:e in n.data})}}return n.ge.async?Promise.resolve().then(async()=>{const t=[];for(const e of a){const n=await e.key,i=await e.value;t.push({key:n,value:i,Ae:e.Ae})}return t}).then(t=>k.ke(e,t)):k.ke(e,a)}get shape(){return this.Se.shape()}fi(e){return x.Ne,new t({...this.Se,pi:"strict",...void 0!==e?{Me:(t,n)=>{const i=this.Se.Me?.(t,n).message??n.me;return"unrecognized_keys"===t.code?{message:x.Ne(e).message??i}:{message:i}}}:{}})}gi(){return new t({...this.Se,pi:"strip"})}di(){return new t({...this.Se,pi:"passthrough"})}extend(e){return new t({...this.Se,shape:()=>({...this.Se.shape(),...e})})}bi(e){return new t({pi:e.Se.pi,mi:e.Se.mi,shape:()=>({...this.Se.shape(),...e.Se.shape()}),Je:Kt.ZodObject})}yi(t,e){return this.li({[t]:e})}mi(e){return new t({...this.Se,mi:e})}xi(e){const n={};for(const t of s.$t(e))e[t]&&this.shape[t]&&(n[t]=this.shape[t]);return new t({...this.Se,shape:()=>n})}wi(e){const n={};for(const t of s.$t(this.shape))e[t]||(n[t]=this.shape[t]);return new t({...this.Se,shape:()=>n})}ki(){return gt(this)}Ai(e){const n={};for(const t of s.$t(this.shape)){const i=this.shape[t];e&&!e[t]?n[t]=i:n[t]=i.rt()}return new t({...this.Se,shape:()=>n})}required(e){const n={};for(const t of s.$t(this.shape))if(e&&!e[t])n[t]=this.shape[t];else{let e=this.shape[t];for(;e instanceof Bt;)e=e.Se.rn;n[t]=e}return new t({...this.Se,shape:()=>n})}Ni(){return Ft(s.$t(this.shape))}};bt.create=(t,e)=>new bt({shape:()=>t,pi:"strip",mi:pt.create(),Je:Kt.ZodObject,...T(e)}),bt._i=(t,e)=>new bt({shape:()=>t,pi:"strict",mi:pt.create(),Je:Kt.ZodObject,...T(e)}),bt.Zi=(t,e)=>new bt({shape:t,pi:"strip",mi:pt.create(),Je:Kt.ZodObject,...T(e)});var yt=class extends D{ze(t){const{Oe:e}=this.Pe(t),n=this.Se.options;if(e.ge.async)return Promise.all(n.map(async t=>{const n={...e,ge:{...e.ge,St:[]},parent:null};return{result:await t.Le({data:e.data,path:e.path,parent:n}),Oe:n}})).then(function(t){for(const e of t)if("valid"===e.result.status)return e.result;for(const n of t)if("dirty"===n.result.status)return e.ge.St.push(...n.Oe.ge.St),n.result;const n=t.map(t=>new h(t.Oe.ge.St));return y(e,{code:d.Jt,Pt:n}),A});{let t;const i=[];for(const s of n){const n={...e,ge:{...e.ge,St:[]},parent:null},r=s.Ce({data:e.data,path:e.path,parent:n});if("valid"===r.status)return r;"dirty"!==r.status||t||(t={result:r,Oe:n}),n.ge.St.length&&i.push(n.ge.St)}if(t)return e.ge.St.push(...t.Oe.ge.St),t.result;const s=i.map(t=>new h(t));return y(e,{code:d.Jt,Pt:s}),A}}get options(){return this.Se.options}};yt.create=(t,e)=>new yt({options:t,Je:Kt.ZodUnion,...T(e)});var xt=t=>t instanceof It?xt(t.He):t instanceof jt?xt(t.rn()):t instanceof Mt?[t.value]:t instanceof Tt?t.options:t instanceof St?s.Et(t.P):t instanceof Ot?xt(t.Se.rn):t instanceof dt?[void 0]:t instanceof lt?[null]:t instanceof Bt?[void 0,...xt(t.oi())]:t instanceof Pt?[null,...xt(t.oi())]:t instanceof Ut||t instanceof Rt?xt(t.oi()):t instanceof Ct?xt(t.Se.rn):[],wt=class t extends D{ze(t){const{Oe:e}=this.Pe(t);if(e.Be!==u.object)return y(e,{code:d.Rt,qt:u.object,Wt:e.Be}),A;const n=this.$i,i=e.data[n],s=this.Ei.get(i);return s?e.ge.async?s.Le({data:e.data,path:e.path,parent:e}):s.Ce({data:e.data,path:e.path,parent:e}):(y(e,{code:d.Yt,options:Array.from(this.Ei.keys()),path:[n]}),A)}get $i(){return this.Se.$i}get options(){return this.Se.options}get Ei(){return this.Se.Ei}static create(e,n,i){const s=new Map;for(const t of n){const n=xt(t.shape[e]);if(!n.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const i of n){if(s.has(i))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(i)}`);s.set(i,t)}}return new t({Je:Kt.ZodDiscriminatedUnion,$i:e,options:n,Ei:s,...T(i)})}};function kt(t,e){const n=c(t),i=c(e);if(t===e)return{valid:!0,data:t};if(n===u.object&&i===u.object){const n=s.$t(e),i=s.$t(t).filter(t=>-1!==n.indexOf(t)),r={...t,...e};for(const n of i){const i=kt(t[n],e[n]);if(!i.valid)return{valid:!1};r[n]=i.data}return{valid:!0,data:r}}if(n===u.$&&i===u.$){if(t.length!==e.length)return{valid:!1};const n=[];for(let i=0;i{if(Z(t)||Z(i))return A;const s=kt(t.value,i.value);return s.valid?(($(t)||$(i))&&e.ye(),{status:e.value,value:s.data}):(y(n,{code:d.ce}),A)};return n.ge.async?Promise.all([this.Se.left.Le({data:n.data,path:n.path,parent:n}),this.Se.right.Le({data:n.data,path:n.path,parent:n})]).then(([t,e])=>i(t,e)):i(this.Se.left.Ce({data:n.data,path:n.path,parent:n}),this.Se.right.Ce({data:n.data,path:n.path,parent:n}))}};At.create=(t,e,n)=>new At({left:t,right:e,Je:Kt.ZodIntersection,...T(n)});var Nt=class t extends D{ze(t){const{status:e,Oe:n}=this.Pe(t);if(n.Be!==u.$)return y(n,{code:d.Rt,qt:u.$,Wt:n.Be}),A;if(n.data.lengththis.Se.items.length&&(y(n,{code:d.oe,ue:this.Se.items.length,re:!0,se:!1,type:"array"}),e.ye());const i=[...n.data].map((t,e)=>{const i=this.Se.items[e]||this.Se.Ii;return i?i.ze(new M(n,t,n.path,e)):null}).filter(t=>!!t);return n.ge.async?Promise.all(i).then(t=>k.xe(e,t)):k.xe(e,i)}get items(){return this.Se.items}Ii(e){return new t({...this.Se,Ii:e})}};Nt.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Nt({items:t,Je:Kt.ZodTuple,Ii:null,...T(e)})};var _t=class t extends D{get Mi(){return this.Se.Fi}get Ti(){return this.Se.valueType}ze(t){const{status:e,Oe:n}=this.Pe(t);if(n.Be!==u.object)return y(n,{code:d.Rt,qt:u.object,Wt:n.Be}),A;const i=[],s=this.Se.Fi,r=this.Se.valueType;for(const t in n.data)i.push({key:s.ze(new M(n,t,n.path,t)),value:r.ze(new M(n,n.data[t],n.path,t)),Ae:t in n.data});return n.ge.async?k.we(e,i):k.ke(e,i)}get element(){return this.Se.valueType}static create(e,n,i){return new t(n instanceof D?{Fi:e,valueType:n,Je:Kt.ZodRecord,...T(i)}:{Fi:it.create(),valueType:e,Je:Kt.ZodRecord,...T(n)})}},Zt=class extends D{get Mi(){return this.Se.Fi}get Ti(){return this.Se.valueType}ze(t){const{status:e,Oe:n}=this.Pe(t);if(n.Be!==u.map)return y(n,{code:d.Rt,qt:u.map,Wt:n.Be}),A;const i=this.Se.Fi,s=this.Se.valueType,r=[...n.data.entries()].map(([t,e],r)=>({key:i.ze(new M(n,t,n.path,[r,"key"])),value:s.ze(new M(n,e,n.path,[r,"value"]))}));if(n.ge.async){const t=new Map;return Promise.resolve().then(async()=>{for(const n of r){const i=await n.key,s=await n.value;if("aborted"===i.status||"aborted"===s.status)return A;"dirty"!==i.status&&"dirty"!==s.status||e.ye(),t.set(i.value,s.value)}return{status:e.value,value:t}})}{const t=new Map;for(const n of r){const i=n.key,s=n.value;if("aborted"===i.status||"aborted"===s.status)return A;"dirty"!==i.status&&"dirty"!==s.status||e.ye(),t.set(i.value,s.value)}return{status:e.value,value:t}}}};Zt.create=(t,e,n)=>new Zt({valueType:e,Fi:t,Je:Kt.ZodMap,...T(n)});var $t=class t extends D{ze(t){const{status:e,Oe:n}=this.Pe(t);if(n.Be!==u.set)return y(n,{code:d.Rt,qt:u.set,Wt:n.Be}),A;const i=this.Se;null!==i.Si&&n.data.sizei.Di.value&&(y(n,{code:d.oe,ue:i.Di.value,type:"set",re:!0,se:!1,message:i.Di.message}),e.ye());const s=this.Se.valueType;function r(t){const n=new Set;for(const i of t){if("aborted"===i.status)return A;"dirty"===i.status&&e.ye(),n.add(i.value)}return{status:e.value,value:n}}const a=[...n.data.values()].map((t,e)=>s.ze(new M(n,t,n.path,e)));return n.ge.async?Promise.all(a).then(t=>r(t)):r(a)}min(e,n){return new t({...this.Se,Si:{value:e,message:x.toString(n)}})}max(e,n){return new t({...this.Se,Di:{value:e,message:x.toString(n)}})}size(t,e){return this.min(t,e).max(t,e)}Zn(t){return this.min(1,t)}};$t.create=(t,e)=>new $t({valueType:t,Si:null,Di:null,Je:Kt.ZodSet,...T(e)});var Et=class t extends D{constructor(){super(...arguments),this.validate=this.ji}ze(t){const{Oe:e}=this.Pe(t);if(e.Be!==u.O)return y(e,{code:d.Rt,qt:u.O,Wt:e.Be}),A;function n(t,n){return g({data:t,path:e.path,pe:[e.ge.ve,e.be,v(),m].filter(t=>!!t),fe:{code:d.Qt,Ct:n}})}function i(t,n){return g({data:t,path:e.path,pe:[e.ge.ve,e.be,v(),m].filter(t=>!!t),fe:{code:d.Xt,Ot:n}})}const s={Me:e.ge.ve},r=e.data;if(this.Se.Bi instanceof Dt){const t=this;return _(async function(...e){const a=new h([]),o=await t.Se.Pi.Ve(e,s).catch(t=>{throw a.Dt(n(e,t)),a}),u=await Reflect.apply(r,this,o);return await t.Se.Bi.Se.type.Ve(u,s).catch(t=>{throw a.Dt(i(u,t)),a})})}{const t=this;return _(function(...e){const a=t.Se.Pi.Ue(e,s);if(!a.Ee)throw new h([n(e,a.error)]);const o=Reflect.apply(r,this,a.data),u=t.Se.Bi.Ue(o,s);if(!u.Ee)throw new h([i(o,u.error)]);return u.data})}}parameters(){return this.Se.Pi}Oi(){return this.Se.Bi}Pi(...e){return new t({...this.Se,Pi:Nt.create(e).Ii(mt.create())})}Bi(e){return new t({...this.Se,Bi:e})}ji(t){return this.parse(t)}Ci(t){return this.parse(t)}static create(e,n,i){return new t({Pi:e||Nt.create([]).Ii(mt.create()),Bi:n||mt.create(),Je:Kt.ZodFunction,...T(i)})}},It=class extends D{get He(){return this.Se.zi()}ze(t){const{Oe:e}=this.Pe(t);return this.Se.zi().ze({data:e.data,path:e.path,parent:e})}};It.create=(t,e)=>new It({zi:t,Je:Kt.ZodLazy,...T(e)});var Mt=class extends D{ze(t){if(t.data!==this.Se.value){const e=this.je(t);return y(e,{Wt:e.data,code:d.Kt,qt:this.Se.value}),A}return{status:"valid",value:t.data}}get value(){return this.Se.value}};function Ft(t,e){return new Tt({values:t,Je:Kt.ZodEnum,...T(e)})}Mt.create=(t,e)=>new Mt({value:t,Je:Kt.ZodLiteral,...T(e)});var Tt=class t extends D{ze(t){if("string"!=typeof t.data){const e=this.je(t),n=this.Se.values;return y(e,{qt:s.It(n),Wt:e.Be,code:d.Rt}),A}if(this.Li||(this.Li=new Set(this.Se.values)),!this.Li.has(t.data)){const e=this.je(t),n=this.Se.values;return y(e,{Wt:e.data,code:d.Gt,options:n}),A}return _(t.data)}get options(){return this.Se.values}get P(){const t={};for(const e of this.Se.values)t[e]=e;return t}get Ui(){const t={};for(const e of this.Se.values)t[e]=e;return t}get Vi(){const t={};for(const e of this.Se.values)t[e]=e;return t}Ri(e,n=this.Se){return t.create(e,{...this.Se,...n})}Wi(e,n=this.Se){return t.create(this.options.filter(t=>!e.includes(t)),{...this.Se,...n})}};Tt.create=Ft;var St=class extends D{ze(t){const e=s.Zt(this.Se.values),n=this.je(t);if(n.Be!==u.string&&n.Be!==u.number){const t=s.Et(e);return y(n,{qt:s.It(t),Wt:n.Be,code:d.Rt}),A}if(this.Li||(this.Li=new Set(s.Zt(this.Se.values))),!this.Li.has(t.data)){const t=s.Et(e);return y(n,{Wt:n.data,code:d.Gt,options:t}),A}return _(t.data)}get P(){return this.Se.values}};St.create=(t,e)=>new St({values:t,Je:Kt.ZodNativeEnum,...T(e)});var Dt=class extends D{oi(){return this.Se.type}ze(t){const{Oe:e}=this.Pe(t);if(e.Be!==u.promise&&!1===e.ge.async)return y(e,{code:d.Rt,qt:u.promise,Wt:e.Be}),A;const n=e.Be===u.promise?e.data:Promise.resolve(e.data);return _(n.then(t=>this.Se.type.Ve(t,{path:e.path,Me:e.ge.ve})))}};Dt.create=(t,e)=>new Dt({type:t,Je:Kt.ZodPromise,...T(e)});var jt=class extends D{rn(){return this.Se.He}qi(){return this.Se.He.Se.Je===Kt.ZodEffects?this.Se.He.qi():this.Se.He}ze(t){const{status:e,Oe:n}=this.Pe(t),i=this.Se.effect||null,r={Dt:t=>{y(n,t),t.fatal?e.abort():e.ye()},get path(){return n.path}};if(r.Dt=r.Dt.bind(r),"preprocess"===i.type){const t=i.transform(n.data,r);if(n.ge.async)return Promise.resolve(t).then(async t=>{if("aborted"===e.value)return A;const i=await this.Se.He.Le({data:t,path:n.path,parent:n});return"aborted"===i.status?A:"dirty"===i.status||"dirty"===e.value?N(i.value):i});{if("aborted"===e.value)return A;const i=this.Se.He.Ce({data:t,path:n.path,parent:n});return"aborted"===i.status?A:"dirty"===i.status||"dirty"===e.value?N(i.value):i}}if("refinement"===i.type){const t=t=>{const e=i.Ke(t,r);if(n.ge.async)return Promise.resolve(e);if(e instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return t};if(!1===n.ge.async){const i=this.Se.He.Ce({data:n.data,path:n.path,parent:n});return"aborted"===i.status?A:("dirty"===i.status&&e.ye(),t(i.value),{status:e.value,value:i.value})}return this.Se.He.Le({data:n.data,path:n.path,parent:n}).then(n=>"aborted"===n.status?A:("dirty"===n.status&&e.ye(),t(n.value).then(()=>({status:e.value,value:n.value}))))}if("transform"===i.type){if(!1===n.ge.async){const t=this.Se.He.Ce({data:n.data,path:n.path,parent:n});if(!E(t))return A;const s=i.transform(t.value,r);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:e.value,value:s}}return this.Se.He.Le({data:n.data,path:n.path,parent:n}).then(t=>E(t)?Promise.resolve(i.transform(t.value,r)).then(t=>({status:e.value,value:t})):A)}s.Nt(i)}};jt.create=(t,e,n)=>new jt({He:t,Je:Kt.ZodEffects,effect:e,...T(n)}),jt.Ki=(t,e,n)=>new jt({He:e,effect:{type:"preprocess",transform:t},Je:Kt.ZodEffects,...T(n)});var Bt=class extends D{ze(t){return this.De(t)===u.undefined?_(void 0):this.Se.rn.ze(t)}oi(){return this.Se.rn}};Bt.create=(t,e)=>new Bt({rn:t,Je:Kt.ZodOptional,...T(e)});var Pt=class extends D{ze(t){return this.De(t)===u.null?_(null):this.Se.rn.ze(t)}oi(){return this.Se.rn}};Pt.create=(t,e)=>new Pt({rn:t,Je:Kt.ZodNullable,...T(e)});var Ot=class extends D{ze(t){const{Oe:e}=this.Pe(t);let n=e.data;return e.Be===u.undefined&&(n=this.Se.defaultValue()),this.Se.rn.ze({data:n,path:e.path,parent:e})}Hi(){return this.Se.rn}};Ot.create=(t,e)=>new Ot({rn:t,Je:Kt.ZodDefault,defaultValue:"function"==typeof e.default?e.default:()=>e.default,...T(e)});var Ct=class extends D{ze(t){const{Oe:e}=this.Pe(t),n={...e,ge:{...e.ge,St:[]}},i=this.Se.rn.ze({data:n.data,path:n.path,parent:{...n}});return I(i)?i.then(t=>({status:"valid",value:"valid"===t.status?t.value:this.Se.an({get error(){return new h(n.ge.St)},input:n.data})})):{status:"valid",value:"valid"===i.status?i.value:this.Se.an({get error(){return new h(n.ge.St)},input:n.data})}}Ji(){return this.Se.rn}};Ct.create=(t,e)=>new Ct({rn:t,Je:Kt.ZodCatch,an:"function"==typeof e.catch?e.catch:()=>e.catch,...T(e)});var zt=class extends D{ze(t){if(this.De(t)!==u.G){const e=this.je(t);return y(e,{code:d.Rt,qt:u.G,Wt:e.Be}),A}return{status:"valid",value:t.data}}};zt.create=t=>new zt({Je:Kt.ZodNaN,...T(t)});var Lt=Symbol("zod_brand"),Ut=class extends D{ze(t){const{Oe:e}=this.Pe(t),n=e.data;return this.Se.type.ze({data:n,path:e.path,parent:e})}oi(){return this.Se.type}},Vt=class t extends D{ze(t){const{status:e,Oe:n}=this.Pe(t);if(n.ge.async)return(async()=>{const t=await this.Se.in.Le({data:n.data,path:n.path,parent:n});return"aborted"===t.status?A:"dirty"===t.status?(e.ye(),N(t.value)):this.Se.Yi.Le({data:t.value,path:n.path,parent:n})})();{const t=this.Se.in.Ce({data:n.data,path:n.path,parent:n});return"aborted"===t.status?A:"dirty"===t.status?(e.ye(),{status:"dirty",value:t.value}):this.Se.Yi.Ce({data:t.value,path:n.path,parent:n})}}static create(e,n){return new t({in:e,Yi:n,Je:Kt.ZodPipeline})}},Rt=class extends D{ze(t){const e=this.Se.rn.ze(t),n=t=>(E(t)&&(t.value=Object.freeze(t.value)),t);return I(e)?e.then(t=>n(t)):n(e)}oi(){return this.Se.rn}};function Wt(t,e){const n="function"==typeof t?t(e):"string"==typeof t?{message:t}:t;return"string"==typeof n?{message:n}:n}function qt(t,e={},n){return t?ht.create().Ye((i,s)=>{const r=t(i);if(r instanceof Promise)return r.then(t=>{if(!t){const t=Wt(e,i),r=t.fatal??n??!0;s.Dt({code:"custom",...t,fatal:r})}});if(!r){const t=Wt(e,i),r=t.fatal??n??!0;s.Dt({code:"custom",...t,fatal:r})}}):ht.create()}Rt.create=(t,e)=>new Rt({rn:t,Je:Kt.ZodReadonly,...T(e)});var Kt,Ht,Jt={object:bt.Zi};(Ht=Kt||(Kt={})).ZodString="ZodString",Ht.ZodNumber="ZodNumber",Ht.ZodNaN="ZodNaN",Ht.ZodBigInt="ZodBigInt",Ht.ZodBoolean="ZodBoolean",Ht.ZodDate="ZodDate",Ht.ZodSymbol="ZodSymbol",Ht.ZodUndefined="ZodUndefined",Ht.ZodNull="ZodNull",Ht.ZodAny="ZodAny",Ht.ZodUnknown="ZodUnknown",Ht.ZodNever="ZodNever",Ht.ZodVoid="ZodVoid",Ht.ZodArray="ZodArray",Ht.ZodObject="ZodObject",Ht.ZodUnion="ZodUnion",Ht.ZodDiscriminatedUnion="ZodDiscriminatedUnion",Ht.ZodIntersection="ZodIntersection",Ht.ZodTuple="ZodTuple",Ht.ZodRecord="ZodRecord",Ht.ZodMap="ZodMap",Ht.ZodSet="ZodSet",Ht.ZodFunction="ZodFunction",Ht.ZodLazy="ZodLazy",Ht.ZodLiteral="ZodLiteral",Ht.ZodEnum="ZodEnum",Ht.ZodEffects="ZodEffects",Ht.ZodNativeEnum="ZodNativeEnum",Ht.ZodOptional="ZodOptional",Ht.ZodNullable="ZodNullable",Ht.ZodDefault="ZodDefault",Ht.ZodCatch="ZodCatch",Ht.ZodPromise="ZodPromise",Ht.ZodBranded="ZodBranded",Ht.ZodPipeline="ZodPipeline",Ht.ZodReadonly="ZodReadonly";var Yt=(t,e={message:`Input not instance of ${t.name}`})=>qt(e=>e instanceof t,e),Gt=it.create,Qt=rt.create,Xt=zt.create,te=at.create,ee=ot.create,ne=ut.create,ie=ct.create,se=dt.create,re=lt.create,ae=ht.create,oe=mt.create,ue=pt.create,ce=ft.create,de=vt.create,le=bt.create,he=bt._i,me=yt.create,pe=wt.create,fe=At.create,ve=Nt.create,ge=_t.create,be=Zt.create,ye=$t.create,xe=Et.create,we=It.create,ke=Mt.create,Ae=Tt.create,Ne=St.create,_e=Dt.create,Ze=jt.create,$e=Bt.create,Ee=Pt.create,Ie=jt.Ki,Me=Vt.create,Fe=()=>Gt().rt(),Te=()=>Qt().rt(),Se=()=>ee().rt(),De={string:t=>it.create({...t,F:!0}),number:t=>rt.create({...t,F:!0}),M:t=>ot.create({...t,F:!0}),I:t=>at.create({...t,F:!0}),S:t=>ut.create({...t,F:!0})},je=A,Be=o,Pe=Be.object({Gi:Be.object({Qi:Be.string(),Xi:Be.string().We(t=>t.match("^0|([1-9]d*)([.](0|([1-9]d*))){2}$")),ts:Be.string().We(t=>t.match("^0|([1-9]d*)([.](0|([1-9]d*))){2}$")).rt()}),es:Be.object({name:Be.string(),ns:Be.string()}).rt(),ss:Be.$(Be.object({name:Be.string().rt(),enabled:Be.M(),coords:Be.object({rs:Be.number(),us:Be.number(),px:Be.number(),cs:Be.number()}),sources:Be.$(Be.string()),ds:Be.number().rt(),animation:Be.object({ls:Be.number().rt(),hs:Be.number().rt(),frameCount:Be.number().rt(),ps:Be.number().rt(),fs:Be.number().rt(),vs:Be.number().rt(),gs:Be.number().rt(),startTime:Be.number().rt(),looping:Be.M().rt()}).rt(),uuid:Be.string()})),bs:Be.$(Be.object({name:Be.string().rt(),url:Be.string()})),ys:Be.$(Be.object({name:Be.string().rt(),url:Be.string()}))}),Oe=Be.object({name:Be.string().rt(),coords:Be.$(Be.number()),xs:Be.number().rt(),enabled:Be.M(),ws:Be.string().rt(),uuid:Be.string()}),Ce=Be.object({name:Be.string().rt(),url:Be.string(),ks:Be.$(Be.object({xs:Be.number().rt(),uuid:Be.string()})).rt()}),ze=Be.object({Qi:Be.string(),ts:Be.string().We(t=>t.match("^0|([1-9]d*)([.](0|([1-9]d*))){2}$")).rt(),Xi:Be.string().We(t=>t.match("^0|([1-9]d*)([.](0|([1-9]d*))){2}$")),ss:Be.$(Oe),links:Be.$(Ce).rt()}),Le=document.querySelector("#bm-manage-templates table");Le&&"TABLE"===Le.nodeName.toLocaleUpperCase()&&(Le=Le.children[0])&&"BM"===Re.getType()&&Re.get().ss.forEach((t,e)=>{const i=n("tr",{id:"main-row"}),s=n("td",{textContent:e.toString()}),r=n("td",{textContent:t.name||"unnamed-0"}),a=document.createElement("td"),o=n("button",{id:"enable"});a.appendChild(o);const u=document.createElement("td"),c=n("button",{id:"exportAdd"});u.appendChild(c);const d=document.createElement("td"),l=n("div",{className:"shifts-container"}),h=n("button",{id:"up"}),m=n("button",{id:"down"});l.append(h,m),d.appendChild(l),i.append(s,r,a,u,d)});var Ue={"bm-create-template":"flex","bm-main-overlay":"flex","bm-manage-links":"flex","bm-manage-templates":"flex"},Ve=document.createElement("style");Ve.textContent='#bm-overlay{position:fixed;background-color:#153063e6;color:#fff;padding:10px;border-radius:8px;z-index:9000;transition:all .3s ease,transform 0s;max-width:300px;width:auto;will-change:transform;backface-visibility:hidden;-webkit-backface-visibility:hidden;transform-style:preserve-3d;-webkit-transform-style:preserve-3d}#bm-contain-userinfo,#bm-overlay hr,#bm-contain-automation,#bm-contain-buttons-action{transition:opacity .2s ease,height .2s ease}div#bm-overlay{font-family:Roboto Mono,Courier New,Monaco,DejaVu Sans Mono,monospace,Arial;letter-spacing:.05em}#bm-bar-drag{margin-bottom:.5em;background:url(\'data:image/svg+xml;utf8,\') repeat;cursor:grab;width:100%;height:1em}#bm-bar-drag.dragging{cursor:grabbing}#bm-overlay:has(#bm-bar-drag.dragging){pointer-events:none;user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none}#bm-bar-drag.dragging{pointer-events:auto}#bm-contain-header{margin-bottom:.5em}#bm-contain-header[style*="text-align: center"]{display:flex;flex-direction:column;align-items:center;justify-content:center}#bm-overlay[style*="padding: 5px"]{width:auto!important;max-width:300px;min-width:200px}#bm-overlay img{display:inline-block;height:2.5em;margin-right:1ch;vertical-align:middle;transition:opacity .2s ease}#bm-contain-header[style*="text-align: center"] img{display:block;margin:0 auto}#bm-bar-drag{transition:margin-bottom .2s ease}#bm-overlay h1{display:inline-block;font-size:x-large;font-weight:700;vertical-align:middle}#bm-contain-automation input[type=checkbox]{vertical-align:middle;margin-right:.5ch}#bm-contain-automation label{margin-right:.5ch}.bm-help{border:white 1px solid;height:1.5em;width:1.5em;margin-top:2px;text-align:center;line-height:1em;padding:0!important}#bm-button-coords{vertical-align:middle}#bm-button-coords svg{width:50%;margin:0 auto;fill:#111}div:has(>#bm-button-teleport){display:flex;gap:.5ch}#bm-button-favorite svg,#bm-button-template svg{height:1em;margin:2px auto 0;text-align:center;line-height:1em;vertical-align:bottom}#bm-contain-coords input[type=number]{appearance:auto;-moz-appearance:textfield;width:5.5ch;margin-left:1ch;background-color:#0003;padding:0 .5ch;font-size:small}#bm-contain-coords input[type=number]::-webkit-outer-spin-button,#bm-contain-coords input[type=number]::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}#bm-contain-buttons-template{display:flex;flex-direction:row;flex-wrap:wrap;align-content:center;justify-content:center;align-items:center;gap:1ch}div:has(>#bm-input-file-template)>button{width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}#bm-input-file-template,input[type=file][id*=template]{display:none!important;visibility:hidden!important;position:absolute!important;left:-9999px!important;top:-9999px!important;width:0!important;height:0!important;opacity:0!important;z-index:-9999!important;pointer-events:none!important}#bm-output-status{font-size:small;background-color:#0003;padding:0 .5ch;height:3.75em;width:100%}#bm-contain-buttons-action{display:flex;justify-content:space-between}#bm-overlay small{font-size:x-small;color:#d3d3d3}#bm-contain-userinfo,#bm-contain-automation,#bm-contain-coords,#bm-contain-buttons-template,div:has(>#bm-input-file-template),#bm-output-status{margin-top:.5em}#bm-overlay button{background-color:#144eb9;border-radius:1em;padding:0 .75ch}#bm-overlay button:hover,#bm-overlay button:focus-visible{background-color:#1061e5}#bm-overlay button:active,#bm-overlay button:disabled{background-color:#2e97ff}#bm-overlay button:disabled{text-decoration:line-through}\n',document.body.appendChild(Ve),document.querySelector("body").innerHTML+='\x3c!-- body --\x3e\n
\n
\n
\n

Create new template

\n \n
\n
\n
\n \n
\n \n \n \n \n \n
\n
\n

Drag and drop an image here

\n

-- or --

\n \n
\n
\n \n
\n
',document.querySelector("body").innerHTML+='\x3c!-- body --\x3e\n
\n
\n
\n

Blue Marble

\n \n
\n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n
Name:
Droplets:
Next level in...
\n
\n \n \n
\n
\n

Made by SwingTheVine

\n
\n\n',document.querySelector("body").innerHTML+='\x3c!-- body --\x3e\n ',document.querySelector("body").innerHTML+='\x3c!-- body --\x3e\n
\n
\n
\n

Template manager

\n \n
\n
\n \n \n \n
\n \n \n \n \n \n \n \x3c!--list of templates goes here--\x3e\n
\n #\n \n \n Name\n \n Enabled\n \n Export\n
\n
\n \n
';var Re=new class{constructor(t){e(this,"object"),e(this,"type"),this.object=t,t&&(Pe.Ue(t).Ee?this.type="CHA":ze.Ue(t).Ee?this.type="BM":this.type="N/A")}update(t){if(ze.Ue(t).Ee)this.type="BM";else{if(!Pe.Ue(t).Ee)return;this.type="CHA"}this.object=t}get(){return this.object}getType(){return this.type}As(){"N/A"!==this.type&&"CHA"!==this.type&&("BM"===this.type&&(this.object=this.object,this.object={Gi:{Qi:"Charity",Xi:"0.1.0",ts:this.object.ts},ss:this.object.ss.map(t=>({name:t.name,enabled:t.enabled||!1,coords:{rs:t.coords[0],us:t.coords[1],px:t.coords[2],cs:t.coords[3]},sources:[t.ws||""],ds:t.xs,uuid:t.uuid})),bs:[],ys:[]}),this.type="CHA")}Ns(){"N/A"!==this.type&&"BM"!==this.type&&("CHA"===this.type&&(this.object=this.object,this.object={Qi:"BlueMarble",Xi:"0.1.0",ts:this.object.Gi.ts,ss:this.object.ss.map(t=>({name:t.name,coords:Object.values(t.coords),_s:t.ds,enabled:t.enabled,ws:t.sources[0],uuid:t.uuid}))}),this.type="BM")}appendData(t){"BM"===this.type&&(this.object=this.object,Pe.parse(t)?this.object.ss.push(...t.ss.map(t=>({name:t.name,coords:Object.values(t.coords),_s:t.ds,enabled:t.enabled,ws:t.sources[0],uuid:t.uuid}))):ze.parse(t)&&(this.object.ss.push(...t.ss),this.object.links?t.links&&this.object.links.push(...t.links):this.object.links=t.links))}Zs(t){"BM"===this.type&&this.object.ss.push(t)}$s(t){"BM"===this.type&&(this.object=this.object,this.object.links?this.object.links.push(t):this.object.links=[t])}Es(t,e){if("N/A"===this.type)return null;if(this.object.hasOwnProperty("links")){const n=this.object;return{...n,ss:t?t.map(t=>!!(Number.isInteger(t)&&t>=0&&n.ss.length!!(Number.isInteger(t)&&t>=0&&n.links.length!!(Number.isInteger(t)&&t>=0&&n.ss.length=0.1.0-beta"}} \ No newline at end of file +{"id":"blue-marble","name":"Blue Marble","version":"0.0.2","authors":["SwingTheVine"],"versions":{"framework":">=0.1.0-beta"}} \ No newline at end of file diff --git a/package.json b/package.json index c7e75fb..8fb2769 100644 --- a/package.json +++ b/package.json @@ -13,13 +13,11 @@ "eslint": "^9.33.0", "globals": "^16.3.0", "jsdoc": "^4.0.4", - "minami": "^1.2.3", "prettier": "^3.6.2", "terser": "^5.43.1", "typescript-eslint": "^8.39.1" }, "dependencies": { - "@types/greasemonkey": "^4.0.7", "zod": "^4.0.17" } } diff --git a/src/createTemplate.ts b/src/createTemplate.ts index 77dfdb2..8ed3845 100644 --- a/src/createTemplate.ts +++ b/src/createTemplate.ts @@ -10,7 +10,7 @@ function close(){ function getCoords(): number[]{ - // Get coordinates of clicked on pixel + window.charity.game.map.on("click", "", (e)=>{console.log(e)}) return [] } @@ -68,4 +68,8 @@ function createTemplate(){ export function initCreateTemplate(){ // Add event listener hooks + const coordsBtn = document.querySelector("#bm-create-template button#coords"); + if(coordsBtn && coordsBtn.nodeName.toLocaleUpperCase() === "INPUT"){ + coordsBtn.addEventListener("click", getCoords) + } } \ No newline at end of file