@guardian/support-dotcom-components 11.0.0 → 11.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (108) hide show
  1. package/dist/index.esm.js +1 -1
  2. package/dist/index.js +1 -1
  3. package/dist/{dotcom → src/dotcom}/index.d.ts +0 -1
  4. package/dist/src/dotcom/index.d.ts.map +1 -0
  5. package/dist/src/dotcom/requests.d.ts.map +1 -0
  6. package/dist/{dotcom → src/dotcom}/types.d.ts +2 -1
  7. package/dist/src/dotcom/types.d.ts.map +1 -0
  8. package/dist/{shared → src/shared}/lib/geolocation.d.ts +26 -0
  9. package/dist/src/shared/lib/geolocation.d.ts.map +1 -0
  10. package/dist/src/shared/lib/history.d.ts.map +1 -0
  11. package/dist/src/shared/lib/index.d.ts.map +1 -0
  12. package/dist/src/shared/lib/placeholders.d.ts.map +1 -0
  13. package/dist/src/shared/lib/reminderFields.d.ts.map +1 -0
  14. package/dist/src/shared/lib/viewLog.d.ts.map +1 -0
  15. package/dist/{shared → src/shared}/types/abTests/banner.d.ts +24 -8
  16. package/dist/src/shared/types/abTests/banner.d.ts.map +1 -0
  17. package/dist/{shared → src/shared}/types/abTests/epic.d.ts +8 -44
  18. package/dist/src/shared/types/abTests/epic.d.ts.map +1 -0
  19. package/dist/{shared → src/shared}/types/abTests/gutter.d.ts +5 -0
  20. package/dist/src/shared/types/abTests/gutter.d.ts.map +1 -0
  21. package/dist/{shared → src/shared}/types/abTests/header.d.ts +5 -0
  22. package/dist/src/shared/types/abTests/header.d.ts.map +1 -0
  23. package/dist/{shared/types/targeting → src/shared/types/abTests}/index.d.ts +2 -1
  24. package/dist/src/shared/types/abTests/index.d.ts.map +1 -0
  25. package/dist/src/shared/types/abTests/inline1.d.ts +123 -0
  26. package/dist/src/shared/types/abTests/inline1.d.ts.map +1 -0
  27. package/dist/{shared → src/shared}/types/abTests/shared.d.ts +2 -1
  28. package/dist/src/shared/types/abTests/shared.d.ts.map +1 -0
  29. package/dist/src/shared/types/index.d.ts.map +1 -0
  30. package/dist/src/shared/types/prices.d.ts.map +1 -0
  31. package/dist/{shared → src/shared}/types/props/banner.d.ts +1 -0
  32. package/dist/src/shared/types/props/banner.d.ts.map +1 -0
  33. package/dist/src/shared/types/props/choiceCards.d.ts.map +1 -0
  34. package/dist/src/shared/types/props/design.d.ts.map +1 -0
  35. package/dist/{shared → src/shared}/types/props/epic.d.ts +1 -0
  36. package/dist/src/shared/types/props/epic.d.ts.map +1 -0
  37. package/dist/src/shared/types/props/gutter.d.ts.map +1 -0
  38. package/dist/src/shared/types/props/header.d.ts.map +1 -0
  39. package/dist/{shared → src/shared}/types/props/index.d.ts +1 -0
  40. package/dist/src/shared/types/props/index.d.ts.map +1 -0
  41. package/dist/src/shared/types/props/inline1.d.ts +153 -0
  42. package/dist/src/shared/types/props/inline1.d.ts.map +1 -0
  43. package/dist/src/shared/types/props/shared.d.ts.map +1 -0
  44. package/dist/src/shared/types/purchaseInfo.d.ts.map +1 -0
  45. package/dist/src/shared/types/reminders.d.ts.map +1 -0
  46. package/dist/{shared → src/shared}/types/targeting/banner.d.ts +1 -0
  47. package/dist/src/shared/types/targeting/banner.d.ts.map +1 -0
  48. package/dist/src/shared/types/targeting/epic.d.ts.map +1 -0
  49. package/dist/src/shared/types/targeting/gutter.d.ts.map +1 -0
  50. package/dist/src/shared/types/targeting/header.d.ts.map +1 -0
  51. package/dist/{shared/types/abTests → src/shared/types/targeting}/index.d.ts +2 -1
  52. package/dist/src/shared/types/targeting/index.d.ts.map +1 -0
  53. package/dist/src/shared/types/targeting/inline1.d.ts +14 -0
  54. package/dist/src/shared/types/targeting/inline1.d.ts.map +1 -0
  55. package/dist/src/shared/types/targeting/shared.d.ts.map +1 -0
  56. package/package.json +2 -3
  57. package/dist/dotcom/index.d.ts.map +0 -1
  58. package/dist/dotcom/requests.d.ts.map +0 -1
  59. package/dist/dotcom/types.d.ts.map +0 -1
  60. package/dist/shared/lib/geolocation.d.ts.map +0 -1
  61. package/dist/shared/lib/history.d.ts.map +0 -1
  62. package/dist/shared/lib/index.d.ts.map +0 -1
  63. package/dist/shared/lib/placeholders.d.ts.map +0 -1
  64. package/dist/shared/lib/reminderFields.d.ts.map +0 -1
  65. package/dist/shared/lib/viewLog.d.ts.map +0 -1
  66. package/dist/shared/types/abTests/banner.d.ts.map +0 -1
  67. package/dist/shared/types/abTests/epic.d.ts.map +0 -1
  68. package/dist/shared/types/abTests/gutter.d.ts.map +0 -1
  69. package/dist/shared/types/abTests/header.d.ts.map +0 -1
  70. package/dist/shared/types/abTests/index.d.ts.map +0 -1
  71. package/dist/shared/types/abTests/shared.d.ts.map +0 -1
  72. package/dist/shared/types/index.d.ts.map +0 -1
  73. package/dist/shared/types/prices.d.ts.map +0 -1
  74. package/dist/shared/types/props/banner.d.ts.map +0 -1
  75. package/dist/shared/types/props/choiceCards.d.ts.map +0 -1
  76. package/dist/shared/types/props/design.d.ts.map +0 -1
  77. package/dist/shared/types/props/epic.d.ts.map +0 -1
  78. package/dist/shared/types/props/gutter.d.ts.map +0 -1
  79. package/dist/shared/types/props/header.d.ts.map +0 -1
  80. package/dist/shared/types/props/index.d.ts.map +0 -1
  81. package/dist/shared/types/props/shared.d.ts.map +0 -1
  82. package/dist/shared/types/purchaseInfo.d.ts.map +0 -1
  83. package/dist/shared/types/reminders.d.ts.map +0 -1
  84. package/dist/shared/types/targeting/banner.d.ts.map +0 -1
  85. package/dist/shared/types/targeting/epic.d.ts.map +0 -1
  86. package/dist/shared/types/targeting/gutter.d.ts.map +0 -1
  87. package/dist/shared/types/targeting/header.d.ts.map +0 -1
  88. package/dist/shared/types/targeting/index.d.ts.map +0 -1
  89. package/dist/shared/types/targeting/shared.d.ts.map +0 -1
  90. /package/dist/{dotcom → src/dotcom}/requests.d.ts +0 -0
  91. /package/dist/{shared → src/shared}/lib/history.d.ts +0 -0
  92. /package/dist/{shared → src/shared}/lib/index.d.ts +0 -0
  93. /package/dist/{shared → src/shared}/lib/placeholders.d.ts +0 -0
  94. /package/dist/{shared → src/shared}/lib/reminderFields.d.ts +0 -0
  95. /package/dist/{shared → src/shared}/lib/viewLog.d.ts +0 -0
  96. /package/dist/{shared → src/shared}/types/index.d.ts +0 -0
  97. /package/dist/{shared → src/shared}/types/prices.d.ts +0 -0
  98. /package/dist/{shared → src/shared}/types/props/choiceCards.d.ts +0 -0
  99. /package/dist/{shared → src/shared}/types/props/design.d.ts +0 -0
  100. /package/dist/{shared → src/shared}/types/props/gutter.d.ts +0 -0
  101. /package/dist/{shared → src/shared}/types/props/header.d.ts +0 -0
  102. /package/dist/{shared → src/shared}/types/props/shared.d.ts +0 -0
  103. /package/dist/{shared → src/shared}/types/purchaseInfo.d.ts +0 -0
  104. /package/dist/{shared → src/shared}/types/reminders.d.ts +0 -0
  105. /package/dist/{shared → src/shared}/types/targeting/epic.d.ts +0 -0
  106. /package/dist/{shared → src/shared}/types/targeting/gutter.d.ts +0 -0
  107. /package/dist/{shared → src/shared}/types/targeting/header.d.ts +0 -0
  108. /package/dist/{shared → src/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"]),o=(e,t={})=>(e.forEach(e=>{r.has(e)&&(t[e]=(t[e]??0)+1)}),t);var i;function s(e,t,n){function r(n,r){if(n._zod||Object.defineProperty(n,"_zod",{value:{def:r,constr:s,traits:new Set},enumerable:!1}),n._zod.traits.has(e))return;n._zod.traits.add(e),t(n,r);const o=s.prototype,i=Object.keys(o);for(let e=0;e<i.length;e++){const t=i[e];t in n||(n[t]=o[t].bind(n))}}const o=n?.Parent??Object;class i extends o{}function s(e){var t;const o=n?.Parent?new i:this;r(o,e),(t=o._zod).deferred??(t.deferred=[]);for(const e of o._zod.deferred)e();return o}return Object.defineProperty(i,"name",{value:e}),Object.defineProperty(s,"init",{value:r}),Object.defineProperty(s,Symbol.hasInstance,{value:t=>!!(n?.Parent&&t instanceof n.Parent)||t?._zod?.traits?.has(e)}),Object.defineProperty(s,"name",{value:e}),s}class a extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class u extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}}(i=globalThis).__zod_globalConfig??(i.__zod_globalConfig={});const c=globalThis.__zod_globalConfig;function l(e){return c}function d(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 p(e,t){return"bigint"==typeof t?t.toString():t}function f(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function h(e){return null==e}function m(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}const g=Symbol("evaluating");function y(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==g)return void 0===r&&(r=g,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function v(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function _(...e){const t={};for(const n of e){const e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function b(e){return JSON.stringify(e)}const w="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function z(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}const S=f(()=>{if(c.jitless)return!1;if("undefined"!=typeof navigator&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch(e){return!1}});function k(e){if(!1===z(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!==z(n)&&!1!==Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")}function C(e){return k(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}const T=new Set(["string","number","symbol"]);function N(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function I(e,t,n){const r=new e._zod.constr(t??e._zod.def);return t&&!n?.parent||(r._zod.parent=e),r}function E(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}const $={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]};function A(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 O(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 x(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function P(e){return"string"==typeof e?e:e?.message}function Z(e,t,n){const r=e.message?e.message:P(e.inst?._zod.def?.error?.(e))??P(t?.error?.(e))??P(n.customError?.(e))??P(n.localeError?.(e))??"Invalid input",{inst:o,continue:i,input:s,...a}=e;return a.path??(a.path=[]),a.message=r,t?.reportInput&&(a.input=s),a}function M(e){return Array.isArray(e)?"array":"string"==typeof e?"string":"unknown"}function R(...e){const[t,n,r]=e;return"string"==typeof t?{message:t,code:"custom",input:n,inst:r}:{...t}}const U=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,p,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},D=s("$ZodError",U),G=s("$ZodError",U,{Parent:Error});const L=e=>(t,n,r,o)=>{const i=r?{...r,async:!1}:{async:!1},s=t._zod.run({value:n,issues:[]},i);if(s instanceof Promise)throw new a;if(s.issues.length){const t=new(o?.Err??e)(s.issues.map(e=>Z(e,i,l())));throw w(t,o?.callee),t}return s.value},F=e=>async(t,n,r,o)=>{const i=r?{...r,async:!0}:{async:!0};let s=t._zod.run({value:n,issues:[]},i);if(s instanceof Promise&&(s=await s),s.issues.length){const t=new(o?.Err??e)(s.issues.map(e=>Z(e,i,l())));throw w(t,o?.callee),t}return s.value},B=e=>(t,n,r)=>{const o=r?{...r,async:!1}:{async:!1},i=t._zod.run({value:n,issues:[]},o);if(i instanceof Promise)throw new a;return i.issues.length?{success:!1,error:new(e??D)(i.issues.map(e=>Z(e,o,l())))}:{success:!0,data:i.value}},j=B(G),J=e=>async(t,n,r)=>{const o=r?{...r,async:!0}:{async:!0};let i=t._zod.run({value:n,issues:[]},o);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new e(i.issues.map(e=>Z(e,o,l())))}:{success:!0,data:i.value}},V=J(G),K=e=>(t,n,r)=>{const o=r?{...r,direction:"backward"}:{direction:"backward"};return L(e)(t,n,o)},W=e=>(t,n,r)=>L(e)(t,n,r),Y=e=>async(t,n,r)=>{const o=r?{...r,direction:"backward"}:{direction:"backward"};return F(e)(t,n,o)},H=e=>async(t,n,r)=>F(e)(t,n,r),Q=e=>(t,n,r)=>{const o=r?{...r,direction:"backward"}:{direction:"backward"};return B(e)(t,n,o)},X=e=>(t,n,r)=>B(e)(t,n,r),q=e=>async(t,n,r)=>{const o=r?{...r,direction:"backward"}:{direction:"backward"};return J(e)(t,n,o)},ee=e=>async(t,n,r)=>J(e)(t,n,r),te=/^[cC][0-9a-z]{6,}$/,ne=/^[0-9a-z]+$/,re=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,oe=/^[0-9a-vA-V]{20}$/,ie=/^[A-Za-z0-9]{27}$/,se=/^[a-zA-Z0-9_-]{21}$/,ae=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,ue=/^([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})$/,ce=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)$/,le=/^(?!\.)(?!.*\.\.)([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])$/,pe=/^(([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}|:))$/,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])\/([0-9]|[1-2][0-9]|3[0-2])$/,he=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,me=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,ge=/^[A-Za-z0-9_-]*$/,ye=/^https?$/,ve=/^\+[1-9]\d{6,14}$/,_e="(?:(?:\\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])))",be=new RegExp(`^${_e}$`);function we(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}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}const ze=/^-?\d+$/,Se=/^-?\d+(?:\.\d+)?$/,ke=/^(?:true|false)$/i,Ce=/^[^A-Z]*$/,Te=/^[^a-z]*$/,Ne=s("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),Ie={number:"number",bigint:"bigint",object:"date"},Ee=s("$ZodCheckLessThan",(e,t)=>{Ne.init(e,t);const n=Ie[typeof t.value];e._zod.onattach.push(e=>{const n=e._zod.bag,r=(t.inclusive?n.maximum:n.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<r&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin: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})}}),$e=s("$ZodCheckGreaterThan",(e,t)=>{Ne.init(e,t);const n=Ie[typeof t.value];e._zod.onattach.push(e=>{const n=e._zod.bag,r=(t.inclusive?n.minimum:n.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>r&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin: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})}}),Ae=s("$ZodCheckMultipleOf",(e,t)=>{Ne.init(e,t),e._zod.onattach.push(e=>{var n;(n=e._zod.bag).multipleOf??(n.multipleOf=t.value)}),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?n.value%t.value===BigInt(0):0===function(e,t){const n=e/t,r=Math.round(n),o=Number.EPSILON*Math.max(Math.abs(n),1);return Math.abs(n-r)<o?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})}}),Oe=s("$ZodCheckNumberFormat",(e,t)=>{Ne.init(e,t),t.format=t.format||"float64";const n=t.format?.includes("int"),r=n?"int":"number",[o,i]=$[t.format];e._zod.onattach.push(e=>{const r=e._zod.bag;r.format=t.format,r.minimum=o,r.maximum=i,n&&(r.pattern=ze)}),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<o&&s.issues.push({origin:"number",input:a,code:"too_small",minimum:o,inclusive:!0,inst:e,continue:!t.abort}),a>i&&s.issues.push({origin:"number",input:a,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),xe=s("$ZodCheckMaxLength",(e,t)=>{var n;Ne.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!h(t)&&void 0!==t.length}),e._zod.onattach.push(e=>{const n=e._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{const r=n.value;if(r.length<=t.maximum)return;const o=M(r);n.issues.push({origin:o,code:"too_big",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Pe=s("$ZodCheckMinLength",(e,t)=>{var n;Ne.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!h(t)&&void 0!==t.length}),e._zod.onattach.push(e=>{const n=e._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{const r=n.value;if(r.length>=t.minimum)return;const o=M(r);n.issues.push({origin:o,code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Ze=s("$ZodCheckLengthEquals",(e,t)=>{var n;Ne.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!h(t)&&void 0!==t.length}),e._zod.onattach.push(e=>{const n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{const r=n.value,o=r.length;if(o===t.length)return;const i=M(r),s=o>t.length;n.issues.push({origin:i,...s?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),Me=s("$ZodCheckStringFormat",(e,t)=>{var n,r;Ne.init(e,t),e._zod.onattach.push(e=>{const n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??(n.patterns=new Set),n.patterns.add(t.pattern))}),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=()=>{})}),Re=s("$ZodCheckRegex",(e,t)=>{Me.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})}}),Ue=s("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=Ce),Me.init(e,t)}),De=s("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=Te),Me.init(e,t)}),Ge=s("$ZodCheckIncludes",(e,t)=>{Ne.init(e,t);const n=N(t.includes),r=new RegExp("number"==typeof t.position?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(e=>{const t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(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})}}),Le=s("$ZodCheckStartsWith",(e,t)=>{Ne.init(e,t);const n=new RegExp(`^${N(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(e=>{const t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(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})}}),Fe=s("$ZodCheckEndsWith",(e,t)=>{Ne.init(e,t);const n=new RegExp(`.*${N(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(e=>{const t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(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})}}),Be=s("$ZodCheckOverwrite",(e,t)=>{Ne.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}});class je{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),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?.args;return new e(...t,[...(this?.content??[""]).map(e=>` ${e}`)].join("\n"))}}const Je={major:4,minor:4,patch:3},Ve=s("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Je;const r=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&r.unshift(e);for(const t of r)for(const n of t._zod.onattach)n(e);if(0===r.length)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const t=(e,t,n)=>{let r,o=A(e);for(const i of t){if(i._zod.def.when){if(O(e))continue;if(!i._zod.def.when(e))continue}else if(o)continue;const t=e.issues.length,s=i._zod.check(e);if(s instanceof Promise&&!1===n?.async)throw new a;if(r||s instanceof Promise)r=(r??Promise.resolve()).then(async()=>{await s;e.issues.length!==t&&(o||(o=A(e,t)))});else{if(e.issues.length===t)continue;o||(o=A(e,t))}}return r?r.then(()=>e):e},n=(n,o,i)=>{if(A(n))return n.aborted=!0,n;const s=t(o,r,i);if(s instanceof Promise){if(!1===i.async)throw new a;return s.then(t=>e._zod.parse(t,i))}return e._zod.parse(s,i)};e._zod.run=(o,i)=>{if(i.skipChecks)return e._zod.parse(o,i);if("backward"===i.direction){const t=e._zod.parse({value:o.value,issues:[]},{...i,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,o,i)):n(t,o,i)}const s=e._zod.parse(o,i);if(s instanceof Promise){if(!1===i.async)throw new a;return s.then(e=>t(e,r,i))}return t(s,r,i)}}y(e,"~standard",()=>({validate:t=>{try{const n=j(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch(n){return V(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:"zod",version:1}))}),Ke=s("$ZodString",(e,t)=>{var n;Ve.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??(n=e._zod.bag,new RegExp(`^${n?`[\\s\\S]{${n?.minimum??0},${n?.maximum??""}}`:"[\\s\\S]*"}$`)),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}}),We=s("$ZodStringFormat",(e,t)=>{Me.init(e,t),Ke.init(e,t)}),Ye=s("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=ue),We.init(e,t)}),He=s("$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=ce(e))}else t.pattern??(t.pattern=ce());We.init(e,t)}),Qe=s("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=le),We.init(e,t)}),Xe=s("$ZodURL",(e,t)=>{We.init(e,t),e._zod.check=n=>{try{const r=n.value.trim();if(!t.normalize&&t.protocol?.source===ye.source&&!/^https?:\/\//i.test(r))return void n.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:n.value,inst:e,continue:!t.abort});const o=new URL(r);return t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(o.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&&(t.protocol.lastIndex=0,t.protocol.test(o.protocol.endsWith(":")?o.protocol.slice(0,-1):o.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(t.normalize?n.value=o.href:n.value=r)}catch(r){n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),qe=s("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),We.init(e,t)}),et=s("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=se),We.init(e,t)}),tt=s("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=te),We.init(e,t)}),nt=s("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=ne),We.init(e,t)}),rt=s("$ZodULID",(e,t)=>{t.pattern??(t.pattern=re),We.init(e,t)}),ot=s("$ZodXID",(e,t)=>{t.pattern??(t.pattern=oe),We.init(e,t)}),it=s("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=ie),We.init(e,t)}),st=s("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=function(e){const t=we({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const r=`${t}(?:${n.join("|")})`;return new RegExp(`^${_e}T(?:${r})$`)}(t)),We.init(e,t)}),at=s("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=be),We.init(e,t)}),ut=s("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=new RegExp(`^${we(t)}$`)),We.init(e,t)}),ct=s("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=ae),We.init(e,t)}),lt=s("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=de),We.init(e,t),e._zod.bag.format="ipv4"}),dt=s("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=pe),We.init(e,t),e._zod.bag.format="ipv6",e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),pt=s("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=fe),We.init(e,t)}),ft=s("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=he),We.init(e,t),e._zod.check=n=>{const r=n.value.split("/");try{if(2!==r.length)throw new Error;const[e,t]=r;if(!t)throw new Error;const n=Number(t);if(`${n}`!==t)throw new Error;if(n<0||n>128)throw new Error;new URL(`http://[${e}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function ht(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 mt=s("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=me),We.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{ht(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});const gt=s("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=ge),We.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{(function(e){if(!ge.test(e))return!1;const t=e.replace(/[-_]/g,e=>"-"===e?"+":"/");return ht(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})}}),yt=s("$ZodE164",(e,t)=>{t.pattern??(t.pattern=ve),We.init(e,t)});const vt=s("$ZodJWT",(e,t)=>{We.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 o=JSON.parse(atob(r));return!("typ"in o&&"JWT"!==o?.typ||!o.alg||t&&(!("alg"in o)||o.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})}}),_t=s("$ZodNumber",(e,t)=>{Ve.init(e,t),e._zod.pattern=e._zod.bag.pattern??Se,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch(e){}const o=n.value;if("number"==typeof o&&!Number.isNaN(o)&&Number.isFinite(o))return n;const i="number"==typeof o?Number.isNaN(o)?"NaN":Number.isFinite(o)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:o,inst:e,...i?{received:i}:{}}),n}}),bt=s("$ZodNumberFormat",(e,t)=>{Oe.init(e,t),_t.init(e,t)}),wt=s("$ZodBoolean",(e,t)=>{Ve.init(e,t),e._zod.pattern=ke,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Boolean(n.value)}catch(e){}const o=n.value;return"boolean"==typeof o||n.issues.push({expected:"boolean",code:"invalid_type",input:o,inst:e}),n}}),zt=s("$ZodAny",(e,t)=>{Ve.init(e,t),e._zod.parse=e=>e}),St=s("$ZodUnknown",(e,t)=>{Ve.init(e,t),e._zod.parse=e=>e}),kt=s("$ZodNever",(e,t)=>{Ve.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:"never",code:"invalid_type",input:t.value,inst:e}),t)});function Ct(e,t,n){e.issues.length&&t.issues.push(...x(n,e.issues)),t.value[n]=e.value}const Tt=s("$ZodArray",(e,t)=>{Ve.init(e,t),e._zod.parse=(n,r)=>{const o=n.value;if(!Array.isArray(o))return n.issues.push({expected:"array",code:"invalid_type",input:o,inst:e}),n;n.value=Array(o.length);const i=[];for(let e=0;e<o.length;e++){const s=o[e],a=t.element._zod.run({value:s,issues:[]},r);a instanceof Promise?i.push(a.then(t=>Ct(t,n,e))):Ct(a,n,e)}return i.length?Promise.all(i).then(()=>n):n}});function Nt(e,t,n,r,o,i){const s=n in r;if(e.issues.length){if(o&&i&&!s)return;t.issues.push(...x(n,e.issues))}s||o?void 0===e.value?s&&(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]})}function It(e){const t=Object.keys(e.shape);for(const n of t)if(!e.shape?.[n]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${n}": expected a Zod schema`);const n=(r=e.shape,Object.keys(r).filter(e=>"optional"===r[e]._zod.optin&&"optional"===r[e]._zod.optout));var r;return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function Et(e,t,n,r,o,i){const s=[],a=o.keySet,u=o.catchall._zod,c=u.def.type,l="optional"===u.optin,d="optional"===u.optout;for(const o in t){if("__proto__"===o)continue;if(a.has(o))continue;if("never"===c){s.push(o);continue}const i=u.run({value:t[o],issues:[]},r);i instanceof Promise?e.push(i.then(e=>Nt(e,n,o,t,l,d))):Nt(i,n,o,t,l,d)}return s.length&&n.issues.push({code:"unrecognized_keys",keys:s,input:t,inst:i}),e.length?Promise.all(e).then(()=>n):n}const $t=s("$ZodObject",(e,t)=>{Ve.init(e,t);const n=Object.getOwnPropertyDescriptor(t,"shape");if(!n?.get){const e=t.shape;Object.defineProperty(t,"shape",{get:()=>{const n={...e};return Object.defineProperty(t,"shape",{value:n}),n}})}const r=f(()=>It(t));y(e._zod,"propValues",()=>{const e=t.shape,n={};for(const t in e){const r=e[t]._zod;if(r.values){n[t]??(n[t]=new Set);for(const e of r.values)n[t].add(e)}}return n});const o=z,i=t.catchall;let s;e._zod.parse=(t,n)=>{s??(s=r.value);const a=t.value;if(!o(a))return t.issues.push({expected:"object",code:"invalid_type",input:a,inst:e}),t;t.value={};const u=[],c=s.shape;for(const e of s.keys){const r=c[e],o="optional"===r._zod.optin,i="optional"===r._zod.optout,s=r._zod.run({value:a[e],issues:[]},n);s instanceof Promise?u.push(s.then(n=>Nt(n,t,e,a,o,i))):Nt(s,t,e,a,o,i)}return i?Et(u,a,t,n,r.value,e):u.length?Promise.all(u).then(()=>t):t}}),At=s("$ZodObjectJIT",(e,t)=>{$t.init(e,t);const n=e._zod.parse,r=f(()=>It(t));let o;const i=z,s=!c.jitless,a=s&&S.value,u=t.catchall;let l;e._zod.parse=(c,d)=>{l??(l=r.value);const p=c.value;return i(p)?s&&a&&!1===d?.async&&!0!==d.jitless?(o||(o=(e=>{const t=new je(["shape","payload","ctx"]),n=r.value,o=e=>{const t=b(e);return`shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`};t.write("const input = payload.value;");const i=Object.create(null);let s=0;for(const e of n.keys)i[e]="key_"+s++;t.write("const newResult = {};");for(const r of n.keys){const n=i[r],s=b(r),a=e[r],u="optional"===a?._zod?.optin,c="optional"===a?._zod?.optout;t.write(`const ${n} = ${o(r)};`),u&&c?t.write(`\n if (${n}.issues.length) {\n if (${s} in input) {\n payload.issues = payload.issues.concat(${n}.issues.map(iss => ({\n ...iss,\n path: iss.path ? [${s}, ...iss.path] : [${s}]\n })));\n }\n }\n \n if (${n}.value === undefined) {\n if (${s} in input) {\n newResult[${s}] = undefined;\n }\n } else {\n newResult[${s}] = ${n}.value;\n }\n \n `):u?t.write(`\n if (${n}.issues.length) {\n payload.issues = payload.issues.concat(${n}.issues.map(iss => ({\n ...iss,\n path: iss.path ? [${s}, ...iss.path] : [${s}]\n })));\n }\n \n if (${n}.value === undefined) {\n if (${s} in input) {\n newResult[${s}] = undefined;\n }\n } else {\n newResult[${s}] = ${n}.value;\n }\n \n `):t.write(`\n const ${n}_present = ${s} in input;\n if (${n}.issues.length) {\n payload.issues = payload.issues.concat(${n}.issues.map(iss => ({\n ...iss,\n path: iss.path ? [${s}, ...iss.path] : [${s}]\n })));\n }\n if (!${n}_present && !${n}.issues.length) {\n payload.issues.push({\n code: "invalid_type",\n expected: "nonoptional",\n input: undefined,\n path: [${s}]\n });\n }\n\n if (${n}_present) {\n if (${n}.value === undefined) {\n newResult[${s}] = undefined;\n } else {\n newResult[${s}] = ${n}.value;\n }\n }\n\n `)}t.write("payload.value = newResult;"),t.write("return payload;");const a=t.compile();return(t,n)=>a(e,t,n)})(t.shape)),c=o(c,d),u?Et([],p,c,d,l,e):c):n(c,d):(c.issues.push({expected:"object",code:"invalid_type",input:p,inst:e}),c)}});function Ot(e,t,n,r){for(const n of e)if(0===n.issues.length)return t.value=n.value,t;const o=e.filter(e=>!A(e));return 1===o.length?(t.value=o[0].value,o[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>Z(e,r,l())))}),t)}const xt=s("$ZodUnion",(e,t)=>{Ve.init(e,t),y(e._zod,"optin",()=>t.options.some(e=>"optional"===e._zod.optin)?"optional":void 0),y(e._zod,"optout",()=>t.options.some(e=>"optional"===e._zod.optout)?"optional":void 0),y(e._zod,"values",()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),y(e._zod,"pattern",()=>{if(t.options.every(e=>e._zod.pattern)){const e=t.options.map(e=>e._zod.pattern);return new RegExp(`^(${e.map(e=>m(e.source)).join("|")})$`)}});const n=1===t.options.length?t.options[0]._zod.run:null;e._zod.parse=(r,o)=>{if(n)return n(r,o);let i=!1;const s=[];for(const e of t.options){const t=e._zod.run({value:r.value,issues:[]},o);if(t instanceof Promise)s.push(t),i=!0;else{if(0===t.issues.length)return t;s.push(t)}}return i?Promise.all(s).then(t=>Ot(t,r,e,o)):Ot(s,r,e,o)}}),Pt=s("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,xt.init(e,t);const n=e._zod.parse;y(e._zod,"propValues",()=>{const e={};for(const n of t.options){const r=n._zod.propValues;if(!r||0===Object.keys(r).length)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(n)}"`);for(const[t,n]of Object.entries(r)){e[t]||(e[t]=new Set);for(const r of n)e[t].add(r)}}return e});const r=f(()=>{const e=t.options,n=new Map;for(const r of e){const e=r._zod.propValues?.[t.discriminator];if(!e||0===e.size)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(r)}"`);for(const t of e){if(n.has(t))throw new Error(`Duplicate discriminator value "${String(t)}"`);n.set(t,r)}}return n});e._zod.parse=(o,i)=>{const s=o.value;if(!z(s))return o.issues.push({code:"invalid_type",expected:"object",input:s,inst:e}),o;const a=r.value.get(s?.[t.discriminator]);return a?a._zod.run(o,i):t.unionFallback||"backward"===i.direction?n(o,i):(o.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,options:Array.from(r.value.keys()),input:s,path:[t.discriminator],inst:e}),o)}}),Zt=s("$ZodIntersection",(e,t)=>{Ve.init(e,t),e._zod.parse=(e,n)=>{const r=e.value,o=t.left._zod.run({value:r,issues:[]},n),i=t.right._zod.run({value:r,issues:[]},n);return o instanceof Promise||i instanceof Promise?Promise.all([o,i]).then(([t,n])=>Rt(e,t,n)):Rt(e,o,i)}});function Mt(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(k(e)&&k(t)){const n=Object.keys(t),r=Object.keys(e).filter(e=>-1!==n.indexOf(e)),o={...e,...t};for(const n of r){const r=Mt(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};o[n]=r.data}return{valid:!0,data:o}}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 o=Mt(e[r],t[r]);if(!o.valid)return{valid:!1,mergeErrorPath:[r,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function Rt(e,t,n){const r=new Map;let o;for(const n of t.issues)if("unrecognized_keys"===n.code){o??(o=n);for(const e of n.keys)r.has(e)||r.set(e,{}),r.get(e).l=!0}else e.issues.push(n);for(const t of n.issues)if("unrecognized_keys"===t.code)for(const e of t.keys)r.has(e)||r.set(e,{}),r.get(e).r=!0;else e.issues.push(t);const i=[...r].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(i.length&&o&&e.issues.push({...o,keys:i}),A(e))return e;const s=Mt(t.value,n.value);if(!s.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(s.mergeErrorPath)}`);return e.value=s.data,e}const Ut=s("$ZodEnum",(e,t)=>{Ve.init(e,t);const n=d(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=new RegExp(`^(${n.filter(e=>T.has(typeof e)).map(e=>"string"==typeof e?N(e):e.toString()).join("|")})$`),e._zod.parse=(t,o)=>{const i=t.value;return r.has(i)||t.issues.push({code:"invalid_value",values:n,input:i,inst:e}),t}}),Dt=s("$ZodLiteral",(e,t)=>{if(Ve.init(e,t),0===t.values.length)throw new Error("Cannot create literal schema with no valid values");const n=new Set(t.values);e._zod.values=n,e._zod.pattern=new RegExp(`^(${t.values.map(e=>"string"==typeof e?N(e):e?N(e.toString()):String(e)).join("|")})$`),e._zod.parse=(r,o)=>{const i=r.value;return n.has(i)||r.issues.push({code:"invalid_value",values:t.values,input:i,inst:e}),r}}),Gt=s("$ZodTransform",(e,t)=>{Ve.init(e,t),e._zod.optin="optional",e._zod.parse=(n,r)=>{if("backward"===r.direction)throw new u(e.constructor.name);const o=t.transform(n.value,n);if(r.async){return(o instanceof Promise?o:Promise.resolve(o)).then(e=>(n.value=e,n.fallback=!0,n))}if(o instanceof Promise)throw new a;return n.value=o,n.fallback=!0,n}});function Lt(e,t){return void 0===t&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}const Ft=s("$ZodOptional",(e,t)=>{Ve.init(e,t),e._zod.optin="optional",e._zod.optout="optional",y(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),y(e._zod,"pattern",()=>{const e=t.innerType._zod.pattern;return e?new RegExp(`^(${m(e.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if("optional"===t.innerType._zod.optin){const r=e.value,o=t.innerType._zod.run(e,n);return o instanceof Promise?o.then(e=>Lt(e,r)):Lt(o,r)}return void 0===e.value?e:t.innerType._zod.run(e,n)}}),Bt=s("$ZodExactOptional",(e,t)=>{Ft.init(e,t),y(e._zod,"values",()=>t.innerType._zod.values),y(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),jt=s("$ZodNullable",(e,t)=>{Ve.init(e,t),y(e._zod,"optin",()=>t.innerType._zod.optin),y(e._zod,"optout",()=>t.innerType._zod.optout),y(e._zod,"pattern",()=>{const e=t.innerType._zod.pattern;return e?new RegExp(`^(${m(e.source)}|null)$`):void 0}),y(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>null===e.value?e:t.innerType._zod.run(e,n)}),Jt=s("$ZodDefault",(e,t)=>{Ve.init(e,t),e._zod.optin="optional",y(e._zod,"values",()=>t.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=>Vt(e,t)):Vt(r,t)}});function Vt(e,t){return void 0===e.value&&(e.value=t.defaultValue),e}const Kt=s("$ZodPrefault",(e,t)=>{Ve.init(e,t),e._zod.optin="optional",y(e._zod,"values",()=>t.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))}),Wt=s("$ZodNonOptional",(e,t)=>{Ve.init(e,t),y(e._zod,"values",()=>{const e=t.innerType._zod.values;return e?new Set([...e].filter(e=>void 0!==e)):void 0}),e._zod.parse=(n,r)=>{const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(t=>Yt(t,e)):Yt(o,e)}});function Yt(e,t){return e.issues.length||void 0!==e.value||e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const Ht=s("$ZodCatch",(e,t)=>{Ve.init(e,t),e._zod.optin="optional",y(e._zod,"optout",()=>t.innerType._zod.optout),y(e._zod,"values",()=>t.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(e,n);return r instanceof Promise?r.then(r=>(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>Z(e,n,l()))},input:e.value}),e.issues=[],e.fallback=!0),e)):(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>Z(e,n,l()))},input:e.value}),e.issues=[],e.fallback=!0),e)}}),Qt=s("$ZodPipe",(e,t)=>{Ve.init(e,t),y(e._zod,"values",()=>t.in._zod.values),y(e._zod,"optin",()=>t.in._zod.optin),y(e._zod,"optout",()=>t.out._zod.optout),y(e._zod,"propValues",()=>t.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=>Xt(e,t.in,n)):Xt(r,t.in,n)}const r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>Xt(e,t.out,n)):Xt(r,t.out,n)}});function Xt(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},n)}const qt=s("$ZodReadonly",(e,t)=>{Ve.init(e,t),y(e._zod,"propValues",()=>t.innerType._zod.propValues),y(e._zod,"values",()=>t.innerType._zod.values),y(e._zod,"optin",()=>t.innerType?._zod?.optin),y(e._zod,"optout",()=>t.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(en):en(r)}});function en(e){return e.value=Object.freeze(e.value),e}const tn=s("$ZodCustom",(e,t)=>{Ne.init(e,t),Ve.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{const r=n.value,o=t.fn(r);if(o instanceof Promise)return o.then(t=>nn(t,n,r,e));nn(o,n,r,e)}});function nn(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(R(e))}}var rn;class on{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)}}(rn=globalThis).__zod_globalRegistry??(rn.__zod_globalRegistry=new on);const sn=globalThis.__zod_globalRegistry;function an(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...E(t)})}function un(e,t){return new Ee({check:"less_than",...E(t),value:e,inclusive:!1})}function cn(e,t){return new Ee({check:"less_than",...E(t),value:e,inclusive:!0})}function ln(e,t){return new $e({check:"greater_than",...E(t),value:e,inclusive:!1})}function dn(e,t){return new $e({check:"greater_than",...E(t),value:e,inclusive:!0})}function pn(e,t){return new Ae({check:"multiple_of",...E(t),value:e})}function fn(e,t){return new xe({check:"max_length",...E(t),maximum:e})}function hn(e,t){return new Pe({check:"min_length",...E(t),minimum:e})}function mn(e,t){return new Ze({check:"length_equals",...E(t),length:e})}function gn(e){return new Be({check:"overwrite",tx:e})}function yn(e,t){const n=function(e,t){const n=new Ne({check:"custom",...E(t)});return n._zod.check=e,n}(t=>(t.addIssue=e=>{if("string"==typeof e)t.issues.push(R(e,t.value,n._zod.def));else{const r=e;r.fatal&&(r.continue=!1),r.code??(r.code="custom"),r.input??(r.input=t.value),r.inst??(r.inst=n),r.continue??(r.continue=!n._zod.def.abort),t.issues.push(R(r))}},e(t.value,t)),t);return n}function vn(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??sn,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function _n(e,t,n={path:[],schemaPath:[]}){var r;const o=e._zod.def,i=t.seen.get(e);if(i){i.count++;return n.schemaPath.includes(e)&&(i.cycle=n.path),i.schema}const s={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,s);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,i=t.processors[o.type];if(!i)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);i(e,t,n,r)}const i=e._zod.parent;i&&(s.ref||(s.ref=i),_n(i,t,r),t.seen.get(i).isParent=!0)}const u=t.metadataRegistry.get(e);u&&Object.assign(s.schema,u),"input"===t.io&&zn(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 bn(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");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 o=t=>{if(t[1].schema.$ref)return;const r=t[1],{ref:o,defId:i}=(t=>{const r="draft-2020-12"===e.target?"$defs":"definitions";if(e.external){const n=e.external.registry.get(t[0])?.id,o=e.external.uri??(e=>e);if(n)return{ref:o(n)};const i=t[1].defId??t[1].schema.id??"schema"+e.counter++;return t[1].defId=i,{defId:i,ref:`${o("__shared")}#/${r}/${i}`}}if(t[1]===n)return{ref:"#"};const o=`#/${r}/`,i=t[1].schema.id??"__schema"+e.counter++;return{defId:i,ref:o+i}})(t);r.def={...r.schema},i&&(r.defId=i);const s=r.schema;for(const e in s)delete s[e];s.$ref=o};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]){o(n);continue}if(e.external){const r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){o(n);continue}}const i=e.metadataRegistry.get(n[0])?.id;i?o(n):(r.cycle||r.count>1&&"ref"===e.reused)&&o(n)}}function wn(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 o=n.def??n.schema,i={...o},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?Object.assign(o,a):(o.allOf=o.allOf??[],o.allOf.push(a)),Object.assign(o,i);if(t._zod.parent===s)for(const e in o)"$ref"!==e&&"allOf"!==e&&(e in i||delete o[e]);if(a.$ref&&n.def)for(const e in o)"$ref"!==e&&"allOf"!==e&&e in n.def&&JSON.stringify(o[e])===JSON.stringify(n.def[e])&&delete o[e]}const a=t._zod.parent;if(a&&a!==s){r(a);const t=e.seen.get(a);if(t?.schema.$ref&&(o.$ref=t.schema.$ref,t.def))for(const e in o)"$ref"!==e&&"allOf"!==e&&e in t.def&&JSON.stringify(o[e])===JSON.stringify(t.def[e])&&delete o[e]}e.override({zodSchema:t,jsonSchema:o,path:n.path??[]})};for(const t of[...e.seen.entries()].reverse())r(t[0]);const o={};if("draft-2020-12"===e.target?o.$schema="https://json-schema.org/draft/2020-12/schema":"draft-07"===e.target?o.$schema="http://json-schema.org/draft-07/schema#":"draft-04"===e.target?o.$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");o.$id=e.external.uri(n)}Object.assign(o,n.def??n.schema);const i=e.metadataRegistry.get(t)?.id;void 0!==i&&o.id===i&&delete o.id;const s=e.external?.defs??{};for(const t of e.seen.entries()){const e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,s[e.defId]=e.def)}e.external||Object.keys(s).length>0&&("draft-2020-12"===e.target?o.$defs=s:o.definitions=s);try{const n=JSON.parse(JSON.stringify(o));return Object.defineProperty(n,"~standard",{value:{...t["~standard"],jsonSchema:{input:Sn(t,"input",e.processors),output:Sn(t,"output",e.processors)}},enumerable:!1,writable:!1}),n}catch(e){throw new Error("Error converting schema to JSON.")}}function zn(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 zn(r.element,n);if("set"===r.type)return zn(r.valueType,n);if("lazy"===r.type)return zn(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)return zn(r.innerType,n);if("intersection"===r.type)return zn(r.left,n)||zn(r.right,n);if("record"===r.type||"map"===r.type)return zn(r.keyType,n)||zn(r.valueType,n);if("pipe"===r.type)return!!e._zod.traits.has("$ZodCodec")||(zn(r.in,n)||zn(r.out,n));if("object"===r.type){for(const e in r.shape)if(zn(r.shape[e],n))return!0;return!1}if("union"===r.type){for(const e of r.options)if(zn(e,n))return!0;return!1}if("tuple"===r.type){for(const e of r.items)if(zn(e,n))return!0;return!(!r.rest||!zn(r.rest,n))}return!1}const Sn=(e,t,n={})=>r=>{const{libraryOptions:o,target:i}=r??{},s=vn({...o??{},target:i,io:t,processors:n});return _n(e,s),bn(s,e),wn(s,e)},kn={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Cn=(e,t,n,r)=>{const o=e._zod.def;_n(o.innerType,t,r);t.seen.get(e).ref=o.innerType},Tn=s("ZodISODateTime",(e,t)=>{st.init(e,t),er.init(e,t)});function Nn(e){return function(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...E(t)})}(Tn,e)}const In=s("ZodISODate",(e,t)=>{at.init(e,t),er.init(e,t)});function En(e){return function(e,t){return new e({type:"string",format:"date",check:"string_format",...E(t)})}(In,e)}const $n=s("ZodISOTime",(e,t)=>{ut.init(e,t),er.init(e,t)});function An(e){return function(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...E(t)})}($n,e)}const On=s("ZodISODuration",(e,t)=>{ct.init(e,t),er.init(e,t)});function xn(e){return function(e,t){return new e({type:"string",format:"duration",check:"string_format",...E(t)})}(On,e)}const Pn=(e,t)=>{D.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:t=>function(e,t=e=>e.message){const n={_errors:[]},r=(e,o=[])=>{for(const i of e.issues)if("invalid_union"===i.code&&i.errors.length)i.errors.map(e=>r({issues:e},[...o,...i.path]));else if("invalid_key"===i.code)r({issues:i.issues},[...o,...i.path]);else if("invalid_element"===i.code)r({issues:i.issues},[...o,...i.path]);else{const e=[...o,...i.path];if(0===e.length)n._errors.push(t(i));else{let r=n,o=0;for(;o<e.length;){const n=e[o];o===e.length-1?(r[n]=r[n]||{_errors:[]},r[n]._errors.push(t(i))):r[n]=r[n]||{_errors:[]},r=r[n],o++}}}};return r(e),n}(e,t)},flatten:{value:t=>function(e,t=e=>e.message){const n={},r=[];for(const o of e.issues)o.path.length>0?(n[o.path[0]]=n[o.path[0]]||[],n[o.path[0]].push(t(o))):r.push(t(o));return{formErrors:r,fieldErrors:n}}(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,p,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,p,2)}},isEmpty:{get:()=>0===e.issues.length}})},Zn=s("ZodError",Pn,{Parent:Error}),Mn=L(Zn),Rn=F(Zn),Un=B(Zn),Dn=J(Zn),Gn=K(Zn),Ln=W(Zn),Fn=Y(Zn),Bn=H(Zn),jn=Q(Zn),Jn=X(Zn),Vn=q(Zn),Kn=ee(Zn),Wn=new WeakMap;function Yn(e,t,n){const r=Object.getPrototypeOf(e);let o=Wn.get(r);if(o||(o=new Set,Wn.set(r,o)),!o.has(t)){o.add(t);for(const e in n){const t=n[e];Object.defineProperty(r,e,{configurable:!0,enumerable:!1,get(){const n=t.bind(this);return Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:n}),n},set(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:t})}})}}}const Hn=s("ZodType",(e,t)=>(Ve.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Sn(e,"input"),output:Sn(e,"output")}}),e.toJSONSchema=((e,t={})=>n=>{const r=vn({...n,processors:t});return _n(e,r),bn(r,e),wn(r,e)})(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(t,n)=>Mn(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>Un(e,t,n),e.parseAsync=async(t,n)=>Rn(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>Dn(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>Gn(e,t,n),e.decode=(t,n)=>Ln(e,t,n),e.encodeAsync=async(t,n)=>Fn(e,t,n),e.decodeAsync=async(t,n)=>Bn(e,t,n),e.safeEncode=(t,n)=>jn(e,t,n),e.safeDecode=(t,n)=>Jn(e,t,n),e.safeEncodeAsync=async(t,n)=>Vn(e,t,n),e.safeDecodeAsync=async(t,n)=>Kn(e,t,n),Yn(e,"ZodType",{check(...e){const t=this.def;return this.clone(_(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 I(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,...E(n)})}(io,e,t)}(e,t))},superRefine(e,t){return this.check(function(e,t){return yn(e,t)}(e,t))},overwrite(e){return this.check(gn(e))},optional(){return Wr(this)},exactOptional(){return new Yr({type:"optional",innerType:this})},nullable(){return Qr(this)},nullish(){return Wr(Qr(this))},nonoptional(e){return function(e,t){return new eo({type:"nonoptional",innerType:e,...E(t)})}(this,e)},array(){return xr(this)},or(e){return Rr([this,e])},and(e){return Lr(this,e)},transform(e){return ro(this,new Vr({type:"transform",transform:e}))},default(e){return t=e,new Xr({type:"default",innerType:this,get defaultValue(){return"function"==typeof t?t():C(t)}});var t},prefault(e){return t=e,new qr({type:"prefault",innerType:this,get defaultValue(){return"function"==typeof t?t():C(t)}});var t},catch(e){return new to({type:"catch",innerType:this,catchValue:"function"==typeof(t=e)?t:()=>t});var t},pipe(e){return ro(this,e)},readonly(){return new oo({type:"readonly",innerType:this})},describe(e){const t=this.clone();return sn.add(t,{description:e}),t},meta(...e){if(0===e.length)return sn.get(this);const t=this.clone();return sn.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e){return e(this)}}),Object.defineProperty(e,"description",{get:()=>sn.get(e)?.description,configurable:!0}),e)),Qn=s("_ZodString",(e,t)=>{Ke.init(e,t),Hn.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n)=>{const r=n;r.type="string";const{minimum:o,maximum:i,format:s,patterns:a,contentEncoding:u}=e._zod.bag;if("number"==typeof o&&(r.minLength=o),"number"==typeof i&&(r.maxLength=i),s&&(r.format=kn[s]??s,""===r.format&&delete r.format,"time"===s&&delete r.format),u&&(r.contentEncoding=u),a&&a.size>0){const e=[...a];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);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,Yn(e,"_ZodString",{regex(...e){return this.check(function(e,t){return new Re({check:"string_format",format:"regex",...E(t),pattern:e})}(...e))},includes(...e){return this.check(function(e,t){return new Ge({check:"string_format",format:"includes",...E(t),includes:e})}(...e))},startsWith(...e){return this.check(function(e,t){return new Le({check:"string_format",format:"starts_with",...E(t),prefix:e})}(...e))},endsWith(...e){return this.check(function(e,t){return new Fe({check:"string_format",format:"ends_with",...E(t),suffix:e})}(...e))},min(...e){return this.check(hn(...e))},max(...e){return this.check(fn(...e))},length(...e){return this.check(mn(...e))},nonempty(...e){return this.check(hn(1,...e))},lowercase(e){return this.check(function(e){return new Ue({check:"string_format",format:"lowercase",...E(e)})}(e))},uppercase(e){return this.check(function(e){return new De({check:"string_format",format:"uppercase",...E(e)})}(e))},trim(){return this.check(gn(e=>e.trim()))},normalize(...e){return this.check(function(e){return gn(t=>t.normalize(e))}(...e))},toLowerCase(){return this.check(gn(e=>e.toLowerCase()))},toUpperCase(){return this.check(gn(e=>e.toUpperCase()))},slugify(){return this.check(gn(e=>function(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}(e)))}})}),Xn=s("ZodString",(e,t)=>{Ke.init(e,t),Qn.init(e,t),e.email=t=>e.check(function(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...E(t)})}(tr,t)),e.url=t=>e.check(function(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...E(t)})}(or,t)),e.jwt=t=>e.check(function(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...E(t)})}(_r,t)),e.emoji=t=>e.check(function(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...E(t)})}(ir,t)),e.guid=t=>e.check(an(nr,t)),e.uuid=t=>e.check(function(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...E(t)})}(rr,t)),e.uuidv4=t=>e.check(function(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...E(t)})}(rr,t)),e.uuidv6=t=>e.check(function(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...E(t)})}(rr,t)),e.uuidv7=t=>e.check(function(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...E(t)})}(rr,t)),e.nanoid=t=>e.check(function(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...E(t)})}(sr,t)),e.guid=t=>e.check(an(nr,t)),e.cuid=t=>e.check(function(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...E(t)})}(ar,t)),e.cuid2=t=>e.check(function(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...E(t)})}(ur,t)),e.ulid=t=>e.check(function(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...E(t)})}(cr,t)),e.base64=t=>e.check(function(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...E(t)})}(gr,t)),e.base64url=t=>e.check(function(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...E(t)})}(yr,t)),e.xid=t=>e.check(function(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...E(t)})}(lr,t)),e.ksuid=t=>e.check(function(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...E(t)})}(dr,t)),e.ipv4=t=>e.check(function(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...E(t)})}(pr,t)),e.ipv6=t=>e.check(function(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...E(t)})}(fr,t)),e.cidrv4=t=>e.check(function(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...E(t)})}(hr,t)),e.cidrv6=t=>e.check(function(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...E(t)})}(mr,t)),e.e164=t=>e.check(function(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...E(t)})}(vr,t)),e.datetime=t=>e.check(Nn(t)),e.date=t=>e.check(En(t)),e.time=t=>e.check(An(t)),e.duration=t=>e.check(xn(t))});function qn(e){return function(e,t){return new e({type:"string",...E(t)})}(Xn,e)}const er=s("ZodStringFormat",(e,t)=>{We.init(e,t),Qn.init(e,t)}),tr=s("ZodEmail",(e,t)=>{Qe.init(e,t),er.init(e,t)}),nr=s("ZodGUID",(e,t)=>{Ye.init(e,t),er.init(e,t)}),rr=s("ZodUUID",(e,t)=>{He.init(e,t),er.init(e,t)}),or=s("ZodURL",(e,t)=>{Xe.init(e,t),er.init(e,t)}),ir=s("ZodEmoji",(e,t)=>{qe.init(e,t),er.init(e,t)}),sr=s("ZodNanoID",(e,t)=>{et.init(e,t),er.init(e,t)}),ar=s("ZodCUID",(e,t)=>{tt.init(e,t),er.init(e,t)}),ur=s("ZodCUID2",(e,t)=>{nt.init(e,t),er.init(e,t)}),cr=s("ZodULID",(e,t)=>{rt.init(e,t),er.init(e,t)}),lr=s("ZodXID",(e,t)=>{ot.init(e,t),er.init(e,t)}),dr=s("ZodKSUID",(e,t)=>{it.init(e,t),er.init(e,t)}),pr=s("ZodIPv4",(e,t)=>{lt.init(e,t),er.init(e,t)}),fr=s("ZodIPv6",(e,t)=>{dt.init(e,t),er.init(e,t)}),hr=s("ZodCIDRv4",(e,t)=>{pt.init(e,t),er.init(e,t)}),mr=s("ZodCIDRv6",(e,t)=>{ft.init(e,t),er.init(e,t)}),gr=s("ZodBase64",(e,t)=>{mt.init(e,t),er.init(e,t)}),yr=s("ZodBase64URL",(e,t)=>{gt.init(e,t),er.init(e,t)}),vr=s("ZodE164",(e,t)=>{yt.init(e,t),er.init(e,t)}),_r=s("ZodJWT",(e,t)=>{vt.init(e,t),er.init(e,t)}),br=s("ZodNumber",(e,t)=>{_t.init(e,t),Hn.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n)=>{const r=n,{minimum:o,maximum:i,format:s,multipleOf:a,exclusiveMaximum:u,exclusiveMinimum:c}=e._zod.bag;"string"==typeof s&&s.includes("int")?r.type="integer":r.type="number";const l="number"==typeof c&&c>=(o??Number.NEGATIVE_INFINITY),d="number"==typeof u&&u<=(i??Number.POSITIVE_INFINITY),p="draft-04"===t.target||"openapi-3.0"===t.target;l?p?(r.minimum=c,r.exclusiveMinimum=!0):r.exclusiveMinimum=c:"number"==typeof o&&(r.minimum=o),d?p?(r.maximum=u,r.exclusiveMaximum=!0):r.exclusiveMaximum=u:"number"==typeof i&&(r.maximum=i),"number"==typeof a&&(r.multipleOf=a)})(e,t,n),Yn(e,"ZodNumber",{gt(e,t){return this.check(ln(e,t))},gte(e,t){return this.check(dn(e,t))},min(e,t){return this.check(dn(e,t))},lt(e,t){return this.check(un(e,t))},lte(e,t){return this.check(cn(e,t))},max(e,t){return this.check(cn(e,t))},int(e){return this.check(Sr(e))},safe(e){return this.check(Sr(e))},positive(e){return this.check(ln(0,e))},nonnegative(e){return this.check(dn(0,e))},negative(e){return this.check(un(0,e))},nonpositive(e){return this.check(cn(0,e))},multipleOf(e,t){return this.check(pn(e,t))},step(e,t){return this.check(pn(e,t))},finite(){return this}});const n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function wr(e){return function(e,t){return new e({type:"number",checks:[],...E(t)})}(br,e)}const zr=s("ZodNumberFormat",(e,t)=>{bt.init(e,t),br.init(e,t)});function Sr(e){return function(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...E(t)})}(zr,e)}const kr=s("ZodBoolean",(e,t)=>{wt.init(e,t),Hn.init(e,t),e._zod.processJSONSchema=(e,t,n)=>((e,t,n)=>{n.type="boolean"})(0,0,t)});function Cr(e){return function(e,t){return new e({type:"boolean",...E(t)})}(kr,e)}const Tr=s("ZodAny",(e,t)=>{zt.init(e,t),Hn.init(e,t),e._zod.processJSONSchema=(e,t,n)=>{}});function Nr(){return new Tr({type:"any"})}const Ir=s("ZodUnknown",(e,t)=>{St.init(e,t),Hn.init(e,t),e._zod.processJSONSchema=(e,t,n)=>{}});function Er(){return new Ir({type:"unknown"})}const $r=s("ZodNever",(e,t)=>{kt.init(e,t),Hn.init(e,t),e._zod.processJSONSchema=(e,t,n)=>((e,t,n)=>{n.not={}})(0,0,t)});function Ar(e){return function(e,t){return new e({type:"never",...E(t)})}($r,e)}const Or=s("ZodArray",(e,t)=>{Tt.init(e,t),Hn.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const o=n,i=e._zod.def,{minimum:s,maximum:a}=e._zod.bag;"number"==typeof s&&(o.minItems=s),"number"==typeof a&&(o.maxItems=a),o.type="array",o.items=_n(i.element,t,{...r,path:[...r.path,"items"]})})(e,t,n,r),e.element=t.element,Yn(e,"ZodArray",{min(e,t){return this.check(hn(e,t))},nonempty(e){return this.check(hn(1,e))},max(e,t){return this.check(fn(e,t))},length(e,t){return this.check(mn(e,t))},unwrap(){return this.element}})});function xr(e,t){return function(e,t,n){return new e({type:"array",element:t,...E(n)})}(Or,e,t)}const Pr=s("ZodObject",(e,t)=>{At.init(e,t),Hn.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const o=n,i=e._zod.def;o.type="object",o.properties={};const s=i.shape;for(const e in s)o.properties[e]=_n(s[e],t,{...r,path:[...r.path,"properties",e]});const a=new Set(Object.keys(s)),u=new Set([...a].filter(e=>{const n=i.shape[e]._zod;return"input"===t.io?void 0===n.optin:void 0===n.optout}));u.size>0&&(o.required=Array.from(u)),"never"===i.catchall?._zod.def.type?o.additionalProperties=!1:i.catchall?i.catchall&&(o.additionalProperties=_n(i.catchall,t,{...r,path:[...r.path,"additionalProperties"]})):"output"===t.io&&(o.additionalProperties=!1)})(e,t,n,r),y(e,"shape",()=>t.shape),Yn(e,"ZodObject",{keyof(){return Br(Object.keys(this._zod.def.shape))},catchall(e){return this.clone({...this._zod.def,catchall:e})},passthrough(){return this.clone({...this._zod.def,catchall:Er()})},loose(){return this.clone({...this._zod.def,catchall:Er()})},strict(){return this.clone({...this._zod.def,catchall:Ar()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(e){return function(e,t){if(!k(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=e._zod.def.shape;for(const e in t)if(void 0!==Object.getOwnPropertyDescriptor(n,e))throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const r=_(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t};return v(this,"shape",n),n}});return I(e,r)}(this,e)},safeExtend(e){return function(e,t){if(!k(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=_(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t};return v(this,"shape",n),n}});return I(e,n)}(this,e)},merge(e){return function(e,t){if(e._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");const n=_(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t._zod.def.shape};return v(this,"shape",n),n},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return I(e,n)}(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");return I(e,_(e._zod.def,{get shape(){const e={};for(const r in t){if(!(r in n.shape))throw new Error(`Unrecognized key: "${r}"`);t[r]&&(e[r]=n.shape[r])}return v(this,"shape",e),e},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 o=_(e._zod.def,{get shape(){const r={...e._zod.def.shape};for(const e in t){if(!(e in n.shape))throw new Error(`Unrecognized key: "${e}"`);t[e]&&delete r[e]}return v(this,"shape",r),r},checks:[]});return I(e,o)}(this,e)},partial(...e){return function(e,t,n){const r=t._zod.def.checks;if(r&&r.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const o=_(t._zod.def,{get shape(){const r=t._zod.def.shape,o={...r};if(n)for(const t in n){if(!(t in r))throw new Error(`Unrecognized key: "${t}"`);n[t]&&(o[t]=e?new e({type:"optional",innerType:r[t]}):r[t])}else for(const t in r)o[t]=e?new e({type:"optional",innerType:r[t]}):r[t];return v(this,"shape",o),o},checks:[]});return I(t,o)}(Kr,this,e[0])},required(...e){return function(e,t,n){const r=_(t._zod.def,{get shape(){const r=t._zod.def.shape,o={...r};if(n)for(const t in n){if(!(t in o))throw new Error(`Unrecognized key: "${t}"`);n[t]&&(o[t]=new e({type:"nonoptional",innerType:r[t]}))}else for(const t in r)o[t]=new e({type:"nonoptional",innerType:r[t]});return v(this,"shape",o),o}});return I(t,r)}(eo,this,e[0])}})});function Zr(e,t){const n={type:"object",shape:e??{},...E(t)};return new Pr(n)}const Mr=s("ZodUnion",(e,t)=>{xt.init(e,t),Hn.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const o=e._zod.def,i=!1===o.inclusive,s=o.options.map((e,n)=>_n(e,t,{...r,path:[...r.path,i?"oneOf":"anyOf",n]}));i?n.oneOf=s:n.anyOf=s})(e,t,n,r),e.options=t.options});function Rr(e,t){return new Mr({type:"union",options:e,...E(t)})}const Ur=s("ZodDiscriminatedUnion",(e,t)=>{Mr.init(e,t),Pt.init(e,t)});function Dr(e,t,n){return new Ur({type:"union",options:t,discriminator:e,...E(n)})}const Gr=s("ZodIntersection",(e,t)=>{Zt.init(e,t),Hn.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const o=e._zod.def,i=_n(o.left,t,{...r,path:[...r.path,"allOf",0]}),s=_n(o.right,t,{...r,path:[...r.path,"allOf",1]}),a=e=>"allOf"in e&&1===Object.keys(e).length,u=[...a(i)?i.allOf:[i],...a(s)?s.allOf:[s]];n.allOf=u})(e,t,n,r)});function Lr(e,t){return new Gr({type:"intersection",left:e,right:t})}const Fr=s("ZodEnum",(e,t)=>{Ut.init(e,t),Hn.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n)=>{const r=d(e._zod.def.entries);r.every(e=>"number"==typeof e)&&(n.type="number"),r.every(e=>"string"==typeof e)&&(n.type="string"),n.enum=r})(e,0,n),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{const o={};for(const r of e){if(!n.has(r))throw new Error(`Key ${r} not found in enum`);o[r]=t.entries[r]}return new Fr({...t,checks:[],...E(r),entries:o})},e.exclude=(e,r)=>{const o={...t.entries};for(const t of e){if(!n.has(t))throw new Error(`Key ${t} not found in enum`);delete o[t]}return new Fr({...t,checks:[],...E(r),entries:o})}});function Br(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e;return new Fr({type:"enum",entries:n,...E(t)})}const jr=s("ZodLiteral",(e,t)=>{Dt.init(e,t),Hn.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n)=>{const r=e._zod.def,o=[];for(const e of r.values)if(void 0===e){if("throw"===t.unrepresentable)throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if("bigint"==typeof e){if("throw"===t.unrepresentable)throw new Error("BigInt literals cannot be represented in JSON Schema");o.push(Number(e))}else o.push(e);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),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 Jr(e,t){return new jr({type:"literal",values:Array.isArray(e)?e:[e],...E(t)})}const Vr=s("ZodTransform",(e,t)=>{Gt.init(e,t),Hn.init(e,t),e._zod.processJSONSchema=(e,t,n)=>((e,t)=>{if("throw"===t.unrepresentable)throw new Error("Transforms cannot be represented in JSON Schema")})(0,e),e._zod.parse=(n,r)=>{if("backward"===r.direction)throw new u(e.constructor.name);n.addIssue=r=>{if("string"==typeof r)n.issues.push(R(r,n.value,t));else{const t=r;t.fatal&&(t.continue=!1),t.code??(t.code="custom"),t.input??(t.input=n.value),t.inst??(t.inst=e),n.issues.push(R(t))}};const o=t.transform(n.value,n);return o instanceof Promise?o.then(e=>(n.value=e,n.fallback=!0,n)):(n.value=o,n.fallback=!0,n)}});const Kr=s("ZodOptional",(e,t)=>{Ft.init(e,t),Hn.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Cn(e,t,0,r),e.unwrap=()=>e._zod.def.innerType});function Wr(e){return new Kr({type:"optional",innerType:e})}const Yr=s("ZodExactOptional",(e,t)=>{Bt.init(e,t),Hn.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Cn(e,t,0,r),e.unwrap=()=>e._zod.def.innerType});const Hr=s("ZodNullable",(e,t)=>{jt.init(e,t),Hn.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const o=e._zod.def,i=_n(o.innerType,t,r),s=t.seen.get(e);"openapi-3.0"===t.target?(s.ref=o.innerType,n.nullable=!0):n.anyOf=[i,{type:"null"}]})(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Qr(e){return new Hr({type:"nullable",innerType:e})}const Xr=s("ZodDefault",(e,t)=>{Jt.init(e,t),Hn.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const o=e._zod.def;_n(o.innerType,t,r),t.seen.get(e).ref=o.innerType,n.default=JSON.parse(JSON.stringify(o.defaultValue))})(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});const qr=s("ZodPrefault",(e,t)=>{Kt.init(e,t),Hn.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const o=e._zod.def;_n(o.innerType,t,r),t.seen.get(e).ref=o.innerType,"input"===t.io&&(n._prefault=JSON.parse(JSON.stringify(o.defaultValue)))})(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});const eo=s("ZodNonOptional",(e,t)=>{Wt.init(e,t),Hn.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const o=e._zod.def;_n(o.innerType,t,r),t.seen.get(e).ref=o.innerType})(e,t,0,r),e.unwrap=()=>e._zod.def.innerType});const to=s("ZodCatch",(e,t)=>{Ht.init(e,t),Hn.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const o=e._zod.def;let i;_n(o.innerType,t,r),t.seen.get(e).ref=o.innerType;try{i=o.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=i})(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});const no=s("ZodPipe",(e,t)=>{Qt.init(e,t),Hn.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const o=e._zod.def,i=o.in._zod.traits.has("$ZodTransform"),s="input"===t.io?i?o.out:o.in:o.out;_n(s,t,r),t.seen.get(e).ref=s})(e,t,0,r),e.in=t.in,e.out=t.out});function ro(e,t){return new no({type:"pipe",in:e,out:t})}const oo=s("ZodReadonly",(e,t)=>{qt.init(e,t),Hn.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const o=e._zod.def;_n(o.innerType,t,r),t.seen.get(e).ref=o.innerType,n.readOnly=!0})(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});const io=s("ZodCustom",(e,t)=>{tn.init(e,t),Hn.init(e,t),e._zod.processJSONSchema=(e,t,n)=>((e,t)=>{if("throw"===t.unrepresentable)throw new Error("Custom types cannot be represented in JSON Schema")})(0,e)});const so=["GBPCountries","UnitedStates","AUDCountries","EURCountries","International","NZDCountries","Canada"],ao=Br(so),uo=Zr({targetedCountryGroups:xr(ao),targetedCountryCodes:xr(qn()).optional()}).optional(),co={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"}},lo={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:"$"},fo=e=>Object.keys(co).find(t=>co[t].countries.includes(e??""))??"International",ho=e=>{if(e){const t=fo(e);return po[t]}return"£"},mo=e=>{if(e)return lo[e]},go=e=>e.includes("subscribe/weekly/checkout"),yo=(e,t,n,r)=>{if(r){const o=r[fo(n)];return`${ho(n)}${o[e][t].price}`}},vo={CURRENCY_SYMBOL:({countryCode:e})=>ho(e),COUNTRY_NAME:({countryCode:e})=>mo(e),PRICE_DIGISUB_MONTHLY:({countryCode:e,prices:t})=>yo("Digisub","Monthly",e,t),PRICE_DIGISUB_ANNUAL:({countryCode:e,prices:t})=>yo("Digisub","Annual",e,t),PRICE_GUARDIANWEEKLY_MONTHLY:({countryCode:e,prices:t})=>yo("GuardianWeekly","Monthly",e,t),PRICE_GUARDIANWEEKLY_ANNUAL:({countryCode:e,prices:t})=>yo("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"}))()},_o=/%%.*?%%/g,bo="gu.contributions.views",wo=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},zo=(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"}),o=t.getFullYear();return{reminderCta:`Remind me in ${r}`,reminderPeriod:`${o}-${n}-01`,reminderLabel:`${r} ${o}`}},So=new Date("2023-12-31"),ko=e=>e>=(e=>new Date(e.getFullYear(),10,15))(e)&&e<wo(e.getFullYear()),Co=Zr({text:qn(),baseUrl:qn()});let To=function(e){return e.Custom="CustomSecondaryCta",e.ContributionsReminder="ContributionsReminderSecondaryCta",e}({});var No;new Fr({type:"enum",entries:To,...E(No)});const Io=Dr("type",[Zr({type:Jr(To.Custom),cta:Co}),Zr({type:Jr(To.ContributionsReminder)})]),Eo=Zr({countLabel:qn(),goalCopy:qn().optional()}),$o=Zr({total:wr(),goal:wr()}),Ao=Br(["US","AU","global"]),Oo=Zr({currencySymbol:qn(),copy:Eo,name:Ao,tickerData:$o.optional()}),xo=Zr({for52Weeks:wr(),forTargetedWeeks:wr()}),Po=Br(["for52Weeks","forTargetedWeeks"]),Zo=Zr({type:Jr("above"),copy:qn().optional(),countType:Po.optional()}),Mo=Br(["CONTRIBUTION","MEMBERSHIP_SUPPORTER","DIGITAL_SUBSCRIPTION","PRINT_SUBSCRIPTION"]),Ro=Br(["ACQUISITIONS_EPIC","ACQUISITIONS_ENGAGEMENT_BANNER","ACQUISITIONS_SUBSCRIPTIONS_BANNER","ACQUISITIONS_HEADER","ACQUISITIONS_OTHER"]),Uo=Zr({abTestName:qn(),abTestVariant:qn(),campaignCode:qn(),componentType:Ro,products:xr(Mo).nullish(),labels:xr(qn()).nullish(),ophanPageId:qn(),platformId:qn(),referrerUrl:qn()}),Do=Zr({mainUrl:qn(),mobileUrl:qn().optional(),tabletUrl:qn().optional(),desktopUrl:qn().optional(),leftColUrl:qn().optional(),wideUrl:qn().optional(),altText:qn()}),Go=Zr({name:qn(),description:qn().optional(),headshot:Do.optional()}),Lo=/^[0-9A-F]{2}$/,Fo=qn().refine(e=>Lo.test(e),{error:e=>`"${JSON.stringify(e.input)}" is not a valid hex value`}),Bo=Zr({r:Fo,g:Fo,b:Fo,kind:Jr("hex")}),jo=Zr({mobileUrl:qn(),tabletUrl:qn(),desktopUrl:qn(),altText:qn(),kind:Jr("Image")}),Jo=Zr({buttonColour:Bo.nullish(),buttonTextColour:Bo.nullish(),buttonBorderColour:Bo.nullish(),buttonSelectColour:Bo.nullish(),buttonSelectTextColour:Bo.nullish(),buttonSelectBorderColour:Bo.nullish(),buttonSelectMarkerColour:Bo.nullish(),pillTextColour:Bo.nullish(),pillBackgroundColour:Bo.nullish(),kind:Jr("ChoiceCards")}),Vo=Zr({visual:Dr("kind",[jo,Jo]).nullish(),colours:Zr({basic:Zr({background:Bo,bodyText:Bo})})}),Ko=Zr({copy:qn()}),Wo=Rr([Jr("Monthly"),Jr("Annual")]),Yo=Dr("supportTier",[Zr({supportTier:Jr("Contribution"),ratePlan:Wo}),Zr({supportTier:Jr("SupporterPlus"),ratePlan:Wo}),Zr({supportTier:Jr("DigitalSubscription"),ratePlan:Wo}),Zr({supportTier:Jr("OneOff")})]),Ho=Zr({copy:qn(),textColour:Bo.nullish(),backgroundColour:Bo.nullish()}),Qo=Rr([Jr("LandingPage"),Jr("Checkout")]),Xo=Zr({testName:qn(),variantName:qn()}),qo=Zr({product:Yo,label:qn(),isDefault:Cr(),defaultExpanded:Cr().optional(),benefitsLabel:qn().nullish(),benefits:xr(Ko),pill:Ho.nullish(),destination:Qo.nullish(),destinationTest:Xo.nullish()}),ei=Zr({choiceCards:xr(qo),mobileChoiceCards:xr(qo).nullish()}),ti=Zr({maxViewsCount:wr(),maxViewsDays:wr(),minDaysBetweenViews:wr()}),ni=Zr({reminderCta:qn(),reminderLabel:qn(),reminderPeriod:qn()});Br(["ONE_OFF","MONTHLY","ANNUAL"]);const ri=Zr({newsletterId:qn(),successDescription:qn()}),oi=Zr({name:qn(),heading:qn().optional(),paragraphs:xr(qn()),highlightedText:qn().optional(),tickerSettings:Oo.optional(),cta:Co.optional(),secondaryCta:Io.optional(),newsletterSignup:ri.optional(),image:Do.optional(),showReminderFields:ni.optional(),separateArticleCount:Zo.optional(),promoCodes:xr(qn()).nullish(),maxViews:ti.optional(),showSignInLink:Cr().optional(),bylineWithImage:Go.optional(),showChoiceCards:Cr().optional(),choiceCardsSettings:ei.nullish()}),ii=Zr({variant:oi,tracking:Uo,countryCode:qn().nullish(),articleCounts:xo,onReminderOpen:Nr().nullish(),fetchEmail:Nr().nullish(),submitComponentEvent:Nr().nullish(),openCmp:Nr().nullish(),hasConsentForArticleCount:Cr().nullish(),stage:qn().nullish()}),si=Br(["contributions","subscriptions","signIn","abandonedBasket"]),ai=Zr({heading:qn().optional(),messageText:qn().optional(),paragraphs:xr(qn()).optional(),mobileMessageText:qn().optional(),highlightedText:qn().optional(),cta:Co.optional(),secondaryCta:Io.optional()}),ui=Zr({tracking:Uo,bannerChannel:si,content:ai.nullish(),mobileContent:ai.nullish(),countryCode:qn().nullish(),tickerSettings:Oo.nullish(),submitComponentEvent:Nr(),articleCounts:xo,hasOptedOutOfArticleCount:Cr().nullish(),fetchEmail:Nr().nullish(),separateArticleCount:Cr().nullish(),design:Vo.nullish(),choiceCardsSettings:ei.nullish(),promoCodes:xr(qn()).nullish(),isCollapsible:Cr().nullish(),contributionsServiceUrl:qn().nullish()}),ci=Zr({heading:qn(),subheading:qn(),primaryCta:Co.optional(),secondaryCta:Co.optional(),benefits:xr(qn()).optional()}),li=Zr({content:ci,tracking:Uo,mobileContent:ci.optional(),countryCode:qn().optional(),submitComponentEvent:Nr(),promoCodes:xr(qn()).nullish()}),di=Zr({image:Do,bodyCopy:xr(qn()),cta:Co.optional()});Zr({content:di,tracking:Uo,countryCode:qn().optional(),submitComponentEvent:Nr(),promoCodes:xr(qn()).nullish()});const pi=Br(["Contribution","SupporterPlus","GuardianWeekly","Paper"]),fi=Br(["new","guest","current"]),hi=Br(["Epic","EpicAppleNews","EpicLiveblog","Banner1","Banner2","Header","GutterLiveblog"]),mi=Br(["Live","Draft","Archived"]),gi=Br(["Mobile","Desktop","All","iOS","Android"]),yi=Br(["SignedIn","SignedOut","All"]),vi=Br(["HasConsented","HasNotConsented","All"]),_i=Lr(Dr("name",[Zr({name:Jr("ABTest")}),Zr({name:Jr("EpsilonGreedyBandit"),epsilon:wr(),sampleCount:wr().optional()}),Zr({name:Jr("Roulette"),sampleCount:wr().optional()})]),Zr({testName:qn().optional()})),bi=Zr({channel:hi,name:qn(),status:mi,priority:wr(),controlProportionSettings:Zr({proportion:wr(),offset:wr()}).optional(),deviceType:gi.optional(),signedInStatus:yi.optional(),consentStatus:vi.optional(),methodologies:_i.array().optional(),mParticleAudience:wr().nullish(),scheduler:Zr({start:qn().optional(),end:qn().optional()}).optional()}),wi=Br(["AllExistingSupporters","AllNonSupporters","Everyone","PostAskPauseSingleContributors"]),zi=Zr({minViews:wr(),maxViews:wr().optional(),periodInWeeks:wr(),tagIds:xr(qn()).optional()});Zr({userType:xr(fi),product:xr(pi)}),Zr({tagIds:xr(qn()),sectionIds:xr(qn()),excludedTagIds:xr(qn()),excludedSectionIds:xr(qn())});const Si=Zr({maxViewsCount:wr(),maxViewsDays:wr(),minDaysBetweenViews:wr()});bi.extend({name:qn(),status:mi,locations:xr(ao).optional(),regionTargeting:uo.optional(),tagIds:xr(qn()),sections:xr(qn()),excludedTagIds:xr(qn()),excludedSections:xr(qn()),alwaysAsk:Cr(),maxViews:Si.optional(),userCohort:wi,hasCountryName:Cr(),highPriority:Cr(),useLocalViewLog:Cr(),articlesViewedSettings:zi.optional(),priority:wr(),variants:oi.array()});const ki=Zr({amount:Rr([wr(),Jr("other")]),billingPeriod:Rr([Jr("ONE_OFF"),Jr("MONTHLY"),Jr("ANNUAL")]),product:Rr([Jr("Contribution"),Jr("SupporterPlus"),Jr("PremiumTier"),Jr("DailyEdition"),Jr("GuardianWeekly"),Jr("Paper"),Jr("PaperAndDigital")]),region:Rr([Jr("uk"),Jr("us"),Jr("au"),Jr("eu"),Jr("int"),Jr("nz"),Jr("ca")])}),Ci=(e,t,n,r)=>{const o=(e=>new URLSearchParams(window.location.search).get(`force-${e}`))(e),i=(e=>new URLSearchParams(window.location.search).get(`preview-${e}`))(e),s=new URLSearchParams;o?s.set("force",o):i&&s.set("preview",i);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=so,exports.SecondaryCtaType=To,exports.abandonedBasketSchema=ki,exports.addRegionIdToSupportUrl=(e,t)=>{if(t){const n=(e=>co[fo(e)].supportRegionId)(t);if(!go(e))return e.replace(/(support\.theguardian\.com)\/(contribute-in-epic|contribute|subscribe|checkout)/,(e,t,r)=>`${t}/${n.toLowerCase()}/${r}`)}return e},exports.bannerSchema=ui,exports.buildReminderFields=zo,exports.containsNonArticleCountPlaceholder=e=>{const t=e.match(_o)?.filter(e=>"%%ARTICLE_COUNT%%"!==e);return!!t&&t.length>0},exports.contributionTabFrequencies=["ONE_OFF","MONTHLY","ANNUAL"],exports.countryCodeToCountryGroupId=fo,exports.countryGroupIdSchema=ao,exports.countryGroups=co,exports.epicPropsSchema=ii,exports.getBanner=(e,t)=>Ci("banner",e,t),exports.getCountryName=mo,exports.getEpic=(e,t,n)=>Ci("epic",e,t,n),exports.getEpicViewLog=e=>e.get(bo)??void 0,exports.getGutterLiveblog=(e,t)=>Ci("gutter-liveblog",e,t),exports.getHeader=(e,t)=>Ci("header",e,t),exports.getLiveblogEpic=(e,t)=>Ci("liveblog-epic",e,t),exports.getLocalCurrencySymbol=ho,exports.getReminderFields=(e,t=new Date)=>{return"US"===e&&ko(t)?{reminderCta:"Remind me on Giving Tuesday",reminderPeriod:`${n=t.getFullYear()}-${(wo(n).getMonth()+1).toString().padStart(0,"2")}-01`,reminderLabel:"on Giving Tuesday",reminderOption:`giving-tuesday-${n}`}:"US"===e&&(e=>e>=wo(e.getFullYear())&&e<So)(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()):zo(t);var n},exports.getWeeklyArticleHistory=t=>t.get(e)??void 0,exports.headerPropsSchema=li,exports.hexColourToString=e=>`#${e.r}${e.g}${e.b}`,exports.inTargetedCountry=(e,t=[],n=[])=>0===t.length&&0===n.length||!!e&&(!!t.includes(fo(e.toUpperCase()))||n.includes(e.toUpperCase())),exports.incrementWeeklyArticleCount=(r,i,s)=>{const a=((e,r)=>{const o=n(new Date),i=e.get(t);if(i?.week===o){const n=i.articles[r]||0;return e.set(t,{week:o,articles:{...i.articles,[r]:n+1}}),n>0}return e.set(t,{week:o,articles:{[r]:1}}),!1})(r,i);if(!a){const t=n(new Date),i=r.get(e)??[],a=i.length>0?i[0]:null;if(a?.week&&a.week===t)a.count+=1,a.tags=o(s,a.tags),r.set(e,i);else{i.unshift({week:t,count:1,tags:o(s,{})});const n=t-365,a=i.filter(e=>e.week>=n);r.set(e,a)}}},exports.isGWCheckoutUrl=go,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.replaceNonArticleCountPlaceholders=(e,t,n)=>e?e.replace(_o,e=>{const r=e.substring(2,e.length-2),o=vo[r];if(o){const e=o({countryCode:t,prices:n});if(e)return e}return e}):"",exports.targetedRegionsSchema=uo;
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;
@@ -5,7 +5,6 @@ export * from '../shared/lib/viewLog';
5
5
  export * from '../shared/lib/reminderFields';
6
6
  export { SecondaryCtaType } from '../shared/types/props/shared';
7
7
  export { hexColourToString } from '../shared/types/props/design';
8
- export { contributionTabFrequencies } from '../shared/types/abTests/epic';
9
8
  export { headerPropsSchema } from '../shared/types/props/header';
10
9
  export { epicPropsSchema } from '../shared/types/props/epic';
11
10
  export { bannerSchema } from '../shared/types/props/banner';
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,2BAA2B,EAAE,MAAM,uBAAuB,CAAC;AAC7F,OAAO,EACH,kCAAkC,EAClC,kCAAkC,GACrC,MAAM,4BAA4B,CAAC;AACpC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,uBAAuB,CAAC;AACtC,cAAc,8BAA8B,CAAC;AAC7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AACzE,cAAc,YAAY,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"requests.d.ts","sourceRoot":"","sources":["../../../requests.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACR,aAAa,EACb,WAAW,EACX,WAAW,EACX,SAAS,EACT,aAAa,EACb,WAAW,EACX,aAAa,EACb,WAAW,EACd,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAEnE,MAAM,WAAW,UAAU,CAAC,KAAK;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,KAAK,CAAC;CAChB;AAED,MAAM,WAAW,kBAAkB,CAAC,KAAK;IACrC,IAAI,CAAC,EAAE;QACH,MAAM,EAAE,UAAU,CAAC,KAAK,CAAC,CAAC;QAC1B,IAAI,EAAE,YAAY,CAAC;KACtB,CAAC;CACL;AAuDD,eAAO,MAAM,OAAO,GAChB,SAAS,MAAM,EACf,SAAS,WAAW,EACpB,UAAU,WAAW,KACtB,OAAO,CAAC,kBAAkB,CAAC,SAAS,CAAC,CAAqD,CAAC;AAE9F,eAAO,MAAM,eAAe,GACxB,SAAS,MAAM,EACf,SAAS,WAAW,KACrB,OAAO,CAAC,kBAAkB,CAAC,SAAS,CAAC,CAAqD,CAAC;AAE9F,eAAO,MAAM,SAAS,GAClB,SAAS,MAAM,EACf,SAAS,aAAa,KACvB,OAAO,CAAC,kBAAkB,CAAC,WAAW,CAAC,CAA8C,CAAC;AAEzF,eAAO,MAAM,iBAAiB,GAC1B,SAAS,MAAM,EACf,SAAS,aAAa,KACvB,OAAO,CAAC,kBAAkB,CAAC,WAAW,CAAC,CAAuD,CAAC;AAElG,eAAO,MAAM,SAAS,GAClB,SAAS,MAAM,EACf,SAAS,aAAa,KACvB,OAAO,CAAC,kBAAkB,CAAC,WAAW,CAAC,CAA8C,CAAC"}
@@ -1,6 +1,7 @@
1
- export { BannerPayload, EpicPayload, HeaderPayload, WeeklyArticleHistory, GutterPayload, } from '../shared/types/targeting';
1
+ export { BannerPayload, EpicPayload, HeaderPayload, WeeklyArticleHistory, GutterPayload, Inline1Payload, } from '../shared/types/targeting';
2
2
  export * from '../shared/types/prices';
3
3
  export { EpicProps } from '../shared/types/props/epic';
4
+ export { Inline1Props } from '../shared/types/props/inline1';
4
5
  export { ModuleDataResponse, ModuleData } from './requests';
5
6
  export { Image } from '../shared/types/props/shared';
6
7
  //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../types.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,aAAa,EACb,WAAW,EACX,aAAa,EACb,oBAAoB,EACpB,aAAa,EACb,cAAc,GACjB,MAAM,2BAA2B,CAAC;AACnC,cAAc,wBAAwB,CAAC;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAC7D,OAAO,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAC5D,OAAO,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAC"}