@coveo/headless 3.25.0-pre.b04a573cd9 → 3.25.0-pre.befd28e8fb

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/dist/browser/case-assist/headless.esm.js +1 -1
  2. package/dist/browser/case-assist/headless.js +1 -1
  3. package/dist/browser/commerce/headless.esm.js +1 -1
  4. package/dist/browser/commerce/headless.js +1 -1
  5. package/dist/browser/headless.esm.js +1 -1
  6. package/dist/browser/headless.js +1 -1
  7. package/dist/browser/insight/headless.esm.js +1 -1
  8. package/dist/browser/insight/headless.js +1 -1
  9. package/dist/browser/recommendation/headless.esm.js +1 -1
  10. package/dist/browser/recommendation/headless.js +1 -1
  11. package/dist/browser/ssr/headless.esm.js +1 -1
  12. package/dist/browser/ssr/headless.js +1 -1
  13. package/dist/browser/ssr-commerce/headless.esm.js +1 -1
  14. package/dist/browser/ssr-commerce/headless.js +1 -1
  15. package/dist/case-assist/headless.cjs +1 -1
  16. package/dist/case-assist/headless.esm.js +1 -1
  17. package/dist/commerce/headless.cjs +1 -1
  18. package/dist/commerce/headless.esm.js +1 -1
  19. package/dist/headless.cjs +1 -1
  20. package/dist/headless.esm.js +1 -1
  21. package/dist/insight/headless.cjs +1 -1
  22. package/dist/insight/headless.esm.js +1 -1
  23. package/dist/quantic/case-assist/headless.js +1 -1
  24. package/dist/quantic/commerce/headless.js +1 -1
  25. package/dist/quantic/headless.js +1 -1
  26. package/dist/quantic/insight/headless.js +1 -1
  27. package/dist/quantic/recommendation/headless.js +1 -1
  28. package/dist/recommendation/headless.cjs +1 -1
  29. package/dist/recommendation/headless.esm.js +1 -1
  30. package/dist/ssr/headless.cjs +1 -1
  31. package/dist/ssr/headless.esm.js +1 -1
  32. package/dist/ssr-commerce/headless.cjs +1 -1
  33. package/dist/ssr-commerce/headless.esm.js +1 -1
  34. package/package.json +1 -1
@@ -16,7 +16,7 @@
16
16
  * limitations under the License.
17
17
  */
