@coveo/headless 3.19.0-pre.afe9f4e635 → 3.19.0-pre.d54cb5306e

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/dist/browser/case-assist/headless.esm.js +1 -1
  2. package/dist/browser/case-assist/headless.js +1 -1
  3. package/dist/browser/commerce/headless.esm.js +1 -1
  4. package/dist/browser/commerce/headless.js +1 -1
  5. package/dist/browser/headless.esm.js +1 -1
  6. package/dist/browser/headless.js +1 -1
  7. package/dist/browser/insight/headless.esm.js +1 -1
  8. package/dist/browser/insight/headless.js +1 -1
  9. package/dist/browser/recommendation/headless.esm.js +1 -1
  10. package/dist/browser/recommendation/headless.js +1 -1
  11. package/dist/browser/ssr/headless.esm.js +1 -1
  12. package/dist/browser/ssr/headless.js +1 -1
  13. package/dist/browser/ssr-commerce/headless.esm.js +1 -1
  14. package/dist/browser/ssr-commerce/headless.js +1 -1
  15. package/dist/case-assist/headless.cjs +1 -1
  16. package/dist/case-assist/headless.esm.js +1 -1
  17. package/dist/commerce/headless.cjs +1 -1
  18. package/dist/commerce/headless.esm.js +1 -1
  19. package/dist/headless.cjs +1 -1
  20. package/dist/headless.esm.js +1 -1
  21. package/dist/insight/headless.cjs +1 -1
  22. package/dist/insight/headless.esm.js +1 -1
  23. package/dist/quantic/case-assist/headless.js +1 -1
  24. package/dist/quantic/commerce/headless.js +1 -1
  25. package/dist/quantic/headless.js +1 -1
  26. package/dist/quantic/insight/headless.js +1 -1
  27. package/dist/quantic/recommendation/headless.js +1 -1
  28. package/dist/recommendation/headless.cjs +1 -1
  29. package/dist/recommendation/headless.esm.js +1 -1
  30. package/dist/ssr/headless.cjs +1 -1
  31. package/dist/ssr/headless.esm.js +1 -1
  32. package/dist/ssr-commerce/headless.cjs +1 -1
  33. package/dist/ssr-commerce/headless.esm.js +1 -1
  34. 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 OR=Object.create;var qa=Object.defineProperty;var qR=Object.getOwnPropertyDescriptor;var kR=Object.getOwnPropertyNames;var VR=Object.getPrototypeOf,DR=Object.prototype.hasOwnProperty;var NR=(e,t,r)=>t in e?qa(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Ie=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),tl=(e,t)=>{for(var r in t)qa(e,r,{get:t[r],enumerable:!0})},Hm=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of kR(t))!DR.call(e,n)&&n!==r&&qa(e,n,{get:()=>t[n],enumerable:!(o=qR(t,n))||o.enumerable});return e};var Ut=(e,t,r)=>(r=e!=null?OR(VR(e)):{},Hm(t||!e||!e.__esModule?qa(r,"default",{value:e,enumerable:!0}):r,e)),MR=e=>Hm(qa({},"__esModule",{value:!0}),e);var De=(e,t,r)=>NR(e,typeof t!="symbol"?t+"":t,r);var Xp=Ie(Ha=>{"use strict";var lc=Ha&&Ha.__assign||function(){return lc=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},lc.apply(this,arguments)};Object.defineProperty(Ha,"__esModule",{value:!0});var QF={delayFirstAttempt:!1,jitter:"none",maxDelay:1/0,numOfAttempts:10,retry:function(){return!0},startingDelay:100,timeMultiple:2};function UF(e){var t=lc(lc({},QF),e);return t.numOfAttempts<1&&(t.numOfAttempts=1),t}Ha.getSanitizedOptions=UF});var Zp=Ie(wl=>{"use strict";Object.defineProperty(wl,"__esModule",{value:!0});function BF(e){var t=Math.random()*e;return Math.round(t)}wl.fullJitter=BF});var ef=Ie(El=>{"use strict";Object.defineProperty(El,"__esModule",{value:!0});function jF(e){return e}El.noJitter=jF});var tf=Ie(Tl=>{"use strict";Object.defineProperty(Tl,"__esModule",{value:!0});var _F=Zp(),$F=ef();function zF(e){switch(e.jitter){case"full":return _F.fullJitter;case"none":default:return $F.noJitter}}Tl.JitterFactory=zF});var ql=Ie(Ol=>{"use strict";Object.defineProperty(Ol,"__esModule",{value:!0});var WF=tf(),KF=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=WF.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}();Ol.Delay=KF});var rf=Ie(yr=>{"use strict";var GF=yr&&yr.__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)}}(),HF=yr&&yr.__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())})},YF=yr&&yr.__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(yr,"__esModule",{value:!0});var JF=ql(),XF=function(e){GF(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.apply=function(){return HF(this,void 0,void 0,function(){return YF(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}(JF.Delay);yr.SkipFirstDelay=XF});var of=Ie(Ya=>{"use strict";var ZF=Ya&&Ya.__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(Ya,"__esModule",{value:!0});var eP=ql(),tP=function(e){ZF(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(eP.Delay);Ya.AlwaysDelay=tP});var nf=Ie(kl=>{"use strict";Object.defineProperty(kl,"__esModule",{value:!0});var rP=rf(),oP=of();function nP(e,t){var r=aP(e);return r.setAttemptNumber(t),r}kl.DelayFactory=nP;function aP(e){return e.delayFirstAttempt?new oP.AlwaysDelay(e):new rP.SkipFirstDelay(e)}});var af=Ie(Oo=>{"use strict";var Vl=Oo&&Oo.__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())})},Dl=Oo&&Oo.__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(Oo,"__esModule",{value:!0});var iP=Xp(),cP=nf();function sP(e,t){return t===void 0&&(t={}),Vl(this,void 0,void 0,function(){var r,o;return Dl(this,function(n){switch(n.label){case 0:return r=iP.getSanitizedOptions(t),o=new uP(e,r),[4,o.execute()];case 1:return[2,n.sent()]}})})}Oo.backOff=sP;var uP=function(){function e(t,r){this.request=t,this.options=r,this.attemptNumber=0}return e.prototype.execute=function(){return Vl(this,void 0,void 0,function(){var t,r;return Dl(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 Vl(this,void 0,void 0,function(){var t;return Dl(this,function(r){switch(r.label){case 0:return t=cP.DelayFactory(this.options,this.attemptNumber),[4,t.apply()];case 1:return r.sent(),[2]}})})},e}()});var Xc=Ie((Fd,Pd)=>{"use strict";(function(e,t){typeof Fd=="object"&&typeof Pd<"u"?Pd.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs=t()})(Fd,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,S={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(V){var k=["th","st","nd","rd"],w=V%100;return"["+V+(k[(w-20)%10]||k[w]||k[0])+"]"}},x=function(V,k,w){var M=String(V);return!M||M.length>=k?V:""+Array(k+1-M.length).join(w)+V},y={s:x,z:function(V){var k=-V.utcOffset(),w=Math.abs(k),M=Math.floor(w/60),N=w%60;return(k<=0?"+":"-")+x(M,2,"0")+":"+x(N,2,"0")},m:function V(k,w){if(k.date()<w.date())return-V(w,k);var M=12*(w.year()-k.year())+(w.month()-k.month()),N=k.clone().add(M,s),j=w-N<0,U=k.clone().add(M+(j?-1:1),s);return+(-(M+(w-N)/(j?N-U:U-N))||0)},a:function(V){return V<0?Math.ceil(V)||0:Math.floor(V)},p:function(V){return{M:s,y:d,w:u,d:c,D:p,h:i,m:a,s:n,ms:o,Q:l}[V]||String(V||"").toLowerCase().replace(/s$/,"")},u:function(V){return V===void 0}},C="en",P={};P[C]=S;var O="$isDayjsObject",A=function(V){return V instanceof q||!(!V||!V[O])},F=function V(k,w,M){var N;if(!k)return C;if(typeof k=="string"){var j=k.toLowerCase();P[j]&&(N=j),w&&(P[j]=w,N=j);var U=k.split("-");if(!N&&U.length>1)return V(U[0])}else{var W=k.name;P[W]=k,N=W}return!M&&N&&(C=N),N||!M&&C},E=function(V,k){if(A(V))return V.clone();var w=typeof k=="object"?k:{};return w.date=V,w.args=arguments,new q(w)},I=y;I.l=F,I.i=A,I.w=function(V,k){return E(V,{locale:k.$L,utc:k.$u,x:k.$x,$offset:k.$offset})};var q=function(){function V(w){this.$L=F(w.locale,null,!0),this.parse(w),this.$x=this.$x||w.x||{},this[O]=!0}var k=V.prototype;return k.parse=function(w){this.$d=function(M){var N=M.date,j=M.utc;if(N===null)return new Date(NaN);if(I.u(N))return new Date;if(N instanceof Date)return new Date(N);if(typeof N=="string"&&!/Z$/i.test(N)){var U=N.match(f);if(U){var W=U[2]-1||0,Y=(U[7]||"0").substring(0,3);return j?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(N)}(w),this.init()},k.init=function(){var w=this.$d;this.$y=w.getFullYear(),this.$M=w.getMonth(),this.$D=w.getDate(),this.$W=w.getDay(),this.$H=w.getHours(),this.$m=w.getMinutes(),this.$s=w.getSeconds(),this.$ms=w.getMilliseconds()},k.$utils=function(){return I},k.isValid=function(){return this.$d.toString()!==m},k.isSame=function(w,M){var N=E(w);return this.startOf(M)<=N&&N<=this.endOf(M)},k.isAfter=function(w,M){return E(w)<this.startOf(M)},k.isBefore=function(w,M){return this.endOf(M)<E(w)},k.$g=function(w,M,N){return I.u(w)?this[M]:this.set(N,w)},k.unix=function(){return Math.floor(this.valueOf()/1e3)},k.valueOf=function(){return this.$d.getTime()},k.startOf=function(w,M){var N=this,j=!!I.u(M)||M,U=I.p(w),W=function(Qt,be){var mt=I.w(N.$u?Date.UTC(N.$y,be,Qt):new Date(N.$y,be,Qt),N);return j?mt:mt.endOf(c)},Y=function(Qt,be){return I.w(N.toDate()[Qt].apply(N.toDate("s"),(j?[0,0,0,0]:[23,59,59,999]).slice(be)),N)},J=this.$W,Z=this.$M,ee=this.$D,ce="set"+(this.$u?"UTC":"");switch(U){case d:return j?W(1,0):W(31,11);case s:return j?W(1,Z):W(0,Z+1);case u:var ve=this.$locale().weekStart||0,Fo=(J<ve?J+7:J)-ve;return W(j?ee-Fo:ee+(6-Fo),Z);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()}},k.endOf=function(w){return this.startOf(w,!1)},k.$set=function(w,M){var N,j=I.p(w),U="set"+(this.$u?"UTC":""),W=(N={},N[c]=U+"Date",N[p]=U+"Date",N[s]=U+"Month",N[d]=U+"FullYear",N[i]=U+"Hours",N[a]=U+"Minutes",N[n]=U+"Seconds",N[o]=U+"Milliseconds",N)[j],Y=j===c?this.$D+(M-this.$W):M;if(j===s||j===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},k.set=function(w,M){return this.clone().$set(w,M)},k.get=function(w){return this[I.p(w)]()},k.add=function(w,M){var N,j=this;w=Number(w);var U=I.p(M),W=function(Z){var ee=E(j);return I.w(ee.date(ee.date()+Math.round(Z*w)),j)};if(U===s)return this.set(s,this.$M+w);if(U===d)return this.set(d,this.$y+w);if(U===c)return W(1);if(U===u)return W(7);var Y=(N={},N[a]=t,N[i]=r,N[n]=e,N)[U]||1,J=this.$d.getTime()+w*Y;return I.w(J,this)},k.subtract=function(w,M){return this.add(-1*w,M)},k.format=function(w){var M=this,N=this.$locale();if(!this.isValid())return N.invalidDate||m;var j=w||"YYYY-MM-DDTHH:mm:ssZ",U=I.z(this),W=this.$H,Y=this.$m,J=this.$M,Z=N.weekdays,ee=N.months,ce=N.meridiem,ve=function(be,mt,pr,Or){return be&&(be[mt]||be(M,j))||pr[mt].slice(0,Or)},Fo=function(be){return I.s(W%12||12,be,"0")},Qt=ce||function(be,mt,pr){var Or=be<12?"AM":"PM";return pr?Or.toLowerCase():Or};return j.replace(g,function(be,mt){return mt||function(pr){switch(pr){case"YY":return String(M.$y).slice(-2);case"YYYY":return I.s(M.$y,4,"0");case"M":return J+1;case"MM":return I.s(J+1,2,"0");case"MMM":return ve(N.monthsShort,J,ee,3);case"MMMM":return ve(ee,J);case"D":return M.$D;case"DD":return I.s(M.$D,2,"0");case"d":return String(M.$W);case"dd":return ve(N.weekdaysMin,M.$W,Z,2);case"ddd":return ve(N.weekdaysShort,M.$W,Z,3);case"dddd":return Z[M.$W];case"H":return String(W);case"HH":return I.s(W,2,"0");case"h":return Fo(1);case"hh":return Fo(2);case"a":return Qt(W,Y,!0);case"A":return Qt(W,Y,!1);case"m":return String(Y);case"mm":return I.s(Y,2,"0");case"s":return String(M.$s);case"ss":return I.s(M.$s,2,"0");case"SSS":return I.s(M.$ms,3,"0");case"Z":return U}return null}(be)||U.replace(":","")})},k.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},k.diff=function(w,M,N){var j,U=this,W=I.p(M),Y=E(w),J=(Y.utcOffset()-this.utcOffset())*t,Z=this-Y,ee=function(){return I.m(U,Y)};switch(W){case d:j=ee()/12;break;case s:j=ee();break;case l:j=ee()/3;break;case u:j=(Z-J)/6048e5;break;case c:j=(Z-J)/864e5;break;case i:j=Z/r;break;case a:j=Z/t;break;case n:j=Z/e;break;default:j=Z}return N?j:I.a(j)},k.daysInMonth=function(){return this.endOf(s).$D},k.$locale=function(){return P[this.$L]},k.locale=function(w,M){if(!w)return this.$L;var N=this.clone(),j=F(w,M,!0);return j&&(N.$L=j),N},k.clone=function(){return I.w(this.$d,this)},k.toDate=function(){return new Date(this.valueOf())},k.toJSON=function(){return this.isValid()?this.toISOString():null},k.toISOString=function(){return this.$d.toISOString()},k.toString=function(){return this.$d.toUTCString()},V}(),Q=q.prototype;return E.prototype=Q,[["$ms",o],["$s",n],["$m",a],["$H",i],["$W",c],["$M",s],["$y",d],["$D",p]].forEach(function(V){Q[V[1]]=function(k){return this.$g(k,V[0],V[1])}}),E.extend=function(V,k){return V.$i||(V(k,q,E),V.$i=!0),E},E.locale=F,E.isDayjs=A,E.unix=function(V){return E(1e3*V)},E.en=P[C],E.Ls=P,E.p={},E})});var Wg=Ie((Ad,vd)=>{"use strict";(function(e,t){typeof Ad=="object"&&typeof vd<"u"?vd.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_quarterOfYear=t()})(Ad,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 Kg=Ie((bd,Id)=>{"use strict";(function(e,t){typeof bd=="object"&&typeof Id<"u"?Id.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_customParseFormat=t()})(bd,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 S=g.match(/([+-]|\d\d)/g),x=60*S[1]+(+S[2]||0);return x===0?0:S[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 S,x=i.meridiem;if(x){for(var y=1;y<=24;y+=1)if(f.indexOf(x(y,0,g))>-1){S=y>12;break}}else S=f===(g?"pm":"PM");return S},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,S=f.match(/\d+/);if(this.day=S[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"),S=(l("monthsShort")||g.map(function(x){return x.slice(0,3)})).indexOf(f)+1;if(S<1)throw new Error;this.month=S%12||S}],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,S;g=f,S=i&&i.formats;for(var x=(f=g.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(E,I,q){var Q=q&&q.toUpperCase();return I||S[q]||e[q]||S[Q].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(V,k,w){return k||w.slice(1)})})).match(t),y=x.length,C=0;C<y;C+=1){var P=x[C],O=p[P],A=O&&O[0],F=O&&O[1];x[C]=F?{regex:A,parser:F}:P.replace(/^\[|\]$/g,"")}return function(E){for(var I={},q=0,Q=0;q<y;q+=1){var V=x[q];if(typeof V=="string")Q+=V.length;else{var k=V.regex,w=V.parser,M=E.slice(Q),N=k.exec(M)[0];w.call(I,N),E=E.replace(N,"")}}return function(j){var U=j.afternoon;if(U!==void 0){var W=j.hours;U?W<12&&(j.hours+=12):W===12&&(j.hours=0),delete j.afternoon}}(I),I}}return function(f,g,S){S.p.customParseFormat=!0,f&&f.parseTwoDigitYear&&(c=f.parseTwoDigitYear);var x=g.prototype,y=x.parse;x.parse=function(C){var P=C.date,O=C.utc,A=C.args;this.$u=O;var F=A[1];if(typeof F=="string"){var E=A[2]===!0,I=A[3]===!0,q=E||I,Q=A[2];I&&(Q=A[2]),i=this.$locale(),!E&&Q&&(i=S.Ls[Q]),this.$d=function(M,N,j,U){try{if(["x","X"].indexOf(N)>-1)return new Date((N==="X"?1e3:1)*M);var W=m(N)(M),Y=W.year,J=W.month,Z=W.day,ee=W.hours,ce=W.minutes,ve=W.seconds,Fo=W.milliseconds,Qt=W.zone,be=W.week,mt=new Date,pr=Z||(Y||J?1:mt.getDate()),Or=Y||mt.getFullYear(),ji=0;Y&&!J||(ji=J>0?J-1:mt.getMonth());var _i,Ju=ee||0,Xu=ce||0,Zu=ve||0,el=Fo||0;return Qt?new Date(Date.UTC(Or,ji,pr,Ju,Xu,Zu,el+60*Qt.offset*1e3)):j?new Date(Date.UTC(Or,ji,pr,Ju,Xu,Zu,el)):(_i=new Date(Or,ji,pr,Ju,Xu,Zu,el),be&&(_i=U(_i).week(be).toDate()),_i)}catch{return new Date("")}}(P,F,O,S),this.init(),Q&&Q!==!0&&(this.$L=this.locale(Q).$L),q&&P!=this.format(F)&&(this.$d=new Date("")),i={}}else if(F instanceof Array)for(var V=F.length,k=1;k<=V;k+=1){A[1]=F[k-1];var w=S.apply(this,A);if(w.isValid()){this.$d=w.$d,this.$L=w.$L,this.init();break}k===V&&(this.$d=new Date(""))}else y.call(this,C)}}})});var BS=Ie((RH,US)=>{"use strict";var fw=/(^|; )Coveo-Pendragon=([^;]*)/;US.exports=()=>fw.exec(document.cookie)?.pop()||null});var _S=Ie((fm,gm)=>{"use strict";(function(e,t){typeof fm=="object"&&typeof gm<"u"?gm.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_timezone=t()})(fm,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,S){S===void 0&&(S={});var x=S.timeZoneName||"short",y=g+"|"+x,C=t[y];return C||(C=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]=C),C}(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],S=g.type,x=g.value,y=e[S];y>=0&&(m[y]=parseInt(x,10))}var C=m[3],P=C===24?0:C,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}),S=Math.round((f-new Date(g))/1e3/60),x=15*-Math.round(f.getTimezoneOffset()/15)-S;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 S=function(P,O,A){var F=P-60*O*1e3,E=c(F,A);if(O===E)return[F,O];var I=c(F-=60*(E-O)*1e3,A);return E===I?[F,E]:[P-60*Math.min(E,I)*1e3,Math.max(E,I)]}(n.utc(l,m).valueOf(),g,f),x=S[0],y=S[1],C=n(x).utcOffset(y);return C.$x.$timezone=f,C},n.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},n.tz.setDefault=function(l){a=l}}})});var $S=Ie((ym,hm)=>{"use strict";(function(e,t){typeof ym=="object"&&typeof hm<"u"?hm.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_utc=t()})(ym,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(C){C===void 0&&(C="");var P=C.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 S=Math.abs(m)<=16?60*m:m,x=this;if(f)return x.$offset=S,x.$u=m===0,x;if(m!==0){var y=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(x=this.local().add(S+y,e)).$offset=S,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 S=this.local(),x=a(m).local();return p.call(S,x,f,g)}}})});var oC=Ie((E2,rC)=>{"use strict";function Pw(e){try{return JSON.stringify(e)}catch{return'"[Circular]"'}}rC.exports=Aw;function Aw(e,t,r){var o=r&&r.stringify||Pw,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 uC=Ie((T2,su)=>{"use strict";var nC=oC();su.exports=Tr;var qi=Qw().console||{},vw={mapHttpRequest:cu,mapHttpResponse:cu,wrapRequestSerializer:xm,wrapResponseSerializer:xm,wrapErrorSerializer:xm,req:cu,res:cu,err:iC,errWithCause:iC};function Co(e,t){return e==="silent"?1/0:t.levels.values[e]}var Pm=Symbol("pino.logFuncs"),Rm=Symbol("pino.hierarchy"),bw={error:"log",fatal:"error",warn:"error",info:"log",debug:"log",trace:"log"};function aC(e,t){let r={logger:t,parent:e[Rm]};t[Rm]=r}function Iw(e,t,r){let o={};t.forEach(n=>{o[n]=r[n]?r[n]:qi[n]||qi[bw[n]||"log"]||ya}),e[Pm]=o}function ww(e,t){return Array.isArray(e)?e.filter(function(o){return o!=="!stdSerializers.err"}):e===!0?Object.keys(t):!1}function Tr(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||qi;e.browser.write&&(e.browser.asObject=!0);let o=e.serializers||{},n=ww(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=ya),Iw(s,c,r),aC({},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:Nw(e),messageKey:e.messageKey||"msg",onChild:e.onChild||ya};s.levels=Ew(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=ya,s.serializers=o,s._serialize=n,s._stdErrSerialize=a,s.child=function(...g){return f.call(this,l,...g)},t&&(s._logEvent=Fm());function d(){return Co(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,Go(this,l,s,"error"),Go(this,l,s,"fatal"),Go(this,l,s,"warn"),Go(this,l,s,"info"),Go(this,l,s,"debug"),Go(this,l,s,"trace"),i.forEach(S=>{Go(this,l,s,S)})}function f(g,S,x){if(!S)throw new Error("missing bindings for child Pino");x=x||{},n&&S.serializers&&(x.serializers=S.serializers);let y=x.serializers;if(n&&y){var C=Object.assign({},o,y),P=e.browser.serialize===!0?Object.keys(C):n;delete S.serializers,Am([S],P,C,this._stdErrSerialize)}function O(F){this._childLevel=(F._childLevel|0)+1,this.bindings=S,C&&(this.serializers=C,this._serialize=P),t&&(this._logEvent=Fm([].concat(F._logEvent.bindings,S)))}O.prototype=this;let A=new O(this);return aC(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 Ew(e){let t=e.customLevels||{},r=Object.assign({},Tr.levels.values,t),o=Object.assign({},Tr.levels.labels,Tw(t));return{values:r,labels:o}}function Tw(e){let t={};return Object.keys(e).forEach(function(r){t[e[r]]=r}),t}Tr.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"}};Tr.stdSerializers=vw;Tr.stdTimeFunctions=Object.assign({},{nullTime:cC,epochTime:sC,unixTime:Mw,isoTime:Lw});function Ow(e){let t=[];e.bindings&&t.push(e.bindings);let r=e[Rm];for(;r.parent;)r=r.parent,r.logger.bindings&&t.push(r.logger.bindings);return t.reverse()}function Go(e,t,r,o){if(Object.defineProperty(e,o,{value:Co(e.level,r)>Co(o,r)?ya:r[Pm][o],writable:!0,enumerable:!0,configurable:!0}),e[o]===ya){if(!t.transmit)return;let a=t.transmit.level||e.level,i=Co(a,r);if(Co(o,r)<i)return}e[o]=kw(e,t,r,o);let n=Ow(e);n.length!==0&&(e[o]=qw(n,e[o]))}function qw(e,t){return function(){return t.apply(this,[...e,...arguments])}}function kw(e,t,r,o){return function(n){return function(){let i=t.timestamp(),c=new Array(arguments.length),u=Object.getPrototypeOf&&Object.getPrototypeOf(this)===qi?qi:this;for(var s=0;s<c.length;s++)c[s]=arguments[s];var l=!1;if(t.serialize&&(Am(c,this._serialize,this.serializers,this._stdErrSerialize),l=!0),t.asObject||t.formatters?n.call(u,Vw(this,o,c,i,t)):n.apply(u,c),t.transmit){let d=t.transmit.level||e._level,p=Co(d,r),m=Co(o,r);if(m<p)return;Dw(this,{ts:i,methodLevel:o,methodValue:m,transmitLevel:d,transmitValue:r.levels.values[t.transmit.level||e._level],send:t.transmit.send,val:Co(e._level,r)},c,l)}}}(e[Pm][o])}function Vw(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?nC(c.shift(),c):void 0}else typeof u=="string"&&(u=nC(c.shift(),c));return u!==void 0&&(s[n.messageKey]=u),i(s)}function Am(e,t,r,o){for(let n in e)if(o&&e[n]instanceof Error)e[n]=Tr.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 Dw(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||Am(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=Fm(s)}function Fm(e){return{ts:0,messages:[],bindings:e||[],level:{label:"",value:0}}}function iC(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 Nw(e){return typeof e.timestamp=="function"?e.timestamp:e.timestamp===!1?cC:sC}function cu(){return{}}function xm(e){return e}function ya(){}function cC(){return!1}function sC(){return Date.now()}function Mw(){return Math.round(Date.now()/1e3)}function Lw(){return new Date(Date.now()).toISOString()}function Qw(){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)||{}}}su.exports.default=Tr;su.exports.pino=Tr});var aq={};tl(aq,{HighlightUtils:()=>Il,ProductTemplatesHelpers:()=>AR,Selectors:()=>Al,SortBy:()=>pt,SortDirection:()=>Nr,buildCart:()=>Tf,buildCategoryFilterSuggestions:()=>Hu,buildCommerceEngine:()=>yC,buildContext:()=>_C,buildController:()=>z,buildDateRange:()=>br,buildFieldSuggestionsGenerator:()=>ER,buildFieldsSortCriterion:()=>za,buildFilterSuggestions:()=>Yu,buildFilterSuggestionsGenerator:()=>TR,buildInstantProducts:()=>gR,buildNotifyTrigger:()=>vR,buildProductListing:()=>sR,buildProductTemplatesManager:()=>FR,buildProductView:()=>lR,buildQueryTrigger:()=>IR,buildRecentQueriesList:()=>fR,buildRecommendations:()=>uR,buildRedirectionTrigger:()=>bR,buildRelevanceSortCriterion:()=>Et,buildSearch:()=>aR,buildSearchBox:()=>Wu,buildStandaloneSearchBox:()=>xR,deserializeRelativeDate:()=>oy,getAnalyticsNextApiBaseUrl:()=>dc,getCommerceApiBaseUrl:()=>pc,getOrganizationEndpoint:()=>Te,getSampleCommerceEngineConfiguration:()=>gC,loadCartActions:()=>Jw,loadCategoryFacetSetActions:()=>eE,loadConfigurationActions:()=>uE,loadContextActions:()=>zw,loadCoreFacetActions:()=>Zw,loadDateFacetActions:()=>oE,loadInstantProductsActions:()=>hE,loadLocationFacetActions:()=>rE,loadNumericFacetActions:()=>nE,loadPaginationActions:()=>Hw,loadProductActions:()=>Yw,loadProductListingActions:()=>Kw,loadProductListingParametersActions:()=>mE,loadQueryActions:()=>lE,loadQuerySetActions:()=>iE,loadQuerySuggestActions:()=>sE,loadRecentQueriesActions:()=>SE,loadRecommendationsActions:()=>Gw,loadRegularFacetActions:()=>tE,loadSearchActions:()=>Ww,loadSearchParametersActions:()=>dE,loadSortActions:()=>Xw,loadStandaloneSearchBoxSetActions:()=>RE,loadTriggersActions:()=>pE,productListingSerializer:()=>Du,searchSerializer:()=>Ro,validateRelativeDate:()=>Jr});module.exports=MR(aq);var Al={};tl(Al,{ProductListing:()=>Pl,Search:()=>Fl});var Ym="coveo-headless-internal-state",L=Symbol.for(Ym),Jm=e=>new Proxy(e,{ownKeys(t){return Reflect.ownKeys(t).filter(r=>r!==L)},get(t,r,o){return typeof r=="symbol"&&r.description===Ym&&r!==L&&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 Op=require("@coveo/bueno");function we(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 LR=typeof Symbol=="function"&&Symbol.observable||"@@observable",Xm=LR,rl=()=>Math.random().toString(36).substring(7).split("").join("."),QR={INIT:`@@redux/INIT${rl()}`,REPLACE:`@@redux/REPLACE${rl()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${rl()}`},$i=QR;function Bt(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 ol(e,t,r){if(typeof e!="function")throw new Error(we(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(we(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(we(1));return r(ol)(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((S,x)=>{i.set(x,S)}))}function l(){if(u)throw new Error(we(3));return n}function d(S){if(typeof S!="function")throw new Error(we(4));if(u)throw new Error(we(5));let x=!0;s();let y=c++;return i.set(y,S),function(){if(x){if(u)throw new Error(we(6));x=!1,s(),i.delete(y),a=null}}}function p(S){if(!Bt(S))throw new Error(we(7));if(typeof S.type>"u")throw new Error(we(8));if(typeof S.type!="string")throw new Error(we(17));if(u)throw new Error(we(9));try{u=!0,n=o(n,S)}finally{u=!1}return(a=i).forEach(y=>{y()}),S}function m(S){if(typeof S!="function")throw new Error(we(10));o=S,p({type:$i.REPLACE})}function f(){let S=d;return{subscribe(x){if(typeof x!="object"||x===null)throw new Error(we(11));function y(){let P=x;P.next&&P.next(l())}return y(),{unsubscribe:S(y)}},[Xm](){return this}}}return p({type:$i.INIT}),{dispatch:p,subscribe:d,getState:l,replaceReducer:m,[Xm]:f}}function UR(e){Object.keys(e).forEach(t=>{let r=e[t];if(typeof r(void 0,{type:$i.INIT})>"u")throw new Error(we(12));if(typeof r(void 0,{type:$i.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(we(13))})}function tn(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{UR(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 S=u&&u.type;throw new Error(we(14))}l[p]=g,s=s||g!==f}return s=s||o.length!==Object.keys(c).length,s?l:c}}function rn(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...o)=>t(r(...o)))}function Zm(...e){return t=>(r,o)=>{let n=t(r,o),a=()=>{throw new Error(we(15))},i={getState:n.getState,dispatch:(u,...s)=>a(u,...s)},c=e.map(u=>u(i));return a=rn(...c)(n.dispatch),{...n,dispatch:a}}}function zi(e){return Bt(e)&&"type"in e&&typeof e.type=="string"}var pl=Symbol.for("immer-nothing"),ka=Symbol.for("immer-draftable"),He=Symbol.for("immer-state");function Ee(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Ao=Object.getPrototypeOf;function nt(e){return!!e&&!!e[He]}function Ye(e){return e?np(e)||Array.isArray(e)||!!e[ka]||!!e.constructor?.[ka]||La(e)||Qa(e):!1}var BR=Object.prototype.constructor.toString();function np(e){if(!e||typeof e!="object")return!1;let t=Ao(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)===BR}function fl(e){return nt(e)||Ee(15,e),e[He].base_}function Va(e,t){vo(e)===0?Reflect.ownKeys(e).forEach(r=>{t(r,e[r],e)}):e.forEach((r,o)=>t(o,r,e))}function vo(e){let t=e[He];return t?t.type_:Array.isArray(e)?1:La(e)?2:Qa(e)?3:0}function Da(e,t){return vo(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function nl(e,t){return vo(e)===2?e.get(t):e[t]}function ap(e,t,r){let o=vo(e);o===2?e.set(t,r):o===3?e.add(r):e[t]=r}function jR(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function La(e){return e instanceof Map}function Qa(e){return e instanceof Set}function Po(e){return e.copy_||e.base_}function cl(e,t){if(La(e))return new Map(e);if(Qa(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);let r=np(e);if(t===!0||t==="class_only"&&!r){let o=Object.getOwnPropertyDescriptors(e);delete o[He];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(Ao(e),o)}else{let o=Ao(e);if(o!==null&&r)return{...e};let n=Object.create(o);return Object.assign(n,e)}}function Gi(e,t=!1){return Hi(e)||nt(e)||!Ye(e)||(vo(e)>1&&(e.set=e.add=e.clear=e.delete=_R),Object.freeze(e),t&&Object.entries(e).forEach(([r,o])=>Gi(o,!0))),e}function _R(){Ee(2)}function Hi(e){return Object.isFrozen(e)}var sl={};function bo(e){let t=sl[e];return t||Ee(0,e),t}function $R(e,t){sl[e]||(sl[e]=t)}var Na;function ip(){return Na}function zR(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function ep(e,t){t&&(bo("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function ul(e){ll(e),e.drafts_.forEach(WR),e.drafts_=null}function ll(e){e===Na&&(Na=e.parent_)}function tp(e){return Na=zR(Na,e)}function WR(e){let t=e[He];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function rp(e,t){t.unfinalizedDrafts_=t.drafts_.length;let r=t.drafts_[0];return e!==void 0&&e!==r?(r[He].modified_&&(ul(t),Ee(4)),Ye(e)&&(e=Wi(t,e),t.parent_||Ki(t,e)),t.patches_&&bo("Patches").generateReplacementPatches_(r[He].base_,e,t.patches_,t.inversePatches_)):e=Wi(t,r,[]),ul(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==pl?e:void 0}function Wi(e,t,r){if(Hi(t))return t;let o=t[He];if(!o)return Va(t,(n,a)=>op(e,o,t,n,a,r)),t;if(o.scope_!==e)return t;if(!o.modified_)return Ki(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),Va(a,(c,u)=>op(e,o,n,c,u,r,i)),Ki(e,n,!1),r&&e.patches_&&bo("Patches").generatePatches_(o,r,e.patches_,e.inversePatches_)}return o.copy_}function op(e,t,r,o,n,a,i){if(nt(n)){let c=a&&t&&t.type_!==3&&!Da(t.assigned_,o)?a.concat(o):void 0,u=Wi(e,n,c);if(ap(r,o,u),nt(u))e.canAutoFreeze_=!1;else return}else i&&r.add(n);if(Ye(n)&&!Hi(n)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Wi(e,n),(!t||!t.scope_.parent_)&&typeof o!="symbol"&&Object.prototype.propertyIsEnumerable.call(r,o)&&Ki(e,n)}}function Ki(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Gi(t,r)}function KR(e,t){let r=Array.isArray(e),o={type_:r?1:0,scope_:t?t.scope_:ip(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1},n=o,a=gl;r&&(n=[o],a=Ma);let{revoke:i,proxy:c}=Proxy.revocable(n,a);return o.draft_=c,o.revoke_=i,c}var gl={get(e,t){if(t===He)return e;let r=Po(e);if(!Da(r,t))return GR(e,r,t);let o=r[t];return e.finalized_||!Ye(o)?o:o===al(e.base_,t)?(il(e),e.copy_[t]=ml(o,e)):o},has(e,t){return t in Po(e)},ownKeys(e){return Reflect.ownKeys(Po(e))},set(e,t,r){let o=cp(Po(e),t);if(o?.set)return o.set.call(e.draft_,r),!0;if(!e.modified_){let n=al(Po(e),t),a=n?.[He];if(a&&a.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(jR(r,n)&&(r!==void 0||Da(e.base_,t)))return!0;il(e),dl(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 al(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,il(e),dl(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let r=Po(e),o=Reflect.getOwnPropertyDescriptor(r,t);return o&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:o.enumerable,value:r[t]}},defineProperty(){Ee(11)},getPrototypeOf(e){return Ao(e.base_)},setPrototypeOf(){Ee(12)}},Ma={};Va(gl,(e,t)=>{Ma[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});Ma.deleteProperty=function(e,t){return Ma.set.call(this,e,t,void 0)};Ma.set=function(e,t,r){return gl.set.call(this,e[0],t,r,e[0])};function al(e,t){let r=e[He];return(r?Po(r):e)[t]}function GR(e,t,r){let o=cp(t,r);return o?"value"in o?o.value:o.get?.call(e.draft_):void 0}function cp(e,t){if(!(t in e))return;let r=Ao(e);for(;r;){let o=Object.getOwnPropertyDescriptor(r,t);if(o)return o;r=Ao(r)}}function dl(e){e.modified_||(e.modified_=!0,e.parent_&&dl(e.parent_))}function il(e){e.copy_||(e.copy_=cl(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var HR=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"&&Ee(6),o!==void 0&&typeof o!="function"&&Ee(7);let n;if(Ye(t)){let a=tp(this),i=ml(t,void 0),c=!0;try{n=r(i),c=!1}finally{c?ul(a):ll(a)}return ep(a,o),rp(n,a)}else if(!t||typeof t!="object"){if(n=r(t),n===void 0&&(n=t),n===pl&&(n=void 0),this.autoFreeze_&&Gi(n,!0),o){let a=[],i=[];bo("Patches").generateReplacementPatches_(t,n,a,i),o(a,i)}return n}else Ee(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){Ye(e)||Ee(8),nt(e)&&(e=sp(e));let t=tp(this),r=ml(e,void 0);return r[He].isManual_=!0,ll(t),r}finishDraft(e,t){let r=e&&e[He];(!r||!r.isManual_)&&Ee(9);let{scope_:o}=r;return ep(o,t),rp(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=bo("Patches").applyPatches_;return nt(e)?o(e,t):this.produce(e,n=>o(n,t))}};function ml(e,t){let r=La(e)?bo("MapSet").proxyMap_(e,t):Qa(e)?bo("MapSet").proxySet_(e,t):KR(e,t);return(t?t.scope_:ip()).drafts_.push(r),r}function sp(e){return nt(e)||Ee(10,e),up(e)}function up(e){if(!Ye(e)||Hi(e))return e;let t=e[He],r;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=cl(e,t.scope_.immer_.useStrictShallowCopy_)}else r=cl(e,!0);return Va(r,(o,n)=>{ap(r,o,up(n))}),t&&(t.finalized_=!1),r}function lp(){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_:S,assigned_:x}=p,y=p.copy_;y.length<S.length&&([S,y]=[y,S],[f,g]=[g,f]);for(let C=0;C<S.length;C++)if(x[C]&&y[C]!==S[C]){let P=m.concat([C]);f.push({op:t,path:P,value:d(y[C])}),g.push({op:t,path:P,value:d(S[C])})}for(let C=S.length;C<y.length;C++){let P=m.concat([C]);f.push({op:r,path:P,value:d(y[C])})}for(let C=y.length-1;S.length<=C;--C){let P=m.concat([C]);g.push({op:o,path:P})}}function i(p,m,f,g){let{base_:S,copy_:x}=p;Va(p.assigned_,(y,C)=>{let P=nl(S,y),O=nl(x,y),A=C?Da(S,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_:S,copy_:x}=p,y=0;S.forEach(C=>{if(!x.has(C)){let P=m.concat([y]);f.push({op:o,path:P,value:C}),g.unshift({op:r,path:P,value:C})}y++}),y=0,x.forEach(C=>{if(!S.has(C)){let P=m.concat([y]);f.push({op:r,path:P,value:C}),g.unshift({op:o,path:P,value:C})}y++})}function u(p,m,f,g){f.push({op:t,path:[],value:m===pl?void 0:m}),g.push({op:t,path:[],value:p})}function s(p,m){return m.forEach(f=>{let{path:g,op:S}=f,x=p;for(let O=0;O<g.length-1;O++){let A=vo(x),F=g[O];typeof F!="string"&&typeof F!="number"&&(F=""+F),(A===0||A===1)&&(F==="__proto__"||F==="constructor")&&Ee(19),typeof x=="function"&&F==="prototype"&&Ee(19),x=nl(x,F),typeof x!="object"&&Ee(18,g.join("/"))}let y=vo(x),C=l(f.value),P=g[g.length-1];switch(S){case t:switch(y){case 2:return x.set(P,C);case 3:Ee(16);default:return x[P]=C}case r:switch(y){case 1:return P==="-"?x.push(C):x.splice(P,0,C);case 2:return x.set(P,C);case 3:return x.add(C);default:return x[P]=C}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:Ee(17,S)}}),p}function l(p){if(!Ye(p))return p;if(Array.isArray(p))return p.map(l);if(La(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(Ao(p));for(let f in p)m[f]=l(p[f]);return Da(p,ka)&&(m[ka]=p[ka]),m}function d(p){return nt(p)?l(p):p}$R("Patches",{applyPatches_:s,generatePatches_:n,generateReplacementPatches_:u})}var at=new HR,fr=at.produce,Yi=at.produceWithPatches.bind(at),lq=at.setAutoFreeze.bind(at),dq=at.setUseStrictShallowCopy.bind(at),yl=at.applyPatches.bind(at),mq=at.createDraft.bind(at),pq=at.finishDraft.bind(at);function YR(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function JR(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function XR(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 dp=e=>Array.isArray(e)?e:[e];function ZR(e){let t=Array.isArray(e[0])?e[0]:e;return XR(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function eF(e,t){let r=[],{length:o}=e;for(let n=0;n<o;n++)r.push(e[n].apply(null,t));return r}var yq=Symbol();var hq=Object.getPrototypeOf({});var tF=class{constructor(e){this.value=e}deref(){return this.value}},rF=typeof WeakRef<"u"?WeakRef:tF,oF=0,mp=1;function Ji(){return{s:oF,v:void 0,o:null,p:null}}function on(e,t={}){let r=Ji(),{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=Ji(),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=Ji(),f.set(m,c)):c=g}}let s=c,l;if(c.s===mp)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 rF(l):l}return s.s=mp,s.v=l,l}return i.clearCache=()=>{r=Ji(),i.resetResultsCount()},i.resultsCount=()=>a,i.resetResultsCount=()=>{a=0},i}function pp(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()),YR(s,`createSelector expects an output function after the inputs, but received: [${typeof s}]`);let l={...r,...u},{memoize:d,memoizeOptions:p=[],argsMemoize:m=on,argsMemoizeOptions:f=[],devModeChecks:g={}}=l,S=dp(p),x=dp(f),y=ZR(n),C=d(function(){return a++,s.apply(null,arguments)},...S),P=!0,O=m(function(){i++;let F=eF(y,arguments);return c=C.apply(null,F),c},...x);return Object.assign(O,{resultFunc:s,memoizedResultFunc:C,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 D=pp(on),nF=Object.assign((e,t=D)=>{JR(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:()=>nF});function fp(e){return({dispatch:r,getState:o})=>n=>a=>typeof a=="function"?a(r,o,e):n(a)}var gp=fp(),yp=fp;var aF=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?rn:rn.apply(null,arguments)},Iq=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}},iF=e=>e&&typeof e.match=="function";function h(e,t){function r(...o){if(t){let n=t(...o);if(!n)throw new Error(wt(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=>zi(o)&&o.type===e,r}var Rp=class Ua extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,Ua.prototype)}static get[Symbol.species](){return Ua}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new Ua(...t[0].concat(this)):new Ua(...t.concat(this))}};function hp(e){return Ye(e)?fr(e,()=>{}):e}function Sp(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function cF(e){return typeof e=="boolean"}var sF=()=>function(t){let{thunk:r=!0,immutableCheck:o=!0,serializableCheck:n=!0,actionCreatorCheck:a=!0}=t??{},i=new Rp;return r&&(cF(r)?i.push(gp):i.push(yp(r.extraArgument))),i},qr="RTK_autoBatch",an=()=>e=>({payload:e,meta:{[qr]:!0}}),Cp=e=>t=>{setTimeout(t,e)},uF=(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:Cp(10):e.type==="callback"?e.queueNotification:Cp(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?.[qr],a=!n,a&&(i||(i=!0,u(s))),o.dispatch(l)}finally{n=!0}}})},lF=e=>function(r){let{autoBatch:o=!0}=r??{},n=new Rp(e);return o&&n.push(uF(typeof o=="object"?o:void 0)),n};function Fp(e){let t=sF(),{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(Bt(r))c=tn(r);else throw new Error(wt(1));let u;typeof o=="function"?u=o(t):u=t();let s=rn;n&&(s=aF({trace:!1,...typeof n=="object"&&n}));let l=Zm(...u),d=lF(l),p=typeof i=="function"?i(d):d(),m=s(...p);return ol(c,a,m)}function Pp(e){let t={},r=[],o,n={addCase(a,i){let c=typeof a=="string"?a:a.type;if(!c)throw new Error(wt(28));if(c in t)throw new Error(wt(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 dF(e){return typeof e=="function"}function B(e,t){let[r,o,n]=Pp(t),a;if(dF(e))a=()=>hp(e());else{let c=hp(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(nt(l)){let m=d(l,u);return m===void 0?l:m}else{if(Ye(l))return fr(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 Ap=(e,t)=>iF(e)?e.match(t):e(t);function jt(...e){return t=>e.some(r=>Ap(r,t))}function nn(...e){return t=>e.every(r=>Ap(r,t))}function Zi(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 Ba(e){return typeof e[0]=="function"&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function ec(...e){return e.length===0?t=>Zi(t,["pending"]):Ba(e)?jt(...e.map(t=>t.pending)):ec()(e[0])}function Io(...e){return e.length===0?t=>Zi(t,["rejected"]):Ba(e)?jt(...e.map(t=>t.rejected)):Io()(e[0])}function ja(...e){let t=r=>r&&r.meta&&r.meta.rejectedWithValue;return e.length===0?nn(Io(...e),t):Ba(e)?nn(Io(...e),t):ja()(e[0])}function gr(...e){return e.length===0?t=>Zi(t,["fulfilled"]):Ba(e)?jt(...e.map(t=>t.fulfilled)):gr()(e[0])}function tc(...e){return e.length===0?t=>Zi(t,["pending","fulfilled","rejected"]):Ba(e)?jt(...e.flatMap(t=>[t.pending,t.rejected,t.fulfilled])):tc()(e[0])}var mF="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",rc=(e=21)=>{let t="",r=e;for(;r--;)t+=mF[Math.random()*64|0];return t},pF=["name","message","stack","code"],hl=class{constructor(e,t){De(this,"_type");this.payload=e,this.meta=t}},xp=class{constructor(e,t){De(this,"_type");this.payload=e,this.meta=t}},fF=e=>{if(typeof e=="object"&&e!==null){let t={};for(let r of pF)typeof e[r]=="string"&&(t[r]=e[r]);return t}return{message:String(e)}},_=(()=>{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||fF)(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):rc(),m=new AbortController,f,g;function S(y){g=y,m.abort()}let x=async function(){let y;try{let P=o?.condition?.(u,{getState:l,extra:d});if(yF(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:S,rejectWithValue:(A,F)=>new hl(A,F),fulfillWithValue:(A,F)=>new xp(A,F)})).then(A=>{if(A instanceof hl)throw A;return A instanceof xp?n(A.payload,p,u,A.meta):n(A,p,u)})])}catch(P){y=P instanceof hl?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:S,requestId:p,arg:u,unwrap(){return x.then(gF)}})}}return Object.assign(c,{pending:a,rejected:i,fulfilled:n,settled:jt(i,n),typePrefix:t})}return e.withTypes=()=>e,e})();function gF(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function yF(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var vp=Symbol.for("rtk-slice-createasyncthunk"),qq={[vp]:_};function hF(e,t){return`${e}/${t}`}function SF({creators:e}={}){let t=e?.asyncThunk?.[vp];return function(o){let{name:n,reducerPath:a=n}=o;if(!n)throw new Error(wt(11));typeof process<"u";let i=(typeof o.reducers=="function"?o.reducers(xF()):o.reducers)||{},c=Object.keys(i),u={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},s={addCase(y,C){let P=typeof y=="string"?y:y.type;if(!P)throw new Error(wt(12));if(P in u.sliceCaseReducersByType)throw new Error(wt(13));return u.sliceCaseReducersByType[P]=C,s},addMatcher(y,C){return u.sliceMatchers.push({matcher:y,reducer:C}),s},exposeAction(y,C){return u.actionCreators[y]=C,s},exposeCaseReducer(y,C){return u.sliceCaseReducersByName[y]=C,s}};c.forEach(y=>{let C=i[y],P={reducerName:y,type:hF(n,y),createNotation:typeof o.reducers=="function"};FF(C)?AF(P,C,s,t):RF(P,C,s)});function l(){let[y={},C=[],P=void 0]=typeof o.extraReducers=="function"?Pp(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 C)A.addMatcher(F.matcher,F.reducer);P&&A.addDefaultCase(P)})}let d=y=>y,p=new Map,m;function f(y,C){return m||(m=l()),m(y,C)}function g(){return m||(m=l()),m.getInitialState()}function S(y,C=!1){function P(A){let F=A[y];return typeof F>"u"&&C&&(F=g()),F}function O(A=d){let F=Sp(p,C,()=>new WeakMap);return Sp(F,A,()=>{let E={};for(let[I,q]of Object.entries(o.selectors??{}))E[I]=CF(q,A,g,C);return E})}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,...S(a),injectInto(y,{reducerPath:C,...P}={}){let O=C??a;return y.inject({reducerPath:O,reducer:f},P),{...x,...S(O,!0)}}};return x}}function CF(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 wo=SF();function xF(){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 RF({type:e,reducerName:t,createNotation:r},o,n){let a,i;if("reducer"in o){if(r&&!PF(o))throw new Error(wt(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 FF(e){return e._reducerDefinitionType==="asyncThunk"}function PF(e){return e._reducerDefinitionType==="reducerWithPrepare"}function AF({type:e,reducerName:t},r,o,n){if(!n)throw new Error(wt(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||Xi,pending:c||Xi,rejected:u||Xi,settled:s||Xi})}function Xi(){}var bp="listener",Ip="completed",wp="cancelled",kq=`task-${wp}`,Vq=`task-${Ip}`,Dq=`${bp}-${wp}`,Nq=`${bp}-${Ip}`;var{assign:Ep}=Object;var Sl="listenerMiddleware";var vF=Ep(h(`${Sl}/add`),{withTypes:()=>vF}),Mq=h(`${Sl}/removeAll`),bF=Ep(h(`${Sl}/remove`),{withTypes:()=>bF});var Lq=Symbol.for("rtk-state-proxy-original");function wt(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 kr=D(e=>e.commercePagination?.principal.perPage||0,e=>e),oc=D((e,t)=>e.commercePagination?.recommendations[t]?.perPage||0,e=>e),Vr=D(e=>e.commercePagination?.principal.totalEntries||0,e=>e),nc=D((e,t)=>e.commercePagination?.recommendations[t]?.totalEntries||0,e=>e),ac=D(e=>e.commercePagination?.principal.page||0,e=>e),Tp=D((e,t)=>e.commercePagination?.recommendations[t]?.page||0,e=>e);var Hq=D(e=>e[L].productListing.responseId,e=>e),_a=D(e=>e.productListing.responseId,e=>e),qp=D(e=>e.productListing.requestId,e=>e),$a=D(e=>e.productListing?.products.length||0,e=>e),kp=D(e=>({total:Vr(e),current:$a(e)}),({current:e,total:t})=>e<t),Vp=D(e=>e.productListing?.isLoading,e=>(0,Op.isNullOrUndefined)(e)?!1:e),Dp=D(e=>e.productListing?.error,e=>e??null);var Rl=require("@coveo/bueno");function Cl(e,t,r){if(e===void 0)return{};let o=t(e);return o!==r?{q:o}:{}}function xl(e,t,r){if(e===void 0)return{};let o=t(e);return o!==r?{sortCriteria:o}:{}}function _t(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 $t(e){let{activeValue:t,ancestryMap:r}=wF(e);return t?EF(t,r):[]}function wF(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 EF(e,t){let r=[];if(!e)return[];let o=e;do r.unshift(o),o=t.get(o);while(o);return r}function Np(){return{principal:Dr(),recommendations:{}}}function Dr(){return{page:0,perPage:0,totalEntries:0,totalPages:0}}var Tt=require("@coveo/bueno");var zt=require("@coveo/bueno"),pt=(r=>(r.Relevance="relevance",r.Fields="fields",r))(pt||{}),Nr=(r=>(r.Ascending="asc",r.Descending="desc",r))(Nr||{}),Et=()=>({by:"relevance"});var Zq=new zt.RecordValue({options:{required:!1},values:{by:new zt.EnumValue({enum:pt,required:!0}),fields:new zt.ArrayValue({each:new zt.RecordValue({values:{name:new zt.StringValue,direction:new zt.EnumValue({enum:Nr})}})})}});var za=e=>({by:"fields",fields:e}),Mp=new Tt.RecordValue({options:{required:!1},values:{by:new Tt.EnumValue({enum:pt,required:!0}),fields:new Tt.ArrayValue({each:new Tt.RecordValue({values:{field:new Tt.StringValue({required:!0}),direction:new Tt.EnumValue({enum:Nr}),displayName:new Tt.StringValue}})})}});function Eo(){return{appliedSort:Et(),availableSorts:[Et()]}}function ic(e){return{...TF(e?.commercePagination,t=>t.principal.page,Dr().page),...OF(e?.commercePagination,t=>t.principal.perPage,Dr().perPage),...xl(e?.commerceSort,t=>t.appliedSort,Eo().appliedSort),..._t(e.commerceFacetSet,Mr(e,"regular"),qF,"f"),..._t(e.commerceFacetSet,Mr(e,"regular"),kF,"fExcluded"),..._t(e.commerceFacetSet,Mr(e,"location"),VF,"lf"),..._t(e.commerceFacetSet,Mr(e,"hierarchical"),DF,"cf"),..._t(e.commerceFacetSet,Mr(e,"dateRange"),Lp,"df"),..._t(e.commerceFacetSet,Mr(e,"dateRange"),Qp,"dfExcluded"),..._t(e.commerceFacetSet,Mr(e,"numericalRange"),Lp,"nf"),..._t(e.commerceFacetSet,Mr(e,"numericalRange"),Qp,"nfExcluded"),...Up("selected",e.manualNumericFacetSet),...Up("excluded",e.manualNumericFacetSet)}}function TF(e,t,r){if(e===void 0)return{};let o=t(e);return o!==r?{page:o}:{}}function OF(e,t,r){if(e===void 0)return{};let o=t(e);return o!==r?{perPage:o}:{}}function qF(e){return e.values.filter(t=>t.state==="selected").map(t=>t.value)}function kF(e){return e.values.filter(t=>t.state==="excluded").map(t=>t.value)}function VF(e){return e.values.filter(t=>t.state==="selected").map(t=>t.value)}function Lp(e){return e.values.filter(t=>t.state==="selected")}function Qp(e){return e.values.filter(t=>t.state==="excluded")}function Up(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 DF(e){return $t(e.values).map(r=>r.value)}function Mr(e,t){return r=>e.commerceFacetSet[r].request.type===t}var cc=()=>({query:""});var Fk=D(e=>e[L].commerceSearch.responseId,e=>e),Wa=D(e=>e.commerceSearch.responseId,e=>e),Bp=D(e=>e.commerceSearch.requestId,e=>e),Ka=D(e=>e.commerceSearch?.products.length||0,e=>e),jp=D(e=>({total:Vr(e),current:Ka(e)}),({current:e,total:t})=>e<t),_p=D(e=>e.commerceSearch?.isLoading,e=>(0,Rl.isNullOrUndefined)(e)?!1:e),$p=D(e=>e.commerceSearch?.error,e=>e??null),sc=D(e=>e.commerceQuery?.query,e=>e??""),NF=D(e=>e.commerceSearch?.queryExecuted,e=>e),zp=(e,t)=>(0,Rl.isNullOrUndefined)(t.queryCorrection?.correctedQuery)?sc(e):t.queryCorrection.correctedQuery,Wp=e=>({...Cl(e?.commerceQuery,t=>t.query,cc().query),...ic(e)});function Kp(e){return{query:NF(e)||""}}var Fl;(t=>t.responseIdSelector=Gp(Wa))(Fl||(Fl={}));var Pl;(t=>t.responseIdSelector=Gp(_a))(Pl||(Pl={}));function Gp(e){return t=>e(t[L])}var Il={};tl(Il,{escape:()=>cn,getHighlightedSuggestion:()=>bl,highlightString:()=>LF});var Jp=require("@coveo/bueno");var To=(e,t=5)=>e+Math.random().toString(36).substring(2,2+t);function Hp(e){return Array.isArray(e)}function uc(e){return e.trim()===""}function Yp(e){let t={};for(let[r,o]of e)t[r]=o;return t}function Ga(e){if(typeof e!="object"||!e)return e;try{return JSON.parse(JSON.stringify(e))}catch{return e}}function LF(e){if(uc(e.openingDelimiter)||uc(e.closingDelimiter))throw Error("delimiters should be a non-empty string");if((0,Jp.isNullOrUndefined)(e.content)||uc(e.content))return e.content;if(e.highlights.length===0)return cn(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+=cn(e.content.slice(o,i)),r+=e.openingDelimiter,r+=cn(e.content.slice(i,c)),r+=e.closingDelimiter,o=c}return o!==t&&(r+=cn(e.content.slice(o))),r}function bl(e,t){return e=cn(e),e.replace(/\[(.*?)\]|\{(.*?)\}|\((.*?)\)/g,(r,o,n,a)=>o?vl(o,t.notMatchDelimiters):n?vl(n,t.exactMatchDelimiters):a?vl(a,t.correctionDelimiters):r)}function vl(e,t){return t?t.open+e+t.close:e}function cn(e){let t={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},r="(?:"+Object.keys(t).join("|")+")",o=RegExp(r),n=RegExp(r,"g");return o.test(e)?e.replace(n,a=>t[a]):e}var lf=Ut(af(),1);var lP="recommendation-internal-options",Dk=Symbol.for(lP);var $=new Error("Failed to load reducers."),sn=class extends Error{constructor(){super(),this.name="ExpiredToken",this.message="The token being used to perform the request is expired."}};var qo=class extends Error{constructor(r,o){super();De(this,"statusCode");this.name="Disconnected",this.message=`Client could not connect to the following URL: ${r}`,this.statusCode=o??0}};function cf(e){let t=[];for(let r in e){let o=encodeURIComponent(r),n=encodeURIComponent(e[r]);t.push(`${o}=${n}`)}return t.join("&")}function sf(e){return typeof e!="object"||!e?!1:Object.values(e).every(dP)}function dP(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"}function uf(e){return e===429}var un=class e{static async call(t){let r=mP(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(uf(u.status))throw u;return u};try{let u=await(0,lf.backOff)(c,{retry:s=>{let l=s&&uf(s.status);return l&&o.info("Platform retrying request"),l}});switch(u.status){case 419:case 401:throw o.info("Platform renewing token"),new sn;case 404:throw new qo(a,u.status);default:return o.info({response:u,requestInfo:n},"Platform response"),u}}catch(u){return u.message==="Failed to fetch"?new qo(a):u}}static async preprocessRequest(t,r){let{origin:o,preprocessRequest:n,logger:a,requestMetadata:i}=r,{signal:c,...u}=t,s=Ga(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 Te(e,t="prod",r="platform"){let o=t==="prod"?"":t,n=r==="platform"?"":`.${r}`;return`https://${e}${n}.org${o}.coveo.com`}function ft(e,t="prod"){return`${Te(e,t)}/rest/search/v2`}function dc(e,t="prod"){return`${Te(e,t,"analytics")}/rest/organizations/${e}/events/v1`}function mP(e){let{url:t,method:r,requestParams:o,contentType:n,accessToken:a,signal:i}=e,c=e.method==="POST"||e.method==="PUT",u=pP(o,n);return{url:t,method:r,headers:{"Content-Type":n,Authorization:`Bearer ${a}`,...e.headers},...c&&{body:u},signal:i}}function pP(e,t){return t==="application/x-www-form-urlencoded"?sf(e)?cf(e):"":JSON.stringify(e)}function fP(e){return{statusCode:e.statusCode,type:e.name,message:e.message}}function gP(e){return{statusCode:e.code,type:e.name,message:e.message,ignored:!0}}function Nl(e,t){if(t&&e.name==="AbortError")return{error:gP(e)};if(e instanceof qo)return{error:fP(e)};throw e}var ln=(e,t)=>({...Ja(e,t),requestParams:yP(e)}),yP=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}},Ja=(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 df=(e,t)=>({...Ja(e,t),requestParams:hP(e)}),hP=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 mf=e=>({...Ja(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 Ne=e=>e.error!==void 0,mc=class{constructor(t){this.options=t}async getProductListing(t){return this.query({...ln(t,"listing"),...this.options})}async search(t){let r=ln(t,"search");return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async getRecommendations(t){return this.query({...df(t,"recommendations"),...this.options})}async productSuggestions(t){let r=ln(t,"search/productSuggest");return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async querySuggest(t){let r=mf(t);return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async facetSearch(t,r){let o=ln(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=ln(t,"search");return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async query(t){let r=await un.call(t);if(r instanceof Error)return Nl(r);let o=await r.json();return r.ok?{success:o}:{error:o}}};function pc(e,t="prod"){return`${Te(e,t)}/rest/organizations/${e}/commerce/v2`}var fc=e=>e;var Ql=require("@coveo/bueno");var Je=require("@coveo/bueno"),T=new Je.StringValue({required:!0,emptyAllowed:!1}),re=new Je.StringValue({required:!1,emptyAllowed:!1}),fe=new Je.StringValue({required:!0,emptyAllowed:!0}),pf=new Je.StringValue({required:!1,emptyAllowed:!0}),ff=new Je.ArrayValue({each:T,required:!0}),gf=new Je.StringValue({required:!1,emptyAllowed:!1,regex:/^\d+\.\d+\.\d+$/}),$e=({message:e,name:t,stack:r})=>({message:e,name:t,stack:r}),Ce=(e,t)=>{if("required"in t)return{payload:new Je.Schema({value:t}).validate({value:e}).value};let n=new Je.RecordValue({options:{required:!0},values:t}).validate(e);if(n)throw new Je.SchemaValidationError(n);return{payload:e}},R=(e,t)=>{try{return Ce(e,t)}catch(r){return{payload:e,error:$e(r)}}},Xe=(e,t,r,o)=>{let n=`Check the initialState of ${o}`;return yf(e,t,r,n,"Controller initialization error")},ze=(e,t,r,o)=>{let n=`Check the options of ${o}`;return yf(e,t,r,n,"Controller initialization error")},yf=(e,t,r,o,n)=>{try{return t.validate(r,o)}catch(a){throw e.logger.error(a,n),a}};var We=require("@coveo/bueno");var dn="3.19.0-pre.afe9f4e635",hf=["@coveo/atomic","@coveo/quantic"];var Ml=()=>re,Sf=()=>T,ko=h("configuration/updateBasicConfiguration",e=>R(e,{accessToken:re,environment:new We.StringValue({required:!1,constrainTo:["prod","hipaa","stg","dev"]}),organizationId:re})),Cf=h("configuration/updateSearchConfiguration",e=>R(e,{proxyBaseUrl:new We.StringValue({required:!1,url:!0}),pipeline:new We.StringValue({required:!1,emptyAllowed:!0}),searchHub:re,timezone:re,locale:re,authenticationProviders:new We.ArrayValue({required:!1,each:T})})),mn={enabled:new We.BooleanValue({default:!0}),originContext:Ml(),originLevel2:Ml(),originLevel3:Ml(),proxyBaseUrl:new We.StringValue({required:!1,url:!0}),runtimeEnvironment:new We.Value,anonymous:new We.BooleanValue({default:!1}),deviceId:re,userDisplayName:re,documentLocation:re,trackingId:re,analyticsMode:new We.StringValue({constrainTo:["legacy","next"],required:!1,default:"next"}),source:new We.RecordValue({options:{required:!1},values:hf.reduce((e,t)=>(e[t]=gf,e),{})})},Ll=h("configuration/updateAnalyticsConfiguration",e=>R(e,mn)),gc=h("configuration/analytics/disable"),yc=h("configuration/analytics/enable"),xf=h("configuration/analytics/originlevel2",e=>R(e,{originLevel2:Sf()})),Rf=h("configuration/analytics/originlevel3",e=>R(e,{originLevel3:Sf()}));var pn=h("commerce/configuration/updateBasicConfiguration",e=>R(e,{accessToken:re,environment:new Ql.StringValue({required:!1,constrainTo:["prod","hipaa","stg","dev"]}),organizationId:re})),fn=h("commerce/configuration/updateProxyBaseUrl",e=>R(e,{proxyBaseUrl:new Ql.StringValue({required:!1,url:!0})})),gn=h("commerce/configuration/updateAnalyticsConfiguration",e=>R(e,{enabled:mn.enabled,proxyBaseUrl:mn.proxyBaseUrl,source:mn.source,trackingId:mn.trackingId})),hc=h("commerce/configuration/analytics/disable"),Sc=h("commerce/configuration/analytics/enable");var Lr=require("@coveo/bueno");var Ff=()=>({accessToken:"",environment:"prod",organizationId:"",analytics:{enabled:!0,trackingId:"",source:{}},commerce:{}});var Ul=B(Ff(),e=>e.addCase(pn,(t,r)=>{Pf(t,r.payload)}).addCase(ko,(t,r)=>{Pf(t,r.payload)}).addCase(fn,(t,r)=>{CP(t,r.payload)}).addCase(gn,(t,r)=>{xP(t,r.payload)}).addCase(hc,t=>{t.analytics.enabled=!1}).addCase(Sc,t=>{t.analytics.enabled=!0}));function Pf(e,t){(0,Lr.isNullOrUndefined)(t.accessToken)||(e.accessToken=t.accessToken),e.environment=t.environment??"prod",(0,Lr.isNullOrUndefined)(t.organizationId)||(e.organizationId=t.organizationId)}function CP(e,t){(0,Lr.isNullOrUndefined)(t.proxyBaseUrl)||(e.commerce.apiBaseUrl=t.proxyBaseUrl)}function xP(e,t){(0,Lr.isNullOrUndefined)(t.enabled)||(e.analytics.enabled=t.enabled),(0,Lr.isNullOrUndefined)(t.proxyBaseUrl)||(e.analytics.apiBaseUrl=t.proxyBaseUrl),(0,Lr.isNullOrUndefined)(t.source)||(e.analytics.source=t.source),(0,Lr.isNullOrUndefined)(t.trackingId)||(e.analytics.trackingId=t.trackingId)}function yn(e){return e.currency}var Af=(e,t)=>({currency:yn(t.commerceContext),products:RP(t.cart),transaction:e}),vf=(e,t)=>({currency:yn(t.commerceContext),...e}),Vo=D(e=>e.cart,e=>e.cartItems,(e,t)=>t.map(r=>e[r])),RP=D(Vo,e=>e.map(({quantity:t,...r})=>({quantity:t,product:r})));var Ot=require("@coveo/bueno");var Bl={productId:T,quantity:new Ot.NumberValue({required:!0,min:0}),name:new Ot.StringValue({required:!1}),price:new Ot.NumberValue({required:!1,min:0})},jl=new Ot.ArrayValue({each:new Ot.RecordValue({values:{...Bl}})}),_l={items:jl},bf=new Ot.Schema(_l);var Qr=h("commerce/cart/setItems",e=>R(e,jl)),hn=h("commerce/cart/updateItemQuantity",e=>R(e,Bl)),Sn=h("commerce/cart/purchase"),Cc=_("commerce/cart/emit/purchaseEvent",async(e,{extra:t,getState:r})=>{let o=Af(e,r()),{relay:n}=t;n.emit("ec.purchase",o)}),xc=_("commerce/cart/emit/cartActionEvent",async(e,{extra:t,getState:r})=>{let o=vf(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 If(e,t){return e.cart[Do(t)]}var wf=D(Vo,e=>e.reduce((t,r)=>t+r.quantity,0)),Ef=D(Vo,e=>e.reduce((t,r)=>t+r.price*r.quantity,0));function Tf(e,t={}){if(!FP(e))throw $;let{dispatch:r}=e,o=z(e),n=()=>e[L].cart,a={...t.initialState};Xe(e,bf,a,"buildCart"),a.items!==void 0&&r(Qr(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 Vo(n()))this.updateItemQuantity({...l,quantity:0})},purchase(l){r(Cc(l)),r(Sn())},updateItemQuantity(l){let d=If(n(),l);!d&&l.quantity<=0||u(l,d)||(i(l,d)&&r(xc(s(l,d))),r(hn(l)))},get state(){let l=n();return{items:Vo(l),totalQuantity:wf(l),totalPrice:Ef(l)}}}}function Do(e){return`${e.productId},${e.name},${e.price}`}function FP(e){return e.addReducers({cart:Cn}),!0}var Rc=()=>({cartItems:[],cart:{},purchasedItems:[],purchased:{}}),Of=e=>kf(e.cartItems,e.cart),qf=e=>kf(e.purchasedItems,e.purchased);function kf(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 Cn=B(Rc(),e=>{e.addCase(Qr,(t,{payload:r})=>{let{cart:o,cartItems:n}=r.reduce((a,i)=>{let c=Do(i);return{cartItems:[...a.cartItems,c],cart:{...a.cart,[c]:i},purchasedItems:[],purchased:{}}},Rc());Vf(t,n,o)}).addCase(hn,(t,{payload:r})=>{let o=Do(r);if(!(o in t.cart)){PP(r,t);return}if(r.quantity<=0){AP(r,t);return}t.cart[o]=r}).addCase(Sn,t=>{vP(t);let{cart:r,cartItems:o}=Rc();Vf(t,o,r)})});function Vf(e,t,r){e.cartItems=t,e.cart=r}function PP(e,t){if(e.quantity<=0)return;let r=Do(e);t.cartItems=[...t.cartItems,r],t.cart[r]=e}function AP(e,t){let r=Do(e);t.cartItems=t.cartItems.filter(o=>o!==r),delete t.cart[r]}function vP(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 Wt=require("@coveo/bueno");var bP=Intl.supportedValuesOf("currency"),IP=new Wt.StringValue({required:!0,emptyAllowed:!1,constrainTo:bP}),$l={url:T},zl={latitude:new Wt.NumberValue({min:-90,max:90,required:!0}),longitude:new Wt.NumberValue({min:-180,max:180,required:!0})},Xa={language:T,country:T,currency:IP,view:new Wt.RecordValue({options:{required:!0},values:$l}),location:new Wt.RecordValue({options:{required:!1},values:zl})},Df=new Wt.Schema(Xa);var se=h("commerce/context/set",e=>R(e,Xa)),ue=h("commerce/context/setView",e=>R(e,$l)),xn=h("commerce/context/setLocation",e=>R(e,zl));var Nf=()=>({language:"",country:"",currency:"",view:{url:""}});var Kt=B(Nf(),e=>{e.addCase(se,(t,{payload:r})=>r).addCase(ue,(t,{payload:r})=>{t.view=r}).addCase(xn,(t,{payload:r})=>{t.location=r})});var Fc=()=>({correctedQuery:"",corrections:[],originalQuery:""});var Qo=require("@coveo/bueno");var gt=h("breadcrumb/deselectAll"),Ur=h("breadcrumb/deselectAllNonBreadcrumbs");var Br=D(e=>e.source,e=>Object.entries(e).map(([t,r])=>`${t}@${r}`).concat(`@coveo/headless@${dn}`));var jr=(e,t)=>{let{view:r,location:o,...n}=e.commerceContext;return{accessToken:e.configuration.accessToken,url:e.configuration.commerce.apiBaseUrl??pc(e.configuration.organizationId,e.configuration.environment),organizationId:e.configuration.organizationId,trackingId:e.configuration.analytics.trackingId,...n,...e.configuration.analytics.enabled?{clientId:t.clientId}:{},context:{user:{...o,...t.userAgent?{userAgent:t.userAgent}:{}},view:{...r,...t.referrer?{referrer:t.referrer}:{}},capture:t.capture??e.configuration.analytics.enabled,cart:Of(e.cart),source:Br(e.configuration.analytics)}}};var Pc=(e,t,r)=>({...jr(e,t),...wP(e,r)}),wP=(e,t)=>{let r=t?e.commercePagination?.recommendations[t]:e.commercePagination?.principal;return r&&{page:r.page,...r.perPage&&{perPage:r.perPage}}};var yt=(e,t)=>({...Pc(e,t),facets:[...EP(e)],...e.commerceSort&&{sort:TP(e.commerceSort.appliedSort)}});function EP(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 TP(e){return e.by==="relevance"?{sortCriteria:"relevance"}:{sortCriteria:"fields",fields:e.fields.map(({name:t,direction:r})=>({field:t,direction:r}))}}var Rn=require("@coveo/bueno");var No=h("commerce/facets/core/updateNumberOfValues",e=>R(e,{facetId:T,numberOfValues:new Rn.NumberValue({required:!0,min:1})})),Mo=h("commerce/facets/core/updateIsFieldExpanded",e=>R(e,{facetId:T,isFieldExpanded:new Rn.BooleanValue({required:!0})})),ge=h("commerce/facets/core/clearAll"),Me=h("commerce/facets/core/deselectAllValues",e=>R(e,{facetId:T})),Lo=h("commerce/facets/core/updateFreezeCurrentValues",e=>R(e,{facetId:T,freezeCurrentValues:new Rn.BooleanValue({required:!0})})),Fn=h("commerce/facets/core/updateAutoSelectionForAll",e=>R(e,{allow:new Rn.BooleanValue({required:!0})}));var Wl=require("@coveo/bueno");var Ac={slotId:pf},OP={...Ac,pageSize:new Wl.NumberValue({required:!0,min:0})},hr=h("commerce/pagination/setPageSize",e=>R(e,OP)),qP={...Ac,page:new Wl.NumberValue({required:!0,min:0})},Gt=h("commerce/pagination/selectPage",e=>R(e,qP)),_r=h("commerce/pagination/nextPage",e=>R(e,Ac)),$r=h("commerce/pagination/previousPage",e=>R(e,Ac)),Pn=h("commerce/pagination/registerRecommendationsSlot",e=>R(e,{slotId:T}));var Mf=require("@coveo/bueno");var ye=h("commerce/query/update",e=>R(e,{query:new Mf.StringValue}));var Kl=require("@coveo/bueno");var vc=require("@coveo/bueno");var zr=h("commerce/triggers/query/updateIgnore",e=>R(e,{q:new vc.StringValue({emptyAllowed:!0,required:!0})})),An=h("commerce/triggers/query/applyModification",e=>R(e,new vc.RecordValue({values:{originalQuery:re,modification:re}})));var Za=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 Ne(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,Kl.isNullOrUndefined)(n)&&!(0,Kl.isNullOrUndefined)(n.correctedQuery)))return null;let{correctedQuery:i,originalQuery:c}=o.queryCorrection;return this.onUpdateQueryForCorrection(i??""),{...t,response:{...o},queryExecuted:zp(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(zr({q:""})),null;let a=this.getCurrentQuery(),i=await this.automaticallyRetryQueryWithTriggerModification(o);return Ne(i.response)?this.rejectWithValue(i.response.error):{...i,response:{...i.response.success},originalQuery:a}}async automaticallyRetryQueryWithTriggerModification(t){return this.dispatch(An({newQuery:t,originalQuery:this.getCurrentQuery()})),this.onUpdateQueryForCorrection(t),await this.fetchFromAPI({...yt(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 Ne(t.response)?null:t.response.success}get extra(){return this.config.extra}onUpdateQueryForCorrection(t){this.dispatch(ye({query:t}))}};var K=_("commerce/search/executeSearch",async(e,t)=>{let{getState:r}=t,o=r(),{navigatorContext:n}=t.extra,a=yt(o,n),i=sc(o),c=new Za(t),u=await c.fetchFromAPI({...a,query:i});return c.process(u)}),Wr=_("commerce/search/fetchMoreProducts",async(e,t)=>{let{getState:r}=t,o=r(),{navigatorContext:n}=t.extra;if(!jp(o))return null;let i=kr(o),u=Ka(o)/i,s=sc(o),l=yt(o,n),d=new Za(t),p=await d.fetchFromAPI({...l,query:s,page:u});return d.process(p)}),vn=_("commerce/search/prepareForSearchWithQuery",(e,t)=>{let{dispatch:r}=t;R(e,{query:new Qo.StringValue,clearFilters:new Qo.BooleanValue}),e.clearFilters&&(r(ge()),r(Ur())),r(Fn({allow:!0})),r(ye({query:e.query})),r(Gt({page:0}))}),bn=_("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({...jr(n,i),query:c});return Ne(u)?r(u.error):{response:{...u.success,products:u.success.products}}}),kP={child:new Qo.RecordValue({options:{required:!0},values:{permanentid:new Qo.StringValue({required:!0})}})},In=h("commerce/search/promoteChildToParent",e=>R(e,kP));function Lf(){return{wasCorrectedTo:"",queryCorrection:Fc(),originalQuery:""}}var bc=B(Lf(),e=>{e.addCase(K.pending,t=>{t.queryCorrection=Fc(),t.wasCorrectedTo=""}).addCase(K.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 G=T;var Ht=require("@coveo/bueno");var VP={state:new Ht.Value({required:!0}),numberOfResults:new Ht.NumberValue({required:!0,min:0}),value:new Ht.StringValue({required:!0,emptyAllowed:!0}),path:new Ht.ArrayValue({required:!0,each:T}),moreValuesAvailable:new Ht.BooleanValue({required:!1})};function ei(e){e.children.forEach(t=>{ei(t)}),Ce({state:e.state,numberOfResults:e.numberOfResults,value:e.value,path:e.path,moreValuesAvailable:e.moreValuesAvailable},VP)}var wn={facetId:G,field:T,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:T}),filterByBasePath:new de.BooleanValue({required:!1})},En=5,Qf=h("categoryFacet/register",e=>R(e,wn)),Uf=h("categoryFacet/toggleSelectValue",e=>{try{return Ce(e.facetId,T),ei(e.selection),{payload:e,error:null}}catch(t){return{payload:e,error:$e(t)}}}),Bf=h("categoryFacet/deselectAll",e=>R(e,wn.facetId)),YN=h("categoryFacet/updateNumberOfValues",e=>R(e,{facetId:wn.facetId,numberOfValues:wn.numberOfValues})),JN=h("categoryFacet/updateSortCriterion",e=>R(e,{facetId:wn.facetId,criterion:new de.Value})),XN=h("categoryFacet/updateBasePath",e=>R(e,{facetId:wn.facetId,basePath:new de.ArrayValue({each:T})}));var On=require("@coveo/bueno");var Tn=require("@coveo/bueno");var ti={facetId:G,captions:new Tn.RecordValue({options:{required:!1}}),numberOfValues:new Tn.NumberValue({required:!1,min:1}),query:new Tn.StringValue({required:!1,emptyAllowed:!0})};var DP={path:new On.ArrayValue({required:!0,each:T}),displayValue:fe,rawValue:fe,count:new On.NumberValue({required:!0,min:0})},ht=h("categoryFacet/selectSearchResult",e=>R(e,{facetId:G,value:new On.RecordValue({values:DP})})),Ic=h("categoryFacetSearch/register",e=>R(e,ti));var wc=require("@coveo/bueno");var jf={facetId:G,value:new wc.RecordValue({values:{displayValue:fe,rawValue:fe,count:new wc.NumberValue({required:!0,min:0})}})},Ec=h("facetSearch/register",e=>R(e,ti)),Kr=h("facetSearch/update",e=>R(e,ti)),it=h("facetSearch/toggleSelectValue",e=>R(e,jf)),qt=h("facetSearch/toggleExcludeValue",e=>R(e,jf));var _f=require("@coveo/bueno");var Sr=h("facetOptions/update",(e={freezeFacetOrder:!0})=>R(e,{freezeFacetOrder:new _f.BooleanValue({required:!1})})),Gl=h("facetOptions/facet/enable",e=>R(e,G)),Cr=h("facetOptions/facet/disable",e=>R(e,G));var NP=h("history/undo"),MP=h("history/redo"),Yt=h("history/snapshot"),hM=_("history/back",async(e,{dispatch:t})=>{t(NP()),await t(Fe())}),SM=_("history/forward",async(e,{dispatch:t})=>{t(MP()),await t(Fe())}),Fe=_("history/change",async(e,{getState:t})=>t().history.present);var me=require("@coveo/bueno"),Tc={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 Oe=h("searchParameters/restore",e=>R(e,Tc));var ao=require("@coveo/bueno");function xr(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 H;(function(e){e.search="search",e.click="click",e.custom="custom",e.view="view",e.collect="collect"})(H||(H={}));function Jl(){return typeof window<"u"}function ld(){return typeof navigator<"u"}function qn(){return typeof document<"u"}function Xl(){try{return typeof localStorage<"u"}catch{return!1}}function LP(){try{return typeof sessionStorage<"u"}catch{return!1}}function og(){return ld()&&navigator.cookieEnabled}var QP=[H.click,H.custom,H.search,H.view],UP=(e,t)=>QP.indexOf(e)!==-1?Object.assign({language:qn()?document.documentElement.lang:"unknown",userAgent:ld()?navigator.userAgent:"unknown"},t):t,ni=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?$f(t,r,a):(i=c.split("."),n=i[i.length-2]+"."+i[i.length-1],$f(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 $f(e,t,r,o){document.cookie=`${e}=${t}`+(r?`;expires=${r.toUTCString()}`:"")+(o?`;domain=${o}`:"")+";path=/;SameSite=Lax"}function BP(){return Xl()?localStorage:og()?new ai:LP()?sessionStorage:new Vn}var ai=class e{getItem(t){return ni.get(`${e.prefix}${t}`)}removeItem(t){ni.erase(`${e.prefix}${t}`)}setItem(t,r,o){ni.set(`${e.prefix}${t}`,r,o)}};ai.prefix="coveo_";var Zl=class{constructor(){this.cookieStorage=new ai}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)}},Vn=class{getItem(t){return null}removeItem(t){}setItem(t,r){}},ri="__coveo.analytics.history",ng=20,ag=1e3*60,ig=75,Dn=class{constructor(t){this.store=t||BP()}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(ri);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(ri);return t?JSON.parse(t):[]}catch{return[]}})}setHistory(t){try{this.store.setItem(ri,JSON.stringify(t.slice(0,ng)))}catch{}}clear(){try{this.store.removeItem(ri)}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,ig)),t}isValidEntry(t){let r=this.getMostRecentElement();return r&&r.value==t.value?(t.internalTime||0)-(r.internalTime||0)>ag:!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))}},cg=Object.freeze({__proto__:null,HistoryStore:Dn,MAX_NUMBER_OF_HISTORY_ELEMENTS:ng,MAX_VALUE_SIZE:ig,MIN_THRESHOLD_FOR_DUPLICATE_VALUE:ag,STORE_KEY:ri,default:Dn}),jP=(e,t)=>v(void 0,void 0,void 0,function*(){return e===H.view?(yield _P(t.contentIdValue),Object.assign({location:window.location.toString(),referrer:document.referrer,title:document.title},t)):t}),_P=e=>v(void 0,void 0,void 0,function*(){let t=new Dn,r={name:"PageView",value:e,time:new Date().toISOString()};yield t.addElementAsync(r)}),Oc,$P=new Uint8Array(16);function zP(){if(!Oc&&(Oc=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Oc))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Oc($P)}var WP=/^(?:[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 kc(e){return typeof e=="string"&&WP.test(e)}var qe=[];for(let e=0;e<256;++e)qe.push((e+256).toString(16).slice(1));function sg(e,t=0){return(qe[e[t+0]]+qe[e[t+1]]+qe[e[t+2]]+qe[e[t+3]]+"-"+qe[e[t+4]]+qe[e[t+5]]+"-"+qe[e[t+6]]+qe[e[t+7]]+"-"+qe[e[t+8]]+qe[e[t+9]]+"-"+qe[e[t+10]]+qe[e[t+11]]+qe[e[t+12]]+qe[e[t+13]]+qe[e[t+14]]+qe[e[t+15]]).toLowerCase()}function KP(e){if(!kc(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 GP(e){e=unescape(encodeURIComponent(e));let t=[];for(let r=0;r<e.length;++r)t.push(e.charCodeAt(r));return t}var HP="6ba7b810-9dad-11d1-80b4-00c04fd430c8",YP="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function JP(e,t,r){function o(n,a,i,c){var u;if(typeof n=="string"&&(n=GP(n)),typeof a=="string"&&(a=KP(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 sg(s)}try{o.name=e}catch{}return o.DNS=HP,o.URL=YP,o}var XP=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),zf={randomUUID:XP};function Uo(e,t,r){if(zf.randomUUID&&!t&&!e)return zf.randomUUID();e=e||{};let o=e.random||(e.rng||zP)();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 sg(o)}function ZP(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 Hl(e,t){return e<<t|e>>>32-t}function eA(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]=Hl(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=Hl(u,5)+ZP(f,s,l,d)+p+t[f]+c[m]>>>0;p=d,d=l,l=Hl(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 tA=JP("v5",80,eA),Wf=tA,ug="2.30.43",Kf=e=>`${e.protocol}//${e.hostname}${e.pathname.indexOf("/")===0?e.pathname:`/${e.pathname}`}${e.search}`,oi={pageview:"pageview",event:"event"},Vc=class{constructor({client:t,uuidGenerator:r=Uo}){this.client=t,this.uuidGenerator=r}},ed=class extends Vc{constructor({client:t,uuidGenerator:r=Uo}){super({client:t,uuidGenerator:r}),this.actionData={},this.pageViewId=r(),this.nextPageViewId=this.pageViewId,this.currentLocation=Kf(window.location),this.lastReferrer=qn()?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:qn()?document.title:"",encoding:qn()?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===oi.pageview&&(this.nextPageViewId=this.uuidGenerator(),this.hasSentFirstPageView=!0)}getNextValues(t,r){return{pageViewId:t===oi.pageview?this.nextPageViewId:this.pageViewId,referrer:t===oi.pageview&&this.hasSentFirstPageView?this.currentLocation:this.lastReferrer,location:t===oi.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 Kf(window.location)}},Gr=class e{constructor(t,r){if(!kc(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 kc(a)?new e(a,Number.parseInt(n)*1e3):null}};Gr.cvo_cid="cvo_cid";Gr.expirationTime=120;var td=class extends Vc{constructor({client:t,uuidGenerator:r=Uo}){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(Gr.cvo_cid,new Gr(o,Date.now()).toString()),r.toString()}catch{throw new Error("Invalid URL provided")}})}acceptFrom(t){this.client.setAcceptedLinkReferrers(t)}};td.Id="link";var St=Object.keys;function qc(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}var Yl=128,lg=192,Gf=224,Hf=240;function rA(e){return(e&248)===Hf?4:(e&Hf)===Gf?3:(e&Gf)===lg?2:1}function oA(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&Yl)!=Yl)break;if(r-=3,(o&lg)!=Yl){t-r>=rA(o)*3&&(r=t);break}}return e.substring(0,r)}var rd={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"},nA=St(rd).map(e=>rd[e]),aA=[...nA].join("|"),iA=new RegExp(`^(${aA}$)`),cA={svcAction:"svc_action",svcActionData:"svc_action_data"},sA=e=>St(e).filter(t=>e[t]!==void 0).reduce((t,r)=>{let o=rd[r]||r;return Object.assign(Object.assign({},t),{[o]:e[r]})},{}),uA=e=>iA.test(e),lA=[uA],Yf={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",price:"pr",quantity:"qt",coupon:"cc",position:"ps",group:"group"},Jf={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",position:"ps",price:"pr",group:"group"},Le={action:"pa",list:"pal",listSource:"pls"},Dc={id:"ti",revenue:"tr",tax:"tt",shipping:"ts",coupon:"tcc",affiliation:"ta",step:"cos",option:"col"},dA=["loyaltyCardId","loyaltyTier","thirdPartyPersona","companyName","favoriteStore","storeName","userIndustry","userRole","userDepartment","businessUnit"],od={id:"quoteId",affiliation:"quoteAffiliation"},nd={id:"reviewId",rating:"reviewRating",comment:"reviewComment"},mA={add:Le,bookmark_add:Le,bookmark_remove:Le,click:Le,checkout:Le,checkout_option:Le,detail:Le,impression:Le,remove:Le,refund:Object.assign(Object.assign({},Le),Dc),purchase:Object.assign(Object.assign({},Le),Dc),quickview:Le,quote:Object.assign(Object.assign({},Le),od),review:Object.assign(Object.assign({},Le),nd)},pA=St(Yf).map(e=>Yf[e]),fA=St(Jf).map(e=>Jf[e]),gA=St(Le).map(e=>Le[e]),yA=St(Dc).map(e=>Dc[e]),hA=St(nd).map(e=>nd[e]),SA=St(od).map(e=>od[e]),CA=[...pA,"custom"].join("|"),xA=[...fA,"custom"].join("|"),dg="(pr[0-9]+)",mg="(il[0-9]+pi[0-9]+)",RA=new RegExp(`^${dg}(${CA})$`),FA=new RegExp(`^(${mg}(${xA}))|(il[0-9]+nm)$`),PA=new RegExp(`^(${gA.join("|")})$`),AA=new RegExp(`^(${yA.join("|")})$`),vA=new RegExp(`^${dg}custom$`),bA=new RegExp(`^${mg}custom$`),IA=new RegExp(`^(${[...dA,...hA,...SA].join("|")})$`),wA=e=>RA.test(e),EA=e=>FA.test(e),TA=e=>PA.test(e),OA=e=>AA.test(e),qA=e=>IA.test(e),kA=[EA,wA,TA,OA,qA],VA=[vA,bA],DA={anonymizeIp:"aip"},NA={eventCategory:"ec",eventAction:"ea",eventLabel:"el",eventValue:"ev",page:"dp",visitorId:"cid",clientId:"cid",userId:"uid",currencyCode:"cu"},MA={hitType:"t",pageViewId:"pid",encoding:"de",location:"dl",referrer:"dr",screenColor:"sd",screenResolution:"sr",title:"dt",userAgent:"ua",language:"ul",eventId:"z",time:"tm"},LA=["contentId","contentIdKey","contentType","searchHub","tab","searchUid","permanentId","contentLocale","trackingId"],QA=Object.assign(Object.assign(Object.assign(Object.assign({},DA),NA),MA),LA.reduce((e,t)=>Object.assign(Object.assign({},e),{[t]:t}),{})),ad=Object.assign(Object.assign({},QA),cA),UA=e=>{let t=!!e.action&&mA[e.action]||{};return St(e).reduce((r,o)=>{let n=t[o]||ad[o]||o;return Object.assign(Object.assign({},r),{[n]:e[o]})},{})},BA=St(ad).map(e=>ad[e]),jA=e=>BA.indexOf(e)!==-1,_A=e=>e==="custom",$A=e=>[...kA,...lA,jA,_A].some(t=>t(e)),zA=e=>St(e).reduce((t,r)=>{let o=WA(r);return o?Object.assign(Object.assign({},t),KA(o,e[r])):Object.assign(Object.assign({},t),{[r]:e[r]})},{}),WA=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},KA=(e,t)=>St(t).reduce((r,o)=>Object.assign(Object.assign({},r),{[`${e}${o}`]:t[o]}),{}),id=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[H.click,H.custom,H.search,H.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}},cd=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()})}},Xf=globalThis.fetch,Nc=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=xr(u,["url"]),d;try{d=yield Xf(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 Xf(r,{headers:this.getHeaders(),method:"DELETE"})})}shouldAppendVisitorId(t){return[H.click,H.custom,H.search,H.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"})}},sd=class{constructor(t,r){Xl()&&og()?this.storage=new Zl:Xl()?this.storage=localStorage:(console.warn("BrowserRuntime detected no valid storage available.",this),this.storage=new Vn),this.client=new Nc(t),this.beaconClient=new id(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}},ud=class{constructor(t,r){this.storage=r||new Vn,this.client=new Nc(t)}getClientDependingOnEventType(t){return this.client}},Mc=class{constructor(){this.storage=new Vn,this.client=new cd}getClientDependingOnEventType(t){return this.client}},GA="xx",HA=e=>e?.startsWith(GA)||!1,YA=`
19
+ If you are trying to access the inner state... Don't`),Reflect.get(t,r,o)}});var Op=require("@coveo/bueno");function we(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 LR=typeof Symbol=="function"&&Symbol.observable||"@@observable",Xm=LR,rl=()=>Math.random().toString(36).substring(7).split("").join("."),QR={INIT:`@@redux/INIT${rl()}`,REPLACE:`@@redux/REPLACE${rl()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${rl()}`},$i=QR;function Bt(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 ol(e,t,r){if(typeof e!="function")throw new Error(we(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(we(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(we(1));return r(ol)(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((S,x)=>{i.set(x,S)}))}function l(){if(u)throw new Error(we(3));return n}function d(S){if(typeof S!="function")throw new Error(we(4));if(u)throw new Error(we(5));let x=!0;s();let y=c++;return i.set(y,S),function(){if(x){if(u)throw new Error(we(6));x=!1,s(),i.delete(y),a=null}}}function p(S){if(!Bt(S))throw new Error(we(7));if(typeof S.type>"u")throw new Error(we(8));if(typeof S.type!="string")throw new Error(we(17));if(u)throw new Error(we(9));try{u=!0,n=o(n,S)}finally{u=!1}return(a=i).forEach(y=>{y()}),S}function m(S){if(typeof S!="function")throw new Error(we(10));o=S,p({type:$i.REPLACE})}function f(){let S=d;return{subscribe(x){if(typeof x!="object"||x===null)throw new Error(we(11));function y(){let P=x;P.next&&P.next(l())}return y(),{unsubscribe:S(y)}},[Xm](){return this}}}return p({type:$i.INIT}),{dispatch:p,subscribe:d,getState:l,replaceReducer:m,[Xm]:f}}function UR(e){Object.keys(e).forEach(t=>{let r=e[t];if(typeof r(void 0,{type:$i.INIT})>"u")throw new Error(we(12));if(typeof r(void 0,{type:$i.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(we(13))})}function tn(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{UR(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 S=u&&u.type;throw new Error(we(14))}l[p]=g,s=s||g!==f}return s=s||o.length!==Object.keys(c).length,s?l:c}}function rn(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...o)=>t(r(...o)))}function Zm(...e){return t=>(r,o)=>{let n=t(r,o),a=()=>{throw new Error(we(15))},i={getState:n.getState,dispatch:(u,...s)=>a(u,...s)},c=e.map(u=>u(i));return a=rn(...c)(n.dispatch),{...n,dispatch:a}}}function zi(e){return Bt(e)&&"type"in e&&typeof e.type=="string"}var pl=Symbol.for("immer-nothing"),ka=Symbol.for("immer-draftable"),He=Symbol.for("immer-state");function Ee(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Ao=Object.getPrototypeOf;function nt(e){return!!e&&!!e[He]}function Ye(e){return e?np(e)||Array.isArray(e)||!!e[ka]||!!e.constructor?.[ka]||La(e)||Qa(e):!1}var BR=Object.prototype.constructor.toString();function np(e){if(!e||typeof e!="object")return!1;let t=Ao(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)===BR}function fl(e){return nt(e)||Ee(15,e),e[He].base_}function Va(e,t){vo(e)===0?Reflect.ownKeys(e).forEach(r=>{t(r,e[r],e)}):e.forEach((r,o)=>t(o,r,e))}function vo(e){let t=e[He];return t?t.type_:Array.isArray(e)?1:La(e)?2:Qa(e)?3:0}function Da(e,t){return vo(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function nl(e,t){return vo(e)===2?e.get(t):e[t]}function ap(e,t,r){let o=vo(e);o===2?e.set(t,r):o===3?e.add(r):e[t]=r}function jR(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function La(e){return e instanceof Map}function Qa(e){return e instanceof Set}function Po(e){return e.copy_||e.base_}function cl(e,t){if(La(e))return new Map(e);if(Qa(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);let r=np(e);if(t===!0||t==="class_only"&&!r){let o=Object.getOwnPropertyDescriptors(e);delete o[He];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(Ao(e),o)}else{let o=Ao(e);if(o!==null&&r)return{...e};let n=Object.create(o);return Object.assign(n,e)}}function Gi(e,t=!1){return Hi(e)||nt(e)||!Ye(e)||(vo(e)>1&&(e.set=e.add=e.clear=e.delete=_R),Object.freeze(e),t&&Object.entries(e).forEach(([r,o])=>Gi(o,!0))),e}function _R(){Ee(2)}function Hi(e){return Object.isFrozen(e)}var sl={};function bo(e){let t=sl[e];return t||Ee(0,e),t}function $R(e,t){sl[e]||(sl[e]=t)}var Na;function ip(){return Na}function zR(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function ep(e,t){t&&(bo("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function ul(e){ll(e),e.drafts_.forEach(WR),e.drafts_=null}function ll(e){e===Na&&(Na=e.parent_)}function tp(e){return Na=zR(Na,e)}function WR(e){let t=e[He];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function rp(e,t){t.unfinalizedDrafts_=t.drafts_.length;let r=t.drafts_[0];return e!==void 0&&e!==r?(r[He].modified_&&(ul(t),Ee(4)),Ye(e)&&(e=Wi(t,e),t.parent_||Ki(t,e)),t.patches_&&bo("Patches").generateReplacementPatches_(r[He].base_,e,t.patches_,t.inversePatches_)):e=Wi(t,r,[]),ul(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==pl?e:void 0}function Wi(e,t,r){if(Hi(t))return t;let o=t[He];if(!o)return Va(t,(n,a)=>op(e,o,t,n,a,r)),t;if(o.scope_!==e)return t;if(!o.modified_)return Ki(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),Va(a,(c,u)=>op(e,o,n,c,u,r,i)),Ki(e,n,!1),r&&e.patches_&&bo("Patches").generatePatches_(o,r,e.patches_,e.inversePatches_)}return o.copy_}function op(e,t,r,o,n,a,i){if(nt(n)){let c=a&&t&&t.type_!==3&&!Da(t.assigned_,o)?a.concat(o):void 0,u=Wi(e,n,c);if(ap(r,o,u),nt(u))e.canAutoFreeze_=!1;else return}else i&&r.add(n);if(Ye(n)&&!Hi(n)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Wi(e,n),(!t||!t.scope_.parent_)&&typeof o!="symbol"&&Object.prototype.propertyIsEnumerable.call(r,o)&&Ki(e,n)}}function Ki(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Gi(t,r)}function KR(e,t){let r=Array.isArray(e),o={type_:r?1:0,scope_:t?t.scope_:ip(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1},n=o,a=gl;r&&(n=[o],a=Ma);let{revoke:i,proxy:c}=Proxy.revocable(n,a);return o.draft_=c,o.revoke_=i,c}var gl={get(e,t){if(t===He)return e;let r=Po(e);if(!Da(r,t))return GR(e,r,t);let o=r[t];return e.finalized_||!Ye(o)?o:o===al(e.base_,t)?(il(e),e.copy_[t]=ml(o,e)):o},has(e,t){return t in Po(e)},ownKeys(e){return Reflect.ownKeys(Po(e))},set(e,t,r){let o=cp(Po(e),t);if(o?.set)return o.set.call(e.draft_,r),!0;if(!e.modified_){let n=al(Po(e),t),a=n?.[He];if(a&&a.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(jR(r,n)&&(r!==void 0||Da(e.base_,t)))return!0;il(e),dl(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 al(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,il(e),dl(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let r=Po(e),o=Reflect.getOwnPropertyDescriptor(r,t);return o&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:o.enumerable,value:r[t]}},defineProperty(){Ee(11)},getPrototypeOf(e){return Ao(e.base_)},setPrototypeOf(){Ee(12)}},Ma={};Va(gl,(e,t)=>{Ma[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});Ma.deleteProperty=function(e,t){return Ma.set.call(this,e,t,void 0)};Ma.set=function(e,t,r){return gl.set.call(this,e[0],t,r,e[0])};function al(e,t){let r=e[He];return(r?Po(r):e)[t]}function GR(e,t,r){let o=cp(t,r);return o?"value"in o?o.value:o.get?.call(e.draft_):void 0}function cp(e,t){if(!(t in e))return;let r=Ao(e);for(;r;){let o=Object.getOwnPropertyDescriptor(r,t);if(o)return o;r=Ao(r)}}function dl(e){e.modified_||(e.modified_=!0,e.parent_&&dl(e.parent_))}function il(e){e.copy_||(e.copy_=cl(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var HR=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"&&Ee(6),o!==void 0&&typeof o!="function"&&Ee(7);let n;if(Ye(t)){let a=tp(this),i=ml(t,void 0),c=!0;try{n=r(i),c=!1}finally{c?ul(a):ll(a)}return ep(a,o),rp(n,a)}else if(!t||typeof t!="object"){if(n=r(t),n===void 0&&(n=t),n===pl&&(n=void 0),this.autoFreeze_&&Gi(n,!0),o){let a=[],i=[];bo("Patches").generateReplacementPatches_(t,n,a,i),o(a,i)}return n}else Ee(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){Ye(e)||Ee(8),nt(e)&&(e=sp(e));let t=tp(this),r=ml(e,void 0);return r[He].isManual_=!0,ll(t),r}finishDraft(e,t){let r=e&&e[He];(!r||!r.isManual_)&&Ee(9);let{scope_:o}=r;return ep(o,t),rp(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=bo("Patches").applyPatches_;return nt(e)?o(e,t):this.produce(e,n=>o(n,t))}};function ml(e,t){let r=La(e)?bo("MapSet").proxyMap_(e,t):Qa(e)?bo("MapSet").proxySet_(e,t):KR(e,t);return(t?t.scope_:ip()).drafts_.push(r),r}function sp(e){return nt(e)||Ee(10,e),up(e)}function up(e){if(!Ye(e)||Hi(e))return e;let t=e[He],r;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=cl(e,t.scope_.immer_.useStrictShallowCopy_)}else r=cl(e,!0);return Va(r,(o,n)=>{ap(r,o,up(n))}),t&&(t.finalized_=!1),r}function lp(){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_:S,assigned_:x}=p,y=p.copy_;y.length<S.length&&([S,y]=[y,S],[f,g]=[g,f]);for(let C=0;C<S.length;C++)if(x[C]&&y[C]!==S[C]){let P=m.concat([C]);f.push({op:t,path:P,value:d(y[C])}),g.push({op:t,path:P,value:d(S[C])})}for(let C=S.length;C<y.length;C++){let P=m.concat([C]);f.push({op:r,path:P,value:d(y[C])})}for(let C=y.length-1;S.length<=C;--C){let P=m.concat([C]);g.push({op:o,path:P})}}function i(p,m,f,g){let{base_:S,copy_:x}=p;Va(p.assigned_,(y,C)=>{let P=nl(S,y),O=nl(x,y),A=C?Da(S,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_:S,copy_:x}=p,y=0;S.forEach(C=>{if(!x.has(C)){let P=m.concat([y]);f.push({op:o,path:P,value:C}),g.unshift({op:r,path:P,value:C})}y++}),y=0,x.forEach(C=>{if(!S.has(C)){let P=m.concat([y]);f.push({op:r,path:P,value:C}),g.unshift({op:o,path:P,value:C})}y++})}function u(p,m,f,g){f.push({op:t,path:[],value:m===pl?void 0:m}),g.push({op:t,path:[],value:p})}function s(p,m){return m.forEach(f=>{let{path:g,op:S}=f,x=p;for(let O=0;O<g.length-1;O++){let A=vo(x),F=g[O];typeof F!="string"&&typeof F!="number"&&(F=""+F),(A===0||A===1)&&(F==="__proto__"||F==="constructor")&&Ee(19),typeof x=="function"&&F==="prototype"&&Ee(19),x=nl(x,F),typeof x!="object"&&Ee(18,g.join("/"))}let y=vo(x),C=l(f.value),P=g[g.length-1];switch(S){case t:switch(y){case 2:return x.set(P,C);case 3:Ee(16);default:return x[P]=C}case r:switch(y){case 1:return P==="-"?x.push(C):x.splice(P,0,C);case 2:return x.set(P,C);case 3:return x.add(C);default:return x[P]=C}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:Ee(17,S)}}),p}function l(p){if(!Ye(p))return p;if(Array.isArray(p))return p.map(l);if(La(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(Ao(p));for(let f in p)m[f]=l(p[f]);return Da(p,ka)&&(m[ka]=p[ka]),m}function d(p){return nt(p)?l(p):p}$R("Patches",{applyPatches_:s,generatePatches_:n,generateReplacementPatches_:u})}var at=new HR,fr=at.produce,Yi=at.produceWithPatches.bind(at),lq=at.setAutoFreeze.bind(at),dq=at.setUseStrictShallowCopy.bind(at),yl=at.applyPatches.bind(at),mq=at.createDraft.bind(at),pq=at.finishDraft.bind(at);function YR(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function JR(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function XR(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 dp=e=>Array.isArray(e)?e:[e];function ZR(e){let t=Array.isArray(e[0])?e[0]:e;return XR(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function eF(e,t){let r=[],{length:o}=e;for(let n=0;n<o;n++)r.push(e[n].apply(null,t));return r}var yq=Symbol();var hq=Object.getPrototypeOf({});var tF=class{constructor(e){this.value=e}deref(){return this.value}},rF=typeof WeakRef<"u"?WeakRef:tF,oF=0,mp=1;function Ji(){return{s:oF,v:void 0,o:null,p:null}}function on(e,t={}){let r=Ji(),{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=Ji(),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=Ji(),f.set(m,c)):c=g}}let s=c,l;if(c.s===mp)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 rF(l):l}return s.s=mp,s.v=l,l}return i.clearCache=()=>{r=Ji(),i.resetResultsCount()},i.resultsCount=()=>a,i.resetResultsCount=()=>{a=0},i}function pp(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()),YR(s,`createSelector expects an output function after the inputs, but received: [${typeof s}]`);let l={...r,...u},{memoize:d,memoizeOptions:p=[],argsMemoize:m=on,argsMemoizeOptions:f=[],devModeChecks:g={}}=l,S=dp(p),x=dp(f),y=ZR(n),C=d(function(){return a++,s.apply(null,arguments)},...S),P=!0,O=m(function(){i++;let F=eF(y,arguments);return c=C.apply(null,F),c},...x);return Object.assign(O,{resultFunc:s,memoizedResultFunc:C,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 D=pp(on),nF=Object.assign((e,t=D)=>{JR(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:()=>nF});function fp(e){return({dispatch:r,getState:o})=>n=>a=>typeof a=="function"?a(r,o,e):n(a)}var gp=fp(),yp=fp;var aF=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?rn:rn.apply(null,arguments)},Iq=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}},iF=e=>e&&typeof e.match=="function";function h(e,t){function r(...o){if(t){let n=t(...o);if(!n)throw new Error(wt(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=>zi(o)&&o.type===e,r}var Rp=class Ua extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,Ua.prototype)}static get[Symbol.species](){return Ua}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new Ua(...t[0].concat(this)):new Ua(...t.concat(this))}};function hp(e){return Ye(e)?fr(e,()=>{}):e}function Sp(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function cF(e){return typeof e=="boolean"}var sF=()=>function(t){let{thunk:r=!0,immutableCheck:o=!0,serializableCheck:n=!0,actionCreatorCheck:a=!0}=t??{},i=new Rp;return r&&(cF(r)?i.push(gp):i.push(yp(r.extraArgument))),i},qr="RTK_autoBatch",an=()=>e=>({payload:e,meta:{[qr]:!0}}),Cp=e=>t=>{setTimeout(t,e)},uF=(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:Cp(10):e.type==="callback"?e.queueNotification:Cp(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?.[qr],a=!n,a&&(i||(i=!0,u(s))),o.dispatch(l)}finally{n=!0}}})},lF=e=>function(r){let{autoBatch:o=!0}=r??{},n=new Rp(e);return o&&n.push(uF(typeof o=="object"?o:void 0)),n};function Fp(e){let t=sF(),{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(Bt(r))c=tn(r);else throw new Error(wt(1));let u;typeof o=="function"?u=o(t):u=t();let s=rn;n&&(s=aF({trace:!1,...typeof n=="object"&&n}));let l=Zm(...u),d=lF(l),p=typeof i=="function"?i(d):d(),m=s(...p);return ol(c,a,m)}function Pp(e){let t={},r=[],o,n={addCase(a,i){let c=typeof a=="string"?a:a.type;if(!c)throw new Error(wt(28));if(c in t)throw new Error(wt(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 dF(e){return typeof e=="function"}function B(e,t){let[r,o,n]=Pp(t),a;if(dF(e))a=()=>hp(e());else{let c=hp(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(nt(l)){let m=d(l,u);return m===void 0?l:m}else{if(Ye(l))return fr(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 Ap=(e,t)=>iF(e)?e.match(t):e(t);function jt(...e){return t=>e.some(r=>Ap(r,t))}function nn(...e){return t=>e.every(r=>Ap(r,t))}function Zi(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 Ba(e){return typeof e[0]=="function"&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function ec(...e){return e.length===0?t=>Zi(t,["pending"]):Ba(e)?jt(...e.map(t=>t.pending)):ec()(e[0])}function Io(...e){return e.length===0?t=>Zi(t,["rejected"]):Ba(e)?jt(...e.map(t=>t.rejected)):Io()(e[0])}function ja(...e){let t=r=>r&&r.meta&&r.meta.rejectedWithValue;return e.length===0?nn(Io(...e),t):Ba(e)?nn(Io(...e),t):ja()(e[0])}function gr(...e){return e.length===0?t=>Zi(t,["fulfilled"]):Ba(e)?jt(...e.map(t=>t.fulfilled)):gr()(e[0])}function tc(...e){return e.length===0?t=>Zi(t,["pending","fulfilled","rejected"]):Ba(e)?jt(...e.flatMap(t=>[t.pending,t.rejected,t.fulfilled])):tc()(e[0])}var mF="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",rc=(e=21)=>{let t="",r=e;for(;r--;)t+=mF[Math.random()*64|0];return t},pF=["name","message","stack","code"],hl=class{constructor(e,t){De(this,"_type");this.payload=e,this.meta=t}},xp=class{constructor(e,t){De(this,"_type");this.payload=e,this.meta=t}},fF=e=>{if(typeof e=="object"&&e!==null){let t={};for(let r of pF)typeof e[r]=="string"&&(t[r]=e[r]);return t}return{message:String(e)}},_=(()=>{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||fF)(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):rc(),m=new AbortController,f,g;function S(y){g=y,m.abort()}let x=async function(){let y;try{let P=o?.condition?.(u,{getState:l,extra:d});if(yF(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:S,rejectWithValue:(A,F)=>new hl(A,F),fulfillWithValue:(A,F)=>new xp(A,F)})).then(A=>{if(A instanceof hl)throw A;return A instanceof xp?n(A.payload,p,u,A.meta):n(A,p,u)})])}catch(P){y=P instanceof hl?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:S,requestId:p,arg:u,unwrap(){return x.then(gF)}})}}return Object.assign(c,{pending:a,rejected:i,fulfilled:n,settled:jt(i,n),typePrefix:t})}return e.withTypes=()=>e,e})();function gF(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function yF(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var vp=Symbol.for("rtk-slice-createasyncthunk"),qq={[vp]:_};function hF(e,t){return`${e}/${t}`}function SF({creators:e}={}){let t=e?.asyncThunk?.[vp];return function(o){let{name:n,reducerPath:a=n}=o;if(!n)throw new Error(wt(11));typeof process<"u";let i=(typeof o.reducers=="function"?o.reducers(xF()):o.reducers)||{},c=Object.keys(i),u={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},s={addCase(y,C){let P=typeof y=="string"?y:y.type;if(!P)throw new Error(wt(12));if(P in u.sliceCaseReducersByType)throw new Error(wt(13));return u.sliceCaseReducersByType[P]=C,s},addMatcher(y,C){return u.sliceMatchers.push({matcher:y,reducer:C}),s},exposeAction(y,C){return u.actionCreators[y]=C,s},exposeCaseReducer(y,C){return u.sliceCaseReducersByName[y]=C,s}};c.forEach(y=>{let C=i[y],P={reducerName:y,type:hF(n,y),createNotation:typeof o.reducers=="function"};FF(C)?AF(P,C,s,t):RF(P,C,s)});function l(){let[y={},C=[],P=void 0]=typeof o.extraReducers=="function"?Pp(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 C)A.addMatcher(F.matcher,F.reducer);P&&A.addDefaultCase(P)})}let d=y=>y,p=new Map,m;function f(y,C){return m||(m=l()),m(y,C)}function g(){return m||(m=l()),m.getInitialState()}function S(y,C=!1){function P(A){let F=A[y];return typeof F>"u"&&C&&(F=g()),F}function O(A=d){let F=Sp(p,C,()=>new WeakMap);return Sp(F,A,()=>{let E={};for(let[I,q]of Object.entries(o.selectors??{}))E[I]=CF(q,A,g,C);return E})}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,...S(a),injectInto(y,{reducerPath:C,...P}={}){let O=C??a;return y.inject({reducerPath:O,reducer:f},P),{...x,...S(O,!0)}}};return x}}function CF(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 wo=SF();function xF(){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 RF({type:e,reducerName:t,createNotation:r},o,n){let a,i;if("reducer"in o){if(r&&!PF(o))throw new Error(wt(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 FF(e){return e._reducerDefinitionType==="asyncThunk"}function PF(e){return e._reducerDefinitionType==="reducerWithPrepare"}function AF({type:e,reducerName:t},r,o,n){if(!n)throw new Error(wt(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||Xi,pending:c||Xi,rejected:u||Xi,settled:s||Xi})}function Xi(){}var bp="listener",Ip="completed",wp="cancelled",kq=`task-${wp}`,Vq=`task-${Ip}`,Dq=`${bp}-${wp}`,Nq=`${bp}-${Ip}`;var{assign:Ep}=Object;var Sl="listenerMiddleware";var vF=Ep(h(`${Sl}/add`),{withTypes:()=>vF}),Mq=h(`${Sl}/removeAll`),bF=Ep(h(`${Sl}/remove`),{withTypes:()=>bF});var Lq=Symbol.for("rtk-state-proxy-original");function wt(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 kr=D(e=>e.commercePagination?.principal.perPage||0,e=>e),oc=D((e,t)=>e.commercePagination?.recommendations[t]?.perPage||0,e=>e),Vr=D(e=>e.commercePagination?.principal.totalEntries||0,e=>e),nc=D((e,t)=>e.commercePagination?.recommendations[t]?.totalEntries||0,e=>e),ac=D(e=>e.commercePagination?.principal.page||0,e=>e),Tp=D((e,t)=>e.commercePagination?.recommendations[t]?.page||0,e=>e);var Hq=D(e=>e[L].productListing.responseId,e=>e),_a=D(e=>e.productListing.responseId,e=>e),qp=D(e=>e.productListing.requestId,e=>e),$a=D(e=>e.productListing?.products.length||0,e=>e),kp=D(e=>({total:Vr(e),current:$a(e)}),({current:e,total:t})=>e<t),Vp=D(e=>e.productListing?.isLoading,e=>(0,Op.isNullOrUndefined)(e)?!1:e),Dp=D(e=>e.productListing?.error,e=>e??null);var Rl=require("@coveo/bueno");function Cl(e,t,r){if(e===void 0)return{};let o=t(e);return o!==r?{q:o}:{}}function xl(e,t,r){if(e===void 0)return{};let o=t(e);return o!==r?{sortCriteria:o}:{}}function _t(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 $t(e){let{activeValue:t,ancestryMap:r}=wF(e);return t?EF(t,r):[]}function wF(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 EF(e,t){let r=[];if(!e)return[];let o=e;do r.unshift(o),o=t.get(o);while(o);return r}function Np(){return{principal:Dr(),recommendations:{}}}function Dr(){return{page:0,perPage:0,totalEntries:0,totalPages:0}}var Tt=require("@coveo/bueno");var zt=require("@coveo/bueno"),pt=(r=>(r.Relevance="relevance",r.Fields="fields",r))(pt||{}),Nr=(r=>(r.Ascending="asc",r.Descending="desc",r))(Nr||{}),Et=()=>({by:"relevance"});var Zq=new zt.RecordValue({options:{required:!1},values:{by:new zt.EnumValue({enum:pt,required:!0}),fields:new zt.ArrayValue({each:new zt.RecordValue({values:{name:new zt.StringValue,direction:new zt.EnumValue({enum:Nr})}})})}});var za=e=>({by:"fields",fields:e}),Mp=new Tt.RecordValue({options:{required:!1},values:{by:new Tt.EnumValue({enum:pt,required:!0}),fields:new Tt.ArrayValue({each:new Tt.RecordValue({values:{field:new Tt.StringValue({required:!0}),direction:new Tt.EnumValue({enum:Nr}),displayName:new Tt.StringValue}})})}});function Eo(){return{appliedSort:Et(),availableSorts:[Et()]}}function ic(e){return{...TF(e?.commercePagination,t=>t.principal.page,Dr().page),...OF(e?.commercePagination,t=>t.principal.perPage,Dr().perPage),...xl(e?.commerceSort,t=>t.appliedSort,Eo().appliedSort),..._t(e.commerceFacetSet,Mr(e,"regular"),qF,"f"),..._t(e.commerceFacetSet,Mr(e,"regular"),kF,"fExcluded"),..._t(e.commerceFacetSet,Mr(e,"location"),VF,"lf"),..._t(e.commerceFacetSet,Mr(e,"hierarchical"),DF,"cf"),..._t(e.commerceFacetSet,Mr(e,"dateRange"),Lp,"df"),..._t(e.commerceFacetSet,Mr(e,"dateRange"),Qp,"dfExcluded"),..._t(e.commerceFacetSet,Mr(e,"numericalRange"),Lp,"nf"),..._t(e.commerceFacetSet,Mr(e,"numericalRange"),Qp,"nfExcluded"),...Up("selected",e.manualNumericFacetSet),...Up("excluded",e.manualNumericFacetSet)}}function TF(e,t,r){if(e===void 0)return{};let o=t(e);return o!==r?{page:o}:{}}function OF(e,t,r){if(e===void 0)return{};let o=t(e);return o!==r?{perPage:o}:{}}function qF(e){return e.values.filter(t=>t.state==="selected").map(t=>t.value)}function kF(e){return e.values.filter(t=>t.state==="excluded").map(t=>t.value)}function VF(e){return e.values.filter(t=>t.state==="selected").map(t=>t.value)}function Lp(e){return e.values.filter(t=>t.state==="selected")}function Qp(e){return e.values.filter(t=>t.state==="excluded")}function Up(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 DF(e){return $t(e.values).map(r=>r.value)}function Mr(e,t){return r=>e.commerceFacetSet[r].request.type===t}var cc=()=>({query:""});var Fk=D(e=>e[L].commerceSearch.responseId,e=>e),Wa=D(e=>e.commerceSearch.responseId,e=>e),Bp=D(e=>e.commerceSearch.requestId,e=>e),Ka=D(e=>e.commerceSearch?.products.length||0,e=>e),jp=D(e=>({total:Vr(e),current:Ka(e)}),({current:e,total:t})=>e<t),_p=D(e=>e.commerceSearch?.isLoading,e=>(0,Rl.isNullOrUndefined)(e)?!1:e),$p=D(e=>e.commerceSearch?.error,e=>e??null),sc=D(e=>e.commerceQuery?.query,e=>e??""),NF=D(e=>e.commerceSearch?.queryExecuted,e=>e),zp=(e,t)=>(0,Rl.isNullOrUndefined)(t.queryCorrection?.correctedQuery)?sc(e):t.queryCorrection.correctedQuery,Wp=e=>({...Cl(e?.commerceQuery,t=>t.query,cc().query),...ic(e)});function Kp(e){return{query:NF(e)||""}}var Fl;(t=>t.responseIdSelector=Gp(Wa))(Fl||(Fl={}));var Pl;(t=>t.responseIdSelector=Gp(_a))(Pl||(Pl={}));function Gp(e){return t=>e(t[L])}var Il={};tl(Il,{escape:()=>cn,getHighlightedSuggestion:()=>bl,highlightString:()=>LF});var Jp=require("@coveo/bueno");var To=(e,t=5)=>e+Math.random().toString(36).substring(2,2+t);function Hp(e){return Array.isArray(e)}function uc(e){return e.trim()===""}function Yp(e){let t={};for(let[r,o]of e)t[r]=o;return t}function Ga(e){if(typeof e!="object"||!e)return e;try{return JSON.parse(JSON.stringify(e))}catch{return e}}function LF(e){if(uc(e.openingDelimiter)||uc(e.closingDelimiter))throw Error("delimiters should be a non-empty string");if((0,Jp.isNullOrUndefined)(e.content)||uc(e.content))return e.content;if(e.highlights.length===0)return cn(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+=cn(e.content.slice(o,i)),r+=e.openingDelimiter,r+=cn(e.content.slice(i,c)),r+=e.closingDelimiter,o=c}return o!==t&&(r+=cn(e.content.slice(o))),r}function bl(e,t){return e=cn(e),e.replace(/\[(.*?)\]|\{(.*?)\}|\((.*?)\)/g,(r,o,n,a)=>o?vl(o,t.notMatchDelimiters):n?vl(n,t.exactMatchDelimiters):a?vl(a,t.correctionDelimiters):r)}function vl(e,t){return t?t.open+e+t.close:e}function cn(e){let t={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},r="(?:"+Object.keys(t).join("|")+")",o=RegExp(r),n=RegExp(r,"g");return o.test(e)?e.replace(n,a=>t[a]):e}var lf=Ut(af(),1);var lP="recommendation-internal-options",Dk=Symbol.for(lP);var $=new Error("Failed to load reducers."),sn=class extends Error{constructor(){super(),this.name="ExpiredToken",this.message="The token being used to perform the request is expired."}};var qo=class extends Error{constructor(r,o){super();De(this,"statusCode");this.name="Disconnected",this.message=`Client could not connect to the following URL: ${r}`,this.statusCode=o??0}};function cf(e){let t=[];for(let r in e){let o=encodeURIComponent(r),n=encodeURIComponent(e[r]);t.push(`${o}=${n}`)}return t.join("&")}function sf(e){return typeof e!="object"||!e?!1:Object.values(e).every(dP)}function dP(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"}function uf(e){return e===429}var un=class e{static async call(t){let r=mP(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(uf(u.status))throw u;return u};try{let u=await(0,lf.backOff)(c,{retry:s=>{let l=s&&uf(s.status);return l&&o.info("Platform retrying request"),l}});switch(u.status){case 419:case 401:throw o.info("Platform renewing token"),new sn;case 404:throw new qo(a,u.status);default:return o.info({response:u,requestInfo:n},"Platform response"),u}}catch(u){return u.message==="Failed to fetch"?new qo(a):u}}static async preprocessRequest(t,r){let{origin:o,preprocessRequest:n,logger:a,requestMetadata:i}=r,{signal:c,...u}=t,s=Ga(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 Te(e,t="prod",r="platform"){let o=t==="prod"?"":t,n=r==="platform"?"":`.${r}`;return`https://${e}${n}.org${o}.coveo.com`}function ft(e,t="prod"){return`${Te(e,t)}/rest/search/v2`}function dc(e,t="prod"){return`${Te(e,t,"analytics")}/rest/organizations/${e}/events/v1`}function mP(e){let{url:t,method:r,requestParams:o,contentType:n,accessToken:a,signal:i}=e,c=e.method==="POST"||e.method==="PUT",u=pP(o,n);return{url:t,method:r,headers:{"Content-Type":n,Authorization:`Bearer ${a}`,...e.headers},...c&&{body:u},signal:i}}function pP(e,t){return t==="application/x-www-form-urlencoded"?sf(e)?cf(e):"":JSON.stringify(e)}function fP(e){return{statusCode:e.statusCode,type:e.name,message:e.message}}function gP(e){return{statusCode:e.code,type:e.name,message:e.message,ignored:!0}}function Nl(e,t){if(t&&e.name==="AbortError")return{error:gP(e)};if(e instanceof qo)return{error:fP(e)};throw e}var ln=(e,t)=>({...Ja(e,t),requestParams:yP(e)}),yP=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}},Ja=(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 df=(e,t)=>({...Ja(e,t),requestParams:hP(e)}),hP=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 mf=e=>({...Ja(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 Ne=e=>e.error!==void 0,mc=class{constructor(t){this.options=t}async getProductListing(t){return this.query({...ln(t,"listing"),...this.options})}async search(t){let r=ln(t,"search");return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async getRecommendations(t){return this.query({...df(t,"recommendations"),...this.options})}async productSuggestions(t){let r=ln(t,"search/productSuggest");return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async querySuggest(t){let r=mf(t);return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async facetSearch(t,r){let o=ln(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=ln(t,"search");return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async query(t){let r=await un.call(t);if(r instanceof Error)return Nl(r);let o=await r.json();return r.ok?{success:o}:{error:o}}};function pc(e,t="prod"){return`${Te(e,t)}/rest/organizations/${e}/commerce/v2`}var fc=e=>e;var Ql=require("@coveo/bueno");var Je=require("@coveo/bueno"),T=new Je.StringValue({required:!0,emptyAllowed:!1}),re=new Je.StringValue({required:!1,emptyAllowed:!1}),fe=new Je.StringValue({required:!0,emptyAllowed:!0}),pf=new Je.StringValue({required:!1,emptyAllowed:!0}),ff=new Je.ArrayValue({each:T,required:!0}),gf=new Je.StringValue({required:!1,emptyAllowed:!1,regex:/^\d+\.\d+\.\d+$/}),$e=({message:e,name:t,stack:r})=>({message:e,name:t,stack:r}),Ce=(e,t)=>{if("required"in t)return{payload:new Je.Schema({value:t}).validate({value:e}).value};let n=new Je.RecordValue({options:{required:!0},values:t}).validate(e);if(n)throw new Je.SchemaValidationError(n);return{payload:e}},R=(e,t)=>{try{return Ce(e,t)}catch(r){return{payload:e,error:$e(r)}}},Xe=(e,t,r,o)=>{let n=`Check the initialState of ${o}`;return yf(e,t,r,n,"Controller initialization error")},ze=(e,t,r,o)=>{let n=`Check the options of ${o}`;return yf(e,t,r,n,"Controller initialization error")},yf=(e,t,r,o,n)=>{try{return t.validate(r,o)}catch(a){throw e.logger.error(a,n),a}};var We=require("@coveo/bueno");var dn="3.19.0-pre.d54cb5306e",hf=["@coveo/atomic","@coveo/quantic"];var Ml=()=>re,Sf=()=>T,ko=h("configuration/updateBasicConfiguration",e=>R(e,{accessToken:re,environment:new We.StringValue({required:!1,constrainTo:["prod","hipaa","stg","dev"]}),organizationId:re})),Cf=h("configuration/updateSearchConfiguration",e=>R(e,{proxyBaseUrl:new We.StringValue({required:!1,url:!0}),pipeline:new We.StringValue({required:!1,emptyAllowed:!0}),searchHub:re,timezone:re,locale:re,authenticationProviders:new We.ArrayValue({required:!1,each:T})})),mn={enabled:new We.BooleanValue({default:!0}),originContext:Ml(),originLevel2:Ml(),originLevel3:Ml(),proxyBaseUrl:new We.StringValue({required:!1,url:!0}),runtimeEnvironment:new We.Value,anonymous:new We.BooleanValue({default:!1}),deviceId:re,userDisplayName:re,documentLocation:re,trackingId:re,analyticsMode:new We.StringValue({constrainTo:["legacy","next"],required:!1,default:"next"}),source:new We.RecordValue({options:{required:!1},values:hf.reduce((e,t)=>(e[t]=gf,e),{})})},Ll=h("configuration/updateAnalyticsConfiguration",e=>R(e,mn)),gc=h("configuration/analytics/disable"),yc=h("configuration/analytics/enable"),xf=h("configuration/analytics/originlevel2",e=>R(e,{originLevel2:Sf()})),Rf=h("configuration/analytics/originlevel3",e=>R(e,{originLevel3:Sf()}));var pn=h("commerce/configuration/updateBasicConfiguration",e=>R(e,{accessToken:re,environment:new Ql.StringValue({required:!1,constrainTo:["prod","hipaa","stg","dev"]}),organizationId:re})),fn=h("commerce/configuration/updateProxyBaseUrl",e=>R(e,{proxyBaseUrl:new Ql.StringValue({required:!1,url:!0})})),gn=h("commerce/configuration/updateAnalyticsConfiguration",e=>R(e,{enabled:mn.enabled,proxyBaseUrl:mn.proxyBaseUrl,source:mn.source,trackingId:mn.trackingId})),hc=h("commerce/configuration/analytics/disable"),Sc=h("commerce/configuration/analytics/enable");var Lr=require("@coveo/bueno");var Ff=()=>({accessToken:"",environment:"prod",organizationId:"",analytics:{enabled:!0,trackingId:"",source:{}},commerce:{}});var Ul=B(Ff(),e=>e.addCase(pn,(t,r)=>{Pf(t,r.payload)}).addCase(ko,(t,r)=>{Pf(t,r.payload)}).addCase(fn,(t,r)=>{CP(t,r.payload)}).addCase(gn,(t,r)=>{xP(t,r.payload)}).addCase(hc,t=>{t.analytics.enabled=!1}).addCase(Sc,t=>{t.analytics.enabled=!0}));function Pf(e,t){(0,Lr.isNullOrUndefined)(t.accessToken)||(e.accessToken=t.accessToken),e.environment=t.environment??"prod",(0,Lr.isNullOrUndefined)(t.organizationId)||(e.organizationId=t.organizationId)}function CP(e,t){(0,Lr.isNullOrUndefined)(t.proxyBaseUrl)||(e.commerce.apiBaseUrl=t.proxyBaseUrl)}function xP(e,t){(0,Lr.isNullOrUndefined)(t.enabled)||(e.analytics.enabled=t.enabled),(0,Lr.isNullOrUndefined)(t.proxyBaseUrl)||(e.analytics.apiBaseUrl=t.proxyBaseUrl),(0,Lr.isNullOrUndefined)(t.source)||(e.analytics.source=t.source),(0,Lr.isNullOrUndefined)(t.trackingId)||(e.analytics.trackingId=t.trackingId)}function yn(e){return e.currency}var Af=(e,t)=>({currency:yn(t.commerceContext),products:RP(t.cart),transaction:e}),vf=(e,t)=>({currency:yn(t.commerceContext),...e}),Vo=D(e=>e.cart,e=>e.cartItems,(e,t)=>t.map(r=>e[r])),RP=D(Vo,e=>e.map(({quantity:t,...r})=>({quantity:t,product:r})));var Ot=require("@coveo/bueno");var Bl={productId:T,quantity:new Ot.NumberValue({required:!0,min:0}),name:new Ot.StringValue({required:!1}),price:new Ot.NumberValue({required:!1,min:0})},jl=new Ot.ArrayValue({each:new Ot.RecordValue({values:{...Bl}})}),_l={items:jl},bf=new Ot.Schema(_l);var Qr=h("commerce/cart/setItems",e=>R(e,jl)),hn=h("commerce/cart/updateItemQuantity",e=>R(e,Bl)),Sn=h("commerce/cart/purchase"),Cc=_("commerce/cart/emit/purchaseEvent",async(e,{extra:t,getState:r})=>{let o=Af(e,r()),{relay:n}=t;n.emit("ec.purchase",o)}),xc=_("commerce/cart/emit/cartActionEvent",async(e,{extra:t,getState:r})=>{let o=vf(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 If(e,t){return e.cart[Do(t)]}var wf=D(Vo,e=>e.reduce((t,r)=>t+r.quantity,0)),Ef=D(Vo,e=>e.reduce((t,r)=>t+r.price*r.quantity,0));function Tf(e,t={}){if(!FP(e))throw $;let{dispatch:r}=e,o=z(e),n=()=>e[L].cart,a={...t.initialState};Xe(e,bf,a,"buildCart"),a.items!==void 0&&r(Qr(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 Vo(n()))this.updateItemQuantity({...l,quantity:0})},purchase(l){r(Cc(l)),r(Sn())},updateItemQuantity(l){let d=If(n(),l);!d&&l.quantity<=0||u(l,d)||(i(l,d)&&r(xc(s(l,d))),r(hn(l)))},get state(){let l=n();return{items:Vo(l),totalQuantity:wf(l),totalPrice:Ef(l)}}}}function Do(e){return`${e.productId},${e.name},${e.price}`}function FP(e){return e.addReducers({cart:Cn}),!0}var Rc=()=>({cartItems:[],cart:{},purchasedItems:[],purchased:{}}),Of=e=>kf(e.cartItems,e.cart),qf=e=>kf(e.purchasedItems,e.purchased);function kf(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 Cn=B(Rc(),e=>{e.addCase(Qr,(t,{payload:r})=>{let{cart:o,cartItems:n}=r.reduce((a,i)=>{let c=Do(i);return{cartItems:[...a.cartItems,c],cart:{...a.cart,[c]:i},purchasedItems:[],purchased:{}}},Rc());Vf(t,n,o)}).addCase(hn,(t,{payload:r})=>{let o=Do(r);if(!(o in t.cart)){PP(r,t);return}if(r.quantity<=0){AP(r,t);return}t.cart[o]=r}).addCase(Sn,t=>{vP(t);let{cart:r,cartItems:o}=Rc();Vf(t,o,r)})});function Vf(e,t,r){e.cartItems=t,e.cart=r}function PP(e,t){if(e.quantity<=0)return;let r=Do(e);t.cartItems=[...t.cartItems,r],t.cart[r]=e}function AP(e,t){let r=Do(e);t.cartItems=t.cartItems.filter(o=>o!==r),delete t.cart[r]}function vP(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 Wt=require("@coveo/bueno");var bP=Intl.supportedValuesOf("currency"),IP=new Wt.StringValue({required:!0,emptyAllowed:!1,constrainTo:bP}),$l={url:T},zl={latitude:new Wt.NumberValue({min:-90,max:90,required:!0}),longitude:new Wt.NumberValue({min:-180,max:180,required:!0})},Xa={language:T,country:T,currency:IP,view:new Wt.RecordValue({options:{required:!0},values:$l}),location:new Wt.RecordValue({options:{required:!1},values:zl})},Df=new Wt.Schema(Xa);var se=h("commerce/context/set",e=>R(e,Xa)),ue=h("commerce/context/setView",e=>R(e,$l)),xn=h("commerce/context/setLocation",e=>R(e,zl));var Nf=()=>({language:"",country:"",currency:"",view:{url:""}});var Kt=B(Nf(),e=>{e.addCase(se,(t,{payload:r})=>r).addCase(ue,(t,{payload:r})=>{t.view=r}).addCase(xn,(t,{payload:r})=>{t.location=r})});var Fc=()=>({correctedQuery:"",corrections:[],originalQuery:""});var Qo=require("@coveo/bueno");var gt=h("breadcrumb/deselectAll"),Ur=h("breadcrumb/deselectAllNonBreadcrumbs");var Br=D(e=>e.source,e=>Object.entries(e).map(([t,r])=>`${t}@${r}`).concat(`@coveo/headless@${dn}`));var jr=(e,t)=>{let{view:r,location:o,...n}=e.commerceContext;return{accessToken:e.configuration.accessToken,url:e.configuration.commerce.apiBaseUrl??pc(e.configuration.organizationId,e.configuration.environment),organizationId:e.configuration.organizationId,trackingId:e.configuration.analytics.trackingId,...n,...e.configuration.analytics.enabled?{clientId:t.clientId}:{},context:{user:{...o,...t.userAgent?{userAgent:t.userAgent}:{}},view:{...r,...t.referrer?{referrer:t.referrer}:{}},capture:t.capture??e.configuration.analytics.enabled,cart:Of(e.cart),source:Br(e.configuration.analytics)}}};var Pc=(e,t,r)=>({...jr(e,t),...wP(e,r)}),wP=(e,t)=>{let r=t?e.commercePagination?.recommendations[t]:e.commercePagination?.principal;return r&&{page:r.page,...r.perPage&&{perPage:r.perPage}}};var yt=(e,t)=>({...Pc(e,t),facets:[...EP(e)],...e.commerceSort&&{sort:TP(e.commerceSort.appliedSort)}});function EP(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 TP(e){return e.by==="relevance"?{sortCriteria:"relevance"}:{sortCriteria:"fields",fields:e.fields.map(({name:t,direction:r})=>({field:t,direction:r}))}}var Rn=require("@coveo/bueno");var No=h("commerce/facets/core/updateNumberOfValues",e=>R(e,{facetId:T,numberOfValues:new Rn.NumberValue({required:!0,min:1})})),Mo=h("commerce/facets/core/updateIsFieldExpanded",e=>R(e,{facetId:T,isFieldExpanded:new Rn.BooleanValue({required:!0})})),ge=h("commerce/facets/core/clearAll"),Me=h("commerce/facets/core/deselectAllValues",e=>R(e,{facetId:T})),Lo=h("commerce/facets/core/updateFreezeCurrentValues",e=>R(e,{facetId:T,freezeCurrentValues:new Rn.BooleanValue({required:!0})})),Fn=h("commerce/facets/core/updateAutoSelectionForAll",e=>R(e,{allow:new Rn.BooleanValue({required:!0})}));var Wl=require("@coveo/bueno");var Ac={slotId:pf},OP={...Ac,pageSize:new Wl.NumberValue({required:!0,min:0})},hr=h("commerce/pagination/setPageSize",e=>R(e,OP)),qP={...Ac,page:new Wl.NumberValue({required:!0,min:0})},Gt=h("commerce/pagination/selectPage",e=>R(e,qP)),_r=h("commerce/pagination/nextPage",e=>R(e,Ac)),$r=h("commerce/pagination/previousPage",e=>R(e,Ac)),Pn=h("commerce/pagination/registerRecommendationsSlot",e=>R(e,{slotId:T}));var Mf=require("@coveo/bueno");var ye=h("commerce/query/update",e=>R(e,{query:new Mf.StringValue}));var Kl=require("@coveo/bueno");var vc=require("@coveo/bueno");var zr=h("commerce/triggers/query/updateIgnore",e=>R(e,{q:new vc.StringValue({emptyAllowed:!0,required:!0})})),An=h("commerce/triggers/query/applyModification",e=>R(e,new vc.RecordValue({values:{originalQuery:re,modification:re}})));var Za=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 Ne(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,Kl.isNullOrUndefined)(n)&&!(0,Kl.isNullOrUndefined)(n.correctedQuery)))return null;let{correctedQuery:i,originalQuery:c}=o.queryCorrection;return this.onUpdateQueryForCorrection(i??""),{...t,response:{...o},queryExecuted:zp(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(zr({q:""})),null;let a=this.getCurrentQuery(),i=await this.automaticallyRetryQueryWithTriggerModification(o);return Ne(i.response)?this.rejectWithValue(i.response.error):{...i,response:{...i.response.success},originalQuery:a}}async automaticallyRetryQueryWithTriggerModification(t){return this.dispatch(An({newQuery:t,originalQuery:this.getCurrentQuery()})),this.onUpdateQueryForCorrection(t),await this.fetchFromAPI({...yt(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 Ne(t.response)?null:t.response.success}get extra(){return this.config.extra}onUpdateQueryForCorrection(t){this.dispatch(ye({query:t}))}};var K=_("commerce/search/executeSearch",async(e,t)=>{let{getState:r}=t,o=r(),{navigatorContext:n}=t.extra,a=yt(o,n),i=sc(o),c=new Za(t),u=await c.fetchFromAPI({...a,query:i});return c.process(u)}),Wr=_("commerce/search/fetchMoreProducts",async(e,t)=>{let{getState:r}=t,o=r(),{navigatorContext:n}=t.extra;if(!jp(o))return null;let i=kr(o),u=Ka(o)/i,s=sc(o),l=yt(o,n),d=new Za(t),p=await d.fetchFromAPI({...l,query:s,page:u});return d.process(p)}),vn=_("commerce/search/prepareForSearchWithQuery",(e,t)=>{let{dispatch:r}=t;R(e,{query:new Qo.StringValue,clearFilters:new Qo.BooleanValue}),e.clearFilters&&(r(ge()),r(Ur())),r(Fn({allow:!0})),r(ye({query:e.query})),r(Gt({page:0}))}),bn=_("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({...jr(n,i),query:c});return Ne(u)?r(u.error):{response:{...u.success,products:u.success.products}}}),kP={child:new Qo.RecordValue({options:{required:!0},values:{permanentid:new Qo.StringValue({required:!0})}})},In=h("commerce/search/promoteChildToParent",e=>R(e,kP));function Lf(){return{wasCorrectedTo:"",queryCorrection:Fc(),originalQuery:""}}var bc=B(Lf(),e=>{e.addCase(K.pending,t=>{t.queryCorrection=Fc(),t.wasCorrectedTo=""}).addCase(K.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 G=T;var Ht=require("@coveo/bueno");var VP={state:new Ht.Value({required:!0}),numberOfResults:new Ht.NumberValue({required:!0,min:0}),value:new Ht.StringValue({required:!0,emptyAllowed:!0}),path:new Ht.ArrayValue({required:!0,each:T}),moreValuesAvailable:new Ht.BooleanValue({required:!1})};function ei(e){e.children.forEach(t=>{ei(t)}),Ce({state:e.state,numberOfResults:e.numberOfResults,value:e.value,path:e.path,moreValuesAvailable:e.moreValuesAvailable},VP)}var wn={facetId:G,field:T,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:T}),filterByBasePath:new de.BooleanValue({required:!1})},En=5,Qf=h("categoryFacet/register",e=>R(e,wn)),Uf=h("categoryFacet/toggleSelectValue",e=>{try{return Ce(e.facetId,T),ei(e.selection),{payload:e,error:null}}catch(t){return{payload:e,error:$e(t)}}}),Bf=h("categoryFacet/deselectAll",e=>R(e,wn.facetId)),YN=h("categoryFacet/updateNumberOfValues",e=>R(e,{facetId:wn.facetId,numberOfValues:wn.numberOfValues})),JN=h("categoryFacet/updateSortCriterion",e=>R(e,{facetId:wn.facetId,criterion:new de.Value})),XN=h("categoryFacet/updateBasePath",e=>R(e,{facetId:wn.facetId,basePath:new de.ArrayValue({each:T})}));var On=require("@coveo/bueno");var Tn=require("@coveo/bueno");var ti={facetId:G,captions:new Tn.RecordValue({options:{required:!1}}),numberOfValues:new Tn.NumberValue({required:!1,min:1}),query:new Tn.StringValue({required:!1,emptyAllowed:!0})};var DP={path:new On.ArrayValue({required:!0,each:T}),displayValue:fe,rawValue:fe,count:new On.NumberValue({required:!0,min:0})},ht=h("categoryFacet/selectSearchResult",e=>R(e,{facetId:G,value:new On.RecordValue({values:DP})})),Ic=h("categoryFacetSearch/register",e=>R(e,ti));var wc=require("@coveo/bueno");var jf={facetId:G,value:new wc.RecordValue({values:{displayValue:fe,rawValue:fe,count:new wc.NumberValue({required:!0,min:0})}})},Ec=h("facetSearch/register",e=>R(e,ti)),Kr=h("facetSearch/update",e=>R(e,ti)),it=h("facetSearch/toggleSelectValue",e=>R(e,jf)),qt=h("facetSearch/toggleExcludeValue",e=>R(e,jf));var _f=require("@coveo/bueno");var Sr=h("facetOptions/update",(e={freezeFacetOrder:!0})=>R(e,{freezeFacetOrder:new _f.BooleanValue({required:!1})})),Gl=h("facetOptions/facet/enable",e=>R(e,G)),Cr=h("facetOptions/facet/disable",e=>R(e,G));var NP=h("history/undo"),MP=h("history/redo"),Yt=h("history/snapshot"),hM=_("history/back",async(e,{dispatch:t})=>{t(NP()),await t(Fe())}),SM=_("history/forward",async(e,{dispatch:t})=>{t(MP()),await t(Fe())}),Fe=_("history/change",async(e,{getState:t})=>t().history.present);var me=require("@coveo/bueno"),Tc={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 Oe=h("searchParameters/restore",e=>R(e,Tc));var ao=require("@coveo/bueno");function xr(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 H;(function(e){e.search="search",e.click="click",e.custom="custom",e.view="view",e.collect="collect"})(H||(H={}));function Jl(){return typeof window<"u"}function ld(){return typeof navigator<"u"}function qn(){return typeof document<"u"}function Xl(){try{return typeof localStorage<"u"}catch{return!1}}function LP(){try{return typeof sessionStorage<"u"}catch{return!1}}function og(){return ld()&&navigator.cookieEnabled}var QP=[H.click,H.custom,H.search,H.view],UP=(e,t)=>QP.indexOf(e)!==-1?Object.assign({language:qn()?document.documentElement.lang:"unknown",userAgent:ld()?navigator.userAgent:"unknown"},t):t,ni=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?$f(t,r,a):(i=c.split("."),n=i[i.length-2]+"."+i[i.length-1],$f(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 $f(e,t,r,o){document.cookie=`${e}=${t}`+(r?`;expires=${r.toUTCString()}`:"")+(o?`;domain=${o}`:"")+";path=/;SameSite=Lax"}function BP(){return Xl()?localStorage:og()?new ai:LP()?sessionStorage:new Vn}var ai=class e{getItem(t){return ni.get(`${e.prefix}${t}`)}removeItem(t){ni.erase(`${e.prefix}${t}`)}setItem(t,r,o){ni.set(`${e.prefix}${t}`,r,o)}};ai.prefix="coveo_";var Zl=class{constructor(){this.cookieStorage=new ai}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)}},Vn=class{getItem(t){return null}removeItem(t){}setItem(t,r){}},ri="__coveo.analytics.history",ng=20,ag=1e3*60,ig=75,Dn=class{constructor(t){this.store=t||BP()}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(ri);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(ri);return t?JSON.parse(t):[]}catch{return[]}})}setHistory(t){try{this.store.setItem(ri,JSON.stringify(t.slice(0,ng)))}catch{}}clear(){try{this.store.removeItem(ri)}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,ig)),t}isValidEntry(t){let r=this.getMostRecentElement();return r&&r.value==t.value?(t.internalTime||0)-(r.internalTime||0)>ag:!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))}},cg=Object.freeze({__proto__:null,HistoryStore:Dn,MAX_NUMBER_OF_HISTORY_ELEMENTS:ng,MAX_VALUE_SIZE:ig,MIN_THRESHOLD_FOR_DUPLICATE_VALUE:ag,STORE_KEY:ri,default:Dn}),jP=(e,t)=>v(void 0,void 0,void 0,function*(){return e===H.view?(yield _P(t.contentIdValue),Object.assign({location:window.location.toString(),referrer:document.referrer,title:document.title},t)):t}),_P=e=>v(void 0,void 0,void 0,function*(){let t=new Dn,r={name:"PageView",value:e,time:new Date().toISOString()};yield t.addElementAsync(r)}),Oc,$P=new Uint8Array(16);function zP(){if(!Oc&&(Oc=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Oc))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Oc($P)}var WP=/^(?:[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 kc(e){return typeof e=="string"&&WP.test(e)}var qe=[];for(let e=0;e<256;++e)qe.push((e+256).toString(16).slice(1));function sg(e,t=0){return(qe[e[t+0]]+qe[e[t+1]]+qe[e[t+2]]+qe[e[t+3]]+"-"+qe[e[t+4]]+qe[e[t+5]]+"-"+qe[e[t+6]]+qe[e[t+7]]+"-"+qe[e[t+8]]+qe[e[t+9]]+"-"+qe[e[t+10]]+qe[e[t+11]]+qe[e[t+12]]+qe[e[t+13]]+qe[e[t+14]]+qe[e[t+15]]).toLowerCase()}function KP(e){if(!kc(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 GP(e){e=unescape(encodeURIComponent(e));let t=[];for(let r=0;r<e.length;++r)t.push(e.charCodeAt(r));return t}var HP="6ba7b810-9dad-11d1-80b4-00c04fd430c8",YP="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function JP(e,t,r){function o(n,a,i,c){var u;if(typeof n=="string"&&(n=GP(n)),typeof a=="string"&&(a=KP(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 sg(s)}try{o.name=e}catch{}return o.DNS=HP,o.URL=YP,o}var XP=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),zf={randomUUID:XP};function Uo(e,t,r){if(zf.randomUUID&&!t&&!e)return zf.randomUUID();e=e||{};let o=e.random||(e.rng||zP)();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 sg(o)}function ZP(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 Hl(e,t){return e<<t|e>>>32-t}function eA(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]=Hl(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=Hl(u,5)+ZP(f,s,l,d)+p+t[f]+c[m]>>>0;p=d,d=l,l=Hl(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 tA=JP("v5",80,eA),Wf=tA,ug="2.30.43",Kf=e=>`${e.protocol}//${e.hostname}${e.pathname.indexOf("/")===0?e.pathname:`/${e.pathname}`}${e.search}`,oi={pageview:"pageview",event:"event"},Vc=class{constructor({client:t,uuidGenerator:r=Uo}){this.client=t,this.uuidGenerator=r}},ed=class extends Vc{constructor({client:t,uuidGenerator:r=Uo}){super({client:t,uuidGenerator:r}),this.actionData={},this.pageViewId=r(),this.nextPageViewId=this.pageViewId,this.currentLocation=Kf(window.location),this.lastReferrer=qn()?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:qn()?document.title:"",encoding:qn()?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===oi.pageview&&(this.nextPageViewId=this.uuidGenerator(),this.hasSentFirstPageView=!0)}getNextValues(t,r){return{pageViewId:t===oi.pageview?this.nextPageViewId:this.pageViewId,referrer:t===oi.pageview&&this.hasSentFirstPageView?this.currentLocation:this.lastReferrer,location:t===oi.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 Kf(window.location)}},Gr=class e{constructor(t,r){if(!kc(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 kc(a)?new e(a,Number.parseInt(n)*1e3):null}};Gr.cvo_cid="cvo_cid";Gr.expirationTime=120;var td=class extends Vc{constructor({client:t,uuidGenerator:r=Uo}){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(Gr.cvo_cid,new Gr(o,Date.now()).toString()),r.toString()}catch{throw new Error("Invalid URL provided")}})}acceptFrom(t){this.client.setAcceptedLinkReferrers(t)}};td.Id="link";var St=Object.keys;function qc(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}var Yl=128,lg=192,Gf=224,Hf=240;function rA(e){return(e&248)===Hf?4:(e&Hf)===Gf?3:(e&Gf)===lg?2:1}function oA(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&Yl)!=Yl)break;if(r-=3,(o&lg)!=Yl){t-r>=rA(o)*3&&(r=t);break}}return e.substring(0,r)}var rd={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"},nA=St(rd).map(e=>rd[e]),aA=[...nA].join("|"),iA=new RegExp(`^(${aA}$)`),cA={svcAction:"svc_action",svcActionData:"svc_action_data"},sA=e=>St(e).filter(t=>e[t]!==void 0).reduce((t,r)=>{let o=rd[r]||r;return Object.assign(Object.assign({},t),{[o]:e[r]})},{}),uA=e=>iA.test(e),lA=[uA],Yf={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",price:"pr",quantity:"qt",coupon:"cc",position:"ps",group:"group"},Jf={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",position:"ps",price:"pr",group:"group"},Le={action:"pa",list:"pal",listSource:"pls"},Dc={id:"ti",revenue:"tr",tax:"tt",shipping:"ts",coupon:"tcc",affiliation:"ta",step:"cos",option:"col"},dA=["loyaltyCardId","loyaltyTier","thirdPartyPersona","companyName","favoriteStore","storeName","userIndustry","userRole","userDepartment","businessUnit"],od={id:"quoteId",affiliation:"quoteAffiliation"},nd={id:"reviewId",rating:"reviewRating",comment:"reviewComment"},mA={add:Le,bookmark_add:Le,bookmark_remove:Le,click:Le,checkout:Le,checkout_option:Le,detail:Le,impression:Le,remove:Le,refund:Object.assign(Object.assign({},Le),Dc),purchase:Object.assign(Object.assign({},Le),Dc),quickview:Le,quote:Object.assign(Object.assign({},Le),od),review:Object.assign(Object.assign({},Le),nd)},pA=St(Yf).map(e=>Yf[e]),fA=St(Jf).map(e=>Jf[e]),gA=St(Le).map(e=>Le[e]),yA=St(Dc).map(e=>Dc[e]),hA=St(nd).map(e=>nd[e]),SA=St(od).map(e=>od[e]),CA=[...pA,"custom"].join("|"),xA=[...fA,"custom"].join("|"),dg="(pr[0-9]+)",mg="(il[0-9]+pi[0-9]+)",RA=new RegExp(`^${dg}(${CA})$`),FA=new RegExp(`^(${mg}(${xA}))|(il[0-9]+nm)$`),PA=new RegExp(`^(${gA.join("|")})$`),AA=new RegExp(`^(${yA.join("|")})$`),vA=new RegExp(`^${dg}custom$`),bA=new RegExp(`^${mg}custom$`),IA=new RegExp(`^(${[...dA,...hA,...SA].join("|")})$`),wA=e=>RA.test(e),EA=e=>FA.test(e),TA=e=>PA.test(e),OA=e=>AA.test(e),qA=e=>IA.test(e),kA=[EA,wA,TA,OA,qA],VA=[vA,bA],DA={anonymizeIp:"aip"},NA={eventCategory:"ec",eventAction:"ea",eventLabel:"el",eventValue:"ev",page:"dp",visitorId:"cid",clientId:"cid",userId:"uid",currencyCode:"cu"},MA={hitType:"t",pageViewId:"pid",encoding:"de",location:"dl",referrer:"dr",screenColor:"sd",screenResolution:"sr",title:"dt",userAgent:"ua",language:"ul",eventId:"z",time:"tm"},LA=["contentId","contentIdKey","contentType","searchHub","tab","searchUid","permanentId","contentLocale","trackingId"],QA=Object.assign(Object.assign(Object.assign(Object.assign({},DA),NA),MA),LA.reduce((e,t)=>Object.assign(Object.assign({},e),{[t]:t}),{})),ad=Object.assign(Object.assign({},QA),cA),UA=e=>{let t=!!e.action&&mA[e.action]||{};return St(e).reduce((r,o)=>{let n=t[o]||ad[o]||o;return Object.assign(Object.assign({},r),{[n]:e[o]})},{})},BA=St(ad).map(e=>ad[e]),jA=e=>BA.indexOf(e)!==-1,_A=e=>e==="custom",$A=e=>[...kA,...lA,jA,_A].some(t=>t(e)),zA=e=>St(e).reduce((t,r)=>{let o=WA(r);return o?Object.assign(Object.assign({},t),KA(o,e[r])):Object.assign(Object.assign({},t),{[r]:e[r]})},{}),WA=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},KA=(e,t)=>St(t).reduce((r,o)=>Object.assign(Object.assign({},r),{[`${e}${o}`]:t[o]}),{}),id=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[H.click,H.custom,H.search,H.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}},cd=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()})}},Xf=globalThis.fetch,Nc=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=xr(u,["url"]),d;try{d=yield Xf(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 Xf(r,{headers:this.getHeaders(),method:"DELETE"})})}shouldAppendVisitorId(t){return[H.click,H.custom,H.search,H.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"})}},sd=class{constructor(t,r){Xl()&&og()?this.storage=new Zl:Xl()?this.storage=localStorage:(console.warn("BrowserRuntime detected no valid storage available.",this),this.storage=new Vn),this.client=new Nc(t),this.beaconClient=new id(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}},ud=class{constructor(t,r){this.storage=r||new Vn,this.client=new Nc(t)}getClientDependingOnEventType(t){return this.client}},Mc=class{constructor(){this.storage=new Vn,this.client=new cd}getClientDependingOnEventType(t){return this.client}},GA="xx",HA=e=>e?.startsWith(GA)||!1,YA=`
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