@coveo/headless 3.51.1 → 3.51.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -26,7 +26,7 @@ If you are trying to access the inner state... Don't`),Reflect.get(t,r,n)}});d()
26
26
  `)}
27
27
 
28
28
  ${t}
29
- `;return new js(r)}var js=class extends Error{constructor(e){super(e),this.name="SchemaValidationError"}},Ee=class{constructor(e){pe(this,"definition");this.definition=e}validate(e={},t=""){let r={...this.default,...e},n=[];for(let o in this.definition){let a=this.definition[o].validate(r[o]);a&&n.push(`${o}: ${a}`)}if(n.length)throw VT(n,t);return r}get default(){let e={};for(let t in this.definition){let r=this.definition[t].default;r!==void 0&&(e[t]=r)}return e}},Le=class{constructor(e={}){pe(this,"baseConfig");this.baseConfig=e}validate(e){return this.baseConfig.required&&ie(e)?"value is required.":null}get default(){return this.baseConfig.default instanceof Function?this.baseConfig.default():this.baseConfig.default}get required(){return this.baseConfig.required===!0}};function La(e){return e===void 0}function jT(e){return e===null}function ie(e){return La(e)||jT(e)}var ne=class{constructor(e={}){pe(this,"value");this.value=new Le(e)}validate(e){let t=this.value.validate(e);return t||(MT(e)?null:"value is not a boolean.")}get default(){return this.value.default}get required(){return this.value.required}};function MT(e){return La(e)||nC(e)}function nC(e){return typeof e=="boolean"}var Z=class{constructor(e={}){pe(this,"config");pe(this,"value");this.config=e,this.value=new Le(e)}validate(e){let t=this.value.validate(e);return t||(LT(e)?e<this.config.min?`minimum value of ${this.config.min} not respected.`:e>this.config.max?`maximum value of ${this.config.max} not respected.`:null:"value is not a number.")}get default(){return this.value.default}get required(){return this.value.required}};function LT(e){return La(e)||oC(e)}function oC(e){return typeof e=="number"&&!Number.isNaN(e)}var UT=/^\d{4}(-\d\d(-\d\d(T\d\d:\d\d(:\d\d)?(\.\d+)?(([+-]\d\d:\d\d)|Z)?)?)?)?$/i,L=class{constructor(e={}){pe(this,"value");pe(this,"config");this.config={emptyAllowed:!0,url:!1,...e},this.value=new Le(this.config)}validate(e){let{emptyAllowed:t,url:r,regex:n,constrainTo:o,ISODate:a}=this.config,i=this.value.validate(e);if(i)return i;if(La(e))return null;if(!wu(e))return"value is not a string.";if(!t&&!e.length)return"value is an empty string.";if(r)try{new URL(e)}catch{return"value is not a valid URL."}return n&&!n.test(e)?`value did not match provided regex ${n}`:o&&!o.includes(e)?`value should be one of: ${o.join(", ")}.`:a&&!(UT.test(e)&&new Date(e).toString()!=="Invalid Date")?"value is not a valid ISO8601 date string":null}get default(){return this.value.default}get required(){return this.value.required}};function wu(e){return Object.prototype.toString.call(e)==="[object String]"}var H=class{constructor(e={}){pe(this,"config");this.config={options:{required:!1},values:{},...e}}validate(e){if(La(e))return this.config.options.required?"value is required and is currently undefined":null;if(!aC(e))return"value is not an object";for(let[r,n]of Object.entries(this.config.values))if(n.required&&ie(e[r]))return`value does not contain ${r}`;let t="";for(let[r,n]of Object.entries(this.config.values)){let o=e[r],a=n.validate(o);a!==null&&(t+=` ${a}`)}return t===""?null:t}get default(){}get required(){return!!this.config.options.required}};function aC(e){return e!==void 0&&typeof e=="object"}var fe=class{constructor(e={}){pe(this,"config");pe(this,"value");this.config=e,this.value=new Le(this.config)}validate(e){if(!ie(e)&&!Array.isArray(e))return"value is not an array";let t=this.value.validate(e);if(t!==null)return t;if(ie(e))return null;if(this.config.max!==void 0&&e.length>this.config.max)return`value contains more than ${this.config.max}`;if(this.config.min!==void 0&&e.length<this.config.min)return`value contains less than ${this.config.min}`;if(this.config.each!==void 0){let r="";return e.forEach(n=>{this.config.each.required&&ie(n)&&(r=`value is null or undefined: ${e.join(",")}`);let o=this.validatePrimitiveValue(n,this.config.each);o!==null&&(r+=` ${o}`)}),r===""?null:r}return null}validatePrimitiveValue(e,t){return nC(e)||wu(e)||oC(e)||aC(e)?t.validate(e):"value is not a primitive value"}get default(){}get required(){return this.value.required}};function Iu(e){return Array.isArray(e)}var Vn=class{constructor(e){pe(this,"config");pe(this,"value");this.config=e,this.value=new Le(e)}validate(e){let t=this.value.validate(e);return t!==null?t:La(e)||Object.values(this.config.enum).find(n=>n===e)?null:"value is not in enum."}get default(){return this.value.default}get required(){return this.value.required}};d();c();l();u();d();c();l();u();function yt(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var QT=typeof Symbol=="function"&&Symbol.observable||"@@observable",iC=QT,Df=()=>Math.random().toString(36).substring(7).split("").join("."),BT={INIT:`@@redux/INIT${Df()}`,REPLACE:`@@redux/REPLACE${Df()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Df()}`},Tu=BT;function qr(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function Vf(e,t,r){if(typeof e!="function")throw new Error(yt(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(yt(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(yt(1));return r(Vf)(e,t)}let n=e,o=t,a=new Map,i=a,p=0,m=!1;function f(){i===a&&(i=new Map,a.forEach((P,E)=>{i.set(E,P)}))}function g(){if(m)throw new Error(yt(3));return o}function C(P){if(typeof P!="function")throw new Error(yt(4));if(m)throw new Error(yt(5));let E=!0;f();let I=p++;return i.set(I,P),function(){if(E){if(m)throw new Error(yt(6));E=!1,f(),i.delete(I),a=null}}}function A(P){if(!qr(P))throw new Error(yt(7));if(typeof P.type>"u")throw new Error(yt(8));if(typeof P.type!="string")throw new Error(yt(17));if(m)throw new Error(yt(9));try{m=!0,o=n(o,P)}finally{m=!1}return(a=i).forEach(I=>{I()}),P}function y(P){if(typeof P!="function")throw new Error(yt(10));n=P,A({type:Tu.REPLACE})}function x(){let P=C;return{subscribe(E){if(typeof E!="object"||E===null)throw new Error(yt(11));function I(){let k=E;k.next&&k.next(g())}return I(),{unsubscribe:P(I)}},[iC](){return this}}}return A({type:Tu.INIT}),{dispatch:A,subscribe:C,getState:g,replaceReducer:y,[iC]:x}}function $T(e){Object.keys(e).forEach(t=>{let r=e[t];if(typeof r(void 0,{type:Tu.INIT})>"u")throw new Error(yt(12));if(typeof r(void 0,{type:Tu.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(yt(13))})}function Ua(e){let t=Object.keys(e),r={};for(let i=0;i<t.length;i++){let p=t[i];typeof e[p]=="function"&&(r[p]=e[p])}let n=Object.keys(r),o,a;try{$T(r)}catch(i){a=i}return function(p={},m){if(a)throw a;let f=!1,g={};for(let C=0;C<n.length;C++){let A=n[C],y=r[A],x=p[A],b=y(x,m);if(typeof b>"u"){let P=m&&m.type;throw new Error(yt(14))}g[A]=b,f=f||b!==x}return f=f||n.length!==Object.keys(p).length,f?g:p}}function Ms(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function sC(...e){return t=>(r,n)=>{let o=t(r,n),a=()=>{throw new Error(yt(15))},i={getState:o.getState,dispatch:(m,...f)=>a(m,...f)},p=e.map(m=>m(i));return a=Ms(...p)(o.dispatch),{...o,dispatch:a}}}function Ls(e){return qr(e)&&"type"in e&&typeof e.type=="string"}d();c();l();u();var zf=Symbol.for("immer-nothing"),Us=Symbol.for("immer-draftable"),ut=Symbol.for("immer-state");function ht(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Yt=Object,Po=Yt.getPrototypeOf,Bs="constructor",Ws="prototype",Lf="configurable",_u="enumerable",ku="writable",$s="value",Dt=e=>!!e&&!!e[ut];function Vt(e){return e?gC(e)||Ys(e)||!!e[Us]||!!e[Bs]?.[Us]||Xs(e)||Zs(e):!1}var GT=Yt[Ws][Bs].toString(),cC=new WeakMap;function gC(e){if(!e||!Qa(e))return!1;let t=Po(e);if(t===null||t===Yt[Ws])return!0;let r=Yt.hasOwnProperty.call(t,Bs)&&t[Bs];if(r===Object)return!0;if(!Ro(r))return!1;let n=cC.get(r);return n===void 0&&(n=Function.toString.call(r),cC.set(r,n)),n===GT}function yC(e){return Dt(e)||ht(15,e),e[ut].base_}function Ks(e,t,r=!0){Eo(e)===0?(r?Reflect.ownKeys(e):Yt.keys(e)).forEach(o=>{t(o,e[o],e)}):e.forEach((n,o)=>t(o,n,e))}function Eo(e){let t=e[ut];return t?t.type_:Ys(e)?1:Xs(e)?2:Zs(e)?3:0}var Qs=(e,t,r=Eo(e))=>r===2?e.has(t):Yt[Ws].hasOwnProperty.call(e,t),mn=(e,t,r=Eo(e))=>r===2?e.get(t):e[t],qu=(e,t,r,n=Eo(e))=>{n===2?e.set(t,r):n===3?e.add(r):e[t]=r};function zT(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var Ys=Array.isArray,Xs=e=>e instanceof Map,Zs=e=>e instanceof Set,Qa=e=>typeof e=="object",Ro=e=>typeof e=="function",jf=e=>typeof e=="boolean";function HT(e){let t=+e;return Number.isInteger(t)&&String(t)===e}var WT=e=>Qa(e)?e?.[ut]:null,fn=e=>e.copy_||e.base_;var Hf=e=>e.modified_?e.copy_:e.base_;function Uf(e,t){if(Xs(e))return new Map(e);if(Zs(e))return new Set(e);if(Ys(e))return Array[Ws].slice.call(e);let r=gC(e);if(t===!0||t==="class_only"&&!r){let n=Yt.getOwnPropertyDescriptors(e);delete n[ut];let o=Reflect.ownKeys(n);for(let a=0;a<o.length;a++){let i=o[a],p=n[i];p[ku]===!1&&(p[ku]=!0,p[Lf]=!0),(p.get||p.set)&&(n[i]={[Lf]:!0,[ku]:!0,[_u]:p[_u],[$s]:e[i]})}return Yt.create(Po(e),n)}else{let n=Po(e);if(n!==null&&r)return{...e};let o=Yt.create(n);return Yt.assign(o,e)}}function Wf(e,t=!1){return Uu(e)||Dt(e)||!Vt(e)||(Eo(e)>1&&Yt.defineProperties(e,{set:Ou,add:Ou,clear:Ou,delete:Ou}),Yt.freeze(e),t&&Ks(e,(r,n)=>{Wf(n,!0)},!1)),e}function KT(){ht(2)}var Ou={[$s]:KT};function Uu(e){return e===null||!Qa(e)?!0:Yt.isFrozen(e)}var Du="MapSet",Vu="Patches",uC="ArrayMethods",ju={};function Fo(e){let t=ju[e];return t||ht(0,e),t}var lC=e=>!!ju[e];function YT(e,t){ju[e]||(ju[e]=t)}var Gs,hC=()=>Gs,XT=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:lC(Du)?Fo(Du):void 0,arrayMethodsPlugin_:lC(uC)?Fo(uC):void 0});function dC(e,t){t&&(e.patchPlugin_=Fo(Vu),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Qf(e){Bf(e),e.drafts_.forEach(ZT),e.drafts_=null}function Bf(e){e===Gs&&(Gs=e.parent_)}var pC=e=>Gs=XT(Gs,e);function ZT(e){let t=e[ut];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function mC(e,t){t.unfinalizedDrafts_=t.drafts_.length;let r=t.drafts_[0];if(e!==void 0&&e!==r){r[ut].modified_&&(Qf(t),ht(4)),Vt(e)&&(e=fC(t,e));let{patchPlugin_:o}=t;o&&o.generateReplacementPatches_(r[ut].base_,e,t)}else e=fC(t,r);return JT(t,e,!0),Qf(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==zf?e:void 0}function fC(e,t){if(Uu(t))return t;let r=t[ut];if(!r)return Mu(t,e.handledSet_,e);if(!Qu(r,e))return t;if(!r.modified_)return r.base_;if(!r.finalized_){let{callbacks_:n}=r;if(n)for(;n.length>0;)n.pop()(e);vC(r,e)}return r.copy_}function JT(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Wf(t,r)}function SC(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var Qu=(e,t)=>e.scope_===t,eO=[];function CC(e,t,r,n){let o=fn(e),a=e.type_;if(n!==void 0&&mn(o,n,a)===t){qu(o,n,r,a);return}if(!e.draftLocations_){let p=e.draftLocations_=new Map;Ks(o,(m,f)=>{if(Dt(f)){let g=p.get(f)||[];g.push(m),p.set(f,g)}})}let i=e.draftLocations_.get(t)??eO;for(let p of i)qu(o,p,r,a)}function tO(e,t,r){e.callbacks_.push(function(o){let a=t;if(!a||!Qu(a,o))return;o.mapSetPlugin_?.fixSetContents(a);let i=Hf(a);CC(e,a.draft_??a,i,r),vC(a,o)})}function vC(e,t){if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){let{patchPlugin_:n}=t;if(n){let o=n.getPath(e);o&&n.generatePatches_(e,o,t)}SC(e)}}function rO(e,t,r){let{scope_:n}=e;if(Dt(r)){let o=r[ut];Qu(o,n)&&o.callbacks_.push(function(){Nu(e);let i=Hf(o);CC(e,r,i,t)})}else Vt(r)&&e.callbacks_.push(function(){let a=fn(e);e.type_===3?a.has(r)&&Mu(r,n.handledSet_,n):mn(a,t,e.type_)===r&&n.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&Mu(mn(e.copy_,t,e.type_),n.handledSet_,n)})}function Mu(e,t,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||Dt(e)||t.has(e)||!Vt(e)||Uu(e)||(t.add(e),Ks(e,(n,o)=>{if(Dt(o)){let a=o[ut];if(Qu(a,r)){let i=Hf(a);qu(e,n,i,e.type_),SC(a)}}else Vt(o)&&Mu(o,t,r)})),e}function nO(e,t){let r=Ys(e),n={type_:r?1:0,scope_:t?t.scope_:hC(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},o=n,a=Lu;r&&(o=[n],a=zs);let{revoke:i,proxy:p}=Proxy.revocable(o,a);return n.draft_=p,n.revoke_=i,[p,n]}var Lu={get(e,t){if(t===ut)return e;let r=e.scope_.arrayMethodsPlugin_,n=e.type_===1&&typeof t=="string";if(n&&r?.isArrayOperationMethod(t))return r.createMethodInterceptor(e,t);let o=fn(e);if(!Qs(o,t,e.type_))return oO(e,o,t);let a=o[t];if(e.finalized_||!Vt(a)||n&&e.operationMethod&&r?.isMutatingArrayMethod(e.operationMethod)&&HT(t))return a;if(a===Mf(e.base_,t)){Nu(e);let i=e.type_===1?+t:t,p=Gf(e.scope_,a,e,i);return e.copy_[i]=p}return a},has(e,t){return t in fn(e)},ownKeys(e){return Reflect.ownKeys(fn(e))},set(e,t,r){let n=xC(fn(e),t);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){let o=Mf(fn(e),t),a=o?.[ut];if(a&&a.base_===r)return e.copy_[t]=r,e.assigned_.set(t,!1),!0;if(zT(r,o)&&(r!==void 0||Qs(e.base_,t,e.type_)))return!0;Nu(e),$f(e)}return e.copy_[t]===r&&(r!==void 0||t in e.copy_)||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_.set(t,!0),rO(e,t,r)),!0},deleteProperty(e,t){return Nu(e),Mf(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),$f(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let r=fn(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{[ku]:!0,[Lf]:e.type_!==1||t!=="length",[_u]:n[_u],[$s]:r[t]}},defineProperty(){ht(11)},getPrototypeOf(e){return Po(e.base_)},setPrototypeOf(){ht(12)}},zs={};for(let e in Lu){let t=Lu[e];zs[e]=function(){let r=arguments;return r[0]=r[0][0],t.apply(this,r)}}zs.deleteProperty=function(e,t){return zs.set.call(this,e,t,void 0)};zs.set=function(e,t,r){return Lu.set.call(this,e[0],t,r,e[0])};function Mf(e,t){let r=e[ut];return(r?fn(r):e)[t]}function oO(e,t,r){let n=xC(t,r);return n?$s in n?n[$s]:n.get?.call(e.draft_):void 0}function xC(e,t){if(!(t in e))return;let r=Po(e);for(;r;){let n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Po(r)}}function $f(e){e.modified_||(e.modified_=!0,e.parent_&&$f(e.parent_))}function Nu(e){e.copy_||(e.assigned_=new Map,e.copy_=Uf(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var aO=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(t,r,n)=>{if(Ro(t)&&!Ro(r)){let a=r;r=t;let i=this;return function(m=a,...f){return i.produce(m,g=>r.call(this,g,...f))}}Ro(r)||ht(6),n!==void 0&&!Ro(n)&&ht(7);let o;if(Vt(t)){let a=pC(this),i=Gf(a,t,void 0),p=!0;try{o=r(i),p=!1}finally{p?Qf(a):Bf(a)}return dC(a,n),mC(o,a)}else if(!t||!Qa(t)){if(o=r(t),o===void 0&&(o=t),o===zf&&(o=void 0),this.autoFreeze_&&Wf(o,!0),n){let a=[],i=[];Fo(Vu).generateReplacementPatches_(t,o,{patches_:a,inversePatches_:i}),n(a,i)}return o}else ht(1,t)},this.produceWithPatches=(t,r)=>{if(Ro(t))return(i,...p)=>this.produceWithPatches(i,m=>t(m,...p));let n,o;return[this.produce(t,r,(i,p)=>{n=i,o=p}),n,o]},jf(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),jf(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),jf(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){Vt(e)||ht(8),Dt(e)&&(e=Bu(e));let t=pC(this),r=Gf(t,e,void 0);return r[ut].isManual_=!0,Bf(t),r}finishDraft(e,t){let r=e&&e[ut];(!r||!r.isManual_)&&ht(9);let{scope_:n}=r;return dC(n,t),mC(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){let o=t[r];if(o.path.length===0&&o.op==="replace"){e=o.value;break}}r>-1&&(t=t.slice(r+1));let n=Fo(Vu).applyPatches_;return Dt(e)?n(e,t):this.produce(e,o=>n(o,t))}};function Gf(e,t,r,n){let[o,a]=Xs(t)?Fo(Du).proxyMap_(t,r):Zs(t)?Fo(Du).proxySet_(t,r):nO(t,r);return(r?.scope_??hC()).drafts_.push(o),a.callbacks_=r?.callbacks_??[],a.key_=n,r&&n!==void 0?tO(r,a,n):a.callbacks_.push(function(m){m.mapSetPlugin_?.fixSetContents(a);let{patchPlugin_:f}=m;a.modified_&&f&&f.generatePatches_(a,[],m)}),o}function Bu(e){return Dt(e)||ht(10,e),bC(e)}function bC(e){if(!Vt(e)||Uu(e))return e;let t=e[ut],r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=Uf(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=Uf(e,!0);return Ks(r,(o,a)=>{qu(r,o,bC(a))},n),t&&(t.finalized_=!1),r}function AC(){function t(x,b=[]){if(x.key_!==void 0){let P=x.parent_.copy_??x.parent_.base_,E=WT(mn(P,x.key_)),I=mn(P,x.key_);if(I===void 0||I!==x.draft_&&I!==x.base_&&I!==x.copy_||E!=null&&E.base_!==x.base_)return null;let w=x.parent_.type_===3,k;if(w){let T=x.parent_;k=Array.from(T.drafts_.keys()).indexOf(x.key_)}else k=x.key_;if(!(w&&P.size>k||Qs(P,k)))return null;b.push(k)}if(x.parent_)return t(x.parent_,b);b.reverse();try{r(x.copy_,b)}catch{return null}return b}function r(x,b){let P=x;for(let E=0;E<b.length-1;E++){let I=b[E];if(P=mn(P,I),!Qa(P)||P===null)throw new Error(`Cannot resolve path at '${b.join("/")}'`)}return P}let n="replace",o="add",a="remove";function i(x,b,P){if(x.scope_.processedForPatches_.has(x))return;x.scope_.processedForPatches_.add(x);let{patches_:E,inversePatches_:I}=P;switch(x.type_){case 0:case 2:return m(x,b,E,I);case 1:return p(x,b,E,I);case 3:return f(x,b,E,I)}}function p(x,b,P,E){let{base_:I,assigned_:w}=x,k=x.copy_;k.length<I.length&&([I,k]=[k,I],[P,E]=[E,P]);let T=x.allIndicesReassigned_===!0;for(let D=0;D<I.length;D++){let G=k[D],U=I[D];if((T||w?.get(D.toString()))&&G!==U){let $=G?.[ut];if($&&$.modified_)continue;let j=b.concat([D]);P.push({op:n,path:j,value:y(G)}),E.push({op:n,path:j,value:y(U)})}}for(let D=I.length;D<k.length;D++){let G=b.concat([D]);P.push({op:o,path:G,value:y(k[D])})}for(let D=k.length-1;I.length<=D;--D){let G=b.concat([D]);E.push({op:a,path:G})}}function m(x,b,P,E){let{base_:I,copy_:w,type_:k}=x;Ks(x.assigned_,(T,D)=>{let G=mn(I,T,k),U=mn(w,T,k),M=D?Qs(I,T)?n:o:a;if(G===U&&M===n)return;let $=b.concat(T);P.push(M===a?{op:M,path:$}:{op:M,path:$,value:y(U)}),E.push(M===o?{op:a,path:$}:M===a?{op:o,path:$,value:y(G)}:{op:n,path:$,value:y(G)})})}function f(x,b,P,E){let{base_:I,copy_:w}=x,k=0;I.forEach(T=>{if(!w.has(T)){let D=b.concat([k]);P.push({op:a,path:D,value:T}),E.unshift({op:o,path:D,value:T})}k++}),k=0,w.forEach(T=>{if(!I.has(T)){let D=b.concat([k]);P.push({op:o,path:D,value:T}),E.unshift({op:a,path:D,value:T})}k++})}function g(x,b,P){let{patches_:E,inversePatches_:I}=P;E.push({op:n,path:[],value:b===zf?void 0:b}),I.push({op:n,path:[],value:x})}function C(x,b){return b.forEach(P=>{let{path:E,op:I}=P,w=x;for(let G=0;G<E.length-1;G++){let U=Eo(w),M=E[G];typeof M!="string"&&typeof M!="number"&&(M=""+M),(U===0||U===1)&&(M==="__proto__"||M===Bs)&&ht(19),Ro(w)&&M===Ws&&ht(19),w=mn(w,M),Qa(w)||ht(18,E.join("/"))}let k=Eo(w),T=A(P.value),D=E[E.length-1];switch(I){case n:switch(k){case 2:return w.set(D,T);case 3:ht(16);default:return w[D]=T}case o:switch(k){case 1:return D==="-"?w.push(T):w.splice(D,0,T);case 2:return w.set(D,T);case 3:return w.add(T);default:return w[D]=T}case a:switch(k){case 1:return w.splice(D,1);case 2:return w.delete(D);case 3:return w.delete(P.value);default:return delete w[D]}default:ht(17,I)}}),x}function A(x){if(!Vt(x))return x;if(Ys(x))return x.map(A);if(Xs(x))return new Map(Array.from(x.entries()).map(([P,E])=>[P,A(E)]));if(Zs(x))return new Set(Array.from(x).map(A));let b=Object.create(Po(x));for(let P in x)b[P]=A(x[P]);return Qs(x,Us)&&(b[Us]=x[Us]),b}function y(x){return Dt(x)?A(x):x}YT(Vu,{applyPatches_:C,generatePatches_:i,generateReplacementPatches_:g,getPath:t})}var Hs=new aO,wo=Hs.produce,Kf=Hs.produceWithPatches.bind(Hs);var Yf=Hs.applyPatches.bind(Hs);d();c();l();u();function iO(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function sO(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(r=>typeof r=="function")){let r=e.map(n=>typeof n=="function"?`function ${n.name||"unnamed"}()`:typeof n).join(", ");throw new TypeError(`${t}[${r}]`)}}var RC=e=>Array.isArray(e)?e:[e];function cO(e){let t=Array.isArray(e[0])?e[0]:e;return sO(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function uO(e,t){let r=[],{length:n}=e;for(let o=0;o<n;o++)r.push(e[o].apply(null,t));return r}var lO=class{constructor(e){this.value=e}deref(){return this.value}},dO=()=>typeof WeakRef>"u"?lO:WeakRef,EC=dO(),pO=0,PC=1;function $u(){return{s:pO,v:void 0,o:null,p:null}}function mO(e){return e instanceof EC?e.deref():e}function Js(e,t={}){let r=$u(),{resultEqualityCheck:n}=t,o,a=0;function i(){let p=r,{length:m}=arguments;for(let C=0,A=m;C<A;C++){let y=arguments[C];if(typeof y=="function"||typeof y=="object"&&y!==null){let x=p.o;x===null&&(p.o=x=new WeakMap);let b=x.get(y);b===void 0?(p=$u(),x.set(y,p)):p=b}else{let x=p.p;x===null&&(p.p=x=new Map);let b=x.get(y);b===void 0?(p=$u(),x.set(y,p)):p=b}}let f=p,g;if(p.s===PC)g=p.v;else if(g=e.apply(null,arguments),a++,n){let C=mO(o);C!=null&&n(C,g)&&(g=C,a!==0&&a--),o=typeof g=="object"&&g!==null||typeof g=="function"?new EC(g):g}return f.s=PC,f.v=g,g}return i.clearCache=()=>{r=$u(),i.resetResultsCount()},i.resultsCount=()=>a,i.resetResultsCount=()=>{a=0},i}function fO(e,...t){let r=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,n=(...o)=>{let a=0,i=0,p,m={},f=o.pop();typeof f=="object"&&(m=f,f=o.pop()),iO(f,`createSelector expects an output function after the inputs, but received: [${typeof f}]`);let g={...r,...m},{memoize:C,memoizeOptions:A=[],argsMemoize:y=Js,argsMemoizeOptions:x=[]}=g,b=RC(A),P=RC(x),E=cO(o),I=C(function(){return a++,f.apply(null,arguments)},...b),w=!0,k=y(function(){i++;let D=uO(E,arguments);return p=I.apply(null,D),p},...P);return Object.assign(k,{resultFunc:f,memoizedResultFunc:I,dependencies:E,dependencyRecomputations:()=>i,resetDependencyRecomputations:()=>{i=0},lastResult:()=>p,recomputations:()=>a,resetRecomputations:()=>{a=0},memoize:C,argsMemoize:y})};return Object.assign(n,{withTypes:()=>n}),n}var le=fO(Js);d();c();l();u();function FC(e){return({dispatch:r,getState:n})=>o=>a=>typeof a=="function"?a(r,n,e):o(a)}var wC=FC(),IC=FC;var gO=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Ms:Ms.apply(null,arguments)},d$=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}},yO=e=>e&&typeof e.match=="function";function F(e,t){function r(...n){if(t){let o=t(...n);if(!o)throw new Error(jt(0));return{type:e,payload:o.payload,..."meta"in o&&{meta:o.meta},..."error"in o&&{error:o.error}}}return{type:e,payload:n[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=n=>Ls(n)&&n.type===e,r}var VC=class ec extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,ec.prototype)}static get[Symbol.species](){return ec}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new ec(...t[0].concat(this)):new ec(...t.concat(this))}};function TC(e){return Vt(e)?wo(e,()=>{}):e}function Gu(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function hO(e){return typeof e=="boolean"}var SO=()=>function(t){let{thunk:r=!0,immutableCheck:n=!0,serializableCheck:o=!0,actionCreatorCheck:a=!0}=t??{},i=new VC;return r&&(hO(r)?i.push(wC):i.push(IC(r.extraArgument))),i},tc="RTK_autoBatch",Ga=()=>e=>({payload:e,meta:{[tc]:!0}}),OC=e=>t=>{setTimeout(t,e)},CO=(e,t)=>r=>{let n=!1,o=()=>{n||(n=!0,cancelAnimationFrame(a),clearTimeout(i),r())},a=e(o),i=setTimeout(o,t)},vO=(e={type:"raf"})=>t=>(...r)=>{let n=t(...r),o=!0,a=!1,i=!1,p=new Set,m=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?CO(window.requestAnimationFrame,100):OC(10):e.type==="callback"?e.queueNotification:OC(e.timeout),f=()=>{i=!1,a&&(a=!1,p.forEach(g=>g()))};return Object.assign({},n,{subscribe(g){let C=()=>o&&g(),A=n.subscribe(C);return p.add(g),()=>{A(),p.delete(g)}},dispatch(g){try{return o=!g?.meta?.[tc],a=!o,a&&(i||(i=!0,m(f))),n.dispatch(g)}finally{o=!0}}})},xO=e=>function(r){let{autoBatch:n=!0}=r??{},o=new VC(e);return n&&o.push(vO(typeof n=="object"?n:void 0)),o};function jC(e){let t=SO(),{reducer:r=void 0,middleware:n,devTools:o=!0,duplicateMiddlewareCheck:a=!0,preloadedState:i=void 0,enhancers:p=void 0}=e||{},m;if(typeof r=="function")m=r;else if(qr(r))m=Ua(r);else throw new Error(jt(1));let f;typeof n=="function"?f=n(t):f=t();let g=Ms;o&&(g=gO({trace:!1,...typeof o=="object"&&o}));let C=sC(...f),A=xO(C),y=typeof p=="function"?p(A):A(),x=g(...y);return Vf(m,i,x)}function MC(e){let t={},r=[],n,o={addCase(a,i){let p=typeof a=="string"?a:a.type;if(!p)throw new Error(jt(28));if(p in t)throw new Error(jt(29));return t[p]=i,o},addAsyncThunk(a,i){return i.pending&&(t[a.pending.type]=i.pending),i.rejected&&(t[a.rejected.type]=i.rejected),i.fulfilled&&(t[a.fulfilled.type]=i.fulfilled),i.settled&&r.push({matcher:a.settled,reducer:i.settled}),o},addMatcher(a,i){return r.push({matcher:a,reducer:i}),o},addDefaultCase(a){return n=a,o}};return e(o),[t,r,n]}function bO(e){return typeof e=="function"}function ae(e,t){let[r,n,o]=MC(t),a;if(bO(e))a=()=>TC(e());else{let p=TC(e);a=()=>p}function i(p=a(),m){let f=[r[m.type],...n.filter(({matcher:g})=>g(m)).map(({reducer:g})=>g)];return f.filter(g=>!!g).length===0&&(f=[o]),f.reduce((g,C)=>{if(C)if(Dt(g)){let y=C(g,m);return y===void 0?g:y}else{if(Vt(g))return wo(g,A=>C(A,m));{let A=C(g,m);if(A===void 0){if(g===null)return g;throw Error("A case reducer on a non-draftable value must not return undefined")}return A}}return g},p)}return i.getInitialState=a,i}var LC=(e,t)=>yO(e)?e.match(t):e(t);function Dr(...e){return t=>e.some(r=>LC(r,t))}function $a(...e){return t=>e.every(r=>LC(r,t))}function Ku(e,t){if(!e||!e.meta)return!1;let r=typeof e.meta.requestId=="string",n=t.indexOf(e.meta.requestStatus)>-1;return r&&n}function rc(e){return typeof e[0]=="function"&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function Yu(...e){return e.length===0?t=>Ku(t,["pending"]):rc(e)?Dr(...e.map(t=>t.pending)):Yu()(e[0])}function To(...e){return e.length===0?t=>Ku(t,["rejected"]):rc(e)?Dr(...e.map(t=>t.rejected)):To()(e[0])}function nc(...e){let t=r=>r&&r.meta&&r.meta.rejectedWithValue;return e.length===0?$a(To(...e),t):rc(e)?$a(To(...e),t):nc()(e[0])}function gn(...e){return e.length===0?t=>Ku(t,["fulfilled"]):rc(e)?Dr(...e.map(t=>t.fulfilled)):gn()(e[0])}function Xu(...e){return e.length===0?t=>Ku(t,["pending","fulfilled","rejected"]):rc(e)?Dr(...e.flatMap(t=>[t.pending,t.rejected,t.fulfilled])):Xu()(e[0])}var AO="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",oc=(e=21)=>{let t="",r=e;for(;r--;)t+=AO[Math.random()*64|0];return t},RO=["name","message","stack","code"],Xf=class{constructor(e,t){pe(this,"payload");pe(this,"meta");pe(this,"_type");this.payload=e,this.meta=t}},kC=class{constructor(e,t){pe(this,"payload");pe(this,"meta");pe(this,"_type");this.payload=e,this.meta=t}},PO=e=>{if(typeof e=="object"&&e!==null){let t={};for(let r of RO)typeof e[r]=="string"&&(t[r]=e[r]);return t}return{message:String(e)}},NC="External signal was aborted",ue=(()=>{function e(t,r,n){let o=F(t+"/fulfilled",(m,f,g,C)=>({payload:m,meta:{...C||{},arg:g,requestId:f,requestStatus:"fulfilled"}})),a=F(t+"/pending",(m,f,g)=>({payload:void 0,meta:{...g||{},arg:f,requestId:m,requestStatus:"pending"}})),i=F(t+"/rejected",(m,f,g,C,A)=>({payload:C,error:(n&&n.serializeError||PO)(m||"Rejected"),meta:{...A||{},arg:g,requestId:f,rejectedWithValue:!!C,requestStatus:"rejected",aborted:m?.name==="AbortError",condition:m?.name==="ConditionError"}}));function p(m,{signal:f}={}){return(g,C,A)=>{let y=n?.idGenerator?n.idGenerator(m):oc(),x=new s.AbortController,b,P;function E(w){P=w,x.abort()}f&&(f.aborted?E(NC):f.addEventListener("abort",()=>E(NC),{once:!0}));let I=(async function(){let w;try{let T=n?.condition?.(m,{getState:C,extra:A});if(FO(T)&&(T=await T),T===!1||x.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let D=new Promise((G,U)=>{b=()=>{U({name:"AbortError",message:P||"Aborted"})},x.signal.addEventListener("abort",b,{once:!0})});g(a(y,m,n?.getPendingMeta?.({requestId:y,arg:m},{getState:C,extra:A}))),w=await Promise.race([D,Promise.resolve(r(m,{dispatch:g,getState:C,extra:A,requestId:y,signal:x.signal,abort:E,rejectWithValue:((G,U)=>new Xf(G,U)),fulfillWithValue:((G,U)=>new kC(G,U))})).then(G=>{if(G instanceof Xf)throw G;return G instanceof kC?o(G.payload,y,m,G.meta):o(G,y,m)})])}catch(T){w=T instanceof Xf?i(null,y,m,T.payload,T.meta):i(T,y,m)}finally{b&&x.signal.removeEventListener("abort",b)}return n&&!n.dispatchConditionRejection&&i.match(w)&&w.meta.condition||g(w),w})();return Object.assign(I,{abort:E,requestId:y,arg:m,unwrap(){return I.then(EO)}})}}return Object.assign(p,{pending:a,rejected:i,fulfilled:o,settled:Dr(i,o),typePrefix:t})}return e.withTypes=()=>e,e})();function EO(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function FO(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var UC=Symbol.for("rtk-slice-createasyncthunk"),m$={[UC]:ue};function wO(e,t){return`${e}/${t}`}function IO({creators:e}={}){let t=e?.asyncThunk?.[UC];return function(n){let{name:o,reducerPath:a=o}=n;if(!o)throw new Error(jt(11));typeof process<"u";let i=(typeof n.reducers=="function"?n.reducers(OO()):n.reducers)||{},p=Object.keys(i),m={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},f={addCase(w,k){let T=typeof w=="string"?w:w.type;if(!T)throw new Error(jt(12));if(T in m.sliceCaseReducersByType)throw new Error(jt(13));return m.sliceCaseReducersByType[T]=k,f},addMatcher(w,k){return m.sliceMatchers.push({matcher:w,reducer:k}),f},exposeAction(w,k){return m.actionCreators[w]=k,f},exposeCaseReducer(w,k){return m.sliceCaseReducersByName[w]=k,f}};p.forEach(w=>{let k=i[w],T={reducerName:w,type:wO(o,w),createNotation:typeof n.reducers=="function"};NO(k)?qO(T,k,f,t):kO(T,k,f)});function g(){let[w={},k=[],T=void 0]=typeof n.extraReducers=="function"?MC(n.extraReducers):[n.extraReducers],D={...w,...m.sliceCaseReducersByType};return ae(n.initialState,G=>{for(let U in D)G.addCase(U,D[U]);for(let U of m.sliceMatchers)G.addMatcher(U.matcher,U.reducer);for(let U of k)G.addMatcher(U.matcher,U.reducer);T&&G.addDefaultCase(T)})}let C=w=>w,A=new Map,y=new WeakMap,x;function b(w,k){return x||(x=g()),x(w,k)}function P(){return x||(x=g()),x.getInitialState()}function E(w,k=!1){function T(G){let U=G[w];return typeof U>"u"&&k&&(U=Gu(y,T,P)),U}function D(G=C){let U=Gu(A,k,()=>new WeakMap);return Gu(U,G,()=>{let M={};for(let[$,j]of Object.entries(n.selectors??{}))M[$]=TO(j,G,()=>Gu(y,G,P),k);return M})}return{reducerPath:w,getSelectors:D,get selectors(){return D(T)},selectSlice:T}}let I={name:o,reducer:b,actions:m.actionCreators,caseReducers:m.sliceCaseReducersByName,getInitialState:P,...E(a),injectInto(w,{reducerPath:k,...T}={}){let D=k??a;return w.inject({reducerPath:D,reducer:b},T),{...I,...E(D,!0)}}};return I}}function TO(e,t,r,n){function o(a,...i){let p=t(a);return typeof p>"u"&&n&&(p=r()),e(p,...i)}return o.unwrapped=e,o}var Oo=IO();function OO(){function e(t,r){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...r}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...r){return t(...r)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,r){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:r}},asyncThunk:e}}function kO({type:e,reducerName:t,createNotation:r},n,o){let a,i;if("reducer"in n){if(r&&!_O(n))throw new Error(jt(17));a=n.reducer,i=n.prepare}else a=n;o.addCase(e,a).exposeCaseReducer(t,a).exposeAction(t,i?F(e,i):F(e))}function NO(e){return e._reducerDefinitionType==="asyncThunk"}function _O(e){return e._reducerDefinitionType==="reducerWithPrepare"}function qO({type:e,reducerName:t},r,n,o){if(!o)throw new Error(jt(18));let{payloadCreator:a,fulfilled:i,pending:p,rejected:m,settled:f,options:g}=r,C=o(e,a,g);n.exposeAction(t,C),i&&n.addCase(C.fulfilled,i),p&&n.addCase(C.pending,p),m&&n.addCase(C.rejected,m),f&&n.addMatcher(C.settled,f),n.exposeCaseReducer(t,{fulfilled:i||zu,pending:p||zu,rejected:m||zu,settled:f||zu})}function zu(){}var DO="task",QC="listener",BC="completed",eg="cancelled",VO=`task-${eg}`,jO=`task-${BC}`,Zf=`${QC}-${eg}`,MO=`${QC}-${BC}`,Zu=class{constructor(e){pe(this,"code");pe(this,"name","TaskAbortError");pe(this,"message");this.code=e,this.message=`${DO} ${eg} (reason: ${e})`}},tg=(e,t)=>{if(typeof e!="function")throw new TypeError(jt(32))},Hu=()=>{},$C=(e,t=Hu)=>(e.catch(t),e),GC=(e,t)=>(e.addEventListener("abort",t,{once:!0}),()=>e.removeEventListener("abort",t)),Io=e=>{if(e.aborted)throw new Zu(e.reason)};function zC(e,t){let r=Hu;return new Promise((n,o)=>{let a=()=>o(new Zu(e.reason));if(e.aborted){a();return}r=GC(e,a),t.finally(()=>r()).then(n,o)}).finally(()=>{r=Hu})}var LO=async(e,t)=>{try{return await Promise.resolve(),{status:"ok",value:await e()}}catch(r){return{status:r instanceof Zu?"cancelled":"rejected",error:r}}finally{t?.()}},Wu=e=>t=>$C(zC(e,t).then(r=>(Io(e),r))),HC=e=>{let t=Wu(e);return r=>t(new Promise(n=>setTimeout(n,r)))},{assign:Ba}=Object,_C={},Ju="listenerMiddleware",UO=(e,t)=>{let r=n=>GC(e,()=>n.abort(e.reason));return(n,o)=>{tg(n,"taskExecutor");let a=new s.AbortController;r(a);let i=LO(async()=>{Io(e),Io(a.signal);let p=await n({pause:Wu(a.signal),delay:HC(a.signal),signal:a.signal});return Io(a.signal),p},()=>a.abort(jO));return o?.autoJoin&&t.push(i.catch(Hu)),{result:Wu(e)(i),cancel(){a.abort(VO)}}}},QO=(e,t)=>{let r=async(n,o)=>{Io(t);let a=()=>{},p=[new Promise((m,f)=>{let g=e({predicate:n,effect:(C,A)=>{A.unsubscribe(),m([C,A.getState(),A.getOriginalState()])}});a=()=>{g(),f()}})];o!=null&&p.push(new Promise(m=>setTimeout(m,o,null)));try{let m=await zC(t,Promise.race(p));return Io(t),m}finally{a()}};return((n,o)=>$C(r(n,o)))},WC=e=>{let{type:t,actionCreator:r,matcher:n,predicate:o,effect:a}=e;if(t)o=F(t).match;else if(r)t=r.type,o=r.match;else if(n)o=n;else if(!o)throw new Error(jt(21));return tg(a,"options.listener"),{predicate:o,type:t,effect:a}},KC=Ba(e=>{let{type:t,predicate:r,effect:n}=WC(e);return{id:oc(),effect:n,type:t,predicate:r,pending:new Set,unsubscribe:()=>{throw new Error(jt(22))}}},{withTypes:()=>KC}),qC=(e,t)=>{let{type:r,effect:n,predicate:o}=WC(t);return Array.from(e.values()).find(a=>(typeof r=="string"?a.type===r:a.predicate===o)&&a.effect===n)},Jf=e=>{e.pending.forEach(t=>{t.abort(Zf)})},BO=(e,t)=>()=>{for(let r of t.keys())Jf(r);e.clear()},DC=(e,t,r)=>{try{e(t,r)}catch(n){setTimeout(()=>{throw n},0)}},YC=Ba(F(`${Ju}/add`),{withTypes:()=>YC}),$O=F(`${Ju}/removeAll`),XC=Ba(F(`${Ju}/remove`),{withTypes:()=>XC}),GO=(...e)=>{console.error(`${Ju}/error`,...e)},ZC=(e={})=>{let t=new Map,r=new Map,n=y=>{let x=r.get(y)??0;r.set(y,x+1)},o=y=>{let x=r.get(y)??1;x===1?r.delete(y):r.set(y,x-1)},{extra:a,onError:i=GO}=e;tg(i,"onError");let p=y=>(y.unsubscribe=()=>t.delete(y.id),t.set(y.id,y),x=>{y.unsubscribe(),x?.cancelActive&&Jf(y)}),m=(y=>{let x=qC(t,y)??KC(y);return p(x)});Ba(m,{withTypes:()=>m});let f=y=>{let x=qC(t,y);return x&&(x.unsubscribe(),y.cancelActive&&Jf(x)),!!x};Ba(f,{withTypes:()=>f});let g=async(y,x,b,P)=>{let E=new s.AbortController,I=QO(m,E.signal),w=[];try{y.pending.add(E),n(y),await Promise.resolve(y.effect(x,Ba({},b,{getOriginalState:P,condition:(k,T)=>I(k,T).then(Boolean),take:I,delay:HC(E.signal),pause:Wu(E.signal),extra:a,signal:E.signal,fork:UO(E.signal,w),unsubscribe:y.unsubscribe,subscribe:()=>{t.set(y.id,y)},cancelActiveListeners:()=>{y.pending.forEach((k,T,D)=>{k!==E&&(k.abort(Zf),D.delete(k))})},cancel:()=>{E.abort(Zf),y.pending.delete(E)},throwIfCancelled:()=>{Io(E.signal)}})))}catch(k){k instanceof Zu||DC(i,k,{raisedBy:"effect"})}finally{await Promise.all(w),E.abort(MO),o(y),y.pending.delete(E)}},C=BO(t,r);return{middleware:y=>x=>b=>{if(!Ls(b))return x(b);if(YC.match(b))return m(b.payload);if($O.match(b)){C();return}if(XC.match(b))return f(b.payload);let P=y.getState(),E=()=>{if(P===_C)throw new Error(jt(23));return P},I;try{if(I=x(b),t.size>0){let w=y.getState(),k=Array.from(t.values());for(let T of k){let D=!1;try{D=T.predicate(b,w,P)}catch(G){D=!1,DC(i,G,{raisedBy:"predicate"})}D&&g(T,b,y,E)}}}finally{P=_C}return I},startListening:m,stopListening:f,clearListeners:C}};function jt(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}d();c();l();u();var jn=e=>e.commercePagination?.principal.perPage||0,el=(e,t)=>e.commercePagination?.recommendations[t]?.perPage||0,Mn=e=>e.commercePagination?.principal.totalEntries||0,tl=(e,t)=>e.commercePagination?.recommendations[t]?.totalEntries||0,rl=e=>e.commercePagination?.principal.page||0,JC=(e,t)=>e.commercePagination?.recommendations[t]?.page||0;var ac=e=>e.productListing.responseId,ev=e=>e.productListing.requestId,ic=e=>e.productListing?.results.length||e.productListing?.products.length||0,tv=le(e=>({total:Mn(e),current:ic(e)}),({current:e,total:t})=>e<t),rv=e=>{let t=e.productListing?.isLoading;return ie(t)?!1:t},nv=e=>e.productListing?.error??null;d();c();l();u();d();c();l();u();d();c();l();u();d();c();l();u();var{getOwnPropertyNames:HO,getOwnPropertySymbols:WO}=Object,{hasOwnProperty:KO}=Object.prototype;function rg(e,t){return function(n,o,a){return e(n,o,a)&&t(n,o,a)}}function nl(e){return function(r,n,o){if(!r||!n||typeof r!="object"||typeof n!="object")return e(r,n,o);let{cache:a}=o,i=a.get(r),p=a.get(n);if(i&&p)return i===n&&p===r;a.set(r,n),a.set(n,r);let m=e(r,n,o);return a.delete(r),a.delete(n),m}}function ov(e){return HO(e).concat(WO(e))}var YO=Object.hasOwn||((e,t)=>KO.call(e,t)),XO="__v",ZO="__o",JO="_owner",{getOwnPropertyDescriptor:av,keys:iv}=Object,ko=Object.is||function(t,r){return t===r?t!==0||1/t===1/r:t!==t&&r!==r};function ek(e,t){return e===t}function tk(e,t){return e.byteLength===t.byteLength&&ol(new Uint8Array(e),new Uint8Array(t))}function rk(e,t,r){let n=e.length;if(t.length!==n)return!1;for(;n-- >0;)if(!r.equals(e[n],t[n],n,n,e,t,r))return!1;return!0}function nk(e,t){return e.byteLength===t.byteLength&&ol(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}function ok(e,t){return ko(e.getTime(),t.getTime())}function ak(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function sv(e,t,r){let n=e.size;if(n!==t.size)return!1;if(!n)return!0;let o=new Array(n),a=e.entries(),i,p,m=0;for(;(i=a.next())&&!i.done;){let f=t.entries(),g=!1,C=0;for(;(p=f.next())&&!p.done;){if(o[C]){C++;continue}let A=i.value,y=p.value;if(r.equals(A[0],y[0],m,C,e,t,r)&&r.equals(A[1],y[1],A[0],y[0],e,t,r)){g=o[C]=!0;break}C++}if(!g)return!1;m++}return!0}function ik(e,t,r){let n=iv(e),o=n.length;if(iv(t).length!==o)return!1;for(;o-- >0;)if(!uv(e,t,r,n[o]))return!1;return!0}function sc(e,t,r){let n=ov(e),o=n.length;if(ov(t).length!==o)return!1;let a,i,p;for(;o-- >0;)if(a=n[o],!uv(e,t,r,a)||(i=av(e,a),p=av(t,a),(i||p)&&(!i||!p||i.configurable!==p.configurable||i.enumerable!==p.enumerable||i.writable!==p.writable)))return!1;return!0}function sk(e,t){return ko(e.valueOf(),t.valueOf())}function ck(e,t){return e.source===t.source&&e.flags===t.flags}function cv(e,t,r){let n=e.size;if(n!==t.size)return!1;if(!n)return!0;let o=new Array(n),a=e.values(),i,p;for(;(i=a.next())&&!i.done;){let m=t.values(),f=!1,g=0;for(;(p=m.next())&&!p.done;){if(!o[g]&&r.equals(i.value,p.value,i.value,p.value,e,t,r)){f=o[g]=!0;break}g++}if(!f)return!1}return!0}function ol(e,t){let r=e.byteLength;if(t.byteLength!==r||e.byteOffset!==t.byteOffset)return!1;for(;r-- >0;)if(e[r]!==t[r])return!1;return!0}function uk(e,t){return e.hostname===t.hostname&&e.pathname===t.pathname&&e.protocol===t.protocol&&e.port===t.port&&e.hash===t.hash&&e.username===t.username&&e.password===t.password}function uv(e,t,r,n){return(n===JO||n===ZO||n===XO)&&(e.$$typeof||t.$$typeof)?!0:YO(t,n)&&r.equals(e[n],t[n],n,n,e,t,r)}var lk=Object.prototype.toString;function dk(e){let t=gk(e),{areArraysEqual:r,areDatesEqual:n,areFunctionsEqual:o,areMapsEqual:a,areNumbersEqual:i,areObjectsEqual:p,areRegExpsEqual:m,areSetsEqual:f,getUnsupportedCustomComparator:g}=e;return function(A,y,x){if(A===y)return!0;if(A==null||y==null)return!1;let b=typeof A;if(b!==typeof y)return!1;if(b!=="object")return b==="number"||b==="bigint"?i(A,y,x):b==="function"?o(A,y,x):!1;let P=A.constructor;if(P!==y.constructor)return!1;if(P===Object)return p(A,y,x);if(P===Array)return r(A,y,x);if(P===Date)return n(A,y,x);if(P===RegExp)return m(A,y,x);if(P===Map)return a(A,y,x);if(P===Set)return f(A,y,x);if(P===Promise)return!1;if(Array.isArray(A))return r(A,y,x);let E=lk.call(A),I=t[E];if(I)return I(A,y,x);let w=g&&g(A,y,x,E);return w?w(A,y,x):!1}}function pk({circular:e,createCustomConfig:t,strict:r}){let n={areArrayBuffersEqual:tk,areArraysEqual:r?sc:rk,areDataViewsEqual:nk,areDatesEqual:ok,areErrorsEqual:ak,areFunctionsEqual:ek,areMapsEqual:r?rg(sv,sc):sv,areNumbersEqual:ko,areObjectsEqual:r?sc:ik,arePrimitiveWrappersEqual:sk,areRegExpsEqual:ck,areSetsEqual:r?rg(cv,sc):cv,areTypedArraysEqual:r?rg(ol,sc):ol,areUrlsEqual:uk,getUnsupportedCustomComparator:void 0};if(t&&(n=Object.assign({},n,t(n))),e){let o=nl(n.areArraysEqual),a=nl(n.areMapsEqual),i=nl(n.areObjectsEqual),p=nl(n.areSetsEqual);n=Object.assign({},n,{areArraysEqual:o,areMapsEqual:a,areObjectsEqual:i,areSetsEqual:p})}return n}function mk(e){return function(t,r,n,o,a,i,p){return e(t,r,p)}}function fk({circular:e,comparator:t,createState:r,equals:n,strict:o}){if(r)return function(p,m){let{cache:f=e?new WeakMap:void 0,meta:g}=r();return t(p,m,{cache:f,equals:n,meta:g,strict:o})};if(e)return function(p,m){return t(p,m,{cache:new WeakMap,equals:n,meta:void 0,strict:o})};let a={cache:void 0,equals:n,meta:void 0,strict:o};return function(p,m){return t(p,m,a)}}function gk({areArrayBuffersEqual:e,areArraysEqual:t,areDataViewsEqual:r,areDatesEqual:n,areErrorsEqual:o,areFunctionsEqual:a,areMapsEqual:i,areNumbersEqual:p,areObjectsEqual:m,arePrimitiveWrappersEqual:f,areRegExpsEqual:g,areSetsEqual:C,areTypedArraysEqual:A,areUrlsEqual:y}){return{"[object Arguments]":m,"[object Array]":t,"[object ArrayBuffer]":e,"[object AsyncGeneratorFunction]":a,"[object BigInt]":p,"[object BigInt64Array]":A,"[object BigUint64Array]":A,"[object Boolean]":f,"[object DataView]":r,"[object Date]":n,"[object Error]":o,"[object Float16Array]":A,"[object Float32Array]":A,"[object Float64Array]":A,"[object Function]":a,"[object GeneratorFunction]":a,"[object Int8Array]":A,"[object Int16Array]":A,"[object Int32Array]":A,"[object Map]":i,"[object Number]":f,"[object Object]":(x,b,P)=>typeof x.then!="function"&&typeof b.then!="function"&&m(x,b,P),"[object RegExp]":g,"[object Set]":C,"[object String]":f,"[object URL]":y,"[object Uint8Array]":A,"[object Uint8ClampedArray]":A,"[object Uint16Array]":A,"[object Uint32Array]":A}}var ng=Vr(),V$=Vr({strict:!0}),j$=Vr({circular:!0}),M$=Vr({circular:!0,strict:!0}),L$=Vr({createInternalComparator:()=>ko}),U$=Vr({strict:!0,createInternalComparator:()=>ko}),Q$=Vr({circular:!0,createInternalComparator:()=>ko}),B$=Vr({circular:!0,createInternalComparator:()=>ko,strict:!0});function Vr(e={}){let{circular:t=!1,createInternalComparator:r,createState:n,strict:o=!1}=e,a=pk(e),i=dk(a),p=r?r(i):mk(i);return fk({circular:t,comparator:i,createState:n,equals:p,strict:o})}function lv(e,t,r=(n,o)=>n===o){return e.length===t.length&&e.findIndex((n,o)=>!r(t[o],n))===-1}function yk(e,t){return e.length!==t.length?!1:e.every(r=>t.findIndex(n=>No(r,n))!==-1)}var No=Vr({createCustomConfig:e=>({...e,areArraysEqual:yk})});function og(e,t,r){if(e===void 0)return{};let n=t(e);return n!==r?{q:n}:{}}function ag(e,t,r){if(e===void 0)return{};let n=t(e);return!ng(n,r)?{sortCriteria:n}:{}}function jr(e,t,r,n){if(e===void 0)return{};let o=Object.entries(e).filter(([a])=>t(a)).map(([a,{request:i}])=>{let p=r(i);return p.length?{[a]:p}:{}}).reduce((a,i)=>({...a,...i}),{});return Object.keys(o).length?{[n]:o}:{}}d();c();l();u();d();c();l();u();function Mr(e){let{activeValue:t,ancestryMap:r}=hk(e);return t?Sk(t,r):[]}function hk(e){let t=[...e],r=new Map;for(;t.length>0;){let n=t.shift();if(n.state==="selected")return{activeValue:n,ancestryMap:r};if(r)for(let o of n.children)r.set(o,n);t.unshift(...n.children)}return{}}function Sk(e,t){let r=[];if(!e)return[];let n=e;do r.unshift(n),n=t.get(n);while(n);return r}d();c();l();u();function dv(){return{principal:Ln(),recommendations:{}}}function Ln(){return{page:0,perPage:0,totalEntries:0,totalPages:0}}d();c();l();u();d();c();l();u();d();c();l();u();var Pr=(r=>(r.Relevance="relevance",r.Fields="fields",r))(Pr||{}),_o=(r=>(r.Ascending="asc",r.Descending="desc",r))(_o||{}),Er=()=>({by:"relevance"});var cc=e=>({by:"fields",fields:e}),pv=new H({options:{required:!1},values:{by:new Vn({enum:Pr,required:!0}),fields:new fe({each:new H({values:{field:new L({required:!0}),direction:new Vn({enum:_o}),displayName:new L}})})}});function qo(){return{appliedSort:Er(),availableSorts:[Er()]}}function al(e){return{...Ck(e?.commercePagination,t=>t.principal.page,Ln().page),...vk(e?.commercePagination,t=>t.principal.perPage,Ln().perPage),...ag(e?.commerceSort,t=>t.appliedSort,qo().appliedSort),...jr(e.commerceFacetSet,Un(e,"regular"),xk,"f"),...jr(e.commerceFacetSet,Un(e,"regular"),bk,"fExcluded"),...jr(e.commerceFacetSet,Un(e,"location"),Ak,"lf"),...jr(e.commerceFacetSet,Un(e,"hierarchical"),Rk,"cf"),...jr(e.commerceFacetSet,Un(e,"dateRange"),mv,"df"),...jr(e.commerceFacetSet,Un(e,"dateRange"),fv,"dfExcluded"),...jr(e.commerceFacetSet,Un(e,"numericalRange"),mv,"nf"),...jr(e.commerceFacetSet,Un(e,"numericalRange"),fv,"nfExcluded"),...gv("selected",e.manualNumericFacetSet),...gv("excluded",e.manualNumericFacetSet)}}function Ck(e,t,r){if(e===void 0)return{};let n=t(e);return n!==r?{page:n}:{}}function vk(e,t,r){if(e===void 0)return{};let n=t(e);return n!==r?{perPage:n}:{}}function xk(e){return e.values.filter(t=>t.state==="selected").map(t=>t.value)}function bk(e){return e.values.filter(t=>t.state==="excluded").map(t=>t.value)}function Ak(e){return e.values.filter(t=>t.state==="selected").map(t=>t.value)}function mv(e){return e.values.filter(t=>t.state==="selected")}function fv(e){return e.values.filter(t=>t.state==="excluded")}function gv(e,t){if(!t||e==="idle")return{};let r=Object.entries(t).map(([n,o])=>{if(!(o.manualRange===void 0||o.manualRange.state!==e))return{[n]:[o.manualRange]}}).filter(n=>n!==void 0).reduce((n,o)=>({...n,...o}),{});return e==="selected"?{mnf:r}:{mnfExcluded:r}}function Rk(e){return Mr(e.values).map(r=>r.value)}function Un(e,t){return r=>e.commerceFacetSet[r].request.type===t}d();c();l();u();var il=()=>({query:""});var uc=e=>e.commerceSearch.responseId,yv=e=>e.commerceSearch.requestId,lc=e=>e.commerceSearch?.products.length||0,hv=le(e=>({total:Mn(e),current:lc(e)}),({current:e,total:t})=>e<t),Sv=e=>{let t=e.commerceSearch?.isLoading;return ie(t)?!1:t},Cv=e=>e.commerceSearch?.error??null,sl=e=>e.commerceQuery?.query??"",Pk=e=>e.commerceSearch?.queryExecuted,vv=(e,t)=>ie(t.queryCorrection?.correctedQuery)?sl(e):t.queryCorrection.correctedQuery,xv=e=>({...og(e?.commerceQuery,t=>t.query,il().query),...al(e)});function bv(e){return{query:Pk(e)||""}}var ig;(t=>t.responseIdSelector=Av(uc))(ig||(ig={}));var sg;(t=>t.responseIdSelector=Av(ac))(sg||(sg={}));function Av(e){return t=>e(t[ee])}var pg={};Da(pg,{escapeHtml:()=>za,getHighlightedSuggestion:()=>dg,highlightString:()=>Fk});d();c();l();u();d();c();l();u();var Do=(e,t=5)=>e+Math.random().toString(36).substring(2,2+t);function ug(e){return Array.isArray(e)}function cl(e){return e.trim()===""}function Rv(e){let t={};for(let[r,n]of e)t[r]=n;return t}function dc(e){if(typeof e!="object"||!e)return e;try{return JSON.parse(JSON.stringify(e))}catch{return e}}function ul(e,t,r={}){let n;return((...o)=>{let a=r.isImmediate&&!n;if(clearTimeout(n),n=setTimeout(()=>{n=void 0,r.isImmediate||e.apply(void 0,o)},t),a)return e.apply(void 0,o)})}function Fk(e){if(cl(e.openingDelimiter)||cl(e.closingDelimiter))throw Error("delimiters should be a non-empty string");if(ie(e.content)||cl(e.content))return e.content;if(e.highlights.length===0)return za(e.content);let t=e.content.length,r="",n=0;for(let o=0;o<e.highlights.length;o++){let a=e.highlights[o],i=a.offset,p=i+a.length;if(p>t)break;r+=za(e.content.slice(n,i)),r+=e.openingDelimiter,r+=za(e.content.slice(i,p)),r+=e.closingDelimiter,n=p}return n!==t&&(r+=za(e.content.slice(n))),r}function dg(e,t){return e=za(e),e.replace(/\[(.*?)\]|\{(.*?)\}|\((.*?)\)/g,(r,n,o,a)=>n?lg(n,t.notMatchDelimiters):o?lg(o,t.exactMatchDelimiters):a?lg(a,t.correctionDelimiters):r)}function lg(e,t){return t?t.open+e+t.close:e}function za(e){let t={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},r=`(?:${Object.keys(t).join("|")})`,n=RegExp(r),o=RegExp(r,"g");return n.test(e)?e.replace(o,a=>t[a]):e}d();c();l();u();d();c();l();u();var Dv=Rr(kv(),1);d();c();l();u();var de=new Error("Failed to load reducers."),Ha=class extends Error{constructor(){super(),this.name="UnauthorizedTokenError",this.message="The token being used to perform the request is unauthorized. It may be expired or invalid."}},jo=class extends Error{constructor(r,n){super();pe(this,"statusCode");this.name="Disconnected",this.message=`Client could not connect to the following URL: ${r}`,this.statusCode=n??0}};d();c();l();u();function Nv(e){let t=[];for(let r in e){let n=encodeURIComponent(r),o=encodeURIComponent(e[r]);t.push(`${n}=${o}`)}return t.join("&")}function _v(e){return typeof e!="object"||!e?!1:Object.values(e).every(Jk)}function Jk(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"}function qv(e){return e===429}var Wa=class e{static async call(t){let r=e0(t),{logger:n}=t,o=await e.preprocessRequest(r,t);n.info(o,"Platform request");let{url:a,...i}=o,p=async()=>{let m=await S(a,i);if(qv(m.status))throw m;return m};try{let m=await(0,Dv.backOff)(p,{startingDelay:100,timeMultiple:2,maxDelay:800,numOfAttempts:4,jitter:"full",retry:async f=>{let g=f&&qv(f.status);return g&&(n.info("Platform retrying request"),await new Promise(C=>setTimeout(C,1e3))),g}});switch(m.status){case 419:case 401:throw n.info("Platform renewing token"),new Ha;case 404:throw new jo(a,m.status);default:return n.info({response:m,requestInfo:o},"Platform response"),m}}catch(m){return m.message==="Failed to fetch"?new jo(a):m}}static async preprocessRequest(t,r){let{origin:n,preprocessRequest:o,logger:a,requestMetadata:i}=r,{signal:p,...m}=t,f=dc(m);try{let g=await o(t,n,i);return{...t,...g}}catch(g){a.error(g,"Platform request preprocessing failed. Returning default request options.")}return f}};function Ut(e,t="prod",r="platform"){let n=t==="prod"?"":t,o=r==="platform"?"":`.${r}`;return`https://${e}${o}.org${n}.coveo.com`}function Ka(e,t,r="prod"){return e??Ut(t,r)}function rr(e,t="prod"){return`${Ut(e,t)}/rest/search/v2`}function dl(e,t="prod"){return`${Ut(e,t,"analytics")}/rest/organizations/${e}/events/v1`}function e0(e){let{url:t,method:r,requestParams:n,contentType:o,accessToken:a,signal:i}=e,p=e.method==="POST"||e.method==="PUT",m=t0(n,o);return{url:t,method:r,headers:{"Content-Type":o,Authorization:`Bearer ${a}`,...e.headers},...p&&{body:m},signal:i}}function t0(e,t){return t==="application/x-www-form-urlencoded"?_v(e)?Nv(e):"":JSON.stringify(e)}d();c();l();u();function r0(e){return{statusCode:e.statusCode,type:e.name,message:e.message}}function n0(e){return{statusCode:e.code,type:e.name,message:e.message,ignored:!0}}function xg(e,t){if(t&&e.name==="AbortError")return{error:n0(e)};if(e instanceof jo)return{error:r0(e)};throw e}d();c();l();u();d();c();l();u();var Vv=["badges"];var fc=(e,t)=>({...hn(e,t),requestParams:o0(e)}),o0=e=>{let{trackingId:t,clientId:r,context:n,language:o,country:a,currency:i,page:p,perPage:m,facets:f,sort:g}=e;return{trackingId:t,clientId:r,context:n,language:o,country:a,currency:i,page:p,perPage:m,facets:f,sort:g}},hn=(e,t)=>{let{url:r,trackingId:n,accessToken:o}=e,a=a0(r,n,t);return{accessToken:o,method:"POST",contentType:"application/json",url:a,origin:"commerceApiFetch",requestMetadata:{method:t}}},a0=(e,t,r)=>t&&Vv.includes(r)?`${e}/tracking-ids/${t}/${r}`:`${e}/${r}`;d();c();l();u();var jv=e=>({...hn(e,"badges"),requestParams:i0(e)}),i0=e=>{let{language:t,country:r,currency:n,placementIds:o,context:a,clientId:i}=e;return{language:t,country:r,currency:n,placementIds:o,context:a,...i&&{clientId:i}}};d();c();l();u();var Mv=(e,t)=>({...hn(e,t),requestParams:s0(e)}),s0=e=>{let{slotId:t,trackingId:r,clientId:n,context:o,language:a,country:i,currency:p,page:m,perPage:f}=e;return{slotId:t,trackingId:r,clientId:n,context:o,language:a,country:i,currency:p,page:m,perPage:f}};d();c();l();u();var Lv=e=>({...hn(e,"search/redirect"),requestParams:c0(e)}),c0=e=>{let{trackingId:t,query:r,clientId:n,context:o,language:a,country:i,currency:p}=e;return{trackingId:t,query:r,clientId:n,context:o,language:a,country:i,currency:p}};d();c();l();u();var Uv=e=>({...hn(e,"search/querySuggest"),requestParams:u0(e)}),u0=e=>{let{trackingId:t,query:r,clientId:n,context:o,language:a,country:i,currency:p}=e;return{trackingId:t,query:r,clientId:n,context:o,language:a,country:i,currency:p}};var Pt=e=>e.error!==void 0,pl=class{constructor(t){pe(this,"options",t)}async getProductListing(t){let r=fc(t,"listing");return this.query({...r,requestParams:{...r.requestParams,enableResults:!!t?.enableResults},...this.options})}async search(t){let r=fc(t,"search");return this.query({...r,requestParams:{...r.requestParams,query:t?.query,enableResults:!!t?.enableResults},...this.options})}async getRecommendations(t){return this.query({...Mv(t,"recommendations"),...this.options})}async productSuggestions(t){let r=fc(t,"search/productSuggest");return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async querySuggest(t){let r=Uv(t);return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async facetSearch(t,r){let n=fc(t,"facet");return this.query({...n,url:`${n.url}?type=${r}`,requestParams:{...n.requestParams,facetId:t?.facetId,facetQuery:t?.facetQuery,query:t?.query,numberOfValues:t?.numberOfValues},...this.options})}async getBadges(t){return this.query({...jv(t),...this.options})}async plan(t){let r=Lv(t);return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async query(t){let r=await Wa.call(t);if(r instanceof Error)return xg(r);let n=await r.json();return r.ok?{success:n}:{error:n}}};function ml(e,t="prod"){return`${Ut(e,t)}/rest/organizations/${e}/commerce/v2`}d();c();l();u();var Mo=(n=>(n.CHILD_PRODUCT="childProduct",n.PRODUCT="product",n.SPOTLIGHT="spotlight",n))(Mo||{});d();c();l();u();var yc=Rr(fl(),1),zv=Rr(Qv(),1);d();c();l();u();var gl=Rr(fl(),1),$v=Rr(Bv(),1);gl.default.extend($v.default);var yl="YYYY/MM/DD@HH:mm:ss",l0="1401-01-01";function Lo(e,t){let r=(0,gl.default)(e,t);return!r.isValid()&&!t?(0,gl.default)(e,yl):r}function gc(e){return e.format(yl)}function Gv(e){return gc(Lo(e))===e}function hl(e,t){let r=Lo(e,t);if(!r.isValid()){let n=". Please provide a date format string in the configuration options. See https://day.js.org/docs/en/parse/string-format for more information.",o=` with the format "${t}"`;throw new Error(`Could not parse the provided date "${e}"${t?o:n}`)}wg(r)}function wg(e){if(e.isBefore(l0))throw new Error(`Date is before year 1401, which is unsupported by the API: ${e}`)}yc.default.extend(zv.default);var Hv=["past","now","next"],Wv=["minute","hour","day","week","month","quarter","year"],d0=e=>{let t=e==="now";return{amount:new Z({required:!t,min:1}),unit:new L({required:!t,constrainTo:Wv}),period:new L({required:!0,constrainTo:Hv})}};function Qn(e){if(typeof e=="string"&&!Lr(e))throw new Error(`The value "${e}" is not respecting the relative date format "period-amount-unit"`);let t=typeof e=="string"?Ig(e):e;new Ee(d0(t.period)).validate(t);let r=Yv(t),n=JSON.stringify(t);if(!r.isValid())throw new Error(`Date is invalid: ${n}`);wg(r)}function Kv(e){let{period:t,amount:r,unit:n}=e;switch(t){case"past":case"next":return`${t}-${r}-${n}`;case"now":return t}}function Yv(e){let{period:t,amount:r,unit:n}=e;switch(t){case"past":return(0,yc.default)().subtract(r,n);case"next":return(0,yc.default)().add(r,n);case"now":return(0,yc.default)()}}function hc(e){return gc(Yv(Ig(e)))}function Xv(e){return e.toLocaleLowerCase().split("-")}function Lr(e){let[t,r,n]=Xv(e);if(t==="now")return!0;if(!Hv.includes(t)||!Wv.includes(n))return!1;let o=parseInt(r,10);return!(Number.isNaN(o)||o<=0)}function Zv(e){return!!e&&typeof e=="object"&&"period"in e}function Ig(e){let[t,r,n]=Xv(e);return t==="now"?{period:"now"}:{period:t,amount:r?parseInt(r,10):void 0,unit:n||void 0}}function Jv(e){return Qn(e),Ig(e)}d();c();l();u();d();c();l();u();var Sl=e=>e;d();c();l();u();d();c();l();u();var B=new L({required:!0,emptyAllowed:!1}),Be=new L({required:!1,emptyAllowed:!1}),rt=new L({required:!0,emptyAllowed:!0}),ex=new L({required:!1,emptyAllowed:!0}),tx=new fe({each:B,required:!0}),rx=new L({required:!1,emptyAllowed:!1,regex:/^\d+\.\d+\.\d+$/}),nx=new L({required:!1,emptyAllowed:!1,regex:/^[a-zA-Z0-9_\-.]{1,100}$/}),ox=new L({required:!0,emptyAllowed:!1,regex:/^[a-zA-Z0-9_\-.]{1,100}$/}),Mt=({message:e,name:t,stack:r})=>({message:e,name:t,stack:r}),st=(e,t)=>{if("required"in t)return{payload:new Ee({value:t}).validate({value:e}).value};let o=new H({options:{required:!0},values:t}).validate(e);if(o)throw new js(o);return{payload:e}},O=(e,t)=>{try{return st(e,t)}catch(r){return{payload:e,error:Mt(r)}}},Et=(e,t,r,n)=>{let o=`Check the initialState of ${n}`;return ax(e,t,r,o,"Controller initialization error")},Lt=(e,t,r,n)=>{let o=`Check the options of ${n}`;return ax(e,t,r,o,"Controller initialization error")},ax=(e,t,r,n,o)=>{try{return t.validate(r,n)}catch(a){throw e.logger.error(a,o),a}};d();c();l();u();d();c();l();u();var Bn="3.51.1",ix=["@coveo/atomic","@coveo/quantic"];var Tg=()=>Be,sx=()=>B,Uo=F("configuration/updateBasicConfiguration",e=>O(e,{accessToken:Be,environment:new L({required:!1,constrainTo:["prod","hipaa","stg","dev"]}),organizationId:Be})),cx=F("configuration/updateSearchConfiguration",e=>O(e,{proxyBaseUrl:new L({required:!1,url:!0}),pipeline:new L({required:!1,emptyAllowed:!0}),searchHub:Be,timezone:Be,locale:Be,authenticationProviders:new fe({required:!1,each:B})})),Sc={enabled:new ne({default:!0}),originContext:Tg(),originLevel2:Tg(),originLevel3:Tg(),proxyBaseUrl:new L({required:!1,url:!0}),runtimeEnvironment:new Le,anonymous:new ne({default:!1}),deviceId:Be,userDisplayName:Be,documentLocation:Be,trackingId:nx,analyticsMode:new L({constrainTo:["legacy","next"],required:!1,default:"next"}),source:new H({options:{required:!1},values:ix.reduce((e,t)=>(e[t]=rx,e),{})})},Og=F("configuration/updateAnalyticsConfiguration",e=>O(e,Sc)),Cl=F("configuration/analytics/disable"),vl=F("configuration/analytics/enable"),ux=F("configuration/analytics/originlevel2",e=>O(e,{originLevel2:sx()})),lx=F("configuration/analytics/originlevel3",e=>O(e,{originLevel3:sx()})),dx=F("knowledge/setAgentId",e=>O(e,new L({required:!0})));var Ya=F("commerce/configuration/updateBasicConfiguration",e=>O(e,{accessToken:Be,environment:new L({required:!1,constrainTo:["prod","hipaa","stg","dev"]}),organizationId:Be})),Xa=F("commerce/configuration/updateProxyBaseUrl",e=>O(e,{proxyBaseUrl:new L({required:!1,url:!0})})),Za=F("commerce/configuration/updateAnalyticsConfiguration",e=>O(e,{enabled:Sc.enabled,proxyBaseUrl:Sc.proxyBaseUrl,source:Sc.source,trackingId:ox})),xl=F("commerce/configuration/analytics/disable"),bl=F("commerce/configuration/analytics/enable");d();c();l();u();d();c();l();u();var px=()=>({accessToken:"",environment:"prod",organizationId:"",analytics:{enabled:!0,trackingId:"",source:{}},commerce:{}});var kg=ae(px(),e=>e.addCase(Ya,(t,r)=>{mx(t,r.payload)}).addCase(Uo,(t,r)=>{mx(t,r.payload)}).addCase(Xa,(t,r)=>{p0(t,r.payload)}).addCase(Za,(t,r)=>{m0(t,r.payload)}).addCase(xl,t=>{t.analytics.enabled=!1}).addCase(bl,t=>{t.analytics.enabled=!0}));function mx(e,t){ie(t.accessToken)||(e.accessToken=t.accessToken),e.environment=t.environment??"prod",ie(t.organizationId)||(e.organizationId=t.organizationId)}function p0(e,t){ie(t.proxyBaseUrl)||(e.commerce.apiBaseUrl=t.proxyBaseUrl)}function m0(e,t){ie(t.enabled)||(e.analytics.enabled=t.enabled),ie(t.proxyBaseUrl)||(e.analytics.apiBaseUrl=t.proxyBaseUrl),ie(t.source)||(e.analytics.source=t.source),ie(t.trackingId)||(e.analytics.trackingId=t.trackingId)}d();c();l();u();d();c();l();u();d();c();l();u();function Ja(e){return e.currency}var fx=(e,t)=>({currency:Ja(t.commerceContext),products:f0(t.cart),transaction:e}),gx=(e,t)=>({currency:Ja(t.commerceContext),...e}),Qo=le(e=>e.cart,e=>e.cartItems,(e,t)=>t.map(r=>e[r])),f0=le(Qo,e=>e.map(({quantity:t,...r})=>({quantity:t,product:r})));d();c();l();u();var Ng={productId:B,quantity:new Z({required:!0,min:0}),name:new L({required:!1}),price:new Z({required:!1,min:0})},_g=new fe({each:new H({values:{...Ng}})}),qg={items:_g},yx=new Ee(qg);var $n=F("commerce/cart/setItems",e=>O(e,_g)),ei=F("commerce/cart/updateItemQuantity",e=>O(e,Ng)),ti=F("commerce/cart/purchase"),Al=ue("commerce/cart/emit/purchaseEvent",async(e,{extra:t,getState:r})=>{let n=fx(e,r()),{relay:o}=t;o.emit("ec.purchase",n)}),Rl=ue("commerce/cart/emit/cartActionEvent",async(e,{extra:t,getState:r})=>{let n=gx(e,r()),{relay:o}=t;o.emit("ec.cartAction",n)});d();c();l();u();d();c();l();u();d();c();l();u();function ge(e){let t,r=new Map,n=()=>r.size===0,o=a=>{try{let i=JSON.stringify(a),p=t!==i;return t=i,p}catch(i){return console.warn('Could not detect if state has changed, check the controller "get state method"',i),!0}};return{subscribe(a){a();let i=Symbol(),p;return n()&&(t=JSON.stringify(this.state),p=e.subscribe(()=>{o(this.state)&&r.forEach(m=>m())})),r.set(i,a),()=>{r.delete(i),n()&&p?.()}},get state(){return{}}}}d();c();l();u();function hx(e,t){return e.cart[Bo(t)]}var Sx=le(Qo,e=>e.reduce((t,r)=>t+r.quantity,0)),Cx=le(Qo,e=>e.reduce((t,r)=>t+r.price*r.quantity,0));function vx(e,t={}){if(!g0(e))throw de;let{dispatch:r}=e,n=ge(e),o=()=>e[ee].cart,a={...t.initialState};Et(e,yx,a,"buildCart"),a.items!==void 0&&r($n(a.items));function i(g,C){return C?C.quantity!==g.quantity:!0}function p(g,C){return!C||g.quantity>C.quantity?"add":"remove"}function m(g,C){return C?g.name===C.name&&g.price===C.price&&g.quantity===C.quantity:!1}function f(g,C){let{quantity:A,...y}=g,x=p(g,C),b=C?Math.abs(A-C.quantity):A;return{action:x,quantity:b,product:y}}return{...n,empty:function(){for(let g of Qo(o()))this.updateItemQuantity({...g,quantity:0})},purchase(g){r(Al(g)),r(ti())},updateItemQuantity(g){let C=hx(o(),g);!C&&g.quantity<=0||m(g,C)||(i(g,C)&&r(Rl(f(g,C))),r(ei(g)))},get state(){let g=o();return{items:Qo(g),totalQuantity:Sx(g),totalPrice:Cx(g)}}}}function Bo(e){return`${e.productId},${e.name},${e.price}`}function g0(e){return e.addReducers({cart:ri}),!0}d();c();l();u();var Pl=()=>({cartItems:[],cart:{},purchasedItems:[],purchased:{}}),xx=e=>Ax(e.cartItems,e.cart),bx=e=>Ax(e.purchasedItems,e.purchased);function Ax(e,t){let r=e.reduce((n,o)=>{let{productId:a,quantity:i}=t[o];return a in n||(n[a]={productId:a,quantity:0}),n[a].quantity+=i,n},{});return[...Object.values(r)]}var ri=ae(Pl(),e=>{e.addCase($n,(t,{payload:r})=>{let{cart:n,cartItems:o}=r.reduce((a,i)=>{let p=Bo(i);return{cartItems:[...a.cartItems,p],cart:{...a.cart,[p]:i},purchasedItems:[],purchased:{}}},Pl());Rx(t,o,n)}).addCase(ei,(t,{payload:r})=>{let n=Bo(r);if(!(n in t.cart)){y0(r,t);return}if(r.quantity<=0){h0(r,t);return}t.cart[n]=r}).addCase(ti,t=>{S0(t);let{cart:r,cartItems:n}=Pl();Rx(t,n,r)})});function Rx(e,t,r){e.cartItems=t,e.cart=r}function y0(e,t){if(e.quantity<=0)return;let r=Bo(e);t.cartItems=[...t.cartItems,r],t.cart[r]=e}function h0(e,t){let r=Bo(e);t.cartItems=t.cartItems.filter(n=>n!==r),delete t.cart[r]}function S0(e){for(let t of e.cartItems){if(t in e.purchased){e.purchased[t].quantity+=e.cart[t].quantity;continue}e.purchasedItems=[...e.purchasedItems,t],e.purchased[t]=e.cart[t]}}d();c();l();u();d();c();l();u();var C0=Intl.supportedValuesOf("currency"),v0=new L({required:!0,emptyAllowed:!1,constrainTo:C0}),Dg={url:B},Vg={latitude:new Z({min:-90,max:90,required:!0}),longitude:new Z({min:-180,max:180,required:!0})},Px={custom:new H({options:{required:!1}})},Cc={language:B,country:B,currency:v0,view:new H({options:{required:!0},values:Dg}),location:new H({options:{required:!1},values:Vg}),custom:new H({options:{required:!1}})},Ex=new Ee(Cc);var Ye=F("commerce/context/set",e=>O(e,Cc)),Je=F("commerce/context/setView",e=>O(e,Dg)),ni=F("commerce/context/setLocation",e=>O(e,Vg)),oi=F("commerce/context/setCustom",e=>O({custom:e},Px));d();c();l();u();d();c();l();u();var Fx=()=>({language:"",country:"",currency:"",view:{url:""}});var Ur=ae(Fx(),e=>{e.addCase(Ye,(t,{payload:r})=>r).addCase(Je,(t,{payload:r})=>{t.view=r}).addCase(ni,(t,{payload:r})=>{t.location=r}).addCase(oi,(t,{payload:r})=>{t.custom=r.custom})});d();c();l();u();d();c();l();u();var El=()=>({correctedQuery:"",corrections:[],originalQuery:""});d();c();l();u();d();c();l();u();d();c();l();u();var Gn=le(e=>e.source,e=>Object.entries(e).map(([t,r])=>`${t}@${r}`).concat(`@coveo/headless@${Bn}`));var Qr=(e,t)=>{let{view:r,location:n,custom:o,...a}=e.commerceContext;return{accessToken:e.configuration.accessToken,url:e.configuration.commerce.apiBaseUrl??ml(e.configuration.organizationId,e.configuration.environment),organizationId:e.configuration.organizationId,trackingId:e.configuration.analytics.trackingId,...a,...e.configuration.analytics.enabled?{clientId:t.clientId}:{},context:{user:{...n,...t.userAgent?{userAgent:t.userAgent}:{}},view:{...r,...t.referrer?{referrer:t.referrer}:{}},capture:t.capture??(e.configuration.analytics.enabled&&t.clientId!==""),cart:xx(e.cart),source:Gn(e.configuration.analytics),...o?{custom:o}:{}}}};d();c();l();u();d();c();l();u();var Fl=(e,t,r)=>({...Qr(e,t),...x0(e,r)}),x0=(e,t)=>{let r=t?e.commercePagination?.recommendations[t]:e.commercePagination?.principal;return r&&{page:r.page,...r.perPage&&{perPage:r.perPage}}};var nr=(e,t)=>({...Fl(e,t),facets:[...b0(e)],...e.commerceSort&&{sort:A0(e.commerceSort.appliedSort)}});function b0(e){return!e.facetOrder||!e.commerceFacetSet?[]:e.facetOrder.filter(t=>e.commerceFacetSet?.[t]).map(t=>e.manualNumericFacetSet?.[t]?.manualRange?{facetId:t,field:t,numberOfValues:1,isFieldExpanded:!1,preventAutoSelect:!0,type:"numericalRange",values:[e.manualNumericFacetSet[t].manualRange],initialNumberOfValues:1}:e.commerceFacetSet[t].request).filter(t=>t&&t.values.length>0)}function A0(e){return e.by==="relevance"?{sortCriteria:"relevance"}:{sortCriteria:"fields",fields:e.fields.map(({name:t,direction:r})=>({field:t,direction:r}))}}d();c();l();u();var $o=F("commerce/facets/core/updateNumberOfValues",e=>O(e,{facetId:B,numberOfValues:new Z({required:!0,min:1})})),Go=F("commerce/facets/core/updateIsFieldExpanded",e=>O(e,{facetId:B,isFieldExpanded:new ne({required:!0})})),lt=F("commerce/facets/core/clearAll"),zn=F("commerce/facets/core/deleteAll"),Ft=F("commerce/facets/core/deselectAllValues",e=>O(e,{facetId:B})),zo=F("commerce/facets/core/updateFreezeCurrentValues",e=>O(e,{facetId:B,freezeCurrentValues:new ne({required:!0})})),ai=F("commerce/facets/core/updateAutoSelectionForAll",e=>O(e,{allow:new ne({required:!0})}));d();c();l();u();var wl={slotId:ex},R0={...wl,pageSize:new Z({required:!0,min:0})},Sn=F("commerce/pagination/setPageSize",e=>O(e,R0)),P0={...wl,page:new Z({required:!0,min:0})},Br=F("commerce/pagination/selectPage",e=>O(e,P0)),Hn=F("commerce/pagination/nextPage",e=>O(e,wl)),Wn=F("commerce/pagination/previousPage",e=>O(e,wl)),ii=F("commerce/pagination/registerRecommendationsSlot",e=>O(e,{slotId:B}));d();c();l();u();var nt=F("commerce/query/update",e=>O(e,{query:new L}));d();c();l();u();d();c();l();u();var Kn=F("commerce/triggers/query/updateIgnore",e=>O(e,{q:new L({emptyAllowed:!0,required:!0})})),si=F("commerce/triggers/query/applyModification",e=>O(e,new H({values:{originalQuery:Be,modification:Be}})));var vc=class{constructor(t){pe(this,"config",t)}async process(t){return this.processQueryErrorOrContinue(t)??await this.processQueryCorrectionsOrContinue(t)??await this.processQueryTriggersOrContinue(t)??this.processSuccessResponse(t)}async fetchFromAPI(t){let r=Date.now(),n=await this.extra.apiClient.search(t),o=Date.now()-r,a=this.getState().commerceQuery.query||"";return{response:n,duration:o,queryExecuted:a,requestExecuted:t,enableResults:!!("enableResults"in t&&t.enableResults)}}processSuccessResponse(t){return{...t,response:this.getSuccessResponse(t),originalQuery:this.getCurrentQuery()}}processQueryErrorOrContinue(t){return Pt(t.response)?this.rejectWithValue(t.response.error):null}async processQueryCorrectionsOrContinue(t){let r=this.getState(),n=this.getSuccessResponse(t);if(!n||!r.didYouMean)return null;let{queryCorrection:o}=n;if(!(!ie(o)&&!ie(o.correctedQuery)))return null;let{correctedQuery:i,originalQuery:p}=n.queryCorrection;return this.onUpdateQueryForCorrection(i??""),{...t,response:{...n},queryExecuted:vv(r,n),originalQuery:p??""}}async processQueryTriggersOrContinue(t){let r=this.getSuccessResponse(t);if(!r)return null;let n=r.triggers.find(p=>p.type==="query")?.content||"";if(!n)return null;if(this.getState().triggers?.queryModification.queryToIgnore===n)return this.dispatch(Kn({q:""})),null;let a=this.getCurrentQuery(),i=await this.automaticallyRetryQueryWithTriggerModification(n,t.enableResults);return Pt(i.response)?this.rejectWithValue(i.response.error):{...i,response:{...i.response.success},originalQuery:a}}async automaticallyRetryQueryWithTriggerModification(t,r){return this.dispatch(si({newQuery:t,originalQuery:this.getCurrentQuery()})),this.onUpdateQueryForCorrection(t),await this.fetchFromAPI({...nr(this.getState(),this.navigatorContext),query:t,enableResults:!!r})}get dispatch(){return this.config.dispatch}get rejectWithValue(){return this.config.rejectWithValue}getState(){return this.config.getState()}get navigatorContext(){return this.config.extra.navigatorContext}getCurrentQuery(){let t=this.getState();return t.commerceQuery.query!==void 0?t.commerceQuery.query:""}getSuccessResponse(t){return Pt(t.response)?null:t.response.success}get extra(){return this.config.extra}onUpdateQueryForCorrection(t){this.dispatch(nt({query:t}))}};var be=ue("commerce/search/executeSearch",async(e={},t)=>{let{getState:r}=t,n=r(),{navigatorContext:o}=t.extra,a=nr(n,o),i=sl(n),p=new vc(t),m=await p.fetchFromAPI({...a,query:i,enableResults:!!e?.enableResults});return p.process(m)}),Yn=ue("commerce/search/fetchMoreProducts",async(e={},t)=>{let{getState:r}=t,n=r(),{navigatorContext:o}=t.extra;if(!hv(n))return null;let i=jn(n),m=lc(n)/i,f=sl(n),g=nr(n,o),C=new vc(t),A=await C.fetchFromAPI({...g,query:f,page:m,enableResults:!!e?.enableResults});return C.process(A)}),ci=ue("commerce/search/prepareForSearchWithQuery",(e,t)=>{let{dispatch:r}=t;O(e,{query:new L,clearFilters:new ne}),e.clearFilters&&r(zn()),r(ai({allow:!0})),r(nt({query:e.query})),r(Br({page:0}))}),ui=ue("commerce/search/fetchInstantProducts",async(e,{getState:t,rejectWithValue:r,extra:n})=>{let o=t(),{apiClient:a,navigatorContext:i}=n,{q:p}=e,m=await a.productSuggestions({...Qr(o,i),query:p});return Pt(m)?r(m.error):{response:{...m.success,products:m.success.products}}}),E0={child:new H({options:{required:!0},values:{permanentid:new L({required:!0})}})},li=F("commerce/search/promoteChildToParent",e=>O(e,E0));d();c();l();u();function wx(){return{wasCorrectedTo:"",queryCorrection:El(),originalQuery:""}}var Il=ae(wx(),e=>{e.addCase(be.pending,t=>{t.queryCorrection=El(),t.wasCorrectedTo=""}).addCase(be.fulfilled,(t,r)=>{let{queryCorrection:n}=r.payload.response;t.originalQuery=r.payload.originalQuery,t.wasCorrectedTo=n?.correctedQuery??"",t.queryCorrection={correctedQuery:n?.correctedQuery??n?.corrections[0]?.correctedQuery??"",wordCorrections:n?.corrections[0]?.wordCorrections??[]}})});d();c();l();u();d();c();l();u();function di(){return[]}d();c();l();u();var ze=ue("commerce/productListing/fetch",async(e,{getState:t,rejectWithValue:r,extra:{apiClient:n,navigatorContext:o}})=>{let a=t(),i=nr(a,o),p=await n.getProductListing({...i,enableResults:!!e?.enableResults});return Pt(p)?r(p.error):{response:p.success}}),Xn=ue("commerce/productListing/fetchMoreProducts",async(e,{getState:t,rejectWithValue:r,extra:{apiClient:n,navigatorContext:o}})=>{let a=t();if(!tv(a))return null;let p=jn(a),f=ic(a)/p,g=await n.getProductListing({...nr(a,o),enableResults:!!e?.enableResults,page:f});return Pt(g)?r(g.error):{response:g.success}}),F0={child:new H({options:{required:!0},values:{permanentid:new L({required:!0})}})},pi=F("commerce/productListing/promoteChildToParent",e=>O(e,F0));d();c();l();u();d();c();l();u();var mi={f:new H,fExcluded:new H,lf:new H,cf:new H,nf:new H,nfExcluded:new H,mnf:new H,mnfExcluded:new H,df:new H,dfExcluded:new H,sortCriteria:new H,page:new Z({min:0}),perPage:new Z({min:1})};var wt=F("commerce/productListingParameters/restore",e=>O(e,mi));d();c();l();u();d();c();l();u();var Tl={q:new L,...mi};var ot=F("commerce/searchParameters/restore",e=>O(e,Tl));var $r=ae(di(),e=>{e.addCase(ze.fulfilled,Ix).addCase(be.fulfilled,Ix).addCase(ot,Tx).addCase(wt,Tx).addCase(Je,()=>di()).addCase(Ye,()=>di())});function Ix(e,t){return t.payload.response.facets.map(r=>r.facetId)}function Tx(e,t){return[...Object.keys(t.payload.f??{}),...Object.keys(t.payload.lf??{}),...Object.keys(t.payload.nf??{}),...Object.keys(t.payload.df??{}),...Object.keys(t.payload.cf??{}),...Object.keys(t.payload.mnf??{})]}d();c();l();u();d();c();l();u();d();c();l();u();var Ae=B;d();c();l();u();var xc={facetId:Ae,captions:new H({options:{required:!1}}),numberOfValues:new Z({required:!1,min:1}),query:new L({required:!1,emptyAllowed:!0})};var w0={path:new fe({required:!0,each:B}),displayValue:rt,rawValue:rt,count:new Z({required:!0,min:0})},or=F("categoryFacet/selectSearchResult",e=>O(e,{facetId:Ae,value:new H({values:w0})})),Ol=F("categoryFacetSearch/register",e=>O(e,xc));d();c();l();u();function Ox(){return{}}d();c();l();u();function fi(e,t,r){let{facetId:n}=t;if(e[n])return;let o=!1,a={...Cn,...t},i=r();e[n]={options:a,isLoading:o,response:i,initialNumberOfValues:a.numberOfValues,requestId:""}}function kl(e,t){let{facetId:r,...n}=t,o=e[r];o&&(o.options={...o.options,...n})}function gi(e,t,r){let n=e[t];n&&(n.requestId=r,n.isLoading=!0)}function yi(e,t){let r=e[t];r&&(r.isLoading=!1)}function bc(e,t,r){let{facetId:n}=t,o=e[n];o&&(o.requestId="",o.isLoading=!1,o.response=r(),o.options.numberOfValues=o.initialNumberOfValues,o.options.query=Cn.query)}function Ho(e,t){Object.keys(e).forEach(r=>bc(e,{facetId:r},t))}var Cn={captions:{},numberOfValues:10,query:""};d();c();l();u();d();c();l();u();d();c();l();u();d();c();l();u();d();c();l();u();function Zn(e){return Object.values(e).map(t=>t.request)}function jg(e,t){let r={};e.forEach(a=>{r[a.facetId]=a});let n=[];t.forEach(a=>{a in r&&(n.push(r[a]),delete r[a])});let o=Object.values(r);return[...n,...o]}function kx(e){return Zn(e).map(t=>{let n=t.currentValues.some(({state:o})=>o!=="idle");return t.generateAutomaticRanges&&!n?{...t,currentValues:[]}:t})}var Mg={alphanumericDescending:{type:"alphanumeric",order:"descending"},alphanumericNaturalDescending:{type:"alphanumericNatural",order:"descending"}};function I0(e){return Zn(e).map(t=>{let r=Mg[t.sortCriteria];return r?{...t,sortCriteria:r}:t})}function T0(e){return[...I0(e.facetSet??{}),...kx(e.numericFacetSet??{}),...kx(e.dateFacetSet??{}),...Zn(e.categoryFacetSet??{})]}function O0(e){return T0(e).filter(({facetId:t})=>e.facetOptions?.facets[t]?.enabled??!0)}function Nl(e){return jg(O0(e),e.facetOrder??[])}d();c();l();u();d();c();l();u();d();c();l();u();d();c();l();u();d();c();l();u();var hi=class e{static set(t,r,n){let o,a,i;n&&(a=new Date,a.setTime(a.getTime()+n));let p=window.location.hostname,m=/^(\d{1,3}\.){3}\d{1,3}$/,f=/^([0-9a-fA-F]{0,4}:){2,7}[0-9a-fA-F]{0,4}$/;m.test(p)||f.test(p)||p.indexOf(".")===-1?Lg(t,r,a):(i=p.split("."),o=i[i.length-2]+"."+i[i.length-1],Lg(t,r,a,o))}static get(t){let r=t+"=",n=document.cookie.split(";");for(let o=0;o<n.length;o++){let a=n[o];if(a=a.replace(/^\s+/,""),a.lastIndexOf(r,0)===0)return a.substring(r.length,a.length)}return null}static erase(t){e.set(t,"",-1)}};function Lg(e,t,r,n){document.cookie=`${e}=${t}`+(r?`;expires=${r.toUTCString()}`:"")+(n?`;domain=${n}`:"")+";path=/;SameSite=Lax"+(window.location.protocol==="https:"?";Secure":"")}d();c();l();u();function k0(){return typeof navigator<"u"}function Nx(){try{return typeof localStorage<"u"}catch{return!1}}function _x(){try{return typeof sessionStorage<"u"}catch{return!1}}function qx(){return!!(k0()&&navigator.cookieEnabled)}var Dx=null;function Vx(){return Dx||(Nx()?localStorage:qx()?new Ug:_x()?sessionStorage:new Qg)}var Si=class Si{getItem(t){return hi.get(`${Si.prefix}${t}`)}removeItem(t){hi.erase(`${Si.prefix}${t}`)}setItem(t,r,n){hi.set(`${Si.prefix}${t}`,r,n)}};pe(Si,"prefix","coveo_");var Ug=Si;var Qg=class{getItem(t){return null}removeItem(t){}setItem(t,r){}};var _l="__coveo.analytics.history",N0=20,_0=1e3*60,q0=75,Wo=class Wo{constructor(t){pe(this,"store");this.store=t||Vx()}static getInstance(t){return Wo.instance||(Wo.instance=new Wo(t)),Wo.instance}addElement(t){t.internalTime=new Date().getTime(),t=this.cropQueryElement(this.stripEmptyQuery(t));let r=this.getHistoryWithInternalTime();r!==null?this.isValidEntry(t)&&this.setHistory([t].concat(r)):this.setHistory([t])}async addElementAsync(t){t.internalTime=new Date().getTime(),t=this.cropQueryElement(this.stripEmptyQuery(t));let r=await this.getHistoryWithInternalTimeAsync();r!==null?this.isValidEntry(t)&&this.setHistory([t].concat(r)):this.setHistory([t])}getHistory(){let t=this.getHistoryWithInternalTime();return this.stripEmptyQueries(this.stripInternalTime(t))}async getHistoryAsync(){let t=await this.getHistoryWithInternalTimeAsync();return this.stripEmptyQueries(this.stripInternalTime(t))}getHistoryWithInternalTime(){try{let t=this.store.getItem(_l);return t&&typeof t=="string"?JSON.parse(t):[]}catch{return[]}}async getHistoryWithInternalTimeAsync(){try{let t=await this.store.getItem(_l);return t?JSON.parse(t):[]}catch{return[]}}setHistory(t){try{this.store.setItem(_l,JSON.stringify(t.slice(0,N0)))}catch{}}clear(){try{this.store.removeItem(_l)}catch{}}getMostRecentElement(){let t=this.getHistoryWithInternalTime();return Array.isArray(t)?t.sort((n,o)=>(o.internalTime||0)-(n.internalTime||0))[0]:null}cropQueryElement(t){return t.name&&t.value&&t.name.toLowerCase()==="query"&&(t.value=t.value.slice(0,q0)),t}isValidEntry(t){let r=this.getMostRecentElement();return r&&r.value===t.value?(t.internalTime||0)-(r.internalTime||0)>_0:!0}stripInternalTime(t){return Array.isArray(t)?t.map(r=>{let{name:n,time:o,value:a}=r;return{name:n,time:o,value:a}}):[]}stripEmptyQuery(t){let{name:r,time:n,value:o}=t;return r&&typeof o=="string"&&r.toLowerCase()==="query"&&o.trim()===""?{name:r,time:n}:t}stripEmptyQueries(t){return t.map(r=>this.stripEmptyQuery(r))}};pe(Wo,"instance",null);var Bg=Wo,ar=Bg;d();c();l();u();d();c();l();u();d();c();l();u();function vn(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function Q(e,t,r,n){function o(a){return a instanceof r?a:new r(function(i){i(a)})}return new(r||(r=Promise))(function(a,i){function p(g){try{f(n.next(g))}catch(C){i(C)}}function m(g){try{f(n.throw(g))}catch(C){i(C)}}function f(g){g.done?a(g.value):o(g.value).then(p,m)}f((n=n.apply(e,t||[])).next())})}var Oe;(function(e){e.search="search",e.click="click",e.custom="custom",e.view="view",e.collect="collect"})(Oe||(Oe={}));function zg(){return typeof window<"u"}function ay(){return typeof navigator<"u"}function Ci(){return typeof document<"u"}function Hg(){try{return typeof localStorage<"u"}catch{return!1}}function D0(){try{return typeof sessionStorage<"u"}catch{return!1}}function Xx(){return ay()&&navigator.cookieEnabled}var V0=[Oe.click,Oe.custom,Oe.search,Oe.view],j0=(e,t)=>V0.indexOf(e)!==-1?Object.assign({language:Ci()?document.documentElement.lang:"unknown",userAgent:ay()?navigator.userAgent:"unknown"},t):t,Rc=class e{static set(t,r,n){var o,a,i,p;n&&(a=new Date,a.setTime(a.getTime()+n)),p=window.location.hostname,p.indexOf(".")===-1?jx(t,r,a):(i=p.split("."),o=i[i.length-2]+"."+i[i.length-1],jx(t,r,a,o))}static get(t){for(var r=t+"=",n=document.cookie.split(";"),o=0;o<n.length;o++){var a=n[o];if(a=a.replace(/^\s+/,""),a.lastIndexOf(r,0)===0)return a.substring(r.length,a.length)}return null}static erase(t){e.set(t,"",-1)}};function jx(e,t,r,n){document.cookie=`${e}=${t}`+(r?`;expires=${r.toUTCString()}`:"")+(n?`;domain=${n}`:"")+";path=/;SameSite=Lax"}function M0(){return Hg()?localStorage:Xx()?new Pc:D0()?sessionStorage:new xi}var Pc=class e{getItem(t){return Rc.get(`${e.prefix}${t}`)}removeItem(t){Rc.erase(`${e.prefix}${t}`)}setItem(t,r,n){Rc.set(`${e.prefix}${t}`,r,n)}};Pc.prefix="coveo_";var Wg=class{constructor(){this.cookieStorage=new Pc}getItem(t){return localStorage.getItem(t)||this.cookieStorage.getItem(t)}removeItem(t){this.cookieStorage.removeItem(t),localStorage.removeItem(t)}setItem(t,r){localStorage.setItem(t,r),this.cookieStorage.setItem(t,r,31556926e3)}},xi=class{getItem(t){return null}removeItem(t){}setItem(t,r){}},ql="__coveo.analytics.history",L0=20,U0=1e3*60,Q0=75,jl=class{constructor(t){this.store=t||M0()}addElement(t){t.internalTime=new Date().getTime(),t=this.cropQueryElement(this.stripEmptyQuery(t));let r=this.getHistoryWithInternalTime();r!=null?this.isValidEntry(t)&&this.setHistory([t].concat(r)):this.setHistory([t])}addElementAsync(t){return Q(this,void 0,void 0,function*(){t.internalTime=new Date().getTime(),t=this.cropQueryElement(this.stripEmptyQuery(t));let r=yield this.getHistoryWithInternalTimeAsync();r!=null?this.isValidEntry(t)&&this.setHistory([t].concat(r)):this.setHistory([t])})}getHistory(){let t=this.getHistoryWithInternalTime();return this.stripEmptyQueries(this.stripInternalTime(t))}getHistoryAsync(){return Q(this,void 0,void 0,function*(){let t=yield this.getHistoryWithInternalTimeAsync();return this.stripEmptyQueries(this.stripInternalTime(t))})}getHistoryWithInternalTime(){try{let t=this.store.getItem(ql);return t&&typeof t=="string"?JSON.parse(t):[]}catch{return[]}}getHistoryWithInternalTimeAsync(){return Q(this,void 0,void 0,function*(){try{let t=yield this.store.getItem(ql);return t?JSON.parse(t):[]}catch{return[]}})}setHistory(t){try{this.store.setItem(ql,JSON.stringify(t.slice(0,L0)))}catch{}}clear(){try{this.store.removeItem(ql)}catch{}}getMostRecentElement(){let t=this.getHistoryWithInternalTime();return Array.isArray(t)?t.sort((n,o)=>(o.internalTime||0)-(n.internalTime||0))[0]:null}cropQueryElement(t){return t.name&&t.value&&t.name.toLowerCase()==="query"&&(t.value=t.value.slice(0,Q0)),t}isValidEntry(t){let r=this.getMostRecentElement();return r&&r.value==t.value?(t.internalTime||0)-(r.internalTime||0)>U0:!0}stripInternalTime(t){return Array.isArray(t)?t.map(r=>{let{name:n,time:o,value:a}=r;return{name:n,time:o,value:a}}):[]}stripEmptyQuery(t){let{name:r,time:n,value:o}=t;return r&&typeof o=="string"&&r.toLowerCase()==="query"&&o.trim()===""?{name:r,time:n}:t}stripEmptyQueries(t){return t.map(r=>this.stripEmptyQuery(r))}};var B0=(e,t)=>Q(void 0,void 0,void 0,function*(){return e===Oe.view?(yield $0(t.contentIdValue),Object.assign({location:window.location.toString(),referrer:document.referrer,title:document.title},t)):t}),$0=e=>Q(void 0,void 0,void 0,function*(){let t=new jl,r={name:"PageView",value:e,time:new Date().toISOString()};yield t.addElementAsync(r)}),Dl,G0=new Uint8Array(16);function z0(){if(!Dl&&(Dl=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Dl))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Dl(G0)}var H0=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function Ml(e){return typeof e=="string"&&H0.test(e)}var St=[];for(let e=0;e<256;++e)St.push((e+256).toString(16).slice(1));function Zx(e,t=0){return St[e[t+0]]+St[e[t+1]]+St[e[t+2]]+St[e[t+3]]+"-"+St[e[t+4]]+St[e[t+5]]+"-"+St[e[t+6]]+St[e[t+7]]+"-"+St[e[t+8]]+St[e[t+9]]+"-"+St[e[t+10]]+St[e[t+11]]+St[e[t+12]]+St[e[t+13]]+St[e[t+14]]+St[e[t+15]]}function W0(e){if(!Ml(e))throw TypeError("Invalid UUID");let t,r=new Uint8Array(16);return r[0]=(t=parseInt(e.slice(0,8),16))>>>24,r[1]=t>>>16&255,r[2]=t>>>8&255,r[3]=t&255,r[4]=(t=parseInt(e.slice(9,13),16))>>>8,r[5]=t&255,r[6]=(t=parseInt(e.slice(14,18),16))>>>8,r[7]=t&255,r[8]=(t=parseInt(e.slice(19,23),16))>>>8,r[9]=t&255,r[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,r[11]=t/4294967296&255,r[12]=t>>>24&255,r[13]=t>>>16&255,r[14]=t>>>8&255,r[15]=t&255,r}function K0(e){e=unescape(encodeURIComponent(e));let t=[];for(let r=0;r<e.length;++r)t.push(e.charCodeAt(r));return t}var Y0="6ba7b810-9dad-11d1-80b4-00c04fd430c8",X0="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function Z0(e,t,r){function n(o,a,i,p){var m;if(typeof o=="string"&&(o=K0(o)),typeof a=="string"&&(a=W0(a)),((m=a)===null||m===void 0?void 0:m.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let f=new Uint8Array(16+o.length);if(f.set(a),f.set(o,a.length),f=r(f),f[6]=f[6]&15|t,f[8]=f[8]&63|128,i){p=p||0;for(let g=0;g<16;++g)i[p+g]=f[g];return i}return Zx(f)}try{n.name=e}catch{}return n.DNS=Y0,n.URL=X0,n}var J0=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Mx={randomUUID:J0};function Ko(e,t,r){if(Mx.randomUUID&&!t&&!e)return Mx.randomUUID();e=e||{};let n=e.random||(e.rng||z0)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,t){r=r||0;for(let o=0;o<16;++o)t[r+o]=n[o];return t}return Zx(n)}function eN(e,t,r,n){switch(e){case 0:return t&r^~t&n;case 1:return t^r^n;case 2:return t&r^t&n^r&n;case 3:return t^r^n}}function $g(e,t){return e<<t|e>>>32-t}function tN(e){let t=[1518500249,1859775393,2400959708,3395469782],r=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof e=="string"){let i=unescape(encodeURIComponent(e));e=[];for(let p=0;p<i.length;++p)e.push(i.charCodeAt(p))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);let n=e.length/4+2,o=Math.ceil(n/16),a=new Array(o);for(let i=0;i<o;++i){let p=new Uint32Array(16);for(let m=0;m<16;++m)p[m]=e[i*64+m*4]<<24|e[i*64+m*4+1]<<16|e[i*64+m*4+2]<<8|e[i*64+m*4+3];a[i]=p}a[o-1][14]=(e.length-1)*8/Math.pow(2,32),a[o-1][14]=Math.floor(a[o-1][14]),a[o-1][15]=(e.length-1)*8&4294967295;for(let i=0;i<o;++i){let p=new Uint32Array(80);for(let y=0;y<16;++y)p[y]=a[i][y];for(let y=16;y<80;++y)p[y]=$g(p[y-3]^p[y-8]^p[y-14]^p[y-16],1);let m=r[0],f=r[1],g=r[2],C=r[3],A=r[4];for(let y=0;y<80;++y){let x=Math.floor(y/20),b=$g(m,5)+eN(x,f,g,C)+A+t[x]+p[y]>>>0;A=C,C=g,g=$g(f,30)>>>0,f=m,m=b}r[0]=r[0]+m>>>0,r[1]=r[1]+f>>>0,r[2]=r[2]+g>>>0,r[3]=r[3]+C>>>0,r[4]=r[4]+A>>>0}return[r[0]>>24&255,r[0]>>16&255,r[0]>>8&255,r[0]&255,r[1]>>24&255,r[1]>>16&255,r[1]>>8&255,r[1]&255,r[2]>>24&255,r[2]>>16&255,r[2]>>8&255,r[2]&255,r[3]>>24&255,r[3]>>16&255,r[3]>>8&255,r[3]&255,r[4]>>24&255,r[4]>>16&255,r[4]>>8&255,r[4]&255]}var rN=Z0("v5",80,tN),Lx=rN,Jx="2.30.55",Ux=e=>`${e.protocol}//${e.hostname}${e.pathname.indexOf("/")===0?e.pathname:`/${e.pathname}`}${e.search}`,Ac={pageview:"pageview",event:"event"},Ll=class{constructor({client:t,uuidGenerator:r=Ko}){this.client=t,this.uuidGenerator=r}},Kg=class extends Ll{constructor({client:t,uuidGenerator:r=Ko}){super({client:t,uuidGenerator:r}),this.actionData={},this.pageViewId=r(),this.nextPageViewId=this.pageViewId,this.currentLocation=Ux(window.location),this.lastReferrer=Ci()?document.referrer:"",this.addHooks()}getApi(t){return t==="setAction"?this.setAction:null}setAction(t,r){this.action=t,this.actionData=r}clearData(){this.clearPluginData(),this.action=void 0,this.actionData={}}getLocationInformation(t,r){return Object.assign({hitType:t},this.getNextValues(t,r))}updateLocationInformation(t,r){this.updateLocationForNextPageView(t,r)}getDefaultContextInformation(t){let r={title:Ci()?document.title:"",encoding:Ci()?document.characterSet:"UTF-8"},n={screenResolution:`${screen.width}x${screen.height}`,screenColor:`${screen.colorDepth}-bit`},o={language:navigator.language,userAgent:navigator.userAgent},a={time:Date.now(),eventId:this.uuidGenerator()};return Object.assign(Object.assign(Object.assign(Object.assign({},a),n),o),r)}updateLocationForNextPageView(t,r){let{pageViewId:n,referrer:o,location:a}=this.getNextValues(t,r);this.lastReferrer=o,this.pageViewId=n,this.currentLocation=a,t===Ac.pageview&&(this.nextPageViewId=this.uuidGenerator(),this.hasSentFirstPageView=!0)}getNextValues(t,r){return{pageViewId:t===Ac.pageview?this.nextPageViewId:this.pageViewId,referrer:t===Ac.pageview&&this.hasSentFirstPageView?this.currentLocation:this.lastReferrer,location:t===Ac.pageview?this.getCurrentLocationFromPayload(r):this.currentLocation}}getCurrentLocationFromPayload(t){if(t.page){let r=o=>o.replace(/^\/?(.*)$/,"/$1");return`${(o=>o.split("/").slice(0,3).join("/"))(this.currentLocation)}${r(t.page)}`}else return Ux(window.location)}},Jn=class e{constructor(t,r){if(!Ml(t))throw Error("Not a valid uuid");this.clientId=t,this.creationDate=Math.floor(r/1e3)}toString(){return this.clientId.replace(/-/g,"")+"."+this.creationDate.toString()}get expired(){let t=Math.floor(Date.now()/1e3)-this.creationDate;return t<0||t>e.expirationTime}validate(t,r){return!this.expired&&this.matchReferrer(t,r)}matchReferrer(t,r){try{let n=new URL(t);return r.some(o=>new RegExp(o.replace(/\\/g,"\\\\").replace(/\./g,"\\.").replace(/\*/g,".*")+"$").test(n.host))}catch{return!1}}static fromString(t){let r=t.split(".");if(r.length!==2)return null;let[n,o]=r;if(n.length!==32||isNaN(parseInt(o)))return null;let a=n.substring(0,8)+"-"+n.substring(8,12)+"-"+n.substring(12,16)+"-"+n.substring(16,20)+"-"+n.substring(20,32);return Ml(a)?new e(a,Number.parseInt(o)*1e3):null}};Jn.cvo_cid="cvo_cid";Jn.expirationTime=120;var Yg=class extends Ll{constructor({client:t,uuidGenerator:r=Ko}){super({client:t,uuidGenerator:r})}getApi(t){switch(t){case"decorate":return this.decorate;case"acceptFrom":return this.acceptFrom;default:return null}}decorate(t){return Q(this,void 0,void 0,function*(){if(!this.client.getCurrentVisitorId)throw new Error("Could not retrieve current clientId");try{let r=new URL(t),n=yield this.client.getCurrentVisitorId();return r.searchParams.set(Jn.cvo_cid,new Jn(n,Date.now()).toString()),r.toString()}catch{throw new Error("Invalid URL provided")}})}acceptFrom(t){this.client.setAcceptedLinkReferrers(t)}};Yg.Id="link";var sr=Object.keys;function Vl(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}var Gg=128,eb=192,Qx=224,Bx=240;function nN(e){return(e&248)===Bx?4:(e&Bx)===Qx?3:(e&Qx)===eb?2:1}function oN(e,t){if(t<0||e.length<=t)return e;let r=e.indexOf("%",t-2);for(r<0||r>t?r=t:t=r;r>2&&e.charAt(r-3)=="%";){let n=Number.parseInt(e.substring(r-2,r),16);if((n&Gg)!=Gg)break;if(r-=3,(n&eb)!=Gg){t-r>=nN(n)*3&&(r=t);break}}return e.substring(0,r)}var Xg={id:"svc_ticket_id",subject:"svc_ticket_subject",description:"svc_ticket_description",category:"svc_ticket_category",productId:"svc_ticket_product_id",custom:"svc_ticket_custom"},aN=sr(Xg).map(e=>Xg[e]),iN=[...aN].join("|"),sN=new RegExp(`^(${iN}$)`),cN={svcAction:"svc_action",svcActionData:"svc_action_data"},uN=e=>sr(e).filter(t=>e[t]!==void 0).reduce((t,r)=>{let n=Xg[r]||r;return Object.assign(Object.assign({},t),{[n]:e[r]})},{}),lN=e=>sN.test(e),dN=[lN],$x={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",price:"pr",quantity:"qt",coupon:"cc",position:"ps",group:"group"},Gx={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",position:"ps",price:"pr",group:"group"},It={action:"pa",list:"pal",listSource:"pls"},Ul={id:"ti",revenue:"tr",tax:"tt",shipping:"ts",coupon:"tcc",affiliation:"ta",step:"cos",option:"col"},pN=["loyaltyCardId","loyaltyTier","thirdPartyPersona","companyName","favoriteStore","storeName","userIndustry","userRole","userDepartment","businessUnit"],Zg={id:"quoteId",affiliation:"quoteAffiliation"},Jg={id:"reviewId",rating:"reviewRating",comment:"reviewComment"},mN={add:It,bookmark_add:It,bookmark_remove:It,click:It,checkout:It,checkout_option:It,detail:It,impression:It,remove:It,refund:Object.assign(Object.assign({},It),Ul),purchase:Object.assign(Object.assign({},It),Ul),quickview:It,quote:Object.assign(Object.assign({},It),Zg),review:Object.assign(Object.assign({},It),Jg)},fN=sr($x).map(e=>$x[e]),gN=sr(Gx).map(e=>Gx[e]),yN=sr(It).map(e=>It[e]),hN=sr(Ul).map(e=>Ul[e]),SN=sr(Jg).map(e=>Jg[e]),CN=sr(Zg).map(e=>Zg[e]),vN=[...fN,"custom"].join("|"),xN=[...gN,"custom"].join("|"),tb="(pr[0-9]+)",rb="(il[0-9]+pi[0-9]+)",bN=new RegExp(`^${tb}(${vN})$`),AN=new RegExp(`^(${rb}(${xN}))|(il[0-9]+nm)$`),RN=new RegExp(`^(${yN.join("|")})$`),PN=new RegExp(`^(${hN.join("|")})$`),EN=new RegExp(`^${tb}custom$`),FN=new RegExp(`^${rb}custom$`),wN=new RegExp(`^(${[...pN,...SN,...CN].join("|")})$`),IN=e=>bN.test(e),TN=e=>AN.test(e),ON=e=>RN.test(e),kN=e=>PN.test(e),NN=e=>wN.test(e),_N=[TN,IN,ON,kN,NN],qN=[EN,FN],DN={anonymizeIp:"aip"},VN={eventCategory:"ec",eventAction:"ea",eventLabel:"el",eventValue:"ev",page:"dp",visitorId:"cid",clientId:"cid",userId:"uid",currencyCode:"cu"},jN={hitType:"t",pageViewId:"pid",encoding:"de",location:"dl",referrer:"dr",screenColor:"sd",screenResolution:"sr",title:"dt",userAgent:"ua",language:"ul",eventId:"z",time:"tm"},MN=["contentId","contentIdKey","contentType","searchHub","tab","searchUid","permanentId","contentLocale","trackingId"],LN=Object.assign(Object.assign(Object.assign(Object.assign({},DN),VN),jN),MN.reduce((e,t)=>Object.assign(Object.assign({},e),{[t]:t}),{})),ey=Object.assign(Object.assign({},LN),cN),UN=e=>{let t=!!e.action&&mN[e.action]||{};return sr(e).reduce((r,n)=>{let o=t[n]||ey[n]||n;return Object.assign(Object.assign({},r),{[o]:e[n]})},{})},QN=sr(ey).map(e=>ey[e]),BN=e=>QN.indexOf(e)!==-1,$N=e=>e==="custom",GN=e=>[..._N,...dN,BN,$N].some(t=>t(e)),zN=e=>sr(e).reduce((t,r)=>{let n=HN(r);return n?Object.assign(Object.assign({},t),WN(n,e[r])):Object.assign(Object.assign({},t),{[r]:e[r]})},{}),HN=e=>{let t;return[...qN].every(r=>{var n;return t=(n=r.exec(e))===null||n===void 0?void 0:n[1],!t}),t},WN=(e,t)=>sr(t).reduce((r,n)=>Object.assign(Object.assign({},r),{[`${e}${n}`]:t[n]}),{}),ty=class{constructor(t){this.opts=t}sendEvent(t,r){return Q(this,void 0,void 0,function*(){if(!this.isAvailable())throw new Error('navigator.sendBeacon is not supported in this browser. Consider adding a polyfill like "sendbeacon-polyfill".');let{baseUrl:n,preprocessRequest:o}=this.opts,a=yield this.getQueryParamsForEventType(t),{url:i,payload:p}=yield this.preProcessRequestAsPotentialJSONString(`${n}/analytics/${t}?${a}`,r,o),m=this.encodeForEventType(t,p),f=new Blob([m],{type:"application/x-www-form-urlencoded"});navigator.sendBeacon(i,f)})}isAvailable(){return"sendBeacon"in navigator}deleteHttpCookieVisitorId(){return Promise.resolve()}preProcessRequestAsPotentialJSONString(t,r,n){return Q(this,void 0,void 0,function*(){let o=t,a=r;if(n){let i=yield n({url:t,body:JSON.stringify(r)},"analyticsBeacon"),{url:p,body:m}=i;o=p||t;try{a=JSON.parse(m)}catch(f){console.error("Unable to process the request body as a JSON string",f)}}return{payload:a,url:o}})}encodeForEventType(t,r){return this.isEventTypeLegacy(t)?this.encodeEventToJson(t,r):this.encodeEventToJson(t,r,this.opts.token)}getQueryParamsForEventType(t){return Q(this,void 0,void 0,function*(){let{token:r,visitorIdProvider:n}=this.opts,o=yield n.getCurrentVisitorId();return[r&&this.isEventTypeLegacy(t)?`access_token=${r}`:"",o?`visitorId=${o}`:"","discardVisitInfo=true"].filter(a=>!!a).join("&")})}isEventTypeLegacy(t){return[Oe.click,Oe.custom,Oe.search,Oe.view].indexOf(t)!==-1}encodeEventToJson(t,r,n){let o=`${t}Event=${encodeURIComponent(JSON.stringify(r))}`;return n&&(o=`access_token=${encodeURIComponent(n)}&${o}`),o}},ry=class{sendEvent(t,r){return Q(this,void 0,void 0,function*(){return Promise.resolve()})}deleteHttpCookieVisitorId(){return Q(this,void 0,void 0,function*(){return Promise.resolve()})}},zx=h.fetch,Ql=class{constructor(t){this.opts=t}sendEvent(t,r){return Q(this,void 0,void 0,function*(){let{baseUrl:n,visitorIdProvider:o,preprocessRequest:a}=this.opts,i=this.shouldAppendVisitorId(t)?yield this.getVisitorIdParam():"",p={url:`${n}/analytics/${t}${i}`,credentials:"include",mode:"cors",headers:this.getHeaders(),method:"POST",body:JSON.stringify(r)},m=Object.assign(Object.assign({},p),a?yield a(p,"analyticsFetch"):{}),{url:f}=m,g=vn(m,["url"]),C;try{C=yield zx(f,g)}catch(A){console.error("An error has occured when sending the event.",A);return}if(C.ok){let A=yield C.json();return A.visitorId&&o.setCurrentVisitorId(A.visitorId),A}else{try{C.json()}catch{}throw console.error(`An error has occured when sending the "${t}" event.`,C,r),new Error(`An error has occurred when sending the "${t}" event. Check the console logs for more details.`)}})}deleteHttpCookieVisitorId(){return Q(this,void 0,void 0,function*(){let{baseUrl:t}=this.opts,r=`${t}/analytics/visit`;yield zx(r,{headers:this.getHeaders(),method:"DELETE"})})}shouldAppendVisitorId(t){return[Oe.click,Oe.custom,Oe.search,Oe.view].indexOf(t)!==-1}getVisitorIdParam(){return Q(this,void 0,void 0,function*(){let{visitorIdProvider:t}=this.opts,r=yield t.getCurrentVisitorId();return r?`?visitor=${r}`:""})}getHeaders(){let{token:t}=this.opts;return Object.assign(Object.assign({},t?{Authorization:`Bearer ${t}`}:{}),{"Content-Type":"application/json"})}},ny=class{constructor(t,r){Hg()&&Xx()?this.storage=new Wg:Hg()?this.storage=localStorage:(console.warn("BrowserRuntime detected no valid storage available.",this),this.storage=new xi),this.client=new Ql(t),this.beaconClient=new ty(t),window.addEventListener("beforeunload",()=>{let n=r();for(let{eventType:o,payload:a}of n)this.beaconClient.sendEvent(o,a)})}getClientDependingOnEventType(t){return t==="click"&&this.beaconClient.isAvailable()?this.beaconClient:this.client}},oy=class{constructor(t,r){this.storage=r||new xi,this.client=new Ql(t)}getClientDependingOnEventType(t){return this.client}},Bl=class{constructor(){this.storage=new xi,this.client=new ry}getClientDependingOnEventType(t){return this.client}},KN="xx",YN=e=>e?.startsWith(KN)||!1,XN=`
29
+ `;return new js(r)}var js=class extends Error{constructor(e){super(e),this.name="SchemaValidationError"}},Ee=class{constructor(e){pe(this,"definition");this.definition=e}validate(e={},t=""){let r={...this.default,...e},n=[];for(let o in this.definition){let a=this.definition[o].validate(r[o]);a&&n.push(`${o}: ${a}`)}if(n.length)throw VT(n,t);return r}get default(){let e={};for(let t in this.definition){let r=this.definition[t].default;r!==void 0&&(e[t]=r)}return e}},Le=class{constructor(e={}){pe(this,"baseConfig");this.baseConfig=e}validate(e){return this.baseConfig.required&&ie(e)?"value is required.":null}get default(){return this.baseConfig.default instanceof Function?this.baseConfig.default():this.baseConfig.default}get required(){return this.baseConfig.required===!0}};function La(e){return e===void 0}function jT(e){return e===null}function ie(e){return La(e)||jT(e)}var ne=class{constructor(e={}){pe(this,"value");this.value=new Le(e)}validate(e){let t=this.value.validate(e);return t||(MT(e)?null:"value is not a boolean.")}get default(){return this.value.default}get required(){return this.value.required}};function MT(e){return La(e)||nC(e)}function nC(e){return typeof e=="boolean"}var Z=class{constructor(e={}){pe(this,"config");pe(this,"value");this.config=e,this.value=new Le(e)}validate(e){let t=this.value.validate(e);return t||(LT(e)?e<this.config.min?`minimum value of ${this.config.min} not respected.`:e>this.config.max?`maximum value of ${this.config.max} not respected.`:null:"value is not a number.")}get default(){return this.value.default}get required(){return this.value.required}};function LT(e){return La(e)||oC(e)}function oC(e){return typeof e=="number"&&!Number.isNaN(e)}var UT=/^\d{4}(-\d\d(-\d\d(T\d\d:\d\d(:\d\d)?(\.\d+)?(([+-]\d\d:\d\d)|Z)?)?)?)?$/i,L=class{constructor(e={}){pe(this,"value");pe(this,"config");this.config={emptyAllowed:!0,url:!1,...e},this.value=new Le(this.config)}validate(e){let{emptyAllowed:t,url:r,regex:n,constrainTo:o,ISODate:a}=this.config,i=this.value.validate(e);if(i)return i;if(La(e))return null;if(!wu(e))return"value is not a string.";if(!t&&!e.length)return"value is an empty string.";if(r)try{new URL(e)}catch{return"value is not a valid URL."}return n&&!n.test(e)?`value did not match provided regex ${n}`:o&&!o.includes(e)?`value should be one of: ${o.join(", ")}.`:a&&!(UT.test(e)&&new Date(e).toString()!=="Invalid Date")?"value is not a valid ISO8601 date string":null}get default(){return this.value.default}get required(){return this.value.required}};function wu(e){return Object.prototype.toString.call(e)==="[object String]"}var H=class{constructor(e={}){pe(this,"config");this.config={options:{required:!1},values:{},...e}}validate(e){if(La(e))return this.config.options.required?"value is required and is currently undefined":null;if(!aC(e))return"value is not an object";for(let[r,n]of Object.entries(this.config.values))if(n.required&&ie(e[r]))return`value does not contain ${r}`;let t="";for(let[r,n]of Object.entries(this.config.values)){let o=e[r],a=n.validate(o);a!==null&&(t+=` ${a}`)}return t===""?null:t}get default(){}get required(){return!!this.config.options.required}};function aC(e){return e!==void 0&&typeof e=="object"}var fe=class{constructor(e={}){pe(this,"config");pe(this,"value");this.config=e,this.value=new Le(this.config)}validate(e){if(!ie(e)&&!Array.isArray(e))return"value is not an array";let t=this.value.validate(e);if(t!==null)return t;if(ie(e))return null;if(this.config.max!==void 0&&e.length>this.config.max)return`value contains more than ${this.config.max}`;if(this.config.min!==void 0&&e.length<this.config.min)return`value contains less than ${this.config.min}`;if(this.config.each!==void 0){let r="";return e.forEach(n=>{this.config.each.required&&ie(n)&&(r=`value is null or undefined: ${e.join(",")}`);let o=this.validatePrimitiveValue(n,this.config.each);o!==null&&(r+=` ${o}`)}),r===""?null:r}return null}validatePrimitiveValue(e,t){return nC(e)||wu(e)||oC(e)||aC(e)?t.validate(e):"value is not a primitive value"}get default(){}get required(){return this.value.required}};function Iu(e){return Array.isArray(e)}var Vn=class{constructor(e){pe(this,"config");pe(this,"value");this.config=e,this.value=new Le(e)}validate(e){let t=this.value.validate(e);return t!==null?t:La(e)||Object.values(this.config.enum).find(n=>n===e)?null:"value is not in enum."}get default(){return this.value.default}get required(){return this.value.required}};d();c();l();u();d();c();l();u();function yt(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var QT=typeof Symbol=="function"&&Symbol.observable||"@@observable",iC=QT,Df=()=>Math.random().toString(36).substring(7).split("").join("."),BT={INIT:`@@redux/INIT${Df()}`,REPLACE:`@@redux/REPLACE${Df()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Df()}`},Tu=BT;function qr(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function Vf(e,t,r){if(typeof e!="function")throw new Error(yt(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(yt(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(yt(1));return r(Vf)(e,t)}let n=e,o=t,a=new Map,i=a,p=0,m=!1;function f(){i===a&&(i=new Map,a.forEach((P,E)=>{i.set(E,P)}))}function g(){if(m)throw new Error(yt(3));return o}function C(P){if(typeof P!="function")throw new Error(yt(4));if(m)throw new Error(yt(5));let E=!0;f();let I=p++;return i.set(I,P),function(){if(E){if(m)throw new Error(yt(6));E=!1,f(),i.delete(I),a=null}}}function A(P){if(!qr(P))throw new Error(yt(7));if(typeof P.type>"u")throw new Error(yt(8));if(typeof P.type!="string")throw new Error(yt(17));if(m)throw new Error(yt(9));try{m=!0,o=n(o,P)}finally{m=!1}return(a=i).forEach(I=>{I()}),P}function y(P){if(typeof P!="function")throw new Error(yt(10));n=P,A({type:Tu.REPLACE})}function x(){let P=C;return{subscribe(E){if(typeof E!="object"||E===null)throw new Error(yt(11));function I(){let k=E;k.next&&k.next(g())}return I(),{unsubscribe:P(I)}},[iC](){return this}}}return A({type:Tu.INIT}),{dispatch:A,subscribe:C,getState:g,replaceReducer:y,[iC]:x}}function $T(e){Object.keys(e).forEach(t=>{let r=e[t];if(typeof r(void 0,{type:Tu.INIT})>"u")throw new Error(yt(12));if(typeof r(void 0,{type:Tu.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(yt(13))})}function Ua(e){let t=Object.keys(e),r={};for(let i=0;i<t.length;i++){let p=t[i];typeof e[p]=="function"&&(r[p]=e[p])}let n=Object.keys(r),o,a;try{$T(r)}catch(i){a=i}return function(p={},m){if(a)throw a;let f=!1,g={};for(let C=0;C<n.length;C++){let A=n[C],y=r[A],x=p[A],b=y(x,m);if(typeof b>"u"){let P=m&&m.type;throw new Error(yt(14))}g[A]=b,f=f||b!==x}return f=f||n.length!==Object.keys(p).length,f?g:p}}function Ms(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function sC(...e){return t=>(r,n)=>{let o=t(r,n),a=()=>{throw new Error(yt(15))},i={getState:o.getState,dispatch:(m,...f)=>a(m,...f)},p=e.map(m=>m(i));return a=Ms(...p)(o.dispatch),{...o,dispatch:a}}}function Ls(e){return qr(e)&&"type"in e&&typeof e.type=="string"}d();c();l();u();var zf=Symbol.for("immer-nothing"),Us=Symbol.for("immer-draftable"),ut=Symbol.for("immer-state");function ht(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Yt=Object,Po=Yt.getPrototypeOf,Bs="constructor",Ws="prototype",Lf="configurable",_u="enumerable",ku="writable",$s="value",Dt=e=>!!e&&!!e[ut];function Vt(e){return e?gC(e)||Ys(e)||!!e[Us]||!!e[Bs]?.[Us]||Xs(e)||Zs(e):!1}var GT=Yt[Ws][Bs].toString(),cC=new WeakMap;function gC(e){if(!e||!Qa(e))return!1;let t=Po(e);if(t===null||t===Yt[Ws])return!0;let r=Yt.hasOwnProperty.call(t,Bs)&&t[Bs];if(r===Object)return!0;if(!Ro(r))return!1;let n=cC.get(r);return n===void 0&&(n=Function.toString.call(r),cC.set(r,n)),n===GT}function yC(e){return Dt(e)||ht(15,e),e[ut].base_}function Ks(e,t,r=!0){Eo(e)===0?(r?Reflect.ownKeys(e):Yt.keys(e)).forEach(o=>{t(o,e[o],e)}):e.forEach((n,o)=>t(o,n,e))}function Eo(e){let t=e[ut];return t?t.type_:Ys(e)?1:Xs(e)?2:Zs(e)?3:0}var Qs=(e,t,r=Eo(e))=>r===2?e.has(t):Yt[Ws].hasOwnProperty.call(e,t),mn=(e,t,r=Eo(e))=>r===2?e.get(t):e[t],qu=(e,t,r,n=Eo(e))=>{n===2?e.set(t,r):n===3?e.add(r):e[t]=r};function zT(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var Ys=Array.isArray,Xs=e=>e instanceof Map,Zs=e=>e instanceof Set,Qa=e=>typeof e=="object",Ro=e=>typeof e=="function",jf=e=>typeof e=="boolean";function HT(e){let t=+e;return Number.isInteger(t)&&String(t)===e}var WT=e=>Qa(e)?e?.[ut]:null,fn=e=>e.copy_||e.base_;var Hf=e=>e.modified_?e.copy_:e.base_;function Uf(e,t){if(Xs(e))return new Map(e);if(Zs(e))return new Set(e);if(Ys(e))return Array[Ws].slice.call(e);let r=gC(e);if(t===!0||t==="class_only"&&!r){let n=Yt.getOwnPropertyDescriptors(e);delete n[ut];let o=Reflect.ownKeys(n);for(let a=0;a<o.length;a++){let i=o[a],p=n[i];p[ku]===!1&&(p[ku]=!0,p[Lf]=!0),(p.get||p.set)&&(n[i]={[Lf]:!0,[ku]:!0,[_u]:p[_u],[$s]:e[i]})}return Yt.create(Po(e),n)}else{let n=Po(e);if(n!==null&&r)return{...e};let o=Yt.create(n);return Yt.assign(o,e)}}function Wf(e,t=!1){return Uu(e)||Dt(e)||!Vt(e)||(Eo(e)>1&&Yt.defineProperties(e,{set:Ou,add:Ou,clear:Ou,delete:Ou}),Yt.freeze(e),t&&Ks(e,(r,n)=>{Wf(n,!0)},!1)),e}function KT(){ht(2)}var Ou={[$s]:KT};function Uu(e){return e===null||!Qa(e)?!0:Yt.isFrozen(e)}var Du="MapSet",Vu="Patches",uC="ArrayMethods",ju={};function Fo(e){let t=ju[e];return t||ht(0,e),t}var lC=e=>!!ju[e];function YT(e,t){ju[e]||(ju[e]=t)}var Gs,hC=()=>Gs,XT=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:lC(Du)?Fo(Du):void 0,arrayMethodsPlugin_:lC(uC)?Fo(uC):void 0});function dC(e,t){t&&(e.patchPlugin_=Fo(Vu),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Qf(e){Bf(e),e.drafts_.forEach(ZT),e.drafts_=null}function Bf(e){e===Gs&&(Gs=e.parent_)}var pC=e=>Gs=XT(Gs,e);function ZT(e){let t=e[ut];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function mC(e,t){t.unfinalizedDrafts_=t.drafts_.length;let r=t.drafts_[0];if(e!==void 0&&e!==r){r[ut].modified_&&(Qf(t),ht(4)),Vt(e)&&(e=fC(t,e));let{patchPlugin_:o}=t;o&&o.generateReplacementPatches_(r[ut].base_,e,t)}else e=fC(t,r);return JT(t,e,!0),Qf(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==zf?e:void 0}function fC(e,t){if(Uu(t))return t;let r=t[ut];if(!r)return Mu(t,e.handledSet_,e);if(!Qu(r,e))return t;if(!r.modified_)return r.base_;if(!r.finalized_){let{callbacks_:n}=r;if(n)for(;n.length>0;)n.pop()(e);vC(r,e)}return r.copy_}function JT(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Wf(t,r)}function SC(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var Qu=(e,t)=>e.scope_===t,eO=[];function CC(e,t,r,n){let o=fn(e),a=e.type_;if(n!==void 0&&mn(o,n,a)===t){qu(o,n,r,a);return}if(!e.draftLocations_){let p=e.draftLocations_=new Map;Ks(o,(m,f)=>{if(Dt(f)){let g=p.get(f)||[];g.push(m),p.set(f,g)}})}let i=e.draftLocations_.get(t)??eO;for(let p of i)qu(o,p,r,a)}function tO(e,t,r){e.callbacks_.push(function(o){let a=t;if(!a||!Qu(a,o))return;o.mapSetPlugin_?.fixSetContents(a);let i=Hf(a);CC(e,a.draft_??a,i,r),vC(a,o)})}function vC(e,t){if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){let{patchPlugin_:n}=t;if(n){let o=n.getPath(e);o&&n.generatePatches_(e,o,t)}SC(e)}}function rO(e,t,r){let{scope_:n}=e;if(Dt(r)){let o=r[ut];Qu(o,n)&&o.callbacks_.push(function(){Nu(e);let i=Hf(o);CC(e,r,i,t)})}else Vt(r)&&e.callbacks_.push(function(){let a=fn(e);e.type_===3?a.has(r)&&Mu(r,n.handledSet_,n):mn(a,t,e.type_)===r&&n.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&Mu(mn(e.copy_,t,e.type_),n.handledSet_,n)})}function Mu(e,t,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||Dt(e)||t.has(e)||!Vt(e)||Uu(e)||(t.add(e),Ks(e,(n,o)=>{if(Dt(o)){let a=o[ut];if(Qu(a,r)){let i=Hf(a);qu(e,n,i,e.type_),SC(a)}}else Vt(o)&&Mu(o,t,r)})),e}function nO(e,t){let r=Ys(e),n={type_:r?1:0,scope_:t?t.scope_:hC(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},o=n,a=Lu;r&&(o=[n],a=zs);let{revoke:i,proxy:p}=Proxy.revocable(o,a);return n.draft_=p,n.revoke_=i,[p,n]}var Lu={get(e,t){if(t===ut)return e;let r=e.scope_.arrayMethodsPlugin_,n=e.type_===1&&typeof t=="string";if(n&&r?.isArrayOperationMethod(t))return r.createMethodInterceptor(e,t);let o=fn(e);if(!Qs(o,t,e.type_))return oO(e,o,t);let a=o[t];if(e.finalized_||!Vt(a)||n&&e.operationMethod&&r?.isMutatingArrayMethod(e.operationMethod)&&HT(t))return a;if(a===Mf(e.base_,t)){Nu(e);let i=e.type_===1?+t:t,p=Gf(e.scope_,a,e,i);return e.copy_[i]=p}return a},has(e,t){return t in fn(e)},ownKeys(e){return Reflect.ownKeys(fn(e))},set(e,t,r){let n=xC(fn(e),t);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){let o=Mf(fn(e),t),a=o?.[ut];if(a&&a.base_===r)return e.copy_[t]=r,e.assigned_.set(t,!1),!0;if(zT(r,o)&&(r!==void 0||Qs(e.base_,t,e.type_)))return!0;Nu(e),$f(e)}return e.copy_[t]===r&&(r!==void 0||t in e.copy_)||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_.set(t,!0),rO(e,t,r)),!0},deleteProperty(e,t){return Nu(e),Mf(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),$f(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let r=fn(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{[ku]:!0,[Lf]:e.type_!==1||t!=="length",[_u]:n[_u],[$s]:r[t]}},defineProperty(){ht(11)},getPrototypeOf(e){return Po(e.base_)},setPrototypeOf(){ht(12)}},zs={};for(let e in Lu){let t=Lu[e];zs[e]=function(){let r=arguments;return r[0]=r[0][0],t.apply(this,r)}}zs.deleteProperty=function(e,t){return zs.set.call(this,e,t,void 0)};zs.set=function(e,t,r){return Lu.set.call(this,e[0],t,r,e[0])};function Mf(e,t){let r=e[ut];return(r?fn(r):e)[t]}function oO(e,t,r){let n=xC(t,r);return n?$s in n?n[$s]:n.get?.call(e.draft_):void 0}function xC(e,t){if(!(t in e))return;let r=Po(e);for(;r;){let n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Po(r)}}function $f(e){e.modified_||(e.modified_=!0,e.parent_&&$f(e.parent_))}function Nu(e){e.copy_||(e.assigned_=new Map,e.copy_=Uf(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var aO=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(t,r,n)=>{if(Ro(t)&&!Ro(r)){let a=r;r=t;let i=this;return function(m=a,...f){return i.produce(m,g=>r.call(this,g,...f))}}Ro(r)||ht(6),n!==void 0&&!Ro(n)&&ht(7);let o;if(Vt(t)){let a=pC(this),i=Gf(a,t,void 0),p=!0;try{o=r(i),p=!1}finally{p?Qf(a):Bf(a)}return dC(a,n),mC(o,a)}else if(!t||!Qa(t)){if(o=r(t),o===void 0&&(o=t),o===zf&&(o=void 0),this.autoFreeze_&&Wf(o,!0),n){let a=[],i=[];Fo(Vu).generateReplacementPatches_(t,o,{patches_:a,inversePatches_:i}),n(a,i)}return o}else ht(1,t)},this.produceWithPatches=(t,r)=>{if(Ro(t))return(i,...p)=>this.produceWithPatches(i,m=>t(m,...p));let n,o;return[this.produce(t,r,(i,p)=>{n=i,o=p}),n,o]},jf(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),jf(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),jf(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){Vt(e)||ht(8),Dt(e)&&(e=Bu(e));let t=pC(this),r=Gf(t,e,void 0);return r[ut].isManual_=!0,Bf(t),r}finishDraft(e,t){let r=e&&e[ut];(!r||!r.isManual_)&&ht(9);let{scope_:n}=r;return dC(n,t),mC(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){let o=t[r];if(o.path.length===0&&o.op==="replace"){e=o.value;break}}r>-1&&(t=t.slice(r+1));let n=Fo(Vu).applyPatches_;return Dt(e)?n(e,t):this.produce(e,o=>n(o,t))}};function Gf(e,t,r,n){let[o,a]=Xs(t)?Fo(Du).proxyMap_(t,r):Zs(t)?Fo(Du).proxySet_(t,r):nO(t,r);return(r?.scope_??hC()).drafts_.push(o),a.callbacks_=r?.callbacks_??[],a.key_=n,r&&n!==void 0?tO(r,a,n):a.callbacks_.push(function(m){m.mapSetPlugin_?.fixSetContents(a);let{patchPlugin_:f}=m;a.modified_&&f&&f.generatePatches_(a,[],m)}),o}function Bu(e){return Dt(e)||ht(10,e),bC(e)}function bC(e){if(!Vt(e)||Uu(e))return e;let t=e[ut],r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=Uf(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=Uf(e,!0);return Ks(r,(o,a)=>{qu(r,o,bC(a))},n),t&&(t.finalized_=!1),r}function AC(){function t(x,b=[]){if(x.key_!==void 0){let P=x.parent_.copy_??x.parent_.base_,E=WT(mn(P,x.key_)),I=mn(P,x.key_);if(I===void 0||I!==x.draft_&&I!==x.base_&&I!==x.copy_||E!=null&&E.base_!==x.base_)return null;let w=x.parent_.type_===3,k;if(w){let T=x.parent_;k=Array.from(T.drafts_.keys()).indexOf(x.key_)}else k=x.key_;if(!(w&&P.size>k||Qs(P,k)))return null;b.push(k)}if(x.parent_)return t(x.parent_,b);b.reverse();try{r(x.copy_,b)}catch{return null}return b}function r(x,b){let P=x;for(let E=0;E<b.length-1;E++){let I=b[E];if(P=mn(P,I),!Qa(P)||P===null)throw new Error(`Cannot resolve path at '${b.join("/")}'`)}return P}let n="replace",o="add",a="remove";function i(x,b,P){if(x.scope_.processedForPatches_.has(x))return;x.scope_.processedForPatches_.add(x);let{patches_:E,inversePatches_:I}=P;switch(x.type_){case 0:case 2:return m(x,b,E,I);case 1:return p(x,b,E,I);case 3:return f(x,b,E,I)}}function p(x,b,P,E){let{base_:I,assigned_:w}=x,k=x.copy_;k.length<I.length&&([I,k]=[k,I],[P,E]=[E,P]);let T=x.allIndicesReassigned_===!0;for(let D=0;D<I.length;D++){let G=k[D],U=I[D];if((T||w?.get(D.toString()))&&G!==U){let $=G?.[ut];if($&&$.modified_)continue;let j=b.concat([D]);P.push({op:n,path:j,value:y(G)}),E.push({op:n,path:j,value:y(U)})}}for(let D=I.length;D<k.length;D++){let G=b.concat([D]);P.push({op:o,path:G,value:y(k[D])})}for(let D=k.length-1;I.length<=D;--D){let G=b.concat([D]);E.push({op:a,path:G})}}function m(x,b,P,E){let{base_:I,copy_:w,type_:k}=x;Ks(x.assigned_,(T,D)=>{let G=mn(I,T,k),U=mn(w,T,k),M=D?Qs(I,T)?n:o:a;if(G===U&&M===n)return;let $=b.concat(T);P.push(M===a?{op:M,path:$}:{op:M,path:$,value:y(U)}),E.push(M===o?{op:a,path:$}:M===a?{op:o,path:$,value:y(G)}:{op:n,path:$,value:y(G)})})}function f(x,b,P,E){let{base_:I,copy_:w}=x,k=0;I.forEach(T=>{if(!w.has(T)){let D=b.concat([k]);P.push({op:a,path:D,value:T}),E.unshift({op:o,path:D,value:T})}k++}),k=0,w.forEach(T=>{if(!I.has(T)){let D=b.concat([k]);P.push({op:o,path:D,value:T}),E.unshift({op:a,path:D,value:T})}k++})}function g(x,b,P){let{patches_:E,inversePatches_:I}=P;E.push({op:n,path:[],value:b===zf?void 0:b}),I.push({op:n,path:[],value:x})}function C(x,b){return b.forEach(P=>{let{path:E,op:I}=P,w=x;for(let G=0;G<E.length-1;G++){let U=Eo(w),M=E[G];typeof M!="string"&&typeof M!="number"&&(M=""+M),(U===0||U===1)&&(M==="__proto__"||M===Bs)&&ht(19),Ro(w)&&M===Ws&&ht(19),w=mn(w,M),Qa(w)||ht(18,E.join("/"))}let k=Eo(w),T=A(P.value),D=E[E.length-1];switch(I){case n:switch(k){case 2:return w.set(D,T);case 3:ht(16);default:return w[D]=T}case o:switch(k){case 1:return D==="-"?w.push(T):w.splice(D,0,T);case 2:return w.set(D,T);case 3:return w.add(T);default:return w[D]=T}case a:switch(k){case 1:return w.splice(D,1);case 2:return w.delete(D);case 3:return w.delete(P.value);default:return delete w[D]}default:ht(17,I)}}),x}function A(x){if(!Vt(x))return x;if(Ys(x))return x.map(A);if(Xs(x))return new Map(Array.from(x.entries()).map(([P,E])=>[P,A(E)]));if(Zs(x))return new Set(Array.from(x).map(A));let b=Object.create(Po(x));for(let P in x)b[P]=A(x[P]);return Qs(x,Us)&&(b[Us]=x[Us]),b}function y(x){return Dt(x)?A(x):x}YT(Vu,{applyPatches_:C,generatePatches_:i,generateReplacementPatches_:g,getPath:t})}var Hs=new aO,wo=Hs.produce,Kf=Hs.produceWithPatches.bind(Hs);var Yf=Hs.applyPatches.bind(Hs);d();c();l();u();function iO(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function sO(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(r=>typeof r=="function")){let r=e.map(n=>typeof n=="function"?`function ${n.name||"unnamed"}()`:typeof n).join(", ");throw new TypeError(`${t}[${r}]`)}}var RC=e=>Array.isArray(e)?e:[e];function cO(e){let t=Array.isArray(e[0])?e[0]:e;return sO(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function uO(e,t){let r=[],{length:n}=e;for(let o=0;o<n;o++)r.push(e[o].apply(null,t));return r}var lO=class{constructor(e){this.value=e}deref(){return this.value}},dO=()=>typeof WeakRef>"u"?lO:WeakRef,EC=dO(),pO=0,PC=1;function $u(){return{s:pO,v:void 0,o:null,p:null}}function mO(e){return e instanceof EC?e.deref():e}function Js(e,t={}){let r=$u(),{resultEqualityCheck:n}=t,o,a=0;function i(){let p=r,{length:m}=arguments;for(let C=0,A=m;C<A;C++){let y=arguments[C];if(typeof y=="function"||typeof y=="object"&&y!==null){let x=p.o;x===null&&(p.o=x=new WeakMap);let b=x.get(y);b===void 0?(p=$u(),x.set(y,p)):p=b}else{let x=p.p;x===null&&(p.p=x=new Map);let b=x.get(y);b===void 0?(p=$u(),x.set(y,p)):p=b}}let f=p,g;if(p.s===PC)g=p.v;else if(g=e.apply(null,arguments),a++,n){let C=mO(o);C!=null&&n(C,g)&&(g=C,a!==0&&a--),o=typeof g=="object"&&g!==null||typeof g=="function"?new EC(g):g}return f.s=PC,f.v=g,g}return i.clearCache=()=>{r=$u(),i.resetResultsCount()},i.resultsCount=()=>a,i.resetResultsCount=()=>{a=0},i}function fO(e,...t){let r=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,n=(...o)=>{let a=0,i=0,p,m={},f=o.pop();typeof f=="object"&&(m=f,f=o.pop()),iO(f,`createSelector expects an output function after the inputs, but received: [${typeof f}]`);let g={...r,...m},{memoize:C,memoizeOptions:A=[],argsMemoize:y=Js,argsMemoizeOptions:x=[]}=g,b=RC(A),P=RC(x),E=cO(o),I=C(function(){return a++,f.apply(null,arguments)},...b),w=!0,k=y(function(){i++;let D=uO(E,arguments);return p=I.apply(null,D),p},...P);return Object.assign(k,{resultFunc:f,memoizedResultFunc:I,dependencies:E,dependencyRecomputations:()=>i,resetDependencyRecomputations:()=>{i=0},lastResult:()=>p,recomputations:()=>a,resetRecomputations:()=>{a=0},memoize:C,argsMemoize:y})};return Object.assign(n,{withTypes:()=>n}),n}var le=fO(Js);d();c();l();u();function FC(e){return({dispatch:r,getState:n})=>o=>a=>typeof a=="function"?a(r,n,e):o(a)}var wC=FC(),IC=FC;var gO=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Ms:Ms.apply(null,arguments)},d$=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}},yO=e=>e&&typeof e.match=="function";function F(e,t){function r(...n){if(t){let o=t(...n);if(!o)throw new Error(jt(0));return{type:e,payload:o.payload,..."meta"in o&&{meta:o.meta},..."error"in o&&{error:o.error}}}return{type:e,payload:n[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=n=>Ls(n)&&n.type===e,r}var VC=class ec extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,ec.prototype)}static get[Symbol.species](){return ec}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new ec(...t[0].concat(this)):new ec(...t.concat(this))}};function TC(e){return Vt(e)?wo(e,()=>{}):e}function Gu(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function hO(e){return typeof e=="boolean"}var SO=()=>function(t){let{thunk:r=!0,immutableCheck:n=!0,serializableCheck:o=!0,actionCreatorCheck:a=!0}=t??{},i=new VC;return r&&(hO(r)?i.push(wC):i.push(IC(r.extraArgument))),i},tc="RTK_autoBatch",Ga=()=>e=>({payload:e,meta:{[tc]:!0}}),OC=e=>t=>{setTimeout(t,e)},CO=(e,t)=>r=>{let n=!1,o=()=>{n||(n=!0,cancelAnimationFrame(a),clearTimeout(i),r())},a=e(o),i=setTimeout(o,t)},vO=(e={type:"raf"})=>t=>(...r)=>{let n=t(...r),o=!0,a=!1,i=!1,p=new Set,m=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?CO(window.requestAnimationFrame,100):OC(10):e.type==="callback"?e.queueNotification:OC(e.timeout),f=()=>{i=!1,a&&(a=!1,p.forEach(g=>g()))};return Object.assign({},n,{subscribe(g){let C=()=>o&&g(),A=n.subscribe(C);return p.add(g),()=>{A(),p.delete(g)}},dispatch(g){try{return o=!g?.meta?.[tc],a=!o,a&&(i||(i=!0,m(f))),n.dispatch(g)}finally{o=!0}}})},xO=e=>function(r){let{autoBatch:n=!0}=r??{},o=new VC(e);return n&&o.push(vO(typeof n=="object"?n:void 0)),o};function jC(e){let t=SO(),{reducer:r=void 0,middleware:n,devTools:o=!0,duplicateMiddlewareCheck:a=!0,preloadedState:i=void 0,enhancers:p=void 0}=e||{},m;if(typeof r=="function")m=r;else if(qr(r))m=Ua(r);else throw new Error(jt(1));let f;typeof n=="function"?f=n(t):f=t();let g=Ms;o&&(g=gO({trace:!1,...typeof o=="object"&&o}));let C=sC(...f),A=xO(C),y=typeof p=="function"?p(A):A(),x=g(...y);return Vf(m,i,x)}function MC(e){let t={},r=[],n,o={addCase(a,i){let p=typeof a=="string"?a:a.type;if(!p)throw new Error(jt(28));if(p in t)throw new Error(jt(29));return t[p]=i,o},addAsyncThunk(a,i){return i.pending&&(t[a.pending.type]=i.pending),i.rejected&&(t[a.rejected.type]=i.rejected),i.fulfilled&&(t[a.fulfilled.type]=i.fulfilled),i.settled&&r.push({matcher:a.settled,reducer:i.settled}),o},addMatcher(a,i){return r.push({matcher:a,reducer:i}),o},addDefaultCase(a){return n=a,o}};return e(o),[t,r,n]}function bO(e){return typeof e=="function"}function ae(e,t){let[r,n,o]=MC(t),a;if(bO(e))a=()=>TC(e());else{let p=TC(e);a=()=>p}function i(p=a(),m){let f=[r[m.type],...n.filter(({matcher:g})=>g(m)).map(({reducer:g})=>g)];return f.filter(g=>!!g).length===0&&(f=[o]),f.reduce((g,C)=>{if(C)if(Dt(g)){let y=C(g,m);return y===void 0?g:y}else{if(Vt(g))return wo(g,A=>C(A,m));{let A=C(g,m);if(A===void 0){if(g===null)return g;throw Error("A case reducer on a non-draftable value must not return undefined")}return A}}return g},p)}return i.getInitialState=a,i}var LC=(e,t)=>yO(e)?e.match(t):e(t);function Dr(...e){return t=>e.some(r=>LC(r,t))}function $a(...e){return t=>e.every(r=>LC(r,t))}function Ku(e,t){if(!e||!e.meta)return!1;let r=typeof e.meta.requestId=="string",n=t.indexOf(e.meta.requestStatus)>-1;return r&&n}function rc(e){return typeof e[0]=="function"&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function Yu(...e){return e.length===0?t=>Ku(t,["pending"]):rc(e)?Dr(...e.map(t=>t.pending)):Yu()(e[0])}function To(...e){return e.length===0?t=>Ku(t,["rejected"]):rc(e)?Dr(...e.map(t=>t.rejected)):To()(e[0])}function nc(...e){let t=r=>r&&r.meta&&r.meta.rejectedWithValue;return e.length===0?$a(To(...e),t):rc(e)?$a(To(...e),t):nc()(e[0])}function gn(...e){return e.length===0?t=>Ku(t,["fulfilled"]):rc(e)?Dr(...e.map(t=>t.fulfilled)):gn()(e[0])}function Xu(...e){return e.length===0?t=>Ku(t,["pending","fulfilled","rejected"]):rc(e)?Dr(...e.flatMap(t=>[t.pending,t.rejected,t.fulfilled])):Xu()(e[0])}var AO="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",oc=(e=21)=>{let t="",r=e;for(;r--;)t+=AO[Math.random()*64|0];return t},RO=["name","message","stack","code"],Xf=class{constructor(e,t){pe(this,"payload");pe(this,"meta");pe(this,"_type");this.payload=e,this.meta=t}},kC=class{constructor(e,t){pe(this,"payload");pe(this,"meta");pe(this,"_type");this.payload=e,this.meta=t}},PO=e=>{if(typeof e=="object"&&e!==null){let t={};for(let r of RO)typeof e[r]=="string"&&(t[r]=e[r]);return t}return{message:String(e)}},NC="External signal was aborted",ue=(()=>{function e(t,r,n){let o=F(t+"/fulfilled",(m,f,g,C)=>({payload:m,meta:{...C||{},arg:g,requestId:f,requestStatus:"fulfilled"}})),a=F(t+"/pending",(m,f,g)=>({payload:void 0,meta:{...g||{},arg:f,requestId:m,requestStatus:"pending"}})),i=F(t+"/rejected",(m,f,g,C,A)=>({payload:C,error:(n&&n.serializeError||PO)(m||"Rejected"),meta:{...A||{},arg:g,requestId:f,rejectedWithValue:!!C,requestStatus:"rejected",aborted:m?.name==="AbortError",condition:m?.name==="ConditionError"}}));function p(m,{signal:f}={}){return(g,C,A)=>{let y=n?.idGenerator?n.idGenerator(m):oc(),x=new s.AbortController,b,P;function E(w){P=w,x.abort()}f&&(f.aborted?E(NC):f.addEventListener("abort",()=>E(NC),{once:!0}));let I=(async function(){let w;try{let T=n?.condition?.(m,{getState:C,extra:A});if(FO(T)&&(T=await T),T===!1||x.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let D=new Promise((G,U)=>{b=()=>{U({name:"AbortError",message:P||"Aborted"})},x.signal.addEventListener("abort",b,{once:!0})});g(a(y,m,n?.getPendingMeta?.({requestId:y,arg:m},{getState:C,extra:A}))),w=await Promise.race([D,Promise.resolve(r(m,{dispatch:g,getState:C,extra:A,requestId:y,signal:x.signal,abort:E,rejectWithValue:((G,U)=>new Xf(G,U)),fulfillWithValue:((G,U)=>new kC(G,U))})).then(G=>{if(G instanceof Xf)throw G;return G instanceof kC?o(G.payload,y,m,G.meta):o(G,y,m)})])}catch(T){w=T instanceof Xf?i(null,y,m,T.payload,T.meta):i(T,y,m)}finally{b&&x.signal.removeEventListener("abort",b)}return n&&!n.dispatchConditionRejection&&i.match(w)&&w.meta.condition||g(w),w})();return Object.assign(I,{abort:E,requestId:y,arg:m,unwrap(){return I.then(EO)}})}}return Object.assign(p,{pending:a,rejected:i,fulfilled:o,settled:Dr(i,o),typePrefix:t})}return e.withTypes=()=>e,e})();function EO(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function FO(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var UC=Symbol.for("rtk-slice-createasyncthunk"),m$={[UC]:ue};function wO(e,t){return`${e}/${t}`}function IO({creators:e}={}){let t=e?.asyncThunk?.[UC];return function(n){let{name:o,reducerPath:a=o}=n;if(!o)throw new Error(jt(11));typeof process<"u";let i=(typeof n.reducers=="function"?n.reducers(OO()):n.reducers)||{},p=Object.keys(i),m={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},f={addCase(w,k){let T=typeof w=="string"?w:w.type;if(!T)throw new Error(jt(12));if(T in m.sliceCaseReducersByType)throw new Error(jt(13));return m.sliceCaseReducersByType[T]=k,f},addMatcher(w,k){return m.sliceMatchers.push({matcher:w,reducer:k}),f},exposeAction(w,k){return m.actionCreators[w]=k,f},exposeCaseReducer(w,k){return m.sliceCaseReducersByName[w]=k,f}};p.forEach(w=>{let k=i[w],T={reducerName:w,type:wO(o,w),createNotation:typeof n.reducers=="function"};NO(k)?qO(T,k,f,t):kO(T,k,f)});function g(){let[w={},k=[],T=void 0]=typeof n.extraReducers=="function"?MC(n.extraReducers):[n.extraReducers],D={...w,...m.sliceCaseReducersByType};return ae(n.initialState,G=>{for(let U in D)G.addCase(U,D[U]);for(let U of m.sliceMatchers)G.addMatcher(U.matcher,U.reducer);for(let U of k)G.addMatcher(U.matcher,U.reducer);T&&G.addDefaultCase(T)})}let C=w=>w,A=new Map,y=new WeakMap,x;function b(w,k){return x||(x=g()),x(w,k)}function P(){return x||(x=g()),x.getInitialState()}function E(w,k=!1){function T(G){let U=G[w];return typeof U>"u"&&k&&(U=Gu(y,T,P)),U}function D(G=C){let U=Gu(A,k,()=>new WeakMap);return Gu(U,G,()=>{let M={};for(let[$,j]of Object.entries(n.selectors??{}))M[$]=TO(j,G,()=>Gu(y,G,P),k);return M})}return{reducerPath:w,getSelectors:D,get selectors(){return D(T)},selectSlice:T}}let I={name:o,reducer:b,actions:m.actionCreators,caseReducers:m.sliceCaseReducersByName,getInitialState:P,...E(a),injectInto(w,{reducerPath:k,...T}={}){let D=k??a;return w.inject({reducerPath:D,reducer:b},T),{...I,...E(D,!0)}}};return I}}function TO(e,t,r,n){function o(a,...i){let p=t(a);return typeof p>"u"&&n&&(p=r()),e(p,...i)}return o.unwrapped=e,o}var Oo=IO();function OO(){function e(t,r){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...r}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...r){return t(...r)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,r){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:r}},asyncThunk:e}}function kO({type:e,reducerName:t,createNotation:r},n,o){let a,i;if("reducer"in n){if(r&&!_O(n))throw new Error(jt(17));a=n.reducer,i=n.prepare}else a=n;o.addCase(e,a).exposeCaseReducer(t,a).exposeAction(t,i?F(e,i):F(e))}function NO(e){return e._reducerDefinitionType==="asyncThunk"}function _O(e){return e._reducerDefinitionType==="reducerWithPrepare"}function qO({type:e,reducerName:t},r,n,o){if(!o)throw new Error(jt(18));let{payloadCreator:a,fulfilled:i,pending:p,rejected:m,settled:f,options:g}=r,C=o(e,a,g);n.exposeAction(t,C),i&&n.addCase(C.fulfilled,i),p&&n.addCase(C.pending,p),m&&n.addCase(C.rejected,m),f&&n.addMatcher(C.settled,f),n.exposeCaseReducer(t,{fulfilled:i||zu,pending:p||zu,rejected:m||zu,settled:f||zu})}function zu(){}var DO="task",QC="listener",BC="completed",eg="cancelled",VO=`task-${eg}`,jO=`task-${BC}`,Zf=`${QC}-${eg}`,MO=`${QC}-${BC}`,Zu=class{constructor(e){pe(this,"code");pe(this,"name","TaskAbortError");pe(this,"message");this.code=e,this.message=`${DO} ${eg} (reason: ${e})`}},tg=(e,t)=>{if(typeof e!="function")throw new TypeError(jt(32))},Hu=()=>{},$C=(e,t=Hu)=>(e.catch(t),e),GC=(e,t)=>(e.addEventListener("abort",t,{once:!0}),()=>e.removeEventListener("abort",t)),Io=e=>{if(e.aborted)throw new Zu(e.reason)};function zC(e,t){let r=Hu;return new Promise((n,o)=>{let a=()=>o(new Zu(e.reason));if(e.aborted){a();return}r=GC(e,a),t.finally(()=>r()).then(n,o)}).finally(()=>{r=Hu})}var LO=async(e,t)=>{try{return await Promise.resolve(),{status:"ok",value:await e()}}catch(r){return{status:r instanceof Zu?"cancelled":"rejected",error:r}}finally{t?.()}},Wu=e=>t=>$C(zC(e,t).then(r=>(Io(e),r))),HC=e=>{let t=Wu(e);return r=>t(new Promise(n=>setTimeout(n,r)))},{assign:Ba}=Object,_C={},Ju="listenerMiddleware",UO=(e,t)=>{let r=n=>GC(e,()=>n.abort(e.reason));return(n,o)=>{tg(n,"taskExecutor");let a=new s.AbortController;r(a);let i=LO(async()=>{Io(e),Io(a.signal);let p=await n({pause:Wu(a.signal),delay:HC(a.signal),signal:a.signal});return Io(a.signal),p},()=>a.abort(jO));return o?.autoJoin&&t.push(i.catch(Hu)),{result:Wu(e)(i),cancel(){a.abort(VO)}}}},QO=(e,t)=>{let r=async(n,o)=>{Io(t);let a=()=>{},p=[new Promise((m,f)=>{let g=e({predicate:n,effect:(C,A)=>{A.unsubscribe(),m([C,A.getState(),A.getOriginalState()])}});a=()=>{g(),f()}})];o!=null&&p.push(new Promise(m=>setTimeout(m,o,null)));try{let m=await zC(t,Promise.race(p));return Io(t),m}finally{a()}};return((n,o)=>$C(r(n,o)))},WC=e=>{let{type:t,actionCreator:r,matcher:n,predicate:o,effect:a}=e;if(t)o=F(t).match;else if(r)t=r.type,o=r.match;else if(n)o=n;else if(!o)throw new Error(jt(21));return tg(a,"options.listener"),{predicate:o,type:t,effect:a}},KC=Ba(e=>{let{type:t,predicate:r,effect:n}=WC(e);return{id:oc(),effect:n,type:t,predicate:r,pending:new Set,unsubscribe:()=>{throw new Error(jt(22))}}},{withTypes:()=>KC}),qC=(e,t)=>{let{type:r,effect:n,predicate:o}=WC(t);return Array.from(e.values()).find(a=>(typeof r=="string"?a.type===r:a.predicate===o)&&a.effect===n)},Jf=e=>{e.pending.forEach(t=>{t.abort(Zf)})},BO=(e,t)=>()=>{for(let r of t.keys())Jf(r);e.clear()},DC=(e,t,r)=>{try{e(t,r)}catch(n){setTimeout(()=>{throw n},0)}},YC=Ba(F(`${Ju}/add`),{withTypes:()=>YC}),$O=F(`${Ju}/removeAll`),XC=Ba(F(`${Ju}/remove`),{withTypes:()=>XC}),GO=(...e)=>{console.error(`${Ju}/error`,...e)},ZC=(e={})=>{let t=new Map,r=new Map,n=y=>{let x=r.get(y)??0;r.set(y,x+1)},o=y=>{let x=r.get(y)??1;x===1?r.delete(y):r.set(y,x-1)},{extra:a,onError:i=GO}=e;tg(i,"onError");let p=y=>(y.unsubscribe=()=>t.delete(y.id),t.set(y.id,y),x=>{y.unsubscribe(),x?.cancelActive&&Jf(y)}),m=(y=>{let x=qC(t,y)??KC(y);return p(x)});Ba(m,{withTypes:()=>m});let f=y=>{let x=qC(t,y);return x&&(x.unsubscribe(),y.cancelActive&&Jf(x)),!!x};Ba(f,{withTypes:()=>f});let g=async(y,x,b,P)=>{let E=new s.AbortController,I=QO(m,E.signal),w=[];try{y.pending.add(E),n(y),await Promise.resolve(y.effect(x,Ba({},b,{getOriginalState:P,condition:(k,T)=>I(k,T).then(Boolean),take:I,delay:HC(E.signal),pause:Wu(E.signal),extra:a,signal:E.signal,fork:UO(E.signal,w),unsubscribe:y.unsubscribe,subscribe:()=>{t.set(y.id,y)},cancelActiveListeners:()=>{y.pending.forEach((k,T,D)=>{k!==E&&(k.abort(Zf),D.delete(k))})},cancel:()=>{E.abort(Zf),y.pending.delete(E)},throwIfCancelled:()=>{Io(E.signal)}})))}catch(k){k instanceof Zu||DC(i,k,{raisedBy:"effect"})}finally{await Promise.all(w),E.abort(MO),o(y),y.pending.delete(E)}},C=BO(t,r);return{middleware:y=>x=>b=>{if(!Ls(b))return x(b);if(YC.match(b))return m(b.payload);if($O.match(b)){C();return}if(XC.match(b))return f(b.payload);let P=y.getState(),E=()=>{if(P===_C)throw new Error(jt(23));return P},I;try{if(I=x(b),t.size>0){let w=y.getState(),k=Array.from(t.values());for(let T of k){let D=!1;try{D=T.predicate(b,w,P)}catch(G){D=!1,DC(i,G,{raisedBy:"predicate"})}D&&g(T,b,y,E)}}}finally{P=_C}return I},startListening:m,stopListening:f,clearListeners:C}};function jt(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}d();c();l();u();var jn=e=>e.commercePagination?.principal.perPage||0,el=(e,t)=>e.commercePagination?.recommendations[t]?.perPage||0,Mn=e=>e.commercePagination?.principal.totalEntries||0,tl=(e,t)=>e.commercePagination?.recommendations[t]?.totalEntries||0,rl=e=>e.commercePagination?.principal.page||0,JC=(e,t)=>e.commercePagination?.recommendations[t]?.page||0;var ac=e=>e.productListing.responseId,ev=e=>e.productListing.requestId,ic=e=>e.productListing?.results.length||e.productListing?.products.length||0,tv=le(e=>({total:Mn(e),current:ic(e)}),({current:e,total:t})=>e<t),rv=e=>{let t=e.productListing?.isLoading;return ie(t)?!1:t},nv=e=>e.productListing?.error??null;d();c();l();u();d();c();l();u();d();c();l();u();d();c();l();u();var{getOwnPropertyNames:HO,getOwnPropertySymbols:WO}=Object,{hasOwnProperty:KO}=Object.prototype;function rg(e,t){return function(n,o,a){return e(n,o,a)&&t(n,o,a)}}function nl(e){return function(r,n,o){if(!r||!n||typeof r!="object"||typeof n!="object")return e(r,n,o);let{cache:a}=o,i=a.get(r),p=a.get(n);if(i&&p)return i===n&&p===r;a.set(r,n),a.set(n,r);let m=e(r,n,o);return a.delete(r),a.delete(n),m}}function ov(e){return HO(e).concat(WO(e))}var YO=Object.hasOwn||((e,t)=>KO.call(e,t)),XO="__v",ZO="__o",JO="_owner",{getOwnPropertyDescriptor:av,keys:iv}=Object,ko=Object.is||function(t,r){return t===r?t!==0||1/t===1/r:t!==t&&r!==r};function ek(e,t){return e===t}function tk(e,t){return e.byteLength===t.byteLength&&ol(new Uint8Array(e),new Uint8Array(t))}function rk(e,t,r){let n=e.length;if(t.length!==n)return!1;for(;n-- >0;)if(!r.equals(e[n],t[n],n,n,e,t,r))return!1;return!0}function nk(e,t){return e.byteLength===t.byteLength&&ol(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}function ok(e,t){return ko(e.getTime(),t.getTime())}function ak(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function sv(e,t,r){let n=e.size;if(n!==t.size)return!1;if(!n)return!0;let o=new Array(n),a=e.entries(),i,p,m=0;for(;(i=a.next())&&!i.done;){let f=t.entries(),g=!1,C=0;for(;(p=f.next())&&!p.done;){if(o[C]){C++;continue}let A=i.value,y=p.value;if(r.equals(A[0],y[0],m,C,e,t,r)&&r.equals(A[1],y[1],A[0],y[0],e,t,r)){g=o[C]=!0;break}C++}if(!g)return!1;m++}return!0}function ik(e,t,r){let n=iv(e),o=n.length;if(iv(t).length!==o)return!1;for(;o-- >0;)if(!uv(e,t,r,n[o]))return!1;return!0}function sc(e,t,r){let n=ov(e),o=n.length;if(ov(t).length!==o)return!1;let a,i,p;for(;o-- >0;)if(a=n[o],!uv(e,t,r,a)||(i=av(e,a),p=av(t,a),(i||p)&&(!i||!p||i.configurable!==p.configurable||i.enumerable!==p.enumerable||i.writable!==p.writable)))return!1;return!0}function sk(e,t){return ko(e.valueOf(),t.valueOf())}function ck(e,t){return e.source===t.source&&e.flags===t.flags}function cv(e,t,r){let n=e.size;if(n!==t.size)return!1;if(!n)return!0;let o=new Array(n),a=e.values(),i,p;for(;(i=a.next())&&!i.done;){let m=t.values(),f=!1,g=0;for(;(p=m.next())&&!p.done;){if(!o[g]&&r.equals(i.value,p.value,i.value,p.value,e,t,r)){f=o[g]=!0;break}g++}if(!f)return!1}return!0}function ol(e,t){let r=e.byteLength;if(t.byteLength!==r||e.byteOffset!==t.byteOffset)return!1;for(;r-- >0;)if(e[r]!==t[r])return!1;return!0}function uk(e,t){return e.hostname===t.hostname&&e.pathname===t.pathname&&e.protocol===t.protocol&&e.port===t.port&&e.hash===t.hash&&e.username===t.username&&e.password===t.password}function uv(e,t,r,n){return(n===JO||n===ZO||n===XO)&&(e.$$typeof||t.$$typeof)?!0:YO(t,n)&&r.equals(e[n],t[n],n,n,e,t,r)}var lk=Object.prototype.toString;function dk(e){let t=gk(e),{areArraysEqual:r,areDatesEqual:n,areFunctionsEqual:o,areMapsEqual:a,areNumbersEqual:i,areObjectsEqual:p,areRegExpsEqual:m,areSetsEqual:f,getUnsupportedCustomComparator:g}=e;return function(A,y,x){if(A===y)return!0;if(A==null||y==null)return!1;let b=typeof A;if(b!==typeof y)return!1;if(b!=="object")return b==="number"||b==="bigint"?i(A,y,x):b==="function"?o(A,y,x):!1;let P=A.constructor;if(P!==y.constructor)return!1;if(P===Object)return p(A,y,x);if(P===Array)return r(A,y,x);if(P===Date)return n(A,y,x);if(P===RegExp)return m(A,y,x);if(P===Map)return a(A,y,x);if(P===Set)return f(A,y,x);if(P===Promise)return!1;if(Array.isArray(A))return r(A,y,x);let E=lk.call(A),I=t[E];if(I)return I(A,y,x);let w=g&&g(A,y,x,E);return w?w(A,y,x):!1}}function pk({circular:e,createCustomConfig:t,strict:r}){let n={areArrayBuffersEqual:tk,areArraysEqual:r?sc:rk,areDataViewsEqual:nk,areDatesEqual:ok,areErrorsEqual:ak,areFunctionsEqual:ek,areMapsEqual:r?rg(sv,sc):sv,areNumbersEqual:ko,areObjectsEqual:r?sc:ik,arePrimitiveWrappersEqual:sk,areRegExpsEqual:ck,areSetsEqual:r?rg(cv,sc):cv,areTypedArraysEqual:r?rg(ol,sc):ol,areUrlsEqual:uk,getUnsupportedCustomComparator:void 0};if(t&&(n=Object.assign({},n,t(n))),e){let o=nl(n.areArraysEqual),a=nl(n.areMapsEqual),i=nl(n.areObjectsEqual),p=nl(n.areSetsEqual);n=Object.assign({},n,{areArraysEqual:o,areMapsEqual:a,areObjectsEqual:i,areSetsEqual:p})}return n}function mk(e){return function(t,r,n,o,a,i,p){return e(t,r,p)}}function fk({circular:e,comparator:t,createState:r,equals:n,strict:o}){if(r)return function(p,m){let{cache:f=e?new WeakMap:void 0,meta:g}=r();return t(p,m,{cache:f,equals:n,meta:g,strict:o})};if(e)return function(p,m){return t(p,m,{cache:new WeakMap,equals:n,meta:void 0,strict:o})};let a={cache:void 0,equals:n,meta:void 0,strict:o};return function(p,m){return t(p,m,a)}}function gk({areArrayBuffersEqual:e,areArraysEqual:t,areDataViewsEqual:r,areDatesEqual:n,areErrorsEqual:o,areFunctionsEqual:a,areMapsEqual:i,areNumbersEqual:p,areObjectsEqual:m,arePrimitiveWrappersEqual:f,areRegExpsEqual:g,areSetsEqual:C,areTypedArraysEqual:A,areUrlsEqual:y}){return{"[object Arguments]":m,"[object Array]":t,"[object ArrayBuffer]":e,"[object AsyncGeneratorFunction]":a,"[object BigInt]":p,"[object BigInt64Array]":A,"[object BigUint64Array]":A,"[object Boolean]":f,"[object DataView]":r,"[object Date]":n,"[object Error]":o,"[object Float16Array]":A,"[object Float32Array]":A,"[object Float64Array]":A,"[object Function]":a,"[object GeneratorFunction]":a,"[object Int8Array]":A,"[object Int16Array]":A,"[object Int32Array]":A,"[object Map]":i,"[object Number]":f,"[object Object]":(x,b,P)=>typeof x.then!="function"&&typeof b.then!="function"&&m(x,b,P),"[object RegExp]":g,"[object Set]":C,"[object String]":f,"[object URL]":y,"[object Uint8Array]":A,"[object Uint8ClampedArray]":A,"[object Uint16Array]":A,"[object Uint32Array]":A}}var ng=Vr(),V$=Vr({strict:!0}),j$=Vr({circular:!0}),M$=Vr({circular:!0,strict:!0}),L$=Vr({createInternalComparator:()=>ko}),U$=Vr({strict:!0,createInternalComparator:()=>ko}),Q$=Vr({circular:!0,createInternalComparator:()=>ko}),B$=Vr({circular:!0,createInternalComparator:()=>ko,strict:!0});function Vr(e={}){let{circular:t=!1,createInternalComparator:r,createState:n,strict:o=!1}=e,a=pk(e),i=dk(a),p=r?r(i):mk(i);return fk({circular:t,comparator:i,createState:n,equals:p,strict:o})}function lv(e,t,r=(n,o)=>n===o){return e.length===t.length&&e.findIndex((n,o)=>!r(t[o],n))===-1}function yk(e,t){return e.length!==t.length?!1:e.every(r=>t.findIndex(n=>No(r,n))!==-1)}var No=Vr({createCustomConfig:e=>({...e,areArraysEqual:yk})});function og(e,t,r){if(e===void 0)return{};let n=t(e);return n!==r?{q:n}:{}}function ag(e,t,r){if(e===void 0)return{};let n=t(e);return!ng(n,r)?{sortCriteria:n}:{}}function jr(e,t,r,n){if(e===void 0)return{};let o=Object.entries(e).filter(([a])=>t(a)).map(([a,{request:i}])=>{let p=r(i);return p.length?{[a]:p}:{}}).reduce((a,i)=>({...a,...i}),{});return Object.keys(o).length?{[n]:o}:{}}d();c();l();u();d();c();l();u();function Mr(e){let{activeValue:t,ancestryMap:r}=hk(e);return t?Sk(t,r):[]}function hk(e){let t=[...e],r=new Map;for(;t.length>0;){let n=t.shift();if(n.state==="selected")return{activeValue:n,ancestryMap:r};if(r)for(let o of n.children)r.set(o,n);t.unshift(...n.children)}return{}}function Sk(e,t){let r=[];if(!e)return[];let n=e;do r.unshift(n),n=t.get(n);while(n);return r}d();c();l();u();function dv(){return{principal:Ln(),recommendations:{}}}function Ln(){return{page:0,perPage:0,totalEntries:0,totalPages:0}}d();c();l();u();d();c();l();u();d();c();l();u();var Pr=(r=>(r.Relevance="relevance",r.Fields="fields",r))(Pr||{}),_o=(r=>(r.Ascending="asc",r.Descending="desc",r))(_o||{}),Er=()=>({by:"relevance"});var cc=e=>({by:"fields",fields:e}),pv=new H({options:{required:!1},values:{by:new Vn({enum:Pr,required:!0}),fields:new fe({each:new H({values:{field:new L({required:!0}),direction:new Vn({enum:_o}),displayName:new L}})})}});function qo(){return{appliedSort:Er(),availableSorts:[Er()]}}function al(e){return{...Ck(e?.commercePagination,t=>t.principal.page,Ln().page),...vk(e?.commercePagination,t=>t.principal.perPage,Ln().perPage),...ag(e?.commerceSort,t=>t.appliedSort,qo().appliedSort),...jr(e.commerceFacetSet,Un(e,"regular"),xk,"f"),...jr(e.commerceFacetSet,Un(e,"regular"),bk,"fExcluded"),...jr(e.commerceFacetSet,Un(e,"location"),Ak,"lf"),...jr(e.commerceFacetSet,Un(e,"hierarchical"),Rk,"cf"),...jr(e.commerceFacetSet,Un(e,"dateRange"),mv,"df"),...jr(e.commerceFacetSet,Un(e,"dateRange"),fv,"dfExcluded"),...jr(e.commerceFacetSet,Un(e,"numericalRange"),mv,"nf"),...jr(e.commerceFacetSet,Un(e,"numericalRange"),fv,"nfExcluded"),...gv("selected",e.manualNumericFacetSet),...gv("excluded",e.manualNumericFacetSet)}}function Ck(e,t,r){if(e===void 0)return{};let n=t(e);return n!==r?{page:n}:{}}function vk(e,t,r){if(e===void 0)return{};let n=t(e);return n!==r?{perPage:n}:{}}function xk(e){return e.values.filter(t=>t.state==="selected").map(t=>t.value)}function bk(e){return e.values.filter(t=>t.state==="excluded").map(t=>t.value)}function Ak(e){return e.values.filter(t=>t.state==="selected").map(t=>t.value)}function mv(e){return e.values.filter(t=>t.state==="selected")}function fv(e){return e.values.filter(t=>t.state==="excluded")}function gv(e,t){if(!t||e==="idle")return{};let r=Object.entries(t).map(([n,o])=>{if(!(o.manualRange===void 0||o.manualRange.state!==e))return{[n]:[o.manualRange]}}).filter(n=>n!==void 0).reduce((n,o)=>({...n,...o}),{});return e==="selected"?{mnf:r}:{mnfExcluded:r}}function Rk(e){return Mr(e.values).map(r=>r.value)}function Un(e,t){return r=>e.commerceFacetSet[r].request.type===t}d();c();l();u();var il=()=>({query:""});var uc=e=>e.commerceSearch.responseId,yv=e=>e.commerceSearch.requestId,lc=e=>e.commerceSearch?.results.length||e.commerceSearch?.products.length||0,hv=le(e=>({total:Mn(e),current:lc(e)}),({current:e,total:t})=>e<t),Sv=e=>{let t=e.commerceSearch?.isLoading;return ie(t)?!1:t},Cv=e=>e.commerceSearch?.error??null,sl=e=>e.commerceQuery?.query??"",Pk=e=>e.commerceSearch?.queryExecuted,vv=(e,t)=>ie(t.queryCorrection?.correctedQuery)?sl(e):t.queryCorrection.correctedQuery,xv=e=>({...og(e?.commerceQuery,t=>t.query,il().query),...al(e)});function bv(e){return{query:Pk(e)||""}}var ig;(t=>t.responseIdSelector=Av(uc))(ig||(ig={}));var sg;(t=>t.responseIdSelector=Av(ac))(sg||(sg={}));function Av(e){return t=>e(t[ee])}var pg={};Da(pg,{escapeHtml:()=>za,getHighlightedSuggestion:()=>dg,highlightString:()=>Fk});d();c();l();u();d();c();l();u();var Do=(e,t=5)=>e+Math.random().toString(36).substring(2,2+t);function ug(e){return Array.isArray(e)}function cl(e){return e.trim()===""}function Rv(e){let t={};for(let[r,n]of e)t[r]=n;return t}function dc(e){if(typeof e!="object"||!e)return e;try{return JSON.parse(JSON.stringify(e))}catch{return e}}function ul(e,t,r={}){let n;return((...o)=>{let a=r.isImmediate&&!n;if(clearTimeout(n),n=setTimeout(()=>{n=void 0,r.isImmediate||e.apply(void 0,o)},t),a)return e.apply(void 0,o)})}function Fk(e){if(cl(e.openingDelimiter)||cl(e.closingDelimiter))throw Error("delimiters should be a non-empty string");if(ie(e.content)||cl(e.content))return e.content;if(e.highlights.length===0)return za(e.content);let t=e.content.length,r="",n=0;for(let o=0;o<e.highlights.length;o++){let a=e.highlights[o],i=a.offset,p=i+a.length;if(p>t)break;r+=za(e.content.slice(n,i)),r+=e.openingDelimiter,r+=za(e.content.slice(i,p)),r+=e.closingDelimiter,n=p}return n!==t&&(r+=za(e.content.slice(n))),r}function dg(e,t){return e=za(e),e.replace(/\[(.*?)\]|\{(.*?)\}|\((.*?)\)/g,(r,n,o,a)=>n?lg(n,t.notMatchDelimiters):o?lg(o,t.exactMatchDelimiters):a?lg(a,t.correctionDelimiters):r)}function lg(e,t){return t?t.open+e+t.close:e}function za(e){let t={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},r=`(?:${Object.keys(t).join("|")})`,n=RegExp(r),o=RegExp(r,"g");return n.test(e)?e.replace(o,a=>t[a]):e}d();c();l();u();d();c();l();u();var Dv=Rr(kv(),1);d();c();l();u();var de=new Error("Failed to load reducers."),Ha=class extends Error{constructor(){super(),this.name="UnauthorizedTokenError",this.message="The token being used to perform the request is unauthorized. It may be expired or invalid."}},jo=class extends Error{constructor(r,n){super();pe(this,"statusCode");this.name="Disconnected",this.message=`Client could not connect to the following URL: ${r}`,this.statusCode=n??0}};d();c();l();u();function Nv(e){let t=[];for(let r in e){let n=encodeURIComponent(r),o=encodeURIComponent(e[r]);t.push(`${n}=${o}`)}return t.join("&")}function _v(e){return typeof e!="object"||!e?!1:Object.values(e).every(Jk)}function Jk(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"}function qv(e){return e===429}var Wa=class e{static async call(t){let r=e0(t),{logger:n}=t,o=await e.preprocessRequest(r,t);n.info(o,"Platform request");let{url:a,...i}=o,p=async()=>{let m=await S(a,i);if(qv(m.status))throw m;return m};try{let m=await(0,Dv.backOff)(p,{startingDelay:100,timeMultiple:2,maxDelay:800,numOfAttempts:4,jitter:"full",retry:async f=>{let g=f&&qv(f.status);return g&&(n.info("Platform retrying request"),await new Promise(C=>setTimeout(C,1e3))),g}});switch(m.status){case 419:case 401:throw n.info("Platform renewing token"),new Ha;case 404:throw new jo(a,m.status);default:return n.info({response:m,requestInfo:o},"Platform response"),m}}catch(m){return m.message==="Failed to fetch"?new jo(a):m}}static async preprocessRequest(t,r){let{origin:n,preprocessRequest:o,logger:a,requestMetadata:i}=r,{signal:p,...m}=t,f=dc(m);try{let g=await o(t,n,i);return{...t,...g}}catch(g){a.error(g,"Platform request preprocessing failed. Returning default request options.")}return f}};function Ut(e,t="prod",r="platform"){let n=t==="prod"?"":t,o=r==="platform"?"":`.${r}`;return`https://${e}${o}.org${n}.coveo.com`}function Ka(e,t,r="prod"){return e??Ut(t,r)}function rr(e,t="prod"){return`${Ut(e,t)}/rest/search/v2`}function dl(e,t="prod"){return`${Ut(e,t,"analytics")}/rest/organizations/${e}/events/v1`}function e0(e){let{url:t,method:r,requestParams:n,contentType:o,accessToken:a,signal:i}=e,p=e.method==="POST"||e.method==="PUT",m=t0(n,o);return{url:t,method:r,headers:{"Content-Type":o,Authorization:`Bearer ${a}`,...e.headers},...p&&{body:m},signal:i}}function t0(e,t){return t==="application/x-www-form-urlencoded"?_v(e)?Nv(e):"":JSON.stringify(e)}d();c();l();u();function r0(e){return{statusCode:e.statusCode,type:e.name,message:e.message}}function n0(e){return{statusCode:e.code,type:e.name,message:e.message,ignored:!0}}function xg(e,t){if(t&&e.name==="AbortError")return{error:n0(e)};if(e instanceof jo)return{error:r0(e)};throw e}d();c();l();u();d();c();l();u();var Vv=["badges"];var fc=(e,t)=>({...hn(e,t),requestParams:o0(e)}),o0=e=>{let{trackingId:t,clientId:r,context:n,language:o,country:a,currency:i,page:p,perPage:m,facets:f,sort:g}=e;return{trackingId:t,clientId:r,context:n,language:o,country:a,currency:i,page:p,perPage:m,facets:f,sort:g}},hn=(e,t)=>{let{url:r,trackingId:n,accessToken:o}=e,a=a0(r,n,t);return{accessToken:o,method:"POST",contentType:"application/json",url:a,origin:"commerceApiFetch",requestMetadata:{method:t}}},a0=(e,t,r)=>t&&Vv.includes(r)?`${e}/tracking-ids/${t}/${r}`:`${e}/${r}`;d();c();l();u();var jv=e=>({...hn(e,"badges"),requestParams:i0(e)}),i0=e=>{let{language:t,country:r,currency:n,placementIds:o,context:a,clientId:i}=e;return{language:t,country:r,currency:n,placementIds:o,context:a,...i&&{clientId:i}}};d();c();l();u();var Mv=(e,t)=>({...hn(e,t),requestParams:s0(e)}),s0=e=>{let{slotId:t,trackingId:r,clientId:n,context:o,language:a,country:i,currency:p,page:m,perPage:f}=e;return{slotId:t,trackingId:r,clientId:n,context:o,language:a,country:i,currency:p,page:m,perPage:f}};d();c();l();u();var Lv=e=>({...hn(e,"search/redirect"),requestParams:c0(e)}),c0=e=>{let{trackingId:t,query:r,clientId:n,context:o,language:a,country:i,currency:p}=e;return{trackingId:t,query:r,clientId:n,context:o,language:a,country:i,currency:p}};d();c();l();u();var Uv=e=>({...hn(e,"search/querySuggest"),requestParams:u0(e)}),u0=e=>{let{trackingId:t,query:r,clientId:n,context:o,language:a,country:i,currency:p}=e;return{trackingId:t,query:r,clientId:n,context:o,language:a,country:i,currency:p}};var Pt=e=>e.error!==void 0,pl=class{constructor(t){pe(this,"options",t)}async getProductListing(t){let r=fc(t,"listing");return this.query({...r,requestParams:{...r.requestParams,enableResults:!!t?.enableResults},...this.options})}async search(t){let r=fc(t,"search");return this.query({...r,requestParams:{...r.requestParams,query:t?.query,enableResults:!!t?.enableResults},...this.options})}async getRecommendations(t){return this.query({...Mv(t,"recommendations"),...this.options})}async productSuggestions(t){let r=fc(t,"search/productSuggest");return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async querySuggest(t){let r=Uv(t);return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async facetSearch(t,r){let n=fc(t,"facet");return this.query({...n,url:`${n.url}?type=${r}`,requestParams:{...n.requestParams,facetId:t?.facetId,facetQuery:t?.facetQuery,query:t?.query,numberOfValues:t?.numberOfValues},...this.options})}async getBadges(t){return this.query({...jv(t),...this.options})}async plan(t){let r=Lv(t);return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async query(t){let r=await Wa.call(t);if(r instanceof Error)return xg(r);let n=await r.json();return r.ok?{success:n}:{error:n}}};function ml(e,t="prod"){return`${Ut(e,t)}/rest/organizations/${e}/commerce/v2`}d();c();l();u();var Mo=(n=>(n.CHILD_PRODUCT="childProduct",n.PRODUCT="product",n.SPOTLIGHT="spotlight",n))(Mo||{});d();c();l();u();var yc=Rr(fl(),1),zv=Rr(Qv(),1);d();c();l();u();var gl=Rr(fl(),1),$v=Rr(Bv(),1);gl.default.extend($v.default);var yl="YYYY/MM/DD@HH:mm:ss",l0="1401-01-01";function Lo(e,t){let r=(0,gl.default)(e,t);return!r.isValid()&&!t?(0,gl.default)(e,yl):r}function gc(e){return e.format(yl)}function Gv(e){return gc(Lo(e))===e}function hl(e,t){let r=Lo(e,t);if(!r.isValid()){let n=". Please provide a date format string in the configuration options. See https://day.js.org/docs/en/parse/string-format for more information.",o=` with the format "${t}"`;throw new Error(`Could not parse the provided date "${e}"${t?o:n}`)}wg(r)}function wg(e){if(e.isBefore(l0))throw new Error(`Date is before year 1401, which is unsupported by the API: ${e}`)}yc.default.extend(zv.default);var Hv=["past","now","next"],Wv=["minute","hour","day","week","month","quarter","year"],d0=e=>{let t=e==="now";return{amount:new Z({required:!t,min:1}),unit:new L({required:!t,constrainTo:Wv}),period:new L({required:!0,constrainTo:Hv})}};function Qn(e){if(typeof e=="string"&&!Lr(e))throw new Error(`The value "${e}" is not respecting the relative date format "period-amount-unit"`);let t=typeof e=="string"?Ig(e):e;new Ee(d0(t.period)).validate(t);let r=Yv(t),n=JSON.stringify(t);if(!r.isValid())throw new Error(`Date is invalid: ${n}`);wg(r)}function Kv(e){let{period:t,amount:r,unit:n}=e;switch(t){case"past":case"next":return`${t}-${r}-${n}`;case"now":return t}}function Yv(e){let{period:t,amount:r,unit:n}=e;switch(t){case"past":return(0,yc.default)().subtract(r,n);case"next":return(0,yc.default)().add(r,n);case"now":return(0,yc.default)()}}function hc(e){return gc(Yv(Ig(e)))}function Xv(e){return e.toLocaleLowerCase().split("-")}function Lr(e){let[t,r,n]=Xv(e);if(t==="now")return!0;if(!Hv.includes(t)||!Wv.includes(n))return!1;let o=parseInt(r,10);return!(Number.isNaN(o)||o<=0)}function Zv(e){return!!e&&typeof e=="object"&&"period"in e}function Ig(e){let[t,r,n]=Xv(e);return t==="now"?{period:"now"}:{period:t,amount:r?parseInt(r,10):void 0,unit:n||void 0}}function Jv(e){return Qn(e),Ig(e)}d();c();l();u();d();c();l();u();var Sl=e=>e;d();c();l();u();d();c();l();u();var B=new L({required:!0,emptyAllowed:!1}),Be=new L({required:!1,emptyAllowed:!1}),rt=new L({required:!0,emptyAllowed:!0}),ex=new L({required:!1,emptyAllowed:!0}),tx=new fe({each:B,required:!0}),rx=new L({required:!1,emptyAllowed:!1,regex:/^\d+\.\d+\.\d+$/}),nx=new L({required:!1,emptyAllowed:!1,regex:/^[a-zA-Z0-9_\-.]{1,100}$/}),ox=new L({required:!0,emptyAllowed:!1,regex:/^[a-zA-Z0-9_\-.]{1,100}$/}),Mt=({message:e,name:t,stack:r})=>({message:e,name:t,stack:r}),st=(e,t)=>{if("required"in t)return{payload:new Ee({value:t}).validate({value:e}).value};let o=new H({options:{required:!0},values:t}).validate(e);if(o)throw new js(o);return{payload:e}},O=(e,t)=>{try{return st(e,t)}catch(r){return{payload:e,error:Mt(r)}}},Et=(e,t,r,n)=>{let o=`Check the initialState of ${n}`;return ax(e,t,r,o,"Controller initialization error")},Lt=(e,t,r,n)=>{let o=`Check the options of ${n}`;return ax(e,t,r,o,"Controller initialization error")},ax=(e,t,r,n,o)=>{try{return t.validate(r,n)}catch(a){throw e.logger.error(a,o),a}};d();c();l();u();d();c();l();u();var Bn="3.51.3",ix=["@coveo/atomic","@coveo/quantic"];var Tg=()=>Be,sx=()=>B,Uo=F("configuration/updateBasicConfiguration",e=>O(e,{accessToken:Be,environment:new L({required:!1,constrainTo:["prod","hipaa","stg","dev"]}),organizationId:Be})),cx=F("configuration/updateSearchConfiguration",e=>O(e,{proxyBaseUrl:new L({required:!1,url:!0}),pipeline:new L({required:!1,emptyAllowed:!0}),searchHub:Be,timezone:Be,locale:Be,authenticationProviders:new fe({required:!1,each:B})})),Sc={enabled:new ne({default:!0}),originContext:Tg(),originLevel2:Tg(),originLevel3:Tg(),proxyBaseUrl:new L({required:!1,url:!0}),runtimeEnvironment:new Le,anonymous:new ne({default:!1}),deviceId:Be,userDisplayName:Be,documentLocation:Be,trackingId:nx,analyticsMode:new L({constrainTo:["legacy","next"],required:!1,default:"next"}),source:new H({options:{required:!1},values:ix.reduce((e,t)=>(e[t]=rx,e),{})})},Og=F("configuration/updateAnalyticsConfiguration",e=>O(e,Sc)),Cl=F("configuration/analytics/disable"),vl=F("configuration/analytics/enable"),ux=F("configuration/analytics/originlevel2",e=>O(e,{originLevel2:sx()})),lx=F("configuration/analytics/originlevel3",e=>O(e,{originLevel3:sx()})),dx=F("knowledge/setAgentId",e=>O(e,new L({required:!0})));var Ya=F("commerce/configuration/updateBasicConfiguration",e=>O(e,{accessToken:Be,environment:new L({required:!1,constrainTo:["prod","hipaa","stg","dev"]}),organizationId:Be})),Xa=F("commerce/configuration/updateProxyBaseUrl",e=>O(e,{proxyBaseUrl:new L({required:!1,url:!0})})),Za=F("commerce/configuration/updateAnalyticsConfiguration",e=>O(e,{enabled:Sc.enabled,proxyBaseUrl:Sc.proxyBaseUrl,source:Sc.source,trackingId:ox})),xl=F("commerce/configuration/analytics/disable"),bl=F("commerce/configuration/analytics/enable");d();c();l();u();d();c();l();u();var px=()=>({accessToken:"",environment:"prod",organizationId:"",analytics:{enabled:!0,trackingId:"",source:{}},commerce:{}});var kg=ae(px(),e=>e.addCase(Ya,(t,r)=>{mx(t,r.payload)}).addCase(Uo,(t,r)=>{mx(t,r.payload)}).addCase(Xa,(t,r)=>{p0(t,r.payload)}).addCase(Za,(t,r)=>{m0(t,r.payload)}).addCase(xl,t=>{t.analytics.enabled=!1}).addCase(bl,t=>{t.analytics.enabled=!0}));function mx(e,t){ie(t.accessToken)||(e.accessToken=t.accessToken),e.environment=t.environment??"prod",ie(t.organizationId)||(e.organizationId=t.organizationId)}function p0(e,t){ie(t.proxyBaseUrl)||(e.commerce.apiBaseUrl=t.proxyBaseUrl)}function m0(e,t){ie(t.enabled)||(e.analytics.enabled=t.enabled),ie(t.proxyBaseUrl)||(e.analytics.apiBaseUrl=t.proxyBaseUrl),ie(t.source)||(e.analytics.source=t.source),ie(t.trackingId)||(e.analytics.trackingId=t.trackingId)}d();c();l();u();d();c();l();u();d();c();l();u();function Ja(e){return e.currency}var fx=(e,t)=>({currency:Ja(t.commerceContext),products:f0(t.cart),transaction:e}),gx=(e,t)=>({currency:Ja(t.commerceContext),...e}),Qo=le(e=>e.cart,e=>e.cartItems,(e,t)=>t.map(r=>e[r])),f0=le(Qo,e=>e.map(({quantity:t,...r})=>({quantity:t,product:r})));d();c();l();u();var Ng={productId:B,quantity:new Z({required:!0,min:0}),name:new L({required:!1}),price:new Z({required:!1,min:0})},_g=new fe({each:new H({values:{...Ng}})}),qg={items:_g},yx=new Ee(qg);var $n=F("commerce/cart/setItems",e=>O(e,_g)),ei=F("commerce/cart/updateItemQuantity",e=>O(e,Ng)),ti=F("commerce/cart/purchase"),Al=ue("commerce/cart/emit/purchaseEvent",async(e,{extra:t,getState:r})=>{let n=fx(e,r()),{relay:o}=t;o.emit("ec.purchase",n)}),Rl=ue("commerce/cart/emit/cartActionEvent",async(e,{extra:t,getState:r})=>{let n=gx(e,r()),{relay:o}=t;o.emit("ec.cartAction",n)});d();c();l();u();d();c();l();u();d();c();l();u();function ge(e){let t,r=new Map,n=()=>r.size===0,o=a=>{try{let i=JSON.stringify(a),p=t!==i;return t=i,p}catch(i){return console.warn('Could not detect if state has changed, check the controller "get state method"',i),!0}};return{subscribe(a){a();let i=Symbol(),p;return n()&&(t=JSON.stringify(this.state),p=e.subscribe(()=>{o(this.state)&&r.forEach(m=>m())})),r.set(i,a),()=>{r.delete(i),n()&&p?.()}},get state(){return{}}}}d();c();l();u();function hx(e,t){return e.cart[Bo(t)]}var Sx=le(Qo,e=>e.reduce((t,r)=>t+r.quantity,0)),Cx=le(Qo,e=>e.reduce((t,r)=>t+r.price*r.quantity,0));function vx(e,t={}){if(!g0(e))throw de;let{dispatch:r}=e,n=ge(e),o=()=>e[ee].cart,a={...t.initialState};Et(e,yx,a,"buildCart"),a.items!==void 0&&r($n(a.items));function i(g,C){return C?C.quantity!==g.quantity:!0}function p(g,C){return!C||g.quantity>C.quantity?"add":"remove"}function m(g,C){return C?g.name===C.name&&g.price===C.price&&g.quantity===C.quantity:!1}function f(g,C){let{quantity:A,...y}=g,x=p(g,C),b=C?Math.abs(A-C.quantity):A;return{action:x,quantity:b,product:y}}return{...n,empty:function(){for(let g of Qo(o()))this.updateItemQuantity({...g,quantity:0})},purchase(g){r(Al(g)),r(ti())},updateItemQuantity(g){let C=hx(o(),g);!C&&g.quantity<=0||m(g,C)||(i(g,C)&&r(Rl(f(g,C))),r(ei(g)))},get state(){let g=o();return{items:Qo(g),totalQuantity:Sx(g),totalPrice:Cx(g)}}}}function Bo(e){return`${e.productId},${e.name},${e.price}`}function g0(e){return e.addReducers({cart:ri}),!0}d();c();l();u();var Pl=()=>({cartItems:[],cart:{},purchasedItems:[],purchased:{}}),xx=e=>Ax(e.cartItems,e.cart),bx=e=>Ax(e.purchasedItems,e.purchased);function Ax(e,t){let r=e.reduce((n,o)=>{let{productId:a,quantity:i}=t[o];return a in n||(n[a]={productId:a,quantity:0}),n[a].quantity+=i,n},{});return[...Object.values(r)]}var ri=ae(Pl(),e=>{e.addCase($n,(t,{payload:r})=>{let{cart:n,cartItems:o}=r.reduce((a,i)=>{let p=Bo(i);return{cartItems:[...a.cartItems,p],cart:{...a.cart,[p]:i},purchasedItems:[],purchased:{}}},Pl());Rx(t,o,n)}).addCase(ei,(t,{payload:r})=>{let n=Bo(r);if(!(n in t.cart)){y0(r,t);return}if(r.quantity<=0){h0(r,t);return}t.cart[n]=r}).addCase(ti,t=>{S0(t);let{cart:r,cartItems:n}=Pl();Rx(t,n,r)})});function Rx(e,t,r){e.cartItems=t,e.cart=r}function y0(e,t){if(e.quantity<=0)return;let r=Bo(e);t.cartItems=[...t.cartItems,r],t.cart[r]=e}function h0(e,t){let r=Bo(e);t.cartItems=t.cartItems.filter(n=>n!==r),delete t.cart[r]}function S0(e){for(let t of e.cartItems){if(t in e.purchased){e.purchased[t].quantity+=e.cart[t].quantity;continue}e.purchasedItems=[...e.purchasedItems,t],e.purchased[t]=e.cart[t]}}d();c();l();u();d();c();l();u();var C0=Intl.supportedValuesOf("currency"),v0=new L({required:!0,emptyAllowed:!1,constrainTo:C0}),Dg={url:B},Vg={latitude:new Z({min:-90,max:90,required:!0}),longitude:new Z({min:-180,max:180,required:!0})},Px={custom:new H({options:{required:!1}})},Cc={language:B,country:B,currency:v0,view:new H({options:{required:!0},values:Dg}),location:new H({options:{required:!1},values:Vg}),custom:new H({options:{required:!1}})},Ex=new Ee(Cc);var Ye=F("commerce/context/set",e=>O(e,Cc)),Je=F("commerce/context/setView",e=>O(e,Dg)),ni=F("commerce/context/setLocation",e=>O(e,Vg)),oi=F("commerce/context/setCustom",e=>O({custom:e},Px));d();c();l();u();d();c();l();u();var Fx=()=>({language:"",country:"",currency:"",view:{url:""}});var Ur=ae(Fx(),e=>{e.addCase(Ye,(t,{payload:r})=>r).addCase(Je,(t,{payload:r})=>{t.view=r}).addCase(ni,(t,{payload:r})=>{t.location=r}).addCase(oi,(t,{payload:r})=>{t.custom=r.custom})});d();c();l();u();d();c();l();u();var El=()=>({correctedQuery:"",corrections:[],originalQuery:""});d();c();l();u();d();c();l();u();d();c();l();u();var Gn=le(e=>e.source,e=>Object.entries(e).map(([t,r])=>`${t}@${r}`).concat(`@coveo/headless@${Bn}`));var Qr=(e,t)=>{let{view:r,location:n,custom:o,...a}=e.commerceContext;return{accessToken:e.configuration.accessToken,url:e.configuration.commerce.apiBaseUrl??ml(e.configuration.organizationId,e.configuration.environment),organizationId:e.configuration.organizationId,trackingId:e.configuration.analytics.trackingId,...a,...e.configuration.analytics.enabled?{clientId:t.clientId}:{},context:{user:{...n,...t.userAgent?{userAgent:t.userAgent}:{}},view:{...r,...t.referrer?{referrer:t.referrer}:{}},capture:t.capture??(e.configuration.analytics.enabled&&t.clientId!==""),cart:xx(e.cart),source:Gn(e.configuration.analytics),...o?{custom:o}:{}}}};d();c();l();u();d();c();l();u();var Fl=(e,t,r)=>({...Qr(e,t),...x0(e,r)}),x0=(e,t)=>{let r=t?e.commercePagination?.recommendations[t]:e.commercePagination?.principal;return r&&{page:r.page,...r.perPage&&{perPage:r.perPage}}};var nr=(e,t)=>({...Fl(e,t),facets:[...b0(e)],...e.commerceSort&&{sort:A0(e.commerceSort.appliedSort)}});function b0(e){return!e.facetOrder||!e.commerceFacetSet?[]:e.facetOrder.filter(t=>e.commerceFacetSet?.[t]).map(t=>e.manualNumericFacetSet?.[t]?.manualRange?{facetId:t,field:t,numberOfValues:1,isFieldExpanded:!1,preventAutoSelect:!0,type:"numericalRange",values:[e.manualNumericFacetSet[t].manualRange],initialNumberOfValues:1}:e.commerceFacetSet[t].request).filter(t=>t&&t.values.length>0)}function A0(e){return e.by==="relevance"?{sortCriteria:"relevance"}:{sortCriteria:"fields",fields:e.fields.map(({name:t,direction:r})=>({field:t,direction:r}))}}d();c();l();u();var $o=F("commerce/facets/core/updateNumberOfValues",e=>O(e,{facetId:B,numberOfValues:new Z({required:!0,min:1})})),Go=F("commerce/facets/core/updateIsFieldExpanded",e=>O(e,{facetId:B,isFieldExpanded:new ne({required:!0})})),lt=F("commerce/facets/core/clearAll"),zn=F("commerce/facets/core/deleteAll"),Ft=F("commerce/facets/core/deselectAllValues",e=>O(e,{facetId:B})),zo=F("commerce/facets/core/updateFreezeCurrentValues",e=>O(e,{facetId:B,freezeCurrentValues:new ne({required:!0})})),ai=F("commerce/facets/core/updateAutoSelectionForAll",e=>O(e,{allow:new ne({required:!0})}));d();c();l();u();var wl={slotId:ex},R0={...wl,pageSize:new Z({required:!0,min:0})},Sn=F("commerce/pagination/setPageSize",e=>O(e,R0)),P0={...wl,page:new Z({required:!0,min:0})},Br=F("commerce/pagination/selectPage",e=>O(e,P0)),Hn=F("commerce/pagination/nextPage",e=>O(e,wl)),Wn=F("commerce/pagination/previousPage",e=>O(e,wl)),ii=F("commerce/pagination/registerRecommendationsSlot",e=>O(e,{slotId:B}));d();c();l();u();var nt=F("commerce/query/update",e=>O(e,{query:new L}));d();c();l();u();d();c();l();u();var Kn=F("commerce/triggers/query/updateIgnore",e=>O(e,{q:new L({emptyAllowed:!0,required:!0})})),si=F("commerce/triggers/query/applyModification",e=>O(e,new H({values:{originalQuery:Be,modification:Be}})));var vc=class{constructor(t){pe(this,"config",t)}async process(t){return this.processQueryErrorOrContinue(t)??await this.processQueryCorrectionsOrContinue(t)??await this.processQueryTriggersOrContinue(t)??this.processSuccessResponse(t)}async fetchFromAPI(t){let r=Date.now(),n=await this.extra.apiClient.search(t),o=Date.now()-r,a=this.getState().commerceQuery.query||"";return{response:n,duration:o,queryExecuted:a,requestExecuted:t,enableResults:!!("enableResults"in t&&t.enableResults)}}processSuccessResponse(t){return{...t,response:this.getSuccessResponse(t),originalQuery:this.getCurrentQuery()}}processQueryErrorOrContinue(t){return Pt(t.response)?this.rejectWithValue(t.response.error):null}async processQueryCorrectionsOrContinue(t){let r=this.getState(),n=this.getSuccessResponse(t);if(!n||!r.didYouMean)return null;let{queryCorrection:o}=n;if(!(!ie(o)&&!ie(o.correctedQuery)))return null;let{correctedQuery:i,originalQuery:p}=n.queryCorrection;return this.onUpdateQueryForCorrection(i??""),{...t,response:{...n},queryExecuted:vv(r,n),originalQuery:p??""}}async processQueryTriggersOrContinue(t){let r=this.getSuccessResponse(t);if(!r)return null;let n=r.triggers.find(p=>p.type==="query")?.content||"";if(!n)return null;if(this.getState().triggers?.queryModification.queryToIgnore===n)return this.dispatch(Kn({q:""})),null;let a=this.getCurrentQuery(),i=await this.automaticallyRetryQueryWithTriggerModification(n,t.enableResults);return Pt(i.response)?this.rejectWithValue(i.response.error):{...i,response:{...i.response.success},originalQuery:a}}async automaticallyRetryQueryWithTriggerModification(t,r){return this.dispatch(si({newQuery:t,originalQuery:this.getCurrentQuery()})),this.onUpdateQueryForCorrection(t),await this.fetchFromAPI({...nr(this.getState(),this.navigatorContext),query:t,enableResults:!!r})}get dispatch(){return this.config.dispatch}get rejectWithValue(){return this.config.rejectWithValue}getState(){return this.config.getState()}get navigatorContext(){return this.config.extra.navigatorContext}getCurrentQuery(){let t=this.getState();return t.commerceQuery.query!==void 0?t.commerceQuery.query:""}getSuccessResponse(t){return Pt(t.response)?null:t.response.success}get extra(){return this.config.extra}onUpdateQueryForCorrection(t){this.dispatch(nt({query:t}))}};var be=ue("commerce/search/executeSearch",async(e={},t)=>{let{getState:r}=t,n=r(),{navigatorContext:o}=t.extra,a=nr(n,o),i=sl(n),p=new vc(t),m=await p.fetchFromAPI({...a,query:i,enableResults:!!e?.enableResults});return p.process(m)}),Yn=ue("commerce/search/fetchMoreProducts",async(e={},t)=>{let{getState:r}=t,n=r(),{navigatorContext:o}=t.extra;if(!hv(n))return null;let i=jn(n),m=lc(n)/i,f=sl(n),g=nr(n,o),C=new vc(t),A=await C.fetchFromAPI({...g,query:f,page:m,enableResults:!!e?.enableResults});return C.process(A)}),ci=ue("commerce/search/prepareForSearchWithQuery",(e,t)=>{let{dispatch:r}=t;O(e,{query:new L,clearFilters:new ne}),e.clearFilters&&r(zn()),r(ai({allow:!0})),r(nt({query:e.query})),r(Br({page:0}))}),ui=ue("commerce/search/fetchInstantProducts",async(e,{getState:t,rejectWithValue:r,extra:n})=>{let o=t(),{apiClient:a,navigatorContext:i}=n,{q:p}=e,m=await a.productSuggestions({...Qr(o,i),query:p});return Pt(m)?r(m.error):{response:{...m.success,products:m.success.products}}}),E0={child:new H({options:{required:!0},values:{permanentid:new L({required:!0})}})},li=F("commerce/search/promoteChildToParent",e=>O(e,E0));d();c();l();u();function wx(){return{wasCorrectedTo:"",queryCorrection:El(),originalQuery:""}}var Il=ae(wx(),e=>{e.addCase(be.pending,t=>{t.queryCorrection=El(),t.wasCorrectedTo=""}).addCase(be.fulfilled,(t,r)=>{let{queryCorrection:n}=r.payload.response;t.originalQuery=r.payload.originalQuery,t.wasCorrectedTo=n?.correctedQuery??"",t.queryCorrection={correctedQuery:n?.correctedQuery??n?.corrections[0]?.correctedQuery??"",wordCorrections:n?.corrections[0]?.wordCorrections??[]}})});d();c();l();u();d();c();l();u();function di(){return[]}d();c();l();u();var ze=ue("commerce/productListing/fetch",async(e,{getState:t,rejectWithValue:r,extra:{apiClient:n,navigatorContext:o}})=>{let a=t(),i=nr(a,o),p=await n.getProductListing({...i,enableResults:!!e?.enableResults});return Pt(p)?r(p.error):{response:p.success}}),Xn=ue("commerce/productListing/fetchMoreProducts",async(e,{getState:t,rejectWithValue:r,extra:{apiClient:n,navigatorContext:o}})=>{let a=t();if(!tv(a))return null;let p=jn(a),f=ic(a)/p,g=await n.getProductListing({...nr(a,o),enableResults:!!e?.enableResults,page:f});return Pt(g)?r(g.error):{response:g.success}}),F0={child:new H({options:{required:!0},values:{permanentid:new L({required:!0})}})},pi=F("commerce/productListing/promoteChildToParent",e=>O(e,F0));d();c();l();u();d();c();l();u();var mi={f:new H,fExcluded:new H,lf:new H,cf:new H,nf:new H,nfExcluded:new H,mnf:new H,mnfExcluded:new H,df:new H,dfExcluded:new H,sortCriteria:new H,page:new Z({min:0}),perPage:new Z({min:1})};var wt=F("commerce/productListingParameters/restore",e=>O(e,mi));d();c();l();u();d();c();l();u();var Tl={q:new L,...mi};var ot=F("commerce/searchParameters/restore",e=>O(e,Tl));var $r=ae(di(),e=>{e.addCase(ze.fulfilled,Ix).addCase(be.fulfilled,Ix).addCase(ot,Tx).addCase(wt,Tx).addCase(Je,()=>di()).addCase(Ye,()=>di())});function Ix(e,t){return t.payload.response.facets.map(r=>r.facetId)}function Tx(e,t){return[...Object.keys(t.payload.f??{}),...Object.keys(t.payload.lf??{}),...Object.keys(t.payload.nf??{}),...Object.keys(t.payload.df??{}),...Object.keys(t.payload.cf??{}),...Object.keys(t.payload.mnf??{})]}d();c();l();u();d();c();l();u();d();c();l();u();var Ae=B;d();c();l();u();var xc={facetId:Ae,captions:new H({options:{required:!1}}),numberOfValues:new Z({required:!1,min:1}),query:new L({required:!1,emptyAllowed:!0})};var w0={path:new fe({required:!0,each:B}),displayValue:rt,rawValue:rt,count:new Z({required:!0,min:0})},or=F("categoryFacet/selectSearchResult",e=>O(e,{facetId:Ae,value:new H({values:w0})})),Ol=F("categoryFacetSearch/register",e=>O(e,xc));d();c();l();u();function Ox(){return{}}d();c();l();u();function fi(e,t,r){let{facetId:n}=t;if(e[n])return;let o=!1,a={...Cn,...t},i=r();e[n]={options:a,isLoading:o,response:i,initialNumberOfValues:a.numberOfValues,requestId:""}}function kl(e,t){let{facetId:r,...n}=t,o=e[r];o&&(o.options={...o.options,...n})}function gi(e,t,r){let n=e[t];n&&(n.requestId=r,n.isLoading=!0)}function yi(e,t){let r=e[t];r&&(r.isLoading=!1)}function bc(e,t,r){let{facetId:n}=t,o=e[n];o&&(o.requestId="",o.isLoading=!1,o.response=r(),o.options.numberOfValues=o.initialNumberOfValues,o.options.query=Cn.query)}function Ho(e,t){Object.keys(e).forEach(r=>bc(e,{facetId:r},t))}var Cn={captions:{},numberOfValues:10,query:""};d();c();l();u();d();c();l();u();d();c();l();u();d();c();l();u();d();c();l();u();function Zn(e){return Object.values(e).map(t=>t.request)}function jg(e,t){let r={};e.forEach(a=>{r[a.facetId]=a});let n=[];t.forEach(a=>{a in r&&(n.push(r[a]),delete r[a])});let o=Object.values(r);return[...n,...o]}function kx(e){return Zn(e).map(t=>{let n=t.currentValues.some(({state:o})=>o!=="idle");return t.generateAutomaticRanges&&!n?{...t,currentValues:[]}:t})}var Mg={alphanumericDescending:{type:"alphanumeric",order:"descending"},alphanumericNaturalDescending:{type:"alphanumericNatural",order:"descending"}};function I0(e){return Zn(e).map(t=>{let r=Mg[t.sortCriteria];return r?{...t,sortCriteria:r}:t})}function T0(e){return[...I0(e.facetSet??{}),...kx(e.numericFacetSet??{}),...kx(e.dateFacetSet??{}),...Zn(e.categoryFacetSet??{})]}function O0(e){return T0(e).filter(({facetId:t})=>e.facetOptions?.facets[t]?.enabled??!0)}function Nl(e){return jg(O0(e),e.facetOrder??[])}d();c();l();u();d();c();l();u();d();c();l();u();d();c();l();u();d();c();l();u();var hi=class e{static set(t,r,n){let o,a,i;n&&(a=new Date,a.setTime(a.getTime()+n));let p=window.location.hostname,m=/^(\d{1,3}\.){3}\d{1,3}$/,f=/^([0-9a-fA-F]{0,4}:){2,7}[0-9a-fA-F]{0,4}$/;m.test(p)||f.test(p)||p.indexOf(".")===-1?Lg(t,r,a):(i=p.split("."),o=i[i.length-2]+"."+i[i.length-1],Lg(t,r,a,o))}static get(t){let r=t+"=",n=document.cookie.split(";");for(let o=0;o<n.length;o++){let a=n[o];if(a=a.replace(/^\s+/,""),a.lastIndexOf(r,0)===0)return a.substring(r.length,a.length)}return null}static erase(t){e.set(t,"",-1)}};function Lg(e,t,r,n){document.cookie=`${e}=${t}`+(r?`;expires=${r.toUTCString()}`:"")+(n?`;domain=${n}`:"")+";path=/;SameSite=Lax"+(window.location.protocol==="https:"?";Secure":"")}d();c();l();u();function k0(){return typeof navigator<"u"}function Nx(){try{return typeof localStorage<"u"}catch{return!1}}function _x(){try{return typeof sessionStorage<"u"}catch{return!1}}function qx(){return!!(k0()&&navigator.cookieEnabled)}var Dx=null;function Vx(){return Dx||(Nx()?localStorage:qx()?new Ug:_x()?sessionStorage:new Qg)}var Si=class Si{getItem(t){return hi.get(`${Si.prefix}${t}`)}removeItem(t){hi.erase(`${Si.prefix}${t}`)}setItem(t,r,n){hi.set(`${Si.prefix}${t}`,r,n)}};pe(Si,"prefix","coveo_");var Ug=Si;var Qg=class{getItem(t){return null}removeItem(t){}setItem(t,r){}};var _l="__coveo.analytics.history",N0=20,_0=1e3*60,q0=75,Wo=class Wo{constructor(t){pe(this,"store");this.store=t||Vx()}static getInstance(t){return Wo.instance||(Wo.instance=new Wo(t)),Wo.instance}addElement(t){t.internalTime=new Date().getTime(),t=this.cropQueryElement(this.stripEmptyQuery(t));let r=this.getHistoryWithInternalTime();r!==null?this.isValidEntry(t)&&this.setHistory([t].concat(r)):this.setHistory([t])}async addElementAsync(t){t.internalTime=new Date().getTime(),t=this.cropQueryElement(this.stripEmptyQuery(t));let r=await this.getHistoryWithInternalTimeAsync();r!==null?this.isValidEntry(t)&&this.setHistory([t].concat(r)):this.setHistory([t])}getHistory(){let t=this.getHistoryWithInternalTime();return this.stripEmptyQueries(this.stripInternalTime(t))}async getHistoryAsync(){let t=await this.getHistoryWithInternalTimeAsync();return this.stripEmptyQueries(this.stripInternalTime(t))}getHistoryWithInternalTime(){try{let t=this.store.getItem(_l);return t&&typeof t=="string"?JSON.parse(t):[]}catch{return[]}}async getHistoryWithInternalTimeAsync(){try{let t=await this.store.getItem(_l);return t?JSON.parse(t):[]}catch{return[]}}setHistory(t){try{this.store.setItem(_l,JSON.stringify(t.slice(0,N0)))}catch{}}clear(){try{this.store.removeItem(_l)}catch{}}getMostRecentElement(){let t=this.getHistoryWithInternalTime();return Array.isArray(t)?t.sort((n,o)=>(o.internalTime||0)-(n.internalTime||0))[0]:null}cropQueryElement(t){return t.name&&t.value&&t.name.toLowerCase()==="query"&&(t.value=t.value.slice(0,q0)),t}isValidEntry(t){let r=this.getMostRecentElement();return r&&r.value===t.value?(t.internalTime||0)-(r.internalTime||0)>_0:!0}stripInternalTime(t){return Array.isArray(t)?t.map(r=>{let{name:n,time:o,value:a}=r;return{name:n,time:o,value:a}}):[]}stripEmptyQuery(t){let{name:r,time:n,value:o}=t;return r&&typeof o=="string"&&r.toLowerCase()==="query"&&o.trim()===""?{name:r,time:n}:t}stripEmptyQueries(t){return t.map(r=>this.stripEmptyQuery(r))}};pe(Wo,"instance",null);var Bg=Wo,ar=Bg;d();c();l();u();d();c();l();u();d();c();l();u();function vn(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function Q(e,t,r,n){function o(a){return a instanceof r?a:new r(function(i){i(a)})}return new(r||(r=Promise))(function(a,i){function p(g){try{f(n.next(g))}catch(C){i(C)}}function m(g){try{f(n.throw(g))}catch(C){i(C)}}function f(g){g.done?a(g.value):o(g.value).then(p,m)}f((n=n.apply(e,t||[])).next())})}var Oe;(function(e){e.search="search",e.click="click",e.custom="custom",e.view="view",e.collect="collect"})(Oe||(Oe={}));function zg(){return typeof window<"u"}function ay(){return typeof navigator<"u"}function Ci(){return typeof document<"u"}function Hg(){try{return typeof localStorage<"u"}catch{return!1}}function D0(){try{return typeof sessionStorage<"u"}catch{return!1}}function Xx(){return ay()&&navigator.cookieEnabled}var V0=[Oe.click,Oe.custom,Oe.search,Oe.view],j0=(e,t)=>V0.indexOf(e)!==-1?Object.assign({language:Ci()?document.documentElement.lang:"unknown",userAgent:ay()?navigator.userAgent:"unknown"},t):t,Rc=class e{static set(t,r,n){var o,a,i,p;n&&(a=new Date,a.setTime(a.getTime()+n)),p=window.location.hostname,p.indexOf(".")===-1?jx(t,r,a):(i=p.split("."),o=i[i.length-2]+"."+i[i.length-1],jx(t,r,a,o))}static get(t){for(var r=t+"=",n=document.cookie.split(";"),o=0;o<n.length;o++){var a=n[o];if(a=a.replace(/^\s+/,""),a.lastIndexOf(r,0)===0)return a.substring(r.length,a.length)}return null}static erase(t){e.set(t,"",-1)}};function jx(e,t,r,n){document.cookie=`${e}=${t}`+(r?`;expires=${r.toUTCString()}`:"")+(n?`;domain=${n}`:"")+";path=/;SameSite=Lax"}function M0(){return Hg()?localStorage:Xx()?new Pc:D0()?sessionStorage:new xi}var Pc=class e{getItem(t){return Rc.get(`${e.prefix}${t}`)}removeItem(t){Rc.erase(`${e.prefix}${t}`)}setItem(t,r,n){Rc.set(`${e.prefix}${t}`,r,n)}};Pc.prefix="coveo_";var Wg=class{constructor(){this.cookieStorage=new Pc}getItem(t){return localStorage.getItem(t)||this.cookieStorage.getItem(t)}removeItem(t){this.cookieStorage.removeItem(t),localStorage.removeItem(t)}setItem(t,r){localStorage.setItem(t,r),this.cookieStorage.setItem(t,r,31556926e3)}},xi=class{getItem(t){return null}removeItem(t){}setItem(t,r){}},ql="__coveo.analytics.history",L0=20,U0=1e3*60,Q0=75,jl=class{constructor(t){this.store=t||M0()}addElement(t){t.internalTime=new Date().getTime(),t=this.cropQueryElement(this.stripEmptyQuery(t));let r=this.getHistoryWithInternalTime();r!=null?this.isValidEntry(t)&&this.setHistory([t].concat(r)):this.setHistory([t])}addElementAsync(t){return Q(this,void 0,void 0,function*(){t.internalTime=new Date().getTime(),t=this.cropQueryElement(this.stripEmptyQuery(t));let r=yield this.getHistoryWithInternalTimeAsync();r!=null?this.isValidEntry(t)&&this.setHistory([t].concat(r)):this.setHistory([t])})}getHistory(){let t=this.getHistoryWithInternalTime();return this.stripEmptyQueries(this.stripInternalTime(t))}getHistoryAsync(){return Q(this,void 0,void 0,function*(){let t=yield this.getHistoryWithInternalTimeAsync();return this.stripEmptyQueries(this.stripInternalTime(t))})}getHistoryWithInternalTime(){try{let t=this.store.getItem(ql);return t&&typeof t=="string"?JSON.parse(t):[]}catch{return[]}}getHistoryWithInternalTimeAsync(){return Q(this,void 0,void 0,function*(){try{let t=yield this.store.getItem(ql);return t?JSON.parse(t):[]}catch{return[]}})}setHistory(t){try{this.store.setItem(ql,JSON.stringify(t.slice(0,L0)))}catch{}}clear(){try{this.store.removeItem(ql)}catch{}}getMostRecentElement(){let t=this.getHistoryWithInternalTime();return Array.isArray(t)?t.sort((n,o)=>(o.internalTime||0)-(n.internalTime||0))[0]:null}cropQueryElement(t){return t.name&&t.value&&t.name.toLowerCase()==="query"&&(t.value=t.value.slice(0,Q0)),t}isValidEntry(t){let r=this.getMostRecentElement();return r&&r.value==t.value?(t.internalTime||0)-(r.internalTime||0)>U0:!0}stripInternalTime(t){return Array.isArray(t)?t.map(r=>{let{name:n,time:o,value:a}=r;return{name:n,time:o,value:a}}):[]}stripEmptyQuery(t){let{name:r,time:n,value:o}=t;return r&&typeof o=="string"&&r.toLowerCase()==="query"&&o.trim()===""?{name:r,time:n}:t}stripEmptyQueries(t){return t.map(r=>this.stripEmptyQuery(r))}};var B0=(e,t)=>Q(void 0,void 0,void 0,function*(){return e===Oe.view?(yield $0(t.contentIdValue),Object.assign({location:window.location.toString(),referrer:document.referrer,title:document.title},t)):t}),$0=e=>Q(void 0,void 0,void 0,function*(){let t=new jl,r={name:"PageView",value:e,time:new Date().toISOString()};yield t.addElementAsync(r)}),Dl,G0=new Uint8Array(16);function z0(){if(!Dl&&(Dl=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Dl))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Dl(G0)}var H0=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function Ml(e){return typeof e=="string"&&H0.test(e)}var St=[];for(let e=0;e<256;++e)St.push((e+256).toString(16).slice(1));function Zx(e,t=0){return St[e[t+0]]+St[e[t+1]]+St[e[t+2]]+St[e[t+3]]+"-"+St[e[t+4]]+St[e[t+5]]+"-"+St[e[t+6]]+St[e[t+7]]+"-"+St[e[t+8]]+St[e[t+9]]+"-"+St[e[t+10]]+St[e[t+11]]+St[e[t+12]]+St[e[t+13]]+St[e[t+14]]+St[e[t+15]]}function W0(e){if(!Ml(e))throw TypeError("Invalid UUID");let t,r=new Uint8Array(16);return r[0]=(t=parseInt(e.slice(0,8),16))>>>24,r[1]=t>>>16&255,r[2]=t>>>8&255,r[3]=t&255,r[4]=(t=parseInt(e.slice(9,13),16))>>>8,r[5]=t&255,r[6]=(t=parseInt(e.slice(14,18),16))>>>8,r[7]=t&255,r[8]=(t=parseInt(e.slice(19,23),16))>>>8,r[9]=t&255,r[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,r[11]=t/4294967296&255,r[12]=t>>>24&255,r[13]=t>>>16&255,r[14]=t>>>8&255,r[15]=t&255,r}function K0(e){e=unescape(encodeURIComponent(e));let t=[];for(let r=0;r<e.length;++r)t.push(e.charCodeAt(r));return t}var Y0="6ba7b810-9dad-11d1-80b4-00c04fd430c8",X0="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function Z0(e,t,r){function n(o,a,i,p){var m;if(typeof o=="string"&&(o=K0(o)),typeof a=="string"&&(a=W0(a)),((m=a)===null||m===void 0?void 0:m.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let f=new Uint8Array(16+o.length);if(f.set(a),f.set(o,a.length),f=r(f),f[6]=f[6]&15|t,f[8]=f[8]&63|128,i){p=p||0;for(let g=0;g<16;++g)i[p+g]=f[g];return i}return Zx(f)}try{n.name=e}catch{}return n.DNS=Y0,n.URL=X0,n}var J0=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Mx={randomUUID:J0};function Ko(e,t,r){if(Mx.randomUUID&&!t&&!e)return Mx.randomUUID();e=e||{};let n=e.random||(e.rng||z0)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,t){r=r||0;for(let o=0;o<16;++o)t[r+o]=n[o];return t}return Zx(n)}function eN(e,t,r,n){switch(e){case 0:return t&r^~t&n;case 1:return t^r^n;case 2:return t&r^t&n^r&n;case 3:return t^r^n}}function $g(e,t){return e<<t|e>>>32-t}function tN(e){let t=[1518500249,1859775393,2400959708,3395469782],r=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof e=="string"){let i=unescape(encodeURIComponent(e));e=[];for(let p=0;p<i.length;++p)e.push(i.charCodeAt(p))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);let n=e.length/4+2,o=Math.ceil(n/16),a=new Array(o);for(let i=0;i<o;++i){let p=new Uint32Array(16);for(let m=0;m<16;++m)p[m]=e[i*64+m*4]<<24|e[i*64+m*4+1]<<16|e[i*64+m*4+2]<<8|e[i*64+m*4+3];a[i]=p}a[o-1][14]=(e.length-1)*8/Math.pow(2,32),a[o-1][14]=Math.floor(a[o-1][14]),a[o-1][15]=(e.length-1)*8&4294967295;for(let i=0;i<o;++i){let p=new Uint32Array(80);for(let y=0;y<16;++y)p[y]=a[i][y];for(let y=16;y<80;++y)p[y]=$g(p[y-3]^p[y-8]^p[y-14]^p[y-16],1);let m=r[0],f=r[1],g=r[2],C=r[3],A=r[4];for(let y=0;y<80;++y){let x=Math.floor(y/20),b=$g(m,5)+eN(x,f,g,C)+A+t[x]+p[y]>>>0;A=C,C=g,g=$g(f,30)>>>0,f=m,m=b}r[0]=r[0]+m>>>0,r[1]=r[1]+f>>>0,r[2]=r[2]+g>>>0,r[3]=r[3]+C>>>0,r[4]=r[4]+A>>>0}return[r[0]>>24&255,r[0]>>16&255,r[0]>>8&255,r[0]&255,r[1]>>24&255,r[1]>>16&255,r[1]>>8&255,r[1]&255,r[2]>>24&255,r[2]>>16&255,r[2]>>8&255,r[2]&255,r[3]>>24&255,r[3]>>16&255,r[3]>>8&255,r[3]&255,r[4]>>24&255,r[4]>>16&255,r[4]>>8&255,r[4]&255]}var rN=Z0("v5",80,tN),Lx=rN,Jx="2.30.55",Ux=e=>`${e.protocol}//${e.hostname}${e.pathname.indexOf("/")===0?e.pathname:`/${e.pathname}`}${e.search}`,Ac={pageview:"pageview",event:"event"},Ll=class{constructor({client:t,uuidGenerator:r=Ko}){this.client=t,this.uuidGenerator=r}},Kg=class extends Ll{constructor({client:t,uuidGenerator:r=Ko}){super({client:t,uuidGenerator:r}),this.actionData={},this.pageViewId=r(),this.nextPageViewId=this.pageViewId,this.currentLocation=Ux(window.location),this.lastReferrer=Ci()?document.referrer:"",this.addHooks()}getApi(t){return t==="setAction"?this.setAction:null}setAction(t,r){this.action=t,this.actionData=r}clearData(){this.clearPluginData(),this.action=void 0,this.actionData={}}getLocationInformation(t,r){return Object.assign({hitType:t},this.getNextValues(t,r))}updateLocationInformation(t,r){this.updateLocationForNextPageView(t,r)}getDefaultContextInformation(t){let r={title:Ci()?document.title:"",encoding:Ci()?document.characterSet:"UTF-8"},n={screenResolution:`${screen.width}x${screen.height}`,screenColor:`${screen.colorDepth}-bit`},o={language:navigator.language,userAgent:navigator.userAgent},a={time:Date.now(),eventId:this.uuidGenerator()};return Object.assign(Object.assign(Object.assign(Object.assign({},a),n),o),r)}updateLocationForNextPageView(t,r){let{pageViewId:n,referrer:o,location:a}=this.getNextValues(t,r);this.lastReferrer=o,this.pageViewId=n,this.currentLocation=a,t===Ac.pageview&&(this.nextPageViewId=this.uuidGenerator(),this.hasSentFirstPageView=!0)}getNextValues(t,r){return{pageViewId:t===Ac.pageview?this.nextPageViewId:this.pageViewId,referrer:t===Ac.pageview&&this.hasSentFirstPageView?this.currentLocation:this.lastReferrer,location:t===Ac.pageview?this.getCurrentLocationFromPayload(r):this.currentLocation}}getCurrentLocationFromPayload(t){if(t.page){let r=o=>o.replace(/^\/?(.*)$/,"/$1");return`${(o=>o.split("/").slice(0,3).join("/"))(this.currentLocation)}${r(t.page)}`}else return Ux(window.location)}},Jn=class e{constructor(t,r){if(!Ml(t))throw Error("Not a valid uuid");this.clientId=t,this.creationDate=Math.floor(r/1e3)}toString(){return this.clientId.replace(/-/g,"")+"."+this.creationDate.toString()}get expired(){let t=Math.floor(Date.now()/1e3)-this.creationDate;return t<0||t>e.expirationTime}validate(t,r){return!this.expired&&this.matchReferrer(t,r)}matchReferrer(t,r){try{let n=new URL(t);return r.some(o=>new RegExp(o.replace(/\\/g,"\\\\").replace(/\./g,"\\.").replace(/\*/g,".*")+"$").test(n.host))}catch{return!1}}static fromString(t){let r=t.split(".");if(r.length!==2)return null;let[n,o]=r;if(n.length!==32||isNaN(parseInt(o)))return null;let a=n.substring(0,8)+"-"+n.substring(8,12)+"-"+n.substring(12,16)+"-"+n.substring(16,20)+"-"+n.substring(20,32);return Ml(a)?new e(a,Number.parseInt(o)*1e3):null}};Jn.cvo_cid="cvo_cid";Jn.expirationTime=120;var Yg=class extends Ll{constructor({client:t,uuidGenerator:r=Ko}){super({client:t,uuidGenerator:r})}getApi(t){switch(t){case"decorate":return this.decorate;case"acceptFrom":return this.acceptFrom;default:return null}}decorate(t){return Q(this,void 0,void 0,function*(){if(!this.client.getCurrentVisitorId)throw new Error("Could not retrieve current clientId");try{let r=new URL(t),n=yield this.client.getCurrentVisitorId();return r.searchParams.set(Jn.cvo_cid,new Jn(n,Date.now()).toString()),r.toString()}catch{throw new Error("Invalid URL provided")}})}acceptFrom(t){this.client.setAcceptedLinkReferrers(t)}};Yg.Id="link";var sr=Object.keys;function Vl(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}var Gg=128,eb=192,Qx=224,Bx=240;function nN(e){return(e&248)===Bx?4:(e&Bx)===Qx?3:(e&Qx)===eb?2:1}function oN(e,t){if(t<0||e.length<=t)return e;let r=e.indexOf("%",t-2);for(r<0||r>t?r=t:t=r;r>2&&e.charAt(r-3)=="%";){let n=Number.parseInt(e.substring(r-2,r),16);if((n&Gg)!=Gg)break;if(r-=3,(n&eb)!=Gg){t-r>=nN(n)*3&&(r=t);break}}return e.substring(0,r)}var Xg={id:"svc_ticket_id",subject:"svc_ticket_subject",description:"svc_ticket_description",category:"svc_ticket_category",productId:"svc_ticket_product_id",custom:"svc_ticket_custom"},aN=sr(Xg).map(e=>Xg[e]),iN=[...aN].join("|"),sN=new RegExp(`^(${iN}$)`),cN={svcAction:"svc_action",svcActionData:"svc_action_data"},uN=e=>sr(e).filter(t=>e[t]!==void 0).reduce((t,r)=>{let n=Xg[r]||r;return Object.assign(Object.assign({},t),{[n]:e[r]})},{}),lN=e=>sN.test(e),dN=[lN],$x={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",price:"pr",quantity:"qt",coupon:"cc",position:"ps",group:"group"},Gx={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",position:"ps",price:"pr",group:"group"},It={action:"pa",list:"pal",listSource:"pls"},Ul={id:"ti",revenue:"tr",tax:"tt",shipping:"ts",coupon:"tcc",affiliation:"ta",step:"cos",option:"col"},pN=["loyaltyCardId","loyaltyTier","thirdPartyPersona","companyName","favoriteStore","storeName","userIndustry","userRole","userDepartment","businessUnit"],Zg={id:"quoteId",affiliation:"quoteAffiliation"},Jg={id:"reviewId",rating:"reviewRating",comment:"reviewComment"},mN={add:It,bookmark_add:It,bookmark_remove:It,click:It,checkout:It,checkout_option:It,detail:It,impression:It,remove:It,refund:Object.assign(Object.assign({},It),Ul),purchase:Object.assign(Object.assign({},It),Ul),quickview:It,quote:Object.assign(Object.assign({},It),Zg),review:Object.assign(Object.assign({},It),Jg)},fN=sr($x).map(e=>$x[e]),gN=sr(Gx).map(e=>Gx[e]),yN=sr(It).map(e=>It[e]),hN=sr(Ul).map(e=>Ul[e]),SN=sr(Jg).map(e=>Jg[e]),CN=sr(Zg).map(e=>Zg[e]),vN=[...fN,"custom"].join("|"),xN=[...gN,"custom"].join("|"),tb="(pr[0-9]+)",rb="(il[0-9]+pi[0-9]+)",bN=new RegExp(`^${tb}(${vN})$`),AN=new RegExp(`^(${rb}(${xN}))|(il[0-9]+nm)$`),RN=new RegExp(`^(${yN.join("|")})$`),PN=new RegExp(`^(${hN.join("|")})$`),EN=new RegExp(`^${tb}custom$`),FN=new RegExp(`^${rb}custom$`),wN=new RegExp(`^(${[...pN,...SN,...CN].join("|")})$`),IN=e=>bN.test(e),TN=e=>AN.test(e),ON=e=>RN.test(e),kN=e=>PN.test(e),NN=e=>wN.test(e),_N=[TN,IN,ON,kN,NN],qN=[EN,FN],DN={anonymizeIp:"aip"},VN={eventCategory:"ec",eventAction:"ea",eventLabel:"el",eventValue:"ev",page:"dp",visitorId:"cid",clientId:"cid",userId:"uid",currencyCode:"cu"},jN={hitType:"t",pageViewId:"pid",encoding:"de",location:"dl",referrer:"dr",screenColor:"sd",screenResolution:"sr",title:"dt",userAgent:"ua",language:"ul",eventId:"z",time:"tm"},MN=["contentId","contentIdKey","contentType","searchHub","tab","searchUid","permanentId","contentLocale","trackingId"],LN=Object.assign(Object.assign(Object.assign(Object.assign({},DN),VN),jN),MN.reduce((e,t)=>Object.assign(Object.assign({},e),{[t]:t}),{})),ey=Object.assign(Object.assign({},LN),cN),UN=e=>{let t=!!e.action&&mN[e.action]||{};return sr(e).reduce((r,n)=>{let o=t[n]||ey[n]||n;return Object.assign(Object.assign({},r),{[o]:e[n]})},{})},QN=sr(ey).map(e=>ey[e]),BN=e=>QN.indexOf(e)!==-1,$N=e=>e==="custom",GN=e=>[..._N,...dN,BN,$N].some(t=>t(e)),zN=e=>sr(e).reduce((t,r)=>{let n=HN(r);return n?Object.assign(Object.assign({},t),WN(n,e[r])):Object.assign(Object.assign({},t),{[r]:e[r]})},{}),HN=e=>{let t;return[...qN].every(r=>{var n;return t=(n=r.exec(e))===null||n===void 0?void 0:n[1],!t}),t},WN=(e,t)=>sr(t).reduce((r,n)=>Object.assign(Object.assign({},r),{[`${e}${n}`]:t[n]}),{}),ty=class{constructor(t){this.opts=t}sendEvent(t,r){return Q(this,void 0,void 0,function*(){if(!this.isAvailable())throw new Error('navigator.sendBeacon is not supported in this browser. Consider adding a polyfill like "sendbeacon-polyfill".');let{baseUrl:n,preprocessRequest:o}=this.opts,a=yield this.getQueryParamsForEventType(t),{url:i,payload:p}=yield this.preProcessRequestAsPotentialJSONString(`${n}/analytics/${t}?${a}`,r,o),m=this.encodeForEventType(t,p),f=new Blob([m],{type:"application/x-www-form-urlencoded"});navigator.sendBeacon(i,f)})}isAvailable(){return"sendBeacon"in navigator}deleteHttpCookieVisitorId(){return Promise.resolve()}preProcessRequestAsPotentialJSONString(t,r,n){return Q(this,void 0,void 0,function*(){let o=t,a=r;if(n){let i=yield n({url:t,body:JSON.stringify(r)},"analyticsBeacon"),{url:p,body:m}=i;o=p||t;try{a=JSON.parse(m)}catch(f){console.error("Unable to process the request body as a JSON string",f)}}return{payload:a,url:o}})}encodeForEventType(t,r){return this.isEventTypeLegacy(t)?this.encodeEventToJson(t,r):this.encodeEventToJson(t,r,this.opts.token)}getQueryParamsForEventType(t){return Q(this,void 0,void 0,function*(){let{token:r,visitorIdProvider:n}=this.opts,o=yield n.getCurrentVisitorId();return[r&&this.isEventTypeLegacy(t)?`access_token=${r}`:"",o?`visitorId=${o}`:"","discardVisitInfo=true"].filter(a=>!!a).join("&")})}isEventTypeLegacy(t){return[Oe.click,Oe.custom,Oe.search,Oe.view].indexOf(t)!==-1}encodeEventToJson(t,r,n){let o=`${t}Event=${encodeURIComponent(JSON.stringify(r))}`;return n&&(o=`access_token=${encodeURIComponent(n)}&${o}`),o}},ry=class{sendEvent(t,r){return Q(this,void 0,void 0,function*(){return Promise.resolve()})}deleteHttpCookieVisitorId(){return Q(this,void 0,void 0,function*(){return Promise.resolve()})}},zx=h.fetch,Ql=class{constructor(t){this.opts=t}sendEvent(t,r){return Q(this,void 0,void 0,function*(){let{baseUrl:n,visitorIdProvider:o,preprocessRequest:a}=this.opts,i=this.shouldAppendVisitorId(t)?yield this.getVisitorIdParam():"",p={url:`${n}/analytics/${t}${i}`,credentials:"include",mode:"cors",headers:this.getHeaders(),method:"POST",body:JSON.stringify(r)},m=Object.assign(Object.assign({},p),a?yield a(p,"analyticsFetch"):{}),{url:f}=m,g=vn(m,["url"]),C;try{C=yield zx(f,g)}catch(A){console.error("An error has occured when sending the event.",A);return}if(C.ok){let A=yield C.json();return A.visitorId&&o.setCurrentVisitorId(A.visitorId),A}else{try{C.json()}catch{}throw console.error(`An error has occured when sending the "${t}" event.`,C,r),new Error(`An error has occurred when sending the "${t}" event. Check the console logs for more details.`)}})}deleteHttpCookieVisitorId(){return Q(this,void 0,void 0,function*(){let{baseUrl:t}=this.opts,r=`${t}/analytics/visit`;yield zx(r,{headers:this.getHeaders(),method:"DELETE"})})}shouldAppendVisitorId(t){return[Oe.click,Oe.custom,Oe.search,Oe.view].indexOf(t)!==-1}getVisitorIdParam(){return Q(this,void 0,void 0,function*(){let{visitorIdProvider:t}=this.opts,r=yield t.getCurrentVisitorId();return r?`?visitor=${r}`:""})}getHeaders(){let{token:t}=this.opts;return Object.assign(Object.assign({},t?{Authorization:`Bearer ${t}`}:{}),{"Content-Type":"application/json"})}},ny=class{constructor(t,r){Hg()&&Xx()?this.storage=new Wg:Hg()?this.storage=localStorage:(console.warn("BrowserRuntime detected no valid storage available.",this),this.storage=new xi),this.client=new Ql(t),this.beaconClient=new ty(t),window.addEventListener("beforeunload",()=>{let n=r();for(let{eventType:o,payload:a}of n)this.beaconClient.sendEvent(o,a)})}getClientDependingOnEventType(t){return t==="click"&&this.beaconClient.isAvailable()?this.beaconClient:this.client}},oy=class{constructor(t,r){this.storage=r||new xi,this.client=new Ql(t)}getClientDependingOnEventType(t){return this.client}},Bl=class{constructor(){this.storage=new xi,this.client=new ry}getClientDependingOnEventType(t){return this.client}},KN="xx",YN=e=>e?.startsWith(KN)||!1,XN=`
30
30
  We've detected you're using React Native but have not provided the corresponding runtime,
31
31
  for an optimal experience please use the "coveo.analytics/react-native" subpackage.
32
32
  Follow the Readme on how to set it up: https://github.com/coveo/coveo.analytics.js#using-react-native