18
18
  var wR=Object.create;var Ci=Object.defineProperty;var IR=Object.getOwnPropertyDescriptor;var ER=Object.getOwnPropertyNames;var TR=Object.getPrototypeOf,OR=Object.prototype.hasOwnProperty;var qR=(e,t,r)=>t in e?Ci(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Fe=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Lm=(e,t)=>{for(var r in t)Ci(e,r,{get:t[r],enumerable:!0})},kR=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of ER(t))!OR.call(e,n)&&n!==r&&Ci(e,n,{get:()=>t[n],enumerable:!(o=IR(t,n))||o.enumerable});return e};var Pt=(e,t,r)=>(r=e!=null?wR(TR(e)):{},kR(t||!e||!e.__esModule?Ci(r,"default",{value:e,enumerable:!0}):r,e));var Be=(e,t,r)=>qR(e,typeof t!="symbol"?t+"":t,r);var Gp=Fe(Ra=>{"use strict";var Bi=Ra&&Ra.__assign||function(){return Bi=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},Bi.apply(this,arguments)};Object.defineProperty(Ra,"__esModule",{value:!0});var UF={delayFirstAttempt:!1,jitter:"none",maxDelay:1/0,numOfAttempts:10,retry:function(){return!0},startingDelay:100,timeMultiple:2};function BF(e){var t=Bi(Bi({},UF),e);return t.numOfAttempts<1&&(t.numOfAttempts=1),t}Ra.getSanitizedOptions=BF});var Hp=Fe(Gu=>{"use strict";Object.defineProperty(Gu,"__esModule",{value:!0});function jF(e){var t=Math.random()*e;return Math.round(t)}Gu.fullJitter=jF});var Yp=Fe(Hu=>{"use strict";Object.defineProperty(Hu,"__esModule",{value:!0});function _F(e){return e}Hu.noJitter=_F});var Jp=Fe(Yu=>{"use strict";Object.defineProperty(Yu,"__esModule",{value:!0});var $F=Hp(),zF=Yp();function WF(e){switch(e.jitter){case"full":return $F.fullJitter;case"none":default:return zF.noJitter}}Yu.JitterFactory=WF});var Zu=Fe(Ju=>{"use strict";Object.defineProperty(Ju,"__esModule",{value:!0});var KF=Jp(),GF=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=KF.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}();Ju.Delay=GF});var Zp=Fe(Yt=>{"use strict";var HF=Yt&&Yt.__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)}}(),YF=Yt&&Yt.__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())})},JF=Yt&&Yt.__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(Yt,"__esModule",{value:!0});var ZF=Zu(),XF=function(e){HF(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.apply=function(){return YF(this,void 0,void 0,function(){return JF(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}(ZF.Delay);Yt.SkipFirstDelay=XF});var Xp=Fe(Fa=>{"use strict";var eP=Fa&&Fa.__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(Fa,"__esModule",{value:!0});var tP=Zu(),rP=function(e){eP(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(tP.Delay);Fa.AlwaysDelay=rP});var ef=Fe(Xu=>{"use strict";Object.defineProperty(Xu,"__esModule",{value:!0});var oP=Zp(),nP=Xp();function aP(e,t){var r=iP(e);return r.setAttemptNumber(t),r}Xu.DelayFactory=aP;function iP(e){return e.delayFirstAttempt?new nP.AlwaysDelay(e):new oP.SkipFirstDelay(e)}});var tf=Fe(no=>{"use strict";var el=no&&no.__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())})},tl=no&&no.__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(no,"__esModule",{value:!0});var cP=Gp(),sP=ef();function uP(e,t){return t===void 0&&(t={}),el(this,void 0,void 0,function(){var r,o;return tl(this,function(n){switch(n.label){case 0:return r=cP.getSanitizedOptions(t),o=new lP(e,r),[4,o.execute()];case 1:return[2,n.sent()]}})})}no.backOff=uP;var lP=function(){function e(t,r){this.request=t,this.options=r,this.attemptNumber=0}return e.prototype.execute=function(){return el(this,void 0,void 0,function(){var t,r;return tl(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 el(this,void 0,void 0,function(){var t;return tl(this,function(r){switch(r.label){case 0:return t=sP.DelayFactory(this.options,this.attemptNumber),[4,t.apply()];case 1:return r.sent(),[2]}})})},e}()});var Ic=Fe((Wl,Kl)=>{"use strict";(function(e,t){typeof Wl=="object"&&typeof Kl<"u"?Kl.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs=t()})(Wl,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+)?$/,S=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,C={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(D){var q=["th","st","nd","rd"],O=D%100;return"["+D+(q[(O-20)%10]||q[O]||q[0])+"]"}},h=function(D,q,O){var N=String(D);return!N||N.length>=q?D:""+Array(q+1-N.length).join(O)+D},v={s:h,z:function(D){var q=-D.utcOffset(),O=Math.abs(q),N=Math.floor(O/60),V=O%60;return(q<=0?"+":"-")+h(N,2,"0")+":"+h(V,2,"0")},m:function D(q,O){if(q.date()<O.date())return-D(O,q);var N=12*(O.year()-q.year())+(O.month()-q.month()),V=q.clone().add(N,s),L=O-V<0,U=q.clone().add(N+(L?-1:1),s);return+(-(N+(O-V)/(L?V-U:U-V))||0)},a:function(D){return D<0?Math.ceil(D)||0:Math.floor(D)},p:function(D){return{M:s,y:d,w:u,d:c,D:p,h:i,m:a,s:n,ms:o,Q:l}[D]||String(D||"").toLowerCase().replace(/s$/,"")},u:function(D){return D===void 0}},y="en",x={};x[y]=C;var E="$isDayjsObject",A=function(D){return D instanceof T||!(!D||!D[E])},R=function D(q,O,N){var V;if(!q)return y;if(typeof q=="string"){var L=q.toLowerCase();x[L]&&(V=L),O&&(x[L]=O,V=L);var U=q.split("-");if(!V&&U.length>1)return D(U[0])}else{var z=q.name;x[z]=q,V=z}return!N&&V&&(y=V),V||!N&&y},P=function(D,q){if(A(D))return D.clone();var O=typeof q=="object"?q:{};return O.date=D,O.args=arguments,new T(O)},b=v;b.l=R,b.i=A,b.w=function(D,q){return P(D,{locale:q.$L,utc:q.$u,x:q.$x,$offset:q.$offset})};var T=function(){function D(O){this.$L=R(O.locale,null,!0),this.parse(O),this.$x=this.$x||O.x||{},this[E]=!0}var q=D.prototype;return q.parse=function(O){this.$d=function(N){var V=N.date,L=N.utc;if(V===null)return new Date(NaN);if(b.u(V))return new Date;if(V instanceof Date)return new Date(V);if(typeof V=="string"&&!/Z$/i.test(V)){var U=V.match(f);if(U){var z=U[2]-1||0,J=(U[7]||"0").substring(0,3);return L?new Date(Date.UTC(U[1],z,U[3]||1,U[4]||0,U[5]||0,U[6]||0,J)):new Date(U[1],z,U[3]||1,U[4]||0,U[5]||0,U[6]||0,J)}}return new Date(V)}(O),this.init()},q.init=function(){var O=this.$d;this.$y=O.getFullYear(),this.$M=O.getMonth(),this.$D=O.getDate(),this.$W=O.getDay(),this.$H=O.getHours(),this.$m=O.getMinutes(),this.$s=O.getSeconds(),this.$ms=O.getMilliseconds()},q.$utils=function(){return b},q.isValid=function(){return this.$d.toString()!==m},q.isSame=function(O,N){var V=P(O);return this.startOf(N)<=V&&V<=this.endOf(N)},q.isAfter=function(O,N){return P(O)<this.startOf(N)},q.isBefore=function(O,N){return this.endOf(N)<P(O)},q.$g=function(O,N,V){return b.u(O)?this[N]:this.set(V,O)},q.unix=function(){return Math.floor(this.valueOf()/1e3)},q.valueOf=function(){return this.$d.getTime()},q.startOf=function(O,N){var V=this,L=!!b.u(N)||N,U=b.p(O),z=function(re,ce){var de=b.w(V.$u?Date.UTC(V.$y,ce,re):new Date(V.$y,ce,re),V);return L?de:de.endOf(c)},J=function(re,ce){return b.w(V.toDate()[re].apply(V.toDate("s"),(L?[0,0,0,0]:[23,59,59,999]).slice(ce)),V)},te=this.$W,G=this.$M,Z=this.$D,K="set"+(this.$u?"UTC":"");switch(U){case d:return L?z(1,0):z(31,11);case s:return L?z(1,G):z(0,G+1);case u:var X=this.$locale().weekStart||0,ue=(te<X?te+7:te)-X;return z(L?Z-ue:Z+(6-ue),G);case c:case p:return J(K+"Hours",0);case i:return J(K+"Minutes",1);case a:return J(K+"Seconds",2);case n:return J(K+"Milliseconds",3);default:return this.clone()}},q.endOf=function(O){return this.startOf(O,!1)},q.$set=function(O,N){var V,L=b.p(O),U="set"+(this.$u?"UTC":""),z=(V={},V[c]=U+"Date",V[p]=U+"Date",V[s]=U+"Month",V[d]=U+"FullYear",V[i]=U+"Hours",V[a]=U+"Minutes",V[n]=U+"Seconds",V[o]=U+"Milliseconds",V)[L],J=L===c?this.$D+(N-this.$W):N;if(L===s||L===d){var te=this.clone().set(p,1);te.$d[z](J),te.init(),this.$d=te.set(p,Math.min(this.$D,te.daysInMonth())).$d}else z&&this.$d[z](J);return this.init(),this},q.set=function(O,N){return this.clone().$set(O,N)},q.get=function(O){return this[b.p(O)]()},q.add=function(O,N){var V,L=this;O=Number(O);var U=b.p(N),z=function(G){var Z=P(L);return b.w(Z.date(Z.date()+Math.round(G*O)),L)};if(U===s)return this.set(s,this.$M+O);if(U===d)return this.set(d,this.$y+O);if(U===c)return z(1);if(U===u)return z(7);var J=(V={},V[a]=t,V[i]=r,V[n]=e,V)[U]||1,te=this.$d.getTime()+O*J;return b.w(te,this)},q.subtract=function(O,N){return this.add(-1*O,N)},q.format=function(O){var N=this,V=this.$locale();if(!this.isValid())return V.invalidDate||m;var L=O||"YYYY-MM-DDTHH:mm:ssZ",U=b.z(this),z=this.$H,J=this.$m,te=this.$M,G=V.weekdays,Z=V.months,K=V.meridiem,X=function(ce,de,Ue,et){return ce&&(ce[de]||ce(N,L))||Ue[de].slice(0,et)},ue=function(ce){return b.s(z%12||12,ce,"0")},re=K||function(ce,de,Ue){var et=ce<12?"AM":"PM";return Ue?et.toLowerCase():et};return L.replace(S,function(ce,de){return de||function(Ue){switch(Ue){case"YY":return String(N.$y).slice(-2);case"YYYY":return b.s(N.$y,4,"0");case"M":return te+1;case"MM":return b.s(te+1,2,"0");case"MMM":return X(V.monthsShort,te,Z,3);case"MMMM":return X(Z,te);case"D":return N.$D;case"DD":return b.s(N.$D,2,"0");case"d":return String(N.$W);case"dd":return X(V.weekdaysMin,N.$W,G,2);case"ddd":return X(V.weekdaysShort,N.$W,G,3);case"dddd":return G[N.$W];case"H":return String(z);case"HH":return b.s(z,2,"0");case"h":return ue(1);case"hh":return ue(2);case"a":return re(z,J,!0);case"A":return re(z,J,!1);case"m":return String(J);case"mm":return b.s(J,2,"0");case"s":return String(N.$s);case"ss":return b.s(N.$s,2,"0");case"SSS":return b.s(N.$ms,3,"0");case"Z":return U}return null}(ce)||U.replace(":","")})},q.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},q.diff=function(O,N,V){var L,U=this,z=b.p(N),J=P(O),te=(J.utcOffset()-this.utcOffset())*t,G=this-J,Z=function(){return b.m(U,J)};switch(z){case d:L=Z()/12;break;case s:L=Z();break;case l:L=Z()/3;break;case u:L=(G-te)/6048e5;break;case c:L=(G-te)/864e5;break;case i:L=G/r;break;case a:L=G/t;break;case n:L=G/e;break;default:L=G}return V?L:b.a(L)},q.daysInMonth=function(){return this.endOf(s).$D},q.$locale=function(){return x[this.$L]},q.locale=function(O,N){if(!O)return this.$L;var V=this.clone(),L=R(O,N,!0);return L&&(V.$L=L),V},q.clone=function(){return b.w(this.$d,this)},q.toDate=function(){return new Date(this.valueOf())},q.toJSON=function(){return this.isValid()?this.toISOString():null},q.toISOString=function(){return this.$d.toISOString()},q.toString=function(){return this.$d.toUTCString()},D}(),M=T.prototype;return P.prototype=M,[["$ms",o],["$s",n],["$m",a],["$H",i],["$W",c],["$M",s],["$y",d],["$D",p]].forEach(function(D){M[D[1]]=function(q){return this.$g(q,D[0],D[1])}}),P.extend=function(D,q){return D.$i||(D(q,T,P),D.$i=!0),P},P.locale=R,P.isDayjs=A,P.unix=function(D){return P(1e3*D)},P.en=x[y],P.Ls=x,P.p={},P})});var ey=Fe((Gl,Hl)=>{"use strict";(function(e,t){typeof Gl=="object"&&typeof Hl<"u"?Hl.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_quarterOfYear=t()})(Gl,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 ty=Fe((Yl,Jl)=>{"use strict";(function(e,t){typeof Yl=="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()})(Yl,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(S){this[f]=+S}},s=[/[+-]\d\d:?(\d\d)?|Z/,function(f){(this.zone||(this.zone={})).offset=function(S){if(!S||S==="Z")return 0;var C=S.match(/([+-]|\d\d)/g),h=60*C[1]+(+C[2]||0);return h===0?0:C[0]==="+"?-h:h}(f)}],l=function(f){var S=i[f];return S&&(S.indexOf?S:S.s.concat(S.f))},d=function(f,S){var C,h=i.meridiem;if(h){for(var v=1;v<=24;v+=1)if(f.indexOf(h(v,0,S))>-1){C=v>12;break}}else C=f===(S?"pm":"PM");return C},p={A:[a,function(f){this.afternoon=d(f,!1)}],a:[a,function(f){this.afternoon=d(f,!0)}],Q:[r,function(f){this.month=3*(f-1)+1}],S:[r,function(f){this.milliseconds=100*+f}],SS:[o,function(f){this.milliseconds=10*+f}],SSS:[/\d{3}/,function(f){this.milliseconds=+f}],s:[n,u("seconds")],ss:[n,u("seconds")],m:[n,u("minutes")],mm:[n,u("minutes")],H:[n,u("hours")],h:[n,u("hours")],HH:[n,u("hours")],hh:[n,u("hours")],D:[n,u("day")],DD:[o,u("day")],Do:[a,function(f){var S=i.ordinal,C=f.match(/\d+/);if(this.day=C[0],S)for(var h=1;h<=31;h+=1)S(h).replace(/\[|\]/g,"")===f&&(this.day=h)}],w:[n,u("week")],ww:[o,u("week")],M:[n,u("month")],MM:[o,u("month")],MMM:[a,function(f){var S=l("months"),C=(l("monthsShort")||S.map(function(h){return h.slice(0,3)})).indexOf(f)+1;if(C<1)throw new Error;this.month=C%12||C}],MMMM:[a,function(f){var S=l("months").indexOf(f)+1;if(S<1)throw new Error;this.month=S%12||S}],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 S,C;S=f,C=i&&i.formats;for(var h=(f=S.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(P,b,T){var M=T&&T.toUpperCase();return b||C[T]||e[T]||C[M].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(D,q,O){return q||O.slice(1)})})).match(t),v=h.length,y=0;y<v;y+=1){var x=h[y],E=p[x],A=E&&E[0],R=E&&E[1];h[y]=R?{regex:A,parser:R}:x.replace(/^\[|\]$/g,"")}return function(P){for(var b={},T=0,M=0;T<v;T+=1){var D=h[T];if(typeof D=="string")M+=D.length;else{var q=D.regex,O=D.parser,N=P.slice(M),V=q.exec(N)[0];O.call(b,V),P=P.replace(V,"")}}return function(L){var U=L.afternoon;if(U!==void 0){var z=L.hours;U?z<12&&(L.hours+=12):z===12&&(L.hours=0),delete L.afternoon}}(b),b}}return function(f,S,C){C.p.customParseFormat=!0,f&&f.parseTwoDigitYear&&(c=f.parseTwoDigitYear);var h=S.prototype,v=h.parse;h.parse=function(y){var x=y.date,E=y.utc,A=y.args;this.$u=E;var R=A[1];if(typeof R=="string"){var P=A[2]===!0,b=A[3]===!0,T=P||b,M=A[2];b&&(M=A[2]),i=this.$locale(),!P&&M&&(i=C.Ls[M]),this.$d=function(N,V,L,U){try{if(["x","X"].indexOf(V)>-1)return new Date((V==="X"?1e3:1)*N);var z=m(V)(N),J=z.year,te=z.month,G=z.day,Z=z.hours,K=z.minutes,X=z.seconds,ue=z.milliseconds,re=z.zone,ce=z.week,de=new Date,Ue=G||(J||te?1:de.getDate()),et=J||de.getFullYear(),sr=0;J&&!te||(sr=te>0?te-1:de.getMonth());var ko,Vo=Z||0,na=K||0,Pu=X||0,vu=ue||0;return re?new Date(Date.UTC(et,sr,Ue,Vo,na,Pu,vu+60*re.offset*1e3)):L?new Date(Date.UTC(et,sr,Ue,Vo,na,Pu,vu)):(ko=new Date(et,sr,Ue,Vo,na,Pu,vu),ce&&(ko=U(ko).week(ce).toDate()),ko)}catch{return new Date("")}}(x,R,E,C),this.init(),M&&M!==!0&&(this.$L=this.locale(M).$L),T&&x!=this.format(R)&&(this.$d=new Date("")),i={}}else if(R instanceof Array)for(var D=R.length,q=1;q<=D;q+=1){A[1]=R[q-1];var O=C.apply(this,A);if(O.isValid()){this.$d=O.$d,this.$L=O.$L,this.init();break}q===D&&(this.$d=new Date(""))}else v.call(this,y)}}})});var ZS=Fe((x4,JS)=>{"use strict";var DE=/(^|; )Coveo-Pendragon=([^;]*)/;JS.exports=()=>DE.exec(document.cookie)?.pop()||null});var XS=Fe((Xd,em)=>{"use strict";(function(e,t){typeof Xd=="object"&&typeof em<"u"?em.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_timezone=t()})(Xd,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(S,C){C===void 0&&(C={});var h=C.timeZoneName||"short",v=S+"|"+h,y=t[v];return y||(y=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:S,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:h}),t[v]=y),y}(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 S=p[f],C=S.type,h=S.value,v=e[C];v>=0&&(m[v]=parseInt(h,10))}var y=m[3],x=y===24?0:y,E=m[0]+"-"+m[1]+"-"+m[2]+" "+x+":"+m[4]+":"+m[5]+":000",A=+l;return(n.utc(E).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(),S=f.toLocaleString("en-US",{timeZone:l}),C=Math.round((f-new Date(S))/1e3/60),h=15*-Math.round(f.getTimezoneOffset()/15)-C;if(!Number(h))p=this.utcOffset(0,d);else if(p=n(S,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(h,!0),d){var v=p.utcOffset();p=p.add(m-v,"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,S=c(+n(),f);if(typeof l!="string")return n(l).tz(f);var C=function(x,E,A){var R=x-60*E*1e3,P=c(R,A);if(E===P)return[R,E];var b=c(R-=60*(P-E)*1e3,A);return P===b?[R,P]:[x-60*Math.min(P,b)*1e3,Math.max(P,b)]}(n.utc(l,m).valueOf(),S,f),h=C[0],v=C[1],y=n(h).utcOffset(v);return y.$x.$timezone=f,y},n.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},n.tz.setDefault=function(l){a=l}}})});var eC=Fe((tm,rm)=>{"use strict";(function(e,t){typeof tm=="object"&&typeof rm<"u"?rm.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_utc=t()})(tm,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 S=this.$utils().u;if(S(m))return this.$u?0:S(this.$offset)?s.call(this):this.$offset;if(typeof m=="string"&&(m=function(y){y===void 0&&(y="");var x=y.match(t);if(!x)return null;var E=(""+x[0]).match(r)||["-",0,0],A=E[0],R=60*+E[1]+ +E[2];return R===0?0:A==="+"?R:-R}(m),m===null))return this;var C=Math.abs(m)<=16?60*m:m,h=this;if(f)return h.$offset=C,h.$u=m===0,h;if(m!==0){var v=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(h=this.local().add(C+v,e)).$offset=C,h.$x.$localOffset=v}else h=this.utc();return h};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,S){if(m&&this.$u===m.$u)return p.call(this,m,f,S);var C=this.local(),h=a(m).local();return p.call(C,h,f,S)}}})});var pC=Fe((E6,mC)=>{"use strict";function zE(e){try{return JSON.stringify(e)}catch{return'"[Circular]"'}}mC.exports=WE;function WE(e,t,r){var o=r&&r.stringify||zE,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 CC=Fe((T6,$s)=>{"use strict";var fC=pC();$s.exports=cr;var li=cT().console||{},KE={mapHttpRequest:_s,mapHttpResponse:_s,wrapRequestSerializer:om,wrapResponseSerializer:om,wrapErrorSerializer:om,req:_s,res:_s,err:yC,errWithCause:yC};function Wr(e,t){return e==="silent"?1/0:t.levels.values[e]}var im=Symbol("pino.logFuncs"),nm=Symbol("pino.hierarchy"),GE={error:"log",fatal:"error",warn:"error",info:"log",debug:"log",trace:"log"};function gC(e,t){let r={logger:t,parent:e[nm]};t[nm]=r}function HE(e,t,r){let o={};t.forEach(n=>{o[n]=r[n]?r[n]:li[n]||li[GE[n]||"log"]||_n}),e[im]=o}function YE(e,t){return Array.isArray(e)?e.filter(function(o){return o!=="!stdSerializers.err"}):e===!0?Object.keys(t):!1}function cr(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||li;e.browser.write&&(e.browser.asObject=!0);let o=e.serializers||{},n=YE(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(S){r[S]=r}),(e.enabled===!1||e.browser.disabled)&&(e.level="silent");let u=e.level||"info",s=Object.create(r);s.log||(s.log=_n),HE(s,c,r),gC({},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:nT(e),messageKey:e.messageKey||"msg",onChild:e.onChild||_n};s.levels=JE(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=_n,s.serializers=o,s._serialize=n,s._stdErrSerialize=a,s.child=function(...S){return f.call(this,l,...S)},t&&(s._logEvent=am());function d(){return Wr(this.level,this)}function p(){return this._level}function m(S){if(S!=="silent"&&!this.levels.values[S])throw Error("unknown level "+S);this._level=S,vo(this,l,s,"error"),vo(this,l,s,"fatal"),vo(this,l,s,"warn"),vo(this,l,s,"info"),vo(this,l,s,"debug"),vo(this,l,s,"trace"),i.forEach(C=>{vo(this,l,s,C)})}function f(S,C,h){if(!C)throw new Error("missing bindings for child Pino");h=h||{},n&&C.serializers&&(h.serializers=C.serializers);let v=h.serializers;if(n&&v){var y=Object.assign({},o,v),x=e.browser.serialize===!0?Object.keys(y):n;delete C.serializers,cm([C],x,y,this._stdErrSerialize)}function E(R){this._childLevel=(R._childLevel|0)+1,this.bindings=C,y&&(this.serializers=y,this._serialize=x),t&&(this._logEvent=am([].concat(R._logEvent.bindings,C)))}E.prototype=this;let A=new E(this);return gC(this,A),A.child=function(...R){return f.call(this,S,...R)},A.level=h.level||this.level,S.onChild(A),A}return s}function JE(e){let t=e.customLevels||{},r=Object.assign({},cr.levels.values,t),o=Object.assign({},cr.levels.labels,ZE(t));return{values:r,labels:o}}function ZE(e){let t={};return Object.keys(e).forEach(function(r){t[e[r]]=r}),t}cr.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"}};cr.stdSerializers=KE;cr.stdTimeFunctions=Object.assign({},{nullTime:hC,epochTime:SC,unixTime:aT,isoTime:iT});function XE(e){let t=[];e.bindings&&t.push(e.bindings);let r=e[nm];for(;r.parent;)r=r.parent,r.logger.bindings&&t.push(r.logger.bindings);return t.reverse()}function vo(e,t,r,o){if(Object.defineProperty(e,o,{value:Wr(e.level,r)>Wr(o,r)?_n:r[im][o],writable:!0,enumerable:!0,configurable:!0}),e[o]===_n){if(!t.transmit)return;let a=t.transmit.level||e.level,i=Wr(a,r);if(Wr(o,r)<i)return}e[o]=tT(e,t,r,o);let n=XE(e);n.length!==0&&(e[o]=eT(n,e[o]))}function eT(e,t){return function(){return t.apply(this,[...e,...arguments])}}function tT(e,t,r,o){return function(n){return function(){let i=t.timestamp(),c=new Array(arguments.length),u=Object.getPrototypeOf&&Object.getPrototypeOf(this)===li?li:this;for(var s=0;s<c.length;s++)c[s]=arguments[s];var l=!1;if(t.serialize&&(cm(c,this._serialize,this.serializers,this._stdErrSerialize),l=!0),t.asObject||t.formatters?n.call(u,rT(this,o,c,i,t)):n.apply(u,c),t.transmit){let d=t.transmit.level||e._level,p=Wr(d,r),m=Wr(o,r);if(m<p)return;oT(this,{ts:i,methodLevel:o,methodValue:m,transmitLevel:d,transmitValue:r.levels.values[t.transmit.level||e._level],send:t.transmit.send,val:Wr(e._level,r)},c,l)}}}(e[im][o])}function rT(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?fC(c.shift(),c):void 0}else typeof u=="string"&&(u=fC(c.shift(),c));return u!==void 0&&(s[n.messageKey]=u),i(s)}function cm(e,t,r,o){for(let n in e)if(o&&e[n]instanceof Error)e[n]=cr.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 oT(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||cm(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=am(s)}function am(e){return{ts:0,messages:[],bindings:e||[],level:{label:"",value:0}}}function yC(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 nT(e){return typeof e.timestamp=="function"?e.timestamp:e.timestamp===!1?hC:SC}function _s(){return{}}function om(e){return e}function _n(){}function hC(){return!1}function SC(){return Date.now()}function aT(){return Math.round(Date.now()/1e3)}function iT(){return new Date(Date.now()).toISOString()}function cT(){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)||{}}}$s.exports.default=cr;$s.exports.pino=cr});var $p={};Lm($p,{ProductListing:()=>zu,Search:()=>$u});var Um="coveo-headless-internal-state",B=Symbol.for(Um),Bm=e=>new Proxy(e,{ownKeys(t){return Reflect.ownKeys(t).filter(r=>r!==B)},get(t,r,o){return typeof r=="symbol"&&r.description===Um&&r!==B&&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 PF}from"@coveo/bueno";function Pe(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 VR=typeof Symbol=="function"&&Symbol.observable||"@@observable",jm=VR,Au=()=>Math.random().toString(36).substring(7).split("").join("."),DR={INIT:`@@redux/INIT${Au()}`,REPLACE:`@@redux/REPLACE${Au()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Au()}`},xi=DR;function vt(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 bu(e,t,r){if(typeof e!="function")throw new Error(Pe(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(Pe(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(Pe(1));return r(bu)(e,t)}let o=e,n=t,a=new Map,i=a,c=0,u=!1;function s(){i===a&&(i=new Map,a.forEach((C,h)=>{i.set(h,C)}))}function l(){if(u)throw new Error(Pe(3));return n}function d(C){if(typeof C!="function")throw new Error(Pe(4));if(u)throw new Error(Pe(5));let h=!0;s();let v=c++;return i.set(v,C),function(){if(h){if(u)throw new Error(Pe(6));h=!1,s(),i.delete(v),a=null}}}function p(C){if(!vt(C))throw new Error(Pe(7));if(typeof C.type>"u")throw new Error(Pe(8));if(typeof C.type!="string")throw new Error(Pe(17));if(u)throw new Error(Pe(9));try{u=!0,n=o(n,C)}finally{u=!1}return(a=i).forEach(v=>{v()}),C}function m(C){if(typeof C!="function")throw new Error(Pe(10));o=C,p({type:xi.REPLACE})}function f(){let C=d;return{subscribe(h){if(typeof h!="object"||h===null)throw new Error(Pe(11));function v(){let x=h;x.next&&x.next(l())}return v(),{unsubscribe:C(v)}},[jm](){return this}}}return p({type:xi.INIT}),{dispatch:p,subscribe:d,getState:l,replaceReducer:m,[jm]:f}}function NR(e){Object.keys(e).forEach(t=>{let r=e[t];if(typeof r(void 0,{type:xi.INIT})>"u")throw new Error(Pe(12));if(typeof r(void 0,{type:xi.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Pe(13))})}function Do(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{NR(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],S=m(f,u);if(typeof S>"u"){let C=u&&u.type;throw new Error(Pe(14))}l[p]=S,s=s||S!==f}return s=s||o.length!==Object.keys(c).length,s?l:c}}function No(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...o)=>t(r(...o)))}function _m(...e){return t=>(r,o)=>{let n=t(r,o),a=()=>{throw new Error(Pe(15))},i={getState:n.getState,dispatch:(u,...s)=>a(u,...s)},c=e.map(u=>u(i));return a=No(...c)(n.dispatch),{...n,dispatch:a}}}function Ri(e){return vt(e)&&"type"in e&&typeof e.type=="string"}var Nu=Symbol.for("immer-nothing"),aa=Symbol.for("immer-draftable"),je=Symbol.for("immer-state");function ve(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Yr=Object.getPrototypeOf;function He(e){return!!e&&!!e[je]}function _e(e){return e?Gm(e)||Array.isArray(e)||!!e[aa]||!!e.constructor?.[aa]||la(e)||da(e):!1}var MR=Object.prototype.constructor.toString();function Gm(e){if(!e||typeof e!="object")return!1;let t=Yr(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)===MR}function Mu(e){return He(e)||ve(15,e),e[je].base_}function ia(e,t){Jr(e)===0?Reflect.ownKeys(e).forEach(r=>{t(r,e[r],e)}):e.forEach((r,o)=>t(o,r,e))}function Jr(e){let t=e[je];return t?t.type_:Array.isArray(e)?1:la(e)?2:da(e)?3:0}function ca(e,t){return Jr(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function wu(e,t){return Jr(e)===2?e.get(t):e[t]}function Hm(e,t,r){let o=Jr(e);o===2?e.set(t,r):o===3?e.add(r):e[t]=r}function QR(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function la(e){return e instanceof Map}function da(e){return e instanceof Set}function Hr(e){return e.copy_||e.base_}function Tu(e,t){if(la(e))return new Map(e);if(da(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);let r=Gm(e);if(t===!0||t==="class_only"&&!r){let o=Object.getOwnPropertyDescriptors(e);delete o[je];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(Yr(e),o)}else{let o=Yr(e);if(o!==null&&r)return{...e};let n=Object.create(o);return Object.assign(n,e)}}function vi(e,t=!1){return Ai(e)||He(e)||!_e(e)||(Jr(e)>1&&(e.set=e.add=e.clear=e.delete=LR),Object.freeze(e),t&&Object.entries(e).forEach(([r,o])=>vi(o,!0))),e}function LR(){ve(2)}function Ai(e){return Object.isFrozen(e)}var Ou={};function Zr(e){let t=Ou[e];return t||ve(0,e),t}function UR(e,t){Ou[e]||(Ou[e]=t)}var sa;function Ym(){return sa}function BR(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function $m(e,t){t&&(Zr("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function qu(e){ku(e),e.drafts_.forEach(jR),e.drafts_=null}function ku(e){e===sa&&(sa=e.parent_)}function zm(e){return sa=BR(sa,e)}function jR(e){let t=e[je];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Wm(e,t){t.unfinalizedDrafts_=t.drafts_.length;let r=t.drafts_[0];return e!==void 0&&e!==r?(r[je].modified_&&(qu(t),ve(4)),_e(e)&&(e=Fi(t,e),t.parent_||Pi(t,e)),t.patches_&&Zr("Patches").generateReplacementPatches_(r[je].base_,e,t.patches_,t.inversePatches_)):e=Fi(t,r,[]),qu(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Nu?e:void 0}function Fi(e,t,r){if(Ai(t))return t;let o=t[je];if(!o)return ia(t,(n,a)=>Km(e,o,t,n,a,r)),t;if(o.scope_!==e)return t;if(!o.modified_)return Pi(e,o.base_,!0),o.base_;if(!o.finalized_){o.finalized_=!0,o.scope_.unfinalizedDrafts_--;let n=o.copy_,a=n,i=!1;o.type_===3&&(a=new Set(n),n.clear(),i=!0),ia(a,(c,u)=>Km(e,o,n,c,u,r,i)),Pi(e,n,!1),r&&e.patches_&&Zr("Patches").generatePatches_(o,r,e.patches_,e.inversePatches_)}return o.copy_}function Km(e,t,r,o,n,a,i){if(He(n)){let c=a&&t&&t.type_!==3&&!ca(t.assigned_,o)?a.concat(o):void 0,u=Fi(e,n,c);if(Hm(r,o,u),He(u))e.canAutoFreeze_=!1;else return}else i&&r.add(n);if(_e(n)&&!Ai(n)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Fi(e,n),(!t||!t.scope_.parent_)&&typeof o!="symbol"&&Object.prototype.propertyIsEnumerable.call(r,o)&&Pi(e,n)}}function Pi(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&vi(t,r)}function _R(e,t){let r=Array.isArray(e),o={type_:r?1:0,scope_:t?t.scope_:Ym(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1},n=o,a=Qu;r&&(n=[o],a=ua);let{revoke:i,proxy:c}=Proxy.revocable(n,a);return o.draft_=c,o.revoke_=i,c}var Qu={get(e,t){if(t===je)return e;let r=Hr(e);if(!ca(r,t))return $R(e,r,t);let o=r[t];return e.finalized_||!_e(o)?o:o===Iu(e.base_,t)?(Eu(e),e.copy_[t]=Du(o,e)):o},has(e,t){return t in Hr(e)},ownKeys(e){return Reflect.ownKeys(Hr(e))},set(e,t,r){let o=Jm(Hr(e),t);if(o?.set)return o.set.call(e.draft_,r),!0;if(!e.modified_){let n=Iu(Hr(e),t),a=n?.[je];if(a&&a.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(QR(r,n)&&(r!==void 0||ca(e.base_,t)))return!0;Eu(e),Vu(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 Iu(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Eu(e),Vu(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let r=Hr(e),o=Reflect.getOwnPropertyDescriptor(r,t);return o&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:o.enumerable,value:r[t]}},defineProperty(){ve(11)},getPrototypeOf(e){return Yr(e.base_)},setPrototypeOf(){ve(12)}},ua={};ia(Qu,(e,t)=>{ua[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});ua.deleteProperty=function(e,t){return ua.set.call(this,e,t,void 0)};ua.set=function(e,t,r){return Qu.set.call(this,e[0],t,r,e[0])};function Iu(e,t){let r=e[je];return(r?Hr(r):e)[t]}function $R(e,t,r){let o=Jm(t,r);return o?"value"in o?o.value:o.get?.call(e.draft_):void 0}function Jm(e,t){if(!(t in e))return;let r=Yr(e);for(;r;){let o=Object.getOwnPropertyDescriptor(r,t);if(o)return o;r=Yr(r)}}function Vu(e){e.modified_||(e.modified_=!0,e.parent_&&Vu(e.parent_))}function Eu(e){e.copy_||(e.copy_=Tu(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var zR=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"&&ve(6),o!==void 0&&typeof o!="function"&&ve(7);let n;if(_e(t)){let a=zm(this),i=Du(t,void 0),c=!0;try{n=r(i),c=!1}finally{c?qu(a):ku(a)}return $m(a,o),Wm(n,a)}else if(!t||typeof t!="object"){if(n=r(t),n===void 0&&(n=t),n===Nu&&(n=void 0),this.autoFreeze_&&vi(n,!0),o){let a=[],i=[];Zr("Patches").generateReplacementPatches_(t,n,a,i),o(a,i)}return n}else ve(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){_e(e)||ve(8),He(e)&&(e=Zm(e));let t=zm(this),r=Du(e,void 0);return r[je].isManual_=!0,ku(t),r}finishDraft(e,t){let r=e&&e[je];(!r||!r.isManual_)&&ve(9);let{scope_:o}=r;return $m(o,t),Wm(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=Zr("Patches").applyPatches_;return He(e)?o(e,t):this.produce(e,n=>o(n,t))}};function Du(e,t){let r=la(e)?Zr("MapSet").proxyMap_(e,t):da(e)?Zr("MapSet").proxySet_(e,t):_R(e,t);return(t?t.scope_:Ym()).drafts_.push(r),r}function Zm(e){return He(e)||ve(10,e),Xm(e)}function Xm(e){if(!_e(e)||Ai(e))return e;let t=e[je],r;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=Tu(e,t.scope_.immer_.useStrictShallowCopy_)}else r=Tu(e,!0);return ia(r,(o,n)=>{Hm(r,o,Xm(n))}),t&&(t.finalized_=!1),r}function ep(){let t="replace",r="add",o="remove";function n(p,m,f,S){switch(p.type_){case 0:case 2:return i(p,m,f,S);case 1:return a(p,m,f,S);case 3:return c(p,m,f,S)}}function a(p,m,f,S){let{base_:C,assigned_:h}=p,v=p.copy_;v.length<C.length&&([C,v]=[v,C],[f,S]=[S,f]);for(let y=0;y<C.length;y++)if(h[y]&&v[y]!==C[y]){let x=m.concat([y]);f.push({op:t,path:x,value:d(v[y])}),S.push({op:t,path:x,value:d(C[y])})}for(let y=C.length;y<v.length;y++){let x=m.concat([y]);f.push({op:r,path:x,value:d(v[y])})}for(let y=v.length-1;C.length<=y;--y){let x=m.concat([y]);S.push({op:o,path:x})}}function i(p,m,f,S){let{base_:C,copy_:h}=p;ia(p.assigned_,(v,y)=>{let x=wu(C,v),E=wu(h,v),A=y?ca(C,v)?t:r:o;if(x===E&&A===t)return;let R=m.concat(v);f.push(A===o?{op:A,path:R}:{op:A,path:R,value:E}),S.push(A===r?{op:o,path:R}:A===o?{op:r,path:R,value:d(x)}:{op:t,path:R,value:d(x)})})}function c(p,m,f,S){let{base_:C,copy_:h}=p,v=0;C.forEach(y=>{if(!h.has(y)){let x=m.concat([v]);f.push({op:o,path:x,value:y}),S.unshift({op:r,path:x,value:y})}v++}),v=0,h.forEach(y=>{if(!C.has(y)){let x=m.concat([v]);f.push({op:r,path:x,value:y}),S.unshift({op:o,path:x,value:y})}v++})}function u(p,m,f,S){f.push({op:t,path:[],value:m===Nu?void 0:m}),S.push({op:t,path:[],value:p})}function s(p,m){return m.forEach(f=>{let{path:S,op:C}=f,h=p;for(let E=0;E<S.length-1;E++){let A=Jr(h),R=S[E];typeof R!="string"&&typeof R!="number"&&(R=""+R),(A===0||A===1)&&(R==="__proto__"||R==="constructor")&&ve(19),typeof h=="function"&&R==="prototype"&&ve(19),h=wu(h,R),typeof h!="object"&&ve(18,S.join("/"))}let v=Jr(h),y=l(f.value),x=S[S.length-1];switch(C){case t:switch(v){case 2:return h.set(x,y);case 3:ve(16);default:return h[x]=y}case r:switch(v){case 1:return x==="-"?h.push(y):h.splice(x,0,y);case 2:return h.set(x,y);case 3:return h.add(y);default:return h[x]=y}case o:switch(v){case 1:return h.splice(x,1);case 2:return h.delete(x);case 3:return h.delete(f.value);default:return delete h[x]}default:ve(17,C)}}),p}function l(p){if(!_e(p))return p;if(Array.isArray(p))return p.map(l);if(la(p))return new Map(Array.from(p.entries()).map(([f,S])=>[f,l(S)]));if(da(p))return new Set(Array.from(p).map(l));let m=Object.create(Yr(p));for(let f in p)m[f]=l(p[f]);return ca(p,aa)&&(m[aa]=p[aa]),m}function d(p){return He(p)?l(p):p}UR("Patches",{applyPatches_:s,generatePatches_:n,generateReplacementPatches_:u})}var Ye=new zR,Gt=Ye.produce,bi=Ye.produceWithPatches.bind(Ye),SV=Ye.setAutoFreeze.bind(Ye),CV=Ye.setUseStrictShallowCopy.bind(Ye),Lu=Ye.applyPatches.bind(Ye),xV=Ye.createDraft.bind(Ye),RV=Ye.finishDraft.bind(Ye);function WR(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function KR(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function GR(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 tp=e=>Array.isArray(e)?e:[e];function HR(e){let t=Array.isArray(e[0])?e[0]:e;return GR(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function YR(e,t){let r=[],{length:o}=e;for(let n=0;n<o;n++)r.push(e[n].apply(null,t));return r}var vV=Symbol();var AV=Object.getPrototypeOf({});var JR=class{constructor(e){this.value=e}deref(){return this.value}},ZR=typeof WeakRef<"u"?WeakRef:JR,XR=0,rp=1;function wi(){return{s:XR,v:void 0,o:null,p:null}}function Mo(e,t={}){let r=wi(),{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 S=f.get(m);S===void 0?(c=wi(),f.set(m,c)):c=S}else{let f=c.p;f===null&&(c.p=f=new Map);let S=f.get(m);S===void 0?(c=wi(),f.set(m,c)):c=S}}let s=c,l;if(c.s===rp)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 ZR(l):l}return s.s=rp,s.v=l,l}return i.clearCache=()=>{r=wi(),i.resetResultsCount()},i.resultsCount=()=>a,i.resetResultsCount=()=>{a=0},i}function op(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()),WR(s,`createSelector expects an output function after the inputs, but received: [${typeof s}]`);let l={...r,...u},{memoize:d,memoizeOptions:p=[],argsMemoize:m=Mo,argsMemoizeOptions:f=[],devModeChecks:S={}}=l,C=tp(p),h=tp(f),v=HR(n),y=d(function(){return a++,s.apply(null,arguments)},...C),x=!0,E=m(function(){i++;let R=YR(v,arguments);return c=y.apply(null,R),c},...h);return Object.assign(E,{resultFunc:s,memoizedResultFunc:y,dependencies:v,dependencyRecomputations:()=>i,resetDependencyRecomputations:()=>{i=0},lastResult:()=>c,recomputations:()=>a,resetRecomputations:()=>{a=0},memoize:d,argsMemoize:m})};return Object.assign(o,{withTypes:()=>o}),o}var Q=op(Mo),eF=Object.assign((e,t=Q)=>{KR(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:()=>eF});function np(e){return({dispatch:r,getState:o})=>n=>a=>typeof a=="function"?a(r,o,e):n(a)}var ap=np(),ip=np;var tF=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?No:No.apply(null,arguments)},DV=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}},rF=e=>e&&typeof e.match=="function";function g(e,t){function r(...o){if(t){let n=t(...o);if(!n)throw new Error(yt(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=>Ri(o)&&o.type===e,r}var dp=class ma extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,ma.prototype)}static get[Symbol.species](){return ma}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new ma(...t[0].concat(this)):new ma(...t.concat(this))}};function cp(e){return _e(e)?Gt(e,()=>{}):e}function sp(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function oF(e){return typeof e=="boolean"}var nF=()=>function(t){let{thunk:r=!0,immutableCheck:o=!0,serializableCheck:n=!0,actionCreatorCheck:a=!0}=t??{},i=new dp;return r&&(oF(r)?i.push(ap):i.push(ip(r.extraArgument))),i},pa="RTK_autoBatch",Lo=()=>e=>({payload:e,meta:{[pa]:!0}}),up=e=>t=>{setTimeout(t,e)},aF=(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:up(10):e.type==="callback"?e.queueNotification:up(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?.[pa],a=!n,a&&(i||(i=!0,u(s))),o.dispatch(l)}finally{n=!0}}})},iF=e=>function(r){let{autoBatch:o=!0}=r??{},n=new dp(e);return o&&n.push(aF(typeof o=="object"?o:void 0)),n};function mp(e){let t=nF(),{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(vt(r))c=Do(r);else throw new Error(yt(1));let u;typeof o=="function"?u=o(t):u=t();let s=No;n&&(s=tF({trace:!1,...typeof n=="object"&&n}));let l=_m(...u),d=iF(l),p=typeof i=="function"?i(d):d(),m=s(...p);return bu(c,a,m)}function pp(e){let t={},r=[],o,n={addCase(a,i){let c=typeof a=="string"?a:a.type;if(!c)throw new Error(yt(28));if(c in t)throw new Error(yt(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 cF(e){return typeof e=="function"}function j(e,t){let[r,o,n]=pp(t),a;if(cF(e))a=()=>cp(e());else{let c=cp(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(He(l)){let m=d(l,u);return m===void 0?l:m}else{if(_e(l))return Gt(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 fp=(e,t)=>rF(e)?e.match(t):e(t);function At(...e){return t=>e.some(r=>fp(r,t))}function Qo(...e){return t=>e.every(r=>fp(r,t))}function Ei(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 fa(e){return typeof e[0]=="function"&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function Ti(...e){return e.length===0?t=>Ei(t,["pending"]):fa(e)?At(...e.map(t=>t.pending)):Ti()(e[0])}function Xr(...e){return e.length===0?t=>Ei(t,["rejected"]):fa(e)?At(...e.map(t=>t.rejected)):Xr()(e[0])}function ga(...e){let t=r=>r&&r.meta&&r.meta.rejectedWithValue;return e.length===0?Qo(Xr(...e),t):fa(e)?Qo(Xr(...e),t):ga()(e[0])}function Ht(...e){return e.length===0?t=>Ei(t,["fulfilled"]):fa(e)?At(...e.map(t=>t.fulfilled)):Ht()(e[0])}function Oi(...e){return e.length===0?t=>Ei(t,["pending","fulfilled","rejected"]):fa(e)?At(...e.flatMap(t=>[t.pending,t.rejected,t.fulfilled])):Oi()(e[0])}var sF="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",qi=(e=21)=>{let t="",r=e;for(;r--;)t+=sF[Math.random()*64|0];return t},uF=["name","message","stack","code"],Uu=class{constructor(e,t){Be(this,"_type");this.payload=e,this.meta=t}},lp=class{constructor(e,t){Be(this,"_type");this.payload=e,this.meta=t}},lF=e=>{if(typeof e=="object"&&e!==null){let t={};for(let r of uF)typeof e[r]=="string"&&(t[r]=e[r]);return t}return{message:String(e)}},_=(()=>{function e(t,r,o){let n=g(t+"/fulfilled",(u,s,l,d)=>({payload:u,meta:{...d||{},arg:l,requestId:s,requestStatus:"fulfilled"}})),a=g(t+"/pending",(u,s,l)=>({payload:void 0,meta:{...l||{},arg:s,requestId:u,requestStatus:"pending"}})),i=g(t+"/rejected",(u,s,l,d,p)=>({payload:d,error:(o&&o.serializeError||lF)(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):qi(),m=new AbortController,f,S;function C(v){S=v,m.abort()}let h=async function(){let v;try{let x=o?.condition?.(u,{getState:l,extra:d});if(mF(x)&&(x=await x),x===!1||m.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let E=new Promise((A,R)=>{f=()=>{R({name:"AbortError",message:S||"Aborted"})},m.signal.addEventListener("abort",f)});s(a(p,u,o?.getPendingMeta?.({requestId:p,arg:u},{getState:l,extra:d}))),v=await Promise.race([E,Promise.resolve(r(u,{dispatch:s,getState:l,extra:d,requestId:p,signal:m.signal,abort:C,rejectWithValue:(A,R)=>new Uu(A,R),fulfillWithValue:(A,R)=>new lp(A,R)})).then(A=>{if(A instanceof Uu)throw A;return A instanceof lp?n(A.payload,p,u,A.meta):n(A,p,u)})])}catch(x){v=x instanceof Uu?i(null,p,u,x.payload,x.meta):i(x,p,u)}finally{f&&m.signal.removeEventListener("abort",f)}return o&&!o.dispatchConditionRejection&&i.match(v)&&v.meta.condition||s(v),v}();return Object.assign(h,{abort:C,requestId:p,arg:u,unwrap(){return h.then(dF)}})}}return Object.assign(c,{pending:a,rejected:i,fulfilled:n,settled:At(i,n),typePrefix:t})}return e.withTypes=()=>e,e})();function dF(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function mF(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var gp=Symbol.for("rtk-slice-createasyncthunk"),UV={[gp]:_};function pF(e,t){return`${e}/${t}`}function fF({creators:e}={}){let t=e?.asyncThunk?.[gp];return function(o){let{name:n,reducerPath:a=n}=o;if(!n)throw new Error(yt(11));typeof process<"u";let i=(typeof o.reducers=="function"?o.reducers(yF()):o.reducers)||{},c=Object.keys(i),u={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},s={addCase(v,y){let x=typeof v=="string"?v:v.type;if(!x)throw new Error(yt(12));if(x in u.sliceCaseReducersByType)throw new Error(yt(13));return u.sliceCaseReducersByType[x]=y,s},addMatcher(v,y){return u.sliceMatchers.push({matcher:v,reducer:y}),s},exposeAction(v,y){return u.actionCreators[v]=y,s},exposeCaseReducer(v,y){return u.sliceCaseReducersByName[v]=y,s}};c.forEach(v=>{let y=i[v],x={reducerName:v,type:pF(n,v),createNotation:typeof o.reducers=="function"};SF(y)?xF(x,y,s,t):hF(x,y,s)});function l(){let[v={},y=[],x=void 0]=typeof o.extraReducers=="function"?pp(o.extraReducers):[o.extraReducers],E={...v,...u.sliceCaseReducersByType};return j(o.initialState,A=>{for(let R in E)A.addCase(R,E[R]);for(let R of u.sliceMatchers)A.addMatcher(R.matcher,R.reducer);for(let R of y)A.addMatcher(R.matcher,R.reducer);x&&A.addDefaultCase(x)})}let d=v=>v,p=new Map,m;function f(v,y){return m||(m=l()),m(v,y)}function S(){return m||(m=l()),m.getInitialState()}function C(v,y=!1){function x(A){let R=A[v];return typeof R>"u"&&y&&(R=S()),R}function E(A=d){let R=sp(p,y,()=>new WeakMap);return sp(R,A,()=>{let P={};for(let[b,T]of Object.entries(o.selectors??{}))P[b]=gF(T,A,S,y);return P})}return{reducerPath:v,getSelectors:E,get selectors(){return E(x)},selectSlice:x}}let h={name:n,reducer:f,actions:u.actionCreators,caseReducers:u.sliceCaseReducersByName,getInitialState:S,...C(a),injectInto(v,{reducerPath:y,...x}={}){let E=y??a;return v.inject({reducerPath:E,reducer:f},x),{...h,...C(E,!0)}}};return h}}function gF(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 eo=fF();function yF(){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 hF({type:e,reducerName:t,createNotation:r},o,n){let a,i;if("reducer"in o){if(r&&!CF(o))throw new Error(yt(17));a=o.reducer,i=o.prepare}else a=o;n.addCase(e,a).exposeCaseReducer(t,a).exposeAction(t,i?g(e,i):g(e))}function SF(e){return e._reducerDefinitionType==="asyncThunk"}function CF(e){return e._reducerDefinitionType==="reducerWithPrepare"}function xF({type:e,reducerName:t},r,o,n){if(!n)throw new Error(yt(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||Ii,pending:c||Ii,rejected:u||Ii,settled:s||Ii})}function Ii(){}var yp="listener",hp="completed",Sp="cancelled",BV=`task-${Sp}`,jV=`task-${hp}`,_V=`${yp}-${Sp}`,$V=`${yp}-${hp}`;var{assign:Cp}=Object;var Bu="listenerMiddleware";var RF=Cp(g(`${Bu}/add`),{withTypes:()=>RF}),zV=g(`${Bu}/removeAll`),FF=Cp(g(`${Bu}/remove`),{withTypes:()=>FF});var WV=Symbol.for("rtk-state-proxy-original");function yt(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 ur=Q(e=>e.commercePagination?.principal.perPage||0,e=>e),ki=Q((e,t)=>e.commercePagination?.recommendations[t]?.perPage||0,e=>e),lr=Q(e=>e.commercePagination?.principal.totalEntries||0,e=>e),Vi=Q((e,t)=>e.commercePagination?.recommendations[t]?.totalEntries||0,e=>e),Di=Q(e=>e.commercePagination?.principal.page||0,e=>e),xp=Q((e,t)=>e.commercePagination?.recommendations[t]?.page||0,e=>e);var nD=Q(e=>e[B].productListing.responseId,e=>e),ya=Q(e=>e.productListing.responseId,e=>e),Rp=Q(e=>e.productListing.requestId,e=>e),ha=Q(e=>e.productListing?.products.length||0,e=>e),Fp=Q(e=>({total:lr(e),current:ha(e)}),({current:e,total:t})=>e<t),Pp=Q(e=>e.productListing?.isLoading,e=>PF(e)?!1:e),vp=Q(e=>e.productListing?.error,e=>e??null);import{isNullOrUndefined as Dp}from"@coveo/bueno";function ju(e,t,r){if(e===void 0)return{};let o=t(e);return o!==r?{q:o}:{}}function _u(e,t,r){if(e===void 0)return{};let o=t(e);return o!==r?{sortCriteria:o}:{}}function bt(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 wt(e){let{activeValue:t,ancestryMap:r}=AF(e);return t?bF(t,r):[]}function AF(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 bF(e,t){let r=[];if(!e)return[];let o=e;do r.unshift(o),o=t.get(o);while(o);return r}function Ap(){return{principal:dr(),recommendations:{}}}function dr(){return{page:0,perPage:0,totalEntries:0,totalPages:0}}import{ArrayValue as EF,EnumValue as Ip,StringValue as Ep,RecordValue as Tp}from"@coveo/bueno";import{ArrayValue as wF,EnumValue as bp,RecordValue as wp,StringValue as IF}from"@coveo/bueno";var ht=(r=>(r.Relevance="relevance",r.Fields="fields",r))(ht||{}),to=(r=>(r.Ascending="asc",r.Descending="desc",r))(to||{}),It=()=>({by:"relevance"});var uD=new wp({options:{required:!1},values:{by:new bp({enum:ht,required:!0}),fields:new wF({each:new wp({values:{name:new IF,direction:new bp({enum:to})}})})}});var Ni=e=>({by:"fields",fields:e}),Op=new Tp({options:{required:!1},values:{by:new Ip({enum:ht,required:!0}),fields:new EF({each:new Tp({values:{field:new Ep({required:!0}),direction:new Ip({enum:to}),displayName:new Ep}})})}});function ro(){return{appliedSort:It(),availableSorts:[It()]}}function Mi(e){return{...TF(e?.commercePagination,t=>t.principal.page,dr().page),...OF(e?.commercePagination,t=>t.principal.perPage,dr().perPage),..._u(e?.commerceSort,t=>t.appliedSort,ro().appliedSort),...bt(e.commerceFacetSet,mr(e,"regular"),qF,"f"),...bt(e.commerceFacetSet,mr(e,"regular"),kF,"fExcluded"),...bt(e.commerceFacetSet,mr(e,"location"),VF,"lf"),...bt(e.commerceFacetSet,mr(e,"hierarchical"),DF,"cf"),...bt(e.commerceFacetSet,mr(e,"dateRange"),qp,"df"),...bt(e.commerceFacetSet,mr(e,"dateRange"),kp,"dfExcluded"),...bt(e.commerceFacetSet,mr(e,"numericalRange"),qp,"nf"),...bt(e.commerceFacetSet,mr(e,"numericalRange"),kp,"nfExcluded"),...Vp("selected",e.manualNumericFacetSet),...Vp("excluded",e.manualNumericFacetSet)}}function TF(e,t,r){if(e===void 0)return{};let o=t(e);return o!==r?{page:o}:{}}function OF(e,t,r){if(e===void 0)return{};let o=t(e);return o!==r?{perPage:o}:{}}function qF(e){return e.values.filter(t=>t.state==="selected").map(t=>t.value)}function kF(e){return e.values.filter(t=>t.state==="excluded").map(t=>t.value)}function VF(e){return e.values.filter(t=>t.state==="selected").map(t=>t.value)}function qp(e){return e.values.filter(t=>t.state==="selected")}function kp(e){return e.values.filter(t=>t.state==="excluded")}function Vp(e,t){if(!t||e==="idle")return{};let r=Object.entries(t).map(([o,n])=>{if(!(n.manualRange===void 0||n.manualRange.state!==e))return{[o]:[n.manualRange]}}).filter(o=>o!==void 0).reduce((o,n)=>({...o,...n}),{});return e==="selected"?{mnf:r}:{mnfExcluded:r}}function DF(e){return wt(e.values).map(r=>r.value)}function mr(e,t){return r=>e.commerceFacetSet[r].request.type===t}var Qi=()=>({query:""});var VD=Q(e=>e[B].commerceSearch.responseId,e=>e),Sa=Q(e=>e.commerceSearch.responseId,e=>e),Np=Q(e=>e.commerceSearch.requestId,e=>e),Ca=Q(e=>e.commerceSearch?.products.length||0,e=>e),Mp=Q(e=>({total:lr(e),current:Ca(e)}),({current:e,total:t})=>e<t),Qp=Q(e=>e.commerceSearch?.isLoading,e=>Dp(e)?!1:e),Lp=Q(e=>e.commerceSearch?.error,e=>e??null),Li=Q(e=>e.commerceQuery?.query,e=>e??""),NF=Q(e=>e.commerceSearch?.queryExecuted,e=>e),Up=(e,t)=>Dp(t.queryCorrection?.correctedQuery)?Li(e):t.queryCorrection.correctedQuery,Bp=e=>({...ju(e?.commerceQuery,t=>t.query,Qi().query),...Mi(e)});function jp(e){return{query:NF(e)||""}}var $u;(t=>t.responseIdSelector=_p(Sa))($u||($u={}));var zu;(t=>t.responseIdSelector=_p(ya))(zu||(zu={}));function _p(e){return t=>e(t[B])}var Kp={};Lm(Kp,{escape:()=>Uo,getHighlightedSuggestion:()=>Ku,highlightString:()=>LF});import{isNullOrUndefined as QF}from"@coveo/bueno";var oo=(e,t=5)=>e+Math.random().toString(36).substring(2,2+t);function zp(e){return Array.isArray(e)}function Ui(e){return e.trim()===""}function Wp(e){let t={};for(let[r,o]of e)t[r]=o;return t}function xa(e){if(typeof e!="object"||!e)return e;try{return JSON.parse(JSON.stringify(e))}catch{return e}}function LF(e){if(Ui(e.openingDelimiter)||Ui(e.closingDelimiter))throw Error("delimiters should be a non-empty string");if(QF(e.content)||Ui(e.content))return e.content;if(e.highlights.length===0)return Uo(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+=Uo(e.content.slice(o,i)),r+=e.openingDelimiter,r+=Uo(e.content.slice(i,c)),r+=e.closingDelimiter,o=c}return o!==t&&(r+=Uo(e.content.slice(o))),r}function Ku(e,t){return e=Uo(e),e.replace(/\[(.*?)\]|\{(.*?)\}|\((.*?)\)/g,(r,o,n,a)=>o?Wu(o,t.notMatchDelimiters):n?Wu(n,t.exactMatchDelimiters):a?Wu(a,t.correctionDelimiters):r)}function Wu(e,t){return t?t.open+e+t.close:e}function Uo(e){let t={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},r="(?:"+Object.keys(t).join("|")+")",o=RegExp(r),n=RegExp(r,"g");return o.test(e)?e.replace(n,a=>t[a]):e}var af=Pt(tf(),1);var dP="recommendation-internal-options",GD=Symbol.for(dP);var $=new Error("Failed to load reducers."),Bo=class extends Error{constructor(){super(),this.name="ExpiredToken",this.message="The token being used to perform the request is expired."}};var ao=class extends Error{constructor(r,o){super();Be(this,"statusCode");this.name="Disconnected",this.message=`Client could not connect to the following URL: ${r}`,this.statusCode=o??0}};function rf(e){let t=[];for(let r in e){let o=encodeURIComponent(r),n=encodeURIComponent(e[r]);t.push(`${o}=${n}`)}return t.join("&")}function of(e){return typeof e!="object"||!e?!1:Object.values(e).every(mP)}function mP(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"}function nf(e){return e===429}var jo=class e{static async call(t){let r=pP(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(nf(u.status))throw u;return u};try{let u=await(0,af.backOff)(c,{retry:s=>{let l=s&&nf(s.status);return l&&o.info("Platform retrying request"),l}});switch(u.status){case 419:case 401:throw o.info("Platform renewing token"),new Bo;case 404:throw new ao(a,u.status);default:return o.info({response:u,requestInfo:n},"Platform response"),u}}catch(u){return u.message==="Failed to fetch"?new ao(a):u}}static async preprocessRequest(t,r){let{origin:o,preprocessRequest:n,logger:a,requestMetadata:i}=r,{signal:c,...u}=t,s=xa(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 Ee(e,t="prod",r="platform"){let o=t==="prod"?"":t,n=r==="platform"?"":`.${r}`;return`https://${e}${n}.org${o}.coveo.com`}function tt(e,t="prod"){return`${Ee(e,t)}/rest/search/v2`}function rl(e,t="prod"){return`${Ee(e,t,"analytics")}/rest/organizations/${e}/events/v1`}function pP(e){let{url:t,method:r,requestParams:o,contentType:n,accessToken:a,signal:i}=e,c=e.method==="POST"||e.method==="PUT",u=fP(o,n);return{url:t,method:r,headers:{"Content-Type":n,Authorization:`Bearer ${a}`,...e.headers},...c&&{body:u},signal:i}}function fP(e,t){return t==="application/x-www-form-urlencoded"?of(e)?rf(e):"":JSON.stringify(e)}function gP(e){return{statusCode:e.statusCode,type:e.name,message:e.message}}function yP(e){return{statusCode:e.code,type:e.name,message:e.message,ignored:!0}}function ol(e,t){if(t&&e.name==="AbortError")return{error:yP(e)};if(e instanceof ao)return{error:gP(e)};throw e}var _o=(e,t)=>({...Pa(e,t),requestParams:hP(e)}),hP=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 cf=(e,t)=>({...Pa(e,t),requestParams:SP(e)}),SP=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 sf=e=>({...Pa(e,"search/querySuggest"),requestParams:CP(e)}),CP=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 Te=e=>e.error!==void 0,ji=class{constructor(t){this.options=t}async getProductListing(t){return this.query({..._o(t,"listing"),...this.options})}async search(t){let r=_o(t,"search");return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async getRecommendations(t){return this.query({...cf(t,"recommendations"),...this.options})}async productSuggestions(t){let r=_o(t,"search/productSuggest");return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async querySuggest(t){let r=sf(t);return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async facetSearch(t,r){let o=_o(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=_o(t,"search");return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async query(t){let r=await jo.call(t);if(r instanceof Error)return ol(r);let o=await r.json();return r.ok?{success:o}:{error:o}}};function nl(e,t="prod"){return`${Ee(e,t)}/rest/organizations/${e}/commerce/v2`}var _i=e=>e;import{StringValue as Rf}from"@coveo/bueno";import{Schema as xP,SchemaValidationError as RP,StringValue as io,RecordValue as FP,ArrayValue as PP}from"@coveo/bueno";var k=new io({required:!0,emptyAllowed:!1}),ne=new io({required:!1,emptyAllowed:!1}),me=new io({required:!0,emptyAllowed:!0}),uf=new io({required:!1,emptyAllowed:!0}),lf=new PP({each:k,required:!0}),df=new io({required:!1,emptyAllowed:!1,regex:/^\d+\.\d+\.\d+$/}),mf=new io({required:!1,emptyAllowed:!1,regex:/^[a-zA-Z0-9_\-.]{1,100}$/}),pf=new io({required:!0,emptyAllowed:!1,regex:/^[a-zA-Z0-9_\-.]{1,100}$/}),Qe=({message:e,name:t,stack:r})=>({message:e,name:t,stack:r}),ye=(e,t)=>{if("required"in t)return{payload:new xP({value:t}).validate({value:e}).value};let n=new FP({options:{required:!0},values:t}).validate(e);if(n)throw new RP(n);return{payload:e}},F=(e,t)=>{try{return ye(e,t)}catch(r){return{payload:e,error:Qe(r)}}},$e=(e,t,r,o)=>{let n=`Check the initialState of ${o}`;return ff(e,t,r,n,"Controller initialization error")},Le=(e,t,r,o)=>{let n=`Check the options of ${o}`;return ff(e,t,r,n,"Controller initialization error")},ff=(e,t,r,o,n)=>{try{return t.validate(r,o)}catch(a){throw e.logger.error(a,n),a}};import{ArrayValue as vP,BooleanValue as yf,RecordValue as AP,StringValue as va,Value as bP}from"@coveo/bueno";var $o="3.25.0-pre.b04a573cd9",gf=["@coveo/atomic","@coveo/quantic"];var al=()=>ne,hf=()=>k,co=g("configuration/updateBasicConfiguration",e=>F(e,{accessToken:ne,environment:new va({required:!1,constrainTo:["prod","hipaa","stg","dev"]}),organizationId:ne})),Sf=g("configuration/updateSearchConfiguration",e=>F(e,{proxyBaseUrl:new va({required:!1,url:!0}),pipeline:new va({required:!1,emptyAllowed:!0}),searchHub:ne,timezone:ne,locale:ne,authenticationProviders:new vP({required:!1,each:k})})),Aa={enabled:new yf({default:!0}),originContext:al(),originLevel2:al(),originLevel3:al(),proxyBaseUrl:new va({required:!1,url:!0}),runtimeEnvironment:new bP,anonymous:new yf({default:!1}),deviceId:ne,userDisplayName:ne,documentLocation:ne,trackingId:mf,analyticsMode:new va({constrainTo:["legacy","next"],required:!1,default:"next"}),source:new AP({options:{required:!1},values:gf.reduce((e,t)=>(e[t]=df,e),{})})},il=g("configuration/updateAnalyticsConfiguration",e=>F(e,Aa)),$i=g("configuration/analytics/disable"),zi=g("configuration/analytics/enable"),Cf=g("configuration/analytics/originlevel2",e=>F(e,{originLevel2:hf()})),xf=g("configuration/analytics/originlevel3",e=>F(e,{originLevel3:hf()}));var zo=g("commerce/configuration/updateBasicConfiguration",e=>F(e,{accessToken:ne,environment:new Rf({required:!1,constrainTo:["prod","hipaa","stg","dev"]}),organizationId:ne})),Wo=g("commerce/configuration/updateProxyBaseUrl",e=>F(e,{proxyBaseUrl:new Rf({required:!1,url:!0})})),Ko=g("commerce/configuration/updateAnalyticsConfiguration",e=>F(e,{enabled:Aa.enabled,proxyBaseUrl:Aa.proxyBaseUrl,source:Aa.source,trackingId:pf})),Wi=g("commerce/configuration/analytics/disable"),Ki=g("commerce/configuration/analytics/enable");import{isNullOrUndefined as so}from"@coveo/bueno";var Ff=()=>({accessToken:"",environment:"prod",organizationId:"",analytics:{enabled:!0,trackingId:"",source:{}},commerce:{}});var cl=j(Ff(),e=>e.addCase(zo,(t,r)=>{Pf(t,r.payload)}).addCase(co,(t,r)=>{Pf(t,r.payload)}).addCase(Wo,(t,r)=>{wP(t,r.payload)}).addCase(Ko,(t,r)=>{IP(t,r.payload)}).addCase(Wi,t=>{t.analytics.enabled=!1}).addCase(Ki,t=>{t.analytics.enabled=!0}));function Pf(e,t){so(t.accessToken)||(e.accessToken=t.accessToken),e.environment=t.environment??"prod",so(t.organizationId)||(e.organizationId=t.organizationId)}function wP(e,t){so(t.proxyBaseUrl)||(e.commerce.apiBaseUrl=t.proxyBaseUrl)}function IP(e,t){so(t.enabled)||(e.analytics.enabled=t.enabled),so(t.proxyBaseUrl)||(e.analytics.apiBaseUrl=t.proxyBaseUrl),so(t.source)||(e.analytics.source=t.source),so(t.trackingId)||(e.analytics.trackingId=t.trackingId)}function Go(e){return e.currency}var vf=(e,t)=>({currency:Go(t.commerceContext),products:EP(t.cart),transaction:e}),Af=(e,t)=>({currency:Go(t.commerceContext),...e}),uo=Q(e=>e.cart,e=>e.cartItems,(e,t)=>t.map(r=>e[r])),EP=Q(uo,e=>e.map(({quantity:t,...r})=>({quantity:t,product:r})));import{ArrayValue as TP,NumberValue as bf,RecordValue as OP,Schema as qP,StringValue as kP}from"@coveo/bueno";var sl={productId:k,quantity:new bf({required:!0,min:0}),name:new kP({required:!1}),price:new bf({required:!1,min:0})},ul=new TP({each:new OP({values:{...sl}})}),ll={items:ul},wf=new qP(ll);var pr=g("commerce/cart/setItems",e=>F(e,ul)),Ho=g("commerce/cart/updateItemQuantity",e=>F(e,sl)),Yo=g("commerce/cart/purchase"),Gi=_("commerce/cart/emit/purchaseEvent",async(e,{extra:t,getState:r})=>{let o=vf(e,r()),{relay:n}=t;n.emit("ec.purchase",o)}),Hi=_("commerce/cart/emit/cartActionEvent",async(e,{extra:t,getState:r})=>{let o=Af(e,r()),{relay:n}=t;n.emit("ec.cartAction",o)});function W(e){let t,r=new Map,o=()=>r.size===0,n=a=>{try{let i=JSON.stringify(a),c=t!==i;return t=i,c}catch(i){return console.warn('Could not detect if state has changed, check the controller "get state method"',i),!0}};return{subscribe(a){a();let i=Symbol(),c;return o()&&(t=JSON.stringify(this.state),c=e.subscribe(()=>{n(this.state)&&r.forEach(u=>u())})),r.set(i,a),()=>{r.delete(i),o()&&c&&c()}},get state(){return{}}}}function If(e,t){return e.cart[lo(t)]}var Ef=Q(uo,e=>e.reduce((t,r)=>t+r.quantity,0)),Tf=Q(uo,e=>e.reduce((t,r)=>t+r.price*r.quantity,0));function VP(e,t={}){if(!DP(e))throw $;let{dispatch:r}=e,o=W(e),n=()=>e[B].cart,a={...t.initialState};$e(e,wf,a,"buildCart"),a.items!==void 0&&r(pr(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),S=d?Math.abs(p-d.quantity):p;return{action:f,quantity:S,product:m}}return{...o,empty:function(){for(let l of uo(n()))this.updateItemQuantity({...l,quantity:0})},purchase(l){r(Gi(l)),r(Yo())},updateItemQuantity(l){let d=If(n(),l);!d&&l.quantity<=0||u(l,d)||(i(l,d)&&r(Hi(s(l,d))),r(Ho(l)))},get state(){let l=n();return{items:uo(l),totalQuantity:Ef(l),totalPrice:Tf(l)}}}}function lo(e){return`${e.productId},${e.name},${e.price}`}function DP(e){return e.addReducers({cart:Jo}),!0}var Yi=()=>({cartItems:[],cart:{},purchasedItems:[],purchased:{}}),Of=e=>kf(e.cartItems,e.cart),qf=e=>kf(e.purchasedItems,e.purchased);function kf(e,t){let r=e.reduce((o,n)=>{let{productId:a,quantity:i}=t[n];return a in o||(o[a]={productId:a,quantity:0}),o[a].quantity+=i,o},{});return[...Object.values(r)]}var Jo=j(Yi(),e=>{e.addCase(pr,(t,{payload:r})=>{let{cart:o,cartItems:n}=r.reduce((a,i)=>{let c=lo(i);return{cartItems:[...a.cartItems,c],cart:{...a.cart,[c]:i},purchasedItems:[],purchased:{}}},Yi());Vf(t,n,o)}).addCase(Ho,(t,{payload:r})=>{let o=lo(r);if(!(o in t.cart)){NP(r,t);return}if(r.quantity<=0){MP(r,t);return}t.cart[o]=r}).addCase(Yo,t=>{QP(t);let{cart:r,cartItems:o}=Yi();Vf(t,o,r)})});function Vf(e,t,r){e.cartItems=t,e.cart=r}function NP(e,t){if(e.quantity<=0)return;let r=lo(e);t.cartItems=[...t.cartItems,r],t.cart[r]=e}function MP(e,t){let r=lo(e);t.cartItems=t.cartItems.filter(o=>o!==r),delete t.cart[r]}function QP(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 Df,RecordValue as Nf,Schema as LP,StringValue as UP}from"@coveo/bueno";var BP=Intl.supportedValuesOf("currency"),jP=new UP({required:!0,emptyAllowed:!1,constrainTo:BP}),dl={url:k},ml={latitude:new Df({min:-90,max:90,required:!0}),longitude:new Df({min:-180,max:180,required:!0})},ba={language:k,country:k,currency:jP,view:new Nf({options:{required:!0},values:dl}),location:new Nf({options:{required:!1},values:ml})},Mf=new LP(ba);var se=g("commerce/context/set",e=>F(e,ba)),le=g("commerce/context/setView",e=>F(e,dl)),Zo=g("commerce/context/setLocation",e=>F(e,ml));var Qf=()=>({language:"",country:"",currency:"",view:{url:""}});var Et=j(Qf(),e=>{e.addCase(se,(t,{payload:r})=>r).addCase(le,(t,{payload:r})=>{t.view=r}).addCase(Zo,(t,{payload:r})=>{t.location=r})});var Ji=()=>({correctedQuery:"",corrections:[],originalQuery:""});import{BooleanValue as ZP,RecordValue as XP,StringValue as Bf}from"@coveo/bueno";var rt=g("breadcrumb/deselectAll"),fr=g("breadcrumb/deselectAllNonBreadcrumbs");var gr=Q(e=>e.source,e=>Object.entries(e).map(([t,r])=>`${t}@${r}`).concat(`@coveo/headless@${$o}`));var yr=(e,t)=>{let{view:r,location:o,...n}=e.commerceContext;return{accessToken:e.configuration.accessToken,url:e.configuration.commerce.apiBaseUrl??nl(e.configuration.organizationId,e.configuration.environment),organizationId:e.configuration.organizationId,trackingId:e.configuration.analytics.trackingId,...n,...e.configuration.analytics.enabled?{clientId:t.clientId}:{},context:{user:{...o,...t.userAgent?{userAgent:t.userAgent}:{}},view:{...r,...t.referrer?{referrer:t.referrer}:{}},capture:t.capture??e.configuration.analytics.enabled,cart:Of(e.cart),source:gr(e.configuration.analytics)}}};var Zi=(e,t,r)=>({...yr(e,t),..._P(e,r)}),_P=(e,t)=>{let r=t?e.commercePagination?.recommendations[t]:e.commercePagination?.principal;return r&&{page:r.page,...r.perPage&&{perPage:r.perPage}}};var ot=(e,t)=>({...Zi(e,t),facets:[...$P(e)],...e.commerceSort&&{sort:zP(e.commerceSort.appliedSort)}});function $P(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 zP(e){return e.by==="relevance"?{sortCriteria:"relevance"}:{sortCriteria:"fields",fields:e.fields.map(({name:t,direction:r})=>({field:t,direction:r}))}}import{BooleanValue as pl,NumberValue as WP}from"@coveo/bueno";var mo=g("commerce/facets/core/updateNumberOfValues",e=>F(e,{facetId:k,numberOfValues:new WP({required:!0,min:1})})),po=g("commerce/facets/core/updateIsFieldExpanded",e=>F(e,{facetId:k,isFieldExpanded:new pl({required:!0})})),pe=g("commerce/facets/core/clearAll"),Oe=g("commerce/facets/core/deselectAllValues",e=>F(e,{facetId:k})),fo=g("commerce/facets/core/updateFreezeCurrentValues",e=>F(e,{facetId:k,freezeCurrentValues:new pl({required:!0})})),Xo=g("commerce/facets/core/updateAutoSelectionForAll",e=>F(e,{allow:new pl({required:!0})}));import{NumberValue as Lf}from"@coveo/bueno";var Xi={slotId:uf},KP={...Xi,pageSize:new Lf({required:!0,min:0})},Jt=g("commerce/pagination/setPageSize",e=>F(e,KP)),GP={...Xi,page:new Lf({required:!0,min:0})},Tt=g("commerce/pagination/selectPage",e=>F(e,GP)),hr=g("commerce/pagination/nextPage",e=>F(e,Xi)),Sr=g("commerce/pagination/previousPage",e=>F(e,Xi)),en=g("commerce/pagination/registerRecommendationsSlot",e=>F(e,{slotId:k}));import{StringValue as HP}from"@coveo/bueno";var fe=g("commerce/query/update",e=>F(e,{query:new HP}));import{isNullOrUndefined as Uf}from"@coveo/bueno";import{RecordValue as YP,StringValue as JP}from"@coveo/bueno";var Cr=g("commerce/triggers/query/updateIgnore",e=>F(e,{q:new JP({emptyAllowed:!0,required:!0})})),tn=g("commerce/triggers/query/applyModification",e=>F(e,new YP({values:{originalQuery:ne,modification:ne}})));var wa=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 Te(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(!(!Uf(n)&&!Uf(n.correctedQuery)))return null;let{correctedQuery:i,originalQuery:c}=o.queryCorrection;return this.onUpdateQueryForCorrection(i??""),{...t,response:{...o},queryExecuted:Up(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(Cr({q:""})),null;let a=this.getCurrentQuery(),i=await this.automaticallyRetryQueryWithTriggerModification(o);return Te(i.response)?this.rejectWithValue(i.response.error):{...i,response:{...i.response.success},originalQuery:a}}async automaticallyRetryQueryWithTriggerModification(t){return this.dispatch(tn({newQuery:t,originalQuery:this.getCurrentQuery()})),this.onUpdateQueryForCorrection(t),await this.fetchFromAPI({...ot(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 Te(t.response)?null:t.response.success}get extra(){return this.config.extra}onUpdateQueryForCorrection(t){this.dispatch(fe({query:t}))}};var H=_("commerce/search/executeSearch",async(e,t)=>{let{getState:r}=t,o=r(),{navigatorContext:n}=t.extra,a=ot(o,n),i=Li(o),c=new wa(t),u=await c.fetchFromAPI({...a,query:i});return c.process(u)}),xr=_("commerce/search/fetchMoreProducts",async(e,t)=>{let{getState:r}=t,o=r(),{navigatorContext:n}=t.extra;if(!Mp(o))return null;let i=ur(o),u=Ca(o)/i,s=Li(o),l=ot(o,n),d=new wa(t),p=await d.fetchFromAPI({...l,query:s,page:u});return d.process(p)}),rn=_("commerce/search/prepareForSearchWithQuery",(e,t)=>{let{dispatch:r}=t;F(e,{query:new Bf,clearFilters:new ZP}),e.clearFilters&&(r(pe()),r(fr())),r(Xo({allow:!0})),r(fe({query:e.query})),r(Tt({page:0}))}),on=_("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({...yr(n,i),query:c});return Te(u)?r(u.error):{response:{...u.success,products:u.success.products}}}),ev={child:new XP({options:{required:!0},values:{permanentid:new Bf({required:!0})}})},nn=g("commerce/search/promoteChildToParent",e=>F(e,ev));function jf(){return{wasCorrectedTo:"",queryCorrection:Ji(),originalQuery:""}}var ec=j(jf(),e=>{e.addCase(H.pending,t=>{t.queryCorrection=Ji(),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 zf,BooleanValue as _f,ArrayValue as rc,StringValue as tc,NumberValue as $f,RecordValue as cv}from"@coveo/bueno";var Y=k;import{Value as tv,NumberValue as rv,StringValue as ov,ArrayValue as nv,BooleanValue as av}from"@coveo/bueno";var iv={state:new tv({required:!0}),numberOfResults:new rv({required:!0,min:0}),value:new ov({required:!0,emptyAllowed:!0}),path:new nv({required:!0,each:k}),moreValuesAvailable:new av({required:!1})};function Ia(e){e.children.forEach(t=>{Ia(t)}),ye({state:e.state,numberOfResults:e.numberOfResults,value:e.value,path:e.path,moreValuesAvailable:e.moreValuesAvailable},iv)}var an={facetId:Y,field:k,tabs:new cv({options:{required:!1},values:{included:new rc({each:new tc}),excluded:new rc({each:new tc})}}),activeTab:new tc({required:!1}),delimitingCharacter:new tc({required:!1,emptyAllowed:!0}),filterFacetCount:new _f({required:!1}),injectionDepth:new $f({required:!1,min:0}),numberOfValues:new $f({required:!1,min:1}),sortCriteria:new zf({required:!1}),basePath:new rc({required:!1,each:k}),filterByBasePath:new _f({required:!1})},cn=5,Wf=g("categoryFacet/register",e=>F(e,an)),Kf=g("categoryFacet/toggleSelectValue",e=>{try{return ye(e.facetId,k),Ia(e.selection),{payload:e,error:null}}catch(t){return{payload:e,error:Qe(t)}}}),Gf=g("categoryFacet/deselectAll",e=>F(e,an.facetId)),PQ=g("categoryFacet/updateNumberOfValues",e=>F(e,{facetId:an.facetId,numberOfValues:an.numberOfValues})),vQ=g("categoryFacet/updateSortCriterion",e=>F(e,{facetId:an.facetId,criterion:new zf})),AQ=g("categoryFacet/updateBasePath",e=>F(e,{facetId:an.facetId,basePath:new rc({each:k})}));import{NumberValue as dv,RecordValue as mv,ArrayValue as pv}from"@coveo/bueno";import{RecordValue as sv,NumberValue as uv,StringValue as lv}from"@coveo/bueno";var Ea={facetId:Y,captions:new sv({options:{required:!1}}),numberOfValues:new uv({required:!1,min:1}),query:new lv({required:!1,emptyAllowed:!0})};var fv={path:new pv({required:!0,each:k}),displayValue:me,rawValue:me,count:new dv({required:!0,min:0})},nt=g("categoryFacet/selectSearchResult",e=>F(e,{facetId:Y,value:new mv({values:fv})})),oc=g("categoryFacetSearch/register",e=>F(e,Ea));import{RecordValue as gv,NumberValue as yv}from"@coveo/bueno";var Hf={facetId:Y,value:new gv({values:{displayValue:me,rawValue:me,count:new yv({required:!0,min:0})}})},nc=g("facetSearch/register",e=>F(e,Ea)),Rr=g("facetSearch/update",e=>F(e,Ea)),Je=g("facetSearch/toggleSelectValue",e=>F(e,Hf)),St=g("facetSearch/toggleExcludeValue",e=>F(e,Hf));import{BooleanValue as hv}from"@coveo/bueno";var Zt=g("facetOptions/update",(e={freezeFacetOrder:!0})=>F(e,{freezeFacetOrder:new hv({required:!1})})),fl=g("facetOptions/facet/enable",e=>F(e,Y)),Xt=g("facetOptions/facet/disable",e=>F(e,Y));var Sv=g("history/undo"),Cv=g("history/redo"),Ot=g("history/snapshot"),GQ=_("history/back",async(e,{dispatch:t})=>{t(Sv()),await t(Ce())}),HQ=_("history/forward",async(e,{dispatch:t})=>{t(Cv()),await t(Ce())}),Ce=_("history/change",async(e,{getState:t})=>t().history.present);import{BooleanValue as Yf,StringValue as Ta,NumberValue as Jf,RecordValue as Fr}from"@coveo/bueno";var ac={q:new Ta,enableQuerySyntax:new Yf,aq:new Ta,cq:new Ta,firstResult:new Jf({min:0}),numberOfResults:new Jf({min:0}),sortCriteria:new Ta,f:new Fr,fExcluded:new Fr,cf:new Fr,nf:new Fr,mnf:new Fr,df:new Fr,debug:new Yf,sf:new Fr,tab:new Ta,af:new Fr};var Ae=g("searchParameters/restore",e=>F(e,ac)),xv=g("searchParameters/restoreTab",e=>F(e,k));import{BooleanValue as Ey,NumberValue as Ty,StringValue as ww}from"@coveo/bueno";function er(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 w(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 ee;(function(e){e.search="search",e.click="click",e.custom="custom",e.view="view",e.collect="collect"})(ee||(ee={}));function hl(){return typeof window<"u"}function Tl(){return typeof navigator<"u"}function sn(){return typeof document<"u"}function Sl(){try{return typeof localStorage<"u"}catch{return!1}}function Rv(){try{return typeof sessionStorage<"u"}catch{return!1}}function dg(){return Tl()&&navigator.cookieEnabled}var Fv=[ee.click,ee.custom,ee.search,ee.view],Pv=(e,t)=>Fv.indexOf(e)!==-1?Object.assign({language:sn()?document.documentElement.lang:"unknown",userAgent:Tl()?navigator.userAgent:"unknown"},t):t,ka=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?Zf(t,r,a):(i=c.split("."),n=i[i.length-2]+"."+i[i.length-1],Zf(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 Zf(e,t,r,o){document.cookie=`${e}=${t}`+(r?`;expires=${r.toUTCString()}`:"")+(o?`;domain=${o}`:"")+";path=/;SameSite=Lax"}function vv(){return Sl()?localStorage:dg()?new Va:Rv()?sessionStorage:new ln}var Va=class e{getItem(t){return ka.get(`${e.prefix}${t}`)}removeItem(t){ka.erase(`${e.prefix}${t}`)}setItem(t,r,o){ka.set(`${e.prefix}${t}`,r,o)}};Va.prefix="coveo_";var Cl=class{constructor(){this.cookieStorage=new Va}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)}},ln=class{getItem(t){return null}removeItem(t){}setItem(t,r){}},Oa="__coveo.analytics.history",mg=20,pg=1e3*60,fg=75,dn=class{constructor(t){this.store=t||vv()}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 w(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 w(this,void 0,void 0,function*(){let t=yield this.getHistoryWithInternalTimeAsync();return this.stripEmptyQueries(this.stripInternalTime(t))})}getHistoryWithInternalTime(){try{let t=this.store.getItem(Oa);return t&&typeof t=="string"?JSON.parse(t):[]}catch{return[]}}getHistoryWithInternalTimeAsync(){return w(this,void 0,void 0,function*(){try{let t=yield this.store.getItem(Oa);return t?JSON.parse(t):[]}catch{return[]}})}setHistory(t){try{this.store.setItem(Oa,JSON.stringify(t.slice(0,mg)))}catch{}}clear(){try{this.store.removeItem(Oa)}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,fg)),t}isValidEntry(t){let r=this.getMostRecentElement();return r&&r.value==t.value?(t.internalTime||0)-(r.internalTime||0)>pg:!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))}},gg=Object.freeze({__proto__:null,HistoryStore:dn,MAX_NUMBER_OF_HISTORY_ELEMENTS:mg,MAX_VALUE_SIZE:fg,MIN_THRESHOLD_FOR_DUPLICATE_VALUE:pg,STORE_KEY:Oa,default:dn}),Av=(e,t)=>w(void 0,void 0,void 0,function*(){return e===ee.view?(yield bv(t.contentIdValue),Object.assign({location:window.location.toString(),referrer:document.referrer,title:document.title},t)):t}),bv=e=>w(void 0,void 0,void 0,function*(){let t=new dn,r={name:"PageView",value:e,time:new Date().toISOString()};yield t.addElementAsync(r)}),ic,wv=new Uint8Array(16);function Iv(){if(!ic&&(ic=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!ic))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return ic(wv)}var Ev=/^(?:[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 sc(e){return typeof e=="string"&&Ev.test(e)}var be=[];for(let e=0;e<256;++e)be.push((e+256).toString(16).slice(1));function yg(e,t=0){return(be[e[t+0]]+be[e[t+1]]+be[e[t+2]]+be[e[t+3]]+"-"+be[e[t+4]]+be[e[t+5]]+"-"+be[e[t+6]]+be[e[t+7]]+"-"+be[e[t+8]]+be[e[t+9]]+"-"+be[e[t+10]]+be[e[t+11]]+be[e[t+12]]+be[e[t+13]]+be[e[t+14]]+be[e[t+15]]).toLowerCase()}function Tv(e){if(!sc(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 Ov(e){e=unescape(encodeURIComponent(e));let t=[];for(let r=0;r<e.length;++r)t.push(e.charCodeAt(r));return t}var qv="6ba7b810-9dad-11d1-80b4-00c04fd430c8",kv="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function Vv(e,t,r){function o(n,a,i,c){var u;if(typeof n=="string"&&(n=Ov(n)),typeof a=="string"&&(a=Tv(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 yg(s)}try{o.name=e}catch{}return o.DNS=qv,o.URL=kv,o}var Dv=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Xf={randomUUID:Dv};function go(e,t,r){if(Xf.randomUUID&&!t&&!e)return Xf.randomUUID();e=e||{};let o=e.random||(e.rng||Iv)();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 yg(o)}function Nv(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 gl(e,t){return e<<t|e>>>32-t}function Mv(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]=gl(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),S=gl(u,5)+Nv(f,s,l,d)+p+t[f]+c[m]>>>0;p=d,d=l,l=gl(s,30)>>>0,s=u,u=S}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 Qv=Vv("v5",80,Mv),eg=Qv,hg="2.30.45",tg=e=>`${e.protocol}//${e.hostname}${e.pathname.indexOf("/")===0?e.pathname:`/${e.pathname}`}${e.search}`,qa={pageview:"pageview",event:"event"},uc=class{constructor({client:t,uuidGenerator:r=go}){this.client=t,this.uuidGenerator=r}},xl=class extends uc{constructor({client:t,uuidGenerator:r=go}){super({client:t,uuidGenerator:r}),this.actionData={},this.pageViewId=r(),this.nextPageViewId=this.pageViewId,this.currentLocation=tg(window.location),this.lastReferrer=sn()?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:sn()?document.title:"",encoding:sn()?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===qa.pageview&&(this.nextPageViewId=this.uuidGenerator(),this.hasSentFirstPageView=!0)}getNextValues(t,r){return{pageViewId:t===qa.pageview?this.nextPageViewId:this.pageViewId,referrer:t===qa.pageview&&this.hasSentFirstPageView?this.currentLocation:this.lastReferrer,location:t===qa.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 tg(window.location)}},Pr=class e{constructor(t,r){if(!sc(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 sc(a)?new e(a,Number.parseInt(n)*1e3):null}};Pr.cvo_cid="cvo_cid";Pr.expirationTime=120;var Rl=class extends uc{constructor({client:t,uuidGenerator:r=go}){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 w(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(Pr.cvo_cid,new Pr(o,Date.now()).toString()),r.toString()}catch{throw new Error("Invalid URL provided")}})}acceptFrom(t){this.client.setAcceptedLinkReferrers(t)}};Rl.Id="link";var it=Object.keys;function cc(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}var yl=128,Sg=192,rg=224,og=240;function Lv(e){return(e&248)===og?4:(e&og)===rg?3:(e&rg)===Sg?2:1}function Uv(e,t){if(t<0||e.length<=t)return e;let r=e.indexOf("%",t-2);for(r<0||r>t?r=t:t=r;r>2&&e.charAt(r-3)=="%";){let o=Number.parseInt(e.substring(r-2,r),16);if((o&yl)!=yl)break;if(r-=3,(o&Sg)!=yl){t-r>=Lv(o)*3&&(r=t);break}}return e.substring(0,r)}var Fl={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"},Bv=it(Fl).map(e=>Fl[e]),jv=[...Bv].join("|"),_v=new RegExp(`^(${jv}$)`),$v={svcAction:"svc_action",svcActionData:"svc_action_data"},zv=e=>it(e).filter(t=>e[t]!==void 0).reduce((t,r)=>{let o=Fl[r]||r;return Object.assign(Object.assign({},t),{[o]:e[r]})},{}),Wv=e=>_v.test(e),Kv=[Wv],ng={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",price:"pr",quantity:"qt",coupon:"cc",position:"ps",group:"group"},ag={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",position:"ps",price:"pr",group:"group"},qe={action:"pa",list:"pal",listSource:"pls"},lc={id:"ti",revenue:"tr",tax:"tt",shipping:"ts",coupon:"tcc",affiliation:"ta",step:"cos",option:"col"},Gv=["loyaltyCardId","loyaltyTier","thirdPartyPersona","companyName","favoriteStore","storeName","userIndustry","userRole","userDepartment","businessUnit"],Pl={id:"quoteId",affiliation:"quoteAffiliation"},vl={id:"reviewId",rating:"reviewRating",comment:"reviewComment"},Hv={add:qe,bookmark_add:qe,bookmark_remove:qe,click:qe,checkout:qe,checkout_option:qe,detail:qe,impression:qe,remove:qe,refund:Object.assign(Object.assign({},qe),lc),purchase:Object.assign(Object.assign({},qe),lc),quickview:qe,quote:Object.assign(Object.assign({},qe),Pl),review:Object.assign(Object.assign({},qe),vl)},Yv=it(ng).map(e=>ng[e]),Jv=it(ag).map(e=>ag[e]),Zv=it(qe).map(e=>qe[e]),Xv=it(lc).map(e=>lc[e]),eA=it(vl).map(e=>vl[e]),tA=it(Pl).map(e=>Pl[e]),rA=[...Yv,"custom"].join("|"),oA=[...Jv,"custom"].join("|"),Cg="(pr[0-9]+)",xg="(il[0-9]+pi[0-9]+)",nA=new RegExp(`^${Cg}(${rA})$`),aA=new RegExp(`^(${xg}(${oA}))|(il[0-9]+nm)$`),iA=new RegExp(`^(${Zv.join("|")})$`),cA=new RegExp(`^(${Xv.join("|")})$`),sA=new RegExp(`^${Cg}custom$`),uA=new RegExp(`^${xg}custom$`),lA=new RegExp(`^(${[...Gv,...eA,...tA].join("|")})$`),dA=e=>nA.test(e),mA=e=>aA.test(e),pA=e=>iA.test(e),fA=e=>cA.test(e),gA=e=>lA.test(e),yA=[mA,dA,pA,fA,gA],hA=[sA,uA],SA={anonymizeIp:"aip"},CA={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"},RA=["contentId","contentIdKey","contentType","searchHub","tab","searchUid","permanentId","contentLocale","trackingId"],FA=Object.assign(Object.assign(Object.assign(Object.assign({},SA),CA),xA),RA.reduce((e,t)=>Object.assign(Object.assign({},e),{[t]:t}),{})),Al=Object.assign(Object.assign({},FA),$v),PA=e=>{let t=!!e.action&&Hv[e.action]||{};return it(e).reduce((r,o)=>{let n=t[o]||Al[o]||o;return Object.assign(Object.assign({},r),{[n]:e[o]})},{})},vA=it(Al).map(e=>Al[e]),AA=e=>vA.indexOf(e)!==-1,bA=e=>e==="custom",wA=e=>[...yA,...Kv,AA,bA].some(t=>t(e)),IA=e=>it(e).reduce((t,r)=>{let o=EA(r);return o?Object.assign(Object.assign({},t),TA(o,e[r])):Object.assign(Object.assign({},t),{[r]:e[r]})},{}),EA=e=>{let t;return[...hA].every(r=>{var o;return t=(o=r.exec(e))===null||o===void 0?void 0:o[1],!t}),t},TA=(e,t)=>it(t).reduce((r,o)=>Object.assign(Object.assign({},r),{[`${e}${o}`]:t[o]}),{}),bl=class{constructor(t){this.opts=t}sendEvent(t,r){return w(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 w(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 w(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[ee.click,ee.custom,ee.search,ee.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}},wl=class{sendEvent(t,r){return w(this,void 0,void 0,function*(){return Promise.resolve()})}deleteHttpCookieVisitorId(){return w(this,void 0,void 0,function*(){return Promise.resolve()})}},ig=globalThis.fetch,dc=class{constructor(t){this.opts=t}sendEvent(t,r){return w(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=er(u,["url"]),d;try{d=yield ig(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 w(this,void 0,void 0,function*(){let{baseUrl:t}=this.opts,r=`${t}/analytics/visit`;yield ig(r,{headers:this.getHeaders(),method:"DELETE"})})}shouldAppendVisitorId(t){return[ee.click,ee.custom,ee.search,ee.view].indexOf(t)!==-1}getVisitorIdParam(){return w(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"})}},Il=class{constructor(t,r){Sl()&&dg()?this.storage=new Cl:Sl()?this.storage=localStorage:(console.warn("BrowserRuntime detected no valid storage available.",this),this.storage=new ln),this.client=new dc(t),this.beaconClient=new bl(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}},El=class{constructor(t,r){this.storage=r||new ln,this.client=new dc(t)}getClientDependingOnEventType(t){return this.client}},mc=class{constructor(){this.storage=new ln,this.client=new wl}getClientDependingOnEventType(t){return this.client}},OA="xx",qA=e=>e?.startsWith(OA)||!1,kA=`
19
+ If you are trying to access the inner state... Don't`),Reflect.get(t,r,o)}});import{isNullOrUndefined as PF}from"@coveo/bueno";function Pe(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 VR=typeof Symbol=="function"&&Symbol.observable||"@@observable",jm=VR,Au=()=>Math.random().toString(36).substring(7).split("").join("."),DR={INIT:`@@redux/INIT${Au()}`,REPLACE:`@@redux/REPLACE${Au()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Au()}`},xi=DR;function vt(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 bu(e,t,r){if(typeof e!="function")throw new Error(Pe(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(Pe(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(Pe(1));return r(bu)(e,t)}let o=e,n=t,a=new Map,i=a,c=0,u=!1;function s(){i===a&&(i=new Map,a.forEach((C,h)=>{i.set(h,C)}))}function l(){if(u)throw new Error(Pe(3));return n}function d(C){if(typeof C!="function")throw new Error(Pe(4));if(u)throw new Error(Pe(5));let h=!0;s();let v=c++;return i.set(v,C),function(){if(h){if(u)throw new Error(Pe(6));h=!1,s(),i.delete(v),a=null}}}function p(C){if(!vt(C))throw new Error(Pe(7));if(typeof C.type>"u")throw new Error(Pe(8));if(typeof C.type!="string")throw new Error(Pe(17));if(u)throw new Error(Pe(9));try{u=!0,n=o(n,C)}finally{u=!1}return(a=i).forEach(v=>{v()}),C}function m(C){if(typeof C!="function")throw new Error(Pe(10));o=C,p({type:xi.REPLACE})}function f(){let C=d;return{subscribe(h){if(typeof h!="object"||h===null)throw new Error(Pe(11));function v(){let x=h;x.next&&x.next(l())}return v(),{unsubscribe:C(v)}},[jm](){return this}}}return p({type:xi.INIT}),{dispatch:p,subscribe:d,getState:l,replaceReducer:m,[jm]:f}}function NR(e){Object.keys(e).forEach(t=>{let r=e[t];if(typeof r(void 0,{type:xi.INIT})>"u")throw new Error(Pe(12));if(typeof r(void 0,{type:xi.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Pe(13))})}function Do(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{NR(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],S=m(f,u);if(typeof S>"u"){let C=u&&u.type;throw new Error(Pe(14))}l[p]=S,s=s||S!==f}return s=s||o.length!==Object.keys(c).length,s?l:c}}function No(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...o)=>t(r(...o)))}function _m(...e){return t=>(r,o)=>{let n=t(r,o),a=()=>{throw new Error(Pe(15))},i={getState:n.getState,dispatch:(u,...s)=>a(u,...s)},c=e.map(u=>u(i));return a=No(...c)(n.dispatch),{...n,dispatch:a}}}function Ri(e){return vt(e)&&"type"in e&&typeof e.type=="string"}var Nu=Symbol.for("immer-nothing"),aa=Symbol.for("immer-draftable"),je=Symbol.for("immer-state");function ve(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Yr=Object.getPrototypeOf;function He(e){return!!e&&!!e[je]}function _e(e){return e?Gm(e)||Array.isArray(e)||!!e[aa]||!!e.constructor?.[aa]||la(e)||da(e):!1}var MR=Object.prototype.constructor.toString();function Gm(e){if(!e||typeof e!="object")return!1;let t=Yr(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)===MR}function Mu(e){return He(e)||ve(15,e),e[je].base_}function ia(e,t){Jr(e)===0?Reflect.ownKeys(e).forEach(r=>{t(r,e[r],e)}):e.forEach((r,o)=>t(o,r,e))}function Jr(e){let t=e[je];return t?t.type_:Array.isArray(e)?1:la(e)?2:da(e)?3:0}function ca(e,t){return Jr(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function wu(e,t){return Jr(e)===2?e.get(t):e[t]}function Hm(e,t,r){let o=Jr(e);o===2?e.set(t,r):o===3?e.add(r):e[t]=r}function QR(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function la(e){return e instanceof Map}function da(e){return e instanceof Set}function Hr(e){return e.copy_||e.base_}function Tu(e,t){if(la(e))return new Map(e);if(da(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);let r=Gm(e);if(t===!0||t==="class_only"&&!r){let o=Object.getOwnPropertyDescriptors(e);delete o[je];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(Yr(e),o)}else{let o=Yr(e);if(o!==null&&r)return{...e};let n=Object.create(o);return Object.assign(n,e)}}function vi(e,t=!1){return Ai(e)||He(e)||!_e(e)||(Jr(e)>1&&(e.set=e.add=e.clear=e.delete=LR),Object.freeze(e),t&&Object.entries(e).forEach(([r,o])=>vi(o,!0))),e}function LR(){ve(2)}function Ai(e){return Object.isFrozen(e)}var Ou={};function Zr(e){let t=Ou[e];return t||ve(0,e),t}function UR(e,t){Ou[e]||(Ou[e]=t)}var sa;function Ym(){return sa}function BR(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function $m(e,t){t&&(Zr("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function qu(e){ku(e),e.drafts_.forEach(jR),e.drafts_=null}function ku(e){e===sa&&(sa=e.parent_)}function zm(e){return sa=BR(sa,e)}function jR(e){let t=e[je];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Wm(e,t){t.unfinalizedDrafts_=t.drafts_.length;let r=t.drafts_[0];return e!==void 0&&e!==r?(r[je].modified_&&(qu(t),ve(4)),_e(e)&&(e=Fi(t,e),t.parent_||Pi(t,e)),t.patches_&&Zr("Patches").generateReplacementPatches_(r[je].base_,e,t.patches_,t.inversePatches_)):e=Fi(t,r,[]),qu(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Nu?e:void 0}function Fi(e,t,r){if(Ai(t))return t;let o=t[je];if(!o)return ia(t,(n,a)=>Km(e,o,t,n,a,r)),t;if(o.scope_!==e)return t;if(!o.modified_)return Pi(e,o.base_,!0),o.base_;if(!o.finalized_){o.finalized_=!0,o.scope_.unfinalizedDrafts_--;let n=o.copy_,a=n,i=!1;o.type_===3&&(a=new Set(n),n.clear(),i=!0),ia(a,(c,u)=>Km(e,o,n,c,u,r,i)),Pi(e,n,!1),r&&e.patches_&&Zr("Patches").generatePatches_(o,r,e.patches_,e.inversePatches_)}return o.copy_}function Km(e,t,r,o,n,a,i){if(He(n)){let c=a&&t&&t.type_!==3&&!ca(t.assigned_,o)?a.concat(o):void 0,u=Fi(e,n,c);if(Hm(r,o,u),He(u))e.canAutoFreeze_=!1;else return}else i&&r.add(n);if(_e(n)&&!Ai(n)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Fi(e,n),(!t||!t.scope_.parent_)&&typeof o!="symbol"&&Object.prototype.propertyIsEnumerable.call(r,o)&&Pi(e,n)}}function Pi(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&vi(t,r)}function _R(e,t){let r=Array.isArray(e),o={type_:r?1:0,scope_:t?t.scope_:Ym(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1},n=o,a=Qu;r&&(n=[o],a=ua);let{revoke:i,proxy:c}=Proxy.revocable(n,a);return o.draft_=c,o.revoke_=i,c}var Qu={get(e,t){if(t===je)return e;let r=Hr(e);if(!ca(r,t))return $R(e,r,t);let o=r[t];return e.finalized_||!_e(o)?o:o===Iu(e.base_,t)?(Eu(e),e.copy_[t]=Du(o,e)):o},has(e,t){return t in Hr(e)},ownKeys(e){return Reflect.ownKeys(Hr(e))},set(e,t,r){let o=Jm(Hr(e),t);if(o?.set)return o.set.call(e.draft_,r),!0;if(!e.modified_){let n=Iu(Hr(e),t),a=n?.[je];if(a&&a.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(QR(r,n)&&(r!==void 0||ca(e.base_,t)))return!0;Eu(e),Vu(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 Iu(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Eu(e),Vu(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let r=Hr(e),o=Reflect.getOwnPropertyDescriptor(r,t);return o&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:o.enumerable,value:r[t]}},defineProperty(){ve(11)},getPrototypeOf(e){return Yr(e.base_)},setPrototypeOf(){ve(12)}},ua={};ia(Qu,(e,t)=>{ua[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});ua.deleteProperty=function(e,t){return ua.set.call(this,e,t,void 0)};ua.set=function(e,t,r){return Qu.set.call(this,e[0],t,r,e[0])};function Iu(e,t){let r=e[je];return(r?Hr(r):e)[t]}function $R(e,t,r){let o=Jm(t,r);return o?"value"in o?o.value:o.get?.call(e.draft_):void 0}function Jm(e,t){if(!(t in e))return;let r=Yr(e);for(;r;){let o=Object.getOwnPropertyDescriptor(r,t);if(o)return o;r=Yr(r)}}function Vu(e){e.modified_||(e.modified_=!0,e.parent_&&Vu(e.parent_))}function Eu(e){e.copy_||(e.copy_=Tu(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var zR=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"&&ve(6),o!==void 0&&typeof o!="function"&&ve(7);let n;if(_e(t)){let a=zm(this),i=Du(t,void 0),c=!0;try{n=r(i),c=!1}finally{c?qu(a):ku(a)}return $m(a,o),Wm(n,a)}else if(!t||typeof t!="object"){if(n=r(t),n===void 0&&(n=t),n===Nu&&(n=void 0),this.autoFreeze_&&vi(n,!0),o){let a=[],i=[];Zr("Patches").generateReplacementPatches_(t,n,a,i),o(a,i)}return n}else ve(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){_e(e)||ve(8),He(e)&&(e=Zm(e));let t=zm(this),r=Du(e,void 0);return r[je].isManual_=!0,ku(t),r}finishDraft(e,t){let r=e&&e[je];(!r||!r.isManual_)&&ve(9);let{scope_:o}=r;return $m(o,t),Wm(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=Zr("Patches").applyPatches_;return He(e)?o(e,t):this.produce(e,n=>o(n,t))}};function Du(e,t){let r=la(e)?Zr("MapSet").proxyMap_(e,t):da(e)?Zr("MapSet").proxySet_(e,t):_R(e,t);return(t?t.scope_:Ym()).drafts_.push(r),r}function Zm(e){return He(e)||ve(10,e),Xm(e)}function Xm(e){if(!_e(e)||Ai(e))return e;let t=e[je],r;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=Tu(e,t.scope_.immer_.useStrictShallowCopy_)}else r=Tu(e,!0);return ia(r,(o,n)=>{Hm(r,o,Xm(n))}),t&&(t.finalized_=!1),r}function ep(){let t="replace",r="add",o="remove";function n(p,m,f,S){switch(p.type_){case 0:case 2:return i(p,m,f,S);case 1:return a(p,m,f,S);case 3:return c(p,m,f,S)}}function a(p,m,f,S){let{base_:C,assigned_:h}=p,v=p.copy_;v.length<C.length&&([C,v]=[v,C],[f,S]=[S,f]);for(let y=0;y<C.length;y++)if(h[y]&&v[y]!==C[y]){let x=m.concat([y]);f.push({op:t,path:x,value:d(v[y])}),S.push({op:t,path:x,value:d(C[y])})}for(let y=C.length;y<v.length;y++){let x=m.concat([y]);f.push({op:r,path:x,value:d(v[y])})}for(let y=v.length-1;C.length<=y;--y){let x=m.concat([y]);S.push({op:o,path:x})}}function i(p,m,f,S){let{base_:C,copy_:h}=p;ia(p.assigned_,(v,y)=>{let x=wu(C,v),E=wu(h,v),A=y?ca(C,v)?t:r:o;if(x===E&&A===t)return;let R=m.concat(v);f.push(A===o?{op:A,path:R}:{op:A,path:R,value:E}),S.push(A===r?{op:o,path:R}:A===o?{op:r,path:R,value:d(x)}:{op:t,path:R,value:d(x)})})}function c(p,m,f,S){let{base_:C,copy_:h}=p,v=0;C.forEach(y=>{if(!h.has(y)){let x=m.concat([v]);f.push({op:o,path:x,value:y}),S.unshift({op:r,path:x,value:y})}v++}),v=0,h.forEach(y=>{if(!C.has(y)){let x=m.concat([v]);f.push({op:r,path:x,value:y}),S.unshift({op:o,path:x,value:y})}v++})}function u(p,m,f,S){f.push({op:t,path:[],value:m===Nu?void 0:m}),S.push({op:t,path:[],value:p})}function s(p,m){return m.forEach(f=>{let{path:S,op:C}=f,h=p;for(let E=0;E<S.length-1;E++){let A=Jr(h),R=S[E];typeof R!="string"&&typeof R!="number"&&(R=""+R),(A===0||A===1)&&(R==="__proto__"||R==="constructor")&&ve(19),typeof h=="function"&&R==="prototype"&&ve(19),h=wu(h,R),typeof h!="object"&&ve(18,S.join("/"))}let v=Jr(h),y=l(f.value),x=S[S.length-1];switch(C){case t:switch(v){case 2:return h.set(x,y);case 3:ve(16);default:return h[x]=y}case r:switch(v){case 1:return x==="-"?h.push(y):h.splice(x,0,y);case 2:return h.set(x,y);case 3:return h.add(y);default:return h[x]=y}case o:switch(v){case 1:return h.splice(x,1);case 2:return h.delete(x);case 3:return h.delete(f.value);default:return delete h[x]}default:ve(17,C)}}),p}function l(p){if(!_e(p))return p;if(Array.isArray(p))return p.map(l);if(la(p))return new Map(Array.from(p.entries()).map(([f,S])=>[f,l(S)]));if(da(p))return new Set(Array.from(p).map(l));let m=Object.create(Yr(p));for(let f in p)m[f]=l(p[f]);return ca(p,aa)&&(m[aa]=p[aa]),m}function d(p){return He(p)?l(p):p}UR("Patches",{applyPatches_:s,generatePatches_:n,generateReplacementPatches_:u})}var Ye=new zR,Gt=Ye.produce,bi=Ye.produceWithPatches.bind(Ye),SV=Ye.setAutoFreeze.bind(Ye),CV=Ye.setUseStrictShallowCopy.bind(Ye),Lu=Ye.applyPatches.bind(Ye),xV=Ye.createDraft.bind(Ye),RV=Ye.finishDraft.bind(Ye);function WR(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function KR(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function GR(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 tp=e=>Array.isArray(e)?e:[e];function HR(e){let t=Array.isArray(e[0])?e[0]:e;return GR(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function YR(e,t){let r=[],{length:o}=e;for(let n=0;n<o;n++)r.push(e[n].apply(null,t));return r}var vV=Symbol();var AV=Object.getPrototypeOf({});var JR=class{constructor(e){this.value=e}deref(){return this.value}},ZR=typeof WeakRef<"u"?WeakRef:JR,XR=0,rp=1;function wi(){return{s:XR,v:void 0,o:null,p:null}}function Mo(e,t={}){let r=wi(),{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 S=f.get(m);S===void 0?(c=wi(),f.set(m,c)):c=S}else{let f=c.p;f===null&&(c.p=f=new Map);let S=f.get(m);S===void 0?(c=wi(),f.set(m,c)):c=S}}let s=c,l;if(c.s===rp)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 ZR(l):l}return s.s=rp,s.v=l,l}return i.clearCache=()=>{r=wi(),i.resetResultsCount()},i.resultsCount=()=>a,i.resetResultsCount=()=>{a=0},i}function op(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()),WR(s,`createSelector expects an output function after the inputs, but received: [${typeof s}]`);let l={...r,...u},{memoize:d,memoizeOptions:p=[],argsMemoize:m=Mo,argsMemoizeOptions:f=[],devModeChecks:S={}}=l,C=tp(p),h=tp(f),v=HR(n),y=d(function(){return a++,s.apply(null,arguments)},...C),x=!0,E=m(function(){i++;let R=YR(v,arguments);return c=y.apply(null,R),c},...h);return Object.assign(E,{resultFunc:s,memoizedResultFunc:y,dependencies:v,dependencyRecomputations:()=>i,resetDependencyRecomputations:()=>{i=0},lastResult:()=>c,recomputations:()=>a,resetRecomputations:()=>{a=0},memoize:d,argsMemoize:m})};return Object.assign(o,{withTypes:()=>o}),o}var Q=op(Mo),eF=Object.assign((e,t=Q)=>{KR(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:()=>eF});function np(e){return({dispatch:r,getState:o})=>n=>a=>typeof a=="function"?a(r,o,e):n(a)}var ap=np(),ip=np;var tF=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?No:No.apply(null,arguments)},DV=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}},rF=e=>e&&typeof e.match=="function";function g(e,t){function r(...o){if(t){let n=t(...o);if(!n)throw new Error(yt(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=>Ri(o)&&o.type===e,r}var dp=class ma extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,ma.prototype)}static get[Symbol.species](){return ma}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new ma(...t[0].concat(this)):new ma(...t.concat(this))}};function cp(e){return _e(e)?Gt(e,()=>{}):e}function sp(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function oF(e){return typeof e=="boolean"}var nF=()=>function(t){let{thunk:r=!0,immutableCheck:o=!0,serializableCheck:n=!0,actionCreatorCheck:a=!0}=t??{},i=new dp;return r&&(oF(r)?i.push(ap):i.push(ip(r.extraArgument))),i},pa="RTK_autoBatch",Lo=()=>e=>({payload:e,meta:{[pa]:!0}}),up=e=>t=>{setTimeout(t,e)},aF=(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:up(10):e.type==="callback"?e.queueNotification:up(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?.[pa],a=!n,a&&(i||(i=!0,u(s))),o.dispatch(l)}finally{n=!0}}})},iF=e=>function(r){let{autoBatch:o=!0}=r??{},n=new dp(e);return o&&n.push(aF(typeof o=="object"?o:void 0)),n};function mp(e){let t=nF(),{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(vt(r))c=Do(r);else throw new Error(yt(1));let u;typeof o=="function"?u=o(t):u=t();let s=No;n&&(s=tF({trace:!1,...typeof n=="object"&&n}));let l=_m(...u),d=iF(l),p=typeof i=="function"?i(d):d(),m=s(...p);return bu(c,a,m)}function pp(e){let t={},r=[],o,n={addCase(a,i){let c=typeof a=="string"?a:a.type;if(!c)throw new Error(yt(28));if(c in t)throw new Error(yt(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 cF(e){return typeof e=="function"}function j(e,t){let[r,o,n]=pp(t),a;if(cF(e))a=()=>cp(e());else{let c=cp(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(He(l)){let m=d(l,u);return m===void 0?l:m}else{if(_e(l))return Gt(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 fp=(e,t)=>rF(e)?e.match(t):e(t);function At(...e){return t=>e.some(r=>fp(r,t))}function Qo(...e){return t=>e.every(r=>fp(r,t))}function Ei(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 fa(e){return typeof e[0]=="function"&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function Ti(...e){return e.length===0?t=>Ei(t,["pending"]):fa(e)?At(...e.map(t=>t.pending)):Ti()(e[0])}function Xr(...e){return e.length===0?t=>Ei(t,["rejected"]):fa(e)?At(...e.map(t=>t.rejected)):Xr()(e[0])}function ga(...e){let t=r=>r&&r.meta&&r.meta.rejectedWithValue;return e.length===0?Qo(Xr(...e),t):fa(e)?Qo(Xr(...e),t):ga()(e[0])}function Ht(...e){return e.length===0?t=>Ei(t,["fulfilled"]):fa(e)?At(...e.map(t=>t.fulfilled)):Ht()(e[0])}function Oi(...e){return e.length===0?t=>Ei(t,["pending","fulfilled","rejected"]):fa(e)?At(...e.flatMap(t=>[t.pending,t.rejected,t.fulfilled])):Oi()(e[0])}var sF="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",qi=(e=21)=>{let t="",r=e;for(;r--;)t+=sF[Math.random()*64|0];return t},uF=["name","message","stack","code"],Uu=class{constructor(e,t){Be(this,"_type");this.payload=e,this.meta=t}},lp=class{constructor(e,t){Be(this,"_type");this.payload=e,this.meta=t}},lF=e=>{if(typeof e=="object"&&e!==null){let t={};for(let r of uF)typeof e[r]=="string"&&(t[r]=e[r]);return t}return{message:String(e)}},_=(()=>{function e(t,r,o){let n=g(t+"/fulfilled",(u,s,l,d)=>({payload:u,meta:{...d||{},arg:l,requestId:s,requestStatus:"fulfilled"}})),a=g(t+"/pending",(u,s,l)=>({payload:void 0,meta:{...l||{},arg:s,requestId:u,requestStatus:"pending"}})),i=g(t+"/rejected",(u,s,l,d,p)=>({payload:d,error:(o&&o.serializeError||lF)(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):qi(),m=new AbortController,f,S;function C(v){S=v,m.abort()}let h=async function(){let v;try{let x=o?.condition?.(u,{getState:l,extra:d});if(mF(x)&&(x=await x),x===!1||m.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let E=new Promise((A,R)=>{f=()=>{R({name:"AbortError",message:S||"Aborted"})},m.signal.addEventListener("abort",f)});s(a(p,u,o?.getPendingMeta?.({requestId:p,arg:u},{getState:l,extra:d}))),v=await Promise.race([E,Promise.resolve(r(u,{dispatch:s,getState:l,extra:d,requestId:p,signal:m.signal,abort:C,rejectWithValue:(A,R)=>new Uu(A,R),fulfillWithValue:(A,R)=>new lp(A,R)})).then(A=>{if(A instanceof Uu)throw A;return A instanceof lp?n(A.payload,p,u,A.meta):n(A,p,u)})])}catch(x){v=x instanceof Uu?i(null,p,u,x.payload,x.meta):i(x,p,u)}finally{f&&m.signal.removeEventListener("abort",f)}return o&&!o.dispatchConditionRejection&&i.match(v)&&v.meta.condition||s(v),v}();return Object.assign(h,{abort:C,requestId:p,arg:u,unwrap(){return h.then(dF)}})}}return Object.assign(c,{pending:a,rejected:i,fulfilled:n,settled:At(i,n),typePrefix:t})}return e.withTypes=()=>e,e})();function dF(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function mF(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var gp=Symbol.for("rtk-slice-createasyncthunk"),UV={[gp]:_};function pF(e,t){return`${e}/${t}`}function fF({creators:e}={}){let t=e?.asyncThunk?.[gp];return function(o){let{name:n,reducerPath:a=n}=o;if(!n)throw new Error(yt(11));typeof process<"u";let i=(typeof o.reducers=="function"?o.reducers(yF()):o.reducers)||{},c=Object.keys(i),u={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},s={addCase(v,y){let x=typeof v=="string"?v:v.type;if(!x)throw new Error(yt(12));if(x in u.sliceCaseReducersByType)throw new Error(yt(13));return u.sliceCaseReducersByType[x]=y,s},addMatcher(v,y){return u.sliceMatchers.push({matcher:v,reducer:y}),s},exposeAction(v,y){return u.actionCreators[v]=y,s},exposeCaseReducer(v,y){return u.sliceCaseReducersByName[v]=y,s}};c.forEach(v=>{let y=i[v],x={reducerName:v,type:pF(n,v),createNotation:typeof o.reducers=="function"};SF(y)?xF(x,y,s,t):hF(x,y,s)});function l(){let[v={},y=[],x=void 0]=typeof o.extraReducers=="function"?pp(o.extraReducers):[o.extraReducers],E={...v,...u.sliceCaseReducersByType};return j(o.initialState,A=>{for(let R in E)A.addCase(R,E[R]);for(let R of u.sliceMatchers)A.addMatcher(R.matcher,R.reducer);for(let R of y)A.addMatcher(R.matcher,R.reducer);x&&A.addDefaultCase(x)})}let d=v=>v,p=new Map,m;function f(v,y){return m||(m=l()),m(v,y)}function S(){return m||(m=l()),m.getInitialState()}function C(v,y=!1){function x(A){let R=A[v];return typeof R>"u"&&y&&(R=S()),R}function E(A=d){let R=sp(p,y,()=>new WeakMap);return sp(R,A,()=>{let P={};for(let[b,T]of Object.entries(o.selectors??{}))P[b]=gF(T,A,S,y);return P})}return{reducerPath:v,getSelectors:E,get selectors(){return E(x)},selectSlice:x}}let h={name:n,reducer:f,actions:u.actionCreators,caseReducers:u.sliceCaseReducersByName,getInitialState:S,...C(a),injectInto(v,{reducerPath:y,...x}={}){let E=y??a;return v.inject({reducerPath:E,reducer:f},x),{...h,...C(E,!0)}}};return h}}function gF(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 eo=fF();function yF(){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 hF({type:e,reducerName:t,createNotation:r},o,n){let a,i;if("reducer"in o){if(r&&!CF(o))throw new Error(yt(17));a=o.reducer,i=o.prepare}else a=o;n.addCase(e,a).exposeCaseReducer(t,a).exposeAction(t,i?g(e,i):g(e))}function SF(e){return e._reducerDefinitionType==="asyncThunk"}function CF(e){return e._reducerDefinitionType==="reducerWithPrepare"}function xF({type:e,reducerName:t},r,o,n){if(!n)throw new Error(yt(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||Ii,pending:c||Ii,rejected:u||Ii,settled:s||Ii})}function Ii(){}var yp="listener",hp="completed",Sp="cancelled",BV=`task-${Sp}`,jV=`task-${hp}`,_V=`${yp}-${Sp}`,$V=`${yp}-${hp}`;var{assign:Cp}=Object;var Bu="listenerMiddleware";var RF=Cp(g(`${Bu}/add`),{withTypes:()=>RF}),zV=g(`${Bu}/removeAll`),FF=Cp(g(`${Bu}/remove`),{withTypes:()=>FF});var WV=Symbol.for("rtk-state-proxy-original");function yt(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 ur=Q(e=>e.commercePagination?.principal.perPage||0,e=>e),ki=Q((e,t)=>e.commercePagination?.recommendations[t]?.perPage||0,e=>e),lr=Q(e=>e.commercePagination?.principal.totalEntries||0,e=>e),Vi=Q((e,t)=>e.commercePagination?.recommendations[t]?.totalEntries||0,e=>e),Di=Q(e=>e.commercePagination?.principal.page||0,e=>e),xp=Q((e,t)=>e.commercePagination?.recommendations[t]?.page||0,e=>e);var nD=Q(e=>e[B].productListing.responseId,e=>e),ya=Q(e=>e.productListing.responseId,e=>e),Rp=Q(e=>e.productListing.requestId,e=>e),ha=Q(e=>e.productListing?.products.length||0,e=>e),Fp=Q(e=>({total:lr(e),current:ha(e)}),({current:e,total:t})=>e<t),Pp=Q(e=>e.productListing?.isLoading,e=>PF(e)?!1:e),vp=Q(e=>e.productListing?.error,e=>e??null);import{isNullOrUndefined as Dp}from"@coveo/bueno";function ju(e,t,r){if(e===void 0)return{};let o=t(e);return o!==r?{q:o}:{}}function _u(e,t,r){if(e===void 0)return{};let o=t(e);return o!==r?{sortCriteria:o}:{}}function bt(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 wt(e){let{activeValue:t,ancestryMap:r}=AF(e);return t?bF(t,r):[]}function AF(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 bF(e,t){let r=[];if(!e)return[];let o=e;do r.unshift(o),o=t.get(o);while(o);return r}function Ap(){return{principal:dr(),recommendations:{}}}function dr(){return{page:0,perPage:0,totalEntries:0,totalPages:0}}import{ArrayValue as EF,EnumValue as Ip,StringValue as Ep,RecordValue as Tp}from"@coveo/bueno";import{ArrayValue as wF,EnumValue as bp,RecordValue as wp,StringValue as IF}from"@coveo/bueno";var ht=(r=>(r.Relevance="relevance",r.Fields="fields",r))(ht||{}),to=(r=>(r.Ascending="asc",r.Descending="desc",r))(to||{}),It=()=>({by:"relevance"});var uD=new wp({options:{required:!1},values:{by:new bp({enum:ht,required:!0}),fields:new wF({each:new wp({values:{name:new IF,direction:new bp({enum:to})}})})}});var Ni=e=>({by:"fields",fields:e}),Op=new Tp({options:{required:!1},values:{by:new Ip({enum:ht,required:!0}),fields:new EF({each:new Tp({values:{field:new Ep({required:!0}),direction:new Ip({enum:to}),displayName:new Ep}})})}});function ro(){return{appliedSort:It(),availableSorts:[It()]}}function Mi(e){return{...TF(e?.commercePagination,t=>t.principal.page,dr().page),...OF(e?.commercePagination,t=>t.principal.perPage,dr().perPage),..._u(e?.commerceSort,t=>t.appliedSort,ro().appliedSort),...bt(e.commerceFacetSet,mr(e,"regular"),qF,"f"),...bt(e.commerceFacetSet,mr(e,"regular"),kF,"fExcluded"),...bt(e.commerceFacetSet,mr(e,"location"),VF,"lf"),...bt(e.commerceFacetSet,mr(e,"hierarchical"),DF,"cf"),...bt(e.commerceFacetSet,mr(e,"dateRange"),qp,"df"),...bt(e.commerceFacetSet,mr(e,"dateRange"),kp,"dfExcluded"),...bt(e.commerceFacetSet,mr(e,"numericalRange"),qp,"nf"),...bt(e.commerceFacetSet,mr(e,"numericalRange"),kp,"nfExcluded"),...Vp("selected",e.manualNumericFacetSet),...Vp("excluded",e.manualNumericFacetSet)}}function TF(e,t,r){if(e===void 0)return{};let o=t(e);return o!==r?{page:o}:{}}function OF(e,t,r){if(e===void 0)return{};let o=t(e);return o!==r?{perPage:o}:{}}function qF(e){return e.values.filter(t=>t.state==="selected").map(t=>t.value)}function kF(e){return e.values.filter(t=>t.state==="excluded").map(t=>t.value)}function VF(e){return e.values.filter(t=>t.state==="selected").map(t=>t.value)}function qp(e){return e.values.filter(t=>t.state==="selected")}function kp(e){return e.values.filter(t=>t.state==="excluded")}function Vp(e,t){if(!t||e==="idle")return{};let r=Object.entries(t).map(([o,n])=>{if(!(n.manualRange===void 0||n.manualRange.state!==e))return{[o]:[n.manualRange]}}).filter(o=>o!==void 0).reduce((o,n)=>({...o,...n}),{});return e==="selected"?{mnf:r}:{mnfExcluded:r}}function DF(e){return wt(e.values).map(r=>r.value)}function mr(e,t){return r=>e.commerceFacetSet[r].request.type===t}var Qi=()=>({query:""});var VD=Q(e=>e[B].commerceSearch.responseId,e=>e),Sa=Q(e=>e.commerceSearch.responseId,e=>e),Np=Q(e=>e.commerceSearch.requestId,e=>e),Ca=Q(e=>e.commerceSearch?.products.length||0,e=>e),Mp=Q(e=>({total:lr(e),current:Ca(e)}),({current:e,total:t})=>e<t),Qp=Q(e=>e.commerceSearch?.isLoading,e=>Dp(e)?!1:e),Lp=Q(e=>e.commerceSearch?.error,e=>e??null),Li=Q(e=>e.commerceQuery?.query,e=>e??""),NF=Q(e=>e.commerceSearch?.queryExecuted,e=>e),Up=(e,t)=>Dp(t.queryCorrection?.correctedQuery)?Li(e):t.queryCorrection.correctedQuery,Bp=e=>({...ju(e?.commerceQuery,t=>t.query,Qi().query),...Mi(e)});function jp(e){return{query:NF(e)||""}}var $u;(t=>t.responseIdSelector=_p(Sa))($u||($u={}));var zu;(t=>t.responseIdSelector=_p(ya))(zu||(zu={}));function _p(e){return t=>e(t[B])}var Kp={};Lm(Kp,{escape:()=>Uo,getHighlightedSuggestion:()=>Ku,highlightString:()=>LF});import{isNullOrUndefined as QF}from"@coveo/bueno";var oo=(e,t=5)=>e+Math.random().toString(36).substring(2,2+t);function zp(e){return Array.isArray(e)}function Ui(e){return e.trim()===""}function Wp(e){let t={};for(let[r,o]of e)t[r]=o;return t}function xa(e){if(typeof e!="object"||!e)return e;try{return JSON.parse(JSON.stringify(e))}catch{return e}}function LF(e){if(Ui(e.openingDelimiter)||Ui(e.closingDelimiter))throw Error("delimiters should be a non-empty string");if(QF(e.content)||Ui(e.content))return e.content;if(e.highlights.length===0)return Uo(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+=Uo(e.content.slice(o,i)),r+=e.openingDelimiter,r+=Uo(e.content.slice(i,c)),r+=e.closingDelimiter,o=c}return o!==t&&(r+=Uo(e.content.slice(o))),r}function Ku(e,t){return e=Uo(e),e.replace(/\[(.*?)\]|\{(.*?)\}|\((.*?)\)/g,(r,o,n,a)=>o?Wu(o,t.notMatchDelimiters):n?Wu(n,t.exactMatchDelimiters):a?Wu(a,t.correctionDelimiters):r)}function Wu(e,t){return t?t.open+e+t.close:e}function Uo(e){let t={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},r="(?:"+Object.keys(t).join("|")+")",o=RegExp(r),n=RegExp(r,"g");return o.test(e)?e.replace(n,a=>t[a]):e}var af=Pt(tf(),1);var dP="recommendation-internal-options",GD=Symbol.for(dP);var $=new Error("Failed to load reducers."),Bo=class extends Error{constructor(){super(),this.name="ExpiredToken",this.message="The token being used to perform the request is expired."}};var ao=class extends Error{constructor(r,o){super();Be(this,"statusCode");this.name="Disconnected",this.message=`Client could not connect to the following URL: ${r}`,this.statusCode=o??0}};function rf(e){let t=[];for(let r in e){let o=encodeURIComponent(r),n=encodeURIComponent(e[r]);t.push(`${o}=${n}`)}return t.join("&")}function of(e){return typeof e!="object"||!e?!1:Object.values(e).every(mP)}function mP(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"}function nf(e){return e===429}var jo=class e{static async call(t){let r=pP(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(nf(u.status))throw u;return u};try{let u=await(0,af.backOff)(c,{retry:s=>{let l=s&&nf(s.status);return l&&o.info("Platform retrying request"),l}});switch(u.status){case 419:case 401:throw o.info("Platform renewing token"),new Bo;case 404:throw new ao(a,u.status);default:return o.info({response:u,requestInfo:n},"Platform response"),u}}catch(u){return u.message==="Failed to fetch"?new ao(a):u}}static async preprocessRequest(t,r){let{origin:o,preprocessRequest:n,logger:a,requestMetadata:i}=r,{signal:c,...u}=t,s=xa(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 Ee(e,t="prod",r="platform"){let o=t==="prod"?"":t,n=r==="platform"?"":`.${r}`;return`https://${e}${n}.org${o}.coveo.com`}function tt(e,t="prod"){return`${Ee(e,t)}/rest/search/v2`}function rl(e,t="prod"){return`${Ee(e,t,"analytics")}/rest/organizations/${e}/events/v1`}function pP(e){let{url:t,method:r,requestParams:o,contentType:n,accessToken:a,signal:i}=e,c=e.method==="POST"||e.method==="PUT",u=fP(o,n);return{url:t,method:r,headers:{"Content-Type":n,Authorization:`Bearer ${a}`,...e.headers},...c&&{body:u},signal:i}}function fP(e,t){return t==="application/x-www-form-urlencoded"?of(e)?rf(e):"":JSON.stringify(e)}function gP(e){return{statusCode:e.statusCode,type:e.name,message:e.message}}function yP(e){return{statusCode:e.code,type:e.name,message:e.message,ignored:!0}}function ol(e,t){if(t&&e.name==="AbortError")return{error:yP(e)};if(e instanceof ao)return{error:gP(e)};throw e}var _o=(e,t)=>({...Pa(e,t),requestParams:hP(e)}),hP=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 cf=(e,t)=>({...Pa(e,t),requestParams:SP(e)}),SP=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 sf=e=>({...Pa(e,"search/querySuggest"),requestParams:CP(e)}),CP=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 Te=e=>e.error!==void 0,ji=class{constructor(t){this.options=t}async getProductListing(t){return this.query({..._o(t,"listing"),...this.options})}async search(t){let r=_o(t,"search");return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async getRecommendations(t){return this.query({...cf(t,"recommendations"),...this.options})}async productSuggestions(t){let r=_o(t,"search/productSuggest");return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async querySuggest(t){let r=sf(t);return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async facetSearch(t,r){let o=_o(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=_o(t,"search");return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async query(t){let r=await jo.call(t);if(r instanceof Error)return ol(r);let o=await r.json();return r.ok?{success:o}:{error:o}}};function nl(e,t="prod"){return`${Ee(e,t)}/rest/organizations/${e}/commerce/v2`}var _i=e=>e;import{StringValue as Rf}from"@coveo/bueno";import{Schema as xP,SchemaValidationError as RP,StringValue as io,RecordValue as FP,ArrayValue as PP}from"@coveo/bueno";var k=new io({required:!0,emptyAllowed:!1}),ne=new io({required:!1,emptyAllowed:!1}),me=new io({required:!0,emptyAllowed:!0}),uf=new io({required:!1,emptyAllowed:!0}),lf=new PP({each:k,required:!0}),df=new io({required:!1,emptyAllowed:!1,regex:/^\d+\.\d+\.\d+$/}),mf=new io({required:!1,emptyAllowed:!1,regex:/^[a-zA-Z0-9_\-.]{1,100}$/}),pf=new io({required:!0,emptyAllowed:!1,regex:/^[a-zA-Z0-9_\-.]{1,100}$/}),Qe=({message:e,name:t,stack:r})=>({message:e,name:t,stack:r}),ye=(e,t)=>{if("required"in t)return{payload:new xP({value:t}).validate({value:e}).value};let n=new FP({options:{required:!0},values:t}).validate(e);if(n)throw new RP(n);return{payload:e}},F=(e,t)=>{try{return ye(e,t)}catch(r){return{payload:e,error:Qe(r)}}},$e=(e,t,r,o)=>{let n=`Check the initialState of ${o}`;return ff(e,t,r,n,"Controller initialization error")},Le=(e,t,r,o)=>{let n=`Check the options of ${o}`;return ff(e,t,r,n,"Controller initialization error")},ff=(e,t,r,o,n)=>{try{return t.validate(r,o)}catch(a){throw e.logger.error(a,n),a}};import{ArrayValue as vP,BooleanValue as yf,RecordValue as AP,StringValue as va,Value as bP}from"@coveo/bueno";var $o="3.25.0-pre.befd28e8fb",gf=["@coveo/atomic","@coveo/quantic"];var al=()=>ne,hf=()=>k,co=g("configuration/updateBasicConfiguration",e=>F(e,{accessToken:ne,environment:new va({required:!1,constrainTo:["prod","hipaa","stg","dev"]}),organizationId:ne})),Sf=g("configuration/updateSearchConfiguration",e=>F(e,{proxyBaseUrl:new va({required:!1,url:!0}),pipeline:new va({required:!1,emptyAllowed:!0}),searchHub:ne,timezone:ne,locale:ne,authenticationProviders:new vP({required:!1,each:k})})),Aa={enabled:new yf({default:!0}),originContext:al(),originLevel2:al(),originLevel3:al(),proxyBaseUrl:new va({required:!1,url:!0}),runtimeEnvironment:new bP,anonymous:new yf({default:!1}),deviceId:ne,userDisplayName:ne,documentLocation:ne,trackingId:mf,analyticsMode:new va({constrainTo:["legacy","next"],required:!1,default:"next"}),source:new AP({options:{required:!1},values:gf.reduce((e,t)=>(e[t]=df,e),{})})},il=g("configuration/updateAnalyticsConfiguration",e=>F(e,Aa)),$i=g("configuration/analytics/disable"),zi=g("configuration/analytics/enable"),Cf=g("configuration/analytics/originlevel2",e=>F(e,{originLevel2:hf()})),xf=g("configuration/analytics/originlevel3",e=>F(e,{originLevel3:hf()}));var zo=g("commerce/configuration/updateBasicConfiguration",e=>F(e,{accessToken:ne,environment:new Rf({required:!1,constrainTo:["prod","hipaa","stg","dev"]}),organizationId:ne})),Wo=g("commerce/configuration/updateProxyBaseUrl",e=>F(e,{proxyBaseUrl:new Rf({required:!1,url:!0})})),Ko=g("commerce/configuration/updateAnalyticsConfiguration",e=>F(e,{enabled:Aa.enabled,proxyBaseUrl:Aa.proxyBaseUrl,source:Aa.source,trackingId:pf})),Wi=g("commerce/configuration/analytics/disable"),Ki=g("commerce/configuration/analytics/enable");import{isNullOrUndefined as so}from"@coveo/bueno";var Ff=()=>({accessToken:"",environment:"prod",organizationId:"",analytics:{enabled:!0,trackingId:"",source:{}},commerce:{}});var cl=j(Ff(),e=>e.addCase(zo,(t,r)=>{Pf(t,r.payload)}).addCase(co,(t,r)=>{Pf(t,r.payload)}).addCase(Wo,(t,r)=>{wP(t,r.payload)}).addCase(Ko,(t,r)=>{IP(t,r.payload)}).addCase(Wi,t=>{t.analytics.enabled=!1}).addCase(Ki,t=>{t.analytics.enabled=!0}));function Pf(e,t){so(t.accessToken)||(e.accessToken=t.accessToken),e.environment=t.environment??"prod",so(t.organizationId)||(e.organizationId=t.organizationId)}function wP(e,t){so(t.proxyBaseUrl)||(e.commerce.apiBaseUrl=t.proxyBaseUrl)}function IP(e,t){so(t.enabled)||(e.analytics.enabled=t.enabled),so(t.proxyBaseUrl)||(e.analytics.apiBaseUrl=t.proxyBaseUrl),so(t.source)||(e.analytics.source=t.source),so(t.trackingId)||(e.analytics.trackingId=t.trackingId)}function Go(e){return e.currency}var vf=(e,t)=>({currency:Go(t.commerceContext),products:EP(t.cart),transaction:e}),Af=(e,t)=>({currency:Go(t.commerceContext),...e}),uo=Q(e=>e.cart,e=>e.cartItems,(e,t)=>t.map(r=>e[r])),EP=Q(uo,e=>e.map(({quantity:t,...r})=>({quantity:t,product:r})));import{ArrayValue as TP,NumberValue as bf,RecordValue as OP,Schema as qP,StringValue as kP}from"@coveo/bueno";var sl={productId:k,quantity:new bf({required:!0,min:0}),name:new kP({required:!1}),price:new bf({required:!1,min:0})},ul=new TP({each:new OP({values:{...sl}})}),ll={items:ul},wf=new qP(ll);var pr=g("commerce/cart/setItems",e=>F(e,ul)),Ho=g("commerce/cart/updateItemQuantity",e=>F(e,sl)),Yo=g("commerce/cart/purchase"),Gi=_("commerce/cart/emit/purchaseEvent",async(e,{extra:t,getState:r})=>{let o=vf(e,r()),{relay:n}=t;n.emit("ec.purchase",o)}),Hi=_("commerce/cart/emit/cartActionEvent",async(e,{extra:t,getState:r})=>{let o=Af(e,r()),{relay:n}=t;n.emit("ec.cartAction",o)});function W(e){let t,r=new Map,o=()=>r.size===0,n=a=>{try{let i=JSON.stringify(a),c=t!==i;return t=i,c}catch(i){return console.warn('Could not detect if state has changed, check the controller "get state method"',i),!0}};return{subscribe(a){a();let i=Symbol(),c;return o()&&(t=JSON.stringify(this.state),c=e.subscribe(()=>{n(this.state)&&r.forEach(u=>u())})),r.set(i,a),()=>{r.delete(i),o()&&c&&c()}},get state(){return{}}}}function If(e,t){return e.cart[lo(t)]}var Ef=Q(uo,e=>e.reduce((t,r)=>t+r.quantity,0)),Tf=Q(uo,e=>e.reduce((t,r)=>t+r.price*r.quantity,0));function VP(e,t={}){if(!DP(e))throw $;let{dispatch:r}=e,o=W(e),n=()=>e[B].cart,a={...t.initialState};$e(e,wf,a,"buildCart"),a.items!==void 0&&r(pr(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),S=d?Math.abs(p-d.quantity):p;return{action:f,quantity:S,product:m}}return{...o,empty:function(){for(let l of uo(n()))this.updateItemQuantity({...l,quantity:0})},purchase(l){r(Gi(l)),r(Yo())},updateItemQuantity(l){let d=If(n(),l);!d&&l.quantity<=0||u(l,d)||(i(l,d)&&r(Hi(s(l,d))),r(Ho(l)))},get state(){let l=n();return{items:uo(l),totalQuantity:Ef(l),totalPrice:Tf(l)}}}}function lo(e){return`${e.productId},${e.name},${e.price}`}function DP(e){return e.addReducers({cart:Jo}),!0}var Yi=()=>({cartItems:[],cart:{},purchasedItems:[],purchased:{}}),Of=e=>kf(e.cartItems,e.cart),qf=e=>kf(e.purchasedItems,e.purchased);function kf(e,t){let r=e.reduce((o,n)=>{let{productId:a,quantity:i}=t[n];return a in o||(o[a]={productId:a,quantity:0}),o[a].quantity+=i,o},{});return[...Object.values(r)]}var Jo=j(Yi(),e=>{e.addCase(pr,(t,{payload:r})=>{let{cart:o,cartItems:n}=r.reduce((a,i)=>{let c=lo(i);return{cartItems:[...a.cartItems,c],cart:{...a.cart,[c]:i},purchasedItems:[],purchased:{}}},Yi());Vf(t,n,o)}).addCase(Ho,(t,{payload:r})=>{let o=lo(r);if(!(o in t.cart)){NP(r,t);return}if(r.quantity<=0){MP(r,t);return}t.cart[o]=r}).addCase(Yo,t=>{QP(t);let{cart:r,cartItems:o}=Yi();Vf(t,o,r)})});function Vf(e,t,r){e.cartItems=t,e.cart=r}function NP(e,t){if(e.quantity<=0)return;let r=lo(e);t.cartItems=[...t.cartItems,r],t.cart[r]=e}function MP(e,t){let r=lo(e);t.cartItems=t.cartItems.filter(o=>o!==r),delete t.cart[r]}function QP(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 Df,RecordValue as Nf,Schema as LP,StringValue as UP}from"@coveo/bueno";var BP=Intl.supportedValuesOf("currency"),jP=new UP({required:!0,emptyAllowed:!1,constrainTo:BP}),dl={url:k},ml={latitude:new Df({min:-90,max:90,required:!0}),longitude:new Df({min:-180,max:180,required:!0})},ba={language:k,country:k,currency:jP,view:new Nf({options:{required:!0},values:dl}),location:new Nf({options:{required:!1},values:ml})},Mf=new LP(ba);var se=g("commerce/context/set",e=>F(e,ba)),le=g("commerce/context/setView",e=>F(e,dl)),Zo=g("commerce/context/setLocation",e=>F(e,ml));var Qf=()=>({language:"",country:"",currency:"",view:{url:""}});var Et=j(Qf(),e=>{e.addCase(se,(t,{payload:r})=>r).addCase(le,(t,{payload:r})=>{t.view=r}).addCase(Zo,(t,{payload:r})=>{t.location=r})});var Ji=()=>({correctedQuery:"",corrections:[],originalQuery:""});import{BooleanValue as ZP,RecordValue as XP,StringValue as Bf}from"@coveo/bueno";var rt=g("breadcrumb/deselectAll"),fr=g("breadcrumb/deselectAllNonBreadcrumbs");var gr=Q(e=>e.source,e=>Object.entries(e).map(([t,r])=>`${t}@${r}`).concat(`@coveo/headless@${$o}`));var yr=(e,t)=>{let{view:r,location:o,...n}=e.commerceContext;return{accessToken:e.configuration.accessToken,url:e.configuration.commerce.apiBaseUrl??nl(e.configuration.organizationId,e.configuration.environment),organizationId:e.configuration.organizationId,trackingId:e.configuration.analytics.trackingId,...n,...e.configuration.analytics.enabled?{clientId:t.clientId}:{},context:{user:{...o,...t.userAgent?{userAgent:t.userAgent}:{}},view:{...r,...t.referrer?{referrer:t.referrer}:{}},capture:t.capture??e.configuration.analytics.enabled,cart:Of(e.cart),source:gr(e.configuration.analytics)}}};var Zi=(e,t,r)=>({...yr(e,t),..._P(e,r)}),_P=(e,t)=>{let r=t?e.commercePagination?.recommendations[t]:e.commercePagination?.principal;return r&&{page:r.page,...r.perPage&&{perPage:r.perPage}}};var ot=(e,t)=>({...Zi(e,t),facets:[...$P(e)],...e.commerceSort&&{sort:zP(e.commerceSort.appliedSort)}});function $P(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 zP(e){return e.by==="relevance"?{sortCriteria:"relevance"}:{sortCriteria:"fields",fields:e.fields.map(({name:t,direction:r})=>({field:t,direction:r}))}}import{BooleanValue as pl,NumberValue as WP}from"@coveo/bueno";var mo=g("commerce/facets/core/updateNumberOfValues",e=>F(e,{facetId:k,numberOfValues:new WP({required:!0,min:1})})),po=g("commerce/facets/core/updateIsFieldExpanded",e=>F(e,{facetId:k,isFieldExpanded:new pl({required:!0})})),pe=g("commerce/facets/core/clearAll"),Oe=g("commerce/facets/core/deselectAllValues",e=>F(e,{facetId:k})),fo=g("commerce/facets/core/updateFreezeCurrentValues",e=>F(e,{facetId:k,freezeCurrentValues:new pl({required:!0})})),Xo=g("commerce/facets/core/updateAutoSelectionForAll",e=>F(e,{allow:new pl({required:!0})}));import{NumberValue as Lf}from"@coveo/bueno";var Xi={slotId:uf},KP={...Xi,pageSize:new Lf({required:!0,min:0})},Jt=g("commerce/pagination/setPageSize",e=>F(e,KP)),GP={...Xi,page:new Lf({required:!0,min:0})},Tt=g("commerce/pagination/selectPage",e=>F(e,GP)),hr=g("commerce/pagination/nextPage",e=>F(e,Xi)),Sr=g("commerce/pagination/previousPage",e=>F(e,Xi)),en=g("commerce/pagination/registerRecommendationsSlot",e=>F(e,{slotId:k}));import{StringValue as HP}from"@coveo/bueno";var fe=g("commerce/query/update",e=>F(e,{query:new HP}));import{isNullOrUndefined as Uf}from"@coveo/bueno";import{RecordValue as YP,StringValue as JP}from"@coveo/bueno";var Cr=g("commerce/triggers/query/updateIgnore",e=>F(e,{q:new JP({emptyAllowed:!0,required:!0})})),tn=g("commerce/triggers/query/applyModification",e=>F(e,new YP({values:{originalQuery:ne,modification:ne}})));var wa=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 Te(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(!(!Uf(n)&&!Uf(n.correctedQuery)))return null;let{correctedQuery:i,originalQuery:c}=o.queryCorrection;return this.onUpdateQueryForCorrection(i??""),{...t,response:{...o},queryExecuted:Up(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(Cr({q:""})),null;let a=this.getCurrentQuery(),i=await this.automaticallyRetryQueryWithTriggerModification(o);return Te(i.response)?this.rejectWithValue(i.response.error):{...i,response:{...i.response.success},originalQuery:a}}async automaticallyRetryQueryWithTriggerModification(t){return this.dispatch(tn({newQuery:t,originalQuery:this.getCurrentQuery()})),this.onUpdateQueryForCorrection(t),await this.fetchFromAPI({...ot(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 Te(t.response)?null:t.response.success}get extra(){return this.config.extra}onUpdateQueryForCorrection(t){this.dispatch(fe({query:t}))}};var H=_("commerce/search/executeSearch",async(e,t)=>{let{getState:r}=t,o=r(),{navigatorContext:n}=t.extra,a=ot(o,n),i=Li(o),c=new wa(t),u=await c.fetchFromAPI({...a,query:i});return c.process(u)}),xr=_("commerce/search/fetchMoreProducts",async(e,t)=>{let{getState:r}=t,o=r(),{navigatorContext:n}=t.extra;if(!Mp(o))return null;let i=ur(o),u=Ca(o)/i,s=Li(o),l=ot(o,n),d=new wa(t),p=await d.fetchFromAPI({...l,query:s,page:u});return d.process(p)}),rn=_("commerce/search/prepareForSearchWithQuery",(e,t)=>{let{dispatch:r}=t;F(e,{query:new Bf,clearFilters:new ZP}),e.clearFilters&&(r(pe()),r(fr())),r(Xo({allow:!0})),r(fe({query:e.query})),r(Tt({page:0}))}),on=_("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({...yr(n,i),query:c});return Te(u)?r(u.error):{response:{...u.success,products:u.success.products}}}),ev={child:new XP({options:{required:!0},values:{permanentid:new Bf({required:!0})}})},nn=g("commerce/search/promoteChildToParent",e=>F(e,ev));function jf(){return{wasCorrectedTo:"",queryCorrection:Ji(),originalQuery:""}}var ec=j(jf(),e=>{e.addCase(H.pending,t=>{t.queryCorrection=Ji(),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 zf,BooleanValue as _f,ArrayValue as rc,StringValue as tc,NumberValue as $f,RecordValue as cv}from"@coveo/bueno";var Y=k;import{Value as tv,NumberValue as rv,StringValue as ov,ArrayValue as nv,BooleanValue as av}from"@coveo/bueno";var iv={state:new tv({required:!0}),numberOfResults:new rv({required:!0,min:0}),value:new ov({required:!0,emptyAllowed:!0}),path:new nv({required:!0,each:k}),moreValuesAvailable:new av({required:!1})};function Ia(e){e.children.forEach(t=>{Ia(t)}),ye({state:e.state,numberOfResults:e.numberOfResults,value:e.value,path:e.path,moreValuesAvailable:e.moreValuesAvailable},iv)}var an={facetId:Y,field:k,tabs:new cv({options:{required:!1},values:{included:new rc({each:new tc}),excluded:new rc({each:new tc})}}),activeTab:new tc({required:!1}),delimitingCharacter:new tc({required:!1,emptyAllowed:!0}),filterFacetCount:new _f({required:!1}),injectionDepth:new $f({required:!1,min:0}),numberOfValues:new $f({required:!1,min:1}),sortCriteria:new zf({required:!1}),basePath:new rc({required:!1,each:k}),filterByBasePath:new _f({required:!1})},cn=5,Wf=g("categoryFacet/register",e=>F(e,an)),Kf=g("categoryFacet/toggleSelectValue",e=>{try{return ye(e.facetId,k),Ia(e.selection),{payload:e,error:null}}catch(t){return{payload:e,error:Qe(t)}}}),Gf=g("categoryFacet/deselectAll",e=>F(e,an.facetId)),PQ=g("categoryFacet/updateNumberOfValues",e=>F(e,{facetId:an.facetId,numberOfValues:an.numberOfValues})),vQ=g("categoryFacet/updateSortCriterion",e=>F(e,{facetId:an.facetId,criterion:new zf})),AQ=g("categoryFacet/updateBasePath",e=>F(e,{facetId:an.facetId,basePath:new rc({each:k})}));import{NumberValue as dv,RecordValue as mv,ArrayValue as pv}from"@coveo/bueno";import{RecordValue as sv,NumberValue as uv,StringValue as lv}from"@coveo/bueno";var Ea={facetId:Y,captions:new sv({options:{required:!1}}),numberOfValues:new uv({required:!1,min:1}),query:new lv({required:!1,emptyAllowed:!0})};var fv={path:new pv({required:!0,each:k}),displayValue:me,rawValue:me,count:new dv({required:!0,min:0})},nt=g("categoryFacet/selectSearchResult",e=>F(e,{facetId:Y,value:new mv({values:fv})})),oc=g("categoryFacetSearch/register",e=>F(e,Ea));import{RecordValue as gv,NumberValue as yv}from"@coveo/bueno";var Hf={facetId:Y,value:new gv({values:{displayValue:me,rawValue:me,count:new yv({required:!0,min:0})}})},nc=g("facetSearch/register",e=>F(e,Ea)),Rr=g("facetSearch/update",e=>F(e,Ea)),Je=g("facetSearch/toggleSelectValue",e=>F(e,Hf)),St=g("facetSearch/toggleExcludeValue",e=>F(e,Hf));import{BooleanValue as hv}from"@coveo/bueno";var Zt=g("facetOptions/update",(e={freezeFacetOrder:!0})=>F(e,{freezeFacetOrder:new hv({required:!1})})),fl=g("facetOptions/facet/enable",e=>F(e,Y)),Xt=g("facetOptions/facet/disable",e=>F(e,Y));var Sv=g("history/undo"),Cv=g("history/redo"),Ot=g("history/snapshot"),GQ=_("history/back",async(e,{dispatch:t})=>{t(Sv()),await t(Ce())}),HQ=_("history/forward",async(e,{dispatch:t})=>{t(Cv()),await t(Ce())}),Ce=_("history/change",async(e,{getState:t})=>t().history.present);import{BooleanValue as Yf,StringValue as Ta,NumberValue as Jf,RecordValue as Fr}from"@coveo/bueno";var ac={q:new Ta,enableQuerySyntax:new Yf,aq:new Ta,cq:new Ta,firstResult:new Jf({min:0}),numberOfResults:new Jf({min:0}),sortCriteria:new Ta,f:new Fr,fExcluded:new Fr,cf:new Fr,nf:new Fr,mnf:new Fr,df:new Fr,debug:new Yf,sf:new Fr,tab:new Ta,af:new Fr};var Ae=g("searchParameters/restore",e=>F(e,ac)),xv=g("searchParameters/restoreTab",e=>F(e,k));import{BooleanValue as Ey,NumberValue as Ty,StringValue as ww}from"@coveo/bueno";function er(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 w(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 ee;(function(e){e.search="search",e.click="click",e.custom="custom",e.view="view",e.collect="collect"})(ee||(ee={}));function hl(){return typeof window<"u"}function Tl(){return typeof navigator<"u"}function sn(){return typeof document<"u"}function Sl(){try{return typeof localStorage<"u"}catch{return!1}}function Rv(){try{return typeof sessionStorage<"u"}catch{return!1}}function dg(){return Tl()&&navigator.cookieEnabled}var Fv=[ee.click,ee.custom,ee.search,ee.view],Pv=(e,t)=>Fv.indexOf(e)!==-1?Object.assign({language:sn()?document.documentElement.lang:"unknown",userAgent:Tl()?navigator.userAgent:"unknown"},t):t,ka=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?Zf(t,r,a):(i=c.split("."),n=i[i.length-2]+"."+i[i.length-1],Zf(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 Zf(e,t,r,o){document.cookie=`${e}=${t}`+(r?`;expires=${r.toUTCString()}`:"")+(o?`;domain=${o}`:"")+";path=/;SameSite=Lax"}function vv(){return Sl()?localStorage:dg()?new Va:Rv()?sessionStorage:new ln}var Va=class e{getItem(t){return ka.get(`${e.prefix}${t}`)}removeItem(t){ka.erase(`${e.prefix}${t}`)}setItem(t,r,o){ka.set(`${e.prefix}${t}`,r,o)}};Va.prefix="coveo_";var Cl=class{constructor(){this.cookieStorage=new Va}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)}},ln=class{getItem(t){return null}removeItem(t){}setItem(t,r){}},Oa="__coveo.analytics.history",mg=20,pg=1e3*60,fg=75,dn=class{constructor(t){this.store=t||vv()}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 w(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 w(this,void 0,void 0,function*(){let t=yield this.getHistoryWithInternalTimeAsync();return this.stripEmptyQueries(this.stripInternalTime(t))})}getHistoryWithInternalTime(){try{let t=this.store.getItem(Oa);return t&&typeof t=="string"?JSON.parse(t):[]}catch{return[]}}getHistoryWithInternalTimeAsync(){return w(this,void 0,void 0,function*(){try{let t=yield this.store.getItem(Oa);return t?JSON.parse(t):[]}catch{return[]}})}setHistory(t){try{this.store.setItem(Oa,JSON.stringify(t.slice(0,mg)))}catch{}}clear(){try{this.store.removeItem(Oa)}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,fg)),t}isValidEntry(t){let r=this.getMostRecentElement();return r&&r.value==t.value?(t.internalTime||0)-(r.internalTime||0)>pg:!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))}},gg=Object.freeze({__proto__:null,HistoryStore:dn,MAX_NUMBER_OF_HISTORY_ELEMENTS:mg,MAX_VALUE_SIZE:fg,MIN_THRESHOLD_FOR_DUPLICATE_VALUE:pg,STORE_KEY:Oa,default:dn}),Av=(e,t)=>w(void 0,void 0,void 0,function*(){return e===ee.view?(yield bv(t.contentIdValue),Object.assign({location:window.location.toString(),referrer:document.referrer,title:document.title},t)):t}),bv=e=>w(void 0,void 0,void 0,function*(){let t=new dn,r={name:"PageView",value:e,time:new Date().toISOString()};yield t.addElementAsync(r)}),ic,wv=new Uint8Array(16);function Iv(){if(!ic&&(ic=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!ic))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return ic(wv)}var Ev=/^(?:[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 sc(e){return typeof e=="string"&&Ev.test(e)}var be=[];for(let e=0;e<256;++e)be.push((e+256).toString(16).slice(1));function yg(e,t=0){return(be[e[t+0]]+be[e[t+1]]+be[e[t+2]]+be[e[t+3]]+"-"+be[e[t+4]]+be[e[t+5]]+"-"+be[e[t+6]]+be[e[t+7]]+"-"+be[e[t+8]]+be[e[t+9]]+"-"+be[e[t+10]]+be[e[t+11]]+be[e[t+12]]+be[e[t+13]]+be[e[t+14]]+be[e[t+15]]).toLowerCase()}function Tv(e){if(!sc(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 Ov(e){e=unescape(encodeURIComponent(e));let t=[];for(let r=0;r<e.length;++r)t.push(e.charCodeAt(r));return t}var qv="6ba7b810-9dad-11d1-80b4-00c04fd430c8",kv="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function Vv(e,t,r){function o(n,a,i,c){var u;if(typeof n=="string"&&(n=Ov(n)),typeof a=="string"&&(a=Tv(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 yg(s)}try{o.name=e}catch{}return o.DNS=qv,o.URL=kv,o}var Dv=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Xf={randomUUID:Dv};function go(e,t,r){if(Xf.randomUUID&&!t&&!e)return Xf.randomUUID();e=e||{};let o=e.random||(e.rng||Iv)();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 yg(o)}function Nv(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 gl(e,t){return e<<t|e>>>32-t}function Mv(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]=gl(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),S=gl(u,5)+Nv(f,s,l,d)+p+t[f]+c[m]>>>0;p=d,d=l,l=gl(s,30)>>>0,s=u,u=S}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 Qv=Vv("v5",80,Mv),eg=Qv,hg="2.30.45",tg=e=>`${e.protocol}//${e.hostname}${e.pathname.indexOf("/")===0?e.pathname:`/${e.pathname}`}${e.search}`,qa={pageview:"pageview",event:"event"},uc=class{constructor({client:t,uuidGenerator:r=go}){this.client=t,this.uuidGenerator=r}},xl=class extends uc{constructor({client:t,uuidGenerator:r=go}){super({client:t,uuidGenerator:r}),this.actionData={},this.pageViewId=r(),this.nextPageViewId=this.pageViewId,this.currentLocation=tg(window.location),this.lastReferrer=sn()?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:sn()?document.title:"",encoding:sn()?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===qa.pageview&&(this.nextPageViewId=this.uuidGenerator(),this.hasSentFirstPageView=!0)}getNextValues(t,r){return{pageViewId:t===qa.pageview?this.nextPageViewId:this.pageViewId,referrer:t===qa.pageview&&this.hasSentFirstPageView?this.currentLocation:this.lastReferrer,location:t===qa.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 tg(window.location)}},Pr=class e{constructor(t,r){if(!sc(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 sc(a)?new e(a,Number.parseInt(n)*1e3):null}};Pr.cvo_cid="cvo_cid";Pr.expirationTime=120;var Rl=class extends uc{constructor({client:t,uuidGenerator:r=go}){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 w(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(Pr.cvo_cid,new Pr(o,Date.now()).toString()),r.toString()}catch{throw new Error("Invalid URL provided")}})}acceptFrom(t){this.client.setAcceptedLinkReferrers(t)}};Rl.Id="link";var it=Object.keys;function cc(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}var yl=128,Sg=192,rg=224,og=240;function Lv(e){return(e&248)===og?4:(e&og)===rg?3:(e&rg)===Sg?2:1}function Uv(e,t){if(t<0||e.length<=t)return e;let r=e.indexOf("%",t-2);for(r<0||r>t?r=t:t=r;r>2&&e.charAt(r-3)=="%";){let o=Number.parseInt(e.substring(r-2,r),16);if((o&yl)!=yl)break;if(r-=3,(o&Sg)!=yl){t-r>=Lv(o)*3&&(r=t);break}}return e.substring(0,r)}var Fl={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"},Bv=it(Fl).map(e=>Fl[e]),jv=[...Bv].join("|"),_v=new RegExp(`^(${jv}$)`),$v={svcAction:"svc_action",svcActionData:"svc_action_data"},zv=e=>it(e).filter(t=>e[t]!==void 0).reduce((t,r)=>{let o=Fl[r]||r;return Object.assign(Object.assign({},t),{[o]:e[r]})},{}),Wv=e=>_v.test(e),Kv=[Wv],ng={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",price:"pr",quantity:"qt",coupon:"cc",position:"ps",group:"group"},ag={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",position:"ps",price:"pr",group:"group"},qe={action:"pa",list:"pal",listSource:"pls"},lc={id:"ti",revenue:"tr",tax:"tt",shipping:"ts",coupon:"tcc",affiliation:"ta",step:"cos",option:"col"},Gv=["loyaltyCardId","loyaltyTier","thirdPartyPersona","companyName","favoriteStore","storeName","userIndustry","userRole","userDepartment","businessUnit"],Pl={id:"quoteId",affiliation:"quoteAffiliation"},vl={id:"reviewId",rating:"reviewRating",comment:"reviewComment"},Hv={add:qe,bookmark_add:qe,bookmark_remove:qe,click:qe,checkout:qe,checkout_option:qe,detail:qe,impression:qe,remove:qe,refund:Object.assign(Object.assign({},qe),lc),purchase:Object.assign(Object.assign({},qe),lc),quickview:qe,quote:Object.assign(Object.assign({},qe),Pl),review:Object.assign(Object.assign({},qe),vl)},Yv=it(ng).map(e=>ng[e]),Jv=it(ag).map(e=>ag[e]),Zv=it(qe).map(e=>qe[e]),Xv=it(lc).map(e=>lc[e]),eA=it(vl).map(e=>vl[e]),tA=it(Pl).map(e=>Pl[e]),rA=[...Yv,"custom"].join("|"),oA=[...Jv,"custom"].join("|"),Cg="(pr[0-9]+)",xg="(il[0-9]+pi[0-9]+)",nA=new RegExp(`^${Cg}(${rA})$`),aA=new RegExp(`^(${xg}(${oA}))|(il[0-9]+nm)$`),iA=new RegExp(`^(${Zv.join("|")})$`),cA=new RegExp(`^(${Xv.join("|")})$`),sA=new RegExp(`^${Cg}custom$`),uA=new RegExp(`^${xg}custom$`),lA=new RegExp(`^(${[...Gv,...eA,...tA].join("|")})$`),dA=e=>nA.test(e),mA=e=>aA.test(e),pA=e=>iA.test(e),fA=e=>cA.test(e),gA=e=>lA.test(e),yA=[mA,dA,pA,fA,gA],hA=[sA,uA],SA={anonymizeIp:"aip"},CA={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"},RA=["contentId","contentIdKey","contentType","searchHub","tab","searchUid","permanentId","contentLocale","trackingId"],FA=Object.assign(Object.assign(Object.assign(Object.assign({},SA),CA),xA),RA.reduce((e,t)=>Object.assign(Object.assign({},e),{[t]:t}),{})),Al=Object.assign(Object.assign({},FA),$v),PA=e=>{let t=!!e.action&&Hv[e.action]||{};return it(e).reduce((r,o)=>{let n=t[o]||Al[o]||o;return Object.assign(Object.assign({},r),{[n]:e[o]})},{})},vA=it(Al).map(e=>Al[e]),AA=e=>vA.indexOf(e)!==-1,bA=e=>e==="custom",wA=e=>[...yA,...Kv,AA,bA].some(t=>t(e)),IA=e=>it(e).reduce((t,r)=>{let o=EA(r);return o?Object.assign(Object.assign({},t),TA(o,e[r])):Object.assign(Object.assign({},t),{[r]:e[r]})},{}),EA=e=>{let t;return[...hA].every(r=>{var o;return t=(o=r.exec(e))===null||o===void 0?void 0:o[1],!t}),t},TA=(e,t)=>it(t).reduce((r,o)=>Object.assign(Object.assign({},r),{[`${e}${o}`]:t[o]}),{}),bl=class{constructor(t){this.opts=t}sendEvent(t,r){return w(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 w(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 w(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[ee.click,ee.custom,ee.search,ee.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}},wl=class{sendEvent(t,r){return w(this,void 0,void 0,function*(){return Promise.resolve()})}deleteHttpCookieVisitorId(){return w(this,void 0,void 0,function*(){return Promise.resolve()})}},ig=globalThis.fetch,dc=class{constructor(t){this.opts=t}sendEvent(t,r){return w(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=er(u,["url"]),d;try{d=yield ig(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 w(this,void 0,void 0,function*(){let{baseUrl:t}=this.opts,r=`${t}/analytics/visit`;yield ig(r,{headers:this.getHeaders(),method:"DELETE"})})}shouldAppendVisitorId(t){return[ee.click,ee.custom,ee.search,ee.view].indexOf(t)!==-1}getVisitorIdParam(){return w(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"})}},Il=class{constructor(t,r){Sl()&&dg()?this.storage=new Cl:Sl()?this.storage=localStorage:(console.warn("BrowserRuntime detected no valid storage available.",this),this.storage=new ln),this.client=new dc(t),this.beaconClient=new bl(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}},El=class{constructor(t,r){this.storage=r||new ln,this.client=new dc(t)}getClientDependingOnEventType(t){return this.client}},mc=class{constructor(){this.storage=new ln,this.client=new wl}getClientDependingOnEventType(t){return this.client}},OA="xx",qA=e=>e?.startsWith(OA)||!1,kA=`
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