@guardian/support-dotcom-components 1.1.1 → 1.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const e="gu.contributions.views",t="gu.history.weeklyArticleCount",a="gu.history.articleCountsThisWeek",n=e=>{const t=e.getDay()||7;return Date.UTC(e.getFullYear(),e.getMonth(),e.getDate()-(t-1))/864e5},s=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"]),r=(e,t={})=>(e.forEach((e=>{s.has(e)&&(t[e]=(t[e]??0)+1)})),t),i={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"}},o={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"},d={GBPCountries:"£",UnitedStates:"$",AUDCountries:"$",Canada:"CA$",EURCountries:"€",NZDCountries:"NZ$",International:"$"},u=e=>Object.keys(i).find((t=>i[t].countries.includes(e??"")))||"International",c=e=>{if(e){const t=u(e);return d[t]}return"£"},l=e=>{if(e)return o[e]},h=(e,t,a,n)=>{if(n){const s=n[u(a)];if(s){return`${c(a)}${s[e][t].price}`}}},p={CURRENCY_SYMBOL:({countryCode:e})=>c(e),COUNTRY_NAME:({countryCode:e})=>l(e),PRICE_DIGISUB_MONTHLY:({countryCode:e,prices:t})=>h("Digisub","Monthly",e,t),PRICE_DIGISUB_ANNUAL:({countryCode:e,prices:t})=>h("Digisub","Annual",e,t),PRICE_GUARDIANWEEKLY_MONTHLY:({countryCode:e,prices:t})=>h("GuardianWeekly","Monthly",e,t),PRICE_GUARDIANWEEKLY_ANNUAL:({countryCode:e,prices:t})=>h("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"}))()},m=/%%.*?%%/g,f=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},y=(e=new Date)=>{const t=(e=>{const t=e.getDate()<20?1:2;return e.setMonth(e.getMonth()+t),e})(e),a=(t.getMonth()+1).toString().padStart(2,"0"),n=t.toLocaleString("default",{month:"long"}),s=t.getFullYear();return{reminderCta:`Remind me in ${n}`,reminderPeriod:`${s}-${a}-01`,reminderLabel:`${n} ${s}`}},g=new Date("2023-12-31"),v=e=>e>=(e=>new Date(e.getFullYear(),9,20))(e)&&e<f(e.getFullYear());var _,b;!function(e){e.assertEqual=e=>e,e.assertIs=function(e){},e.assertNever=function(e){throw new Error},e.arrayToEnum=e=>{const t={};for(const a of e)t[a]=a;return t},e.getValidEnumValues=t=>{const a=e.objectKeys(t).filter((e=>"number"!=typeof t[t[e]])),n={};for(const e of a)n[e]=t[e];return e.objectValues(n)},e.objectValues=t=>e.objectKeys(t).map((function(e){return t[e]})),e.objectKeys="function"==typeof Object.keys?e=>Object.keys(e):e=>{const t=[];for(const a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.push(a);return t},e.find=(e,t)=>{for(const a of e)if(t(a))return a},e.isInteger="function"==typeof Number.isInteger?e=>Number.isInteger(e):e=>"number"==typeof e&&isFinite(e)&&Math.floor(e)===e,e.joinValues=function(e,t=" | "){return e.map((e=>"string"==typeof e?`'${e}'`:e)).join(t)},e.jsonStringifyReplacer=(e,t)=>"bigint"==typeof t?t.toString():t}(_||(_={})),function(e){e.mergeShapes=(e,t)=>({...e,...t})}(b||(b={}));const x=_.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),k=e=>{switch(typeof e){case"undefined":return x.undefined;case"string":return x.string;case"number":return isNaN(e)?x.nan:x.number;case"boolean":return x.boolean;case"function":return x.function;case"bigint":return x.bigint;case"symbol":return x.symbol;case"object":return Array.isArray(e)?x.array:null===e?x.null:e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch?x.promise:"undefined"!=typeof Map&&e instanceof Map?x.map:"undefined"!=typeof Set&&e instanceof Set?x.set:"undefined"!=typeof Date&&e instanceof Date?x.date:x.object;default:return x.unknown}},C=_.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class S extends Error{constructor(e){super(),this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=(e=[])=>{this.issues=[...this.issues,...e]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){const t=e||function(e){return e.message},a={_errors:[]},n=e=>{for(const s of e.issues)if("invalid_union"===s.code)s.unionErrors.map(n);else if("invalid_return_type"===s.code)n(s.returnTypeError);else if("invalid_arguments"===s.code)n(s.argumentsError);else if(0===s.path.length)a._errors.push(t(s));else{let e=a,n=0;for(;n<s.path.length;){const a=s.path[n];n===s.path.length-1?(e[a]=e[a]||{_errors:[]},e[a]._errors.push(t(s))):e[a]=e[a]||{_errors:[]},e=e[a],n++}}};return n(this),a}toString(){return this.message}get message(){return JSON.stringify(this.issues,_.jsonStringifyReplacer,2)}get isEmpty(){return 0===this.issues.length}flatten(e=(e=>e.message)){const t={},a=[];for(const n of this.issues)n.path.length>0?(t[n.path[0]]=t[n.path[0]]||[],t[n.path[0]].push(e(n))):a.push(e(n));return{formErrors:a,fieldErrors:t}}get formErrors(){return this.flatten()}}S.create=e=>new S(e);const w=(e,t)=>{let a;switch(e.code){case C.invalid_type:a=e.received===x.undefined?"Required":`Expected ${e.expected}, received ${e.received}`;break;case C.invalid_literal:a=`Invalid literal value, expected ${JSON.stringify(e.expected,_.jsonStringifyReplacer)}`;break;case C.unrecognized_keys:a=`Unrecognized key(s) in object: ${_.joinValues(e.keys,", ")}`;break;case C.invalid_union:a="Invalid input";break;case C.invalid_union_discriminator:a=`Invalid discriminator value. Expected ${_.joinValues(e.options)}`;break;case C.invalid_enum_value:a=`Invalid enum value. Expected ${_.joinValues(e.options)}, received '${e.received}'`;break;case C.invalid_arguments:a="Invalid function arguments";break;case C.invalid_return_type:a="Invalid function return type";break;case C.invalid_date:a="Invalid date";break;case C.invalid_string:"object"==typeof e.validation?"includes"in e.validation?(a=`Invalid input: must include "${e.validation.includes}"`,"number"==typeof e.validation.position&&(a=`${a} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?a=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?a=`Invalid input: must end with "${e.validation.endsWith}"`:_.assertNever(e.validation):a="regex"!==e.validation?`Invalid ${e.validation}`:"Invalid";break;case C.too_small:a="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:"date"===e.type?`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:"Invalid input";break;case C.too_big:a="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"bigint"===e.type?`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"date"===e.type?`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:"Invalid input";break;case C.custom:a="Invalid input";break;case C.invalid_intersection_types:a="Intersection results could not be merged";break;case C.not_multiple_of:a=`Number must be a multiple of ${e.multipleOf}`;break;case C.not_finite:a="Number must be finite";break;default:a=t.defaultError,_.assertNever(e)}return{message:a}};let T=w;function N(){return T}const I=e=>{const{data:t,path:a,errorMaps:n,issueData:s}=e,r=[...a,...s.path||[]],i={...s,path:r};let o="";const d=n.filter((e=>!!e)).slice().reverse();for(const e of d)o=e(i,{data:t,defaultError:o}).message;return{...s,path:r,message:s.message||o}};function E(e,t){const a=I({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,N(),w].filter((e=>!!e))});e.common.issues.push(a)}class A{constructor(){this.value="valid"}dirty(){"valid"===this.value&&(this.value="dirty")}abort(){"aborted"!==this.value&&(this.value="aborted")}static mergeArray(e,t){const a=[];for(const n of t){if("aborted"===n.status)return R;"dirty"===n.status&&e.dirty(),a.push(n.value)}return{status:e.value,value:a}}static async mergeObjectAsync(e,t){const a=[];for(const e of t)a.push({key:await e.key,value:await e.value});return A.mergeObjectSync(e,a)}static mergeObjectSync(e,t){const a={};for(const n of t){const{key:t,value:s}=n;if("aborted"===t.status)return R;if("aborted"===s.status)return R;"dirty"===t.status&&e.dirty(),"dirty"===s.status&&e.dirty(),"__proto__"===t.value||void 0===s.value&&!n.alwaysSet||(a[t.value]=s.value)}return{status:e.value,value:a}}}const R=Object.freeze({status:"aborted"}),O=e=>({status:"valid",value:e}),Z=e=>"aborted"===e.status,M=e=>"dirty"===e.status,P=e=>"valid"===e.status,L=e=>"undefined"!=typeof Promise&&e instanceof Promise;var U;!function(e){e.errToObj=e=>"string"==typeof e?{message:e}:e||{},e.toString=e=>"string"==typeof e?e:null==e?void 0:e.message}(U||(U={}));class B{constructor(e,t,a,n){this._cachedPath=[],this.parent=e,this.data=t,this._path=a,this._key=n}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const D=(e,t)=>{if(P(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const t=new S(e.common.issues);return this._error=t,this._error}}};function G(e){if(!e)return{};const{errorMap:t,invalid_type_error:a,required_error:n,description:s}=e;if(t&&(a||n))throw new Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');if(t)return{errorMap:t,description:s};return{errorMap:(e,t)=>"invalid_type"!==e.code?{message:t.defaultError}:void 0===t.data?{message:null!=n?n:t.defaultError}:{message:null!=a?a:t.defaultError},description:s}}class j{constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(e){return k(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:k(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new A,ctx:{common:e.parent.common,data:e.data,parsedType:k(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(L(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const a=this.safeParse(e,t);if(a.success)return a.data;throw a.error}safeParse(e,t){var a;const n={common:{issues:[],async:null!==(a=null==t?void 0:t.async)&&void 0!==a&&a,contextualErrorMap:null==t?void 0:t.errorMap},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:k(e)},s=this._parseSync({data:e,path:n.path,parent:n});return D(n,s)}async parseAsync(e,t){const a=await this.safeParseAsync(e,t);if(a.success)return a.data;throw a.error}async safeParseAsync(e,t){const a={common:{issues:[],contextualErrorMap:null==t?void 0:t.errorMap,async:!0},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:k(e)},n=this._parse({data:e,path:a.path,parent:a}),s=await(L(n)?n:Promise.resolve(n));return D(a,s)}refine(e,t){const a=e=>"string"==typeof t||void 0===t?{message:t}:"function"==typeof t?t(e):t;return this._refinement(((t,n)=>{const s=e(t),r=()=>n.addIssue({code:C.custom,...a(t)});return"undefined"!=typeof Promise&&s instanceof Promise?s.then((e=>!!e||(r(),!1))):!!s||(r(),!1)}))}refinement(e,t){return this._refinement(((a,n)=>!!e(a)||(n.addIssue("function"==typeof t?t(a,n):t),!1)))}_refinement(e){return new Se({schema:this,typeName:Ze.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return we.create(this,this._def)}nullable(){return Te.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return ue.create(this,this._def)}promise(){return Ce.create(this,this._def)}or(e){return he.create([this,e],this._def)}and(e){return me.create(this,e,this._def)}transform(e){return new Se({...G(this._def),schema:this,typeName:Ze.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t="function"==typeof e?e:()=>e;return new Ne({...G(this._def),innerType:this,defaultValue:t,typeName:Ze.ZodDefault})}brand(){return new Ae({typeName:Ze.ZodBranded,type:this,...G(this._def)})}catch(e){const t="function"==typeof e?e:()=>e;return new Ie({...G(this._def),innerType:this,catchValue:t,typeName:Ze.ZodCatch})}describe(e){return new(0,this.constructor)({...this._def,description:e})}pipe(e){return Re.create(this,e)}readonly(){return Oe.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const K=/^c[^\s-]{8,}$/i,$=/^[a-z][a-z0-9]*$/,V=/^[0-9A-HJKMNP-TV-Z]{26}$/,F=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,W=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i;let z;const H=/^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/,Y=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/;class J extends j{_parse(e){this._def.coerce&&(e.data=String(e.data));if(this._getType(e)!==x.string){const t=this._getOrReturnCtx(e);return E(t,{code:C.invalid_type,expected:x.string,received:t.parsedType}),R}const t=new A;let a;for(const i of this._def.checks)if("min"===i.kind)e.data.length<i.value&&(a=this._getOrReturnCtx(e,a),E(a,{code:C.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),t.dirty());else if("max"===i.kind)e.data.length>i.value&&(a=this._getOrReturnCtx(e,a),E(a,{code:C.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),t.dirty());else if("length"===i.kind){const n=e.data.length>i.value,s=e.data.length<i.value;(n||s)&&(a=this._getOrReturnCtx(e,a),n?E(a,{code:C.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):s&&E(a,{code:C.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),t.dirty())}else if("email"===i.kind)W.test(e.data)||(a=this._getOrReturnCtx(e,a),E(a,{validation:"email",code:C.invalid_string,message:i.message}),t.dirty());else if("emoji"===i.kind)z||(z=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),z.test(e.data)||(a=this._getOrReturnCtx(e,a),E(a,{validation:"emoji",code:C.invalid_string,message:i.message}),t.dirty());else if("uuid"===i.kind)F.test(e.data)||(a=this._getOrReturnCtx(e,a),E(a,{validation:"uuid",code:C.invalid_string,message:i.message}),t.dirty());else if("cuid"===i.kind)K.test(e.data)||(a=this._getOrReturnCtx(e,a),E(a,{validation:"cuid",code:C.invalid_string,message:i.message}),t.dirty());else if("cuid2"===i.kind)$.test(e.data)||(a=this._getOrReturnCtx(e,a),E(a,{validation:"cuid2",code:C.invalid_string,message:i.message}),t.dirty());else if("ulid"===i.kind)V.test(e.data)||(a=this._getOrReturnCtx(e,a),E(a,{validation:"ulid",code:C.invalid_string,message:i.message}),t.dirty());else if("url"===i.kind)try{new URL(e.data)}catch(n){a=this._getOrReturnCtx(e,a),E(a,{validation:"url",code:C.invalid_string,message:i.message}),t.dirty()}else if("regex"===i.kind){i.regex.lastIndex=0;i.regex.test(e.data)||(a=this._getOrReturnCtx(e,a),E(a,{validation:"regex",code:C.invalid_string,message:i.message}),t.dirty())}else if("trim"===i.kind)e.data=e.data.trim();else if("includes"===i.kind)e.data.includes(i.value,i.position)||(a=this._getOrReturnCtx(e,a),E(a,{code:C.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),t.dirty());else if("toLowerCase"===i.kind)e.data=e.data.toLowerCase();else if("toUpperCase"===i.kind)e.data=e.data.toUpperCase();else if("startsWith"===i.kind)e.data.startsWith(i.value)||(a=this._getOrReturnCtx(e,a),E(a,{code:C.invalid_string,validation:{startsWith:i.value},message:i.message}),t.dirty());else if("endsWith"===i.kind)e.data.endsWith(i.value)||(a=this._getOrReturnCtx(e,a),E(a,{code:C.invalid_string,validation:{endsWith:i.value},message:i.message}),t.dirty());else if("datetime"===i.kind){((r=i).precision?r.offset?new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${r.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`):new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${r.precision}}Z$`):0===r.precision?r.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"):r.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$")).test(e.data)||(a=this._getOrReturnCtx(e,a),E(a,{code:C.invalid_string,validation:"datetime",message:i.message}),t.dirty())}else"ip"===i.kind?(n=e.data,("v4"!==(s=i.version)&&s||!H.test(n))&&("v6"!==s&&s||!Y.test(n))&&(a=this._getOrReturnCtx(e,a),E(a,{validation:"ip",code:C.invalid_string,message:i.message}),t.dirty())):_.assertNever(i);var n,s,r;return{status:t.value,value:e.data}}_regex(e,t,a){return this.refinement((t=>e.test(t)),{validation:t,code:C.invalid_string,...U.errToObj(a)})}_addCheck(e){return new J({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...U.errToObj(e)})}url(e){return this._addCheck({kind:"url",...U.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...U.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...U.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...U.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...U.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...U.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...U.errToObj(e)})}datetime(e){var t;return"string"==typeof e?this._addCheck({kind:"datetime",precision:null,offset:!1,message:e}):this._addCheck({kind:"datetime",precision:void 0===(null==e?void 0:e.precision)?null:null==e?void 0:e.precision,offset:null!==(t=null==e?void 0:e.offset)&&void 0!==t&&t,...U.errToObj(null==e?void 0:e.message)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...U.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:null==t?void 0:t.position,...U.errToObj(null==t?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...U.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...U.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...U.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...U.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...U.errToObj(t)})}nonempty(e){return this.min(1,U.errToObj(e))}trim(){return new J({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new J({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new J({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find((e=>"datetime"===e.kind))}get isEmail(){return!!this._def.checks.find((e=>"email"===e.kind))}get isURL(){return!!this._def.checks.find((e=>"url"===e.kind))}get isEmoji(){return!!this._def.checks.find((e=>"emoji"===e.kind))}get isUUID(){return!!this._def.checks.find((e=>"uuid"===e.kind))}get isCUID(){return!!this._def.checks.find((e=>"cuid"===e.kind))}get isCUID2(){return!!this._def.checks.find((e=>"cuid2"===e.kind))}get isULID(){return!!this._def.checks.find((e=>"ulid"===e.kind))}get isIP(){return!!this._def.checks.find((e=>"ip"===e.kind))}get minLength(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}function q(e,t){const a=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,s=a>n?a:n;return parseInt(e.toFixed(s).replace(".",""))%parseInt(t.toFixed(s).replace(".",""))/Math.pow(10,s)}J.create=e=>{var t;return new J({checks:[],typeName:Ze.ZodString,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...G(e)})};class Q extends j{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){this._def.coerce&&(e.data=Number(e.data));if(this._getType(e)!==x.number){const t=this._getOrReturnCtx(e);return E(t,{code:C.invalid_type,expected:x.number,received:t.parsedType}),R}let t;const a=new A;for(const n of this._def.checks)if("int"===n.kind)_.isInteger(e.data)||(t=this._getOrReturnCtx(e,t),E(t,{code:C.invalid_type,expected:"integer",received:"float",message:n.message}),a.dirty());else if("min"===n.kind){(n.inclusive?e.data<n.value:e.data<=n.value)&&(t=this._getOrReturnCtx(e,t),E(t,{code:C.too_small,minimum:n.value,type:"number",inclusive:n.inclusive,exact:!1,message:n.message}),a.dirty())}else if("max"===n.kind){(n.inclusive?e.data>n.value:e.data>=n.value)&&(t=this._getOrReturnCtx(e,t),E(t,{code:C.too_big,maximum:n.value,type:"number",inclusive:n.inclusive,exact:!1,message:n.message}),a.dirty())}else"multipleOf"===n.kind?0!==q(e.data,n.value)&&(t=this._getOrReturnCtx(e,t),E(t,{code:C.not_multiple_of,multipleOf:n.value,message:n.message}),a.dirty()):"finite"===n.kind?Number.isFinite(e.data)||(t=this._getOrReturnCtx(e,t),E(t,{code:C.not_finite,message:n.message}),a.dirty()):_.assertNever(n);return{status:a.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,U.toString(t))}gt(e,t){return this.setLimit("min",e,!1,U.toString(t))}lte(e,t){return this.setLimit("max",e,!0,U.toString(t))}lt(e,t){return this.setLimit("max",e,!1,U.toString(t))}setLimit(e,t,a,n){return new Q({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:a,message:U.toString(n)}]})}_addCheck(e){return new Q({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:U.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:U.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:U.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:U.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:U.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:U.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:U.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:U.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:U.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find((e=>"int"===e.kind||"multipleOf"===e.kind&&_.isInteger(e.value)))}get isFinite(){let e=null,t=null;for(const a of this._def.checks){if("finite"===a.kind||"int"===a.kind||"multipleOf"===a.kind)return!0;"min"===a.kind?(null===t||a.value>t)&&(t=a.value):"max"===a.kind&&(null===e||a.value<e)&&(e=a.value)}return Number.isFinite(t)&&Number.isFinite(e)}}Q.create=e=>new Q({checks:[],typeName:Ze.ZodNumber,coerce:(null==e?void 0:e.coerce)||!1,...G(e)});class X extends j{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){this._def.coerce&&(e.data=BigInt(e.data));if(this._getType(e)!==x.bigint){const t=this._getOrReturnCtx(e);return E(t,{code:C.invalid_type,expected:x.bigint,received:t.parsedType}),R}let t;const a=new A;for(const n of this._def.checks)if("min"===n.kind){(n.inclusive?e.data<n.value:e.data<=n.value)&&(t=this._getOrReturnCtx(e,t),E(t,{code:C.too_small,type:"bigint",minimum:n.value,inclusive:n.inclusive,message:n.message}),a.dirty())}else if("max"===n.kind){(n.inclusive?e.data>n.value:e.data>=n.value)&&(t=this._getOrReturnCtx(e,t),E(t,{code:C.too_big,type:"bigint",maximum:n.value,inclusive:n.inclusive,message:n.message}),a.dirty())}else"multipleOf"===n.kind?e.data%n.value!==BigInt(0)&&(t=this._getOrReturnCtx(e,t),E(t,{code:C.not_multiple_of,multipleOf:n.value,message:n.message}),a.dirty()):_.assertNever(n);return{status:a.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,U.toString(t))}gt(e,t){return this.setLimit("min",e,!1,U.toString(t))}lte(e,t){return this.setLimit("max",e,!0,U.toString(t))}lt(e,t){return this.setLimit("max",e,!1,U.toString(t))}setLimit(e,t,a,n){return new X({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:a,message:U.toString(n)}]})}_addCheck(e){return new X({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:U.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:U.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:U.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:U.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:U.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}X.create=e=>{var t;return new X({checks:[],typeName:Ze.ZodBigInt,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...G(e)})};class ee extends j{_parse(e){this._def.coerce&&(e.data=Boolean(e.data));if(this._getType(e)!==x.boolean){const t=this._getOrReturnCtx(e);return E(t,{code:C.invalid_type,expected:x.boolean,received:t.parsedType}),R}return O(e.data)}}ee.create=e=>new ee({typeName:Ze.ZodBoolean,coerce:(null==e?void 0:e.coerce)||!1,...G(e)});class te extends j{_parse(e){this._def.coerce&&(e.data=new Date(e.data));if(this._getType(e)!==x.date){const t=this._getOrReturnCtx(e);return E(t,{code:C.invalid_type,expected:x.date,received:t.parsedType}),R}if(isNaN(e.data.getTime())){return E(this._getOrReturnCtx(e),{code:C.invalid_date}),R}const t=new A;let a;for(const n of this._def.checks)"min"===n.kind?e.data.getTime()<n.value&&(a=this._getOrReturnCtx(e,a),E(a,{code:C.too_small,message:n.message,inclusive:!0,exact:!1,minimum:n.value,type:"date"}),t.dirty()):"max"===n.kind?e.data.getTime()>n.value&&(a=this._getOrReturnCtx(e,a),E(a,{code:C.too_big,message:n.message,inclusive:!0,exact:!1,maximum:n.value,type:"date"}),t.dirty()):_.assertNever(n);return{status:t.value,value:new Date(e.data.getTime())}}_addCheck(e){return new te({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:U.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:U.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return null!=e?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return null!=e?new Date(e):null}}te.create=e=>new te({checks:[],coerce:(null==e?void 0:e.coerce)||!1,typeName:Ze.ZodDate,...G(e)});class ae extends j{_parse(e){if(this._getType(e)!==x.symbol){const t=this._getOrReturnCtx(e);return E(t,{code:C.invalid_type,expected:x.symbol,received:t.parsedType}),R}return O(e.data)}}ae.create=e=>new ae({typeName:Ze.ZodSymbol,...G(e)});class ne extends j{_parse(e){if(this._getType(e)!==x.undefined){const t=this._getOrReturnCtx(e);return E(t,{code:C.invalid_type,expected:x.undefined,received:t.parsedType}),R}return O(e.data)}}ne.create=e=>new ne({typeName:Ze.ZodUndefined,...G(e)});class se extends j{_parse(e){if(this._getType(e)!==x.null){const t=this._getOrReturnCtx(e);return E(t,{code:C.invalid_type,expected:x.null,received:t.parsedType}),R}return O(e.data)}}se.create=e=>new se({typeName:Ze.ZodNull,...G(e)});class re extends j{constructor(){super(...arguments),this._any=!0}_parse(e){return O(e.data)}}re.create=e=>new re({typeName:Ze.ZodAny,...G(e)});class ie extends j{constructor(){super(...arguments),this._unknown=!0}_parse(e){return O(e.data)}}ie.create=e=>new ie({typeName:Ze.ZodUnknown,...G(e)});class oe extends j{_parse(e){const t=this._getOrReturnCtx(e);return E(t,{code:C.invalid_type,expected:x.never,received:t.parsedType}),R}}oe.create=e=>new oe({typeName:Ze.ZodNever,...G(e)});class de extends j{_parse(e){if(this._getType(e)!==x.undefined){const t=this._getOrReturnCtx(e);return E(t,{code:C.invalid_type,expected:x.void,received:t.parsedType}),R}return O(e.data)}}de.create=e=>new de({typeName:Ze.ZodVoid,...G(e)});class ue extends j{_parse(e){const{ctx:t,status:a}=this._processInputParams(e),n=this._def;if(t.parsedType!==x.array)return E(t,{code:C.invalid_type,expected:x.array,received:t.parsedType}),R;if(null!==n.exactLength){const e=t.data.length>n.exactLength.value,s=t.data.length<n.exactLength.value;(e||s)&&(E(t,{code:e?C.too_big:C.too_small,minimum:s?n.exactLength.value:void 0,maximum:e?n.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:n.exactLength.message}),a.dirty())}if(null!==n.minLength&&t.data.length<n.minLength.value&&(E(t,{code:C.too_small,minimum:n.minLength.value,type:"array",inclusive:!0,exact:!1,message:n.minLength.message}),a.dirty()),null!==n.maxLength&&t.data.length>n.maxLength.value&&(E(t,{code:C.too_big,maximum:n.maxLength.value,type:"array",inclusive:!0,exact:!1,message:n.maxLength.message}),a.dirty()),t.common.async)return Promise.all([...t.data].map(((e,a)=>n.type._parseAsync(new B(t,e,t.path,a))))).then((e=>A.mergeArray(a,e)));const s=[...t.data].map(((e,a)=>n.type._parseSync(new B(t,e,t.path,a))));return A.mergeArray(a,s)}get element(){return this._def.type}min(e,t){return new ue({...this._def,minLength:{value:e,message:U.toString(t)}})}max(e,t){return new ue({...this._def,maxLength:{value:e,message:U.toString(t)}})}length(e,t){return new ue({...this._def,exactLength:{value:e,message:U.toString(t)}})}nonempty(e){return this.min(1,e)}}function ce(e){if(e instanceof le){const t={};for(const a in e.shape){const n=e.shape[a];t[a]=we.create(ce(n))}return new le({...e._def,shape:()=>t})}return e instanceof ue?new ue({...e._def,type:ce(e.element)}):e instanceof we?we.create(ce(e.unwrap())):e instanceof Te?Te.create(ce(e.unwrap())):e instanceof fe?fe.create(e.items.map((e=>ce(e)))):e}ue.create=(e,t)=>new ue({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Ze.ZodArray,...G(t)});class le extends j{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(null!==this._cached)return this._cached;const e=this._def.shape(),t=_.objectKeys(e);return this._cached={shape:e,keys:t}}_parse(e){if(this._getType(e)!==x.object){const t=this._getOrReturnCtx(e);return E(t,{code:C.invalid_type,expected:x.object,received:t.parsedType}),R}const{status:t,ctx:a}=this._processInputParams(e),{shape:n,keys:s}=this._getCached(),r=[];if(!(this._def.catchall instanceof oe&&"strip"===this._def.unknownKeys))for(const e in a.data)s.includes(e)||r.push(e);const i=[];for(const e of s){const t=n[e],s=a.data[e];i.push({key:{status:"valid",value:e},value:t._parse(new B(a,s,a.path,e)),alwaysSet:e in a.data})}if(this._def.catchall instanceof oe){const e=this._def.unknownKeys;if("passthrough"===e)for(const e of r)i.push({key:{status:"valid",value:e},value:{status:"valid",value:a.data[e]}});else if("strict"===e)r.length>0&&(E(a,{code:C.unrecognized_keys,keys:r}),t.dirty());else if("strip"!==e)throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const e=this._def.catchall;for(const t of r){const n=a.data[t];i.push({key:{status:"valid",value:t},value:e._parse(new B(a,n,a.path,t)),alwaysSet:t in a.data})}}return a.common.async?Promise.resolve().then((async()=>{const e=[];for(const t of i){const a=await t.key;e.push({key:a,value:await t.value,alwaysSet:t.alwaysSet})}return e})).then((e=>A.mergeObjectSync(t,e))):A.mergeObjectSync(t,i)}get shape(){return this._def.shape()}strict(e){return U.errToObj,new le({...this._def,unknownKeys:"strict",...void 0!==e?{errorMap:(t,a)=>{var n,s,r,i;const o=null!==(r=null===(s=(n=this._def).errorMap)||void 0===s?void 0:s.call(n,t,a).message)&&void 0!==r?r:a.defaultError;return"unrecognized_keys"===t.code?{message:null!==(i=U.errToObj(e).message)&&void 0!==i?i:o}:{message:o}}}:{}})}strip(){return new le({...this._def,unknownKeys:"strip"})}passthrough(){return new le({...this._def,unknownKeys:"passthrough"})}extend(e){return new le({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new le({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:Ze.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new le({...this._def,catchall:e})}pick(e){const t={};return _.objectKeys(e).forEach((a=>{e[a]&&this.shape[a]&&(t[a]=this.shape[a])})),new le({...this._def,shape:()=>t})}omit(e){const t={};return _.objectKeys(this.shape).forEach((a=>{e[a]||(t[a]=this.shape[a])})),new le({...this._def,shape:()=>t})}deepPartial(){return ce(this)}partial(e){const t={};return _.objectKeys(this.shape).forEach((a=>{const n=this.shape[a];e&&!e[a]?t[a]=n:t[a]=n.optional()})),new le({...this._def,shape:()=>t})}required(e){const t={};return _.objectKeys(this.shape).forEach((a=>{if(e&&!e[a])t[a]=this.shape[a];else{let e=this.shape[a];for(;e instanceof we;)e=e._def.innerType;t[a]=e}})),new le({...this._def,shape:()=>t})}keyof(){return be(_.objectKeys(this.shape))}}le.create=(e,t)=>new le({shape:()=>e,unknownKeys:"strip",catchall:oe.create(),typeName:Ze.ZodObject,...G(t)}),le.strictCreate=(e,t)=>new le({shape:()=>e,unknownKeys:"strict",catchall:oe.create(),typeName:Ze.ZodObject,...G(t)}),le.lazycreate=(e,t)=>new le({shape:e,unknownKeys:"strip",catchall:oe.create(),typeName:Ze.ZodObject,...G(t)});class he extends j{_parse(e){const{ctx:t}=this._processInputParams(e),a=this._def.options;if(t.common.async)return Promise.all(a.map((async e=>{const a={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:a}),ctx:a}}))).then((function(e){for(const t of e)if("valid"===t.result.status)return t.result;for(const a of e)if("dirty"===a.result.status)return t.common.issues.push(...a.ctx.common.issues),a.result;const a=e.map((e=>new S(e.ctx.common.issues)));return E(t,{code:C.invalid_union,unionErrors:a}),R}));{let e;const n=[];for(const s of a){const a={...t,common:{...t.common,issues:[]},parent:null},r=s._parseSync({data:t.data,path:t.path,parent:a});if("valid"===r.status)return r;"dirty"!==r.status||e||(e={result:r,ctx:a}),a.common.issues.length&&n.push(a.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;const s=n.map((e=>new S(e)));return E(t,{code:C.invalid_union,unionErrors:s}),R}}get options(){return this._def.options}}he.create=(e,t)=>new he({options:e,typeName:Ze.ZodUnion,...G(t)});function pe(e,t){const a=k(e),n=k(t);if(e===t)return{valid:!0,data:e};if(a===x.object&&n===x.object){const a=_.objectKeys(t),n=_.objectKeys(e).filter((e=>-1!==a.indexOf(e))),s={...e,...t};for(const a of n){const n=pe(e[a],t[a]);if(!n.valid)return{valid:!1};s[a]=n.data}return{valid:!0,data:s}}if(a===x.array&&n===x.array){if(e.length!==t.length)return{valid:!1};const a=[];for(let n=0;n<e.length;n++){const s=pe(e[n],t[n]);if(!s.valid)return{valid:!1};a.push(s.data)}return{valid:!0,data:a}}return a===x.date&&n===x.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class me extends j{_parse(e){const{status:t,ctx:a}=this._processInputParams(e),n=(e,n)=>{if(Z(e)||Z(n))return R;const s=pe(e.value,n.value);return s.valid?((M(e)||M(n))&&t.dirty(),{status:t.value,value:s.data}):(E(a,{code:C.invalid_intersection_types}),R)};return a.common.async?Promise.all([this._def.left._parseAsync({data:a.data,path:a.path,parent:a}),this._def.right._parseAsync({data:a.data,path:a.path,parent:a})]).then((([e,t])=>n(e,t))):n(this._def.left._parseSync({data:a.data,path:a.path,parent:a}),this._def.right._parseSync({data:a.data,path:a.path,parent:a}))}}me.create=(e,t,a)=>new me({left:e,right:t,typeName:Ze.ZodIntersection,...G(a)});class fe extends j{_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==x.array)return E(a,{code:C.invalid_type,expected:x.array,received:a.parsedType}),R;if(a.data.length<this._def.items.length)return E(a,{code:C.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),R;!this._def.rest&&a.data.length>this._def.items.length&&(E(a,{code:C.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const n=[...a.data].map(((e,t)=>{const n=this._def.items[t]||this._def.rest;return n?n._parse(new B(a,e,a.path,t)):null})).filter((e=>!!e));return a.common.async?Promise.all(n).then((e=>A.mergeArray(t,e))):A.mergeArray(t,n)}get items(){return this._def.items}rest(e){return new fe({...this._def,rest:e})}}fe.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new fe({items:e,typeName:Ze.ZodTuple,rest:null,...G(t)})};class ye extends j{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==x.map)return E(a,{code:C.invalid_type,expected:x.map,received:a.parsedType}),R;const n=this._def.keyType,s=this._def.valueType,r=[...a.data.entries()].map((([e,t],r)=>({key:n._parse(new B(a,e,a.path,[r,"key"])),value:s._parse(new B(a,t,a.path,[r,"value"]))})));if(a.common.async){const e=new Map;return Promise.resolve().then((async()=>{for(const a of r){const n=await a.key,s=await a.value;if("aborted"===n.status||"aborted"===s.status)return R;"dirty"!==n.status&&"dirty"!==s.status||t.dirty(),e.set(n.value,s.value)}return{status:t.value,value:e}}))}{const e=new Map;for(const a of r){const n=a.key,s=a.value;if("aborted"===n.status||"aborted"===s.status)return R;"dirty"!==n.status&&"dirty"!==s.status||t.dirty(),e.set(n.value,s.value)}return{status:t.value,value:e}}}}ye.create=(e,t,a)=>new ye({valueType:t,keyType:e,typeName:Ze.ZodMap,...G(a)});class ge extends j{_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==x.set)return E(a,{code:C.invalid_type,expected:x.set,received:a.parsedType}),R;const n=this._def;null!==n.minSize&&a.data.size<n.minSize.value&&(E(a,{code:C.too_small,minimum:n.minSize.value,type:"set",inclusive:!0,exact:!1,message:n.minSize.message}),t.dirty()),null!==n.maxSize&&a.data.size>n.maxSize.value&&(E(a,{code:C.too_big,maximum:n.maxSize.value,type:"set",inclusive:!0,exact:!1,message:n.maxSize.message}),t.dirty());const s=this._def.valueType;function r(e){const a=new Set;for(const n of e){if("aborted"===n.status)return R;"dirty"===n.status&&t.dirty(),a.add(n.value)}return{status:t.value,value:a}}const i=[...a.data.values()].map(((e,t)=>s._parse(new B(a,e,a.path,t))));return a.common.async?Promise.all(i).then((e=>r(e))):r(i)}min(e,t){return new ge({...this._def,minSize:{value:e,message:U.toString(t)}})}max(e,t){return new ge({...this._def,maxSize:{value:e,message:U.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}ge.create=(e,t)=>new ge({valueType:e,minSize:null,maxSize:null,typeName:Ze.ZodSet,...G(t)});class ve extends j{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}ve.create=(e,t)=>new ve({getter:e,typeName:Ze.ZodLazy,...G(t)});class _e extends j{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return E(t,{received:t.data,code:C.invalid_literal,expected:this._def.value}),R}return{status:"valid",value:e.data}}get value(){return this._def.value}}function be(e,t){return new xe({values:e,typeName:Ze.ZodEnum,...G(t)})}_e.create=(e,t)=>new _e({value:e,typeName:Ze.ZodLiteral,...G(t)});class xe extends j{_parse(e){if("string"!=typeof e.data){const t=this._getOrReturnCtx(e),a=this._def.values;return E(t,{expected:_.joinValues(a),received:t.parsedType,code:C.invalid_type}),R}if(-1===this._def.values.indexOf(e.data)){const t=this._getOrReturnCtx(e),a=this._def.values;return E(t,{received:t.data,code:C.invalid_enum_value,options:a}),R}return O(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e){return xe.create(e)}exclude(e){return xe.create(this.options.filter((t=>!e.includes(t))))}}xe.create=be;class ke extends j{_parse(e){const t=_.getValidEnumValues(this._def.values),a=this._getOrReturnCtx(e);if(a.parsedType!==x.string&&a.parsedType!==x.number){const e=_.objectValues(t);return E(a,{expected:_.joinValues(e),received:a.parsedType,code:C.invalid_type}),R}if(-1===t.indexOf(e.data)){const e=_.objectValues(t);return E(a,{received:a.data,code:C.invalid_enum_value,options:e}),R}return O(e.data)}get enum(){return this._def.values}}ke.create=(e,t)=>new ke({values:e,typeName:Ze.ZodNativeEnum,...G(t)});class Ce extends j{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==x.promise&&!1===t.common.async)return E(t,{code:C.invalid_type,expected:x.promise,received:t.parsedType}),R;const a=t.parsedType===x.promise?t.data:Promise.resolve(t.data);return O(a.then((e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap}))))}}Ce.create=(e,t)=>new Ce({type:e,typeName:Ze.ZodPromise,...G(t)});class Se extends j{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Ze.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:a}=this._processInputParams(e),n=this._def.effect||null,s={addIssue:e=>{E(a,e),e.fatal?t.abort():t.dirty()},get path(){return a.path}};if(s.addIssue=s.addIssue.bind(s),"preprocess"===n.type){const e=n.transform(a.data,s);return a.common.issues.length?{status:"dirty",value:a.data}:a.common.async?Promise.resolve(e).then((e=>this._def.schema._parseAsync({data:e,path:a.path,parent:a}))):this._def.schema._parseSync({data:e,path:a.path,parent:a})}if("refinement"===n.type){const e=e=>{const t=n.refinement(e,s);if(a.common.async)return Promise.resolve(t);if(t instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return e};if(!1===a.common.async){const n=this._def.schema._parseSync({data:a.data,path:a.path,parent:a});return"aborted"===n.status?R:("dirty"===n.status&&t.dirty(),e(n.value),{status:t.value,value:n.value})}return this._def.schema._parseAsync({data:a.data,path:a.path,parent:a}).then((a=>"aborted"===a.status?R:("dirty"===a.status&&t.dirty(),e(a.value).then((()=>({status:t.value,value:a.value}))))))}if("transform"===n.type){if(!1===a.common.async){const e=this._def.schema._parseSync({data:a.data,path:a.path,parent:a});if(!P(e))return e;const r=n.transform(e.value,s);if(r instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:r}}return this._def.schema._parseAsync({data:a.data,path:a.path,parent:a}).then((e=>P(e)?Promise.resolve(n.transform(e.value,s)).then((e=>({status:t.value,value:e}))):e))}_.assertNever(n)}}Se.create=(e,t,a)=>new Se({schema:e,typeName:Ze.ZodEffects,effect:t,...G(a)}),Se.createWithPreprocess=(e,t,a)=>new Se({schema:t,effect:{type:"preprocess",transform:e},typeName:Ze.ZodEffects,...G(a)});class we extends j{_parse(e){return this._getType(e)===x.undefined?O(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}we.create=(e,t)=>new we({innerType:e,typeName:Ze.ZodOptional,...G(t)});class Te extends j{_parse(e){return this._getType(e)===x.null?O(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Te.create=(e,t)=>new Te({innerType:e,typeName:Ze.ZodNullable,...G(t)});class Ne extends j{_parse(e){const{ctx:t}=this._processInputParams(e);let a=t.data;return t.parsedType===x.undefined&&(a=this._def.defaultValue()),this._def.innerType._parse({data:a,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}Ne.create=(e,t)=>new Ne({innerType:e,typeName:Ze.ZodDefault,defaultValue:"function"==typeof t.default?t.default:()=>t.default,...G(t)});class Ie extends j{_parse(e){const{ctx:t}=this._processInputParams(e),a={...t,common:{...t.common,issues:[]}},n=this._def.innerType._parse({data:a.data,path:a.path,parent:{...a}});return L(n)?n.then((e=>({status:"valid",value:"valid"===e.status?e.value:this._def.catchValue({get error(){return new S(a.common.issues)},input:a.data})}))):{status:"valid",value:"valid"===n.status?n.value:this._def.catchValue({get error(){return new S(a.common.issues)},input:a.data})}}removeCatch(){return this._def.innerType}}Ie.create=(e,t)=>new Ie({innerType:e,typeName:Ze.ZodCatch,catchValue:"function"==typeof t.catch?t.catch:()=>t.catch,...G(t)});class Ee extends j{_parse(e){if(this._getType(e)!==x.nan){const t=this._getOrReturnCtx(e);return E(t,{code:C.invalid_type,expected:x.nan,received:t.parsedType}),R}return{status:"valid",value:e.data}}}Ee.create=e=>new Ee({typeName:Ze.ZodNaN,...G(e)});class Ae extends j{_parse(e){const{ctx:t}=this._processInputParams(e),a=t.data;return this._def.type._parse({data:a,path:t.path,parent:t})}unwrap(){return this._def.type}}class Re extends j{_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.common.async){return(async()=>{const e=await this._def.in._parseAsync({data:a.data,path:a.path,parent:a});return"aborted"===e.status?R:"dirty"===e.status?(t.dirty(),{status:"dirty",value:e.value}):this._def.out._parseAsync({data:e.value,path:a.path,parent:a})})()}{const e=this._def.in._parseSync({data:a.data,path:a.path,parent:a});return"aborted"===e.status?R:"dirty"===e.status?(t.dirty(),{status:"dirty",value:e.value}):this._def.out._parseSync({data:e.value,path:a.path,parent:a})}}static create(e,t){return new Re({in:e,out:t,typeName:Ze.ZodPipeline})}}class Oe extends j{_parse(e){const t=this._def.innerType._parse(e);return P(t)&&(t.value=Object.freeze(t.value)),t}}var Ze;Oe.create=(e,t)=>new Oe({innerType:e,typeName:Ze.ZodReadonly,...G(t)}),le.lazycreate,function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"}(Ze||(Ze={}));const Me=J.create,Pe=Q.create;Ee.create,X.create;const Le=ee.create;te.create,ae.create,ne.create,se.create;const Ue=re.create;ie.create,oe.create,de.create;const Be=ue.create,De=le.create;le.strictCreate;const Ge=he.create;me.create,fe.create,ye.create,ge.create,ve.create;const je=_e.create,Ke=xe.create;ke.create,Ce.create,Se.create,we.create,Te.create,Se.createWithPreprocess,Re.create;const $e=De({text:Me(),baseUrl:Me()});let Ve=function(e){return e.Custom="CustomSecondaryCta",e.ContributionsReminder="ContributionsReminderSecondaryCta",e}({});Ke(["CustomSecondaryCta","ContributionsReminderSecondaryCta"]);const Fe=Ge([De({type:je("CustomSecondaryCta"),cta:$e}),De({type:je("ContributionsReminderSecondaryCta")})]);let We=function(e){return e.unlimited="unlimited",e.hardstop="hardstop",e}({});const ze=Ke(["unlimited","hardstop"]);let He=function(e){return e.money="money",e}({});const Ye=Ke(["money"]),Je=De({countLabel:Me(),goalReachedPrimary:Me(),goalReachedSecondary:Me()}),qe=De({total:Pe(),goal:Pe()}),Qe=De({endType:ze,countType:Ye,currencySymbol:Me(),copy:Je,tickerData:qe.nullish()}),Xe=Ke(["CONTRIBUTION","MEMBERSHIP_SUPPORTER","DIGITAL_SUBSCRIPTION","PRINT_SUBSCRIPTION"]),et=Ke(["ACQUISITIONS_EPIC","ACQUISITIONS_ENGAGEMENT_BANNER","ACQUISITIONS_SUBSCRIPTIONS_BANNER","ACQUISITIONS_HEADER","ACQUISITIONS_OTHER"]),tt=De({abTestName:Me(),abTestVariant:Me(),campaignCode:Me(),componentType:et,products:Be(Xe).nullish(),labels:Be(Me()).nullish(),ophanPageId:Me(),platformId:Me(),referrerUrl:Me(),clientName:Me()}),at=De({mainUrl:Me(),mobileUrl:Me().nullish(),tabletUrl:Me().nullish(),desktopUrl:Me().nullish(),leftColUrl:Me().nullish(),wideUrl:Me().nullish(),altText:Me()}),nt=De({name:Me(),description:Me().nullish(),headshot:at.nullish()}),st=De({for52Weeks:Pe(),forTargetedWeeks:Pe()}),rt=De({maxViewsCount:Pe(),maxViewsDays:Pe(),minDaysBetweenViews:Pe()}),it=De({type:Me(),copy:Me().nullish()}),ot=De({reminderCta:Me(),reminderLabel:Me(),reminderPeriod:Me()}),dt=De({name:Me(),heading:Me().nullish(),paragraphs:Be(Me()),highlightedText:Me().nullish(),tickerSettings:Qe.nullish(),cta:$e.nullish(),secondaryCta:Fe.nullish(),footer:Me().nullish(),image:at.nullish(),showReminderFields:ot.nullish(),separateArticleCount:it.nullish(),maxViews:rt.nullish(),showSignInLink:Le().nullish(),bylineWithImage:nt.nullish()}),ut=De({variant:dt,tracking:tt,countryCode:Me().nullish(),articleCounts:st,onReminderOpen:Ue().nullish(),fetchEmail:Ue().nullish(),submitComponentEvent:Ue().nullish(),openCmp:Ue().nullish(),hasConsentForArticleCount:Le().nullish(),stage:Me().nullish()}),ct=(e,t,a)=>{const n=(e=>{if(URLSearchParams){const t=new URLSearchParams(window.location.search).get(`force-${e}`);if(t)return t}return null})(e);return fetch(`${t}/${e}${n?`?force=${n}`:""}`,{method:"post",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)}).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.SecondaryCtaType=Ve,exports.TickerCountType=He,exports.TickerEndType=We,exports.addRegionIdToSupportUrl=(e,t)=>{if(t){const a=(e=>i[u(e)]?.supportRegionId)(t);if(a)return e.replace(/(support.theguardian.com)\/(contribute-in-epic|contribute|subscribe)/,((e,t,n)=>`${t}/${a.toLowerCase()}/${n}`))}return e},exports.buildReminderFields=y,exports.containsNonArticleCountPlaceholder=e=>{const t=e.match(m)?.filter((e=>"%%ARTICLE_COUNT%%"!==e));return!!t&&t.length>0},exports.contributionTabFrequencies=["ONE_OFF","MONTHLY","ANNUAL"],exports.countryCodeToCountryGroupId=u,exports.epicPropsSchema=ut,exports.getBanner=(e,t)=>ct("banner",e,t),exports.getCountryName=l,exports.getEpic=(e,t)=>ct("epic",e,t),exports.getEpicViewLog=t=>t.get(e)||void 0,exports.getHeader=(e,t)=>ct("header",e,t),exports.getLiveblogEpic=(e,t)=>ct("liveblog-epic",e,t),exports.getLocalCurrencySymbol=c,exports.getPuzzlesBanner=(e,t)=>ct("puzzles",e,t),exports.getReminderFields=(e,t=new Date)=>{return"US"===e&&v(t)?{reminderCta:"Remind me on Giving Tuesday",reminderPeriod:`${a=t.getFullYear()}-${(f(a).getMonth()+1).toString().padStart(0,"2")}-01`,reminderLabel:"on Giving Tuesday",reminderOption:`giving-tuesday-${a}`}:"US"===e&&(e=>e>=f(e.getFullYear())&&e<g)(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()):y(t);var a},exports.getWeeklyArticleHistory=e=>e.get(t)||void 0,exports.inCountryGroups=(e,t=[])=>0===t.length||!!e&&t.includes(u(e.toUpperCase())),exports.incrementWeeklyArticleCount=(e,s,i)=>{const o=((e,t)=>{const s=n(new Date),r=e.get(a);if(r&&r.week===s){const n=r.articles[t]||0;return e.set(a,{week:s,articles:{...r.articles,[t]:n+1}}),n>0}return e.set(a,{week:s,articles:{[t]:1}}),!1})(e,s);if(!o){const a=n(new Date),s=e.get(t)||[],o=s[0];if(o&&o.week&&o.week===a)o.count+=1,o.tags=r(i,o.tags),e.set(t,s);else{s.unshift({week:a,count:1,tags:r(i,{})});const n=a-365,o=s.filter((e=>e.week>=n));e.set(t,o)}}},exports.logEpicView=t=>{const a=localStorage.getItem(e),n=a?JSON.parse(a).value:[];n.push({date:(new Date).getTime(),testId:t});const s={value:n.slice(-50)};localStorage.setItem(e,JSON.stringify(s))},exports.replaceNonArticleCountPlaceholders=(e,t,a)=>e?e.replace(m,(e=>{const n=e.substring(2,e.length-2),s=p[n];if(s){const e=s({countryCode:t,prices:a});if(e)return e}return e})):"";
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const e="gu.contributions.views",t="gu.history.weeklyArticleCount",a="gu.history.articleCountsThisWeek",n=e=>{const t=e.getDay()||7;return Date.UTC(e.getFullYear(),e.getMonth(),e.getDate()-(t-1))/864e5},s=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"]),i=(e,t={})=>(e.forEach((e=>{s.has(e)&&(t[e]=(t[e]??0)+1)})),t);var r,o;!function(e){e.assertEqual=e=>e,e.assertIs=function(e){},e.assertNever=function(e){throw new Error},e.arrayToEnum=e=>{const t={};for(const a of e)t[a]=a;return t},e.getValidEnumValues=t=>{const a=e.objectKeys(t).filter((e=>"number"!=typeof t[t[e]])),n={};for(const e of a)n[e]=t[e];return e.objectValues(n)},e.objectValues=t=>e.objectKeys(t).map((function(e){return t[e]})),e.objectKeys="function"==typeof Object.keys?e=>Object.keys(e):e=>{const t=[];for(const a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.push(a);return t},e.find=(e,t)=>{for(const a of e)if(t(a))return a},e.isInteger="function"==typeof Number.isInteger?e=>Number.isInteger(e):e=>"number"==typeof e&&isFinite(e)&&Math.floor(e)===e,e.joinValues=function(e,t=" | "){return e.map((e=>"string"==typeof e?`'${e}'`:e)).join(t)},e.jsonStringifyReplacer=(e,t)=>"bigint"==typeof t?t.toString():t}(r||(r={})),function(e){e.mergeShapes=(e,t)=>({...e,...t})}(o||(o={}));const d=r.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),u=e=>{switch(typeof e){case"undefined":return d.undefined;case"string":return d.string;case"number":return isNaN(e)?d.nan:d.number;case"boolean":return d.boolean;case"function":return d.function;case"bigint":return d.bigint;case"symbol":return d.symbol;case"object":return Array.isArray(e)?d.array:null===e?d.null:e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch?d.promise:"undefined"!=typeof Map&&e instanceof Map?d.map:"undefined"!=typeof Set&&e instanceof Set?d.set:"undefined"!=typeof Date&&e instanceof Date?d.date:d.object;default:return d.unknown}},c=r.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class l extends Error{constructor(e){super(),this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=(e=[])=>{this.issues=[...this.issues,...e]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){const t=e||function(e){return e.message},a={_errors:[]},n=e=>{for(const s of e.issues)if("invalid_union"===s.code)s.unionErrors.map(n);else if("invalid_return_type"===s.code)n(s.returnTypeError);else if("invalid_arguments"===s.code)n(s.argumentsError);else if(0===s.path.length)a._errors.push(t(s));else{let e=a,n=0;for(;n<s.path.length;){const a=s.path[n];n===s.path.length-1?(e[a]=e[a]||{_errors:[]},e[a]._errors.push(t(s))):e[a]=e[a]||{_errors:[]},e=e[a],n++}}};return n(this),a}toString(){return this.message}get message(){return JSON.stringify(this.issues,r.jsonStringifyReplacer,2)}get isEmpty(){return 0===this.issues.length}flatten(e=(e=>e.message)){const t={},a=[];for(const n of this.issues)n.path.length>0?(t[n.path[0]]=t[n.path[0]]||[],t[n.path[0]].push(e(n))):a.push(e(n));return{formErrors:a,fieldErrors:t}}get formErrors(){return this.flatten()}}l.create=e=>new l(e);const h=(e,t)=>{let a;switch(e.code){case c.invalid_type:a=e.received===d.undefined?"Required":`Expected ${e.expected}, received ${e.received}`;break;case c.invalid_literal:a=`Invalid literal value, expected ${JSON.stringify(e.expected,r.jsonStringifyReplacer)}`;break;case c.unrecognized_keys:a=`Unrecognized key(s) in object: ${r.joinValues(e.keys,", ")}`;break;case c.invalid_union:a="Invalid input";break;case c.invalid_union_discriminator:a=`Invalid discriminator value. Expected ${r.joinValues(e.options)}`;break;case c.invalid_enum_value:a=`Invalid enum value. Expected ${r.joinValues(e.options)}, received '${e.received}'`;break;case c.invalid_arguments:a="Invalid function arguments";break;case c.invalid_return_type:a="Invalid function return type";break;case c.invalid_date:a="Invalid date";break;case c.invalid_string:"object"==typeof e.validation?"includes"in e.validation?(a=`Invalid input: must include "${e.validation.includes}"`,"number"==typeof e.validation.position&&(a=`${a} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?a=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?a=`Invalid input: must end with "${e.validation.endsWith}"`:r.assertNever(e.validation):a="regex"!==e.validation?`Invalid ${e.validation}`:"Invalid";break;case c.too_small:a="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:"date"===e.type?`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:"Invalid input";break;case c.too_big:a="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"bigint"===e.type?`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"date"===e.type?`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:"Invalid input";break;case c.custom:a="Invalid input";break;case c.invalid_intersection_types:a="Intersection results could not be merged";break;case c.not_multiple_of:a=`Number must be a multiple of ${e.multipleOf}`;break;case c.not_finite:a="Number must be finite";break;default:a=t.defaultError,r.assertNever(e)}return{message:a}};let p=h;function m(){return p}const f=e=>{const{data:t,path:a,errorMaps:n,issueData:s}=e,i=[...a,...s.path||[]],r={...s,path:i};let o="";const d=n.filter((e=>!!e)).slice().reverse();for(const e of d)o=e(r,{data:t,defaultError:o}).message;return{...s,path:i,message:s.message||o}};function y(e,t){const a=f({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,m(),h].filter((e=>!!e))});e.common.issues.push(a)}class g{constructor(){this.value="valid"}dirty(){"valid"===this.value&&(this.value="dirty")}abort(){"aborted"!==this.value&&(this.value="aborted")}static mergeArray(e,t){const a=[];for(const n of t){if("aborted"===n.status)return v;"dirty"===n.status&&e.dirty(),a.push(n.value)}return{status:e.value,value:a}}static async mergeObjectAsync(e,t){const a=[];for(const e of t)a.push({key:await e.key,value:await e.value});return g.mergeObjectSync(e,a)}static mergeObjectSync(e,t){const a={};for(const n of t){const{key:t,value:s}=n;if("aborted"===t.status)return v;if("aborted"===s.status)return v;"dirty"===t.status&&e.dirty(),"dirty"===s.status&&e.dirty(),"__proto__"===t.value||void 0===s.value&&!n.alwaysSet||(a[t.value]=s.value)}return{status:e.value,value:a}}}const v=Object.freeze({status:"aborted"}),_=e=>({status:"valid",value:e}),b=e=>"aborted"===e.status,x=e=>"dirty"===e.status,k=e=>"valid"===e.status,C=e=>"undefined"!=typeof Promise&&e instanceof Promise;var S;!function(e){e.errToObj=e=>"string"==typeof e?{message:e}:e||{},e.toString=e=>"string"==typeof e?e:null==e?void 0:e.message}(S||(S={}));class w{constructor(e,t,a,n){this._cachedPath=[],this.parent=e,this.data=t,this._path=a,this._key=n}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const T=(e,t)=>{if(k(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const t=new l(e.common.issues);return this._error=t,this._error}}};function N(e){if(!e)return{};const{errorMap:t,invalid_type_error:a,required_error:n,description:s}=e;if(t&&(a||n))throw new Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');if(t)return{errorMap:t,description:s};return{errorMap:(e,t)=>"invalid_type"!==e.code?{message:t.defaultError}:void 0===t.data?{message:null!=n?n:t.defaultError}:{message:null!=a?a:t.defaultError},description:s}}class I{constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(e){return u(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:u(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new g,ctx:{common:e.parent.common,data:e.data,parsedType:u(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(C(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const a=this.safeParse(e,t);if(a.success)return a.data;throw a.error}safeParse(e,t){var a;const n={common:{issues:[],async:null!==(a=null==t?void 0:t.async)&&void 0!==a&&a,contextualErrorMap:null==t?void 0:t.errorMap},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:u(e)},s=this._parseSync({data:e,path:n.path,parent:n});return T(n,s)}async parseAsync(e,t){const a=await this.safeParseAsync(e,t);if(a.success)return a.data;throw a.error}async safeParseAsync(e,t){const a={common:{issues:[],contextualErrorMap:null==t?void 0:t.errorMap,async:!0},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:u(e)},n=this._parse({data:e,path:a.path,parent:a}),s=await(C(n)?n:Promise.resolve(n));return T(a,s)}refine(e,t){const a=e=>"string"==typeof t||void 0===t?{message:t}:"function"==typeof t?t(e):t;return this._refinement(((t,n)=>{const s=e(t),i=()=>n.addIssue({code:c.custom,...a(t)});return"undefined"!=typeof Promise&&s instanceof Promise?s.then((e=>!!e||(i(),!1))):!!s||(i(),!1)}))}refinement(e,t){return this._refinement(((a,n)=>!!e(a)||(n.addIssue("function"==typeof t?t(a,n):t),!1)))}_refinement(e){return new pe({schema:this,typeName:ke.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return me.create(this,this._def)}nullable(){return fe.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return J.create(this,this._def)}promise(){return he.create(this,this._def)}or(e){return X.create([this,e],this._def)}and(e){return ne.create(this,e,this._def)}transform(e){return new pe({...N(this._def),schema:this,typeName:ke.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t="function"==typeof e?e:()=>e;return new ye({...N(this._def),innerType:this,defaultValue:t,typeName:ke.ZodDefault})}brand(){return new _e({typeName:ke.ZodBranded,type:this,...N(this._def)})}catch(e){const t="function"==typeof e?e:()=>e;return new ge({...N(this._def),innerType:this,catchValue:t,typeName:ke.ZodCatch})}describe(e){return new(0,this.constructor)({...this._def,description:e})}pipe(e){return be.create(this,e)}readonly(){return xe.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const A=/^c[^\s-]{8,}$/i,E=/^[a-z][a-z0-9]*$/,O=/^[0-9A-HJKMNP-TV-Z]{26}$/,R=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Z=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i;let M;const P=/^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/,L=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/;class U extends I{_parse(e){this._def.coerce&&(e.data=String(e.data));if(this._getType(e)!==d.string){const t=this._getOrReturnCtx(e);return y(t,{code:c.invalid_type,expected:d.string,received:t.parsedType}),v}const t=new g;let a;for(const o of this._def.checks)if("min"===o.kind)e.data.length<o.value&&(a=this._getOrReturnCtx(e,a),y(a,{code:c.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),t.dirty());else if("max"===o.kind)e.data.length>o.value&&(a=this._getOrReturnCtx(e,a),y(a,{code:c.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),t.dirty());else if("length"===o.kind){const n=e.data.length>o.value,s=e.data.length<o.value;(n||s)&&(a=this._getOrReturnCtx(e,a),n?y(a,{code:c.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):s&&y(a,{code:c.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),t.dirty())}else if("email"===o.kind)Z.test(e.data)||(a=this._getOrReturnCtx(e,a),y(a,{validation:"email",code:c.invalid_string,message:o.message}),t.dirty());else if("emoji"===o.kind)M||(M=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),M.test(e.data)||(a=this._getOrReturnCtx(e,a),y(a,{validation:"emoji",code:c.invalid_string,message:o.message}),t.dirty());else if("uuid"===o.kind)R.test(e.data)||(a=this._getOrReturnCtx(e,a),y(a,{validation:"uuid",code:c.invalid_string,message:o.message}),t.dirty());else if("cuid"===o.kind)A.test(e.data)||(a=this._getOrReturnCtx(e,a),y(a,{validation:"cuid",code:c.invalid_string,message:o.message}),t.dirty());else if("cuid2"===o.kind)E.test(e.data)||(a=this._getOrReturnCtx(e,a),y(a,{validation:"cuid2",code:c.invalid_string,message:o.message}),t.dirty());else if("ulid"===o.kind)O.test(e.data)||(a=this._getOrReturnCtx(e,a),y(a,{validation:"ulid",code:c.invalid_string,message:o.message}),t.dirty());else if("url"===o.kind)try{new URL(e.data)}catch(n){a=this._getOrReturnCtx(e,a),y(a,{validation:"url",code:c.invalid_string,message:o.message}),t.dirty()}else if("regex"===o.kind){o.regex.lastIndex=0;o.regex.test(e.data)||(a=this._getOrReturnCtx(e,a),y(a,{validation:"regex",code:c.invalid_string,message:o.message}),t.dirty())}else if("trim"===o.kind)e.data=e.data.trim();else if("includes"===o.kind)e.data.includes(o.value,o.position)||(a=this._getOrReturnCtx(e,a),y(a,{code:c.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),t.dirty());else if("toLowerCase"===o.kind)e.data=e.data.toLowerCase();else if("toUpperCase"===o.kind)e.data=e.data.toUpperCase();else if("startsWith"===o.kind)e.data.startsWith(o.value)||(a=this._getOrReturnCtx(e,a),y(a,{code:c.invalid_string,validation:{startsWith:o.value},message:o.message}),t.dirty());else if("endsWith"===o.kind)e.data.endsWith(o.value)||(a=this._getOrReturnCtx(e,a),y(a,{code:c.invalid_string,validation:{endsWith:o.value},message:o.message}),t.dirty());else if("datetime"===o.kind){((i=o).precision?i.offset?new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${i.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`):new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${i.precision}}Z$`):0===i.precision?i.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"):i.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$")).test(e.data)||(a=this._getOrReturnCtx(e,a),y(a,{code:c.invalid_string,validation:"datetime",message:o.message}),t.dirty())}else"ip"===o.kind?(n=e.data,("v4"!==(s=o.version)&&s||!P.test(n))&&("v6"!==s&&s||!L.test(n))&&(a=this._getOrReturnCtx(e,a),y(a,{validation:"ip",code:c.invalid_string,message:o.message}),t.dirty())):r.assertNever(o);var n,s,i;return{status:t.value,value:e.data}}_regex(e,t,a){return this.refinement((t=>e.test(t)),{validation:t,code:c.invalid_string,...S.errToObj(a)})}_addCheck(e){return new U({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...S.errToObj(e)})}url(e){return this._addCheck({kind:"url",...S.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...S.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...S.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...S.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...S.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...S.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...S.errToObj(e)})}datetime(e){var t;return"string"==typeof e?this._addCheck({kind:"datetime",precision:null,offset:!1,message:e}):this._addCheck({kind:"datetime",precision:void 0===(null==e?void 0:e.precision)?null:null==e?void 0:e.precision,offset:null!==(t=null==e?void 0:e.offset)&&void 0!==t&&t,...S.errToObj(null==e?void 0:e.message)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...S.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:null==t?void 0:t.position,...S.errToObj(null==t?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...S.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...S.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...S.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...S.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...S.errToObj(t)})}nonempty(e){return this.min(1,S.errToObj(e))}trim(){return new U({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new U({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new U({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find((e=>"datetime"===e.kind))}get isEmail(){return!!this._def.checks.find((e=>"email"===e.kind))}get isURL(){return!!this._def.checks.find((e=>"url"===e.kind))}get isEmoji(){return!!this._def.checks.find((e=>"emoji"===e.kind))}get isUUID(){return!!this._def.checks.find((e=>"uuid"===e.kind))}get isCUID(){return!!this._def.checks.find((e=>"cuid"===e.kind))}get isCUID2(){return!!this._def.checks.find((e=>"cuid2"===e.kind))}get isULID(){return!!this._def.checks.find((e=>"ulid"===e.kind))}get isIP(){return!!this._def.checks.find((e=>"ip"===e.kind))}get minLength(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}function D(e,t){const a=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,s=a>n?a:n;return parseInt(e.toFixed(s).replace(".",""))%parseInt(t.toFixed(s).replace(".",""))/Math.pow(10,s)}U.create=e=>{var t;return new U({checks:[],typeName:ke.ZodString,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...N(e)})};class B extends I{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){this._def.coerce&&(e.data=Number(e.data));if(this._getType(e)!==d.number){const t=this._getOrReturnCtx(e);return y(t,{code:c.invalid_type,expected:d.number,received:t.parsedType}),v}let t;const a=new g;for(const n of this._def.checks)if("int"===n.kind)r.isInteger(e.data)||(t=this._getOrReturnCtx(e,t),y(t,{code:c.invalid_type,expected:"integer",received:"float",message:n.message}),a.dirty());else if("min"===n.kind){(n.inclusive?e.data<n.value:e.data<=n.value)&&(t=this._getOrReturnCtx(e,t),y(t,{code:c.too_small,minimum:n.value,type:"number",inclusive:n.inclusive,exact:!1,message:n.message}),a.dirty())}else if("max"===n.kind){(n.inclusive?e.data>n.value:e.data>=n.value)&&(t=this._getOrReturnCtx(e,t),y(t,{code:c.too_big,maximum:n.value,type:"number",inclusive:n.inclusive,exact:!1,message:n.message}),a.dirty())}else"multipleOf"===n.kind?0!==D(e.data,n.value)&&(t=this._getOrReturnCtx(e,t),y(t,{code:c.not_multiple_of,multipleOf:n.value,message:n.message}),a.dirty()):"finite"===n.kind?Number.isFinite(e.data)||(t=this._getOrReturnCtx(e,t),y(t,{code:c.not_finite,message:n.message}),a.dirty()):r.assertNever(n);return{status:a.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,S.toString(t))}gt(e,t){return this.setLimit("min",e,!1,S.toString(t))}lte(e,t){return this.setLimit("max",e,!0,S.toString(t))}lt(e,t){return this.setLimit("max",e,!1,S.toString(t))}setLimit(e,t,a,n){return new B({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:a,message:S.toString(n)}]})}_addCheck(e){return new B({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:S.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:S.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:S.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:S.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:S.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:S.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:S.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:S.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:S.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find((e=>"int"===e.kind||"multipleOf"===e.kind&&r.isInteger(e.value)))}get isFinite(){let e=null,t=null;for(const a of this._def.checks){if("finite"===a.kind||"int"===a.kind||"multipleOf"===a.kind)return!0;"min"===a.kind?(null===t||a.value>t)&&(t=a.value):"max"===a.kind&&(null===e||a.value<e)&&(e=a.value)}return Number.isFinite(t)&&Number.isFinite(e)}}B.create=e=>new B({checks:[],typeName:ke.ZodNumber,coerce:(null==e?void 0:e.coerce)||!1,...N(e)});class G extends I{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){this._def.coerce&&(e.data=BigInt(e.data));if(this._getType(e)!==d.bigint){const t=this._getOrReturnCtx(e);return y(t,{code:c.invalid_type,expected:d.bigint,received:t.parsedType}),v}let t;const a=new g;for(const n of this._def.checks)if("min"===n.kind){(n.inclusive?e.data<n.value:e.data<=n.value)&&(t=this._getOrReturnCtx(e,t),y(t,{code:c.too_small,type:"bigint",minimum:n.value,inclusive:n.inclusive,message:n.message}),a.dirty())}else if("max"===n.kind){(n.inclusive?e.data>n.value:e.data>=n.value)&&(t=this._getOrReturnCtx(e,t),y(t,{code:c.too_big,type:"bigint",maximum:n.value,inclusive:n.inclusive,message:n.message}),a.dirty())}else"multipleOf"===n.kind?e.data%n.value!==BigInt(0)&&(t=this._getOrReturnCtx(e,t),y(t,{code:c.not_multiple_of,multipleOf:n.value,message:n.message}),a.dirty()):r.assertNever(n);return{status:a.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,S.toString(t))}gt(e,t){return this.setLimit("min",e,!1,S.toString(t))}lte(e,t){return this.setLimit("max",e,!0,S.toString(t))}lt(e,t){return this.setLimit("max",e,!1,S.toString(t))}setLimit(e,t,a,n){return new G({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:a,message:S.toString(n)}]})}_addCheck(e){return new G({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:S.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:S.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:S.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:S.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:S.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}G.create=e=>{var t;return new G({checks:[],typeName:ke.ZodBigInt,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...N(e)})};class j extends I{_parse(e){this._def.coerce&&(e.data=Boolean(e.data));if(this._getType(e)!==d.boolean){const t=this._getOrReturnCtx(e);return y(t,{code:c.invalid_type,expected:d.boolean,received:t.parsedType}),v}return _(e.data)}}j.create=e=>new j({typeName:ke.ZodBoolean,coerce:(null==e?void 0:e.coerce)||!1,...N(e)});class $ extends I{_parse(e){this._def.coerce&&(e.data=new Date(e.data));if(this._getType(e)!==d.date){const t=this._getOrReturnCtx(e);return y(t,{code:c.invalid_type,expected:d.date,received:t.parsedType}),v}if(isNaN(e.data.getTime())){return y(this._getOrReturnCtx(e),{code:c.invalid_date}),v}const t=new g;let a;for(const n of this._def.checks)"min"===n.kind?e.data.getTime()<n.value&&(a=this._getOrReturnCtx(e,a),y(a,{code:c.too_small,message:n.message,inclusive:!0,exact:!1,minimum:n.value,type:"date"}),t.dirty()):"max"===n.kind?e.data.getTime()>n.value&&(a=this._getOrReturnCtx(e,a),y(a,{code:c.too_big,message:n.message,inclusive:!0,exact:!1,maximum:n.value,type:"date"}),t.dirty()):r.assertNever(n);return{status:t.value,value:new Date(e.data.getTime())}}_addCheck(e){return new $({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:S.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:S.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return null!=e?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return null!=e?new Date(e):null}}$.create=e=>new $({checks:[],coerce:(null==e?void 0:e.coerce)||!1,typeName:ke.ZodDate,...N(e)});class K extends I{_parse(e){if(this._getType(e)!==d.symbol){const t=this._getOrReturnCtx(e);return y(t,{code:c.invalid_type,expected:d.symbol,received:t.parsedType}),v}return _(e.data)}}K.create=e=>new K({typeName:ke.ZodSymbol,...N(e)});class V extends I{_parse(e){if(this._getType(e)!==d.undefined){const t=this._getOrReturnCtx(e);return y(t,{code:c.invalid_type,expected:d.undefined,received:t.parsedType}),v}return _(e.data)}}V.create=e=>new V({typeName:ke.ZodUndefined,...N(e)});class F extends I{_parse(e){if(this._getType(e)!==d.null){const t=this._getOrReturnCtx(e);return y(t,{code:c.invalid_type,expected:d.null,received:t.parsedType}),v}return _(e.data)}}F.create=e=>new F({typeName:ke.ZodNull,...N(e)});class W extends I{constructor(){super(...arguments),this._any=!0}_parse(e){return _(e.data)}}W.create=e=>new W({typeName:ke.ZodAny,...N(e)});class H extends I{constructor(){super(...arguments),this._unknown=!0}_parse(e){return _(e.data)}}H.create=e=>new H({typeName:ke.ZodUnknown,...N(e)});class Y extends I{_parse(e){const t=this._getOrReturnCtx(e);return y(t,{code:c.invalid_type,expected:d.never,received:t.parsedType}),v}}Y.create=e=>new Y({typeName:ke.ZodNever,...N(e)});class z extends I{_parse(e){if(this._getType(e)!==d.undefined){const t=this._getOrReturnCtx(e);return y(t,{code:c.invalid_type,expected:d.void,received:t.parsedType}),v}return _(e.data)}}z.create=e=>new z({typeName:ke.ZodVoid,...N(e)});class J extends I{_parse(e){const{ctx:t,status:a}=this._processInputParams(e),n=this._def;if(t.parsedType!==d.array)return y(t,{code:c.invalid_type,expected:d.array,received:t.parsedType}),v;if(null!==n.exactLength){const e=t.data.length>n.exactLength.value,s=t.data.length<n.exactLength.value;(e||s)&&(y(t,{code:e?c.too_big:c.too_small,minimum:s?n.exactLength.value:void 0,maximum:e?n.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:n.exactLength.message}),a.dirty())}if(null!==n.minLength&&t.data.length<n.minLength.value&&(y(t,{code:c.too_small,minimum:n.minLength.value,type:"array",inclusive:!0,exact:!1,message:n.minLength.message}),a.dirty()),null!==n.maxLength&&t.data.length>n.maxLength.value&&(y(t,{code:c.too_big,maximum:n.maxLength.value,type:"array",inclusive:!0,exact:!1,message:n.maxLength.message}),a.dirty()),t.common.async)return Promise.all([...t.data].map(((e,a)=>n.type._parseAsync(new w(t,e,t.path,a))))).then((e=>g.mergeArray(a,e)));const s=[...t.data].map(((e,a)=>n.type._parseSync(new w(t,e,t.path,a))));return g.mergeArray(a,s)}get element(){return this._def.type}min(e,t){return new J({...this._def,minLength:{value:e,message:S.toString(t)}})}max(e,t){return new J({...this._def,maxLength:{value:e,message:S.toString(t)}})}length(e,t){return new J({...this._def,exactLength:{value:e,message:S.toString(t)}})}nonempty(e){return this.min(1,e)}}function q(e){if(e instanceof Q){const t={};for(const a in e.shape){const n=e.shape[a];t[a]=me.create(q(n))}return new Q({...e._def,shape:()=>t})}return e instanceof J?new J({...e._def,type:q(e.element)}):e instanceof me?me.create(q(e.unwrap())):e instanceof fe?fe.create(q(e.unwrap())):e instanceof se?se.create(e.items.map((e=>q(e)))):e}J.create=(e,t)=>new J({type:e,minLength:null,maxLength:null,exactLength:null,typeName:ke.ZodArray,...N(t)});class Q extends I{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(null!==this._cached)return this._cached;const e=this._def.shape(),t=r.objectKeys(e);return this._cached={shape:e,keys:t}}_parse(e){if(this._getType(e)!==d.object){const t=this._getOrReturnCtx(e);return y(t,{code:c.invalid_type,expected:d.object,received:t.parsedType}),v}const{status:t,ctx:a}=this._processInputParams(e),{shape:n,keys:s}=this._getCached(),i=[];if(!(this._def.catchall instanceof Y&&"strip"===this._def.unknownKeys))for(const e in a.data)s.includes(e)||i.push(e);const r=[];for(const e of s){const t=n[e],s=a.data[e];r.push({key:{status:"valid",value:e},value:t._parse(new w(a,s,a.path,e)),alwaysSet:e in a.data})}if(this._def.catchall instanceof Y){const e=this._def.unknownKeys;if("passthrough"===e)for(const e of i)r.push({key:{status:"valid",value:e},value:{status:"valid",value:a.data[e]}});else if("strict"===e)i.length>0&&(y(a,{code:c.unrecognized_keys,keys:i}),t.dirty());else if("strip"!==e)throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const e=this._def.catchall;for(const t of i){const n=a.data[t];r.push({key:{status:"valid",value:t},value:e._parse(new w(a,n,a.path,t)),alwaysSet:t in a.data})}}return a.common.async?Promise.resolve().then((async()=>{const e=[];for(const t of r){const a=await t.key;e.push({key:a,value:await t.value,alwaysSet:t.alwaysSet})}return e})).then((e=>g.mergeObjectSync(t,e))):g.mergeObjectSync(t,r)}get shape(){return this._def.shape()}strict(e){return S.errToObj,new Q({...this._def,unknownKeys:"strict",...void 0!==e?{errorMap:(t,a)=>{var n,s,i,r;const o=null!==(i=null===(s=(n=this._def).errorMap)||void 0===s?void 0:s.call(n,t,a).message)&&void 0!==i?i:a.defaultError;return"unrecognized_keys"===t.code?{message:null!==(r=S.errToObj(e).message)&&void 0!==r?r:o}:{message:o}}}:{}})}strip(){return new Q({...this._def,unknownKeys:"strip"})}passthrough(){return new Q({...this._def,unknownKeys:"passthrough"})}extend(e){return new Q({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new Q({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:ke.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new Q({...this._def,catchall:e})}pick(e){const t={};return r.objectKeys(e).forEach((a=>{e[a]&&this.shape[a]&&(t[a]=this.shape[a])})),new Q({...this._def,shape:()=>t})}omit(e){const t={};return r.objectKeys(this.shape).forEach((a=>{e[a]||(t[a]=this.shape[a])})),new Q({...this._def,shape:()=>t})}deepPartial(){return q(this)}partial(e){const t={};return r.objectKeys(this.shape).forEach((a=>{const n=this.shape[a];e&&!e[a]?t[a]=n:t[a]=n.optional()})),new Q({...this._def,shape:()=>t})}required(e){const t={};return r.objectKeys(this.shape).forEach((a=>{if(e&&!e[a])t[a]=this.shape[a];else{let e=this.shape[a];for(;e instanceof me;)e=e._def.innerType;t[a]=e}})),new Q({...this._def,shape:()=>t})}keyof(){return ue(r.objectKeys(this.shape))}}Q.create=(e,t)=>new Q({shape:()=>e,unknownKeys:"strip",catchall:Y.create(),typeName:ke.ZodObject,...N(t)}),Q.strictCreate=(e,t)=>new Q({shape:()=>e,unknownKeys:"strict",catchall:Y.create(),typeName:ke.ZodObject,...N(t)}),Q.lazycreate=(e,t)=>new Q({shape:e,unknownKeys:"strip",catchall:Y.create(),typeName:ke.ZodObject,...N(t)});class X extends I{_parse(e){const{ctx:t}=this._processInputParams(e),a=this._def.options;if(t.common.async)return Promise.all(a.map((async e=>{const a={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:a}),ctx:a}}))).then((function(e){for(const t of e)if("valid"===t.result.status)return t.result;for(const a of e)if("dirty"===a.result.status)return t.common.issues.push(...a.ctx.common.issues),a.result;const a=e.map((e=>new l(e.ctx.common.issues)));return y(t,{code:c.invalid_union,unionErrors:a}),v}));{let e;const n=[];for(const s of a){const a={...t,common:{...t.common,issues:[]},parent:null},i=s._parseSync({data:t.data,path:t.path,parent:a});if("valid"===i.status)return i;"dirty"!==i.status||e||(e={result:i,ctx:a}),a.common.issues.length&&n.push(a.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;const s=n.map((e=>new l(e)));return y(t,{code:c.invalid_union,unionErrors:s}),v}}get options(){return this._def.options}}X.create=(e,t)=>new X({options:e,typeName:ke.ZodUnion,...N(t)});const ee=e=>e instanceof oe?ee(e.schema):e instanceof pe?ee(e.innerType()):e instanceof de?[e.value]:e instanceof ce?e.options:e instanceof le?Object.keys(e.enum):e instanceof ye?ee(e._def.innerType):e instanceof V?[void 0]:e instanceof F?[null]:null;class te extends I{_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==d.object)return y(t,{code:c.invalid_type,expected:d.object,received:t.parsedType}),v;const a=this.discriminator,n=t.data[a],s=this.optionsMap.get(n);return s?t.common.async?s._parseAsync({data:t.data,path:t.path,parent:t}):s._parseSync({data:t.data,path:t.path,parent:t}):(y(t,{code:c.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[a]}),v)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,a){const n=new Map;for(const a of t){const t=ee(a.shape[e]);if(!t)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const s of t){if(n.has(s))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(s)}`);n.set(s,a)}}return new te({typeName:ke.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:n,...N(a)})}}function ae(e,t){const a=u(e),n=u(t);if(e===t)return{valid:!0,data:e};if(a===d.object&&n===d.object){const a=r.objectKeys(t),n=r.objectKeys(e).filter((e=>-1!==a.indexOf(e))),s={...e,...t};for(const a of n){const n=ae(e[a],t[a]);if(!n.valid)return{valid:!1};s[a]=n.data}return{valid:!0,data:s}}if(a===d.array&&n===d.array){if(e.length!==t.length)return{valid:!1};const a=[];for(let n=0;n<e.length;n++){const s=ae(e[n],t[n]);if(!s.valid)return{valid:!1};a.push(s.data)}return{valid:!0,data:a}}return a===d.date&&n===d.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class ne extends I{_parse(e){const{status:t,ctx:a}=this._processInputParams(e),n=(e,n)=>{if(b(e)||b(n))return v;const s=ae(e.value,n.value);return s.valid?((x(e)||x(n))&&t.dirty(),{status:t.value,value:s.data}):(y(a,{code:c.invalid_intersection_types}),v)};return a.common.async?Promise.all([this._def.left._parseAsync({data:a.data,path:a.path,parent:a}),this._def.right._parseAsync({data:a.data,path:a.path,parent:a})]).then((([e,t])=>n(e,t))):n(this._def.left._parseSync({data:a.data,path:a.path,parent:a}),this._def.right._parseSync({data:a.data,path:a.path,parent:a}))}}ne.create=(e,t,a)=>new ne({left:e,right:t,typeName:ke.ZodIntersection,...N(a)});class se extends I{_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==d.array)return y(a,{code:c.invalid_type,expected:d.array,received:a.parsedType}),v;if(a.data.length<this._def.items.length)return y(a,{code:c.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),v;!this._def.rest&&a.data.length>this._def.items.length&&(y(a,{code:c.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const n=[...a.data].map(((e,t)=>{const n=this._def.items[t]||this._def.rest;return n?n._parse(new w(a,e,a.path,t)):null})).filter((e=>!!e));return a.common.async?Promise.all(n).then((e=>g.mergeArray(t,e))):g.mergeArray(t,n)}get items(){return this._def.items}rest(e){return new se({...this._def,rest:e})}}se.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new se({items:e,typeName:ke.ZodTuple,rest:null,...N(t)})};class ie extends I{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==d.map)return y(a,{code:c.invalid_type,expected:d.map,received:a.parsedType}),v;const n=this._def.keyType,s=this._def.valueType,i=[...a.data.entries()].map((([e,t],i)=>({key:n._parse(new w(a,e,a.path,[i,"key"])),value:s._parse(new w(a,t,a.path,[i,"value"]))})));if(a.common.async){const e=new Map;return Promise.resolve().then((async()=>{for(const a of i){const n=await a.key,s=await a.value;if("aborted"===n.status||"aborted"===s.status)return v;"dirty"!==n.status&&"dirty"!==s.status||t.dirty(),e.set(n.value,s.value)}return{status:t.value,value:e}}))}{const e=new Map;for(const a of i){const n=a.key,s=a.value;if("aborted"===n.status||"aborted"===s.status)return v;"dirty"!==n.status&&"dirty"!==s.status||t.dirty(),e.set(n.value,s.value)}return{status:t.value,value:e}}}}ie.create=(e,t,a)=>new ie({valueType:t,keyType:e,typeName:ke.ZodMap,...N(a)});class re extends I{_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==d.set)return y(a,{code:c.invalid_type,expected:d.set,received:a.parsedType}),v;const n=this._def;null!==n.minSize&&a.data.size<n.minSize.value&&(y(a,{code:c.too_small,minimum:n.minSize.value,type:"set",inclusive:!0,exact:!1,message:n.minSize.message}),t.dirty()),null!==n.maxSize&&a.data.size>n.maxSize.value&&(y(a,{code:c.too_big,maximum:n.maxSize.value,type:"set",inclusive:!0,exact:!1,message:n.maxSize.message}),t.dirty());const s=this._def.valueType;function i(e){const a=new Set;for(const n of e){if("aborted"===n.status)return v;"dirty"===n.status&&t.dirty(),a.add(n.value)}return{status:t.value,value:a}}const r=[...a.data.values()].map(((e,t)=>s._parse(new w(a,e,a.path,t))));return a.common.async?Promise.all(r).then((e=>i(e))):i(r)}min(e,t){return new re({...this._def,minSize:{value:e,message:S.toString(t)}})}max(e,t){return new re({...this._def,maxSize:{value:e,message:S.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}re.create=(e,t)=>new re({valueType:e,minSize:null,maxSize:null,typeName:ke.ZodSet,...N(t)});class oe extends I{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}oe.create=(e,t)=>new oe({getter:e,typeName:ke.ZodLazy,...N(t)});class de extends I{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return y(t,{received:t.data,code:c.invalid_literal,expected:this._def.value}),v}return{status:"valid",value:e.data}}get value(){return this._def.value}}function ue(e,t){return new ce({values:e,typeName:ke.ZodEnum,...N(t)})}de.create=(e,t)=>new de({value:e,typeName:ke.ZodLiteral,...N(t)});class ce extends I{_parse(e){if("string"!=typeof e.data){const t=this._getOrReturnCtx(e),a=this._def.values;return y(t,{expected:r.joinValues(a),received:t.parsedType,code:c.invalid_type}),v}if(-1===this._def.values.indexOf(e.data)){const t=this._getOrReturnCtx(e),a=this._def.values;return y(t,{received:t.data,code:c.invalid_enum_value,options:a}),v}return _(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e){return ce.create(e)}exclude(e){return ce.create(this.options.filter((t=>!e.includes(t))))}}ce.create=ue;class le extends I{_parse(e){const t=r.getValidEnumValues(this._def.values),a=this._getOrReturnCtx(e);if(a.parsedType!==d.string&&a.parsedType!==d.number){const e=r.objectValues(t);return y(a,{expected:r.joinValues(e),received:a.parsedType,code:c.invalid_type}),v}if(-1===t.indexOf(e.data)){const e=r.objectValues(t);return y(a,{received:a.data,code:c.invalid_enum_value,options:e}),v}return _(e.data)}get enum(){return this._def.values}}le.create=(e,t)=>new le({values:e,typeName:ke.ZodNativeEnum,...N(t)});class he extends I{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==d.promise&&!1===t.common.async)return y(t,{code:c.invalid_type,expected:d.promise,received:t.parsedType}),v;const a=t.parsedType===d.promise?t.data:Promise.resolve(t.data);return _(a.then((e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap}))))}}he.create=(e,t)=>new he({type:e,typeName:ke.ZodPromise,...N(t)});class pe extends I{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ke.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:a}=this._processInputParams(e),n=this._def.effect||null,s={addIssue:e=>{y(a,e),e.fatal?t.abort():t.dirty()},get path(){return a.path}};if(s.addIssue=s.addIssue.bind(s),"preprocess"===n.type){const e=n.transform(a.data,s);return a.common.issues.length?{status:"dirty",value:a.data}:a.common.async?Promise.resolve(e).then((e=>this._def.schema._parseAsync({data:e,path:a.path,parent:a}))):this._def.schema._parseSync({data:e,path:a.path,parent:a})}if("refinement"===n.type){const e=e=>{const t=n.refinement(e,s);if(a.common.async)return Promise.resolve(t);if(t instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return e};if(!1===a.common.async){const n=this._def.schema._parseSync({data:a.data,path:a.path,parent:a});return"aborted"===n.status?v:("dirty"===n.status&&t.dirty(),e(n.value),{status:t.value,value:n.value})}return this._def.schema._parseAsync({data:a.data,path:a.path,parent:a}).then((a=>"aborted"===a.status?v:("dirty"===a.status&&t.dirty(),e(a.value).then((()=>({status:t.value,value:a.value}))))))}if("transform"===n.type){if(!1===a.common.async){const e=this._def.schema._parseSync({data:a.data,path:a.path,parent:a});if(!k(e))return e;const i=n.transform(e.value,s);if(i instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:i}}return this._def.schema._parseAsync({data:a.data,path:a.path,parent:a}).then((e=>k(e)?Promise.resolve(n.transform(e.value,s)).then((e=>({status:t.value,value:e}))):e))}r.assertNever(n)}}pe.create=(e,t,a)=>new pe({schema:e,typeName:ke.ZodEffects,effect:t,...N(a)}),pe.createWithPreprocess=(e,t,a)=>new pe({schema:t,effect:{type:"preprocess",transform:e},typeName:ke.ZodEffects,...N(a)});class me extends I{_parse(e){return this._getType(e)===d.undefined?_(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}me.create=(e,t)=>new me({innerType:e,typeName:ke.ZodOptional,...N(t)});class fe extends I{_parse(e){return this._getType(e)===d.null?_(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}fe.create=(e,t)=>new fe({innerType:e,typeName:ke.ZodNullable,...N(t)});class ye extends I{_parse(e){const{ctx:t}=this._processInputParams(e);let a=t.data;return t.parsedType===d.undefined&&(a=this._def.defaultValue()),this._def.innerType._parse({data:a,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}ye.create=(e,t)=>new ye({innerType:e,typeName:ke.ZodDefault,defaultValue:"function"==typeof t.default?t.default:()=>t.default,...N(t)});class ge extends I{_parse(e){const{ctx:t}=this._processInputParams(e),a={...t,common:{...t.common,issues:[]}},n=this._def.innerType._parse({data:a.data,path:a.path,parent:{...a}});return C(n)?n.then((e=>({status:"valid",value:"valid"===e.status?e.value:this._def.catchValue({get error(){return new l(a.common.issues)},input:a.data})}))):{status:"valid",value:"valid"===n.status?n.value:this._def.catchValue({get error(){return new l(a.common.issues)},input:a.data})}}removeCatch(){return this._def.innerType}}ge.create=(e,t)=>new ge({innerType:e,typeName:ke.ZodCatch,catchValue:"function"==typeof t.catch?t.catch:()=>t.catch,...N(t)});class ve extends I{_parse(e){if(this._getType(e)!==d.nan){const t=this._getOrReturnCtx(e);return y(t,{code:c.invalid_type,expected:d.nan,received:t.parsedType}),v}return{status:"valid",value:e.data}}}ve.create=e=>new ve({typeName:ke.ZodNaN,...N(e)});class _e extends I{_parse(e){const{ctx:t}=this._processInputParams(e),a=t.data;return this._def.type._parse({data:a,path:t.path,parent:t})}unwrap(){return this._def.type}}class be extends I{_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.common.async){return(async()=>{const e=await this._def.in._parseAsync({data:a.data,path:a.path,parent:a});return"aborted"===e.status?v:"dirty"===e.status?(t.dirty(),{status:"dirty",value:e.value}):this._def.out._parseAsync({data:e.value,path:a.path,parent:a})})()}{const e=this._def.in._parseSync({data:a.data,path:a.path,parent:a});return"aborted"===e.status?v:"dirty"===e.status?(t.dirty(),{status:"dirty",value:e.value}):this._def.out._parseSync({data:e.value,path:a.path,parent:a})}}static create(e,t){return new be({in:e,out:t,typeName:ke.ZodPipeline})}}class xe extends I{_parse(e){const t=this._def.innerType._parse(e);return k(t)&&(t.value=Object.freeze(t.value)),t}}var ke;xe.create=(e,t)=>new xe({innerType:e,typeName:ke.ZodReadonly,...N(t)}),Q.lazycreate,function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"}(ke||(ke={}));const Ce=U.create,Se=B.create;ve.create,G.create;const we=j.create;$.create,K.create,V.create,F.create;const Te=W.create;H.create,Y.create,z.create;const Ne=J.create,Ie=Q.create;Q.strictCreate,X.create;const Ae=te.create;ne.create,se.create,ie.create,re.create,oe.create;const Ee=de.create,Oe=ce.create,Re=le.create;he.create,pe.create,me.create,fe.create,pe.createWithPreprocess,be.create;const Ze=["GBPCountries","UnitedStates","AUDCountries","EURCountries","International","NZDCountries","Canada"],Me=Oe(Ze),Pe={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"}},Le={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"},Ue={GBPCountries:"£",UnitedStates:"$",AUDCountries:"$",Canada:"CA$",EURCountries:"€",NZDCountries:"NZ$",International:"$"},De=e=>Object.keys(Pe).find((t=>Pe[t].countries.includes(e??"")))||"International",Be=e=>{if(e){const t=De(e);return Ue[t]}return"£"},Ge=e=>{if(e)return Le[e]},je=(e,t,a,n)=>{if(n){const s=n[De(a)];if(s){return`${Be(a)}${s[e][t].price}`}}},$e={CURRENCY_SYMBOL:({countryCode:e})=>Be(e),COUNTRY_NAME:({countryCode:e})=>Ge(e),PRICE_DIGISUB_MONTHLY:({countryCode:e,prices:t})=>je("Digisub","Monthly",e,t),PRICE_DIGISUB_ANNUAL:({countryCode:e,prices:t})=>je("Digisub","Annual",e,t),PRICE_GUARDIANWEEKLY_MONTHLY:({countryCode:e,prices:t})=>je("GuardianWeekly","Monthly",e,t),PRICE_GUARDIANWEEKLY_ANNUAL:({countryCode:e,prices:t})=>je("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"}))()},Ke=/%%.*?%%/g,Ve=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},Fe=(e=new Date)=>{const t=(e=>{const t=e.getDate()<20?1:2;return e.setMonth(e.getMonth()+t),e})(e),a=(t.getMonth()+1).toString().padStart(2,"0"),n=t.toLocaleString("default",{month:"long"}),s=t.getFullYear();return{reminderCta:`Remind me in ${n}`,reminderPeriod:`${s}-${a}-01`,reminderLabel:`${n} ${s}`}},We=new Date("2023-12-31"),He=e=>e>=(e=>new Date(e.getFullYear(),9,20))(e)&&e<Ve(e.getFullYear()),Ye=Ie({text:Ce(),baseUrl:Ce()});let ze=function(e){return e.Custom="CustomSecondaryCta",e.ContributionsReminder="ContributionsReminderSecondaryCta",e}({});Re(ze);const Je=Ae("type",[Ie({type:Ee(ze.Custom),cta:Ye}),Ie({type:Ee(ze.ContributionsReminder)})]);let qe=function(e){return e.unlimited="unlimited",e.hardstop="hardstop",e}({});const Qe=Re(qe);let Xe=function(e){return e.money="money",e}({});const et=Re(Xe),tt=Ie({countLabel:Ce(),goalReachedPrimary:Ce(),goalReachedSecondary:Ce()}),at=Ie({total:Se(),goal:Se()}),nt=Oe(["US","AU"]),st=Ie({endType:Qe,countType:et,currencySymbol:Ce(),copy:tt,name:nt,tickerData:at.optional()}),it=Oe(["CONTRIBUTION","MEMBERSHIP_SUPPORTER","DIGITAL_SUBSCRIPTION","PRINT_SUBSCRIPTION"]),rt=Oe(["ACQUISITIONS_EPIC","ACQUISITIONS_ENGAGEMENT_BANNER","ACQUISITIONS_SUBSCRIPTIONS_BANNER","ACQUISITIONS_HEADER","ACQUISITIONS_OTHER"]),ot=Ie({abTestName:Ce(),abTestVariant:Ce(),campaignCode:Ce(),componentType:rt,products:Ne(it).nullish(),labels:Ne(Ce()).nullish(),ophanPageId:Ce(),platformId:Ce(),referrerUrl:Ce(),clientName:Ce()}),dt=Ie({mainUrl:Ce(),mobileUrl:Ce().optional(),tabletUrl:Ce().optional(),desktopUrl:Ce().optional(),leftColUrl:Ce().optional(),wideUrl:Ce().optional(),altText:Ce()}),ut=Ie({name:Ce(),description:Ce().optional(),headshot:dt.optional()}),ct=Oe(["Live","Draft","Archived"]),lt=Oe(["Mobile","Desktop","All"]),ht=Oe(["SignedIn","SignedOut","All"]),pt=Ie({name:Ce(),status:ct,priority:Se(),controlProportionSettings:Ie({proportion:Se(),offset:Se()}).optional(),deviceType:lt.optional(),signedInStatus:ht.optional()}),mt=Oe(["AllExistingSupporters","AllNonSupporters","Everyone","PostAskPauseSingleContributors"]),ft=Ie({minViews:Se(),maxViews:Se().optional(),periodInWeeks:Se(),tagId:Ce().optional()}),yt=Ie({for52Weeks:Se(),forTargetedWeeks:Se()}),gt=Ie({maxViewsCount:Se(),maxViewsDays:Se(),minDaysBetweenViews:Se()}),vt=Ie({type:Ee("above"),copy:Ce().optional()}),_t=Ie({reminderCta:Ce(),reminderLabel:Ce(),reminderPeriod:Ce()}),bt=Oe(["ONE_OFF","MONTHLY","ANNUAL"]),xt=Ie({testName:Ce(),variantName:Ce(),defaultContributionType:bt,displayContributionType:bt.array(),amountsCardData:Ie({ONE_OFF:Ie({amounts:Ne(Se()),defaultAmount:Se(),hideChooseYourAmount:we().optional()}),MONTHLY:Ie({amounts:Ne(Se()),defaultAmount:Se(),hideChooseYourAmount:we().optional()}),ANNUAL:Ie({amounts:Ne(Se()),defaultAmount:Se(),hideChooseYourAmount:we().optional()})})}),kt=Ie({name:Ce(),heading:Ce().optional(),paragraphs:Ne(Ce()),highlightedText:Ce().optional(),tickerSettings:st.optional(),cta:Ye.optional(),secondaryCta:Je.optional(),footer:Ce().optional(),image:dt.optional(),showReminderFields:_t.optional(),separateArticleCount:vt.optional(),maxViews:gt.optional(),showSignInLink:we().optional(),bylineWithImage:ut.optional(),showChoiceCards:we().optional(),choiceCardAmounts:xt.optional(),defaultChoiceCardFrequency:bt.optional()}),Ct=Ie({variant:kt,tracking:ot,countryCode:Ce().nullish(),articleCounts:yt,onReminderOpen:Te().nullish(),fetchEmail:Te().nullish(),submitComponentEvent:Te().nullish(),openCmp:Te().nullish(),hasConsentForArticleCount:we().nullish(),stage:Ce().nullish()}),St=/^[0-9A-F]{2}$/,wt=Ce().refine((e=>St.test(e)),(e=>({message:`"${e}" is not a valid hex value`}))),Tt=Ie({r:wt,g:wt,b:wt,kind:Ee("hex")}),Nt=Ie({mobileUrl:Ce(),tabletDesktopUrl:Ce(),wideUrl:Ce(),altText:Ce(),kind:Ee("Image")}),It=Ie({buttonColour:Tt.nullish(),buttonTextColour:Tt.nullish(),buttonBorderColour:Tt.nullish(),buttonSelectColour:Tt.nullish(),buttonSelectTextColour:Tt.nullish(),buttonSelectBorderColour:Tt.nullish(),kind:Ee("ChoiceCards")}),At=Ie({visual:Ae("kind",[Nt,It]).nullish(),colours:Ie({basic:Ie({background:Tt,bodyText:Tt})})}),Et=Oe(["contributions","subscriptions","signIn"]),Ot=Ie({heading:Ce().nullish(),messageText:Ce().nullish(),paragraphs:Ne(Ce()).nullish(),mobileMessageText:Ce().nullish(),highlightedText:Ce().nullish(),cta:Ye.nullish(),secondaryCta:Je.nullish()});Ie({tracking:ot,bannerChannel:Et,content:Ot.nullish(),mobileContent:Ot.nullish(),countryCode:Ce().nullish(),isSupporter:we().nullish(),tickerSettings:st.nullish(),submitComponentEvent:Te(),numArticles:Se().nullish(),hasOptedOutOfArticleCount:we().nullish(),fetchEmail:Te().nullish(),separateArticleCount:we().nullish(),design:At.nullish()});const Rt=Ie({heading:Ce(),subheading:Ce(),primaryCta:Ye.nullish(),secondaryCta:Ye.nullish()});Ie({content:Rt,tracking:ot,mobileContent:Rt.nullish(),countryCode:Ce().nullish(),submitComponentEvent:Te(),numArticles:Se().nullish()});const Zt=Ie({maxViewsCount:Se(),maxViewsDays:Se(),minDaysBetweenViews:Se()});pt.extend({name:Ce(),status:ct,locations:Ne(Me),tagIds:Ne(Ce()),sections:Ne(Ce()),excludedTagIds:Ne(Ce()),excludedSections:Ne(Ce()),alwaysAsk:we(),maxViews:Zt.optional(),userCohort:mt,hasCountryName:we(),highPriority:we(),useLocalViewLog:we(),articlesViewedSettings:ft.optional(),priority:Se(),variants:kt.array()});const Mt=(e,t,a)=>{const n=(e=>{if(URLSearchParams){const t=new URLSearchParams(window.location.search).get(`force-${e}`);if(t)return t}return null})(e);return fetch(`${t}/${e}${n?`?force=${n}`:""}`,{method:"post",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)}).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=Ze,exports.SecondaryCtaType=ze,exports.TickerCountType=Xe,exports.TickerEndType=qe,exports.addRegionIdToSupportUrl=(e,t)=>{if(t){const a=(e=>Pe[De(e)]?.supportRegionId)(t);if(a)return e.replace(/(support.theguardian.com)\/(contribute-in-epic|contribute|subscribe)/,((e,t,n)=>`${t}/${a.toLowerCase()}/${n}`))}return e},exports.buildReminderFields=Fe,exports.containsNonArticleCountPlaceholder=e=>{const t=e.match(Ke)?.filter((e=>"%%ARTICLE_COUNT%%"!==e));return!!t&&t.length>0},exports.contributionTabFrequencies=["ONE_OFF","MONTHLY","ANNUAL"],exports.countryCodeToCountryGroupId=De,exports.countryGroupIdSchema=Me,exports.epicPropsSchema=Ct,exports.getBanner=(e,t)=>Mt("banner",e,t),exports.getCountryName=Ge,exports.getEpic=(e,t)=>Mt("epic",e,t),exports.getEpicViewLog=t=>t.get(e)||void 0,exports.getHeader=(e,t)=>Mt("header",e,t),exports.getLiveblogEpic=(e,t)=>Mt("liveblog-epic",e,t),exports.getLocalCurrencySymbol=Be,exports.getReminderFields=(e,t=new Date)=>{return"US"===e&&He(t)?{reminderCta:"Remind me on Giving Tuesday",reminderPeriod:`${a=t.getFullYear()}-${(Ve(a).getMonth()+1).toString().padStart(0,"2")}-01`,reminderLabel:"on Giving Tuesday",reminderOption:`giving-tuesday-${a}`}:"US"===e&&(e=>e>=Ve(e.getFullYear())&&e<We)(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()):Fe(t);var a},exports.getWeeklyArticleHistory=e=>e.get(t)||void 0,exports.inCountryGroups=(e,t=[])=>0===t.length||!!e&&t.includes(De(e.toUpperCase())),exports.incrementWeeklyArticleCount=(e,s,r)=>{const o=((e,t)=>{const s=n(new Date),i=e.get(a);if(i&&i.week===s){const n=i.articles[t]||0;return e.set(a,{week:s,articles:{...i.articles,[t]:n+1}}),n>0}return e.set(a,{week:s,articles:{[t]:1}}),!1})(e,s);if(!o){const a=n(new Date),s=e.get(t)||[],o=s[0];if(o&&o.week&&o.week===a)o.count+=1,o.tags=i(r,o.tags),e.set(t,s);else{s.unshift({week:a,count:1,tags:i(r,{})});const n=a-365,o=s.filter((e=>e.week>=n));e.set(t,o)}}},exports.logEpicView=t=>{const a=localStorage.getItem(e),n=a?JSON.parse(a).value:[];n.push({date:(new Date).getTime(),testId:t});const s={value:n.slice(-50)};localStorage.setItem(e,JSON.stringify(s))},exports.replaceNonArticleCountPlaceholders=(e,t,a)=>e?e.replace(Ke,(e=>{const n=e.substring(2,e.length-2),s=$e[n];if(s){const e=s({countryCode:t,prices:a});if(e)return e}return e})):"";
@@ -1,4 +1,7 @@
1
- export type CountryGroupId = 'GBPCountries' | 'UnitedStates' | 'AUDCountries' | 'EURCountries' | 'International' | 'NZDCountries' | 'Canada';
1
+ import * as z from 'zod';
2
+ export declare const CountryGroupId: readonly ["GBPCountries", "UnitedStates", "AUDCountries", "EURCountries", "International", "NZDCountries", "Canada"];
3
+ export type CountryGroupId = (typeof CountryGroupId)[number];
4
+ export declare const countryGroupIdSchema: z.ZodEnum<["GBPCountries", "UnitedStates", "AUDCountries", "EURCountries", "International", "NZDCountries", "Canada"]>;
2
5
  export type SupportRegionId = 'UK' | 'US' | 'AU' | 'EU' | 'INT' | 'NZ' | 'CA';
3
6
  type IsoCurrency = 'GBP' | 'USD' | 'AUD' | 'EUR' | 'NZD' | 'CAD';
4
7
  type CountryGroup = {
@@ -1 +1 @@
1
- {"version":3,"file":"geolocation.d.ts","sourceRoot":"","sources":["../../../../../shared/src/lib/geolocation.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,cAAc,GACpB,cAAc,GACd,cAAc,GACd,cAAc,GACd,cAAc,GACd,eAAe,GACf,cAAc,GACd,QAAQ,CAAC;AAGf,MAAM,MAAM,eAAe,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,GAAG,IAAI,GAAG,IAAI,CAAC;AAE9E,KAAK,WAAW,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,CAAC;AAEjE,KAAK,YAAY,GAAG;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,WAAW,CAAC;IACtB,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,eAAe,EAAE,eAAe,CAAC;CACpC,CAAC;AAEF,KAAK,aAAa,GAAG,MAAM,CAAC,cAAc,EAAE,YAAY,CAAC,CAAC;AAE1D,QAAA,MAAM,aAAa,EAAE,aAsRpB,CAAC;AAEF,MAAM,MAAM,MAAM,GAAG,MAAM,OAAO,aAAa,CAAC;AAsPhD,eAAO,MAAM,2BAA2B,iBAAkB,MAAM,KAAG,cAQlE,CAAC;AAEF,eAAO,MAAM,eAAe,iBACV,MAAM,kBACL,cAAc,EAAE,KAChC,OAYF,CAAC;AAQF,eAAO,MAAM,sBAAsB,iBAAkB,MAAM,KAAG,MAO7D,CAAC;AAEF,eAAO,MAAM,cAAc,iBAAkB,MAAM,KAAG,MAAM,GAAG,SAM9D,CAAC;AAKF,eAAO,MAAM,uBAAuB,gBAAiB,MAAM,gBAAgB,MAAM,KAAG,MAYnF,CAAC"}
1
+ {"version":3,"file":"geolocation.d.ts","sourceRoot":"","sources":["../../../../../shared/src/lib/geolocation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,eAAO,MAAM,cAAc,sHAQjB,CAAC;AAEX,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC;AAE7D,eAAO,MAAM,oBAAoB,wHAAyB,CAAC;AAG3D,MAAM,MAAM,eAAe,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,GAAG,IAAI,GAAG,IAAI,CAAC;AAE9E,KAAK,WAAW,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,CAAC;AAEjE,KAAK,YAAY,GAAG;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,WAAW,CAAC;IACtB,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,eAAe,EAAE,eAAe,CAAC;CACpC,CAAC;AAEF,KAAK,aAAa,GAAG,MAAM,CAAC,cAAc,EAAE,YAAY,CAAC,CAAC;AAE1D,QAAA,MAAM,aAAa,EAAE,aAsRpB,CAAC;AAEF,MAAM,MAAM,MAAM,GAAG,MAAM,OAAO,aAAa,CAAC;AAsPhD,eAAO,MAAM,2BAA2B,iBAAkB,MAAM,KAAG,cAQlE,CAAC;AAEF,eAAO,MAAM,eAAe,iBACV,MAAM,kBACL,cAAc,EAAE,KAChC,OAYF,CAAC;AAQF,eAAO,MAAM,sBAAsB,iBAAkB,MAAM,KAAG,MAO7D,CAAC;AAEF,eAAO,MAAM,cAAc,iBAAkB,MAAM,KAAG,MAAM,GAAG,SAM9D,CAAC;AAKF,eAAO,MAAM,uBAAuB,gBAAiB,MAAM,gBAAgB,MAAM,KAAG,MAYnF,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { OphanComponentEvent } from '../types/ophan';
2
- import { EpicTest, EpicVariant, Tracking, BannerTest, BannerVariant } from '../types';
2
+ import { Tracking, BannerTest, BannerVariant, EpicTest, EpicVariant } from '../types';
3
3
  export declare const addTrackingParams: (baseUrl: string, params: Tracking, numArticles?: number, amountsAbTestName?: string, amountsAbTestVariant?: string) => string;
4
4
  export declare const isSupportUrl: (baseUrl: string) => boolean;
5
5
  export declare const addRegionIdAndTrackingParamsToSupportUrl: (baseUrl: string, tracking: Tracking, numArticles?: number, countryCode?: string, amountsAbTestName?: string, amountsAbTestVariant?: string) => string;
@@ -1 +1 @@
1
- {"version":3,"file":"tracking.d.ts","sourceRoot":"","sources":["../../../../../shared/src/lib/tracking.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAElE,OAAO,EACH,QAAQ,EACR,WAAW,EACX,QAAQ,EACR,UAAU,EACV,aAAa,EAEhB,MAAM,UAAU,CAAC;AAgFlB,eAAO,MAAM,iBAAiB,YACjB,MAAM,UACP,QAAQ,gBACF,MAAM,sBACA,MAAM,yBACH,MAAM,KAC9B,MAYF,CAAC;AAEF,eAAO,MAAM,YAAY,YAAa,MAAM,KAAG,OAAsC,CAAC;AAEtF,eAAO,MAAM,wCAAwC,YACxC,MAAM,YACL,QAAQ,gBACJ,MAAM,gBACN,MAAM,sBACA,MAAM,yBACH,MAAM,KAC9B,MAaF,CAAC;AAGF,eAAO,MAAM,4BAA4B,SAC/B,MAAM,YACF,QAAQ,gBACJ,MAAM,gBACN,MAAM,KACrB,MAYF,CAAC;AAUF,eAAO,MAAM,wBAAwB,YAAa,MAAM,UAAU,QAAQ,KAAG,MAgC5E,CAAC;AAEF,eAAO,MAAM,YAAY,YAAa,MAAM,KAAG,OAAsC,CAAC;AACtF,eAAO,MAAM,6BAA6B,YAAa,MAAM,YAAY,QAAQ,KAAG,MAEnF,CAAC;AAKF,eAAO,MAAM,iBAAiB,SAAU,QAAQ,WAAW,WAAW,KAAG,MACF,CAAC;AAExE,eAAO,MAAM,uBAAuB,SAAU,UAAU,WAAW,aAAa,KAAG,MACjD,CAAC;AAEnC,eAAO,MAAM,wBAAwB,aAAc,MAAM,eAAe,MAAM,KAAG,MAC3C,CAAC;AA0CvC,eAAO,MAAM,kBAAkB,aAAc,QAAQ,SAAS,MAAM,KAAG,QAYtE,CAAC;AAEF,eAAO,MAAM,4BAA4B,aArDnB,QAAQ,eAAe,MAAM,KAAG,mBAqDsB,CAAC;AAE7E,eAAO,MAAM,2BAA2B,aAvDlB,QAAQ,eAAe,MAAM,KAAG,mBAuDoB,CAAC;AAE3E,eAAO,MAAM,6BAA6B,aAzDpB,QAAQ,eAAe,MAAM,KAAG,mBAyDwB,CAAC"}
1
+ {"version":3,"file":"tracking.d.ts","sourceRoot":"","sources":["../../../../../shared/src/lib/tracking.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAElE,OAAO,EACH,QAAQ,EACR,UAAU,EACV,aAAa,EAEb,QAAQ,EACR,WAAW,EACd,MAAM,UAAU,CAAC;AAgFlB,eAAO,MAAM,iBAAiB,YACjB,MAAM,UACP,QAAQ,gBACF,MAAM,sBACA,MAAM,yBACH,MAAM,KAC9B,MAYF,CAAC;AAEF,eAAO,MAAM,YAAY,YAAa,MAAM,KAAG,OAAsC,CAAC;AAEtF,eAAO,MAAM,wCAAwC,YACxC,MAAM,YACL,QAAQ,gBACJ,MAAM,gBACN,MAAM,sBACA,MAAM,yBACH,MAAM,KAC9B,MAaF,CAAC;AAGF,eAAO,MAAM,4BAA4B,SAC/B,MAAM,YACF,QAAQ,gBACJ,MAAM,gBACN,MAAM,KACrB,MAYF,CAAC;AAUF,eAAO,MAAM,wBAAwB,YAAa,MAAM,UAAU,QAAQ,KAAG,MAgC5E,CAAC;AAEF,eAAO,MAAM,YAAY,YAAa,MAAM,KAAG,OAAsC,CAAC;AACtF,eAAO,MAAM,6BAA6B,YAAa,MAAM,YAAY,QAAQ,KAAG,MAEnF,CAAC;AAKF,eAAO,MAAM,iBAAiB,SAAU,QAAQ,WAAW,WAAW,KAAG,MACF,CAAC;AAExE,eAAO,MAAM,uBAAuB,SAAU,UAAU,WAAW,aAAa,KAAG,MACjD,CAAC;AAEnC,eAAO,MAAM,wBAAwB,aAAc,MAAM,eAAe,MAAM,KAAG,MAC3C,CAAC;AA0CvC,eAAO,MAAM,kBAAkB,aAAc,QAAQ,SAAS,MAAM,KAAG,QAYtE,CAAC;AAEF,eAAO,MAAM,4BAA4B,aArDnB,QAAQ,eAAe,MAAM,KAAG,mBAqDsB,CAAC;AAE7E,eAAO,MAAM,2BAA2B,aAvDlB,QAAQ,eAAe,MAAM,KAAG,mBAuDoB,CAAC;AAE3E,eAAO,MAAM,6BAA6B,aAzDpB,QAAQ,eAAe,MAAM,KAAG,mBAyDwB,CAAC"}
@@ -5,20 +5,12 @@ import { CountryGroupId } from '../../lib';
5
5
  import { BannerTargeting, PageTracking } from '../targeting';
6
6
  import { PurchaseInfoTest } from './shared';
7
7
  export declare enum BannerTemplate {
8
- AusAnniversaryMomentBanner = "AusAnniversaryMomentBanner",
9
8
  ContributionsBanner = "ContributionsBanner",
10
9
  ContributionsBannerWithSignIn = "ContributionsBannerWithSignIn",
11
- GuardianWeeklyBanner = "GuardianWeeklyBanner",
12
10
  EnvironmentBanner = "EnvironmentBanner",
13
- GlobalNewYearBanner = "GlobalNewYearBanner",
14
11
  SignInPromptBanner = "SignInPromptBanner",
15
- UkraineMomentBanner = "UkraineMomentBanner",
16
12
  WorldPressFreedomDayBanner = "WorldPressFreedomDayBanner",
17
- Scotus2023MomentBanner = "Scotus2023MomentBanner",
18
- EuropeMomentLocalLanguageBanner = "EuropeMomentLocalLanguageBanner",
19
- SupporterMomentBanner = "SupporterMomentBanner",
20
- EnvironmentMomentBanner = "EnvironmentMomentBanner",
21
- ChoiceCardsMomentBanner = "ChoiceCardsMomentBanner"
13
+ EuropeMomentLocalLanguageBanner = "EuropeMomentLocalLanguageBanner"
22
14
  }
23
15
  export interface BannerDesignName {
24
16
  designName: string;
@@ -1 +1 @@
1
- {"version":3,"file":"banner.d.ts","sourceRoot":"","sources":["../../../../../../shared/src/types/abTests/banner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC5F,OAAO,EACH,sBAAsB,EACtB,yBAAyB,EACzB,oBAAoB,EACpB,eAAe,EACf,IAAI,EACJ,UAAU,EACV,UAAU,EACV,OAAO,EACV,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAE5C,oBAAY,cAAc;IACtB,0BAA0B,+BAA+B;IACzD,mBAAmB,wBAAwB;IAC3C,6BAA6B,kCAAkC;IAC/D,oBAAoB,yBAAyB;IAC7C,iBAAiB,sBAAsB;IACvC,mBAAmB,wBAAwB;IAC3C,kBAAkB,uBAAuB;IACzC,mBAAmB,wBAAwB;IAC3C,0BAA0B,+BAA+B;IACzD,sBAAsB,2BAA2B;IACjD,+BAA+B,oCAAoC;IACnE,qBAAqB,0BAA0B;IAC/C,uBAAuB,4BAA4B;IACnD,uBAAuB,4BAA4B;CACtD;AAED,MAAM,WAAW,gBAAgB;IAC7B,UAAU,EAAE,MAAM,CAAC;CACtB;AAED,KAAK,QAAQ,GAAG,cAAc,GAAG,gBAAgB,CAAC;AAElD,wBAAgB,UAAU,CAAC,EAAE,EAAE,QAAQ,GAAG,EAAE,IAAI,gBAAgB,CAE/D;AAED,MAAM,WAAW,aAAc,SAAQ,OAAO;IAC1C,IAAI,EAAE,MAAM,CAAC;IACb,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,iBAAiB,EAAE,CAAC,OAAO,CAAC,EAAE,MAAM,KAAK,MAAM,CAAC;IAChD,QAAQ,EAAE,QAAQ,CAAC;IACnB,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,mBAAmB,CAAC,EAAE,aAAa,CAAC;IACpC,aAAa,EAAE,kBAAkB,CAAC;IAClC,QAAQ,CAAC,EAAE,YAAY,EAAE,CAAC;IAC1B,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAClC;AAED,MAAM,MAAM,MAAM,GAAG,CAAC,SAAS,EAAE,eAAe,EAAE,YAAY,EAAE,YAAY,KAAK,OAAO,CAAC;AAEzF,MAAM,MAAM,mBAAmB,GAAG,MAAM,OAAO,CAAC,UAAU,EAAE,CAAC,CAAC;AAE9D,MAAM,WAAW,UAAW,SAAQ,IAAI,CAAC,aAAa,CAAC;IACnD,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,UAAU,CAAC;IACnB,aAAa,EAAE,aAAa,CAAC;IAC7B,WAAW,EAAE,OAAO,CAAC;IACrB,UAAU,EAAE,UAAU,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,aAAa,EAAE,CAAC;IAC1B,SAAS,CAAC,EAAE,cAAc,EAAE,CAAC;IAC7B,sBAAsB,CAAC,EAAE,sBAAsB,CAAC;IAChD,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,yBAAyB,CAAC,EAAE,yBAAyB,CAAC;IACtD,YAAY,CAAC,EAAE,gBAAgB,CAAC;IAChC,gBAAgB,CAAC,EAAE,oBAAoB,CAAC;CAC3C;AAGD,MAAM,WAAW,mBAAmB;IAChC,IAAI,EAAE,UAAU,CAAC;IACjB,OAAO,EAAE,aAAa,CAAC;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,CAAC,EAAE,eAAe,CAAC;CACrC;AAGD,MAAM,MAAM,qBAAqB,GAAG,IAAI,CACpC,aAAa,EACb,mBAAmB,GAAG,eAAe,GAAG,UAAU,CACrD,CAAC;AACF,MAAM,MAAM,kBAAkB,GAAG,IAAI,CAAC,UAAU,EAAE,eAAe,GAAG,aAAa,CAAC,GAAG;IACjF,QAAQ,EAAE,qBAAqB,EAAE,CAAC;CACrC,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,GAAG,kBAAkB,CAAC"}
1
+ {"version":3,"file":"banner.d.ts","sourceRoot":"","sources":["../../../../../../shared/src/types/abTests/banner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC5F,OAAO,EACH,sBAAsB,EACtB,yBAAyB,EACzB,oBAAoB,EACpB,eAAe,EACf,IAAI,EACJ,UAAU,EACV,UAAU,EACV,OAAO,EACV,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAE5C,oBAAY,cAAc;IACtB,mBAAmB,wBAAwB;IAC3C,6BAA6B,kCAAkC;IAC/D,iBAAiB,sBAAsB;IACvC,kBAAkB,uBAAuB;IACzC,0BAA0B,+BAA+B;IACzD,+BAA+B,oCAAoC;CACtE;AAED,MAAM,WAAW,gBAAgB;IAC7B,UAAU,EAAE,MAAM,CAAC;CACtB;AAED,KAAK,QAAQ,GAAG,cAAc,GAAG,gBAAgB,CAAC;AAElD,wBAAgB,UAAU,CAAC,EAAE,EAAE,QAAQ,GAAG,EAAE,IAAI,gBAAgB,CAE/D;AAED,MAAM,WAAW,aAAc,SAAQ,OAAO;IAC1C,IAAI,EAAE,MAAM,CAAC;IACb,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,iBAAiB,EAAE,CAAC,OAAO,CAAC,EAAE,MAAM,KAAK,MAAM,CAAC;IAChD,QAAQ,EAAE,QAAQ,CAAC;IACnB,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,mBAAmB,CAAC,EAAE,aAAa,CAAC;IACpC,aAAa,EAAE,kBAAkB,CAAC;IAClC,QAAQ,CAAC,EAAE,YAAY,EAAE,CAAC;IAC1B,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAClC;AAED,MAAM,MAAM,MAAM,GAAG,CAAC,SAAS,EAAE,eAAe,EAAE,YAAY,EAAE,YAAY,KAAK,OAAO,CAAC;AAEzF,MAAM,MAAM,mBAAmB,GAAG,MAAM,OAAO,CAAC,UAAU,EAAE,CAAC,CAAC;AAE9D,MAAM,WAAW,UAAW,SAAQ,IAAI,CAAC,aAAa,CAAC;IACnD,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,UAAU,CAAC;IACnB,aAAa,EAAE,aAAa,CAAC;IAC7B,WAAW,EAAE,OAAO,CAAC;IACrB,UAAU,EAAE,UAAU,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,aAAa,EAAE,CAAC;IAC1B,SAAS,CAAC,EAAE,cAAc,EAAE,CAAC;IAC7B,sBAAsB,CAAC,EAAE,sBAAsB,CAAC;IAChD,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,yBAAyB,CAAC,EAAE,yBAAyB,CAAC;IACtD,YAAY,CAAC,EAAE,gBAAgB,CAAC;IAChC,gBAAgB,CAAC,EAAE,oBAAoB,CAAC;CAC3C;AAGD,MAAM,WAAW,mBAAmB;IAChC,IAAI,EAAE,UAAU,CAAC;IACjB,OAAO,EAAE,aAAa,CAAC;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,CAAC,EAAE,eAAe,CAAC;CACrC;AAGD,MAAM,MAAM,qBAAqB,GAAG,IAAI,CACpC,aAAa,EACb,mBAAmB,GAAG,eAAe,GAAG,UAAU,CACrD,CAAC;AACF,MAAM,MAAM,kBAAkB,GAAG,IAAI,CAAC,UAAU,EAAE,eAAe,GAAG,aAAa,CAAC,GAAG;IACjF,QAAQ,EAAE,qBAAqB,EAAE,CAAC;CACrC,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,GAAG,kBAAkB,CAAC"}