schemas/libraries/zod-compiler/download_compiled/bag + mini/minified.js
function e(){return e=>e}function t(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function n(e,t){return typeof t==`bigint`?t.toString():t}var r=class{constructor(e){this._getter=e,this._value=void 0}get value(){let e=this._getter;return e!==void 0&&(this._value=e(),this._getter=void 0),this._value}};function i(e){return new r(e)}function a(e){return e==null}function o(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function s(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}const c=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function l(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}const u= new Set([`string`,`number`,`symbol`]);function d(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function f(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function p(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function m(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout===`optional`)}function h(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function g(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function _(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function v(e){return typeof e==`string`?e:e?.message}function y(e){let t=[];for(let n of e??[]){let e=n._zod.def;if(!/_(length|size)$|_equals$/.test(e.check))break;let r=e.maximum??e.length??e.size;r>=0&&t.push([r,n])}return t}function b(e,t,n){var r;for(let i=t;i<e.length;i++)(r=e[i]).schema??(r.schema=n)}function x(e,t,n){var r;let i=e.inst?._zod?.traits;i?.has(`$ZodType`)&&(i.has(`$ZodCheck`)?(r=e).schema??(r.schema=e.inst):e.schema=e.inst);let a=e.schema===e.inst?void 0:e.schema?._zod.def?.error,o=e.message?e.message:v(e.inst?._zod.def?.error?.(e))??v(a?.(e))??v(t?.error?.(e))??v(n.customError?.(e))??v(n.localeError?.(e))??`Invalid input`,s={};for(let t of Object.keys(e))t!==`inst`&&t!==`schema`&&t!==`continue`&&t!==`input`&&t!==`__proto__`&&(s[t]=e[t]);return s.path??=[],s.message=o,t?.reportInput&&(s.input=e.input),s}const S=/[\uD800-\uDBFF]/;function C(e){let t=e.length;if(!S.test(e))return t;let n=t;for(let r=0;r<t-1;r++)(e.charCodeAt(r)&64512)==55296&&(e.charCodeAt(r+1)&64512)==56320&&(n--,r++);return n}function w(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function ee(e,t){for(let n in t){let r=Object.getOwnPropertyDescriptor(t,n);r.get?Object.defineProperty(e,n,{...r,enumerable:!1}):ne(e,n,r.value)}}function T(e,t,n,r=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:r,value:n}),n}function te(e,t,n){return T(e,t,n,!1)}function ne(e,t,n){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?n:T(this,t,n.bind(this))},set(e){T(this,t,e)}})}function re(e,t){let n=Object.getPrototypeOf(e);return t in n?void 0:n}let E,D=!1;const ie={configurable:!0,get(){D=!0}};function O(e,t,n){let r=Object.getPrototypeOf(e._zod);t in r&&E!==e._zod?E=void 0:(E=e._zod,Object.defineProperty(r,t,{configurable:!0,get(){Object.defineProperty(this,t,ie);let e=D;D=!1;try{let r=n(this);return D?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:r}),D||=e,r}catch(n){throw delete this[t],D||=e,n}},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}}))}function k(e,t,n,r){let i=re(e,t);i&&Object.defineProperty(i,t,{configurable:!0,get(){let e={configurable:!0,writable:!0,enumerable:r,value:void 0};return Object.defineProperty(this,t,e),e.value=n(this),Object.defineProperty(this,t,e),e.value},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:r,value:e})}})}var A;const j={value:void 0,enumerable:!1};let M=`captureStackTrace`in Error?Error:null;function N(e){let t=M;if(t){let n=t.stackTraceLimit;if(typeof n==`number`){try{t.stackTraceLimit=0}catch{return M=null,new e}try{return new e}finally{t.stackTraceLimit=n}}}return new e}
function P(e,t,n,r){let i={};function a(e){this.def=e,this.constr=d,this.traits= new Set}a.prototype=i;let o=n,s=o&& new WeakSet;function c(n,r){if(!n._zod){j.value=new a(r);try{Object.defineProperty(n,"_zod",j)}finally{j.value=void 0}}else if(n._zod.traits.has(e))return;if(n._zod.traits.add(e),t(n,r),s){let e=Object.getPrototypeOf(n),t=n._zod.constr.prototype,r=e;for(;r&&r!==t;)r=Object.getPrototypeOf(r);let i=r??e;s.has(i)||(s.add(i),ee(i,o))}let i=d.prototype;for(let e in i)Object.prototype.hasOwnProperty.call(i,e)&&(e in n||(n[e]=i[e].bind(n)))}let l=r?.Parent??Object;class u extends l{}Object.defineProperty(u,"name",{value:e});function d(e){let t=r?.Parent?N(u):this;c(t,e);let n=t._zod.deferred;if(n){for(let e of n)e();t._zod.deferred=void 0}let i=globalThis.__zod_globalConfig?.postProcessor;return i&&i(t),t}return Object.defineProperty(d,"init",{value:c}),Object.defineProperty(d,Symbol.hasInstance,{value:t=>r?.Parent&&t instanceof r.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(d,"name",{value:e}),d}var F=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}};(A=globalThis).__zod_globalConfig??(A.__zod_globalConfig={});const I=globalThis.__zod_globalConfig;function L(e){return e&&Object.assign(I,e),I}function R(){let e=this._zod;return e.message??=JSON.stringify(e.def,n,2),e.message}function ae(e){this._zod.message=e}const z={get:R,set:ae,enumerable:!0,configurable:!0},B={value:void 0,enumerable:!1},oe= new WeakSet([Object.prototype,Error.prototype]),V= P(`$ZodError`,(e,t)=>{e.name=`$ZodError`,B.value=t,Object.defineProperty(e,"issues",B),B.value=void 0,Object.defineProperty(e,"message",z);let n=Object.getPrototypeOf(e);oe.has(n)||(oe.add(n),Object.defineProperty(n,"toString",{configurable:!0,enumerable:!1,get(){let e=()=>this.message;return Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0})}}))},void 0,{Parent:Error}),se= (e=>{let t=(n,r,i,a)=>{let o=i?{...i,async:!1}:{async:!1},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise)throw new F;if(s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>x(e,o,L())));throw c(n,a?.callee??t),n}return s.value};return t})(V),ce= (e=>{let t=async(n,r,i,a)=>{let o=i?{...i,async:!0}:{async:!0},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise&&(s=await s),s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>x(e,o,L())));throw c(n,a?.callee??t),n}return s.value};return t})(V),le= (e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new F;return a.issues.length?ue(e,a.issues,i):{success:!0,data:a.value}})(V);function ue(e,t,n){let r;return{success:!1,get error(){return r||(r=new e(t.map(e=>x(e,n,L()))),t=void 0,n=void 0),r},set error(e){r=e,t=void 0,n=void 0}}}const de= (e=>async(t,n,r)=>{let i=r?{...r,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?ue(e,a.issues,i):{success:!0,data:a.value}})(V),fe=/^https?$/,pe=/^[\s\S]{0,}$/,me=/^-?\d+(?:\.\d+)?$/,he= P(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),ge=e=>{let t=e.value;return!a(t)&&t.length!==void 0},_e={number:`number`,bigint:`bigint`,object:`date`},ve= P(`$ZodCheckLessThan`,(e,t)=>{he.init(e,t);let n=_e[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:_e[typeof r.value]??n,code:`too_big`,maximum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),ye= P(`$ZodCheckGreaterThan`,(e,t)=>{he.init(e,t);let n=_e[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:_e[typeof r.value]??n,code:`too_small`,minimum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),be= P(`$ZodCheckMaxLength`,(e,t)=>{var n;he.init(e,t),(n=e._zod.def).when??(n.when=ge),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>t.maximum?C(r):i)<=t.maximum)return;let a=w(r);n.issues.push({origin:a,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),xe= P(`$ZodCheckMinLength`,(e,t)=>{var n;he.init(e,t),(n=e._zod.def).when??(n.when=ge),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>=t.minimum&&i<t.minimum*2?C(r):i)>=t.minimum)return;let a=w(r);n.issues.push({origin:a,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Se= P(`$ZodCheckStringFormat`,(e,t)=>{var n,r;he.init(e,t),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,t.pattern.test(n.value)||n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),Ce={major:4,minor:6,patch:7},H= P(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Ce;let r=e._zod.def.checks,i=e._zod.traits.has(`$ZodCheck`)?[e,...r??[]]:r?.length?[...r]:[];for(let t of i)for(let n of t._zod.onattach)n(e);if(i.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(t,n,r)=>{if(t.memo)return t;let i=h(t),a;for(let o of n){if(o._zod.def.when){if(g(t)||!o._zod.def.when(t))continue}else if(i)continue;let n=t.issues.length,s=o._zod.check(t);if(s instanceof Promise&&r?.async===!1)throw new F;if(a||s instanceof Promise)a=(a??Promise.resolve()).then(async()=>{await s,t.issues.length!==n&&(b(t.issues,n,e),i||=h(t,n))});else{if(t.issues.length===n)continue;b(t.issues,n,e),i||=h(t,n)}}return a?a.then(()=>t):t},n=(n,r,a)=>{if(h(n))return n.aborted=!0,n;let o=t(r,i,a);if(o instanceof Promise){if(a.async===!1)throw new F;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(r,a)=>{if(a.skipChecks)return e._zod.parse(r,a);if(a.direction===`backward`){let t=e._zod.parse({value:r.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,r,a)):n(t,r,a)}let o=e._zod.parse(r,a);if(o instanceof Promise){if(a.async===!1)throw new F;return o.then(e=>t(e,i,a))}return t(o,i,a)}}},{get"~standard"(){return te(this,`~standard`,Ee(this))},set"~standard"(e){T(this,`~standard`,e)}}),we=(e,t)=>e.issues.length?{issues:e.issues.map(e=>x(e,t,L()))}:{value:e.value};async function Te(e,t){let n={async:!0};return we(await e._zod.run({value:t,issues:[]},n),n)}function Ee(e){return{validate:t=>{let n={async:!1};try{let r=e._zod.run({value:t,issues:[]},n);if(!(r instanceof Promise))return we(r,n)}catch{}return Te(e,t)},vendor:`zod`,version:1}}const De= P(`$ZodString`,(e,t)=>{H.init(e,t),e._zod.pattern=t.pattern??pe,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value==`string`||n.issues.push({expected:`string`,code:`invalid_type`,input:n.value,inst:e}),n}}),Oe= P(`$ZodStringFormat`,(e,t)=>{Se.init(e,t),De.init(e,t)});function ke(e){try{return typeof URL<`u`&&typeof URL.canParse==`function`?URL.canParse(e):(new URL(e),!0)}catch{return!1}}function Ae(e,t){return!(`normalize`in t)&&!(`hostname`in t)&&!(`protocol`in t)?ke(e)||2:je(e,t)}function je(e,t){if(!t.normalize&&t.protocol?.source===fe.source&&!/^https?:\/\//i.test(e))return 1;try{if(typeof URL<`u`){let t=URL;if(typeof t.parse==`function`)return t.parse(e)??2}return new URL(e)}catch{return 2}}const Me=/[\t\n\r]/g;function Ne(e){return e.replace(Me,``)}function Pe(e,t){return t.lastIndex=0,t.test(e.hostname)}function Fe(e,t){return t.lastIndex=0,t.test(e.protocol.endsWith(`:`)?e.protocol.slice(0,-1):e.protocol)}const Ie= P(`$ZodURL`,(e,t)=>{Oe.init(e,t),e._zod.check=n=>{try{let r=n.value.trim(),i=Ae(r,t);if(i===1){n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid URL format`,input:n.value,inst:e,continue:!t.abort});return}if(i===2){n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort});return}if(i===!0){n.value=Ne(r);return}t.hostname&&!Pe(i,t.hostname)&&n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid hostname`,pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort}),t.protocol&&!Fe(i,t.protocol)&&n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid protocol`,pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort}),n.value=t.normalize?i.href:Ne(r);return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),Le= P(`$ZodNumber`,(e,t)=>{H.init(e,t),e._zod.pattern=me,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let i=n.value;if(typeof i==`number`&&!Number.isNaN(i)&&Number.isFinite(i))return n;let a=typeof i==`number`?Number.isNaN(i)?`NaN`:Number.isFinite(i)?void 0:String(i):void 0;return n.issues.push({expected:`number`,code:`invalid_type`,input:i,inst:e,...a?{received:a}:{}}),n}}),Re= P(`$ZodDate`,(e,t)=>{H.init(e,t),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=new Date(n.value)}catch{}let i=n.value,a=i instanceof Date;return a&&!Number.isNaN(i.getTime())||n.issues.push({expected:`date`,code:`invalid_type`,input:i,...a?{received:`Invalid Date`}:{},inst:e}),n}});function ze(e,t){let n=y(e._zod.def.checks);if(!n.length)return;let r=Math.min(...n.map(e=>e[0])),i=e._zod.parse;e._zod.parse=(n,a)=>{let o=t(n.value);if(o>r&&!a?.skipChecks&&a?.direction!==`backward`){for(let[t,r]of y(e._zod.def.checks))if(o>t&&r._zod.def.when(n)){let t=n.issues.length;return r._zod.check(n),n.issues[t].continue=!1,b(n.issues,t,e),n}}return i(n,a)}}const Be=e=>Array.isArray(e)?e.length:-1;function Ve(e,t,n){e.issues.length&&t.issues.push(..._(n,e.issues)),t.value[n]=e.value}const He= P(`$ZodArray`,(e,t)=>{H.init(e,t);let n=I.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!Array.isArray(a))return r.issues.push({expected:`array`,code:`invalid_type`,input:a,inst:e}),r;r.value=n?n.alloc(e,r,Array(a.length),i):Array(a.length);let o=[],s=i?.abortEarly;for(let e=0;e<a.length;e++){let n=a[e],c=t.element._zod.run({value:n,issues:[]},i);if(c instanceof Promise)o.push(c.then(t=>Ve(t,r,e)));else if(Ve(c,r,e),s&&c.issues.length!==0&&h(c))break}return o.length?Promise.all(o).then(()=>r):r},ze(e,Be)});function Ue(e,t,n,r,i,a){let o=n in r,s=a===`optional`;if(o||!s||i!==`optional`){if(e.issues.length){if(i!==void 0&&s&&!o)return;t.issues.push(..._(n,e.issues))}!o&&i===void 0?e.issues.length||t.issues.push({code:`invalid_type`,expected:`nonoptional`,input:void 0,path:[n]}):e.value===void 0?(o||i===`defaulted`&&!s)&&(t.value[n]=void 0):t.value[n]=e.value}}const We=[];function Ge(e){let t=Object.keys(e.shape),n=Object.getOwnPropertySymbols(e.shape),r=n.length?n:We,i=r.length?[...t,...r]:t;for(let t of i)if(!e.shape?.[t]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${String(t)}": expected a Zod schema`);let a=m(e.shape);return{...e,allKeys:i,symbolKeys:r,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(a)}}function Ke(e,t,n,r,i,a,o){let s=[],c=i.keySet,l=i.catchall._zod,u=l.def.type,d=l.optin,f=l.optout,p=0;for(let i in t){if(o&&n.issues.length!==p){if(h(n,p))break;p=n.issues.length}if(c.has(i))continue;if(i===`__proto__`){u===`never`&&s.push(i);continue}if(u===`never`){s.push(i);continue}let a=l.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>Ue(e,n,i,t,d,f))):Ue(a,n,i,t,d,f)}return s.length&&n.issues.push({code:`unrecognized_keys`,keys:s,input:t,inst:a,continue:!0}),e.length?Promise.all(e).then(()=>n):n}const qe= P(`$ZodObject`,(e,t)=>{H.init(e,t);let n=Object.getOwnPropertyDescriptor(t,`shape`),r=n?.get?n.get.raw:t.shape??{};if(r){let e=()=>{let n={...r};return Object.defineProperty(t,"shape",{value:n}),e.raw=n,n};e.raw=r,Object.defineProperty(t,"shape",{get:e})}let a=i(()=>Ge(t));O(e,`propValues`,e=>{let t=e.def.shape,n={};for(let e in t){let r=t[e]._zod;if(r.values){Object.prototype.hasOwnProperty.call(n,e)||s(n,e, new Set);for(let t of r.values)n[e].add(t);r.optin!==void 0&&n[e].add(void 0)}}return n});let o=l,c=t.catchall,u,d=I.memoizer;d?.attach(e),e._zod.parse=(t,n)=>{u??=a.value;let r=t.value;if(!o(r))return t.issues.push({expected:`object`,code:`invalid_type`,input:r,inst:e}),t;t.value=d?d.alloc(e,t,{},n):{};let i=[],s=u.shape,l=n?.abortEarly,f=t.issues.length;for(let e of u.allKeys){if(l&&t.issues.length!==f){if(h(t,f))break;f=t.issues.length}if(e===`__proto__`)continue;let a=s[e],o=a._zod.optin,c=a._zod.optout,u=a._zod.run({value:r[e],issues:[]},n);u instanceof Promise?i.push(u.then(n=>Ue(n,t,e,r,o,c))):Ue(u,t,e,r,o,c)}return c?Ke(i,r,t,n,a.value,e,l===!0):i.length?Promise.all(i).then(()=>t):t}}),Je= P(`$ZodEnum`,(e,n)=>{H.init(e,n);let r=t(n.entries),i=new Set(r);e._zod.values=i,O(e,`pattern`,e=>{let n=t(e.def.entries).filter(e=>u.has(typeof e));return RegExp(n.length?`^(${n.map(e=>d(e.toString())).join(`|`)})$`:`^[^\\s\\S]$`)}),e._zod.parse=(t,n)=>{let a=t.value;return i.has(a)||t.issues.push({code:`invalid_value`,values:r,input:a,inst:e}),t}}),Ye= P(`$ZodNullable`,(e,t)=>{H.init(e,t),O(e,`optin`,e=>e.def.innerType._zod.optin),O(e,`optout`,e=>e.def.innerType._zod.optout),O(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${o(t.source)}|null)$`):void 0}),O(e,`values`,e=>e.def.innerType._zod.values? new Set([...e.def.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)});function Xe(e){return e.checks&&=[...e.checks],e}
function Ze(e,t){return new e(Xe({type:`string`,...p(t)}))}
function Qe(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...p(t)})}
function $e(e,t){return new e(Xe({type:`number`,checks:[],...p(t)}))}
function et(e,t){return new e({type:`date`,...p(t)})}
function tt(e,t){return new ve({check:`less_than`,...p(t),value:e,inclusive:!0})}
function nt(e,t){return new ye({check:`greater_than`,...p(t),value:e,inclusive:!0})}
function U(e,t){return new be({check:`max_length`,...p(t),maximum:e})}
function W(e,t){return new xe({check:`min_length`,...p(t),minimum:e})}function rt(e){return typeof e==`string`?e:e?.message}var it=function(e){var t=L(),n;return t.customError&&(n=rt(t.customError(e)),n!=null)||t.localeError&&(n=rt(t.localeError(e)),n!=null)?n:`Invalid input`},at= (function(){function e(e,t,n){this.success=!1,this._e=e,this._f=t,this._i=n,this._c=void 0}return Object.defineProperty(e.prototype,"error",{configurable:!0,get:function(){if(this._c)return this._c;for(var e=this._f===null?this._e:this._f(this._i),t=0;t<e.length;t++){var n=e[t],r={},i;for(i in n.message===void 0&&typeof it==`function`&&(n.message=it(n)),n)i!==`input`&&i!==`continue`&&Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i]);e[t]=r}return this._c=new V(e)}}),e})();function ot(e,t,n){this.success=!1,this._z=e,this._r=t,this._i=n,this._c=void 0}Object.defineProperty(ot.prototype,"error",{configurable:!0,get:function(){if(this._c)return this._c;var e={};return e[Symbol.for(`zod.compile.fallback`)]=!0,this._c=this._z.call(this._r,this._i,e).error}});function st(e,t,n,r,i,a){var o=t||{},s=o.parseAsync,c=o.safeParseAsync;return o.parse=i||(n?function t(r){if(n(r))return r;var i=e(r);if(i.success)return i.data;throw ct(i.error,t)}:function t(n){var r=e(n);if(r.success)return r.data;throw ct(r.error,t)}),o.safeParse=e,o.safeParseAsync=function(t){try{return Promise.resolve(e(t))}catch(e){if(c)return c(t);throw e}},o.parseAsync=n?function t(r){try{if(n(r))return Promise.resolve(r);var i=e(r);return i.success?Promise.resolve(i.data):Promise.reject(ct(i.error,t))}catch(e){if(s)return s(r);throw e}}:function t(n){try{var r=e(n);return r.success?Promise.resolve(r.data):Promise.reject(ct(r.error,t))}catch(e){if(s)return s(n);throw e}},o.is=r||function(t){return e(t).success},a&&(a.a=c),Object.defineProperty(o,"~standard",{configurable:!0,value:{version:1,vendor:`zod`,validate:a||function(t){var r;try{if(n&&n(t))return{value:t};r=e(t)}catch(e){if(c)return c(t).then(function(e){return e.success?{value:e.data}:{issues:e.error.issues}});throw e}return r.success?{value:r.data}:{issues:r.error.issues}}}}),o}function ct(e,t){var n=Error.captureStackTrace;return typeof n==`function`&&n(e,t),e}function lt(e,t){if(e.success)return e.data;throw ct(e.error,t)}function ut(e){return e.success?{value:e.data}:{issues:e.error.issues}}function dt(e,t,n){var r=n.a;if(r)return r(t).then(ut);throw e}function ft(e,t){return new at(null,e,t)}function G(e,t,n,r,i,a){var o={origin:t,code:`too_small`,minimum:e,inclusive:n,input:r,path:i};return a!==void 0&&(o.message=a),o}function K(e,t,n,r,i,a){var o={origin:t,code:`too_big`,maximum:e,inclusive:n,input:r,path:i};return a!==void 0&&(o.message=a),o}function q(e,t,n,r){var i={expected:e,code:`invalid_type`,input:t,path:n};return r!==void 0&&(i.message=r),i}function pt(e,t,n,r,i,a){var o=e===void 0?{code:`invalid_format`,format:t}:{origin:e,code:`invalid_format`,format:t};return i&&Object.assign(o,i),o.input=n,o.path=r,a!==void 0&&(o.message=a),o}function mt(e,t,n,r,i){var a={code:`invalid_value`};return r&&Object.assign(a,r),a.values=e,a.input=t,a.path=n,i!==void 0&&(a.message=i),a}function J(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function Y(e){var t=e.length;if(!/[\uD800-\uDBFF]/.test(e))return t;for(var n=t,r=0;r<t-1;r++)(e.charCodeAt(r)&64512)==55296&&(e.charCodeAt(r+1)&64512)==56320&&(n--,r++);return n}function ht(e){if(typeof URL==`function`&&typeof URL.canParse==`function`)return URL.canParse(e);try{return new URL(e),!0}catch{return!1}}function X(e,t){for(var n=e.length,r=Array(n+1),i=0;i<n;i++)r[i]=e[i];return r[n]=t,r}const Z= P(`ZodMiniType`,(e,t)=>{if(!e._zod)throw Error(`Uninitialized schema in ZodMiniType.`);H.init(e,t),e.def=t,e.type=t.type},{get with(){return this.check},set with(e){T(this,`with`,e)},parse(e,t){return se(this,e,t,{callee:this.parse})},parseAsync(e,t){return ce(this,e,t,{callee:this.parseAsync})},safeParse(e,t){return le(this,e,t)},safeParseAsync(e,t){return de(this,e,t)},check(...e){let t=this.def;return this.clone({...t,checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]},{parent:!0})},clone(e,t){return f(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},apply(e,...t){return t.length===0?e(this):e(this,...t)}}),gt= P(`ZodMiniString`,(e,t)=>{De.init(e,t),Z.init(e,t)});
function Q(e){return Ze(gt,e)}const _t= P(`ZodMiniStringFormat`,(e,t)=>{Oe.init(e,t),gt.init(e,t)}),vt= P(`ZodMiniURL`,(e,t)=>{Ie.init(e,t),_t.init(e,t)});
function yt(e){return Qe(vt,e)}const bt= P(`ZodMiniNumber`,(e,t)=>{Le.init(e,t),Z.init(e,t)});
function $(e){return $e(bt,e)}const xt= P(`ZodMiniDate`,(e,t)=>{Re.init(e,t),Z.init(e,t)});
function St(e){return et(xt,e)}const Ct= P(`ZodMiniArray`,(e,t)=>{He.init(e,t),Z.init(e,t)});
function wt(e,t){return new Ct({type:`array`,element:e,...p(t)})}const Tt= P(`ZodMiniObject`,(e,t)=>{qe.init(e,t),Z.init(e,t),k(e,`shape`,e=>e._zod.def.shape,!1)});
function Et(e,t){let n={type:`object`,shape:e??{},...p(t)};return new Tt(n)}const Dt= P(`ZodMiniEnum`,(e,t)=>{Je.init(e,t),Z.init(e,t),e.options=[...e._zod.values]});
function Ot(e,t){let n=Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e;return new Dt({type:`enum`,entries:n,...p(t)})}const kt= P(`ZodMiniNullable`,(e,t)=>{Ye.init(e,t),Z.init(e,t)});
function At(e){return new kt({type:`nullable`,innerType:e})}var jt= RegExp(`[\\t\\n\\r]`,`g`),Mt= RegExp(`^https?:\\/\\/(?:(?!xn--)[a-z0-9-]+\\.)*(?!xn--)[a-z][a-z0-9-]*(?::[0-9]{1,4})?(?:[\\/?#][^\\t\\n\\r]*)?$`);function Nt(e,t,n){if(!Array.isArray(e))n.push(q(`array`,e,t));else{var r=e;r=r.slice();for(var i=0;i<r.length;i++)r[i]=Pt(r[i],X(t,i),n);e=r}return e}function Pt(e,t,n){if(typeof e!=`object`||!e||Array.isArray(e))n.push(q(`object`,e,t));else{var r=e.id;typeof r==`number`?Number.isNaN(r)?n.push({expected:`number`,code:`invalid_type`,received:`NaN`,input:r,path:X(t,`id`)}):Number.isFinite(r)||n.push({expected:`number`,code:`invalid_type`,received:String(r),input:r,path:X(t,`id`)}):n.push(q(`number`,r,X(t,`id`)));var i=e.created;i instanceof Date?isNaN(i.getTime())&&n.push({expected:`date`,code:`invalid_type`,received:`Invalid Date`,input:i,path:X(t,`created`)}):n.push(q(`date`,i,X(t,`created`)));var a=e.title;typeof a==`string`?(a.length<1&&n.push(G(1,`string`,!0,a,X(t,`title`))),a.length>100&&(a.length>200||Y(a)>100)&&n.push(K(100,`string`,!0,a,X(t,`title`)))):(n.push(q(`string`,a,X(t,`title`))),a!=null&&a.length!==void 0&&(a.length<1&&n.push(G(1,J(a),!0,a,X(t,`title`))),a.length>100&&n.push(K(100,J(a),!0,a,X(t,`title`)))));var o=e.type;o!==`jpg`&&o!==`png`&&n.push(mt([`jpg`,`png`],o,X(t,`type`)));var s=e.size;typeof s==`number`?Number.isNaN(s)?n.push({expected:`number`,code:`invalid_type`,received:`NaN`,input:s,path:X(t,`size`)}):Number.isFinite(s)||n.push({expected:`number`,code:`invalid_type`,received:String(s),input:s,path:X(t,`size`)}):n.push(q(`number`,s,X(t,`size`)));var c=e.url;if(typeof c!=`string`)n.push(q(`string`,c,X(t,`url`)));else{var l=c.trim();Mt.test(l)?c=l:ht(l)?c=l.replace(jt,``):n.push(pt(void 0,`url`,c,X(t,`url`)))}e={id:r,created:i,title:a,type:o,size:s,url:c}}return e}const Ft= Et({id: $(),created: St(),title:( Q()).check( W(1), U(100)),type: Ot([`jpg`,`png`]),size: $(),url: yt()}),It= Et({id: $(),stars:( $()).check( nt(1), tt(5)),title:( Q()).check( W(1), U(100)),text:( Q()).check( W(1), U(1e3)),images: wt(Ft)});e()( Et({id: $(),created: St(),title:( Q()).check( W(1), U(100)),brand:( Q()).check( W(1), U(30)),description:( Q()).check( W(1), U(500)),price:( $()).check( nt(1), tt(1e4)),discount: At(( $()).check( nt(1), tt(100))),quantity:( $()).check( nt(0), tt(10)),tags: wt(( Q()).check( W(1), U(30))),images: wt(Ft),ratings: wt(It)})),( (()=>{var e={};function t(e){for(var t,n=0;n<e.length;n++)if(t=e[n],!(typeof t==`string`&&t.length>=1&&(t.length<=30||t.length<=60&&Y(t)<=30)))return!1;return!0}var n= RegExp(`[\\t\\n\\r]`,`g`),r= RegExp(`^https?:\\/\\/(?:(?!xn--)[a-z0-9-]+\\.)*(?!xn--)[a-z][a-z0-9-]*(?::[0-9]{1,4})?(?:[\\/?#][^\\t\\n\\r]*)?$`);function i(i){var a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,ee,T,te,ne,re,E,D,ie,O,k,A,j,M,N,P,F,I,L,R,ae,z,B,oe,V,se;if(typeof i!=`object`||!i||Array.isArray(i)||(a=i.id,!Number.isFinite(a))||(o=i.created,!(o instanceof Date&&!Number.isNaN(o.getTime())))||(s=i.title,!(typeof s==`string`&&s.length>=1&&(s.length<=100||s.length<=200&&Y(s)<=100)))||(c=i.brand,!(typeof c==`string`&&c.length>=1&&(c.length<=30||c.length<=60&&Y(c)<=30)))||(l=i.description,!(typeof l==`string`&&l.length>=1&&(l.length<=500||l.length<=1e3&&Y(l)<=500)))||(u=i.price,!(Number.isFinite(u)&&u>=1&&u<=1e4))||(d=i.quantity,!(Number.isFinite(d)&&d>=0&&d<=10))||(f=i.discount,!(f===null||Number.isFinite(f)&&f>=1&&f<=100))||(p=i.tags,!(Array.isArray(p)&&t(p)))||(m=i.images,!Array.isArray(m)))return e;for(h=Array(m.length),g=0;g<m.length;g++){if(_=m[g],typeof _!=`object`||!_||Array.isArray(_)||(v=_.id,!Number.isFinite(v))||(y=_.size,!Number.isFinite(y))||(b=_.created,!(b instanceof Date&&!Number.isNaN(b.getTime())))||(x=_.type,x!==`jpg`&&x!==`png`)||(S=_.title,!(typeof S==`string`&&S.length>=1&&(S.length<=100||S.length<=200&&Y(S)<=100)))||(C=_.url,typeof C!=`string`))return e;if(w=C,ee=w.trim(),r.test(ee))w=ee;else{if(!ht(ee))return e;w=ee.replace(n,``)}T={id:v,created:b,title:S,type:x,size:y,url:w},h[g]=T}if(te=i.ratings,!Array.isArray(te))return e;for(ne=Array(te.length),re=0;re<te.length;re++){if(E=te[re],typeof E!=`object`||!E||Array.isArray(E)||(D=E.id,!Number.isFinite(D))||(ie=E.stars,!(Number.isFinite(ie)&&ie>=1&&ie<=5))||(O=E.title,!(typeof O==`string`&&O.length>=1&&(O.length<=100||O.length<=200&&Y(O)<=100)))||(k=E.text,!(typeof k==`string`&&k.length>=1&&(k.length<=1e3||k.length<=2e3&&Y(k)<=1e3)))||(A=E.images,!Array.isArray(A)))return e;for(j=Array(A.length),M=0;M<A.length;M++){if(N=A[M],typeof N!=`object`||!N||Array.isArray(N)||(P=N.id,!Number.isFinite(P))||(F=N.size,!Number.isFinite(F))||(I=N.created,!(I instanceof Date&&!Number.isNaN(I.getTime())))||(L=N.type,L!==`jpg`&&L!==`png`)||(R=N.title,!(typeof R==`string`&&R.length>=1&&(R.length<=100||R.length<=200&&Y(R)<=100)))||(ae=N.url,typeof ae!=`string`))return e;if(z=ae,B=z.trim(),r.test(B))z=B;else{if(!ht(B))return e;z=B.replace(n,``)}oe={id:P,created:I,title:R,type:L,size:F,url:z},j[M]=oe}V={id:D,stars:ie,title:O,text:k,images:j},ne[re]=V}return se={id:a,created:o,title:s,brand:c,description:l,price:u,discount:f,quantity:d,tags:p,images:h,ratings:ne},se}function a(e){var t=[],n=e;if(typeof n!=`object`||!n||Array.isArray(n))t.push(q(`object`,n,[]));else{var r=n.id;typeof r==`number`?Number.isNaN(r)?t.push({expected:`number`,code:`invalid_type`,received:`NaN`,input:r,path:[`id`]}):Number.isFinite(r)||t.push({expected:`number`,code:`invalid_type`,received:String(r),input:r,path:[`id`]}):t.push(q(`number`,r,[`id`]));var i=n.created;i instanceof Date?isNaN(i.getTime())&&t.push({expected:`date`,code:`invalid_type`,received:`Invalid Date`,input:i,path:[`created`]}):t.push(q(`date`,i,[`created`]));var a=n.title;typeof a==`string`?(a.length<1&&t.push(G(1,`string`,!0,a,[`title`])),a.length>100&&(a.length>200||Y(a)>100)&&t.push(K(100,`string`,!0,a,[`title`]))):(t.push(q(`string`,a,[`title`])),a!=null&&a.length!==void 0&&(a.length<1&&t.push(G(1,J(a),!0,a,[`title`])),a.length>100&&t.push(K(100,J(a),!0,a,[`title`]))));var o=n.brand;typeof o==`string`?(o.length<1&&t.push(G(1,`string`,!0,o,[`brand`])),o.length>30&&(o.length>60||Y(o)>30)&&t.push(K(30,`string`,!0,o,[`brand`]))):(t.push(q(`string`,o,[`brand`])),o!=null&&o.length!==void 0&&(o.length<1&&t.push(G(1,J(o),!0,o,[`brand`])),o.length>30&&t.push(K(30,J(o),!0,o,[`brand`]))));var s=n.description;typeof s==`string`?(s.length<1&&t.push(G(1,`string`,!0,s,[`description`])),s.length>500&&(s.length>1e3||Y(s)>500)&&t.push(K(500,`string`,!0,s,[`description`]))):(t.push(q(`string`,s,[`description`])),s!=null&&s.length!==void 0&&(s.length<1&&t.push(G(1,J(s),!0,s,[`description`])),s.length>500&&t.push(K(500,J(s),!0,s,[`description`]))));var c=n.price;typeof c==`number`?Number.isNaN(c)?t.push({expected:`number`,code:`invalid_type`,received:`NaN`,input:c,path:[`price`]}):Number.isFinite(c)?(c<1&&t.push(G(1,`number`,!0,c,[`price`])),c>1e4&&t.push(K(1e4,`number`,!0,c,[`price`]))):t.push({expected:`number`,code:`invalid_type`,received:String(c),input:c,path:[`price`]}):t.push(q(`number`,c,[`price`]));var l=n.discount;l!==null&&(typeof l==`number`?Number.isNaN(l)?t.push({expected:`number`,code:`invalid_type`,received:`NaN`,input:l,path:[`discount`]}):Number.isFinite(l)?(l<1&&t.push(G(1,`number`,!0,l,[`discount`])),l>100&&t.push(K(100,`number`,!0,l,[`discount`]))):t.push({expected:`number`,code:`invalid_type`,received:String(l),input:l,path:[`discount`]}):t.push(q(`number`,l,[`discount`])));var u=n.quantity;typeof u==`number`?Number.isNaN(u)?t.push({expected:`number`,code:`invalid_type`,received:`NaN`,input:u,path:[`quantity`]}):Number.isFinite(u)?(u<0&&t.push(G(0,`number`,!0,u,[`quantity`])),u>10&&t.push(K(10,`number`,!0,u,[`quantity`]))):t.push({expected:`number`,code:`invalid_type`,received:String(u),input:u,path:[`quantity`]}):t.push(q(`number`,u,[`quantity`]));var d=n.tags;if(!Array.isArray(d))t.push(q(`array`,d,[`tags`]));else{for(var f=d,p=0;p<f.length;p++){var m=f[p];typeof m==`string`?(m.length<1&&t.push(G(1,`string`,!0,m,[`tags`,p])),m.length>30&&(m.length>60||Y(m)>30)&&t.push(K(30,`string`,!0,m,[`tags`,p]))):(t.push(q(`string`,m,[`tags`,p])),m!=null&&m.length!==void 0&&(m.length<1&&t.push(G(1,J(m),!0,m,[`tags`,p])),m.length>30&&t.push(K(30,J(m),!0,m,[`tags`,p]))))}d=f}var h=n.images;h=Nt(h,[`images`],t);var g=n.ratings;if(!Array.isArray(g))t.push(q(`array`,g,[`ratings`]));else{var _=g;_=_.slice();for(var v=0;v<_.length;v++)if(typeof _[v]!=`object`||_[v]===null||Array.isArray(_[v]))t.push(q(`object`,_[v],[`ratings`,v]));else{var y=_[v].id;typeof y==`number`?Number.isNaN(y)?t.push({expected:`number`,code:`invalid_type`,received:`NaN`,input:y,path:[`ratings`,v,`id`]}):Number.isFinite(y)||t.push({expected:`number`,code:`invalid_type`,received:String(y),input:y,path:[`ratings`,v,`id`]}):t.push(q(`number`,y,[`ratings`,v,`id`]));var b=_[v].stars;typeof b==`number`?Number.isNaN(b)?t.push({expected:`number`,code:`invalid_type`,received:`NaN`,input:b,path:[`ratings`,v,`stars`]}):Number.isFinite(b)?(b<1&&t.push(G(1,`number`,!0,b,[`ratings`,v,`stars`])),b>5&&t.push(K(5,`number`,!0,b,[`ratings`,v,`stars`]))):t.push({expected:`number`,code:`invalid_type`,received:String(b),input:b,path:[`ratings`,v,`stars`]}):t.push(q(`number`,b,[`ratings`,v,`stars`]));var x=_[v].title;typeof x==`string`?(x.length<1&&t.push(G(1,`string`,!0,x,[`ratings`,v,`title`])),x.length>100&&(x.length>200||Y(x)>100)&&t.push(K(100,`string`,!0,x,[`ratings`,v,`title`]))):(t.push(q(`string`,x,[`ratings`,v,`title`])),x!=null&&x.length!==void 0&&(x.length<1&&t.push(G(1,J(x),!0,x,[`ratings`,v,`title`])),x.length>100&&t.push(K(100,J(x),!0,x,[`ratings`,v,`title`]))));var S=_[v].text;typeof S==`string`?(S.length<1&&t.push(G(1,`string`,!0,S,[`ratings`,v,`text`])),S.length>1e3&&(S.length>2e3||Y(S)>1e3)&&t.push(K(1e3,`string`,!0,S,[`ratings`,v,`text`]))):(t.push(q(`string`,S,[`ratings`,v,`text`])),S!=null&&S.length!==void 0&&(S.length<1&&t.push(G(1,J(S),!0,S,[`ratings`,v,`text`])),S.length>1e3&&t.push(K(1e3,J(S),!0,S,[`ratings`,v,`text`]))));var C=_[v].images;C=Nt(C,[`ratings`,v,`images`],t),_[v]={id:y,stars:b,title:x,text:S,images:C}}g=_}n={id:r,created:i,title:a,brand:o,description:s,price:c,discount:l,quantity:u,tags:d,images:h,ratings:g}}return t}function o(t){var n=i(t);return n===e?ft(a,t):{success:!0,data:n}}function s(e){return lt(o(e),s)}function c(e){try{return ut(o(e))}catch(t){return dt(t,e,c)}}return st(o,null,null,null,s,c)})()).parse({});