@coveo/headless 3.13.1-pre.d6951908c2 → 3.13.1-pre.d9c98563cb
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/case-assist/headless.esm.js +1 -1
- package/dist/browser/case-assist/headless.js +1 -1
- package/dist/browser/commerce/headless.esm.js +1 -1
- package/dist/browser/commerce/headless.js +1 -1
- package/dist/browser/headless.esm.js +1 -1
- package/dist/browser/headless.js +1 -1
- package/dist/browser/insight/headless.esm.js +1 -1
- package/dist/browser/insight/headless.js +1 -1
- package/dist/browser/recommendation/headless.esm.js +1 -1
- package/dist/browser/recommendation/headless.js +1 -1
- package/dist/browser/ssr/headless.esm.js +1 -1
- package/dist/browser/ssr/headless.js +1 -1
- package/dist/browser/ssr-commerce/headless.esm.js +1 -1
- package/dist/browser/ssr-commerce/headless.js +1 -1
- package/dist/case-assist/headless.cjs +1 -1
- package/dist/case-assist/headless.esm.js +1 -1
- package/dist/commerce/headless.cjs +1 -1
- package/dist/commerce/headless.esm.js +1 -1
- package/dist/headless.cjs +1 -1
- package/dist/headless.esm.js +1 -1
- package/dist/insight/headless.cjs +1 -1
- package/dist/insight/headless.esm.js +1 -1
- package/dist/parsed_doc.json +136 -136
- package/dist/quantic/case-assist/headless.js +1 -1
- package/dist/quantic/commerce/headless.js +1 -1
- package/dist/quantic/headless.js +1 -1
- package/dist/quantic/insight/headless.js +1 -1
- package/dist/quantic/recommendation/headless.js +1 -1
- package/dist/recommendation/headless.cjs +1 -1
- package/dist/recommendation/headless.esm.js +1 -1
- package/dist/ssr/headless.cjs +1 -1
- package/dist/ssr/headless.esm.js +1 -1
- package/dist/ssr-commerce/headless.cjs +1 -1
- package/dist/ssr-commerce/headless.esm.js +1 -1
- package/package.json +1 -1
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
* limitations under the License.
|
|
17
17
|
*/(function(g,f){if(typeof exports=="object"&&typeof module<"u"){module.exports=f(require)}else if("function"==typeof define && define.amd){define("CoveoHeadlessCommerce",["crypto","@coveo/bueno"],function(_d_0,_d_1){var d={"crypto": _d_0,"@coveo/bueno": _d_1},r=function(m){if(m in d) return d[m];if(typeof require=="function") return require(m);throw new Error("Cannot find module '"+m+"'")};return f(r)})}else {var gN={"crypto":"crypto","@coveo/bueno":"@coveo/bueno"},gReq=function(r){var mod = r in gN ? g[gN[r]] : g[r]; return mod };g["CoveoHeadlessCommerce"]=f(gReq)}}(typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : this,function(require){var exports={};var __exports=exports;var module={exports};
|
|
18
18
|
"use strict";var RR=Object.create;var va=Object.defineProperty;var FR=Object.getOwnPropertyDescriptor;var PR=Object.getOwnPropertyNames;var AR=Object.getPrototypeOf,vR=Object.prototype.hasOwnProperty;var bR=(e,t,r)=>t in e?va(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Ae=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Ju=(e,t)=>{for(var r in t)va(e,r,{get:t[r],enumerable:!0})},_m=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of PR(t))!vR.call(e,n)&&n!==r&&va(e,n,{get:()=>t[n],enumerable:!(o=FR(t,n))||o.enumerable});return e};var Mt=(e,t,r)=>(r=e!=null?RR(AR(e)):{},_m(t||!e||!e.__esModule?va(r,"default",{value:e,enumerable:!0}):r,e)),IR=e=>_m(va({},"__esModule",{value:!0}),e);var Te=(e,t,r)=>bR(e,typeof t!="symbol"?t+"":t,r);var Wp=Ae(ja=>{"use strict";var ic=ja&&ja.__assign||function(){return ic=Object.assign||function(e){for(var t,r=1,o=arguments.length;r<o;r++){t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},ic.apply(this,arguments)};Object.defineProperty(ja,"__esModule",{value:!0});var EF={delayFirstAttempt:!1,jitter:"none",maxDelay:1/0,numOfAttempts:10,retry:function(){return!0},startingDelay:100,timeMultiple:2};function TF(e){var t=ic(ic({},EF),e);return t.numOfAttempts<1&&(t.numOfAttempts=1),t}ja.getSanitizedOptions=TF});var Kp=Ae(Al=>{"use strict";Object.defineProperty(Al,"__esModule",{value:!0});function OF(e){var t=Math.random()*e;return Math.round(t)}Al.fullJitter=OF});var Hp=Ae(vl=>{"use strict";Object.defineProperty(vl,"__esModule",{value:!0});function qF(e){return e}vl.noJitter=qF});var Gp=Ae(bl=>{"use strict";Object.defineProperty(bl,"__esModule",{value:!0});var kF=Kp(),VF=Hp();function DF(e){switch(e.jitter){case"full":return kF.fullJitter;case"none":default:return VF.noJitter}}bl.JitterFactory=DF});var wl=Ae(Il=>{"use strict";Object.defineProperty(Il,"__esModule",{value:!0});var NF=Gp(),MF=function(){function e(t){this.options=t,this.attempt=0}return e.prototype.apply=function(){var t=this;return new Promise(function(r){return setTimeout(r,t.jitteredDelay)})},e.prototype.setAttemptNumber=function(t){this.attempt=t},Object.defineProperty(e.prototype,"jitteredDelay",{get:function(){var t=NF.JitterFactory(this.options);return t(this.delay)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"delay",{get:function(){var t=this.options.startingDelay,r=this.options.timeMultiple,o=this.numOfDelayedAttempts,n=t*Math.pow(r,o);return Math.min(n,this.options.maxDelay)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"numOfDelayedAttempts",{get:function(){return this.attempt},enumerable:!0,configurable:!0}),e}();Il.Delay=MF});var Yp=Ae(fr=>{"use strict";var LF=fr&&fr.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,n){o.__proto__=n}||function(o,n){for(var a in n)n.hasOwnProperty(a)&&(o[a]=n[a])},e(t,r)};return function(t,r){e(t,r);function o(){this.constructor=t}t.prototype=r===null?Object.create(r):(o.prototype=r.prototype,new o)}}(),QF=fr&&fr.__awaiter||function(e,t,r,o){function n(a){return a instanceof r?a:new r(function(i){i(a)})}return new(r||(r=Promise))(function(a,i){function c(l){try{s(o.next(l))}catch(d){i(d)}}function u(l){try{s(o.throw(l))}catch(d){i(d)}}function s(l){l.done?a(l.value):n(l.value).then(c,u)}s((o=o.apply(e,t||[])).next())})},UF=fr&&fr.__generator||function(e,t){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},o,n,a,i;return i={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(i[Symbol.iterator]=function(){return this}),i;function c(s){return function(l){return u([s,l])}}function u(s){if(o)throw new TypeError("Generator is already executing.");for(;r;)try{if(o=1,n&&(a=s[0]&2?n.return:s[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,s[1])).done)return a;switch(n=0,a&&(s=[s[0]&2,a.value]),s[0]){case 0:case 1:a=s;break;case 4:return r.label++,{value:s[1],done:!1};case 5:r.label++,n=s[1],s=[0];continue;case 7:s=r.ops.pop(),r.trys.pop();continue;default:if(a=r.trys,!(a=a.length>0&&a[a.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!a||s[1]>a[0]&&s[1]<a[3])){r.label=s[1];break}if(s[0]===6&&r.label<a[1]){r.label=a[1],a=s;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(s);break}a[2]&&r.ops.pop(),r.trys.pop();continue}s=t.call(e,r)}catch(l){s=[6,l],n=0}finally{o=a=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}};Object.defineProperty(fr,"__esModule",{value:!0});var BF=wl(),jF=function(e){LF(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.apply=function(){return QF(this,void 0,void 0,function(){return UF(this,function(r){return[2,this.isFirstAttempt?!0:e.prototype.apply.call(this)]})})},Object.defineProperty(t.prototype,"isFirstAttempt",{get:function(){return this.attempt===0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"numOfDelayedAttempts",{get:function(){return this.attempt-1},enumerable:!0,configurable:!0}),t}(BF.Delay);fr.SkipFirstDelay=jF});var Jp=Ae(_a=>{"use strict";var _F=_a&&_a.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,n){o.__proto__=n}||function(o,n){for(var a in n)n.hasOwnProperty(a)&&(o[a]=n[a])},e(t,r)};return function(t,r){e(t,r);function o(){this.constructor=t}t.prototype=r===null?Object.create(r):(o.prototype=r.prototype,new o)}}();Object.defineProperty(_a,"__esModule",{value:!0});var $F=wl(),zF=function(e){_F(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}($F.Delay);_a.AlwaysDelay=zF});var Xp=Ae(El=>{"use strict";Object.defineProperty(El,"__esModule",{value:!0});var WF=Yp(),KF=Jp();function HF(e,t){var r=GF(e);return r.setAttemptNumber(t),r}El.DelayFactory=HF;function GF(e){return e.delayFirstAttempt?new KF.AlwaysDelay(e):new WF.SkipFirstDelay(e)}});var Zp=Ae(Io=>{"use strict";var Tl=Io&&Io.__awaiter||function(e,t,r,o){function n(a){return a instanceof r?a:new r(function(i){i(a)})}return new(r||(r=Promise))(function(a,i){function c(l){try{s(o.next(l))}catch(d){i(d)}}function u(l){try{s(o.throw(l))}catch(d){i(d)}}function s(l){l.done?a(l.value):n(l.value).then(c,u)}s((o=o.apply(e,t||[])).next())})},Ol=Io&&Io.__generator||function(e,t){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},o,n,a,i;return i={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(i[Symbol.iterator]=function(){return this}),i;function c(s){return function(l){return u([s,l])}}function u(s){if(o)throw new TypeError("Generator is already executing.");for(;r;)try{if(o=1,n&&(a=s[0]&2?n.return:s[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,s[1])).done)return a;switch(n=0,a&&(s=[s[0]&2,a.value]),s[0]){case 0:case 1:a=s;break;case 4:return r.label++,{value:s[1],done:!1};case 5:r.label++,n=s[1],s=[0];continue;case 7:s=r.ops.pop(),r.trys.pop();continue;default:if(a=r.trys,!(a=a.length>0&&a[a.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!a||s[1]>a[0]&&s[1]<a[3])){r.label=s[1];break}if(s[0]===6&&r.label<a[1]){r.label=a[1],a=s;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(s);break}a[2]&&r.ops.pop(),r.trys.pop();continue}s=t.call(e,r)}catch(l){s=[6,l],n=0}finally{o=a=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}};Object.defineProperty(Io,"__esModule",{value:!0});var YF=Wp(),JF=Xp();function XF(e,t){return t===void 0&&(t={}),Tl(this,void 0,void 0,function(){var r,o;return Ol(this,function(n){switch(n.label){case 0:return r=YF.getSanitizedOptions(t),o=new ZF(e,r),[4,o.execute()];case 1:return[2,n.sent()]}})})}Io.backOff=XF;var ZF=function(){function e(t,r){this.request=t,this.options=r,this.attemptNumber=0}return e.prototype.execute=function(){return Tl(this,void 0,void 0,function(){var t,r;return Ol(this,function(o){switch(o.label){case 0:if(this.attemptLimitReached)return[3,7];o.label=1;case 1:return o.trys.push([1,4,,6]),[4,this.applyDelay()];case 2:return o.sent(),[4,this.request()];case 3:return[2,o.sent()];case 4:return t=o.sent(),this.attemptNumber++,[4,this.options.retry(t,this.attemptNumber)];case 5:if(r=o.sent(),!r||this.attemptLimitReached)throw t;return[3,6];case 6:return[3,0];case 7:throw new Error("Something went wrong.")}})})},Object.defineProperty(e.prototype,"attemptLimitReached",{get:function(){return this.attemptNumber>=this.options.numOfAttempts},enumerable:!0,configurable:!0}),e.prototype.applyDelay=function(){return Tl(this,void 0,void 0,function(){var t;return Ol(this,function(r){switch(r.label){case 0:return t=JF.DelayFactory(this.options,this.attemptNumber),[4,t.apply()];case 1:return r.sent(),[2]}})})},e}()});var Kc=Ae((hd,Sd)=>{"use strict";(function(e,t){typeof hd=="object"&&typeof Sd<"u"?Sd.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs=t()})(hd,function(){"use strict";var e=1e3,t=6e4,r=36e5,o="millisecond",n="second",a="minute",i="hour",c="day",u="week",s="month",l="quarter",d="year",p="date",m="Invalid Date",f=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,g=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,C={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(k){var q=["th","st","nd","rd"],T=k%100;return"["+k+(q[(T-20)%10]||q[T]||q[0])+"]"}},x=function(k,q,T){var M=String(k);return!M||M.length>=q?k:""+Array(q+1-M.length).join(T)+k},y={s:x,z:function(k){var q=-k.utcOffset(),T=Math.abs(q),M=Math.floor(T/60),D=T%60;return(q<=0?"+":"-")+x(M,2,"0")+":"+x(D,2,"0")},m:function k(q,T){if(q.date()<T.date())return-k(T,q);var M=12*(T.year()-q.year())+(T.month()-q.month()),D=q.clone().add(M,s),_=T-D<0,U=q.clone().add(M+(_?-1:1),s);return+(-(M+(T-D)/(_?D-U:U-D))||0)},a:function(k){return k<0?Math.ceil(k)||0:Math.floor(k)},p:function(k){return{M:s,y:d,w:u,d:c,D:p,h:i,m:a,s:n,ms:o,Q:l}[k]||String(k||"").toLowerCase().replace(/s$/,"")},u:function(k){return k===void 0}},S="en",P={};P[S]=C;var O="$isDayjsObject",A=function(k){return k instanceof V||!(!k||!k[O])},F=function k(q,T,M){var D;if(!q)return S;if(typeof q=="string"){var _=q.toLowerCase();P[_]&&(D=_),T&&(P[_]=T,D=_);var U=q.split("-");if(!D&&U.length>1)return k(U[0])}else{var W=q.name;P[W]=q,D=W}return!M&&D&&(S=D),D||!M&&S},w=function(k,q){if(A(k))return k.clone();var T=typeof q=="object"?q:{};return T.date=k,T.args=arguments,new V(T)},b=y;b.l=F,b.i=A,b.w=function(k,q){return w(k,{locale:q.$L,utc:q.$u,x:q.$x,$offset:q.$offset})};var V=function(){function k(T){this.$L=F(T.locale,null,!0),this.parse(T),this.$x=this.$x||T.x||{},this[O]=!0}var q=k.prototype;return q.parse=function(T){this.$d=function(M){var D=M.date,_=M.utc;if(D===null)return new Date(NaN);if(b.u(D))return new Date;if(D instanceof Date)return new Date(D);if(typeof D=="string"&&!/Z$/i.test(D)){var U=D.match(f);if(U){var W=U[2]-1||0,Y=(U[7]||"0").substring(0,3);return _?new Date(Date.UTC(U[1],W,U[3]||1,U[4]||0,U[5]||0,U[6]||0,Y)):new Date(U[1],W,U[3]||1,U[4]||0,U[5]||0,U[6]||0,Y)}}return new Date(D)}(T),this.init()},q.init=function(){var T=this.$d;this.$y=T.getFullYear(),this.$M=T.getMonth(),this.$D=T.getDate(),this.$W=T.getDay(),this.$H=T.getHours(),this.$m=T.getMinutes(),this.$s=T.getSeconds(),this.$ms=T.getMilliseconds()},q.$utils=function(){return b},q.isValid=function(){return this.$d.toString()!==m},q.isSame=function(T,M){var D=w(T);return this.startOf(M)<=D&&D<=this.endOf(M)},q.isAfter=function(T,M){return w(T)<this.startOf(M)},q.isBefore=function(T,M){return this.endOf(M)<w(T)},q.$g=function(T,M,D){return b.u(T)?this[M]:this.set(D,T)},q.unix=function(){return Math.floor(this.valueOf()/1e3)},q.valueOf=function(){return this.$d.getTime()},q.startOf=function(T,M){var D=this,_=!!b.u(M)||M,U=b.p(T),W=function(Nt,Pe){var ut=b.w(D.$u?Date.UTC(D.$y,Pe,Nt):new Date(D.$y,Pe,Nt),D);return _?ut:ut.endOf(c)},Y=function(Nt,Pe){return b.w(D.toDate()[Nt].apply(D.toDate("s"),(_?[0,0,0,0]:[23,59,59,999]).slice(Pe)),D)},J=this.$W,X=this.$M,Z=this.$D,ce="set"+(this.$u?"UTC":"");switch(U){case d:return _?W(1,0):W(31,11);case s:return _?W(1,X):W(0,X+1);case u:var Fe=this.$locale().weekStart||0,So=(J<Fe?J+7:J)-Fe;return W(_?Z-So:Z+(6-So),X);case c:case p:return Y(ce+"Hours",0);case i:return Y(ce+"Minutes",1);case a:return Y(ce+"Seconds",2);case n:return Y(ce+"Milliseconds",3);default:return this.clone()}},q.endOf=function(T){return this.startOf(T,!1)},q.$set=function(T,M){var D,_=b.p(T),U="set"+(this.$u?"UTC":""),W=(D={},D[c]=U+"Date",D[p]=U+"Date",D[s]=U+"Month",D[d]=U+"FullYear",D[i]=U+"Hours",D[a]=U+"Minutes",D[n]=U+"Seconds",D[o]=U+"Milliseconds",D)[_],Y=_===c?this.$D+(M-this.$W):M;if(_===s||_===d){var J=this.clone().set(p,1);J.$d[W](Y),J.init(),this.$d=J.set(p,Math.min(this.$D,J.daysInMonth())).$d}else W&&this.$d[W](Y);return this.init(),this},q.set=function(T,M){return this.clone().$set(T,M)},q.get=function(T){return this[b.p(T)]()},q.add=function(T,M){var D,_=this;T=Number(T);var U=b.p(M),W=function(X){var Z=w(_);return b.w(Z.date(Z.date()+Math.round(X*T)),_)};if(U===s)return this.set(s,this.$M+T);if(U===d)return this.set(d,this.$y+T);if(U===c)return W(1);if(U===u)return W(7);var Y=(D={},D[a]=t,D[i]=r,D[n]=e,D)[U]||1,J=this.$d.getTime()+T*Y;return b.w(J,this)},q.subtract=function(T,M){return this.add(-1*T,M)},q.format=function(T){var M=this,D=this.$locale();if(!this.isValid())return D.invalidDate||m;var _=T||"YYYY-MM-DDTHH:mm:ssZ",U=b.z(this),W=this.$H,Y=this.$m,J=this.$M,X=D.weekdays,Z=D.months,ce=D.meridiem,Fe=function(Pe,ut,dr,Er){return Pe&&(Pe[ut]||Pe(M,_))||dr[ut].slice(0,Er)},So=function(Pe){return b.s(W%12||12,Pe,"0")},Nt=ce||function(Pe,ut,dr){var Er=Pe<12?"AM":"PM";return dr?Er.toLowerCase():Er};return _.replace(g,function(Pe,ut){return ut||function(dr){switch(dr){case"YY":return String(M.$y).slice(-2);case"YYYY":return b.s(M.$y,4,"0");case"M":return J+1;case"MM":return b.s(J+1,2,"0");case"MMM":return Fe(D.monthsShort,J,Z,3);case"MMMM":return Fe(Z,J);case"D":return M.$D;case"DD":return b.s(M.$D,2,"0");case"d":return String(M.$W);case"dd":return Fe(D.weekdaysMin,M.$W,X,2);case"ddd":return Fe(D.weekdaysShort,M.$W,X,3);case"dddd":return X[M.$W];case"H":return String(W);case"HH":return b.s(W,2,"0");case"h":return So(1);case"hh":return So(2);case"a":return Nt(W,Y,!0);case"A":return Nt(W,Y,!1);case"m":return String(Y);case"mm":return b.s(Y,2,"0");case"s":return String(M.$s);case"ss":return b.s(M.$s,2,"0");case"SSS":return b.s(M.$ms,3,"0");case"Z":return U}return null}(Pe)||U.replace(":","")})},q.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},q.diff=function(T,M,D){var _,U=this,W=b.p(M),Y=w(T),J=(Y.utcOffset()-this.utcOffset())*t,X=this-Y,Z=function(){return b.m(U,Y)};switch(W){case d:_=Z()/12;break;case s:_=Z();break;case l:_=Z()/3;break;case u:_=(X-J)/6048e5;break;case c:_=(X-J)/864e5;break;case i:_=X/r;break;case a:_=X/t;break;case n:_=X/e;break;default:_=X}return D?_:b.a(_)},q.daysInMonth=function(){return this.endOf(s).$D},q.$locale=function(){return P[this.$L]},q.locale=function(T,M){if(!T)return this.$L;var D=this.clone(),_=F(T,M,!0);return _&&(D.$L=_),D},q.clone=function(){return b.w(this.$d,this)},q.toDate=function(){return new Date(this.valueOf())},q.toJSON=function(){return this.isValid()?this.toISOString():null},q.toISOString=function(){return this.$d.toISOString()},q.toString=function(){return this.$d.toUTCString()},k}(),L=V.prototype;return w.prototype=L,[["$ms",o],["$s",n],["$m",a],["$H",i],["$W",c],["$M",s],["$y",d],["$D",p]].forEach(function(k){L[k[1]]=function(q){return this.$g(q,k[0],k[1])}}),w.extend=function(k,q){return k.$i||(k(q,V,w),k.$i=!0),w},w.locale=F,w.isDayjs=A,w.unix=function(k){return w(1e3*k)},w.en=P[S],w.Ls=P,w.p={},w})});var Mg=Ae((Cd,xd)=>{"use strict";(function(e,t){typeof Cd=="object"&&typeof xd<"u"?xd.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_quarterOfYear=t()})(Cd,function(){"use strict";var e="month",t="quarter";return function(r,o){var n=o.prototype;n.quarter=function(c){return this.$utils().u(c)?Math.ceil((this.month()+1)/3):this.month(this.month()%3+3*(c-1))};var a=n.add;n.add=function(c,u){return c=Number(c),this.$utils().p(u)===t?this.add(3*c,e):a.bind(this)(c,u)};var i=n.startOf;n.startOf=function(c,u){var s=this.$utils(),l=!!s.u(u)||u;if(s.p(c)===t){var d=this.quarter()-1;return l?this.month(3*d).startOf(e).startOf("day"):this.month(3*d+2).endOf(e).endOf("day")}return i.bind(this)(c,u)}}})});var Lg=Ae((Rd,Fd)=>{"use strict";(function(e,t){typeof Rd=="object"&&typeof Fd<"u"?Fd.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_customParseFormat=t()})(Rd,function(){"use strict";var e={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},t=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,r=/\d/,o=/\d\d/,n=/\d\d?/,a=/\d*[^-_:/,()\s\d]+/,i={},c=function(f){return(f=+f)+(f>68?1900:2e3)},u=function(f){return function(g){this[f]=+g}},s=[/[+-]\d\d:?(\d\d)?|Z/,function(f){(this.zone||(this.zone={})).offset=function(g){if(!g||g==="Z")return 0;var C=g.match(/([+-]|\d\d)/g),x=60*C[1]+(+C[2]||0);return x===0?0:C[0]==="+"?-x:x}(f)}],l=function(f){var g=i[f];return g&&(g.indexOf?g:g.s.concat(g.f))},d=function(f,g){var C,x=i.meridiem;if(x){for(var y=1;y<=24;y+=1)if(f.indexOf(x(y,0,g))>-1){C=y>12;break}}else C=f===(g?"pm":"PM");return C},p={A:[a,function(f){this.afternoon=d(f,!1)}],a:[a,function(f){this.afternoon=d(f,!0)}],Q:[r,function(f){this.month=3*(f-1)+1}],S:[r,function(f){this.milliseconds=100*+f}],SS:[o,function(f){this.milliseconds=10*+f}],SSS:[/\d{3}/,function(f){this.milliseconds=+f}],s:[n,u("seconds")],ss:[n,u("seconds")],m:[n,u("minutes")],mm:[n,u("minutes")],H:[n,u("hours")],h:[n,u("hours")],HH:[n,u("hours")],hh:[n,u("hours")],D:[n,u("day")],DD:[o,u("day")],Do:[a,function(f){var g=i.ordinal,C=f.match(/\d+/);if(this.day=C[0],g)for(var x=1;x<=31;x+=1)g(x).replace(/\[|\]/g,"")===f&&(this.day=x)}],w:[n,u("week")],ww:[o,u("week")],M:[n,u("month")],MM:[o,u("month")],MMM:[a,function(f){var g=l("months"),C=(l("monthsShort")||g.map(function(x){return x.slice(0,3)})).indexOf(f)+1;if(C<1)throw new Error;this.month=C%12||C}],MMMM:[a,function(f){var g=l("months").indexOf(f)+1;if(g<1)throw new Error;this.month=g%12||g}],Y:[/[+-]?\d+/,u("year")],YY:[o,function(f){this.year=c(f)}],YYYY:[/\d{4}/,u("year")],Z:s,ZZ:s};function m(f){var g,C;g=f,C=i&&i.formats;for(var x=(f=g.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(w,b,V){var L=V&&V.toUpperCase();return b||C[V]||e[V]||C[L].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(k,q,T){return q||T.slice(1)})})).match(t),y=x.length,S=0;S<y;S+=1){var P=x[S],O=p[P],A=O&&O[0],F=O&&O[1];x[S]=F?{regex:A,parser:F}:P.replace(/^\[|\]$/g,"")}return function(w){for(var b={},V=0,L=0;V<y;V+=1){var k=x[V];if(typeof k=="string")L+=k.length;else{var q=k.regex,T=k.parser,M=w.slice(L),D=q.exec(M)[0];T.call(b,D),w=w.replace(D,"")}}return function(_){var U=_.afternoon;if(U!==void 0){var W=_.hours;U?W<12&&(_.hours+=12):W===12&&(_.hours=0),delete _.afternoon}}(b),b}}return function(f,g,C){C.p.customParseFormat=!0,f&&f.parseTwoDigitYear&&(c=f.parseTwoDigitYear);var x=g.prototype,y=x.parse;x.parse=function(S){var P=S.date,O=S.utc,A=S.args;this.$u=O;var F=A[1];if(typeof F=="string"){var w=A[2]===!0,b=A[3]===!0,V=w||b,L=A[2];b&&(L=A[2]),i=this.$locale(),!w&&L&&(i=C.Ls[L]),this.$d=function(M,D,_,U){try{if(["x","X"].indexOf(D)>-1)return new Date((D==="X"?1e3:1)*M);var W=m(D)(M),Y=W.year,J=W.month,X=W.day,Z=W.hours,ce=W.minutes,Fe=W.seconds,So=W.milliseconds,Nt=W.zone,Pe=W.week,ut=new Date,dr=X||(Y||J?1:ut.getDate()),Er=Y||ut.getFullYear(),Li=0;Y&&!J||(Li=J>0?J-1:ut.getMonth());var Qi,Ku=Z||0,Hu=ce||0,Gu=Fe||0,Yu=So||0;return Nt?new Date(Date.UTC(Er,Li,dr,Ku,Hu,Gu,Yu+60*Nt.offset*1e3)):_?new Date(Date.UTC(Er,Li,dr,Ku,Hu,Gu,Yu)):(Qi=new Date(Er,Li,dr,Ku,Hu,Gu,Yu),Pe&&(Qi=U(Qi).week(Pe).toDate()),Qi)}catch{return new Date("")}}(P,F,O,C),this.init(),L&&L!==!0&&(this.$L=this.locale(L).$L),V&&P!=this.format(F)&&(this.$d=new Date("")),i={}}else if(F instanceof Array)for(var k=F.length,q=1;q<=k;q+=1){A[1]=F[q-1];var T=C.apply(this,A);if(T.isValid()){this.$d=T.$d,this.$L=T.$L,this.init();break}q===k&&(this.$d=new Date(""))}else y.call(this,S)}}})});var TS=Ae((eG,ES)=>{"use strict";var tw=/(^|; )Coveo-Pendragon=([^;]*)/;ES.exports=()=>tw.exec(document.cookie)?.pop()||null});var qS=Ae((sm,um)=>{"use strict";(function(e,t){typeof sm=="object"&&typeof um<"u"?um.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_timezone=t()})(sm,function(){"use strict";var e={year:0,month:1,day:2,hour:3,minute:4,second:5},t={};return function(r,o,n){var a,i=function(l,d,p){p===void 0&&(p={});var m=new Date(l),f=function(g,C){C===void 0&&(C={});var x=C.timeZoneName||"short",y=g+"|"+x,S=t[y];return S||(S=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:g,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:x}),t[y]=S),S}(d,p);return f.formatToParts(m)},c=function(l,d){for(var p=i(l,d),m=[],f=0;f<p.length;f+=1){var g=p[f],C=g.type,x=g.value,y=e[C];y>=0&&(m[y]=parseInt(x,10))}var S=m[3],P=S===24?0:S,O=m[0]+"-"+m[1]+"-"+m[2]+" "+P+":"+m[4]+":"+m[5]+":000",A=+l;return(n.utc(O).valueOf()-(A-=A%1e3))/6e4},u=o.prototype;u.tz=function(l,d){l===void 0&&(l=a);var p,m=this.utcOffset(),f=this.toDate(),g=f.toLocaleString("en-US",{timeZone:l}),C=Math.round((f-new Date(g))/1e3/60),x=15*-Math.round(f.getTimezoneOffset()/15)-C;if(!Number(x))p=this.utcOffset(0,d);else if(p=n(g,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(x,!0),d){var y=p.utcOffset();p=p.add(m-y,"minute")}return p.$x.$timezone=l,p},u.offsetName=function(l){var d=this.$x.$timezone||n.tz.guess(),p=i(this.valueOf(),d,{timeZoneName:l}).find(function(m){return m.type.toLowerCase()==="timezonename"});return p&&p.value};var s=u.startOf;u.startOf=function(l,d){if(!this.$x||!this.$x.$timezone)return s.call(this,l,d);var p=n(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return s.call(p,l,d).tz(this.$x.$timezone,!0)},n.tz=function(l,d,p){var m=p&&d,f=p||d||a,g=c(+n(),f);if(typeof l!="string")return n(l).tz(f);var C=function(P,O,A){var F=P-60*O*1e3,w=c(F,A);if(O===w)return[F,O];var b=c(F-=60*(w-O)*1e3,A);return w===b?[F,w]:[P-60*Math.min(w,b)*1e3,Math.max(w,b)]}(n.utc(l,m).valueOf(),g,f),x=C[0],y=C[1],S=n(x).utcOffset(y);return S.$x.$timezone=f,S},n.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},n.tz.setDefault=function(l){a=l}}})});var kS=Ae((lm,dm)=>{"use strict";(function(e,t){typeof lm=="object"&&typeof dm<"u"?dm.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_utc=t()})(lm,function(){"use strict";var e="minute",t=/[+-]\d\d(?::?\d\d)?/g,r=/([+-]|\d\d)/g;return function(o,n,a){var i=n.prototype;a.utc=function(m){var f={date:m,utc:!0,args:arguments};return new n(f)},i.utc=function(m){var f=a(this.toDate(),{locale:this.$L,utc:!0});return m?f.add(this.utcOffset(),e):f},i.local=function(){return a(this.toDate(),{locale:this.$L,utc:!1})};var c=i.parse;i.parse=function(m){m.utc&&(this.$u=!0),this.$utils().u(m.$offset)||(this.$offset=m.$offset),c.call(this,m)};var u=i.init;i.init=function(){if(this.$u){var m=this.$d;this.$y=m.getUTCFullYear(),this.$M=m.getUTCMonth(),this.$D=m.getUTCDate(),this.$W=m.getUTCDay(),this.$H=m.getUTCHours(),this.$m=m.getUTCMinutes(),this.$s=m.getUTCSeconds(),this.$ms=m.getUTCMilliseconds()}else u.call(this)};var s=i.utcOffset;i.utcOffset=function(m,f){var g=this.$utils().u;if(g(m))return this.$u?0:g(this.$offset)?s.call(this):this.$offset;if(typeof m=="string"&&(m=function(S){S===void 0&&(S="");var P=S.match(t);if(!P)return null;var O=(""+P[0]).match(r)||["-",0,0],A=O[0],F=60*+O[1]+ +O[2];return F===0?0:A==="+"?F:-F}(m),m===null))return this;var C=Math.abs(m)<=16?60*m:m,x=this;if(f)return x.$offset=C,x.$u=m===0,x;if(m!==0){var y=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(x=this.local().add(C+y,e)).$offset=C,x.$x.$localOffset=y}else x=this.utc();return x};var l=i.format;i.format=function(m){var f=m||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return l.call(this,f)},i.valueOf=function(){var m=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*m},i.isUTC=function(){return!!this.$u},i.toISOString=function(){return this.toDate().toISOString()},i.toString=function(){return this.toDate().toUTCString()};var d=i.toDate;i.toDate=function(m){return m==="s"&&this.$offset?a(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():d.call(this)};var p=i.diff;i.diff=function(m,f,g){if(m&&this.$u===m.$u)return p.call(this,m,f,g);var C=this.local(),x=a(m).local();return p.call(C,x,f,g)}}})});var WS=Ae((s2,zS)=>{"use strict";function lw(e){try{return JSON.stringify(e)}catch{return'"[Circular]"'}}zS.exports=dw;function dw(e,t,r){var o=r&&r.stringify||lw,n=1;if(typeof e=="object"&&e!==null){var a=t.length+n;if(a===1)return e;var i=new Array(a);i[0]=o(e);for(var c=1;c<a;c++)i[c]=o(t[c]);return i.join(" ")}if(typeof e!="string")return e;var u=t.length;if(u===0)return e;for(var s="",l=1-n,d=-1,p=e&&e.length||0,m=0;m<p;){if(e.charCodeAt(m)===37&&m+1<p){switch(d=d>-1?d:0,e.charCodeAt(m+1)){case 100:case 102:if(l>=u||t[l]==null)break;d<m&&(s+=e.slice(d,m)),s+=Number(t[l]),d=m+2,m++;break;case 105:if(l>=u||t[l]==null)break;d<m&&(s+=e.slice(d,m)),s+=Math.floor(Number(t[l])),d=m+2,m++;break;case 79:case 111:case 106:if(l>=u||t[l]===void 0)break;d<m&&(s+=e.slice(d,m));var f=typeof t[l];if(f==="string"){s+="'"+t[l]+"'",d=m+2,m++;break}if(f==="function"){s+=t[l].name||"<anonymous>",d=m+2,m++;break}s+=o(t[l]),d=m+2,m++;break;case 115:if(l>=u)break;d<m&&(s+=e.slice(d,m)),s+=String(t[l]),d=m+2,m++;break;case 37:d<m&&(s+=e.slice(d,m)),s+="%",d=m+2,m++,l--;break}++l}++m}return d===-1?e:(d<p&&(s+=e.slice(d)),s)}});var XS=Ae((u2,nu)=>{"use strict";var KS=WS();nu.exports=wr;var wi=bw().console||{},mw={mapHttpRequest:ou,mapHttpResponse:ou,wrapRequestSerializer:fm,wrapResponseSerializer:fm,wrapErrorSerializer:fm,req:ou,res:ou,err:GS,errWithCause:GS};function yo(e,t){return e==="silent"?1/0:t.levels.values[e]}var hm=Symbol("pino.logFuncs"),gm=Symbol("pino.hierarchy"),pw={error:"log",fatal:"error",warn:"error",info:"log",debug:"log",trace:"log"};function HS(e,t){let r={logger:t,parent:e[gm]};t[gm]=r}function fw(e,t,r){let o={};t.forEach(n=>{o[n]=r[n]?r[n]:wi[n]||wi[pw[n]||"log"]||ma}),e[hm]=o}function gw(e,t){return Array.isArray(e)?e.filter(function(o){return o!=="!stdSerializers.err"}):e===!0?Object.keys(t):!1}function wr(e){e=e||{},e.browser=e.browser||{};let t=e.browser.transmit;if(t&&typeof t.send!="function")throw Error("pino: transmit option must have a send function");let r=e.browser.write||wi;e.browser.write&&(e.browser.asObject=!0);let o=e.serializers||{},n=gw(e.browser.serialize,o),a=e.browser.serialize;Array.isArray(e.browser.serialize)&&e.browser.serialize.indexOf("!stdSerializers.err")>-1&&(a=!1);let i=Object.keys(e.customLevels||{}),c=["error","fatal","warn","info","debug","trace"].concat(i);typeof r=="function"&&c.forEach(function(g){r[g]=r}),(e.enabled===!1||e.browser.disabled)&&(e.level="silent");let u=e.level||"info",s=Object.create(r);s.log||(s.log=ma),fw(s,c,r),HS({},s),Object.defineProperty(s,"levelVal",{get:d}),Object.defineProperty(s,"level",{get:p,set:m});let l={transmit:t,serialize:n,asObject:e.browser.asObject,formatters:e.browser.formatters,levels:c,timestamp:Pw(e),messageKey:e.messageKey||"msg",onChild:e.onChild||ma};s.levels=yw(e),s.level=u,s.setMaxListeners=s.getMaxListeners=s.emit=s.addListener=s.on=s.prependListener=s.once=s.prependOnceListener=s.removeListener=s.removeAllListeners=s.listeners=s.listenerCount=s.eventNames=s.write=s.flush=ma,s.serializers=o,s._serialize=n,s._stdErrSerialize=a,s.child=function(...g){return f.call(this,l,...g)},t&&(s._logEvent=ym());function d(){return yo(this.level,this)}function p(){return this._level}function m(g){if(g!=="silent"&&!this.levels.values[g])throw Error("unknown level "+g);this._level=g,_o(this,l,s,"error"),_o(this,l,s,"fatal"),_o(this,l,s,"warn"),_o(this,l,s,"info"),_o(this,l,s,"debug"),_o(this,l,s,"trace"),i.forEach(C=>{_o(this,l,s,C)})}function f(g,C,x){if(!C)throw new Error("missing bindings for child Pino");x=x||{},n&&C.serializers&&(x.serializers=C.serializers);let y=x.serializers;if(n&&y){var S=Object.assign({},o,y),P=e.browser.serialize===!0?Object.keys(S):n;delete C.serializers,Sm([C],P,S,this._stdErrSerialize)}function O(F){this._childLevel=(F._childLevel|0)+1,this.bindings=C,S&&(this.serializers=S,this._serialize=P),t&&(this._logEvent=ym([].concat(F._logEvent.bindings,C)))}O.prototype=this;let A=new O(this);return HS(this,A),A.child=function(...F){return f.call(this,g,...F)},A.level=x.level||this.level,g.onChild(A),A}return s}function yw(e){let t=e.customLevels||{},r=Object.assign({},wr.levels.values,t),o=Object.assign({},wr.levels.labels,hw(t));return{values:r,labels:o}}function hw(e){let t={};return Object.keys(e).forEach(function(r){t[e[r]]=r}),t}wr.levels={values:{fatal:60,error:50,warn:40,info:30,debug:20,trace:10},labels:{10:"trace",20:"debug",30:"info",40:"warn",50:"error",60:"fatal"}};wr.stdSerializers=mw;wr.stdTimeFunctions=Object.assign({},{nullTime:YS,epochTime:JS,unixTime:Aw,isoTime:vw});function Sw(e){let t=[];e.bindings&&t.push(e.bindings);let r=e[gm];for(;r.parent;)r=r.parent,r.logger.bindings&&t.push(r.logger.bindings);return t.reverse()}function _o(e,t,r,o){if(Object.defineProperty(e,o,{value:yo(e.level,r)>yo(o,r)?ma:r[hm][o],writable:!0,enumerable:!0,configurable:!0}),e[o]===ma){if(!t.transmit)return;let a=t.transmit.level||e.level,i=yo(a,r);if(yo(o,r)<i)return}e[o]=xw(e,t,r,o);let n=Sw(e);n.length!==0&&(e[o]=Cw(n,e[o]))}function Cw(e,t){return function(){return t.apply(this,[...e,...arguments])}}function xw(e,t,r,o){return function(n){return function(){let i=t.timestamp(),c=new Array(arguments.length),u=Object.getPrototypeOf&&Object.getPrototypeOf(this)===wi?wi:this;for(var s=0;s<c.length;s++)c[s]=arguments[s];var l=!1;if(t.serialize&&(Sm(c,this._serialize,this.serializers,this._stdErrSerialize),l=!0),t.asObject||t.formatters?n.call(u,Rw(this,o,c,i,t)):n.apply(u,c),t.transmit){let d=t.transmit.level||e._level,p=yo(d,r),m=yo(o,r);if(m<p)return;Fw(this,{ts:i,methodLevel:o,methodValue:m,transmitLevel:d,transmitValue:r.levels.values[t.transmit.level||e._level],send:t.transmit.send,val:yo(e._level,r)},c,l)}}}(e[hm][o])}function Rw(e,t,r,o,n){let{level:a,log:i=p=>p}=n.formatters||{},c=r.slice(),u=c[0],s={};if(o&&(s.time=o),a){let p=a(t,e.levels.values[t]);Object.assign(s,p)}else s.level=e.levels.values[t];let l=(e._childLevel|0)+1;if(l<1&&(l=1),u!==null&&typeof u=="object"){for(;l--&&typeof c[0]=="object";)Object.assign(s,c.shift());u=c.length?KS(c.shift(),c):void 0}else typeof u=="string"&&(u=KS(c.shift(),c));return u!==void 0&&(s[n.messageKey]=u),i(s)}function Sm(e,t,r,o){for(let n in e)if(o&&e[n]instanceof Error)e[n]=wr.stdSerializers.err(e[n]);else if(typeof e[n]=="object"&&!Array.isArray(e[n])&&t)for(let a in e[n])t.indexOf(a)>-1&&a in r&&(e[n][a]=r[a](e[n][a]))}function Fw(e,t,r,o=!1){let n=t.send,a=t.ts,i=t.methodLevel,c=t.methodValue,u=t.val,s=e._logEvent.bindings;o||Sm(r,e._serialize||Object.keys(e.serializers),e.serializers,e._stdErrSerialize===void 0?!0:e._stdErrSerialize),e._logEvent.ts=a,e._logEvent.messages=r.filter(function(l){return s.indexOf(l)===-1}),e._logEvent.level.label=i,e._logEvent.level.value=c,n(i,e._logEvent,u),e._logEvent=ym(s)}function ym(e){return{ts:0,messages:[],bindings:e||[],level:{label:"",value:0}}}function GS(e){let t={type:e.constructor.name,msg:e.message,stack:e.stack};for(let r in e)t[r]===void 0&&(t[r]=e[r]);return t}function Pw(e){return typeof e.timestamp=="function"?e.timestamp:e.timestamp===!1?YS:JS}function ou(){return{}}function fm(e){return e}function ma(){}function YS(){return!1}function JS(){return Date.now()}function Aw(){return Math.round(Date.now()/1e3)}function vw(){return new Date(Date.now()).toISOString()}function bw(){function e(t){return typeof t<"u"&&t}try{return typeof globalThis<"u"||Object.defineProperty(Object.prototype,"globalThis",{get:function(){return delete Object.prototype.globalThis,this.globalThis=this},configurable:!0}),globalThis}catch{return e(self)||e(window)||e(this)||{}}}nu.exports.default=wr;nu.exports.pino=wr});var zO={};Ju(zO,{HighlightUtils:()=>Pl,ProductTemplatesHelpers:()=>fR,Selectors:()=>xl,SortBy:()=>lt,SortDirection:()=>Vr,buildCart:()=>Pf,buildCommerceEngine:()=>aC,buildContext:()=>OC,buildController:()=>z,buildDateRange:()=>Ar,buildFieldSuggestionsGenerator:()=>xR,buildFieldsSortCriterion:()=>La,buildInstantProducts:()=>aR,buildNotifyTrigger:()=>gR,buildProductListing:()=>Xx,buildProductTemplatesManager:()=>mR,buildProductView:()=>eR,buildQueryTrigger:()=>hR,buildRecentQueriesList:()=>nR,buildRecommendations:()=>Zx,buildRedirectionTrigger:()=>yR,buildRelevanceSortCriterion:()=>vt,buildSearch:()=>Gx,buildSearchBox:()=>$u,buildStandaloneSearchBox:()=>lR,deserializeRelativeDate:()=>Hg,getAnalyticsNextApiBaseUrl:()=>cc,getCommerceApiBaseUrl:()=>an,getOrganizationEndpoint:()=>Ie,getSampleCommerceEngineConfiguration:()=>nC,loadCartActions:()=>Lw,loadCategoryFacetSetActions:()=>Bw,loadConfigurationActions:()=>Yw,loadContextActions:()=>qw,loadCoreFacetActions:()=>Uw,loadDateFacetActions:()=>$w,loadInstantProductsActions:()=>nE,loadLocationFacetActions:()=>_w,loadNumericFacetActions:()=>zw,loadPaginationActions:()=>Nw,loadProductActions:()=>Mw,loadProductListingActions:()=>Vw,loadProductListingParametersActions:()=>Zw,loadQueryActions:()=>Jw,loadQuerySetActions:()=>Kw,loadQuerySuggestActions:()=>Gw,loadRecentQueriesActions:()=>aE,loadRecommendationsActions:()=>Dw,loadRegularFacetActions:()=>jw,loadSearchActions:()=>kw,loadSearchParametersActions:()=>Xw,loadSortActions:()=>Qw,loadStandaloneSearchBoxSetActions:()=>uE,loadTriggersActions:()=>eE,validateRelativeDate:()=>Hr});module.exports=IR(zO);var xl={};Ju(xl,{ProductListing:()=>Cl,Search:()=>Sl});var $m="coveo-headless-internal-state",Q=Symbol.for($m),zm=e=>new Proxy(e,{ownKeys(t){return Reflect.ownKeys(t).filter(r=>r!==Q)},get(t,r,o){return typeof r=="symbol"&&r.description===$m&&r!==Q&&e.logger.warn(`You might be loading Headless twice. Please check your setup.
|
|
19
|
-
If you are trying to access the inner state... Don't`),Reflect.get(t,r,o)}});var vp=require("@coveo/bueno");function ve(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 wR=typeof Symbol=="function"&&Symbol.observable||"@@observable",Wm=wR,Xu=()=>Math.random().toString(36).substring(7).split("").join("."),ER={INIT:`@@redux/INIT${Xu()}`,REPLACE:`@@redux/REPLACE${Xu()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Xu()}`},Ui=ER;function Lt(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 Zu(e,t,r){if(typeof e!="function")throw new Error(ve(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(ve(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(ve(1));return r(Zu)(e,t)}let o=e,n=t,a=new Map,i=a,c=0,u=!1;function s(){i===a&&(i=new Map,a.forEach((C,x)=>{i.set(x,C)}))}function l(){if(u)throw new Error(ve(3));return n}function d(C){if(typeof C!="function")throw new Error(ve(4));if(u)throw new Error(ve(5));let x=!0;s();let y=c++;return i.set(y,C),function(){if(x){if(u)throw new Error(ve(6));x=!1,s(),i.delete(y),a=null}}}function p(C){if(!Lt(C))throw new Error(ve(7));if(typeof C.type>"u")throw new Error(ve(8));if(typeof C.type!="string")throw new Error(ve(17));if(u)throw new Error(ve(9));try{u=!0,n=o(n,C)}finally{u=!1}return(a=i).forEach(y=>{y()}),C}function m(C){if(typeof C!="function")throw new Error(ve(10));o=C,p({type:Ui.REPLACE})}function f(){let C=d;return{subscribe(x){if(typeof x!="object"||x===null)throw new Error(ve(11));function y(){let P=x;P.next&&P.next(l())}return y(),{unsubscribe:C(y)}},[Wm](){return this}}}return p({type:Ui.INIT}),{dispatch:p,subscribe:d,getState:l,replaceReducer:m,[Wm]:f}}function TR(e){Object.keys(e).forEach(t=>{let r=e[t];if(typeof r(void 0,{type:Ui.INIT})>"u")throw new Error(ve(12));if(typeof r(void 0,{type:Ui.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(ve(13))})}function Yo(e){let t=Object.keys(e),r={};for(let i=0;i<t.length;i++){let c=t[i];typeof e[c]=="function"&&(r[c]=e[c])}let o=Object.keys(r),n,a;try{TR(r)}catch(i){a=i}return function(c={},u){if(a)throw a;let s=!1,l={};for(let d=0;d<o.length;d++){let p=o[d],m=r[p],f=c[p],g=m(f,u);if(typeof g>"u"){let C=u&&u.type;throw new Error(ve(14))}l[p]=g,s=s||g!==f}return s=s||o.length!==Object.keys(c).length,s?l:c}}function Jo(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...o)=>t(r(...o)))}function Km(...e){return t=>(r,o)=>{let n=t(r,o),a=()=>{throw new Error(ve(15))},i={getState:n.getState,dispatch:(u,...s)=>a(u,...s)},c=e.map(u=>u(i));return a=Jo(...c)(n.dispatch),{...n,dispatch:a}}}function Bi(e){return Lt(e)&&"type"in e&&typeof e.type=="string"}var ul=Symbol.for("immer-nothing"),ba=Symbol.for("immer-draftable"),Ke=Symbol.for("immer-state");function be(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var xo=Object.getPrototypeOf;function ot(e){return!!e&&!!e[Ke]}function He(e){return e?Xm(e)||Array.isArray(e)||!!e[ba]||!!e.constructor?.[ba]||Oa(e)||qa(e):!1}var OR=Object.prototype.constructor.toString();function Xm(e){if(!e||typeof e!="object")return!1;let t=xo(e);if(t===null)return!0;let r=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return r===Object?!0:typeof r=="function"&&Function.toString.call(r)===OR}function ll(e){return ot(e)||be(15,e),e[Ke].base_}function Ia(e,t){Ro(e)===0?Reflect.ownKeys(e).forEach(r=>{t(r,e[r],e)}):e.forEach((r,o)=>t(o,r,e))}function Ro(e){let t=e[Ke];return t?t.type_:Array.isArray(e)?1:Oa(e)?2:qa(e)?3:0}function wa(e,t){return Ro(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function el(e,t){return Ro(e)===2?e.get(t):e[t]}function Zm(e,t,r){let o=Ro(e);o===2?e.set(t,r):o===3?e.add(r):e[t]=r}function qR(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Oa(e){return e instanceof Map}function qa(e){return e instanceof Set}function Co(e){return e.copy_||e.base_}function ol(e,t){if(Oa(e))return new Map(e);if(qa(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);let r=Xm(e);if(t===!0||t==="class_only"&&!r){let o=Object.getOwnPropertyDescriptors(e);delete o[Ke];let n=Reflect.ownKeys(o);for(let a=0;a<n.length;a++){let i=n[a],c=o[i];c.writable===!1&&(c.writable=!0,c.configurable=!0),(c.get||c.set)&&(o[i]={configurable:!0,writable:!0,enumerable:c.enumerable,value:e[i]})}return Object.create(xo(e),o)}else{let o=xo(e);if(o!==null&&r)return{...e};let n=Object.create(o);return Object.assign(n,e)}}function $i(e,t=!1){return zi(e)||ot(e)||!He(e)||(Ro(e)>1&&(e.set=e.add=e.clear=e.delete=kR),Object.freeze(e),t&&Object.entries(e).forEach(([r,o])=>$i(o,!0))),e}function kR(){be(2)}function zi(e){return Object.isFrozen(e)}var nl={};function Fo(e){let t=nl[e];return t||be(0,e),t}function VR(e,t){nl[e]||(nl[e]=t)}var Ea;function ep(){return Ea}function DR(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Hm(e,t){t&&(Fo("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function al(e){il(e),e.drafts_.forEach(NR),e.drafts_=null}function il(e){e===Ea&&(Ea=e.parent_)}function Gm(e){return Ea=DR(Ea,e)}function NR(e){let t=e[Ke];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Ym(e,t){t.unfinalizedDrafts_=t.drafts_.length;let r=t.drafts_[0];return e!==void 0&&e!==r?(r[Ke].modified_&&(al(t),be(4)),He(e)&&(e=ji(t,e),t.parent_||_i(t,e)),t.patches_&&Fo("Patches").generateReplacementPatches_(r[Ke].base_,e,t.patches_,t.inversePatches_)):e=ji(t,r,[]),al(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==ul?e:void 0}function ji(e,t,r){if(zi(t))return t;let o=t[Ke];if(!o)return Ia(t,(n,a)=>Jm(e,o,t,n,a,r)),t;if(o.scope_!==e)return t;if(!o.modified_)return _i(e,o.base_,!0),o.base_;if(!o.finalized_){o.finalized_=!0,o.scope_.unfinalizedDrafts_--;let n=o.copy_,a=n,i=!1;o.type_===3&&(a=new Set(n),n.clear(),i=!0),Ia(a,(c,u)=>Jm(e,o,n,c,u,r,i)),_i(e,n,!1),r&&e.patches_&&Fo("Patches").generatePatches_(o,r,e.patches_,e.inversePatches_)}return o.copy_}function Jm(e,t,r,o,n,a,i){if(ot(n)){let c=a&&t&&t.type_!==3&&!wa(t.assigned_,o)?a.concat(o):void 0,u=ji(e,n,c);if(Zm(r,o,u),ot(u))e.canAutoFreeze_=!1;else return}else i&&r.add(n);if(He(n)&&!zi(n)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;ji(e,n),(!t||!t.scope_.parent_)&&typeof o!="symbol"&&Object.prototype.propertyIsEnumerable.call(r,o)&&_i(e,n)}}function _i(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&$i(t,r)}function MR(e,t){let r=Array.isArray(e),o={type_:r?1:0,scope_:t?t.scope_:ep(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1},n=o,a=dl;r&&(n=[o],a=Ta);let{revoke:i,proxy:c}=Proxy.revocable(n,a);return o.draft_=c,o.revoke_=i,c}var dl={get(e,t){if(t===Ke)return e;let r=Co(e);if(!wa(r,t))return LR(e,r,t);let o=r[t];return e.finalized_||!He(o)?o:o===tl(e.base_,t)?(rl(e),e.copy_[t]=sl(o,e)):o},has(e,t){return t in Co(e)},ownKeys(e){return Reflect.ownKeys(Co(e))},set(e,t,r){let o=tp(Co(e),t);if(o?.set)return o.set.call(e.draft_,r),!0;if(!e.modified_){let n=tl(Co(e),t),a=n?.[Ke];if(a&&a.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(qR(r,n)&&(r!==void 0||wa(e.base_,t)))return!0;rl(e),cl(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_[t]=!0),!0},deleteProperty(e,t){return tl(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,rl(e),cl(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let r=Co(e),o=Reflect.getOwnPropertyDescriptor(r,t);return o&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:o.enumerable,value:r[t]}},defineProperty(){be(11)},getPrototypeOf(e){return xo(e.base_)},setPrototypeOf(){be(12)}},Ta={};Ia(dl,(e,t)=>{Ta[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});Ta.deleteProperty=function(e,t){return Ta.set.call(this,e,t,void 0)};Ta.set=function(e,t,r){return dl.set.call(this,e[0],t,r,e[0])};function tl(e,t){let r=e[Ke];return(r?Co(r):e)[t]}function LR(e,t,r){let o=tp(t,r);return o?"value"in o?o.value:o.get?.call(e.draft_):void 0}function tp(e,t){if(!(t in e))return;let r=xo(e);for(;r;){let o=Object.getOwnPropertyDescriptor(r,t);if(o)return o;r=xo(r)}}function cl(e){e.modified_||(e.modified_=!0,e.parent_&&cl(e.parent_))}function rl(e){e.copy_||(e.copy_=ol(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var QR=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,r,o)=>{if(typeof t=="function"&&typeof r!="function"){let a=r;r=t;let i=this;return function(u=a,...s){return i.produce(u,l=>r.call(this,l,...s))}}typeof r!="function"&&be(6),o!==void 0&&typeof o!="function"&&be(7);let n;if(He(t)){let a=Gm(this),i=sl(t,void 0),c=!0;try{n=r(i),c=!1}finally{c?al(a):il(a)}return Hm(a,o),Ym(n,a)}else if(!t||typeof t!="object"){if(n=r(t),n===void 0&&(n=t),n===ul&&(n=void 0),this.autoFreeze_&&$i(n,!0),o){let a=[],i=[];Fo("Patches").generateReplacementPatches_(t,n,a,i),o(a,i)}return n}else be(1,t)},this.produceWithPatches=(t,r)=>{if(typeof t=="function")return(i,...c)=>this.produceWithPatches(i,u=>t(u,...c));let o,n;return[this.produce(t,r,(i,c)=>{o=i,n=c}),o,n]},typeof e?.autoFreeze=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof e?.useStrictShallowCopy=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){He(e)||be(8),ot(e)&&(e=rp(e));let t=Gm(this),r=sl(e,void 0);return r[Ke].isManual_=!0,il(t),r}finishDraft(e,t){let r=e&&e[Ke];(!r||!r.isManual_)&&be(9);let{scope_:o}=r;return Hm(o,t),Ym(void 0,o)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){let n=t[r];if(n.path.length===0&&n.op==="replace"){e=n.value;break}}r>-1&&(t=t.slice(r+1));let o=Fo("Patches").applyPatches_;return ot(e)?o(e,t):this.produce(e,n=>o(n,t))}};function sl(e,t){let r=Oa(e)?Fo("MapSet").proxyMap_(e,t):qa(e)?Fo("MapSet").proxySet_(e,t):MR(e,t);return(t?t.scope_:ep()).drafts_.push(r),r}function rp(e){return ot(e)||be(10,e),op(e)}function op(e){if(!He(e)||zi(e))return e;let t=e[Ke],r;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=ol(e,t.scope_.immer_.useStrictShallowCopy_)}else r=ol(e,!0);return Ia(r,(o,n)=>{Zm(r,o,op(n))}),t&&(t.finalized_=!1),r}function np(){let t="replace",r="add",o="remove";function n(p,m,f,g){switch(p.type_){case 0:case 2:return i(p,m,f,g);case 1:return a(p,m,f,g);case 3:return c(p,m,f,g)}}function a(p,m,f,g){let{base_:C,assigned_:x}=p,y=p.copy_;y.length<C.length&&([C,y]=[y,C],[f,g]=[g,f]);for(let S=0;S<C.length;S++)if(x[S]&&y[S]!==C[S]){let P=m.concat([S]);f.push({op:t,path:P,value:d(y[S])}),g.push({op:t,path:P,value:d(C[S])})}for(let S=C.length;S<y.length;S++){let P=m.concat([S]);f.push({op:r,path:P,value:d(y[S])})}for(let S=y.length-1;C.length<=S;--S){let P=m.concat([S]);g.push({op:o,path:P})}}function i(p,m,f,g){let{base_:C,copy_:x}=p;Ia(p.assigned_,(y,S)=>{let P=el(C,y),O=el(x,y),A=S?wa(C,y)?t:r:o;if(P===O&&A===t)return;let F=m.concat(y);f.push(A===o?{op:A,path:F}:{op:A,path:F,value:O}),g.push(A===r?{op:o,path:F}:A===o?{op:r,path:F,value:d(P)}:{op:t,path:F,value:d(P)})})}function c(p,m,f,g){let{base_:C,copy_:x}=p,y=0;C.forEach(S=>{if(!x.has(S)){let P=m.concat([y]);f.push({op:o,path:P,value:S}),g.unshift({op:r,path:P,value:S})}y++}),y=0,x.forEach(S=>{if(!C.has(S)){let P=m.concat([y]);f.push({op:r,path:P,value:S}),g.unshift({op:o,path:P,value:S})}y++})}function u(p,m,f,g){f.push({op:t,path:[],value:m===ul?void 0:m}),g.push({op:t,path:[],value:p})}function s(p,m){return m.forEach(f=>{let{path:g,op:C}=f,x=p;for(let O=0;O<g.length-1;O++){let A=Ro(x),F=g[O];typeof F!="string"&&typeof F!="number"&&(F=""+F),(A===0||A===1)&&(F==="__proto__"||F==="constructor")&&be(19),typeof x=="function"&&F==="prototype"&&be(19),x=el(x,F),typeof x!="object"&&be(18,g.join("/"))}let y=Ro(x),S=l(f.value),P=g[g.length-1];switch(C){case t:switch(y){case 2:return x.set(P,S);case 3:be(16);default:return x[P]=S}case r:switch(y){case 1:return P==="-"?x.push(S):x.splice(P,0,S);case 2:return x.set(P,S);case 3:return x.add(S);default:return x[P]=S}case o:switch(y){case 1:return x.splice(P,1);case 2:return x.delete(P);case 3:return x.delete(f.value);default:return delete x[P]}default:be(17,C)}}),p}function l(p){if(!He(p))return p;if(Array.isArray(p))return p.map(l);if(Oa(p))return new Map(Array.from(p.entries()).map(([f,g])=>[f,l(g)]));if(qa(p))return new Set(Array.from(p).map(l));let m=Object.create(xo(p));for(let f in p)m[f]=l(p[f]);return wa(p,ba)&&(m[ba]=p[ba]),m}function d(p){return ot(p)?l(p):p}VR("Patches",{applyPatches_:s,generatePatches_:n,generateReplacementPatches_:u})}var nt=new QR,mr=nt.produce,Wi=nt.produceWithPatches.bind(nt),YO=nt.setAutoFreeze.bind(nt),JO=nt.setUseStrictShallowCopy.bind(nt),ml=nt.applyPatches.bind(nt),XO=nt.createDraft.bind(nt),ZO=nt.finishDraft.bind(nt);function UR(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function BR(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function jR(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(r=>typeof r=="function")){let r=e.map(o=>typeof o=="function"?`function ${o.name||"unnamed"}()`:typeof o).join(", ");throw new TypeError(`${t}[${r}]`)}}var ap=e=>Array.isArray(e)?e:[e];function _R(e){let t=Array.isArray(e[0])?e[0]:e;return jR(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function $R(e,t){let r=[],{length:o}=e;for(let n=0;n<o;n++)r.push(e[n].apply(null,t));return r}var rq=Symbol();var oq=Object.getPrototypeOf({});var zR=class{constructor(e){this.value=e}deref(){return this.value}},WR=typeof WeakRef<"u"?WeakRef:zR,KR=0,ip=1;function Ki(){return{s:KR,v:void 0,o:null,p:null}}function Xo(e,t={}){let r=Ki(),{resultEqualityCheck:o}=t,n,a=0;function i(){let c=r,{length:u}=arguments;for(let d=0,p=u;d<p;d++){let m=arguments[d];if(typeof m=="function"||typeof m=="object"&&m!==null){let f=c.o;f===null&&(c.o=f=new WeakMap);let g=f.get(m);g===void 0?(c=Ki(),f.set(m,c)):c=g}else{let f=c.p;f===null&&(c.p=f=new Map);let g=f.get(m);g===void 0?(c=Ki(),f.set(m,c)):c=g}}let s=c,l;if(c.s===ip)l=c.v;else if(l=e.apply(null,arguments),a++,o){let d=n?.deref?.()??n;d!=null&&o(d,l)&&(l=d,a!==0&&a--),n=typeof l=="object"&&l!==null||typeof l=="function"?new WR(l):l}return s.s=ip,s.v=l,l}return i.clearCache=()=>{r=Ki(),i.resetResultsCount()},i.resultsCount=()=>a,i.resetResultsCount=()=>{a=0},i}function cp(e,...t){let r=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,o=(...n)=>{let a=0,i=0,c,u={},s=n.pop();typeof s=="object"&&(u=s,s=n.pop()),UR(s,`createSelector expects an output function after the inputs, but received: [${typeof s}]`);let l={...r,...u},{memoize:d,memoizeOptions:p=[],argsMemoize:m=Xo,argsMemoizeOptions:f=[],devModeChecks:g={}}=l,C=ap(p),x=ap(f),y=_R(n),S=d(function(){return a++,s.apply(null,arguments)},...C),P=!0,O=m(function(){i++;let F=$R(y,arguments);return c=S.apply(null,F),c},...x);return Object.assign(O,{resultFunc:s,memoizedResultFunc:S,dependencies:y,dependencyRecomputations:()=>i,resetDependencyRecomputations:()=>{i=0},lastResult:()=>c,recomputations:()=>a,resetRecomputations:()=>{a=0},memoize:d,argsMemoize:m})};return Object.assign(o,{withTypes:()=>o}),o}var N=cp(Xo),HR=Object.assign((e,t=N)=>{BR(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);let r=Object.keys(e),o=r.map(a=>e[a]);return t(o,(...a)=>a.reduce((i,c,u)=>(i[r[u]]=c,i),{}))},{withTypes:()=>HR});function sp(e){return({dispatch:r,getState:o})=>n=>a=>typeof a=="function"?a(r,o,e):n(a)}var up=sp(),lp=sp;var GR=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Jo:Jo.apply(null,arguments)},pq=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}},YR=e=>e&&typeof e.match=="function";function h(e,t){function r(...o){if(t){let n=t(...o);if(!n)throw new Error(At(0));return{type:e,payload:n.payload,..."meta"in n&&{meta:n.meta},..."error"in n&&{error:n.error}}}return{type:e,payload:o[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=o=>Bi(o)&&o.type===e,r}var gp=class ka extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,ka.prototype)}static get[Symbol.species](){return ka}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new ka(...t[0].concat(this)):new ka(...t.concat(this))}};function dp(e){return He(e)?mr(e,()=>{}):e}function mp(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function JR(e){return typeof e=="boolean"}var XR=()=>function(t){let{thunk:r=!0,immutableCheck:o=!0,serializableCheck:n=!0,actionCreatorCheck:a=!0}=t??{},i=new gp;return r&&(JR(r)?i.push(up):i.push(lp(r.extraArgument))),i},Tr="RTK_autoBatch",en=()=>e=>({payload:e,meta:{[Tr]:!0}}),pp=e=>t=>{setTimeout(t,e)},ZR=(e={type:"raf"})=>t=>(...r)=>{let o=t(...r),n=!0,a=!1,i=!1,c=new Set,u=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:pp(10):e.type==="callback"?e.queueNotification:pp(e.timeout),s=()=>{i=!1,a&&(a=!1,c.forEach(l=>l()))};return Object.assign({},o,{subscribe(l){let d=()=>n&&l(),p=o.subscribe(d);return c.add(l),()=>{p(),c.delete(l)}},dispatch(l){try{return n=!l?.meta?.[Tr],a=!n,a&&(i||(i=!0,u(s))),o.dispatch(l)}finally{n=!0}}})},eF=e=>function(r){let{autoBatch:o=!0}=r??{},n=new gp(e);return o&&n.push(ZR(typeof o=="object"?o:void 0)),n};function yp(e){let t=XR(),{reducer:r=void 0,middleware:o,devTools:n=!0,preloadedState:a=void 0,enhancers:i=void 0}=e||{},c;if(typeof r=="function")c=r;else if(Lt(r))c=Yo(r);else throw new Error(At(1));let u;typeof o=="function"?u=o(t):u=t();let s=Jo;n&&(s=GR({trace:!1,...typeof n=="object"&&n}));let l=Km(...u),d=eF(l),p=typeof i=="function"?i(d):d(),m=s(...p);return Zu(c,a,m)}function hp(e){let t={},r=[],o,n={addCase(a,i){let c=typeof a=="string"?a:a.type;if(!c)throw new Error(At(28));if(c in t)throw new Error(At(29));return t[c]=i,n},addMatcher(a,i){return r.push({matcher:a,reducer:i}),n},addDefaultCase(a){return o=a,n}};return e(n),[t,r,o]}function tF(e){return typeof e=="function"}function B(e,t){let[r,o,n]=hp(t),a;if(tF(e))a=()=>dp(e());else{let c=dp(e);a=()=>c}function i(c=a(),u){let s=[r[u.type],...o.filter(({matcher:l})=>l(u)).map(({reducer:l})=>l)];return s.filter(l=>!!l).length===0&&(s=[n]),s.reduce((l,d)=>{if(d)if(ot(l)){let m=d(l,u);return m===void 0?l:m}else{if(He(l))return mr(l,p=>d(p,u));{let p=d(l,u);if(p===void 0){if(l===null)return l;throw Error("A case reducer on a non-draftable value must not return undefined")}return p}}return l},c)}return i.getInitialState=a,i}var Sp=(e,t)=>YR(e)?e.match(t):e(t);function Qt(...e){return t=>e.some(r=>Sp(r,t))}function Zo(...e){return t=>e.every(r=>Sp(r,t))}function Gi(e,t){if(!e||!e.meta)return!1;let r=typeof e.meta.requestId=="string",o=t.indexOf(e.meta.requestStatus)>-1;return r&&o}function Va(e){return typeof e[0]=="function"&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function Yi(...e){return e.length===0?t=>Gi(t,["pending"]):Va(e)?Qt(...e.map(t=>t.pending)):Yi()(e[0])}function Po(...e){return e.length===0?t=>Gi(t,["rejected"]):Va(e)?Qt(...e.map(t=>t.rejected)):Po()(e[0])}function Da(...e){let t=r=>r&&r.meta&&r.meta.rejectedWithValue;return e.length===0?Zo(Po(...e),t):Va(e)?Zo(Po(...e),t):Da()(e[0])}function pr(...e){return e.length===0?t=>Gi(t,["fulfilled"]):Va(e)?Qt(...e.map(t=>t.fulfilled)):pr()(e[0])}function Ji(...e){return e.length===0?t=>Gi(t,["pending","fulfilled","rejected"]):Va(e)?Qt(...e.flatMap(t=>[t.pending,t.rejected,t.fulfilled])):Ji()(e[0])}var rF="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Xi=(e=21)=>{let t="",r=e;for(;r--;)t+=rF[Math.random()*64|0];return t},oF=["name","message","stack","code"],pl=class{constructor(e,t){Te(this,"_type");this.payload=e,this.meta=t}},fp=class{constructor(e,t){Te(this,"_type");this.payload=e,this.meta=t}},nF=e=>{if(typeof e=="object"&&e!==null){let t={};for(let r of oF)typeof e[r]=="string"&&(t[r]=e[r]);return t}return{message:String(e)}},j=(()=>{function e(t,r,o){let n=h(t+"/fulfilled",(u,s,l,d)=>({payload:u,meta:{...d||{},arg:l,requestId:s,requestStatus:"fulfilled"}})),a=h(t+"/pending",(u,s,l)=>({payload:void 0,meta:{...l||{},arg:s,requestId:u,requestStatus:"pending"}})),i=h(t+"/rejected",(u,s,l,d,p)=>({payload:d,error:(o&&o.serializeError||nF)(u||"Rejected"),meta:{...p||{},arg:l,requestId:s,rejectedWithValue:!!d,requestStatus:"rejected",aborted:u?.name==="AbortError",condition:u?.name==="ConditionError"}}));function c(u){return(s,l,d)=>{let p=o?.idGenerator?o.idGenerator(u):Xi(),m=new AbortController,f,g;function C(y){g=y,m.abort()}let x=async function(){let y;try{let P=o?.condition?.(u,{getState:l,extra:d});if(iF(P)&&(P=await P),P===!1||m.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let O=new Promise((A,F)=>{f=()=>{F({name:"AbortError",message:g||"Aborted"})},m.signal.addEventListener("abort",f)});s(a(p,u,o?.getPendingMeta?.({requestId:p,arg:u},{getState:l,extra:d}))),y=await Promise.race([O,Promise.resolve(r(u,{dispatch:s,getState:l,extra:d,requestId:p,signal:m.signal,abort:C,rejectWithValue:(A,F)=>new pl(A,F),fulfillWithValue:(A,F)=>new fp(A,F)})).then(A=>{if(A instanceof pl)throw A;return A instanceof fp?n(A.payload,p,u,A.meta):n(A,p,u)})])}catch(P){y=P instanceof pl?i(null,p,u,P.payload,P.meta):i(P,p,u)}finally{f&&m.signal.removeEventListener("abort",f)}return o&&!o.dispatchConditionRejection&&i.match(y)&&y.meta.condition||s(y),y}();return Object.assign(x,{abort:C,requestId:p,arg:u,unwrap(){return x.then(aF)}})}}return Object.assign(c,{pending:a,rejected:i,fulfilled:n,settled:Qt(i,n),typePrefix:t})}return e.withTypes=()=>e,e})();function aF(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function iF(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var Cp=Symbol.for("rtk-slice-createasyncthunk"),Sq={[Cp]:j};function cF(e,t){return`${e}/${t}`}function sF({creators:e}={}){let t=e?.asyncThunk?.[Cp];return function(o){let{name:n,reducerPath:a=n}=o;if(!n)throw new Error(At(11));typeof process<"u";let i=(typeof o.reducers=="function"?o.reducers(lF()):o.reducers)||{},c=Object.keys(i),u={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},s={addCase(y,S){let P=typeof y=="string"?y:y.type;if(!P)throw new Error(At(12));if(P in u.sliceCaseReducersByType)throw new Error(At(13));return u.sliceCaseReducersByType[P]=S,s},addMatcher(y,S){return u.sliceMatchers.push({matcher:y,reducer:S}),s},exposeAction(y,S){return u.actionCreators[y]=S,s},exposeCaseReducer(y,S){return u.sliceCaseReducersByName[y]=S,s}};c.forEach(y=>{let S=i[y],P={reducerName:y,type:cF(n,y),createNotation:typeof o.reducers=="function"};mF(S)?fF(P,S,s,t):dF(P,S,s)});function l(){let[y={},S=[],P=void 0]=typeof o.extraReducers=="function"?hp(o.extraReducers):[o.extraReducers],O={...y,...u.sliceCaseReducersByType};return B(o.initialState,A=>{for(let F in O)A.addCase(F,O[F]);for(let F of u.sliceMatchers)A.addMatcher(F.matcher,F.reducer);for(let F of S)A.addMatcher(F.matcher,F.reducer);P&&A.addDefaultCase(P)})}let d=y=>y,p=new Map,m;function f(y,S){return m||(m=l()),m(y,S)}function g(){return m||(m=l()),m.getInitialState()}function C(y,S=!1){function P(A){let F=A[y];return typeof F>"u"&&S&&(F=g()),F}function O(A=d){let F=mp(p,S,()=>new WeakMap);return mp(F,A,()=>{let w={};for(let[b,V]of Object.entries(o.selectors??{}))w[b]=uF(V,A,g,S);return w})}return{reducerPath:y,getSelectors:O,get selectors(){return O(P)},selectSlice:P}}let x={name:n,reducer:f,actions:u.actionCreators,caseReducers:u.sliceCaseReducersByName,getInitialState:g,...C(a),injectInto(y,{reducerPath:S,...P}={}){let O=S??a;return y.inject({reducerPath:O,reducer:f},P),{...x,...C(O,!0)}}};return x}}function uF(e,t,r,o){function n(a,...i){let c=t(a);return typeof c>"u"&&o&&(c=r()),e(c,...i)}return n.unwrapped=e,n}var Ao=sF();function lF(){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 dF({type:e,reducerName:t,createNotation:r},o,n){let a,i;if("reducer"in o){if(r&&!pF(o))throw new Error(At(17));a=o.reducer,i=o.prepare}else a=o;n.addCase(e,a).exposeCaseReducer(t,a).exposeAction(t,i?h(e,i):h(e))}function mF(e){return e._reducerDefinitionType==="asyncThunk"}function pF(e){return e._reducerDefinitionType==="reducerWithPrepare"}function fF({type:e,reducerName:t},r,o,n){if(!n)throw new Error(At(18));let{payloadCreator:a,fulfilled:i,pending:c,rejected:u,settled:s,options:l}=r,d=n(e,a,l);o.exposeAction(t,d),i&&o.addCase(d.fulfilled,i),c&&o.addCase(d.pending,c),u&&o.addCase(d.rejected,u),s&&o.addMatcher(d.settled,s),o.exposeCaseReducer(t,{fulfilled:i||Hi,pending:c||Hi,rejected:u||Hi,settled:s||Hi})}function Hi(){}var xp="listener",Rp="completed",Fp="cancelled",Cq=`task-${Fp}`,xq=`task-${Rp}`,Rq=`${xp}-${Fp}`,Fq=`${xp}-${Rp}`;var{assign:Pp}=Object;var fl="listenerMiddleware";var gF=Pp(h(`${fl}/add`),{withTypes:()=>gF}),Pq=h(`${fl}/removeAll`),yF=Pp(h(`${fl}/remove`),{withTypes:()=>yF});var Aq=Symbol.for("rtk-state-proxy-original");function At(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. `}var Or=N(e=>e.commercePagination?.principal.perPage||0,e=>e),Zi=N((e,t)=>e.commercePagination?.recommendations[t]?.perPage||0,e=>e),qr=N(e=>e.commercePagination?.principal.totalEntries||0,e=>e),ec=N((e,t)=>e.commercePagination?.recommendations[t]?.totalEntries||0,e=>e),tc=N(e=>e.commercePagination?.principal.page||0,e=>e),Ap=N((e,t)=>e.commercePagination?.recommendations[t]?.page||0,e=>e);var Dq=N(e=>e[Q].productListing.responseId,e=>e),Na=N(e=>e.productListing.responseId,e=>e),bp=N(e=>e.productListing.requestId,e=>e),Ma=N(e=>e.productListing?.products.length||0,e=>e),Ip=N(e=>({total:qr(e),current:Ma(e)}),({current:e,total:t})=>e<t),wp=N(e=>e.productListing?.isLoading,e=>(0,vp.isNullOrUndefined)(e)?!1:e),Ep=N(e=>e.productListing?.error,e=>e??null);var hl=require("@coveo/bueno");function gl(e,t,r){if(e===void 0)return{};let o=t(e);return o!==r?{q:o}:{}}function yl(e,t,r){if(e===void 0)return{};let o=t(e);return o!==r?{sortCriteria:o}:{}}function Ut(e,t,r,o){if(e===void 0)return{};let n=Object.entries(e).filter(([a])=>t(a)).map(([a,{request:i}])=>{let c=r(i);return c.length?{[a]:c}:{}}).reduce((a,i)=>({...a,...i}),{});return Object.keys(n).length?{[o]:n}:{}}function Bt(e){let{activeValue:t,ancestryMap:r}=SF(e);return t?CF(t,r):[]}function SF(e){let t=[...e],r=new Map;for(;t.length>0;){let o=t.shift();if(o.state==="selected")return{activeValue:o,ancestryMap:r};if(r)for(let n of o.children)r.set(n,o);t.unshift(...o.children)}return{}}function CF(e,t){let r=[];if(!e)return[];let o=e;do r.unshift(o),o=t.get(o);while(o);return r}function Tp(){return{principal:kr(),recommendations:{}}}function kr(){return{page:0,perPage:0,totalEntries:0,totalPages:0}}var bt=require("@coveo/bueno");var jt=require("@coveo/bueno"),lt=(r=>(r.Relevance="relevance",r.Fields="fields",r))(lt||{}),Vr=(r=>(r.Ascending="asc",r.Descending="desc",r))(Vr||{}),vt=()=>({by:"relevance"});var Qq=new jt.RecordValue({options:{required:!1},values:{by:new jt.EnumValue({enum:lt,required:!0}),fields:new jt.ArrayValue({each:new jt.RecordValue({values:{name:new jt.StringValue,direction:new jt.EnumValue({enum:Vr})}})})}});var La=e=>({by:"fields",fields:e}),Op=new bt.RecordValue({options:{required:!1},values:{by:new bt.EnumValue({enum:lt,required:!0}),fields:new bt.ArrayValue({each:new bt.RecordValue({values:{field:new bt.StringValue({required:!0}),direction:new bt.EnumValue({enum:Vr}),displayName:new bt.StringValue}})})}});function vo(){return{appliedSort:vt(),availableSorts:[vt()]}}function rc(e){return{...xF(e?.commercePagination,t=>t.principal.page,kr().page),...RF(e?.commercePagination,t=>t.principal.perPage,kr().perPage),...yl(e?.commerceSort,t=>t.appliedSort,vo().appliedSort),...Ut(e.commerceFacetSet,Dr(e,"regular"),FF,"f"),...Ut(e.commerceFacetSet,Dr(e,"regular"),PF,"fExcluded"),...Ut(e.commerceFacetSet,Dr(e,"location"),AF,"lf"),...Ut(e.commerceFacetSet,Dr(e,"hierarchical"),vF,"cf"),...Ut(e.commerceFacetSet,Dr(e,"dateRange"),qp,"df"),...Ut(e.commerceFacetSet,Dr(e,"dateRange"),kp,"dfExcluded"),...Ut(e.commerceFacetSet,Dr(e,"numericalRange"),qp,"nf"),...Ut(e.commerceFacetSet,Dr(e,"numericalRange"),kp,"nfExcluded"),...Vp("selected",e.manualNumericFacetSet),...Vp("excluded",e.manualNumericFacetSet)}}function xF(e,t,r){if(e===void 0)return{};let o=t(e);return o!==r?{page:o}:{}}function RF(e,t,r){if(e===void 0)return{};let o=t(e);return o!==r?{perPage:o}:{}}function FF(e){return e.values.filter(t=>t.state==="selected").map(t=>t.value)}function PF(e){return e.values.filter(t=>t.state==="excluded").map(t=>t.value)}function AF(e){return e.values.filter(t=>t.state==="selected").map(t=>t.value)}function qp(e){return e.values.filter(t=>t.state==="selected")}function kp(e){return e.values.filter(t=>t.state==="excluded")}function Vp(e,t){if(!t||e==="idle")return{};let r=Object.entries(t).map(([o,n])=>{if(!(n.manualRange===void 0||n.manualRange.state!==e))return{[o]:[n.manualRange]}}).filter(o=>o!==void 0).reduce((o,n)=>({...o,...n}),{});return e==="selected"?{mnf:r}:{mnfExcluded:r}}function vF(e){return Bt(e.values).map(r=>r.value)}function Dr(e,t){return r=>e.commerceFacetSet[r].request.type===t}var oc=()=>({query:""});var sk=N(e=>e[Q].commerceSearch.responseId,e=>e),Qa=N(e=>e.commerceSearch.responseId,e=>e),Dp=N(e=>e.commerceSearch.requestId,e=>e),Ua=N(e=>e.commerceSearch?.products.length||0,e=>e),Np=N(e=>({total:qr(e),current:Ua(e)}),({current:e,total:t})=>e<t),Mp=N(e=>e.commerceSearch?.isLoading,e=>(0,hl.isNullOrUndefined)(e)?!1:e),Lp=N(e=>e.commerceSearch?.error,e=>e??null),nc=N(e=>e.commerceQuery?.query,e=>e??""),bF=N(e=>e.commerceSearch?.queryExecuted,e=>e),Qp=(e,t)=>(0,hl.isNullOrUndefined)(t.queryCorrection?.correctedQuery)?nc(e):t.queryCorrection.correctedQuery,Up=e=>({...gl(e?.commerceQuery,t=>t.query,oc().query),...rc(e)});function Bp(e){return{query:bF(e)||""}}var Sl;(t=>t.responseIdSelector=jp(Qa))(Sl||(Sl={}));var Cl;(t=>t.responseIdSelector=jp(Na))(Cl||(Cl={}));function jp(e){return t=>e(t[Q])}var Pl={};Ju(Pl,{escape:()=>tn,getHighlightedSuggestion:()=>Fl,highlightString:()=>wF});var zp=require("@coveo/bueno");var bo=(e,t=5)=>e+Math.random().toString(36).substring(2,2+t);function _p(e){return Array.isArray(e)}function ac(e){return e.trim()===""}function $p(e){let t={};for(let[r,o]of e)t[r]=o;return t}function Ba(e){if(typeof e!="object"||!e)return e;try{return JSON.parse(JSON.stringify(e))}catch{return e}}function wF(e){if(ac(e.openingDelimiter)||ac(e.closingDelimiter))throw Error("delimiters should be a non-empty string");if((0,zp.isNullOrUndefined)(e.content)||ac(e.content))return e.content;if(e.highlights.length===0)return tn(e.content);let t=e.content.length,r="",o=0;for(let n=0;n<e.highlights.length;n++){let a=e.highlights[n],i=a.offset,c=i+a.length;if(c>t)break;r+=tn(e.content.slice(o,i)),r+=e.openingDelimiter,r+=tn(e.content.slice(i,c)),r+=e.closingDelimiter,o=c}return o!==t&&(r+=tn(e.content.slice(o))),r}function Fl(e,t){return e=tn(e),e.replace(/\[(.*?)\]|\{(.*?)\}|\((.*?)\)/g,(r,o,n,a)=>o?Rl(o,t.notMatchDelimiters):n?Rl(n,t.exactMatchDelimiters):a?Rl(a,t.correctionDelimiters):r)}function Rl(e,t){return t?t.open+e+t.close:e}function tn(e){let t={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},r="(?:"+Object.keys(t).join("|")+")",o=RegExp(r),n=RegExp(r,"g");return o.test(e)?e.replace(n,a=>t[a]):e}var of=Mt(Zp(),1);var eP="recommendation-internal-options",Rk=Symbol.for(eP);var $=new Error("Failed to load reducers."),rn=class extends Error{constructor(){super(),this.name="ExpiredToken",this.message="The token being used to perform the request is expired."}};var wo=class extends Error{constructor(r,o){super();Te(this,"statusCode");this.name="Disconnected",this.message=`Client could not connect to the following URL: ${r}`,this.statusCode=o??0}};function ef(e){let t=[];for(let r in e){let o=encodeURIComponent(r),n=encodeURIComponent(e[r]);t.push(`${o}=${n}`)}return t.join("&")}function tf(e){return typeof e!="object"||!e?!1:Object.values(e).every(tP)}function tP(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"}function rf(e){return e===429}var on=class e{static async call(t){let r=rP(t),{logger:o}=t,n=await e.preprocessRequest(r,t);o.info(n,"Platform request");let{url:a,...i}=n,c=async()=>{let u=await fetch(a,i);if(rf(u.status))throw u;return u};try{let u=await(0,of.backOff)(c,{retry:s=>{let l=s&&rf(s.status);return l&&o.info("Platform retrying request"),l}});switch(u.status){case 419:case 401:throw o.info("Platform renewing token"),new rn;case 404:throw new wo(a,u.status);default:return o.info({response:u,requestInfo:n},"Platform response"),u}}catch(u){return u.message==="Failed to fetch"?new wo(a):u}}static async preprocessRequest(t,r){let{origin:o,preprocessRequest:n,logger:a,requestMetadata:i}=r,{signal:c,...u}=t,s=Ba(u);try{let l=await n(t,o,i);return{...t,...l}}catch(l){a.error(l,"Platform request preprocessing failed. Returning default request options.")}return s}};function Ie(e,t="prod",r="platform"){let o=t==="prod"?"":t,n=r==="platform"?"":`.${r}`;return`https://${e}${n}.org${o}.coveo.com`}function dt(e,t="prod"){return`${Ie(e,t)}/rest/search/v2`}function cc(e,t="prod"){return`${Ie(e,t,"analytics")}/rest/organizations/${e}/events/v1`}function rP(e){let{url:t,method:r,requestParams:o,contentType:n,accessToken:a,signal:i}=e,c=e.method==="POST"||e.method==="PUT",u=oP(o,n);return{url:t,method:r,headers:{"Content-Type":n,Authorization:`Bearer ${a}`,...e.headers},...c&&{body:u},signal:i}}function oP(e,t){return t==="application/x-www-form-urlencoded"?tf(e)?ef(e):"":JSON.stringify(e)}function nP(e){return{statusCode:e.statusCode,type:e.name,message:e.message}}function aP(e){return{statusCode:e.code,type:e.name,message:e.message,ignored:!0}}function ql(e,t){if(t&&e.name==="AbortError")return{error:aP(e)};if(e instanceof wo)return{error:nP(e)};throw e}var nn=(e,t)=>({...$a(e,t),requestParams:iP(e)}),iP=e=>{let{trackingId:t,clientId:r,context:o,language:n,country:a,currency:i,page:c,perPage:u,facets:s,sort:l}=e;return{trackingId:t,clientId:r,context:o,language:n,country:a,currency:i,page:c,perPage:u,facets:s,sort:l}},$a=(e,t)=>{let{url:r,accessToken:o}=e,n=`${r}/${t}`;return{accessToken:o,method:"POST",contentType:"application/json",url:n,origin:"commerceApiFetch",requestMetadata:{method:t}}};var nf=(e,t)=>({...$a(e,t),requestParams:cP(e)}),cP=e=>{let{slotId:t,trackingId:r,clientId:o,context:n,language:a,country:i,currency:c,page:u,perPage:s}=e;return{slotId:t,trackingId:r,clientId:o,context:n,language:a,country:i,currency:c,page:u,perPage:s}};var af=e=>({...$a(e,"search/querySuggest"),requestParams:sP(e)}),sP=e=>{let{trackingId:t,query:r,clientId:o,context:n,language:a,country:i,currency:c}=e;return{trackingId:t,query:r,clientId:o,context:n,language:a,country:i,currency:c}};var Oe=e=>e.error!==void 0,sc=class{constructor(t){this.options=t}async getProductListing(t){return this.query({...nn(t,"listing"),...this.options})}async search(t){let r=nn(t,"search");return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async getRecommendations(t){return this.query({...nf(t,"recommendations"),...this.options})}async productSuggestions(t){let r=nn(t,"search/productSuggest");return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async querySuggest(t){let r=af(t);return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async facetSearch(t,r){let o=nn(t,"facet");return this.query({...o,url:`${o.url}?type=${r}`,requestParams:{...o.requestParams,facetId:t?.facetId,facetQuery:t?.facetQuery,query:t?.query},...this.options})}async plan(t){let r=nn(t,"search");return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async query(t){let r=await on.call(t);if(r instanceof Error)return ql(r);let o=await r.json();return r.ok?{success:o}:{error:o}}};function an(e,t="prod"){return`${Ie(e,t)}/rest/organizations/${e}/commerce/v2`}var uc=e=>e;var Dl=require("@coveo/bueno");var Ge=require("@coveo/bueno"),E=new Ge.StringValue({required:!0,emptyAllowed:!1}),re=new Ge.StringValue({required:!1,emptyAllowed:!1}),fe=new Ge.StringValue({required:!0,emptyAllowed:!0}),cf=new Ge.StringValue({required:!1,emptyAllowed:!0}),sf=new Ge.ArrayValue({each:E,required:!0}),uf=new Ge.StringValue({required:!1,emptyAllowed:!1,regex:/^\d+\.\d+\.\d+$/}),Be=({message:e,name:t,stack:r})=>({message:e,name:t,stack:r}),he=(e,t)=>{if("required"in t)return{payload:new Ge.Schema({value:t}).validate({value:e}).value};let n=new Ge.RecordValue({options:{required:!0},values:t}).validate(e);if(n)throw new Ge.SchemaValidationError(n);return{payload:e}},R=(e,t)=>{try{return he(e,t)}catch(r){return{payload:e,error:Be(r)}}},Ye=(e,t,r,o)=>{let n=`Check the initialState of ${o}`;return lf(e,t,r,n,"Controller initialization error")},je=(e,t,r,o)=>{let n=`Check the options of ${o}`;return lf(e,t,r,n,"Controller initialization error")},lf=(e,t,r,o,n)=>{try{return t.validate(r,o)}catch(a){throw e.logger.error(a,n),a}};var _e=require("@coveo/bueno");var cn="3.13.1-pre.d6951908c2",df=["@coveo/atomic","@coveo/quantic"];var kl=()=>re,mf=()=>E,za=h("configuration/updateBasicConfiguration",e=>R(e,{accessToken:re,environment:new _e.StringValue({required:!1,constrainTo:["prod","hipaa","stg","dev"]}),organizationId:re})),pf=h("configuration/updateSearchConfiguration",e=>R(e,{proxyBaseUrl:new _e.StringValue({required:!1,url:!0}),pipeline:new _e.StringValue({required:!1,emptyAllowed:!0}),searchHub:re,timezone:re,locale:re,authenticationProviders:new _e.ArrayValue({required:!1,each:E})})),sn={enabled:new _e.BooleanValue({default:!0}),originContext:kl(),originLevel2:kl(),originLevel3:kl(),proxyBaseUrl:new _e.StringValue({required:!1,url:!0}),runtimeEnvironment:new _e.Value,anonymous:new _e.BooleanValue({default:!1}),deviceId:re,userDisplayName:re,documentLocation:re,trackingId:re,analyticsMode:new _e.StringValue({constrainTo:["legacy","next"],required:!1,default:"next"}),source:new _e.RecordValue({options:{required:!1},values:df.reduce((e,t)=>(e[t]=uf,e),{})})},Vl=h("configuration/updateAnalyticsConfiguration",e=>R(e,sn)),lc=h("configuration/analytics/disable"),dc=h("configuration/analytics/enable"),ff=h("configuration/analytics/originlevel2",e=>R(e,{originLevel2:mf()})),gf=h("configuration/analytics/originlevel3",e=>R(e,{originLevel3:mf()}));var un=h("commerce/configuration/updateBasicConfiguration",e=>R(e,{accessToken:re,environment:new Dl.StringValue({required:!1,constrainTo:["prod","hipaa","stg","dev"]}),organizationId:re})),ln=h("commerce/configuration/updateProxyBaseUrl",e=>R(e,{proxyBaseUrl:new Dl.StringValue({required:!1,url:!0})})),dn=h("commerce/configuration/updateAnalyticsConfiguration",e=>R(e,{enabled:sn.enabled,proxyBaseUrl:sn.proxyBaseUrl,source:sn.source,trackingId:sn.trackingId})),mc=h("commerce/configuration/analytics/disable"),pc=h("commerce/configuration/analytics/enable");var Nr=require("@coveo/bueno");var yf=()=>({accessToken:"",environment:"prod",organizationId:"",analytics:{enabled:!0,trackingId:"",source:{}},commerce:{}});var Nl=B(yf(),e=>e.addCase(un,(t,r)=>{uP(t,r.payload)}).addCase(ln,(t,r)=>{lP(t,r.payload)}).addCase(dn,(t,r)=>{dP(t,r.payload)}).addCase(mc,t=>{t.analytics.enabled=!1}).addCase(pc,t=>{t.analytics.enabled=!0}));function uP(e,t){(0,Nr.isNullOrUndefined)(t.accessToken)||(e.accessToken=t.accessToken),e.environment=t.environment??"prod",(0,Nr.isNullOrUndefined)(t.organizationId)||(e.organizationId=t.organizationId)}function lP(e,t){(0,Nr.isNullOrUndefined)(t.proxyBaseUrl)||(e.commerce.apiBaseUrl=t.proxyBaseUrl)}function dP(e,t){(0,Nr.isNullOrUndefined)(t.enabled)||(e.analytics.enabled=t.enabled),(0,Nr.isNullOrUndefined)(t.proxyBaseUrl)||(e.analytics.apiBaseUrl=t.proxyBaseUrl),(0,Nr.isNullOrUndefined)(t.source)||(e.analytics.source=t.source),(0,Nr.isNullOrUndefined)(t.trackingId)||(e.analytics.trackingId=t.trackingId)}function mn(e){return e.currency}var hf=(e,t)=>({currency:mn(t.commerceContext),products:mP(t.cart),transaction:e}),Sf=(e,t)=>({currency:mn(t.commerceContext),...e}),Eo=N(e=>e.cart,e=>e.cartItems,(e,t)=>t.map(r=>e[r])),mP=N(Eo,e=>e.map(({quantity:t,...r})=>({quantity:t,product:r})));var It=require("@coveo/bueno");var Ml={productId:E,quantity:new It.NumberValue({required:!0,min:0}),name:new It.StringValue({required:!1}),price:new It.NumberValue({required:!1,min:0})},Ll=new It.ArrayValue({each:new It.RecordValue({values:{...Ml}})}),Ql={items:Ll},Cf=new It.Schema(Ql);var Mr=h("commerce/cart/setItems",e=>R(e,Ll)),pn=h("commerce/cart/updateItemQuantity",e=>R(e,Ml)),fn=h("commerce/cart/purchase"),fc=j("commerce/cart/emit/purchaseEvent",async(e,{extra:t,getState:r})=>{let o=hf(e,r()),{relay:n}=t;n.emit("ec.purchase",o)}),gc=j("commerce/cart/emit/cartActionEvent",async(e,{extra:t,getState:r})=>{let o=Sf(e,r()),{relay:n}=t;n.emit("ec.cartAction",o)});function z(e){let t,r=new Map,o=()=>r.size===0,n=a=>{try{let i=JSON.stringify(a),c=t!==i;return t=i,c}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(),c;return o()&&(t=JSON.stringify(this.state),c=e.subscribe(()=>{n(this.state)&&r.forEach(u=>u())})),r.set(i,a),()=>{r.delete(i),o()&&c&&c()}},get state(){return{}}}}function xf(e,t){return e.cart[To(t)]}var Rf=N(Eo,e=>e.reduce((t,r)=>t+r.quantity,0)),Ff=N(Eo,e=>e.reduce((t,r)=>t+r.price*r.quantity,0));function Pf(e,t={}){if(!pP(e))throw $;let{dispatch:r}=e,o=z(e),n=()=>e[Q].cart,a={...t.initialState};Ye(e,Cf,a,"buildCart"),a.items!==void 0&&r(Mr(a.items));function i(l,d){return d?d.quantity!==l.quantity:!0}function c(l,d){return!d||l.quantity>d.quantity?"add":"remove"}function u(l,d){return d?l.name===d.name&&l.price===d.price&&l.quantity===d.quantity:!1}function s(l,d){let{quantity:p,...m}=l,f=c(l,d),g=d?Math.abs(p-d.quantity):p;return{action:f,quantity:g,product:m}}return{...o,empty:function(){for(let l of Eo(n()))this.updateItemQuantity({...l,quantity:0})},purchase(l){r(fc(l)),r(fn())},updateItemQuantity(l){let d=xf(n(),l);!d&&l.quantity<=0||u(l,d)||(i(l,d)&&r(gc(s(l,d))),r(pn(l)))},get state(){let l=n();return{items:Eo(l),totalQuantity:Rf(l),totalPrice:Ff(l)}}}}function To(e){return`${e.productId},${e.name},${e.price}`}function pP(e){return e.addReducers({cart:gn}),!0}var yc=()=>({cartItems:[],cart:{},purchasedItems:[],purchased:{}}),hc=e=>vf(e.cartItems,e.cart),Af=e=>vf(e.purchasedItems,e.purchased);function vf(e,t){let r=e.reduce((o,n)=>{let{productId:a,quantity:i}=t[n];return a in o||(o[a]={productId:a,quantity:0}),o[a].quantity+=i,o},{});return[...Object.values(r)]}var gn=B(yc(),e=>{e.addCase(Mr,(t,{payload:r})=>{let{cart:o,cartItems:n}=r.reduce((a,i)=>{let c=To(i);return{cartItems:[...a.cartItems,c],cart:{...a.cart,[c]:i},purchasedItems:[],purchased:{}}},yc());bf(t,n,o)}).addCase(pn,(t,{payload:r})=>{let o=To(r);if(!(o in t.cart)){fP(r,t);return}if(r.quantity<=0){gP(r,t);return}t.cart[o]=r}).addCase(fn,t=>{yP(t);let{cart:r,cartItems:o}=yc();bf(t,o,r)})});function bf(e,t,r){e.cartItems=t,e.cart=r}function fP(e,t){if(e.quantity<=0)return;let r=To(e);t.cartItems=[...t.cartItems,r],t.cart[r]=e}function gP(e,t){let r=To(e);t.cartItems=t.cartItems.filter(o=>o!==r),delete t.cart[r]}function yP(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]}}var _t=require("@coveo/bueno");var hP=Intl.supportedValuesOf("currency"),SP=new _t.StringValue({required:!0,emptyAllowed:!1,constrainTo:hP}),Ul={url:E},Bl={latitude:new _t.NumberValue({min:-90,max:90,required:!0}),longitude:new _t.NumberValue({min:-180,max:180,required:!0})},Wa={language:E,country:E,currency:SP,view:new _t.RecordValue({options:{required:!0},values:Ul}),location:new _t.RecordValue({options:{required:!1},values:Bl})},If=new _t.Schema(Wa);var se=h("commerce/context/set",e=>R(e,Wa)),ue=h("commerce/context/setView",e=>R(e,Ul)),yn=h("commerce/context/setLocation",e=>R(e,Bl));var wf=()=>({language:"",country:"",currency:"",view:{url:""}});var $t=B(wf(),e=>{e.addCase(se,(t,{payload:r})=>r).addCase(ue,(t,{payload:r})=>{t.view=r}).addCase(yn,(t,{payload:r})=>{t.location=r})});var Sc=()=>({correctedQuery:"",corrections:[],originalQuery:""});var Vo=require("@coveo/bueno");var mt=h("breadcrumb/deselectAll"),Lr=h("breadcrumb/deselectAllNonBreadcrumbs");var zt=N(e=>e.source,e=>Object.entries(e).map(([t,r])=>`${t}@${r}`).concat(`@coveo/headless@${cn}`));var at=(e,t)=>({...Ka(e,t),facets:[...xP(e)],...e.commerceSort&&{sort:RP(e.commerceSort.appliedSort)}}),Ka=(e,t,r)=>{let{view:o,location:n,...a}=e.commerceContext;return{accessToken:e.configuration.accessToken,url:e.configuration.commerce.apiBaseUrl??an(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:{...o,...t.referrer?{referrer:t.referrer}:{}},capture:e.configuration.analytics.enabled,cart:hc(e.cart),source:zt(e.configuration.analytics)},...CP(e,r)}},CP=(e,t)=>{let r=t?e.commercePagination?.recommendations[t]:e.commercePagination?.principal;return r&&{page:r.page,...r.perPage&&{perPage:r.perPage}}};function xP(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 RP(e){return e.by==="relevance"?{sortCriteria:"relevance"}:{sortCriteria:"fields",fields:e.fields.map(({name:t,direction:r})=>({field:t,direction:r}))}}var hn=require("@coveo/bueno");var Oo=h("commerce/facets/core/updateNumberOfValues",e=>R(e,{facetId:E,numberOfValues:new hn.NumberValue({required:!0,min:1})})),qo=h("commerce/facets/core/updateIsFieldExpanded",e=>R(e,{facetId:E,isFieldExpanded:new hn.BooleanValue({required:!0})})),qe=h("commerce/facets/core/clearAll"),ke=h("commerce/facets/core/deselectAllValues",e=>R(e,{facetId:E})),ko=h("commerce/facets/core/updateFreezeCurrentValues",e=>R(e,{facetId:E,freezeCurrentValues:new hn.BooleanValue({required:!0})})),Sn=h("commerce/facets/core/updateAutoSelectionForAll",e=>R(e,{allow:new hn.BooleanValue({required:!0})}));var jl=require("@coveo/bueno");var Cc={slotId:cf},FP={...Cc,pageSize:new jl.NumberValue({required:!0,min:0})},gr=h("commerce/pagination/setPageSize",e=>R(e,FP)),PP={...Cc,page:new jl.NumberValue({required:!0,min:0})},Wt=h("commerce/pagination/selectPage",e=>R(e,PP)),Qr=h("commerce/pagination/nextPage",e=>R(e,Cc)),Ur=h("commerce/pagination/previousPage",e=>R(e,Cc)),Cn=h("commerce/pagination/registerRecommendationsSlot",e=>R(e,{slotId:E}));var Ef=require("@coveo/bueno");var Ve=h("commerce/query/update",e=>R(e,{query:new Ef.StringValue}));var _l=require("@coveo/bueno");var xc=require("@coveo/bueno");var Br=h("commerce/triggers/query/updateIgnore",e=>R(e,{q:new xc.StringValue({emptyAllowed:!0,required:!0})})),xn=h("commerce/triggers/query/applyModification",e=>R(e,new xc.RecordValue({values:{originalQuery:re,modification:re}})));var Ha=class{constructor(t){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=new Date().getTime(),o=await this.extra.apiClient.search(t),n=new Date().getTime()-r,a=this.getState().commerceQuery.query||"";return{response:o,duration:n,queryExecuted:a,requestExecuted:t}}processSuccessResponse(t){return{...t,response:this.getSuccessResponse(t),originalQuery:this.getCurrentQuery()}}processQueryErrorOrContinue(t){return Oe(t.response)?this.rejectWithValue(t.response.error):null}async processQueryCorrectionsOrContinue(t){let r=this.getState(),o=this.getSuccessResponse(t);if(!o||!r.didYouMean)return null;let{queryCorrection:n}=o;if(!(!(0,_l.isNullOrUndefined)(n)&&!(0,_l.isNullOrUndefined)(n.correctedQuery)))return null;let{correctedQuery:i,originalQuery:c}=o.queryCorrection;return this.onUpdateQueryForCorrection(i??""),{...t,response:{...o},queryExecuted:Qp(r,o),originalQuery:c??""}}async processQueryTriggersOrContinue(t){let r=this.getSuccessResponse(t);if(!r)return null;let o=r.triggers.find(c=>c.type==="query")?.content||"";if(!o)return null;if(this.getState().triggers?.queryModification.queryToIgnore===o)return this.dispatch(Br({q:""})),null;let a=this.getCurrentQuery(),i=await this.automaticallyRetryQueryWithTriggerModification(o);return Oe(i.response)?this.rejectWithValue(i.response.error):{...i,response:{...i.response.success},originalQuery:a}}async automaticallyRetryQueryWithTriggerModification(t){return this.dispatch(xn({newQuery:t,originalQuery:this.getCurrentQuery()})),this.onUpdateQueryForCorrection(t),await this.fetchFromAPI({...at(this.getState(),this.navigatorContext),query:t})}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 Oe(t.response)?null:t.response.success}get extra(){return this.config.extra}onUpdateQueryForCorrection(t){this.dispatch(Ve({query:t}))}};var H=j("commerce/search/executeSearch",async(e,t)=>{let{getState:r}=t,o=r(),{navigatorContext:n}=t.extra,a=at(o,n),i=nc(o),c=new Ha(t),u=await c.fetchFromAPI({...a,query:i});return c.process(u)}),jr=j("commerce/search/fetchMoreProducts",async(e,t)=>{let{getState:r}=t,o=r(),{navigatorContext:n}=t.extra;if(!Np(o))return null;let i=Or(o),u=Ua(o)/i,s=nc(o),l=at(o,n),d=new Ha(t),p=await d.fetchFromAPI({...l,query:s,page:u});return d.process(p)}),Rn=j("commerce/search/prepareForSearchWithQuery",(e,t)=>{let{dispatch:r}=t;R(e,{query:new Vo.StringValue,clearFilters:new Vo.BooleanValue}),e.clearFilters&&(r(qe()),r(Lr())),r(Sn({allow:!0})),r(Ve({query:e.query})),r(Wt({page:0}))}),Fn=j("commerce/search/fetchInstantProducts",async(e,{getState:t,rejectWithValue:r,extra:o})=>{let n=t(),{apiClient:a,navigatorContext:i}=o,{q:c}=e,u=await a.productSuggestions({...at(n,i),query:c});if(Oe(u))return r(u.error);let s=u.success.products.slice(0,5);return{response:{...u.success,products:s}}}),AP={child:new Vo.RecordValue({options:{required:!0},values:{permanentid:new Vo.StringValue({required:!0})}})},Pn=h("commerce/search/promoteChildToParent",e=>R(e,AP));function Tf(){return{wasCorrectedTo:"",queryCorrection:Sc(),originalQuery:""}}var Rc=B(Tf(),e=>{e.addCase(H.pending,t=>{t.queryCorrection=Sc(),t.wasCorrectedTo=""}).addCase(H.fulfilled,(t,r)=>{let{queryCorrection:o}=r.payload.response;t.originalQuery=r.payload.originalQuery,t.wasCorrectedTo=o?.correctedQuery??"",t.queryCorrection={correctedQuery:o?.correctedQuery??o?.corrections[0]?.correctedQuery??"",wordCorrections:o?.corrections[0]?.wordCorrections??[]}})});var de=require("@coveo/bueno");var K=E;var Kt=require("@coveo/bueno");var vP={state:new Kt.Value({required:!0}),numberOfResults:new Kt.NumberValue({required:!0,min:0}),value:new Kt.StringValue({required:!0,emptyAllowed:!0}),path:new Kt.ArrayValue({required:!0,each:E}),moreValuesAvailable:new Kt.BooleanValue({required:!1})};function Ga(e){e.children.forEach(t=>{Ga(t)}),he({state:e.state,numberOfResults:e.numberOfResults,value:e.value,path:e.path,moreValuesAvailable:e.moreValuesAvailable},vP)}var An={facetId:K,field:E,tabs:new de.RecordValue({options:{required:!1},values:{included:new de.ArrayValue({each:new de.StringValue}),excluded:new de.ArrayValue({each:new de.StringValue})}}),activeTab:new de.StringValue({required:!1}),delimitingCharacter:new de.StringValue({required:!1,emptyAllowed:!0}),filterFacetCount:new de.BooleanValue({required:!1}),injectionDepth:new de.NumberValue({required:!1,min:0}),numberOfValues:new de.NumberValue({required:!1,min:1}),sortCriteria:new de.Value({required:!1}),basePath:new de.ArrayValue({required:!1,each:E}),filterByBasePath:new de.BooleanValue({required:!1})},vn=5,Of=h("categoryFacet/register",e=>R(e,An)),qf=h("categoryFacet/toggleSelectValue",e=>{try{return he(e.facetId,E),Ga(e.selection),{payload:e,error:null}}catch(t){return{payload:e,error:Be(t)}}}),kf=h("categoryFacet/deselectAll",e=>R(e,An.facetId)),wN=h("categoryFacet/updateNumberOfValues",e=>R(e,{facetId:An.facetId,numberOfValues:An.numberOfValues})),EN=h("categoryFacet/updateSortCriterion",e=>R(e,{facetId:An.facetId,criterion:new de.Value})),TN=h("categoryFacet/updateBasePath",e=>R(e,{facetId:An.facetId,basePath:new de.ArrayValue({each:E})}));var In=require("@coveo/bueno");var bn=require("@coveo/bueno");var Ya={facetId:K,captions:new bn.RecordValue({options:{required:!1}}),numberOfValues:new bn.NumberValue({required:!1,min:1}),query:new bn.StringValue({required:!1,emptyAllowed:!0})};var bP={path:new In.ArrayValue({required:!0,each:E}),displayValue:fe,rawValue:fe,count:new In.NumberValue({required:!0,min:0})},_r=h("categoryFacet/selectSearchResult",e=>R(e,{facetId:K,value:new In.RecordValue({values:bP})})),Fc=h("categoryFacetSearch/register",e=>R(e,Ya));var Pc=require("@coveo/bueno");var Vf={facetId:K,value:new Pc.RecordValue({values:{displayValue:fe,rawValue:fe,count:new Pc.NumberValue({required:!0,min:0})}})},Ac=h("facetSearch/register",e=>R(e,Ya)),$r=h("facetSearch/update",e=>R(e,Ya)),wt=h("facetSearch/toggleSelectValue",e=>R(e,Vf)),Et=h("facetSearch/toggleExcludeValue",e=>R(e,Vf));var Df=require("@coveo/bueno");var yr=h("facetOptions/update",(e={freezeFacetOrder:!0})=>R(e,{freezeFacetOrder:new Df.BooleanValue({required:!1})})),$l=h("facetOptions/facet/enable",e=>R(e,K)),hr=h("facetOptions/facet/disable",e=>R(e,K));var IP=h("history/undo"),wP=h("history/redo"),Ht=h("history/snapshot"),GN=j("history/back",async(e,{dispatch:t})=>{t(IP()),await t(xe())}),YN=j("history/forward",async(e,{dispatch:t})=>{t(wP()),await t(xe())}),xe=j("history/change",async(e,{getState:t})=>t().history.present);var me=require("@coveo/bueno"),vc={q:new me.StringValue,enableQuerySyntax:new me.BooleanValue,aq:new me.StringValue,cq:new me.StringValue,firstResult:new me.NumberValue({min:0}),numberOfResults:new me.NumberValue({min:0}),sortCriteria:new me.StringValue,f:new me.RecordValue,fExcluded:new me.RecordValue,cf:new me.RecordValue,nf:new me.RecordValue,mnf:new me.RecordValue,df:new me.RecordValue,debug:new me.BooleanValue,sf:new me.RecordValue,tab:new me.StringValue,af:new me.RecordValue};var we=h("searchParameters/restore",e=>R(e,vc));var ro=require("@coveo/bueno");function Sr(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,o=Object.getOwnPropertySymbols(e);n<o.length;n++)t.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(r[o[n]]=e[o[n]]);return r}function v(e,t,r,o){function n(a){return a instanceof r?a:new r(function(i){i(a)})}return new(r||(r=Promise))(function(a,i){function c(l){try{s(o.next(l))}catch(d){i(d)}}function u(l){try{s(o.throw(l))}catch(d){i(d)}}function s(l){l.done?a(l.value):n(l.value).then(c,u)}s((o=o.apply(e,t||[])).next())})}var G;(function(e){e.search="search",e.click="click",e.custom="custom",e.view="view",e.collect="collect"})(G||(G={}));function Kl(){return typeof window<"u"}function id(){return typeof navigator<"u"}function wn(){return typeof document<"u"}function Hl(){try{return typeof localStorage<"u"}catch{return!1}}function EP(){try{return typeof sessionStorage<"u"}catch{return!1}}function Gf(){return id()&&navigator.cookieEnabled}var TP=[G.click,G.custom,G.search,G.view],OP=(e,t)=>TP.indexOf(e)!==-1?Object.assign({language:wn()?document.documentElement.lang:"unknown",userAgent:id()?navigator.userAgent:"unknown"},t):t,Za=class e{static set(t,r,o){var n,a,i,c;o&&(a=new Date,a.setTime(a.getTime()+o)),c=window.location.hostname,c.indexOf(".")===-1?Nf(t,r,a):(i=c.split("."),n=i[i.length-2]+"."+i[i.length-1],Nf(t,r,a,n))}static get(t){for(var r=t+"=",o=document.cookie.split(";"),n=0;n<o.length;n++){var a=o[n];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 Nf(e,t,r,o){document.cookie=`${e}=${t}`+(r?`;expires=${r.toUTCString()}`:"")+(o?`;domain=${o}`:"")+";path=/;SameSite=Lax"}function qP(){return Hl()?localStorage:Gf()?new ei:EP()?sessionStorage:new Tn}var ei=class e{getItem(t){return Za.get(`${e.prefix}${t}`)}removeItem(t){Za.erase(`${e.prefix}${t}`)}setItem(t,r,o){Za.set(`${e.prefix}${t}`,r,o)}};ei.prefix="coveo_";var Gl=class{constructor(){this.cookieStorage=new ei}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)}},Tn=class{getItem(t){return null}removeItem(t){}setItem(t,r){}},Ja="__coveo.analytics.history",Yf=20,Jf=1e3*60,Xf=75,On=class{constructor(t){this.store=t||qP()}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 v(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 v(this,void 0,void 0,function*(){let t=yield this.getHistoryWithInternalTimeAsync();return this.stripEmptyQueries(this.stripInternalTime(t))})}getHistoryWithInternalTime(){try{let t=this.store.getItem(Ja);return t&&typeof t=="string"?JSON.parse(t):[]}catch{return[]}}getHistoryWithInternalTimeAsync(){return v(this,void 0,void 0,function*(){try{let t=yield this.store.getItem(Ja);return t?JSON.parse(t):[]}catch{return[]}})}setHistory(t){try{this.store.setItem(Ja,JSON.stringify(t.slice(0,Yf)))}catch{}}clear(){try{this.store.removeItem(Ja)}catch{}}getMostRecentElement(){let t=this.getHistoryWithInternalTime();return Array.isArray(t)?t.sort((o,n)=>(n.internalTime||0)-(o.internalTime||0))[0]:null}cropQueryElement(t){return t.name&&t.value&&t.name.toLowerCase()==="query"&&(t.value=t.value.slice(0,Xf)),t}isValidEntry(t){let r=this.getMostRecentElement();return r&&r.value==t.value?(t.internalTime||0)-(r.internalTime||0)>Jf:!0}stripInternalTime(t){return Array.isArray(t)?t.map(r=>{let{name:o,time:n,value:a}=r;return{name:o,time:n,value:a}}):[]}stripEmptyQuery(t){let{name:r,time:o,value:n}=t;return r&&typeof n=="string"&&r.toLowerCase()==="query"&&n.trim()===""?{name:r,time:o}:t}stripEmptyQueries(t){return t.map(r=>this.stripEmptyQuery(r))}},Zf=Object.freeze({__proto__:null,HistoryStore:On,MAX_NUMBER_OF_HISTORY_ELEMENTS:Yf,MAX_VALUE_SIZE:Xf,MIN_THRESHOLD_FOR_DUPLICATE_VALUE:Jf,STORE_KEY:Ja,default:On}),kP=(e,t)=>v(void 0,void 0,void 0,function*(){return e===G.view?(yield VP(t.contentIdValue),Object.assign({location:window.location.toString(),referrer:document.referrer,title:document.title},t)):t}),VP=e=>v(void 0,void 0,void 0,function*(){let t=new On,r={name:"PageView",value:e,time:new Date().toISOString()};yield t.addElementAsync(r)}),bc,DP=new Uint8Array(16);function NP(){if(!bc&&(bc=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!bc))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return bc(DP)}var MP=/^(?:[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 wc(e){return typeof e=="string"&&MP.test(e)}var Ee=[];for(let e=0;e<256;++e)Ee.push((e+256).toString(16).slice(1));function eg(e,t=0){return(Ee[e[t+0]]+Ee[e[t+1]]+Ee[e[t+2]]+Ee[e[t+3]]+"-"+Ee[e[t+4]]+Ee[e[t+5]]+"-"+Ee[e[t+6]]+Ee[e[t+7]]+"-"+Ee[e[t+8]]+Ee[e[t+9]]+"-"+Ee[e[t+10]]+Ee[e[t+11]]+Ee[e[t+12]]+Ee[e[t+13]]+Ee[e[t+14]]+Ee[e[t+15]]).toLowerCase()}function LP(e){if(!wc(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 QP(e){e=unescape(encodeURIComponent(e));let t=[];for(let r=0;r<e.length;++r)t.push(e.charCodeAt(r));return t}var UP="6ba7b810-9dad-11d1-80b4-00c04fd430c8",BP="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function jP(e,t,r){function o(n,a,i,c){var u;if(typeof n=="string"&&(n=QP(n)),typeof a=="string"&&(a=LP(a)),((u=a)===null||u===void 0?void 0:u.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let s=new Uint8Array(16+n.length);if(s.set(a),s.set(n,a.length),s=r(s),s[6]=s[6]&15|t,s[8]=s[8]&63|128,i){c=c||0;for(let l=0;l<16;++l)i[c+l]=s[l];return i}return eg(s)}try{o.name=e}catch{}return o.DNS=UP,o.URL=BP,o}var _P=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Mf={randomUUID:_P};function Do(e,t,r){if(Mf.randomUUID&&!t&&!e)return Mf.randomUUID();e=e||{};let o=e.random||(e.rng||NP)();if(o[6]=o[6]&15|64,o[8]=o[8]&63|128,t){r=r||0;for(let n=0;n<16;++n)t[r+n]=o[n];return t}return eg(o)}function $P(e,t,r,o){switch(e){case 0:return t&r^~t&o;case 1:return t^r^o;case 2:return t&r^t&o^r&o;case 3:return t^r^o}}function zl(e,t){return e<<t|e>>>32-t}function zP(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 c=0;c<i.length;++c)e.push(i.charCodeAt(c))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);let o=e.length/4+2,n=Math.ceil(o/16),a=new Array(n);for(let i=0;i<n;++i){let c=new Uint32Array(16);for(let u=0;u<16;++u)c[u]=e[i*64+u*4]<<24|e[i*64+u*4+1]<<16|e[i*64+u*4+2]<<8|e[i*64+u*4+3];a[i]=c}a[n-1][14]=(e.length-1)*8/Math.pow(2,32),a[n-1][14]=Math.floor(a[n-1][14]),a[n-1][15]=(e.length-1)*8&4294967295;for(let i=0;i<n;++i){let c=new Uint32Array(80);for(let m=0;m<16;++m)c[m]=a[i][m];for(let m=16;m<80;++m)c[m]=zl(c[m-3]^c[m-8]^c[m-14]^c[m-16],1);let u=r[0],s=r[1],l=r[2],d=r[3],p=r[4];for(let m=0;m<80;++m){let f=Math.floor(m/20),g=zl(u,5)+$P(f,s,l,d)+p+t[f]+c[m]>>>0;p=d,d=l,l=zl(s,30)>>>0,s=u,u=g}r[0]=r[0]+u>>>0,r[1]=r[1]+s>>>0,r[2]=r[2]+l>>>0,r[3]=r[3]+d>>>0,r[4]=r[4]+p>>>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 WP=jP("v5",80,zP),Lf=WP,tg="2.30.42",Qf=e=>`${e.protocol}//${e.hostname}${e.pathname.indexOf("/")===0?e.pathname:`/${e.pathname}`}${e.search}`,Xa={pageview:"pageview",event:"event"},Ec=class{constructor({client:t,uuidGenerator:r=Do}){this.client=t,this.uuidGenerator=r}},Yl=class extends Ec{constructor({client:t,uuidGenerator:r=Do}){super({client:t,uuidGenerator:r}),this.actionData={},this.pageViewId=r(),this.nextPageViewId=this.pageViewId,this.currentLocation=Qf(window.location),this.lastReferrer=wn()?document.referrer:"",this.addHooks()}getApi(t){switch(t){case"setAction":return this.setAction;default:return 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:wn()?document.title:"",encoding:wn()?document.characterSet:"UTF-8"},o={screenResolution:`${screen.width}x${screen.height}`,screenColor:`${screen.colorDepth}-bit`},n={language:navigator.language,userAgent:navigator.userAgent},a={time:Date.now(),eventId:this.uuidGenerator()};return Object.assign(Object.assign(Object.assign(Object.assign({},a),o),n),r)}updateLocationForNextPageView(t,r){let{pageViewId:o,referrer:n,location:a}=this.getNextValues(t,r);this.lastReferrer=n,this.pageViewId=o,this.currentLocation=a,t===Xa.pageview&&(this.nextPageViewId=this.uuidGenerator(),this.hasSentFirstPageView=!0)}getNextValues(t,r){return{pageViewId:t===Xa.pageview?this.nextPageViewId:this.pageViewId,referrer:t===Xa.pageview&&this.hasSentFirstPageView?this.currentLocation:this.lastReferrer,location:t===Xa.pageview?this.getCurrentLocationFromPayload(r):this.currentLocation}}getCurrentLocationFromPayload(t){if(t.page){let r=n=>n.replace(/^\/?(.*)$/,"/$1");return`${(n=>n.split("/").slice(0,3).join("/"))(this.currentLocation)}${r(t.page)}`}else return Qf(window.location)}},zr=class e{constructor(t,r){if(!wc(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 o=new URL(t);return r.some(n=>new RegExp(n.replace(/\\/g,"\\\\").replace(/\./g,"\\.").replace(/\*/g,".*")+"$").test(o.host))}catch{return!1}}static fromString(t){let r=t.split(".");if(r.length!==2)return null;let[o,n]=r;if(o.length!==32||isNaN(parseInt(n)))return null;let a=o.substring(0,8)+"-"+o.substring(8,12)+"-"+o.substring(12,16)+"-"+o.substring(16,20)+"-"+o.substring(20,32);return wc(a)?new e(a,Number.parseInt(n)*1e3):null}};zr.cvo_cid="cvo_cid";zr.expirationTime=120;var Jl=class extends Ec{constructor({client:t,uuidGenerator:r=Do}){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 v(this,void 0,void 0,function*(){if(!this.client.getCurrentVisitorId)throw new Error("Could not retrieve current clientId");try{let r=new URL(t),o=yield this.client.getCurrentVisitorId();return r.searchParams.set(zr.cvo_cid,new zr(o,Date.now()).toString()),r.toString()}catch{throw new Error("Invalid URL provided")}})}acceptFrom(t){this.client.setAcceptedLinkReferrers(t)}};Jl.Id="link";var pt=Object.keys;function Ic(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}var Wl=128,rg=192,Uf=224,Bf=240;function KP(e){return(e&248)===Bf?4:(e&Bf)===Uf?3:(e&Uf)===rg?2:1}function HP(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 o=Number.parseInt(e.substring(r-2,r),16);if((o&Wl)!=Wl)break;if(r-=3,(o&rg)!=Wl){t-r>=KP(o)*3&&(r=t);break}}return e.substring(0,r)}var Xl={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"},GP=pt(Xl).map(e=>Xl[e]),YP=[...GP].join("|"),JP=new RegExp(`^(${YP}$)`),XP={svcAction:"svc_action",svcActionData:"svc_action_data"},ZP=e=>pt(e).filter(t=>e[t]!==void 0).reduce((t,r)=>{let o=Xl[r]||r;return Object.assign(Object.assign({},t),{[o]:e[r]})},{}),eA=e=>JP.test(e),tA=[eA],jf={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",price:"pr",quantity:"qt",coupon:"cc",position:"ps",group:"group"},_f={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",position:"ps",price:"pr",group:"group"},De={action:"pa",list:"pal",listSource:"pls"},Tc={id:"ti",revenue:"tr",tax:"tt",shipping:"ts",coupon:"tcc",affiliation:"ta",step:"cos",option:"col"},rA=["loyaltyCardId","loyaltyTier","thirdPartyPersona","companyName","favoriteStore","storeName","userIndustry","userRole","userDepartment","businessUnit"],Zl={id:"quoteId",affiliation:"quoteAffiliation"},ed={id:"reviewId",rating:"reviewRating",comment:"reviewComment"},oA={add:De,bookmark_add:De,bookmark_remove:De,click:De,checkout:De,checkout_option:De,detail:De,impression:De,remove:De,refund:Object.assign(Object.assign({},De),Tc),purchase:Object.assign(Object.assign({},De),Tc),quickview:De,quote:Object.assign(Object.assign({},De),Zl),review:Object.assign(Object.assign({},De),ed)},nA=pt(jf).map(e=>jf[e]),aA=pt(_f).map(e=>_f[e]),iA=pt(De).map(e=>De[e]),cA=pt(Tc).map(e=>Tc[e]),sA=pt(ed).map(e=>ed[e]),uA=pt(Zl).map(e=>Zl[e]),lA=[...nA,"custom"].join("|"),dA=[...aA,"custom"].join("|"),og="(pr[0-9]+)",ng="(il[0-9]+pi[0-9]+)",mA=new RegExp(`^${og}(${lA})$`),pA=new RegExp(`^(${ng}(${dA}))|(il[0-9]+nm)$`),fA=new RegExp(`^(${iA.join("|")})$`),gA=new RegExp(`^(${cA.join("|")})$`),yA=new RegExp(`^${og}custom$`),hA=new RegExp(`^${ng}custom$`),SA=new RegExp(`^(${[...rA,...sA,...uA].join("|")})$`),CA=e=>mA.test(e),xA=e=>pA.test(e),RA=e=>fA.test(e),FA=e=>gA.test(e),PA=e=>SA.test(e),AA=[xA,CA,RA,FA,PA],vA=[yA,hA],bA={anonymizeIp:"aip"},IA={eventCategory:"ec",eventAction:"ea",eventLabel:"el",eventValue:"ev",page:"dp",visitorId:"cid",clientId:"cid",userId:"uid",currencyCode:"cu"},wA={hitType:"t",pageViewId:"pid",encoding:"de",location:"dl",referrer:"dr",screenColor:"sd",screenResolution:"sr",title:"dt",userAgent:"ua",language:"ul",eventId:"z",time:"tm"},EA=["contentId","contentIdKey","contentType","searchHub","tab","searchUid","permanentId","contentLocale","trackingId"],TA=Object.assign(Object.assign(Object.assign(Object.assign({},bA),IA),wA),EA.reduce((e,t)=>Object.assign(Object.assign({},e),{[t]:t}),{})),td=Object.assign(Object.assign({},TA),XP),OA=e=>{let t=!!e.action&&oA[e.action]||{};return pt(e).reduce((r,o)=>{let n=t[o]||td[o]||o;return Object.assign(Object.assign({},r),{[n]:e[o]})},{})},qA=pt(td).map(e=>td[e]),kA=e=>qA.indexOf(e)!==-1,VA=e=>e==="custom",DA=e=>[...AA,...tA,kA,VA].some(t=>t(e)),NA=e=>pt(e).reduce((t,r)=>{let o=MA(r);return o?Object.assign(Object.assign({},t),LA(o,e[r])):Object.assign(Object.assign({},t),{[r]:e[r]})},{}),MA=e=>{let t;return[...vA].every(r=>{var o;return t=(o=r.exec(e))===null||o===void 0?void 0:o[1],!t}),t},LA=(e,t)=>pt(t).reduce((r,o)=>Object.assign(Object.assign({},r),{[`${e}${o}`]:t[o]}),{}),rd=class{constructor(t){this.opts=t}sendEvent(t,r){return v(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:o,preprocessRequest:n}=this.opts,a=yield this.getQueryParamsForEventType(t),{url:i,payload:c}=yield this.preProcessRequestAsPotentialJSONString(`${o}/analytics/${t}?${a}`,r,n),u=this.encodeForEventType(t,c),s=new Blob([u],{type:"application/x-www-form-urlencoded"});navigator.sendBeacon(i,s)})}isAvailable(){return"sendBeacon"in navigator}deleteHttpCookieVisitorId(){return Promise.resolve()}preProcessRequestAsPotentialJSONString(t,r,o){return v(this,void 0,void 0,function*(){let n=t,a=r;if(o){let i=yield o({url:t,body:JSON.stringify(r)},"analyticsBeacon"),{url:c,body:u}=i;n=c||t;try{a=JSON.parse(u)}catch(s){console.error("Unable to process the request body as a JSON string",s)}}return{payload:a,url:n}})}encodeForEventType(t,r){return this.isEventTypeLegacy(t)?this.encodeEventToJson(t,r):this.encodeEventToJson(t,r,this.opts.token)}getQueryParamsForEventType(t){return v(this,void 0,void 0,function*(){let{token:r,visitorIdProvider:o}=this.opts,n=yield o.getCurrentVisitorId();return[r&&this.isEventTypeLegacy(t)?`access_token=${r}`:"",n?`visitorId=${n}`:"","discardVisitInfo=true"].filter(a=>!!a).join("&")})}isEventTypeLegacy(t){return[G.click,G.custom,G.search,G.view].indexOf(t)!==-1}encodeEventToJson(t,r,o){let n=`${t}Event=${encodeURIComponent(JSON.stringify(r))}`;return o&&(n=`access_token=${encodeURIComponent(o)}&${n}`),n}},od=class{sendEvent(t,r){return v(this,void 0,void 0,function*(){return Promise.resolve()})}deleteHttpCookieVisitorId(){return v(this,void 0,void 0,function*(){return Promise.resolve()})}},$f=globalThis.fetch,Oc=class{constructor(t){this.opts=t}sendEvent(t,r){return v(this,void 0,void 0,function*(){let{baseUrl:o,visitorIdProvider:n,preprocessRequest:a}=this.opts,i=this.shouldAppendVisitorId(t)?yield this.getVisitorIdParam():"",c={url:`${o}/analytics/${t}${i}`,credentials:"include",mode:"cors",headers:this.getHeaders(),method:"POST",body:JSON.stringify(r)},u=Object.assign(Object.assign({},c),a?yield a(c,"analyticsFetch"):{}),{url:s}=u,l=Sr(u,["url"]),d;try{d=yield $f(s,l)}catch(p){console.error("An error has occured when sending the event.",p);return}if(d.ok){let p=yield d.json();return p.visitorId&&n.setCurrentVisitorId(p.visitorId),p}else{try{d.json()}catch{}throw console.error(`An error has occured when sending the "${t}" event.`,d,r),new Error(`An error has occurred when sending the "${t}" event. Check the console logs for more details.`)}})}deleteHttpCookieVisitorId(){return v(this,void 0,void 0,function*(){let{baseUrl:t}=this.opts,r=`${t}/analytics/visit`;yield $f(r,{headers:this.getHeaders(),method:"DELETE"})})}shouldAppendVisitorId(t){return[G.click,G.custom,G.search,G.view].indexOf(t)!==-1}getVisitorIdParam(){return v(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"})}},nd=class{constructor(t,r){Hl()&&Gf()?this.storage=new Gl:Hl()?this.storage=localStorage:(console.warn("BrowserRuntime detected no valid storage available.",this),this.storage=new Tn),this.client=new Oc(t),this.beaconClient=new rd(t),window.addEventListener("beforeunload",()=>{let o=r();for(let{eventType:n,payload:a}of o)this.beaconClient.sendEvent(n,a)})}getClientDependingOnEventType(t){return t==="click"&&this.beaconClient.isAvailable()?this.beaconClient:this.client}},ad=class{constructor(t,r){this.storage=r||new Tn,this.client=new Oc(t)}getClientDependingOnEventType(t){return this.client}},qc=class{constructor(){this.storage=new Tn,this.client=new od}getClientDependingOnEventType(t){return this.client}},QA="xx",UA=e=>e?.startsWith(QA)||!1,BA=`
|
|
19
|
+
If you are trying to access the inner state... Don't`),Reflect.get(t,r,o)}});var vp=require("@coveo/bueno");function ve(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 wR=typeof Symbol=="function"&&Symbol.observable||"@@observable",Wm=wR,Xu=()=>Math.random().toString(36).substring(7).split("").join("."),ER={INIT:`@@redux/INIT${Xu()}`,REPLACE:`@@redux/REPLACE${Xu()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Xu()}`},Ui=ER;function Lt(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 Zu(e,t,r){if(typeof e!="function")throw new Error(ve(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(ve(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(ve(1));return r(Zu)(e,t)}let o=e,n=t,a=new Map,i=a,c=0,u=!1;function s(){i===a&&(i=new Map,a.forEach((C,x)=>{i.set(x,C)}))}function l(){if(u)throw new Error(ve(3));return n}function d(C){if(typeof C!="function")throw new Error(ve(4));if(u)throw new Error(ve(5));let x=!0;s();let y=c++;return i.set(y,C),function(){if(x){if(u)throw new Error(ve(6));x=!1,s(),i.delete(y),a=null}}}function p(C){if(!Lt(C))throw new Error(ve(7));if(typeof C.type>"u")throw new Error(ve(8));if(typeof C.type!="string")throw new Error(ve(17));if(u)throw new Error(ve(9));try{u=!0,n=o(n,C)}finally{u=!1}return(a=i).forEach(y=>{y()}),C}function m(C){if(typeof C!="function")throw new Error(ve(10));o=C,p({type:Ui.REPLACE})}function f(){let C=d;return{subscribe(x){if(typeof x!="object"||x===null)throw new Error(ve(11));function y(){let P=x;P.next&&P.next(l())}return y(),{unsubscribe:C(y)}},[Wm](){return this}}}return p({type:Ui.INIT}),{dispatch:p,subscribe:d,getState:l,replaceReducer:m,[Wm]:f}}function TR(e){Object.keys(e).forEach(t=>{let r=e[t];if(typeof r(void 0,{type:Ui.INIT})>"u")throw new Error(ve(12));if(typeof r(void 0,{type:Ui.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(ve(13))})}function Yo(e){let t=Object.keys(e),r={};for(let i=0;i<t.length;i++){let c=t[i];typeof e[c]=="function"&&(r[c]=e[c])}let o=Object.keys(r),n,a;try{TR(r)}catch(i){a=i}return function(c={},u){if(a)throw a;let s=!1,l={};for(let d=0;d<o.length;d++){let p=o[d],m=r[p],f=c[p],g=m(f,u);if(typeof g>"u"){let C=u&&u.type;throw new Error(ve(14))}l[p]=g,s=s||g!==f}return s=s||o.length!==Object.keys(c).length,s?l:c}}function Jo(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...o)=>t(r(...o)))}function Km(...e){return t=>(r,o)=>{let n=t(r,o),a=()=>{throw new Error(ve(15))},i={getState:n.getState,dispatch:(u,...s)=>a(u,...s)},c=e.map(u=>u(i));return a=Jo(...c)(n.dispatch),{...n,dispatch:a}}}function Bi(e){return Lt(e)&&"type"in e&&typeof e.type=="string"}var ul=Symbol.for("immer-nothing"),ba=Symbol.for("immer-draftable"),Ke=Symbol.for("immer-state");function be(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var xo=Object.getPrototypeOf;function ot(e){return!!e&&!!e[Ke]}function He(e){return e?Xm(e)||Array.isArray(e)||!!e[ba]||!!e.constructor?.[ba]||Oa(e)||qa(e):!1}var OR=Object.prototype.constructor.toString();function Xm(e){if(!e||typeof e!="object")return!1;let t=xo(e);if(t===null)return!0;let r=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return r===Object?!0:typeof r=="function"&&Function.toString.call(r)===OR}function ll(e){return ot(e)||be(15,e),e[Ke].base_}function Ia(e,t){Ro(e)===0?Reflect.ownKeys(e).forEach(r=>{t(r,e[r],e)}):e.forEach((r,o)=>t(o,r,e))}function Ro(e){let t=e[Ke];return t?t.type_:Array.isArray(e)?1:Oa(e)?2:qa(e)?3:0}function wa(e,t){return Ro(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function el(e,t){return Ro(e)===2?e.get(t):e[t]}function Zm(e,t,r){let o=Ro(e);o===2?e.set(t,r):o===3?e.add(r):e[t]=r}function qR(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Oa(e){return e instanceof Map}function qa(e){return e instanceof Set}function Co(e){return e.copy_||e.base_}function ol(e,t){if(Oa(e))return new Map(e);if(qa(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);let r=Xm(e);if(t===!0||t==="class_only"&&!r){let o=Object.getOwnPropertyDescriptors(e);delete o[Ke];let n=Reflect.ownKeys(o);for(let a=0;a<n.length;a++){let i=n[a],c=o[i];c.writable===!1&&(c.writable=!0,c.configurable=!0),(c.get||c.set)&&(o[i]={configurable:!0,writable:!0,enumerable:c.enumerable,value:e[i]})}return Object.create(xo(e),o)}else{let o=xo(e);if(o!==null&&r)return{...e};let n=Object.create(o);return Object.assign(n,e)}}function $i(e,t=!1){return zi(e)||ot(e)||!He(e)||(Ro(e)>1&&(e.set=e.add=e.clear=e.delete=kR),Object.freeze(e),t&&Object.entries(e).forEach(([r,o])=>$i(o,!0))),e}function kR(){be(2)}function zi(e){return Object.isFrozen(e)}var nl={};function Fo(e){let t=nl[e];return t||be(0,e),t}function VR(e,t){nl[e]||(nl[e]=t)}var Ea;function ep(){return Ea}function DR(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Hm(e,t){t&&(Fo("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function al(e){il(e),e.drafts_.forEach(NR),e.drafts_=null}function il(e){e===Ea&&(Ea=e.parent_)}function Gm(e){return Ea=DR(Ea,e)}function NR(e){let t=e[Ke];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Ym(e,t){t.unfinalizedDrafts_=t.drafts_.length;let r=t.drafts_[0];return e!==void 0&&e!==r?(r[Ke].modified_&&(al(t),be(4)),He(e)&&(e=ji(t,e),t.parent_||_i(t,e)),t.patches_&&Fo("Patches").generateReplacementPatches_(r[Ke].base_,e,t.patches_,t.inversePatches_)):e=ji(t,r,[]),al(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==ul?e:void 0}function ji(e,t,r){if(zi(t))return t;let o=t[Ke];if(!o)return Ia(t,(n,a)=>Jm(e,o,t,n,a,r)),t;if(o.scope_!==e)return t;if(!o.modified_)return _i(e,o.base_,!0),o.base_;if(!o.finalized_){o.finalized_=!0,o.scope_.unfinalizedDrafts_--;let n=o.copy_,a=n,i=!1;o.type_===3&&(a=new Set(n),n.clear(),i=!0),Ia(a,(c,u)=>Jm(e,o,n,c,u,r,i)),_i(e,n,!1),r&&e.patches_&&Fo("Patches").generatePatches_(o,r,e.patches_,e.inversePatches_)}return o.copy_}function Jm(e,t,r,o,n,a,i){if(ot(n)){let c=a&&t&&t.type_!==3&&!wa(t.assigned_,o)?a.concat(o):void 0,u=ji(e,n,c);if(Zm(r,o,u),ot(u))e.canAutoFreeze_=!1;else return}else i&&r.add(n);if(He(n)&&!zi(n)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;ji(e,n),(!t||!t.scope_.parent_)&&typeof o!="symbol"&&Object.prototype.propertyIsEnumerable.call(r,o)&&_i(e,n)}}function _i(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&$i(t,r)}function MR(e,t){let r=Array.isArray(e),o={type_:r?1:0,scope_:t?t.scope_:ep(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1},n=o,a=dl;r&&(n=[o],a=Ta);let{revoke:i,proxy:c}=Proxy.revocable(n,a);return o.draft_=c,o.revoke_=i,c}var dl={get(e,t){if(t===Ke)return e;let r=Co(e);if(!wa(r,t))return LR(e,r,t);let o=r[t];return e.finalized_||!He(o)?o:o===tl(e.base_,t)?(rl(e),e.copy_[t]=sl(o,e)):o},has(e,t){return t in Co(e)},ownKeys(e){return Reflect.ownKeys(Co(e))},set(e,t,r){let o=tp(Co(e),t);if(o?.set)return o.set.call(e.draft_,r),!0;if(!e.modified_){let n=tl(Co(e),t),a=n?.[Ke];if(a&&a.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(qR(r,n)&&(r!==void 0||wa(e.base_,t)))return!0;rl(e),cl(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_[t]=!0),!0},deleteProperty(e,t){return tl(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,rl(e),cl(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let r=Co(e),o=Reflect.getOwnPropertyDescriptor(r,t);return o&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:o.enumerable,value:r[t]}},defineProperty(){be(11)},getPrototypeOf(e){return xo(e.base_)},setPrototypeOf(){be(12)}},Ta={};Ia(dl,(e,t)=>{Ta[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});Ta.deleteProperty=function(e,t){return Ta.set.call(this,e,t,void 0)};Ta.set=function(e,t,r){return dl.set.call(this,e[0],t,r,e[0])};function tl(e,t){let r=e[Ke];return(r?Co(r):e)[t]}function LR(e,t,r){let o=tp(t,r);return o?"value"in o?o.value:o.get?.call(e.draft_):void 0}function tp(e,t){if(!(t in e))return;let r=xo(e);for(;r;){let o=Object.getOwnPropertyDescriptor(r,t);if(o)return o;r=xo(r)}}function cl(e){e.modified_||(e.modified_=!0,e.parent_&&cl(e.parent_))}function rl(e){e.copy_||(e.copy_=ol(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var QR=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,r,o)=>{if(typeof t=="function"&&typeof r!="function"){let a=r;r=t;let i=this;return function(u=a,...s){return i.produce(u,l=>r.call(this,l,...s))}}typeof r!="function"&&be(6),o!==void 0&&typeof o!="function"&&be(7);let n;if(He(t)){let a=Gm(this),i=sl(t,void 0),c=!0;try{n=r(i),c=!1}finally{c?al(a):il(a)}return Hm(a,o),Ym(n,a)}else if(!t||typeof t!="object"){if(n=r(t),n===void 0&&(n=t),n===ul&&(n=void 0),this.autoFreeze_&&$i(n,!0),o){let a=[],i=[];Fo("Patches").generateReplacementPatches_(t,n,a,i),o(a,i)}return n}else be(1,t)},this.produceWithPatches=(t,r)=>{if(typeof t=="function")return(i,...c)=>this.produceWithPatches(i,u=>t(u,...c));let o,n;return[this.produce(t,r,(i,c)=>{o=i,n=c}),o,n]},typeof e?.autoFreeze=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof e?.useStrictShallowCopy=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){He(e)||be(8),ot(e)&&(e=rp(e));let t=Gm(this),r=sl(e,void 0);return r[Ke].isManual_=!0,il(t),r}finishDraft(e,t){let r=e&&e[Ke];(!r||!r.isManual_)&&be(9);let{scope_:o}=r;return Hm(o,t),Ym(void 0,o)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){let n=t[r];if(n.path.length===0&&n.op==="replace"){e=n.value;break}}r>-1&&(t=t.slice(r+1));let o=Fo("Patches").applyPatches_;return ot(e)?o(e,t):this.produce(e,n=>o(n,t))}};function sl(e,t){let r=Oa(e)?Fo("MapSet").proxyMap_(e,t):qa(e)?Fo("MapSet").proxySet_(e,t):MR(e,t);return(t?t.scope_:ep()).drafts_.push(r),r}function rp(e){return ot(e)||be(10,e),op(e)}function op(e){if(!He(e)||zi(e))return e;let t=e[Ke],r;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=ol(e,t.scope_.immer_.useStrictShallowCopy_)}else r=ol(e,!0);return Ia(r,(o,n)=>{Zm(r,o,op(n))}),t&&(t.finalized_=!1),r}function np(){let t="replace",r="add",o="remove";function n(p,m,f,g){switch(p.type_){case 0:case 2:return i(p,m,f,g);case 1:return a(p,m,f,g);case 3:return c(p,m,f,g)}}function a(p,m,f,g){let{base_:C,assigned_:x}=p,y=p.copy_;y.length<C.length&&([C,y]=[y,C],[f,g]=[g,f]);for(let S=0;S<C.length;S++)if(x[S]&&y[S]!==C[S]){let P=m.concat([S]);f.push({op:t,path:P,value:d(y[S])}),g.push({op:t,path:P,value:d(C[S])})}for(let S=C.length;S<y.length;S++){let P=m.concat([S]);f.push({op:r,path:P,value:d(y[S])})}for(let S=y.length-1;C.length<=S;--S){let P=m.concat([S]);g.push({op:o,path:P})}}function i(p,m,f,g){let{base_:C,copy_:x}=p;Ia(p.assigned_,(y,S)=>{let P=el(C,y),O=el(x,y),A=S?wa(C,y)?t:r:o;if(P===O&&A===t)return;let F=m.concat(y);f.push(A===o?{op:A,path:F}:{op:A,path:F,value:O}),g.push(A===r?{op:o,path:F}:A===o?{op:r,path:F,value:d(P)}:{op:t,path:F,value:d(P)})})}function c(p,m,f,g){let{base_:C,copy_:x}=p,y=0;C.forEach(S=>{if(!x.has(S)){let P=m.concat([y]);f.push({op:o,path:P,value:S}),g.unshift({op:r,path:P,value:S})}y++}),y=0,x.forEach(S=>{if(!C.has(S)){let P=m.concat([y]);f.push({op:r,path:P,value:S}),g.unshift({op:o,path:P,value:S})}y++})}function u(p,m,f,g){f.push({op:t,path:[],value:m===ul?void 0:m}),g.push({op:t,path:[],value:p})}function s(p,m){return m.forEach(f=>{let{path:g,op:C}=f,x=p;for(let O=0;O<g.length-1;O++){let A=Ro(x),F=g[O];typeof F!="string"&&typeof F!="number"&&(F=""+F),(A===0||A===1)&&(F==="__proto__"||F==="constructor")&&be(19),typeof x=="function"&&F==="prototype"&&be(19),x=el(x,F),typeof x!="object"&&be(18,g.join("/"))}let y=Ro(x),S=l(f.value),P=g[g.length-1];switch(C){case t:switch(y){case 2:return x.set(P,S);case 3:be(16);default:return x[P]=S}case r:switch(y){case 1:return P==="-"?x.push(S):x.splice(P,0,S);case 2:return x.set(P,S);case 3:return x.add(S);default:return x[P]=S}case o:switch(y){case 1:return x.splice(P,1);case 2:return x.delete(P);case 3:return x.delete(f.value);default:return delete x[P]}default:be(17,C)}}),p}function l(p){if(!He(p))return p;if(Array.isArray(p))return p.map(l);if(Oa(p))return new Map(Array.from(p.entries()).map(([f,g])=>[f,l(g)]));if(qa(p))return new Set(Array.from(p).map(l));let m=Object.create(xo(p));for(let f in p)m[f]=l(p[f]);return wa(p,ba)&&(m[ba]=p[ba]),m}function d(p){return ot(p)?l(p):p}VR("Patches",{applyPatches_:s,generatePatches_:n,generateReplacementPatches_:u})}var nt=new QR,mr=nt.produce,Wi=nt.produceWithPatches.bind(nt),YO=nt.setAutoFreeze.bind(nt),JO=nt.setUseStrictShallowCopy.bind(nt),ml=nt.applyPatches.bind(nt),XO=nt.createDraft.bind(nt),ZO=nt.finishDraft.bind(nt);function UR(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function BR(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function jR(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(r=>typeof r=="function")){let r=e.map(o=>typeof o=="function"?`function ${o.name||"unnamed"}()`:typeof o).join(", ");throw new TypeError(`${t}[${r}]`)}}var ap=e=>Array.isArray(e)?e:[e];function _R(e){let t=Array.isArray(e[0])?e[0]:e;return jR(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function $R(e,t){let r=[],{length:o}=e;for(let n=0;n<o;n++)r.push(e[n].apply(null,t));return r}var rq=Symbol();var oq=Object.getPrototypeOf({});var zR=class{constructor(e){this.value=e}deref(){return this.value}},WR=typeof WeakRef<"u"?WeakRef:zR,KR=0,ip=1;function Ki(){return{s:KR,v:void 0,o:null,p:null}}function Xo(e,t={}){let r=Ki(),{resultEqualityCheck:o}=t,n,a=0;function i(){let c=r,{length:u}=arguments;for(let d=0,p=u;d<p;d++){let m=arguments[d];if(typeof m=="function"||typeof m=="object"&&m!==null){let f=c.o;f===null&&(c.o=f=new WeakMap);let g=f.get(m);g===void 0?(c=Ki(),f.set(m,c)):c=g}else{let f=c.p;f===null&&(c.p=f=new Map);let g=f.get(m);g===void 0?(c=Ki(),f.set(m,c)):c=g}}let s=c,l;if(c.s===ip)l=c.v;else if(l=e.apply(null,arguments),a++,o){let d=n?.deref?.()??n;d!=null&&o(d,l)&&(l=d,a!==0&&a--),n=typeof l=="object"&&l!==null||typeof l=="function"?new WR(l):l}return s.s=ip,s.v=l,l}return i.clearCache=()=>{r=Ki(),i.resetResultsCount()},i.resultsCount=()=>a,i.resetResultsCount=()=>{a=0},i}function cp(e,...t){let r=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,o=(...n)=>{let a=0,i=0,c,u={},s=n.pop();typeof s=="object"&&(u=s,s=n.pop()),UR(s,`createSelector expects an output function after the inputs, but received: [${typeof s}]`);let l={...r,...u},{memoize:d,memoizeOptions:p=[],argsMemoize:m=Xo,argsMemoizeOptions:f=[],devModeChecks:g={}}=l,C=ap(p),x=ap(f),y=_R(n),S=d(function(){return a++,s.apply(null,arguments)},...C),P=!0,O=m(function(){i++;let F=$R(y,arguments);return c=S.apply(null,F),c},...x);return Object.assign(O,{resultFunc:s,memoizedResultFunc:S,dependencies:y,dependencyRecomputations:()=>i,resetDependencyRecomputations:()=>{i=0},lastResult:()=>c,recomputations:()=>a,resetRecomputations:()=>{a=0},memoize:d,argsMemoize:m})};return Object.assign(o,{withTypes:()=>o}),o}var N=cp(Xo),HR=Object.assign((e,t=N)=>{BR(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);let r=Object.keys(e),o=r.map(a=>e[a]);return t(o,(...a)=>a.reduce((i,c,u)=>(i[r[u]]=c,i),{}))},{withTypes:()=>HR});function sp(e){return({dispatch:r,getState:o})=>n=>a=>typeof a=="function"?a(r,o,e):n(a)}var up=sp(),lp=sp;var GR=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Jo:Jo.apply(null,arguments)},pq=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}},YR=e=>e&&typeof e.match=="function";function h(e,t){function r(...o){if(t){let n=t(...o);if(!n)throw new Error(At(0));return{type:e,payload:n.payload,..."meta"in n&&{meta:n.meta},..."error"in n&&{error:n.error}}}return{type:e,payload:o[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=o=>Bi(o)&&o.type===e,r}var gp=class ka extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,ka.prototype)}static get[Symbol.species](){return ka}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new ka(...t[0].concat(this)):new ka(...t.concat(this))}};function dp(e){return He(e)?mr(e,()=>{}):e}function mp(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function JR(e){return typeof e=="boolean"}var XR=()=>function(t){let{thunk:r=!0,immutableCheck:o=!0,serializableCheck:n=!0,actionCreatorCheck:a=!0}=t??{},i=new gp;return r&&(JR(r)?i.push(up):i.push(lp(r.extraArgument))),i},Tr="RTK_autoBatch",en=()=>e=>({payload:e,meta:{[Tr]:!0}}),pp=e=>t=>{setTimeout(t,e)},ZR=(e={type:"raf"})=>t=>(...r)=>{let o=t(...r),n=!0,a=!1,i=!1,c=new Set,u=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:pp(10):e.type==="callback"?e.queueNotification:pp(e.timeout),s=()=>{i=!1,a&&(a=!1,c.forEach(l=>l()))};return Object.assign({},o,{subscribe(l){let d=()=>n&&l(),p=o.subscribe(d);return c.add(l),()=>{p(),c.delete(l)}},dispatch(l){try{return n=!l?.meta?.[Tr],a=!n,a&&(i||(i=!0,u(s))),o.dispatch(l)}finally{n=!0}}})},eF=e=>function(r){let{autoBatch:o=!0}=r??{},n=new gp(e);return o&&n.push(ZR(typeof o=="object"?o:void 0)),n};function yp(e){let t=XR(),{reducer:r=void 0,middleware:o,devTools:n=!0,preloadedState:a=void 0,enhancers:i=void 0}=e||{},c;if(typeof r=="function")c=r;else if(Lt(r))c=Yo(r);else throw new Error(At(1));let u;typeof o=="function"?u=o(t):u=t();let s=Jo;n&&(s=GR({trace:!1,...typeof n=="object"&&n}));let l=Km(...u),d=eF(l),p=typeof i=="function"?i(d):d(),m=s(...p);return Zu(c,a,m)}function hp(e){let t={},r=[],o,n={addCase(a,i){let c=typeof a=="string"?a:a.type;if(!c)throw new Error(At(28));if(c in t)throw new Error(At(29));return t[c]=i,n},addMatcher(a,i){return r.push({matcher:a,reducer:i}),n},addDefaultCase(a){return o=a,n}};return e(n),[t,r,o]}function tF(e){return typeof e=="function"}function B(e,t){let[r,o,n]=hp(t),a;if(tF(e))a=()=>dp(e());else{let c=dp(e);a=()=>c}function i(c=a(),u){let s=[r[u.type],...o.filter(({matcher:l})=>l(u)).map(({reducer:l})=>l)];return s.filter(l=>!!l).length===0&&(s=[n]),s.reduce((l,d)=>{if(d)if(ot(l)){let m=d(l,u);return m===void 0?l:m}else{if(He(l))return mr(l,p=>d(p,u));{let p=d(l,u);if(p===void 0){if(l===null)return l;throw Error("A case reducer on a non-draftable value must not return undefined")}return p}}return l},c)}return i.getInitialState=a,i}var Sp=(e,t)=>YR(e)?e.match(t):e(t);function Qt(...e){return t=>e.some(r=>Sp(r,t))}function Zo(...e){return t=>e.every(r=>Sp(r,t))}function Gi(e,t){if(!e||!e.meta)return!1;let r=typeof e.meta.requestId=="string",o=t.indexOf(e.meta.requestStatus)>-1;return r&&o}function Va(e){return typeof e[0]=="function"&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function Yi(...e){return e.length===0?t=>Gi(t,["pending"]):Va(e)?Qt(...e.map(t=>t.pending)):Yi()(e[0])}function Po(...e){return e.length===0?t=>Gi(t,["rejected"]):Va(e)?Qt(...e.map(t=>t.rejected)):Po()(e[0])}function Da(...e){let t=r=>r&&r.meta&&r.meta.rejectedWithValue;return e.length===0?Zo(Po(...e),t):Va(e)?Zo(Po(...e),t):Da()(e[0])}function pr(...e){return e.length===0?t=>Gi(t,["fulfilled"]):Va(e)?Qt(...e.map(t=>t.fulfilled)):pr()(e[0])}function Ji(...e){return e.length===0?t=>Gi(t,["pending","fulfilled","rejected"]):Va(e)?Qt(...e.flatMap(t=>[t.pending,t.rejected,t.fulfilled])):Ji()(e[0])}var rF="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Xi=(e=21)=>{let t="",r=e;for(;r--;)t+=rF[Math.random()*64|0];return t},oF=["name","message","stack","code"],pl=class{constructor(e,t){Te(this,"_type");this.payload=e,this.meta=t}},fp=class{constructor(e,t){Te(this,"_type");this.payload=e,this.meta=t}},nF=e=>{if(typeof e=="object"&&e!==null){let t={};for(let r of oF)typeof e[r]=="string"&&(t[r]=e[r]);return t}return{message:String(e)}},j=(()=>{function e(t,r,o){let n=h(t+"/fulfilled",(u,s,l,d)=>({payload:u,meta:{...d||{},arg:l,requestId:s,requestStatus:"fulfilled"}})),a=h(t+"/pending",(u,s,l)=>({payload:void 0,meta:{...l||{},arg:s,requestId:u,requestStatus:"pending"}})),i=h(t+"/rejected",(u,s,l,d,p)=>({payload:d,error:(o&&o.serializeError||nF)(u||"Rejected"),meta:{...p||{},arg:l,requestId:s,rejectedWithValue:!!d,requestStatus:"rejected",aborted:u?.name==="AbortError",condition:u?.name==="ConditionError"}}));function c(u){return(s,l,d)=>{let p=o?.idGenerator?o.idGenerator(u):Xi(),m=new AbortController,f,g;function C(y){g=y,m.abort()}let x=async function(){let y;try{let P=o?.condition?.(u,{getState:l,extra:d});if(iF(P)&&(P=await P),P===!1||m.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let O=new Promise((A,F)=>{f=()=>{F({name:"AbortError",message:g||"Aborted"})},m.signal.addEventListener("abort",f)});s(a(p,u,o?.getPendingMeta?.({requestId:p,arg:u},{getState:l,extra:d}))),y=await Promise.race([O,Promise.resolve(r(u,{dispatch:s,getState:l,extra:d,requestId:p,signal:m.signal,abort:C,rejectWithValue:(A,F)=>new pl(A,F),fulfillWithValue:(A,F)=>new fp(A,F)})).then(A=>{if(A instanceof pl)throw A;return A instanceof fp?n(A.payload,p,u,A.meta):n(A,p,u)})])}catch(P){y=P instanceof pl?i(null,p,u,P.payload,P.meta):i(P,p,u)}finally{f&&m.signal.removeEventListener("abort",f)}return o&&!o.dispatchConditionRejection&&i.match(y)&&y.meta.condition||s(y),y}();return Object.assign(x,{abort:C,requestId:p,arg:u,unwrap(){return x.then(aF)}})}}return Object.assign(c,{pending:a,rejected:i,fulfilled:n,settled:Qt(i,n),typePrefix:t})}return e.withTypes=()=>e,e})();function aF(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function iF(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var Cp=Symbol.for("rtk-slice-createasyncthunk"),Sq={[Cp]:j};function cF(e,t){return`${e}/${t}`}function sF({creators:e}={}){let t=e?.asyncThunk?.[Cp];return function(o){let{name:n,reducerPath:a=n}=o;if(!n)throw new Error(At(11));typeof process<"u";let i=(typeof o.reducers=="function"?o.reducers(lF()):o.reducers)||{},c=Object.keys(i),u={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},s={addCase(y,S){let P=typeof y=="string"?y:y.type;if(!P)throw new Error(At(12));if(P in u.sliceCaseReducersByType)throw new Error(At(13));return u.sliceCaseReducersByType[P]=S,s},addMatcher(y,S){return u.sliceMatchers.push({matcher:y,reducer:S}),s},exposeAction(y,S){return u.actionCreators[y]=S,s},exposeCaseReducer(y,S){return u.sliceCaseReducersByName[y]=S,s}};c.forEach(y=>{let S=i[y],P={reducerName:y,type:cF(n,y),createNotation:typeof o.reducers=="function"};mF(S)?fF(P,S,s,t):dF(P,S,s)});function l(){let[y={},S=[],P=void 0]=typeof o.extraReducers=="function"?hp(o.extraReducers):[o.extraReducers],O={...y,...u.sliceCaseReducersByType};return B(o.initialState,A=>{for(let F in O)A.addCase(F,O[F]);for(let F of u.sliceMatchers)A.addMatcher(F.matcher,F.reducer);for(let F of S)A.addMatcher(F.matcher,F.reducer);P&&A.addDefaultCase(P)})}let d=y=>y,p=new Map,m;function f(y,S){return m||(m=l()),m(y,S)}function g(){return m||(m=l()),m.getInitialState()}function C(y,S=!1){function P(A){let F=A[y];return typeof F>"u"&&S&&(F=g()),F}function O(A=d){let F=mp(p,S,()=>new WeakMap);return mp(F,A,()=>{let w={};for(let[b,V]of Object.entries(o.selectors??{}))w[b]=uF(V,A,g,S);return w})}return{reducerPath:y,getSelectors:O,get selectors(){return O(P)},selectSlice:P}}let x={name:n,reducer:f,actions:u.actionCreators,caseReducers:u.sliceCaseReducersByName,getInitialState:g,...C(a),injectInto(y,{reducerPath:S,...P}={}){let O=S??a;return y.inject({reducerPath:O,reducer:f},P),{...x,...C(O,!0)}}};return x}}function uF(e,t,r,o){function n(a,...i){let c=t(a);return typeof c>"u"&&o&&(c=r()),e(c,...i)}return n.unwrapped=e,n}var Ao=sF();function lF(){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 dF({type:e,reducerName:t,createNotation:r},o,n){let a,i;if("reducer"in o){if(r&&!pF(o))throw new Error(At(17));a=o.reducer,i=o.prepare}else a=o;n.addCase(e,a).exposeCaseReducer(t,a).exposeAction(t,i?h(e,i):h(e))}function mF(e){return e._reducerDefinitionType==="asyncThunk"}function pF(e){return e._reducerDefinitionType==="reducerWithPrepare"}function fF({type:e,reducerName:t},r,o,n){if(!n)throw new Error(At(18));let{payloadCreator:a,fulfilled:i,pending:c,rejected:u,settled:s,options:l}=r,d=n(e,a,l);o.exposeAction(t,d),i&&o.addCase(d.fulfilled,i),c&&o.addCase(d.pending,c),u&&o.addCase(d.rejected,u),s&&o.addMatcher(d.settled,s),o.exposeCaseReducer(t,{fulfilled:i||Hi,pending:c||Hi,rejected:u||Hi,settled:s||Hi})}function Hi(){}var xp="listener",Rp="completed",Fp="cancelled",Cq=`task-${Fp}`,xq=`task-${Rp}`,Rq=`${xp}-${Fp}`,Fq=`${xp}-${Rp}`;var{assign:Pp}=Object;var fl="listenerMiddleware";var gF=Pp(h(`${fl}/add`),{withTypes:()=>gF}),Pq=h(`${fl}/removeAll`),yF=Pp(h(`${fl}/remove`),{withTypes:()=>yF});var Aq=Symbol.for("rtk-state-proxy-original");function At(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. `}var Or=N(e=>e.commercePagination?.principal.perPage||0,e=>e),Zi=N((e,t)=>e.commercePagination?.recommendations[t]?.perPage||0,e=>e),qr=N(e=>e.commercePagination?.principal.totalEntries||0,e=>e),ec=N((e,t)=>e.commercePagination?.recommendations[t]?.totalEntries||0,e=>e),tc=N(e=>e.commercePagination?.principal.page||0,e=>e),Ap=N((e,t)=>e.commercePagination?.recommendations[t]?.page||0,e=>e);var Dq=N(e=>e[Q].productListing.responseId,e=>e),Na=N(e=>e.productListing.responseId,e=>e),bp=N(e=>e.productListing.requestId,e=>e),Ma=N(e=>e.productListing?.products.length||0,e=>e),Ip=N(e=>({total:qr(e),current:Ma(e)}),({current:e,total:t})=>e<t),wp=N(e=>e.productListing?.isLoading,e=>(0,vp.isNullOrUndefined)(e)?!1:e),Ep=N(e=>e.productListing?.error,e=>e??null);var hl=require("@coveo/bueno");function gl(e,t,r){if(e===void 0)return{};let o=t(e);return o!==r?{q:o}:{}}function yl(e,t,r){if(e===void 0)return{};let o=t(e);return o!==r?{sortCriteria:o}:{}}function Ut(e,t,r,o){if(e===void 0)return{};let n=Object.entries(e).filter(([a])=>t(a)).map(([a,{request:i}])=>{let c=r(i);return c.length?{[a]:c}:{}}).reduce((a,i)=>({...a,...i}),{});return Object.keys(n).length?{[o]:n}:{}}function Bt(e){let{activeValue:t,ancestryMap:r}=SF(e);return t?CF(t,r):[]}function SF(e){let t=[...e],r=new Map;for(;t.length>0;){let o=t.shift();if(o.state==="selected")return{activeValue:o,ancestryMap:r};if(r)for(let n of o.children)r.set(n,o);t.unshift(...o.children)}return{}}function CF(e,t){let r=[];if(!e)return[];let o=e;do r.unshift(o),o=t.get(o);while(o);return r}function Tp(){return{principal:kr(),recommendations:{}}}function kr(){return{page:0,perPage:0,totalEntries:0,totalPages:0}}var bt=require("@coveo/bueno");var jt=require("@coveo/bueno"),lt=(r=>(r.Relevance="relevance",r.Fields="fields",r))(lt||{}),Vr=(r=>(r.Ascending="asc",r.Descending="desc",r))(Vr||{}),vt=()=>({by:"relevance"});var Qq=new jt.RecordValue({options:{required:!1},values:{by:new jt.EnumValue({enum:lt,required:!0}),fields:new jt.ArrayValue({each:new jt.RecordValue({values:{name:new jt.StringValue,direction:new jt.EnumValue({enum:Vr})}})})}});var La=e=>({by:"fields",fields:e}),Op=new bt.RecordValue({options:{required:!1},values:{by:new bt.EnumValue({enum:lt,required:!0}),fields:new bt.ArrayValue({each:new bt.RecordValue({values:{field:new bt.StringValue({required:!0}),direction:new bt.EnumValue({enum:Vr}),displayName:new bt.StringValue}})})}});function vo(){return{appliedSort:vt(),availableSorts:[vt()]}}function rc(e){return{...xF(e?.commercePagination,t=>t.principal.page,kr().page),...RF(e?.commercePagination,t=>t.principal.perPage,kr().perPage),...yl(e?.commerceSort,t=>t.appliedSort,vo().appliedSort),...Ut(e.commerceFacetSet,Dr(e,"regular"),FF,"f"),...Ut(e.commerceFacetSet,Dr(e,"regular"),PF,"fExcluded"),...Ut(e.commerceFacetSet,Dr(e,"location"),AF,"lf"),...Ut(e.commerceFacetSet,Dr(e,"hierarchical"),vF,"cf"),...Ut(e.commerceFacetSet,Dr(e,"dateRange"),qp,"df"),...Ut(e.commerceFacetSet,Dr(e,"dateRange"),kp,"dfExcluded"),...Ut(e.commerceFacetSet,Dr(e,"numericalRange"),qp,"nf"),...Ut(e.commerceFacetSet,Dr(e,"numericalRange"),kp,"nfExcluded"),...Vp("selected",e.manualNumericFacetSet),...Vp("excluded",e.manualNumericFacetSet)}}function xF(e,t,r){if(e===void 0)return{};let o=t(e);return o!==r?{page:o}:{}}function RF(e,t,r){if(e===void 0)return{};let o=t(e);return o!==r?{perPage:o}:{}}function FF(e){return e.values.filter(t=>t.state==="selected").map(t=>t.value)}function PF(e){return e.values.filter(t=>t.state==="excluded").map(t=>t.value)}function AF(e){return e.values.filter(t=>t.state==="selected").map(t=>t.value)}function qp(e){return e.values.filter(t=>t.state==="selected")}function kp(e){return e.values.filter(t=>t.state==="excluded")}function Vp(e,t){if(!t||e==="idle")return{};let r=Object.entries(t).map(([o,n])=>{if(!(n.manualRange===void 0||n.manualRange.state!==e))return{[o]:[n.manualRange]}}).filter(o=>o!==void 0).reduce((o,n)=>({...o,...n}),{});return e==="selected"?{mnf:r}:{mnfExcluded:r}}function vF(e){return Bt(e.values).map(r=>r.value)}function Dr(e,t){return r=>e.commerceFacetSet[r].request.type===t}var oc=()=>({query:""});var sk=N(e=>e[Q].commerceSearch.responseId,e=>e),Qa=N(e=>e.commerceSearch.responseId,e=>e),Dp=N(e=>e.commerceSearch.requestId,e=>e),Ua=N(e=>e.commerceSearch?.products.length||0,e=>e),Np=N(e=>({total:qr(e),current:Ua(e)}),({current:e,total:t})=>e<t),Mp=N(e=>e.commerceSearch?.isLoading,e=>(0,hl.isNullOrUndefined)(e)?!1:e),Lp=N(e=>e.commerceSearch?.error,e=>e??null),nc=N(e=>e.commerceQuery?.query,e=>e??""),bF=N(e=>e.commerceSearch?.queryExecuted,e=>e),Qp=(e,t)=>(0,hl.isNullOrUndefined)(t.queryCorrection?.correctedQuery)?nc(e):t.queryCorrection.correctedQuery,Up=e=>({...gl(e?.commerceQuery,t=>t.query,oc().query),...rc(e)});function Bp(e){return{query:bF(e)||""}}var Sl;(t=>t.responseIdSelector=jp(Qa))(Sl||(Sl={}));var Cl;(t=>t.responseIdSelector=jp(Na))(Cl||(Cl={}));function jp(e){return t=>e(t[Q])}var Pl={};Ju(Pl,{escape:()=>tn,getHighlightedSuggestion:()=>Fl,highlightString:()=>wF});var zp=require("@coveo/bueno");var bo=(e,t=5)=>e+Math.random().toString(36).substring(2,2+t);function _p(e){return Array.isArray(e)}function ac(e){return e.trim()===""}function $p(e){let t={};for(let[r,o]of e)t[r]=o;return t}function Ba(e){if(typeof e!="object"||!e)return e;try{return JSON.parse(JSON.stringify(e))}catch{return e}}function wF(e){if(ac(e.openingDelimiter)||ac(e.closingDelimiter))throw Error("delimiters should be a non-empty string");if((0,zp.isNullOrUndefined)(e.content)||ac(e.content))return e.content;if(e.highlights.length===0)return tn(e.content);let t=e.content.length,r="",o=0;for(let n=0;n<e.highlights.length;n++){let a=e.highlights[n],i=a.offset,c=i+a.length;if(c>t)break;r+=tn(e.content.slice(o,i)),r+=e.openingDelimiter,r+=tn(e.content.slice(i,c)),r+=e.closingDelimiter,o=c}return o!==t&&(r+=tn(e.content.slice(o))),r}function Fl(e,t){return e=tn(e),e.replace(/\[(.*?)\]|\{(.*?)\}|\((.*?)\)/g,(r,o,n,a)=>o?Rl(o,t.notMatchDelimiters):n?Rl(n,t.exactMatchDelimiters):a?Rl(a,t.correctionDelimiters):r)}function Rl(e,t){return t?t.open+e+t.close:e}function tn(e){let t={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},r="(?:"+Object.keys(t).join("|")+")",o=RegExp(r),n=RegExp(r,"g");return o.test(e)?e.replace(n,a=>t[a]):e}var of=Mt(Zp(),1);var eP="recommendation-internal-options",Rk=Symbol.for(eP);var $=new Error("Failed to load reducers."),rn=class extends Error{constructor(){super(),this.name="ExpiredToken",this.message="The token being used to perform the request is expired."}};var wo=class extends Error{constructor(r,o){super();Te(this,"statusCode");this.name="Disconnected",this.message=`Client could not connect to the following URL: ${r}`,this.statusCode=o??0}};function ef(e){let t=[];for(let r in e){let o=encodeURIComponent(r),n=encodeURIComponent(e[r]);t.push(`${o}=${n}`)}return t.join("&")}function tf(e){return typeof e!="object"||!e?!1:Object.values(e).every(tP)}function tP(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"}function rf(e){return e===429}var on=class e{static async call(t){let r=rP(t),{logger:o}=t,n=await e.preprocessRequest(r,t);o.info(n,"Platform request");let{url:a,...i}=n,c=async()=>{let u=await fetch(a,i);if(rf(u.status))throw u;return u};try{let u=await(0,of.backOff)(c,{retry:s=>{let l=s&&rf(s.status);return l&&o.info("Platform retrying request"),l}});switch(u.status){case 419:case 401:throw o.info("Platform renewing token"),new rn;case 404:throw new wo(a,u.status);default:return o.info({response:u,requestInfo:n},"Platform response"),u}}catch(u){return u.message==="Failed to fetch"?new wo(a):u}}static async preprocessRequest(t,r){let{origin:o,preprocessRequest:n,logger:a,requestMetadata:i}=r,{signal:c,...u}=t,s=Ba(u);try{let l=await n(t,o,i);return{...t,...l}}catch(l){a.error(l,"Platform request preprocessing failed. Returning default request options.")}return s}};function Ie(e,t="prod",r="platform"){let o=t==="prod"?"":t,n=r==="platform"?"":`.${r}`;return`https://${e}${n}.org${o}.coveo.com`}function dt(e,t="prod"){return`${Ie(e,t)}/rest/search/v2`}function cc(e,t="prod"){return`${Ie(e,t,"analytics")}/rest/organizations/${e}/events/v1`}function rP(e){let{url:t,method:r,requestParams:o,contentType:n,accessToken:a,signal:i}=e,c=e.method==="POST"||e.method==="PUT",u=oP(o,n);return{url:t,method:r,headers:{"Content-Type":n,Authorization:`Bearer ${a}`,...e.headers},...c&&{body:u},signal:i}}function oP(e,t){return t==="application/x-www-form-urlencoded"?tf(e)?ef(e):"":JSON.stringify(e)}function nP(e){return{statusCode:e.statusCode,type:e.name,message:e.message}}function aP(e){return{statusCode:e.code,type:e.name,message:e.message,ignored:!0}}function ql(e,t){if(t&&e.name==="AbortError")return{error:aP(e)};if(e instanceof wo)return{error:nP(e)};throw e}var nn=(e,t)=>({...$a(e,t),requestParams:iP(e)}),iP=e=>{let{trackingId:t,clientId:r,context:o,language:n,country:a,currency:i,page:c,perPage:u,facets:s,sort:l}=e;return{trackingId:t,clientId:r,context:o,language:n,country:a,currency:i,page:c,perPage:u,facets:s,sort:l}},$a=(e,t)=>{let{url:r,accessToken:o}=e,n=`${r}/${t}`;return{accessToken:o,method:"POST",contentType:"application/json",url:n,origin:"commerceApiFetch",requestMetadata:{method:t}}};var nf=(e,t)=>({...$a(e,t),requestParams:cP(e)}),cP=e=>{let{slotId:t,trackingId:r,clientId:o,context:n,language:a,country:i,currency:c,page:u,perPage:s}=e;return{slotId:t,trackingId:r,clientId:o,context:n,language:a,country:i,currency:c,page:u,perPage:s}};var af=e=>({...$a(e,"search/querySuggest"),requestParams:sP(e)}),sP=e=>{let{trackingId:t,query:r,clientId:o,context:n,language:a,country:i,currency:c}=e;return{trackingId:t,query:r,clientId:o,context:n,language:a,country:i,currency:c}};var Oe=e=>e.error!==void 0,sc=class{constructor(t){this.options=t}async getProductListing(t){return this.query({...nn(t,"listing"),...this.options})}async search(t){let r=nn(t,"search");return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async getRecommendations(t){return this.query({...nf(t,"recommendations"),...this.options})}async productSuggestions(t){let r=nn(t,"search/productSuggest");return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async querySuggest(t){let r=af(t);return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async facetSearch(t,r){let o=nn(t,"facet");return this.query({...o,url:`${o.url}?type=${r}`,requestParams:{...o.requestParams,facetId:t?.facetId,facetQuery:t?.facetQuery,query:t?.query},...this.options})}async plan(t){let r=nn(t,"search");return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async query(t){let r=await on.call(t);if(r instanceof Error)return ql(r);let o=await r.json();return r.ok?{success:o}:{error:o}}};function an(e,t="prod"){return`${Ie(e,t)}/rest/organizations/${e}/commerce/v2`}var uc=e=>e;var Dl=require("@coveo/bueno");var Ge=require("@coveo/bueno"),E=new Ge.StringValue({required:!0,emptyAllowed:!1}),re=new Ge.StringValue({required:!1,emptyAllowed:!1}),fe=new Ge.StringValue({required:!0,emptyAllowed:!0}),cf=new Ge.StringValue({required:!1,emptyAllowed:!0}),sf=new Ge.ArrayValue({each:E,required:!0}),uf=new Ge.StringValue({required:!1,emptyAllowed:!1,regex:/^\d+\.\d+\.\d+$/}),Be=({message:e,name:t,stack:r})=>({message:e,name:t,stack:r}),he=(e,t)=>{if("required"in t)return{payload:new Ge.Schema({value:t}).validate({value:e}).value};let n=new Ge.RecordValue({options:{required:!0},values:t}).validate(e);if(n)throw new Ge.SchemaValidationError(n);return{payload:e}},R=(e,t)=>{try{return he(e,t)}catch(r){return{payload:e,error:Be(r)}}},Ye=(e,t,r,o)=>{let n=`Check the initialState of ${o}`;return lf(e,t,r,n,"Controller initialization error")},je=(e,t,r,o)=>{let n=`Check the options of ${o}`;return lf(e,t,r,n,"Controller initialization error")},lf=(e,t,r,o,n)=>{try{return t.validate(r,o)}catch(a){throw e.logger.error(a,n),a}};var _e=require("@coveo/bueno");var cn="3.13.1-pre.d9c98563cb",df=["@coveo/atomic","@coveo/quantic"];var kl=()=>re,mf=()=>E,za=h("configuration/updateBasicConfiguration",e=>R(e,{accessToken:re,environment:new _e.StringValue({required:!1,constrainTo:["prod","hipaa","stg","dev"]}),organizationId:re})),pf=h("configuration/updateSearchConfiguration",e=>R(e,{proxyBaseUrl:new _e.StringValue({required:!1,url:!0}),pipeline:new _e.StringValue({required:!1,emptyAllowed:!0}),searchHub:re,timezone:re,locale:re,authenticationProviders:new _e.ArrayValue({required:!1,each:E})})),sn={enabled:new _e.BooleanValue({default:!0}),originContext:kl(),originLevel2:kl(),originLevel3:kl(),proxyBaseUrl:new _e.StringValue({required:!1,url:!0}),runtimeEnvironment:new _e.Value,anonymous:new _e.BooleanValue({default:!1}),deviceId:re,userDisplayName:re,documentLocation:re,trackingId:re,analyticsMode:new _e.StringValue({constrainTo:["legacy","next"],required:!1,default:"next"}),source:new _e.RecordValue({options:{required:!1},values:df.reduce((e,t)=>(e[t]=uf,e),{})})},Vl=h("configuration/updateAnalyticsConfiguration",e=>R(e,sn)),lc=h("configuration/analytics/disable"),dc=h("configuration/analytics/enable"),ff=h("configuration/analytics/originlevel2",e=>R(e,{originLevel2:mf()})),gf=h("configuration/analytics/originlevel3",e=>R(e,{originLevel3:mf()}));var un=h("commerce/configuration/updateBasicConfiguration",e=>R(e,{accessToken:re,environment:new Dl.StringValue({required:!1,constrainTo:["prod","hipaa","stg","dev"]}),organizationId:re})),ln=h("commerce/configuration/updateProxyBaseUrl",e=>R(e,{proxyBaseUrl:new Dl.StringValue({required:!1,url:!0})})),dn=h("commerce/configuration/updateAnalyticsConfiguration",e=>R(e,{enabled:sn.enabled,proxyBaseUrl:sn.proxyBaseUrl,source:sn.source,trackingId:sn.trackingId})),mc=h("commerce/configuration/analytics/disable"),pc=h("commerce/configuration/analytics/enable");var Nr=require("@coveo/bueno");var yf=()=>({accessToken:"",environment:"prod",organizationId:"",analytics:{enabled:!0,trackingId:"",source:{}},commerce:{}});var Nl=B(yf(),e=>e.addCase(un,(t,r)=>{uP(t,r.payload)}).addCase(ln,(t,r)=>{lP(t,r.payload)}).addCase(dn,(t,r)=>{dP(t,r.payload)}).addCase(mc,t=>{t.analytics.enabled=!1}).addCase(pc,t=>{t.analytics.enabled=!0}));function uP(e,t){(0,Nr.isNullOrUndefined)(t.accessToken)||(e.accessToken=t.accessToken),e.environment=t.environment??"prod",(0,Nr.isNullOrUndefined)(t.organizationId)||(e.organizationId=t.organizationId)}function lP(e,t){(0,Nr.isNullOrUndefined)(t.proxyBaseUrl)||(e.commerce.apiBaseUrl=t.proxyBaseUrl)}function dP(e,t){(0,Nr.isNullOrUndefined)(t.enabled)||(e.analytics.enabled=t.enabled),(0,Nr.isNullOrUndefined)(t.proxyBaseUrl)||(e.analytics.apiBaseUrl=t.proxyBaseUrl),(0,Nr.isNullOrUndefined)(t.source)||(e.analytics.source=t.source),(0,Nr.isNullOrUndefined)(t.trackingId)||(e.analytics.trackingId=t.trackingId)}function mn(e){return e.currency}var hf=(e,t)=>({currency:mn(t.commerceContext),products:mP(t.cart),transaction:e}),Sf=(e,t)=>({currency:mn(t.commerceContext),...e}),Eo=N(e=>e.cart,e=>e.cartItems,(e,t)=>t.map(r=>e[r])),mP=N(Eo,e=>e.map(({quantity:t,...r})=>({quantity:t,product:r})));var It=require("@coveo/bueno");var Ml={productId:E,quantity:new It.NumberValue({required:!0,min:0}),name:new It.StringValue({required:!1}),price:new It.NumberValue({required:!1,min:0})},Ll=new It.ArrayValue({each:new It.RecordValue({values:{...Ml}})}),Ql={items:Ll},Cf=new It.Schema(Ql);var Mr=h("commerce/cart/setItems",e=>R(e,Ll)),pn=h("commerce/cart/updateItemQuantity",e=>R(e,Ml)),fn=h("commerce/cart/purchase"),fc=j("commerce/cart/emit/purchaseEvent",async(e,{extra:t,getState:r})=>{let o=hf(e,r()),{relay:n}=t;n.emit("ec.purchase",o)}),gc=j("commerce/cart/emit/cartActionEvent",async(e,{extra:t,getState:r})=>{let o=Sf(e,r()),{relay:n}=t;n.emit("ec.cartAction",o)});function z(e){let t,r=new Map,o=()=>r.size===0,n=a=>{try{let i=JSON.stringify(a),c=t!==i;return t=i,c}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(),c;return o()&&(t=JSON.stringify(this.state),c=e.subscribe(()=>{n(this.state)&&r.forEach(u=>u())})),r.set(i,a),()=>{r.delete(i),o()&&c&&c()}},get state(){return{}}}}function xf(e,t){return e.cart[To(t)]}var Rf=N(Eo,e=>e.reduce((t,r)=>t+r.quantity,0)),Ff=N(Eo,e=>e.reduce((t,r)=>t+r.price*r.quantity,0));function Pf(e,t={}){if(!pP(e))throw $;let{dispatch:r}=e,o=z(e),n=()=>e[Q].cart,a={...t.initialState};Ye(e,Cf,a,"buildCart"),a.items!==void 0&&r(Mr(a.items));function i(l,d){return d?d.quantity!==l.quantity:!0}function c(l,d){return!d||l.quantity>d.quantity?"add":"remove"}function u(l,d){return d?l.name===d.name&&l.price===d.price&&l.quantity===d.quantity:!1}function s(l,d){let{quantity:p,...m}=l,f=c(l,d),g=d?Math.abs(p-d.quantity):p;return{action:f,quantity:g,product:m}}return{...o,empty:function(){for(let l of Eo(n()))this.updateItemQuantity({...l,quantity:0})},purchase(l){r(fc(l)),r(fn())},updateItemQuantity(l){let d=xf(n(),l);!d&&l.quantity<=0||u(l,d)||(i(l,d)&&r(gc(s(l,d))),r(pn(l)))},get state(){let l=n();return{items:Eo(l),totalQuantity:Rf(l),totalPrice:Ff(l)}}}}function To(e){return`${e.productId},${e.name},${e.price}`}function pP(e){return e.addReducers({cart:gn}),!0}var yc=()=>({cartItems:[],cart:{},purchasedItems:[],purchased:{}}),hc=e=>vf(e.cartItems,e.cart),Af=e=>vf(e.purchasedItems,e.purchased);function vf(e,t){let r=e.reduce((o,n)=>{let{productId:a,quantity:i}=t[n];return a in o||(o[a]={productId:a,quantity:0}),o[a].quantity+=i,o},{});return[...Object.values(r)]}var gn=B(yc(),e=>{e.addCase(Mr,(t,{payload:r})=>{let{cart:o,cartItems:n}=r.reduce((a,i)=>{let c=To(i);return{cartItems:[...a.cartItems,c],cart:{...a.cart,[c]:i},purchasedItems:[],purchased:{}}},yc());bf(t,n,o)}).addCase(pn,(t,{payload:r})=>{let o=To(r);if(!(o in t.cart)){fP(r,t);return}if(r.quantity<=0){gP(r,t);return}t.cart[o]=r}).addCase(fn,t=>{yP(t);let{cart:r,cartItems:o}=yc();bf(t,o,r)})});function bf(e,t,r){e.cartItems=t,e.cart=r}function fP(e,t){if(e.quantity<=0)return;let r=To(e);t.cartItems=[...t.cartItems,r],t.cart[r]=e}function gP(e,t){let r=To(e);t.cartItems=t.cartItems.filter(o=>o!==r),delete t.cart[r]}function yP(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]}}var _t=require("@coveo/bueno");var hP=Intl.supportedValuesOf("currency"),SP=new _t.StringValue({required:!0,emptyAllowed:!1,constrainTo:hP}),Ul={url:E},Bl={latitude:new _t.NumberValue({min:-90,max:90,required:!0}),longitude:new _t.NumberValue({min:-180,max:180,required:!0})},Wa={language:E,country:E,currency:SP,view:new _t.RecordValue({options:{required:!0},values:Ul}),location:new _t.RecordValue({options:{required:!1},values:Bl})},If=new _t.Schema(Wa);var se=h("commerce/context/set",e=>R(e,Wa)),ue=h("commerce/context/setView",e=>R(e,Ul)),yn=h("commerce/context/setLocation",e=>R(e,Bl));var wf=()=>({language:"",country:"",currency:"",view:{url:""}});var $t=B(wf(),e=>{e.addCase(se,(t,{payload:r})=>r).addCase(ue,(t,{payload:r})=>{t.view=r}).addCase(yn,(t,{payload:r})=>{t.location=r})});var Sc=()=>({correctedQuery:"",corrections:[],originalQuery:""});var Vo=require("@coveo/bueno");var mt=h("breadcrumb/deselectAll"),Lr=h("breadcrumb/deselectAllNonBreadcrumbs");var zt=N(e=>e.source,e=>Object.entries(e).map(([t,r])=>`${t}@${r}`).concat(`@coveo/headless@${cn}`));var at=(e,t)=>({...Ka(e,t),facets:[...xP(e)],...e.commerceSort&&{sort:RP(e.commerceSort.appliedSort)}}),Ka=(e,t,r)=>{let{view:o,location:n,...a}=e.commerceContext;return{accessToken:e.configuration.accessToken,url:e.configuration.commerce.apiBaseUrl??an(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:{...o,...t.referrer?{referrer:t.referrer}:{}},capture:e.configuration.analytics.enabled,cart:hc(e.cart),source:zt(e.configuration.analytics)},...CP(e,r)}},CP=(e,t)=>{let r=t?e.commercePagination?.recommendations[t]:e.commercePagination?.principal;return r&&{page:r.page,...r.perPage&&{perPage:r.perPage}}};function xP(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 RP(e){return e.by==="relevance"?{sortCriteria:"relevance"}:{sortCriteria:"fields",fields:e.fields.map(({name:t,direction:r})=>({field:t,direction:r}))}}var hn=require("@coveo/bueno");var Oo=h("commerce/facets/core/updateNumberOfValues",e=>R(e,{facetId:E,numberOfValues:new hn.NumberValue({required:!0,min:1})})),qo=h("commerce/facets/core/updateIsFieldExpanded",e=>R(e,{facetId:E,isFieldExpanded:new hn.BooleanValue({required:!0})})),qe=h("commerce/facets/core/clearAll"),ke=h("commerce/facets/core/deselectAllValues",e=>R(e,{facetId:E})),ko=h("commerce/facets/core/updateFreezeCurrentValues",e=>R(e,{facetId:E,freezeCurrentValues:new hn.BooleanValue({required:!0})})),Sn=h("commerce/facets/core/updateAutoSelectionForAll",e=>R(e,{allow:new hn.BooleanValue({required:!0})}));var jl=require("@coveo/bueno");var Cc={slotId:cf},FP={...Cc,pageSize:new jl.NumberValue({required:!0,min:0})},gr=h("commerce/pagination/setPageSize",e=>R(e,FP)),PP={...Cc,page:new jl.NumberValue({required:!0,min:0})},Wt=h("commerce/pagination/selectPage",e=>R(e,PP)),Qr=h("commerce/pagination/nextPage",e=>R(e,Cc)),Ur=h("commerce/pagination/previousPage",e=>R(e,Cc)),Cn=h("commerce/pagination/registerRecommendationsSlot",e=>R(e,{slotId:E}));var Ef=require("@coveo/bueno");var Ve=h("commerce/query/update",e=>R(e,{query:new Ef.StringValue}));var _l=require("@coveo/bueno");var xc=require("@coveo/bueno");var Br=h("commerce/triggers/query/updateIgnore",e=>R(e,{q:new xc.StringValue({emptyAllowed:!0,required:!0})})),xn=h("commerce/triggers/query/applyModification",e=>R(e,new xc.RecordValue({values:{originalQuery:re,modification:re}})));var Ha=class{constructor(t){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=new Date().getTime(),o=await this.extra.apiClient.search(t),n=new Date().getTime()-r,a=this.getState().commerceQuery.query||"";return{response:o,duration:n,queryExecuted:a,requestExecuted:t}}processSuccessResponse(t){return{...t,response:this.getSuccessResponse(t),originalQuery:this.getCurrentQuery()}}processQueryErrorOrContinue(t){return Oe(t.response)?this.rejectWithValue(t.response.error):null}async processQueryCorrectionsOrContinue(t){let r=this.getState(),o=this.getSuccessResponse(t);if(!o||!r.didYouMean)return null;let{queryCorrection:n}=o;if(!(!(0,_l.isNullOrUndefined)(n)&&!(0,_l.isNullOrUndefined)(n.correctedQuery)))return null;let{correctedQuery:i,originalQuery:c}=o.queryCorrection;return this.onUpdateQueryForCorrection(i??""),{...t,response:{...o},queryExecuted:Qp(r,o),originalQuery:c??""}}async processQueryTriggersOrContinue(t){let r=this.getSuccessResponse(t);if(!r)return null;let o=r.triggers.find(c=>c.type==="query")?.content||"";if(!o)return null;if(this.getState().triggers?.queryModification.queryToIgnore===o)return this.dispatch(Br({q:""})),null;let a=this.getCurrentQuery(),i=await this.automaticallyRetryQueryWithTriggerModification(o);return Oe(i.response)?this.rejectWithValue(i.response.error):{...i,response:{...i.response.success},originalQuery:a}}async automaticallyRetryQueryWithTriggerModification(t){return this.dispatch(xn({newQuery:t,originalQuery:this.getCurrentQuery()})),this.onUpdateQueryForCorrection(t),await this.fetchFromAPI({...at(this.getState(),this.navigatorContext),query:t})}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 Oe(t.response)?null:t.response.success}get extra(){return this.config.extra}onUpdateQueryForCorrection(t){this.dispatch(Ve({query:t}))}};var H=j("commerce/search/executeSearch",async(e,t)=>{let{getState:r}=t,o=r(),{navigatorContext:n}=t.extra,a=at(o,n),i=nc(o),c=new Ha(t),u=await c.fetchFromAPI({...a,query:i});return c.process(u)}),jr=j("commerce/search/fetchMoreProducts",async(e,t)=>{let{getState:r}=t,o=r(),{navigatorContext:n}=t.extra;if(!Np(o))return null;let i=Or(o),u=Ua(o)/i,s=nc(o),l=at(o,n),d=new Ha(t),p=await d.fetchFromAPI({...l,query:s,page:u});return d.process(p)}),Rn=j("commerce/search/prepareForSearchWithQuery",(e,t)=>{let{dispatch:r}=t;R(e,{query:new Vo.StringValue,clearFilters:new Vo.BooleanValue}),e.clearFilters&&(r(qe()),r(Lr())),r(Sn({allow:!0})),r(Ve({query:e.query})),r(Wt({page:0}))}),Fn=j("commerce/search/fetchInstantProducts",async(e,{getState:t,rejectWithValue:r,extra:o})=>{let n=t(),{apiClient:a,navigatorContext:i}=o,{q:c}=e,u=await a.productSuggestions({...at(n,i),query:c});if(Oe(u))return r(u.error);let s=u.success.products.slice(0,5);return{response:{...u.success,products:s}}}),AP={child:new Vo.RecordValue({options:{required:!0},values:{permanentid:new Vo.StringValue({required:!0})}})},Pn=h("commerce/search/promoteChildToParent",e=>R(e,AP));function Tf(){return{wasCorrectedTo:"",queryCorrection:Sc(),originalQuery:""}}var Rc=B(Tf(),e=>{e.addCase(H.pending,t=>{t.queryCorrection=Sc(),t.wasCorrectedTo=""}).addCase(H.fulfilled,(t,r)=>{let{queryCorrection:o}=r.payload.response;t.originalQuery=r.payload.originalQuery,t.wasCorrectedTo=o?.correctedQuery??"",t.queryCorrection={correctedQuery:o?.correctedQuery??o?.corrections[0]?.correctedQuery??"",wordCorrections:o?.corrections[0]?.wordCorrections??[]}})});var de=require("@coveo/bueno");var K=E;var Kt=require("@coveo/bueno");var vP={state:new Kt.Value({required:!0}),numberOfResults:new Kt.NumberValue({required:!0,min:0}),value:new Kt.StringValue({required:!0,emptyAllowed:!0}),path:new Kt.ArrayValue({required:!0,each:E}),moreValuesAvailable:new Kt.BooleanValue({required:!1})};function Ga(e){e.children.forEach(t=>{Ga(t)}),he({state:e.state,numberOfResults:e.numberOfResults,value:e.value,path:e.path,moreValuesAvailable:e.moreValuesAvailable},vP)}var An={facetId:K,field:E,tabs:new de.RecordValue({options:{required:!1},values:{included:new de.ArrayValue({each:new de.StringValue}),excluded:new de.ArrayValue({each:new de.StringValue})}}),activeTab:new de.StringValue({required:!1}),delimitingCharacter:new de.StringValue({required:!1,emptyAllowed:!0}),filterFacetCount:new de.BooleanValue({required:!1}),injectionDepth:new de.NumberValue({required:!1,min:0}),numberOfValues:new de.NumberValue({required:!1,min:1}),sortCriteria:new de.Value({required:!1}),basePath:new de.ArrayValue({required:!1,each:E}),filterByBasePath:new de.BooleanValue({required:!1})},vn=5,Of=h("categoryFacet/register",e=>R(e,An)),qf=h("categoryFacet/toggleSelectValue",e=>{try{return he(e.facetId,E),Ga(e.selection),{payload:e,error:null}}catch(t){return{payload:e,error:Be(t)}}}),kf=h("categoryFacet/deselectAll",e=>R(e,An.facetId)),wN=h("categoryFacet/updateNumberOfValues",e=>R(e,{facetId:An.facetId,numberOfValues:An.numberOfValues})),EN=h("categoryFacet/updateSortCriterion",e=>R(e,{facetId:An.facetId,criterion:new de.Value})),TN=h("categoryFacet/updateBasePath",e=>R(e,{facetId:An.facetId,basePath:new de.ArrayValue({each:E})}));var In=require("@coveo/bueno");var bn=require("@coveo/bueno");var Ya={facetId:K,captions:new bn.RecordValue({options:{required:!1}}),numberOfValues:new bn.NumberValue({required:!1,min:1}),query:new bn.StringValue({required:!1,emptyAllowed:!0})};var bP={path:new In.ArrayValue({required:!0,each:E}),displayValue:fe,rawValue:fe,count:new In.NumberValue({required:!0,min:0})},_r=h("categoryFacet/selectSearchResult",e=>R(e,{facetId:K,value:new In.RecordValue({values:bP})})),Fc=h("categoryFacetSearch/register",e=>R(e,Ya));var Pc=require("@coveo/bueno");var Vf={facetId:K,value:new Pc.RecordValue({values:{displayValue:fe,rawValue:fe,count:new Pc.NumberValue({required:!0,min:0})}})},Ac=h("facetSearch/register",e=>R(e,Ya)),$r=h("facetSearch/update",e=>R(e,Ya)),wt=h("facetSearch/toggleSelectValue",e=>R(e,Vf)),Et=h("facetSearch/toggleExcludeValue",e=>R(e,Vf));var Df=require("@coveo/bueno");var yr=h("facetOptions/update",(e={freezeFacetOrder:!0})=>R(e,{freezeFacetOrder:new Df.BooleanValue({required:!1})})),$l=h("facetOptions/facet/enable",e=>R(e,K)),hr=h("facetOptions/facet/disable",e=>R(e,K));var IP=h("history/undo"),wP=h("history/redo"),Ht=h("history/snapshot"),GN=j("history/back",async(e,{dispatch:t})=>{t(IP()),await t(xe())}),YN=j("history/forward",async(e,{dispatch:t})=>{t(wP()),await t(xe())}),xe=j("history/change",async(e,{getState:t})=>t().history.present);var me=require("@coveo/bueno"),vc={q:new me.StringValue,enableQuerySyntax:new me.BooleanValue,aq:new me.StringValue,cq:new me.StringValue,firstResult:new me.NumberValue({min:0}),numberOfResults:new me.NumberValue({min:0}),sortCriteria:new me.StringValue,f:new me.RecordValue,fExcluded:new me.RecordValue,cf:new me.RecordValue,nf:new me.RecordValue,mnf:new me.RecordValue,df:new me.RecordValue,debug:new me.BooleanValue,sf:new me.RecordValue,tab:new me.StringValue,af:new me.RecordValue};var we=h("searchParameters/restore",e=>R(e,vc));var ro=require("@coveo/bueno");function Sr(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,o=Object.getOwnPropertySymbols(e);n<o.length;n++)t.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(r[o[n]]=e[o[n]]);return r}function v(e,t,r,o){function n(a){return a instanceof r?a:new r(function(i){i(a)})}return new(r||(r=Promise))(function(a,i){function c(l){try{s(o.next(l))}catch(d){i(d)}}function u(l){try{s(o.throw(l))}catch(d){i(d)}}function s(l){l.done?a(l.value):n(l.value).then(c,u)}s((o=o.apply(e,t||[])).next())})}var G;(function(e){e.search="search",e.click="click",e.custom="custom",e.view="view",e.collect="collect"})(G||(G={}));function Kl(){return typeof window<"u"}function id(){return typeof navigator<"u"}function wn(){return typeof document<"u"}function Hl(){try{return typeof localStorage<"u"}catch{return!1}}function EP(){try{return typeof sessionStorage<"u"}catch{return!1}}function Gf(){return id()&&navigator.cookieEnabled}var TP=[G.click,G.custom,G.search,G.view],OP=(e,t)=>TP.indexOf(e)!==-1?Object.assign({language:wn()?document.documentElement.lang:"unknown",userAgent:id()?navigator.userAgent:"unknown"},t):t,Za=class e{static set(t,r,o){var n,a,i,c;o&&(a=new Date,a.setTime(a.getTime()+o)),c=window.location.hostname,c.indexOf(".")===-1?Nf(t,r,a):(i=c.split("."),n=i[i.length-2]+"."+i[i.length-1],Nf(t,r,a,n))}static get(t){for(var r=t+"=",o=document.cookie.split(";"),n=0;n<o.length;n++){var a=o[n];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 Nf(e,t,r,o){document.cookie=`${e}=${t}`+(r?`;expires=${r.toUTCString()}`:"")+(o?`;domain=${o}`:"")+";path=/;SameSite=Lax"}function qP(){return Hl()?localStorage:Gf()?new ei:EP()?sessionStorage:new Tn}var ei=class e{getItem(t){return Za.get(`${e.prefix}${t}`)}removeItem(t){Za.erase(`${e.prefix}${t}`)}setItem(t,r,o){Za.set(`${e.prefix}${t}`,r,o)}};ei.prefix="coveo_";var Gl=class{constructor(){this.cookieStorage=new ei}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)}},Tn=class{getItem(t){return null}removeItem(t){}setItem(t,r){}},Ja="__coveo.analytics.history",Yf=20,Jf=1e3*60,Xf=75,On=class{constructor(t){this.store=t||qP()}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 v(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 v(this,void 0,void 0,function*(){let t=yield this.getHistoryWithInternalTimeAsync();return this.stripEmptyQueries(this.stripInternalTime(t))})}getHistoryWithInternalTime(){try{let t=this.store.getItem(Ja);return t&&typeof t=="string"?JSON.parse(t):[]}catch{return[]}}getHistoryWithInternalTimeAsync(){return v(this,void 0,void 0,function*(){try{let t=yield this.store.getItem(Ja);return t?JSON.parse(t):[]}catch{return[]}})}setHistory(t){try{this.store.setItem(Ja,JSON.stringify(t.slice(0,Yf)))}catch{}}clear(){try{this.store.removeItem(Ja)}catch{}}getMostRecentElement(){let t=this.getHistoryWithInternalTime();return Array.isArray(t)?t.sort((o,n)=>(n.internalTime||0)-(o.internalTime||0))[0]:null}cropQueryElement(t){return t.name&&t.value&&t.name.toLowerCase()==="query"&&(t.value=t.value.slice(0,Xf)),t}isValidEntry(t){let r=this.getMostRecentElement();return r&&r.value==t.value?(t.internalTime||0)-(r.internalTime||0)>Jf:!0}stripInternalTime(t){return Array.isArray(t)?t.map(r=>{let{name:o,time:n,value:a}=r;return{name:o,time:n,value:a}}):[]}stripEmptyQuery(t){let{name:r,time:o,value:n}=t;return r&&typeof n=="string"&&r.toLowerCase()==="query"&&n.trim()===""?{name:r,time:o}:t}stripEmptyQueries(t){return t.map(r=>this.stripEmptyQuery(r))}},Zf=Object.freeze({__proto__:null,HistoryStore:On,MAX_NUMBER_OF_HISTORY_ELEMENTS:Yf,MAX_VALUE_SIZE:Xf,MIN_THRESHOLD_FOR_DUPLICATE_VALUE:Jf,STORE_KEY:Ja,default:On}),kP=(e,t)=>v(void 0,void 0,void 0,function*(){return e===G.view?(yield VP(t.contentIdValue),Object.assign({location:window.location.toString(),referrer:document.referrer,title:document.title},t)):t}),VP=e=>v(void 0,void 0,void 0,function*(){let t=new On,r={name:"PageView",value:e,time:new Date().toISOString()};yield t.addElementAsync(r)}),bc,DP=new Uint8Array(16);function NP(){if(!bc&&(bc=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!bc))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return bc(DP)}var MP=/^(?:[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 wc(e){return typeof e=="string"&&MP.test(e)}var Ee=[];for(let e=0;e<256;++e)Ee.push((e+256).toString(16).slice(1));function eg(e,t=0){return(Ee[e[t+0]]+Ee[e[t+1]]+Ee[e[t+2]]+Ee[e[t+3]]+"-"+Ee[e[t+4]]+Ee[e[t+5]]+"-"+Ee[e[t+6]]+Ee[e[t+7]]+"-"+Ee[e[t+8]]+Ee[e[t+9]]+"-"+Ee[e[t+10]]+Ee[e[t+11]]+Ee[e[t+12]]+Ee[e[t+13]]+Ee[e[t+14]]+Ee[e[t+15]]).toLowerCase()}function LP(e){if(!wc(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 QP(e){e=unescape(encodeURIComponent(e));let t=[];for(let r=0;r<e.length;++r)t.push(e.charCodeAt(r));return t}var UP="6ba7b810-9dad-11d1-80b4-00c04fd430c8",BP="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function jP(e,t,r){function o(n,a,i,c){var u;if(typeof n=="string"&&(n=QP(n)),typeof a=="string"&&(a=LP(a)),((u=a)===null||u===void 0?void 0:u.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let s=new Uint8Array(16+n.length);if(s.set(a),s.set(n,a.length),s=r(s),s[6]=s[6]&15|t,s[8]=s[8]&63|128,i){c=c||0;for(let l=0;l<16;++l)i[c+l]=s[l];return i}return eg(s)}try{o.name=e}catch{}return o.DNS=UP,o.URL=BP,o}var _P=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Mf={randomUUID:_P};function Do(e,t,r){if(Mf.randomUUID&&!t&&!e)return Mf.randomUUID();e=e||{};let o=e.random||(e.rng||NP)();if(o[6]=o[6]&15|64,o[8]=o[8]&63|128,t){r=r||0;for(let n=0;n<16;++n)t[r+n]=o[n];return t}return eg(o)}function $P(e,t,r,o){switch(e){case 0:return t&r^~t&o;case 1:return t^r^o;case 2:return t&r^t&o^r&o;case 3:return t^r^o}}function zl(e,t){return e<<t|e>>>32-t}function zP(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 c=0;c<i.length;++c)e.push(i.charCodeAt(c))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);let o=e.length/4+2,n=Math.ceil(o/16),a=new Array(n);for(let i=0;i<n;++i){let c=new Uint32Array(16);for(let u=0;u<16;++u)c[u]=e[i*64+u*4]<<24|e[i*64+u*4+1]<<16|e[i*64+u*4+2]<<8|e[i*64+u*4+3];a[i]=c}a[n-1][14]=(e.length-1)*8/Math.pow(2,32),a[n-1][14]=Math.floor(a[n-1][14]),a[n-1][15]=(e.length-1)*8&4294967295;for(let i=0;i<n;++i){let c=new Uint32Array(80);for(let m=0;m<16;++m)c[m]=a[i][m];for(let m=16;m<80;++m)c[m]=zl(c[m-3]^c[m-8]^c[m-14]^c[m-16],1);let u=r[0],s=r[1],l=r[2],d=r[3],p=r[4];for(let m=0;m<80;++m){let f=Math.floor(m/20),g=zl(u,5)+$P(f,s,l,d)+p+t[f]+c[m]>>>0;p=d,d=l,l=zl(s,30)>>>0,s=u,u=g}r[0]=r[0]+u>>>0,r[1]=r[1]+s>>>0,r[2]=r[2]+l>>>0,r[3]=r[3]+d>>>0,r[4]=r[4]+p>>>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 WP=jP("v5",80,zP),Lf=WP,tg="2.30.42",Qf=e=>`${e.protocol}//${e.hostname}${e.pathname.indexOf("/")===0?e.pathname:`/${e.pathname}`}${e.search}`,Xa={pageview:"pageview",event:"event"},Ec=class{constructor({client:t,uuidGenerator:r=Do}){this.client=t,this.uuidGenerator=r}},Yl=class extends Ec{constructor({client:t,uuidGenerator:r=Do}){super({client:t,uuidGenerator:r}),this.actionData={},this.pageViewId=r(),this.nextPageViewId=this.pageViewId,this.currentLocation=Qf(window.location),this.lastReferrer=wn()?document.referrer:"",this.addHooks()}getApi(t){switch(t){case"setAction":return this.setAction;default:return 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:wn()?document.title:"",encoding:wn()?document.characterSet:"UTF-8"},o={screenResolution:`${screen.width}x${screen.height}`,screenColor:`${screen.colorDepth}-bit`},n={language:navigator.language,userAgent:navigator.userAgent},a={time:Date.now(),eventId:this.uuidGenerator()};return Object.assign(Object.assign(Object.assign(Object.assign({},a),o),n),r)}updateLocationForNextPageView(t,r){let{pageViewId:o,referrer:n,location:a}=this.getNextValues(t,r);this.lastReferrer=n,this.pageViewId=o,this.currentLocation=a,t===Xa.pageview&&(this.nextPageViewId=this.uuidGenerator(),this.hasSentFirstPageView=!0)}getNextValues(t,r){return{pageViewId:t===Xa.pageview?this.nextPageViewId:this.pageViewId,referrer:t===Xa.pageview&&this.hasSentFirstPageView?this.currentLocation:this.lastReferrer,location:t===Xa.pageview?this.getCurrentLocationFromPayload(r):this.currentLocation}}getCurrentLocationFromPayload(t){if(t.page){let r=n=>n.replace(/^\/?(.*)$/,"/$1");return`${(n=>n.split("/").slice(0,3).join("/"))(this.currentLocation)}${r(t.page)}`}else return Qf(window.location)}},zr=class e{constructor(t,r){if(!wc(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 o=new URL(t);return r.some(n=>new RegExp(n.replace(/\\/g,"\\\\").replace(/\./g,"\\.").replace(/\*/g,".*")+"$").test(o.host))}catch{return!1}}static fromString(t){let r=t.split(".");if(r.length!==2)return null;let[o,n]=r;if(o.length!==32||isNaN(parseInt(n)))return null;let a=o.substring(0,8)+"-"+o.substring(8,12)+"-"+o.substring(12,16)+"-"+o.substring(16,20)+"-"+o.substring(20,32);return wc(a)?new e(a,Number.parseInt(n)*1e3):null}};zr.cvo_cid="cvo_cid";zr.expirationTime=120;var Jl=class extends Ec{constructor({client:t,uuidGenerator:r=Do}){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 v(this,void 0,void 0,function*(){if(!this.client.getCurrentVisitorId)throw new Error("Could not retrieve current clientId");try{let r=new URL(t),o=yield this.client.getCurrentVisitorId();return r.searchParams.set(zr.cvo_cid,new zr(o,Date.now()).toString()),r.toString()}catch{throw new Error("Invalid URL provided")}})}acceptFrom(t){this.client.setAcceptedLinkReferrers(t)}};Jl.Id="link";var pt=Object.keys;function Ic(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}var Wl=128,rg=192,Uf=224,Bf=240;function KP(e){return(e&248)===Bf?4:(e&Bf)===Uf?3:(e&Uf)===rg?2:1}function HP(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 o=Number.parseInt(e.substring(r-2,r),16);if((o&Wl)!=Wl)break;if(r-=3,(o&rg)!=Wl){t-r>=KP(o)*3&&(r=t);break}}return e.substring(0,r)}var Xl={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"},GP=pt(Xl).map(e=>Xl[e]),YP=[...GP].join("|"),JP=new RegExp(`^(${YP}$)`),XP={svcAction:"svc_action",svcActionData:"svc_action_data"},ZP=e=>pt(e).filter(t=>e[t]!==void 0).reduce((t,r)=>{let o=Xl[r]||r;return Object.assign(Object.assign({},t),{[o]:e[r]})},{}),eA=e=>JP.test(e),tA=[eA],jf={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",price:"pr",quantity:"qt",coupon:"cc",position:"ps",group:"group"},_f={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",position:"ps",price:"pr",group:"group"},De={action:"pa",list:"pal",listSource:"pls"},Tc={id:"ti",revenue:"tr",tax:"tt",shipping:"ts",coupon:"tcc",affiliation:"ta",step:"cos",option:"col"},rA=["loyaltyCardId","loyaltyTier","thirdPartyPersona","companyName","favoriteStore","storeName","userIndustry","userRole","userDepartment","businessUnit"],Zl={id:"quoteId",affiliation:"quoteAffiliation"},ed={id:"reviewId",rating:"reviewRating",comment:"reviewComment"},oA={add:De,bookmark_add:De,bookmark_remove:De,click:De,checkout:De,checkout_option:De,detail:De,impression:De,remove:De,refund:Object.assign(Object.assign({},De),Tc),purchase:Object.assign(Object.assign({},De),Tc),quickview:De,quote:Object.assign(Object.assign({},De),Zl),review:Object.assign(Object.assign({},De),ed)},nA=pt(jf).map(e=>jf[e]),aA=pt(_f).map(e=>_f[e]),iA=pt(De).map(e=>De[e]),cA=pt(Tc).map(e=>Tc[e]),sA=pt(ed).map(e=>ed[e]),uA=pt(Zl).map(e=>Zl[e]),lA=[...nA,"custom"].join("|"),dA=[...aA,"custom"].join("|"),og="(pr[0-9]+)",ng="(il[0-9]+pi[0-9]+)",mA=new RegExp(`^${og}(${lA})$`),pA=new RegExp(`^(${ng}(${dA}))|(il[0-9]+nm)$`),fA=new RegExp(`^(${iA.join("|")})$`),gA=new RegExp(`^(${cA.join("|")})$`),yA=new RegExp(`^${og}custom$`),hA=new RegExp(`^${ng}custom$`),SA=new RegExp(`^(${[...rA,...sA,...uA].join("|")})$`),CA=e=>mA.test(e),xA=e=>pA.test(e),RA=e=>fA.test(e),FA=e=>gA.test(e),PA=e=>SA.test(e),AA=[xA,CA,RA,FA,PA],vA=[yA,hA],bA={anonymizeIp:"aip"},IA={eventCategory:"ec",eventAction:"ea",eventLabel:"el",eventValue:"ev",page:"dp",visitorId:"cid",clientId:"cid",userId:"uid",currencyCode:"cu"},wA={hitType:"t",pageViewId:"pid",encoding:"de",location:"dl",referrer:"dr",screenColor:"sd",screenResolution:"sr",title:"dt",userAgent:"ua",language:"ul",eventId:"z",time:"tm"},EA=["contentId","contentIdKey","contentType","searchHub","tab","searchUid","permanentId","contentLocale","trackingId"],TA=Object.assign(Object.assign(Object.assign(Object.assign({},bA),IA),wA),EA.reduce((e,t)=>Object.assign(Object.assign({},e),{[t]:t}),{})),td=Object.assign(Object.assign({},TA),XP),OA=e=>{let t=!!e.action&&oA[e.action]||{};return pt(e).reduce((r,o)=>{let n=t[o]||td[o]||o;return Object.assign(Object.assign({},r),{[n]:e[o]})},{})},qA=pt(td).map(e=>td[e]),kA=e=>qA.indexOf(e)!==-1,VA=e=>e==="custom",DA=e=>[...AA,...tA,kA,VA].some(t=>t(e)),NA=e=>pt(e).reduce((t,r)=>{let o=MA(r);return o?Object.assign(Object.assign({},t),LA(o,e[r])):Object.assign(Object.assign({},t),{[r]:e[r]})},{}),MA=e=>{let t;return[...vA].every(r=>{var o;return t=(o=r.exec(e))===null||o===void 0?void 0:o[1],!t}),t},LA=(e,t)=>pt(t).reduce((r,o)=>Object.assign(Object.assign({},r),{[`${e}${o}`]:t[o]}),{}),rd=class{constructor(t){this.opts=t}sendEvent(t,r){return v(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:o,preprocessRequest:n}=this.opts,a=yield this.getQueryParamsForEventType(t),{url:i,payload:c}=yield this.preProcessRequestAsPotentialJSONString(`${o}/analytics/${t}?${a}`,r,n),u=this.encodeForEventType(t,c),s=new Blob([u],{type:"application/x-www-form-urlencoded"});navigator.sendBeacon(i,s)})}isAvailable(){return"sendBeacon"in navigator}deleteHttpCookieVisitorId(){return Promise.resolve()}preProcessRequestAsPotentialJSONString(t,r,o){return v(this,void 0,void 0,function*(){let n=t,a=r;if(o){let i=yield o({url:t,body:JSON.stringify(r)},"analyticsBeacon"),{url:c,body:u}=i;n=c||t;try{a=JSON.parse(u)}catch(s){console.error("Unable to process the request body as a JSON string",s)}}return{payload:a,url:n}})}encodeForEventType(t,r){return this.isEventTypeLegacy(t)?this.encodeEventToJson(t,r):this.encodeEventToJson(t,r,this.opts.token)}getQueryParamsForEventType(t){return v(this,void 0,void 0,function*(){let{token:r,visitorIdProvider:o}=this.opts,n=yield o.getCurrentVisitorId();return[r&&this.isEventTypeLegacy(t)?`access_token=${r}`:"",n?`visitorId=${n}`:"","discardVisitInfo=true"].filter(a=>!!a).join("&")})}isEventTypeLegacy(t){return[G.click,G.custom,G.search,G.view].indexOf(t)!==-1}encodeEventToJson(t,r,o){let n=`${t}Event=${encodeURIComponent(JSON.stringify(r))}`;return o&&(n=`access_token=${encodeURIComponent(o)}&${n}`),n}},od=class{sendEvent(t,r){return v(this,void 0,void 0,function*(){return Promise.resolve()})}deleteHttpCookieVisitorId(){return v(this,void 0,void 0,function*(){return Promise.resolve()})}},$f=globalThis.fetch,Oc=class{constructor(t){this.opts=t}sendEvent(t,r){return v(this,void 0,void 0,function*(){let{baseUrl:o,visitorIdProvider:n,preprocessRequest:a}=this.opts,i=this.shouldAppendVisitorId(t)?yield this.getVisitorIdParam():"",c={url:`${o}/analytics/${t}${i}`,credentials:"include",mode:"cors",headers:this.getHeaders(),method:"POST",body:JSON.stringify(r)},u=Object.assign(Object.assign({},c),a?yield a(c,"analyticsFetch"):{}),{url:s}=u,l=Sr(u,["url"]),d;try{d=yield $f(s,l)}catch(p){console.error("An error has occured when sending the event.",p);return}if(d.ok){let p=yield d.json();return p.visitorId&&n.setCurrentVisitorId(p.visitorId),p}else{try{d.json()}catch{}throw console.error(`An error has occured when sending the "${t}" event.`,d,r),new Error(`An error has occurred when sending the "${t}" event. Check the console logs for more details.`)}})}deleteHttpCookieVisitorId(){return v(this,void 0,void 0,function*(){let{baseUrl:t}=this.opts,r=`${t}/analytics/visit`;yield $f(r,{headers:this.getHeaders(),method:"DELETE"})})}shouldAppendVisitorId(t){return[G.click,G.custom,G.search,G.view].indexOf(t)!==-1}getVisitorIdParam(){return v(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"})}},nd=class{constructor(t,r){Hl()&&Gf()?this.storage=new Gl:Hl()?this.storage=localStorage:(console.warn("BrowserRuntime detected no valid storage available.",this),this.storage=new Tn),this.client=new Oc(t),this.beaconClient=new rd(t),window.addEventListener("beforeunload",()=>{let o=r();for(let{eventType:n,payload:a}of o)this.beaconClient.sendEvent(n,a)})}getClientDependingOnEventType(t){return t==="click"&&this.beaconClient.isAvailable()?this.beaconClient:this.client}},ad=class{constructor(t,r){this.storage=r||new Tn,this.client=new Oc(t)}getClientDependingOnEventType(t){return this.client}},qc=class{constructor(){this.storage=new Tn,this.client=new od}getClientDependingOnEventType(t){return this.client}},QA="xx",UA=e=>e?.startsWith(QA)||!1,BA=`
|
|
20
20
|
We've detected you're using React Native but have not provided the corresponding runtime,
|
|
21
21
|
for an optimal experience please use the "coveo.analytics/react-native" subpackage.
|
|
22
22
|
Follow the Readme on how to set it up: https://github.com/coveo/coveo.analytics.js#using-react-native
|