@storecraft/dashboard 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -140,7 +140,7 @@ Please report this to https://github.com/markedjs/marked.`,e){const s="<p>An err
140
140
  text-gray-600 dark:text-gray-400
141
141
  text-base font-semibold tracking-tight`,loading:c,onClick:d,...l})}):null},Kn=({from:t,to:e,rounded:n="rounded-lg",stroke:r="border-2",children:i,text:s="what",className:a="h-10",btnClassName:o="",...l})=>f.jsx(lt,{from:t,to:e,rounded:n,stroke:r,className:a,children:f.jsx("button",{className:`h-full w-full align-middle text-center px-3
142
142
  rounded-md shelf-button-color-soft
143
- whitespace-nowrap ${o}`,children:i??s,...l})}),dR=({from:t,to:e,rounded:n="rounded-lg",stroke:r,...i})=>f.jsx(lt,{from:t,to:e,rounded:n,stroke:r,className:"w-fit h-fit",children:f.jsx(cR,{...i})}),E1=({Icon:t,from:e="#973cff",to:n="rgb(236 72 153)",...r})=>{const i=btoa(`gradient_${e}_${n}`);return f.jsxs(f.Fragment,{children:[f.jsx("svg",{width:"0",height:"0",className:"absolute",children:f.jsxs("linearGradient",{id:i,x1:"100%",y1:"100%",x2:"0%",y2:"0%",children:[f.jsx("stop",{stopColor:e,offset:"0%"}),f.jsx("stop",{stopColor:n,offset:"100%"})]})}),f.jsx(t,{style:{fill:`url(#${i})`},...r})]})},ab="3.7.7",fR=ab,_c=typeof Buffer=="function",ob=typeof TextDecoder=="function"?new TextDecoder:void 0,lb=typeof TextEncoder=="function"?new TextEncoder:void 0,k1=Array.prototype.slice.call("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="),ap=(t=>{let e={};return t.forEach((n,r)=>e[n]=r),e})(k1),hR=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,En=String.fromCharCode.bind(String),cb=typeof Uint8Array.from=="function"?Uint8Array.from.bind(Uint8Array):t=>new Uint8Array(Array.prototype.slice.call(t,0)),ub=t=>t.replace(/=/g,"").replace(/[+\/]/g,e=>e=="+"?"-":"_"),db=t=>t.replace(/[^A-Za-z0-9\+\/]/g,""),fb=t=>{let e,n,r,i,s="";const a=t.length%3;for(let o=0;o<t.length;){if((n=t.charCodeAt(o++))>255||(r=t.charCodeAt(o++))>255||(i=t.charCodeAt(o++))>255)throw new TypeError("invalid character found");e=n<<16|r<<8|i,s+=k1[e>>18&63]+k1[e>>12&63]+k1[e>>6&63]+k1[e&63]}return a?s.slice(0,a-3)+"===".substring(a):s},K5=typeof btoa=="function"?t=>btoa(t):_c?t=>Buffer.from(t,"binary").toString("base64"):fb,q5=_c?t=>Buffer.from(t).toString("base64"):t=>{let n=[];for(let r=0,i=t.length;r<i;r+=4096)n.push(En.apply(null,t.subarray(r,r+4096)));return K5(n.join(""))},op=(t,e=!1)=>e?ub(q5(t)):q5(t),pR=t=>{if(t.length<2){var e=t.charCodeAt(0);return e<128?t:e<2048?En(192|e>>>6)+En(128|e&63):En(224|e>>>12&15)+En(128|e>>>6&63)+En(128|e&63)}else{var e=65536+(t.charCodeAt(0)-55296)*1024+(t.charCodeAt(1)-56320);return En(240|e>>>18&7)+En(128|e>>>12&63)+En(128|e>>>6&63)+En(128|e&63)}},mR=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,hb=t=>t.replace(mR,pR),pb=_c?t=>Buffer.from(t,"utf8").toString("base64"):lb?t=>q5(lb.encode(t)):t=>K5(hb(t)),bc=(t,e=!1)=>e?ub(pb(t)):pb(t),mb=t=>bc(t,!0),gR=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,vR=t=>{switch(t.length){case 4:var e=(7&t.charCodeAt(0))<<18|(63&t.charCodeAt(1))<<12|(63&t.charCodeAt(2))<<6|63&t.charCodeAt(3),n=e-65536;return En((n>>>10)+55296)+En((n&1023)+56320);case 3:return En((15&t.charCodeAt(0))<<12|(63&t.charCodeAt(1))<<6|63&t.charCodeAt(2));default:return En((31&t.charCodeAt(0))<<6|63&t.charCodeAt(1))}},gb=t=>t.replace(gR,vR),vb=t=>{if(t=t.replace(/\s+/g,""),!hR.test(t))throw new TypeError("malformed base64.");t+="==".slice(2-(t.length&3));let e,n="",r,i;for(let s=0;s<t.length;)e=ap[t.charAt(s++)]<<18|ap[t.charAt(s++)]<<12|(r=ap[t.charAt(s++)])<<6|(i=ap[t.charAt(s++)]),n+=r===64?En(e>>16&255):i===64?En(e>>16&255,e>>8&255):En(e>>16&255,e>>8&255,e&255);return n},Q5=typeof atob=="function"?t=>atob(db(t)):_c?t=>Buffer.from(t,"base64").toString("binary"):vb,yb=_c?t=>cb(Buffer.from(t,"base64")):t=>cb(Q5(t).split("").map(e=>e.charCodeAt(0))),xb=t=>yb(_b(t)),yR=_c?t=>Buffer.from(t,"base64").toString("utf8"):ob?t=>ob.decode(yb(t)):t=>gb(Q5(t)),_b=t=>db(t.replace(/[-_]/g,e=>e=="-"?"+":"/")),X5=t=>yR(_b(t)),xR=t=>{if(typeof t!="string")return!1;const e=t.replace(/\s+/g,"").replace(/={0,2}$/,"");return!/[^\s0-9a-zA-Z\+/]/.test(e)||!/[^\s0-9a-zA-Z\-_]/.test(e)},bb=t=>({value:t,enumerable:!1,writable:!0,configurable:!0}),wb=function(){const t=(e,n)=>Object.defineProperty(String.prototype,e,bb(n));t("fromBase64",function(){return X5(this)}),t("toBase64",function(e){return bc(this,e)}),t("toBase64URI",function(){return bc(this,!0)}),t("toBase64URL",function(){return bc(this,!0)}),t("toUint8Array",function(){return xb(this)})},Eb=function(){const t=(e,n)=>Object.defineProperty(Uint8Array.prototype,e,bb(n));t("toBase64",function(e){return op(this,e)}),t("toBase64URI",function(){return op(this,!0)}),t("toBase64URL",function(){return op(this,!0)})},_R={version:ab,VERSION:fR,atob:Q5,atobPolyfill:vb,btoa:K5,btoaPolyfill:fb,fromBase64:X5,toBase64:bc,encode:bc,encodeURI:mb,encodeURL:mb,utob:hb,btou:gb,decode:X5,isValid:xR,fromUint8Array:op,toUint8Array:xb,extendString:wb,extendUint8Array:Eb,extendBuiltins:()=>{wb(),Eb()}},kb=t=>t.toLowerCase().split(" ").join("-"),Z5=async()=>{let t;try{t=await navigator.clipboard.readText(),console.log("Content read from clipboard: ",t)}catch(e){console.error("Failed to read: ",e)}return t},J5=async t=>{try{await navigator.clipboard.writeText(t),console.log("Content copied to clipboard")}catch(e){console.error("Failed to copy: ",e)}},Tb=()=>"maxTouchPoints"in navigator?navigator.maxTouchPoints>0:!1,bR=t=>JSON.parse(_R.decode(decodeURIComponent(t)));var e4=wn.GenIcon,wR=function(e){return e4({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M2.00488 4C2.00488 3.44772 2.4526 3 3.00488 3H21.0049C21.5572 3 22.0049 3.44772 22.0049 4V9.5C20.6242 9.5 19.5049 10.6193 19.5049 12C19.5049 13.3807 20.6242 14.5 22.0049 14.5V20C22.0049 20.5523 21.5572 21 21.0049 21H3.00488C2.4526 21 2.00488 20.5523 2.00488 20V4ZM8.09024 19C8.29615 18.4174 8.85177 18 9.50488 18C10.158 18 10.7136 18.4174 10.9195 19H20.0049V16.0322C18.5232 15.2959 17.5049 13.7669 17.5049 12C17.5049 10.2331 18.5232 8.70411 20.0049 7.96776V5H10.9195C10.7136 5.5826 10.158 6 9.50488 6C8.85177 6 8.29615 5.5826 8.09024 5H4.00488V19H8.09024ZM9.50488 11C8.67646 11 8.00488 10.3284 8.00488 9.5C8.00488 8.67157 8.67646 8 9.50488 8C10.3333 8 11.0049 8.67157 11.0049 9.5C11.0049 10.3284 10.3333 11 9.50488 11ZM9.50488 16C8.67646 16 8.00488 15.3284 8.00488 14.5C8.00488 13.6716 8.67646 13 9.50488 13C10.3333 13 11.0049 13.6716 11.0049 14.5C11.0049 15.3284 10.3333 16 9.50488 16Z"}}]})(e)},ER=function(e){return e4({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M20 13C18.3221 13 16.7514 13.4592 15.4068 14.2587C16.5908 15.6438 17.5269 17.2471 18.1465 19H20V13ZM16.0037 19C14.0446 14.3021 9.4079 11 4 11V19H16.0037ZM4 9C7.82914 9 11.3232 10.4348 13.9738 12.7961C15.7047 11.6605 17.7752 11 20 11V3H21.0082C21.556 3 22 3.44495 22 3.9934V20.0066C22 20.5552 21.5447 21 21.0082 21H2.9918C2.44405 21 2 20.5551 2 20.0066V3.9934C2 3.44476 2.45531 3 2.9918 3H6V1H8V5H4V9ZM18 1V5H10V3H16V1H18ZM16.5 10C15.6716 10 15 9.32843 15 8.5C15 7.67157 15.6716 7 16.5 7C17.3284 7 18 7.67157 18 8.5C18 9.32843 17.3284 10 16.5 10Z"}}]})(e)},kR=function(e){return e4({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M3 13H11V3H3V13ZM3 21H11V15H3V21ZM13 21H21V11H13V21ZM13 3V9H21V3H13Z"}}]})(e)},lp=wn.GenIcon,TR=function(e){return lp({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"12",r:"10"}},{tag:"line",attr:{x1:"8",y1:"12",x2:"16",y2:"12"}}]})(e)},CR=function(e){return lp({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"12",r:"10"}},{tag:"line",attr:{x1:"12",y1:"8",x2:"12",y2:"16"}},{tag:"line",attr:{x1:"8",y1:"12",x2:"16",y2:"12"}}]})(e)},SR=function(e){return lp({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z"}},{tag:"polyline",attr:{points:"17 21 17 13 7 13 7 21"}},{tag:"polyline",attr:{points:"7 3 7 8 15 8"}}]})(e)},NR=function(e){return lp({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"12",r:"3"}},{tag:"path",attr:{d:"M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"}}]})(e)};const AR={name:"@storecraft/dashboard",private:"false",version:"1.0.0",description:"Storecraft Official Dashboard",license:"MIT",author:"Tomer Shalev (https://github.com/store-craft)",homepage:"https://github.com/store-craft/storecraft",repository:{type:"git",url:"https://github.com/store-craft/storecraft.git",directory:"packages/dashboard"},keywords:["commerce","dashboard","react","storecraft"],type:"module",module:"./src/index.jsx",exports:{".":{import:"./dist/lib/index.js",require:"./dist/lib/index.umd.cjs",types:"./dist/lib/src/index.d.ts"}},scripts:{start:"npm run dashboard:dev","dashboard:dev":"vite","dashboard:build":"vite build && npm run dashboard:lib:build","dashboard:lib:build":"vite build -c vite.lib.config.js","dashboard:lint":"eslint . --ext js,jsx --report-unused-disable-directives --max-warnings 0","dashboard:preview":"vite preview","dashboard:publish":"npm publish --access public","dashboard:analyze":"npx vite-bundle-visualizer -c vite.lib.config.js",prepublishOnly:"npm run dashboard:build"},dependencies:{"@storecraft/core":"^1.0.0","@storecraft/sdk":"^0.1.0","@storecraft/sdk-react-hooks":"^0.1.0","@uiw/react-md-editor":"^3.18.1","@monaco-editor/react":"^4.6.0","monaco-editor":"^0.48.0","chart.js":"^4.2.0",handlebars:"^4.7.8","js-base64":"^3.7.5",marked:"^5.0.2",react:"18.2.0","react-datepicker":"^4.10.0","react-dom":"18.2.0","react-drag-drop-container":"^6.1.1","react-icons":"^4.9.0","react-image-crop":"^10.0.7","react-inspector":"^6.0.1","react-router-dom":"^6.14.1"},devDependencies:{"@types/react":"^18.2.66","@types/react-datepicker":"^6.2.0","@types/react-dom":"^18.2.22","@types/react-image-crop":"^8.1.6","@vitejs/plugin-react":"^4.2.1",autoprefixer:"^10.4.19",eslint:"^8.57.0","eslint-plugin-react":"^7.34.1","eslint-plugin-react-hooks":"^4.6.0","eslint-plugin-react-refresh":"^0.4.6",postcss:"^8.4.38","postcss-flexbugs-fixes":"^5.0.2","postcss-import":"^14.1.0","postcss-preset-env":"^7.7.2",sass:"^1.58.3","tailwind-scrollbar":"^2.1.0",tailwindcss:"^3.4.3",vite:"^5.2.0","vite-plugin-css-injected-by-js":"^3.5.1","vite-plugin-dts":"^3.9.1"},files:["dist"]},DR=({...t})=>{const e=({})=>f.jsxs("div",{className:`rounded-lg my-auto b
143
+ whitespace-nowrap ${o}`,children:i??s,...l})}),dR=({from:t,to:e,rounded:n="rounded-lg",stroke:r,...i})=>f.jsx(lt,{from:t,to:e,rounded:n,stroke:r,className:"w-fit h-fit",children:f.jsx(cR,{...i})}),E1=({Icon:t,from:e="#973cff",to:n="rgb(236 72 153)",...r})=>{const i=btoa(`gradient_${e}_${n}`);return f.jsxs(f.Fragment,{children:[f.jsx("svg",{width:"0",height:"0",className:"absolute",children:f.jsxs("linearGradient",{id:i,x1:"100%",y1:"100%",x2:"0%",y2:"0%",children:[f.jsx("stop",{stopColor:e,offset:"0%"}),f.jsx("stop",{stopColor:n,offset:"100%"})]})}),f.jsx(t,{style:{fill:`url(#${i})`},...r})]})},ab="3.7.7",fR=ab,_c=typeof Buffer=="function",ob=typeof TextDecoder=="function"?new TextDecoder:void 0,lb=typeof TextEncoder=="function"?new TextEncoder:void 0,k1=Array.prototype.slice.call("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="),ap=(t=>{let e={};return t.forEach((n,r)=>e[n]=r),e})(k1),hR=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,En=String.fromCharCode.bind(String),cb=typeof Uint8Array.from=="function"?Uint8Array.from.bind(Uint8Array):t=>new Uint8Array(Array.prototype.slice.call(t,0)),ub=t=>t.replace(/=/g,"").replace(/[+\/]/g,e=>e=="+"?"-":"_"),db=t=>t.replace(/[^A-Za-z0-9\+\/]/g,""),fb=t=>{let e,n,r,i,s="";const a=t.length%3;for(let o=0;o<t.length;){if((n=t.charCodeAt(o++))>255||(r=t.charCodeAt(o++))>255||(i=t.charCodeAt(o++))>255)throw new TypeError("invalid character found");e=n<<16|r<<8|i,s+=k1[e>>18&63]+k1[e>>12&63]+k1[e>>6&63]+k1[e&63]}return a?s.slice(0,a-3)+"===".substring(a):s},K5=typeof btoa=="function"?t=>btoa(t):_c?t=>Buffer.from(t,"binary").toString("base64"):fb,q5=_c?t=>Buffer.from(t).toString("base64"):t=>{let n=[];for(let r=0,i=t.length;r<i;r+=4096)n.push(En.apply(null,t.subarray(r,r+4096)));return K5(n.join(""))},op=(t,e=!1)=>e?ub(q5(t)):q5(t),pR=t=>{if(t.length<2){var e=t.charCodeAt(0);return e<128?t:e<2048?En(192|e>>>6)+En(128|e&63):En(224|e>>>12&15)+En(128|e>>>6&63)+En(128|e&63)}else{var e=65536+(t.charCodeAt(0)-55296)*1024+(t.charCodeAt(1)-56320);return En(240|e>>>18&7)+En(128|e>>>12&63)+En(128|e>>>6&63)+En(128|e&63)}},mR=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,hb=t=>t.replace(mR,pR),pb=_c?t=>Buffer.from(t,"utf8").toString("base64"):lb?t=>q5(lb.encode(t)):t=>K5(hb(t)),bc=(t,e=!1)=>e?ub(pb(t)):pb(t),mb=t=>bc(t,!0),gR=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,vR=t=>{switch(t.length){case 4:var e=(7&t.charCodeAt(0))<<18|(63&t.charCodeAt(1))<<12|(63&t.charCodeAt(2))<<6|63&t.charCodeAt(3),n=e-65536;return En((n>>>10)+55296)+En((n&1023)+56320);case 3:return En((15&t.charCodeAt(0))<<12|(63&t.charCodeAt(1))<<6|63&t.charCodeAt(2));default:return En((31&t.charCodeAt(0))<<6|63&t.charCodeAt(1))}},gb=t=>t.replace(gR,vR),vb=t=>{if(t=t.replace(/\s+/g,""),!hR.test(t))throw new TypeError("malformed base64.");t+="==".slice(2-(t.length&3));let e,n="",r,i;for(let s=0;s<t.length;)e=ap[t.charAt(s++)]<<18|ap[t.charAt(s++)]<<12|(r=ap[t.charAt(s++)])<<6|(i=ap[t.charAt(s++)]),n+=r===64?En(e>>16&255):i===64?En(e>>16&255,e>>8&255):En(e>>16&255,e>>8&255,e&255);return n},Q5=typeof atob=="function"?t=>atob(db(t)):_c?t=>Buffer.from(t,"base64").toString("binary"):vb,yb=_c?t=>cb(Buffer.from(t,"base64")):t=>cb(Q5(t).split("").map(e=>e.charCodeAt(0))),xb=t=>yb(_b(t)),yR=_c?t=>Buffer.from(t,"base64").toString("utf8"):ob?t=>ob.decode(yb(t)):t=>gb(Q5(t)),_b=t=>db(t.replace(/[-_]/g,e=>e=="-"?"+":"/")),X5=t=>yR(_b(t)),xR=t=>{if(typeof t!="string")return!1;const e=t.replace(/\s+/g,"").replace(/={0,2}$/,"");return!/[^\s0-9a-zA-Z\+/]/.test(e)||!/[^\s0-9a-zA-Z\-_]/.test(e)},bb=t=>({value:t,enumerable:!1,writable:!0,configurable:!0}),wb=function(){const t=(e,n)=>Object.defineProperty(String.prototype,e,bb(n));t("fromBase64",function(){return X5(this)}),t("toBase64",function(e){return bc(this,e)}),t("toBase64URI",function(){return bc(this,!0)}),t("toBase64URL",function(){return bc(this,!0)}),t("toUint8Array",function(){return xb(this)})},Eb=function(){const t=(e,n)=>Object.defineProperty(Uint8Array.prototype,e,bb(n));t("toBase64",function(e){return op(this,e)}),t("toBase64URI",function(){return op(this,!0)}),t("toBase64URL",function(){return op(this,!0)})},_R={version:ab,VERSION:fR,atob:Q5,atobPolyfill:vb,btoa:K5,btoaPolyfill:fb,fromBase64:X5,toBase64:bc,encode:bc,encodeURI:mb,encodeURL:mb,utob:hb,btou:gb,decode:X5,isValid:xR,fromUint8Array:op,toUint8Array:xb,extendString:wb,extendUint8Array:Eb,extendBuiltins:()=>{wb(),Eb()}},kb=t=>t.toLowerCase().split(" ").join("-"),Z5=async()=>{let t;try{t=await navigator.clipboard.readText(),console.log("Content read from clipboard: ",t)}catch(e){console.error("Failed to read: ",e)}return t},J5=async t=>{try{await navigator.clipboard.writeText(t),console.log("Content copied to clipboard")}catch(e){console.error("Failed to copy: ",e)}},Tb=()=>"maxTouchPoints"in navigator?navigator.maxTouchPoints>0:!1,bR=t=>JSON.parse(_R.decode(decodeURIComponent(t)));var e4=wn.GenIcon,wR=function(e){return e4({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M2.00488 4C2.00488 3.44772 2.4526 3 3.00488 3H21.0049C21.5572 3 22.0049 3.44772 22.0049 4V9.5C20.6242 9.5 19.5049 10.6193 19.5049 12C19.5049 13.3807 20.6242 14.5 22.0049 14.5V20C22.0049 20.5523 21.5572 21 21.0049 21H3.00488C2.4526 21 2.00488 20.5523 2.00488 20V4ZM8.09024 19C8.29615 18.4174 8.85177 18 9.50488 18C10.158 18 10.7136 18.4174 10.9195 19H20.0049V16.0322C18.5232 15.2959 17.5049 13.7669 17.5049 12C17.5049 10.2331 18.5232 8.70411 20.0049 7.96776V5H10.9195C10.7136 5.5826 10.158 6 9.50488 6C8.85177 6 8.29615 5.5826 8.09024 5H4.00488V19H8.09024ZM9.50488 11C8.67646 11 8.00488 10.3284 8.00488 9.5C8.00488 8.67157 8.67646 8 9.50488 8C10.3333 8 11.0049 8.67157 11.0049 9.5C11.0049 10.3284 10.3333 11 9.50488 11ZM9.50488 16C8.67646 16 8.00488 15.3284 8.00488 14.5C8.00488 13.6716 8.67646 13 9.50488 13C10.3333 13 11.0049 13.6716 11.0049 14.5C11.0049 15.3284 10.3333 16 9.50488 16Z"}}]})(e)},ER=function(e){return e4({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M20 13C18.3221 13 16.7514 13.4592 15.4068 14.2587C16.5908 15.6438 17.5269 17.2471 18.1465 19H20V13ZM16.0037 19C14.0446 14.3021 9.4079 11 4 11V19H16.0037ZM4 9C7.82914 9 11.3232 10.4348 13.9738 12.7961C15.7047 11.6605 17.7752 11 20 11V3H21.0082C21.556 3 22 3.44495 22 3.9934V20.0066C22 20.5552 21.5447 21 21.0082 21H2.9918C2.44405 21 2 20.5551 2 20.0066V3.9934C2 3.44476 2.45531 3 2.9918 3H6V1H8V5H4V9ZM18 1V5H10V3H16V1H18ZM16.5 10C15.6716 10 15 9.32843 15 8.5C15 7.67157 15.6716 7 16.5 7C17.3284 7 18 7.67157 18 8.5C18 9.32843 17.3284 10 16.5 10Z"}}]})(e)},kR=function(e){return e4({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M3 13H11V3H3V13ZM3 21H11V15H3V21ZM13 21H21V11H13V21ZM13 3V9H21V3H13Z"}}]})(e)},lp=wn.GenIcon,TR=function(e){return lp({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"12",r:"10"}},{tag:"line",attr:{x1:"8",y1:"12",x2:"16",y2:"12"}}]})(e)},CR=function(e){return lp({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"12",r:"10"}},{tag:"line",attr:{x1:"12",y1:"8",x2:"12",y2:"16"}},{tag:"line",attr:{x1:"8",y1:"12",x2:"16",y2:"12"}}]})(e)},SR=function(e){return lp({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z"}},{tag:"polyline",attr:{points:"17 21 17 13 7 13 7 21"}},{tag:"polyline",attr:{points:"7 3 7 8 15 8"}}]})(e)},NR=function(e){return lp({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"12",r:"3"}},{tag:"path",attr:{d:"M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"}}]})(e)};const AR={name:"@storecraft/dashboard",version:"1.0.1",description:"Storecraft Official Dashboard",license:"MIT",author:"Tomer Shalev (https://github.com/store-craft)",homepage:"https://github.com/store-craft/storecraft",repository:{type:"git",url:"https://github.com/store-craft/storecraft.git",directory:"packages/dashboard"},keywords:["commerce","dashboard","react","storecraft"],type:"module",module:"./src/index.jsx",exports:{".":{import:"./dist/lib/index.js",require:"./dist/lib/index.umd.cjs",types:"./dist/lib/src/index.d.ts"}},scripts:{start:"npm run dashboard:dev","dashboard:dev":"vite","dashboard:build":"vite build && npm run dashboard:lib:build","dashboard:lib:build":"vite build -c vite.lib.config.js","dashboard:lint":"eslint . --ext js,jsx --report-unused-disable-directives --max-warnings 0","dashboard:preview":"vite preview","dashboard:publish":"npm publish --access public","dashboard:analyze":"npx vite-bundle-visualizer -c vite.lib.config.js",prepublishOnly:"npm run dashboard:build"},dependencies:{"@storecraft/core":"^1.0.0","@storecraft/sdk":"^0.1.0","@storecraft/sdk-react-hooks":"^0.1.0","@uiw/react-md-editor":"^3.18.1","@monaco-editor/react":"^4.6.0","monaco-editor":"^0.48.0","chart.js":"^4.2.0",handlebars:"^4.7.8","js-base64":"^3.7.5",marked:"^5.0.2",react:"18.2.0","react-datepicker":"^4.10.0","react-dom":"18.2.0","react-drag-drop-container":"^6.1.1","react-icons":"^4.9.0","react-image-crop":"^10.0.7","react-inspector":"^6.0.1","react-router-dom":"^6.14.1"},devDependencies:{"@types/react":"^18.2.66","@types/react-datepicker":"^6.2.0","@types/react-dom":"^18.2.22","@types/react-image-crop":"^8.1.6","@vitejs/plugin-react":"^4.2.1",autoprefixer:"^10.4.19",eslint:"^8.57.0","eslint-plugin-react":"^7.34.1","eslint-plugin-react-hooks":"^4.6.0","eslint-plugin-react-refresh":"^0.4.6",postcss:"^8.4.38","postcss-flexbugs-fixes":"^5.0.2","postcss-import":"^14.1.0","postcss-preset-env":"^7.7.2",sass:"^1.58.3","tailwind-scrollbar":"^2.1.0",tailwindcss:"^3.4.3",vite:"^5.2.0","vite-plugin-css-injected-by-js":"^3.5.1","vite-plugin-dts":"^3.9.1"},files:["dist"]},DR=({...t})=>{const e=({})=>f.jsxs("div",{className:`rounded-lg my-auto b
144
144
  bg-pink-50 dark:bg-pink-50/10 w-fit text-sm
145
145
  text-pink-500 -tracking-wideset
146
146
  py-0 px-1 --border font-semibold`,children:[f.jsx("div",{children:"docs",className:"inline-block -translate-y-px --inline"}),f.jsx("span",{children:" 📖"})]});return f.jsxs("div",{className:`relative w-full h-16 flex flex-row
@@ -170,7 +170,7 @@ Please report this to https://github.com/markedjs/marked.`,e){const s="<p>An err
170
170
  `+l+` |
171
171
  `+s.line+" | "+c+`
172
172
  `+l+" | "+t4("",i.column-1," ")+t4("",d,"^")}else e+=`
173
- at `+a}return e},Ec.buildMessage=function(t,e){var n={literal:function(c){return'"'+i(c.text)+'"'},class:function(c){var u=c.parts.map(function(d){return Array.isArray(d)?s(d[0])+"-"+s(d[1]):s(d)});return"["+(c.inverted?"^":"")+u.join("")+"]"},any:function(){return"any character"},end:function(){return"end of input"},other:function(c){return c.description}};function r(c){return c.charCodeAt(0).toString(16).toUpperCase()}function i(c){return c.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(u){return"\\x0"+r(u)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(u){return"\\x"+r(u)})}function s(c){return c.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(u){return"\\x0"+r(u)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(u){return"\\x"+r(u)})}function a(c){return n[c.type](c)}function o(c){var u=c.map(a),d,h;if(u.sort(),u.length>0){for(d=1,h=1;d<u.length;d++)u[d-1]!==u[d]&&(u[h]=u[d],h++);u.length=h}switch(u.length){case 1:return u[0];case 2:return u[0]+" or "+u[1];default:return u.slice(0,-1).join(", ")+", or "+u[u.length-1]}}function l(c){return c?'"'+i(c)+'"':"end of input"}return"Expected "+o(t)+" but "+l(e)+" found."};function FR(t,e){e=e!==void 0?e:{};var n={},r=e.grammarSource,i={expression:tr},s=tr,a="|",o="-",l="(",c=")",u="'",d='"',h=/^[^"' ()|&]/,p=/^[^']/,m=/^[^"]/,g=/^[ ]/,v=Fe("expression"),y=Fe("sum term"),x=Dn("|",!1),_=Fe("product term"),w=Dn("&",!1),T=Fe("subexpression"),S=Dn("-",!1),E=Fe("term"),N=Dn("(",!1),O=Dn(")",!1),A=Fe("variable"),j=_r(['"',"'"," ","(",")","|","&"],!0,!1),$=Fe("variable 1"),K=Dn("'",!1),J=_r(["'"],!0,!1),B=Dn('"',!1),U=_r(['"'],!0,!1),Y=Fe("whitespace character(s)"),L=_r([" "],!1,!1),z=function(W,te){return Sb("|",W,te)},D=function(W,te){return Sb("&",W,te)},G=function(W){return{op:"!",args:[W]}},X=function(W){return W.group=!0,W},P=function(W){return{op:"LEAF",value:xi().trim()}},ie=function(W){return{op:"LEAF",value:xi().trim().slice(1,-1)}},V=0,ce=0,De=[{line:1,column:1}],we=0,Ne=[],ve=0,Xt;if("startRule"in e){if(!(e.startRule in i))throw new Error(`Can't start parsing from rule "`+e.startRule+'".');s=i[e.startRule]}function xi(){return t.substring(ce,V)}function Dn(W,te){return{type:"literal",text:W,ignoreCase:te}}function _r(W,te,ue){return{type:"class",parts:W,inverted:te,ignoreCase:ue}}function Is(){return{type:"end"}}function Fe(W){return{type:"other",description:W}}function _i(W){var te=De[W],ue;if(te)return te;for(ue=W-1;!De[ue];)ue--;for(te=De[ue],te={line:te.line,column:te.column};ue<W;)t.charCodeAt(ue)===10?(te.line++,te.column=1):te.column++,ue++;return De[W]=te,te}function On(W,te,ue){var rt=_i(W),Je=_i(te),Qi={source:r,start:{offset:W,line:rt.line,column:rt.column},end:{offset:te,line:Je.line,column:Je.column}};return Qi}function Ue(W){V<we||(V>we&&(we=V,Ne=[]),Ne.push(W))}function er(W,te,ue){return new Ec(Ec.buildMessage(W,te),W,te,ue)}function tr(){var W;return ve++,W=zl(),ve--,W===n&&ve===0&&Ue(v),W}function zl(){var W,te,ue,rt;return ve++,W=V,te=Oo(),te!==n?(t.charCodeAt(V)===124?(ue=a,V++):(ue=n,ve===0&&Ue(x)),ue!==n?(rt=zl(),rt!==n?(ce=W,W=z(te,rt)):(V=W,W=n)):(V=W,W=n)):(V=W,W=n),W===n&&(W=Oo()),ve--,W===n&&(te=n,ve===0&&Ue(y)),W}function Oo(){var W,te,ue;return ve++,W=V,te=Mo(),te!==n?(t.charCodeAt(V)===38?V++:ve===0&&Ue(w),ue=Oo(),ue!==n?(ce=W,W=D(te,ue)):(V=W,W=n)):(V=W,W=n),W===n&&(W=Mo()),ve--,W===n&&(te=n,ve===0&&Ue(_)),W}function Mo(){var W,te,ue;return ve++,W=V,ne(),t.charCodeAt(V)===45?(te=o,V++):(te=n,ve===0&&Ue(S)),te!==n?(ue=Ul(),ue!==n?(ne(),ce=W,W=G(ue)):(V=W,W=n)):(V=W,W=n),W===n&&(W=Ul()),ve--,W===n&&ve===0&&Ue(T),W}function Ul(){var W,te,ue,rt;return ve++,W=q(),W===n&&(W=Nu()),W===n&&(W=V,ne(),t.charCodeAt(V)===40?(te=l,V++):(te=n,ve===0&&Ue(N)),te!==n?(ue=tr(),ue!==n?(t.charCodeAt(V)===41?(rt=c,V++):(rt=n,ve===0&&Ue(O)),rt!==n?(ne(),ce=W,W=X(ue)):(V=W,W=n)):(V=W,W=n)):(V=W,W=n)),ve--,W===n&&ve===0&&Ue(E),W}function Nu(){var W,te,ue;if(ve++,W=V,ne(),te=[],h.test(t.charAt(V))?(ue=t.charAt(V),V++):(ue=n,ve===0&&Ue(j)),ue!==n)for(;ue!==n;)te.push(ue),h.test(t.charAt(V))?(ue=t.charAt(V),V++):(ue=n,ve===0&&Ue(j));else te=n;return te!==n?(ue=ne(),ce=W,W=P()):(V=W,W=n),ve--,W===n&&ve===0&&Ue(A),W}function q(){var W,te,ue,rt,Je;if(ve++,W=V,ne(),te=V,t.charCodeAt(V)===39?(ue=u,V++):(ue=n,ve===0&&Ue(K)),ue!==n){if(rt=[],p.test(t.charAt(V))?(Je=t.charAt(V),V++):(Je=n,ve===0&&Ue(J)),Je!==n)for(;Je!==n;)rt.push(Je),p.test(t.charAt(V))?(Je=t.charAt(V),V++):(Je=n,ve===0&&Ue(J));else rt=n;rt!==n?(t.charCodeAt(V)===39?(Je=u,V++):(Je=n,ve===0&&Ue(K)),Je!==n?(ue=[ue,rt,Je],te=ue):(V=te,te=n)):(V=te,te=n)}else V=te,te=n;if(te===n)if(te=V,t.charCodeAt(V)===34?(ue=d,V++):(ue=n,ve===0&&Ue(B)),ue!==n){if(rt=[],m.test(t.charAt(V))?(Je=t.charAt(V),V++):(Je=n,ve===0&&Ue(U)),Je!==n)for(;Je!==n;)rt.push(Je),m.test(t.charAt(V))?(Je=t.charAt(V),V++):(Je=n,ve===0&&Ue(U));else rt=n;rt!==n?(t.charCodeAt(V)===34?(Je=d,V++):(Je=n,ve===0&&Ue(B)),Je!==n?(ue=[ue,rt,Je],te=ue):(V=te,te=n)):(V=te,te=n)}else V=te,te=n;return te!==n?(ue=ne(),ce=W,W=ie()):(V=W,W=n),ve--,W===n&&ve===0&&Ue($),W}function ne(){var W,te;for(ve++,W=[],g.test(t.charAt(V))?(te=t.charAt(V),V++):(te=n,ve===0&&Ue(L));te!==n;)W.push(te),g.test(t.charAt(V))?(te=t.charAt(V),V++):(te=n,ve===0&&Ue(L));return ve--,te=n,ve===0&&Ue(Y),W}if(Xt=s(),Xt!==n&&V===t.length)return Xt;throw Xt!==n&&V<t.length&&Ue(Is()),er(Ne,we<t.length?t.charAt(we):null,we<t.length?On(we,we+1):On(we,we))}const BR=new Uint8Array(3);crypto.getRandomValues(BR);class HR extends Error{constructor(e,n=400){super(JSON.stringify(e,null,2)),this.code=n,this.message=e;try{this.message_string=JSON.stringify(this.message,null,2)}catch{this.message_string=":("}}toString(){return this.message_string}}const cp=(t,e,n=400)=>{if(!t)throw new HR([{message:e}],n)},zR=(t,e="-")=>{if(typeof t!="string")return;let n=t.trim();if(n!==""&&(n=n.toLowerCase().match(/[\p{L}\d]+/gu).join(e),n.length!=0))return n},Nb="sortBy",Ab="order",n4="limit",r4="limitToLast",i4="vql",Db="startAt",Ob="startAfter",Mb="endAt",Pb="endBefore",Ib="expand",up=(t="")=>{if(!t)return;const e=/(^[^\w]+)/g,n=/([^\w]+$)/g;let r=t.match(e),i=t.match(n),s=t.substring((r==null?void 0:r[0].length)??0);if(s=s.substring(0,s.length-((i==null?void 0:i[0].length)??0)),s!=="")return s.split(",").map(a=>{const o=a.split(":");return[o[0].trim(),o.slice(1).join(":").trim()]})},UR=(t,e=["*"])=>{var n,r;return((r=(n=t.get(Ib))==null?void 0:n.replace(/[()]/g,"").split(","))==null?void 0:r.map(i=>i.trim()).filter(Boolean))??e},$R=t=>(t??"(updated_at, id)").replace(/[()]/g,"").split(",").map(e=>e.trim()).filter(Boolean),VR=(t="desc")=>t==="asc"?"asc":"desc",WR=t=>{t=t instanceof URLSearchParams?t:new URLSearchParams(t);const e={};e.expand=UR(t),e.limit=parseInt(t.get(n4))?Math.abs(parseInt(t.get(n4))):void 0,e.limitToLast=parseInt(t.get(r4))?Math.abs(parseInt(t.get(r4))):void 0,!e.limitToLast&&!e.limit&&(e.limit=5);try{const a=t.get(i4);a&&(e.vqlParsed=FR(a))}catch(a){console.log(a),cp(!1,"VQL parsing failed",401)}e.vql=t.get(i4),e.startAt=up(t.get(Db)),e.startAfter=up(t.get(Ob)),cp(!(e.startAt&&e.startAfter),"Cannot set both startAt and startAfter",401),e.endAt=up(t.get(Mb)),e.endBefore=up(t.get(Pb)),cp(!(e.endAt&&e.endBefore),"Cannot set both endAt and endAfter",401);const n=e.startAt||e.startAfter,r=e.endAt||e.endBefore,i=((n==null?void 0:n.length)??0)<((r==null?void 0:r.length)??0)?n:r,s=i===n?r:n;if(n&&r)for(let a=0;a<i.length;a++){const o=i[a][0],l=s[a][0];cp(o===l,`non matching keys \`${o}\`!==\`${l}\` in range cursors`,401)}return e.sortBy=$R(t.get(Nb)),e.order=VR(t.get(Ab)),s&&(s!=null&&s.length)&&(e.sortBy=s.map(([a,o],l)=>a)),e},s4=t=>"("+t.join(",")+")",YR=t=>{const e=t.map(n=>`${n[0]}:${n[1]}`);return s4(e)},os=t=>{const e=new URLSearchParams;return t.order=(t==null?void 0:t.order)??"desc",t.sortBy=(t==null?void 0:t.sortBy)??["updated_at","id"],t.expand=(t==null?void 0:t.expand)??["*"],!t.limit&&!t.limitToLast&&(t.limit=5),[{cursor:t.endAt,key:Mb},{cursor:t.endBefore,key:Pb},{cursor:t.startAt,key:Db},{cursor:t.startAfter,key:Ob}].filter(n=>{var r;return!!n.cursor&&((r=n.cursor)==null?void 0:r.length)}).forEach(n=>{e.set(n.key,YR(n.cursor))}),e.set(Ab,t.order),e.set(Nb,s4(t.sortBy)),e.set(Ib,s4(t.expand)),t.vql&&e.set(i4,t.vql),t.limit&&e.set(n4,t.limit.toString()),t.limitToLast&&e.set(r4,t.limitToLast.toString()),e},Lb=t=>{if(typeof t!="string")return;let e=t.trim();if(e!==""&&(e=e.toLowerCase().match(/[\p{L}\d]+/gu).join("-"),e.length!=0))return e},Rb=(t,e)=>{if(!t)throw e},dp=(t,e)=>{var r;let n=(r=t==null?void 0:t.endpoint)==null?void 0:r.trim();return n=n.endsWith("/")?n.slice(0,-1):n,e=e.startsWith("/")?e.slice(1):e,n?`${n}/api/${e}`:`/api/${e}`},Ka=async(t,e,n={})=>{const r=await t.auth.working_auth_token(),i=(t.auth.authStrategy==="apikey"?"Basic":"Bearer")+` ${r}`;return await fetch(dp(t.config,e),{...n,headers:{...(n==null?void 0:n.headers)??{},Authorization:i}})},lr=async(t,e,n={})=>{const r=await Ka(t,e,n),i=r.ok;let s;try{s=await r.json()}catch(a){console.log("fetchApiWithAuth.json()",a)}if(!i)throw s;return s};async function T1(t,e,n){return lr(t,`${e}/${n}`,{method:"get"})}async function jb(t,e,n){return lr(t,`${e}`,{method:"post",body:JSON.stringify(n),headers:{"Content-Type":"application/json"}})}async function a4(t,e,n){return lr(t,`${e}/${n}`,{method:"delete"})}async function fp(t,e,n={}){const r=os(n);return lr(t,`${e}?${r.toString()}`,{method:"get"})}class Nr{constructor(e,n){$r(this,Tf,void 0);$r(this,Cf,void 0);Po(this,Tf,e),Po(this,Cf,n)}async get(e){return T1(this.sdk,this.base_name,e)}async upsert(e){return jb(this.sdk,this.base_name,e)}async remove(e){return a4(this.sdk,this.base_name,e)}async list(e){return fp(this.sdk,this.base_name,e)}get base_name(){return bt(this,Cf)}get sdk(){return bt(this,Tf)}}Tf=new WeakMap,Cf=new WeakMap,typeof TextDecoder=="function"&&new TextDecoder,typeof TextEncoder=="function"&&new TextEncoder;const GR=Array.prototype.slice.call("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=");(t=>{let e={};return t.forEach((n,r)=>e[n]=r),e})(GR),String.fromCharCode.bind(String),typeof Uint8Array.from=="function"&&Uint8Array.from.bind(Uint8Array);var st;(function(t){t.assertEqual=i=>i;function e(i){}t.assertIs=e;function n(i){throw new Error}t.assertNever=n,t.arrayToEnum=i=>{const s={};for(const a of i)s[a]=a;return s},t.getValidEnumValues=i=>{const s=t.objectKeys(i).filter(o=>typeof i[i[o]]!="number"),a={};for(const o of s)a[o]=i[o];return t.objectValues(a)},t.objectValues=i=>t.objectKeys(i).map(function(s){return i[s]}),t.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const s=[];for(const a in i)Object.prototype.hasOwnProperty.call(i,a)&&s.push(a);return s},t.find=(i,s)=>{for(const a of i)if(s(a))return a},t.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&isFinite(i)&&Math.floor(i)===i;function r(i,s=" | "){return i.map(a=>typeof a=="string"?`'${a}'`:a).join(s)}t.joinValues=r,t.jsonStringifyReplacer=(i,s)=>typeof s=="bigint"?s.toString():s})(st||(st={}));var o4;(function(t){t.mergeShapes=(e,n)=>({...e,...n})})(o4||(o4={}));const ge=st.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),qa=t=>{switch(typeof t){case"undefined":return ge.undefined;case"string":return ge.string;case"number":return isNaN(t)?ge.nan:ge.number;case"boolean":return ge.boolean;case"function":return ge.function;case"bigint":return ge.bigint;case"symbol":return ge.symbol;case"object":return Array.isArray(t)?ge.array:t===null?ge.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?ge.promise:typeof Map<"u"&&t instanceof Map?ge.map:typeof Set<"u"&&t instanceof Set?ge.set:typeof Date<"u"&&t instanceof Date?ge.date:ge.object;default:return ge.unknown}},oe=st.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),KR=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:");class Di extends Error{constructor(e){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){const n=e||function(s){return s.message},r={_errors:[]},i=s=>{for(const a of s.issues)if(a.code==="invalid_union")a.unionErrors.map(i);else if(a.code==="invalid_return_type")i(a.returnTypeError);else if(a.code==="invalid_arguments")i(a.argumentsError);else if(a.path.length===0)r._errors.push(n(a));else{let o=r,l=0;for(;l<a.path.length;){const c=a.path[l];l===a.path.length-1?(o[c]=o[c]||{_errors:[]},o[c]._errors.push(n(a))):o[c]=o[c]||{_errors:[]},o=o[c],l++}}};return i(this),r}toString(){return this.message}get message(){return JSON.stringify(this.issues,st.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=n=>n.message){const n={},r=[];for(const i of this.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(e(i))):r.push(e(i));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}Di.create=t=>new Di(t);const C1=(t,e)=>{let n;switch(t.code){case oe.invalid_type:t.received===ge.undefined?n="Required":n=`Expected ${t.expected}, received ${t.received}`;break;case oe.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(t.expected,st.jsonStringifyReplacer)}`;break;case oe.unrecognized_keys:n=`Unrecognized key(s) in object: ${st.joinValues(t.keys,", ")}`;break;case oe.invalid_union:n="Invalid input";break;case oe.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${st.joinValues(t.options)}`;break;case oe.invalid_enum_value:n=`Invalid enum value. Expected ${st.joinValues(t.options)}, received '${t.received}'`;break;case oe.invalid_arguments:n="Invalid function arguments";break;case oe.invalid_return_type:n="Invalid function return type";break;case oe.invalid_date:n="Invalid date";break;case oe.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(n=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?n=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?n=`Invalid input: must end with "${t.validation.endsWith}"`:st.assertNever(t.validation):t.validation!=="regex"?n=`Invalid ${t.validation}`:n="Invalid";break;case oe.too_small:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:n="Invalid input";break;case oe.too_big:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?n=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:n="Invalid input";break;case oe.custom:n="Invalid input";break;case oe.invalid_intersection_types:n="Intersection results could not be merged";break;case oe.not_multiple_of:n=`Number must be a multiple of ${t.multipleOf}`;break;case oe.not_finite:n="Number must be finite";break;default:n=e.defaultError,st.assertNever(t)}return{message:n}};let Fb=C1;function qR(t){Fb=t}function hp(){return Fb}const pp=t=>{const{data:e,path:n,errorMaps:r,issueData:i}=t,s=[...n,...i.path||[]],a={...i,path:s};let o="";const l=r.filter(c=>!!c).slice().reverse();for(const c of l)o=c(a,{data:e,defaultError:o}).message;return{...i,path:s,message:i.message||o}},QR=[];function ye(t,e){const n=pp({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,hp(),C1].filter(r=>!!r)});t.common.issues.push(n)}class Bn{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,n){const r=[];for(const i of n){if(i.status==="aborted")return Me;i.status==="dirty"&&e.dirty(),r.push(i.value)}return{status:e.value,value:r}}static async mergeObjectAsync(e,n){const r=[];for(const i of n)r.push({key:await i.key,value:await i.value});return Bn.mergeObjectSync(e,r)}static mergeObjectSync(e,n){const r={};for(const i of n){const{key:s,value:a}=i;if(s.status==="aborted"||a.status==="aborted")return Me;s.status==="dirty"&&e.dirty(),a.status==="dirty"&&e.dirty(),s.value!=="__proto__"&&(typeof a.value<"u"||i.alwaysSet)&&(r[s.value]=a.value)}return{status:e.value,value:r}}}const Me=Object.freeze({status:"aborted"}),Bb=t=>({status:"dirty",value:t}),qn=t=>({status:"valid",value:t}),l4=t=>t.status==="aborted",c4=t=>t.status==="dirty",S1=t=>t.status==="valid",mp=t=>typeof Promise<"u"&&t instanceof Promise;var Ce;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(Ce||(Ce={}));class ls{constructor(e,n,r,i){this._cachedPath=[],this.parent=e,this.data=n,this._path=r,this._key=i}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Hb=(t,e)=>{if(S1(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new Di(t.common.issues);return this._error=n,this._error}}};function Ie(t){if(!t)return{};const{errorMap:e,invalid_type_error:n,required_error:r,description:i}=t;if(e&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:i}:{errorMap:(a,o)=>a.code!=="invalid_type"?{message:o.defaultError}:typeof o.data>"u"?{message:r??o.defaultError}:{message:n??o.defaultError},description:i}}class je{constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(e){return qa(e.data)}_getOrReturnCtx(e,n){return n||{common:e.parent.common,data:e.data,parsedType:qa(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new Bn,ctx:{common:e.parent.common,data:e.data,parsedType:qa(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const n=this._parse(e);if(mp(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(e){const n=this._parse(e);return Promise.resolve(n)}parse(e,n){const r=this.safeParse(e,n);if(r.success)return r.data;throw r.error}safeParse(e,n){var r;const i={common:{issues:[],async:(r=n==null?void 0:n.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:qa(e)},s=this._parseSync({data:e,path:i.path,parent:i});return Hb(i,s)}async parseAsync(e,n){const r=await this.safeParseAsync(e,n);if(r.success)return r.data;throw r.error}async safeParseAsync(e,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:qa(e)},i=this._parse({data:e,path:r.path,parent:r}),s=await(mp(i)?i:Promise.resolve(i));return Hb(r,s)}refine(e,n){const r=i=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(i):n;return this._refinement((i,s)=>{const a=e(i),o=()=>s.addIssue({code:oe.custom,...r(i)});return typeof Promise<"u"&&a instanceof Promise?a.then(l=>l?!0:(o(),!1)):a?!0:(o(),!1)})}refinement(e,n){return this._refinement((r,i)=>e(r)?!0:(i.addIssue(typeof n=="function"?n(r,i):n),!1))}_refinement(e){return new Pi({schema:this,typeName:Ae.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return Ks.create(this,this._def)}nullable(){return nl.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Mi.create(this,this._def)}promise(){return Sc.create(this,this._def)}or(e){return O1.create([this,e],this._def)}and(e){return M1.create(this,e,this._def)}transform(e){return new Pi({...Ie(this._def),schema:this,typeName:Ae.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const n=typeof e=="function"?e:()=>e;return new j1({...Ie(this._def),innerType:this,defaultValue:n,typeName:Ae.ZodDefault})}brand(){return new Ub({typeName:Ae.ZodBranded,type:this,...Ie(this._def)})}catch(e){const n=typeof e=="function"?e:()=>e;return new bp({...Ie(this._def),innerType:this,catchValue:n,typeName:Ae.ZodCatch})}describe(e){const n=this.constructor;return new n({...this._def,description:e})}pipe(e){return F1.create(this,e)}readonly(){return Ep.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const XR=/^c[^\s-]{8,}$/i,ZR=/^[a-z][a-z0-9]*$/,JR=/^[0-9A-HJKMNP-TV-Z]{26}$/,ej=/^[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,tj=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,nj="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let u4;const rj=/^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/,ij=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,sj=t=>t.precision?t.offset?new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${t.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`):new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${t.precision}}Z$`):t.precision===0?t.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"):t.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$");function aj(t,e){return!!((e==="v4"||!e)&&rj.test(t)||(e==="v6"||!e)&&ij.test(t))}class Oi extends je{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==ge.string){const s=this._getOrReturnCtx(e);return ye(s,{code:oe.invalid_type,expected:ge.string,received:s.parsedType}),Me}const r=new Bn;let i;for(const s of this._def.checks)if(s.kind==="min")e.data.length<s.value&&(i=this._getOrReturnCtx(e,i),ye(i,{code:oe.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),r.dirty());else if(s.kind==="max")e.data.length>s.value&&(i=this._getOrReturnCtx(e,i),ye(i,{code:oe.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),r.dirty());else if(s.kind==="length"){const a=e.data.length>s.value,o=e.data.length<s.value;(a||o)&&(i=this._getOrReturnCtx(e,i),a?ye(i,{code:oe.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):o&&ye(i,{code:oe.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),r.dirty())}else if(s.kind==="email")tj.test(e.data)||(i=this._getOrReturnCtx(e,i),ye(i,{validation:"email",code:oe.invalid_string,message:s.message}),r.dirty());else if(s.kind==="emoji")u4||(u4=new RegExp(nj,"u")),u4.test(e.data)||(i=this._getOrReturnCtx(e,i),ye(i,{validation:"emoji",code:oe.invalid_string,message:s.message}),r.dirty());else if(s.kind==="uuid")ej.test(e.data)||(i=this._getOrReturnCtx(e,i),ye(i,{validation:"uuid",code:oe.invalid_string,message:s.message}),r.dirty());else if(s.kind==="cuid")XR.test(e.data)||(i=this._getOrReturnCtx(e,i),ye(i,{validation:"cuid",code:oe.invalid_string,message:s.message}),r.dirty());else if(s.kind==="cuid2")ZR.test(e.data)||(i=this._getOrReturnCtx(e,i),ye(i,{validation:"cuid2",code:oe.invalid_string,message:s.message}),r.dirty());else if(s.kind==="ulid")JR.test(e.data)||(i=this._getOrReturnCtx(e,i),ye(i,{validation:"ulid",code:oe.invalid_string,message:s.message}),r.dirty());else if(s.kind==="url")try{new URL(e.data)}catch{i=this._getOrReturnCtx(e,i),ye(i,{validation:"url",code:oe.invalid_string,message:s.message}),r.dirty()}else s.kind==="regex"?(s.regex.lastIndex=0,s.regex.test(e.data)||(i=this._getOrReturnCtx(e,i),ye(i,{validation:"regex",code:oe.invalid_string,message:s.message}),r.dirty())):s.kind==="trim"?e.data=e.data.trim():s.kind==="includes"?e.data.includes(s.value,s.position)||(i=this._getOrReturnCtx(e,i),ye(i,{code:oe.invalid_string,validation:{includes:s.value,position:s.position},message:s.message}),r.dirty()):s.kind==="toLowerCase"?e.data=e.data.toLowerCase():s.kind==="toUpperCase"?e.data=e.data.toUpperCase():s.kind==="startsWith"?e.data.startsWith(s.value)||(i=this._getOrReturnCtx(e,i),ye(i,{code:oe.invalid_string,validation:{startsWith:s.value},message:s.message}),r.dirty()):s.kind==="endsWith"?e.data.endsWith(s.value)||(i=this._getOrReturnCtx(e,i),ye(i,{code:oe.invalid_string,validation:{endsWith:s.value},message:s.message}),r.dirty()):s.kind==="datetime"?sj(s).test(e.data)||(i=this._getOrReturnCtx(e,i),ye(i,{code:oe.invalid_string,validation:"datetime",message:s.message}),r.dirty()):s.kind==="ip"?aj(e.data,s.version)||(i=this._getOrReturnCtx(e,i),ye(i,{validation:"ip",code:oe.invalid_string,message:s.message}),r.dirty()):st.assertNever(s);return{status:r.value,value:e.data}}_regex(e,n,r){return this.refinement(i=>e.test(i),{validation:n,code:oe.invalid_string,...Ce.errToObj(r)})}_addCheck(e){return new Oi({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...Ce.errToObj(e)})}url(e){return this._addCheck({kind:"url",...Ce.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...Ce.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...Ce.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...Ce.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...Ce.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...Ce.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...Ce.errToObj(e)})}datetime(e){var n;return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(n=e==null?void 0:e.offset)!==null&&n!==void 0?n:!1,...Ce.errToObj(e==null?void 0:e.message)})}regex(e,n){return this._addCheck({kind:"regex",regex:e,...Ce.errToObj(n)})}includes(e,n){return this._addCheck({kind:"includes",value:e,position:n==null?void 0:n.position,...Ce.errToObj(n==null?void 0:n.message)})}startsWith(e,n){return this._addCheck({kind:"startsWith",value:e,...Ce.errToObj(n)})}endsWith(e,n){return this._addCheck({kind:"endsWith",value:e,...Ce.errToObj(n)})}min(e,n){return this._addCheck({kind:"min",value:e,...Ce.errToObj(n)})}max(e,n){return this._addCheck({kind:"max",value:e,...Ce.errToObj(n)})}length(e,n){return this._addCheck({kind:"length",value:e,...Ce.errToObj(n)})}nonempty(e){return this.min(1,Ce.errToObj(e))}trim(){return new Oi({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Oi({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Oi({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get minLength(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxLength(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}}Oi.create=t=>{var e;return new Oi({checks:[],typeName:Ae.ZodString,coerce:(e=t==null?void 0:t.coerce)!==null&&e!==void 0?e:!1,...Ie(t)})};function oj(t,e){const n=(t.toString().split(".")[1]||"").length,r=(e.toString().split(".")[1]||"").length,i=n>r?n:r,s=parseInt(t.toFixed(i).replace(".","")),a=parseInt(e.toFixed(i).replace(".",""));return s%a/Math.pow(10,i)}class Qa extends je{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==ge.number){const s=this._getOrReturnCtx(e);return ye(s,{code:oe.invalid_type,expected:ge.number,received:s.parsedType}),Me}let r;const i=new Bn;for(const s of this._def.checks)s.kind==="int"?st.isInteger(e.data)||(r=this._getOrReturnCtx(e,r),ye(r,{code:oe.invalid_type,expected:"integer",received:"float",message:s.message}),i.dirty()):s.kind==="min"?(s.inclusive?e.data<s.value:e.data<=s.value)&&(r=this._getOrReturnCtx(e,r),ye(r,{code:oe.too_small,minimum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),i.dirty()):s.kind==="max"?(s.inclusive?e.data>s.value:e.data>=s.value)&&(r=this._getOrReturnCtx(e,r),ye(r,{code:oe.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),i.dirty()):s.kind==="multipleOf"?oj(e.data,s.value)!==0&&(r=this._getOrReturnCtx(e,r),ye(r,{code:oe.not_multiple_of,multipleOf:s.value,message:s.message}),i.dirty()):s.kind==="finite"?Number.isFinite(e.data)||(r=this._getOrReturnCtx(e,r),ye(r,{code:oe.not_finite,message:s.message}),i.dirty()):st.assertNever(s);return{status:i.value,value:e.data}}gte(e,n){return this.setLimit("min",e,!0,Ce.toString(n))}gt(e,n){return this.setLimit("min",e,!1,Ce.toString(n))}lte(e,n){return this.setLimit("max",e,!0,Ce.toString(n))}lt(e,n){return this.setLimit("max",e,!1,Ce.toString(n))}setLimit(e,n,r,i){return new Qa({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:r,message:Ce.toString(i)}]})}_addCheck(e){return new Qa({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:Ce.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Ce.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Ce.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Ce.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Ce.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:Ce.toString(n)})}finite(e){return this._addCheck({kind:"finite",message:Ce.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Ce.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Ce.toString(e)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&st.isInteger(e.value))}get isFinite(){let e=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(e===null||r.value<e)&&(e=r.value)}return Number.isFinite(n)&&Number.isFinite(e)}}Qa.create=t=>new Qa({checks:[],typeName:Ae.ZodNumber,coerce:(t==null?void 0:t.coerce)||!1,...Ie(t)});class Xa extends je{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce&&(e.data=BigInt(e.data)),this._getType(e)!==ge.bigint){const s=this._getOrReturnCtx(e);return ye(s,{code:oe.invalid_type,expected:ge.bigint,received:s.parsedType}),Me}let r;const i=new Bn;for(const s of this._def.checks)s.kind==="min"?(s.inclusive?e.data<s.value:e.data<=s.value)&&(r=this._getOrReturnCtx(e,r),ye(r,{code:oe.too_small,type:"bigint",minimum:s.value,inclusive:s.inclusive,message:s.message}),i.dirty()):s.kind==="max"?(s.inclusive?e.data>s.value:e.data>=s.value)&&(r=this._getOrReturnCtx(e,r),ye(r,{code:oe.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),i.dirty()):s.kind==="multipleOf"?e.data%s.value!==BigInt(0)&&(r=this._getOrReturnCtx(e,r),ye(r,{code:oe.not_multiple_of,multipleOf:s.value,message:s.message}),i.dirty()):st.assertNever(s);return{status:i.value,value:e.data}}gte(e,n){return this.setLimit("min",e,!0,Ce.toString(n))}gt(e,n){return this.setLimit("min",e,!1,Ce.toString(n))}lte(e,n){return this.setLimit("max",e,!0,Ce.toString(n))}lt(e,n){return this.setLimit("max",e,!1,Ce.toString(n))}setLimit(e,n,r,i){return new Xa({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:r,message:Ce.toString(i)}]})}_addCheck(e){return new Xa({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Ce.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Ce.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Ce.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Ce.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:Ce.toString(n)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}}Xa.create=t=>{var e;return new Xa({checks:[],typeName:Ae.ZodBigInt,coerce:(e=t==null?void 0:t.coerce)!==null&&e!==void 0?e:!1,...Ie(t)})};class N1 extends je{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==ge.boolean){const r=this._getOrReturnCtx(e);return ye(r,{code:oe.invalid_type,expected:ge.boolean,received:r.parsedType}),Me}return qn(e.data)}}N1.create=t=>new N1({typeName:Ae.ZodBoolean,coerce:(t==null?void 0:t.coerce)||!1,...Ie(t)});class Jo extends je{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==ge.date){const s=this._getOrReturnCtx(e);return ye(s,{code:oe.invalid_type,expected:ge.date,received:s.parsedType}),Me}if(isNaN(e.data.getTime())){const s=this._getOrReturnCtx(e);return ye(s,{code:oe.invalid_date}),Me}const r=new Bn;let i;for(const s of this._def.checks)s.kind==="min"?e.data.getTime()<s.value&&(i=this._getOrReturnCtx(e,i),ye(i,{code:oe.too_small,message:s.message,inclusive:!0,exact:!1,minimum:s.value,type:"date"}),r.dirty()):s.kind==="max"?e.data.getTime()>s.value&&(i=this._getOrReturnCtx(e,i),ye(i,{code:oe.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),r.dirty()):st.assertNever(s);return{status:r.value,value:new Date(e.data.getTime())}}_addCheck(e){return new Jo({...this._def,checks:[...this._def.checks,e]})}min(e,n){return this._addCheck({kind:"min",value:e.getTime(),message:Ce.toString(n)})}max(e,n){return this._addCheck({kind:"max",value:e.getTime(),message:Ce.toString(n)})}get minDate(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e!=null?new Date(e):null}}Jo.create=t=>new Jo({checks:[],coerce:(t==null?void 0:t.coerce)||!1,typeName:Ae.ZodDate,...Ie(t)});class gp extends je{_parse(e){if(this._getType(e)!==ge.symbol){const r=this._getOrReturnCtx(e);return ye(r,{code:oe.invalid_type,expected:ge.symbol,received:r.parsedType}),Me}return qn(e.data)}}gp.create=t=>new gp({typeName:Ae.ZodSymbol,...Ie(t)});class A1 extends je{_parse(e){if(this._getType(e)!==ge.undefined){const r=this._getOrReturnCtx(e);return ye(r,{code:oe.invalid_type,expected:ge.undefined,received:r.parsedType}),Me}return qn(e.data)}}A1.create=t=>new A1({typeName:Ae.ZodUndefined,...Ie(t)});class D1 extends je{_parse(e){if(this._getType(e)!==ge.null){const r=this._getOrReturnCtx(e);return ye(r,{code:oe.invalid_type,expected:ge.null,received:r.parsedType}),Me}return qn(e.data)}}D1.create=t=>new D1({typeName:Ae.ZodNull,...Ie(t)});class kc extends je{constructor(){super(...arguments),this._any=!0}_parse(e){return qn(e.data)}}kc.create=t=>new kc({typeName:Ae.ZodAny,...Ie(t)});class el extends je{constructor(){super(...arguments),this._unknown=!0}_parse(e){return qn(e.data)}}el.create=t=>new el({typeName:Ae.ZodUnknown,...Ie(t)});class Gs extends je{_parse(e){const n=this._getOrReturnCtx(e);return ye(n,{code:oe.invalid_type,expected:ge.never,received:n.parsedType}),Me}}Gs.create=t=>new Gs({typeName:Ae.ZodNever,...Ie(t)});class vp extends je{_parse(e){if(this._getType(e)!==ge.undefined){const r=this._getOrReturnCtx(e);return ye(r,{code:oe.invalid_type,expected:ge.void,received:r.parsedType}),Me}return qn(e.data)}}vp.create=t=>new vp({typeName:Ae.ZodVoid,...Ie(t)});class Mi extends je{_parse(e){const{ctx:n,status:r}=this._processInputParams(e),i=this._def;if(n.parsedType!==ge.array)return ye(n,{code:oe.invalid_type,expected:ge.array,received:n.parsedType}),Me;if(i.exactLength!==null){const a=n.data.length>i.exactLength.value,o=n.data.length<i.exactLength.value;(a||o)&&(ye(n,{code:a?oe.too_big:oe.too_small,minimum:o?i.exactLength.value:void 0,maximum:a?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),r.dirty())}if(i.minLength!==null&&n.data.length<i.minLength.value&&(ye(n,{code:oe.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),r.dirty()),i.maxLength!==null&&n.data.length>i.maxLength.value&&(ye(n,{code:oe.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((a,o)=>i.type._parseAsync(new ls(n,a,n.path,o)))).then(a=>Bn.mergeArray(r,a));const s=[...n.data].map((a,o)=>i.type._parseSync(new ls(n,a,n.path,o)));return Bn.mergeArray(r,s)}get element(){return this._def.type}min(e,n){return new Mi({...this._def,minLength:{value:e,message:Ce.toString(n)}})}max(e,n){return new Mi({...this._def,maxLength:{value:e,message:Ce.toString(n)}})}length(e,n){return new Mi({...this._def,exactLength:{value:e,message:Ce.toString(n)}})}nonempty(e){return this.min(1,e)}}Mi.create=(t,e)=>new Mi({type:t,minLength:null,maxLength:null,exactLength:null,typeName:Ae.ZodArray,...Ie(e)});function Tc(t){if(t instanceof Ft){const e={};for(const n in t.shape){const r=t.shape[n];e[n]=Ks.create(Tc(r))}return new Ft({...t._def,shape:()=>e})}else return t instanceof Mi?new Mi({...t._def,type:Tc(t.element)}):t instanceof Ks?Ks.create(Tc(t.unwrap())):t instanceof nl?nl.create(Tc(t.unwrap())):t instanceof cs?cs.create(t.items.map(e=>Tc(e))):t}class Ft extends je{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),n=st.objectKeys(e);return this._cached={shape:e,keys:n}}_parse(e){if(this._getType(e)!==ge.object){const c=this._getOrReturnCtx(e);return ye(c,{code:oe.invalid_type,expected:ge.object,received:c.parsedType}),Me}const{status:r,ctx:i}=this._processInputParams(e),{shape:s,keys:a}=this._getCached(),o=[];if(!(this._def.catchall instanceof Gs&&this._def.unknownKeys==="strip"))for(const c in i.data)a.includes(c)||o.push(c);const l=[];for(const c of a){const u=s[c],d=i.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new ls(i,d,i.path,c)),alwaysSet:c in i.data})}if(this._def.catchall instanceof Gs){const c=this._def.unknownKeys;if(c==="passthrough")for(const u of o)l.push({key:{status:"valid",value:u},value:{status:"valid",value:i.data[u]}});else if(c==="strict")o.length>0&&(ye(i,{code:oe.unrecognized_keys,keys:o}),r.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const c=this._def.catchall;for(const u of o){const d=i.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new ls(i,d,i.path,u)),alwaysSet:u in i.data})}}return i.common.async?Promise.resolve().then(async()=>{const c=[];for(const u of l){const d=await u.key;c.push({key:d,value:await u.value,alwaysSet:u.alwaysSet})}return c}).then(c=>Bn.mergeObjectSync(r,c)):Bn.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(e){return Ce.errToObj,new Ft({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(n,r)=>{var i,s,a,o;const l=(a=(s=(i=this._def).errorMap)===null||s===void 0?void 0:s.call(i,n,r).message)!==null&&a!==void 0?a:r.defaultError;return n.code==="unrecognized_keys"?{message:(o=Ce.errToObj(e).message)!==null&&o!==void 0?o:l}:{message:l}}}:{}})}strip(){return new Ft({...this._def,unknownKeys:"strip"})}passthrough(){return new Ft({...this._def,unknownKeys:"passthrough"})}extend(e){return new Ft({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new Ft({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:Ae.ZodObject})}setKey(e,n){return this.augment({[e]:n})}catchall(e){return new Ft({...this._def,catchall:e})}pick(e){const n={};return st.objectKeys(e).forEach(r=>{e[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new Ft({...this._def,shape:()=>n})}omit(e){const n={};return st.objectKeys(this.shape).forEach(r=>{e[r]||(n[r]=this.shape[r])}),new Ft({...this._def,shape:()=>n})}deepPartial(){return Tc(this)}partial(e){const n={};return st.objectKeys(this.shape).forEach(r=>{const i=this.shape[r];e&&!e[r]?n[r]=i:n[r]=i.optional()}),new Ft({...this._def,shape:()=>n})}required(e){const n={};return st.objectKeys(this.shape).forEach(r=>{if(e&&!e[r])n[r]=this.shape[r];else{let s=this.shape[r];for(;s instanceof Ks;)s=s._def.innerType;n[r]=s}}),new Ft({...this._def,shape:()=>n})}keyof(){return zb(st.objectKeys(this.shape))}}Ft.create=(t,e)=>new Ft({shape:()=>t,unknownKeys:"strip",catchall:Gs.create(),typeName:Ae.ZodObject,...Ie(e)}),Ft.strictCreate=(t,e)=>new Ft({shape:()=>t,unknownKeys:"strict",catchall:Gs.create(),typeName:Ae.ZodObject,...Ie(e)}),Ft.lazycreate=(t,e)=>new Ft({shape:t,unknownKeys:"strip",catchall:Gs.create(),typeName:Ae.ZodObject,...Ie(e)});class O1 extends je{_parse(e){const{ctx:n}=this._processInputParams(e),r=this._def.options;function i(s){for(const o of s)if(o.result.status==="valid")return o.result;for(const o of s)if(o.result.status==="dirty")return n.common.issues.push(...o.ctx.common.issues),o.result;const a=s.map(o=>new Di(o.ctx.common.issues));return ye(n,{code:oe.invalid_union,unionErrors:a}),Me}if(n.common.async)return Promise.all(r.map(async s=>{const a={...n,common:{...n.common,issues:[]},parent:null};return{result:await s._parseAsync({data:n.data,path:n.path,parent:a}),ctx:a}})).then(i);{let s;const a=[];for(const l of r){const c={...n,common:{...n.common,issues:[]},parent:null},u=l._parseSync({data:n.data,path:n.path,parent:c});if(u.status==="valid")return u;u.status==="dirty"&&!s&&(s={result:u,ctx:c}),c.common.issues.length&&a.push(c.common.issues)}if(s)return n.common.issues.push(...s.ctx.common.issues),s.result;const o=a.map(l=>new Di(l));return ye(n,{code:oe.invalid_union,unionErrors:o}),Me}}get options(){return this._def.options}}O1.create=(t,e)=>new O1({options:t,typeName:Ae.ZodUnion,...Ie(e)});const yp=t=>t instanceof I1?yp(t.schema):t instanceof Pi?yp(t.innerType()):t instanceof L1?[t.value]:t instanceof Za?t.options:t instanceof R1?Object.keys(t.enum):t instanceof j1?yp(t._def.innerType):t instanceof A1?[void 0]:t instanceof D1?[null]:null;class xp extends je{_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==ge.object)return ye(n,{code:oe.invalid_type,expected:ge.object,received:n.parsedType}),Me;const r=this.discriminator,i=n.data[r],s=this.optionsMap.get(i);return s?n.common.async?s._parseAsync({data:n.data,path:n.path,parent:n}):s._parseSync({data:n.data,path:n.path,parent:n}):(ye(n,{code:oe.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),Me)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,n,r){const i=new Map;for(const s of n){const a=yp(s.shape[e]);if(!a)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const o of a){if(i.has(o))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(o)}`);i.set(o,s)}}return new xp({typeName:Ae.ZodDiscriminatedUnion,discriminator:e,options:n,optionsMap:i,...Ie(r)})}}function d4(t,e){const n=qa(t),r=qa(e);if(t===e)return{valid:!0,data:t};if(n===ge.object&&r===ge.object){const i=st.objectKeys(e),s=st.objectKeys(t).filter(o=>i.indexOf(o)!==-1),a={...t,...e};for(const o of s){const l=d4(t[o],e[o]);if(!l.valid)return{valid:!1};a[o]=l.data}return{valid:!0,data:a}}else if(n===ge.array&&r===ge.array){if(t.length!==e.length)return{valid:!1};const i=[];for(let s=0;s<t.length;s++){const a=t[s],o=e[s],l=d4(a,o);if(!l.valid)return{valid:!1};i.push(l.data)}return{valid:!0,data:i}}else return n===ge.date&&r===ge.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}class M1 extends je{_parse(e){const{status:n,ctx:r}=this._processInputParams(e),i=(s,a)=>{if(l4(s)||l4(a))return Me;const o=d4(s.value,a.value);return o.valid?((c4(s)||c4(a))&&n.dirty(),{status:n.value,value:o.data}):(ye(r,{code:oe.invalid_intersection_types}),Me)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([s,a])=>i(s,a)):i(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}M1.create=(t,e,n)=>new M1({left:t,right:e,typeName:Ae.ZodIntersection,...Ie(n)});class cs extends je{_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==ge.array)return ye(r,{code:oe.invalid_type,expected:ge.array,received:r.parsedType}),Me;if(r.data.length<this._def.items.length)return ye(r,{code:oe.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Me;!this._def.rest&&r.data.length>this._def.items.length&&(ye(r,{code:oe.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const s=[...r.data].map((a,o)=>{const l=this._def.items[o]||this._def.rest;return l?l._parse(new ls(r,a,r.path,o)):null}).filter(a=>!!a);return r.common.async?Promise.all(s).then(a=>Bn.mergeArray(n,a)):Bn.mergeArray(n,s)}get items(){return this._def.items}rest(e){return new cs({...this._def,rest:e})}}cs.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new cs({items:t,typeName:Ae.ZodTuple,rest:null,...Ie(e)})};class P1 extends je{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==ge.object)return ye(r,{code:oe.invalid_type,expected:ge.object,received:r.parsedType}),Me;const i=[],s=this._def.keyType,a=this._def.valueType;for(const o in r.data)i.push({key:s._parse(new ls(r,o,r.path,o)),value:a._parse(new ls(r,r.data[o],r.path,o))});return r.common.async?Bn.mergeObjectAsync(n,i):Bn.mergeObjectSync(n,i)}get element(){return this._def.valueType}static create(e,n,r){return n instanceof je?new P1({keyType:e,valueType:n,typeName:Ae.ZodRecord,...Ie(r)}):new P1({keyType:Oi.create(),valueType:e,typeName:Ae.ZodRecord,...Ie(n)})}}class _p extends je{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==ge.map)return ye(r,{code:oe.invalid_type,expected:ge.map,received:r.parsedType}),Me;const i=this._def.keyType,s=this._def.valueType,a=[...r.data.entries()].map(([o,l],c)=>({key:i._parse(new ls(r,o,r.path,[c,"key"])),value:s._parse(new ls(r,l,r.path,[c,"value"]))}));if(r.common.async){const o=new Map;return Promise.resolve().then(async()=>{for(const l of a){const c=await l.key,u=await l.value;if(c.status==="aborted"||u.status==="aborted")return Me;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),o.set(c.value,u.value)}return{status:n.value,value:o}})}else{const o=new Map;for(const l of a){const c=l.key,u=l.value;if(c.status==="aborted"||u.status==="aborted")return Me;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),o.set(c.value,u.value)}return{status:n.value,value:o}}}}_p.create=(t,e,n)=>new _p({valueType:e,keyType:t,typeName:Ae.ZodMap,...Ie(n)});class tl extends je{_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==ge.set)return ye(r,{code:oe.invalid_type,expected:ge.set,received:r.parsedType}),Me;const i=this._def;i.minSize!==null&&r.data.size<i.minSize.value&&(ye(r,{code:oe.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),n.dirty()),i.maxSize!==null&&r.data.size>i.maxSize.value&&(ye(r,{code:oe.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),n.dirty());const s=this._def.valueType;function a(l){const c=new Set;for(const u of l){if(u.status==="aborted")return Me;u.status==="dirty"&&n.dirty(),c.add(u.value)}return{status:n.value,value:c}}const o=[...r.data.values()].map((l,c)=>s._parse(new ls(r,l,r.path,c)));return r.common.async?Promise.all(o).then(l=>a(l)):a(o)}min(e,n){return new tl({...this._def,minSize:{value:e,message:Ce.toString(n)}})}max(e,n){return new tl({...this._def,maxSize:{value:e,message:Ce.toString(n)}})}size(e,n){return this.min(e,n).max(e,n)}nonempty(e){return this.min(1,e)}}tl.create=(t,e)=>new tl({valueType:t,minSize:null,maxSize:null,typeName:Ae.ZodSet,...Ie(e)});class Cc extends je{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==ge.function)return ye(n,{code:oe.invalid_type,expected:ge.function,received:n.parsedType}),Me;function r(o,l){return pp({data:o,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,hp(),C1].filter(c=>!!c),issueData:{code:oe.invalid_arguments,argumentsError:l}})}function i(o,l){return pp({data:o,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,hp(),C1].filter(c=>!!c),issueData:{code:oe.invalid_return_type,returnTypeError:l}})}const s={errorMap:n.common.contextualErrorMap},a=n.data;if(this._def.returns instanceof Sc){const o=this;return qn(async function(...l){const c=new Di([]),u=await o._def.args.parseAsync(l,s).catch(p=>{throw c.addIssue(r(l,p)),c}),d=await Reflect.apply(a,this,u);return await o._def.returns._def.type.parseAsync(d,s).catch(p=>{throw c.addIssue(i(d,p)),c})})}else{const o=this;return qn(function(...l){const c=o._def.args.safeParse(l,s);if(!c.success)throw new Di([r(l,c.error)]);const u=Reflect.apply(a,this,c.data),d=o._def.returns.safeParse(u,s);if(!d.success)throw new Di([i(u,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new Cc({...this._def,args:cs.create(e).rest(el.create())})}returns(e){return new Cc({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,n,r){return new Cc({args:e||cs.create([]).rest(el.create()),returns:n||el.create(),typeName:Ae.ZodFunction,...Ie(r)})}}class I1 extends je{get schema(){return this._def.getter()}_parse(e){const{ctx:n}=this._processInputParams(e);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}I1.create=(t,e)=>new I1({getter:t,typeName:Ae.ZodLazy,...Ie(e)});class L1 extends je{_parse(e){if(e.data!==this._def.value){const n=this._getOrReturnCtx(e);return ye(n,{received:n.data,code:oe.invalid_literal,expected:this._def.value}),Me}return{status:"valid",value:e.data}}get value(){return this._def.value}}L1.create=(t,e)=>new L1({value:t,typeName:Ae.ZodLiteral,...Ie(e)});function zb(t,e){return new Za({values:t,typeName:Ae.ZodEnum,...Ie(e)})}class Za extends je{_parse(e){if(typeof e.data!="string"){const n=this._getOrReturnCtx(e),r=this._def.values;return ye(n,{expected:st.joinValues(r),received:n.parsedType,code:oe.invalid_type}),Me}if(this._def.values.indexOf(e.data)===-1){const n=this._getOrReturnCtx(e),r=this._def.values;return ye(n,{received:n.data,code:oe.invalid_enum_value,options:r}),Me}return qn(e.data)}get options(){return this._def.values}get enum(){const e={};for(const n of this._def.values)e[n]=n;return e}get Values(){const e={};for(const n of this._def.values)e[n]=n;return e}get Enum(){const e={};for(const n of this._def.values)e[n]=n;return e}extract(e){return Za.create(e)}exclude(e){return Za.create(this.options.filter(n=>!e.includes(n)))}}Za.create=zb;class R1 extends je{_parse(e){const n=st.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==ge.string&&r.parsedType!==ge.number){const i=st.objectValues(n);return ye(r,{expected:st.joinValues(i),received:r.parsedType,code:oe.invalid_type}),Me}if(n.indexOf(e.data)===-1){const i=st.objectValues(n);return ye(r,{received:r.data,code:oe.invalid_enum_value,options:i}),Me}return qn(e.data)}get enum(){return this._def.values}}R1.create=(t,e)=>new R1({values:t,typeName:Ae.ZodNativeEnum,...Ie(e)});class Sc extends je{unwrap(){return this._def.type}_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==ge.promise&&n.common.async===!1)return ye(n,{code:oe.invalid_type,expected:ge.promise,received:n.parsedType}),Me;const r=n.parsedType===ge.promise?n.data:Promise.resolve(n.data);return qn(r.then(i=>this._def.type.parseAsync(i,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Sc.create=(t,e)=>new Sc({type:t,typeName:Ae.ZodPromise,...Ie(e)});class Pi extends je{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Ae.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:n,ctx:r}=this._processInputParams(e),i=this._def.effect||null,s={addIssue:a=>{ye(r,a),a.fatal?n.abort():n.dirty()},get path(){return r.path}};if(s.addIssue=s.addIssue.bind(s),i.type==="preprocess"){const a=i.transform(r.data,s);return r.common.issues.length?{status:"dirty",value:r.data}:r.common.async?Promise.resolve(a).then(o=>this._def.schema._parseAsync({data:o,path:r.path,parent:r})):this._def.schema._parseSync({data:a,path:r.path,parent:r})}if(i.type==="refinement"){const a=o=>{const l=i.refinement(o,s);if(r.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return o};if(r.common.async===!1){const o=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?Me:(o.status==="dirty"&&n.dirty(),a(o.value),{status:n.value,value:o.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(o=>o.status==="aborted"?Me:(o.status==="dirty"&&n.dirty(),a(o.value).then(()=>({status:n.value,value:o.value}))))}if(i.type==="transform")if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!S1(a))return a;const o=i.transform(a.value,s);if(o instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:o}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>S1(a)?Promise.resolve(i.transform(a.value,s)).then(o=>({status:n.value,value:o})):a);st.assertNever(i)}}Pi.create=(t,e,n)=>new Pi({schema:t,typeName:Ae.ZodEffects,effect:e,...Ie(n)}),Pi.createWithPreprocess=(t,e,n)=>new Pi({schema:e,effect:{type:"preprocess",transform:t},typeName:Ae.ZodEffects,...Ie(n)});class Ks extends je{_parse(e){return this._getType(e)===ge.undefined?qn(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Ks.create=(t,e)=>new Ks({innerType:t,typeName:Ae.ZodOptional,...Ie(e)});class nl extends je{_parse(e){return this._getType(e)===ge.null?qn(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}nl.create=(t,e)=>new nl({innerType:t,typeName:Ae.ZodNullable,...Ie(e)});class j1 extends je{_parse(e){const{ctx:n}=this._processInputParams(e);let r=n.data;return n.parsedType===ge.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}j1.create=(t,e)=>new j1({innerType:t,typeName:Ae.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...Ie(e)});class bp extends je{_parse(e){const{ctx:n}=this._processInputParams(e),r={...n,common:{...n.common,issues:[]}},i=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return mp(i)?i.then(s=>({status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new Di(r.common.issues)},input:r.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Di(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}bp.create=(t,e)=>new bp({innerType:t,typeName:Ae.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...Ie(e)});class wp extends je{_parse(e){if(this._getType(e)!==ge.nan){const r=this._getOrReturnCtx(e);return ye(r,{code:oe.invalid_type,expected:ge.nan,received:r.parsedType}),Me}return{status:"valid",value:e.data}}}wp.create=t=>new wp({typeName:Ae.ZodNaN,...Ie(t)});const lj=Symbol("zod_brand");class Ub extends je{_parse(e){const{ctx:n}=this._processInputParams(e),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class F1 extends je{_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.common.async)return(async()=>{const s=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?Me:s.status==="dirty"?(n.dirty(),Bb(s.value)):this._def.out._parseAsync({data:s.value,path:r.path,parent:r})})();{const i=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?Me:i.status==="dirty"?(n.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:r.path,parent:r})}}static create(e,n){return new F1({in:e,out:n,typeName:Ae.ZodPipeline})}}class Ep extends je{_parse(e){const n=this._def.innerType._parse(e);return S1(n)&&(n.value=Object.freeze(n.value)),n}}Ep.create=(t,e)=>new Ep({innerType:t,typeName:Ae.ZodReadonly,...Ie(e)});const $b=(t,e={},n)=>t?kc.create().superRefine((r,i)=>{var s,a;if(!t(r)){const o=typeof e=="function"?e(r):typeof e=="string"?{message:e}:e,l=(a=(s=o.fatal)!==null&&s!==void 0?s:n)!==null&&a!==void 0?a:!0,c=typeof o=="string"?{message:o}:o;i.addIssue({code:"custom",...c,fatal:l})}}):kc.create(),cj={object:Ft.lazycreate};var Ae;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(Ae||(Ae={}));const uj=(t,e={message:`Input not instance of ${t.name}`})=>$b(n=>n instanceof t,e),Vb=Oi.create,Wb=Qa.create,dj=wp.create,fj=Xa.create,Yb=N1.create,hj=Jo.create,pj=gp.create,mj=A1.create,gj=D1.create,vj=kc.create,yj=el.create,xj=Gs.create,_j=vp.create,bj=Mi.create,wj=Ft.create,Ej=Ft.strictCreate,kj=O1.create,Tj=xp.create,Cj=M1.create,Sj=cs.create,Nj=P1.create,Aj=_p.create,Dj=tl.create,Oj=Cc.create,Mj=I1.create,Pj=L1.create,Ij=Za.create,Lj=R1.create,Rj=Sc.create,Gb=Pi.create,jj=Ks.create,Fj=nl.create,Bj=Pi.createWithPreprocess,Hj=F1.create;var k=Object.freeze({__proto__:null,defaultErrorMap:C1,setErrorMap:qR,getErrorMap:hp,makeIssue:pp,EMPTY_PATH:QR,addIssueToContext:ye,ParseStatus:Bn,INVALID:Me,DIRTY:Bb,OK:qn,isAborted:l4,isDirty:c4,isValid:S1,isAsync:mp,get util(){return st},get objectUtil(){return o4},ZodParsedType:ge,getParsedType:qa,ZodType:je,ZodString:Oi,ZodNumber:Qa,ZodBigInt:Xa,ZodBoolean:N1,ZodDate:Jo,ZodSymbol:gp,ZodUndefined:A1,ZodNull:D1,ZodAny:kc,ZodUnknown:el,ZodNever:Gs,ZodVoid:vp,ZodArray:Mi,ZodObject:Ft,ZodUnion:O1,ZodDiscriminatedUnion:xp,ZodIntersection:M1,ZodTuple:cs,ZodRecord:P1,ZodMap:_p,ZodSet:tl,ZodFunction:Cc,ZodLazy:I1,ZodLiteral:L1,ZodEnum:Za,ZodNativeEnum:R1,ZodPromise:Sc,ZodEffects:Pi,ZodTransformer:Pi,ZodOptional:Ks,ZodNullable:nl,ZodDefault:j1,ZodCatch:bp,ZodNaN:wp,BRAND:lj,ZodBranded:Ub,ZodPipeline:F1,ZodReadonly:Ep,custom:$b,Schema:je,ZodSchema:je,late:cj,get ZodFirstPartyTypeKind(){return Ae},coerce:{string:t=>Oi.create({...t,coerce:!0}),number:t=>Qa.create({...t,coerce:!0}),boolean:t=>N1.create({...t,coerce:!0}),bigint:t=>Xa.create({...t,coerce:!0}),date:t=>Jo.create({...t,coerce:!0})},any:vj,array:bj,bigint:fj,boolean:Yb,date:hj,discriminatedUnion:Tj,effect:Gb,enum:Ij,function:Oj,instanceof:uj,intersection:Cj,lazy:Mj,literal:Pj,map:Aj,nan:dj,nativeEnum:Lj,never:xj,null:gj,nullable:Fj,number:Wb,object:wj,oboolean:()=>Yb().optional(),onumber:()=>Wb().optional(),optional:jj,ostring:()=>Vb().optional(),pipeline:Hj,preprocess:Bj,promise:Rj,record:Nj,set:Dj,strictObject:Ej,string:Vb,symbol:pj,transformer:Gb,tuple:Sj,undefined:mj,union:kj,unknown:yj,void:_j,NEVER:Me,ZodIssueCode:oe,quotelessJson:KR,ZodError:Di});k.object({general_store_name:k.string().optional().describe("The store name\n`platform.env.SC_GENERAL_STORE_NAME` environment"),general_store_website:k.string().optional().describe("The store `website`\n`platform.env.SC_GENERAL_STORE_WEBSITE` environment"),general_store_logo_url:k.string().optional().describe("The store `logo` url\n`platform.env.SC_GENERAL_STORE_LOGO_URL` environment"),general_store_description:k.string().optional().describe("The store `description`\n`platform.env.SC_GENERAL_STORE_DESCRIPTION` environment"),general_store_support_email:k.string().optional().describe("The store support email\n`platform.env.SC_GENERAL_STORE_SUPPORT_EMAIL` environment"),general_confirm_email_base_url:k.string().optional().describe("The store `email-confirm`\n`platform.env.SC_GENERAL_STORE_CONFIRM_EMAIL_BASE_URL` environment"),auth_admins_emails:k.array(k.string()).optional().describe("Seed admin emails, if absent will be infered at init by\n`platform.env.SC_AUTH_ADMIN_EMAILS` environment as CSV of emails"),auth_password_hash_rounds:k.number().optional().describe("password hash rounds, if absent will be infered at init by\n`platform.env.SC_AUTH_PASS_HASH_ROUNDS` environment"),auth_secret_access_token:k.string().describe("access token signing secret, if absent will be infered\nat init by `platform.env.SC_AUTH_SECRET_ACCESS_TOKEN` environment"),auth_secret_refresh_token:k.string().describe("refresh token signing secret, if absent will be infered at\ninit by `platform.env.SC_AUTH_SECRET_REFRESH_TOKEN` environment"),checkout_reserve_stock_on:k.union([k.literal("checkout_create"),k.literal("checkout_complete"),k.literal("never")]).optional().describe("(Optional) automatically reserve stock, we recommend to use `never`.\nDepending on your needs you can alter this setting.\nif absent will be infered at init by `platform.env.SC_CHECKOUT_RESERVE_STOCK_ON`\nenvironment and then will default to `never`.").default("never"),storage_rewrite_urls:k.string().optional().describe("(Optional) Once object `storage` is used, you may have connected a\n**CDN** to buckets to take advantage of faster assets serving instead of serving\nfrom your server / the storage service directly. If you are using an cloud based\nstorage service such as AWS S3, it is very recommended to attach the bucket to\na **CDN** for super fast and efficient serving.\n\nTake note, most cloud based storage services and `storecraft` drivers support creating\n`presigned` urls for `download` / `upload`, which essentially delegate these operations\nto the storage services. However, **CDN** is always the best choice for assets serving\ncost and latency wise.\n\nif absent will be infered at init by `platform.env.SC_STORAGE_REWRITE_URLS` environment.").default("undefined")}).describe("Basic config for `storecraft`");const zj=k.object({message:k.string().optional(),code:k.string().optional(),expected:k.string().optional(),received:k.string().optional(),path:k.array(k.string()).optional()});k.object({messages:k.array(zj).optional()});const kp=k.string(),Tp=k.string(),f4=k.object({created_at:k.string().optional().describe("ISO string creation time"),updated_at:k.string().optional().describe("ISO string update time")}).describe("Timestamps");k.object({search:k.array(k.string()).optional()}).describe("searchable");const Uj=k.object({id:k.string().optional().describe("ID")}).describe("with `id`"),$j=k.object({id:k.string().describe("ID")}).describe("with `id`"),Jr=k.object({id:k.string().optional().describe("Optional `id`"),handle:k.string().optional().describe("Optional `handle`")}),Vj=k.object({key:k.string().describe("The key"),value:k.string().optional().describe("The value")}).describe("Attribute type, a key/value storage"),Wj=k.object({iss:k.string(),sub:k.string(),aud:k.string(),exp:k.number(),nbf:k.number(),iat:k.number(),jti:k.string(),roles:k.array(k.string()).describe("User roles and authorizations")}),h4=k.object({email:k.string().email().describe("Email of user"),password:k.string().min(4).max(20).describe("password")}).describe("Auth base type"),Yj=k.union([k.literal("admin"),k.literal("user"),k.string()]).describe("Role of authenticated user");h4.describe("Sign in type"),h4.describe("Sign up type"),k.object({refresh_token:k.string().describe("A refresh token")}).describe("Refresh token input type");const Kb=k.object({token:k.string().describe("a token (`access` or `refresh`)"),claims:Wj.partial().describe("Claims the `JSON Web Token` holds")}).describe("API token with parsed claims");k.object({apikey:k.string().describe("The `apikey` is `base64_uri(apikey@storecraft.api:{password})`.\nIt will be shown only once to the user, at the `backend`, the password hash\nwill be saved, thus, the real password is only known to the user.")}).describe("Result of `auth` `apikey` creation"),k.object({token_type:k.string().describe("The type of token, should be `bearer` or `refresh`"),user_id:k.string().describe("the `ID` of user, example `au_....`"),access_token:Kb.describe("The access token"),refresh_token:Kb.describe("The refresh token")}).describe("Result of `auth` request for `signin` / `signup` / `refresh`"),Uj.extend(f4.shape).extend({handle:k.string().describe("The key name"),values:k.array(k.string()).describe("List of values, related to the key")}).omit({id:!0,handle:!0}).and(Jr).describe("Tag upsert type");const qb=k.object({option_id:k.string().describe("Variant option id"),value_id:k.string().describe("Variant selected value id")}).describe("Variant option selection type"),Gj=k.object({id:k.string().describe("The `id` of the entity"),value:k.string().describe("The text value of the entity")}).describe("Identifiable text entity type"),qs=k.object({id:k.string().describe("The `id` of the entity"),handle:k.string().describe("The `handle` of the entity")}).describe("both `id` and `handle` of entity required"),Qb=k.object({Auto:k.object({id:k.literal(0),name:k.string().optional(),name2:k.literal("automatic")}),Manual:k.object({id:k.literal(1),name:k.string().optional(),name2:k.literal("manual")})}).describe(`Discounts can be manual(coupon) or automatic types,
173
+ at `+a}return e},Ec.buildMessage=function(t,e){var n={literal:function(c){return'"'+i(c.text)+'"'},class:function(c){var u=c.parts.map(function(d){return Array.isArray(d)?s(d[0])+"-"+s(d[1]):s(d)});return"["+(c.inverted?"^":"")+u.join("")+"]"},any:function(){return"any character"},end:function(){return"end of input"},other:function(c){return c.description}};function r(c){return c.charCodeAt(0).toString(16).toUpperCase()}function i(c){return c.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(u){return"\\x0"+r(u)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(u){return"\\x"+r(u)})}function s(c){return c.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(u){return"\\x0"+r(u)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(u){return"\\x"+r(u)})}function a(c){return n[c.type](c)}function o(c){var u=c.map(a),d,h;if(u.sort(),u.length>0){for(d=1,h=1;d<u.length;d++)u[d-1]!==u[d]&&(u[h]=u[d],h++);u.length=h}switch(u.length){case 1:return u[0];case 2:return u[0]+" or "+u[1];default:return u.slice(0,-1).join(", ")+", or "+u[u.length-1]}}function l(c){return c?'"'+i(c)+'"':"end of input"}return"Expected "+o(t)+" but "+l(e)+" found."};function FR(t,e){e=e!==void 0?e:{};var n={},r=e.grammarSource,i={expression:tr},s=tr,a="|",o="-",l="(",c=")",u="'",d='"',h=/^[^"' ()|&]/,p=/^[^']/,m=/^[^"]/,g=/^[ ]/,v=Fe("expression"),y=Fe("sum term"),x=Dn("|",!1),_=Fe("product term"),w=Dn("&",!1),T=Fe("subexpression"),S=Dn("-",!1),E=Fe("term"),N=Dn("(",!1),O=Dn(")",!1),A=Fe("variable"),j=_r(['"',"'"," ","(",")","|","&"],!0,!1),$=Fe("variable 1"),K=Dn("'",!1),J=_r(["'"],!0,!1),B=Dn('"',!1),U=_r(['"'],!0,!1),Y=Fe("whitespace character(s)"),L=_r([" "],!1,!1),z=function(W,te){return Sb("|",W,te)},D=function(W,te){return Sb("&",W,te)},G=function(W){return{op:"!",args:[W]}},X=function(W){return W.group=!0,W},P=function(W){return{op:"LEAF",value:xi().trim()}},ie=function(W){return{op:"LEAF",value:xi().trim().slice(1,-1)}},V=0,ce=0,De=[{line:1,column:1}],we=0,Ne=[],ve=0,Xt;if("startRule"in e){if(!(e.startRule in i))throw new Error(`Can't start parsing from rule "`+e.startRule+'".');s=i[e.startRule]}function xi(){return t.substring(ce,V)}function Dn(W,te){return{type:"literal",text:W,ignoreCase:te}}function _r(W,te,ue){return{type:"class",parts:W,inverted:te,ignoreCase:ue}}function Is(){return{type:"end"}}function Fe(W){return{type:"other",description:W}}function _i(W){var te=De[W],ue;if(te)return te;for(ue=W-1;!De[ue];)ue--;for(te=De[ue],te={line:te.line,column:te.column};ue<W;)t.charCodeAt(ue)===10?(te.line++,te.column=1):te.column++,ue++;return De[W]=te,te}function On(W,te,ue){var rt=_i(W),Je=_i(te),Qi={source:r,start:{offset:W,line:rt.line,column:rt.column},end:{offset:te,line:Je.line,column:Je.column}};return Qi}function Ue(W){V<we||(V>we&&(we=V,Ne=[]),Ne.push(W))}function er(W,te,ue){return new Ec(Ec.buildMessage(W,te),W,te,ue)}function tr(){var W;return ve++,W=zl(),ve--,W===n&&ve===0&&Ue(v),W}function zl(){var W,te,ue,rt;return ve++,W=V,te=Oo(),te!==n?(t.charCodeAt(V)===124?(ue=a,V++):(ue=n,ve===0&&Ue(x)),ue!==n?(rt=zl(),rt!==n?(ce=W,W=z(te,rt)):(V=W,W=n)):(V=W,W=n)):(V=W,W=n),W===n&&(W=Oo()),ve--,W===n&&(te=n,ve===0&&Ue(y)),W}function Oo(){var W,te,ue;return ve++,W=V,te=Mo(),te!==n?(t.charCodeAt(V)===38?V++:ve===0&&Ue(w),ue=Oo(),ue!==n?(ce=W,W=D(te,ue)):(V=W,W=n)):(V=W,W=n),W===n&&(W=Mo()),ve--,W===n&&(te=n,ve===0&&Ue(_)),W}function Mo(){var W,te,ue;return ve++,W=V,ne(),t.charCodeAt(V)===45?(te=o,V++):(te=n,ve===0&&Ue(S)),te!==n?(ue=Ul(),ue!==n?(ne(),ce=W,W=G(ue)):(V=W,W=n)):(V=W,W=n),W===n&&(W=Ul()),ve--,W===n&&ve===0&&Ue(T),W}function Ul(){var W,te,ue,rt;return ve++,W=q(),W===n&&(W=Nu()),W===n&&(W=V,ne(),t.charCodeAt(V)===40?(te=l,V++):(te=n,ve===0&&Ue(N)),te!==n?(ue=tr(),ue!==n?(t.charCodeAt(V)===41?(rt=c,V++):(rt=n,ve===0&&Ue(O)),rt!==n?(ne(),ce=W,W=X(ue)):(V=W,W=n)):(V=W,W=n)):(V=W,W=n)),ve--,W===n&&ve===0&&Ue(E),W}function Nu(){var W,te,ue;if(ve++,W=V,ne(),te=[],h.test(t.charAt(V))?(ue=t.charAt(V),V++):(ue=n,ve===0&&Ue(j)),ue!==n)for(;ue!==n;)te.push(ue),h.test(t.charAt(V))?(ue=t.charAt(V),V++):(ue=n,ve===0&&Ue(j));else te=n;return te!==n?(ue=ne(),ce=W,W=P()):(V=W,W=n),ve--,W===n&&ve===0&&Ue(A),W}function q(){var W,te,ue,rt,Je;if(ve++,W=V,ne(),te=V,t.charCodeAt(V)===39?(ue=u,V++):(ue=n,ve===0&&Ue(K)),ue!==n){if(rt=[],p.test(t.charAt(V))?(Je=t.charAt(V),V++):(Je=n,ve===0&&Ue(J)),Je!==n)for(;Je!==n;)rt.push(Je),p.test(t.charAt(V))?(Je=t.charAt(V),V++):(Je=n,ve===0&&Ue(J));else rt=n;rt!==n?(t.charCodeAt(V)===39?(Je=u,V++):(Je=n,ve===0&&Ue(K)),Je!==n?(ue=[ue,rt,Je],te=ue):(V=te,te=n)):(V=te,te=n)}else V=te,te=n;if(te===n)if(te=V,t.charCodeAt(V)===34?(ue=d,V++):(ue=n,ve===0&&Ue(B)),ue!==n){if(rt=[],m.test(t.charAt(V))?(Je=t.charAt(V),V++):(Je=n,ve===0&&Ue(U)),Je!==n)for(;Je!==n;)rt.push(Je),m.test(t.charAt(V))?(Je=t.charAt(V),V++):(Je=n,ve===0&&Ue(U));else rt=n;rt!==n?(t.charCodeAt(V)===34?(Je=d,V++):(Je=n,ve===0&&Ue(B)),Je!==n?(ue=[ue,rt,Je],te=ue):(V=te,te=n)):(V=te,te=n)}else V=te,te=n;return te!==n?(ue=ne(),ce=W,W=ie()):(V=W,W=n),ve--,W===n&&ve===0&&Ue($),W}function ne(){var W,te;for(ve++,W=[],g.test(t.charAt(V))?(te=t.charAt(V),V++):(te=n,ve===0&&Ue(L));te!==n;)W.push(te),g.test(t.charAt(V))?(te=t.charAt(V),V++):(te=n,ve===0&&Ue(L));return ve--,te=n,ve===0&&Ue(Y),W}if(Xt=s(),Xt!==n&&V===t.length)return Xt;throw Xt!==n&&V<t.length&&Ue(Is()),er(Ne,we<t.length?t.charAt(we):null,we<t.length?On(we,we+1):On(we,we))}const BR=new Uint8Array(3);crypto.getRandomValues(BR);class HR extends Error{constructor(e,n=400){super(JSON.stringify(e,null,2)),this.code=n,this.message=e;try{this.message_string=JSON.stringify(this.message,null,2)}catch{this.message_string=":("}}toString(){return this.message_string}}const cp=(t,e,n=400)=>{if(!t)throw new HR([{message:e}],n)},zR=(t,e="-")=>{if(typeof t!="string")return;let n=t.trim();if(n!==""&&(n=n.toLowerCase().match(/[\p{L}\d]+/gu).join(e),n.length!=0))return n},Nb="sortBy",Ab="order",n4="limit",r4="limitToLast",i4="vql",Db="startAt",Ob="startAfter",Mb="endAt",Pb="endBefore",Ib="expand",up=(t="")=>{if(!t)return;const e=/(^[^\w]+)/g,n=/([^\w]+$)/g;let r=t.match(e),i=t.match(n),s=t.substring((r==null?void 0:r[0].length)??0);if(s=s.substring(0,s.length-((i==null?void 0:i[0].length)??0)),s!=="")return s.split(",").map(a=>{const o=a.split(":");return[o[0].trim(),o.slice(1).join(":").trim()]})},UR=(t,e=["*"])=>{var n,r;return((r=(n=t.get(Ib))==null?void 0:n.replace(/[()]/g,"").split(","))==null?void 0:r.map(i=>i.trim()).filter(Boolean))??e},$R=t=>(t??"(updated_at, id)").replace(/[()]/g,"").split(",").map(e=>e.trim()).filter(Boolean),VR=(t="desc")=>t==="asc"?"asc":"desc",WR=t=>{t=t instanceof URLSearchParams?t:new URLSearchParams(t);const e={};e.expand=UR(t),e.limit=parseInt(t.get(n4))?Math.abs(parseInt(t.get(n4))):void 0,e.limitToLast=parseInt(t.get(r4))?Math.abs(parseInt(t.get(r4))):void 0,!e.limitToLast&&!e.limit&&(e.limit=5);try{const a=t.get(i4);a&&(e.vqlParsed=FR(a))}catch(a){console.log(a),cp(!1,"VQL parsing failed",401)}e.vql=t.get(i4),e.startAt=up(t.get(Db)),e.startAfter=up(t.get(Ob)),cp(!(e.startAt&&e.startAfter),"Cannot set both startAt and startAfter",401),e.endAt=up(t.get(Mb)),e.endBefore=up(t.get(Pb)),cp(!(e.endAt&&e.endBefore),"Cannot set both endAt and endAfter",401);const n=e.startAt||e.startAfter,r=e.endAt||e.endBefore,i=((n==null?void 0:n.length)??0)<((r==null?void 0:r.length)??0)?n:r,s=i===n?r:n;if(n&&r)for(let a=0;a<i.length;a++){const o=i[a][0],l=s[a][0];cp(o===l,`non matching keys \`${o}\`!==\`${l}\` in range cursors`,401)}return e.sortBy=$R(t.get(Nb)),e.order=VR(t.get(Ab)),s&&(s!=null&&s.length)&&(e.sortBy=s.map(([a,o],l)=>a)),e},s4=t=>"("+t.join(",")+")",YR=t=>{const e=t.map(n=>`${n[0]}:${n[1]}`);return s4(e)},os=t=>{const e=new URLSearchParams;return t.order=(t==null?void 0:t.order)??"desc",t.sortBy=(t==null?void 0:t.sortBy)??["updated_at","id"],t.expand=(t==null?void 0:t.expand)??["*"],!t.limit&&!t.limitToLast&&(t.limit=5),[{cursor:t.endAt,key:Mb},{cursor:t.endBefore,key:Pb},{cursor:t.startAt,key:Db},{cursor:t.startAfter,key:Ob}].filter(n=>{var r;return!!n.cursor&&((r=n.cursor)==null?void 0:r.length)}).forEach(n=>{e.set(n.key,YR(n.cursor))}),e.set(Ab,t.order),e.set(Nb,s4(t.sortBy)),e.set(Ib,s4(t.expand)),t.vql&&e.set(i4,t.vql),t.limit&&e.set(n4,t.limit.toString()),t.limitToLast&&e.set(r4,t.limitToLast.toString()),e},Lb=t=>{if(typeof t!="string")return;let e=t.trim();if(e!==""&&(e=e.toLowerCase().match(/[\p{L}\d]+/gu).join("-"),e.length!=0))return e},Rb=(t,e)=>{if(!t)throw e},dp=(t,e)=>{var r;let n=(r=t==null?void 0:t.endpoint)==null?void 0:r.trim();return n=n!=null&&n.endsWith("/")?n.slice(0,-1):n,e=e!=null&&e.startsWith("/")?e.slice(1):e,n?`${n}/api/${e}`:`/api/${e}`},Ka=async(t,e,n={})=>{const r=await t.auth.working_auth_token(),i=(t.auth.authStrategy==="apikey"?"Basic":"Bearer")+` ${r}`;return await fetch(dp(t.config,e),{...n,headers:{...(n==null?void 0:n.headers)??{},Authorization:i}})},lr=async(t,e,n={})=>{const r=await Ka(t,e,n),i=r.ok;let s;try{s=await r.json()}catch(a){console.log("fetchApiWithAuth.json()",a)}if(!i)throw s;return s};async function T1(t,e,n){return lr(t,`${e}/${n}`,{method:"get"})}async function jb(t,e,n){return lr(t,`${e}`,{method:"post",body:JSON.stringify(n),headers:{"Content-Type":"application/json"}})}async function a4(t,e,n){return lr(t,`${e}/${n}`,{method:"delete"})}async function fp(t,e,n={}){const r=os(n);return lr(t,`${e}?${r.toString()}`,{method:"get"})}class Nr{constructor(e,n){$r(this,Tf,void 0);$r(this,Cf,void 0);Po(this,Tf,e),Po(this,Cf,n)}async get(e){return T1(this.sdk,this.base_name,e)}async upsert(e){return jb(this.sdk,this.base_name,e)}async remove(e){return a4(this.sdk,this.base_name,e)}async list(e){return fp(this.sdk,this.base_name,e)}get base_name(){return bt(this,Cf)}get sdk(){return bt(this,Tf)}}Tf=new WeakMap,Cf=new WeakMap,typeof TextDecoder=="function"&&new TextDecoder,typeof TextEncoder=="function"&&new TextEncoder;const GR=Array.prototype.slice.call("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=");(t=>{let e={};return t.forEach((n,r)=>e[n]=r),e})(GR),String.fromCharCode.bind(String),typeof Uint8Array.from=="function"&&Uint8Array.from.bind(Uint8Array);var st;(function(t){t.assertEqual=i=>i;function e(i){}t.assertIs=e;function n(i){throw new Error}t.assertNever=n,t.arrayToEnum=i=>{const s={};for(const a of i)s[a]=a;return s},t.getValidEnumValues=i=>{const s=t.objectKeys(i).filter(o=>typeof i[i[o]]!="number"),a={};for(const o of s)a[o]=i[o];return t.objectValues(a)},t.objectValues=i=>t.objectKeys(i).map(function(s){return i[s]}),t.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const s=[];for(const a in i)Object.prototype.hasOwnProperty.call(i,a)&&s.push(a);return s},t.find=(i,s)=>{for(const a of i)if(s(a))return a},t.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&isFinite(i)&&Math.floor(i)===i;function r(i,s=" | "){return i.map(a=>typeof a=="string"?`'${a}'`:a).join(s)}t.joinValues=r,t.jsonStringifyReplacer=(i,s)=>typeof s=="bigint"?s.toString():s})(st||(st={}));var o4;(function(t){t.mergeShapes=(e,n)=>({...e,...n})})(o4||(o4={}));const ge=st.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),qa=t=>{switch(typeof t){case"undefined":return ge.undefined;case"string":return ge.string;case"number":return isNaN(t)?ge.nan:ge.number;case"boolean":return ge.boolean;case"function":return ge.function;case"bigint":return ge.bigint;case"symbol":return ge.symbol;case"object":return Array.isArray(t)?ge.array:t===null?ge.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?ge.promise:typeof Map<"u"&&t instanceof Map?ge.map:typeof Set<"u"&&t instanceof Set?ge.set:typeof Date<"u"&&t instanceof Date?ge.date:ge.object;default:return ge.unknown}},oe=st.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),KR=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:");class Di extends Error{constructor(e){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){const n=e||function(s){return s.message},r={_errors:[]},i=s=>{for(const a of s.issues)if(a.code==="invalid_union")a.unionErrors.map(i);else if(a.code==="invalid_return_type")i(a.returnTypeError);else if(a.code==="invalid_arguments")i(a.argumentsError);else if(a.path.length===0)r._errors.push(n(a));else{let o=r,l=0;for(;l<a.path.length;){const c=a.path[l];l===a.path.length-1?(o[c]=o[c]||{_errors:[]},o[c]._errors.push(n(a))):o[c]=o[c]||{_errors:[]},o=o[c],l++}}};return i(this),r}toString(){return this.message}get message(){return JSON.stringify(this.issues,st.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=n=>n.message){const n={},r=[];for(const i of this.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(e(i))):r.push(e(i));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}Di.create=t=>new Di(t);const C1=(t,e)=>{let n;switch(t.code){case oe.invalid_type:t.received===ge.undefined?n="Required":n=`Expected ${t.expected}, received ${t.received}`;break;case oe.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(t.expected,st.jsonStringifyReplacer)}`;break;case oe.unrecognized_keys:n=`Unrecognized key(s) in object: ${st.joinValues(t.keys,", ")}`;break;case oe.invalid_union:n="Invalid input";break;case oe.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${st.joinValues(t.options)}`;break;case oe.invalid_enum_value:n=`Invalid enum value. Expected ${st.joinValues(t.options)}, received '${t.received}'`;break;case oe.invalid_arguments:n="Invalid function arguments";break;case oe.invalid_return_type:n="Invalid function return type";break;case oe.invalid_date:n="Invalid date";break;case oe.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(n=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?n=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?n=`Invalid input: must end with "${t.validation.endsWith}"`:st.assertNever(t.validation):t.validation!=="regex"?n=`Invalid ${t.validation}`:n="Invalid";break;case oe.too_small:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:n="Invalid input";break;case oe.too_big:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?n=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:n="Invalid input";break;case oe.custom:n="Invalid input";break;case oe.invalid_intersection_types:n="Intersection results could not be merged";break;case oe.not_multiple_of:n=`Number must be a multiple of ${t.multipleOf}`;break;case oe.not_finite:n="Number must be finite";break;default:n=e.defaultError,st.assertNever(t)}return{message:n}};let Fb=C1;function qR(t){Fb=t}function hp(){return Fb}const pp=t=>{const{data:e,path:n,errorMaps:r,issueData:i}=t,s=[...n,...i.path||[]],a={...i,path:s};let o="";const l=r.filter(c=>!!c).slice().reverse();for(const c of l)o=c(a,{data:e,defaultError:o}).message;return{...i,path:s,message:i.message||o}},QR=[];function ye(t,e){const n=pp({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,hp(),C1].filter(r=>!!r)});t.common.issues.push(n)}class Bn{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,n){const r=[];for(const i of n){if(i.status==="aborted")return Me;i.status==="dirty"&&e.dirty(),r.push(i.value)}return{status:e.value,value:r}}static async mergeObjectAsync(e,n){const r=[];for(const i of n)r.push({key:await i.key,value:await i.value});return Bn.mergeObjectSync(e,r)}static mergeObjectSync(e,n){const r={};for(const i of n){const{key:s,value:a}=i;if(s.status==="aborted"||a.status==="aborted")return Me;s.status==="dirty"&&e.dirty(),a.status==="dirty"&&e.dirty(),s.value!=="__proto__"&&(typeof a.value<"u"||i.alwaysSet)&&(r[s.value]=a.value)}return{status:e.value,value:r}}}const Me=Object.freeze({status:"aborted"}),Bb=t=>({status:"dirty",value:t}),qn=t=>({status:"valid",value:t}),l4=t=>t.status==="aborted",c4=t=>t.status==="dirty",S1=t=>t.status==="valid",mp=t=>typeof Promise<"u"&&t instanceof Promise;var Ce;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(Ce||(Ce={}));class ls{constructor(e,n,r,i){this._cachedPath=[],this.parent=e,this.data=n,this._path=r,this._key=i}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Hb=(t,e)=>{if(S1(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new Di(t.common.issues);return this._error=n,this._error}}};function Ie(t){if(!t)return{};const{errorMap:e,invalid_type_error:n,required_error:r,description:i}=t;if(e&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:i}:{errorMap:(a,o)=>a.code!=="invalid_type"?{message:o.defaultError}:typeof o.data>"u"?{message:r??o.defaultError}:{message:n??o.defaultError},description:i}}class je{constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(e){return qa(e.data)}_getOrReturnCtx(e,n){return n||{common:e.parent.common,data:e.data,parsedType:qa(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new Bn,ctx:{common:e.parent.common,data:e.data,parsedType:qa(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const n=this._parse(e);if(mp(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(e){const n=this._parse(e);return Promise.resolve(n)}parse(e,n){const r=this.safeParse(e,n);if(r.success)return r.data;throw r.error}safeParse(e,n){var r;const i={common:{issues:[],async:(r=n==null?void 0:n.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:qa(e)},s=this._parseSync({data:e,path:i.path,parent:i});return Hb(i,s)}async parseAsync(e,n){const r=await this.safeParseAsync(e,n);if(r.success)return r.data;throw r.error}async safeParseAsync(e,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:qa(e)},i=this._parse({data:e,path:r.path,parent:r}),s=await(mp(i)?i:Promise.resolve(i));return Hb(r,s)}refine(e,n){const r=i=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(i):n;return this._refinement((i,s)=>{const a=e(i),o=()=>s.addIssue({code:oe.custom,...r(i)});return typeof Promise<"u"&&a instanceof Promise?a.then(l=>l?!0:(o(),!1)):a?!0:(o(),!1)})}refinement(e,n){return this._refinement((r,i)=>e(r)?!0:(i.addIssue(typeof n=="function"?n(r,i):n),!1))}_refinement(e){return new Pi({schema:this,typeName:Ae.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return Ks.create(this,this._def)}nullable(){return nl.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Mi.create(this,this._def)}promise(){return Sc.create(this,this._def)}or(e){return O1.create([this,e],this._def)}and(e){return M1.create(this,e,this._def)}transform(e){return new Pi({...Ie(this._def),schema:this,typeName:Ae.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const n=typeof e=="function"?e:()=>e;return new j1({...Ie(this._def),innerType:this,defaultValue:n,typeName:Ae.ZodDefault})}brand(){return new Ub({typeName:Ae.ZodBranded,type:this,...Ie(this._def)})}catch(e){const n=typeof e=="function"?e:()=>e;return new bp({...Ie(this._def),innerType:this,catchValue:n,typeName:Ae.ZodCatch})}describe(e){const n=this.constructor;return new n({...this._def,description:e})}pipe(e){return F1.create(this,e)}readonly(){return Ep.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const XR=/^c[^\s-]{8,}$/i,ZR=/^[a-z][a-z0-9]*$/,JR=/^[0-9A-HJKMNP-TV-Z]{26}$/,ej=/^[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,tj=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,nj="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let u4;const rj=/^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/,ij=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,sj=t=>t.precision?t.offset?new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${t.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`):new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${t.precision}}Z$`):t.precision===0?t.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"):t.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$");function aj(t,e){return!!((e==="v4"||!e)&&rj.test(t)||(e==="v6"||!e)&&ij.test(t))}class Oi extends je{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==ge.string){const s=this._getOrReturnCtx(e);return ye(s,{code:oe.invalid_type,expected:ge.string,received:s.parsedType}),Me}const r=new Bn;let i;for(const s of this._def.checks)if(s.kind==="min")e.data.length<s.value&&(i=this._getOrReturnCtx(e,i),ye(i,{code:oe.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),r.dirty());else if(s.kind==="max")e.data.length>s.value&&(i=this._getOrReturnCtx(e,i),ye(i,{code:oe.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),r.dirty());else if(s.kind==="length"){const a=e.data.length>s.value,o=e.data.length<s.value;(a||o)&&(i=this._getOrReturnCtx(e,i),a?ye(i,{code:oe.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):o&&ye(i,{code:oe.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),r.dirty())}else if(s.kind==="email")tj.test(e.data)||(i=this._getOrReturnCtx(e,i),ye(i,{validation:"email",code:oe.invalid_string,message:s.message}),r.dirty());else if(s.kind==="emoji")u4||(u4=new RegExp(nj,"u")),u4.test(e.data)||(i=this._getOrReturnCtx(e,i),ye(i,{validation:"emoji",code:oe.invalid_string,message:s.message}),r.dirty());else if(s.kind==="uuid")ej.test(e.data)||(i=this._getOrReturnCtx(e,i),ye(i,{validation:"uuid",code:oe.invalid_string,message:s.message}),r.dirty());else if(s.kind==="cuid")XR.test(e.data)||(i=this._getOrReturnCtx(e,i),ye(i,{validation:"cuid",code:oe.invalid_string,message:s.message}),r.dirty());else if(s.kind==="cuid2")ZR.test(e.data)||(i=this._getOrReturnCtx(e,i),ye(i,{validation:"cuid2",code:oe.invalid_string,message:s.message}),r.dirty());else if(s.kind==="ulid")JR.test(e.data)||(i=this._getOrReturnCtx(e,i),ye(i,{validation:"ulid",code:oe.invalid_string,message:s.message}),r.dirty());else if(s.kind==="url")try{new URL(e.data)}catch{i=this._getOrReturnCtx(e,i),ye(i,{validation:"url",code:oe.invalid_string,message:s.message}),r.dirty()}else s.kind==="regex"?(s.regex.lastIndex=0,s.regex.test(e.data)||(i=this._getOrReturnCtx(e,i),ye(i,{validation:"regex",code:oe.invalid_string,message:s.message}),r.dirty())):s.kind==="trim"?e.data=e.data.trim():s.kind==="includes"?e.data.includes(s.value,s.position)||(i=this._getOrReturnCtx(e,i),ye(i,{code:oe.invalid_string,validation:{includes:s.value,position:s.position},message:s.message}),r.dirty()):s.kind==="toLowerCase"?e.data=e.data.toLowerCase():s.kind==="toUpperCase"?e.data=e.data.toUpperCase():s.kind==="startsWith"?e.data.startsWith(s.value)||(i=this._getOrReturnCtx(e,i),ye(i,{code:oe.invalid_string,validation:{startsWith:s.value},message:s.message}),r.dirty()):s.kind==="endsWith"?e.data.endsWith(s.value)||(i=this._getOrReturnCtx(e,i),ye(i,{code:oe.invalid_string,validation:{endsWith:s.value},message:s.message}),r.dirty()):s.kind==="datetime"?sj(s).test(e.data)||(i=this._getOrReturnCtx(e,i),ye(i,{code:oe.invalid_string,validation:"datetime",message:s.message}),r.dirty()):s.kind==="ip"?aj(e.data,s.version)||(i=this._getOrReturnCtx(e,i),ye(i,{validation:"ip",code:oe.invalid_string,message:s.message}),r.dirty()):st.assertNever(s);return{status:r.value,value:e.data}}_regex(e,n,r){return this.refinement(i=>e.test(i),{validation:n,code:oe.invalid_string,...Ce.errToObj(r)})}_addCheck(e){return new Oi({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...Ce.errToObj(e)})}url(e){return this._addCheck({kind:"url",...Ce.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...Ce.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...Ce.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...Ce.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...Ce.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...Ce.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...Ce.errToObj(e)})}datetime(e){var n;return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(n=e==null?void 0:e.offset)!==null&&n!==void 0?n:!1,...Ce.errToObj(e==null?void 0:e.message)})}regex(e,n){return this._addCheck({kind:"regex",regex:e,...Ce.errToObj(n)})}includes(e,n){return this._addCheck({kind:"includes",value:e,position:n==null?void 0:n.position,...Ce.errToObj(n==null?void 0:n.message)})}startsWith(e,n){return this._addCheck({kind:"startsWith",value:e,...Ce.errToObj(n)})}endsWith(e,n){return this._addCheck({kind:"endsWith",value:e,...Ce.errToObj(n)})}min(e,n){return this._addCheck({kind:"min",value:e,...Ce.errToObj(n)})}max(e,n){return this._addCheck({kind:"max",value:e,...Ce.errToObj(n)})}length(e,n){return this._addCheck({kind:"length",value:e,...Ce.errToObj(n)})}nonempty(e){return this.min(1,Ce.errToObj(e))}trim(){return new Oi({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Oi({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Oi({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get minLength(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxLength(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}}Oi.create=t=>{var e;return new Oi({checks:[],typeName:Ae.ZodString,coerce:(e=t==null?void 0:t.coerce)!==null&&e!==void 0?e:!1,...Ie(t)})};function oj(t,e){const n=(t.toString().split(".")[1]||"").length,r=(e.toString().split(".")[1]||"").length,i=n>r?n:r,s=parseInt(t.toFixed(i).replace(".","")),a=parseInt(e.toFixed(i).replace(".",""));return s%a/Math.pow(10,i)}class Qa extends je{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==ge.number){const s=this._getOrReturnCtx(e);return ye(s,{code:oe.invalid_type,expected:ge.number,received:s.parsedType}),Me}let r;const i=new Bn;for(const s of this._def.checks)s.kind==="int"?st.isInteger(e.data)||(r=this._getOrReturnCtx(e,r),ye(r,{code:oe.invalid_type,expected:"integer",received:"float",message:s.message}),i.dirty()):s.kind==="min"?(s.inclusive?e.data<s.value:e.data<=s.value)&&(r=this._getOrReturnCtx(e,r),ye(r,{code:oe.too_small,minimum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),i.dirty()):s.kind==="max"?(s.inclusive?e.data>s.value:e.data>=s.value)&&(r=this._getOrReturnCtx(e,r),ye(r,{code:oe.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),i.dirty()):s.kind==="multipleOf"?oj(e.data,s.value)!==0&&(r=this._getOrReturnCtx(e,r),ye(r,{code:oe.not_multiple_of,multipleOf:s.value,message:s.message}),i.dirty()):s.kind==="finite"?Number.isFinite(e.data)||(r=this._getOrReturnCtx(e,r),ye(r,{code:oe.not_finite,message:s.message}),i.dirty()):st.assertNever(s);return{status:i.value,value:e.data}}gte(e,n){return this.setLimit("min",e,!0,Ce.toString(n))}gt(e,n){return this.setLimit("min",e,!1,Ce.toString(n))}lte(e,n){return this.setLimit("max",e,!0,Ce.toString(n))}lt(e,n){return this.setLimit("max",e,!1,Ce.toString(n))}setLimit(e,n,r,i){return new Qa({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:r,message:Ce.toString(i)}]})}_addCheck(e){return new Qa({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:Ce.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Ce.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Ce.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Ce.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Ce.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:Ce.toString(n)})}finite(e){return this._addCheck({kind:"finite",message:Ce.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Ce.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Ce.toString(e)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&st.isInteger(e.value))}get isFinite(){let e=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(e===null||r.value<e)&&(e=r.value)}return Number.isFinite(n)&&Number.isFinite(e)}}Qa.create=t=>new Qa({checks:[],typeName:Ae.ZodNumber,coerce:(t==null?void 0:t.coerce)||!1,...Ie(t)});class Xa extends je{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce&&(e.data=BigInt(e.data)),this._getType(e)!==ge.bigint){const s=this._getOrReturnCtx(e);return ye(s,{code:oe.invalid_type,expected:ge.bigint,received:s.parsedType}),Me}let r;const i=new Bn;for(const s of this._def.checks)s.kind==="min"?(s.inclusive?e.data<s.value:e.data<=s.value)&&(r=this._getOrReturnCtx(e,r),ye(r,{code:oe.too_small,type:"bigint",minimum:s.value,inclusive:s.inclusive,message:s.message}),i.dirty()):s.kind==="max"?(s.inclusive?e.data>s.value:e.data>=s.value)&&(r=this._getOrReturnCtx(e,r),ye(r,{code:oe.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),i.dirty()):s.kind==="multipleOf"?e.data%s.value!==BigInt(0)&&(r=this._getOrReturnCtx(e,r),ye(r,{code:oe.not_multiple_of,multipleOf:s.value,message:s.message}),i.dirty()):st.assertNever(s);return{status:i.value,value:e.data}}gte(e,n){return this.setLimit("min",e,!0,Ce.toString(n))}gt(e,n){return this.setLimit("min",e,!1,Ce.toString(n))}lte(e,n){return this.setLimit("max",e,!0,Ce.toString(n))}lt(e,n){return this.setLimit("max",e,!1,Ce.toString(n))}setLimit(e,n,r,i){return new Xa({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:r,message:Ce.toString(i)}]})}_addCheck(e){return new Xa({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Ce.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Ce.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Ce.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Ce.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:Ce.toString(n)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}}Xa.create=t=>{var e;return new Xa({checks:[],typeName:Ae.ZodBigInt,coerce:(e=t==null?void 0:t.coerce)!==null&&e!==void 0?e:!1,...Ie(t)})};class N1 extends je{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==ge.boolean){const r=this._getOrReturnCtx(e);return ye(r,{code:oe.invalid_type,expected:ge.boolean,received:r.parsedType}),Me}return qn(e.data)}}N1.create=t=>new N1({typeName:Ae.ZodBoolean,coerce:(t==null?void 0:t.coerce)||!1,...Ie(t)});class Jo extends je{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==ge.date){const s=this._getOrReturnCtx(e);return ye(s,{code:oe.invalid_type,expected:ge.date,received:s.parsedType}),Me}if(isNaN(e.data.getTime())){const s=this._getOrReturnCtx(e);return ye(s,{code:oe.invalid_date}),Me}const r=new Bn;let i;for(const s of this._def.checks)s.kind==="min"?e.data.getTime()<s.value&&(i=this._getOrReturnCtx(e,i),ye(i,{code:oe.too_small,message:s.message,inclusive:!0,exact:!1,minimum:s.value,type:"date"}),r.dirty()):s.kind==="max"?e.data.getTime()>s.value&&(i=this._getOrReturnCtx(e,i),ye(i,{code:oe.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),r.dirty()):st.assertNever(s);return{status:r.value,value:new Date(e.data.getTime())}}_addCheck(e){return new Jo({...this._def,checks:[...this._def.checks,e]})}min(e,n){return this._addCheck({kind:"min",value:e.getTime(),message:Ce.toString(n)})}max(e,n){return this._addCheck({kind:"max",value:e.getTime(),message:Ce.toString(n)})}get minDate(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e!=null?new Date(e):null}}Jo.create=t=>new Jo({checks:[],coerce:(t==null?void 0:t.coerce)||!1,typeName:Ae.ZodDate,...Ie(t)});class gp extends je{_parse(e){if(this._getType(e)!==ge.symbol){const r=this._getOrReturnCtx(e);return ye(r,{code:oe.invalid_type,expected:ge.symbol,received:r.parsedType}),Me}return qn(e.data)}}gp.create=t=>new gp({typeName:Ae.ZodSymbol,...Ie(t)});class A1 extends je{_parse(e){if(this._getType(e)!==ge.undefined){const r=this._getOrReturnCtx(e);return ye(r,{code:oe.invalid_type,expected:ge.undefined,received:r.parsedType}),Me}return qn(e.data)}}A1.create=t=>new A1({typeName:Ae.ZodUndefined,...Ie(t)});class D1 extends je{_parse(e){if(this._getType(e)!==ge.null){const r=this._getOrReturnCtx(e);return ye(r,{code:oe.invalid_type,expected:ge.null,received:r.parsedType}),Me}return qn(e.data)}}D1.create=t=>new D1({typeName:Ae.ZodNull,...Ie(t)});class kc extends je{constructor(){super(...arguments),this._any=!0}_parse(e){return qn(e.data)}}kc.create=t=>new kc({typeName:Ae.ZodAny,...Ie(t)});class el extends je{constructor(){super(...arguments),this._unknown=!0}_parse(e){return qn(e.data)}}el.create=t=>new el({typeName:Ae.ZodUnknown,...Ie(t)});class Gs extends je{_parse(e){const n=this._getOrReturnCtx(e);return ye(n,{code:oe.invalid_type,expected:ge.never,received:n.parsedType}),Me}}Gs.create=t=>new Gs({typeName:Ae.ZodNever,...Ie(t)});class vp extends je{_parse(e){if(this._getType(e)!==ge.undefined){const r=this._getOrReturnCtx(e);return ye(r,{code:oe.invalid_type,expected:ge.void,received:r.parsedType}),Me}return qn(e.data)}}vp.create=t=>new vp({typeName:Ae.ZodVoid,...Ie(t)});class Mi extends je{_parse(e){const{ctx:n,status:r}=this._processInputParams(e),i=this._def;if(n.parsedType!==ge.array)return ye(n,{code:oe.invalid_type,expected:ge.array,received:n.parsedType}),Me;if(i.exactLength!==null){const a=n.data.length>i.exactLength.value,o=n.data.length<i.exactLength.value;(a||o)&&(ye(n,{code:a?oe.too_big:oe.too_small,minimum:o?i.exactLength.value:void 0,maximum:a?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),r.dirty())}if(i.minLength!==null&&n.data.length<i.minLength.value&&(ye(n,{code:oe.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),r.dirty()),i.maxLength!==null&&n.data.length>i.maxLength.value&&(ye(n,{code:oe.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((a,o)=>i.type._parseAsync(new ls(n,a,n.path,o)))).then(a=>Bn.mergeArray(r,a));const s=[...n.data].map((a,o)=>i.type._parseSync(new ls(n,a,n.path,o)));return Bn.mergeArray(r,s)}get element(){return this._def.type}min(e,n){return new Mi({...this._def,minLength:{value:e,message:Ce.toString(n)}})}max(e,n){return new Mi({...this._def,maxLength:{value:e,message:Ce.toString(n)}})}length(e,n){return new Mi({...this._def,exactLength:{value:e,message:Ce.toString(n)}})}nonempty(e){return this.min(1,e)}}Mi.create=(t,e)=>new Mi({type:t,minLength:null,maxLength:null,exactLength:null,typeName:Ae.ZodArray,...Ie(e)});function Tc(t){if(t instanceof Ft){const e={};for(const n in t.shape){const r=t.shape[n];e[n]=Ks.create(Tc(r))}return new Ft({...t._def,shape:()=>e})}else return t instanceof Mi?new Mi({...t._def,type:Tc(t.element)}):t instanceof Ks?Ks.create(Tc(t.unwrap())):t instanceof nl?nl.create(Tc(t.unwrap())):t instanceof cs?cs.create(t.items.map(e=>Tc(e))):t}class Ft extends je{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),n=st.objectKeys(e);return this._cached={shape:e,keys:n}}_parse(e){if(this._getType(e)!==ge.object){const c=this._getOrReturnCtx(e);return ye(c,{code:oe.invalid_type,expected:ge.object,received:c.parsedType}),Me}const{status:r,ctx:i}=this._processInputParams(e),{shape:s,keys:a}=this._getCached(),o=[];if(!(this._def.catchall instanceof Gs&&this._def.unknownKeys==="strip"))for(const c in i.data)a.includes(c)||o.push(c);const l=[];for(const c of a){const u=s[c],d=i.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new ls(i,d,i.path,c)),alwaysSet:c in i.data})}if(this._def.catchall instanceof Gs){const c=this._def.unknownKeys;if(c==="passthrough")for(const u of o)l.push({key:{status:"valid",value:u},value:{status:"valid",value:i.data[u]}});else if(c==="strict")o.length>0&&(ye(i,{code:oe.unrecognized_keys,keys:o}),r.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const c=this._def.catchall;for(const u of o){const d=i.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new ls(i,d,i.path,u)),alwaysSet:u in i.data})}}return i.common.async?Promise.resolve().then(async()=>{const c=[];for(const u of l){const d=await u.key;c.push({key:d,value:await u.value,alwaysSet:u.alwaysSet})}return c}).then(c=>Bn.mergeObjectSync(r,c)):Bn.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(e){return Ce.errToObj,new Ft({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(n,r)=>{var i,s,a,o;const l=(a=(s=(i=this._def).errorMap)===null||s===void 0?void 0:s.call(i,n,r).message)!==null&&a!==void 0?a:r.defaultError;return n.code==="unrecognized_keys"?{message:(o=Ce.errToObj(e).message)!==null&&o!==void 0?o:l}:{message:l}}}:{}})}strip(){return new Ft({...this._def,unknownKeys:"strip"})}passthrough(){return new Ft({...this._def,unknownKeys:"passthrough"})}extend(e){return new Ft({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new Ft({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:Ae.ZodObject})}setKey(e,n){return this.augment({[e]:n})}catchall(e){return new Ft({...this._def,catchall:e})}pick(e){const n={};return st.objectKeys(e).forEach(r=>{e[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new Ft({...this._def,shape:()=>n})}omit(e){const n={};return st.objectKeys(this.shape).forEach(r=>{e[r]||(n[r]=this.shape[r])}),new Ft({...this._def,shape:()=>n})}deepPartial(){return Tc(this)}partial(e){const n={};return st.objectKeys(this.shape).forEach(r=>{const i=this.shape[r];e&&!e[r]?n[r]=i:n[r]=i.optional()}),new Ft({...this._def,shape:()=>n})}required(e){const n={};return st.objectKeys(this.shape).forEach(r=>{if(e&&!e[r])n[r]=this.shape[r];else{let s=this.shape[r];for(;s instanceof Ks;)s=s._def.innerType;n[r]=s}}),new Ft({...this._def,shape:()=>n})}keyof(){return zb(st.objectKeys(this.shape))}}Ft.create=(t,e)=>new Ft({shape:()=>t,unknownKeys:"strip",catchall:Gs.create(),typeName:Ae.ZodObject,...Ie(e)}),Ft.strictCreate=(t,e)=>new Ft({shape:()=>t,unknownKeys:"strict",catchall:Gs.create(),typeName:Ae.ZodObject,...Ie(e)}),Ft.lazycreate=(t,e)=>new Ft({shape:t,unknownKeys:"strip",catchall:Gs.create(),typeName:Ae.ZodObject,...Ie(e)});class O1 extends je{_parse(e){const{ctx:n}=this._processInputParams(e),r=this._def.options;function i(s){for(const o of s)if(o.result.status==="valid")return o.result;for(const o of s)if(o.result.status==="dirty")return n.common.issues.push(...o.ctx.common.issues),o.result;const a=s.map(o=>new Di(o.ctx.common.issues));return ye(n,{code:oe.invalid_union,unionErrors:a}),Me}if(n.common.async)return Promise.all(r.map(async s=>{const a={...n,common:{...n.common,issues:[]},parent:null};return{result:await s._parseAsync({data:n.data,path:n.path,parent:a}),ctx:a}})).then(i);{let s;const a=[];for(const l of r){const c={...n,common:{...n.common,issues:[]},parent:null},u=l._parseSync({data:n.data,path:n.path,parent:c});if(u.status==="valid")return u;u.status==="dirty"&&!s&&(s={result:u,ctx:c}),c.common.issues.length&&a.push(c.common.issues)}if(s)return n.common.issues.push(...s.ctx.common.issues),s.result;const o=a.map(l=>new Di(l));return ye(n,{code:oe.invalid_union,unionErrors:o}),Me}}get options(){return this._def.options}}O1.create=(t,e)=>new O1({options:t,typeName:Ae.ZodUnion,...Ie(e)});const yp=t=>t instanceof I1?yp(t.schema):t instanceof Pi?yp(t.innerType()):t instanceof L1?[t.value]:t instanceof Za?t.options:t instanceof R1?Object.keys(t.enum):t instanceof j1?yp(t._def.innerType):t instanceof A1?[void 0]:t instanceof D1?[null]:null;class xp extends je{_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==ge.object)return ye(n,{code:oe.invalid_type,expected:ge.object,received:n.parsedType}),Me;const r=this.discriminator,i=n.data[r],s=this.optionsMap.get(i);return s?n.common.async?s._parseAsync({data:n.data,path:n.path,parent:n}):s._parseSync({data:n.data,path:n.path,parent:n}):(ye(n,{code:oe.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),Me)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,n,r){const i=new Map;for(const s of n){const a=yp(s.shape[e]);if(!a)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const o of a){if(i.has(o))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(o)}`);i.set(o,s)}}return new xp({typeName:Ae.ZodDiscriminatedUnion,discriminator:e,options:n,optionsMap:i,...Ie(r)})}}function d4(t,e){const n=qa(t),r=qa(e);if(t===e)return{valid:!0,data:t};if(n===ge.object&&r===ge.object){const i=st.objectKeys(e),s=st.objectKeys(t).filter(o=>i.indexOf(o)!==-1),a={...t,...e};for(const o of s){const l=d4(t[o],e[o]);if(!l.valid)return{valid:!1};a[o]=l.data}return{valid:!0,data:a}}else if(n===ge.array&&r===ge.array){if(t.length!==e.length)return{valid:!1};const i=[];for(let s=0;s<t.length;s++){const a=t[s],o=e[s],l=d4(a,o);if(!l.valid)return{valid:!1};i.push(l.data)}return{valid:!0,data:i}}else return n===ge.date&&r===ge.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}class M1 extends je{_parse(e){const{status:n,ctx:r}=this._processInputParams(e),i=(s,a)=>{if(l4(s)||l4(a))return Me;const o=d4(s.value,a.value);return o.valid?((c4(s)||c4(a))&&n.dirty(),{status:n.value,value:o.data}):(ye(r,{code:oe.invalid_intersection_types}),Me)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([s,a])=>i(s,a)):i(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}M1.create=(t,e,n)=>new M1({left:t,right:e,typeName:Ae.ZodIntersection,...Ie(n)});class cs extends je{_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==ge.array)return ye(r,{code:oe.invalid_type,expected:ge.array,received:r.parsedType}),Me;if(r.data.length<this._def.items.length)return ye(r,{code:oe.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Me;!this._def.rest&&r.data.length>this._def.items.length&&(ye(r,{code:oe.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const s=[...r.data].map((a,o)=>{const l=this._def.items[o]||this._def.rest;return l?l._parse(new ls(r,a,r.path,o)):null}).filter(a=>!!a);return r.common.async?Promise.all(s).then(a=>Bn.mergeArray(n,a)):Bn.mergeArray(n,s)}get items(){return this._def.items}rest(e){return new cs({...this._def,rest:e})}}cs.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new cs({items:t,typeName:Ae.ZodTuple,rest:null,...Ie(e)})};class P1 extends je{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==ge.object)return ye(r,{code:oe.invalid_type,expected:ge.object,received:r.parsedType}),Me;const i=[],s=this._def.keyType,a=this._def.valueType;for(const o in r.data)i.push({key:s._parse(new ls(r,o,r.path,o)),value:a._parse(new ls(r,r.data[o],r.path,o))});return r.common.async?Bn.mergeObjectAsync(n,i):Bn.mergeObjectSync(n,i)}get element(){return this._def.valueType}static create(e,n,r){return n instanceof je?new P1({keyType:e,valueType:n,typeName:Ae.ZodRecord,...Ie(r)}):new P1({keyType:Oi.create(),valueType:e,typeName:Ae.ZodRecord,...Ie(n)})}}class _p extends je{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==ge.map)return ye(r,{code:oe.invalid_type,expected:ge.map,received:r.parsedType}),Me;const i=this._def.keyType,s=this._def.valueType,a=[...r.data.entries()].map(([o,l],c)=>({key:i._parse(new ls(r,o,r.path,[c,"key"])),value:s._parse(new ls(r,l,r.path,[c,"value"]))}));if(r.common.async){const o=new Map;return Promise.resolve().then(async()=>{for(const l of a){const c=await l.key,u=await l.value;if(c.status==="aborted"||u.status==="aborted")return Me;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),o.set(c.value,u.value)}return{status:n.value,value:o}})}else{const o=new Map;for(const l of a){const c=l.key,u=l.value;if(c.status==="aborted"||u.status==="aborted")return Me;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),o.set(c.value,u.value)}return{status:n.value,value:o}}}}_p.create=(t,e,n)=>new _p({valueType:e,keyType:t,typeName:Ae.ZodMap,...Ie(n)});class tl extends je{_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==ge.set)return ye(r,{code:oe.invalid_type,expected:ge.set,received:r.parsedType}),Me;const i=this._def;i.minSize!==null&&r.data.size<i.minSize.value&&(ye(r,{code:oe.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),n.dirty()),i.maxSize!==null&&r.data.size>i.maxSize.value&&(ye(r,{code:oe.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),n.dirty());const s=this._def.valueType;function a(l){const c=new Set;for(const u of l){if(u.status==="aborted")return Me;u.status==="dirty"&&n.dirty(),c.add(u.value)}return{status:n.value,value:c}}const o=[...r.data.values()].map((l,c)=>s._parse(new ls(r,l,r.path,c)));return r.common.async?Promise.all(o).then(l=>a(l)):a(o)}min(e,n){return new tl({...this._def,minSize:{value:e,message:Ce.toString(n)}})}max(e,n){return new tl({...this._def,maxSize:{value:e,message:Ce.toString(n)}})}size(e,n){return this.min(e,n).max(e,n)}nonempty(e){return this.min(1,e)}}tl.create=(t,e)=>new tl({valueType:t,minSize:null,maxSize:null,typeName:Ae.ZodSet,...Ie(e)});class Cc extends je{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==ge.function)return ye(n,{code:oe.invalid_type,expected:ge.function,received:n.parsedType}),Me;function r(o,l){return pp({data:o,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,hp(),C1].filter(c=>!!c),issueData:{code:oe.invalid_arguments,argumentsError:l}})}function i(o,l){return pp({data:o,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,hp(),C1].filter(c=>!!c),issueData:{code:oe.invalid_return_type,returnTypeError:l}})}const s={errorMap:n.common.contextualErrorMap},a=n.data;if(this._def.returns instanceof Sc){const o=this;return qn(async function(...l){const c=new Di([]),u=await o._def.args.parseAsync(l,s).catch(p=>{throw c.addIssue(r(l,p)),c}),d=await Reflect.apply(a,this,u);return await o._def.returns._def.type.parseAsync(d,s).catch(p=>{throw c.addIssue(i(d,p)),c})})}else{const o=this;return qn(function(...l){const c=o._def.args.safeParse(l,s);if(!c.success)throw new Di([r(l,c.error)]);const u=Reflect.apply(a,this,c.data),d=o._def.returns.safeParse(u,s);if(!d.success)throw new Di([i(u,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new Cc({...this._def,args:cs.create(e).rest(el.create())})}returns(e){return new Cc({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,n,r){return new Cc({args:e||cs.create([]).rest(el.create()),returns:n||el.create(),typeName:Ae.ZodFunction,...Ie(r)})}}class I1 extends je{get schema(){return this._def.getter()}_parse(e){const{ctx:n}=this._processInputParams(e);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}I1.create=(t,e)=>new I1({getter:t,typeName:Ae.ZodLazy,...Ie(e)});class L1 extends je{_parse(e){if(e.data!==this._def.value){const n=this._getOrReturnCtx(e);return ye(n,{received:n.data,code:oe.invalid_literal,expected:this._def.value}),Me}return{status:"valid",value:e.data}}get value(){return this._def.value}}L1.create=(t,e)=>new L1({value:t,typeName:Ae.ZodLiteral,...Ie(e)});function zb(t,e){return new Za({values:t,typeName:Ae.ZodEnum,...Ie(e)})}class Za extends je{_parse(e){if(typeof e.data!="string"){const n=this._getOrReturnCtx(e),r=this._def.values;return ye(n,{expected:st.joinValues(r),received:n.parsedType,code:oe.invalid_type}),Me}if(this._def.values.indexOf(e.data)===-1){const n=this._getOrReturnCtx(e),r=this._def.values;return ye(n,{received:n.data,code:oe.invalid_enum_value,options:r}),Me}return qn(e.data)}get options(){return this._def.values}get enum(){const e={};for(const n of this._def.values)e[n]=n;return e}get Values(){const e={};for(const n of this._def.values)e[n]=n;return e}get Enum(){const e={};for(const n of this._def.values)e[n]=n;return e}extract(e){return Za.create(e)}exclude(e){return Za.create(this.options.filter(n=>!e.includes(n)))}}Za.create=zb;class R1 extends je{_parse(e){const n=st.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==ge.string&&r.parsedType!==ge.number){const i=st.objectValues(n);return ye(r,{expected:st.joinValues(i),received:r.parsedType,code:oe.invalid_type}),Me}if(n.indexOf(e.data)===-1){const i=st.objectValues(n);return ye(r,{received:r.data,code:oe.invalid_enum_value,options:i}),Me}return qn(e.data)}get enum(){return this._def.values}}R1.create=(t,e)=>new R1({values:t,typeName:Ae.ZodNativeEnum,...Ie(e)});class Sc extends je{unwrap(){return this._def.type}_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==ge.promise&&n.common.async===!1)return ye(n,{code:oe.invalid_type,expected:ge.promise,received:n.parsedType}),Me;const r=n.parsedType===ge.promise?n.data:Promise.resolve(n.data);return qn(r.then(i=>this._def.type.parseAsync(i,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Sc.create=(t,e)=>new Sc({type:t,typeName:Ae.ZodPromise,...Ie(e)});class Pi extends je{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Ae.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:n,ctx:r}=this._processInputParams(e),i=this._def.effect||null,s={addIssue:a=>{ye(r,a),a.fatal?n.abort():n.dirty()},get path(){return r.path}};if(s.addIssue=s.addIssue.bind(s),i.type==="preprocess"){const a=i.transform(r.data,s);return r.common.issues.length?{status:"dirty",value:r.data}:r.common.async?Promise.resolve(a).then(o=>this._def.schema._parseAsync({data:o,path:r.path,parent:r})):this._def.schema._parseSync({data:a,path:r.path,parent:r})}if(i.type==="refinement"){const a=o=>{const l=i.refinement(o,s);if(r.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return o};if(r.common.async===!1){const o=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?Me:(o.status==="dirty"&&n.dirty(),a(o.value),{status:n.value,value:o.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(o=>o.status==="aborted"?Me:(o.status==="dirty"&&n.dirty(),a(o.value).then(()=>({status:n.value,value:o.value}))))}if(i.type==="transform")if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!S1(a))return a;const o=i.transform(a.value,s);if(o instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:o}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>S1(a)?Promise.resolve(i.transform(a.value,s)).then(o=>({status:n.value,value:o})):a);st.assertNever(i)}}Pi.create=(t,e,n)=>new Pi({schema:t,typeName:Ae.ZodEffects,effect:e,...Ie(n)}),Pi.createWithPreprocess=(t,e,n)=>new Pi({schema:e,effect:{type:"preprocess",transform:t},typeName:Ae.ZodEffects,...Ie(n)});class Ks extends je{_parse(e){return this._getType(e)===ge.undefined?qn(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Ks.create=(t,e)=>new Ks({innerType:t,typeName:Ae.ZodOptional,...Ie(e)});class nl extends je{_parse(e){return this._getType(e)===ge.null?qn(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}nl.create=(t,e)=>new nl({innerType:t,typeName:Ae.ZodNullable,...Ie(e)});class j1 extends je{_parse(e){const{ctx:n}=this._processInputParams(e);let r=n.data;return n.parsedType===ge.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}j1.create=(t,e)=>new j1({innerType:t,typeName:Ae.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...Ie(e)});class bp extends je{_parse(e){const{ctx:n}=this._processInputParams(e),r={...n,common:{...n.common,issues:[]}},i=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return mp(i)?i.then(s=>({status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new Di(r.common.issues)},input:r.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Di(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}bp.create=(t,e)=>new bp({innerType:t,typeName:Ae.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...Ie(e)});class wp extends je{_parse(e){if(this._getType(e)!==ge.nan){const r=this._getOrReturnCtx(e);return ye(r,{code:oe.invalid_type,expected:ge.nan,received:r.parsedType}),Me}return{status:"valid",value:e.data}}}wp.create=t=>new wp({typeName:Ae.ZodNaN,...Ie(t)});const lj=Symbol("zod_brand");class Ub extends je{_parse(e){const{ctx:n}=this._processInputParams(e),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class F1 extends je{_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.common.async)return(async()=>{const s=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?Me:s.status==="dirty"?(n.dirty(),Bb(s.value)):this._def.out._parseAsync({data:s.value,path:r.path,parent:r})})();{const i=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?Me:i.status==="dirty"?(n.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:r.path,parent:r})}}static create(e,n){return new F1({in:e,out:n,typeName:Ae.ZodPipeline})}}class Ep extends je{_parse(e){const n=this._def.innerType._parse(e);return S1(n)&&(n.value=Object.freeze(n.value)),n}}Ep.create=(t,e)=>new Ep({innerType:t,typeName:Ae.ZodReadonly,...Ie(e)});const $b=(t,e={},n)=>t?kc.create().superRefine((r,i)=>{var s,a;if(!t(r)){const o=typeof e=="function"?e(r):typeof e=="string"?{message:e}:e,l=(a=(s=o.fatal)!==null&&s!==void 0?s:n)!==null&&a!==void 0?a:!0,c=typeof o=="string"?{message:o}:o;i.addIssue({code:"custom",...c,fatal:l})}}):kc.create(),cj={object:Ft.lazycreate};var Ae;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(Ae||(Ae={}));const uj=(t,e={message:`Input not instance of ${t.name}`})=>$b(n=>n instanceof t,e),Vb=Oi.create,Wb=Qa.create,dj=wp.create,fj=Xa.create,Yb=N1.create,hj=Jo.create,pj=gp.create,mj=A1.create,gj=D1.create,vj=kc.create,yj=el.create,xj=Gs.create,_j=vp.create,bj=Mi.create,wj=Ft.create,Ej=Ft.strictCreate,kj=O1.create,Tj=xp.create,Cj=M1.create,Sj=cs.create,Nj=P1.create,Aj=_p.create,Dj=tl.create,Oj=Cc.create,Mj=I1.create,Pj=L1.create,Ij=Za.create,Lj=R1.create,Rj=Sc.create,Gb=Pi.create,jj=Ks.create,Fj=nl.create,Bj=Pi.createWithPreprocess,Hj=F1.create;var k=Object.freeze({__proto__:null,defaultErrorMap:C1,setErrorMap:qR,getErrorMap:hp,makeIssue:pp,EMPTY_PATH:QR,addIssueToContext:ye,ParseStatus:Bn,INVALID:Me,DIRTY:Bb,OK:qn,isAborted:l4,isDirty:c4,isValid:S1,isAsync:mp,get util(){return st},get objectUtil(){return o4},ZodParsedType:ge,getParsedType:qa,ZodType:je,ZodString:Oi,ZodNumber:Qa,ZodBigInt:Xa,ZodBoolean:N1,ZodDate:Jo,ZodSymbol:gp,ZodUndefined:A1,ZodNull:D1,ZodAny:kc,ZodUnknown:el,ZodNever:Gs,ZodVoid:vp,ZodArray:Mi,ZodObject:Ft,ZodUnion:O1,ZodDiscriminatedUnion:xp,ZodIntersection:M1,ZodTuple:cs,ZodRecord:P1,ZodMap:_p,ZodSet:tl,ZodFunction:Cc,ZodLazy:I1,ZodLiteral:L1,ZodEnum:Za,ZodNativeEnum:R1,ZodPromise:Sc,ZodEffects:Pi,ZodTransformer:Pi,ZodOptional:Ks,ZodNullable:nl,ZodDefault:j1,ZodCatch:bp,ZodNaN:wp,BRAND:lj,ZodBranded:Ub,ZodPipeline:F1,ZodReadonly:Ep,custom:$b,Schema:je,ZodSchema:je,late:cj,get ZodFirstPartyTypeKind(){return Ae},coerce:{string:t=>Oi.create({...t,coerce:!0}),number:t=>Qa.create({...t,coerce:!0}),boolean:t=>N1.create({...t,coerce:!0}),bigint:t=>Xa.create({...t,coerce:!0}),date:t=>Jo.create({...t,coerce:!0})},any:vj,array:bj,bigint:fj,boolean:Yb,date:hj,discriminatedUnion:Tj,effect:Gb,enum:Ij,function:Oj,instanceof:uj,intersection:Cj,lazy:Mj,literal:Pj,map:Aj,nan:dj,nativeEnum:Lj,never:xj,null:gj,nullable:Fj,number:Wb,object:wj,oboolean:()=>Yb().optional(),onumber:()=>Wb().optional(),optional:jj,ostring:()=>Vb().optional(),pipeline:Hj,preprocess:Bj,promise:Rj,record:Nj,set:Dj,strictObject:Ej,string:Vb,symbol:pj,transformer:Gb,tuple:Sj,undefined:mj,union:kj,unknown:yj,void:_j,NEVER:Me,ZodIssueCode:oe,quotelessJson:KR,ZodError:Di});k.object({general_store_name:k.string().optional().describe("The store name\n`platform.env.SC_GENERAL_STORE_NAME` environment"),general_store_website:k.string().optional().describe("The store `website`\n`platform.env.SC_GENERAL_STORE_WEBSITE` environment"),general_store_logo_url:k.string().optional().describe("The store `logo` url\n`platform.env.SC_GENERAL_STORE_LOGO_URL` environment"),general_store_description:k.string().optional().describe("The store `description`\n`platform.env.SC_GENERAL_STORE_DESCRIPTION` environment"),general_store_support_email:k.string().optional().describe("The store support email\n`platform.env.SC_GENERAL_STORE_SUPPORT_EMAIL` environment"),general_confirm_email_base_url:k.string().optional().describe("The store `email-confirm`\n`platform.env.SC_GENERAL_STORE_CONFIRM_EMAIL_BASE_URL` environment"),auth_admins_emails:k.array(k.string()).optional().describe("Seed admin emails, if absent will be infered at init by\n`platform.env.SC_AUTH_ADMIN_EMAILS` environment as CSV of emails"),auth_password_hash_rounds:k.number().optional().describe("password hash rounds, if absent will be infered at init by\n`platform.env.SC_AUTH_PASS_HASH_ROUNDS` environment"),auth_secret_access_token:k.string().describe("access token signing secret, if absent will be infered\nat init by `platform.env.SC_AUTH_SECRET_ACCESS_TOKEN` environment"),auth_secret_refresh_token:k.string().describe("refresh token signing secret, if absent will be infered at\ninit by `platform.env.SC_AUTH_SECRET_REFRESH_TOKEN` environment"),checkout_reserve_stock_on:k.union([k.literal("checkout_create"),k.literal("checkout_complete"),k.literal("never")]).optional().describe("(Optional) automatically reserve stock, we recommend to use `never`.\nDepending on your needs you can alter this setting.\nif absent will be infered at init by `platform.env.SC_CHECKOUT_RESERVE_STOCK_ON`\nenvironment and then will default to `never`.").default("never"),storage_rewrite_urls:k.string().optional().describe("(Optional) Once object `storage` is used, you may have connected a\n**CDN** to buckets to take advantage of faster assets serving instead of serving\nfrom your server / the storage service directly. If you are using an cloud based\nstorage service such as AWS S3, it is very recommended to attach the bucket to\na **CDN** for super fast and efficient serving.\n\nTake note, most cloud based storage services and `storecraft` drivers support creating\n`presigned` urls for `download` / `upload`, which essentially delegate these operations\nto the storage services. However, **CDN** is always the best choice for assets serving\ncost and latency wise.\n\nif absent will be infered at init by `platform.env.SC_STORAGE_REWRITE_URLS` environment.").default("undefined")}).describe("Basic config for `storecraft`");const zj=k.object({message:k.string().optional(),code:k.string().optional(),expected:k.string().optional(),received:k.string().optional(),path:k.array(k.string()).optional()});k.object({messages:k.array(zj).optional()});const kp=k.string(),Tp=k.string(),f4=k.object({created_at:k.string().optional().describe("ISO string creation time"),updated_at:k.string().optional().describe("ISO string update time")}).describe("Timestamps");k.object({search:k.array(k.string()).optional()}).describe("searchable");const Uj=k.object({id:k.string().optional().describe("ID")}).describe("with `id`"),$j=k.object({id:k.string().describe("ID")}).describe("with `id`"),Jr=k.object({id:k.string().optional().describe("Optional `id`"),handle:k.string().optional().describe("Optional `handle`")}),Vj=k.object({key:k.string().describe("The key"),value:k.string().optional().describe("The value")}).describe("Attribute type, a key/value storage"),Wj=k.object({iss:k.string(),sub:k.string(),aud:k.string(),exp:k.number(),nbf:k.number(),iat:k.number(),jti:k.string(),roles:k.array(k.string()).describe("User roles and authorizations")}),h4=k.object({email:k.string().email().describe("Email of user"),password:k.string().min(4).max(20).describe("password")}).describe("Auth base type"),Yj=k.union([k.literal("admin"),k.literal("user"),k.string()]).describe("Role of authenticated user");h4.describe("Sign in type"),h4.describe("Sign up type"),k.object({refresh_token:k.string().describe("A refresh token")}).describe("Refresh token input type");const Kb=k.object({token:k.string().describe("a token (`access` or `refresh`)"),claims:Wj.partial().describe("Claims the `JSON Web Token` holds")}).describe("API token with parsed claims");k.object({apikey:k.string().describe("The `apikey` is `base64_uri(apikey@storecraft.api:{password})`.\nIt will be shown only once to the user, at the `backend`, the password hash\nwill be saved, thus, the real password is only known to the user.")}).describe("Result of `auth` `apikey` creation"),k.object({token_type:k.string().describe("The type of token, should be `bearer` or `refresh`"),user_id:k.string().describe("the `ID` of user, example `au_....`"),access_token:Kb.describe("The access token"),refresh_token:Kb.describe("The refresh token")}).describe("Result of `auth` request for `signin` / `signup` / `refresh`"),Uj.extend(f4.shape).extend({handle:k.string().describe("The key name"),values:k.array(k.string()).describe("List of values, related to the key")}).omit({id:!0,handle:!0}).and(Jr).describe("Tag upsert type");const qb=k.object({option_id:k.string().describe("Variant option id"),value_id:k.string().describe("Variant selected value id")}).describe("Variant option selection type"),Gj=k.object({id:k.string().describe("The `id` of the entity"),value:k.string().describe("The text value of the entity")}).describe("Identifiable text entity type"),qs=k.object({id:k.string().describe("The `id` of the entity"),handle:k.string().describe("The `handle` of the entity")}).describe("both `id` and `handle` of entity required"),Qb=k.object({Auto:k.object({id:k.literal(0),name:k.string().optional(),name2:k.literal("automatic")}),Manual:k.object({id:k.literal(1),name:k.string().optional(),name2:k.literal("manual")})}).describe(`Discounts can be manual(coupon) or automatic types,
174
174
  see <a href='#DiscountApplicationEnum'>#DiscountApplicationEnum</a>`),Xb=k.array(k.object({id:k.string().optional().describe("`p_in_collections` filter, `id` of collection"),title:k.string().optional().describe("`p_in_collections` filter, `title` of collection"),handle:k.string().optional().describe("`p_in_collections` filter, `handle` of the collection")})).describe("Filter for product in collections"),Kj=Xb.describe("Filter for product not in collections"),Zb=k.array(k.object({id:k.string().optional().describe("`p_in_products` filter, `id` of `product`"),title:k.string().optional().describe("`p_in_products` filter, `title` of `product`"),handle:k.string().optional().describe("`p_in_products` filter, `handle` of the `product`")})).describe("Filter for product discount, product in handles"),qj=Zb.describe("Filter for product discount, product not in handles"),Qj=k.array(k.string()).describe("Filter for product discount, product has tags"),Xj=k.array(k.string()).describe("Filter for product discount, NOT has tags"),Zj=k.any().describe(`Filter for product discount,
175
175
  that chooses all products`),Jj=k.object({from:k.number().optional().describe("`p_in_price_range` filter From price"),to:k.number().describe("`p_in_price_range` filter To price")}).describe("Filter for product discount, product in price range"),eF=k.object({from:k.number().optional().describe("`o_subtotal_in_range` filter From price"),to:k.number().optional().describe("`o_subtotal_in_range` filter To price")}).describe("Filter for order discount, subtotal in range"),tF=k.object({from:k.number().optional().describe("`o_items_count_in_range` filter From count"),to:k.number().optional().describe("`o_items_count_in_range` filter To count")}).describe("Filter for order discount, items count in range"),nF=k.object({from:k.string().optional().describe("`o_date_in_range` filter From date `ISO` format"),to:k.string().optional().describe("`o_date_in_range` filter To date `ISO` format")}).describe("Filter for order discount, subtotal in range"),rF=k.array(k.object({id:k.string().describe("`id` of `customer`"),email:k.string().optional().describe("(optional) `email` of `customer`"),firstname:k.string().optional().describe("(optional) readable `name` of `customer`"),lastname:k.string().optional().describe("(optional) readable `name` of `customer`")})).describe("Filter for order discount, order has customer id"),ei=k.object({any:k.object({id:k.number(),type:k.string(),op:k.string(),name:k.string().optional()}),p_in_collections:k.object({id:k.literal(0),type:k.literal("product"),op:k.literal("p-in-collections"),name:k.string().optional()}),p_not_in_collections:k.object({id:k.literal(1),type:k.literal("product"),op:k.literal("p-not-in-collections"),name:k.string().optional()}),p_in_products:k.object({id:k.literal(2),type:k.literal("product"),op:k.literal("p-in-products"),name:k.string().optional()}),p_not_in_products:k.object({id:k.literal(3),type:k.literal("product"),op:k.literal("p-not-in-products"),name:k.string().optional()}),p_in_tags:k.object({id:k.literal(4),type:k.literal("product"),op:k.literal("p-in-tags"),name:k.string().optional()}),p_not_in_tags:k.object({id:k.literal(5),type:k.literal("product"),op:k.literal("p-not-in-tags"),name:k.string().optional()}),p_all:k.object({id:k.literal(6),type:k.literal("product"),op:k.literal("p-all"),name:k.string().optional()}),p_in_price_range:k.object({id:k.literal(7),type:k.literal("product"),op:k.literal("p-in-price-range"),name:k.string().optional()}),o_subtotal_in_range:k.object({id:k.literal(100),type:k.literal("order"),op:k.literal("o-subtotal-in-range"),name:k.string().optional()}),o_items_count_in_range:k.object({id:k.literal(101),type:k.literal("order"),op:k.literal("o-items-count-in-range"),name:k.string().optional()}),o_date_in_range:k.object({id:k.literal(102),type:k.literal("order"),op:k.literal("o-date-in-range"),name:k.string().optional()}),o_has_customer:k.object({id:k.literal(103),type:k.literal("order"),op:k.literal("o-has-customer"),name:k.string().optional()})}),iF=k.object({fixed:k.number().describe("`RegularDiscountExtra` params, Fixed price addition"),percent:k.number().describe("`RegularDiscountExtra` params, Percents off")}).describe("Parameters of a regular discount"),sF=k.object({fixed:k.number().describe("`OrderDiscountExtra` params, Fixed price addition"),percent:k.number().describe("`OrderDiscountExtra` params, Percents off"),free_shipping:k.boolean().optional().describe("`OrderDiscountExtra` params, Do we have free shipping ?")}).describe("Parameters of order discount"),aF=k.object({fixed:k.number().describe("`BulkDiscountExtra` params, Fixed price addition"),percent:k.number().describe("`BulkDiscountExtra` params, Percents off"),qty:k.number().describe("`BulkDiscountExtra` params, The integer quantity\nfor which the discount is given"),recursive:k.boolean().optional().describe("`BulkDiscountExtra` params, Apply the discount as\nmany times as possible")}).describe("Parameters of bulk discount"),oF=k.object({fixed:k.number().describe("`BundleDiscountExtra` params, Fixed price addition"),percent:k.number().describe("`BundleDiscountExtra` params, Percents off"),recursive:k.boolean().optional().describe("`BundleDiscountExtra` params, Apply the discount\nas many times as possible")}).describe("Parameters of bulk discount"),Nc=k.object({regular:k.object({id:k.literal(0),type:k.literal("regular"),name:k.string().optional()}),bulk:k.object({id:k.literal(1),type:k.literal("bulk"),name:k.string().optional()}),buy_x_get_y:k.object({id:k.literal(2),type:k.literal("buy_x_get_y"),name:k.string().optional()}),order:k.object({id:k.literal(3),type:k.literal("order"),name:k.string().optional()}),bundle:k.object({id:k.literal(4),type:k.literal("bundle"),name:k.string().optional()}),any:k.object({id:k.number(),type:k.string(),name:k.string().optional()})}).describe(`Discount meta data,
176
176
  see <a href='#DiscountMetaEnum'>#DiscountMetaEnum</a>`),Jb=k.object({firstname:k.string().optional().describe("First name of recipient"),lastname:k.string().optional().describe("Last name of recipient"),phone_number:k.string().regex(/^([+]?d{1,2}[-s]?|)d{3}[-s]?d{3}[-s]?d{4}$ Invalid phone number/).optional().describe("The phone number of the recipient"),company:k.string().optional().describe("Optional company name of recipient"),street1:k.string().optional().describe("Street address 1"),street2:k.string().optional().describe("Street address 2"),city:k.string().optional().describe("City"),country:k.string().optional().describe("Country"),state:k.string().optional().describe("State"),zip_code:k.string().optional().describe("ZIP code"),postal_code:k.string().optional().describe("Postal code")}).describe("Address type"),lF=k.union([k.literal("route"),k.literal("url")]).describe("'route' means routing inside admin panel 'url' is linking to a url"),cF=k.object({collection:k.string().describe("Which collection"),document:k.string().describe("Which document")}).describe("route inside admin panel action params"),uF=k.object({new_window:k.boolean().optional().describe("Ppen the url in new window"),url:k.string().describe("The url to open")}).describe("Action params for actions of type 'url'"),dF=k.object({firstname:k.string().optional().describe("First name"),lastname:k.string().optional().describe("Last name"),phone_number:k.string().optional().describe("Phone number"),email:k.string().optional().describe("Email"),customer_id:k.string().optional().describe("Customer `id`")}).describe("Order buyer info"),fF=k.object({id:k.string().describe("`id`"),title:k.string().min(3,"Title should be longer than 3").optional().describe("title"),message:k.union([k.literal("shipping-method-not-found"),k.literal("product-not-exists"),k.literal("product-out-of-stock"),k.literal("product-not-enough-stock"),k.literal("product-inactive")]).optional().describe("message")}).describe(`Checkouts or draft orders might be validated
@@ -6,10 +6,17 @@
6
6
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
7
  <title>Storecraft - Next Gen Commerce-As-Code</title>
8
8
  <script
9
- id='_storecraft_script_' type='text/javascript'
10
- async="false" defer="false" src="index.umd.cjs" >
9
+ id='_storecraft_script_'
10
+ type="module"
11
+ async="false" defer="false" sssrc="./index2.mjs" >
12
+ import {mountStorecraftDashboard} from './index2.mjs';
13
+ mountStorecraftDashboard(
14
+ document.getElementById('root'), false
15
+ )
16
+
11
17
  </script>
12
- <script type='text/javascript'>
18
+ <!-- <script type='text/javascript' async="false" defer="false">
19
+
13
20
  console.log('StorecraftDashboard')
14
21
 
15
22
  var script = document.querySelector('#_storecraft_script_');
@@ -19,11 +26,11 @@
19
26
  function() {
20
27
  window.StorecraftDashboard.mountStorecraftDashboard(
21
28
  document.getElementById('root'), false
22
- )
29
+ )
23
30
  }
24
31
  );
25
32
 
26
- </script>
33
+ </script> -->
27
34
  </head>
28
35
  <body>
29
36
  <div id="root"></div>