@coveo/headless 3.16.1-pre.2f5ed054e8 → 3.16.1-pre.3f4a309ff4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/case-assist/headless.esm.js +1 -1
- package/dist/browser/case-assist/headless.js +1 -1
- package/dist/browser/commerce/headless.esm.js +1 -1
- package/dist/browser/commerce/headless.js +1 -1
- package/dist/browser/headless.esm.js +1 -1
- package/dist/browser/headless.js +1 -1
- package/dist/browser/insight/headless.esm.js +1 -1
- package/dist/browser/insight/headless.js +1 -1
- package/dist/browser/recommendation/headless.esm.js +1 -1
- package/dist/browser/recommendation/headless.js +1 -1
- package/dist/browser/ssr/headless.esm.js +1 -1
- package/dist/browser/ssr/headless.js +1 -1
- package/dist/browser/ssr-commerce/headless.esm.js +1 -1
- package/dist/browser/ssr-commerce/headless.js +1 -1
- package/dist/case-assist/headless.cjs +1 -1
- package/dist/case-assist/headless.esm.js +1 -1
- package/dist/commerce/headless.cjs +1 -1
- package/dist/commerce/headless.esm.js +1 -1
- package/dist/headless.cjs +1 -1
- package/dist/headless.esm.js +1 -1
- package/dist/insight/headless.cjs +1 -1
- package/dist/insight/headless.esm.js +1 -1
- package/dist/quantic/case-assist/headless.js +1 -1
- package/dist/quantic/commerce/headless.js +1 -1
- package/dist/quantic/headless.js +1 -1
- package/dist/quantic/insight/headless.js +1 -1
- package/dist/quantic/recommendation/headless.js +1 -1
- package/dist/recommendation/headless.cjs +1 -1
- package/dist/recommendation/headless.esm.js +1 -1
- package/dist/ssr/headless.cjs +1 -1
- package/dist/ssr/headless.esm.js +1 -1
- package/dist/ssr-commerce/headless.cjs +1 -1
- package/dist/ssr-commerce/headless.esm.js +1 -1
- package/package.json +1 -1
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
* limitations under the License.
|
|
17
17
|
*/
|
|
18
18
|
var iR=Object.create;var mi=Object.defineProperty;var cR=Object.getOwnPropertyDescriptor;var sR=Object.getOwnPropertyNames;var uR=Object.getPrototypeOf,lR=Object.prototype.hasOwnProperty;var dR=(e,t,r)=>t in e?mi(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var ye=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),vm=(e,t)=>{for(var r in t)mi(e,r,{get:t[r],enumerable:!0})},mR=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of sR(t))!lR.call(e,n)&&n!==r&&mi(e,n,{get:()=>t[n],enumerable:!(o=cR(t,n))||o.enumerable});return e};var St=(e,t,r)=>(r=e!=null?iR(uR(e)):{},mR(t||!e||!e.__esModule?mi(r,"default",{value:e,enumerable:!0}):r,e));var Fe=(e,t,r)=>dR(e,typeof t!="symbol"?t+"":t,r);var Vp=ye(da=>{"use strict";var Vi=da&&da.__assign||function(){return Vi=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},Vi.apply(this,arguments)};Object.defineProperty(da,"__esModule",{value:!0});var CF={delayFirstAttempt:!1,jitter:"none",maxDelay:1/0,numOfAttempts:10,retry:function(){return!0},startingDelay:100,timeMultiple:2};function xF(e){var t=Vi(Vi({},CF),e);return t.numOfAttempts<1&&(t.numOfAttempts=1),t}da.getSanitizedOptions=xF});var Dp=ye($u=>{"use strict";Object.defineProperty($u,"__esModule",{value:!0});function RF(e){var t=Math.random()*e;return Math.round(t)}$u.fullJitter=RF});var Np=ye(zu=>{"use strict";Object.defineProperty(zu,"__esModule",{value:!0});function FF(e){return e}zu.noJitter=FF});var Mp=ye(Wu=>{"use strict";Object.defineProperty(Wu,"__esModule",{value:!0});var PF=Dp(),AF=Np();function vF(e){switch(e.jitter){case"full":return PF.fullJitter;case"none":default:return AF.noJitter}}Wu.JitterFactory=vF});var Hu=ye(Ku=>{"use strict";Object.defineProperty(Ku,"__esModule",{value:!0});var bF=Mp(),wF=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=bF.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}();Ku.Delay=wF});var Lp=ye(Wt=>{"use strict";var IF=Wt&&Wt.__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)}}(),EF=Wt&&Wt.__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())})},TF=Wt&&Wt.__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(Wt,"__esModule",{value:!0});var OF=Hu(),qF=function(e){IF(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.apply=function(){return EF(this,void 0,void 0,function(){return TF(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}(OF.Delay);Wt.SkipFirstDelay=qF});var Qp=ye(ma=>{"use strict";var kF=ma&&ma.__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(ma,"__esModule",{value:!0});var VF=Hu(),DF=function(e){kF(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(VF.Delay);ma.AlwaysDelay=DF});var Up=ye(Gu=>{"use strict";Object.defineProperty(Gu,"__esModule",{value:!0});var NF=Lp(),MF=Qp();function LF(e,t){var r=QF(e);return r.setAttemptNumber(t),r}Gu.DelayFactory=LF;function QF(e){return e.delayFirstAttempt?new MF.AlwaysDelay(e):new NF.SkipFirstDelay(e)}});var Bp=ye(to=>{"use strict";var Yu=to&&to.__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())})},Ju=to&&to.__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(to,"__esModule",{value:!0});var UF=Vp(),BF=Up();function jF(e,t){return t===void 0&&(t={}),Yu(this,void 0,void 0,function(){var r,o;return Ju(this,function(n){switch(n.label){case 0:return r=UF.getSanitizedOptions(t),o=new _F(e,r),[4,o.execute()];case 1:return[2,n.sent()]}})})}to.backOff=jF;var _F=function(){function e(t,r){this.request=t,this.options=r,this.attemptNumber=0}return e.prototype.execute=function(){return Yu(this,void 0,void 0,function(){var t,r;return Ju(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 Yu(this,void 0,void 0,function(){var t;return Ju(this,function(r){switch(r.label){case 0:return t=BF.DelayFactory(this.options,this.attemptNumber),[4,t.apply()];case 1:return r.sent(),[2]}})})},e}()});var xc=ye((Ml,Ll)=>{"use strict";(function(e,t){typeof Ml=="object"&&typeof Ll<"u"?Ll.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs=t()})(Ml,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"],I=V%100;return"["+V+(k[(I-20)%10]||k[I]||k[0])+"]"}},x=function(V,k,I){var M=String(V);return!M||M.length>=k?V:""+Array(k+1-M.length).join(I)+V},y={s:x,z:function(V){var k=-V.utcOffset(),I=Math.abs(k),M=Math.floor(I/60),D=I%60;return(k<=0?"+":"-")+x(M,2,"0")+":"+x(D,2,"0")},m:function V(k,I){if(k.date()<I.date())return-V(I,k);var M=12*(I.year()-k.year())+(I.month()-k.month()),D=k.clone().add(M,s),j=I-D<0,U=k.clone().add(M+(j?-1:1),s);return+(-(M+(I-D)/(j?D-U:U-D))||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,I,M){var D;if(!k)return C;if(typeof k=="string"){var j=k.toLowerCase();P[j]&&(D=j),I&&(P[j]=I,D=j);var U=k.split("-");if(!D&&U.length>1)return V(U[0])}else{var W=k.name;P[W]=k,D=W}return!M&&D&&(C=D),D||!M&&C},E=function(V,k){if(A(V))return V.clone();var I=typeof k=="object"?k:{};return I.date=V,I.args=arguments,new q(I)},w=y;w.l=F,w.i=A,w.w=function(V,k){return E(V,{locale:k.$L,utc:k.$u,x:k.$x,$offset:k.$offset})};var q=function(){function V(I){this.$L=F(I.locale,null,!0),this.parse(I),this.$x=this.$x||I.x||{},this[O]=!0}var k=V.prototype;return k.parse=function(I){this.$d=function(M){var D=M.date,j=M.utc;if(D===null)return new Date(NaN);if(w.u(D))return new Date;if(D instanceof Date)return new Date(D);if(typeof D=="string"&&!/Z$/i.test(D)){var U=D.match(f);if(U){var W=U[2]-1||0,Y=(U[7]||"0").substring(0,3);return 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(D)}(I),this.init()},k.init=function(){var I=this.$d;this.$y=I.getFullYear(),this.$M=I.getMonth(),this.$D=I.getDate(),this.$W=I.getDay(),this.$H=I.getHours(),this.$m=I.getMinutes(),this.$s=I.getSeconds(),this.$ms=I.getMilliseconds()},k.$utils=function(){return w},k.isValid=function(){return this.$d.toString()!==m},k.isSame=function(I,M){var D=E(I);return this.startOf(M)<=D&&D<=this.endOf(M)},k.isAfter=function(I,M){return E(I)<this.startOf(M)},k.isBefore=function(I,M){return this.endOf(M)<E(I)},k.$g=function(I,M,D){return w.u(I)?this[M]:this.set(D,I)},k.unix=function(){return Math.floor(this.valueOf()/1e3)},k.valueOf=function(){return this.$d.getTime()},k.startOf=function(I,M){var D=this,j=!!w.u(M)||M,U=w.p(I),W=function(ht,ge){var Ye=w.w(D.$u?Date.UTC(D.$y,ge,ht):new Date(D.$y,ge,ht),D);return j?Ye:Ye.endOf(c)},Y=function(ht,ge){return w.w(D.toDate()[ht].apply(D.toDate("s"),(j?[0,0,0,0]:[23,59,59,999]).slice(ge)),D)},J=this.$W,X=this.$M,Z=this.$D,oe="set"+(this.$u?"UTC":"");switch(U){case d:return j?W(1,0):W(31,11);case s:return j?W(1,X):W(0,X+1);case u:var fe=this.$locale().weekStart||0,zr=(J<fe?J+7:J)-fe;return W(j?Z-zr:Z+(6-zr),X);case c:case p:return Y(oe+"Hours",0);case i:return Y(oe+"Minutes",1);case a:return Y(oe+"Seconds",2);case n:return Y(oe+"Milliseconds",3);default:return this.clone()}},k.endOf=function(I){return this.startOf(I,!1)},k.$set=function(I,M){var D,j=w.p(I),U="set"+(this.$u?"UTC":""),W=(D={},D[c]=U+"Date",D[p]=U+"Date",D[s]=U+"Month",D[d]=U+"FullYear",D[i]=U+"Hours",D[a]=U+"Minutes",D[n]=U+"Seconds",D[o]=U+"Milliseconds",D)[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(I,M){return this.clone().$set(I,M)},k.get=function(I){return this[w.p(I)]()},k.add=function(I,M){var D,j=this;I=Number(I);var U=w.p(M),W=function(X){var Z=E(j);return w.w(Z.date(Z.date()+Math.round(X*I)),j)};if(U===s)return this.set(s,this.$M+I);if(U===d)return this.set(d,this.$y+I);if(U===c)return W(1);if(U===u)return W(7);var Y=(D={},D[a]=t,D[i]=r,D[n]=e,D)[U]||1,J=this.$d.getTime()+I*Y;return w.w(J,this)},k.subtract=function(I,M){return this.add(-1*I,M)},k.format=function(I){var M=this,D=this.$locale();if(!this.isValid())return D.invalidDate||m;var j=I||"YYYY-MM-DDTHH:mm:ssZ",U=w.z(this),W=this.$H,Y=this.$m,J=this.$M,X=D.weekdays,Z=D.months,oe=D.meridiem,fe=function(ge,Ye,_t,nr){return ge&&(ge[Ye]||ge(M,j))||_t[Ye].slice(0,nr)},zr=function(ge){return w.s(W%12||12,ge,"0")},ht=oe||function(ge,Ye,_t){var nr=ge<12?"AM":"PM";return _t?nr.toLowerCase():nr};return j.replace(g,function(ge,Ye){return Ye||function(_t){switch(_t){case"YY":return String(M.$y).slice(-2);case"YYYY":return w.s(M.$y,4,"0");case"M":return J+1;case"MM":return w.s(J+1,2,"0");case"MMM":return fe(D.monthsShort,J,Z,3);case"MMMM":return fe(Z,J);case"D":return M.$D;case"DD":return w.s(M.$D,2,"0");case"d":return String(M.$W);case"dd":return fe(D.weekdaysMin,M.$W,X,2);case"ddd":return fe(D.weekdaysShort,M.$W,X,3);case"dddd":return X[M.$W];case"H":return String(W);case"HH":return w.s(W,2,"0");case"h":return zr(1);case"hh":return zr(2);case"a":return ht(W,Y,!0);case"A":return ht(W,Y,!1);case"m":return String(Y);case"mm":return w.s(Y,2,"0");case"s":return String(M.$s);case"ss":return w.s(M.$s,2,"0");case"SSS":return w.s(M.$ms,3,"0");case"Z":return U}return null}(ge)||U.replace(":","")})},k.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},k.diff=function(I,M,D){var j,U=this,W=w.p(M),Y=E(I),J=(Y.utcOffset()-this.utcOffset())*t,X=this-Y,Z=function(){return w.m(U,Y)};switch(W){case d:j=Z()/12;break;case s:j=Z();break;case l:j=Z()/3;break;case u:j=(X-J)/6048e5;break;case c:j=(X-J)/864e5;break;case i:j=X/r;break;case a:j=X/t;break;case n:j=X/e;break;default:j=X}return D?j:w.a(j)},k.daysInMonth=function(){return this.endOf(s).$D},k.$locale=function(){return P[this.$L]},k.locale=function(I,M){if(!I)return this.$L;var D=this.clone(),j=F(I,M,!0);return j&&(D.$L=j),D},k.clone=function(){return w.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}(),L=q.prototype;return E.prototype=L,[["$ms",o],["$s",n],["$m",a],["$H",i],["$W",c],["$M",s],["$y",d],["$D",p]].forEach(function(V){L[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 Dg=ye((Ql,Ul)=>{"use strict";(function(e,t){typeof Ql=="object"&&typeof Ul<"u"?Ul.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_quarterOfYear=t()})(Ql,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 Ng=ye((Bl,jl)=>{"use strict";(function(e,t){typeof Bl=="object"&&typeof jl<"u"?jl.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_customParseFormat=t()})(Bl,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,w,q){var L=q&&q.toUpperCase();return w||S[q]||e[q]||S[L].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(V,k,I){return k||I.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 w={},q=0,L=0;q<y;q+=1){var V=x[q];if(typeof V=="string")L+=V.length;else{var k=V.regex,I=V.parser,M=E.slice(L),D=k.exec(M)[0];I.call(w,D),E=E.replace(D,"")}}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}}(w),w}}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,w=A[3]===!0,q=E||w,L=A[2];w&&(L=A[2]),i=this.$locale(),!E&&L&&(i=S.Ls[L]),this.$d=function(M,D,j,U){try{if(["x","X"].indexOf(D)>-1)return new Date((D==="X"?1e3:1)*M);var W=m(D)(M),Y=W.year,J=W.month,X=W.day,Z=W.hours,oe=W.minutes,fe=W.seconds,zr=W.milliseconds,ht=W.zone,ge=W.week,Ye=new Date,_t=X||(Y||J?1:Ye.getDate()),nr=Y||Ye.getFullYear(),li=0;Y&&!J||(li=J>0?J-1:Ye.getMonth());var di,hu=Z||0,Su=oe||0,Cu=fe||0,xu=zr||0;return ht?new Date(Date.UTC(nr,li,_t,hu,Su,Cu,xu+60*ht.offset*1e3)):j?new Date(Date.UTC(nr,li,_t,hu,Su,Cu,xu)):(di=new Date(nr,li,_t,hu,Su,Cu,xu),ge&&(di=U(di).week(ge).toDate()),di)}catch{return new Date("")}}(P,F,O,S),this.init(),L&&L!==!0&&(this.$L=this.locale(L).$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 I=S.apply(this,A);if(I.isValid()){this.$d=I.$d,this.$L=I.$L,this.init();break}k===V&&(this.$d=new Date(""))}else y.call(this,C)}}})});var qS=ye((m3,OS)=>{"use strict";var hE=/(^|; )Coveo-Pendragon=([^;]*)/;OS.exports=()=>hE.exec(document.cookie)?.pop()||null});var kS=ye((Ld,Qd)=>{"use strict";(function(e,t){typeof Ld=="object"&&typeof Qd<"u"?Qd.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_timezone=t()})(Ld,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 w=c(F-=60*(E-O)*1e3,A);return E===w?[F,E]:[P-60*Math.min(E,w)*1e3,Math.max(E,w)]}(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 VS=ye((Ud,Bd)=>{"use strict";(function(e,t){typeof Ud=="object"&&typeof Bd<"u"?Bd.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_utc=t()})(Ud,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 KS=ye((F4,WS)=>{"use strict";function wE(e){try{return JSON.stringify(e)}catch{return'"[Circular]"'}}WS.exports=IE;function IE(e,t,r){var o=r&&r.stringify||wE,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 ZS=ye((P4,Vs)=>{"use strict";var HS=KS();Vs.exports=or;var ti=_E().console||{},EE={mapHttpRequest:ks,mapHttpResponse:ks,wrapRequestSerializer:$d,wrapResponseSerializer:$d,wrapErrorSerializer:$d,req:ks,res:ks,err:YS,errWithCause:YS};function jr(e,t){return e==="silent"?1/0:t.levels.values[e]}var Kd=Symbol("pino.logFuncs"),zd=Symbol("pino.hierarchy"),TE={error:"log",fatal:"error",warn:"error",info:"log",debug:"log",trace:"log"};function GS(e,t){let r={logger:t,parent:e[zd]};t[zd]=r}function OE(e,t,r){let o={};t.forEach(n=>{o[n]=r[n]?r[n]:ti[n]||ti[TE[n]||"log"]||Ln}),e[Kd]=o}function qE(e,t){return Array.isArray(e)?e.filter(function(o){return o!=="!stdSerializers.err"}):e===!0?Object.keys(t):!1}function or(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||ti;e.browser.write&&(e.browser.asObject=!0);let o=e.serializers||{},n=qE(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=Ln),OE(s,c,r),GS({},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:UE(e),messageKey:e.messageKey||"msg",onChild:e.onChild||Ln};s.levels=kE(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=Ln,s.serializers=o,s._serialize=n,s._stdErrSerialize=a,s.child=function(...g){return f.call(this,l,...g)},t&&(s._logEvent=Wd());function d(){return jr(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,Co(this,l,s,"error"),Co(this,l,s,"fatal"),Co(this,l,s,"warn"),Co(this,l,s,"info"),Co(this,l,s,"debug"),Co(this,l,s,"trace"),i.forEach(S=>{Co(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,Hd([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=Wd([].concat(F._logEvent.bindings,S)))}O.prototype=this;let A=new O(this);return GS(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 kE(e){let t=e.customLevels||{},r=Object.assign({},or.levels.values,t),o=Object.assign({},or.levels.labels,VE(t));return{values:r,labels:o}}function VE(e){let t={};return Object.keys(e).forEach(function(r){t[e[r]]=r}),t}or.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"}};or.stdSerializers=EE;or.stdTimeFunctions=Object.assign({},{nullTime:JS,epochTime:XS,unixTime:BE,isoTime:jE});function DE(e){let t=[];e.bindings&&t.push(e.bindings);let r=e[zd];for(;r.parent;)r=r.parent,r.logger.bindings&&t.push(r.logger.bindings);return t.reverse()}function Co(e,t,r,o){if(Object.defineProperty(e,o,{value:jr(e.level,r)>jr(o,r)?Ln:r[Kd][o],writable:!0,enumerable:!0,configurable:!0}),e[o]===Ln){if(!t.transmit)return;let a=t.transmit.level||e.level,i=jr(a,r);if(jr(o,r)<i)return}e[o]=ME(e,t,r,o);let n=DE(e);n.length!==0&&(e[o]=NE(n,e[o]))}function NE(e,t){return function(){return t.apply(this,[...e,...arguments])}}function ME(e,t,r,o){return function(n){return function(){let i=t.timestamp(),c=new Array(arguments.length),u=Object.getPrototypeOf&&Object.getPrototypeOf(this)===ti?ti:this;for(var s=0;s<c.length;s++)c[s]=arguments[s];var l=!1;if(t.serialize&&(Hd(c,this._serialize,this.serializers,this._stdErrSerialize),l=!0),t.asObject||t.formatters?n.call(u,LE(this,o,c,i,t)):n.apply(u,c),t.transmit){let d=t.transmit.level||e._level,p=jr(d,r),m=jr(o,r);if(m<p)return;QE(this,{ts:i,methodLevel:o,methodValue:m,transmitLevel:d,transmitValue:r.levels.values[t.transmit.level||e._level],send:t.transmit.send,val:jr(e._level,r)},c,l)}}}(e[Kd][o])}function LE(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?HS(c.shift(),c):void 0}else typeof u=="string"&&(u=HS(c.shift(),c));return u!==void 0&&(s[n.messageKey]=u),i(s)}function Hd(e,t,r,o){for(let n in e)if(o&&e[n]instanceof Error)e[n]=or.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 QE(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||Hd(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=Wd(s)}function Wd(e){return{ts:0,messages:[],bindings:e||[],level:{label:"",value:0}}}function YS(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 UE(e){return typeof e.timestamp=="function"?e.timestamp:e.timestamp===!1?JS:XS}function ks(){return{}}function $d(e){return e}function Ln(){}function JS(){return!1}function XS(){return Date.now()}function BE(){return Math.round(Date.now()/1e3)}function jE(){return new Date(Date.now()).toISOString()}function _E(){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)||{}}}Vs.exports.default=or;Vs.exports.pino=or});var Tp={};vm(Tp,{ProductListing:()=>Bu,Search:()=>Uu});var bm="coveo-headless-internal-state",Q=Symbol.for(bm),wm=e=>new Proxy(e,{ownKeys(t){return Reflect.ownKeys(t).filter(r=>r!==Q)},get(t,r,o){return typeof r=="symbol"&&r.description===bm&&r!==Q&&e.logger.warn(`You might be loading Headless twice. Please check your setup.
|
|
19
|
-
If you are trying to access the inner state... Don't`),Reflect.get(t,r,o)}});import{isNullOrUndefined as rF}from"@coveo/bueno";function he(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 pR=typeof Symbol=="function"&&Symbol.observable||"@@observable",Im=pR,Ru=()=>Math.random().toString(36).substring(7).split("").join("."),fR={INIT:`@@redux/INIT${Ru()}`,REPLACE:`@@redux/REPLACE${Ru()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Ru()}`},pi=fR;function Ct(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 Fu(e,t,r){if(typeof e!="function")throw new Error(he(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(he(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(he(1));return r(Fu)(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(he(3));return n}function d(S){if(typeof S!="function")throw new Error(he(4));if(u)throw new Error(he(5));let x=!0;s();let y=c++;return i.set(y,S),function(){if(x){if(u)throw new Error(he(6));x=!1,s(),i.delete(y),a=null}}}function p(S){if(!Ct(S))throw new Error(he(7));if(typeof S.type>"u")throw new Error(he(8));if(typeof S.type!="string")throw new Error(he(17));if(u)throw new Error(he(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(he(10));o=S,p({type:pi.REPLACE})}function f(){let S=d;return{subscribe(x){if(typeof x!="object"||x===null)throw new Error(he(11));function y(){let P=x;P.next&&P.next(l())}return y(),{unsubscribe:S(y)}},[Im](){return this}}}return p({type:pi.INIT}),{dispatch:p,subscribe:d,getState:l,replaceReducer:m,[Im]:f}}function gR(e){Object.keys(e).forEach(t=>{let r=e[t];if(typeof r(void 0,{type:pi.INIT})>"u")throw new Error(he(12));if(typeof r(void 0,{type:pi.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(he(13))})}function bo(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{gR(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(he(14))}l[p]=g,s=s||g!==f}return s=s||o.length!==Object.keys(c).length,s?l:c}}function wo(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...o)=>t(r(...o)))}function Em(...e){return t=>(r,o)=>{let n=t(r,o),a=()=>{throw new Error(he(15))},i={getState:n.getState,dispatch:(u,...s)=>a(u,...s)},c=e.map(u=>u(i));return a=wo(...c)(n.dispatch),{...n,dispatch:a}}}function fi(e){return Ct(e)&&"type"in e&&typeof e.type=="string"}var qu=Symbol.for("immer-nothing"),Yn=Symbol.for("immer-draftable"),Me=Symbol.for("immer-state");function Se(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Kr=Object.getPrototypeOf;function ze(e){return!!e&&!!e[Me]}function Le(e){return e?Vm(e)||Array.isArray(e)||!!e[Yn]||!!e.constructor?.[Yn]||ta(e)||ra(e):!1}var yR=Object.prototype.constructor.toString();function Vm(e){if(!e||typeof e!="object")return!1;let t=Kr(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)===yR}function ku(e){return ze(e)||Se(15,e),e[Me].base_}function Jn(e,t){Hr(e)===0?Reflect.ownKeys(e).forEach(r=>{t(r,e[r],e)}):e.forEach((r,o)=>t(o,r,e))}function Hr(e){let t=e[Me];return t?t.type_:Array.isArray(e)?1:ta(e)?2:ra(e)?3:0}function Xn(e,t){return Hr(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Pu(e,t){return Hr(e)===2?e.get(t):e[t]}function Dm(e,t,r){let o=Hr(e);o===2?e.set(t,r):o===3?e.add(r):e[t]=r}function hR(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function ta(e){return e instanceof Map}function ra(e){return e instanceof Set}function Wr(e){return e.copy_||e.base_}function bu(e,t){if(ta(e))return new Map(e);if(ra(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);let r=Vm(e);if(t===!0||t==="class_only"&&!r){let o=Object.getOwnPropertyDescriptors(e);delete o[Me];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(Kr(e),o)}else{let o=Kr(e);if(o!==null&&r)return{...e};let n=Object.create(o);return Object.assign(n,e)}}function hi(e,t=!1){return Si(e)||ze(e)||!Le(e)||(Hr(e)>1&&(e.set=e.add=e.clear=e.delete=SR),Object.freeze(e),t&&Object.entries(e).forEach(([r,o])=>hi(o,!0))),e}function SR(){Se(2)}function Si(e){return Object.isFrozen(e)}var wu={};function Gr(e){let t=wu[e];return t||Se(0,e),t}function CR(e,t){wu[e]||(wu[e]=t)}var Zn;function Nm(){return Zn}function xR(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Tm(e,t){t&&(Gr("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Iu(e){Eu(e),e.drafts_.forEach(RR),e.drafts_=null}function Eu(e){e===Zn&&(Zn=e.parent_)}function Om(e){return Zn=xR(Zn,e)}function RR(e){let t=e[Me];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function qm(e,t){t.unfinalizedDrafts_=t.drafts_.length;let r=t.drafts_[0];return e!==void 0&&e!==r?(r[Me].modified_&&(Iu(t),Se(4)),Le(e)&&(e=gi(t,e),t.parent_||yi(t,e)),t.patches_&&Gr("Patches").generateReplacementPatches_(r[Me].base_,e,t.patches_,t.inversePatches_)):e=gi(t,r,[]),Iu(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==qu?e:void 0}function gi(e,t,r){if(Si(t))return t;let o=t[Me];if(!o)return Jn(t,(n,a)=>km(e,o,t,n,a,r)),t;if(o.scope_!==e)return t;if(!o.modified_)return yi(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),Jn(a,(c,u)=>km(e,o,n,c,u,r,i)),yi(e,n,!1),r&&e.patches_&&Gr("Patches").generatePatches_(o,r,e.patches_,e.inversePatches_)}return o.copy_}function km(e,t,r,o,n,a,i){if(ze(n)){let c=a&&t&&t.type_!==3&&!Xn(t.assigned_,o)?a.concat(o):void 0,u=gi(e,n,c);if(Dm(r,o,u),ze(u))e.canAutoFreeze_=!1;else return}else i&&r.add(n);if(Le(n)&&!Si(n)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;gi(e,n),(!t||!t.scope_.parent_)&&typeof o!="symbol"&&Object.prototype.propertyIsEnumerable.call(r,o)&&yi(e,n)}}function yi(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&hi(t,r)}function FR(e,t){let r=Array.isArray(e),o={type_:r?1:0,scope_:t?t.scope_:Nm(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1},n=o,a=Vu;r&&(n=[o],a=ea);let{revoke:i,proxy:c}=Proxy.revocable(n,a);return o.draft_=c,o.revoke_=i,c}var Vu={get(e,t){if(t===Me)return e;let r=Wr(e);if(!Xn(r,t))return PR(e,r,t);let o=r[t];return e.finalized_||!Le(o)?o:o===Au(e.base_,t)?(vu(e),e.copy_[t]=Ou(o,e)):o},has(e,t){return t in Wr(e)},ownKeys(e){return Reflect.ownKeys(Wr(e))},set(e,t,r){let o=Mm(Wr(e),t);if(o?.set)return o.set.call(e.draft_,r),!0;if(!e.modified_){let n=Au(Wr(e),t),a=n?.[Me];if(a&&a.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(hR(r,n)&&(r!==void 0||Xn(e.base_,t)))return!0;vu(e),Tu(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 Au(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,vu(e),Tu(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let r=Wr(e),o=Reflect.getOwnPropertyDescriptor(r,t);return o&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:o.enumerable,value:r[t]}},defineProperty(){Se(11)},getPrototypeOf(e){return Kr(e.base_)},setPrototypeOf(){Se(12)}},ea={};Jn(Vu,(e,t)=>{ea[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});ea.deleteProperty=function(e,t){return ea.set.call(this,e,t,void 0)};ea.set=function(e,t,r){return Vu.set.call(this,e[0],t,r,e[0])};function Au(e,t){let r=e[Me];return(r?Wr(r):e)[t]}function PR(e,t,r){let o=Mm(t,r);return o?"value"in o?o.value:o.get?.call(e.draft_):void 0}function Mm(e,t){if(!(t in e))return;let r=Kr(e);for(;r;){let o=Object.getOwnPropertyDescriptor(r,t);if(o)return o;r=Kr(r)}}function Tu(e){e.modified_||(e.modified_=!0,e.parent_&&Tu(e.parent_))}function vu(e){e.copy_||(e.copy_=bu(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var AR=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"&&Se(6),o!==void 0&&typeof o!="function"&&Se(7);let n;if(Le(t)){let a=Om(this),i=Ou(t,void 0),c=!0;try{n=r(i),c=!1}finally{c?Iu(a):Eu(a)}return Tm(a,o),qm(n,a)}else if(!t||typeof t!="object"){if(n=r(t),n===void 0&&(n=t),n===qu&&(n=void 0),this.autoFreeze_&&hi(n,!0),o){let a=[],i=[];Gr("Patches").generateReplacementPatches_(t,n,a,i),o(a,i)}return n}else Se(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){Le(e)||Se(8),ze(e)&&(e=Lm(e));let t=Om(this),r=Ou(e,void 0);return r[Me].isManual_=!0,Eu(t),r}finishDraft(e,t){let r=e&&e[Me];(!r||!r.isManual_)&&Se(9);let{scope_:o}=r;return Tm(o,t),qm(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=Gr("Patches").applyPatches_;return ze(e)?o(e,t):this.produce(e,n=>o(n,t))}};function Ou(e,t){let r=ta(e)?Gr("MapSet").proxyMap_(e,t):ra(e)?Gr("MapSet").proxySet_(e,t):FR(e,t);return(t?t.scope_:Nm()).drafts_.push(r),r}function Lm(e){return ze(e)||Se(10,e),Qm(e)}function Qm(e){if(!Le(e)||Si(e))return e;let t=e[Me],r;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=bu(e,t.scope_.immer_.useStrictShallowCopy_)}else r=bu(e,!0);return Jn(r,(o,n)=>{Dm(r,o,Qm(n))}),t&&(t.finalized_=!1),r}function Um(){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;Jn(p.assigned_,(y,C)=>{let P=Pu(S,y),O=Pu(x,y),A=C?Xn(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===qu?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=Hr(x),F=g[O];typeof F!="string"&&typeof F!="number"&&(F=""+F),(A===0||A===1)&&(F==="__proto__"||F==="constructor")&&Se(19),typeof x=="function"&&F==="prototype"&&Se(19),x=Pu(x,F),typeof x!="object"&&Se(18,g.join("/"))}let y=Hr(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:Se(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:Se(17,S)}}),p}function l(p){if(!Le(p))return p;if(Array.isArray(p))return p.map(l);if(ta(p))return new Map(Array.from(p.entries()).map(([f,g])=>[f,l(g)]));if(ra(p))return new Set(Array.from(p).map(l));let m=Object.create(Kr(p));for(let f in p)m[f]=l(p[f]);return Xn(p,Yn)&&(m[Yn]=p[Yn]),m}function d(p){return ze(p)?l(p):p}CR("Patches",{applyPatches_:s,generatePatches_:n,generateReplacementPatches_:u})}var We=new AR,$t=We.produce,Ci=We.produceWithPatches.bind(We),Yk=We.setAutoFreeze.bind(We),Jk=We.setUseStrictShallowCopy.bind(We),Du=We.applyPatches.bind(We),Xk=We.createDraft.bind(We),Zk=We.finishDraft.bind(We);function vR(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function bR(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function wR(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 Bm=e=>Array.isArray(e)?e:[e];function IR(e){let t=Array.isArray(e[0])?e[0]:e;return wR(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function ER(e,t){let r=[],{length:o}=e;for(let n=0;n<o;n++)r.push(e[n].apply(null,t));return r}var rV=Symbol();var oV=Object.getPrototypeOf({});var TR=class{constructor(e){this.value=e}deref(){return this.value}},OR=typeof WeakRef<"u"?WeakRef:TR,qR=0,jm=1;function xi(){return{s:qR,v:void 0,o:null,p:null}}function Io(e,t={}){let r=xi(),{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=xi(),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=xi(),f.set(m,c)):c=g}}let s=c,l;if(c.s===jm)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 OR(l):l}return s.s=jm,s.v=l,l}return i.clearCache=()=>{r=xi(),i.resetResultsCount()},i.resultsCount=()=>a,i.resetResultsCount=()=>{a=0},i}function _m(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()),vR(s,`createSelector expects an output function after the inputs, but received: [${typeof s}]`);let l={...r,...u},{memoize:d,memoizeOptions:p=[],argsMemoize:m=Io,argsMemoizeOptions:f=[],devModeChecks:g={}}=l,S=Bm(p),x=Bm(f),y=IR(n),C=d(function(){return a++,s.apply(null,arguments)},...S),P=!0,O=m(function(){i++;let F=ER(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 N=_m(Io),kR=Object.assign((e,t=N)=>{bR(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);let r=Object.keys(e),o=r.map(a=>e[a]);return t(o,(...a)=>a.reduce((i,c,u)=>(i[r[u]]=c,i),{}))},{withTypes:()=>kR});function $m(e){return({dispatch:r,getState:o})=>n=>a=>typeof a=="function"?a(r,o,e):n(a)}var zm=$m(),Wm=$m;var VR=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?wo:wo.apply(null,arguments)},pV=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}},DR=e=>e&&typeof e.match=="function";function h(e,t){function r(...o){if(t){let n=t(...o);if(!n)throw new Error(st(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=>fi(o)&&o.type===e,r}var Jm=class oa extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,oa.prototype)}static get[Symbol.species](){return oa}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new oa(...t[0].concat(this)):new oa(...t.concat(this))}};function Km(e){return Le(e)?$t(e,()=>{}):e}function Hm(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function NR(e){return typeof e=="boolean"}var MR=()=>function(t){let{thunk:r=!0,immutableCheck:o=!0,serializableCheck:n=!0,actionCreatorCheck:a=!0}=t??{},i=new Jm;return r&&(NR(r)?i.push(zm):i.push(Wm(r.extraArgument))),i},ar="RTK_autoBatch",To=()=>e=>({payload:e,meta:{[ar]:!0}}),Gm=e=>t=>{setTimeout(t,e)},LR=(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:Gm(10):e.type==="callback"?e.queueNotification:Gm(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?.[ar],a=!n,a&&(i||(i=!0,u(s))),o.dispatch(l)}finally{n=!0}}})},QR=e=>function(r){let{autoBatch:o=!0}=r??{},n=new Jm(e);return o&&n.push(LR(typeof o=="object"?o:void 0)),n};function Xm(e){let t=MR(),{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(Ct(r))c=bo(r);else throw new Error(st(1));let u;typeof o=="function"?u=o(t):u=t();let s=wo;n&&(s=VR({trace:!1,...typeof n=="object"&&n}));let l=Em(...u),d=QR(l),p=typeof i=="function"?i(d):d(),m=s(...p);return Fu(c,a,m)}function Zm(e){let t={},r=[],o,n={addCase(a,i){let c=typeof a=="string"?a:a.type;if(!c)throw new Error(st(28));if(c in t)throw new Error(st(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 UR(e){return typeof e=="function"}function B(e,t){let[r,o,n]=Zm(t),a;if(UR(e))a=()=>Km(e());else{let c=Km(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(ze(l)){let m=d(l,u);return m===void 0?l:m}else{if(Le(l))return $t(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 ep=(e,t)=>DR(e)?e.match(t):e(t);function xt(...e){return t=>e.some(r=>ep(r,t))}function Eo(...e){return t=>e.every(r=>ep(r,t))}function Fi(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 na(e){return typeof e[0]=="function"&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function Pi(...e){return e.length===0?t=>Fi(t,["pending"]):na(e)?xt(...e.map(t=>t.pending)):Pi()(e[0])}function Yr(...e){return e.length===0?t=>Fi(t,["rejected"]):na(e)?xt(...e.map(t=>t.rejected)):Yr()(e[0])}function aa(...e){let t=r=>r&&r.meta&&r.meta.rejectedWithValue;return e.length===0?Eo(Yr(...e),t):na(e)?Eo(Yr(...e),t):aa()(e[0])}function zt(...e){return e.length===0?t=>Fi(t,["fulfilled"]):na(e)?xt(...e.map(t=>t.fulfilled)):zt()(e[0])}function Ai(...e){return e.length===0?t=>Fi(t,["pending","fulfilled","rejected"]):na(e)?xt(...e.flatMap(t=>[t.pending,t.rejected,t.fulfilled])):Ai()(e[0])}var BR="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",vi=(e=21)=>{let t="",r=e;for(;r--;)t+=BR[Math.random()*64|0];return t},jR=["name","message","stack","code"],Nu=class{constructor(e,t){Fe(this,"_type");this.payload=e,this.meta=t}},Ym=class{constructor(e,t){Fe(this,"_type");this.payload=e,this.meta=t}},_R=e=>{if(typeof e=="object"&&e!==null){let t={};for(let r of jR)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||_R)(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):vi(),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(zR(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 Nu(A,F),fulfillWithValue:(A,F)=>new Ym(A,F)})).then(A=>{if(A instanceof Nu)throw A;return A instanceof Ym?n(A.payload,p,u,A.meta):n(A,p,u)})])}catch(P){y=P instanceof Nu?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($R)}})}}return Object.assign(c,{pending:a,rejected:i,fulfilled:n,settled:xt(i,n),typePrefix:t})}return e.withTypes=()=>e,e})();function $R(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function zR(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var tp=Symbol.for("rtk-slice-createasyncthunk"),SV={[tp]:_};function WR(e,t){return`${e}/${t}`}function KR({creators:e}={}){let t=e?.asyncThunk?.[tp];return function(o){let{name:n,reducerPath:a=n}=o;if(!n)throw new Error(st(11));typeof process<"u";let i=(typeof o.reducers=="function"?o.reducers(GR()):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(st(12));if(P in u.sliceCaseReducersByType)throw new Error(st(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:WR(n,y),createNotation:typeof o.reducers=="function"};JR(C)?ZR(P,C,s,t):YR(P,C,s)});function l(){let[y={},C=[],P=void 0]=typeof o.extraReducers=="function"?Zm(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=Hm(p,C,()=>new WeakMap);return Hm(F,A,()=>{let E={};for(let[w,q]of Object.entries(o.selectors??{}))E[w]=HR(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 HR(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 Jr=KR();function GR(){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 YR({type:e,reducerName:t,createNotation:r},o,n){let a,i;if("reducer"in o){if(r&&!XR(o))throw new Error(st(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 JR(e){return e._reducerDefinitionType==="asyncThunk"}function XR(e){return e._reducerDefinitionType==="reducerWithPrepare"}function ZR({type:e,reducerName:t},r,o,n){if(!n)throw new Error(st(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||Ri,pending:c||Ri,rejected:u||Ri,settled:s||Ri})}function Ri(){}var rp="listener",op="completed",np="cancelled",CV=`task-${np}`,xV=`task-${op}`,RV=`${rp}-${np}`,FV=`${rp}-${op}`;var{assign:ap}=Object;var Mu="listenerMiddleware";var eF=ap(h(`${Mu}/add`),{withTypes:()=>eF}),PV=h(`${Mu}/removeAll`),tF=ap(h(`${Mu}/remove`),{withTypes:()=>tF});var AV=Symbol.for("rtk-state-proxy-original");function st(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 ir=N(e=>e.commercePagination?.principal.perPage||0,e=>e),bi=N((e,t)=>e.commercePagination?.recommendations[t]?.perPage||0,e=>e),cr=N(e=>e.commercePagination?.principal.totalEntries||0,e=>e),wi=N((e,t)=>e.commercePagination?.recommendations[t]?.totalEntries||0,e=>e),Ii=N(e=>e.commercePagination?.principal.page||0,e=>e),ip=N((e,t)=>e.commercePagination?.recommendations[t]?.page||0,e=>e);var NV=N(e=>e[Q].productListing.responseId,e=>e),ia=N(e=>e.productListing.responseId,e=>e),cp=N(e=>e.productListing.requestId,e=>e),ca=N(e=>e.productListing?.products.length||0,e=>e),sp=N(e=>({total:cr(e),current:ca(e)}),({current:e,total:t})=>e<t),up=N(e=>e.productListing?.isLoading,e=>rF(e)?!1:e),lp=N(e=>e.productListing?.error,e=>e??null);import{isNullOrUndefined as Rp}from"@coveo/bueno";function Lu(e,t,r){if(e===void 0)return{};let o=t(e);return o!==r?{q:o}:{}}function Qu(e,t,r){if(e===void 0)return{};let o=t(e);return o!==r?{sortCriteria:o}:{}}function Rt(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 Ft(e){let{activeValue:t,ancestryMap:r}=nF(e);return t?aF(t,r):[]}function nF(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 aF(e,t){let r=[];if(!e)return[];let o=e;do r.unshift(o),o=t.get(o);while(o);return r}function dp(){return{principal:sr(),recommendations:{}}}function sr(){return{page:0,perPage:0,totalEntries:0,totalPages:0}}import{ArrayValue as sF,EnumValue as fp,StringValue as gp,RecordValue as yp}from"@coveo/bueno";import{ArrayValue as iF,EnumValue as mp,RecordValue as pp,StringValue as cF}from"@coveo/bueno";var ut=(r=>(r.Relevance="relevance",r.Fields="fields",r))(ut||{}),Xr=(r=>(r.Ascending="asc",r.Descending="desc",r))(Xr||{}),Pt=()=>({by:"relevance"});var BV=new pp({options:{required:!1},values:{by:new mp({enum:ut,required:!0}),fields:new iF({each:new pp({values:{name:new cF,direction:new mp({enum:Xr})}})})}});var Ei=e=>({by:"fields",fields:e}),hp=new yp({options:{required:!1},values:{by:new fp({enum:ut,required:!0}),fields:new sF({each:new yp({values:{field:new gp({required:!0}),direction:new fp({enum:Xr}),displayName:new gp}})})}});function Zr(){return{appliedSort:Pt(),availableSorts:[Pt()]}}function Ti(e){return{...uF(e?.commercePagination,t=>t.principal.page,sr().page),...lF(e?.commercePagination,t=>t.principal.perPage,sr().perPage),...Qu(e?.commerceSort,t=>t.appliedSort,Zr().appliedSort),...Rt(e.commerceFacetSet,ur(e,"regular"),dF,"f"),...Rt(e.commerceFacetSet,ur(e,"regular"),mF,"fExcluded"),...Rt(e.commerceFacetSet,ur(e,"location"),pF,"lf"),...Rt(e.commerceFacetSet,ur(e,"hierarchical"),fF,"cf"),...Rt(e.commerceFacetSet,ur(e,"dateRange"),Sp,"df"),...Rt(e.commerceFacetSet,ur(e,"dateRange"),Cp,"dfExcluded"),...Rt(e.commerceFacetSet,ur(e,"numericalRange"),Sp,"nf"),...Rt(e.commerceFacetSet,ur(e,"numericalRange"),Cp,"nfExcluded"),...xp("selected",e.manualNumericFacetSet),...xp("excluded",e.manualNumericFacetSet)}}function uF(e,t,r){if(e===void 0)return{};let o=t(e);return o!==r?{page:o}:{}}function lF(e,t,r){if(e===void 0)return{};let o=t(e);return o!==r?{perPage:o}:{}}function dF(e){return e.values.filter(t=>t.state==="selected").map(t=>t.value)}function mF(e){return e.values.filter(t=>t.state==="excluded").map(t=>t.value)}function pF(e){return e.values.filter(t=>t.state==="selected").map(t=>t.value)}function Sp(e){return e.values.filter(t=>t.state==="selected")}function Cp(e){return e.values.filter(t=>t.state==="excluded")}function xp(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 fF(e){return Ft(e.values).map(r=>r.value)}function ur(e,t){return r=>e.commerceFacetSet[r].request.type===t}var Oi=()=>({query:""});var mD=N(e=>e[Q].commerceSearch.responseId,e=>e),sa=N(e=>e.commerceSearch.responseId,e=>e),Fp=N(e=>e.commerceSearch.requestId,e=>e),ua=N(e=>e.commerceSearch?.products.length||0,e=>e),Pp=N(e=>({total:cr(e),current:ua(e)}),({current:e,total:t})=>e<t),Ap=N(e=>e.commerceSearch?.isLoading,e=>Rp(e)?!1:e),vp=N(e=>e.commerceSearch?.error,e=>e??null),qi=N(e=>e.commerceQuery?.query,e=>e??""),gF=N(e=>e.commerceSearch?.queryExecuted,e=>e),bp=(e,t)=>Rp(t.queryCorrection?.correctedQuery)?qi(e):t.queryCorrection.correctedQuery,wp=e=>({...Lu(e?.commerceQuery,t=>t.query,Oi().query),...Ti(e)});function Ip(e){return{query:gF(e)||""}}var Uu;(t=>t.responseIdSelector=Ep(sa))(Uu||(Uu={}));var Bu;(t=>t.responseIdSelector=Ep(ia))(Bu||(Bu={}));function Ep(e){return t=>e(t[Q])}var kp={};vm(kp,{escape:()=>Oo,getHighlightedSuggestion:()=>_u,highlightString:()=>SF});import{isNullOrUndefined as hF}from"@coveo/bueno";var eo=(e,t=5)=>e+Math.random().toString(36).substring(2,2+t);function Op(e){return Array.isArray(e)}function ki(e){return e.trim()===""}function qp(e){let t={};for(let[r,o]of e)t[r]=o;return t}function la(e){if(typeof e!="object"||!e)return e;try{return JSON.parse(JSON.stringify(e))}catch{return e}}function SF(e){if(ki(e.openingDelimiter)||ki(e.closingDelimiter))throw Error("delimiters should be a non-empty string");if(hF(e.content)||ki(e.content))return e.content;if(e.highlights.length===0)return Oo(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+=Oo(e.content.slice(o,i)),r+=e.openingDelimiter,r+=Oo(e.content.slice(i,c)),r+=e.closingDelimiter,o=c}return o!==t&&(r+=Oo(e.content.slice(o))),r}function _u(e,t){return e=Oo(e),e.replace(/\[(.*?)\]|\{(.*?)\}|\((.*?)\)/g,(r,o,n,a)=>o?ju(o,t.notMatchDelimiters):n?ju(n,t.exactMatchDelimiters):a?ju(a,t.correctionDelimiters):r)}function ju(e,t){return t?t.open+e+t.close:e}function Oo(e){let t={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},r="(?:"+Object.keys(t).join("|")+")",o=RegExp(r),n=RegExp(r,"g");return o.test(e)?e.replace(n,a=>t[a]):e}var zp=St(Bp(),1);var $F="recommendation-internal-options",bD=Symbol.for($F);var $=new Error("Failed to load reducers."),qo=class extends Error{constructor(){super(),this.name="ExpiredToken",this.message="The token being used to perform the request is expired."}};var ro=class extends Error{constructor(r,o){super();Fe(this,"statusCode");this.name="Disconnected",this.message=`Client could not connect to the following URL: ${r}`,this.statusCode=o??0}};function jp(e){let t=[];for(let r in e){let o=encodeURIComponent(r),n=encodeURIComponent(e[r]);t.push(`${o}=${n}`)}return t.join("&")}function _p(e){return typeof e!="object"||!e?!1:Object.values(e).every(zF)}function zF(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"}function $p(e){return e===429}var ko=class e{static async call(t){let r=WF(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($p(u.status))throw u;return u};try{let u=await(0,zp.backOff)(c,{retry:s=>{let l=s&&$p(s.status);return l&&o.info("Platform retrying request"),l}});switch(u.status){case 419:case 401:throw o.info("Platform renewing token"),new qo;case 404:throw new ro(a,u.status);default:return o.info({response:u,requestInfo:n},"Platform response"),u}}catch(u){return u.message==="Failed to fetch"?new ro(a):u}}static async preprocessRequest(t,r){let{origin:o,preprocessRequest:n,logger:a,requestMetadata:i}=r,{signal:c,...u}=t,s=la(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 Pe(e,t="prod",r="platform"){let o=t==="prod"?"":t,n=r==="platform"?"":`.${r}`;return`https://${e}${n}.org${o}.coveo.com`}function Je(e,t="prod"){return`${Pe(e,t)}/rest/search/v2`}function Xu(e,t="prod"){return`${Pe(e,t,"analytics")}/rest/organizations/${e}/events/v1`}function WF(e){let{url:t,method:r,requestParams:o,contentType:n,accessToken:a,signal:i}=e,c=e.method==="POST"||e.method==="PUT",u=KF(o,n);return{url:t,method:r,headers:{"Content-Type":n,Authorization:`Bearer ${a}`,...e.headers},...c&&{body:u},signal:i}}function KF(e,t){return t==="application/x-www-form-urlencoded"?_p(e)?jp(e):"":JSON.stringify(e)}function HF(e){return{statusCode:e.statusCode,type:e.name,message:e.message}}function GF(e){return{statusCode:e.code,type:e.name,message:e.message,ignored:!0}}function Zu(e,t){if(t&&e.name==="AbortError")return{error:GF(e)};if(e instanceof ro)return{error:HF(e)};throw e}var Vo=(e,t)=>({...pa(e,t),requestParams:YF(e)}),YF=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}},pa=(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 Wp=(e,t)=>({...pa(e,t),requestParams:JF(e)}),JF=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 Kp=e=>({...pa(e,"search/querySuggest"),requestParams:XF(e)}),XF=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 Ae=e=>e.error!==void 0,Di=class{constructor(t){this.options=t}async getProductListing(t){return this.query({...Vo(t,"listing"),...this.options})}async search(t){let r=Vo(t,"search");return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async getRecommendations(t){return this.query({...Wp(t,"recommendations"),...this.options})}async productSuggestions(t){let r=Vo(t,"search/productSuggest");return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async querySuggest(t){let r=Kp(t);return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async facetSearch(t,r){let o=Vo(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=Vo(t,"search");return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async query(t){let r=await ko.call(t);if(r instanceof Error)return Zu(r);let o=await r.json();return r.ok?{success:o}:{error:o}}};function fa(e,t="prod"){return`${Pe(e,t)}/rest/organizations/${e}/commerce/v2`}var Ni=e=>e;import{StringValue as nf}from"@coveo/bueno";import{Schema as ZF,SchemaValidationError as eP,StringValue as ga,RecordValue as tP,ArrayValue as rP}from"@coveo/bueno";var T=new ga({required:!0,emptyAllowed:!1}),te=new ga({required:!1,emptyAllowed:!1}),ce=new ga({required:!0,emptyAllowed:!0}),Hp=new ga({required:!1,emptyAllowed:!0}),Gp=new rP({each:T,required:!0}),Yp=new ga({required:!1,emptyAllowed:!1,regex:/^\d+\.\d+\.\d+$/}),Ve=({message:e,name:t,stack:r})=>({message:e,name:t,stack:r}),ue=(e,t)=>{if("required"in t)return{payload:new ZF({value:t}).validate({value:e}).value};let n=new tP({options:{required:!0},values:t}).validate(e);if(n)throw new eP(n);return{payload:e}},R=(e,t)=>{try{return ue(e,t)}catch(r){return{payload:e,error:Ve(r)}}},Qe=(e,t,r,o)=>{let n=`Check the initialState of ${o}`;return Jp(e,t,r,n,"Controller initialization error")},De=(e,t,r,o)=>{let n=`Check the options of ${o}`;return Jp(e,t,r,n,"Controller initialization error")},Jp=(e,t,r,o,n)=>{try{return t.validate(r,o)}catch(a){throw e.logger.error(a,n),a}};import{ArrayValue as oP,BooleanValue as Zp,RecordValue as nP,StringValue as ya,Value as aP}from"@coveo/bueno";var Do="3.16.1-pre.2f5ed054e8",Xp=["@coveo/atomic","@coveo/quantic"];var el=()=>te,ef=()=>T,oo=h("configuration/updateBasicConfiguration",e=>R(e,{accessToken:te,environment:new ya({required:!1,constrainTo:["prod","hipaa","stg","dev"]}),organizationId:te})),tf=h("configuration/updateSearchConfiguration",e=>R(e,{proxyBaseUrl:new ya({required:!1,url:!0}),pipeline:new ya({required:!1,emptyAllowed:!0}),searchHub:te,timezone:te,locale:te,authenticationProviders:new oP({required:!1,each:T})})),No={enabled:new Zp({default:!0}),originContext:el(),originLevel2:el(),originLevel3:el(),proxyBaseUrl:new ya({required:!1,url:!0}),runtimeEnvironment:new aP,anonymous:new Zp({default:!1}),deviceId:te,userDisplayName:te,documentLocation:te,trackingId:te,analyticsMode:new ya({constrainTo:["legacy","next"],required:!1,default:"next"}),source:new nP({options:{required:!1},values:Xp.reduce((e,t)=>(e[t]=Yp,e),{})})},tl=h("configuration/updateAnalyticsConfiguration",e=>R(e,No)),Mi=h("configuration/analytics/disable"),Li=h("configuration/analytics/enable"),rf=h("configuration/analytics/originlevel2",e=>R(e,{originLevel2:ef()})),of=h("configuration/analytics/originlevel3",e=>R(e,{originLevel3:ef()}));var Mo=h("commerce/configuration/updateBasicConfiguration",e=>R(e,{accessToken:te,environment:new nf({required:!1,constrainTo:["prod","hipaa","stg","dev"]}),organizationId:te})),Lo=h("commerce/configuration/updateProxyBaseUrl",e=>R(e,{proxyBaseUrl:new nf({required:!1,url:!0})})),Qo=h("commerce/configuration/updateAnalyticsConfiguration",e=>R(e,{enabled:No.enabled,proxyBaseUrl:No.proxyBaseUrl,source:No.source,trackingId:No.trackingId})),Qi=h("commerce/configuration/analytics/disable"),Ui=h("commerce/configuration/analytics/enable");import{isNullOrUndefined as no}from"@coveo/bueno";var af=()=>({accessToken:"",environment:"prod",organizationId:"",analytics:{enabled:!0,trackingId:"",source:{}},commerce:{}});var rl=B(af(),e=>e.addCase(Mo,(t,r)=>{cf(t,r.payload)}).addCase(oo,(t,r)=>{cf(t,r.payload)}).addCase(Lo,(t,r)=>{iP(t,r.payload)}).addCase(Qo,(t,r)=>{cP(t,r.payload)}).addCase(Qi,t=>{t.analytics.enabled=!1}).addCase(Ui,t=>{t.analytics.enabled=!0}));function cf(e,t){no(t.accessToken)||(e.accessToken=t.accessToken),e.environment=t.environment??"prod",no(t.organizationId)||(e.organizationId=t.organizationId)}function iP(e,t){no(t.proxyBaseUrl)||(e.commerce.apiBaseUrl=t.proxyBaseUrl)}function cP(e,t){no(t.enabled)||(e.analytics.enabled=t.enabled),no(t.proxyBaseUrl)||(e.analytics.apiBaseUrl=t.proxyBaseUrl),no(t.source)||(e.analytics.source=t.source),no(t.trackingId)||(e.analytics.trackingId=t.trackingId)}function Uo(e){return e.currency}var sf=(e,t)=>({currency:Uo(t.commerceContext),products:sP(t.cart),transaction:e}),uf=(e,t)=>({currency:Uo(t.commerceContext),...e}),ao=N(e=>e.cart,e=>e.cartItems,(e,t)=>t.map(r=>e[r])),sP=N(ao,e=>e.map(({quantity:t,...r})=>({quantity:t,product:r})));import{ArrayValue as uP,NumberValue as lf,RecordValue as lP,Schema as dP,StringValue as mP}from"@coveo/bueno";var ol={productId:T,quantity:new lf({required:!0,min:0}),name:new mP({required:!1}),price:new lf({required:!1,min:0})},nl=new uP({each:new lP({values:{...ol}})}),al={items:nl},df=new dP(al);var lr=h("commerce/cart/setItems",e=>R(e,nl)),Bo=h("commerce/cart/updateItemQuantity",e=>R(e,ol)),jo=h("commerce/cart/purchase"),Bi=_("commerce/cart/emit/purchaseEvent",async(e,{extra:t,getState:r})=>{let o=sf(e,r()),{relay:n}=t;n.emit("ec.purchase",o)}),ji=_("commerce/cart/emit/cartActionEvent",async(e,{extra:t,getState:r})=>{let o=uf(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 mf(e,t){return e.cart[io(t)]}var pf=N(ao,e=>e.reduce((t,r)=>t+r.quantity,0)),ff=N(ao,e=>e.reduce((t,r)=>t+r.price*r.quantity,0));function pP(e,t={}){if(!fP(e))throw $;let{dispatch:r}=e,o=z(e),n=()=>e[Q].cart,a={...t.initialState};Qe(e,df,a,"buildCart"),a.items!==void 0&&r(lr(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 ao(n()))this.updateItemQuantity({...l,quantity:0})},purchase(l){r(Bi(l)),r(jo())},updateItemQuantity(l){let d=mf(n(),l);!d&&l.quantity<=0||u(l,d)||(i(l,d)&&r(ji(s(l,d))),r(Bo(l)))},get state(){let l=n();return{items:ao(l),totalQuantity:pf(l),totalPrice:ff(l)}}}}function io(e){return`${e.productId},${e.name},${e.price}`}function fP(e){return e.addReducers({cart:_o}),!0}var _i=()=>({cartItems:[],cart:{},purchasedItems:[],purchased:{}}),$i=e=>yf(e.cartItems,e.cart),gf=e=>yf(e.purchasedItems,e.purchased);function yf(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 _o=B(_i(),e=>{e.addCase(lr,(t,{payload:r})=>{let{cart:o,cartItems:n}=r.reduce((a,i)=>{let c=io(i);return{cartItems:[...a.cartItems,c],cart:{...a.cart,[c]:i},purchasedItems:[],purchased:{}}},_i());hf(t,n,o)}).addCase(Bo,(t,{payload:r})=>{let o=io(r);if(!(o in t.cart)){gP(r,t);return}if(r.quantity<=0){yP(r,t);return}t.cart[o]=r}).addCase(jo,t=>{hP(t);let{cart:r,cartItems:o}=_i();hf(t,o,r)})});function hf(e,t,r){e.cartItems=t,e.cart=r}function gP(e,t){if(e.quantity<=0)return;let r=io(e);t.cartItems=[...t.cartItems,r],t.cart[r]=e}function yP(e,t){let r=io(e);t.cartItems=t.cartItems.filter(o=>o!==r),delete t.cart[r]}function hP(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]}}import{NumberValue as Sf,RecordValue as Cf,Schema as SP,StringValue as CP}from"@coveo/bueno";var xP=Intl.supportedValuesOf("currency"),RP=new CP({required:!0,emptyAllowed:!1,constrainTo:xP}),il={url:T},cl={latitude:new Sf({min:-90,max:90,required:!0}),longitude:new Sf({min:-180,max:180,required:!0})},ha={language:T,country:T,currency:RP,view:new Cf({options:{required:!0},values:il}),location:new Cf({options:{required:!1},values:cl})},xf=new SP(ha);var ne=h("commerce/context/set",e=>R(e,ha)),ae=h("commerce/context/setView",e=>R(e,il)),$o=h("commerce/context/setLocation",e=>R(e,cl));var Rf=()=>({language:"",country:"",currency:"",view:{url:""}});var At=B(Rf(),e=>{e.addCase(ne,(t,{payload:r})=>r).addCase(ae,(t,{payload:r})=>{t.view=r}).addCase($o,(t,{payload:r})=>{t.location=r})});var zi=()=>({correctedQuery:"",corrections:[],originalQuery:""});import{BooleanValue as OP,RecordValue as qP,StringValue as vf}from"@coveo/bueno";var Xe=h("breadcrumb/deselectAll"),dr=h("breadcrumb/deselectAllNonBreadcrumbs");var vt=N(e=>e.source,e=>Object.entries(e).map(([t,r])=>`${t}@${r}`).concat(`@coveo/headless@${Do}`));var Ke=(e,t)=>({...Sa(e,t),facets:[...PP(e)],...e.commerceSort&&{sort:AP(e.commerceSort.appliedSort)}}),Ff=(e,t)=>{let{commercePagination:r,...o}=e;return{...Ke(o,t)}},Sa=(e,t,r)=>{let{view:o,location:n,...a}=e.commerceContext;return{accessToken:e.configuration.accessToken,url:e.configuration.commerce.apiBaseUrl??fa(e.configuration.organizationId,e.configuration.environment),organizationId:e.configuration.organizationId,trackingId:e.configuration.analytics.trackingId,...a,...e.configuration.analytics.enabled?{clientId:t.clientId}:{},context:{user:{...n,...t.userAgent?{userAgent:t.userAgent}:{}},view:{...o,...t.referrer?{referrer:t.referrer}:{}},capture:e.configuration.analytics.enabled,cart:$i(e.cart),source:vt(e.configuration.analytics)},...FP(e,r)}},FP=(e,t)=>{let r=t?e.commercePagination?.recommendations[t]:e.commercePagination?.principal;return r&&{page:r.page,...r.perPage&&{perPage:r.perPage}}};function PP(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 AP(e){return e.by==="relevance"?{sortCriteria:"relevance"}:{sortCriteria:"fields",fields:e.fields.map(({name:t,direction:r})=>({field:t,direction:r}))}}import{BooleanValue as sl,NumberValue as vP}from"@coveo/bueno";var co=h("commerce/facets/core/updateNumberOfValues",e=>R(e,{facetId:T,numberOfValues:new vP({required:!0,min:1})})),so=h("commerce/facets/core/updateIsFieldExpanded",e=>R(e,{facetId:T,isFieldExpanded:new sl({required:!0})})),ve=h("commerce/facets/core/clearAll"),be=h("commerce/facets/core/deselectAllValues",e=>R(e,{facetId:T})),uo=h("commerce/facets/core/updateFreezeCurrentValues",e=>R(e,{facetId:T,freezeCurrentValues:new sl({required:!0})})),zo=h("commerce/facets/core/updateAutoSelectionForAll",e=>R(e,{allow:new sl({required:!0})}));import{NumberValue as Pf}from"@coveo/bueno";var Wi={slotId:Hp},bP={...Wi,pageSize:new Pf({required:!0,min:0})},Kt=h("commerce/pagination/setPageSize",e=>R(e,bP)),wP={...Wi,page:new Pf({required:!0,min:0})},bt=h("commerce/pagination/selectPage",e=>R(e,wP)),mr=h("commerce/pagination/nextPage",e=>R(e,Wi)),pr=h("commerce/pagination/previousPage",e=>R(e,Wi)),Wo=h("commerce/pagination/registerRecommendationsSlot",e=>R(e,{slotId:T}));import{StringValue as IP}from"@coveo/bueno";var we=h("commerce/query/update",e=>R(e,{query:new IP}));import{isNullOrUndefined as Af}from"@coveo/bueno";import{RecordValue as EP,StringValue as TP}from"@coveo/bueno";var fr=h("commerce/triggers/query/updateIgnore",e=>R(e,{q:new TP({emptyAllowed:!0,required:!0})})),Ko=h("commerce/triggers/query/applyModification",e=>R(e,new EP({values:{originalQuery:te,modification:te}})));var Ca=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 Ae(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(!(!Af(n)&&!Af(n.correctedQuery)))return null;let{correctedQuery:i,originalQuery:c}=o.queryCorrection;return this.onUpdateQueryForCorrection(i??""),{...t,response:{...o},queryExecuted:bp(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(fr({q:""})),null;let a=this.getCurrentQuery(),i=await this.automaticallyRetryQueryWithTriggerModification(o);return Ae(i.response)?this.rejectWithValue(i.response.error):{...i,response:{...i.response.success},originalQuery:a}}async automaticallyRetryQueryWithTriggerModification(t){return this.dispatch(Ko({newQuery:t,originalQuery:this.getCurrentQuery()})),this.onUpdateQueryForCorrection(t),await this.fetchFromAPI({...Ke(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 Ae(t.response)?null:t.response.success}get extra(){return this.config.extra}onUpdateQueryForCorrection(t){this.dispatch(we({query:t}))}};var H=_("commerce/search/executeSearch",async(e,t)=>{let{getState:r}=t,o=r(),{navigatorContext:n}=t.extra,a=Ke(o,n),i=qi(o),c=new Ca(t),u=await c.fetchFromAPI({...a,query:i});return c.process(u)}),gr=_("commerce/search/fetchMoreProducts",async(e,t)=>{let{getState:r}=t,o=r(),{navigatorContext:n}=t.extra;if(!Pp(o))return null;let i=ir(o),u=ua(o)/i,s=qi(o),l=Ke(o,n),d=new Ca(t),p=await d.fetchFromAPI({...l,query:s,page:u});return d.process(p)}),Ho=_("commerce/search/prepareForSearchWithQuery",(e,t)=>{let{dispatch:r}=t;R(e,{query:new vf,clearFilters:new OP}),e.clearFilters&&(r(ve()),r(dr())),r(zo({allow:!0})),r(we({query:e.query})),r(bt({page:0}))}),Go=_("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({...Ff(n,i),query:c});return Ae(u)?r(u.error):{response:{...u.success,products:u.success.products}}}),kP={child:new qP({options:{required:!0},values:{permanentid:new vf({required:!0})}})},Yo=h("commerce/search/promoteChildToParent",e=>R(e,kP));function bf(){return{wasCorrectedTo:"",queryCorrection:zi(),originalQuery:""}}var Ki=B(bf(),e=>{e.addCase(H.pending,t=>{t.queryCorrection=zi(),t.wasCorrectedTo=""}).addCase(H.fulfilled,(t,r)=>{let{queryCorrection:o}=r.payload.response;t.originalQuery=r.payload.originalQuery,t.wasCorrectedTo=o?.correctedQuery??"",t.queryCorrection={correctedQuery:o?.correctedQuery??o?.corrections[0]?.correctedQuery??"",wordCorrections:o?.corrections[0]?.wordCorrections??[]}})});import{Value as Ef,BooleanValue as wf,ArrayValue as Gi,StringValue as Hi,NumberValue as If,RecordValue as UP}from"@coveo/bueno";var K=T;import{Value as VP,NumberValue as DP,StringValue as NP,ArrayValue as MP,BooleanValue as LP}from"@coveo/bueno";var QP={state:new VP({required:!0}),numberOfResults:new DP({required:!0,min:0}),value:new NP({required:!0,emptyAllowed:!0}),path:new MP({required:!0,each:T}),moreValuesAvailable:new LP({required:!1})};function xa(e){e.children.forEach(t=>{xa(t)}),ue({state:e.state,numberOfResults:e.numberOfResults,value:e.value,path:e.path,moreValuesAvailable:e.moreValuesAvailable},QP)}var Jo={facetId:K,field:T,tabs:new UP({options:{required:!1},values:{included:new Gi({each:new Hi}),excluded:new Gi({each:new Hi})}}),activeTab:new Hi({required:!1}),delimitingCharacter:new Hi({required:!1,emptyAllowed:!0}),filterFacetCount:new wf({required:!1}),injectionDepth:new If({required:!1,min:0}),numberOfValues:new If({required:!1,min:1}),sortCriteria:new Ef({required:!1}),basePath:new Gi({required:!1,each:T}),filterByBasePath:new wf({required:!1})},Xo=5,Tf=h("categoryFacet/register",e=>R(e,Jo)),Of=h("categoryFacet/toggleSelectValue",e=>{try{return ue(e.facetId,T),xa(e.selection),{payload:e,error:null}}catch(t){return{payload:e,error:Ve(t)}}}),qf=h("categoryFacet/deselectAll",e=>R(e,Jo.facetId)),H0=h("categoryFacet/updateNumberOfValues",e=>R(e,{facetId:Jo.facetId,numberOfValues:Jo.numberOfValues})),G0=h("categoryFacet/updateSortCriterion",e=>R(e,{facetId:Jo.facetId,criterion:new Ef})),Y0=h("categoryFacet/updateBasePath",e=>R(e,{facetId:Jo.facetId,basePath:new Gi({each:T})}));import{NumberValue as $P,RecordValue as zP,ArrayValue as WP}from"@coveo/bueno";import{RecordValue as BP,NumberValue as jP,StringValue as _P}from"@coveo/bueno";var Ra={facetId:K,captions:new BP({options:{required:!1}}),numberOfValues:new jP({required:!1,min:1}),query:new _P({required:!1,emptyAllowed:!0})};var KP={path:new WP({required:!0,each:T}),displayValue:ce,rawValue:ce,count:new $P({required:!0,min:0})},yr=h("categoryFacet/selectSearchResult",e=>R(e,{facetId:K,value:new zP({values:KP})})),Yi=h("categoryFacetSearch/register",e=>R(e,Ra));import{RecordValue as HP,NumberValue as GP}from"@coveo/bueno";var kf={facetId:K,value:new HP({values:{displayValue:ce,rawValue:ce,count:new GP({required:!0,min:0})}})},Ji=h("facetSearch/register",e=>R(e,Ra)),hr=h("facetSearch/update",e=>R(e,Ra)),lt=h("facetSearch/toggleSelectValue",e=>R(e,kf)),dt=h("facetSearch/toggleExcludeValue",e=>R(e,kf));import{BooleanValue as YP}from"@coveo/bueno";var Ht=h("facetOptions/update",(e={freezeFacetOrder:!0})=>R(e,{freezeFacetOrder:new YP({required:!1})})),ul=h("facetOptions/facet/enable",e=>R(e,K)),Gt=h("facetOptions/facet/disable",e=>R(e,K));var JP=h("history/undo"),XP=h("history/redo"),wt=h("history/snapshot"),CL=_("history/back",async(e,{dispatch:t})=>{t(JP()),await t(me())}),xL=_("history/forward",async(e,{dispatch:t})=>{t(XP()),await t(me())}),me=_("history/change",async(e,{getState:t})=>t().history.present);import{BooleanValue as Vf,StringValue as Fa,NumberValue as Df,RecordValue as Sr}from"@coveo/bueno";var Xi={q:new Fa,enableQuerySyntax:new Vf,aq:new Fa,cq:new Fa,firstResult:new Df({min:0}),numberOfResults:new Df({min:0}),sortCriteria:new Fa,f:new Sr,fExcluded:new Sr,cf:new Sr,nf:new Sr,mnf:new Sr,df:new Sr,debug:new Vf,sf:new Sr,tab:new Fa,af:new Sr};var Ce=h("searchParameters/restore",e=>R(e,Xi));import{BooleanValue as ly,NumberValue as dy,StringValue as lw}from"@coveo/bueno";function Yt(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,o=Object.getOwnPropertySymbols(e);n<o.length;n++)t.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(r[o[n]]=e[o[n]]);return r}function v(e,t,r,o){function n(a){return a instanceof r?a:new r(function(i){i(a)})}return new(r||(r=Promise))(function(a,i){function c(l){try{s(o.next(l))}catch(d){i(d)}}function u(l){try{s(o.throw(l))}catch(d){i(d)}}function s(l){l.done?a(l.value):n(l.value).then(c,u)}s((o=o.apply(e,t||[])).next())})}var G;(function(e){e.search="search",e.click="click",e.custom="custom",e.view="view",e.collect="collect"})(G||(G={}));function ml(){return typeof window<"u"}function vl(){return typeof navigator<"u"}function Zo(){return typeof document<"u"}function pl(){try{return typeof localStorage<"u"}catch{return!1}}function ZP(){try{return typeof sessionStorage<"u"}catch{return!1}}function Gf(){return vl()&&navigator.cookieEnabled}var eA=[G.click,G.custom,G.search,G.view],tA=(e,t)=>eA.indexOf(e)!==-1?Object.assign({language:Zo()?document.documentElement.lang:"unknown",userAgent:vl()?navigator.userAgent:"unknown"},t):t,va=class e{static set(t,r,o){var n,a,i,c;o&&(a=new Date,a.setTime(a.getTime()+o)),c=window.location.hostname,c.indexOf(".")===-1?Nf(t,r,a):(i=c.split("."),n=i[i.length-2]+"."+i[i.length-1],Nf(t,r,a,n))}static get(t){for(var r=t+"=",o=document.cookie.split(";"),n=0;n<o.length;n++){var a=o[n];if(a=a.replace(/^\s+/,""),a.lastIndexOf(r,0)===0)return a.substring(r.length,a.length)}return null}static erase(t){e.set(t,"",-1)}};function Nf(e,t,r,o){document.cookie=`${e}=${t}`+(r?`;expires=${r.toUTCString()}`:"")+(o?`;domain=${o}`:"")+";path=/;SameSite=Lax"}function rA(){return pl()?localStorage:Gf()?new ba:ZP()?sessionStorage:new tn}var ba=class e{getItem(t){return va.get(`${e.prefix}${t}`)}removeItem(t){va.erase(`${e.prefix}${t}`)}setItem(t,r,o){va.set(`${e.prefix}${t}`,r,o)}};ba.prefix="coveo_";var fl=class{constructor(){this.cookieStorage=new ba}getItem(t){return localStorage.getItem(t)||this.cookieStorage.getItem(t)}removeItem(t){this.cookieStorage.removeItem(t),localStorage.removeItem(t)}setItem(t,r){localStorage.setItem(t,r),this.cookieStorage.setItem(t,r,31556926e3)}},tn=class{getItem(t){return null}removeItem(t){}setItem(t,r){}},Pa="__coveo.analytics.history",Yf=20,Jf=1e3*60,Xf=75,rn=class{constructor(t){this.store=t||rA()}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(Pa);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(Pa);return t?JSON.parse(t):[]}catch{return[]}})}setHistory(t){try{this.store.setItem(Pa,JSON.stringify(t.slice(0,Yf)))}catch{}}clear(){try{this.store.removeItem(Pa)}catch{}}getMostRecentElement(){let t=this.getHistoryWithInternalTime();return Array.isArray(t)?t.sort((o,n)=>(n.internalTime||0)-(o.internalTime||0))[0]:null}cropQueryElement(t){return t.name&&t.value&&t.name.toLowerCase()==="query"&&(t.value=t.value.slice(0,Xf)),t}isValidEntry(t){let r=this.getMostRecentElement();return r&&r.value==t.value?(t.internalTime||0)-(r.internalTime||0)>Jf:!0}stripInternalTime(t){return Array.isArray(t)?t.map(r=>{let{name:o,time:n,value:a}=r;return{name:o,time:n,value:a}}):[]}stripEmptyQuery(t){let{name:r,time:o,value:n}=t;return r&&typeof n=="string"&&r.toLowerCase()==="query"&&n.trim()===""?{name:r,time:o}:t}stripEmptyQueries(t){return t.map(r=>this.stripEmptyQuery(r))}},Zf=Object.freeze({__proto__:null,HistoryStore:rn,MAX_NUMBER_OF_HISTORY_ELEMENTS:Yf,MAX_VALUE_SIZE:Xf,MIN_THRESHOLD_FOR_DUPLICATE_VALUE:Jf,STORE_KEY:Pa,default:rn}),oA=(e,t)=>v(void 0,void 0,void 0,function*(){return e===G.view?(yield nA(t.contentIdValue),Object.assign({location:window.location.toString(),referrer:document.referrer,title:document.title},t)):t}),nA=e=>v(void 0,void 0,void 0,function*(){let t=new rn,r={name:"PageView",value:e,time:new Date().toISOString()};yield t.addElementAsync(r)}),Zi,aA=new Uint8Array(16);function iA(){if(!Zi&&(Zi=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Zi))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Zi(aA)}var cA=/^(?:[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 tc(e){return typeof e=="string"&&cA.test(e)}var xe=[];for(let e=0;e<256;++e)xe.push((e+256).toString(16).slice(1));function eg(e,t=0){return(xe[e[t+0]]+xe[e[t+1]]+xe[e[t+2]]+xe[e[t+3]]+"-"+xe[e[t+4]]+xe[e[t+5]]+"-"+xe[e[t+6]]+xe[e[t+7]]+"-"+xe[e[t+8]]+xe[e[t+9]]+"-"+xe[e[t+10]]+xe[e[t+11]]+xe[e[t+12]]+xe[e[t+13]]+xe[e[t+14]]+xe[e[t+15]]).toLowerCase()}function sA(e){if(!tc(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 uA(e){e=unescape(encodeURIComponent(e));let t=[];for(let r=0;r<e.length;++r)t.push(e.charCodeAt(r));return t}var lA="6ba7b810-9dad-11d1-80b4-00c04fd430c8",dA="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function mA(e,t,r){function o(n,a,i,c){var u;if(typeof n=="string"&&(n=uA(n)),typeof a=="string"&&(a=sA(a)),((u=a)===null||u===void 0?void 0:u.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let s=new Uint8Array(16+n.length);if(s.set(a),s.set(n,a.length),s=r(s),s[6]=s[6]&15|t,s[8]=s[8]&63|128,i){c=c||0;for(let l=0;l<16;++l)i[c+l]=s[l];return i}return eg(s)}try{o.name=e}catch{}return o.DNS=lA,o.URL=dA,o}var pA=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Mf={randomUUID:pA};function lo(e,t,r){if(Mf.randomUUID&&!t&&!e)return Mf.randomUUID();e=e||{};let o=e.random||(e.rng||iA)();if(o[6]=o[6]&15|64,o[8]=o[8]&63|128,t){r=r||0;for(let n=0;n<16;++n)t[r+n]=o[n];return t}return eg(o)}function fA(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 ll(e,t){return e<<t|e>>>32-t}function gA(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]=ll(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=ll(u,5)+fA(f,s,l,d)+p+t[f]+c[m]>>>0;p=d,d=l,l=ll(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 yA=mA("v5",80,gA),Lf=yA,tg="2.30.43",Qf=e=>`${e.protocol}//${e.hostname}${e.pathname.indexOf("/")===0?e.pathname:`/${e.pathname}`}${e.search}`,Aa={pageview:"pageview",event:"event"},rc=class{constructor({client:t,uuidGenerator:r=lo}){this.client=t,this.uuidGenerator=r}},gl=class extends rc{constructor({client:t,uuidGenerator:r=lo}){super({client:t,uuidGenerator:r}),this.actionData={},this.pageViewId=r(),this.nextPageViewId=this.pageViewId,this.currentLocation=Qf(window.location),this.lastReferrer=Zo()?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:Zo()?document.title:"",encoding:Zo()?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===Aa.pageview&&(this.nextPageViewId=this.uuidGenerator(),this.hasSentFirstPageView=!0)}getNextValues(t,r){return{pageViewId:t===Aa.pageview?this.nextPageViewId:this.pageViewId,referrer:t===Aa.pageview&&this.hasSentFirstPageView?this.currentLocation:this.lastReferrer,location:t===Aa.pageview?this.getCurrentLocationFromPayload(r):this.currentLocation}}getCurrentLocationFromPayload(t){if(t.page){let r=n=>n.replace(/^\/?(.*)$/,"/$1");return`${(n=>n.split("/").slice(0,3).join("/"))(this.currentLocation)}${r(t.page)}`}else return Qf(window.location)}},Cr=class e{constructor(t,r){if(!tc(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 tc(a)?new e(a,Number.parseInt(n)*1e3):null}};Cr.cvo_cid="cvo_cid";Cr.expirationTime=120;var yl=class extends rc{constructor({client:t,uuidGenerator:r=lo}){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(Cr.cvo_cid,new Cr(o,Date.now()).toString()),r.toString()}catch{throw new Error("Invalid URL provided")}})}acceptFrom(t){this.client.setAcceptedLinkReferrers(t)}};yl.Id="link";var Ze=Object.keys;function ec(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}var dl=128,rg=192,Uf=224,Bf=240;function hA(e){return(e&248)===Bf?4:(e&Bf)===Uf?3:(e&Uf)===rg?2:1}function SA(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&dl)!=dl)break;if(r-=3,(o&rg)!=dl){t-r>=hA(o)*3&&(r=t);break}}return e.substring(0,r)}var hl={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"},CA=Ze(hl).map(e=>hl[e]),xA=[...CA].join("|"),RA=new RegExp(`^(${xA}$)`),FA={svcAction:"svc_action",svcActionData:"svc_action_data"},PA=e=>Ze(e).filter(t=>e[t]!==void 0).reduce((t,r)=>{let o=hl[r]||r;return Object.assign(Object.assign({},t),{[o]:e[r]})},{}),AA=e=>RA.test(e),vA=[AA],jf={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",price:"pr",quantity:"qt",coupon:"cc",position:"ps",group:"group"},_f={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",position:"ps",price:"pr",group:"group"},Ie={action:"pa",list:"pal",listSource:"pls"},oc={id:"ti",revenue:"tr",tax:"tt",shipping:"ts",coupon:"tcc",affiliation:"ta",step:"cos",option:"col"},bA=["loyaltyCardId","loyaltyTier","thirdPartyPersona","companyName","favoriteStore","storeName","userIndustry","userRole","userDepartment","businessUnit"],Sl={id:"quoteId",affiliation:"quoteAffiliation"},Cl={id:"reviewId",rating:"reviewRating",comment:"reviewComment"},wA={add:Ie,bookmark_add:Ie,bookmark_remove:Ie,click:Ie,checkout:Ie,checkout_option:Ie,detail:Ie,impression:Ie,remove:Ie,refund:Object.assign(Object.assign({},Ie),oc),purchase:Object.assign(Object.assign({},Ie),oc),quickview:Ie,quote:Object.assign(Object.assign({},Ie),Sl),review:Object.assign(Object.assign({},Ie),Cl)},IA=Ze(jf).map(e=>jf[e]),EA=Ze(_f).map(e=>_f[e]),TA=Ze(Ie).map(e=>Ie[e]),OA=Ze(oc).map(e=>oc[e]),qA=Ze(Cl).map(e=>Cl[e]),kA=Ze(Sl).map(e=>Sl[e]),VA=[...IA,"custom"].join("|"),DA=[...EA,"custom"].join("|"),og="(pr[0-9]+)",ng="(il[0-9]+pi[0-9]+)",NA=new RegExp(`^${og}(${VA})$`),MA=new RegExp(`^(${ng}(${DA}))|(il[0-9]+nm)$`),LA=new RegExp(`^(${TA.join("|")})$`),QA=new RegExp(`^(${OA.join("|")})$`),UA=new RegExp(`^${og}custom$`),BA=new RegExp(`^${ng}custom$`),jA=new RegExp(`^(${[...bA,...qA,...kA].join("|")})$`),_A=e=>NA.test(e),$A=e=>MA.test(e),zA=e=>LA.test(e),WA=e=>QA.test(e),KA=e=>jA.test(e),HA=[$A,_A,zA,WA,KA],GA=[UA,BA],YA={anonymizeIp:"aip"},JA={eventCategory:"ec",eventAction:"ea",eventLabel:"el",eventValue:"ev",page:"dp",visitorId:"cid",clientId:"cid",userId:"uid",currencyCode:"cu"},XA={hitType:"t",pageViewId:"pid",encoding:"de",location:"dl",referrer:"dr",screenColor:"sd",screenResolution:"sr",title:"dt",userAgent:"ua",language:"ul",eventId:"z",time:"tm"},ZA=["contentId","contentIdKey","contentType","searchHub","tab","searchUid","permanentId","contentLocale","trackingId"],ev=Object.assign(Object.assign(Object.assign(Object.assign({},YA),JA),XA),ZA.reduce((e,t)=>Object.assign(Object.assign({},e),{[t]:t}),{})),xl=Object.assign(Object.assign({},ev),FA),tv=e=>{let t=!!e.action&&wA[e.action]||{};return Ze(e).reduce((r,o)=>{let n=t[o]||xl[o]||o;return Object.assign(Object.assign({},r),{[n]:e[o]})},{})},rv=Ze(xl).map(e=>xl[e]),ov=e=>rv.indexOf(e)!==-1,nv=e=>e==="custom",av=e=>[...HA,...vA,ov,nv].some(t=>t(e)),iv=e=>Ze(e).reduce((t,r)=>{let o=cv(r);return o?Object.assign(Object.assign({},t),sv(o,e[r])):Object.assign(Object.assign({},t),{[r]:e[r]})},{}),cv=e=>{let t;return[...GA].every(r=>{var o;return t=(o=r.exec(e))===null||o===void 0?void 0:o[1],!t}),t},sv=(e,t)=>Ze(t).reduce((r,o)=>Object.assign(Object.assign({},r),{[`${e}${o}`]:t[o]}),{}),Rl=class{constructor(t){this.opts=t}sendEvent(t,r){return v(this,void 0,void 0,function*(){if(!this.isAvailable())throw new Error('navigator.sendBeacon is not supported in this browser. Consider adding a polyfill like "sendbeacon-polyfill".');let{baseUrl:o,preprocessRequest:n}=this.opts,a=yield this.getQueryParamsForEventType(t),{url:i,payload:c}=yield this.preProcessRequestAsPotentialJSONString(`${o}/analytics/${t}?${a}`,r,n),u=this.encodeForEventType(t,c),s=new Blob([u],{type:"application/x-www-form-urlencoded"});navigator.sendBeacon(i,s)})}isAvailable(){return"sendBeacon"in navigator}deleteHttpCookieVisitorId(){return Promise.resolve()}preProcessRequestAsPotentialJSONString(t,r,o){return v(this,void 0,void 0,function*(){let n=t,a=r;if(o){let i=yield o({url:t,body:JSON.stringify(r)},"analyticsBeacon"),{url:c,body:u}=i;n=c||t;try{a=JSON.parse(u)}catch(s){console.error("Unable to process the request body as a JSON string",s)}}return{payload:a,url:n}})}encodeForEventType(t,r){return this.isEventTypeLegacy(t)?this.encodeEventToJson(t,r):this.encodeEventToJson(t,r,this.opts.token)}getQueryParamsForEventType(t){return v(this,void 0,void 0,function*(){let{token:r,visitorIdProvider:o}=this.opts,n=yield o.getCurrentVisitorId();return[r&&this.isEventTypeLegacy(t)?`access_token=${r}`:"",n?`visitorId=${n}`:"","discardVisitInfo=true"].filter(a=>!!a).join("&")})}isEventTypeLegacy(t){return[G.click,G.custom,G.search,G.view].indexOf(t)!==-1}encodeEventToJson(t,r,o){let n=`${t}Event=${encodeURIComponent(JSON.stringify(r))}`;return o&&(n=`access_token=${encodeURIComponent(o)}&${n}`),n}},Fl=class{sendEvent(t,r){return v(this,void 0,void 0,function*(){return Promise.resolve()})}deleteHttpCookieVisitorId(){return v(this,void 0,void 0,function*(){return Promise.resolve()})}},$f=globalThis.fetch,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=Yt(u,["url"]),d;try{d=yield $f(s,l)}catch(p){console.error("An error has occured when sending the event.",p);return}if(d.ok){let p=yield d.json();return p.visitorId&&n.setCurrentVisitorId(p.visitorId),p}else{try{d.json()}catch{}throw console.error(`An error has occured when sending the "${t}" event.`,d,r),new Error(`An error has occurred when sending the "${t}" event. Check the console logs for more details.`)}})}deleteHttpCookieVisitorId(){return v(this,void 0,void 0,function*(){let{baseUrl:t}=this.opts,r=`${t}/analytics/visit`;yield $f(r,{headers:this.getHeaders(),method:"DELETE"})})}shouldAppendVisitorId(t){return[G.click,G.custom,G.search,G.view].indexOf(t)!==-1}getVisitorIdParam(){return v(this,void 0,void 0,function*(){let{visitorIdProvider:t}=this.opts,r=yield t.getCurrentVisitorId();return r?`?visitor=${r}`:""})}getHeaders(){let{token:t}=this.opts;return Object.assign(Object.assign({},t?{Authorization:`Bearer ${t}`}:{}),{"Content-Type":"application/json"})}},Pl=class{constructor(t,r){pl()&&Gf()?this.storage=new fl:pl()?this.storage=localStorage:(console.warn("BrowserRuntime detected no valid storage available.",this),this.storage=new tn),this.client=new nc(t),this.beaconClient=new Rl(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}},Al=class{constructor(t,r){this.storage=r||new tn,this.client=new nc(t)}getClientDependingOnEventType(t){return this.client}},ac=class{constructor(){this.storage=new tn,this.client=new Fl}getClientDependingOnEventType(t){return this.client}},uv="xx",lv=e=>e?.startsWith(uv)||!1,dv=`
|
|
19
|
+
If you are trying to access the inner state... Don't`),Reflect.get(t,r,o)}});import{isNullOrUndefined as rF}from"@coveo/bueno";function he(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 pR=typeof Symbol=="function"&&Symbol.observable||"@@observable",Im=pR,Ru=()=>Math.random().toString(36).substring(7).split("").join("."),fR={INIT:`@@redux/INIT${Ru()}`,REPLACE:`@@redux/REPLACE${Ru()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Ru()}`},pi=fR;function Ct(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 Fu(e,t,r){if(typeof e!="function")throw new Error(he(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(he(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(he(1));return r(Fu)(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(he(3));return n}function d(S){if(typeof S!="function")throw new Error(he(4));if(u)throw new Error(he(5));let x=!0;s();let y=c++;return i.set(y,S),function(){if(x){if(u)throw new Error(he(6));x=!1,s(),i.delete(y),a=null}}}function p(S){if(!Ct(S))throw new Error(he(7));if(typeof S.type>"u")throw new Error(he(8));if(typeof S.type!="string")throw new Error(he(17));if(u)throw new Error(he(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(he(10));o=S,p({type:pi.REPLACE})}function f(){let S=d;return{subscribe(x){if(typeof x!="object"||x===null)throw new Error(he(11));function y(){let P=x;P.next&&P.next(l())}return y(),{unsubscribe:S(y)}},[Im](){return this}}}return p({type:pi.INIT}),{dispatch:p,subscribe:d,getState:l,replaceReducer:m,[Im]:f}}function gR(e){Object.keys(e).forEach(t=>{let r=e[t];if(typeof r(void 0,{type:pi.INIT})>"u")throw new Error(he(12));if(typeof r(void 0,{type:pi.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(he(13))})}function bo(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{gR(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(he(14))}l[p]=g,s=s||g!==f}return s=s||o.length!==Object.keys(c).length,s?l:c}}function wo(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...o)=>t(r(...o)))}function Em(...e){return t=>(r,o)=>{let n=t(r,o),a=()=>{throw new Error(he(15))},i={getState:n.getState,dispatch:(u,...s)=>a(u,...s)},c=e.map(u=>u(i));return a=wo(...c)(n.dispatch),{...n,dispatch:a}}}function fi(e){return Ct(e)&&"type"in e&&typeof e.type=="string"}var qu=Symbol.for("immer-nothing"),Yn=Symbol.for("immer-draftable"),Me=Symbol.for("immer-state");function Se(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Kr=Object.getPrototypeOf;function ze(e){return!!e&&!!e[Me]}function Le(e){return e?Vm(e)||Array.isArray(e)||!!e[Yn]||!!e.constructor?.[Yn]||ta(e)||ra(e):!1}var yR=Object.prototype.constructor.toString();function Vm(e){if(!e||typeof e!="object")return!1;let t=Kr(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)===yR}function ku(e){return ze(e)||Se(15,e),e[Me].base_}function Jn(e,t){Hr(e)===0?Reflect.ownKeys(e).forEach(r=>{t(r,e[r],e)}):e.forEach((r,o)=>t(o,r,e))}function Hr(e){let t=e[Me];return t?t.type_:Array.isArray(e)?1:ta(e)?2:ra(e)?3:0}function Xn(e,t){return Hr(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Pu(e,t){return Hr(e)===2?e.get(t):e[t]}function Dm(e,t,r){let o=Hr(e);o===2?e.set(t,r):o===3?e.add(r):e[t]=r}function hR(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function ta(e){return e instanceof Map}function ra(e){return e instanceof Set}function Wr(e){return e.copy_||e.base_}function bu(e,t){if(ta(e))return new Map(e);if(ra(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);let r=Vm(e);if(t===!0||t==="class_only"&&!r){let o=Object.getOwnPropertyDescriptors(e);delete o[Me];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(Kr(e),o)}else{let o=Kr(e);if(o!==null&&r)return{...e};let n=Object.create(o);return Object.assign(n,e)}}function hi(e,t=!1){return Si(e)||ze(e)||!Le(e)||(Hr(e)>1&&(e.set=e.add=e.clear=e.delete=SR),Object.freeze(e),t&&Object.entries(e).forEach(([r,o])=>hi(o,!0))),e}function SR(){Se(2)}function Si(e){return Object.isFrozen(e)}var wu={};function Gr(e){let t=wu[e];return t||Se(0,e),t}function CR(e,t){wu[e]||(wu[e]=t)}var Zn;function Nm(){return Zn}function xR(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Tm(e,t){t&&(Gr("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Iu(e){Eu(e),e.drafts_.forEach(RR),e.drafts_=null}function Eu(e){e===Zn&&(Zn=e.parent_)}function Om(e){return Zn=xR(Zn,e)}function RR(e){let t=e[Me];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function qm(e,t){t.unfinalizedDrafts_=t.drafts_.length;let r=t.drafts_[0];return e!==void 0&&e!==r?(r[Me].modified_&&(Iu(t),Se(4)),Le(e)&&(e=gi(t,e),t.parent_||yi(t,e)),t.patches_&&Gr("Patches").generateReplacementPatches_(r[Me].base_,e,t.patches_,t.inversePatches_)):e=gi(t,r,[]),Iu(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==qu?e:void 0}function gi(e,t,r){if(Si(t))return t;let o=t[Me];if(!o)return Jn(t,(n,a)=>km(e,o,t,n,a,r)),t;if(o.scope_!==e)return t;if(!o.modified_)return yi(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),Jn(a,(c,u)=>km(e,o,n,c,u,r,i)),yi(e,n,!1),r&&e.patches_&&Gr("Patches").generatePatches_(o,r,e.patches_,e.inversePatches_)}return o.copy_}function km(e,t,r,o,n,a,i){if(ze(n)){let c=a&&t&&t.type_!==3&&!Xn(t.assigned_,o)?a.concat(o):void 0,u=gi(e,n,c);if(Dm(r,o,u),ze(u))e.canAutoFreeze_=!1;else return}else i&&r.add(n);if(Le(n)&&!Si(n)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;gi(e,n),(!t||!t.scope_.parent_)&&typeof o!="symbol"&&Object.prototype.propertyIsEnumerable.call(r,o)&&yi(e,n)}}function yi(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&hi(t,r)}function FR(e,t){let r=Array.isArray(e),o={type_:r?1:0,scope_:t?t.scope_:Nm(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1},n=o,a=Vu;r&&(n=[o],a=ea);let{revoke:i,proxy:c}=Proxy.revocable(n,a);return o.draft_=c,o.revoke_=i,c}var Vu={get(e,t){if(t===Me)return e;let r=Wr(e);if(!Xn(r,t))return PR(e,r,t);let o=r[t];return e.finalized_||!Le(o)?o:o===Au(e.base_,t)?(vu(e),e.copy_[t]=Ou(o,e)):o},has(e,t){return t in Wr(e)},ownKeys(e){return Reflect.ownKeys(Wr(e))},set(e,t,r){let o=Mm(Wr(e),t);if(o?.set)return o.set.call(e.draft_,r),!0;if(!e.modified_){let n=Au(Wr(e),t),a=n?.[Me];if(a&&a.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(hR(r,n)&&(r!==void 0||Xn(e.base_,t)))return!0;vu(e),Tu(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 Au(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,vu(e),Tu(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let r=Wr(e),o=Reflect.getOwnPropertyDescriptor(r,t);return o&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:o.enumerable,value:r[t]}},defineProperty(){Se(11)},getPrototypeOf(e){return Kr(e.base_)},setPrototypeOf(){Se(12)}},ea={};Jn(Vu,(e,t)=>{ea[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});ea.deleteProperty=function(e,t){return ea.set.call(this,e,t,void 0)};ea.set=function(e,t,r){return Vu.set.call(this,e[0],t,r,e[0])};function Au(e,t){let r=e[Me];return(r?Wr(r):e)[t]}function PR(e,t,r){let o=Mm(t,r);return o?"value"in o?o.value:o.get?.call(e.draft_):void 0}function Mm(e,t){if(!(t in e))return;let r=Kr(e);for(;r;){let o=Object.getOwnPropertyDescriptor(r,t);if(o)return o;r=Kr(r)}}function Tu(e){e.modified_||(e.modified_=!0,e.parent_&&Tu(e.parent_))}function vu(e){e.copy_||(e.copy_=bu(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var AR=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"&&Se(6),o!==void 0&&typeof o!="function"&&Se(7);let n;if(Le(t)){let a=Om(this),i=Ou(t,void 0),c=!0;try{n=r(i),c=!1}finally{c?Iu(a):Eu(a)}return Tm(a,o),qm(n,a)}else if(!t||typeof t!="object"){if(n=r(t),n===void 0&&(n=t),n===qu&&(n=void 0),this.autoFreeze_&&hi(n,!0),o){let a=[],i=[];Gr("Patches").generateReplacementPatches_(t,n,a,i),o(a,i)}return n}else Se(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){Le(e)||Se(8),ze(e)&&(e=Lm(e));let t=Om(this),r=Ou(e,void 0);return r[Me].isManual_=!0,Eu(t),r}finishDraft(e,t){let r=e&&e[Me];(!r||!r.isManual_)&&Se(9);let{scope_:o}=r;return Tm(o,t),qm(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=Gr("Patches").applyPatches_;return ze(e)?o(e,t):this.produce(e,n=>o(n,t))}};function Ou(e,t){let r=ta(e)?Gr("MapSet").proxyMap_(e,t):ra(e)?Gr("MapSet").proxySet_(e,t):FR(e,t);return(t?t.scope_:Nm()).drafts_.push(r),r}function Lm(e){return ze(e)||Se(10,e),Qm(e)}function Qm(e){if(!Le(e)||Si(e))return e;let t=e[Me],r;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=bu(e,t.scope_.immer_.useStrictShallowCopy_)}else r=bu(e,!0);return Jn(r,(o,n)=>{Dm(r,o,Qm(n))}),t&&(t.finalized_=!1),r}function Um(){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;Jn(p.assigned_,(y,C)=>{let P=Pu(S,y),O=Pu(x,y),A=C?Xn(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===qu?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=Hr(x),F=g[O];typeof F!="string"&&typeof F!="number"&&(F=""+F),(A===0||A===1)&&(F==="__proto__"||F==="constructor")&&Se(19),typeof x=="function"&&F==="prototype"&&Se(19),x=Pu(x,F),typeof x!="object"&&Se(18,g.join("/"))}let y=Hr(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:Se(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:Se(17,S)}}),p}function l(p){if(!Le(p))return p;if(Array.isArray(p))return p.map(l);if(ta(p))return new Map(Array.from(p.entries()).map(([f,g])=>[f,l(g)]));if(ra(p))return new Set(Array.from(p).map(l));let m=Object.create(Kr(p));for(let f in p)m[f]=l(p[f]);return Xn(p,Yn)&&(m[Yn]=p[Yn]),m}function d(p){return ze(p)?l(p):p}CR("Patches",{applyPatches_:s,generatePatches_:n,generateReplacementPatches_:u})}var We=new AR,$t=We.produce,Ci=We.produceWithPatches.bind(We),Yk=We.setAutoFreeze.bind(We),Jk=We.setUseStrictShallowCopy.bind(We),Du=We.applyPatches.bind(We),Xk=We.createDraft.bind(We),Zk=We.finishDraft.bind(We);function vR(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function bR(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function wR(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 Bm=e=>Array.isArray(e)?e:[e];function IR(e){let t=Array.isArray(e[0])?e[0]:e;return wR(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function ER(e,t){let r=[],{length:o}=e;for(let n=0;n<o;n++)r.push(e[n].apply(null,t));return r}var rV=Symbol();var oV=Object.getPrototypeOf({});var TR=class{constructor(e){this.value=e}deref(){return this.value}},OR=typeof WeakRef<"u"?WeakRef:TR,qR=0,jm=1;function xi(){return{s:qR,v:void 0,o:null,p:null}}function Io(e,t={}){let r=xi(),{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=xi(),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=xi(),f.set(m,c)):c=g}}let s=c,l;if(c.s===jm)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 OR(l):l}return s.s=jm,s.v=l,l}return i.clearCache=()=>{r=xi(),i.resetResultsCount()},i.resultsCount=()=>a,i.resetResultsCount=()=>{a=0},i}function _m(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()),vR(s,`createSelector expects an output function after the inputs, but received: [${typeof s}]`);let l={...r,...u},{memoize:d,memoizeOptions:p=[],argsMemoize:m=Io,argsMemoizeOptions:f=[],devModeChecks:g={}}=l,S=Bm(p),x=Bm(f),y=IR(n),C=d(function(){return a++,s.apply(null,arguments)},...S),P=!0,O=m(function(){i++;let F=ER(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 N=_m(Io),kR=Object.assign((e,t=N)=>{bR(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);let r=Object.keys(e),o=r.map(a=>e[a]);return t(o,(...a)=>a.reduce((i,c,u)=>(i[r[u]]=c,i),{}))},{withTypes:()=>kR});function $m(e){return({dispatch:r,getState:o})=>n=>a=>typeof a=="function"?a(r,o,e):n(a)}var zm=$m(),Wm=$m;var VR=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?wo:wo.apply(null,arguments)},pV=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}},DR=e=>e&&typeof e.match=="function";function h(e,t){function r(...o){if(t){let n=t(...o);if(!n)throw new Error(st(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=>fi(o)&&o.type===e,r}var Jm=class oa extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,oa.prototype)}static get[Symbol.species](){return oa}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new oa(...t[0].concat(this)):new oa(...t.concat(this))}};function Km(e){return Le(e)?$t(e,()=>{}):e}function Hm(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function NR(e){return typeof e=="boolean"}var MR=()=>function(t){let{thunk:r=!0,immutableCheck:o=!0,serializableCheck:n=!0,actionCreatorCheck:a=!0}=t??{},i=new Jm;return r&&(NR(r)?i.push(zm):i.push(Wm(r.extraArgument))),i},ar="RTK_autoBatch",To=()=>e=>({payload:e,meta:{[ar]:!0}}),Gm=e=>t=>{setTimeout(t,e)},LR=(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:Gm(10):e.type==="callback"?e.queueNotification:Gm(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?.[ar],a=!n,a&&(i||(i=!0,u(s))),o.dispatch(l)}finally{n=!0}}})},QR=e=>function(r){let{autoBatch:o=!0}=r??{},n=new Jm(e);return o&&n.push(LR(typeof o=="object"?o:void 0)),n};function Xm(e){let t=MR(),{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(Ct(r))c=bo(r);else throw new Error(st(1));let u;typeof o=="function"?u=o(t):u=t();let s=wo;n&&(s=VR({trace:!1,...typeof n=="object"&&n}));let l=Em(...u),d=QR(l),p=typeof i=="function"?i(d):d(),m=s(...p);return Fu(c,a,m)}function Zm(e){let t={},r=[],o,n={addCase(a,i){let c=typeof a=="string"?a:a.type;if(!c)throw new Error(st(28));if(c in t)throw new Error(st(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 UR(e){return typeof e=="function"}function B(e,t){let[r,o,n]=Zm(t),a;if(UR(e))a=()=>Km(e());else{let c=Km(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(ze(l)){let m=d(l,u);return m===void 0?l:m}else{if(Le(l))return $t(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 ep=(e,t)=>DR(e)?e.match(t):e(t);function xt(...e){return t=>e.some(r=>ep(r,t))}function Eo(...e){return t=>e.every(r=>ep(r,t))}function Fi(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 na(e){return typeof e[0]=="function"&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function Pi(...e){return e.length===0?t=>Fi(t,["pending"]):na(e)?xt(...e.map(t=>t.pending)):Pi()(e[0])}function Yr(...e){return e.length===0?t=>Fi(t,["rejected"]):na(e)?xt(...e.map(t=>t.rejected)):Yr()(e[0])}function aa(...e){let t=r=>r&&r.meta&&r.meta.rejectedWithValue;return e.length===0?Eo(Yr(...e),t):na(e)?Eo(Yr(...e),t):aa()(e[0])}function zt(...e){return e.length===0?t=>Fi(t,["fulfilled"]):na(e)?xt(...e.map(t=>t.fulfilled)):zt()(e[0])}function Ai(...e){return e.length===0?t=>Fi(t,["pending","fulfilled","rejected"]):na(e)?xt(...e.flatMap(t=>[t.pending,t.rejected,t.fulfilled])):Ai()(e[0])}var BR="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",vi=(e=21)=>{let t="",r=e;for(;r--;)t+=BR[Math.random()*64|0];return t},jR=["name","message","stack","code"],Nu=class{constructor(e,t){Fe(this,"_type");this.payload=e,this.meta=t}},Ym=class{constructor(e,t){Fe(this,"_type");this.payload=e,this.meta=t}},_R=e=>{if(typeof e=="object"&&e!==null){let t={};for(let r of jR)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||_R)(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):vi(),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(zR(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 Nu(A,F),fulfillWithValue:(A,F)=>new Ym(A,F)})).then(A=>{if(A instanceof Nu)throw A;return A instanceof Ym?n(A.payload,p,u,A.meta):n(A,p,u)})])}catch(P){y=P instanceof Nu?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($R)}})}}return Object.assign(c,{pending:a,rejected:i,fulfilled:n,settled:xt(i,n),typePrefix:t})}return e.withTypes=()=>e,e})();function $R(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function zR(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var tp=Symbol.for("rtk-slice-createasyncthunk"),SV={[tp]:_};function WR(e,t){return`${e}/${t}`}function KR({creators:e}={}){let t=e?.asyncThunk?.[tp];return function(o){let{name:n,reducerPath:a=n}=o;if(!n)throw new Error(st(11));typeof process<"u";let i=(typeof o.reducers=="function"?o.reducers(GR()):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(st(12));if(P in u.sliceCaseReducersByType)throw new Error(st(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:WR(n,y),createNotation:typeof o.reducers=="function"};JR(C)?ZR(P,C,s,t):YR(P,C,s)});function l(){let[y={},C=[],P=void 0]=typeof o.extraReducers=="function"?Zm(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=Hm(p,C,()=>new WeakMap);return Hm(F,A,()=>{let E={};for(let[w,q]of Object.entries(o.selectors??{}))E[w]=HR(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 HR(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 Jr=KR();function GR(){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 YR({type:e,reducerName:t,createNotation:r},o,n){let a,i;if("reducer"in o){if(r&&!XR(o))throw new Error(st(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 JR(e){return e._reducerDefinitionType==="asyncThunk"}function XR(e){return e._reducerDefinitionType==="reducerWithPrepare"}function ZR({type:e,reducerName:t},r,o,n){if(!n)throw new Error(st(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||Ri,pending:c||Ri,rejected:u||Ri,settled:s||Ri})}function Ri(){}var rp="listener",op="completed",np="cancelled",CV=`task-${np}`,xV=`task-${op}`,RV=`${rp}-${np}`,FV=`${rp}-${op}`;var{assign:ap}=Object;var Mu="listenerMiddleware";var eF=ap(h(`${Mu}/add`),{withTypes:()=>eF}),PV=h(`${Mu}/removeAll`),tF=ap(h(`${Mu}/remove`),{withTypes:()=>tF});var AV=Symbol.for("rtk-state-proxy-original");function st(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 ir=N(e=>e.commercePagination?.principal.perPage||0,e=>e),bi=N((e,t)=>e.commercePagination?.recommendations[t]?.perPage||0,e=>e),cr=N(e=>e.commercePagination?.principal.totalEntries||0,e=>e),wi=N((e,t)=>e.commercePagination?.recommendations[t]?.totalEntries||0,e=>e),Ii=N(e=>e.commercePagination?.principal.page||0,e=>e),ip=N((e,t)=>e.commercePagination?.recommendations[t]?.page||0,e=>e);var NV=N(e=>e[Q].productListing.responseId,e=>e),ia=N(e=>e.productListing.responseId,e=>e),cp=N(e=>e.productListing.requestId,e=>e),ca=N(e=>e.productListing?.products.length||0,e=>e),sp=N(e=>({total:cr(e),current:ca(e)}),({current:e,total:t})=>e<t),up=N(e=>e.productListing?.isLoading,e=>rF(e)?!1:e),lp=N(e=>e.productListing?.error,e=>e??null);import{isNullOrUndefined as Rp}from"@coveo/bueno";function Lu(e,t,r){if(e===void 0)return{};let o=t(e);return o!==r?{q:o}:{}}function Qu(e,t,r){if(e===void 0)return{};let o=t(e);return o!==r?{sortCriteria:o}:{}}function Rt(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 Ft(e){let{activeValue:t,ancestryMap:r}=nF(e);return t?aF(t,r):[]}function nF(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 aF(e,t){let r=[];if(!e)return[];let o=e;do r.unshift(o),o=t.get(o);while(o);return r}function dp(){return{principal:sr(),recommendations:{}}}function sr(){return{page:0,perPage:0,totalEntries:0,totalPages:0}}import{ArrayValue as sF,EnumValue as fp,StringValue as gp,RecordValue as yp}from"@coveo/bueno";import{ArrayValue as iF,EnumValue as mp,RecordValue as pp,StringValue as cF}from"@coveo/bueno";var ut=(r=>(r.Relevance="relevance",r.Fields="fields",r))(ut||{}),Xr=(r=>(r.Ascending="asc",r.Descending="desc",r))(Xr||{}),Pt=()=>({by:"relevance"});var BV=new pp({options:{required:!1},values:{by:new mp({enum:ut,required:!0}),fields:new iF({each:new pp({values:{name:new cF,direction:new mp({enum:Xr})}})})}});var Ei=e=>({by:"fields",fields:e}),hp=new yp({options:{required:!1},values:{by:new fp({enum:ut,required:!0}),fields:new sF({each:new yp({values:{field:new gp({required:!0}),direction:new fp({enum:Xr}),displayName:new gp}})})}});function Zr(){return{appliedSort:Pt(),availableSorts:[Pt()]}}function Ti(e){return{...uF(e?.commercePagination,t=>t.principal.page,sr().page),...lF(e?.commercePagination,t=>t.principal.perPage,sr().perPage),...Qu(e?.commerceSort,t=>t.appliedSort,Zr().appliedSort),...Rt(e.commerceFacetSet,ur(e,"regular"),dF,"f"),...Rt(e.commerceFacetSet,ur(e,"regular"),mF,"fExcluded"),...Rt(e.commerceFacetSet,ur(e,"location"),pF,"lf"),...Rt(e.commerceFacetSet,ur(e,"hierarchical"),fF,"cf"),...Rt(e.commerceFacetSet,ur(e,"dateRange"),Sp,"df"),...Rt(e.commerceFacetSet,ur(e,"dateRange"),Cp,"dfExcluded"),...Rt(e.commerceFacetSet,ur(e,"numericalRange"),Sp,"nf"),...Rt(e.commerceFacetSet,ur(e,"numericalRange"),Cp,"nfExcluded"),...xp("selected",e.manualNumericFacetSet),...xp("excluded",e.manualNumericFacetSet)}}function uF(e,t,r){if(e===void 0)return{};let o=t(e);return o!==r?{page:o}:{}}function lF(e,t,r){if(e===void 0)return{};let o=t(e);return o!==r?{perPage:o}:{}}function dF(e){return e.values.filter(t=>t.state==="selected").map(t=>t.value)}function mF(e){return e.values.filter(t=>t.state==="excluded").map(t=>t.value)}function pF(e){return e.values.filter(t=>t.state==="selected").map(t=>t.value)}function Sp(e){return e.values.filter(t=>t.state==="selected")}function Cp(e){return e.values.filter(t=>t.state==="excluded")}function xp(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 fF(e){return Ft(e.values).map(r=>r.value)}function ur(e,t){return r=>e.commerceFacetSet[r].request.type===t}var Oi=()=>({query:""});var mD=N(e=>e[Q].commerceSearch.responseId,e=>e),sa=N(e=>e.commerceSearch.responseId,e=>e),Fp=N(e=>e.commerceSearch.requestId,e=>e),ua=N(e=>e.commerceSearch?.products.length||0,e=>e),Pp=N(e=>({total:cr(e),current:ua(e)}),({current:e,total:t})=>e<t),Ap=N(e=>e.commerceSearch?.isLoading,e=>Rp(e)?!1:e),vp=N(e=>e.commerceSearch?.error,e=>e??null),qi=N(e=>e.commerceQuery?.query,e=>e??""),gF=N(e=>e.commerceSearch?.queryExecuted,e=>e),bp=(e,t)=>Rp(t.queryCorrection?.correctedQuery)?qi(e):t.queryCorrection.correctedQuery,wp=e=>({...Lu(e?.commerceQuery,t=>t.query,Oi().query),...Ti(e)});function Ip(e){return{query:gF(e)||""}}var Uu;(t=>t.responseIdSelector=Ep(sa))(Uu||(Uu={}));var Bu;(t=>t.responseIdSelector=Ep(ia))(Bu||(Bu={}));function Ep(e){return t=>e(t[Q])}var kp={};vm(kp,{escape:()=>Oo,getHighlightedSuggestion:()=>_u,highlightString:()=>SF});import{isNullOrUndefined as hF}from"@coveo/bueno";var eo=(e,t=5)=>e+Math.random().toString(36).substring(2,2+t);function Op(e){return Array.isArray(e)}function ki(e){return e.trim()===""}function qp(e){let t={};for(let[r,o]of e)t[r]=o;return t}function la(e){if(typeof e!="object"||!e)return e;try{return JSON.parse(JSON.stringify(e))}catch{return e}}function SF(e){if(ki(e.openingDelimiter)||ki(e.closingDelimiter))throw Error("delimiters should be a non-empty string");if(hF(e.content)||ki(e.content))return e.content;if(e.highlights.length===0)return Oo(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+=Oo(e.content.slice(o,i)),r+=e.openingDelimiter,r+=Oo(e.content.slice(i,c)),r+=e.closingDelimiter,o=c}return o!==t&&(r+=Oo(e.content.slice(o))),r}function _u(e,t){return e=Oo(e),e.replace(/\[(.*?)\]|\{(.*?)\}|\((.*?)\)/g,(r,o,n,a)=>o?ju(o,t.notMatchDelimiters):n?ju(n,t.exactMatchDelimiters):a?ju(a,t.correctionDelimiters):r)}function ju(e,t){return t?t.open+e+t.close:e}function Oo(e){let t={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},r="(?:"+Object.keys(t).join("|")+")",o=RegExp(r),n=RegExp(r,"g");return o.test(e)?e.replace(n,a=>t[a]):e}var zp=St(Bp(),1);var $F="recommendation-internal-options",bD=Symbol.for($F);var $=new Error("Failed to load reducers."),qo=class extends Error{constructor(){super(),this.name="ExpiredToken",this.message="The token being used to perform the request is expired."}};var ro=class extends Error{constructor(r,o){super();Fe(this,"statusCode");this.name="Disconnected",this.message=`Client could not connect to the following URL: ${r}`,this.statusCode=o??0}};function jp(e){let t=[];for(let r in e){let o=encodeURIComponent(r),n=encodeURIComponent(e[r]);t.push(`${o}=${n}`)}return t.join("&")}function _p(e){return typeof e!="object"||!e?!1:Object.values(e).every(zF)}function zF(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"}function $p(e){return e===429}var ko=class e{static async call(t){let r=WF(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($p(u.status))throw u;return u};try{let u=await(0,zp.backOff)(c,{retry:s=>{let l=s&&$p(s.status);return l&&o.info("Platform retrying request"),l}});switch(u.status){case 419:case 401:throw o.info("Platform renewing token"),new qo;case 404:throw new ro(a,u.status);default:return o.info({response:u,requestInfo:n},"Platform response"),u}}catch(u){return u.message==="Failed to fetch"?new ro(a):u}}static async preprocessRequest(t,r){let{origin:o,preprocessRequest:n,logger:a,requestMetadata:i}=r,{signal:c,...u}=t,s=la(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 Pe(e,t="prod",r="platform"){let o=t==="prod"?"":t,n=r==="platform"?"":`.${r}`;return`https://${e}${n}.org${o}.coveo.com`}function Je(e,t="prod"){return`${Pe(e,t)}/rest/search/v2`}function Xu(e,t="prod"){return`${Pe(e,t,"analytics")}/rest/organizations/${e}/events/v1`}function WF(e){let{url:t,method:r,requestParams:o,contentType:n,accessToken:a,signal:i}=e,c=e.method==="POST"||e.method==="PUT",u=KF(o,n);return{url:t,method:r,headers:{"Content-Type":n,Authorization:`Bearer ${a}`,...e.headers},...c&&{body:u},signal:i}}function KF(e,t){return t==="application/x-www-form-urlencoded"?_p(e)?jp(e):"":JSON.stringify(e)}function HF(e){return{statusCode:e.statusCode,type:e.name,message:e.message}}function GF(e){return{statusCode:e.code,type:e.name,message:e.message,ignored:!0}}function Zu(e,t){if(t&&e.name==="AbortError")return{error:GF(e)};if(e instanceof ro)return{error:HF(e)};throw e}var Vo=(e,t)=>({...pa(e,t),requestParams:YF(e)}),YF=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}},pa=(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 Wp=(e,t)=>({...pa(e,t),requestParams:JF(e)}),JF=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 Kp=e=>({...pa(e,"search/querySuggest"),requestParams:XF(e)}),XF=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 Ae=e=>e.error!==void 0,Di=class{constructor(t){this.options=t}async getProductListing(t){return this.query({...Vo(t,"listing"),...this.options})}async search(t){let r=Vo(t,"search");return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async getRecommendations(t){return this.query({...Wp(t,"recommendations"),...this.options})}async productSuggestions(t){let r=Vo(t,"search/productSuggest");return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async querySuggest(t){let r=Kp(t);return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async facetSearch(t,r){let o=Vo(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=Vo(t,"search");return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async query(t){let r=await ko.call(t);if(r instanceof Error)return Zu(r);let o=await r.json();return r.ok?{success:o}:{error:o}}};function fa(e,t="prod"){return`${Pe(e,t)}/rest/organizations/${e}/commerce/v2`}var Ni=e=>e;import{StringValue as nf}from"@coveo/bueno";import{Schema as ZF,SchemaValidationError as eP,StringValue as ga,RecordValue as tP,ArrayValue as rP}from"@coveo/bueno";var T=new ga({required:!0,emptyAllowed:!1}),te=new ga({required:!1,emptyAllowed:!1}),ce=new ga({required:!0,emptyAllowed:!0}),Hp=new ga({required:!1,emptyAllowed:!0}),Gp=new rP({each:T,required:!0}),Yp=new ga({required:!1,emptyAllowed:!1,regex:/^\d+\.\d+\.\d+$/}),Ve=({message:e,name:t,stack:r})=>({message:e,name:t,stack:r}),ue=(e,t)=>{if("required"in t)return{payload:new ZF({value:t}).validate({value:e}).value};let n=new tP({options:{required:!0},values:t}).validate(e);if(n)throw new eP(n);return{payload:e}},R=(e,t)=>{try{return ue(e,t)}catch(r){return{payload:e,error:Ve(r)}}},Qe=(e,t,r,o)=>{let n=`Check the initialState of ${o}`;return Jp(e,t,r,n,"Controller initialization error")},De=(e,t,r,o)=>{let n=`Check the options of ${o}`;return Jp(e,t,r,n,"Controller initialization error")},Jp=(e,t,r,o,n)=>{try{return t.validate(r,o)}catch(a){throw e.logger.error(a,n),a}};import{ArrayValue as oP,BooleanValue as Zp,RecordValue as nP,StringValue as ya,Value as aP}from"@coveo/bueno";var Do="3.16.1-pre.3f4a309ff4",Xp=["@coveo/atomic","@coveo/quantic"];var el=()=>te,ef=()=>T,oo=h("configuration/updateBasicConfiguration",e=>R(e,{accessToken:te,environment:new ya({required:!1,constrainTo:["prod","hipaa","stg","dev"]}),organizationId:te})),tf=h("configuration/updateSearchConfiguration",e=>R(e,{proxyBaseUrl:new ya({required:!1,url:!0}),pipeline:new ya({required:!1,emptyAllowed:!0}),searchHub:te,timezone:te,locale:te,authenticationProviders:new oP({required:!1,each:T})})),No={enabled:new Zp({default:!0}),originContext:el(),originLevel2:el(),originLevel3:el(),proxyBaseUrl:new ya({required:!1,url:!0}),runtimeEnvironment:new aP,anonymous:new Zp({default:!1}),deviceId:te,userDisplayName:te,documentLocation:te,trackingId:te,analyticsMode:new ya({constrainTo:["legacy","next"],required:!1,default:"next"}),source:new nP({options:{required:!1},values:Xp.reduce((e,t)=>(e[t]=Yp,e),{})})},tl=h("configuration/updateAnalyticsConfiguration",e=>R(e,No)),Mi=h("configuration/analytics/disable"),Li=h("configuration/analytics/enable"),rf=h("configuration/analytics/originlevel2",e=>R(e,{originLevel2:ef()})),of=h("configuration/analytics/originlevel3",e=>R(e,{originLevel3:ef()}));var Mo=h("commerce/configuration/updateBasicConfiguration",e=>R(e,{accessToken:te,environment:new nf({required:!1,constrainTo:["prod","hipaa","stg","dev"]}),organizationId:te})),Lo=h("commerce/configuration/updateProxyBaseUrl",e=>R(e,{proxyBaseUrl:new nf({required:!1,url:!0})})),Qo=h("commerce/configuration/updateAnalyticsConfiguration",e=>R(e,{enabled:No.enabled,proxyBaseUrl:No.proxyBaseUrl,source:No.source,trackingId:No.trackingId})),Qi=h("commerce/configuration/analytics/disable"),Ui=h("commerce/configuration/analytics/enable");import{isNullOrUndefined as no}from"@coveo/bueno";var af=()=>({accessToken:"",environment:"prod",organizationId:"",analytics:{enabled:!0,trackingId:"",source:{}},commerce:{}});var rl=B(af(),e=>e.addCase(Mo,(t,r)=>{cf(t,r.payload)}).addCase(oo,(t,r)=>{cf(t,r.payload)}).addCase(Lo,(t,r)=>{iP(t,r.payload)}).addCase(Qo,(t,r)=>{cP(t,r.payload)}).addCase(Qi,t=>{t.analytics.enabled=!1}).addCase(Ui,t=>{t.analytics.enabled=!0}));function cf(e,t){no(t.accessToken)||(e.accessToken=t.accessToken),e.environment=t.environment??"prod",no(t.organizationId)||(e.organizationId=t.organizationId)}function iP(e,t){no(t.proxyBaseUrl)||(e.commerce.apiBaseUrl=t.proxyBaseUrl)}function cP(e,t){no(t.enabled)||(e.analytics.enabled=t.enabled),no(t.proxyBaseUrl)||(e.analytics.apiBaseUrl=t.proxyBaseUrl),no(t.source)||(e.analytics.source=t.source),no(t.trackingId)||(e.analytics.trackingId=t.trackingId)}function Uo(e){return e.currency}var sf=(e,t)=>({currency:Uo(t.commerceContext),products:sP(t.cart),transaction:e}),uf=(e,t)=>({currency:Uo(t.commerceContext),...e}),ao=N(e=>e.cart,e=>e.cartItems,(e,t)=>t.map(r=>e[r])),sP=N(ao,e=>e.map(({quantity:t,...r})=>({quantity:t,product:r})));import{ArrayValue as uP,NumberValue as lf,RecordValue as lP,Schema as dP,StringValue as mP}from"@coveo/bueno";var ol={productId:T,quantity:new lf({required:!0,min:0}),name:new mP({required:!1}),price:new lf({required:!1,min:0})},nl=new uP({each:new lP({values:{...ol}})}),al={items:nl},df=new dP(al);var lr=h("commerce/cart/setItems",e=>R(e,nl)),Bo=h("commerce/cart/updateItemQuantity",e=>R(e,ol)),jo=h("commerce/cart/purchase"),Bi=_("commerce/cart/emit/purchaseEvent",async(e,{extra:t,getState:r})=>{let o=sf(e,r()),{relay:n}=t;n.emit("ec.purchase",o)}),ji=_("commerce/cart/emit/cartActionEvent",async(e,{extra:t,getState:r})=>{let o=uf(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 mf(e,t){return e.cart[io(t)]}var pf=N(ao,e=>e.reduce((t,r)=>t+r.quantity,0)),ff=N(ao,e=>e.reduce((t,r)=>t+r.price*r.quantity,0));function pP(e,t={}){if(!fP(e))throw $;let{dispatch:r}=e,o=z(e),n=()=>e[Q].cart,a={...t.initialState};Qe(e,df,a,"buildCart"),a.items!==void 0&&r(lr(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 ao(n()))this.updateItemQuantity({...l,quantity:0})},purchase(l){r(Bi(l)),r(jo())},updateItemQuantity(l){let d=mf(n(),l);!d&&l.quantity<=0||u(l,d)||(i(l,d)&&r(ji(s(l,d))),r(Bo(l)))},get state(){let l=n();return{items:ao(l),totalQuantity:pf(l),totalPrice:ff(l)}}}}function io(e){return`${e.productId},${e.name},${e.price}`}function fP(e){return e.addReducers({cart:_o}),!0}var _i=()=>({cartItems:[],cart:{},purchasedItems:[],purchased:{}}),$i=e=>yf(e.cartItems,e.cart),gf=e=>yf(e.purchasedItems,e.purchased);function yf(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 _o=B(_i(),e=>{e.addCase(lr,(t,{payload:r})=>{let{cart:o,cartItems:n}=r.reduce((a,i)=>{let c=io(i);return{cartItems:[...a.cartItems,c],cart:{...a.cart,[c]:i},purchasedItems:[],purchased:{}}},_i());hf(t,n,o)}).addCase(Bo,(t,{payload:r})=>{let o=io(r);if(!(o in t.cart)){gP(r,t);return}if(r.quantity<=0){yP(r,t);return}t.cart[o]=r}).addCase(jo,t=>{hP(t);let{cart:r,cartItems:o}=_i();hf(t,o,r)})});function hf(e,t,r){e.cartItems=t,e.cart=r}function gP(e,t){if(e.quantity<=0)return;let r=io(e);t.cartItems=[...t.cartItems,r],t.cart[r]=e}function yP(e,t){let r=io(e);t.cartItems=t.cartItems.filter(o=>o!==r),delete t.cart[r]}function hP(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]}}import{NumberValue as Sf,RecordValue as Cf,Schema as SP,StringValue as CP}from"@coveo/bueno";var xP=Intl.supportedValuesOf("currency"),RP=new CP({required:!0,emptyAllowed:!1,constrainTo:xP}),il={url:T},cl={latitude:new Sf({min:-90,max:90,required:!0}),longitude:new Sf({min:-180,max:180,required:!0})},ha={language:T,country:T,currency:RP,view:new Cf({options:{required:!0},values:il}),location:new Cf({options:{required:!1},values:cl})},xf=new SP(ha);var ne=h("commerce/context/set",e=>R(e,ha)),ae=h("commerce/context/setView",e=>R(e,il)),$o=h("commerce/context/setLocation",e=>R(e,cl));var Rf=()=>({language:"",country:"",currency:"",view:{url:""}});var At=B(Rf(),e=>{e.addCase(ne,(t,{payload:r})=>r).addCase(ae,(t,{payload:r})=>{t.view=r}).addCase($o,(t,{payload:r})=>{t.location=r})});var zi=()=>({correctedQuery:"",corrections:[],originalQuery:""});import{BooleanValue as OP,RecordValue as qP,StringValue as vf}from"@coveo/bueno";var Xe=h("breadcrumb/deselectAll"),dr=h("breadcrumb/deselectAllNonBreadcrumbs");var vt=N(e=>e.source,e=>Object.entries(e).map(([t,r])=>`${t}@${r}`).concat(`@coveo/headless@${Do}`));var Ke=(e,t)=>({...Sa(e,t),facets:[...PP(e)],...e.commerceSort&&{sort:AP(e.commerceSort.appliedSort)}}),Ff=(e,t)=>{let{commercePagination:r,...o}=e;return{...Ke(o,t)}},Sa=(e,t,r)=>{let{view:o,location:n,...a}=e.commerceContext;return{accessToken:e.configuration.accessToken,url:e.configuration.commerce.apiBaseUrl??fa(e.configuration.organizationId,e.configuration.environment),organizationId:e.configuration.organizationId,trackingId:e.configuration.analytics.trackingId,...a,...e.configuration.analytics.enabled?{clientId:t.clientId}:{},context:{user:{...n,...t.userAgent?{userAgent:t.userAgent}:{}},view:{...o,...t.referrer?{referrer:t.referrer}:{}},capture:e.configuration.analytics.enabled,cart:$i(e.cart),source:vt(e.configuration.analytics)},...FP(e,r)}},FP=(e,t)=>{let r=t?e.commercePagination?.recommendations[t]:e.commercePagination?.principal;return r&&{page:r.page,...r.perPage&&{perPage:r.perPage}}};function PP(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 AP(e){return e.by==="relevance"?{sortCriteria:"relevance"}:{sortCriteria:"fields",fields:e.fields.map(({name:t,direction:r})=>({field:t,direction:r}))}}import{BooleanValue as sl,NumberValue as vP}from"@coveo/bueno";var co=h("commerce/facets/core/updateNumberOfValues",e=>R(e,{facetId:T,numberOfValues:new vP({required:!0,min:1})})),so=h("commerce/facets/core/updateIsFieldExpanded",e=>R(e,{facetId:T,isFieldExpanded:new sl({required:!0})})),ve=h("commerce/facets/core/clearAll"),be=h("commerce/facets/core/deselectAllValues",e=>R(e,{facetId:T})),uo=h("commerce/facets/core/updateFreezeCurrentValues",e=>R(e,{facetId:T,freezeCurrentValues:new sl({required:!0})})),zo=h("commerce/facets/core/updateAutoSelectionForAll",e=>R(e,{allow:new sl({required:!0})}));import{NumberValue as Pf}from"@coveo/bueno";var Wi={slotId:Hp},bP={...Wi,pageSize:new Pf({required:!0,min:0})},Kt=h("commerce/pagination/setPageSize",e=>R(e,bP)),wP={...Wi,page:new Pf({required:!0,min:0})},bt=h("commerce/pagination/selectPage",e=>R(e,wP)),mr=h("commerce/pagination/nextPage",e=>R(e,Wi)),pr=h("commerce/pagination/previousPage",e=>R(e,Wi)),Wo=h("commerce/pagination/registerRecommendationsSlot",e=>R(e,{slotId:T}));import{StringValue as IP}from"@coveo/bueno";var we=h("commerce/query/update",e=>R(e,{query:new IP}));import{isNullOrUndefined as Af}from"@coveo/bueno";import{RecordValue as EP,StringValue as TP}from"@coveo/bueno";var fr=h("commerce/triggers/query/updateIgnore",e=>R(e,{q:new TP({emptyAllowed:!0,required:!0})})),Ko=h("commerce/triggers/query/applyModification",e=>R(e,new EP({values:{originalQuery:te,modification:te}})));var Ca=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 Ae(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(!(!Af(n)&&!Af(n.correctedQuery)))return null;let{correctedQuery:i,originalQuery:c}=o.queryCorrection;return this.onUpdateQueryForCorrection(i??""),{...t,response:{...o},queryExecuted:bp(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(fr({q:""})),null;let a=this.getCurrentQuery(),i=await this.automaticallyRetryQueryWithTriggerModification(o);return Ae(i.response)?this.rejectWithValue(i.response.error):{...i,response:{...i.response.success},originalQuery:a}}async automaticallyRetryQueryWithTriggerModification(t){return this.dispatch(Ko({newQuery:t,originalQuery:this.getCurrentQuery()})),this.onUpdateQueryForCorrection(t),await this.fetchFromAPI({...Ke(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 Ae(t.response)?null:t.response.success}get extra(){return this.config.extra}onUpdateQueryForCorrection(t){this.dispatch(we({query:t}))}};var H=_("commerce/search/executeSearch",async(e,t)=>{let{getState:r}=t,o=r(),{navigatorContext:n}=t.extra,a=Ke(o,n),i=qi(o),c=new Ca(t),u=await c.fetchFromAPI({...a,query:i});return c.process(u)}),gr=_("commerce/search/fetchMoreProducts",async(e,t)=>{let{getState:r}=t,o=r(),{navigatorContext:n}=t.extra;if(!Pp(o))return null;let i=ir(o),u=ua(o)/i,s=qi(o),l=Ke(o,n),d=new Ca(t),p=await d.fetchFromAPI({...l,query:s,page:u});return d.process(p)}),Ho=_("commerce/search/prepareForSearchWithQuery",(e,t)=>{let{dispatch:r}=t;R(e,{query:new vf,clearFilters:new OP}),e.clearFilters&&(r(ve()),r(dr())),r(zo({allow:!0})),r(we({query:e.query})),r(bt({page:0}))}),Go=_("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({...Ff(n,i),query:c});return Ae(u)?r(u.error):{response:{...u.success,products:u.success.products}}}),kP={child:new qP({options:{required:!0},values:{permanentid:new vf({required:!0})}})},Yo=h("commerce/search/promoteChildToParent",e=>R(e,kP));function bf(){return{wasCorrectedTo:"",queryCorrection:zi(),originalQuery:""}}var Ki=B(bf(),e=>{e.addCase(H.pending,t=>{t.queryCorrection=zi(),t.wasCorrectedTo=""}).addCase(H.fulfilled,(t,r)=>{let{queryCorrection:o}=r.payload.response;t.originalQuery=r.payload.originalQuery,t.wasCorrectedTo=o?.correctedQuery??"",t.queryCorrection={correctedQuery:o?.correctedQuery??o?.corrections[0]?.correctedQuery??"",wordCorrections:o?.corrections[0]?.wordCorrections??[]}})});import{Value as Ef,BooleanValue as wf,ArrayValue as Gi,StringValue as Hi,NumberValue as If,RecordValue as UP}from"@coveo/bueno";var K=T;import{Value as VP,NumberValue as DP,StringValue as NP,ArrayValue as MP,BooleanValue as LP}from"@coveo/bueno";var QP={state:new VP({required:!0}),numberOfResults:new DP({required:!0,min:0}),value:new NP({required:!0,emptyAllowed:!0}),path:new MP({required:!0,each:T}),moreValuesAvailable:new LP({required:!1})};function xa(e){e.children.forEach(t=>{xa(t)}),ue({state:e.state,numberOfResults:e.numberOfResults,value:e.value,path:e.path,moreValuesAvailable:e.moreValuesAvailable},QP)}var Jo={facetId:K,field:T,tabs:new UP({options:{required:!1},values:{included:new Gi({each:new Hi}),excluded:new Gi({each:new Hi})}}),activeTab:new Hi({required:!1}),delimitingCharacter:new Hi({required:!1,emptyAllowed:!0}),filterFacetCount:new wf({required:!1}),injectionDepth:new If({required:!1,min:0}),numberOfValues:new If({required:!1,min:1}),sortCriteria:new Ef({required:!1}),basePath:new Gi({required:!1,each:T}),filterByBasePath:new wf({required:!1})},Xo=5,Tf=h("categoryFacet/register",e=>R(e,Jo)),Of=h("categoryFacet/toggleSelectValue",e=>{try{return ue(e.facetId,T),xa(e.selection),{payload:e,error:null}}catch(t){return{payload:e,error:Ve(t)}}}),qf=h("categoryFacet/deselectAll",e=>R(e,Jo.facetId)),H0=h("categoryFacet/updateNumberOfValues",e=>R(e,{facetId:Jo.facetId,numberOfValues:Jo.numberOfValues})),G0=h("categoryFacet/updateSortCriterion",e=>R(e,{facetId:Jo.facetId,criterion:new Ef})),Y0=h("categoryFacet/updateBasePath",e=>R(e,{facetId:Jo.facetId,basePath:new Gi({each:T})}));import{NumberValue as $P,RecordValue as zP,ArrayValue as WP}from"@coveo/bueno";import{RecordValue as BP,NumberValue as jP,StringValue as _P}from"@coveo/bueno";var Ra={facetId:K,captions:new BP({options:{required:!1}}),numberOfValues:new jP({required:!1,min:1}),query:new _P({required:!1,emptyAllowed:!0})};var KP={path:new WP({required:!0,each:T}),displayValue:ce,rawValue:ce,count:new $P({required:!0,min:0})},yr=h("categoryFacet/selectSearchResult",e=>R(e,{facetId:K,value:new zP({values:KP})})),Yi=h("categoryFacetSearch/register",e=>R(e,Ra));import{RecordValue as HP,NumberValue as GP}from"@coveo/bueno";var kf={facetId:K,value:new HP({values:{displayValue:ce,rawValue:ce,count:new GP({required:!0,min:0})}})},Ji=h("facetSearch/register",e=>R(e,Ra)),hr=h("facetSearch/update",e=>R(e,Ra)),lt=h("facetSearch/toggleSelectValue",e=>R(e,kf)),dt=h("facetSearch/toggleExcludeValue",e=>R(e,kf));import{BooleanValue as YP}from"@coveo/bueno";var Ht=h("facetOptions/update",(e={freezeFacetOrder:!0})=>R(e,{freezeFacetOrder:new YP({required:!1})})),ul=h("facetOptions/facet/enable",e=>R(e,K)),Gt=h("facetOptions/facet/disable",e=>R(e,K));var JP=h("history/undo"),XP=h("history/redo"),wt=h("history/snapshot"),CL=_("history/back",async(e,{dispatch:t})=>{t(JP()),await t(me())}),xL=_("history/forward",async(e,{dispatch:t})=>{t(XP()),await t(me())}),me=_("history/change",async(e,{getState:t})=>t().history.present);import{BooleanValue as Vf,StringValue as Fa,NumberValue as Df,RecordValue as Sr}from"@coveo/bueno";var Xi={q:new Fa,enableQuerySyntax:new Vf,aq:new Fa,cq:new Fa,firstResult:new Df({min:0}),numberOfResults:new Df({min:0}),sortCriteria:new Fa,f:new Sr,fExcluded:new Sr,cf:new Sr,nf:new Sr,mnf:new Sr,df:new Sr,debug:new Vf,sf:new Sr,tab:new Fa,af:new Sr};var Ce=h("searchParameters/restore",e=>R(e,Xi));import{BooleanValue as ly,NumberValue as dy,StringValue as lw}from"@coveo/bueno";function Yt(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,o=Object.getOwnPropertySymbols(e);n<o.length;n++)t.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(r[o[n]]=e[o[n]]);return r}function v(e,t,r,o){function n(a){return a instanceof r?a:new r(function(i){i(a)})}return new(r||(r=Promise))(function(a,i){function c(l){try{s(o.next(l))}catch(d){i(d)}}function u(l){try{s(o.throw(l))}catch(d){i(d)}}function s(l){l.done?a(l.value):n(l.value).then(c,u)}s((o=o.apply(e,t||[])).next())})}var G;(function(e){e.search="search",e.click="click",e.custom="custom",e.view="view",e.collect="collect"})(G||(G={}));function ml(){return typeof window<"u"}function vl(){return typeof navigator<"u"}function Zo(){return typeof document<"u"}function pl(){try{return typeof localStorage<"u"}catch{return!1}}function ZP(){try{return typeof sessionStorage<"u"}catch{return!1}}function Gf(){return vl()&&navigator.cookieEnabled}var eA=[G.click,G.custom,G.search,G.view],tA=(e,t)=>eA.indexOf(e)!==-1?Object.assign({language:Zo()?document.documentElement.lang:"unknown",userAgent:vl()?navigator.userAgent:"unknown"},t):t,va=class e{static set(t,r,o){var n,a,i,c;o&&(a=new Date,a.setTime(a.getTime()+o)),c=window.location.hostname,c.indexOf(".")===-1?Nf(t,r,a):(i=c.split("."),n=i[i.length-2]+"."+i[i.length-1],Nf(t,r,a,n))}static get(t){for(var r=t+"=",o=document.cookie.split(";"),n=0;n<o.length;n++){var a=o[n];if(a=a.replace(/^\s+/,""),a.lastIndexOf(r,0)===0)return a.substring(r.length,a.length)}return null}static erase(t){e.set(t,"",-1)}};function Nf(e,t,r,o){document.cookie=`${e}=${t}`+(r?`;expires=${r.toUTCString()}`:"")+(o?`;domain=${o}`:"")+";path=/;SameSite=Lax"}function rA(){return pl()?localStorage:Gf()?new ba:ZP()?sessionStorage:new tn}var ba=class e{getItem(t){return va.get(`${e.prefix}${t}`)}removeItem(t){va.erase(`${e.prefix}${t}`)}setItem(t,r,o){va.set(`${e.prefix}${t}`,r,o)}};ba.prefix="coveo_";var fl=class{constructor(){this.cookieStorage=new ba}getItem(t){return localStorage.getItem(t)||this.cookieStorage.getItem(t)}removeItem(t){this.cookieStorage.removeItem(t),localStorage.removeItem(t)}setItem(t,r){localStorage.setItem(t,r),this.cookieStorage.setItem(t,r,31556926e3)}},tn=class{getItem(t){return null}removeItem(t){}setItem(t,r){}},Pa="__coveo.analytics.history",Yf=20,Jf=1e3*60,Xf=75,rn=class{constructor(t){this.store=t||rA()}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(Pa);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(Pa);return t?JSON.parse(t):[]}catch{return[]}})}setHistory(t){try{this.store.setItem(Pa,JSON.stringify(t.slice(0,Yf)))}catch{}}clear(){try{this.store.removeItem(Pa)}catch{}}getMostRecentElement(){let t=this.getHistoryWithInternalTime();return Array.isArray(t)?t.sort((o,n)=>(n.internalTime||0)-(o.internalTime||0))[0]:null}cropQueryElement(t){return t.name&&t.value&&t.name.toLowerCase()==="query"&&(t.value=t.value.slice(0,Xf)),t}isValidEntry(t){let r=this.getMostRecentElement();return r&&r.value==t.value?(t.internalTime||0)-(r.internalTime||0)>Jf:!0}stripInternalTime(t){return Array.isArray(t)?t.map(r=>{let{name:o,time:n,value:a}=r;return{name:o,time:n,value:a}}):[]}stripEmptyQuery(t){let{name:r,time:o,value:n}=t;return r&&typeof n=="string"&&r.toLowerCase()==="query"&&n.trim()===""?{name:r,time:o}:t}stripEmptyQueries(t){return t.map(r=>this.stripEmptyQuery(r))}},Zf=Object.freeze({__proto__:null,HistoryStore:rn,MAX_NUMBER_OF_HISTORY_ELEMENTS:Yf,MAX_VALUE_SIZE:Xf,MIN_THRESHOLD_FOR_DUPLICATE_VALUE:Jf,STORE_KEY:Pa,default:rn}),oA=(e,t)=>v(void 0,void 0,void 0,function*(){return e===G.view?(yield nA(t.contentIdValue),Object.assign({location:window.location.toString(),referrer:document.referrer,title:document.title},t)):t}),nA=e=>v(void 0,void 0,void 0,function*(){let t=new rn,r={name:"PageView",value:e,time:new Date().toISOString()};yield t.addElementAsync(r)}),Zi,aA=new Uint8Array(16);function iA(){if(!Zi&&(Zi=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Zi))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Zi(aA)}var cA=/^(?:[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 tc(e){return typeof e=="string"&&cA.test(e)}var xe=[];for(let e=0;e<256;++e)xe.push((e+256).toString(16).slice(1));function eg(e,t=0){return(xe[e[t+0]]+xe[e[t+1]]+xe[e[t+2]]+xe[e[t+3]]+"-"+xe[e[t+4]]+xe[e[t+5]]+"-"+xe[e[t+6]]+xe[e[t+7]]+"-"+xe[e[t+8]]+xe[e[t+9]]+"-"+xe[e[t+10]]+xe[e[t+11]]+xe[e[t+12]]+xe[e[t+13]]+xe[e[t+14]]+xe[e[t+15]]).toLowerCase()}function sA(e){if(!tc(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 uA(e){e=unescape(encodeURIComponent(e));let t=[];for(let r=0;r<e.length;++r)t.push(e.charCodeAt(r));return t}var lA="6ba7b810-9dad-11d1-80b4-00c04fd430c8",dA="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function mA(e,t,r){function o(n,a,i,c){var u;if(typeof n=="string"&&(n=uA(n)),typeof a=="string"&&(a=sA(a)),((u=a)===null||u===void 0?void 0:u.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let s=new Uint8Array(16+n.length);if(s.set(a),s.set(n,a.length),s=r(s),s[6]=s[6]&15|t,s[8]=s[8]&63|128,i){c=c||0;for(let l=0;l<16;++l)i[c+l]=s[l];return i}return eg(s)}try{o.name=e}catch{}return o.DNS=lA,o.URL=dA,o}var pA=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Mf={randomUUID:pA};function lo(e,t,r){if(Mf.randomUUID&&!t&&!e)return Mf.randomUUID();e=e||{};let o=e.random||(e.rng||iA)();if(o[6]=o[6]&15|64,o[8]=o[8]&63|128,t){r=r||0;for(let n=0;n<16;++n)t[r+n]=o[n];return t}return eg(o)}function fA(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 ll(e,t){return e<<t|e>>>32-t}function gA(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]=ll(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=ll(u,5)+fA(f,s,l,d)+p+t[f]+c[m]>>>0;p=d,d=l,l=ll(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 yA=mA("v5",80,gA),Lf=yA,tg="2.30.43",Qf=e=>`${e.protocol}//${e.hostname}${e.pathname.indexOf("/")===0?e.pathname:`/${e.pathname}`}${e.search}`,Aa={pageview:"pageview",event:"event"},rc=class{constructor({client:t,uuidGenerator:r=lo}){this.client=t,this.uuidGenerator=r}},gl=class extends rc{constructor({client:t,uuidGenerator:r=lo}){super({client:t,uuidGenerator:r}),this.actionData={},this.pageViewId=r(),this.nextPageViewId=this.pageViewId,this.currentLocation=Qf(window.location),this.lastReferrer=Zo()?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:Zo()?document.title:"",encoding:Zo()?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===Aa.pageview&&(this.nextPageViewId=this.uuidGenerator(),this.hasSentFirstPageView=!0)}getNextValues(t,r){return{pageViewId:t===Aa.pageview?this.nextPageViewId:this.pageViewId,referrer:t===Aa.pageview&&this.hasSentFirstPageView?this.currentLocation:this.lastReferrer,location:t===Aa.pageview?this.getCurrentLocationFromPayload(r):this.currentLocation}}getCurrentLocationFromPayload(t){if(t.page){let r=n=>n.replace(/^\/?(.*)$/,"/$1");return`${(n=>n.split("/").slice(0,3).join("/"))(this.currentLocation)}${r(t.page)}`}else return Qf(window.location)}},Cr=class e{constructor(t,r){if(!tc(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 tc(a)?new e(a,Number.parseInt(n)*1e3):null}};Cr.cvo_cid="cvo_cid";Cr.expirationTime=120;var yl=class extends rc{constructor({client:t,uuidGenerator:r=lo}){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(Cr.cvo_cid,new Cr(o,Date.now()).toString()),r.toString()}catch{throw new Error("Invalid URL provided")}})}acceptFrom(t){this.client.setAcceptedLinkReferrers(t)}};yl.Id="link";var Ze=Object.keys;function ec(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}var dl=128,rg=192,Uf=224,Bf=240;function hA(e){return(e&248)===Bf?4:(e&Bf)===Uf?3:(e&Uf)===rg?2:1}function SA(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&dl)!=dl)break;if(r-=3,(o&rg)!=dl){t-r>=hA(o)*3&&(r=t);break}}return e.substring(0,r)}var hl={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"},CA=Ze(hl).map(e=>hl[e]),xA=[...CA].join("|"),RA=new RegExp(`^(${xA}$)`),FA={svcAction:"svc_action",svcActionData:"svc_action_data"},PA=e=>Ze(e).filter(t=>e[t]!==void 0).reduce((t,r)=>{let o=hl[r]||r;return Object.assign(Object.assign({},t),{[o]:e[r]})},{}),AA=e=>RA.test(e),vA=[AA],jf={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",price:"pr",quantity:"qt",coupon:"cc",position:"ps",group:"group"},_f={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",position:"ps",price:"pr",group:"group"},Ie={action:"pa",list:"pal",listSource:"pls"},oc={id:"ti",revenue:"tr",tax:"tt",shipping:"ts",coupon:"tcc",affiliation:"ta",step:"cos",option:"col"},bA=["loyaltyCardId","loyaltyTier","thirdPartyPersona","companyName","favoriteStore","storeName","userIndustry","userRole","userDepartment","businessUnit"],Sl={id:"quoteId",affiliation:"quoteAffiliation"},Cl={id:"reviewId",rating:"reviewRating",comment:"reviewComment"},wA={add:Ie,bookmark_add:Ie,bookmark_remove:Ie,click:Ie,checkout:Ie,checkout_option:Ie,detail:Ie,impression:Ie,remove:Ie,refund:Object.assign(Object.assign({},Ie),oc),purchase:Object.assign(Object.assign({},Ie),oc),quickview:Ie,quote:Object.assign(Object.assign({},Ie),Sl),review:Object.assign(Object.assign({},Ie),Cl)},IA=Ze(jf).map(e=>jf[e]),EA=Ze(_f).map(e=>_f[e]),TA=Ze(Ie).map(e=>Ie[e]),OA=Ze(oc).map(e=>oc[e]),qA=Ze(Cl).map(e=>Cl[e]),kA=Ze(Sl).map(e=>Sl[e]),VA=[...IA,"custom"].join("|"),DA=[...EA,"custom"].join("|"),og="(pr[0-9]+)",ng="(il[0-9]+pi[0-9]+)",NA=new RegExp(`^${og}(${VA})$`),MA=new RegExp(`^(${ng}(${DA}))|(il[0-9]+nm)$`),LA=new RegExp(`^(${TA.join("|")})$`),QA=new RegExp(`^(${OA.join("|")})$`),UA=new RegExp(`^${og}custom$`),BA=new RegExp(`^${ng}custom$`),jA=new RegExp(`^(${[...bA,...qA,...kA].join("|")})$`),_A=e=>NA.test(e),$A=e=>MA.test(e),zA=e=>LA.test(e),WA=e=>QA.test(e),KA=e=>jA.test(e),HA=[$A,_A,zA,WA,KA],GA=[UA,BA],YA={anonymizeIp:"aip"},JA={eventCategory:"ec",eventAction:"ea",eventLabel:"el",eventValue:"ev",page:"dp",visitorId:"cid",clientId:"cid",userId:"uid",currencyCode:"cu"},XA={hitType:"t",pageViewId:"pid",encoding:"de",location:"dl",referrer:"dr",screenColor:"sd",screenResolution:"sr",title:"dt",userAgent:"ua",language:"ul",eventId:"z",time:"tm"},ZA=["contentId","contentIdKey","contentType","searchHub","tab","searchUid","permanentId","contentLocale","trackingId"],ev=Object.assign(Object.assign(Object.assign(Object.assign({},YA),JA),XA),ZA.reduce((e,t)=>Object.assign(Object.assign({},e),{[t]:t}),{})),xl=Object.assign(Object.assign({},ev),FA),tv=e=>{let t=!!e.action&&wA[e.action]||{};return Ze(e).reduce((r,o)=>{let n=t[o]||xl[o]||o;return Object.assign(Object.assign({},r),{[n]:e[o]})},{})},rv=Ze(xl).map(e=>xl[e]),ov=e=>rv.indexOf(e)!==-1,nv=e=>e==="custom",av=e=>[...HA,...vA,ov,nv].some(t=>t(e)),iv=e=>Ze(e).reduce((t,r)=>{let o=cv(r);return o?Object.assign(Object.assign({},t),sv(o,e[r])):Object.assign(Object.assign({},t),{[r]:e[r]})},{}),cv=e=>{let t;return[...GA].every(r=>{var o;return t=(o=r.exec(e))===null||o===void 0?void 0:o[1],!t}),t},sv=(e,t)=>Ze(t).reduce((r,o)=>Object.assign(Object.assign({},r),{[`${e}${o}`]:t[o]}),{}),Rl=class{constructor(t){this.opts=t}sendEvent(t,r){return v(this,void 0,void 0,function*(){if(!this.isAvailable())throw new Error('navigator.sendBeacon is not supported in this browser. Consider adding a polyfill like "sendbeacon-polyfill".');let{baseUrl:o,preprocessRequest:n}=this.opts,a=yield this.getQueryParamsForEventType(t),{url:i,payload:c}=yield this.preProcessRequestAsPotentialJSONString(`${o}/analytics/${t}?${a}`,r,n),u=this.encodeForEventType(t,c),s=new Blob([u],{type:"application/x-www-form-urlencoded"});navigator.sendBeacon(i,s)})}isAvailable(){return"sendBeacon"in navigator}deleteHttpCookieVisitorId(){return Promise.resolve()}preProcessRequestAsPotentialJSONString(t,r,o){return v(this,void 0,void 0,function*(){let n=t,a=r;if(o){let i=yield o({url:t,body:JSON.stringify(r)},"analyticsBeacon"),{url:c,body:u}=i;n=c||t;try{a=JSON.parse(u)}catch(s){console.error("Unable to process the request body as a JSON string",s)}}return{payload:a,url:n}})}encodeForEventType(t,r){return this.isEventTypeLegacy(t)?this.encodeEventToJson(t,r):this.encodeEventToJson(t,r,this.opts.token)}getQueryParamsForEventType(t){return v(this,void 0,void 0,function*(){let{token:r,visitorIdProvider:o}=this.opts,n=yield o.getCurrentVisitorId();return[r&&this.isEventTypeLegacy(t)?`access_token=${r}`:"",n?`visitorId=${n}`:"","discardVisitInfo=true"].filter(a=>!!a).join("&")})}isEventTypeLegacy(t){return[G.click,G.custom,G.search,G.view].indexOf(t)!==-1}encodeEventToJson(t,r,o){let n=`${t}Event=${encodeURIComponent(JSON.stringify(r))}`;return o&&(n=`access_token=${encodeURIComponent(o)}&${n}`),n}},Fl=class{sendEvent(t,r){return v(this,void 0,void 0,function*(){return Promise.resolve()})}deleteHttpCookieVisitorId(){return v(this,void 0,void 0,function*(){return Promise.resolve()})}},$f=globalThis.fetch,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=Yt(u,["url"]),d;try{d=yield $f(s,l)}catch(p){console.error("An error has occured when sending the event.",p);return}if(d.ok){let p=yield d.json();return p.visitorId&&n.setCurrentVisitorId(p.visitorId),p}else{try{d.json()}catch{}throw console.error(`An error has occured when sending the "${t}" event.`,d,r),new Error(`An error has occurred when sending the "${t}" event. Check the console logs for more details.`)}})}deleteHttpCookieVisitorId(){return v(this,void 0,void 0,function*(){let{baseUrl:t}=this.opts,r=`${t}/analytics/visit`;yield $f(r,{headers:this.getHeaders(),method:"DELETE"})})}shouldAppendVisitorId(t){return[G.click,G.custom,G.search,G.view].indexOf(t)!==-1}getVisitorIdParam(){return v(this,void 0,void 0,function*(){let{visitorIdProvider:t}=this.opts,r=yield t.getCurrentVisitorId();return r?`?visitor=${r}`:""})}getHeaders(){let{token:t}=this.opts;return Object.assign(Object.assign({},t?{Authorization:`Bearer ${t}`}:{}),{"Content-Type":"application/json"})}},Pl=class{constructor(t,r){pl()&&Gf()?this.storage=new fl:pl()?this.storage=localStorage:(console.warn("BrowserRuntime detected no valid storage available.",this),this.storage=new tn),this.client=new nc(t),this.beaconClient=new Rl(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}},Al=class{constructor(t,r){this.storage=r||new tn,this.client=new nc(t)}getClientDependingOnEventType(t){return this.client}},ac=class{constructor(){this.storage=new tn,this.client=new Fl}getClientDependingOnEventType(t){return this.client}},uv="xx",lv=e=>e?.startsWith(uv)||!1,dv=`
|
|
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
|