PageSourceSearch

https://www.fresha.com/assets/_next/static/chunks/38ypqq0rus--5.js

js fresha.com collected 2026-09-24 08:44:29 UTC 51,327 bytes, 6 lines download raw bytes

1;!function(){try { var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&((e._debugIds|| (e._debugIds={}))[n]="058be410-79db-1f81-5a3c-453ab9bce5f9")}catch(e){}}();
2(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,22461,e=>{"use strict";let t,r,n,i,s={lang:void 0,message:void 0,abortEarly:void 0,abortPipeEarly:void 0};function a(e){return e||t?{lang:e?.lang??t?.lang,message:e?.message,abortEarly:e?.abortEarly??t?.abortEarly,abortPipeEarly:e?.abortPipeEarly??t?.abortPipeEarly}:s}function o(e){let t=typeof e;return"string"===t?`"${e}"`:"number"===t||"bigint"===t||"boolean"===t?`${e}`:"object"===t||"function"===t?(e&&Object.getPrototypeOf(e)?.constructor?.name)??"null":t}function u(e,t,s,a,u){var l,c,h,p;let f=u&&"input"in u?u.input:s.value,d=u?.expected??e.expects??null,v=u?.received??o(f),y={kind:e.kind,type:e.type,input:f,expected:d,received:v,message:`Invalid ${t}: ${d?`Expected ${d} but r`:"R"}eceived ${v}`,requirement:e.requirement,path:u?.path,issues:u?.issues,lang:a.lang,abortEarly:a.abortEarly,abortPipeEarly:a.abortPipeEarly},m="schema"===e.kind,g=u?.message??e.message??(l=e.reference,c=y.lang,i?.get(l)?.get(c))??(m?(h=y.lang,n?.get(h)):null)??a.message??(p=y.lang,r?.get(p));void 0!==g&&(y.message="function"==typeof g?g(y):g),m&&(s.typed=!1),s.issues?s.issues.push(y):s.issues=[y]}function l(e,t){return e===t||Number.isNaN(e)&&Number.isNaN(t)}function c(e,t){let r=[...new Set(e)];return r.length>1?`(${r.join(` ${t} `)})`:r[0]??"never"}function h(e){return e["~standard"]={version:1,vendor:"valibot",validate:t=>e["~run"]({value:t},a())},e}let p=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,f={abortEarly:!0};function d(e,t,r){return"function"==typeof e.default?e.default(t,r):e.default}function v(e){let t;if(e)for(let r of e)if(t)for(let e of r.issues)t.push(e);else t=r.issues;return t}e.s(["array",0,function e(t,r){return h({kind:"schema",type:"array",reference:e,expects:"Array",async:!1,item:t,message:r,"~run"(e,t){let r=e.value;if(Array.isArray(r)){e.typed=!0,e.value=[];for(let n=0;n<r.length;n++){let i=r[n],s=this.item["~run"]({value:i},t);if(s.issues){let a={type:"array",origin:"value",input:r,key:n,value:i};for(let t of s.issues)t.path?t.path.unshift(a):t.path=[a],e.issues?.push(t);if(e.issues||(e.issues=s.issues),t.abortEarly){e.typed=!1;break}}s.typed||(e.typed=!1),e.value.push(s.value)}}else u(this,"type",e,t);return e}})},"boolean",0,function e(t){return h({kind:"schema",type:"boolean",reference:e,expects:"boolean",async:!1,message:t,"~run"(e,t){return"boolean"==typeof e.value?e.typed=!0:u(this,"type",e,t),e}})},"check",0,function e(t,r){return{kind:"validation",type:"check",reference:e,async:!1,expects:null,requirement:t,message:r,"~run"(e,t){return e.typed&&!this.requirement(e.value)&&u(this,"input",e,t),e}}},"checkAsync",0,function e(t,r){return{kind:"validation",type:"check",reference:e,async:!0,expects:null,requirement:t,message:r,async "~run"(e,t){return e.typed&&!await this.requirement(e.value)&&u(this,"input",e,t),e}}},"date",0,function e(t){return h({kind:"schema",type:"date",reference:e,expects:"Date",async:!1,message:t,"~run"(e,t){return e.value instanceof Date?isNaN(e.value)?u(this,"type",e,t,{received:'"Invalid Date"'}):e.typed=!0:u(this,"type",e,t),e}})},"enum_",0,function e(t,r){let n=[];for(let e in t)`${+e}`===e&&"string"==typeof t[e]&&Object.is(t[t[e]],+e)||n.push(t[e]);return h({kind:"schema",type:"enum",reference:e,expects:c(n.map(o),"|"),async:!1,enum:t,options:n,message:r,"~run"(e,t){return this.options.includes(e.value)?e.typed=!0:u(this,"type",e,t),e}})},"finite",0,function e(t){return{kind:"validation",type:"finite",reference:e,async:!1,expects:null,requirement:Number.isFinite,message:t,"~run"(e,t){return e.typed&&!this.requirement(e.value)&&u(this,"finite",e,t),e}}},"forward",0,function(e,t){return{...e,"~run"(r,n){let i=r.issues&&[...r.issues];if((r=e["~run"](r,n)).issues){for(let e of r.issues)if(!i?.includes(e)){let n=r.value;for(let r of t){let t=n[r],i={type:"unknown",origin:"value",input:n,key:r,value:t};if(e.path?e.path.push(i):e.path=[i],!t)break;n=t}}}return r}}},"forwardAsync",0,function(e,t){return{...e,async:!0,async "~run"(r,n){let i=r.issues&&[...r.issues];if((r=await e["~run"](r,n)).issues){for(let e of r.issues)if(!i?.includes(e)){let n=r.value;for(let r of t){let t=n[r],i={type:"unknown",origin:"value",input:n,key:r,value:t};if(e.path?e.path.push(i):e.path=[i],!t)break;n=t}}}return r}}},"intersect",0,function e(t,r){return h({kind:"schema",type:"intersect",reference:e,expects:c(t.map(e=>e.expects),"&"),async:!1,options:t,message:r,"~run"(e,t){if(this.options.length){let r,n=e.value;for(let i of(e.typed=!0,this.options)){let s=i["~run"]({value:n},t);if(s.issues){if(e.issues)for(let t of s.issues)e.issues.push(t);else e.issues=s.issues;if(t.abortEarly){e.typed=!1;break}}s.typed||(e.typed=!1),e.typed&&(r?r.push(s.value):r=[s.value])}if(e.typed){e.value=r[0];for(let n=1;n<r.length;n++){let i=function e(t,r){if(typeof t==typeof r){if(l(t,r)||t instanceof Date&&r instanceof Date&&l(+t,+r))return{value:t};if(t&&r&&t.constructor===Object&&r.constructor===Object){let n={...t,...r};for(let i in r)if(Object.prototype.hasOwnProperty.call(t,i)&&Object.prototype.hasOwnProperty.call(r,i)){let s=e(t[i],r[i]);if(s.issue)return s;n[i]=s.value}return{value:n}}if(Array.isArray(t)&&Array.isArray(r)&&t.length===r.length){let n=[...t];for(let i=0;i<t.length;i++){let s=e(t[i],r[i]);if(s.issue)return s;n[i]=s.value}return{value:n}}}return{issue:!0}}(e.value,r[n]);if(i.issue){u(this,"type",e,t,{received:"unknown"});break}e.value=i.value}}}else u(this,"type",e,t);return e}})},"lazy",0,function e(t){return h({kind:"schema",type:"lazy",reference:e,expects:"unknown",async:!1,getter:t,"~run"(e,t){return this.getter(e.value)["~run"](e,t)}})}
2,"length",0,function e(t,r){return{kind:"validation",type:"length",reference:e,async:!1,expects:`${t}`,requirement:t,message:r,"~run"(e,t){return e.typed&&e.value.length!==this.requirement&&u(this,"length",e,t,{received:`${e.value.length}`}),e}}},"literal",0,function e(t,r){return h({kind:"schema",type:"literal",reference:e,expects:o(t),async:!1,literal:t,message:r,"~run"(e,t){return l(e.value,this.literal)?e.typed=!0:u(this,"type",e,t),e}})},"maxLength",0,function e(t,r){return{kind:"validation",type:"max_length",reference:e,async:!1,expects:`<=${t}`,requirement:t,message:r,"~run"(e,t){return e.typed&&e.value.length>this.requirement&&u(this,"length",e,t,{received:`${e.value.length}`}),e}}},"maxValue",0,function e(t,r){return{kind:"validation",type:"max_value",reference:e,async:!1,expects:`<=${t instanceof Date?t.toJSON():o(t)}`,requirement:t,message:r,"~run"(e,t){return e.typed&&!(e.value<=this.requirement)&&u(this,"value",e,t,{received:e.value instanceof Date?e.value.toJSON():o(e.value)}),e}}},"minLength",0,function e(t,r){return{kind:"validation",type:"min_length",reference:e,async:!1,expects:`>=${t}`,requirement:t,message:r,"~run"(e,t){return e.typed&&e.value.length<this.requirement&&u(this,"length",e,t,{received:`${e.value.length}`}),e}}},"minValue",0,function e(t,r){return{kind:"validation",type:"min_value",reference:e,async:!1,expects:`>=${t instanceof Date?t.toJSON():o(t)}`,requirement:t,message:r,"~run"(e,t){return e.typed&&!(e.value>=this.requirement)&&u(this,"value",e,t,{received:e.value instanceof Date?e.value.toJSON():o(e.value)}),e}}},"null",0,function e(t){return h({kind:"schema",type:"null",reference:e,expects:"null",async:!1,message:t,"~run"(e,t){return null===e.value?e.typed=!0:u(this,"type",e,t),e}})},"number",0,function e(t){return h({kind:"schema",type:"number",reference:e,expects:"number",async:!1,message:t,"~run"(e,t){return"number"!=typeof e.value||isNaN(e.value)?u(this,"type",e,t):e.typed=!0,e}})},"object",0,function e(t,r){return h({kind:"schema",type:"object",reference:e,expects:"Object",async:!1,entries:t,message:r,"~run"(e,t){let r=e.value;if(r&&"object"==typeof r)for(let n in e.typed=!0,e.value={},this.entries){let i=this.entries[n];if(n in r||("exact_optional"===i.type||"optional"===i.type||"nullish"===i.type)&&void 0!==i.default){let s=n in r?r[n]:d(i),a=i["~run"]({value:s},t);if(a.issues){let i={type:"object",origin:"value",input:r,key:n,value:s};for(let t of a.issues)t.path?t.path.unshift(i):t.path=[i],e.issues?.push(t);if(e.issues||(e.issues=a.issues),t.abortEarly){e.typed=!1;break}}a.typed||(e.typed=!1),e.value[n]=a.value}else if(void 0!==i.fallback)e.value[n]="function"==typeof i.fallback?i.fallback(void 0,void 0):i.fallback;else if("exact_optional"!==i.type&&"optional"!==i.type&&"nullish"!==i.type&&(u(this,"key",e,t,{input:void 0,expected:`"${n}"`,path:[{type:"object",origin:"key",input:r,key:n,value:r[n]}]}),t.abortEarly))break}else u(this,"type",e,t);return e}})},"optional",0,function e(t,r){return h({kind:"schema",type:"optional",reference:e,expects:`(${t.expects} | undefined)`,async:!1,wrapped:t,default:r,"~run"(e,t){return void 0===e.value&&(void 0!==this.default&&(e.value=d(this,e,t)),void 0===e.value)?(e.typed=!0,e):this.wrapped["~run"](e,t)}})},"pipe",0,function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return h({...t[0],pipe:t,"~run"(e,r){for(let n of t)if("metadata"!==n.kind){if(e.issues&&("schema"===n.kind||"transformation"===n.kind)){e.typed=!1;break}e.issues&&(r.abortEarly||r.abortPipeEarly)||(e=n["~run"](e,r))}return e}})},"pipeAsync",0,function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return h({...t[0],pipe:t,async:!0,async "~run"(e,r){for(let n of t)if("metadata"!==n.kind){if(e.issues&&("schema"===n.kind||"transformation"===n.kind)){e.typed=!1;break}e.issues&&(r.abortEarly||r.abortPipeEarly)||(e=await n["~run"](e,r))}return e}})},"rawTransform",0,function e(t){return{kind:"transformation",type:"raw_transform",reference:e,async:!1,"~run"(e,r){let n=t({dataset:e,config:r,addIssue:t=>u(this,t?.label??"input",e,r,t),NEVER:null});return e.issues?e.typed=!1:e.value=n,e}}},"record",0,function e(t,r,n){return h({kind:"schema",type:"record",reference:e,expects:"Object",async:!1,key:t,value:r,message:n,"~run"(e,t){let r=e.value;if(r&&"object"==typeof r){for(let n in e.typed=!0,e.value={},r)if(Object.prototype.hasOwnProperty.call(r,n)&&"__proto__"!==n&&"prototype"!==n&&"constructor"!==n){let i=r[n],s=this.key["~run"]({value:n},t);
2if(s.issues){let a={type:"object",origin:"key",input:r,key:n,value:i};for(let t of s.issues)t.path=[a],e.issues?.push(t);if(e.issues||(e.issues=s.issues),t.abortEarly){e.typed=!1;break}}let a=this.value["~run"]({value:i},t);if(a.issues){let s={type:"object",origin:"value",input:r,key:n,value:i};for(let t of a.issues)t.path?t.path.unshift(s):t.path=[s],e.issues?.push(t);if(e.issues||(e.issues=a.issues),t.abortEarly){e.typed=!1;break}}s.typed&&a.typed||(e.typed=!1),s.typed&&(e.value[s.value]=a.value)}}else u(this,"type",e,t);return e}})},"rfcEmail",0,function e(t){return{kind:"validation",type:"rfc_email",reference:e,expects:null,async:!1,requirement:p,message:t,"~run"(e,t){return e.typed&&!this.requirement.test(e.value)&&u(this,"email",e,t),e}}},"safeParse",0,function(e,t,r){let n=e["~run"]({value:t},a(r));return{typed:n.typed,success:!n.issues,output:n.value,issues:n.issues}},"string",0,function e(t){return h({kind:"schema",type:"string",reference:e,expects:"string",async:!1,message:t,"~run"(e,t){return"string"==typeof e.value?e.typed=!0:u(this,"type",e,t),e}})},"summarize",0,function(e){let t="";for(let r of e){t&&(t+="\n"),t+=`\xd7 ${r.message}`;let e=function(e){if(e.path){let t="";for(let r of e.path)if("string"!=typeof r.key&&"number"!=typeof r.key)return null;else t?t+=`.${r.key}`:t+=r.key;return t}return null}(r);e&&(t+=`
3  → at ${e}`)}return t},"transform",0,function e(t){return{kind:"transformation",type:"transform",reference:e,async:!1,operation:t,"~run"(e){return e.value=this.operation(e.value),e}}},"union",0,function e(t,r){return h({kind:"schema",type:"union",reference:e,expects:c(t.map(e=>e.expects),"|"),async:!1,options:t,message:r,"~run"(e,t){let r,n,i;for(let s of this.options){let a=s["~run"]({value:e.value},t);if(a.typed)if(a.issues)n?n.push(a):n=[a];else{r=a;break}else i?i.push(a):i=[a]}if(r)return r;if(n){if(1===n.length)return n[0];u(this,"type",e,t,{issues:v(n)}),e.typed=!0}else{if(i?.length===1)return i[0];u(this,"type",e,t,{issues:v(i)})}return e}})},"unknown",0,function e(){return h({kind:"schema",type:"unknown",reference:e,expects:"unknown",async:!1,"~run":e=>(e.typed=!0,e)})},"variant",0,function e(t,r,n){return h({kind:"schema",type:"variant",reference:e,expects:"Object",async:!1,key:t,options:r,message:n,"~run"(e,t){let r=e.value;if(r&&"object"==typeof r){let n,i=0,s=this.key,a=[],o=(e,u)=>{for(let l of e.options){if("variant"===l.type)o(l,new Set(u).add(l.key));else{let e=!0,o=0;for(let t of u){let n=l.entries[t];if(t in r?n["~run"]({typed:!1,value:r[t]},f).issues:"exact_optional"!==n.type&&"optional"!==n.type&&"nullish"!==n.type){e=!1,s!==t&&(i<o||i===o&&t in r&&!(s in r))&&(i=o,s=t,a=[]),s===t&&a.push(l.entries[t].expects);break}o++}if(e){let e=l["~run"]({value:r},t);n&&(n.typed||!e.typed)||(n=e)}}if(n&&!n.issues)break}};if(o(this,new Set([this.key])),n)return n;u(this,"type",e,t,{input:r[s],expected:c(a,"|"),path:[{type:"object",origin:"value",input:r,key:s,value:r[s]}]})}else u(this,"type",e,t);return e}})}])},925500,e=>{"use strict";var t=e.i(112634);e.i(111211);var r=e.i(596091);let n=new Map,i=new class{queue=[];batchTimeout=null;BATCH_DELAY_MS=1e3;processImpression(e,t){this.queue.push({name:e,variant:t}),r.ampli.isLoaded&&r.ampli.client&&this.scheduleBatchFlush()}scheduleBatchFlush(){this.batchTimeout&&clearTimeout(this.batchTimeout),this.batchTimeout=setTimeout(()=>{this.flush(),this.batchTimeout=null},this.BATCH_DELAY_MS)}async flush(){if(!r.ampli.isLoaded||!r.ampli.client||0===this.queue.length)return;let{Identify:t}=await e.A(769883),n=[...this.queue];this.queue.length=0;let i=new Map;for(let{name:e,variant:t}of n)("enabled"===t||"disabled"===t)&&(i.has(t)||i.set(t,new Set),i.get(t).add(e));if(0===i.size)return;let s=i.get("enabled"),a=i.get("disabled");if(a?.size){let e=new t;e.remove("feature_flags_enabled",[...a]),e.preInsert("feature_flags_disabled",[...a]),r.ampli.client.identify(e)}if(s?.size){let e=new t;e.preInsert("feature_flags_enabled",[...s]),e.remove("feature_flags_disabled",[...s]),r.ampli.client.identify(e)}}clear(){this.queue.length=0,this.batchTimeout&&(clearTimeout(this.batchTimeout),this.batchTimeout=null)}};e.s(["amplitudeIdentifyQueue",0,i,"onImpression",0,(e,r)=>{n.get(e)!==r&&(n.set(e,r),i.processImpression(e,r),(0,t.withRum)(t=>t.addFeatureFlagEvaluation(e,r)))}],925500)},679753,999361,e=>{"use strict";let t,r=e=>{let t=e.replace(/^https?:\/\//,"").split(":")[0].split(".");return t.length>1?`${t[t.length-2]}.${t[t.length-1]}`:t[0]};e.s(["getCookieDomain",0,r],999361);var n=e.i(19145);let i="u">typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);var s=e.i(328842),a=e.i(71646);let o="fdid";{let e=n.cookieStore.get(o);e?t=e:(t=function(){if(i&&1)return i();var e=void 0,t=void 0,r=void 0;let n=(e=e||{}).random??e.rng?.()??(0,s.default)();if(n.length<16)throw Error("Random bytes length must be >= 16");if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){if((r=r||0)<0||r+16>t.length)throw RangeError(`UUID byte range ${r}:${r+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[r+e]=n[e];return t}return(0,a.unsafeStringify)(n)}(),n.cookieStore.set(o,t,{expires:365,domain:r(window.location.host)}))}e.s(["default",0,function(){return t}],679753)},490146,e=>{"use strict";let t=new Map([["B2C_ANDROID_HYBRID_AUTOCOMPLETE",!0],["B2C_ANDROID_RECOMMENDED_EMPLOYEES_ENABLED",!0],["B2C_ANDROID_SEARCH_AVAILABILITY_M1",!0],["B2C_ANDROID_SEARCH_NEW_TAXONOMY",!0],["B2C_APPOINTMENTS_PURCHASE_ORDERS",!0],["B2C_GATEWAY_AUTOCOMPLETE_INCLUDE_LOCAL",!0],["B2C_GATEWAY_AUTOCOMPLETE_NEIGHBOR_EXPANSION",!1],["B2C_GATEWAY_AUTOCOMPLETE_SOVEREIGN_EXPANSION",!1],["B2C_GATEWAY_BOOKING_FLOW_TIME_DEFAULT_FIRST_AVAILABLE",!0],["B2C_IOS_AVAILABILITY_IN_SEARCH",!0],["B2C_IOS_BOOKING_TIME_AUTOSCROLL",!0],["B2C_IOS_HYBRID_AUTOCOMPLETE",!0],["B2C_IOS_PROFESSIONAL_PROFILES_SEARCH",!0],["B2C_IOS_RECOMMENDED_EMPLOYEES_ENABLED",!0],["B2C_IOS_SEARCH_FULL_TEXT",!0],["B2C_IOS_SEARCH_GOOGLE_PLACES_SESSION_TOKEN",!0],["B2C_IOS_SEARCH_NEW_TAXONOMY",!0],["B2C_IOS_SEARCH_PROFESSIONAL_DEAL_PRICE",!0],["B2C_IOS_SEARCH_SPLIT_LIST_MAP_QUERIES",!0],["B2C_IOS_SEARCH_UNIFIED_INDEX",!0],["B2C_POSTHOG",!0],["B2C_WEB_AUTH_REVAMP_M1",!0],["B2C_WEB_AUTH_REVAMP_PHONE_OTP_AND_CLAIM",!0]]);e.s(["unleashExperiments",0,t])},388369,204723,587875,705524,e=>{"use strict";let t,r;var n=e.i(925500),i=e.i(602247),s=e.i(490146),a=e.i(153292),o=e.i(687652),u=e.i(418374),l=e.i(674749),c=e.i(22461);let h=(0,c.lazy)(()=>(0,c.union)([(0,c.string)(),(0,c.pipe)((0,c.number)(),(0,c.finite)()),(0,c.boolean)(),(0,c.null)(),(0,c.array)(h),(0,c.record)((0,c.str
3ing)(),h)])),p=(0,c.pipe)((0,c.string)(),(0,c.rawTransform)(e=>{let{dataset:t,addIssue:r,NEVER:n}=e;try{return JSON.parse(t.value)}catch{return r({message:"Invalid JSON"}),n}}),(0,c.record)((0,c.string)(),h)),f=(0,c.pipe)((0,c.variant)("type",[(0,c.object)({type:(0,c.literal)("string"),value:(0,c.string)()}),(0,c.object)({type:(0,c.literal)("number"),value:(0,c.pipe)((0,c.string)(),(0,c.transform)(Number),(0,c.number)(),(0,c.finite)())}),(0,c.object)({type:(0,c.literal)("json"),value:p})]),(0,c.transform)(e=>e.value)),d=(r=(t=()=>{let e=new Map,t=t=>{if(t){let r=e.get(t);if(r)for(let e of r)e()}else for(let t of e.values())for(let e of t)e()},r=!1,n=null;a.default?(a.default.once("ready",()=>{r=!0,t()}),a.default.on("error",()=>{r=!0,n=Error("Unleash error"),t()}),a.default.on("recovered",()=>{n=null,r=!0,t()})):r=!0,window.addEventListener("storage",e=>{let{key:r}=e;if(r?.startsWith("feature$$")){let e=r.match(/^feature\$\$([\w_]+)$/)?.[1];e&&t(e)}else if(r?.startsWith("feature-variant$$")){let e=r.match(/^feature-variant\$\$([\w_]+)$/)?.[1];e&&t(e)}});let i=new Map,s=new Map;return{snapshot(e){try{let t=localStorage.getItem(`feature$$${e}`);if(null!=t)return"1"===t}catch{}return r?!!a.default&&!n&&(a.default.isEnabled(e)??null):null},variantSnapshot(e){let t;try{t=(0,l.INTERNAL_getFeatureVariantOverride)(e)??void 0}catch{}try{let r=localStorage.getItem(`feature$$${e}`);if(null!=r){if("1"!==r)return null;let n={name:t?"variant-override":"override",enabled:!0,feature_enabled:!0,...t?{payload:t}:{}},i=`${n.name}|true|${t?.type??""}|${t?.value??""}`,a=s.get(e);if(a&&a.key===i)return a.value;return s.set(e,{key:i,value:n}),n}}catch{}if(!r||!a.default||n)return null;let i=a.default.getVariant(e);if(!i)return null;let o=t&&i.enabled?{...i,name:"variant-override",payload:t}:i,u=`${o.name}|${o.enabled}|${o.payload?.type??""}|${o.payload?.value??""}`,c=s.get(e);return c&&c.key===u?c.value:(s.set(e,{key:u,value:o}),o)},subscribe(t){if(i.has(t))return i.get(t);let r=r=>(e.has(t)||e.set(t,new Set),e.get(t).add(r),()=>e.get(t).delete(r));return i.set(t,r),r}}})(),{get store(){return r},reset(){r=t()}});function v(e){let t=(0,o.useSyncExternalStore)(d.store.subscribe(e),()=>d.store.snapshot(e),()=>null);return(0,o.useEffect)(()=>{null!==t&&s.unleashExperiments.has(e)&&(0,n.onImpression)(e,t?"enabled":"disabled")},[e,t]),t}e.s(["useUnleash",0,v,"useUnleashVariant",0,function(e,t){let r=(0,o.useSyncExternalStore)(d.store.subscribe(e),()=>d.store.variantSnapshot(e),()=>null),n=v(e);return(0,o.useMemo)(()=>{if(!t)return r;if(!0!==n)return null;let i={};if(r?.enabled&&r.payload){let t=(0,c.safeParse)(f,r.payload);t.success?i=t.output:console.warn(`[lib-unleash] Invalid unleash variant payload for "${e}": ${(0,c.summarize)(t.issues)}`)}let s=(0,c.safeParse)(t,i);if(s.success)return s.output;console.warn(`[lib-unleash] Variant payload did not match schema for "${e}": ${(0,c.summarize)(s.issues)}`);let a=(0,c.safeParse)(t,{});return a.success?a.output:null},[n,r,e,t])}],204723);let y=["B2C_WEB_ACTIVITY_FEED_LINKED_UPCOMING","B2C_WEB_AUTH_REVAMP_RECYCLED_NUMBER_CLAIM","B2C_WEB_BOOKING_FLOW_BOOK_AGAIN","B2C_WEB_ERA_PARTNER_SPECIFIC_CONSENT","B2C_WEB_MARKETPLACE_TRACKING_ANALYTICAL_ENABLED","B2C_WEB_MARKETPLACE_TRACKING_USER_LOCATION_ENABLED","B2C_WEB_PIRATES_RESCHEDULE_TEAM_MEMBER_GENDER","B2C_WEB_WORMS_PARTNER_PIXEL_FBQ","B2C_WEB_XD_BLIK_PAYMENT_METHOD","B2C_WEB_XD_CKO_FLOW_TOKENIZE","B2C_WEB_XD_TWINT_PAYMENT_METHOD","B2C_WEB_ZEN_VENUE_INSTAGRAM_FEED","B2C_WEB_HISTORY_ENTRY_NAVIGATE_BACK","B2C_WEB_XD_AFTERPAY_PAYMENT_METHOD","B2C_WEB_MEMBERSHIPS_ENABLED","B2C_WEB_PACKAGE_GIFTING","B2C_WEB_SPIRIT_CHANGE_CARD_ACTION","B2C_WEB_XD_CKO_TOKENIZE_IN_APP_CONFIRM","B2C_WEB_XD_CKO_TOKENIZE_BOOKING_FLOW","B2C_WEB_ZEN_REVIEW_SEARCH_HIGHLIGHT","B2C_WEB_HORIZON_CONSULTATION_FORMS_ENABLED","B2C_WEB_AUTH_REVAMP_ACCOUNT_SELECTION","B2C_WEB_AUTH_REVAMP_SOCIAL_LOGIN","B2C_WEB_STAFF_LOG_FLOW_STEPS","B2C_WEB_WORMS_VENUE_PROFILE_FAQ","B2C_WEB_WORMS_PROVIDER_GOOGLE_ADS","B2C_WEB_STAFF_LOG_CLIENT_ERRORS","B2C_WEB_SEARCH_CLUSTER_VIEWPORT_OVERSCAN","B2C_WEB_ZEN_ONLINE_REPUTATION_MANAGEMENT_M3_1","B2C_WEB_PROFILE_VERIFICATION","B2C_WEB_XD_BOOKING_FLOW_CWC_APPLE_PAY","B2C_WEB_GOOGLE_RATING_BOOST_REVAMP_M1","B2C_WEB_PACKAGES_PURCHASE","B2C_WEB_MARKETPLACE_TRACKING_SDK","B2C_WEB_XD_KLARNA_PAYMENT_METHOD","B2C_WEB_BOOKING_FLOW_UI_ELEMENT_BUTTON","B2C_WEB_AUTH_REVAMP_PHONE_OTP_AND_CLAIM","B2C_WEB_DISABLE_PERSISTED_OPERATIONS","B2C_WEB_SEARCH_DISTANCE_FROM","B2C_WEB_SEARCH_RADIUS_OVERSCAN","B2C_WEB_HOMEPAGE_SEARCH_SUGGESTIONS","B2C_WEB_CUSTOMER_CONNECT","B2C_WEB_AUTH_REVAMP_M1","B2C_WEB_SEARCH_CLUSTERS_VENUES","B2C_WEB_ACTIVITY_FEED","B2C_WEB_BOOKING_NOTES_DISABLED","B2C_WEB_ENABLE_TEST_LANGUAGES"],m=new Set(y),g=[...y,...["B2C_WEB_SEARCH_MAP_DEBUG","B2C_WEB_SEARCH_DEBUG","B2C_WEB_BOOKING_SERVICE_SEARCH","B2C_WEB_SEARCH_AVAILABILITY_DISPLAYED_VIEWPORT","B2C_WEB_XD_BLIK_PAYMENT_METHOD","B2C_WEB_MARKETPLACE_TRACKING_USER_LOCATION_ENABLED"].filter(e=>!m.has(e))];async function _(e){await a.unleashReady;let t=(0,l.INTERNAL_getFeatureIsEnabled)(e);return s.unleashExperiments.has(e)&&(0,n.onImpression)(e,t?"enabled":"disabled"),t}async function E(){return a.default?.getContext()}async function b(){if(a.default)try{let e=Object.entries((0,l.INTERNAL_readOverrideIndex)()).map(e=>{let[t,r]=e;return{name:t,isEnabled:r}});return e.length?e:void 0}catch(e){(0,i.trackWarning)(e,{},{source:"Unleash"});return}}e.s(["features",0,g],587875),e.s(["setFeatureOverride",0,function(e,t){try{null!=t?localStorage.setItem(`feature$$${e}`,t?"1":"0"):localStorage.removeItem(`feature$$${e}`),(0,l.INTERNAL_writeOverrideIndex)(e,t)}catch(e){(0,i.trackWarning)(e,{},{source:"Unleash"})}},"setFeatureVariantOverride",0,function(e,t){try{null!=t?localStorage.setItem(`feature-variant$$${e}`,JSON.stringify(t)):localStorage.removeItem(`feature-variant$$${e}`)}catch(e){(0,i.trackWarning)(e,{},{source:"Unleash"})}}],705524),e.s(["getFeatureContext",0,E,"getFeatureIsEnabled",0,_,"getFeatureOverrides",0,b,"useFeatureIsEnabled",0,function(e){return v(e)},"useFeatureIsEnabledLazy",0,function(e){let t=(0,u.useIsSSR)(),r=(0,o.useRef)(e),n=(0,o.useMemo)(()=>t?null:(0,l.INTERNAL_getFeatureIsEnabled)(r.current)??null,[t]),[i,s]=(0,o.useState)(n);return(0,o.useEffect)(()=>{_(r.current).then(e=>{s(e)})},[]),(0,o.useEffect)(()=>{},[e]),i}],388369)},674749,e=>{"use strict";var t=e.i(153292);function r(e){try{let t=localStorage.getItem(`feature$$${e}`);if(t)return"1"===t}catch{}return null}let n="unleashOverrideIndex",i="feature$$";function s(){let e=localStorage.getItem(n);if(e){let t=JSON.parse(e);return t&&"object"==typeof t?t:{}}let t={};for(let e=0;e<localStorage.length;e++){let n=localStorage.key(e);if(!n?.startsWith(i))continue;let s=n.slice(i.length),a=r(s);null!==a&&(t[s]=a)}return localStorage.setItem(n,JSON.stringify(t)),t}e.s(["INTERNAL_clearOverrideIndex",0,function(){localStorage.setItem(n,JSON.stringify({}))},"INTERNAL_getFeatureIsEnabled",0,function(e){try{let t=localStorage.getItem(`feature$$${e}`);if(t)return"1"===t}catch{}return t.default?.isEnabled(e)??!1},"INTERNAL_getFeatureOverride",0,r,"INTERNAL_getFeatureVariantOverride",0,function(e){try{let t=localStorage.getItem(`feature-variant$$${e}`);if(!t)return null;let r=JSON.parse(t);if(r&&"object"==typeof r&&("string"===r.type||"number"===r.type||"json"===r.type)&&"string"==typeof r.value)return r}catch{}return null},"INTERNAL_getUpstreamVariant",0,function(e){return t.default?t.default.getVariant(e)??null:null},"INTERNAL_readOverrideIndex",0,s,"INTERNAL_writeOverrideIndex",0,function(e,t){let r=s();null==t?delete r[e]:r[e]=t,localStorage.setItem(n,JSON.stringify(r))}])},153292,e=>{"use strict";let t;var r=e.i(464279),n=e.i(679753),i=function(e,t){return(i=Object.
3setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)};function s(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var a=function(){return(a=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function o(e,t,r,n){return new(r||(r=Promise))(function(i,s){function a(e){try{u(n.next(e))}catch(e){s(e)}}function o(e){try{u(n.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?i(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(a,o)}u((n=n.apply(e,t||[])).next())})}function u(e,t){var r,n,i,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=o(0),a.throw=o(1),a.return=o(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){var l=[o,u];if(r)throw TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(s=0)),s;)try{if(r=1,n&&(i=2&l[0]?n.return:l[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,l[1])).done)return i;switch(n=0,i&&(l=[2&l[0],i.value]),l[0]){case 0:case 1:i=l;break;case 4:return s.label++,{value:l[1],done:!1};case 5:s.label++,n=l[1],l=[0];continue;case 7:l=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===l[0]||2===l[0])){s=0;continue}if(3===l[0]&&(!i||l[1]>i[0]&&l[1]<i[3])){s.label=l[1];break}if(6===l[0]&&s.label<i[1]){s.label=i[1],i=l;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(l);break}i[2]&&s.ops.pop(),s.trys.pop();continue}l=t.call(e,s)}catch(e){l=[6,e],n=0}finally{r=i=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}}function l(e,t,r){if(r||2==arguments.length)for(var n,i=0,s=t.length;i<s;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))}"function"==typeof SuppressedError&&SuppressedError;var c={exports:{}};function h(){}h.prototype={on:function(e,t,r){var n=this.e||(this.e={});return(n[e]||(n[e]=[])).push({fn:t,ctx:r}),this},once:function(e,t,r){var n=this;function i(){n.off(e,i),t.apply(r,arguments)}return i._=t,this.on(e,i,r)},emit:function(e){for(var t=[].slice.call(arguments,1),r=((this.e||(this.e={}))[e]||[]).slice(),n=0,i=r.length;n<i;n++)r[n].fn.apply(r[n].ctx,t);return this},off:function(e,t){var r=this.e||(this.e={}),n=r[e],i=[];if(n&&t)for(var s=0,a=n.length;s<a;s++)n[s].fn!==t&&n[s].fn._!==t&&i.push(n[s]);return i.length?r[e]=i:delete r[e],this}},c.exports=h;var p=c.exports.TinyEmitter=h,f=function(e){return null!=e[1]},d=function(e){var t=e.properties,r=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)0>t.indexOf(n[i])&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r}(e,["properties"]),n=function(e){return Object.entries(e).sort(function(e,t){var r=e[0],n=t[0];return r.localeCompare(n,void 0)})};return JSON.stringify([n(r),n(void 0===t?{}:t)])},v=function(e){return o(void 0,void 0,void 0,function(){var t;return u(this,function(r){var n;switch(r.label){case 0:t=d(e),r.label=1;case 1:return r.trys.push([1,3,,4]),[4,(n=t,o(void 0,void 0,void 0,function(){var e,t,r,i;return u(this,function(s){switch(s.label){case 0:if(e="u">typeof globalThis&&(null==(r=globalThis.crypto)?void 0:r.subtle)?null==(i=globalThis.crypto)?void 0:i.subtle:void 0,"u"<typeof TextEncoder||!(null==e?void 0:e.digest)||"u"<typeof Uint8Array)throw Error("Hashing function not available");return t=(new TextEncoder).encode(n),[4,e.digest("SHA-256",t)];case 1:return[2,Array.from(new Uint8Array(s.sent())).map(function(e){return e.toString(16).padStart(2,"0")}).join("")]}})}))];case 2:return[2,r.sent()];case 3:return r.sent(),[2,t];case 4:return[2]}})})},y=function(e){var t,r=e.clientKey,n=e.appName,i=e.connectionId,s=e.customHeaders,a=e.headerName,o=e.etag,u=e.isPost,l=((t={accept:"application/json"})[(void 0===a?"authorization":a).toLocaleLowerCase()]=r,t["unleash-sdk"]="unleash-js-sdk:3.8.0",t["unleash-appname"]=n,t);return u&&(l["content-type"]="application/json"),o&&(l["if-none-match"]=o),Object.entries(s||{}).filter(f).forEach(function(e){var t=e[0],r=e[1];return l[t.toLocaleLowerCase()]=r}),l["unleash-connection-id"]=i,l},m=function(){},g=function(){function e(e){var t=e.onError,r=e.onSent,n=e.appName,i=e.metricsInterval,s=e.disableMetrics,a=e.url,o=e.clientKey,u=e.fetch,l=e.headerName,c=e.customHeaders,h=e.metricsIntervalInitial,p=e.connectionId,f=e.metricRegistry;this.onError=t,this.onSent=r||m,this.disabled=void 0!==s&&s,this.metricsInterval=1e3*i,this.metricsIntervalInitial=1e3*h,this.appName=n,this.url=a instanceof URL?a:new URL(a),this.clientKey=o,this.bucket=this.createEmptyBucket(),this.fetch=u,this.headerName=l,this.customHeaders=void 0===c?{}:c,this.connectionId=p,this.metricRegistry=f}return e.prototype.start=function(){var e=this;if(this.disabled)return!1;this.setupMetricsFlushOnPageUnload(),"number"==typeof this.metricsInterval&&this.metricsInterval>0&&(this.metricsIntervalInitial>0?setTimeout(function(){e.startTimer(),e.sendMetrics()},this.metricsIntervalInitial):this.startTimer())},e.prototype.stop=function(){this.timer&&(clearInterval(this.timer),delete this.timer),this.removeMetricsFlushOnPageUnload()},e.prototype.createEmptyBucket=function(){return{start:new Date,stop:null,toggles:{}}},e.prototype.getHeaders=function(){return y({clientKey:this.clientKey,appName:this.appName,connectionId:this.connectionId,customHeaders:this.customHeaders,headerName:this.headerName,isPost:!0})},e.prototype.sendMetrics=function(){return o(this,arguments,void 0,function(e){var t,r,n,i=(void 0===e?{}:e).fireAndForget,s=void 0!==i&&i;return u(this,function(e){switch(e.label){case 0:if(t="".concat(this.url,"/client/metrics"),r=this.getPayload(),this.bucketIsEmpty(r)&&(!r.impactMetrics||0===r.impactMetrics.length))return[2];e.label=1;case 1:return e.trys.push([1,3,,4]),[4,this.fetch(t,{cache:"no-cache",method:"POST",headers:this.getHeaders(),body:JSON.stringify(r),keepalive:s})];case 2:return e.sent(),this.onSent(r),[3,4];case 3:return console.error("Unleash: unable to send feature metrics",n=e.sent()),this.onError(n),[3,4];case 4:return[2]}})})},e.prototype.count=function(e,t){return!(this.disabled||!this.bucket)&&(this.assertBucket(e),this.bucket.toggles[e][t?"yes":"no"]++,!0)},e.prototype.countVariant=function(e,t){return!(this.disabled||!this.bucket)&&(this.assertBucket(e),this.bucket.toggles[e].variants[t]?this.bucket.toggles[e].variants[t]+=1:this.bucket.toggles[e].variants[t]=1,!0)},e.prototype.assertBucket=function(e){if(this.disabled||!this.bucket)return!1;this.bucket.toggles[e]||(this.bucket.toggles[e]={yes:0,no:0,variants:{}})},e.prototype.startTimer=function(){var e=this;this.timer=setInterval(function(){e.sendMetrics()},this.metricsInterval)},e.prototype.bucketIsEmpty=function(e){return 0===Object.keys(e.bucket.toggles).length},e.prototype.getPayload=function(){var e,t=a(a({},this.bucket),{stop:new Date});this.bucket=this.createEmptyBucket();var r={bucket:t,appName:this.appName,instanceId:"browser"};return r.impactMetrics=(null==(e=this.metricRegistry)?void 0:e.collect())||[],r},e.prototype.setupMetricsFlushOnPageUnload=function(){var e=this;"u"<typeof document||"u"<typeof window||"function"!=typeof document.addEventListener||document.addEventListener("visibilitychange",this.flushMetricsOnPageUnload=function(){"hidden"===document.visibilityState&&e.sendMetrics({fireAndForget:!0})})},e.prototype.removeMetricsFlushOnPageUnload=function(){this.flushMetricsOnPageUnload&&(document.removeEventListener("visibilitychange",this.flushMetricsOnPageUnload),this.flushMetricsOnPageUnload=void 0)},e}(),_=function(){function e(){this.store=new Map}return e.prototype.save=function(e,t){return o(this,void 0,void 0,function(){return u(this,function(r){return this.store.set(e,t),[2]})})},e.prototype.get=function(e){return o(this,void 0,void 0,function(){return u(this,function(t){return[2,this.store.get(e)]})})},e}(),E=function(){function e(e){void 0===e&&(e="unleash:repository"),this.prefix=e}return e.prototype.save=function(e,t){return o(this,void 0,void 0,function(){var r,n;return u(this,function(i){r=JSON.stringify(t),n="".concat(this.prefix,":").concat(e);try{window.localStorage.setItem(n,r)}catch(e){console.error(e)}return[2]})})},e.prototype.get=function(e){try{var t="".concat(this.prefix,":").concat(e),r=window.localStorage.getItem(t);return r?JSON.parse(r):void 0}catch(e){console.error(e)}},e}(),b=function(){return"function"==typeof crypto.randomUUID?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})},I=function(){function e(){}return e.prototype.generateEventId=function(){return b()},e.prototype.createImpressionEvent=function(e,t,r,n,i,s){var o=this.createBaseEvent(e,t,r,n,i);return s?a(a({},o),{variant:s}):o},e.prototype.createBaseEvent=function(e,t,r,n,i){return{eventType:n,eventId:this.generateEventId(),context:e,enabled:t,featureName:r,impressionData:i}},e}();function A(e){return void 0!==e&&!Number.isFinite(e)}function O(e){return e?Object.keys(e).sort().map(function(t){return"".concat(t,"=").concat(e[t])}).join(","):""}function T(e){var t={};if(!e)return t;for(var r=0,n=e.split(",");r<n.length;r++){var i=n[r].split("="),s=i[0],a=i[1];t[s]=a}return t}var S=function(e){return"buckets"in e},N=function(){function e(e){this.opts=e,this.values=new Map}return e.prototype.inc=function(e,t){var r;if(!A(e)){var n=null!=e?e:1;if(!(n<=0)){var i=O(t),s=null!=(r=this.values.get(i))?r:0;this.values.set(i,s+n)}}},e.prototype.collect=function(){var e=Array.from(this.values.entries()).map(function(e){var t=e[0],r=e[1];return{labels:T(t),value:r}});return this.values.clear(),0===e.length&&e.push({labels:{},value:0}),{name:this.opts.name,help:this.opts.help,type:"counter",samples:e}},e}(),C=function(){function e(e){this.opts=e,this.values=new Map;var t=Array.from(new Set((e.buckets&&e.buckets.length>0?e.buckets:[.005,.01,.025,.05,.1,.25,.5,1,2.5,5,10]).filter(function(e){return e!==1/0}))).sort(function(e,t){return e-t});this.buckets=l(l([],t,!0),[1/0],!1)}return e.prototype.restore=function(e){var t=O(e.labels),r={count:e.count,sum:e.sum,buckets:new Map(e.buckets.map(function(e){return["+Inf"===e.le?1/0:e.le,e.count]}))};this.values.set(t,r)},e.prototype.observe=function(e,t){var r;if(!A(e)){var n=O(t),i=this.values.get(n);if(!i){for(var s=new Map,a=0,o=this.buckets;a<o.length;a++){var u=o[a];s.set(u,0)}i={count:0,sum:0,buckets:s},this.values.set(n,i)}i.count++,i.sum+=e;for(var l=0,c=this.buckets;l<c.length;l++)if(e<=(u=c[l])){var h=null!=(r=i.buckets.get(u))?r:0;i.buckets.set(u,h+1)}}},e.prototype.collect=function(){var e=Array.from(this.values.entries()).map(function(e){var t=e[0],r=e[1];return{labels:T(t),count:r.count,sum:r.sum,buckets:Array.from(r.buckets.entr
3ies()).map(function(e){var t=e[0];return{le:t===1/0?"+Inf":t,count:e[1]}})}});return this.values.clear(),0===e.length&&e.push({labels:{},count:0,sum:0,buckets:this.buckets.map(function(e){return{le:e===1/0?"+Inf":e,count:0}})}),{name:this.opts.name,help:this.opts.help,type:"histogram",samples:e}},e}(),B=function(){function e(){this.counters=new Map,this.histograms=new Map}return e.prototype.getCounter=function(e){return this.counters.get(e)},e.prototype.getHistogram=function(e){return this.histograms.get(e)},e.prototype.counter=function(e){var t=e.name,r=this.counters.get(t);return r||(r=new N(e),this.counters.set(t,r)),r},e.prototype.histogram=function(e){var t=e.name,r=this.histograms.get(t);return r||(r=new C(e),this.histograms.set(t,r)),r},e.prototype.collect=function(){var e=Array.from(this.counters.values()).map(function(e){return e.collect()}),t=Array.from(this.histograms.values()).map(function(e){return e.collect()}),r=l(l([],e,!0),t,!0).filter(function(e){return e.samples.length>0});return r.length>0?r:[]},e.prototype.restore=function(e){for(var t=this,r=0;r<e.length;r++)!function(e){switch(e.type){case"counter":for(var r=t.counter({name:e.name,help:e.help}),n=0,i=e.samples;n<i.length;n++){var s=i[n];"value"in s&&r.inc(s.value,s.labels)}break;case"histogram":var a=e.samples.find(S);if(a){var o=a.buckets.map(function(e){return"+Inf"===e.le?1/0:e.le}),u=t.histogram({name:e.name,help:e.help,buckets:o});e.samples.filter(S).forEach(function(e){u.restore(e)})}}}(e[r])},e}(),R="error",k="ready",w="impression",x="warn",L=function(e){function t(t,r,n){var i=e.call(this)||this;return i.metricRegistry=t,i.appName=r,i.environment=n,i}return s(t,e),t.prototype.defineCounter=function(e,t){e&&t?this.metricRegistry.counter({name:e,help:t,labelNames:["featureName","appName","environment"]}):this.emit(x,"Counter name or help cannot be empty: ".concat(e,", ").concat(t,"."))},t.prototype.defineHistogram=function(e,t,r){e&&t?this.metricRegistry.histogram({name:e,help:t,labelNames:["featureName","appName","environment"],buckets:r}):this.emit(x,"Histogram name or help cannot be empty: ".concat(e,", ").concat(t,"."))},t.prototype.incrementCounter=function(e,t){var r=this.metricRegistry.getCounter(e);if(r){var n={appName:this.appName,environment:this.environment};r.inc(t,n)}else this.emit(x,"Counter ".concat(e," not defined, this counter will not be incremented."))},t.prototype.observeHistogram=function(e,t){var r=this.metricRegistry.getHistogram(e);if(r){var n={appName:this.appName,environment:this.environment};r.observe(t,n)}else this.emit(x,"Histogram ".concat(e," not defined, this histogram will not be updated."))},t}(p),P=["userId","sessionId","remoteAddress","currentTime"],M=function(e){return P.includes(e)},D={name:"disabled",enabled:!1,feature_enabled:!1},U="repo",H="repoLastUpdateTimestamp",W=function(){try{if("u">typeof window&&"fetch"in window)return fetch.bind(window);if("fetch"in globalThis)return fetch.bind(globalThis)}catch(e){console.error('Unleash failed to resolve "fetch"',e)}},$=function(e){function t(t){var r,n=t.storageProvider,i=t.url,s=t.clientKey,o=t.disableRefresh,u=t.refreshInterval,l=t.metricsInterval,c=t.metricsIntervalInitial,h=t.disableMetrics,p=t.appName,f=t.environment,d=void 0===f?"default":f,v=t.context,y=t.fetch,m=void 0===y?W():y,A=t.createAbortController,O=void 0===A?function(){try{if("u">typeof window&&"AbortController"in window)return function(){return new window.AbortController};if("fetch"in globalThis)return function(){return new globalThis.AbortController}}catch(e){console.error('Unleash failed to resolve "AbortController" factory',e)}}():A,T=t.bootstrap,S=t.bootstrapOverride,N=t.headerName,C=void 0===N?"Authorization":N,k=t.customHeaders,w=void 0===k?{}:k,x=t.impressionDataAll,P=t.usePOSTrequests,M=t.experimental,D=e.call(this)||this;if(D.toggles=[],D.etag="",D.readyEventEmitted=!1,D.fetchedFromServer=!1,D.usePOSTrequests=!1,D.started=!1,!i)throw Error("url is required");if(!s)throw Error("clientKey is required");if(!p)throw Error("appName is required.");D.eventsHandler=new I,D.impressionDataAll=void 0!==x&&x,D.toggles=T&&T.length>0?T:[],D.url=i instanceof URL?i:new URL(i),D.clientKey=s,D.headerName=C,D.customHeaders=w,D.storage=n||("u">typeof window?new E:new _),D.refreshInterval=void 0!==o&&o?0:1e3*(void 0===u?30:u),D.context=a({appName:p,environment:d},v),D.usePOSTrequests=void 0!==P&&P,D.sdkState="initializing";var U=null==M?void 0:M.metricsUrl;!U||U instanceof URL||(U=new URL(U)),D.experimental=a(a({},M),{metricsUrl:U}),(null==M?void 0:M.togglesStorageTTL)&&(null==M?void 0:M.togglesStorageTTL)>0&&(D.experimental.togglesStorageTTL=1e3*M.togglesStorageTTL),D.lastRefreshTimestamp=0,D.ready=new Promise(function(e){D.init().then(e).catch(function(t){console.error(t),D.sdkState="error",D.emit
3(R,t),D.lastError=t,e()})}),m||console.error('Unleash: You must either provide your own "fetch" implementation or run in an environment where "fetch" is available.'),O||console.error('Unleash: You must either provide your own "AbortController" implementation or run in an environment where "AbortController" is available.'),D.fetch=m,D.createAbortController=O,D.bootstrap=T&&T.length>0?T:void 0,D.bootstrapOverride=void 0===S||S,D.connectionId=b(),D.metricRegistry=new B;var H=D.resolveEnvironment(s,d);return D.impactMetrics=new L(D.metricRegistry,p,H),D.metrics=new g({onError:function(e){return D.emit(R,{type:"metrics",error:e})},onSent:D.emit.bind(D,"sent"),appName:p,metricsInterval:void 0===l?30:l,disableMetrics:void 0!==h&&h,url:(null==(r=D.experimental)?void 0:r.metricsUrl)||D.url,clientKey:s,fetch:m,headerName:C,customHeaders:w,metricsIntervalInitial:void 0===c?2:c,connectionId:D.connectionId,metricRegistry:D.metricRegistry}),D}return s(t,e),t.prototype.getAllToggles=function(){return l([],this.toggles,!0)},t.prototype.isEnabled=function(e){var t,r=this.toggles.find(function(t){return t.name===e}),n=!!r&&r.enabled;if(this.metrics.count(e,n),(null==r?void 0:r.impressionData)||this.impressionDataAll){var i=this.eventsHandler.createImpressionEvent(this.context,n,e,"isEnabled",null!=(t=null==r?void 0:r.impressionData)?t:void 0);this.emit(w,i)}return n},t.prototype.getVariant=function(e){var t,r=this.toggles.find(function(t){return t.name===e}),n=(null==r?void 0:r.enabled)||!1,i=r?r.variant:D;if(i.name&&this.metrics.countVariant(e,i.name),this.metrics.count(e,n),(null==r?void 0:r.impressionData)||this.impressionDataAll){var s=this.eventsHandler.createImpressionEvent(this.context,n,e,"getVariant",null!=(t=null==r?void 0:r.impressionData)?t:void 0,i.name);this.emit(w,s)}return a(a({},i),{feature_enabled:n})},t.prototype.updateToggles=function(){return o(this,void 0,void 0,function(){var e=this;return u(this,function(t){switch(t.label){case 0:return this.timerRef||this.fetchedFromServer?[4,this.fetchToggles()]:[3,2];case 1:return t.sent(),[3,4];case 2:return this.started?[4,new Promise(function(t){var r=function(){e.fetchToggles().then(function(){e.off(k,r),t()})};e.once(k,r)})]:[3,4];case 3:t.sent(),t.label=4;case 4:return[2]}})})},t.prototype.updateContext=function(e){return o(this,void 0,void 0,function(){var t;return u(this,function(r){switch(r.label){case 0:return(e.appName||e.environment)&&this.emit(x,"appName and environment are static. They can't be updated with updateContext."),t={environment:this.context.environment,appName:this.context.appName,sessionId:this.context.sessionId},this.context=a(a({},t),e),[4,this.updateToggles()];case 1:return r.sent(),[2]}})})},t.prototype.getContext=function(){return a({},this.context)},t.prototype.setContextField=function(e,t){return o(this,void 0,void 0,function(){var r,n,i;return u(this,function(s){switch(s.label){case 0:return M(e)?this.context=a(a({},this.context),((n={})[e]=t,n)):(r=a(a({},this.context.properties),((i={})[e]=t,i)),this.context=a(a({},this.context),{properties:r})),[4,this.updateToggles()];case 1:return s.sent(),[2]}})})},t.prototype.removeContextField=function(e){return o(this,void 0,void 0,function(){var t;return u(this,function(r){switch(r.label){case 0:return M(e)?this.context=a(a({},this.context),((t={})[e]=void 0,t)):"object"==typeof this.context.properties&&delete this.context.properties[e],[4,this.updateToggles()];case 1:return r.sent(),[2]}})})},t.prototype.setReady=function(){this.readyEventEmitted=!0,this.emit(k)},t.prototype.init=function(){return o(this,void 0,void 0,function(){var e,t,r;return u(this,function(n){switch(n.label){case 0:return[4,this.resolveSessionId()];case 1:return e=n.sent(),this.context=a({sessionId:e},this.context),[4,this.storage.get(U)];case 2:return t=n.sent()||[],r=this,[4,this.getLastRefreshTimestamp()];case 3:return r.lastRefreshTimestamp=n.sent(),this.bootstrap&&(this.bootstrapOverride||0===t.length)?[4,this.storage.save(U,this.bootstrap)]:[3,6];case 4:return n.sent(),this.toggles=this.bootstrap,this.sdkState="healthy",[4,this.storeLastRefreshTimestamp()];case 5:return n.sent(),this.setReady(),[3,7];case 6:this.toggles=t,n.label=7;
3case 7:return this.sdkState="healthy",this.emit("initialized"),[2]}})})},t.prototype.start=function(){return o(this,void 0,void 0,function(){var e,t=this;return u(this,function(r){switch(r.label){case 0:return this.started=!0,this.timerRef?(console.error("Unleash SDK has already started, if you want to restart the SDK you should call client.stop() before starting again."),[2]):[4,this.ready];case 1:return r.sent(),this.metrics.start(),e=this.refreshInterval,[4,this.initialFetchToggles()];case 2:return r.sent(),e>0&&(this.timerRef=setInterval(function(){return t.fetchToggles()},e)),[2]}})})},t.prototype.stop=function(){this.timerRef&&(clearInterval(this.timerRef),this.timerRef=void 0),this.metrics.stop()},t.prototype.isReady=function(){return this.readyEventEmitted},t.prototype.getError=function(){return"error"===this.sdkState?this.lastError:void 0},t.prototype.sendMetrics=function(){return this.metrics.sendMetrics()},t.prototype.resolveSessionId=function(){return o(this,void 0,void 0,function(){var e;return u(this,function(t){switch(t.label){case 0:return this.context.sessionId?[2,this.context.sessionId]:[4,this.storage.get("sessionId")];case 1:return(e=t.sent())?[3,3]:(e=Math.floor(1e9*Math.random()),[4,this.storage.save("sessionId",e.toString(10))]);case 2:t.sent(),t.label=3;case 3:return[2,e.toString(10)]}})})},t.prototype.getHeaders=function(){return y({clientKey:this.clientKey,connectionId:this.connectionId,appName:this.context.appName,customHeaders:this.customHeaders,headerName:this.headerName,etag:this.etag,isPost:this.usePOSTrequests})},t.prototype.storeToggles=function(e){return o(this,void 0,void 0,function(){return u(this,function(t){switch(t.label){case 0:return this.toggles=e,this.emit("update"),[4,this.storage.save(U,e)];case 1:return t.sent(),[2]}})})},t.prototype.isTogglesStorageTTLEnabled=function(){var e;return!!((null==(e=this.experimental)?void 0:e.togglesStorageTTL)&&this.experimental.togglesStorageTTL>0)},t.prototype.isUpToDate=function(){if(!this.isTogglesStorageTTLEnabled())return!1;var e,t=Date.now(),r=(null==(e=this.experimental)?void 0:e.togglesStorageTTL)||0;return this.lastRefreshTimestamp>0&&this.lastRefreshTimestamp<=t&&t-this.lastRefreshTimestamp<=r},t.prototype.getLastRefreshTimestamp=function(){return o(this,void 0,void 0,function(){var e,t;return u(this,function(r){switch(r.label){case 0:return this.isTogglesStorageTTLEnabled()?[4,this.storage.get(H)]:[3,3];case 1:return e=r.sent(),[4,v(this.context)];case 2:return t=r.sent(),[2,(null==e?void 0:e.key)===t?e.timestamp:0];case 3:return[2,0]}})})},t.prototype.storeLastRefreshTimestamp=function(){return o(this,void 0,void 0,function(){var e,t;return u(this,function(r){switch(r.label){case 0:return this.isTogglesStorageTTLEnabled()?(this.lastRefreshTimestamp=Date.now(),t={},[4,v(this.context)]):[3,3];case 1:return t.key=r.sent(),t.timestamp=this.lastRefreshTimestamp,e=t,[4,this.storage.save(H,e)];case 2:r.sent(),r.label=3;case 3:return[2]}})})},t.prototype.initialFetchToggles=function(){if(!this.isUpToDate())return this.fetchToggles();this.fetchedFromServer||(this.fetchedFromServer=!0,this.setReady())},t.prototype.fetchToggles=function(){return o(this,void 0,void 0,function(){var e,t,r,n,i,s,a,o,l;return u(this,function(u){switch(u.label){case 0:if(!this.fetch)return[3,9];this.abortController&&!this.abortController.signal.aborted&&this.abortController.abort(),this.abortController=null==(l=this.createAbortController)?void 0:l.call(this),e=this.abortController?this.abortController.signal:void 0,u.label=1;case 1:var c,h,p;return u.trys.push([1,7,8,9]),r=(t=this.usePOSTrequests)?this.url:(c=this.url,h=this.context,p=new URL(c.toString()),Object.entries(h).filter(f).forEach(function(e){var t=e[0],r=e[1];"properties"===t&&r?Object.entries(r).filter(f).forEach(function(e){var t=e[0],r=e[1];return p.searchParams.append("properties[".concat(t,"]"),r)}):p.searchParams.append(t,r)}),p),n=t?"POST":"GET",i=t?JSON.stringify({context:this.context}):void 0,[4,this.fetch(r.toString(),{method:n,cache:"no-cache",headers:this.getHeaders(),body:i,signal:e})];case 2:return s=u.sent(),"error"===this.sdkState&&s.status<400&&(this.sdkState="healthy",this.emit
3("recovered")),s.ok?(this.etag=s.headers.get("ETag")||"",[4,s.json()]):[3,5];case 3:return a=u.sent(),[4,this.storeToggles(a.toggles)];case 4:return u.sent(),"healthy"!==this.sdkState&&(this.sdkState="healthy"),this.fetchedFromServer||(this.fetchedFromServer=!0,this.setReady()),this.storeLastRefreshTimestamp(),[3,6];case 5:304===s.status?this.storeLastRefreshTimestamp():(console.error("Unleash: Fetching feature toggles did not have an ok response"),this.sdkState="error",this.emit(R,{type:"HttpError",code:s.status}),this.lastError={type:"HttpError",code:s.status}),u.label=6;case 6:return[3,9];case 7:return"object"==typeof(o=u.sent())&&null!==o&&"name"in o&&"AbortError"===o.name||(console.error("Unleash: unable to fetch feature toggles",o),this.sdkState="error",this.emit(R,{type:"fetch-toggles",error:o}),this.lastError=o),[3,9];case 8:return this.abortController=null,[7];case 9:return[2]}})})},t.prototype.resolveEnvironment=function(e,t){return function(e){var t=e.indexOf(":");if(-1!==t){var r=e.slice(t+1),n=r.lastIndexOf(".");if(-1!==n)return r.slice(0,n)}}(e)||t},t}(p);function F(){if(!t){let e=document.documentElement.dataset.viewerCountry;t={sessionId:(0,n.default)(),properties:{...e&&{viewerCountryCode:e},clientType:window._DATADOG_SYNTHETICS_BROWSER?"synthetics":window.Cypress?"cypress":"u">typeof navigator&&navigator.webdriver?"bot":"user",namespace:r.UNLEASH_NAMESPACE}}}return t}let j=r.UNLEASH_B2C_PROXY_URL&&r.UNLEASH_PROXY_CLIENT_KEY?new $({url:r.UNLEASH_B2C_PROXY_URL,clientKey:r.UNLEASH_PROXY_CLIENT_KEY,appName:"b2c-spa",disableRefresh:!0,context:F(),environment:r.ENVIRONMENT}):void 0,G=Promise.resolve(j?.start());e.s(["default",0,j,"getUnleashContext",0,F,"unleashReady",0,G],153292)}]);
4
5//# debugId=058be410-79db-1f81-5a3c-453ab9bce5f9
6//# sourceMappingURL=43lbimp41r-of.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.