@guardian/support-dotcom-components 11.1.1 → 11.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/dotcom/index.d.ts.map +1 -0
- package/dist/dotcom/requests.d.ts.map +1 -0
- package/dist/dotcom/types.d.ts.map +1 -0
- package/dist/index.esm.js +1 -1
- package/dist/index.js +1 -1
- package/dist/shared/lib/geolocation.d.ts.map +1 -0
- package/dist/shared/lib/history.d.ts.map +1 -0
- package/dist/shared/lib/index.d.ts.map +1 -0
- package/dist/shared/lib/placeholders.d.ts.map +1 -0
- package/dist/shared/lib/reminderFields.d.ts.map +1 -0
- package/dist/shared/lib/viewLog.d.ts.map +1 -0
- package/dist/shared/types/abTests/banner.d.ts.map +1 -0
- package/dist/shared/types/abTests/epic.d.ts.map +1 -0
- package/dist/shared/types/abTests/gutter.d.ts.map +1 -0
- package/dist/shared/types/abTests/header.d.ts.map +1 -0
- package/dist/shared/types/abTests/index.d.ts.map +1 -0
- package/dist/shared/types/abTests/inline1.d.ts.map +1 -0
- package/dist/shared/types/abTests/shared.d.ts.map +1 -0
- package/dist/shared/types/index.d.ts.map +1 -0
- package/dist/shared/types/prices.d.ts.map +1 -0
- package/dist/{src/shared → shared}/types/props/banner.d.ts +19 -0
- package/dist/shared/types/props/banner.d.ts.map +1 -0
- package/dist/shared/types/props/choiceCards.d.ts.map +1 -0
- package/dist/{src/shared → shared}/types/props/design.d.ts +6 -0
- package/dist/shared/types/props/design.d.ts.map +1 -0
- package/dist/shared/types/props/epic.d.ts.map +1 -0
- package/dist/shared/types/props/gutter.d.ts.map +1 -0
- package/dist/shared/types/props/header.d.ts.map +1 -0
- package/dist/shared/types/props/index.d.ts.map +1 -0
- package/dist/shared/types/props/inline1.d.ts.map +1 -0
- package/dist/shared/types/props/shared.d.ts.map +1 -0
- package/dist/shared/types/purchaseInfo.d.ts.map +1 -0
- package/dist/shared/types/reminders.d.ts.map +1 -0
- package/dist/{src/shared → shared}/types/targeting/banner.d.ts +1 -0
- package/dist/shared/types/targeting/banner.d.ts.map +1 -0
- package/dist/shared/types/targeting/epic.d.ts.map +1 -0
- package/dist/shared/types/targeting/gutter.d.ts.map +1 -0
- package/dist/shared/types/targeting/header.d.ts.map +1 -0
- package/dist/shared/types/targeting/index.d.ts.map +1 -0
- package/dist/{src/shared → shared}/types/targeting/inline1.d.ts +1 -0
- package/dist/shared/types/targeting/inline1.d.ts.map +1 -0
- package/dist/shared/types/targeting/shared.d.ts.map +1 -0
- package/package.json +2 -2
- package/dist/src/dotcom/index.d.ts.map +0 -1
- package/dist/src/dotcom/requests.d.ts.map +0 -1
- package/dist/src/dotcom/types.d.ts.map +0 -1
- package/dist/src/shared/lib/geolocation.d.ts.map +0 -1
- package/dist/src/shared/lib/history.d.ts.map +0 -1
- package/dist/src/shared/lib/index.d.ts.map +0 -1
- package/dist/src/shared/lib/placeholders.d.ts.map +0 -1
- package/dist/src/shared/lib/reminderFields.d.ts.map +0 -1
- package/dist/src/shared/lib/viewLog.d.ts.map +0 -1
- package/dist/src/shared/types/abTests/banner.d.ts.map +0 -1
- package/dist/src/shared/types/abTests/epic.d.ts.map +0 -1
- package/dist/src/shared/types/abTests/gutter.d.ts.map +0 -1
- package/dist/src/shared/types/abTests/header.d.ts.map +0 -1
- package/dist/src/shared/types/abTests/index.d.ts.map +0 -1
- package/dist/src/shared/types/abTests/inline1.d.ts.map +0 -1
- package/dist/src/shared/types/abTests/shared.d.ts.map +0 -1
- package/dist/src/shared/types/index.d.ts.map +0 -1
- package/dist/src/shared/types/prices.d.ts.map +0 -1
- package/dist/src/shared/types/props/banner.d.ts.map +0 -1
- package/dist/src/shared/types/props/choiceCards.d.ts.map +0 -1
- package/dist/src/shared/types/props/design.d.ts.map +0 -1
- package/dist/src/shared/types/props/epic.d.ts.map +0 -1
- package/dist/src/shared/types/props/gutter.d.ts.map +0 -1
- package/dist/src/shared/types/props/header.d.ts.map +0 -1
- package/dist/src/shared/types/props/index.d.ts.map +0 -1
- package/dist/src/shared/types/props/inline1.d.ts.map +0 -1
- package/dist/src/shared/types/props/shared.d.ts.map +0 -1
- package/dist/src/shared/types/purchaseInfo.d.ts.map +0 -1
- package/dist/src/shared/types/reminders.d.ts.map +0 -1
- package/dist/src/shared/types/targeting/banner.d.ts.map +0 -1
- package/dist/src/shared/types/targeting/epic.d.ts.map +0 -1
- package/dist/src/shared/types/targeting/gutter.d.ts.map +0 -1
- package/dist/src/shared/types/targeting/header.d.ts.map +0 -1
- package/dist/src/shared/types/targeting/index.d.ts.map +0 -1
- package/dist/src/shared/types/targeting/inline1.d.ts.map +0 -1
- package/dist/src/shared/types/targeting/shared.d.ts.map +0 -1
- /package/dist/{src/dotcom → dotcom}/index.d.ts +0 -0
- /package/dist/{src/dotcom → dotcom}/requests.d.ts +0 -0
- /package/dist/{src/dotcom → dotcom}/types.d.ts +0 -0
- /package/dist/{src/shared → shared}/lib/geolocation.d.ts +0 -0
- /package/dist/{src/shared → shared}/lib/history.d.ts +0 -0
- /package/dist/{src/shared → shared}/lib/index.d.ts +0 -0
- /package/dist/{src/shared → shared}/lib/placeholders.d.ts +0 -0
- /package/dist/{src/shared → shared}/lib/reminderFields.d.ts +0 -0
- /package/dist/{src/shared → shared}/lib/viewLog.d.ts +0 -0
- /package/dist/{src/shared → shared}/types/abTests/banner.d.ts +0 -0
- /package/dist/{src/shared → shared}/types/abTests/epic.d.ts +0 -0
- /package/dist/{src/shared → shared}/types/abTests/gutter.d.ts +0 -0
- /package/dist/{src/shared → shared}/types/abTests/header.d.ts +0 -0
- /package/dist/{src/shared → shared}/types/abTests/index.d.ts +0 -0
- /package/dist/{src/shared → shared}/types/abTests/inline1.d.ts +0 -0
- /package/dist/{src/shared → shared}/types/abTests/shared.d.ts +0 -0
- /package/dist/{src/shared → shared}/types/index.d.ts +0 -0
- /package/dist/{src/shared → shared}/types/prices.d.ts +0 -0
- /package/dist/{src/shared → shared}/types/props/choiceCards.d.ts +0 -0
- /package/dist/{src/shared → shared}/types/props/epic.d.ts +0 -0
- /package/dist/{src/shared → shared}/types/props/gutter.d.ts +0 -0
- /package/dist/{src/shared → shared}/types/props/header.d.ts +0 -0
- /package/dist/{src/shared → shared}/types/props/index.d.ts +0 -0
- /package/dist/{src/shared → shared}/types/props/inline1.d.ts +0 -0
- /package/dist/{src/shared → shared}/types/props/shared.d.ts +0 -0
- /package/dist/{src/shared → shared}/types/purchaseInfo.d.ts +0 -0
- /package/dist/{src/shared → shared}/types/reminders.d.ts +0 -0
- /package/dist/{src/shared → shared}/types/targeting/epic.d.ts +0 -0
- /package/dist/{src/shared → shared}/types/targeting/gutter.d.ts +0 -0
- /package/dist/{src/shared → shared}/types/targeting/header.d.ts +0 -0
- /package/dist/{src/shared → shared}/types/targeting/index.d.ts +0 -0
- /package/dist/{src/shared → shared}/types/targeting/shared.d.ts +0 -0
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e="gu.history.weeklyArticleCount",t="gu.history.articleCountsThisWeek",n=e=>{const t=e.getDay()||7;return Date.UTC(e.getFullYear(),e.getMonth(),e.getDate()-(t-1))/864e5},r=new Set(["environment/climate-change","environment/climate-crisis","environment/environment","science/science","politics/politics","us-news/us-politics","australia-news/australian-politics","world/world","world/europe-news","world/russia","books/books","culture/culture","world/coronavirus-outbreak","world/race","inequality/inequality","technology/technology","business/business","tone/recipes","sport/sport","football/football","sport/olympic-games","sport/olympic-games-2024","tracking/commissioningdesk/uk-investigations"]),i=(e,t={})=>(e.forEach(e=>{r.has(e)&&(t[e]=(t[e]??0)+1)}),t);function o(e){const t=Object.values(e).filter(e=>"number"==typeof e);return Object.entries(e).filter(([e,n])=>-1===t.indexOf(+e)).map(([e,t])=>t)}function s(e,t="|"){return e.map(e=>C(e)).join(t)}function a(e,t){return"bigint"==typeof t?t.toString():t}class u{constructor(e){this._getter=e,this._value=void 0}get value(){const e=this._getter;return void 0!==e&&(this._value=e(),this._getter=void 0),this._value}}function c(e){return new u(e)}function l(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function d(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function p(e){const t=Object.getOwnPropertyDescriptor(e,"shape");return t?.get?t.get.raw:t?.value}function f(e){return p(e._zod.def)??e._zod.def.shape}function h(e,t,n){Object.defineProperty(e,t,{get(){const e=n();return d(this,t,e),e},enumerable:!0,configurable:!0})}function m(e,t,n){t in e?d(e,t,n):e[t]=n}function g(e,t,n,r){const i=f(t);for(const o of n){const n=Object.getOwnPropertyDescriptor(i,o);n.enumerable&&(n.get?h(e,o,()=>{const e=t._zod.def.shape[o];return r?r(e,o):e}):m(e,o,r?r(n.value,o):n.value))}}function y(...e){const t={};for(const n of e){const e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function v(e){return JSON.stringify(e)}const b="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function _(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}const w=c(()=>{if(se.jitless)return!1;if("undefined"!=typeof navigator&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch(e){return!1}});function S(e){if(!1===_(e))return!1;const t=e.constructor;if(void 0===t)return!0;if("function"!=typeof t)return!0;const n=t.prototype;return!1!==_(n)&&!1!==Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")}function z(e){return S(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}const k=new Set(["string","number","symbol"]);function O(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function $(e,t,n){const r=new e._zod.constr(t??e._zod.def);return t&&!n?.parent||(r._zod.parent=e),r}function I(e){const t=e;if(!t)return{};if("string"==typeof t)return{error:()=>t};if(void 0!==t?.message){if(void 0!==t?.error)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,"string"==typeof t.error?{...t,error:()=>t.error}:t}function C(e){return"bigint"==typeof e?e.toString()+"n":"string"==typeof e?`"${e}"`:`${e}`}const T=(()=>({safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]}))(),E={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function A(e,t){const n=f(e),r=[];for(const e of Reflect.ownKeys(t)){if(!Object.getOwnPropertyDescriptor(n,e)?.enumerable)throw new Error(`Unrecognized key: "${String(e)}"`);t[e]&&r.push(e)}return r}function x(e,t){const n={};return g(n,e,Reflect.ownKeys(f(e))),function(e,t){for(const n of Reflect.ownKeys(t)){const r=Object.getOwnPropertyDescriptor(t,n);r.enumerable&&(r.get?h(e,n,()=>t[n]):m(e,n,r.value))}}(n,t),n}function N(e,t,n,r="partial"){const i=t._zod.def.checks;if(i&&i.length>0)throw new Error(`.${r}() cannot be used on object schemas containing refinements`);const o=n?new Set(A(t,n)):void 0,s={};return g(s,t,Reflect.ownKeys(f(t)),e&&((t,n)=>o&&!o.has(n)?t:new e({type:"optional",innerType:t}))),$(t,y(t._zod.def,{shape:s,checks:[]}))}function P(e,t=0){if(!0===e.aborted)return!0;for(let n=t;n<e.issues.length;n++)if(!0!==e.issues[n]?.continue)return!0;return!1}function Z(e,t=0){if(!0===e.aborted)return!0;for(let n=t;n<e.issues.length;n++)if(!1===e.issues[n]?.continue)return!0;return!1}function M(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function R(e){return"string"==typeof e?e:e?.message}function j(e,t,n){var r;for(let i=t;i<e.length;i++)(r=e[i]).schema??(r.schema=n)}function U(e,t,n){var r;const i=e.inst?._zod?.traits;i?.has("$ZodType")&&(i.has("$ZodCheck")?(r=e).schema??(r.schema=e.inst):e.schema=e.inst);const o=e.schema!==e.inst?e.schema?._zod.def?.error:void 0,s=e.message?e.message:R(e.inst?._zod.def?.error?.(e))??R(o?.(e))??R(t?.error?.(e))??R(n.customError?.(e))??R(n.localeError?.(e))??"Invalid input",a={};for(const t of Object.keys(e))"inst"!==t&&"schema"!==t&&"continue"!==t&&"input"!==t&&"__proto__"!==t&&(a[t]=e[t]);return a.path??(a.path=[]),a.message=s,t?.reportInput&&(a.input=e.input),a}const D=/[\uD800-\uDBFF]/;function F(e){const t=e.length;if(!D.test(e))return t;let n=t;for(let r=0;r<t-1;r++)55296==(64512&e.charCodeAt(r))&&56320==(64512&e.charCodeAt(r+1))&&(n--,r++);return n}function L(e){return Array.isArray(e)?"array":"string"==typeof e?"string":"unknown"}function G(...e){const[t,n,r]=e;return"string"==typeof t?{message:t,code:"custom",input:n,inst:r}:{...t}}function B(e,t,n,r=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:r,value:n}),n}function J(e,t,n){return B(e,t,n,!1)}function K(e,t){for(const n in e){const r=e[n];Object.defineProperty(t,n,{configurable:!0,enumerable:!0,get(){return B(this,n,r(this))},set(e){B(this,n,e)}})}return t}function V(e,t,n){Object.defineProperty(e,t,{configurable:!0,get(){return null==this?n:B(this,t,n.bind(this))},set(e){B(this,t,e)}})}let W,Y=!1;const H={configurable:!0,get(){Y=!0}};function Q(e,t,n){const r=Object.getPrototypeOf(e._zod);t in r&&W!==e._zod?W=void 0:(W=e._zod,Object.defineProperty(r,t,{configurable:!0,get(){Object.defineProperty(this,t,H);const e=Y;Y=!1;try{const r=n(this);return Y?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:r}),Y=Y||e,r}catch(n){throw delete this[t],Y=Y||e,n}},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}}))}function q(e,t,n,r){const i=function(e,t){const n=Object.getPrototypeOf(e);return t in n?void 0:n}(e,t);i&&Object.defineProperty(i,t,{configurable:!0,get(){const 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})}})}function X(e){const t=()=>e;return t["~constantCatch"]=!0,t}var ee;const te={value:void 0,enumerable:!1};let ne="captureStackTrace"in Error?Error:null;function re(e,t,n,r){function i(e){this.def=e,this.constr=l,this.traits=new Set}i.prototype={};const o=n,s=o&&new WeakSet;function a(n,r){if(n._zod){if(n._zod.traits.has(e))return}else{te.value=new i(r);try{Object.defineProperty(n,"_zod",te)}finally{te.value=void 0}}if(n._zod.traits.add(e),t(n,r),s){const e=Object.getPrototypeOf(n),t=n._zod.constr.prototype;let r=e;for(;r&&r!==t;)r=Object.getPrototypeOf(r);const i=r??e;s.has(i)||(s.add(i),function(e,t){for(const n in t){const r=Object.getOwnPropertyDescriptor(t,n);r.get?Object.defineProperty(e,n,{...r,enumerable:!1}):V(e,n,r.value)}}(i,o))}const a=l.prototype;for(const e in a)Object.prototype.hasOwnProperty.call(a,e)&&(e in n||(n[e]=a[e].bind(n)))}const u=r?.Parent??Object;class c extends u{}function l(e){const t=r?.Parent?function(e){const t=ne;if(t){const n=t.stackTraceLimit;if("number"==typeof n){try{t.stackTraceLimit=0}catch{return ne=null,new e}try{return new e}finally{t.stackTraceLimit=n}}}return new e}(c):this;a(t,e);const n=t._zod.deferred;if(n){for(const e of n)e();t._zod.deferred=void 0}const i=globalThis.__zod_globalConfig?.postProcessor;return i&&i(t),t}return Object.defineProperty(c,"name",{value:e}),Object.defineProperty(l,"init",{value:a}),Object.defineProperty(l,Symbol.hasInstance,{value:t=>!!(r?.Parent&&t instanceof r.Parent)||t?._zod?.traits?.has(e)}),Object.defineProperty(l,"name",{value:e}),l}class ie extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class oe extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}}(ee=globalThis).__zod_globalConfig??(ee.__zod_globalConfig={});const se=globalThis.__zod_globalConfig;function ae(e){return e&&Object.assign(se,e),se}const ue={get:function(){const e=this._zod;return e.message??(e.message=JSON.stringify(e.def,a,2)),e.message},set:function(e){this._zod.message=e},enumerable:!0,configurable:!0},ce={value:void 0,enumerable:!1},le=new WeakSet([Object.prototype,Error.prototype]),de=re("$ZodError",(e,t)=>{e.name="$ZodError",ce.value=t,Object.defineProperty(e,"issues",ce),ce.value=void 0,Object.defineProperty(e,"message",ue);const n=Object.getPrototypeOf(e);le.has(n)||(le.add(n),Object.defineProperty(n,"toString",{configurable:!0,enumerable:!1,get(){const 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})}}))});function pe(e,t,n){return Object.prototype.hasOwnProperty.call(e,t)||("__proto__"===t?Object.defineProperty(e,t,{value:n(),writable:!0,enumerable:!0,configurable:!0}):e[t]=n()),e[t]}function fe(e,t){return{callee:t?.callee??e,Err:t?.Err}}const he=e=>{const t=(n,r,i,o)=>{const s=i?{...i,async:!1}:{async:!1},a=n._zod.run({value:r,issues:[]},s);if(a instanceof Promise)throw new ie;if(a.issues.length){const n=new(o?.Err??e)(a.issues.map(e=>U(e,s,ae())));throw b(n,o?.callee??t),n}return a.value};return t},me=e=>{const t=async(n,r,i,o)=>{const s=i?{...i,async:!0}:{async:!0};let a=n._zod.run({value:r,issues:[]},s);if(a instanceof Promise&&(a=await a),a.issues.length){const n=new(o?.Err??e)(a.issues.map(e=>U(e,s,ae())));throw b(n,o?.callee??t),n}return a.value};return t},ge=e=>(t,n,r)=>{const i=r?{...r,async:!1}:{async:!1},o=t._zod.run({value:n,issues:[]},i);if(o instanceof Promise)throw new ie;return o.issues.length?ye(e,o.issues,i):{success:!0,data:o.value}};function ye(e,t,n){let r;return{success:!1,get error(){return r||(r=new e(t.map(e=>U(e,n,ae()))),t=void 0,n=void 0),r},set error(e){r=e,t=void 0,n=void 0}}}const ve=e=>async(t,n,r)=>{const i=r?{...r,async:!0}:{async:!0};let o=t._zod.run({value:n,issues:[]},i);return o instanceof Promise&&(o=await o),o.issues.length?ye(e,o.issues,i):{success:!0,data:o.value}},be=Symbol.for("zod.compile.invalid"),_e=Symbol.for("zod.compile.fallback"),we=(e,t,n)=>{const r=e._zod.bag.validator;if(void 0!==r){if(r(t)!==be)return!0;if(!0===r.definite&&void 0===n)return!1}return function(e,t,n){const r=n?{...n,async:!1,abortEarly:!0}:{async:!1,abortEarly:!0},i=e._zod.bag.fallbackRun;let o;i?(r[_e]=!0,o=i({value:t,issues:[]},r)):o=e._zod.run({value:t,issues:[]},r);if(o instanceof Promise)throw new ie;return 0===o.issues.length}(e,t,n)};const Se=e=>{const t=he(e),n=(e,r,i,o)=>{const s=i?{...i,direction:"backward"}:{direction:"backward"};return t(e,r,s,fe(n,o))};return n},ze=e=>{const t=he(e),n=(e,r,i,o)=>t(e,r,i,fe(n,o));return n},ke=e=>{const t=me(e),n=async(e,r,i,o)=>{const s=i?{...i,direction:"backward"}:{direction:"backward"};return await t(e,r,s,fe(n,o))};return n},Oe=e=>{const t=me(e),n=async(e,r,i,o)=>await t(e,r,i,fe(n,o));return n},$e=e=>(t,n,r)=>{const i=r?{...r,direction:"backward"}:{direction:"backward"};return ge(e)(t,n,i)},Ie=e=>(t,n,r)=>ge(e)(t,n,r),Ce=e=>async(t,n,r)=>{const i=r?{...r,direction:"backward"}:{direction:"backward"};return ve(e)(t,n,i)},Te=e=>async(t,n,r)=>ve(e)(t,n,r),Ee=/^[cC][0-9a-z]{6,}$/,Ae=/^[0-9a-z]+$/,xe=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,Ne=/^[0-9a-vA-V]{20}$/,Pe=/^[A-Za-z0-9]{27}$/,Ze=/^[a-zA-Z0-9_-]{21}$/;const Me=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Re=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,je=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Ue=/^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/;const De=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Fe=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,Le=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,Ge=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Be=/^https?$/,Je=/^\+[1-9]\d{6,14}$/,Ke="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))";function Ve(e){return new RegExp(`^${e}$`)}const We=Ve(Ke);function Ye(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return"number"==typeof e.precision?-1===e.precision?`${t}`:0===e.precision?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:e.seconds?`${t}:[0-5]\\d(?:\\.\\d+)?`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}const He=/^[\s\S]{0,}$/,Qe=/^-?\d+(?:\.\d+)?$/,qe=/^(?:true|false)$/i,Xe=/^[^A-Z]*$/,et=/^[^a-z]*$/,tt=re("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),nt=e=>{const t=e.value;return!(n=t,null==n||void 0===t.length);var n},rt={number:"number",bigint:"bigint",object:"date"},it=re("$ZodCheckLessThan",(e,t)=>{tt.init(e,t);const n=rt[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:rt[typeof r.value]??n,code:"too_big",maximum:"object"==typeof t.value?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),ot=re("$ZodCheckGreaterThan",(e,t)=>{tt.init(e,t);const n=rt[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:rt[typeof r.value]??n,code:"too_small",minimum:"object"==typeof t.value?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),st=re("$ZodCheckMultipleOf",(e,t)=>{tt.init(e,t),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");("bigint"==typeof n.value?t.value!==BigInt(0)&&n.value%t.value===BigInt(0):0===function(e,t){const n=e/t,r=Math.round(n),i=4*Number.EPSILON*Math.max(Math.abs(n),1);return Math.abs(n-r)<i?0:n-r}(n.value,t.value))||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),at=re("$ZodCheckNumberFormat",(e,t)=>{tt.init(e,t),t.format=t.format||"float64";const n=t.format?.includes("int"),r=n?"int":"number",[i,o]=T[t.format];e._zod.check=s=>{const a=s.value;if(n){if(!Number.isInteger(a))return void s.issues.push({expected:r,format:t.format,code:"invalid_type",continue:!1,input:a,inst:e});if(!Number.isSafeInteger(a))return void(a>0?s.issues.push({input:a,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort}):s.issues.push({input:a,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort}))}a<i&&s.issues.push({origin:"number",input:a,code:"too_small",minimum:i,inclusive:!0,inst:e,continue:!t.abort}),a>o&&s.issues.push({origin:"number",input:a,code:"too_big",maximum:o,inclusive:!0,inst:e,continue:!t.abort})}}),ut=re("$ZodCheckMaxLength",(e,t)=>{var n;tt.init(e,t),(n=e._zod.def).when??(n.when=nt),e._zod.check=n=>{const r=n.value,i=r.length;if(("string"==typeof r&&i>t.maximum?F(r):i)<=t.maximum)return;const o=L(r);n.issues.push({origin:o,code:"too_big",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),ct=re("$ZodCheckMinLength",(e,t)=>{var n;tt.init(e,t),(n=e._zod.def).when??(n.when=nt),e._zod.check=n=>{const r=n.value,i=r.length;if(("string"==typeof r&&i>=t.minimum&&i<2*t.minimum?F(r):i)>=t.minimum)return;const o=L(r);n.issues.push({origin:o,code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),lt=re("$ZodCheckLengthEquals",(e,t)=>{var n;tt.init(e,t),(n=e._zod.def).when??(n.when=nt),e._zod.check=n=>{const r=n.value,i=r.length,o="string"==typeof r&&i>=t.length&&i<=2*t.length?F(r):i;if(o===t.length)return;const s=L(r),a=o>t.length;n.issues.push({origin:s,...a?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),dt=re("$ZodCheckStringFormat",(e,t)=>{var n,r;tt.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=()=>{})}),pt=re("$ZodCheckRegex",(e,t)=>{dt.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,t.pattern.test(n.value)||n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),ft=re("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=Xe),dt.init(e,t)}),ht=re("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=et),dt.init(e,t)}),mt=re("$ZodCheckIncludes",(e,t)=>{tt.init(e,t);const n=O(t.includes),r=new RegExp("number"==typeof t.position?`^.{${t.position},}${n}`:n);t.pattern=r,e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),gt=re("$ZodCheckStartsWith",(e,t)=>{tt.init(e,t);const n=new RegExp(`^${O(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),yt=re("$ZodCheckEndsWith",(e,t)=>{tt.init(e,t);const n=new RegExp(`.*${O(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),vt=re("$ZodCheckOverwrite",(e,t)=>{tt.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}});class bt{constructor(e=[],t={}){this.content=[],this.indent=0,this.args=e,this.closed=t}indented(e){this.indent+=1;try{e(this)}finally{this.indent-=1}}write(e){if("function"==typeof e)return e(this,{execution:"sync"}),void e(this,{execution:"async"});const t=e.split("\n").filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),r=t.map(e=>e.slice(n)).map(e=>" ".repeat(2*this.indent)+e);for(const e of r)this.content.push(e)}compile(){const e=Function,t=this?.content??[""];return new e(...Object.keys(this.closed),`return function (${this.args.join(", ")}) {\n${t.join("\n")}\n};`)(...Object.values(this.closed))}}const _t={major:4,minor:6,patch:5},wt=re("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=_t;const r=e._zod.def.checks,i=e._zod.traits.has("$ZodCheck")?[e,...r??[]]:r?.length?[...r]:[];for(const t of i)for(const n of t._zod.onattach)n(e);if(0===i.length)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const t=(t,n,r)=>{if(t.memo)return t;let i,o=P(t);for(const s of n){if(s._zod.def.when){if(Z(t))continue;if(!s._zod.def.when(t))continue}else if(o)continue;const n=t.issues.length,a=s._zod.check(t);if(a instanceof Promise&&!1===r?.async)throw new ie;if(i||a instanceof Promise)i=(i??Promise.resolve()).then(async()=>{await a;t.issues.length!==n&&(j(t.issues,n,e),o||(o=P(t,n)))});else{if(t.issues.length===n)continue;j(t.issues,n,e),o||(o=P(t,n))}}return i?i.then(()=>t):t},n=(n,r,o)=>{if(P(n))return n.aborted=!0,n;const s=t(r,i,o);if(s instanceof Promise){if(!1===o.async)throw new ie;return s.then(t=>e._zod.parse(t,o))}return e._zod.parse(s,o)};e._zod.run=(r,o)=>{if(o.skipChecks)return e._zod.parse(r,o);if("backward"===o.direction){const t=e._zod.parse({value:r.value,issues:[]},{...o,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,r,o)):n(t,r,o)}const s=e._zod.parse(r,o);if(s instanceof Promise){if(!1===o.async)throw new ie;return s.then(e=>t(e,i,o))}return t(s,i,o)}}},{get"~standard"(){return J(this,"~standard",zt(this))},set"~standard"(e){B(this,"~standard",e)}}),St=(e,t)=>e.issues.length?{issues:e.issues.map(e=>U(e,t,ae()))}:{value:e.value};function zt(e){return{validate:t=>{const n={async:!1};try{const r=e._zod.run({value:t,issues:[]},n);if(!(r instanceof Promise))return St(r,n)}catch(e){}return async function(e,t){const n={async:!0};return St(await e._zod.run({value:t,issues:[]},n),n)}(e,t)},vendor:"zod",version:1}}const kt=re("$ZodString",(e,t)=>{wt.init(e,t),e._zod.pattern=t.pattern??He,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch(r){}return"string"==typeof n.value||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),Ot=re("$ZodStringFormat",(e,t)=>{dt.init(e,t),kt.init(e,t)}),$t=re("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Re),Ot.init(e,t)}),It=re("$ZodUUID",(e,t)=>{if(t.version){const e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(void 0===e)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=je(e))}else t.pattern??(t.pattern=je());Ot.init(e,t)}),Ct=re("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=Ue),Ot.init(e,t)});function Tt(e){try{return"undefined"!=typeof URL&&"function"==typeof URL.canParse?URL.canParse(e):(new URL(e),!0)}catch{return!1}}function Et(e,t){return"normalize"in t||"hostname"in t||"protocol"in t?function(e,t){if(!t.normalize&&t.protocol?.source===Be.source&&!/^https?:\/\//i.test(e))return 1;try{if("undefined"!=typeof URL){const t=URL;if("function"==typeof t.parse)return t.parse(e)??2}return new URL(e)}catch{return 2}}(e,t):Tt(e)||2}const At=/[\t\n\r]/g;function xt(e){return e.replace(At,"")}const Nt=re("$ZodURL",(e,t)=>{Ot.init(e,t),e._zod.check=n=>{try{const r=n.value.trim(),i=Et(r,t);return 1===i?void n.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:n.value,inst:e,continue:!t.abort}):2===i?void n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort}):!0===i?void(n.value=xt(r)):(t.hostname&&!function(e,t){return t.lastIndex=0,t.test(e.hostname)}(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&&!function(e,t){return t.lastIndex=0,t.test(e.protocol.endsWith(":")?e.protocol.slice(0,-1):e.protocol)}(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}),void(n.value=t.normalize?i.href:xt(r)))}catch(r){n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),Pt=re("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=new RegExp("^(?=[\\s\\S]*[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\u20E3])[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$","u")),Ot.init(e,t)}),Zt=re("$ZodNanoID",(e,t)=>{if(void 0!==t.length&&(!Number.isInteger(t.length)||t.length<1))throw new Error(`Invalid nanoid length: ${t.length}`);var n;t.pattern??(t.pattern=void 0===t.length?Ze:(n=t.length,new RegExp(`^[a-zA-Z0-9_-]{${n}}$`))),Ot.init(e,t)}),Mt=re("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=Ee),Ot.init(e,t)}),Rt=re("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=Ae),Ot.init(e,t)}),jt=re("$ZodULID",(e,t)=>{t.pattern??(t.pattern=xe),Ot.init(e,t)}),Ut=re("$ZodXID",(e,t)=>{t.pattern??(t.pattern=Ne),Ot.init(e,t)}),Dt=re("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Pe),Ot.init(e,t)}),Ft=re("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=function(e){const t=["Z"];e.offset&&t.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const n=`${Ye({precision:e.precision,seconds:!0})}(?:${t.join("|")})`,r=e.local?`${n}|${Ye({precision:e.precision})}`:n;return new RegExp(`^${Ke}T(?:${r})$`)}(t)),Ot.init(e,t)}),Lt=re("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=We),Ot.init(e,t)}),Gt=re("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=new RegExp(`^${Ye(t)}$`)),Ot.init(e,t)}),Bt=re("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Me),Ot.init(e,t)}),Jt=re("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=De),Ot.init(e,t)}),Kt=/^[0-9a-fA-F:.]+$/;function Vt(e){return!!Kt.test(e)&&Tt(`http://[${e}]`)}const Wt=re("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=Fe),Ot.init(e,t),e._zod.check=n=>{Vt(n.value)||n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}),Yt=re("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=Le),Ot.init(e,t)});const Ht=re("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=Ge),Ot.init(e,t),e._zod.check=n=>{(function(e){const t=e.split("/");if(2!==t.length)return!1;const[n,r]=t;if(!r)return!1;const i=Number(r);return`${i}`===r&&!(i<0||i>128)&&Vt(n)})(n.value)||n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}});function Qt(e){if(""===e)return!0;if(/\s/.test(e))return!1;if(e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}const qt=/^[0-9a-zA-Z+/]*={0,2}$/,Xt=re("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=qt),Ot.init(e,t),e._zod.check=n=>{Qt(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}}),en=/^[A-Za-z0-9_-]*$/;const tn=re("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=en),Ot.init(e,t),e._zod.check=n=>{(function(e){if(!en.test(e))return!1;const t=e.replace(/[-_]/g,e=>"-"===e?"+":"/");return Qt(t.padEnd(4*Math.ceil(t.length/4),"="))})(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),nn=re("$ZodE164",(e,t)=>{t.pattern??(t.pattern=Je),Ot.init(e,t)});const rn=re("$ZodJWT",(e,t)=>{Ot.init(e,t),e._zod.check=n=>{(function(e,t=null){try{const n=e.split(".");if(3!==n.length)return!1;const[r]=n;if(!r)return!1;const i=JSON.parse(atob(r));return!("typ"in i&&"JWT"!==i?.typ||!i.alg||t&&(!("alg"in i)||i.alg!==t))}catch{return!1}})(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),on=re("$ZodNumber",(e,t)=>{wt.init(e,t),e._zod.pattern=Qe,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch(e){}const i=n.value;if("number"==typeof i&&!Number.isNaN(i)&&Number.isFinite(i))return n;const o="number"==typeof i?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,...o?{received:o}:{}}),n}}),sn=re("$ZodNumberFormat",(e,t)=>{at.init(e,t),on.init(e,t)}),an=re("$ZodBoolean",(e,t)=>{wt.init(e,t),e._zod.pattern=qe,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Boolean(n.value)}catch(e){}const i=n.value;return"boolean"==typeof i||n.issues.push({expected:"boolean",code:"invalid_type",input:i,inst:e}),n}}),un=re("$ZodAny",(e,t)=>{wt.init(e,t),e._zod.parse=e=>e}),cn=re("$ZodUnknown",(e,t)=>{wt.init(e,t),e._zod.parse=e=>e}),ln=re("$ZodNever",(e,t)=>{wt.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:"never",code:"invalid_type",input:t.value,inst:e}),t)});function dn(e,t,n){e.issues.length&&t.issues.push(...M(n,e.issues)),t.value[n]=e.value}const pn=re("$ZodArray",(e,t)=>{wt.init(e,t);const n=se.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{const o=r.value;if(!Array.isArray(o))return r.issues.push({expected:"array",code:"invalid_type",input:o,inst:e}),r;r.value=n?n.alloc(e,r,Array(o.length),i):Array(o.length);const s=[],a=i?.abortEarly;for(let e=0;e<o.length;e++){const n=o[e],u=t.element._zod.run({value:n,issues:[]},i);if(u instanceof Promise)s.push(u.then(t=>dn(t,r,e)));else if(dn(u,r,e),a&&0!==u.issues.length&&P(u))break}return s.length?Promise.all(s).then(()=>r):r}});function fn(e,t,n,r,i,o){const s=n in r,a="optional"===o;if(s||!a||"optional"!==i){if(e.issues.length){if(void 0!==i&&a&&!s)return;t.issues.push(...M(n,e.issues))}s||void 0!==i?void 0===e.value?(s||"defaulted"===i&&!a)&&(t.value[n]=void 0):t.value[n]=e.value:e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[n]})}}const hn=[];function mn(e){const t=Object.keys(e.shape),n=Object.getOwnPropertySymbols(e.shape),r=n.length?n:hn,i=r.length?[...t,...r]:t;for(const t of i)if(!e.shape?.[t]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${String(t)}": expected a Zod schema`);const o=(s=e.shape,Object.keys(s).filter(e=>void 0!==s[e]._zod.optin&&"optional"===s[e]._zod.optout));var s;return{...e,allKeys:i,symbolKeys:r,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(o)}}function gn(e,t,n,r,i,o,s){const a=[],u=i.keySet,c=i.catchall._zod,l=c.def.type,d=c.optin,p=c.optout;let f=0;for(const i in t){if(s&&n.issues.length!==f){if(P(n,f))break;f=n.issues.length}if(u.has(i))continue;if("__proto__"===i){"never"===l&&a.push(i);continue}if("never"===l){a.push(i);continue}const o=c.run({value:t[i],issues:[]},r);o instanceof Promise?e.push(o.then(e=>fn(e,n,i,t,d,p))):fn(o,n,i,t,d,p)}return a.length&&n.issues.push({code:"unrecognized_keys",keys:a,input:t,inst:o,continue:!0}),e.length?Promise.all(e).then(()=>n):n}const yn=re("$ZodObject",(e,t)=>{wt.init(e,t);const n=Object.getOwnPropertyDescriptor(t,"shape"),r=n?.get?n.get.raw:t.shape??{};if(r){const e=()=>{const n={...r};return Object.defineProperty(t,"shape",{value:n}),e.raw=n,n};e.raw=r,Object.defineProperty(t,"shape",{get:e})}const i=c(()=>mn(t));Q(e,"propValues",e=>{const t=e.def.shape,n={};for(const e in t){const r=t[e]._zod;if(r.values){Object.prototype.hasOwnProperty.call(n,e)||d(n,e,new Set);for(const t of r.values)n[e].add(t);void 0!==r.optin&&n[e].add(void 0)}}return n});const o=_,s=t.catchall;let a;const u=se.memoizer;u?.attach(e),e._zod.parse=(t,n)=>{a??(a=i.value);const r=t.value;if(!o(r))return t.issues.push({expected:"object",code:"invalid_type",input:r,inst:e}),t;t.value=u?u.alloc(e,t,{},n):{};const c=[],l=a.shape,d=n?.abortEarly;let p=t.issues.length;for(const e of a.allKeys){if(d&&t.issues.length!==p){if(P(t,p))break;p=t.issues.length}if("__proto__"===e)continue;const i=l[e],o=i._zod.optin,s=i._zod.optout,a=i._zod.run({value:r[e],issues:[]},n);a instanceof Promise?c.push(a.then(n=>fn(n,t,e,r,o,s))):fn(a,t,e,r,o,s)}return s?gn(c,r,t,n,i.value,e,!0===d):c.length?Promise.all(c).then(()=>t):t}}),vn=re("$ZodObjectJIT",(e,t)=>{yn.init(e,t);const n=e._zod.parse,r=c(()=>mn(t)),i=se.memoizer;let o;const s=_,a=!se.jitless,u=a&&w.value,l=t.catchall;let d;e._zod.parse=(c,p)=>{d??(d=r.value);const f=c.value;return s(f)?a&&u&&!1===p?.async&&!0!==p.jitless?(o||(o=(t=>{const n=r.value,o=n.symbolKeys,s=new bt(["payload","ctx"],{shape:t,inst:e,memo:i,syms:o}),a=e=>`shape[${e}]._zod.run({ value: input[${e}], issues: [] }, ctx)`,u=(e,t)=>`\n let ${e}_ab = false;\n for (let i = 0; i < ${e}.issues.length; i++) {\n const iss = ${e}.issues[i];\n iss.path = iss.path ? [${t}, ...iss.path] : [${t}];\n payload.issues.push(iss);\n if (iss.continue !== true) ${e}_ab = true;\n }\n if (${e}_ab && ctx && ctx.abortEarly) {\n payload.value = newResult;\n return payload;\n }`;s.write("const input = payload.value;");const c=Object.create(null);let l=0;for(const e of n.allKeys)c[e]="key_"+l++;s.write(i?"const newResult = memo.alloc(inst, payload, {}, ctx);":"const newResult = {};");for(const e of n.allKeys){if("__proto__"===e)continue;const n=c[e],r="symbol"==typeof e?`syms[${o.indexOf(e)}]`:v(e),i=`${r} in input`,l=t[e],d=l?._zod?.optin,p=void 0!==d,f="optional"===l?._zod?.optout;if(s.write(`const ${n} = ${a(r)};`),p&&f){const e="optional"===d?`${n}_present`:`${n}.value !== undefined || ${n}_present`;s.write(`\n const ${n}_present = ${i};\n if (!${n}.issues.length || ${n}_present) {\n if (${n}.issues.length) {${u(n,r)}\n }\n\n if (${e}) {\n newResult[${r}] = ${n}.value;\n }\n }\n\n `)}else p?(s.write(`\n if (${n}.issues.length) {${u(n,r)}\n }\n `),"defaulted"===d?s.write(`newResult[${r}] = ${n}.value;`):s.write(`\n if (${n}.value !== undefined || ${i}) {\n newResult[${r}] = ${n}.value;\n }\n `)):s.write(`\n const ${n}_present = ${i};\n if (${n}.issues.length) {${u(n,r)}\n }\n if (!${n}_present && !${n}.issues.length) {\n payload.issues.push({\n code: "invalid_type",\n expected: "nonoptional",\n input: undefined,\n path: [${r}]\n });\n if (ctx && ctx.abortEarly) {\n payload.value = newResult;\n return payload;\n }\n }\n\n if (${n}_present) {\n newResult[${r}] = ${n}.value;\n }\n\n `)}return s.write("payload.value = newResult;"),s.write("return payload;"),s.compile()})(t.shape)),c=o(c,p),l?gn([],f,c,p,d,e,!0===p?.abortEarly):c):n(c,p):(c.issues.push({expected:"object",code:"invalid_type",input:f,inst:e}),c)}});function bn(e,t,n,r){for(const n of e)if(0===n.issues.length)return t.value=n.value,t;const i=e.filter(e=>!P(e));return 1===i.length?(t.value=i[0].value,i[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>U(e,r,ae())))}),t)}const _n=re("$ZodUnion",(e,t)=>{wt.init(e,t),Q(e,"optin",e=>e.def.options.some(e=>"defaulted"===e._zod.optin)?"defaulted":e.def.options.some(e=>void 0!==e._zod.optin)?"optional":void 0),Q(e,"optout",e=>e.def.options.some(e=>"optional"===e._zod.optout)?"optional":void 0),Q(e,"values",e=>{if(e.def.options.every(e=>e._zod.values))return new Set(e.def.options.flatMap(e=>Array.from(e._zod.values)))}),Q(e,"pattern",e=>{if(e.def.options.every(e=>e._zod.pattern)){const t=e.def.options.map(e=>e._zod.pattern);return new RegExp(`^(${t.map(e=>l(e.source)).join("|")})$`)}});const n=1===t.options.length?t.options[0]._zod.run:null;e._zod.parse=(r,i)=>{if(n)return n(r,i);let o=!1;const s=[];for(const e of t.options){const t=e._zod.run({value:r.value,issues:[]},i);if(t instanceof Promise)s.push(t),o=!0;else{if(0===t.issues.length)return t;s.push(t)}}return o?Promise.all(s).then(t=>bn(t,r,e,i)):bn(s,r,e,i)}});const wn=re("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,_n.init(e,t);const n=e._zod.parse;Q(e,"propValues",e=>{const t={};let n=0;for(const r of e.def.options){const i=r._zod.propValues;if(!i||0===Object.keys(i).length)throw new Error(`Invalid discriminated union option at index "${e.def.options.indexOf(r)}"`);i[e.def.discriminator]?.has(void 0)&&n++;for(const[e,n]of Object.entries(i)){Object.prototype.hasOwnProperty.call(t,e)||d(t,e,new Set);for(const r of n)t[e].add(r)}}return!e.def.unionFallback&&n>1&&t[e.def.discriminator]?.delete(void 0),t}),t.options.forEach((e,n)=>{const r=p(e._zod.def);if(r&&!Object.prototype.hasOwnProperty.call(r,t.discriminator))throw new Error(`Invalid discriminated union option at index "${n}"`)});const r=c(()=>function(e){const t=new Map;for(const n of e.options){const r=n._zod.propValues?.[e.discriminator];if(!r||0===r.size)throw new Error(`Invalid discriminated union option at index "${e.options.indexOf(n)}"`);for(const e of r)if(t.has(e)){if(void 0!==e)throw new Error(`Duplicate discriminator value "${String(e)}"`);t.set(e,null)}else t.set(e,n)}return t}(t));e._zod.parse=(i,o)=>{const s=i.value;if(!_(s))return i.issues.push({code:"invalid_type",expected:"object",input:s,inst:e}),i;const a=s?.[t.discriminator],u=r.value.get(a);return!u||void 0===a&&"backward"===o.direction?t.unionFallback||"backward"===o.direction?n(i,o):(i.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,options:Array.from(r.value.keys()).filter(e=>null!==r.value.get(e)),input:s,path:[t.discriminator],inst:e}),i):u._zod.run(i,o)}}),Sn=re("$ZodIntersection",(e,t)=>{wt.init(e,t),e._zod.parse=(e,n)=>{const r=e.value,i=t.left._zod.run({value:r,issues:[]},n),o=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||o instanceof Promise?Promise.all([i,o]).then(([t,n])=>kn(e,t,n)):kn(e,i,o)}});function zn(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e===+t)return{valid:!0,data:e};if(S(e)&&S(t)){const n=Object.keys(t),r=Object.keys(e).filter(e=>-1!==n.indexOf(e)),i={...e,...t};Object.prototype.hasOwnProperty.call(i,"__proto__")&&delete i.__proto__;for(const n of r){if("__proto__"===n)continue;const r=zn(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let r=0;r<e.length;r++){const i=zn(e[r],t[r]);if(!i.valid)return{valid:!1,mergeErrorPath:[r,...i.mergeErrorPath]};n.push(i.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function kn(e,t,n){const r=new Map;let i;const o=new Map,s=(e,t)=>{let n;if("unrecognized_keys"!==e.code||e.path?.length){if("invalid_key"!==e.code||"record"!==e.origin||1!==e.path?.length)return!1;{const t=String(e.path[0]);o.has(t)||o.set(t,e),n=[t]}}else i??(i=e),n=e.keys;for(const e of n)r.has(e)||r.set(e,{}),r.get(e)[t]=!0;return!0};for(const n of t.issues)s(n,"l")||e.issues.push(n);for(const t of n.issues)s(t,"r")||e.issues.push(t);const a=[...r].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(a.length){const t=i?a.filter(e=>i.keys.includes(e)):[];t.length&&e.issues.push({...i,keys:t});for(const n of a)!t.includes(n)&&o.has(n)&&e.issues.push(o.get(n))}const u=zn(t.value,n.value);if(!u.valid){if(P(e))return e;throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(u.mergeErrorPath)}`)}return e.value=u.data,e}const On=re("$ZodEnum",(e,t)=>{wt.init(e,t);const n=o(t.entries),r=new Set(n);e._zod.values=r,Q(e,"pattern",e=>{const t=o(e.def.entries).filter(e=>k.has(typeof e));return new RegExp(t.length?`^(${t.map(e=>O(e.toString())).join("|")})$`:"^[^\\s\\S]$")}),e._zod.parse=(t,i)=>{const o=t.value;return r.has(o)||t.issues.push({code:"invalid_value",values:n,input:o,inst:e}),t}}),$n=re("$ZodLiteral",(e,t)=>{wt.init(e,t);const n=new Set(t.values);e._zod.values=n,Q(e,"pattern",e=>{const t=e.def.values;return new RegExp(t.length?`^(${t.map(e=>"string"==typeof e?O(e):e?O(e.toString()):String(e)).join("|")})$`:"^[^\\s\\S]$")}),e._zod.parse=(r,i)=>{const o=r.value;return n.has(o)||r.issues.push({code:"invalid_value",values:t.values,input:o,inst:e}),r}}),In=re("$ZodTransform",(e,t)=>{wt.init(e,t),e._zod.optin="optional",se.memoizer?.guard(e),e._zod.parse=(n,r)=>{if("backward"===r.direction)throw new oe(e.constructor.name);const i=t.transform(n.value,n);if(r.async){return(i instanceof Promise?i:Promise.resolve(i)).then(e=>(n.value=e,n))}if(i instanceof Promise)throw new ie;return n.value=i,n}});function Cn(e,t){return e.value=t.issues.length?void 0:t.value,e}const Tn=re("$ZodOptional",(e,t)=>{wt.init(e,t),Q(e,"optin",e=>"defaulted"===e.def.innerType._zod.optin?"defaulted":"optional"),e._zod.optout="optional",Q(e,"values",e=>{const t=e.def.innerType._zod.values;return t?new Set([...t,void 0]):void 0}),Q(e,"pattern",e=>{const t=e.def.innerType._zod.pattern;return t?new RegExp(`^(${l(t.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(void 0===e.value){if("defaulted"!==t.innerType._zod.optin)return e;const r=t.innerType._zod.run({value:e.value,issues:[]},n);return r instanceof Promise?r.then(t=>Cn(e,t)):Cn(e,r)}return t.innerType._zod.run(e,n)}}),En=re("$ZodExactOptional",(e,t)=>{Tn.init(e,t),Q(e,"values",e=>e.def.innerType._zod.values),Q(e,"pattern",e=>e.def.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),An=re("$ZodNullable",(e,t)=>{wt.init(e,t),Q(e,"optin",e=>e.def.innerType._zod.optin),Q(e,"optout",e=>e.def.innerType._zod.optout),Q(e,"pattern",e=>{const t=e.def.innerType._zod.pattern;return t?new RegExp(`^(${l(t.source)}|null)$`):void 0}),Q(e,"values",e=>e.def.innerType._zod.values?new Set([...e.def.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>null===e.value?e:t.innerType._zod.run(e,n)}),xn=re("$ZodDefault",(e,t)=>{wt.init(e,t),e._zod.optin="defaulted",Q(e,"values",e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>{if("backward"===n.direction)return t.innerType._zod.run(e,n);if(void 0===e.value)return e.value=t.defaultValue,e;const r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>Nn(e,t)):Nn(r,t)}});function Nn(e,t){return void 0===e.value&&(e.value=t.defaultValue),e}const Pn=re("$ZodPrefault",(e,t)=>{wt.init(e,t),e._zod.optin="defaulted",Q(e,"values",e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>("backward"===n.direction||void 0===e.value&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),Zn=re("$ZodNonOptional",(e,t)=>{wt.init(e,t),Q(e,"values",e=>{const t=e.def.innerType._zod.values;return t?new Set([...t].filter(e=>void 0!==e)):void 0}),e._zod.parse=(n,r)=>{const i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>Mn(t,e)):Mn(i,e)}});function Mn(e,t){return e.issues.length||void 0!==e.value||e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}function Rn(e,t,n,r){return t.issues.length?(e.value=n.catchValue({...t,value:e.value,error:{issues:t.issues.map(e=>U(e,r,ae()))},input:e.value}),e):(e.value=t.value,t.memo&&(e.memo=!0),e)}const jn=re("$ZodCatch",(e,t)=>{wt.init(e,t),Q(e,"optin",e=>"defaulted"===e.def.innerType._zod.optin?"defaulted":"optional"),Q(e,"optout",e=>e.def.innerType._zod.optout),Q(e,"values",e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>{if("backward"===n.direction)return t.innerType._zod.run(e,n);const r=t.innerType._zod.run({value:e.value,issues:[]},n);return r instanceof Promise?r.then(r=>Rn(e,r,t,n)):Rn(e,r,t,n)}}),Un=re("$ZodPipe",(e,t)=>{wt.init(e,t),Q(e,"values",e=>e.def.in._zod.values),Q(e,"optin",e=>e.def.in._zod.optin),Q(e,"optout",e=>e.def.out._zod.optout),Q(e,"propValues",e=>e.def.in._zod.propValues),e._zod.parse=(e,n)=>{if("backward"===n.direction){const r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>Dn(e,t.in,n)):Dn(r,t.in,n)}const r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>Dn(e,t.out,n)):Dn(r,t.out,n)}});function Dn(e,t,n){return e.issues.some(e=>"unrecognized_keys"!==e.code)?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const Fn=re("$ZodReadonly",(e,t)=>{wt.init(e,t),Q(e,"propValues",e=>e.def.innerType._zod.propValues),Q(e,"values",e=>e.def.innerType._zod.values),Q(e,"optin",e=>e.def.innerType?._zod?.optin),Q(e,"optout",e=>e.def.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if("backward"===n.direction)return t.innerType._zod.run(e,n);const r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(Ln):Ln(r)}});function Ln(e){return e.memo||(e.value=Object.freeze(e.value)),e}const Gn=re("$ZodCustom",(e,t)=>{tt.init(e,t),wt.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{const r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>Bn(t,n,r,e));Bn(i,n,r,e)}});function Bn(e,t,n,r){if(!e){const e={code:"custom",input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(G(e))}}class Jn extends Error{constructor(){super("Cannot parse a reference cycle that closes through a transform"),this.name="ZodCyclicError"}}const Kn="~memo",Vn=[];function Wn(e){return null!==e&&"object"==typeof e}function Yn(e){return e.map(e=>e.path?{...e,path:e.path.slice()}:{...e})}const Hn=new WeakMap;function Qn(e,t,n){const r=Hn.get(e);if(void 0!==r)return r?2:0;if(t.has(e))return 2;t.add(e);let i=0;const o=e=>{if(2!==i&&e?._zod){const n=Qn(e,t);n>i&&(i=n)}},s=e=>{e>i&&(i=e)},a=e._zod.def;switch(a.type){case"object":{const e=p(a);s(e?(e=>{let n=0;for(const r of Reflect.ownKeys(e)){const i=Object.getOwnPropertyDescriptor(e,r);if(!i.enumerable)continue;const o=i.get?1:i.value?._zod?Qn(i.value,t):0;o>n&&(n=o)}return n})(e):1),o(a.catchall);break}case"array":o(a.element);break;case"tuple":for(const e of a.items)o(e);o(a.rest);break;case"record":case"map":o(a.keyType),o(a.valueType);break;case"set":o(a.valueType);break;case"union":for(const e of a.options)o(e);break;case"intersection":o(a.left),o(a.right);break;case"optional":case"nullable":case"default":case"prefault":case"catch":case"readonly":case"nonoptional":case"promise":case"success":o(a.innerType);break;case"pipe":o(a.in),o(a.out);break;case"function":o(a.input),o(a.output);break;case"lazy":{const e=a._cachedInner??void 0;s(e?Qn(e,t):1);break}case"template_literal":case"string":case"number":case"int":case"boolean":case"bigint":case"symbol":case"undefined":case"null":case"void":case"never":case"any":case"unknown":case"date":case"nan":case"enum":case"literal":case"file":case"transform":case"custom":break;default:for(const e in a){const t=Object.getOwnPropertyDescriptor(a,e);if(!t||t.get)continue;const n=t.value;if(n&&"object"==typeof n)if(n._zod)o(n);else if(Array.isArray(n))for(const e of n)o(e)}}return t.delete(e),function(e,t){1!==t&&Hn.set(e,2===t);return t}(e,i)}let qn;const Xn=[],er={alloc(e,t,n){const r=qn;if(!r)return n;qn=void 0;const i={value:n,issues:null};return r.set(t.value,i),Xn.push(i),n},guard(e){var t;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{const t=e._zod.parse,n=(e,n)=>{if("backward"!==n.direction&&function(e,t){const n=e[Kn]?.backEdges;return void 0!==n&&Wn(t)&&n.has(t)}(n,e.value))throw new Jn;return t(e,n)};e._zod.parse=n,e._zod.run===t&&(e._zod.run=n)})},attach(e){var t;let n,r,i,o=!1;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{const t=e._zod.parse,s=(a,u)=>{if(void 0===n){const r=Qn(e,new Set);if(0===r)return e._zod.parse=t,e._zod.run===s&&(e._zod.run=t),t(a,u);2===r||o?n=!0:o=!0}const c=a.value;if(!Wn(c))return t(a,u);let l,d=u[Kn];d||(d={buckets:new WeakMap,backEdges:void 0},u[Kn]=d),r===u?l=i:(l=function(e,t){let n=e.buckets.get(t);return n||(n=new WeakMap,e.buckets.set(t,n)),n}(d,e),r=u,i=l);const p=l.get(c);if(p)return a.value=p.value,p.issues?p.issues.length&&a.issues.push(...Yn(p.issues)):(a.memo=!0,d.backEdges??(d.backEdges=new WeakSet),d.backEdges.add(p.value)),a;qn=l;const f=Xn.length,h=t(a,u);qn=void 0;const m=Xn.length>f?Xn.pop():void 0;return h instanceof Promise?h.then(e=>(m&&(m.issues=e.issues.length?Yn(e.issues):Vn),e)):(m&&(m.issues=h.issues.length?Yn(h.issues):Vn),h)};e._zod.parse=s,e._zod.run===t&&(e._zod.run=s)})}};const tr=()=>{const e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}};function t(t){return e[t]??null}const n={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",currency_code:"currency code",credit_card:"credit card number",iban:"IBAN",jwt:"JWT",template_literal:"input"},r={nan:"NaN"};function i(e,t){return"number"!==e||"number"!=typeof t||Number.isFinite(t)?r[e]??e:String(t)}return e=>{switch(e.code){case"invalid_type":return`Invalid input: expected ${i(e.expected)}, received ${i(function(e){const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"nan":"number";case"object":{if(null===e)return"null";if(Array.isArray(e))return"array";const t=e;if(t&&Object.getPrototypeOf(t)!==Object.prototype&&"constructor"in t&&t.constructor)return t.constructor.name}}return t}(e.input),e.input)}`;case"invalid_value":return 1===e.values.length?`Invalid input: expected ${C(e.values[0])}`:`Invalid option: expected one of ${s(e.values,"|")}`;case"too_big":{const n=e.exact?"exactly ":e.inclusive?"<=":"<",r=t(e.origin);return r?`Too big: expected ${e.origin??"value"} to have ${n}${e.maximum.toString()} ${r.unit??"elements"}`:`Too big: expected ${e.origin??"value"} to be ${n}${e.maximum.toString()}`}case"too_small":{const n=e.exact?"exactly ":e.inclusive?">=":">",r=t(e.origin);return r?`Too small: expected ${e.origin} to have ${n}${e.minimum.toString()} ${r.unit}`:`Too small: expected ${e.origin} to be ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Invalid string: must start with "${t.prefix}"`:"ends_with"===t.format?`Invalid string: must end with "${t.suffix}"`:"includes"===t.format?`Invalid string: must include "${t.includes}"`:"regex"===t.format?`Invalid string: must match pattern ${t.pattern}`:`Invalid ${n[t.format]??e.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${e.divisor}`;case"unrecognized_keys":return`Unrecognized key${e.keys.length>1?"s":""}: ${s(e.keys,", ")}`;case"invalid_key":return`Invalid key in ${e.origin}`;case"invalid_union":if(e.options&&Array.isArray(e.options)&&e.options.length>0){return`Invalid discriminator value. Expected ${e.options.map(e=>`'${e}'`).join(" | ")}`}return!1===e.inclusive?"Invalid input: more than one option matched":"Invalid input";case"invalid_element":return`Invalid value in ${e.origin}`;default:return"Invalid input"}}};var nr;class rr{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){const n=t[0];return this._map.set(e,n),n&&"object"==typeof n&&"id"in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){const t=this._map.get(e);return t&&"object"==typeof t&&"id"in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){const t=e._zod.parent;if(t){const n={...this.get(t)??{}};delete n.id;const r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}}(nr=globalThis).__zod_globalRegistry??(nr.__zod_globalRegistry=new rr);const ir=globalThis.__zod_globalRegistry;function or(e){return e.checks&&(e.checks=[...e.checks]),e}function sr(e,t){return new it({check:"less_than",...I(t),value:e,inclusive:!1})}function ar(e,t){return new it({check:"less_than",...I(t),value:e,inclusive:!0})}function ur(e,t){return new ot({check:"greater_than",...I(t),value:e,inclusive:!1})}function cr(e,t){return new ot({check:"greater_than",...I(t),value:e,inclusive:!0})}function lr(e,t){return new st({check:"multiple_of",...I(t),value:e})}function dr(e,t){return new ut({check:"max_length",...I(t),maximum:e})}function pr(e,t){return new ct({check:"min_length",...I(t),minimum:e})}function fr(e,t){return new lt({check:"length_equals",...I(t),length:e})}function hr(e){return new vt({check:"overwrite",tx:e})}function mr(e,t){const n=function(e,t){const n=new tt({check:"custom",...I(t)});return n._zod.check=e,n}(t=>(t.addIssue=e=>{if("string"==typeof e)t.issues.push(G(e,t.value,n._zod.def));else{const r=e;r.fatal&&(r.continue=!1),r.code??(r.code="custom"),"input"in r||(r.input=t.value),r.inst??(r.inst=n),r.continue??(r.continue=!n._zod.def.abort),t.issues.push(G(r))}},e(t.value,t)),t);return n}function gr(e,...t){for(const n of t)for(const t of Reflect.ownKeys(n))Object.prototype.propertyIsEnumerable.call(n,t)&&d(e,t,n[t]);return e}function yr(e){let t=e?.target??"draft-2020-12";return"draft-4"===t&&(t="draft-04"),"draft-7"===t&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??ir,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,sharedDefsExtractedFor:void 0,sharedEmitDoneFor:void 0,cycles:e?.cycles??"ref",reused:e?.reused??"inline",intersections:[],deferred:[],external:e?.external??void 0}}function vr(e,t,n,r,i){const o="function"==typeof t.unrepresentable?t.unrepresentable({zodSchema:e,path:r.path,message:i}):t.unrepresentable;if("any"===o)return!1;if(void 0===o||"throw"===o)throw new Error(i);return Object.assign(n,o),!0}function br(e,t,n={path:[],schemaPath:[]}){var r;const i=e._zod.def,o=t.seen.get(e);if(o){o.count++;return n.schemaPath.includes(e)&&(o.cycle=n.path),o.schema}const s={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,s),t.sharedDefsExtractedFor=void 0,t.sharedEmitDoneFor=void 0;const a=e._zod.toJSONSchema?.();if(a)s.schema=a;else{const r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,s.schema,r);else{const n=s.schema,o=t.processors[i.type];if(!o)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);o(e,t,n,r)}const o=e._zod.parent;o&&(s.ref||(s.ref=o),br(o,t,r),t.seen.get(o).isParent=!0)}const u=t.metadataRegistry.get(e);u&&gr(s.schema,u),"input"===t.io&&Tr(e)&&(delete s.schema.examples,delete s.schema.default),"input"===t.io&&"_prefault"in s.schema&&((r=s.schema).default??(r.default=s.schema._prefault)),delete s.schema._prefault;return t.seen.get(e).schema}function _r(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function wr(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");if(e.external&&e.sharedDefsExtractedFor===e.external)return;const r=new Map;for(const t of e.seen.entries()){const n=e.metadataRegistry.get(t[0])?.id;if(n){const e=r.get(n);if(e&&e!==t[0])throw new Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}const i=t=>{if(t[1].schema.$ref)return;const r=t[1],{ref:i,defId:o}=(t=>{const r="draft-2020-12"===e.target?"$defs":"definitions";if(e.external){const n=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(n)return{ref:i(n)};const o=t[1].defId??t[1].schema.id??"schema"+e.counter++;return t[1].defId=o,{defId:o,ref:`${i("__shared")}#/${r}/${_r(o)}`}}const i=`#/${r}/`;if(t[1]===n&&!t[1].schema.id)return{ref:"#"};const o=t[1].schema.id??"__schema"+e.counter++;return{defId:o,ref:i+_r(o)}})(t);r.def={...r.schema},o&&(r.defId=o);const s=r.schema;for(const e in s)delete s[e];s.$ref=i};if("throw"===e.cycles)for(const t of e.seen.entries()){const e=t[1];if(e.cycle)throw new Error(`Cycle detected: #/${e.cycle?.join("/")}/<root>\n\nSet the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const n of e.seen.entries()){const r=n[1];if(t===n[0]){i(n);continue}if(e.external){const r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){i(n);continue}}const o=e.metadataRegistry.get(n[0])?.id;o?i(n):(r.cycle||r.count>1&&"ref"===e.reused)&&i(n)}e.external&&(e.sharedDefsExtractedFor=e.external)}function Sr(e){const t=e.anyOf;if(!Array.isArray(t)||0===t.length||void 0!==e.type)return;const n=[];for(const e of t){if(!e||"object"!=typeof e)return;Sr(e);const t=Object.keys(e);if(1!==t.length||"type"!==t[0])return;const r=e.type;for(const e of Array.isArray(r)?r:[r]){if("string"!=typeof e)return;n.includes(e)||n.push(e)}}delete e.anyOf,e.type=1===n.length?n[0]:n}const zr=new Set(["type","properties","required","additionalProperties"]),kr=["oneOf","anyOf"];function Or(e){const t=e.additionalProperties;return void 0===t||!1===t||"object"!=typeof t||null===t?null:Object.keys(t).length?t:null}function $r(e){const t=[];for(const n of e){if("object"!=typeof n||"object"!==n.type)return null;for(const e in n)if(!zr.has(e))return null;t.push(n)}const n={},r=new Set;for(const e of t){for(const r in e.properties){if(Object.prototype.hasOwnProperty.call(n,r))continue;const e=[];for(const n of t){const t=n.properties?.[r]??Or(n);null!=t&&(e.some(e=>JSON.stringify(e)===JSON.stringify(t))||e.push(t))}d(n,r,1===e.length?e[0]:$r(e)??{allOf:e})}for(const t of e.required??[])r.add(t)}const i={type:"object",properties:n};if(r.size&&(i.required=[...r]),t.every(e=>!1===e.additionalProperties))i.additionalProperties=!1;else{const e=[];for(const n of t){const t=Or(n);t&&!e.some(e=>JSON.stringify(e)===JSON.stringify(t))&&e.push(t)}1===e.length?i.additionalProperties=e[0]:e.length>1&&(i.additionalProperties={allOf:e})}return i}function Ir(e){const t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(const t of zr)if(t in e)return;const n=t.filter(e=>kr.some(t=>Array.isArray(e[t])));let r=null;if(n.length){const e=n[0],i=kr.find(t=>Array.isArray(e[t]));if(1!==Object.keys(e).length)return;const o=t.filter(t=>t!==e),s=e[i].map(e=>$r([...o,e]));if(s.some(e=>!e))return;r={[i]:s}}else r=$r(t);r&&(delete e.allOf,gr(e,r))}function Cr(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=t=>{const n=e.seen.get(t);if(null===n.ref)return;const i=n.def??n.schema,o={...i},s=n.ref;if(n.ref=null,s){r(s);const n=e.seen.get(s),a=n.schema;!a.$ref||"draft-07"!==e.target&&"draft-04"!==e.target&&"openapi-3.0"!==e.target?gr(i,a):(i.allOf=i.allOf??[],i.allOf.push(a)),gr(i,o);if(t._zod.parent===s)for(const e in i)"$ref"!==e&&"allOf"!==e&&(e in o||delete i[e]);if(a.$ref&&n.def)for(const e in i)"$ref"!==e&&"allOf"!==e&&e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}const a=t._zod.parent;if(a&&a!==s){r(a);const t=e.seen.get(a);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(const e in i)"$ref"!==e&&"allOf"!==e&&e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(const t of[...e.seen.entries()].reverse())r(t[0]);if("openapi-3.0"!==e.target)for(const t of e.seen.entries())Sr(t[1].def??t[1].schema);for(const t of e.deferred)t();if(e.intersections.length){const t=new Map;for(const n of e.seen.values())for(const e of[n.schema,n.def]){const n=e?.allOf;if(!Array.isArray(n))continue;const r=t.get(n);r?r.push(e):t.set(n,[e])}for(const n of e.intersections)for(const e of t.get(n)??[])Ir(e)}}const i={};if("draft-2020-12"===e.target?i.$schema="https://json-schema.org/draft/2020-12/schema":"draft-07"===e.target?i.$schema="http://json-schema.org/draft-07/schema#":"draft-04"===e.target?i.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const n=e.external.registry.get(t)?.id;if(!n)throw new Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}gr(i,n.defId?n.schema:n.def??n.schema);const o=e.metadataRegistry.get(t)?.id;void 0!==o&&i.id===o&&delete i.id;const s=e.external?.defs??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(const t of e.seen.entries()){const e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,d(s,e.defId,e.def))}e.external&&(e.sharedEmitDoneFor=e.external),e.external||Object.keys(s).length>0&&("draft-2020-12"===e.target?i.$defs=s:i.definitions=s);try{const n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,"~standard",{value:{...t["~standard"],jsonSchema:{input:Er(t,"input",e.processors),output:Er(t,"output",e.processors)}},enumerable:!1,writable:!1}),n}catch(e){throw new Error("Error converting schema to JSON.")}}function Tr(e,t){const n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);const r=e._zod.def;if("transform"===r.type)return!0;if("array"===r.type)return Tr(r.element,n);if("set"===r.type)return Tr(r.valueType,n);if("lazy"===r.type)return Tr(r.getter(),n);if("promise"===r.type||"optional"===r.type||"nonoptional"===r.type||"nullable"===r.type||"readonly"===r.type||"default"===r.type||"prefault"===r.type||"catch"===r.type)return Tr(r.innerType,n);if("intersection"===r.type)return Tr(r.left,n)||Tr(r.right,n);if("record"===r.type||"map"===r.type)return Tr(r.keyType,n)||Tr(r.valueType,n);if("pipe"===r.type)return!!e._zod.traits.has("$ZodCodec")||(Tr(r.in,n)||Tr(r.out,n));if("object"===r.type){for(const e in r.shape)if(Tr(r.shape[e],n))return!0;return!1}if("union"===r.type){for(const e of r.options)if(Tr(e,n))return!0;return!1}if("tuple"===r.type){for(const e of r.items)if(Tr(e,n))return!0;return!(!r.rest||!Tr(r.rest,n))}return!1}const Er=(e,t,n={})=>r=>{const{libraryOptions:i,target:o}=r??{},s=yr({...i??{},target:o,io:t,processors:n});return br(e,s),wr(s,e),Cr(s,e)},Ar=(e,t,n)=>{(void 0===e[t]||n>e[t])&&(e[t]=n)},xr=(e,t,n)=>{(void 0===e[t]||n<e[t])&&(e[t]=n)},Nr=(e,t)=>{Ar(e,"minimum",t),xr(e,"maximum",t)},Pr=(e,t)=>{e.multipleOf??(e.multipleOf=[]),e.multipleOf.includes(t)||e.multipleOf.push(t)},Zr=(e,t)=>{e.patterns??(e.patterns=new Set),e.patterns.add(t)},Mr=(e,t)=>{e.mime=e.mime?e.mime.filter(e=>t.includes(e)):[...t]},Rr=(e,t)=>{e.format=t,t.includes("int")&&(e.isInt=!0)},jr=(e,t)=>Ar(e,"minimum",t.minimum),Ur=(e,t)=>xr(e,"maximum",t.maximum),Dr=e=>(t,n)=>{Rr(t,n.format);const[r,i]=e[n.format];Ar(t,"minimum",r),xr(t,"maximum",i)},Fr={greater_than:(e,t)=>Ar(e,t.inclusive?"minimum":"exclusiveMinimum",t.value),less_than:(e,t)=>xr(e,t.inclusive?"maximum":"exclusiveMaximum",t.value),multiple_of:(e,t)=>Pr(e,t.value),number_format:Dr(T),bigint_format:Dr(E),min_length:jr,max_length:Ur,length_equals:(e,t)=>Nr(e,t.length),min_size:jr,max_size:Ur,size_equals:(e,t)=>Nr(e,t.size),string_format:(e,t)=>{Rr(e,t.format),t.pattern&&Zr(e,t.pattern),"base64"!==t.format&&"base64url"!==t.format||(e.contentEncoding=t.format),(t.local||-1===t.precision)&&(e.laxFormat=!0)},mime_type:(e,t)=>Mr(e,t.mime)};function Lr(e){const t={},n=e._zod.def,r=e._zod.traits.has("$ZodCheck")?[e,...n.checks??[]]:n.checks??[];for(const e of r)Fr[e._zod.def.check]?.(t,e._zod.def);const i=e._zod.bag;void 0!==i.minimum&&Ar(t,"minimum",i.minimum),void 0!==i.exclusiveMinimum&&Ar(t,"exclusiveMinimum",i.exclusiveMinimum),void 0!==i.maximum&&xr(t,"maximum",i.maximum),void 0!==i.exclusiveMaximum&&xr(t,"exclusiveMaximum",i.exclusiveMaximum),void 0!==i.multipleOf&&Pr(t,i.multipleOf),void 0!==i.format&&(t.format??(t.format=i.format),i.format.includes("int")&&(t.isInt=!0)),i.mime&&Mr(t,i.mime);for(const e of i.patterns??[])Zr(t,e);return t}const Gr={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Br=new Map([[qt,/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/],[en,/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/]]),Jr=e=>Br.get(e)??e;function Kr(e){const t=e._zod.def;return"pipe"===t.type&&t.in._zod.traits.has("$ZodTransform")?Kr(t.out):"catch"===t.type?Kr(t.innerType):e._zod.optin}const Vr=Symbol();function Wr(e,t,n,r,i){let o=!1;const s=JSON.stringify(e,(e,t)=>"bigint"!=typeof t?t:(o=!0,null));return o?(vr(t,n,r,i,"BigInt defaults cannot be represented in JSON Schema"),Vr):JSON.parse(s)}const Yr=(e,t,n,r)=>{const i=e._zod.def;br(i.innerType,t,r);t.seen.get(e).ref=i.innerType},Hr=new WeakSet([Object.prototype,Error.prototype]);function Qr(e,t,n){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,get(){const e=n(this);return Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0})}})}const qr=(e,t)=>{de.init(e,t),e.name="ZodError";const n=Object.getPrototypeOf(e);Hr.has(n)||(Hr.add(n),Qr(n,"format",e=>t=>function(e,t=e=>e.message){const n={_errors:[]},r=(e,i=[])=>{for(const o of e.issues)if("invalid_union"===o.code&&o.errors.length)o.errors.map(e=>r({issues:e},[...i,...o.path]));else if("invalid_key"===o.code)r({issues:o.issues},[...i,...o.path]);else if("invalid_element"===o.code)r({issues:o.issues},[...i,...o.path]);else{const e=[...i,...o.path];if(0===e.length)n._errors.push(t(o));else{let r=n,i=0;for(;i<e.length;){const n=e[i],s=i===e.length-1;if("_errors"===n){s&&r._errors.push(t(o)),i++;continue}Object.prototype.hasOwnProperty.call(r,n)||Object.defineProperty(r,n,{value:{_errors:[]},enumerable:!0,writable:!0,configurable:!0});const a=r[n];s&&a._errors.push(t(o)),r=a,i++}}}};return r(e),n}(e,t)),Qr(n,"flatten",e=>t=>function(e,t=e=>e.message){const n={},r=[];for(const i of e.issues)i.path.length>0?pe(n,i.path[0],()=>[]).push(t(i)):r.push(t(i));return{formErrors:r,fieldErrors:n}}(e,t)),Qr(n,"addIssue",e=>t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,a,2)}),Qr(n,"addIssues",e=>t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,a,2)}),Object.defineProperty(n,"isEmpty",{configurable:!0,enumerable:!1,get(){return 0===this.issues.length}}))},Xr=re("ZodError",qr,void 0,{Parent:Error}),ei=he(Xr),ti=me(Xr),ni=ge(Xr),ri=ve(Xr),ii=Se(Xr),oi=ze(Xr),si=ke(Xr),ai=Oe(Xr),ui=$e(Xr),ci=Ie(Xr),li=Ce(Xr),di=Te(Xr);function pi(){se.localeError||ae({localeError:tr()})}function fi(){se.memoizer||ae({memoizer:er})}const hi=re("ZodType",(e,t)=>(pi(),wt.init(e,t),e.def=t,e.type=t.type,e),{check(...e){const t=this.def;return this.clone(y(t,{checks:[...t.checks??[],...e.map(e=>"function"==typeof e?{_zod:{check:e,def:{check:"custom"},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return $(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(function(e,t={}){return function(e,t,n){return new e({type:"custom",check:"custom",fn:t,...I(n)})}(Io,e,t)}(e,t))},superRefine(e,t){return this.check(function(e,t){return mr(e,t)}(e,t))},overwrite(e){return this.check(hr(e))},optional(){return go(this)},exactOptional(){return new yo({type:"optional",innerType:this})},nullable(){return bo(this)},nullish(){return go(bo(this))},nonoptional(e){return function(e,t){return new So({type:"nonoptional",innerType:e,...I(t)})}(this,e)},array(){return to(this)},or(e){return oo([this,e])},and(e){return new uo({type:"intersection",left:this,right:e})},transform(e){return Oo(this,new ho({type:"transform",transform:e}))},default(e){return t=e,new _o({type:"default",innerType:this,get defaultValue(){return"function"==typeof t?t():z(t)}});var t},prefault(e){return t=e,new wo({type:"prefault",innerType:this,get defaultValue(){return"function"==typeof t?t():z(t)}});var t},catch(e){return new zo({type:"catch",innerType:this,catchValue:"function"==typeof(t=e)?t:X(t)});var t},pipe(e){return Oo(this,e)},readonly(){return new $o({type:"readonly",innerType:this})},describe(e){const t=this.clone();return ir.add(t,{description:e}),t},meta(...e){if(0===e.length)return ir.get(this);const t=this.clone();return ir.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...t){return 0===t.length?e(this):e(this,...t)},get"~standard"(){return J(this,"~standard",{...zt(this),jsonSchema:{input:Er(this,"input"),output:Er(this,"output")}})},set"~standard"(e){B(this,"~standard",e)},parse:function e(t,n){return ei(this,t,n,{callee:e})},parseAsync:async function e(t,n){return await ti(this,t,n,{callee:e})},safeParse(e,t){return ni(this,e,t)},async safeParseAsync(e,t){return ri(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){B(this,"spa",e)},validate(e,t){return we(this,e,t)},validateAsync(e,t){return(async(e,t,n)=>{const r=n?{...n,async:!0,abortEarly:!0}:{async:!0,abortEarly:!0};let i=e._zod.run({value:t,issues:[]},r);return i instanceof Promise&&(i=await i),0===i.issues.length})(this,e,t)},encode:function e(t,n){return ii(this,t,n,{callee:e})},decode:function e(t,n){return oi(this,t,n,{callee:e})},encodeAsync:async function e(t,n){return await si(this,t,n,{callee:e})},decodeAsync:async function e(t,n){return await ai(this,t,n,{callee:e})},safeEncode(e,t){return ui(this,e,t)},safeDecode(e,t){return ci(this,e,t)},async safeEncodeAsync(e,t){return li(this,e,t)},async safeDecodeAsync(e,t){return di(this,e,t)},toJSONSchema(e){return((e,t={})=>n=>{const r=yr({...n,processors:t});return br(e,r),wr(r,e),Cr(r,e)})(this,{})(e)},get description(){return ir.get(this)?.description},get _def(){return this._zod.def}}),mi=re("_ZodString",(e,t)=>{kt.init(e,t),hi.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n)=>{const r=n;r.type="string";const{minimum:i,maximum:o,format:s,patterns:a,contentEncoding:u,laxFormat:c}=Lr(e);if("number"==typeof i&&(r.minLength=i),"number"==typeof o&&(r.maxLength=o),s&&(r.format=Gr[s]??s,""===r.format&&delete r.format,("time"===s||c)&&delete r.format),u&&(r.contentEncoding=u),a&&a.size>0){const e=[...a].map(Jr);1===e.length?r.pattern=e[0].source:e.length>1&&(r.allOf=[...e.map(e=>({..."draft-07"===t.target||"draft-04"===t.target||"openapi-3.0"===t.target?{type:"string"}:{},pattern:e.source}))])}})(e,t,n)},K({format:e=>Lr(e).format??null,minLength:e=>Lr(e).minimum??null,maxLength:e=>Lr(e).maximum??null},{regex(...e){return this.check(function(e,t){return new pt({check:"string_format",format:"regex",...I(t),pattern:e})}(...e))},includes(...e){return this.check(function(e,t){return new mt({check:"string_format",format:"includes",...I(t),includes:e})}(...e))},startsWith(...e){return this.check(function(e,t){return new gt({check:"string_format",format:"starts_with",...I(t),prefix:e})}(...e))},endsWith(...e){return this.check(function(e,t){return new yt({check:"string_format",format:"ends_with",...I(t),suffix:e})}(...e))},min(...e){return this.check(pr(...e))},max(...e){return this.check(dr(...e))},length(...e){return this.check(fr(...e))},nonempty(...e){return this.check(pr(1,...e))},lowercase(e){return this.check(function(e){return new ft({check:"string_format",format:"lowercase",...I(e)})}(e))},uppercase(e){return this.check(function(e){return new ht({check:"string_format",format:"uppercase",...I(e)})}(e))},trim(){return this.check(hr(e=>e.trim()))},normalize(...e){return this.check(function(e){return hr(t=>t.normalize(e))}(...e))},toLowerCase(){return this.check(hr(e=>e.toLowerCase()))},toUpperCase(){return this.check(hr(e=>e.toUpperCase()))},slugify(){return this.check(hr(e=>function(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}(e)))}})),gi=re("ZodString",(e,t)=>{kt.init(e,t),mi.init(e,t)},{email(e){return this.check(function(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...I(t)})}(zi,e))},url(e){return this.check(function(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...I(t)})}($i,e))},jwt(e){return this.check(function(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...I(t)})}(Fi,e))},emoji(e){return this.check(function(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...I(t)})}(Ii,e))},guid(e){return this.check(function(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...I(t)})}(ki,e))},uuid(e){return this.check(function(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...I(t)})}(Oi,e))},uuidv4(e){return this.check(function(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...I(t)})}(Oi,e))},uuidv6(e){return this.check(function(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...I(t)})}(Oi,e))},uuidv7(e){return this.check(function(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...I(t)})}(Oi,e))},nanoid(e){return this.check(function(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...I(t)})}(Ci,e))},cuid(e){return this.check(function(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...I(t)})}(Ti,e))},cuid2(e){return this.check(function(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...I(t)})}(Ei,e))},ulid(e){return this.check(function(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...I(t)})}(Ai,e))},base64(e){return this.check(function(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...I(t)})}(ji,e))},base64url(e){return this.check(function(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...I(t)})}(Ui,e))},xid(e){return this.check(function(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...I(t)})}(xi,e))},ksuid(e){return this.check(function(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...I(t)})}(Ni,e))},ipv4(e){return this.check(function(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...I(t)})}(Pi,e))},ipv6(e){return this.check(function(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...I(t)})}(Zi,e))},cidrv4(e){return this.check(function(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...I(t)})}(Mi,e))},cidrv6(e){return this.check(function(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...I(t)})}(Ri,e))},e164(e){return this.check(function(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...I(t)})}(Di,e))},datetime(e){return this.check(function(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...I(t)})}(bi,e))},date(e){return this.check(function(e,t){return new e({type:"string",format:"date",check:"string_format",...I(t)})}(_i,e))},time(e){return this.check(function(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...I(t)})}(wi,e))},duration(e){return this.check(function(e,t){return new e({type:"string",format:"duration",check:"string_format",...I(t)})}(Si,e))}});function yi(e){return function(e,t){return new e(or({type:"string",...I(t)}))}(gi,e)}const vi=re("ZodStringFormat",(e,t)=>{Ot.init(e,t),mi.init(e,t)}),bi=re("ZodISODateTime",(e,t)=>{Ft.init(e,t),vi.init(e,t)}),_i=re("ZodISODate",(e,t)=>{Lt.init(e,t),vi.init(e,t)}),wi=re("ZodISOTime",(e,t)=>{Gt.init(e,t),vi.init(e,t)}),Si=re("ZodISODuration",(e,t)=>{Bt.init(e,t),vi.init(e,t)}),zi=re("ZodEmail",(e,t)=>{Ct.init(e,t),vi.init(e,t)}),ki=re("ZodGUID",(e,t)=>{$t.init(e,t),vi.init(e,t)}),Oi=re("ZodUUID",(e,t)=>{It.init(e,t),vi.init(e,t)}),$i=re("ZodURL",(e,t)=>{Nt.init(e,t),vi.init(e,t)}),Ii=re("ZodEmoji",(e,t)=>{Pt.init(e,t),vi.init(e,t)}),Ci=re("ZodNanoID",(e,t)=>{Zt.init(e,t),vi.init(e,t)}),Ti=re("ZodCUID",(e,t)=>{Mt.init(e,t),vi.init(e,t)}),Ei=re("ZodCUID2",(e,t)=>{Rt.init(e,t),vi.init(e,t)}),Ai=re("ZodULID",(e,t)=>{jt.init(e,t),vi.init(e,t)}),xi=re("ZodXID",(e,t)=>{Ut.init(e,t),vi.init(e,t)}),Ni=re("ZodKSUID",(e,t)=>{Dt.init(e,t),vi.init(e,t)}),Pi=re("ZodIPv4",(e,t)=>{Jt.init(e,t),vi.init(e,t)}),Zi=re("ZodIPv6",(e,t)=>{Wt.init(e,t),vi.init(e,t)}),Mi=re("ZodCIDRv4",(e,t)=>{Yt.init(e,t),vi.init(e,t)}),Ri=re("ZodCIDRv6",(e,t)=>{Ht.init(e,t),vi.init(e,t)}),ji=re("ZodBase64",(e,t)=>{Xt.init(e,t),vi.init(e,t)}),Ui=re("ZodBase64URL",(e,t)=>{tn.init(e,t),vi.init(e,t)}),Di=re("ZodE164",(e,t)=>{nn.init(e,t),vi.init(e,t)}),Fi=re("ZodJWT",(e,t)=>{rn.init(e,t),vi.init(e,t)}),Li=re("ZodNumber",(e,t)=>{on.init(e,t),hi.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const i=n,{minimum:o,maximum:s,multipleOf:a,exclusiveMaximum:u,exclusiveMinimum:c,isInt:l}=Lr(e);i.type=l?"integer":"number";const d="number"==typeof c&&c>=(o??Number.NEGATIVE_INFINITY),p="number"==typeof u&&u<=(s??Number.POSITIVE_INFINITY),f="draft-04"===t.target||"openapi-3.0"===t.target;if(d?f?(i.minimum=c,i.exclusiveMinimum=!0):i.exclusiveMinimum=c:"number"==typeof o&&(i.minimum=o),p?f?(i.maximum=u,i.exclusiveMaximum=!0):i.exclusiveMaximum=u:"number"==typeof s&&(i.maximum=s),a){const n=new Set;for(const o of a)Number.isFinite(o)&&0!==o?n.add(Math.abs(o)):vr(e,t,i,r,`A multipleOf divisor of ${o} cannot be represented in JSON Schema`);const[o,...s]=n;void 0!==o&&(i.multipleOf=o),s.length&&(i.allOf=[...i.allOf??[],...s.map(e=>({multipleOf:e}))])}})(e,t,n,r),e.isFinite=!0},K({minValue:e=>{const{minimum:t,exclusiveMinimum:n}=Lr(e);return Math.max(t??Number.NEGATIVE_INFINITY,n??Number.NEGATIVE_INFINITY)},maxValue:e=>{const{maximum:t,exclusiveMaximum:n}=Lr(e);return Math.min(t??Number.POSITIVE_INFINITY,n??Number.POSITIVE_INFINITY)},isInt:e=>{const{isInt:t,multipleOf:n}=Lr(e);return!!t||!!n?.some(Number.isSafeInteger)},format:e=>Lr(e).format??null},{gt(e,t){return this.check(ur(e,t))},gte(e,t){return this.check(cr(e,t))},min(e,t){return this.check(cr(e,t))},lt(e,t){return this.check(sr(e,t))},lte(e,t){return this.check(ar(e,t))},max(e,t){return this.check(ar(e,t))},int(e){return this.check(Ji(e))},safe(e){return this.check(Ji(e))},positive(e){return this.check(ur(0,e))},nonnegative(e){return this.check(cr(0,e))},negative(e){return this.check(sr(0,e))},nonpositive(e){return this.check(ar(0,e))},multipleOf(e,t){return this.check(lr(e,t))},step(e,t){return this.check(lr(e,t))},finite(){return this}}));function Gi(e){return function(e,t){return new e(or({type:"number",checks:[],...I(t)}))}(Li,e)}const Bi=re("ZodNumberFormat",(e,t)=>{sn.init(e,t),Li.init(e,t)});function Ji(e){return function(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...I(t)})}(Bi,e)}const Ki=re("ZodBoolean",(e,t)=>{an.init(e,t),hi.init(e,t),e._zod.processJSONSchema=(e,t,n)=>((e,t,n)=>{n.type="boolean"})(0,0,t)});function Vi(e){return function(e,t){return new e({type:"boolean",...I(t)})}(Ki,e)}const Wi=re("ZodAny",(e,t)=>{un.init(e,t),hi.init(e,t),e._zod.processJSONSchema=(e,t,n)=>{}});function Yi(){return new Wi({type:"any"})}const Hi=re("ZodUnknown",(e,t)=>{cn.init(e,t),hi.init(e,t),e._zod.processJSONSchema=(e,t,n)=>{}});function Qi(){return new Hi({type:"unknown"})}const qi=re("ZodNever",(e,t)=>{ln.init(e,t),hi.init(e,t),e._zod.processJSONSchema=(e,t,n)=>((e,t,n)=>{n.not={}})(0,0,t)});function Xi(e){return function(e,t){return new e({type:"never",...I(t)})}(qi,e)}const eo=re("ZodArray",(e,t)=>{fi(),pn.init(e,t),hi.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const i=n,o=e._zod.def,{minimum:s,maximum:a}=Lr(e);"number"==typeof s&&(i.minItems=s),"number"==typeof a&&(i.maxItems=a),i.type="array",i.items=br(o.element,t,{...r,path:[...r.path,"items"]})})(e,t,n,r),e.element=t.element},{min(e,t){return this.check(pr(e,t))},nonempty(e){return this.check(pr(1,e))},max(e,t){return this.check(dr(e,t))},length(e,t){return this.check(fr(e,t))},unwrap(){return this.element}});function to(e,t){return function(e,t,n){return new e({type:"array",element:t,...I(n)})}(eo,e,t)}const no=re("ZodObject",(e,t)=>{fi(),vn.init(e,t),hi.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const i=n,o=e._zod.def,s=o.shape;if(Object.getOwnPropertySymbols(s).length&&vr(e,t,i,r,"Symbol keys cannot be represented in JSON Schema"))return;i.type="object",i.properties={};for(const e in s)d(i.properties,e,br(s[e],t,{...r,path:[...r.path,"properties",e]}));const a=[];for(const e of Object.keys(s)){const n=o.shape[e];("input"===t.io?void 0===Kr(n):void 0===n._zod.optout)&&a.push(e)}a.length>0&&(i.required=a),"never"===o.catchall?._zod.def.type?i.additionalProperties=!1:o.catchall?o.catchall&&(i.additionalProperties=br(o.catchall,t,{...r,path:[...r.path,"additionalProperties"]})):"output"===t.io&&(i.additionalProperties=!1)})(e,t,n,r),q(e,"shape",e=>e._zod.def.shape,!1)},{keyof(){return lo(Object.keys(this._zod.def.shape))},catchall(e){return this.clone(y(this._zod.def,{catchall:e}))},passthrough(){return this.clone(y(this._zod.def,{catchall:Qi()}))},loose(){return this.clone(y(this._zod.def,{catchall:Qi()}))},strict(){return this.clone(y(this._zod.def,{catchall:Xi()}))},strip(){return this.clone(y(this._zod.def,{catchall:void 0}))},extend(e){return function(e,t){if(!S(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0){const n=f(e);for(const e of Reflect.ownKeys(t))if(void 0!==Object.getOwnPropertyDescriptor(n,e))throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return $(e,y(e._zod.def,{shape:x(e,t)}))}(this,e)},safeExtend(e){return function(e,t){if(!S(t))throw new Error("Invalid input to safeExtend: expected a plain object");return $(e,y(e._zod.def,{shape:x(e,t)}))}(this,e)},merge(e){return function(e,t){if(!t?._zod?.def)throw new Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(e._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");const n={};return g(n,e,Reflect.ownKeys(f(e))),g(n,t,Reflect.ownKeys(f(t))),$(e,y(e._zod.def,{shape:n,get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}(this,e)},pick(e){return function(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const i={};return g(i,e,A(e,t)),$(e,y(n,{shape:i,checks:[]}))}(this,e)},omit(e){return function(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const i=new Set(A(e,t)),o={};return g(o,e,Reflect.ownKeys(f(e)).filter(e=>!i.has(e))),$(e,y(n,{shape:o,checks:[]}))}(this,e)},partial(...e){return N(mo,this,e[0])},exactPartial(...e){return N(yo,this,e[0],"exactPartial")},required(...e){return function(e,t,n){const r=n?new Set(A(t,n)):void 0,i={};return g(i,t,Reflect.ownKeys(f(t)),(t,n)=>r&&!r.has(n)?t:new e({type:"nonoptional",innerType:t})),$(t,y(t._zod.def,{shape:i}))}(So,this,e[0])}});function ro(e,t){const n={type:"object",shape:e??{},...I(t)};return new no(n)}const io=re("ZodUnion",(e,t)=>{_n.init(e,t),hi.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const i=e._zod.def,o=!1===i.inclusive,s=i.options.map((e,n)=>br(e,t,{...r,path:[...r.path,o?"oneOf":"anyOf",n]}));o?n.oneOf=s:n.anyOf=s})(e,t,n,r),e.options=t.options});function oo(e,t){return new io({type:"union",options:e,...I(t)})}const so=re("ZodDiscriminatedUnion",(e,t)=>{io.init(e,t),wn.init(e,t)});function ao(e,t,n){return new so({type:"union",options:t,discriminator:e,...I(n)})}const uo=re("ZodIntersection",(e,t)=>{Sn.init(e,t),hi.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const i=e._zod.def,o=br(i.left,t,{...r,path:[...r.path,"allOf",0]}),s=br(i.right,t,{...r,path:[...r.path,"allOf",1]}),a=e=>"allOf"in e&&1===Object.keys(e).length,u=[...a(o)?o.allOf:[o],...a(s)?s.allOf:[s]];n.allOf=u,t.intersections.push(u)})(e,t,n,r)});const co=re("ZodEnum",(e,t)=>{On.init(e,t),hi.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n)=>{const r=o(e._zod.def.entries);0!==r.length?(r.every(e=>"number"==typeof e)&&(n.type="number"),r.every(e=>"string"==typeof e)&&(n.type="string"),n.enum=r):n.not={}})(e,0,n),e.enum=t.entries,e.options=[...e._zod.values];const n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{const i={};for(const r of e){if(!n.has(r))throw new Error(`Key ${r} not found in enum`);i[r]=t.entries[r]}return new co({...t,checks:[],...I(r),entries:i})},e.exclude=(e,r)=>{const i={...t.entries};for(const t of e){if(!n.has(t))throw new Error(`Key ${t} not found in enum`);delete i[t]}return new co({...t,checks:[],...I(r),entries:i})}});function lo(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e;return new co({type:"enum",entries:n,...I(t)})}const po=re("ZodLiteral",(e,t)=>{$n.init(e,t),hi.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const i=e._zod.def;if(0===i.values.length)return void(n.not={});const o=[];for(const s of i.values)if(void 0===s){if(vr(e,t,n,r,"Literal `undefined` cannot be represented in JSON Schema"))return}else if("bigint"==typeof s){if(vr(e,t,n,r,"BigInt literals cannot be represented in JSON Schema"))return;o.push(Number(s))}else o.push(s);if(0===o.length);else if(1===o.length){const e=o[0];n.type=null===e?"null":typeof e,"draft-04"===t.target||"openapi-3.0"===t.target?n.enum=[e]:n.const=e}else o.every(e=>"number"==typeof e)&&(n.type="number"),o.every(e=>"string"==typeof e)&&(n.type="string"),o.every(e=>"boolean"==typeof e)&&(n.type="boolean"),o.every(e=>null===e)&&(n.type="null"),n.enum=o})(e,t,n,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function fo(e,t){return new po({type:"literal",values:Array.isArray(e)?e:[e],...I(t)})}const ho=re("ZodTransform",(e,t)=>{fi(),In.init(e,t),hi.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{vr(e,t,n,r,"Transforms cannot be represented in JSON Schema")})(e,t,n,r),e._zod.parse=(n,r)=>{if("backward"===r.direction)throw new oe(e.constructor.name);n.addIssue=r=>{if("string"==typeof r)n.issues.push(G(r,n.value,t));else{const t=r;t.fatal&&(t.continue=!1),t.code??(t.code="custom"),"input"in t||(t.input=n.value),t.inst??(t.inst=e),n.issues.push(G(t))}};const i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}});const mo=re("ZodOptional",(e,t)=>{Tn.init(e,t),hi.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Yr(e,t,0,r),e.unwrap=()=>e._zod.def.innerType});function go(e){return new mo({type:"optional",innerType:e})}const yo=re("ZodExactOptional",(e,t)=>{En.init(e,t),hi.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Yr(e,t,0,r),e.unwrap=()=>e._zod.def.innerType});const vo=re("ZodNullable",(e,t)=>{An.init(e,t),hi.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const i=e._zod.def,o=br(i.innerType,t,r),s=t.seen.get(e);"openapi-3.0"===t.target?(s.ref=i.innerType,n.nullable=!0):n.anyOf=[o,{type:"null"}]})(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function bo(e){return new vo({type:"nullable",innerType:e})}const _o=re("ZodDefault",(e,t)=>{xn.init(e,t),hi.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const i=e._zod.def;br(i.innerType,t,r),t.seen.get(e).ref=i.innerType;const o=Wr(i.defaultValue,e,t,n,r);o!==Vr&&(n.default=o)})(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});const wo=re("ZodPrefault",(e,t)=>{Pn.init(e,t),hi.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const i=e._zod.def;if(br(i.innerType,t,r),t.seen.get(e).ref=i.innerType,"input"!==t.io)return;const o=Wr(i.defaultValue,e,t,n,r);o!==Vr&&(n._prefault=o)})(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});const So=re("ZodNonOptional",(e,t)=>{Zn.init(e,t),hi.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const i=e._zod.def;br(i.innerType,t,r),t.seen.get(e).ref=i.innerType})(e,t,0,r),e.unwrap=()=>e._zod.def.innerType});const zo=re("ZodCatch",(e,t)=>{jn.init(e,t),hi.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const i=e._zod.def;let o;br(i.innerType,t,r),t.seen.get(e).ref=i.innerType;try{o=i.catchValue(void 0)}catch{return void vr(e,t,n,r,"Dynamic catch values are not supported in JSON Schema")}n.default=o})(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});const ko=re("ZodPipe",(e,t)=>{Un.init(e,t),hi.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const i=e._zod.def,o=i.in._zod.traits.has("$ZodTransform"),s="input"===t.io?o?i.out:i.in:i.out;br(s,t,r),t.seen.get(e).ref=s})(e,t,0,r),e.in=t.in,e.out=t.out});function Oo(e,t){return new ko({type:"pipe",in:e,out:t})}const $o=re("ZodReadonly",(e,t)=>{Fn.init(e,t),hi.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const i=e._zod.def;br(i.innerType,t,r),t.seen.get(e).ref=i.innerType,n.readOnly=!0})(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});const Io=re("ZodCustom",(e,t)=>{Gn.init(e,t),hi.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{vr(e,t,n,r,"Custom types cannot be represented in JSON Schema")})(e,t,n,r)});const Co=["GBPCountries","UnitedStates","AUDCountries","EURCountries","International","NZDCountries","Canada"],To=lo(Co),Eo=lo(["Include","Exclude"]),Ao=ro({targetedCountryGroups:to(To),targetedCountryCodes:to(yi()).optional(),contributionsOnlyCountriesTargeting:Eo.optional()}).optional(),xo={GBPCountries:{name:"United Kingdom",currency:"GBP",countries:["GB","FK","GI","GG","IM","JE","SH"],supportRegionId:"UK"},UnitedStates:{name:"United States",currency:"USD",countries:["US"],supportRegionId:"US"},AUDCountries:{name:"Australia",currency:"AUD",countries:["AU","KI","NR","NF","TV"],supportRegionId:"AU"},EURCountries:{name:"Europe",currency:"EUR",countries:["AD","AL","AT","BA","BE","BG","BL","CH","CY","CZ","DE","DK","EE","ES","FI","FO","FR","GF","GL","GP","GR","HR","HU","IE","IT","LI","LT","LU","LV","MC","ME","MF","IS","MQ","MT","NL","NO","PF","PL","PM","PT","RE","RO","RS","SE","SI","SJ","SK","SM","TF","TR","WF","YT","VA","AX","AZ","AM","GE","BY","MD","UA","MK"],supportRegionId:"EU"},International:{name:"International",currency:"USD",countries:["AE","AF","AG","AI","AO","AQ","AR","AS","AW","BB","BD","BF","BH","BI","BJ","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BZ","CC","CD","CF","CG","CI","CL","CM","CN","CO","CR","CU","CV","CW","CX","DJ","DM","DO","DZ","EC","EG","EH","ER","ET","FJ","FM","GA","GD","GH","GM","GN","GQ","GS","GT","GU","GW","GY","HK","HM","HN","HT","ID","IL","IN","IO","IQ","IR","JM","JO","JP","KE","KG","KH","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LK","LR","LS","LY","MA","MG","MH","ML","MM","MN","MO","MP","MR","MS","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NG","NI","NP","NU","OM","PA","PE","PG","PH","PK","PN","PR","PS","PW","PY","QA","RU","RW","SA","SB","SC","SD","SG","SL","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TG","TH","TJ","TK","TL","TM","TN","TO","TT","TW","TZ","UG","UM","UY","UZ","VC","VE","VG","VI","VN","VU","WS","YE","ZA","ZM","ZW"],supportRegionId:"INT"},NZDCountries:{name:"New Zealand",currency:"NZD",countries:["NZ","CK"],supportRegionId:"NZ"},Canada:{name:"Canada",currency:"CAD",countries:["CA"],supportRegionId:"CA"}},No={AD:"Andorra",AE:"the UAE",AF:"Afghanistan",AG:"Antigua and Barbuda",AI:"Anguilla",AL:"Albania",AM:"Armenia",AO:"Angola",AR:"Argentina",AS:"the US",AT:"Austria",AU:"Australia",AW:"Aruba",AX:"Åland Islands",AZ:"Azerbaijan",BA:"Bosnia and Herzegovina",BB:"Barbados",BD:"Bangladesh",BE:"Belgium",BF:"Burkina Faso",BG:"Bulgaria",BH:"Bahrain",BI:"Burundi",BJ:"Benin",BL:"Saint Barthélemy",BM:"Bermuda",BN:"Brunei Darussalam",BO:"Bolivia",BQ:"Bonaire, Sint Eustatius and Saba",BR:"Brazil",BS:"the Bahamas",BT:"Bhutan",BV:"Bouvet Island",BW:"Botswana",BY:"Belarus",BZ:"Belize",CA:"Canada",CD:"the Democratic Republic of the Congo",CF:"the Central Africa Republic",CG:"the Congo",CH:"Switzerland",CI:"Côte d'Ivoire",CK:"the Cook Islands",CL:"Chile",CM:"Cameroon",CN:"China",CO:"Colombia",CR:"Costa Rica",CU:"Cuba",CV:"Cabo Verde",CW:"Curaçao",CX:"Christmas Island",CY:"Cyprus",CZ:"the Czech Republic",DE:"Germany",DJ:"Djibouti",DK:"Denmark",DM:"Dominica",DO:"the Dominican Republic",DZ:"Algeria",EC:"Ecuador",EE:"Estonia",EG:"Egypt",EH:"the Western Sahara",ER:"Eritrea",ES:"Spain",ET:"Ethiopia",FI:"Finland",FJ:"Fiji",FK:"the UK",FO:"the UK",FR:"France",GA:"Gabon",GB:"the UK",GD:"Grenada",GE:"Georgia",GF:"French Guiana",GG:"Guernsey",GH:"Ghana",GI:"Gibraltar",GL:"Greenland",GM:"the Gambia",GN:"Guinea",GP:"Guadeloupe",GQ:"Equatorial Guinea",GR:"Greece",GT:"Guatemala",GU:"Guam",GW:"Guinea-Bissau",GY:"Guyana",HK:"Hong Kong",HN:"Honduras",HR:"Croatia",HT:"Haiti",HU:"Hungary",ID:"Indonesia",IE:"Ireland",IM:"the Isle of Man",IN:"India",IQ:"Iraq",IR:"Iran",IS:"Iceland",IT:"Italy",JE:"Jersey",JM:"Jamaica",JO:"Jordan",JP:"Japan",KE:"Kenya",KG:"Kyrgyzstan",KH:"Cambodia",KI:"Kiribati",KN:"Saint Kitts and Nevis",KP:"Korea",KR:"Korea",KW:"Kuwait",KY:"the Cayman Ialnds",KZ:"Kazakhstan",LB:"Lebanon",LC:"Saint Lucia",LI:"Liechtenstein",LK:"Sri Lanka",LR:"Liberia",LS:"Lesotho",LT:"Lithuania",LU:"Luxembourg",LV:"Latvia",LY:"Libya",MA:"Morocco",MC:"Monaco",MD:"Moldova",ME:"Montenegro",MG:"Madagascar",MK:"the Republic of North Macedonia",ML:"Mali",MM:"Myanmar",MN:"Mongolia",MO:"Macao",MQ:"Martinique",MR:"Mauritania",MS:"Montserrat",MT:"Malta",MU:"Mauritius",MV:"Maldives",MW:"Malawi",MX:"Mexico",MY:"Malaysia",MZ:"Mozambique",NA:"Namibia",NC:"New Caledonia",NE:"Niger",NF:"Norfolk Island",NG:"Nigeria",NI:"Nicaragua",NL:"the Netherlands",NO:"Norway",NP:"Nepal",NR:"Nauru",NU:"Niue",NZ:"New Zealand",OM:"Oman",PA:"Panama",PE:"Peru",PF:"French Polynesia",PG:"Papua New Guinea",PH:"the Philippines",PK:"Pakistan",PL:"Poland",PM:"Saint Pierre and Miquelon",PN:"Pitcairn",PR:"Puerto Rico",PT:"Portugal",PW:"Palau",PY:"Paraguay",QA:"Qatar",RE:"Réunion",RO:"Romania",RU:"Russia",RW:"Rwanda",SA:"Saudi Arabia",SB:"Solomon Islands",SC:"Seychelles",SD:"Sudan",SE:"Sweden",SG:"Singapore",SH:"Saint Helena",SI:"Slovenia",SJ:"Svalbard and Jan Mayen",SK:"Slovakia",SL:"Sierra Leone",SM:"San Marino",SN:"Senegal",SO:"Somalia",SR:"Suriname",SS:"South Sudan",ST:"Sao Tome and Principe",SV:"El Salvador",SY:"Syrian Arab Republic",SZ:"Eswatini",TD:"Chad",TG:"Togo",TH:"Thailand",TJ:"Tajikistan",TK:"Tokelau",TL:"Timor-Leste",TM:"Turkmenistan",TN:"Tunisia",TO:"Tonga",TR:"Turkey",TT:"Trinidad and Tobago",TV:"Tuvalu",TW:"Taiwan",TZ:"Tanzania ",UG:"Uganda",US:"the US",UY:"Uruguay",UZ:"Uzbekistan",VC:"Saint Vincent and the Grenadines",VE:"Venezuela",VG:"the Virgin Islands",VI:"the Virgin Islands",VN:"Vietnam",VU:"Vanuatu",WF:"Wallis and Futuna",WS:"Samoa",YE:"Yemen",YT:"Mayotte",ZA:"South Africa",ZM:"Zambia",ZW:"Zimbabwe"},Po={GBPCountries:"£",UnitedStates:"$",AUDCountries:"$",Canada:"CA$",EURCountries:"€",NZDCountries:"NZ$",International:"$"},Zo=e=>Object.keys(xo).find(t=>xo[t].countries.includes(e??""))??"International",Mo=e=>{if(e){const t=Zo(e);return Po[t]}return"£"},Ro=e=>{if(e)return No[e]},jo=e=>e.includes("subscribe/weekly/checkout"),Uo=(e,t,n,r)=>{if(r){const i=r[Zo(n)];return`${Mo(n)}${i[e][t].price}`}},Do={CURRENCY_SYMBOL:({countryCode:e})=>Mo(e),COUNTRY_NAME:({countryCode:e})=>Ro(e),PRICE_DIGISUB_MONTHLY:({countryCode:e,prices:t})=>Uo("Digisub","Monthly",e,t),PRICE_DIGISUB_ANNUAL:({countryCode:e,prices:t})=>Uo("Digisub","Annual",e,t),PRICE_GUARDIANWEEKLY_MONTHLY:({countryCode:e,prices:t})=>Uo("GuardianWeekly","Monthly",e,t),PRICE_GUARDIANWEEKLY_ANNUAL:({countryCode:e,prices:t})=>Uo("GuardianWeekly","Annual",e,t),DAY_OF_THE_WEEK:()=>((e=new Date)=>e.toLocaleString("en-GB",{weekday:"long"}))(),DATE:()=>((e=new Date)=>e.toLocaleString("en-GB",{day:"numeric",month:"long",year:"numeric"}))()},Fo=/%%.*?%%/g,Lo="gu.contributions.views",Go=e=>{const t=(e=>{const t=new Date(e,10,1).getDay();return new Date(e,10,22+(11-t)%7)})(e);return t.setDate(t.getDate()+5),t},Bo=(e=new Date)=>{const t=(e=>{const t=e.getDate()<20?1:2;return e.setMonth(e.getMonth()+t),e})(e),n=(t.getMonth()+1).toString().padStart(2,"0"),r=t.toLocaleString("default",{month:"long"}),i=t.getFullYear();return{reminderCta:`Remind me in ${r}`,reminderPeriod:`${i}-${n}-01`,reminderLabel:`${r} ${i}`}},Jo=new Date("2023-12-31"),Ko=e=>e>=(e=>new Date(e.getFullYear(),10,15))(e)&&e<Go(e.getFullYear()),Vo=ro({text:yi(),baseUrl:yi()});let Wo=function(e){return e.Custom="CustomSecondaryCta",e.ContributionsReminder="ContributionsReminderSecondaryCta",e}({});var Yo;new co({type:"enum",entries:Wo,...I(Yo)});const Ho=ao("type",[ro({type:fo(Wo.Custom),cta:Vo}),ro({type:fo(Wo.ContributionsReminder)})]),Qo=ro({countLabel:yi(),goalCopy:yi().optional()}),qo=ro({total:Gi(),goal:Gi()}),Xo=lo(["US","AU","global"]),es=ro({currencySymbol:yi(),copy:Qo,name:Xo,tickerData:qo.optional()}),ts=ro({for52Weeks:Gi(),forTargetedWeeks:Gi()}),ns=lo(["for52Weeks","forTargetedWeeks"]),rs=ro({type:fo("above"),copy:yi().optional(),countType:ns.optional()}),is=lo(["CONTRIBUTION","MEMBERSHIP_SUPPORTER","DIGITAL_SUBSCRIPTION","PRINT_SUBSCRIPTION"]),os=lo(["ACQUISITIONS_EPIC","ACQUISITIONS_ENGAGEMENT_BANNER","ACQUISITIONS_SUBSCRIPTIONS_BANNER","ACQUISITIONS_HEADER","ACQUISITIONS_OTHER"]),ss=ro({abTestName:yi(),abTestVariant:yi(),campaignCode:yi(),componentType:os,products:to(is).nullish(),labels:to(yi()).nullish(),ophanPageId:yi(),platformId:yi(),referrerUrl:yi()}),as=ro({mainUrl:yi(),mobileUrl:yi().optional(),tabletUrl:yi().optional(),desktopUrl:yi().optional(),leftColUrl:yi().optional(),wideUrl:yi().optional(),altText:yi()}),us=ro({name:yi(),description:yi().optional(),headshot:as.optional()}),cs=/^[0-9A-F]{2}$/,ls=yi().refine(e=>cs.test(e),{error:e=>`"${JSON.stringify(e.input)}" is not a valid hex value`}),ds=ro({r:ls,g:ls,b:ls,kind:fo("hex")}),ps=ro({mobileUrl:yi(),tabletUrl:yi(),desktopUrl:yi(),altText:yi(),kind:fo("Image")}),fs=ro({buttonColour:ds.nullish(),buttonTextColour:ds.nullish(),buttonBorderColour:ds.nullish(),buttonSelectColour:ds.nullish(),buttonSelectTextColour:ds.nullish(),buttonSelectBorderColour:ds.nullish(),buttonSelectMarkerColour:ds.nullish(),pillTextColour:ds.nullish(),pillBackgroundColour:ds.nullish(),kind:fo("ChoiceCards")}),hs=ro({visual:ao("kind",[ps,fs]).nullish(),colours:ro({basic:ro({background:ds,bodyText:ds})})}),ms=ro({heading:yi(),subheading:yi(),primaryCta:Vo.optional(),secondaryCta:Vo.optional(),benefits:to(yi()).optional()}),gs=ro({content:ms,tracking:ss,mobileContent:ms.optional(),countryCode:yi().optional(),submitComponentEvent:Yi(),promoCodes:to(yi()).nullish()}),ys=ro({copy:yi()}),vs=oo([fo("Monthly"),fo("Annual")]),bs=ao("supportTier",[ro({supportTier:fo("Contribution"),ratePlan:vs}),ro({supportTier:fo("SupporterPlus"),ratePlan:vs}),ro({supportTier:fo("DigitalSubscription"),ratePlan:vs}),ro({supportTier:fo("OneOff")})]),_s=ro({copy:yi(),textColour:ds.nullish(),backgroundColour:ds.nullish()}),ws=oo([fo("LandingPage"),fo("Checkout")]),Ss=ro({testName:yi(),variantName:yi()}),zs=ro({product:bs,label:yi(),isDefault:Vi(),defaultExpanded:Vi().optional(),benefitsLabel:yi().nullish(),benefits:to(ys),pill:_s.nullish(),destination:ws.nullish(),destinationTest:Ss.nullish()}),ks=ro({choiceCards:to(zs),mobileChoiceCards:to(zs).nullish()}),Os=ro({maxViewsCount:Gi(),maxViewsDays:Gi(),minDaysBetweenViews:Gi()}),$s=ro({reminderCta:yi(),reminderLabel:yi(),reminderPeriod:yi()});lo(["ONE_OFF","MONTHLY","ANNUAL"]);const Is=ro({newsletterId:yi(),successDescription:yi()}),Cs=ro({name:yi(),heading:yi().optional(),paragraphs:to(yi()),highlightedText:yi().optional(),tickerSettings:es.optional(),cta:Vo.optional(),secondaryCta:Ho.optional(),newsletterSignup:Is.optional(),image:as.optional(),showReminderFields:$s.optional(),separateArticleCount:rs.optional(),promoCodes:to(yi()).nullish(),maxViews:Os.optional(),showSignInLink:Vi().optional(),bylineWithImage:us.optional(),showChoiceCards:Vi().optional(),choiceCardsSettings:ks.nullish()}),Ts=ro({variant:Cs,tracking:ss,countryCode:yi().nullish(),articleCounts:ts,onReminderOpen:Yi().nullish(),fetchEmail:Yi().nullish(),submitComponentEvent:Yi().nullish(),openCmp:Yi().nullish(),hasConsentForArticleCount:Vi().nullish(),stage:yi().nullish()}),Es=lo(["contributions","subscriptions","signIn","abandonedBasket"]),As=ro({heading:yi().optional(),messageText:yi().optional(),paragraphs:to(yi()).optional(),mobileMessageText:yi().optional(),highlightedText:yi().optional(),cta:Vo.optional(),secondaryCta:Ho.optional()}),xs=ro({tracking:ss,bannerChannel:Es,content:As.nullish(),mobileContent:As.nullish(),countryCode:yi().nullish(),tickerSettings:es.nullish(),submitComponentEvent:Yi(),articleCounts:ts,hasOptedOutOfArticleCount:Vi().nullish(),fetchEmail:Yi().nullish(),separateArticleCount:Vi().nullish(),design:hs.nullish(),choiceCardsSettings:ks.nullish(),promoCodes:to(yi()).nullish(),isCollapsible:Vi().nullish(),contributionsServiceUrl:yi().nullish()}),Ns=ro({amount:oo([Gi(),fo("other")]),billingPeriod:oo([fo("ONE_OFF"),fo("MONTHLY"),fo("ANNUAL")]),product:oo([fo("Contribution"),fo("SupporterPlus"),fo("PremiumTier"),fo("DailyEdition"),fo("GuardianWeekly"),fo("Paper"),fo("PaperAndDigital")]),region:oo([fo("uk"),fo("us"),fo("au"),fo("eu"),fo("int"),fo("nz"),fo("ca")])}),Ps=(e,t,n,r)=>{const i=(e=>new URLSearchParams(window.location.search).get(`force-${e}`))(e),o=(e=>new URLSearchParams(window.location.search).get(`preview-${e}`))(e),s=new URLSearchParams;i?s.set("force",i):o&&s.set("preview",o);const a=s.toString();return fetch(a?`${t}/${e}?${a}`:`${t}/${e}`,{method:"post",headers:{"Content-Type":"application/json",...r},body:JSON.stringify(n)}).then(t=>{if(!t.ok)throw Error(t.statusText||`Supporter Revenue ${e} | Api call returned HTTP status ${t.status}`);return t}).then(e=>e.json())};exports.CountryGroupId=Co,exports.SecondaryCtaType=Wo,exports.abandonedBasketSchema=Ns,exports.addRegionIdToSupportUrl=(e,t)=>{if(t){const n=(e=>xo[Zo(e)].supportRegionId)(t);if(!jo(e))return e.replace(/(support\.theguardian\.com)\/(contribute-in-epic|contribute|subscribe|checkout)/,(e,t,r)=>`${t}/${n.toLowerCase()}/${r}`)}return e},exports.bannerSchema=xs,exports.buildReminderFields=Bo,exports.containsNonArticleCountPlaceholder=e=>{const t=e.match(Fo)?.filter(e=>"%%ARTICLE_COUNT%%"!==e);return!!t&&t.length>0},exports.contributionsOnlyCountriesTargetingSchema=Eo,exports.countryCodeToCountryGroupId=Zo,exports.countryGroupIdSchema=To,exports.countryGroups=xo,exports.epicPropsSchema=Ts,exports.getBanner=(e,t)=>Ps("banner",e,t),exports.getCountryName=Ro,exports.getEpic=(e,t,n)=>Ps("epic",e,t,n),exports.getEpicViewLog=e=>e.get(Lo)??void 0,exports.getGutterLiveblog=(e,t)=>Ps("gutter-liveblog",e,t),exports.getHeader=(e,t)=>Ps("header",e,t),exports.getLiveblogEpic=(e,t)=>Ps("liveblog-epic",e,t),exports.getLocalCurrencySymbol=Mo,exports.getReminderFields=(e,t=new Date)=>{return"US"===e&&Ko(t)?{reminderCta:"Remind me on Giving Tuesday",reminderPeriod:`${n=t.getFullYear()}-${(Go(n).getMonth()+1).toString().padStart(0,"2")}-01`,reminderLabel:"on Giving Tuesday",reminderOption:`giving-tuesday-${n}`}:"US"===e&&(e=>e>=Go(e.getFullYear())&&e<Jo)(t)?(e=>({reminderCta:"Remind me on New Years Eve",reminderPeriod:`${e}-12-01`,reminderLabel:"on New Years Eve",reminderOption:`new-years-eve-${e}`}))(t.getFullYear()):Bo(t);var n},exports.getWeeklyArticleHistory=t=>t.get(e)??void 0,exports.headerPropsSchema=gs,exports.hexColourToString=e=>`#${e.r}${e.g}${e.b}`,exports.inTargetedCountry=(e,t=[],n=[])=>0===t.length&&0===n.length||!!e&&(!!t.includes(Zo(e.toUpperCase()))||n.includes(e.toUpperCase())),exports.incrementWeeklyArticleCount=(r,o,s)=>{const a=((e,r)=>{const i=n(new Date),o=e.get(t);if(o?.week===i){const n=o.articles[r]||0;return e.set(t,{week:i,articles:{...o.articles,[r]:n+1}}),n>0}return e.set(t,{week:i,articles:{[r]:1}}),!1})(r,o);if(!a){const t=n(new Date),o=r.get(e)??[],a=o.length>0?o[0]:null;if(a?.week&&a.week===t)a.count+=1,a.tags=i(s,a.tags),r.set(e,o);else{o.unshift({week:t,count:1,tags:i(s,{})});const n=t-365,a=o.filter(e=>e.week>=n);r.set(e,a)}}},exports.isGWCheckoutUrl=jo,exports.isoCurrencyToCurrencySymbol={GBP:"£",USD:"$",AUD:"$",EUR:"€",NZD:"NZ$",CAD:"CA$"},exports.logEpicView=e=>{const t=JSON.parse(localStorage.getItem(Lo)??""),n=t?t.value:[];n.push({date:(new Date).getTime(),testId:e});const r={value:n.slice(-50)};localStorage.setItem(Lo,JSON.stringify(r))},exports.passesContributionsOnlyTargeting=(e,t,n)=>{const r=e?.contributionsOnlyCountriesTargeting??"Exclude";if(!t)return!0;const i=n.includes(t);return"Include"===r?i:!i},exports.replaceNonArticleCountPlaceholders=(e,t,n)=>e?e.replace(Fo,e=>{const r=e.substring(2,e.length-2),i=Do[r];if(i){const e=i({countryCode:t,prices:n});if(e)return e}return e}):"",exports.targetedRegionsSchema=Ao;
|
|
1
|
+
"use strict";const e="gu.history.weeklyArticleCount",t="gu.history.articleCountsThisWeek",n=e=>{const t=e.getDay()||7;return Date.UTC(e.getFullYear(),e.getMonth(),e.getDate()-(t-1))/864e5},r=new Set(["environment/climate-change","environment/climate-crisis","environment/environment","science/science","politics/politics","us-news/us-politics","australia-news/australian-politics","world/world","world/europe-news","world/russia","books/books","culture/culture","world/coronavirus-outbreak","world/race","inequality/inequality","technology/technology","business/business","tone/recipes","sport/sport","football/football","sport/olympic-games","sport/olympic-games-2024","tracking/commissioningdesk/uk-investigations"]),i=(e,t={})=>(e.forEach(e=>{r.has(e)&&(t[e]=(t[e]??0)+1)}),t);function o(e){const t=Object.values(e).filter(e=>"number"==typeof e);return Object.entries(e).filter(([e,n])=>-1===t.indexOf(+e)).map(([e,t])=>t)}function s(e,t="|"){return e.map(e=>C(e)).join(t)}function a(e,t){return"bigint"==typeof t?t.toString():t}class u{constructor(e){this._getter=e,this._value=void 0}get value(){const e=this._getter;return void 0!==e&&(this._value=e(),this._getter=void 0),this._value}}function c(e){return new u(e)}function l(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function d(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function f(e){const t=Object.getOwnPropertyDescriptor(e,"shape");return t?.get?t.get.raw:t?.value}function p(e){return f(e._zod.def)??e._zod.def.shape}function h(e,t,n){Object.defineProperty(e,t,{get(){const e=n();return d(this,t,e),e},enumerable:!0,configurable:!0})}function m(e,t,n){t in e?d(e,t,n):e[t]=n}function g(e,t,n,r){const i=p(t);for(const o of n){const n=Object.getOwnPropertyDescriptor(i,o);n.enumerable&&(n.get?h(e,o,()=>{const e=t._zod.def.shape[o];return r?r(e,o):e}):m(e,o,r?r(n.value,o):n.value))}}function y(...e){const t={};for(const n of e){const e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function v(e){return JSON.stringify(e)}const b="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function _(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}const w=c(()=>{if(ae.jitless)return!1;if("undefined"!=typeof navigator&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch(e){return!1}});function z(e){if(!1===_(e))return!1;const t=e.constructor;if(void 0===t)return!0;if("function"!=typeof t)return!0;const n=t.prototype;return!1!==_(n)&&!1!==Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")}function S(e){return z(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}const k=new Set(["string","number","symbol"]);function O(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function $(e,t,n){const r=new e._zod.constr(t??e._zod.def);return t&&!n?.parent||(r._zod.parent=e),r}function I(e){const t=e;if(!t)return{};if("string"==typeof t)return{error:()=>t};if(void 0!==t?.message){if(void 0!==t?.error)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,"string"==typeof t.error?{...t,error:()=>t.error}:t}function C(e){return"bigint"==typeof e?e.toString()+"n":"string"==typeof e?`"${e}"`:`${e}`}const T=(()=>({safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]}))(),E={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function A(e,t){const n=p(e),r=[];for(const e of Reflect.ownKeys(t)){if(!Object.getOwnPropertyDescriptor(n,e)?.enumerable)throw new Error(`Unrecognized key: "${String(e)}"`);t[e]&&r.push(e)}return r}function x(e,t){const n={};return g(n,e,Reflect.ownKeys(p(e))),function(e,t){for(const n of Reflect.ownKeys(t)){const r=Object.getOwnPropertyDescriptor(t,n);r.enumerable&&(r.get?h(e,n,()=>t[n]):m(e,n,r.value))}}(n,t),n}function N(e,t,n,r="partial"){const i=t._zod.def.checks;if(i&&i.length>0)throw new Error(`.${r}() cannot be used on object schemas containing refinements`);const o=n?new Set(A(t,n)):void 0,s={};return g(s,t,Reflect.ownKeys(p(t)),e&&((t,n)=>o&&!o.has(n)?t:new e({type:"optional",innerType:t}))),$(t,y(t._zod.def,{shape:s,checks:[]}))}function P(e,t=0){if(!0===e.aborted)return!0;for(let n=t;n<e.issues.length;n++)if(!0!==e.issues[n]?.continue)return!0;return!1}function Z(e,t=0){if(!0===e.aborted)return!0;for(let n=t;n<e.issues.length;n++)if(!1===e.issues[n]?.continue)return!0;return!1}function M(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function R(e){return"string"==typeof e?e:e?.message}function j(e){const t=[];for(const n of e??[]){const e=n._zod.def;if(!/_(length|size)$|_equals$/.test(e.check))break;const r=e.maximum??e.length??e.size;r>=0&&t.push([r,n])}return t}function U(e,t,n){var r;for(let i=t;i<e.length;i++)(r=e[i]).schema??(r.schema=n)}function D(e,t,n){var r;const i=e.inst?._zod?.traits;i?.has("$ZodType")&&(i.has("$ZodCheck")?(r=e).schema??(r.schema=e.inst):e.schema=e.inst);const o=e.schema!==e.inst?e.schema?._zod.def?.error:void 0,s=e.message?e.message:R(e.inst?._zod.def?.error?.(e))??R(o?.(e))??R(t?.error?.(e))??R(n.customError?.(e))??R(n.localeError?.(e))??"Invalid input",a={};for(const t of Object.keys(e))"inst"!==t&&"schema"!==t&&"continue"!==t&&"input"!==t&&"__proto__"!==t&&(a[t]=e[t]);return a.path??(a.path=[]),a.message=s,t?.reportInput&&(a.input=e.input),a}const F=/[\uD800-\uDBFF]/;function L(e){const t=e.length;if(!F.test(e))return t;let n=t;for(let r=0;r<t-1;r++)55296==(64512&e.charCodeAt(r))&&56320==(64512&e.charCodeAt(r+1))&&(n--,r++);return n}function G(e){return Array.isArray(e)?"array":"string"==typeof e?"string":"unknown"}function B(...e){const[t,n,r]=e;return"string"==typeof t?{message:t,code:"custom",input:n,inst:r}:{...t}}function J(e,t,n,r=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:r,value:n}),n}function K(e,t,n){return J(e,t,n,!1)}function V(e,t){for(const n in e){const r=e[n];Object.defineProperty(t,n,{configurable:!0,enumerable:!0,get(){return J(this,n,r(this))},set(e){J(this,n,e)}})}return t}function W(e,t,n){Object.defineProperty(e,t,{configurable:!0,get(){return null==this?n:J(this,t,n.bind(this))},set(e){J(this,t,e)}})}let Y,H=!1;const q={configurable:!0,get(){H=!0}};function Q(e,t,n){const r=Object.getPrototypeOf(e._zod);t in r&&Y!==e._zod?Y=void 0:(Y=e._zod,Object.defineProperty(r,t,{configurable:!0,get(){Object.defineProperty(this,t,q);const e=H;H=!1;try{const r=n(this);return H?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:r}),H=H||e,r}catch(n){throw delete this[t],H=H||e,n}},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}}))}function X(e,t,n,r){const i=function(e,t){const n=Object.getPrototypeOf(e);return t in n?void 0:n}(e,t);i&&Object.defineProperty(i,t,{configurable:!0,get(){const 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})}})}function ee(e){const t=()=>e;return t["~constantCatch"]=!0,t}var te;const ne={value:void 0,enumerable:!1};let re="captureStackTrace"in Error?Error:null;function ie(e,t,n,r){function i(e){this.def=e,this.constr=l,this.traits=new Set}i.prototype={};const o=n,s=o&&new WeakSet;function a(n,r){if(n._zod){if(n._zod.traits.has(e))return}else{ne.value=new i(r);try{Object.defineProperty(n,"_zod",ne)}finally{ne.value=void 0}}if(n._zod.traits.add(e),t(n,r),s){const e=Object.getPrototypeOf(n),t=n._zod.constr.prototype;let r=e;for(;r&&r!==t;)r=Object.getPrototypeOf(r);const i=r??e;s.has(i)||(s.add(i),function(e,t){for(const n in t){const r=Object.getOwnPropertyDescriptor(t,n);r.get?Object.defineProperty(e,n,{...r,enumerable:!1}):W(e,n,r.value)}}(i,o))}const a=l.prototype;for(const e in a)Object.prototype.hasOwnProperty.call(a,e)&&(e in n||(n[e]=a[e].bind(n)))}const u=r?.Parent??Object;class c extends u{}function l(e){const t=r?.Parent?function(e){const t=re;if(t){const n=t.stackTraceLimit;if("number"==typeof n){try{t.stackTraceLimit=0}catch{return re=null,new e}try{return new e}finally{t.stackTraceLimit=n}}}return new e}(c):this;a(t,e);const n=t._zod.deferred;if(n){for(const e of n)e();t._zod.deferred=void 0}const i=globalThis.__zod_globalConfig?.postProcessor;return i&&i(t),t}return Object.defineProperty(c,"name",{value:e}),Object.defineProperty(l,"init",{value:a}),Object.defineProperty(l,Symbol.hasInstance,{value:t=>!!(r?.Parent&&t instanceof r.Parent)||t?._zod?.traits?.has(e)}),Object.defineProperty(l,"name",{value:e}),l}class oe extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class se extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}}(te=globalThis).__zod_globalConfig??(te.__zod_globalConfig={});const ae=globalThis.__zod_globalConfig;function ue(e){return e&&Object.assign(ae,e),ae}const ce={get:function(){const e=this._zod;return e.message??(e.message=JSON.stringify(e.def,a,2)),e.message},set:function(e){this._zod.message=e},enumerable:!0,configurable:!0},le={value:void 0,enumerable:!1},de=new WeakSet([Object.prototype,Error.prototype]),fe=ie("$ZodError",(e,t)=>{e.name="$ZodError",le.value=t,Object.defineProperty(e,"issues",le),le.value=void 0,Object.defineProperty(e,"message",ce);const n=Object.getPrototypeOf(e);de.has(n)||(de.add(n),Object.defineProperty(n,"toString",{configurable:!0,enumerable:!1,get(){const 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})}}))});function pe(e,t,n){return Object.prototype.hasOwnProperty.call(e,t)||("__proto__"===t?Object.defineProperty(e,t,{value:n(),writable:!0,enumerable:!0,configurable:!0}):e[t]=n()),e[t]}function he(e,t){return{callee:t?.callee??e,Err:t?.Err}}const me=e=>{const t=(n,r,i,o)=>{const s=i?{...i,async:!1}:{async:!1},a=n._zod.run({value:r,issues:[]},s);if(a instanceof Promise)throw new oe;if(a.issues.length){const n=new(o?.Err??e)(a.issues.map(e=>D(e,s,ue())));throw b(n,o?.callee??t),n}return a.value};return t},ge=e=>{const t=async(n,r,i,o)=>{const s=i?{...i,async:!0}:{async:!0};let a=n._zod.run({value:r,issues:[]},s);if(a instanceof Promise&&(a=await a),a.issues.length){const n=new(o?.Err??e)(a.issues.map(e=>D(e,s,ue())));throw b(n,o?.callee??t),n}return a.value};return t},ye=e=>(t,n,r)=>{const i=r?{...r,async:!1}:{async:!1},o=t._zod.run({value:n,issues:[]},i);if(o instanceof Promise)throw new oe;return o.issues.length?ve(e,o.issues,i):{success:!0,data:o.value}};function ve(e,t,n){let r;return{success:!1,get error(){return r||(r=new e(t.map(e=>D(e,n,ue()))),t=void 0,n=void 0),r},set error(e){r=e,t=void 0,n=void 0}}}const be=e=>async(t,n,r)=>{const i=r?{...r,async:!0}:{async:!0};let o=t._zod.run({value:n,issues:[]},i);return o instanceof Promise&&(o=await o),o.issues.length?ve(e,o.issues,i):{success:!0,data:o.value}},_e=Symbol.for("zod.compile.invalid"),we=Symbol.for("zod.compile.fallback"),ze=(e,t,n)=>{const r=e._zod.bag.validator;if(void 0!==r){if(r(t)!==_e)return!0;if(!0===r.definite&&void 0===n)return!1}return function(e,t,n){const r=n?{...n,async:!1,abortEarly:!0}:{async:!1,abortEarly:!0},i=e._zod.bag.fallbackRun;let o;i?(r[we]=!0,o=i({value:t,issues:[]},r)):o=e._zod.run({value:t,issues:[]},r);if(o instanceof Promise)throw new oe;return 0===o.issues.length}(e,t,n)};const Se=e=>{const t=me(e),n=(e,r,i,o)=>{const s=i?{...i,direction:"backward"}:{direction:"backward"};return t(e,r,s,he(n,o))};return n},ke=e=>{const t=me(e),n=(e,r,i,o)=>t(e,r,i,he(n,o));return n},Oe=e=>{const t=ge(e),n=async(e,r,i,o)=>{const s=i?{...i,direction:"backward"}:{direction:"backward"};return await t(e,r,s,he(n,o))};return n},$e=e=>{const t=ge(e),n=async(e,r,i,o)=>await t(e,r,i,he(n,o));return n},Ie=e=>(t,n,r)=>{const i=r?{...r,direction:"backward"}:{direction:"backward"};return ye(e)(t,n,i)},Ce=e=>(t,n,r)=>ye(e)(t,n,r),Te=e=>async(t,n,r)=>{const i=r?{...r,direction:"backward"}:{direction:"backward"};return be(e)(t,n,i)},Ee=e=>async(t,n,r)=>be(e)(t,n,r),Ae=/^[cC][0-9a-z]{6,}$/,xe=/^[0-9a-z]+$/,Ne=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,Pe=/^[0-9a-vA-V]{20}$/,Ze=/^[A-Za-z0-9]{27}$/,Me=/^[a-zA-Z0-9_-]{21}$/;const Re=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,je=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Ue=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,De=/^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/;const Fe=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Le=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,Ge=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,Be=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Je=/^https?$/,Ke=/^\+[1-9]\d{6,14}$/,Ve="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))";function We(e){return new RegExp(`^${e}$`)}const Ye=We(Ve);function He(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return"number"==typeof e.precision?-1===e.precision?`${t}`:0===e.precision?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:e.seconds?`${t}:[0-5]\\d(?:\\.\\d+)?`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}const qe=/^[\s\S]{0,}$/,Qe=/^-?\d+(?:\.\d+)?$/,Xe=/^(?:true|false)$/i,et=/^[^A-Z]*$/,tt=/^[^a-z]*$/,nt=ie("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),rt=e=>{const t=e.value;return!(n=t,null==n||void 0===t.length);var n},it={number:"number",bigint:"bigint",object:"date"},ot=ie("$ZodCheckLessThan",(e,t)=>{nt.init(e,t);const n=it[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:it[typeof r.value]??n,code:"too_big",maximum:"object"==typeof t.value?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),st=ie("$ZodCheckGreaterThan",(e,t)=>{nt.init(e,t);const n=it[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:it[typeof r.value]??n,code:"too_small",minimum:"object"==typeof t.value?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),at=ie("$ZodCheckMultipleOf",(e,t)=>{nt.init(e,t),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");("bigint"==typeof n.value?t.value!==BigInt(0)&&n.value%t.value===BigInt(0):0===function(e,t){const n=e/t,r=Math.round(n),i=4*Number.EPSILON*Math.max(Math.abs(n),1);return Math.abs(n-r)<i?0:n-r}(n.value,t.value))||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),ut=ie("$ZodCheckNumberFormat",(e,t)=>{nt.init(e,t),t.format=t.format||"float64";const n=t.format?.includes("int"),r=n?"int":"number",[i,o]=T[t.format];e._zod.check=s=>{const a=s.value;if(n){if(!Number.isInteger(a))return void s.issues.push({expected:r,format:t.format,code:"invalid_type",continue:!1,input:a,inst:e});if(!Number.isSafeInteger(a))return void(a>0?s.issues.push({input:a,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort}):s.issues.push({input:a,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort}))}a<i&&s.issues.push({origin:"number",input:a,code:"too_small",minimum:i,inclusive:!0,inst:e,continue:!t.abort}),a>o&&s.issues.push({origin:"number",input:a,code:"too_big",maximum:o,inclusive:!0,inst:e,continue:!t.abort})}}),ct=ie("$ZodCheckMaxLength",(e,t)=>{var n;nt.init(e,t),(n=e._zod.def).when??(n.when=rt),e._zod.check=n=>{const r=n.value,i=r.length;if(("string"==typeof r&&i>t.maximum?L(r):i)<=t.maximum)return;const o=G(r);n.issues.push({origin:o,code:"too_big",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),lt=ie("$ZodCheckMinLength",(e,t)=>{var n;nt.init(e,t),(n=e._zod.def).when??(n.when=rt),e._zod.check=n=>{const r=n.value,i=r.length;if(("string"==typeof r&&i>=t.minimum&&i<2*t.minimum?L(r):i)>=t.minimum)return;const o=G(r);n.issues.push({origin:o,code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),dt=ie("$ZodCheckLengthEquals",(e,t)=>{var n;nt.init(e,t),(n=e._zod.def).when??(n.when=rt),e._zod.check=n=>{const r=n.value,i=r.length,o="string"==typeof r&&i>=t.length&&i<=2*t.length?L(r):i;if(o===t.length)return;const s=G(r),a=o>t.length;n.issues.push({origin:s,...a?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),ft=ie("$ZodCheckStringFormat",(e,t)=>{var n,r;nt.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=()=>{})}),pt=ie("$ZodCheckRegex",(e,t)=>{ft.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,t.pattern.test(n.value)||n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),ht=ie("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=et),ft.init(e,t)}),mt=ie("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=tt),ft.init(e,t)}),gt=ie("$ZodCheckIncludes",(e,t)=>{nt.init(e,t);const n=O(t.includes),r=new RegExp("number"==typeof t.position?`^.{${t.position},}${n}`:n);t.pattern=r,e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),yt=ie("$ZodCheckStartsWith",(e,t)=>{nt.init(e,t);const n=new RegExp(`^${O(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),vt=ie("$ZodCheckEndsWith",(e,t)=>{nt.init(e,t);const n=new RegExp(`.*${O(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),bt=ie("$ZodCheckOverwrite",(e,t)=>{nt.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}});class _t{constructor(e=[],t={}){this.content=[],this.indent=0,this.args=e,this.closed=t}indented(e){this.indent+=1;try{e(this)}finally{this.indent-=1}}write(e){if("function"==typeof e)return e(this,{execution:"sync"}),void e(this,{execution:"async"});const t=e.split("\n").filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),r=t.map(e=>e.slice(n)).map(e=>" ".repeat(2*this.indent)+e);for(const e of r)this.content.push(e)}compile(){const e=Function,t=this?.content??[""];return new e(...Object.keys(this.closed),`return function (${this.args.join(", ")}) {\n${t.join("\n")}\n};`)(...Object.values(this.closed))}}const wt={major:4,minor:6,patch:6},zt=ie("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=wt;const r=e._zod.def.checks,i=e._zod.traits.has("$ZodCheck")?[e,...r??[]]:r?.length?[...r]:[];for(const t of i)for(const n of t._zod.onattach)n(e);if(0===i.length)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const t=(t,n,r)=>{if(t.memo)return t;let i,o=P(t);for(const s of n){if(s._zod.def.when){if(Z(t))continue;if(!s._zod.def.when(t))continue}else if(o)continue;const n=t.issues.length,a=s._zod.check(t);if(a instanceof Promise&&!1===r?.async)throw new oe;if(i||a instanceof Promise)i=(i??Promise.resolve()).then(async()=>{await a;t.issues.length!==n&&(U(t.issues,n,e),o||(o=P(t,n)))});else{if(t.issues.length===n)continue;U(t.issues,n,e),o||(o=P(t,n))}}return i?i.then(()=>t):t},n=(n,r,o)=>{if(P(n))return n.aborted=!0,n;const s=t(r,i,o);if(s instanceof Promise){if(!1===o.async)throw new oe;return s.then(t=>e._zod.parse(t,o))}return e._zod.parse(s,o)};e._zod.run=(r,o)=>{if(o.skipChecks)return e._zod.parse(r,o);if("backward"===o.direction){const t=e._zod.parse({value:r.value,issues:[]},{...o,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,r,o)):n(t,r,o)}const s=e._zod.parse(r,o);if(s instanceof Promise){if(!1===o.async)throw new oe;return s.then(e=>t(e,i,o))}return t(s,i,o)}}},{get"~standard"(){return K(this,"~standard",kt(this))},set"~standard"(e){J(this,"~standard",e)}}),St=(e,t)=>e.issues.length?{issues:e.issues.map(e=>D(e,t,ue()))}:{value:e.value};function kt(e){return{validate:t=>{const n={async:!1};try{const r=e._zod.run({value:t,issues:[]},n);if(!(r instanceof Promise))return St(r,n)}catch(e){}return async function(e,t){const n={async:!0};return St(await e._zod.run({value:t,issues:[]},n),n)}(e,t)},vendor:"zod",version:1}}const Ot=ie("$ZodString",(e,t)=>{zt.init(e,t),e._zod.pattern=t.pattern??qe,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch(r){}return"string"==typeof n.value||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),$t=ie("$ZodStringFormat",(e,t)=>{ft.init(e,t),Ot.init(e,t)}),It=ie("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=je),$t.init(e,t)}),Ct=ie("$ZodUUID",(e,t)=>{if(t.version){const e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(void 0===e)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=Ue(e))}else t.pattern??(t.pattern=Ue());$t.init(e,t)}),Tt=ie("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=De),$t.init(e,t)});function Et(e){try{return"undefined"!=typeof URL&&"function"==typeof URL.canParse?URL.canParse(e):(new URL(e),!0)}catch{return!1}}function At(e,t){return"normalize"in t||"hostname"in t||"protocol"in t?function(e,t){if(!t.normalize&&t.protocol?.source===Je.source&&!/^https?:\/\//i.test(e))return 1;try{if("undefined"!=typeof URL){const t=URL;if("function"==typeof t.parse)return t.parse(e)??2}return new URL(e)}catch{return 2}}(e,t):Et(e)||2}const xt=/[\t\n\r]/g;function Nt(e){return e.replace(xt,"")}const Pt=ie("$ZodURL",(e,t)=>{$t.init(e,t),e._zod.check=n=>{try{const r=n.value.trim(),i=At(r,t);return 1===i?void n.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:n.value,inst:e,continue:!t.abort}):2===i?void n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort}):!0===i?void(n.value=Nt(r)):(t.hostname&&!function(e,t){return t.lastIndex=0,t.test(e.hostname)}(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&&!function(e,t){return t.lastIndex=0,t.test(e.protocol.endsWith(":")?e.protocol.slice(0,-1):e.protocol)}(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}),void(n.value=t.normalize?i.href:Nt(r)))}catch(r){n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),Zt=ie("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=new RegExp("^(?=[\\s\\S]*[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\u20E3])[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$","u")),$t.init(e,t)}),Mt=ie("$ZodNanoID",(e,t)=>{if(void 0!==t.length&&(!Number.isInteger(t.length)||t.length<1))throw new Error(`Invalid nanoid length: ${t.length}`);var n;t.pattern??(t.pattern=void 0===t.length?Me:(n=t.length,new RegExp(`^[a-zA-Z0-9_-]{${n}}$`))),$t.init(e,t)}),Rt=ie("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=Ae),$t.init(e,t)}),jt=ie("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=xe),$t.init(e,t)}),Ut=ie("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Ne),$t.init(e,t)}),Dt=ie("$ZodXID",(e,t)=>{t.pattern??(t.pattern=Pe),$t.init(e,t)}),Ft=ie("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Ze),$t.init(e,t)}),Lt=ie("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=function(e){const t=["Z"];e.offset&&t.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const n=`${He({precision:e.precision,seconds:!0})}(?:${t.join("|")})`,r=e.local?`${n}|${He({precision:e.precision})}`:n;return new RegExp(`^${Ve}T(?:${r})$`)}(t)),$t.init(e,t)}),Gt=ie("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=Ye),$t.init(e,t)}),Bt=ie("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=new RegExp(`^${He(t)}$`)),$t.init(e,t)}),Jt=ie("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Re),$t.init(e,t)}),Kt=ie("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=Fe),$t.init(e,t)}),Vt=/^[0-9a-fA-F:.]+$/;function Wt(e){return!!Vt.test(e)&&Et(`http://[${e}]`)}const Yt=ie("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=Le),$t.init(e,t),e._zod.check=n=>{Wt(n.value)||n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}),Ht=ie("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=Ge),$t.init(e,t)});const qt=ie("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=Be),$t.init(e,t),e._zod.check=n=>{(function(e){const t=e.split("/");if(2!==t.length)return!1;const[n,r]=t;if(!r)return!1;const i=Number(r);return`${i}`===r&&!(i<0||i>128)&&Wt(n)})(n.value)||n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}});function Qt(e){if(""===e)return!0;if(/\s/.test(e))return!1;if(e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}const Xt=/^[0-9a-zA-Z+/]*={0,2}$/,en=ie("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=Xt),$t.init(e,t),e._zod.check=n=>{Qt(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}}),tn=/^[A-Za-z0-9_-]*$/;const nn=ie("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=tn),$t.init(e,t),e._zod.check=n=>{(function(e){if(!tn.test(e))return!1;const t=e.replace(/[-_]/g,e=>"-"===e?"+":"/");return Qt(t.padEnd(4*Math.ceil(t.length/4),"="))})(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),rn=ie("$ZodE164",(e,t)=>{t.pattern??(t.pattern=Ke),$t.init(e,t)});const on=ie("$ZodJWT",(e,t)=>{$t.init(e,t),e._zod.check=n=>{(function(e,t=null){try{const n=e.split(".");if(3!==n.length)return!1;const[r]=n;if(!r)return!1;const i=JSON.parse(atob(r));return!("typ"in i&&"JWT"!==i?.typ||!i.alg||t&&(!("alg"in i)||i.alg!==t))}catch{return!1}})(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),sn=ie("$ZodNumber",(e,t)=>{zt.init(e,t),e._zod.pattern=Qe,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch(e){}const i=n.value;if("number"==typeof i&&!Number.isNaN(i)&&Number.isFinite(i))return n;const o="number"==typeof i?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,...o?{received:o}:{}}),n}}),an=ie("$ZodNumberFormat",(e,t)=>{ut.init(e,t),sn.init(e,t)}),un=ie("$ZodBoolean",(e,t)=>{zt.init(e,t),e._zod.pattern=Xe,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Boolean(n.value)}catch(e){}const i=n.value;return"boolean"==typeof i||n.issues.push({expected:"boolean",code:"invalid_type",input:i,inst:e}),n}}),cn=ie("$ZodAny",(e,t)=>{zt.init(e,t),e._zod.parse=e=>e}),ln=ie("$ZodUnknown",(e,t)=>{zt.init(e,t),e._zod.parse=e=>e}),dn=ie("$ZodNever",(e,t)=>{zt.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:"never",code:"invalid_type",input:t.value,inst:e}),t)});const fn=e=>Array.isArray(e)?e.length:-1;function pn(e,t,n){e.issues.length&&t.issues.push(...M(n,e.issues)),t.value[n]=e.value}const hn=ie("$ZodArray",(e,t)=>{zt.init(e,t);const n=ae.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{const o=r.value;if(!Array.isArray(o))return r.issues.push({expected:"array",code:"invalid_type",input:o,inst:e}),r;r.value=n?n.alloc(e,r,Array(o.length),i):Array(o.length);const s=[],a=i?.abortEarly;for(let e=0;e<o.length;e++){const n=o[e],u=t.element._zod.run({value:n,issues:[]},i);if(u instanceof Promise)s.push(u.then(t=>pn(t,r,e)));else if(pn(u,r,e),a&&0!==u.issues.length&&P(u))break}return s.length?Promise.all(s).then(()=>r):r},function(e,t){const n=j(e._zod.def.checks);if(!n.length)return;const r=Math.min(...n.map(e=>e[0])),i=e._zod.parse;e._zod.parse=(n,o)=>{const s=t(n.value);if(s>r&&!o?.skipChecks&&"backward"!==o?.direction)for(const[t,r]of j(e._zod.def.checks))if(s>t&&r._zod.def.when(n)){const t=n.issues.length;return r._zod.check(n),n.issues[t].continue=!1,U(n.issues,t,e),n}return i(n,o)}}(e,fn)});function mn(e,t,n,r,i,o){const s=n in r,a="optional"===o;if(s||!a||"optional"!==i){if(e.issues.length){if(void 0!==i&&a&&!s)return;t.issues.push(...M(n,e.issues))}s||void 0!==i?void 0===e.value?(s||"defaulted"===i&&!a)&&(t.value[n]=void 0):t.value[n]=e.value:e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[n]})}}const gn=[];function yn(e){const t=Object.keys(e.shape),n=Object.getOwnPropertySymbols(e.shape),r=n.length?n:gn,i=r.length?[...t,...r]:t;for(const t of i)if(!e.shape?.[t]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${String(t)}": expected a Zod schema`);const o=(s=e.shape,Object.keys(s).filter(e=>void 0!==s[e]._zod.optin&&"optional"===s[e]._zod.optout));var s;return{...e,allKeys:i,symbolKeys:r,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(o)}}function vn(e,t,n,r,i,o,s){const a=[],u=i.keySet,c=i.catchall._zod,l=c.def.type,d=c.optin,f=c.optout;let p=0;for(const i in t){if(s&&n.issues.length!==p){if(P(n,p))break;p=n.issues.length}if(u.has(i))continue;if("__proto__"===i){"never"===l&&a.push(i);continue}if("never"===l){a.push(i);continue}const o=c.run({value:t[i],issues:[]},r);o instanceof Promise?e.push(o.then(e=>mn(e,n,i,t,d,f))):mn(o,n,i,t,d,f)}return a.length&&n.issues.push({code:"unrecognized_keys",keys:a,input:t,inst:o,continue:!0}),e.length?Promise.all(e).then(()=>n):n}const bn=ie("$ZodObject",(e,t)=>{zt.init(e,t);const n=Object.getOwnPropertyDescriptor(t,"shape"),r=n?.get?n.get.raw:t.shape??{};if(r){const e=()=>{const n={...r};return Object.defineProperty(t,"shape",{value:n}),e.raw=n,n};e.raw=r,Object.defineProperty(t,"shape",{get:e})}const i=c(()=>yn(t));Q(e,"propValues",e=>{const t=e.def.shape,n={};for(const e in t){const r=t[e]._zod;if(r.values){Object.prototype.hasOwnProperty.call(n,e)||d(n,e,new Set);for(const t of r.values)n[e].add(t);void 0!==r.optin&&n[e].add(void 0)}}return n});const o=_,s=t.catchall;let a;const u=ae.memoizer;u?.attach(e),e._zod.parse=(t,n)=>{a??(a=i.value);const r=t.value;if(!o(r))return t.issues.push({expected:"object",code:"invalid_type",input:r,inst:e}),t;t.value=u?u.alloc(e,t,{},n):{};const c=[],l=a.shape,d=n?.abortEarly;let f=t.issues.length;for(const e of a.allKeys){if(d&&t.issues.length!==f){if(P(t,f))break;f=t.issues.length}if("__proto__"===e)continue;const i=l[e],o=i._zod.optin,s=i._zod.optout,a=i._zod.run({value:r[e],issues:[]},n);a instanceof Promise?c.push(a.then(n=>mn(n,t,e,r,o,s))):mn(a,t,e,r,o,s)}return s?vn(c,r,t,n,i.value,e,!0===d):c.length?Promise.all(c).then(()=>t):t}}),_n=ie("$ZodObjectJIT",(e,t)=>{bn.init(e,t);const n=e._zod.parse,r=c(()=>yn(t)),i=ae.memoizer;let o;const s=_,a=!ae.jitless,u=a&&w.value,l=t.catchall;let d;e._zod.parse=(c,f)=>{d??(d=r.value);const p=c.value;return s(p)?a&&u&&!1===f?.async&&!0!==f.jitless?(o||(o=(t=>{const n=r.value,o=n.symbolKeys,s=new _t(["payload","ctx"],{shape:t,inst:e,memo:i,syms:o}),a=e=>`shape[${e}]._zod.run({ value: input[${e}], issues: [] }, ctx)`,u=(e,t)=>`\n let ${e}_ab = false;\n for (let i = 0; i < ${e}.issues.length; i++) {\n const iss = ${e}.issues[i];\n iss.path = iss.path ? [${t}, ...iss.path] : [${t}];\n payload.issues.push(iss);\n if (iss.continue !== true) ${e}_ab = true;\n }\n if (${e}_ab && ctx && ctx.abortEarly) {\n payload.value = newResult;\n return payload;\n }`;s.write("const input = payload.value;");const c=Object.create(null);let l=0;for(const e of n.allKeys)c[e]="key_"+l++;s.write(i?"const newResult = memo.alloc(inst, payload, {}, ctx);":"const newResult = {};");for(const e of n.allKeys){if("__proto__"===e)continue;const n=c[e],r="symbol"==typeof e?`syms[${o.indexOf(e)}]`:v(e),i=`${r} in input`,l=t[e],d=l?._zod?.optin,f=void 0!==d,p="optional"===l?._zod?.optout;if(s.write(`const ${n} = ${a(r)};`),f&&p){const e="optional"===d?`${n}_present`:`${n}.value !== undefined || ${n}_present`;s.write(`\n const ${n}_present = ${i};\n if (!${n}.issues.length || ${n}_present) {\n if (${n}.issues.length) {${u(n,r)}\n }\n\n if (${e}) {\n newResult[${r}] = ${n}.value;\n }\n }\n\n `)}else f?(s.write(`\n if (${n}.issues.length) {${u(n,r)}\n }\n `),"defaulted"===d?s.write(`newResult[${r}] = ${n}.value;`):s.write(`\n if (${n}.value !== undefined || ${i}) {\n newResult[${r}] = ${n}.value;\n }\n `)):s.write(`\n const ${n}_present = ${i};\n if (${n}.issues.length) {${u(n,r)}\n }\n if (!${n}_present && !${n}.issues.length) {\n payload.issues.push({\n code: "invalid_type",\n expected: "nonoptional",\n input: undefined,\n path: [${r}]\n });\n if (ctx && ctx.abortEarly) {\n payload.value = newResult;\n return payload;\n }\n }\n\n if (${n}_present) {\n newResult[${r}] = ${n}.value;\n }\n\n `)}return s.write("payload.value = newResult;"),s.write("return payload;"),s.compile()})(t.shape)),c=o(c,f),l?vn([],p,c,f,d,e,!0===f?.abortEarly):c):n(c,f):(c.issues.push({expected:"object",code:"invalid_type",input:p,inst:e}),c)}});function wn(e,t,n,r){for(const n of e)if(0===n.issues.length)return t.value=n.value,t;const i=e.filter(e=>!P(e));return 1===i.length?(t.value=i[0].value,i[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>D(e,r,ue())))}),t)}const zn=ie("$ZodUnion",(e,t)=>{zt.init(e,t),Q(e,"optin",e=>e.def.options.some(e=>"defaulted"===e._zod.optin)?"defaulted":e.def.options.some(e=>void 0!==e._zod.optin)?"optional":void 0),Q(e,"optout",e=>e.def.options.some(e=>"optional"===e._zod.optout)?"optional":void 0),Q(e,"values",e=>{if(e.def.options.every(e=>e._zod.values))return new Set(e.def.options.flatMap(e=>Array.from(e._zod.values)))}),Q(e,"pattern",e=>{if(e.def.options.every(e=>e._zod.pattern)){const t=e.def.options.map(e=>e._zod.pattern);return new RegExp(`^(${t.map(e=>l(e.source)).join("|")})$`)}});const n=1===t.options.length?t.options[0]._zod.run:null;e._zod.parse=(r,i)=>{if(n)return n(r,i);let o=!1;const s=[];for(const e of t.options){const t=e._zod.run({value:r.value,issues:[]},i);if(t instanceof Promise)s.push(t),o=!0;else{if(0===t.issues.length)return t;s.push(t)}}return o?Promise.all(s).then(t=>wn(t,r,e,i)):wn(s,r,e,i)}});const Sn=ie("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,zn.init(e,t);const n=e._zod.parse;Q(e,"propValues",e=>{const t={};let n=0;for(const r of e.def.options){const i=r._zod.propValues;if(!i||0===Object.keys(i).length)throw new Error(`Invalid discriminated union option at index "${e.def.options.indexOf(r)}"`);i[e.def.discriminator]?.has(void 0)&&n++;for(const[e,n]of Object.entries(i)){Object.prototype.hasOwnProperty.call(t,e)||d(t,e,new Set);for(const r of n)t[e].add(r)}}return!e.def.unionFallback&&n>1&&t[e.def.discriminator]?.delete(void 0),t}),t.options.forEach((e,n)=>{const r=f(e._zod.def);if(r&&!Object.prototype.hasOwnProperty.call(r,t.discriminator))throw new Error(`Invalid discriminated union option at index "${n}"`)});const r=c(()=>function(e){const t=new Map;for(const n of e.options){const r=n._zod.propValues?.[e.discriminator];if(!r||0===r.size)throw new Error(`Invalid discriminated union option at index "${e.options.indexOf(n)}"`);for(const e of r)if(t.has(e)){if(void 0!==e)throw new Error(`Duplicate discriminator value "${String(e)}"`);t.set(e,null)}else t.set(e,n)}return t}(t));e._zod.parse=(i,o)=>{const s=i.value;if(!_(s))return i.issues.push({code:"invalid_type",expected:"object",input:s,inst:e}),i;const a=s?.[t.discriminator],u=r.value.get(a);return!u||void 0===a&&"backward"===o.direction?t.unionFallback||"backward"===o.direction?n(i,o):(i.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,options:Array.from(r.value.keys()).filter(e=>null!==r.value.get(e)),input:s,path:[t.discriminator],inst:e}),i):u._zod.run(i,o)}}),kn=ie("$ZodIntersection",(e,t)=>{zt.init(e,t),e._zod.parse=(e,n)=>{const r=e.value,i=t.left._zod.run({value:r,issues:[]},n),o=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||o instanceof Promise?Promise.all([i,o]).then(([t,n])=>$n(e,t,n)):$n(e,i,o)}});function On(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e===+t)return{valid:!0,data:e};if(z(e)&&z(t)){const n=Object.keys(t),r=Object.keys(e).filter(e=>-1!==n.indexOf(e)),i={...e,...t};Object.prototype.hasOwnProperty.call(i,"__proto__")&&delete i.__proto__;for(const n of r){if("__proto__"===n)continue;const r=On(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let r=0;r<e.length;r++){const i=On(e[r],t[r]);if(!i.valid)return{valid:!1,mergeErrorPath:[r,...i.mergeErrorPath]};n.push(i.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function $n(e,t,n){const r=new Map;let i;const o=new Map,s=(e,t)=>{let n;if("unrecognized_keys"!==e.code||e.path?.length){if("invalid_key"!==e.code||"record"!==e.origin||1!==e.path?.length)return!1;{const t=String(e.path[0]);o.has(t)||o.set(t,e),n=[t]}}else i??(i=e),n=e.keys;for(const e of n)r.has(e)||r.set(e,{}),r.get(e)[t]=!0;return!0};for(const n of t.issues)s(n,"l")||e.issues.push(n);for(const t of n.issues)s(t,"r")||e.issues.push(t);const a=[...r].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(a.length){const t=i?a.filter(e=>i.keys.includes(e)):[];t.length&&e.issues.push({...i,keys:t});for(const n of a)!t.includes(n)&&o.has(n)&&e.issues.push(o.get(n))}const u=On(t.value,n.value);if(!u.valid){if(P(e))return e;throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(u.mergeErrorPath)}`)}return e.value=u.data,e}const In=ie("$ZodEnum",(e,t)=>{zt.init(e,t);const n=o(t.entries),r=new Set(n);e._zod.values=r,Q(e,"pattern",e=>{const t=o(e.def.entries).filter(e=>k.has(typeof e));return new RegExp(t.length?`^(${t.map(e=>O(e.toString())).join("|")})$`:"^[^\\s\\S]$")}),e._zod.parse=(t,i)=>{const o=t.value;return r.has(o)||t.issues.push({code:"invalid_value",values:n,input:o,inst:e}),t}}),Cn=ie("$ZodLiteral",(e,t)=>{zt.init(e,t);const n=new Set(t.values);e._zod.values=n,Q(e,"pattern",e=>{const t=e.def.values;return new RegExp(t.length?`^(${t.map(e=>"string"==typeof e?O(e):e?O(e.toString()):String(e)).join("|")})$`:"^[^\\s\\S]$")}),e._zod.parse=(r,i)=>{const o=r.value;return n.has(o)||r.issues.push({code:"invalid_value",values:t.values,input:o,inst:e}),r}}),Tn=ie("$ZodTransform",(e,t)=>{zt.init(e,t),e._zod.optin="optional",ae.memoizer?.guard(e),e._zod.parse=(n,r)=>{if("backward"===r.direction)throw new se(e.constructor.name);const i=t.transform(n.value,n);if(r.async){return(i instanceof Promise?i:Promise.resolve(i)).then(e=>(n.value=e,n))}if(i instanceof Promise)throw new oe;return n.value=i,n}});function En(e,t){return e.value=t.issues.length?void 0:t.value,e}const An=ie("$ZodOptional",(e,t)=>{zt.init(e,t),Q(e,"optin",e=>"defaulted"===e.def.innerType._zod.optin?"defaulted":"optional"),e._zod.optout="optional",Q(e,"values",e=>{const t=e.def.innerType._zod.values;return t?new Set([...t,void 0]):void 0}),Q(e,"pattern",e=>{const t=e.def.innerType._zod.pattern;return t?new RegExp(`^(${l(t.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(void 0===e.value){if("defaulted"!==t.innerType._zod.optin)return e;const r=t.innerType._zod.run({value:e.value,issues:[]},n);return r instanceof Promise?r.then(t=>En(e,t)):En(e,r)}return t.innerType._zod.run(e,n)}}),xn=ie("$ZodExactOptional",(e,t)=>{An.init(e,t),Q(e,"values",e=>e.def.innerType._zod.values),Q(e,"pattern",e=>e.def.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),Nn=ie("$ZodNullable",(e,t)=>{zt.init(e,t),Q(e,"optin",e=>e.def.innerType._zod.optin),Q(e,"optout",e=>e.def.innerType._zod.optout),Q(e,"pattern",e=>{const t=e.def.innerType._zod.pattern;return t?new RegExp(`^(${l(t.source)}|null)$`):void 0}),Q(e,"values",e=>e.def.innerType._zod.values?new Set([...e.def.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>null===e.value?e:t.innerType._zod.run(e,n)}),Pn=ie("$ZodDefault",(e,t)=>{zt.init(e,t),e._zod.optin="defaulted",Q(e,"values",e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>{if("backward"===n.direction)return t.innerType._zod.run(e,n);if(void 0===e.value)return e.value=t.defaultValue,e;const r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>Zn(e,t)):Zn(r,t)}});function Zn(e,t){return void 0===e.value&&(e.value=t.defaultValue),e}const Mn=ie("$ZodPrefault",(e,t)=>{zt.init(e,t),e._zod.optin="defaulted",Q(e,"values",e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>("backward"===n.direction||void 0===e.value&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),Rn=ie("$ZodNonOptional",(e,t)=>{zt.init(e,t),Q(e,"values",e=>{const t=e.def.innerType._zod.values;return t?new Set([...t].filter(e=>void 0!==e)):void 0}),e._zod.parse=(n,r)=>{const i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>jn(t,e)):jn(i,e)}});function jn(e,t){return e.issues.length||void 0!==e.value||e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}function Un(e,t,n,r){return t.issues.length?(e.value=n.catchValue({...t,value:e.value,error:{issues:t.issues.map(e=>D(e,r,ue()))},input:e.value}),e):(e.value=t.value,t.memo&&(e.memo=!0),e)}const Dn=ie("$ZodCatch",(e,t)=>{zt.init(e,t),Q(e,"optin",e=>"defaulted"===e.def.innerType._zod.optin?"defaulted":"optional"),Q(e,"optout",e=>e.def.innerType._zod.optout),Q(e,"values",e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>{if("backward"===n.direction)return t.innerType._zod.run(e,n);const r=t.innerType._zod.run({value:e.value,issues:[]},n);return r instanceof Promise?r.then(r=>Un(e,r,t,n)):Un(e,r,t,n)}}),Fn=ie("$ZodPipe",(e,t)=>{zt.init(e,t),Q(e,"values",e=>e.def.in._zod.values),Q(e,"optin",e=>e.def.in._zod.optin),Q(e,"optout",e=>e.def.out._zod.optout),Q(e,"propValues",e=>e.def.in._zod.propValues),e._zod.parse=(e,n)=>{if("backward"===n.direction){const r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>Ln(e,t.in,n)):Ln(r,t.in,n)}const r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>Ln(e,t.out,n)):Ln(r,t.out,n)}});function Ln(e,t,n){return e.issues.some(e=>"unrecognized_keys"!==e.code)?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const Gn=ie("$ZodReadonly",(e,t)=>{zt.init(e,t),Q(e,"propValues",e=>e.def.innerType._zod.propValues),Q(e,"values",e=>e.def.innerType._zod.values),Q(e,"optin",e=>e.def.innerType?._zod?.optin),Q(e,"optout",e=>e.def.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if("backward"===n.direction)return t.innerType._zod.run(e,n);const r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(Bn):Bn(r)}});function Bn(e){return e.memo||(e.value=Object.freeze(e.value)),e}const Jn=ie("$ZodCustom",(e,t)=>{nt.init(e,t),zt.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{const r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>Kn(t,n,r,e));Kn(i,n,r,e)}});function Kn(e,t,n,r){if(!e){const e={code:"custom",input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(B(e))}}class Vn extends Error{constructor(){super("Cannot parse a reference cycle that closes through a transform"),this.name="ZodCyclicError"}}const Wn="~memo",Yn=[];function Hn(e){return null!==e&&"object"==typeof e}function qn(e){return e.map(e=>e.path?{...e,path:e.path.slice()}:{...e})}const Qn=new WeakMap;function Xn(e,t,n){const r=Qn.get(e);if(void 0!==r)return r?2:0;if(t.has(e))return 2;t.add(e);let i=0;const o=e=>{if(2!==i&&e?._zod){const n=Xn(e,t);n>i&&(i=n)}},s=e=>{e>i&&(i=e)},a=e._zod.def;switch(a.type){case"object":{const e=f(a);s(e?(e=>{let n=0;for(const r of Reflect.ownKeys(e)){const i=Object.getOwnPropertyDescriptor(e,r);if(!i.enumerable)continue;const o=i.get?1:i.value?._zod?Xn(i.value,t):0;o>n&&(n=o)}return n})(e):1),o(a.catchall);break}case"array":o(a.element);break;case"tuple":for(const e of a.items)o(e);o(a.rest);break;case"record":case"map":o(a.keyType),o(a.valueType);break;case"set":o(a.valueType);break;case"union":for(const e of a.options)o(e);break;case"intersection":o(a.left),o(a.right);break;case"optional":case"nullable":case"default":case"prefault":case"catch":case"readonly":case"nonoptional":case"promise":case"success":o(a.innerType);break;case"pipe":o(a.in),o(a.out);break;case"function":o(a.input),o(a.output);break;case"lazy":{const e=a._cachedInner??void 0;s(e?Xn(e,t):1);break}case"template_literal":case"string":case"number":case"int":case"boolean":case"bigint":case"symbol":case"undefined":case"null":case"void":case"never":case"any":case"unknown":case"date":case"nan":case"enum":case"literal":case"file":case"transform":case"custom":break;default:for(const e in a){const t=Object.getOwnPropertyDescriptor(a,e);if(!t||t.get)continue;const n=t.value;if(n&&"object"==typeof n)if(n._zod)o(n);else if(Array.isArray(n))for(const e of n)o(e)}}return t.delete(e),function(e,t){1!==t&&Qn.set(e,2===t);return t}(e,i)}let er;const tr=[],nr={alloc(e,t,n){const r=er;if(!r)return n;er=void 0;const i={value:n,issues:null};return r.set(t.value,i),tr.push(i),n},guard(e){var t;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{const t=e._zod.parse,n=(e,n)=>{if("backward"!==n.direction&&function(e,t){const n=e[Wn]?.backEdges;return void 0!==n&&Hn(t)&&n.has(t)}(n,e.value))throw new Vn;return t(e,n)};e._zod.parse=n,e._zod.run===t&&(e._zod.run=n)})},attach(e){var t;let n,r,i,o=!1;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{const t=e._zod.parse,s=(a,u)=>{if(void 0===n){const r=Xn(e,new Set);if(0===r)return e._zod.parse=t,e._zod.run===s&&(e._zod.run=t),t(a,u);2===r||o?n=!0:o=!0}const c=a.value;if(!Hn(c))return t(a,u);let l,d=u[Wn];d||(d={buckets:new WeakMap,backEdges:void 0},u[Wn]=d),r===u?l=i:(l=function(e,t){let n=e.buckets.get(t);return n||(n=new WeakMap,e.buckets.set(t,n)),n}(d,e),r=u,i=l);const f=l.get(c);if(f)return a.value=f.value,f.issues?f.issues.length&&a.issues.push(...qn(f.issues)):(a.memo=!0,d.backEdges??(d.backEdges=new WeakSet),d.backEdges.add(f.value)),a;er=l;const p=tr.length,h=t(a,u);er=void 0;const m=tr.length>p?tr.pop():void 0;return h instanceof Promise?h.then(e=>(m&&(m.issues=e.issues.length?qn(e.issues):Yn),e)):(m&&(m.issues=h.issues.length?qn(h.issues):Yn),h)};e._zod.parse=s,e._zod.run===t&&(e._zod.run=s)})}};const rr=()=>{const e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}};function t(t){return e[t]??null}const n={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",currency_code:"currency code",credit_card:"credit card number",iban:"IBAN",jwt:"JWT",template_literal:"input"},r={nan:"NaN"};function i(e,t){return"number"!==e||"number"!=typeof t||Number.isFinite(t)?r[e]??e:String(t)}return e=>{switch(e.code){case"invalid_type":return`Invalid input: expected ${i(e.expected)}, received ${i(function(e){const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"nan":"number";case"object":{if(null===e)return"null";if(Array.isArray(e))return"array";const t=e;if(t&&Object.getPrototypeOf(t)!==Object.prototype&&"constructor"in t&&t.constructor)return t.constructor.name}}return t}(e.input),e.input)}`;case"invalid_value":return 1===e.values.length?`Invalid input: expected ${C(e.values[0])}`:`Invalid option: expected one of ${s(e.values,"|")}`;case"too_big":{const n=e.exact?"exactly ":e.inclusive?"<=":"<",r=t(e.origin);return r?`Too big: expected ${e.origin??"value"} to have ${n}${e.maximum.toString()} ${r.unit??"elements"}`:`Too big: expected ${e.origin??"value"} to be ${n}${e.maximum.toString()}`}case"too_small":{const n=e.exact?"exactly ":e.inclusive?">=":">",r=t(e.origin);return r?`Too small: expected ${e.origin} to have ${n}${e.minimum.toString()} ${r.unit}`:`Too small: expected ${e.origin} to be ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Invalid string: must start with "${t.prefix}"`:"ends_with"===t.format?`Invalid string: must end with "${t.suffix}"`:"includes"===t.format?`Invalid string: must include "${t.includes}"`:"regex"===t.format?`Invalid string: must match pattern ${t.pattern}`:`Invalid ${n[t.format]??e.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${e.divisor}`;case"unrecognized_keys":return`Unrecognized key${e.keys.length>1?"s":""}: ${s(e.keys,", ")}`;case"invalid_key":return`Invalid key in ${e.origin}`;case"invalid_union":if(e.options&&Array.isArray(e.options)&&e.options.length>0){return`Invalid discriminator value. Expected ${e.options.map(e=>`'${e}'`).join(" | ")}`}return!1===e.inclusive?"Invalid input: more than one option matched":"Invalid input";case"invalid_element":return`Invalid value in ${e.origin}`;default:return"Invalid input"}}};var ir;class or{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){const n=t[0];return this._map.set(e,n),n&&"object"==typeof n&&"id"in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){const t=this._map.get(e);return t&&"object"==typeof t&&"id"in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){const t=e._zod.parent;if(t){const n={...this.get(t)??{}};delete n.id;const r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}}(ir=globalThis).__zod_globalRegistry??(ir.__zod_globalRegistry=new or);const sr=globalThis.__zod_globalRegistry;function ar(e){return e.checks&&(e.checks=[...e.checks]),e}function ur(e,t){return new ot({check:"less_than",...I(t),value:e,inclusive:!1})}function cr(e,t){return new ot({check:"less_than",...I(t),value:e,inclusive:!0})}function lr(e,t){return new st({check:"greater_than",...I(t),value:e,inclusive:!1})}function dr(e,t){return new st({check:"greater_than",...I(t),value:e,inclusive:!0})}function fr(e,t){return new at({check:"multiple_of",...I(t),value:e})}function pr(e,t){return new ct({check:"max_length",...I(t),maximum:e})}function hr(e,t){return new lt({check:"min_length",...I(t),minimum:e})}function mr(e,t){return new dt({check:"length_equals",...I(t),length:e})}function gr(e){return new bt({check:"overwrite",tx:e})}function yr(e,t){const n=function(e,t){const n=new nt({check:"custom",...I(t)});return n._zod.check=e,n}(t=>(t.addIssue=e=>{if("string"==typeof e)t.issues.push(B(e,t.value,n._zod.def));else{const r=e;r.fatal&&(r.continue=!1),r.code??(r.code="custom"),"input"in r||(r.input=t.value),r.inst??(r.inst=n),r.continue??(r.continue=!n._zod.def.abort),t.issues.push(B(r))}},e(t.value,t)),t);return n}function vr(e,...t){for(const n of t)for(const t of Reflect.ownKeys(n))Object.prototype.propertyIsEnumerable.call(n,t)&&d(e,t,n[t]);return e}function br(e){let t=e?.target??"draft-2020-12";return"draft-4"===t&&(t="draft-04"),"draft-7"===t&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??sr,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,sharedDefsExtractedFor:void 0,sharedEmitDoneFor:void 0,cycles:e?.cycles??"ref",reused:e?.reused??"inline",intersections:[],deferred:[],external:e?.external??void 0}}function _r(e,t,n,r,i){const o="function"==typeof t.unrepresentable?t.unrepresentable({zodSchema:e,path:r.path,message:i}):t.unrepresentable;if("any"===o)return!1;if(void 0===o||"throw"===o)throw new Error(i);return Object.assign(n,o),!0}function wr(e,t,n={path:[],schemaPath:[]}){var r;const i=e._zod.def,o=t.seen.get(e);if(o){o.count++;return n.schemaPath.includes(e)&&(o.cycle=n.path),o.schema}const s={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,s),t.sharedDefsExtractedFor=void 0,t.sharedEmitDoneFor=void 0;const a=e._zod.toJSONSchema?.();if(a)s.schema=a;else{const r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,s.schema,r);else{const n=s.schema,o=t.processors[i.type];if(!o)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);o(e,t,n,r)}const o=e._zod.parent;o&&(s.ref||(s.ref=o),wr(o,t,r),t.seen.get(o).isParent=!0)}const u=t.metadataRegistry.get(e);u&&vr(s.schema,u),"input"===t.io&&Ar(e)&&(delete s.schema.examples,delete s.schema.default),"input"===t.io&&"_prefault"in s.schema&&((r=s.schema).default??(r.default=s.schema._prefault)),delete s.schema._prefault;return t.seen.get(e).schema}function zr(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function Sr(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");if(e.external&&e.sharedDefsExtractedFor===e.external)return;const r=new Map;for(const t of e.seen.entries()){const n=e.metadataRegistry.get(t[0])?.id;if(n){const e=r.get(n);if(e&&e!==t[0])throw new Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}const i=t=>{if(t[1].schema.$ref)return;const r=t[1],{ref:i,defId:o}=(t=>{const r="draft-2020-12"===e.target?"$defs":"definitions";if(e.external){const n=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(n)return{ref:i(n)};const o=t[1].defId??t[1].schema.id??"schema"+e.counter++;return t[1].defId=o,{defId:o,ref:`${i("__shared")}#/${r}/${zr(o)}`}}const i=`#/${r}/`;if(t[1]===n&&!t[1].schema.id)return{ref:"#"};const o=t[1].schema.id??"__schema"+e.counter++;return{defId:o,ref:i+zr(o)}})(t);r.def={...r.schema},o&&(r.defId=o);const s=r.schema;for(const e in s)delete s[e];s.$ref=i};if("throw"===e.cycles)for(const t of e.seen.entries()){const e=t[1];if(e.cycle)throw new Error(`Cycle detected: #/${e.cycle?.join("/")}/<root>\n\nSet the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const n of e.seen.entries()){const r=n[1];if(t===n[0]){i(n);continue}if(e.external){const r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){i(n);continue}}const o=e.metadataRegistry.get(n[0])?.id;o?i(n):(r.cycle||r.count>1&&"ref"===e.reused)&&i(n)}e.external&&(e.sharedDefsExtractedFor=e.external)}function kr(e){const t=e.anyOf;if(!Array.isArray(t)||0===t.length||void 0!==e.type)return;const n=[];for(const e of t){if(!e||"object"!=typeof e)return;kr(e);const t=Object.keys(e);if(1!==t.length||"type"!==t[0])return;const r=e.type;for(const e of Array.isArray(r)?r:[r]){if("string"!=typeof e)return;n.includes(e)||n.push(e)}}delete e.anyOf,e.type=1===n.length?n[0]:n}const Or=new Set(["type","properties","required","additionalProperties"]),$r=["oneOf","anyOf"];function Ir(e){const t=e.additionalProperties;return void 0===t||!1===t||"object"!=typeof t||null===t?null:Object.keys(t).length?t:null}function Cr(e){const t=[];for(const n of e){if("object"!=typeof n||"object"!==n.type)return null;for(const e in n)if(!Or.has(e))return null;t.push(n)}const n={},r=new Set;for(const e of t){for(const r in e.properties){if(Object.prototype.hasOwnProperty.call(n,r))continue;const e=[];for(const n of t){const t=n.properties?.[r]??Ir(n);null!=t&&(e.some(e=>JSON.stringify(e)===JSON.stringify(t))||e.push(t))}d(n,r,1===e.length?e[0]:Cr(e)??{allOf:e})}for(const t of e.required??[])r.add(t)}const i={type:"object",properties:n};if(r.size&&(i.required=[...r]),t.every(e=>!1===e.additionalProperties))i.additionalProperties=!1;else{const e=[];for(const n of t){const t=Ir(n);t&&!e.some(e=>JSON.stringify(e)===JSON.stringify(t))&&e.push(t)}1===e.length?i.additionalProperties=e[0]:e.length>1&&(i.additionalProperties={allOf:e})}return i}function Tr(e){const t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(const t of Or)if(t in e)return;const n=t.filter(e=>$r.some(t=>Array.isArray(e[t])));let r=null;if(n.length){const e=n[0],i=$r.find(t=>Array.isArray(e[t]));if(1!==Object.keys(e).length)return;const o=t.filter(t=>t!==e),s=e[i].map(e=>Cr([...o,e]));if(s.some(e=>!e))return;r={[i]:s}}else r=Cr(t);r&&(delete e.allOf,vr(e,r))}function Er(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=t=>{const n=e.seen.get(t);if(null===n.ref)return;const i=n.def??n.schema,o={...i},s=n.ref;if(n.ref=null,s){r(s);const n=e.seen.get(s),a=n.schema;!a.$ref||"draft-07"!==e.target&&"draft-04"!==e.target&&"openapi-3.0"!==e.target?vr(i,a):(i.allOf=i.allOf??[],i.allOf.push(a)),vr(i,o);if(t._zod.parent===s)for(const e in i)"$ref"!==e&&"allOf"!==e&&(e in o||delete i[e]);if(a.$ref&&n.def)for(const e in i)"$ref"!==e&&"allOf"!==e&&e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}const a=t._zod.parent;if(a&&a!==s){r(a);const t=e.seen.get(a);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(const e in i)"$ref"!==e&&"allOf"!==e&&e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(const t of[...e.seen.entries()].reverse())r(t[0]);if("openapi-3.0"!==e.target)for(const t of e.seen.entries())kr(t[1].def??t[1].schema);for(const t of e.deferred)t();if(e.intersections.length){const t=new Map;for(const n of e.seen.values())for(const e of[n.schema,n.def]){const n=e?.allOf;if(!Array.isArray(n))continue;const r=t.get(n);r?r.push(e):t.set(n,[e])}for(const n of e.intersections)for(const e of t.get(n)??[])Tr(e)}}const i={};if("draft-2020-12"===e.target?i.$schema="https://json-schema.org/draft/2020-12/schema":"draft-07"===e.target?i.$schema="http://json-schema.org/draft-07/schema#":"draft-04"===e.target?i.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const n=e.external.registry.get(t)?.id;if(!n)throw new Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}vr(i,n.defId?n.schema:n.def??n.schema);const o=e.metadataRegistry.get(t)?.id;void 0!==o&&i.id===o&&delete i.id;const s=e.external?.defs??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(const t of e.seen.entries()){const e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,d(s,e.defId,e.def))}e.external&&(e.sharedEmitDoneFor=e.external),e.external||Object.keys(s).length>0&&("draft-2020-12"===e.target?i.$defs=s:i.definitions=s);try{const n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,"~standard",{value:{...t["~standard"],jsonSchema:{input:xr(t,"input",e.processors),output:xr(t,"output",e.processors)}},enumerable:!1,writable:!1}),n}catch(e){throw new Error("Error converting schema to JSON.")}}function Ar(e,t){const n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);const r=e._zod.def;if("transform"===r.type)return!0;if("array"===r.type)return Ar(r.element,n);if("set"===r.type)return Ar(r.valueType,n);if("lazy"===r.type)return Ar(r.getter(),n);if("promise"===r.type||"optional"===r.type||"nonoptional"===r.type||"nullable"===r.type||"readonly"===r.type||"default"===r.type||"prefault"===r.type||"catch"===r.type)return Ar(r.innerType,n);if("intersection"===r.type)return Ar(r.left,n)||Ar(r.right,n);if("record"===r.type||"map"===r.type)return Ar(r.keyType,n)||Ar(r.valueType,n);if("pipe"===r.type)return!!e._zod.traits.has("$ZodCodec")||(Ar(r.in,n)||Ar(r.out,n));if("object"===r.type){for(const e in r.shape)if(Ar(r.shape[e],n))return!0;return!1}if("union"===r.type){for(const e of r.options)if(Ar(e,n))return!0;return!1}if("tuple"===r.type){for(const e of r.items)if(Ar(e,n))return!0;return!(!r.rest||!Ar(r.rest,n))}return!1}const xr=(e,t,n={})=>r=>{const{libraryOptions:i,target:o}=r??{},s=br({...i??{},target:o,io:t,processors:n});return wr(e,s),Sr(s,e),Er(s,e)},Nr=(e,t,n)=>{(void 0===e[t]||n>e[t])&&(e[t]=n)},Pr=(e,t,n)=>{(void 0===e[t]||n<e[t])&&(e[t]=n)},Zr=(e,t)=>{Nr(e,"minimum",t),Pr(e,"maximum",t)},Mr=(e,t)=>{e.multipleOf??(e.multipleOf=[]),e.multipleOf.includes(t)||e.multipleOf.push(t)},Rr=(e,t)=>{e.patterns??(e.patterns=new Set),e.patterns.add(t)},jr=(e,t)=>{e.mime=e.mime?e.mime.filter(e=>t.includes(e)):[...t]},Ur=(e,t)=>{e.format=t,t.includes("int")&&(e.isInt=!0)},Dr=(e,t)=>Nr(e,"minimum",t.minimum),Fr=(e,t)=>Pr(e,"maximum",t.maximum),Lr=e=>(t,n)=>{Ur(t,n.format);const[r,i]=e[n.format];Nr(t,"minimum",r),Pr(t,"maximum",i)},Gr={greater_than:(e,t)=>Nr(e,t.inclusive?"minimum":"exclusiveMinimum",t.value),less_than:(e,t)=>Pr(e,t.inclusive?"maximum":"exclusiveMaximum",t.value),multiple_of:(e,t)=>Mr(e,t.value),number_format:Lr(T),bigint_format:Lr(E),min_length:Dr,max_length:Fr,length_equals:(e,t)=>Zr(e,t.length),min_size:Dr,max_size:Fr,size_equals:(e,t)=>Zr(e,t.size),string_format:(e,t)=>{Ur(e,t.format),t.pattern&&Rr(e,t.pattern),"base64"!==t.format&&"base64url"!==t.format||(e.contentEncoding=t.format),(t.local||-1===t.precision)&&(e.laxFormat=!0)},mime_type:(e,t)=>jr(e,t.mime)};function Br(e){const t={},n=e._zod.def,r=e._zod.traits.has("$ZodCheck")?[e,...n.checks??[]]:n.checks??[];for(const e of r)Gr[e._zod.def.check]?.(t,e._zod.def);const i=e._zod.bag;void 0!==i.minimum&&Nr(t,"minimum",i.minimum),void 0!==i.exclusiveMinimum&&Nr(t,"exclusiveMinimum",i.exclusiveMinimum),void 0!==i.maximum&&Pr(t,"maximum",i.maximum),void 0!==i.exclusiveMaximum&&Pr(t,"exclusiveMaximum",i.exclusiveMaximum),void 0!==i.multipleOf&&Mr(t,i.multipleOf),void 0!==i.format&&(t.format??(t.format=i.format),i.format.includes("int")&&(t.isInt=!0)),i.mime&&jr(t,i.mime);for(const e of i.patterns??[])Rr(t,e);return t}const Jr={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Kr=new Map([[Xt,/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/],[tn,/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/]]),Vr=e=>Kr.get(e)??e;function Wr(e){const t=e._zod.def;return"pipe"===t.type&&t.in._zod.traits.has("$ZodTransform")?Wr(t.out):"catch"===t.type?Wr(t.innerType):e._zod.optin}const Yr=Symbol();function Hr(e,t,n,r,i){let o=!1;const s=JSON.stringify(e,(e,t)=>"bigint"!=typeof t?t:(o=!0,null));return o?(_r(t,n,r,i,"BigInt defaults cannot be represented in JSON Schema"),Yr):JSON.parse(s)}const qr=(e,t,n,r)=>{const i=e._zod.def;wr(i.innerType,t,r);t.seen.get(e).ref=i.innerType},Qr=new WeakSet([Object.prototype,Error.prototype]);function Xr(e,t,n){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,get(){const e=n(this);return Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0})}})}const ei=(e,t)=>{fe.init(e,t),e.name="ZodError";const n=Object.getPrototypeOf(e);Qr.has(n)||(Qr.add(n),Xr(n,"format",e=>t=>function(e,t=e=>e.message){const n={_errors:[]},r=(e,i=[])=>{for(const o of e.issues)if("invalid_union"===o.code&&o.errors.length)o.errors.map(e=>r({issues:e},[...i,...o.path]));else if("invalid_key"===o.code)r({issues:o.issues},[...i,...o.path]);else if("invalid_element"===o.code)r({issues:o.issues},[...i,...o.path]);else{const e=[...i,...o.path];if(0===e.length)n._errors.push(t(o));else{let r=n,i=0;for(;i<e.length;){const n=e[i],s=i===e.length-1;if("_errors"===n){s&&r._errors.push(t(o)),i++;continue}Object.prototype.hasOwnProperty.call(r,n)||Object.defineProperty(r,n,{value:{_errors:[]},enumerable:!0,writable:!0,configurable:!0});const a=r[n];s&&a._errors.push(t(o)),r=a,i++}}}};return r(e),n}(e,t)),Xr(n,"flatten",e=>t=>function(e,t=e=>e.message){const n={},r=[];for(const i of e.issues)i.path.length>0?pe(n,i.path[0],()=>[]).push(t(i)):r.push(t(i));return{formErrors:r,fieldErrors:n}}(e,t)),Xr(n,"addIssue",e=>t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,a,2)}),Xr(n,"addIssues",e=>t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,a,2)}),Object.defineProperty(n,"isEmpty",{configurable:!0,enumerable:!1,get(){return 0===this.issues.length}}))},ti=ie("ZodError",ei,void 0,{Parent:Error}),ni=me(ti),ri=ge(ti),ii=ye(ti),oi=be(ti),si=Se(ti),ai=ke(ti),ui=Oe(ti),ci=$e(ti),li=Ie(ti),di=Ce(ti),fi=Te(ti),pi=Ee(ti);function hi(){ae.localeError||ue({localeError:rr()})}function mi(){ae.memoizer||ue({memoizer:nr})}const gi=ie("ZodType",(e,t)=>(hi(),zt.init(e,t),e.def=t,e.type=t.type,e),{check(...e){const t=this.def;return this.clone(y(t,{checks:[...t.checks??[],...e.map(e=>"function"==typeof e?{_zod:{check:e,def:{check:"custom"},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return $(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(function(e,t={}){return function(e,t,n){return new e({type:"custom",check:"custom",fn:t,...I(n)})}(To,e,t)}(e,t))},superRefine(e,t){return this.check(function(e,t){return yr(e,t)}(e,t))},overwrite(e){return this.check(gr(e))},optional(){return vo(this)},exactOptional(){return new bo({type:"optional",innerType:this})},nullable(){return wo(this)},nullish(){return vo(wo(this))},nonoptional(e){return function(e,t){return new ko({type:"nonoptional",innerType:e,...I(t)})}(this,e)},array(){return ro(this)},or(e){return ao([this,e])},and(e){return new lo({type:"intersection",left:this,right:e})},transform(e){return Io(this,new go({type:"transform",transform:e}))},default(e){return t=e,new zo({type:"default",innerType:this,get defaultValue(){return"function"==typeof t?t():S(t)}});var t},prefault(e){return t=e,new So({type:"prefault",innerType:this,get defaultValue(){return"function"==typeof t?t():S(t)}});var t},catch(e){return new Oo({type:"catch",innerType:this,catchValue:"function"==typeof(t=e)?t:ee(t)});var t},pipe(e){return Io(this,e)},readonly(){return new Co({type:"readonly",innerType:this})},describe(e){const t=this.clone();return sr.add(t,{description:e}),t},meta(...e){if(0===e.length)return sr.get(this);const t=this.clone();return sr.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...t){return 0===t.length?e(this):e(this,...t)},get"~standard"(){return K(this,"~standard",{...kt(this),jsonSchema:{input:xr(this,"input"),output:xr(this,"output")}})},set"~standard"(e){J(this,"~standard",e)},parse:function e(t,n){return ni(this,t,n,{callee:e})},parseAsync:async function e(t,n){return await ri(this,t,n,{callee:e})},safeParse(e,t){return ii(this,e,t)},async safeParseAsync(e,t){return oi(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){J(this,"spa",e)},validate(e,t){return ze(this,e,t)},validateAsync(e,t){return(async(e,t,n)=>{const r=n?{...n,async:!0,abortEarly:!0}:{async:!0,abortEarly:!0};let i=e._zod.run({value:t,issues:[]},r);return i instanceof Promise&&(i=await i),0===i.issues.length})(this,e,t)},encode:function e(t,n){return si(this,t,n,{callee:e})},decode:function e(t,n){return ai(this,t,n,{callee:e})},encodeAsync:async function e(t,n){return await ui(this,t,n,{callee:e})},decodeAsync:async function e(t,n){return await ci(this,t,n,{callee:e})},safeEncode(e,t){return li(this,e,t)},safeDecode(e,t){return di(this,e,t)},async safeEncodeAsync(e,t){return fi(this,e,t)},async safeDecodeAsync(e,t){return pi(this,e,t)},toJSONSchema(e){return((e,t={})=>n=>{const r=br({...n,processors:t});return wr(e,r),Sr(r,e),Er(r,e)})(this,{})(e)},get description(){return sr.get(this)?.description},get _def(){return this._zod.def}}),yi=ie("_ZodString",(e,t)=>{Ot.init(e,t),gi.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n)=>{const r=n;r.type="string";const{minimum:i,maximum:o,format:s,patterns:a,contentEncoding:u,laxFormat:c}=Br(e);if("number"==typeof i&&(r.minLength=i),"number"==typeof o&&(r.maxLength=o),s&&(r.format=Jr[s]??s,""===r.format&&delete r.format,("time"===s||c)&&delete r.format),u&&(r.contentEncoding=u),a&&a.size>0){const e=[...a].map(Vr);1===e.length?r.pattern=e[0].source:e.length>1&&(r.allOf=[...e.map(e=>({..."draft-07"===t.target||"draft-04"===t.target||"openapi-3.0"===t.target?{type:"string"}:{},pattern:e.source}))])}})(e,t,n)},V({format:e=>Br(e).format??null,minLength:e=>Br(e).minimum??null,maxLength:e=>Br(e).maximum??null},{regex(...e){return this.check(function(e,t){return new pt({check:"string_format",format:"regex",...I(t),pattern:e})}(...e))},includes(...e){return this.check(function(e,t){return new gt({check:"string_format",format:"includes",...I(t),includes:e})}(...e))},startsWith(...e){return this.check(function(e,t){return new yt({check:"string_format",format:"starts_with",...I(t),prefix:e})}(...e))},endsWith(...e){return this.check(function(e,t){return new vt({check:"string_format",format:"ends_with",...I(t),suffix:e})}(...e))},min(...e){return this.check(hr(...e))},max(...e){return this.check(pr(...e))},length(...e){return this.check(mr(...e))},nonempty(...e){return this.check(hr(1,...e))},lowercase(e){return this.check(function(e){return new ht({check:"string_format",format:"lowercase",...I(e)})}(e))},uppercase(e){return this.check(function(e){return new mt({check:"string_format",format:"uppercase",...I(e)})}(e))},trim(){return this.check(gr(e=>e.trim()))},normalize(...e){return this.check(function(e){return gr(t=>t.normalize(e))}(...e))},toLowerCase(){return this.check(gr(e=>e.toLowerCase()))},toUpperCase(){return this.check(gr(e=>e.toUpperCase()))},slugify(){return this.check(gr(e=>function(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}(e)))}})),vi=ie("ZodString",(e,t)=>{Ot.init(e,t),yi.init(e,t)},{email(e){return this.check(function(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...I(t)})}(Oi,e))},url(e){return this.check(function(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...I(t)})}(Ci,e))},jwt(e){return this.check(function(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...I(t)})}(Gi,e))},emoji(e){return this.check(function(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...I(t)})}(Ti,e))},guid(e){return this.check(function(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...I(t)})}($i,e))},uuid(e){return this.check(function(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...I(t)})}(Ii,e))},uuidv4(e){return this.check(function(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...I(t)})}(Ii,e))},uuidv6(e){return this.check(function(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...I(t)})}(Ii,e))},uuidv7(e){return this.check(function(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...I(t)})}(Ii,e))},nanoid(e){return this.check(function(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...I(t)})}(Ei,e))},cuid(e){return this.check(function(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...I(t)})}(Ai,e))},cuid2(e){return this.check(function(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...I(t)})}(xi,e))},ulid(e){return this.check(function(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...I(t)})}(Ni,e))},base64(e){return this.check(function(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...I(t)})}(Di,e))},base64url(e){return this.check(function(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...I(t)})}(Fi,e))},xid(e){return this.check(function(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...I(t)})}(Pi,e))},ksuid(e){return this.check(function(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...I(t)})}(Zi,e))},ipv4(e){return this.check(function(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...I(t)})}(Mi,e))},ipv6(e){return this.check(function(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...I(t)})}(Ri,e))},cidrv4(e){return this.check(function(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...I(t)})}(ji,e))},cidrv6(e){return this.check(function(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...I(t)})}(Ui,e))},e164(e){return this.check(function(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...I(t)})}(Li,e))},datetime(e){return this.check(function(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...I(t)})}(wi,e))},date(e){return this.check(function(e,t){return new e({type:"string",format:"date",check:"string_format",...I(t)})}(zi,e))},time(e){return this.check(function(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...I(t)})}(Si,e))},duration(e){return this.check(function(e,t){return new e({type:"string",format:"duration",check:"string_format",...I(t)})}(ki,e))}});function bi(e){return function(e,t){return new e(ar({type:"string",...I(t)}))}(vi,e)}const _i=ie("ZodStringFormat",(e,t)=>{$t.init(e,t),yi.init(e,t)}),wi=ie("ZodISODateTime",(e,t)=>{Lt.init(e,t),_i.init(e,t)}),zi=ie("ZodISODate",(e,t)=>{Gt.init(e,t),_i.init(e,t)}),Si=ie("ZodISOTime",(e,t)=>{Bt.init(e,t),_i.init(e,t)}),ki=ie("ZodISODuration",(e,t)=>{Jt.init(e,t),_i.init(e,t)}),Oi=ie("ZodEmail",(e,t)=>{Tt.init(e,t),_i.init(e,t)}),$i=ie("ZodGUID",(e,t)=>{It.init(e,t),_i.init(e,t)}),Ii=ie("ZodUUID",(e,t)=>{Ct.init(e,t),_i.init(e,t)}),Ci=ie("ZodURL",(e,t)=>{Pt.init(e,t),_i.init(e,t)}),Ti=ie("ZodEmoji",(e,t)=>{Zt.init(e,t),_i.init(e,t)}),Ei=ie("ZodNanoID",(e,t)=>{Mt.init(e,t),_i.init(e,t)}),Ai=ie("ZodCUID",(e,t)=>{Rt.init(e,t),_i.init(e,t)}),xi=ie("ZodCUID2",(e,t)=>{jt.init(e,t),_i.init(e,t)}),Ni=ie("ZodULID",(e,t)=>{Ut.init(e,t),_i.init(e,t)}),Pi=ie("ZodXID",(e,t)=>{Dt.init(e,t),_i.init(e,t)}),Zi=ie("ZodKSUID",(e,t)=>{Ft.init(e,t),_i.init(e,t)}),Mi=ie("ZodIPv4",(e,t)=>{Kt.init(e,t),_i.init(e,t)}),Ri=ie("ZodIPv6",(e,t)=>{Yt.init(e,t),_i.init(e,t)}),ji=ie("ZodCIDRv4",(e,t)=>{Ht.init(e,t),_i.init(e,t)}),Ui=ie("ZodCIDRv6",(e,t)=>{qt.init(e,t),_i.init(e,t)}),Di=ie("ZodBase64",(e,t)=>{en.init(e,t),_i.init(e,t)}),Fi=ie("ZodBase64URL",(e,t)=>{nn.init(e,t),_i.init(e,t)}),Li=ie("ZodE164",(e,t)=>{rn.init(e,t),_i.init(e,t)}),Gi=ie("ZodJWT",(e,t)=>{on.init(e,t),_i.init(e,t)}),Bi=ie("ZodNumber",(e,t)=>{sn.init(e,t),gi.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const i=n,{minimum:o,maximum:s,multipleOf:a,exclusiveMaximum:u,exclusiveMinimum:c,isInt:l}=Br(e);i.type=l?"integer":"number";const d="number"==typeof c&&c>=(o??Number.NEGATIVE_INFINITY),f="number"==typeof u&&u<=(s??Number.POSITIVE_INFINITY),p="draft-04"===t.target||"openapi-3.0"===t.target;if(d?p?(i.minimum=c,i.exclusiveMinimum=!0):i.exclusiveMinimum=c:"number"==typeof o&&(i.minimum=o),f?p?(i.maximum=u,i.exclusiveMaximum=!0):i.exclusiveMaximum=u:"number"==typeof s&&(i.maximum=s),a){const n=new Set;for(const o of a)Number.isFinite(o)&&0!==o?n.add(Math.abs(o)):_r(e,t,i,r,`A multipleOf divisor of ${o} cannot be represented in JSON Schema`);const[o,...s]=n;void 0!==o&&(i.multipleOf=o),s.length&&(i.allOf=[...i.allOf??[],...s.map(e=>({multipleOf:e}))])}})(e,t,n,r),e.isFinite=!0},V({minValue:e=>{const{minimum:t,exclusiveMinimum:n}=Br(e);return Math.max(t??Number.NEGATIVE_INFINITY,n??Number.NEGATIVE_INFINITY)},maxValue:e=>{const{maximum:t,exclusiveMaximum:n}=Br(e);return Math.min(t??Number.POSITIVE_INFINITY,n??Number.POSITIVE_INFINITY)},isInt:e=>{const{isInt:t,multipleOf:n}=Br(e);return!!t||!!n?.some(Number.isSafeInteger)},format:e=>Br(e).format??null},{gt(e,t){return this.check(lr(e,t))},gte(e,t){return this.check(dr(e,t))},min(e,t){return this.check(dr(e,t))},lt(e,t){return this.check(ur(e,t))},lte(e,t){return this.check(cr(e,t))},max(e,t){return this.check(cr(e,t))},int(e){return this.check(Vi(e))},safe(e){return this.check(Vi(e))},positive(e){return this.check(lr(0,e))},nonnegative(e){return this.check(dr(0,e))},negative(e){return this.check(ur(0,e))},nonpositive(e){return this.check(cr(0,e))},multipleOf(e,t){return this.check(fr(e,t))},step(e,t){return this.check(fr(e,t))},finite(){return this}}));function Ji(e){return function(e,t){return new e(ar({type:"number",checks:[],...I(t)}))}(Bi,e)}const Ki=ie("ZodNumberFormat",(e,t)=>{an.init(e,t),Bi.init(e,t)});function Vi(e){return function(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...I(t)})}(Ki,e)}const Wi=ie("ZodBoolean",(e,t)=>{un.init(e,t),gi.init(e,t),e._zod.processJSONSchema=(e,t,n)=>((e,t,n)=>{n.type="boolean"})(0,0,t)});function Yi(e){return function(e,t){return new e({type:"boolean",...I(t)})}(Wi,e)}const Hi=ie("ZodAny",(e,t)=>{cn.init(e,t),gi.init(e,t),e._zod.processJSONSchema=(e,t,n)=>{}});function qi(){return new Hi({type:"any"})}const Qi=ie("ZodUnknown",(e,t)=>{ln.init(e,t),gi.init(e,t),e._zod.processJSONSchema=(e,t,n)=>{}});function Xi(){return new Qi({type:"unknown"})}const eo=ie("ZodNever",(e,t)=>{dn.init(e,t),gi.init(e,t),e._zod.processJSONSchema=(e,t,n)=>((e,t,n)=>{n.not={}})(0,0,t)});function to(e){return function(e,t){return new e({type:"never",...I(t)})}(eo,e)}const no=ie("ZodArray",(e,t)=>{mi(),hn.init(e,t),gi.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const i=n,o=e._zod.def,{minimum:s,maximum:a}=Br(e);"number"==typeof s&&(i.minItems=s),"number"==typeof a&&(i.maxItems=a),i.type="array",i.items=wr(o.element,t,{...r,path:[...r.path,"items"]})})(e,t,n,r),e.element=t.element},{min(e,t){return this.check(hr(e,t))},nonempty(e){return this.check(hr(1,e))},max(e,t){return this.check(pr(e,t))},length(e,t){return this.check(mr(e,t))},unwrap(){return this.element}});function ro(e,t){return function(e,t,n){return new e({type:"array",element:t,...I(n)})}(no,e,t)}const io=ie("ZodObject",(e,t)=>{mi(),_n.init(e,t),gi.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const i=n,o=e._zod.def,s=o.shape;if(Object.getOwnPropertySymbols(s).length&&_r(e,t,i,r,"Symbol keys cannot be represented in JSON Schema"))return;i.type="object",i.properties={};for(const e in s)d(i.properties,e,wr(s[e],t,{...r,path:[...r.path,"properties",e]}));const a=[];for(const e of Object.keys(s)){const n=o.shape[e];("input"===t.io?void 0===Wr(n):void 0===n._zod.optout)&&a.push(e)}a.length>0&&(i.required=a),"never"===o.catchall?._zod.def.type?i.additionalProperties=!1:o.catchall?o.catchall&&(i.additionalProperties=wr(o.catchall,t,{...r,path:[...r.path,"additionalProperties"]})):"output"===t.io&&(i.additionalProperties=!1)})(e,t,n,r),X(e,"shape",e=>e._zod.def.shape,!1)},{keyof(){return po(Object.keys(this._zod.def.shape))},catchall(e){return this.clone(y(this._zod.def,{catchall:e}))},passthrough(){return this.clone(y(this._zod.def,{catchall:Xi()}))},loose(){return this.clone(y(this._zod.def,{catchall:Xi()}))},strict(){return this.clone(y(this._zod.def,{catchall:to()}))},strip(){return this.clone(y(this._zod.def,{catchall:void 0}))},extend(e){return function(e,t){if(!z(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0){const n=p(e);for(const e of Reflect.ownKeys(t))if(void 0!==Object.getOwnPropertyDescriptor(n,e))throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return $(e,y(e._zod.def,{shape:x(e,t)}))}(this,e)},safeExtend(e){return function(e,t){if(!z(t))throw new Error("Invalid input to safeExtend: expected a plain object");return $(e,y(e._zod.def,{shape:x(e,t)}))}(this,e)},merge(e){return function(e,t){if(!t?._zod?.def)throw new Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(e._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");const n={};return g(n,e,Reflect.ownKeys(p(e))),g(n,t,Reflect.ownKeys(p(t))),$(e,y(e._zod.def,{shape:n,get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}(this,e)},pick(e){return function(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const i={};return g(i,e,A(e,t)),$(e,y(n,{shape:i,checks:[]}))}(this,e)},omit(e){return function(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const i=new Set(A(e,t)),o={};return g(o,e,Reflect.ownKeys(p(e)).filter(e=>!i.has(e))),$(e,y(n,{shape:o,checks:[]}))}(this,e)},partial(...e){return N(yo,this,e[0])},exactPartial(...e){return N(bo,this,e[0],"exactPartial")},required(...e){return function(e,t,n){const r=n?new Set(A(t,n)):void 0,i={};return g(i,t,Reflect.ownKeys(p(t)),(t,n)=>r&&!r.has(n)?t:new e({type:"nonoptional",innerType:t})),$(t,y(t._zod.def,{shape:i}))}(ko,this,e[0])}});function oo(e,t){const n={type:"object",shape:e??{},...I(t)};return new io(n)}const so=ie("ZodUnion",(e,t)=>{zn.init(e,t),gi.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const i=e._zod.def,o=!1===i.inclusive,s=i.options.map((e,n)=>wr(e,t,{...r,path:[...r.path,o?"oneOf":"anyOf",n]}));o?n.oneOf=s:n.anyOf=s})(e,t,n,r),e.options=t.options});function ao(e,t){return new so({type:"union",options:e,...I(t)})}const uo=ie("ZodDiscriminatedUnion",(e,t)=>{so.init(e,t),Sn.init(e,t)});function co(e,t,n){return new uo({type:"union",options:t,discriminator:e,...I(n)})}const lo=ie("ZodIntersection",(e,t)=>{kn.init(e,t),gi.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const i=e._zod.def,o=wr(i.left,t,{...r,path:[...r.path,"allOf",0]}),s=wr(i.right,t,{...r,path:[...r.path,"allOf",1]}),a=e=>"allOf"in e&&1===Object.keys(e).length,u=[...a(o)?o.allOf:[o],...a(s)?s.allOf:[s]];n.allOf=u,t.intersections.push(u)})(e,t,n,r)});const fo=ie("ZodEnum",(e,t)=>{In.init(e,t),gi.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n)=>{const r=o(e._zod.def.entries);0!==r.length?(r.every(e=>"number"==typeof e)&&(n.type="number"),r.every(e=>"string"==typeof e)&&(n.type="string"),n.enum=r):n.not={}})(e,0,n),e.enum=t.entries,e.options=[...e._zod.values];const n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{const i={};for(const r of e){if(!n.has(r))throw new Error(`Key ${r} not found in enum`);i[r]=t.entries[r]}return new fo({...t,checks:[],...I(r),entries:i})},e.exclude=(e,r)=>{const i={...t.entries};for(const t of e){if(!n.has(t))throw new Error(`Key ${t} not found in enum`);delete i[t]}return new fo({...t,checks:[],...I(r),entries:i})}});function po(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e;return new fo({type:"enum",entries:n,...I(t)})}const ho=ie("ZodLiteral",(e,t)=>{Cn.init(e,t),gi.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const i=e._zod.def;if(0===i.values.length)return void(n.not={});const o=[];for(const s of i.values)if(void 0===s){if(_r(e,t,n,r,"Literal `undefined` cannot be represented in JSON Schema"))return}else if("bigint"==typeof s){if(_r(e,t,n,r,"BigInt literals cannot be represented in JSON Schema"))return;o.push(Number(s))}else o.push(s);if(0===o.length);else if(1===o.length){const e=o[0];n.type=null===e?"null":typeof e,"draft-04"===t.target||"openapi-3.0"===t.target?n.enum=[e]:n.const=e}else o.every(e=>"number"==typeof e)&&(n.type="number"),o.every(e=>"string"==typeof e)&&(n.type="string"),o.every(e=>"boolean"==typeof e)&&(n.type="boolean"),o.every(e=>null===e)&&(n.type="null"),n.enum=o})(e,t,n,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function mo(e,t){return new ho({type:"literal",values:Array.isArray(e)?e:[e],...I(t)})}const go=ie("ZodTransform",(e,t)=>{mi(),Tn.init(e,t),gi.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{_r(e,t,n,r,"Transforms cannot be represented in JSON Schema")})(e,t,n,r),e._zod.parse=(n,r)=>{if("backward"===r.direction)throw new se(e.constructor.name);n.addIssue=r=>{if("string"==typeof r)n.issues.push(B(r,n.value,t));else{const t=r;t.fatal&&(t.continue=!1),t.code??(t.code="custom"),"input"in t||(t.input=n.value),t.inst??(t.inst=e),n.issues.push(B(t))}};const i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}});const yo=ie("ZodOptional",(e,t)=>{An.init(e,t),gi.init(e,t),e._zod.processJSONSchema=(t,n,r)=>qr(e,t,0,r),e.unwrap=()=>e._zod.def.innerType});function vo(e){return new yo({type:"optional",innerType:e})}const bo=ie("ZodExactOptional",(e,t)=>{xn.init(e,t),gi.init(e,t),e._zod.processJSONSchema=(t,n,r)=>qr(e,t,0,r),e.unwrap=()=>e._zod.def.innerType});const _o=ie("ZodNullable",(e,t)=>{Nn.init(e,t),gi.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const i=e._zod.def,o=wr(i.innerType,t,r),s=t.seen.get(e);"openapi-3.0"===t.target?(s.ref=i.innerType,n.nullable=!0):n.anyOf=[o,{type:"null"}]})(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function wo(e){return new _o({type:"nullable",innerType:e})}const zo=ie("ZodDefault",(e,t)=>{Pn.init(e,t),gi.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const i=e._zod.def;wr(i.innerType,t,r),t.seen.get(e).ref=i.innerType;const o=Hr(i.defaultValue,e,t,n,r);o!==Yr&&(n.default=o)})(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});const So=ie("ZodPrefault",(e,t)=>{Mn.init(e,t),gi.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const i=e._zod.def;if(wr(i.innerType,t,r),t.seen.get(e).ref=i.innerType,"input"!==t.io)return;const o=Hr(i.defaultValue,e,t,n,r);o!==Yr&&(n._prefault=o)})(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});const ko=ie("ZodNonOptional",(e,t)=>{Rn.init(e,t),gi.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const i=e._zod.def;wr(i.innerType,t,r),t.seen.get(e).ref=i.innerType})(e,t,0,r),e.unwrap=()=>e._zod.def.innerType});const Oo=ie("ZodCatch",(e,t)=>{Dn.init(e,t),gi.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const i=e._zod.def;let o;wr(i.innerType,t,r),t.seen.get(e).ref=i.innerType;try{o=i.catchValue(void 0)}catch{return void _r(e,t,n,r,"Dynamic catch values are not supported in JSON Schema")}n.default=o})(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});const $o=ie("ZodPipe",(e,t)=>{Fn.init(e,t),gi.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const i=e._zod.def,o=i.in._zod.traits.has("$ZodTransform"),s="input"===t.io?o?i.out:i.in:i.out;wr(s,t,r),t.seen.get(e).ref=s})(e,t,0,r),e.in=t.in,e.out=t.out});function Io(e,t){return new $o({type:"pipe",in:e,out:t})}const Co=ie("ZodReadonly",(e,t)=>{Gn.init(e,t),gi.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const i=e._zod.def;wr(i.innerType,t,r),t.seen.get(e).ref=i.innerType,n.readOnly=!0})(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});const To=ie("ZodCustom",(e,t)=>{Jn.init(e,t),gi.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{_r(e,t,n,r,"Custom types cannot be represented in JSON Schema")})(e,t,n,r)});const Eo=["GBPCountries","UnitedStates","AUDCountries","EURCountries","International","NZDCountries","Canada"],Ao=po(Eo),xo=po(["Include","Exclude"]),No=oo({targetedCountryGroups:ro(Ao),targetedCountryCodes:ro(bi()).optional(),contributionsOnlyCountriesTargeting:xo.optional()}).optional(),Po={GBPCountries:{name:"United Kingdom",currency:"GBP",countries:["GB","FK","GI","GG","IM","JE","SH"],supportRegionId:"UK"},UnitedStates:{name:"United States",currency:"USD",countries:["US"],supportRegionId:"US"},AUDCountries:{name:"Australia",currency:"AUD",countries:["AU","KI","NR","NF","TV"],supportRegionId:"AU"},EURCountries:{name:"Europe",currency:"EUR",countries:["AD","AL","AT","BA","BE","BG","BL","CH","CY","CZ","DE","DK","EE","ES","FI","FO","FR","GF","GL","GP","GR","HR","HU","IE","IT","LI","LT","LU","LV","MC","ME","MF","IS","MQ","MT","NL","NO","PF","PL","PM","PT","RE","RO","RS","SE","SI","SJ","SK","SM","TF","TR","WF","YT","VA","AX","AZ","AM","GE","BY","MD","UA","MK"],supportRegionId:"EU"},International:{name:"International",currency:"USD",countries:["AE","AF","AG","AI","AO","AQ","AR","AS","AW","BB","BD","BF","BH","BI","BJ","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BZ","CC","CD","CF","CG","CI","CL","CM","CN","CO","CR","CU","CV","CW","CX","DJ","DM","DO","DZ","EC","EG","EH","ER","ET","FJ","FM","GA","GD","GH","GM","GN","GQ","GS","GT","GU","GW","GY","HK","HM","HN","HT","ID","IL","IN","IO","IQ","IR","JM","JO","JP","KE","KG","KH","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LK","LR","LS","LY","MA","MG","MH","ML","MM","MN","MO","MP","MR","MS","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NG","NI","NP","NU","OM","PA","PE","PG","PH","PK","PN","PR","PS","PW","PY","QA","RU","RW","SA","SB","SC","SD","SG","SL","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TG","TH","TJ","TK","TL","TM","TN","TO","TT","TW","TZ","UG","UM","UY","UZ","VC","VE","VG","VI","VN","VU","WS","YE","ZA","ZM","ZW"],supportRegionId:"INT"},NZDCountries:{name:"New Zealand",currency:"NZD",countries:["NZ","CK"],supportRegionId:"NZ"},Canada:{name:"Canada",currency:"CAD",countries:["CA"],supportRegionId:"CA"}},Zo={AD:"Andorra",AE:"the UAE",AF:"Afghanistan",AG:"Antigua and Barbuda",AI:"Anguilla",AL:"Albania",AM:"Armenia",AO:"Angola",AR:"Argentina",AS:"the US",AT:"Austria",AU:"Australia",AW:"Aruba",AX:"Åland Islands",AZ:"Azerbaijan",BA:"Bosnia and Herzegovina",BB:"Barbados",BD:"Bangladesh",BE:"Belgium",BF:"Burkina Faso",BG:"Bulgaria",BH:"Bahrain",BI:"Burundi",BJ:"Benin",BL:"Saint Barthélemy",BM:"Bermuda",BN:"Brunei Darussalam",BO:"Bolivia",BQ:"Bonaire, Sint Eustatius and Saba",BR:"Brazil",BS:"the Bahamas",BT:"Bhutan",BV:"Bouvet Island",BW:"Botswana",BY:"Belarus",BZ:"Belize",CA:"Canada",CD:"the Democratic Republic of the Congo",CF:"the Central Africa Republic",CG:"the Congo",CH:"Switzerland",CI:"Côte d'Ivoire",CK:"the Cook Islands",CL:"Chile",CM:"Cameroon",CN:"China",CO:"Colombia",CR:"Costa Rica",CU:"Cuba",CV:"Cabo Verde",CW:"Curaçao",CX:"Christmas Island",CY:"Cyprus",CZ:"the Czech Republic",DE:"Germany",DJ:"Djibouti",DK:"Denmark",DM:"Dominica",DO:"the Dominican Republic",DZ:"Algeria",EC:"Ecuador",EE:"Estonia",EG:"Egypt",EH:"the Western Sahara",ER:"Eritrea",ES:"Spain",ET:"Ethiopia",FI:"Finland",FJ:"Fiji",FK:"the UK",FO:"the UK",FR:"France",GA:"Gabon",GB:"the UK",GD:"Grenada",GE:"Georgia",GF:"French Guiana",GG:"Guernsey",GH:"Ghana",GI:"Gibraltar",GL:"Greenland",GM:"the Gambia",GN:"Guinea",GP:"Guadeloupe",GQ:"Equatorial Guinea",GR:"Greece",GT:"Guatemala",GU:"Guam",GW:"Guinea-Bissau",GY:"Guyana",HK:"Hong Kong",HN:"Honduras",HR:"Croatia",HT:"Haiti",HU:"Hungary",ID:"Indonesia",IE:"Ireland",IM:"the Isle of Man",IN:"India",IQ:"Iraq",IR:"Iran",IS:"Iceland",IT:"Italy",JE:"Jersey",JM:"Jamaica",JO:"Jordan",JP:"Japan",KE:"Kenya",KG:"Kyrgyzstan",KH:"Cambodia",KI:"Kiribati",KN:"Saint Kitts and Nevis",KP:"Korea",KR:"Korea",KW:"Kuwait",KY:"the Cayman Ialnds",KZ:"Kazakhstan",LB:"Lebanon",LC:"Saint Lucia",LI:"Liechtenstein",LK:"Sri Lanka",LR:"Liberia",LS:"Lesotho",LT:"Lithuania",LU:"Luxembourg",LV:"Latvia",LY:"Libya",MA:"Morocco",MC:"Monaco",MD:"Moldova",ME:"Montenegro",MG:"Madagascar",MK:"the Republic of North Macedonia",ML:"Mali",MM:"Myanmar",MN:"Mongolia",MO:"Macao",MQ:"Martinique",MR:"Mauritania",MS:"Montserrat",MT:"Malta",MU:"Mauritius",MV:"Maldives",MW:"Malawi",MX:"Mexico",MY:"Malaysia",MZ:"Mozambique",NA:"Namibia",NC:"New Caledonia",NE:"Niger",NF:"Norfolk Island",NG:"Nigeria",NI:"Nicaragua",NL:"the Netherlands",NO:"Norway",NP:"Nepal",NR:"Nauru",NU:"Niue",NZ:"New Zealand",OM:"Oman",PA:"Panama",PE:"Peru",PF:"French Polynesia",PG:"Papua New Guinea",PH:"the Philippines",PK:"Pakistan",PL:"Poland",PM:"Saint Pierre and Miquelon",PN:"Pitcairn",PR:"Puerto Rico",PT:"Portugal",PW:"Palau",PY:"Paraguay",QA:"Qatar",RE:"Réunion",RO:"Romania",RU:"Russia",RW:"Rwanda",SA:"Saudi Arabia",SB:"Solomon Islands",SC:"Seychelles",SD:"Sudan",SE:"Sweden",SG:"Singapore",SH:"Saint Helena",SI:"Slovenia",SJ:"Svalbard and Jan Mayen",SK:"Slovakia",SL:"Sierra Leone",SM:"San Marino",SN:"Senegal",SO:"Somalia",SR:"Suriname",SS:"South Sudan",ST:"Sao Tome and Principe",SV:"El Salvador",SY:"Syrian Arab Republic",SZ:"Eswatini",TD:"Chad",TG:"Togo",TH:"Thailand",TJ:"Tajikistan",TK:"Tokelau",TL:"Timor-Leste",TM:"Turkmenistan",TN:"Tunisia",TO:"Tonga",TR:"Turkey",TT:"Trinidad and Tobago",TV:"Tuvalu",TW:"Taiwan",TZ:"Tanzania ",UG:"Uganda",US:"the US",UY:"Uruguay",UZ:"Uzbekistan",VC:"Saint Vincent and the Grenadines",VE:"Venezuela",VG:"the Virgin Islands",VI:"the Virgin Islands",VN:"Vietnam",VU:"Vanuatu",WF:"Wallis and Futuna",WS:"Samoa",YE:"Yemen",YT:"Mayotte",ZA:"South Africa",ZM:"Zambia",ZW:"Zimbabwe"},Mo={GBPCountries:"£",UnitedStates:"$",AUDCountries:"$",Canada:"CA$",EURCountries:"€",NZDCountries:"NZ$",International:"$"},Ro=e=>Object.keys(Po).find(t=>Po[t].countries.includes(e??""))??"International",jo=e=>{if(e){const t=Ro(e);return Mo[t]}return"£"},Uo=e=>{if(e)return Zo[e]},Do=e=>e.includes("subscribe/weekly/checkout"),Fo=(e,t,n,r)=>{if(r){const i=r[Ro(n)];return`${jo(n)}${i[e][t].price}`}},Lo={CURRENCY_SYMBOL:({countryCode:e})=>jo(e),COUNTRY_NAME:({countryCode:e})=>Uo(e),PRICE_DIGISUB_MONTHLY:({countryCode:e,prices:t})=>Fo("Digisub","Monthly",e,t),PRICE_DIGISUB_ANNUAL:({countryCode:e,prices:t})=>Fo("Digisub","Annual",e,t),PRICE_GUARDIANWEEKLY_MONTHLY:({countryCode:e,prices:t})=>Fo("GuardianWeekly","Monthly",e,t),PRICE_GUARDIANWEEKLY_ANNUAL:({countryCode:e,prices:t})=>Fo("GuardianWeekly","Annual",e,t),DAY_OF_THE_WEEK:()=>((e=new Date)=>e.toLocaleString("en-GB",{weekday:"long"}))(),DATE:()=>((e=new Date)=>e.toLocaleString("en-GB",{day:"numeric",month:"long",year:"numeric"}))()},Go=/%%.*?%%/g,Bo="gu.contributions.views",Jo=e=>{const t=(e=>{const t=new Date(e,10,1).getDay();return new Date(e,10,22+(11-t)%7)})(e);return t.setDate(t.getDate()+5),t},Ko=(e=new Date)=>{const t=(e=>{const t=e.getDate()<20?1:2;return e.setMonth(e.getMonth()+t),e})(e),n=(t.getMonth()+1).toString().padStart(2,"0"),r=t.toLocaleString("default",{month:"long"}),i=t.getFullYear();return{reminderCta:`Remind me in ${r}`,reminderPeriod:`${i}-${n}-01`,reminderLabel:`${r} ${i}`}},Vo=new Date("2023-12-31"),Wo=e=>e>=(e=>new Date(e.getFullYear(),10,15))(e)&&e<Jo(e.getFullYear()),Yo=oo({text:bi(),baseUrl:bi()});let Ho=function(e){return e.Custom="CustomSecondaryCta",e.ContributionsReminder="ContributionsReminderSecondaryCta",e}({});var qo;new fo({type:"enum",entries:Ho,...I(qo)});const Qo=co("type",[oo({type:mo(Ho.Custom),cta:Yo}),oo({type:mo(Ho.ContributionsReminder)})]),Xo=oo({countLabel:bi(),goalCopy:bi().optional()}),es=oo({total:Ji(),goal:Ji()}),ts=po(["US","AU","global"]),ns=oo({currencySymbol:bi(),copy:Xo,name:ts,tickerData:es.optional()}),rs=oo({for52Weeks:Ji(),forTargetedWeeks:Ji()}),is=po(["for52Weeks","forTargetedWeeks"]),os=oo({type:mo("above"),copy:bi().optional(),countType:is.optional()}),ss=po(["CONTRIBUTION","MEMBERSHIP_SUPPORTER","DIGITAL_SUBSCRIPTION","PRINT_SUBSCRIPTION"]),as=po(["ACQUISITIONS_EPIC","ACQUISITIONS_ENGAGEMENT_BANNER","ACQUISITIONS_SUBSCRIPTIONS_BANNER","ACQUISITIONS_HEADER","ACQUISITIONS_OTHER"]),us=oo({abTestName:bi(),abTestVariant:bi(),campaignCode:bi(),componentType:as,products:ro(ss).nullish(),labels:ro(bi()).nullish(),ophanPageId:bi(),platformId:bi(),referrerUrl:bi()}),cs=oo({mainUrl:bi(),mobileUrl:bi().optional(),tabletUrl:bi().optional(),desktopUrl:bi().optional(),leftColUrl:bi().optional(),wideUrl:bi().optional(),altText:bi()}),ls=oo({name:bi(),description:bi().optional(),headshot:cs.optional()}),ds=/^[0-9A-F]{2}$/,fs=bi().refine(e=>ds.test(e),{error:e=>`"${JSON.stringify(e.input)}" is not a valid hex value`}),ps=oo({r:fs,g:fs,b:fs,kind:mo("hex")}),hs=oo({mobileUrl:bi(),tabletUrl:bi(),desktopUrl:bi(),altText:bi(),kind:mo("Image")}),ms=oo({buttonColour:ps.nullish(),buttonTextColour:ps.nullish(),buttonBorderColour:ps.nullish(),buttonSelectColour:ps.nullish(),buttonSelectTextColour:ps.nullish(),buttonSelectBorderColour:ps.nullish(),buttonSelectMarkerColour:ps.nullish(),pillTextColour:ps.nullish(),pillBackgroundColour:ps.nullish(),kind:mo("ChoiceCards")}),gs=oo({visual:co("kind",[hs,ms]).nullish(),headerImage:oo({mobileUrl:bi(),tabletUrl:bi(),desktopUrl:bi(),altText:bi()}).nullish(),colours:oo({basic:oo({background:ps,bodyText:ps})})}),ys=oo({heading:bi(),subheading:bi(),primaryCta:Yo.optional(),secondaryCta:Yo.optional(),benefits:ro(bi()).optional()}),vs=oo({content:ys,tracking:us,mobileContent:ys.optional(),countryCode:bi().optional(),submitComponentEvent:qi(),promoCodes:ro(bi()).nullish()}),bs=oo({copy:bi()}),_s=ao([mo("Monthly"),mo("Annual")]),ws=co("supportTier",[oo({supportTier:mo("Contribution"),ratePlan:_s}),oo({supportTier:mo("SupporterPlus"),ratePlan:_s}),oo({supportTier:mo("DigitalSubscription"),ratePlan:_s}),oo({supportTier:mo("OneOff")})]),zs=oo({copy:bi(),textColour:ps.nullish(),backgroundColour:ps.nullish()}),Ss=ao([mo("LandingPage"),mo("Checkout")]),ks=oo({testName:bi(),variantName:bi()}),Os=oo({product:ws,label:bi(),isDefault:Yi(),defaultExpanded:Yi().optional(),benefitsLabel:bi().nullish(),benefits:ro(bs),pill:zs.nullish(),destination:Ss.nullish(),destinationTest:ks.nullish()}),$s=oo({choiceCards:ro(Os),mobileChoiceCards:ro(Os).nullish()}),Is=oo({maxViewsCount:Ji(),maxViewsDays:Ji(),minDaysBetweenViews:Ji()}),Cs=oo({reminderCta:bi(),reminderLabel:bi(),reminderPeriod:bi()});po(["ONE_OFF","MONTHLY","ANNUAL"]);const Ts=oo({newsletterId:bi(),successDescription:bi()}),Es=oo({name:bi(),heading:bi().optional(),paragraphs:ro(bi()),highlightedText:bi().optional(),tickerSettings:ns.optional(),cta:Yo.optional(),secondaryCta:Qo.optional(),newsletterSignup:Ts.optional(),image:cs.optional(),showReminderFields:Cs.optional(),separateArticleCount:os.optional(),promoCodes:ro(bi()).nullish(),maxViews:Is.optional(),showSignInLink:Yi().optional(),bylineWithImage:ls.optional(),showChoiceCards:Yi().optional(),choiceCardsSettings:$s.nullish()}),As=oo({variant:Es,tracking:us,countryCode:bi().nullish(),articleCounts:rs,onReminderOpen:qi().nullish(),fetchEmail:qi().nullish(),submitComponentEvent:qi().nullish(),openCmp:qi().nullish(),hasConsentForArticleCount:Yi().nullish(),stage:bi().nullish()}),xs=po(["contributions","subscriptions","signIn","abandonedBasket"]),Ns=oo({heading:bi().optional(),messageText:bi().optional(),paragraphs:ro(bi()).optional(),mobileMessageText:bi().optional(),highlightedText:bi().optional(),cta:Yo.optional(),secondaryCta:Qo.optional()}),Ps=oo({tracking:us,bannerChannel:xs,content:Ns.nullish(),mobileContent:Ns.nullish(),countryCode:bi().nullish(),tickerSettings:ns.nullish(),submitComponentEvent:qi(),articleCounts:rs,hasOptedOutOfArticleCount:Yi().nullish(),fetchEmail:qi().nullish(),separateArticleCount:Yi().nullish(),design:gs.nullish(),choiceCardsSettings:$s.nullish(),promoCodes:ro(bi()).nullish(),isCollapsible:Yi().nullish(),promotedNewsletter:oo({listId:Ji(),identityName:bi(),name:bi(),frequency:bi()}).nullish(),contributionsServiceUrl:bi().nullish()}),Zs=oo({amount:ao([Ji(),mo("other")]),billingPeriod:ao([mo("ONE_OFF"),mo("MONTHLY"),mo("ANNUAL")]),product:ao([mo("Contribution"),mo("SupporterPlus"),mo("PremiumTier"),mo("DailyEdition"),mo("GuardianWeekly"),mo("Paper"),mo("PaperAndDigital")]),region:ao([mo("uk"),mo("us"),mo("au"),mo("eu"),mo("int"),mo("nz"),mo("ca")])}),Ms=(e,t,n,r)=>{const i=(e=>new URLSearchParams(window.location.search).get(`force-${e}`))(e),o=(e=>new URLSearchParams(window.location.search).get(`preview-${e}`))(e),s=new URLSearchParams;i?s.set("force",i):o&&s.set("preview",o);const a=s.toString();return fetch(a?`${t}/${e}?${a}`:`${t}/${e}`,{method:"post",headers:{"Content-Type":"application/json",...r},body:JSON.stringify(n)}).then(t=>{if(!t.ok)throw Error(t.statusText||`Supporter Revenue ${e} | Api call returned HTTP status ${t.status}`);return t}).then(e=>e.json())};exports.CountryGroupId=Eo,exports.SecondaryCtaType=Ho,exports.abandonedBasketSchema=Zs,exports.addRegionIdToSupportUrl=(e,t)=>{if(t){const n=(e=>Po[Ro(e)].supportRegionId)(t);if(!Do(e))return e.replace(/(support\.theguardian\.com)\/(contribute-in-epic|contribute|subscribe|checkout)/,(e,t,r)=>`${t}/${n.toLowerCase()}/${r}`)}return e},exports.bannerSchema=Ps,exports.buildReminderFields=Ko,exports.containsNonArticleCountPlaceholder=e=>{const t=e.match(Go)?.filter(e=>"%%ARTICLE_COUNT%%"!==e);return!!t&&t.length>0},exports.contributionsOnlyCountriesTargetingSchema=xo,exports.countryCodeToCountryGroupId=Ro,exports.countryGroupIdSchema=Ao,exports.countryGroups=Po,exports.epicPropsSchema=As,exports.getBanner=(e,t)=>Ms("banner",e,t),exports.getCountryName=Uo,exports.getEpic=(e,t,n)=>Ms("epic",e,t,n),exports.getEpicViewLog=e=>e.get(Bo)??void 0,exports.getGutterLiveblog=(e,t)=>Ms("gutter-liveblog",e,t),exports.getHeader=(e,t)=>Ms("header",e,t),exports.getLiveblogEpic=(e,t)=>Ms("liveblog-epic",e,t),exports.getLocalCurrencySymbol=jo,exports.getReminderFields=(e,t=new Date)=>{return"US"===e&&Wo(t)?{reminderCta:"Remind me on Giving Tuesday",reminderPeriod:`${n=t.getFullYear()}-${(Jo(n).getMonth()+1).toString().padStart(0,"2")}-01`,reminderLabel:"on Giving Tuesday",reminderOption:`giving-tuesday-${n}`}:"US"===e&&(e=>e>=Jo(e.getFullYear())&&e<Vo)(t)?(e=>({reminderCta:"Remind me on New Years Eve",reminderPeriod:`${e}-12-01`,reminderLabel:"on New Years Eve",reminderOption:`new-years-eve-${e}`}))(t.getFullYear()):Ko(t);var n},exports.getWeeklyArticleHistory=t=>t.get(e)??void 0,exports.headerPropsSchema=vs,exports.hexColourToString=e=>`#${e.r}${e.g}${e.b}`,exports.inTargetedCountry=(e,t=[],n=[])=>0===t.length&&0===n.length||!!e&&(!!t.includes(Ro(e.toUpperCase()))||n.includes(e.toUpperCase())),exports.incrementWeeklyArticleCount=(r,o,s)=>{const a=((e,r)=>{const i=n(new Date),o=e.get(t);if(o?.week===i){const n=o.articles[r]||0;return e.set(t,{week:i,articles:{...o.articles,[r]:n+1}}),n>0}return e.set(t,{week:i,articles:{[r]:1}}),!1})(r,o);if(!a){const t=n(new Date),o=r.get(e)??[],a=o.length>0?o[0]:null;if(a?.week&&a.week===t)a.count+=1,a.tags=i(s,a.tags),r.set(e,o);else{o.unshift({week:t,count:1,tags:i(s,{})});const n=t-365,a=o.filter(e=>e.week>=n);r.set(e,a)}}},exports.isGWCheckoutUrl=Do,exports.isoCurrencyToCurrencySymbol={GBP:"£",USD:"$",AUD:"$",EUR:"€",NZD:"NZ$",CAD:"CA$"},exports.logEpicView=e=>{const t=JSON.parse(localStorage.getItem(Bo)??""),n=t?t.value:[];n.push({date:(new Date).getTime(),testId:e});const r={value:n.slice(-50)};localStorage.setItem(Bo,JSON.stringify(r))},exports.passesContributionsOnlyTargeting=(e,t,n)=>{const r=e?.contributionsOnlyCountriesTargeting??"Exclude";if(!t)return!0;const i=n.includes(t);return"Include"===r?i:!i},exports.replaceNonArticleCountPlaceholders=(e,t,n)=>e?e.replace(Go,e=>{const r=e.substring(2,e.length-2),i=Lo[r];if(i){const e=i({countryCode:t,prices:n});if(e)return e}return e}):"",exports.targetedRegionsSchema=No;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"geolocation.d.ts","sourceRoot":"","sources":["../../../../shared/lib/geolocation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,cAAc,sHAQjB,CAAC;AAEX,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC;AAE7D,eAAO,MAAM,oBAAoB;;;;;;;;EAAyB,CAAC;AAE3D,eAAO,MAAM,yCAAyC;;;EAAiC,CAAC;AAExF,MAAM,MAAM,mCAAmC,GAAG,CAAC,CAAC,KAAK,CACrD,OAAO,yCAAyC,CACnD,CAAC;AAEF,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;kBAMnB,CAAC;AAEhB,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAGpE,MAAM,MAAM,eAAe,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,GAAG,IAAI,GAAG,IAAI,CAAC;AAE9E,MAAM,MAAM,WAAW,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,CAAC;AAExE,MAAM,MAAM,YAAY,GAAG;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,WAAW,CAAC;IACtB,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,eAAe,EAAE,eAAe,CAAC;CACpC,CAAC;AAEF,KAAK,aAAa,GAAG,MAAM,CAAC,cAAc,EAAE,YAAY,CAAC,CAAC;AAE1D,eAAO,MAAM,aAAa,EAAE,aAsR3B,CAAC;AAEF,MAAM,MAAM,MAAM,GAAG,MAAM,OAAO,aAAa,CAAC;AAsPhD,eAAO,MAAM,2BAA2B,EAAE,MAAM,CAAC,WAAW,EAAE,MAAM,CAOnE,CAAC;AAEF,eAAO,MAAM,2BAA2B,GAAI,cAAc,MAAM,KAAG,cAOlE,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAC1B,yBAAyB,MAAM,EAC/B,gBAAe,cAAc,EAAO,EACpC,eAAc,MAAM,EAAO,KAC5B,OAiBF,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,gCAAgC,GACzC,iBACI;IAAE,mCAAmC,CAAC,EAAE,mCAAmC,CAAA;CAAE,GAAG,SAAS,EAC7F,aAAa,MAAM,GAAG,SAAS,EAC/B,4BAA4B,MAAM,EAAE,KACrC,OAOF,CAAC;AAQF,eAAO,MAAM,sBAAsB,GAAI,cAAc,MAAM,KAAG,MAO7D,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,cAAc,MAAM,KAAG,MAAM,GAAG,SAM9D,CAAC;AAKF,eAAO,MAAM,eAAe,GAAI,SAAS,MAAM,KAAG,OACD,CAAC;AAElD,eAAO,MAAM,uBAAuB,GAAI,aAAa,MAAM,EAAE,cAAc,MAAM,KAAG,MAYnF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"history.d.ts","sourceRoot":"","sources":["../../../../shared/lib/history.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACR,YAAY,EAEZ,oBAAoB,EAEvB,MAAM,oBAAoB,CAAC;AAK5B,MAAM,WAAW,qBAAqB;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACpC;AAGD,eAAO,MAAM,iBAAiB,GAAI,MAAM,IAAI,KAAG,MAI9C,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,uBAAuB,GAChC,cAAc,YAAY,KAC3B,oBAAoB,GAAG,SAEzB,CAAC;AAuEF;;;;;GAKG;AACH,eAAO,MAAM,2BAA2B,GACpC,cAAc,YAAY,EAC1B,QAAQ,MAAM,EACd,QAAQ,MAAM,EAAE,KACjB,IAiCF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../shared/lib/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"placeholders.d.ts","sourceRoot":"","sources":["../../../../shared/lib/placeholders.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAmB,MAAM,EAAY,MAAM,iBAAiB,CAAC;AAsBzE,eAAO,MAAM,YAAY,GAAI,OAAM,IAAiB,KAAG,MACF,CAAC;AACtD,eAAO,MAAM,OAAO,GAAI,OAAM,IAAiB,KAAG,MACkC,CAAC;AAiBrF;;;;GAIG;AACH,eAAO,MAAM,kCAAkC,GAC3C,SAAS,MAAM,GAAG,SAAS,EAC3B,cAAc,MAAM,EACpB,SAAS,MAAM,KAChB,MAgBF,CAAC;AAIF,eAAO,MAAM,kCAAkC,GAAI,MAAM,MAAM,KAAG,OAGjE,CAAC;AAEF,eAAO,MAAM,+BAA+B,GAAI,MAAM,MAAM,KAAG,OAG9D,CAAC"}
|