@coveo/headless 3.19.0 → 3.19.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/dist/browser/case-assist/headless.esm.js +1 -1
  2. package/dist/browser/case-assist/headless.js +1 -1
  3. package/dist/browser/commerce/headless.esm.js +1 -1
  4. package/dist/browser/commerce/headless.js +1 -1
  5. package/dist/browser/headless.esm.js +1 -1
  6. package/dist/browser/headless.js +1 -1
  7. package/dist/browser/insight/headless.esm.js +1 -1
  8. package/dist/browser/insight/headless.js +1 -1
  9. package/dist/browser/recommendation/headless.esm.js +1 -1
  10. package/dist/browser/recommendation/headless.js +1 -1
  11. package/dist/browser/ssr/headless.esm.js +1 -1
  12. package/dist/browser/ssr/headless.js +1 -1
  13. package/dist/browser/ssr-commerce/headless.esm.js +1 -1
  14. package/dist/browser/ssr-commerce/headless.js +1 -1
  15. package/dist/case-assist/headless.cjs +1 -1
  16. package/dist/case-assist/headless.esm.js +1 -1
  17. package/dist/commerce/headless.cjs +1 -1
  18. package/dist/commerce/headless.esm.js +1 -1
  19. package/dist/headless.cjs +1 -1
  20. package/dist/headless.esm.js +1 -1
  21. package/dist/insight/headless.cjs +1 -1
  22. package/dist/insight/headless.esm.js +1 -1
  23. package/dist/quantic/case-assist/headless.js +1 -1
  24. package/dist/quantic/commerce/headless.js +1 -1
  25. package/dist/quantic/headless.js +1 -1
  26. package/dist/quantic/insight/headless.js +1 -1
  27. package/dist/quantic/recommendation/headless.js +1 -1
  28. package/dist/recommendation/headless.cjs +1 -1
  29. package/dist/recommendation/headless.esm.js +1 -1
  30. package/dist/ssr/headless.cjs +1 -1
  31. package/dist/ssr/headless.esm.js +1 -1
  32. package/dist/ssr-commerce/headless.cjs +1 -1
  33. package/dist/ssr-commerce/headless.esm.js +1 -1
  34. package/package.json +1 -1
@@ -16,7 +16,7 @@
16
16
  * limitations under the License.
17
17
  */(function(g,f){if(typeof exports=="object"&&typeof module<"u"){module.exports=f(require)}else if("function"==typeof define && define.amd){define("CoveoHeadlessCommerceSSR",["crypto","@coveo/bueno"],function(_d_0,_d_1){var d={"crypto": _d_0,"@coveo/bueno": _d_1},r=function(m){if(m in d) return d[m];if(typeof require=="function") return require(m);throw new Error("Cannot find module '"+m+"'")};return f(r)})}else {var gN={"crypto":"crypto","@coveo/bueno":"@coveo/bueno"},gReq=function(r){var mod = r in gN ? g[gN[r]] : g[r]; return mod };g["CoveoHeadlessCommerceSSR"]=f(gReq)}}(typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : this,function(require){var exports={};var __exports=exports;var module={exports};
18
18
  "use strict";var sP=Object.create;var Xa=Object.defineProperty;var cP=Object.getOwnPropertyDescriptor;var uP=Object.getOwnPropertyNames;var lP=Object.getPrototypeOf,dP=Object.prototype.hasOwnProperty;var mP=(e,t,r)=>t in e?Xa(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var qe=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),pP=(e,t)=>{for(var r in t)Xa(e,r,{get:t[r],enumerable:!0})},Gp=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of uP(t))!dP.call(e,n)&&n!==r&&Xa(e,n,{get:()=>t[n],enumerable:!(o=cP(t,n))||o.enumerable});return e};var Gt=(e,t,r)=>(r=e!=null?sP(lP(e)):{},Gp(t||!e||!e.__esModule?Xa(r,"default",{value:e,enumerable:!0}):r,e)),fP=e=>Gp(Xa({},"__esModule",{value:!0}),e);var Be=(e,t,r)=>mP(e,typeof t!="symbol"?t+"":t,r);var tf=qe(Za=>{"use strict";var gs=Za&&Za.__assign||function(){return gs=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},gs.apply(this,arguments)};Object.defineProperty(Za,"__esModule",{value:!0});var yP={delayFirstAttempt:!1,jitter:"none",maxDelay:1/0,numOfAttempts:10,retry:function(){return!0},startingDelay:100,timeMultiple:2};function SP(e){var t=gs(gs({},yP),e);return t.numOfAttempts<1&&(t.numOfAttempts=1),t}Za.getSanitizedOptions=SP});var rf=qe(Bl=>{"use strict";Object.defineProperty(Bl,"__esModule",{value:!0});function hP(e){var t=Math.random()*e;return Math.round(t)}Bl.fullJitter=hP});var of=qe(Ul=>{"use strict";Object.defineProperty(Ul,"__esModule",{value:!0});function CP(e){return e}Ul.noJitter=CP});var nf=qe(jl=>{"use strict";Object.defineProperty(jl,"__esModule",{value:!0});var xP=rf(),RP=of();function FP(e){switch(e.jitter){case"full":return xP.fullJitter;case"none":default:return RP.noJitter}}jl.JitterFactory=FP});var $l=qe(_l=>{"use strict";Object.defineProperty(_l,"__esModule",{value:!0});var PP=nf(),AP=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=PP.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}();_l.Delay=AP});var af=qe(Pr=>{"use strict";var vP=Pr&&Pr.__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)}}(),bP=Pr&&Pr.__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 s(l){try{c(o.next(l))}catch(d){i(d)}}function u(l){try{c(o.throw(l))}catch(d){i(d)}}function c(l){l.done?a(l.value):n(l.value).then(s,u)}c((o=o.apply(e,t||[])).next())})},EP=Pr&&Pr.__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:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(i[Symbol.iterator]=function(){return this}),i;function s(c){return function(l){return u([c,l])}}function u(c){if(o)throw new TypeError("Generator is already executing.");for(;r;)try{if(o=1,n&&(a=c[0]&2?n.return:c[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,c[1])).done)return a;switch(n=0,a&&(c=[c[0]&2,a.value]),c[0]){case 0:case 1:a=c;break;case 4:return r.label++,{value:c[1],done:!1};case 5:r.label++,n=c[1],c=[0];continue;case 7:c=r.ops.pop(),r.trys.pop();continue;default:if(a=r.trys,!(a=a.length>0&&a[a.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!a||c[1]>a[0]&&c[1]<a[3])){r.label=c[1];break}if(c[0]===6&&r.label<a[1]){r.label=a[1],a=c;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(c);break}a[2]&&r.ops.pop(),r.trys.pop();continue}c=t.call(e,r)}catch(l){c=[6,l],n=0}finally{o=a=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}};Object.defineProperty(Pr,"__esModule",{value:!0});var wP=$l(),IP=function(e){vP(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.apply=function(){return bP(this,void 0,void 0,function(){return EP(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}(wP.Delay);Pr.SkipFirstDelay=IP});var sf=qe(ei=>{"use strict";var TP=ei&&ei.__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(ei,"__esModule",{value:!0});var OP=$l(),qP=function(e){TP(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(OP.Delay);ei.AlwaysDelay=qP});var cf=qe(zl=>{"use strict";Object.defineProperty(zl,"__esModule",{value:!0});var DP=af(),kP=sf();function VP(e,t){var r=NP(e);return r.setAttemptNumber(t),r}zl.DelayFactory=VP;function NP(e){return e.delayFirstAttempt?new kP.AlwaysDelay(e):new DP.SkipFirstDelay(e)}});var uf=qe(No=>{"use strict";var Wl=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 s(l){try{c(o.next(l))}catch(d){i(d)}}function u(l){try{c(o.throw(l))}catch(d){i(d)}}function c(l){l.done?a(l.value):n(l.value).then(s,u)}c((o=o.apply(e,t||[])).next())})},Kl=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:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(i[Symbol.iterator]=function(){return this}),i;function s(c){return function(l){return u([c,l])}}function u(c){if(o)throw new TypeError("Generator is already executing.");for(;r;)try{if(o=1,n&&(a=c[0]&2?n.return:c[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,c[1])).done)return a;switch(n=0,a&&(c=[c[0]&2,a.value]),c[0]){case 0:case 1:a=c;break;case 4:return r.label++,{value:c[1],done:!1};case 5:r.label++,n=c[1],c=[0];continue;case 7:c=r.ops.pop(),r.trys.pop();continue;default:if(a=r.trys,!(a=a.length>0&&a[a.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!a||c[1]>a[0]&&c[1]<a[3])){r.label=c[1];break}if(c[0]===6&&r.label<a[1]){r.label=a[1],a=c;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(c);break}a[2]&&r.ops.pop(),r.trys.pop();continue}c=t.call(e,r)}catch(l){c=[6,l],n=0}finally{o=a=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}};Object.defineProperty(No,"__esModule",{value:!0});var MP=tf(),QP=cf();function LP(e,t){return t===void 0&&(t={}),Wl(this,void 0,void 0,function(){var r,o;return Kl(this,function(n){switch(n.label){case 0:return r=MP.getSanitizedOptions(t),o=new BP(e,r),[4,o.execute()];case 1:return[2,n.sent()]}})})}No.backOff=LP;var BP=function(){function e(t,r){this.request=t,this.options=r,this.attemptNumber=0}return e.prototype.execute=function(){return Wl(this,void 0,void 0,function(){var t,r;return Kl(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 Wl(this,void 0,void 0,function(){var t;return Kl(this,function(r){switch(r.label){case 0:return t=QP.DelayFactory(this.options,this.attemptNumber),[4,t.apply()];case 1:return r.sent(),[2]}})})},e}()});var wc=qe((rm,om)=>{"use strict";(function(e,t){typeof rm=="object"&&typeof om<"u"?om.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs=t()})(rm,function(){"use strict";var e=1e3,t=6e4,r=36e5,o="millisecond",n="second",a="minute",i="hour",s="day",u="week",c="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+)?$/,h=/\[([^\]]+)]|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(V){var q=["th","st","nd","rd"],O=V%100;return"["+V+(q[(O-20)%10]||q[O]||q[0])+"]"}},S=function(V,q,O){var N=String(V);return!N||N.length>=q?V:""+Array(q+1-N.length).join(O)+V},A={s:S,z:function(V){var q=-V.utcOffset(),O=Math.abs(q),N=Math.floor(O/60),k=O%60;return(q<=0?"+":"-")+S(N,2,"0")+":"+S(k,2,"0")},m:function V(q,O){if(q.date()<O.date())return-V(O,q);var N=12*(O.year()-q.year())+(O.month()-q.month()),k=q.clone().add(N,c),L=O-k<0,B=q.clone().add(N+(L?-1:1),c);return+(-(N+(O-k)/(L?k-B:B-k))||0)},a:function(V){return V<0?Math.ceil(V)||0:Math.floor(V)},p:function(V){return{M:c,y:d,w:u,d:s,D:p,h:i,m:a,s:n,ms:o,Q:l}[V]||String(V||"").toLowerCase().replace(/s$/,"")},u:function(V){return V===void 0}},y="en",x={};x[y]=C;var I="$isDayjsObject",v=function(V){return V instanceof T||!(!V||!V[I])},R=function V(q,O,N){var k;if(!q)return y;if(typeof q=="string"){var L=q.toLowerCase();x[L]&&(k=L),O&&(x[L]=O,k=L);var B=q.split("-");if(!k&&B.length>1)return V(B[0])}else{var z=q.name;x[z]=q,k=z}return!N&&k&&(y=k),k||!N&&y},P=function(V,q){if(v(V))return V.clone();var O=typeof q=="object"?q:{};return O.date=V,O.args=arguments,new T(O)},b=A;b.l=R,b.i=v,b.w=function(V,q){return P(V,{locale:q.$L,utc:q.$u,x:q.$x,$offset:q.$offset})};var T=function(){function V(O){this.$L=R(O.locale,null,!0),this.parse(O),this.$x=this.$x||O.x||{},this[I]=!0}var q=V.prototype;return q.parse=function(O){this.$d=function(N){var k=N.date,L=N.utc;if(k===null)return new Date(NaN);if(b.u(k))return new Date;if(k instanceof Date)return new Date(k);if(typeof k=="string"&&!/Z$/i.test(k)){var B=k.match(f);if(B){var z=B[2]-1||0,Y=(B[7]||"0").substring(0,3);return L?new Date(Date.UTC(B[1],z,B[3]||1,B[4]||0,B[5]||0,B[6]||0,Y)):new Date(B[1],z,B[3]||1,B[4]||0,B[5]||0,B[6]||0,Y)}}return new Date(k)}(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 k=P(O);return this.startOf(N)<=k&&k<=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,k){return b.u(O)?this[N]:this.set(k,O)},q.unix=function(){return Math.floor(this.valueOf()/1e3)},q.valueOf=function(){return this.$d.getTime()},q.startOf=function(O,N){var k=this,L=!!b.u(N)||N,B=b.p(O),z=function(re,le){var ge=b.w(k.$u?Date.UTC(k.$y,le,re):new Date(k.$y,le,re),k);return L?ge:ge.endOf(s)},Y=function(re,le){return b.w(k.toDate()[re].apply(k.toDate("s"),(L?[0,0,0,0]:[23,59,59,999]).slice(le)),k)},te=this.$W,G=this.$M,J=this.$D,K="set"+(this.$u?"UTC":"");switch(B){case d:return L?z(1,0):z(31,11);case c:return L?z(1,G):z(0,G+1);case u:var Z=this.$locale().weekStart||0,me=(te<Z?te+7:te)-Z;return z(L?J-me:J+(6-me),G);case s:case p:return Y(K+"Hours",0);case i:return Y(K+"Minutes",1);case a:return Y(K+"Seconds",2);case n:return Y(K+"Milliseconds",3);default:return this.clone()}},q.endOf=function(O){return this.startOf(O,!1)},q.$set=function(O,N){var k,L=b.p(O),B="set"+(this.$u?"UTC":""),z=(k={},k[s]=B+"Date",k[p]=B+"Date",k[c]=B+"Month",k[d]=B+"FullYear",k[i]=B+"Hours",k[a]=B+"Minutes",k[n]=B+"Seconds",k[o]=B+"Milliseconds",k)[L],Y=L===s?this.$D+(N-this.$W):N;if(L===c||L===d){var te=this.clone().set(p,1);te.$d[z](Y),te.init(),this.$d=te.set(p,Math.min(this.$D,te.daysInMonth())).$d}else z&&this.$d[z](Y);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 k,L=this;O=Number(O);var B=b.p(N),z=function(G){var J=P(L);return b.w(J.date(J.date()+Math.round(G*O)),L)};if(B===c)return this.set(c,this.$M+O);if(B===d)return this.set(d,this.$y+O);if(B===s)return z(1);if(B===u)return z(7);var Y=(k={},k[a]=t,k[i]=r,k[n]=e,k)[B]||1,te=this.$d.getTime()+O*Y;return b.w(te,this)},q.subtract=function(O,N){return this.add(-1*O,N)},q.format=function(O){var N=this,k=this.$locale();if(!this.isValid())return k.invalidDate||m;var L=O||"YYYY-MM-DDTHH:mm:ssZ",B=b.z(this),z=this.$H,Y=this.$m,te=this.$M,G=k.weekdays,J=k.months,K=k.meridiem,Z=function(le,ge,ot,Pt){return le&&(le[ge]||le(N,L))||ot[ge].slice(0,Pt)},me=function(le){return b.s(z%12||12,le,"0")},re=K||function(le,ge,ot){var Pt=le<12?"AM":"PM";return ot?Pt.toLowerCase():Pt};return L.replace(h,function(le,ge){return ge||function(ot){switch(ot){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 Z(k.monthsShort,te,J,3);case"MMMM":return Z(J,te);case"D":return N.$D;case"DD":return b.s(N.$D,2,"0");case"d":return String(N.$W);case"dd":return Z(k.weekdaysMin,N.$W,G,2);case"ddd":return Z(k.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 me(1);case"hh":return me(2);case"a":return re(z,Y,!0);case"A":return re(z,Y,!1);case"m":return String(Y);case"mm":return b.s(Y,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 B}return null}(le)||B.replace(":","")})},q.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},q.diff=function(O,N,k){var L,B=this,z=b.p(N),Y=P(O),te=(Y.utcOffset()-this.utcOffset())*t,G=this-Y,J=function(){return b.m(B,Y)};switch(z){case d:L=J()/12;break;case c:L=J();break;case l:L=J()/3;break;case u:L=(G-te)/6048e5;break;case s: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 k?L:b.a(L)},q.daysInMonth=function(){return this.endOf(c).$D},q.$locale=function(){return x[this.$L]},q.locale=function(O,N){if(!O)return this.$L;var k=this.clone(),L=R(O,N,!0);return L&&(k.$L=L),k},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()},V}(),M=T.prototype;return P.prototype=M,[["$ms",o],["$s",n],["$m",a],["$H",i],["$W",s],["$M",c],["$y",d],["$D",p]].forEach(function(V){M[V[1]]=function(q){return this.$g(q,V[0],V[1])}}),P.extend=function(V,q){return V.$i||(V(q,T,P),V.$i=!0),P},P.locale=R,P.isDayjs=v,P.unix=function(V){return P(1e3*V)},P.en=x[y],P.Ls=x,P.p={},P})});var Ny=qe((nm,am)=>{"use strict";(function(e,t){typeof nm=="object"&&typeof am<"u"?am.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_quarterOfYear=t()})(nm,function(){"use strict";var e="month",t="quarter";return function(r,o){var n=o.prototype;n.quarter=function(s){return this.$utils().u(s)?Math.ceil((this.month()+1)/3):this.month(this.month()%3+3*(s-1))};var a=n.add;n.add=function(s,u){return s=Number(s),this.$utils().p(u)===t?this.add(3*s,e):a.bind(this)(s,u)};var i=n.startOf;n.startOf=function(s,u){var c=this.$utils(),l=!!c.u(u)||u;if(c.p(s)===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)(s,u)}}})});var My=qe((im,sm)=>{"use strict";(function(e,t){typeof im=="object"&&typeof sm<"u"?sm.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_customParseFormat=t()})(im,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={},s=function(f){return(f=+f)+(f>68?1900:2e3)},u=function(f){return function(h){this[f]=+h}},c=[/[+-]\d\d:?(\d\d)?|Z/,function(f){(this.zone||(this.zone={})).offset=function(h){if(!h||h==="Z")return 0;var C=h.match(/([+-]|\d\d)/g),S=60*C[1]+(+C[2]||0);return S===0?0:C[0]==="+"?-S:S}(f)}],l=function(f){var h=i[f];return h&&(h.indexOf?h:h.s.concat(h.f))},d=function(f,h){var C,S=i.meridiem;if(S){for(var A=1;A<=24;A+=1)if(f.indexOf(S(A,0,h))>-1){C=A>12;break}}else C=f===(h?"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 h=i.ordinal,C=f.match(/\d+/);if(this.day=C[0],h)for(var S=1;S<=31;S+=1)h(S).replace(/\[|\]/g,"")===f&&(this.day=S)}],w:[n,u("week")],ww:[o,u("week")],M:[n,u("month")],MM:[o,u("month")],MMM:[a,function(f){var h=l("months"),C=(l("monthsShort")||h.map(function(S){return S.slice(0,3)})).indexOf(f)+1;if(C<1)throw new Error;this.month=C%12||C}],MMMM:[a,function(f){var h=l("months").indexOf(f)+1;if(h<1)throw new Error;this.month=h%12||h}],Y:[/[+-]?\d+/,u("year")],YY:[o,function(f){this.year=s(f)}],YYYY:[/\d{4}/,u("year")],Z:c,ZZ:c};function m(f){var h,C;h=f,C=i&&i.formats;for(var S=(f=h.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(V,q,O){return q||O.slice(1)})})).match(t),A=S.length,y=0;y<A;y+=1){var x=S[y],I=p[x],v=I&&I[0],R=I&&I[1];S[y]=R?{regex:v,parser:R}:x.replace(/^\[|\]$/g,"")}return function(P){for(var b={},T=0,M=0;T<A;T+=1){var V=S[T];if(typeof V=="string")M+=V.length;else{var q=V.regex,O=V.parser,N=P.slice(M),k=q.exec(N)[0];O.call(b,k),P=P.replace(k,"")}}return function(L){var B=L.afternoon;if(B!==void 0){var z=L.hours;B?z<12&&(L.hours+=12):z===12&&(L.hours=0),delete L.afternoon}}(b),b}}return function(f,h,C){C.p.customParseFormat=!0,f&&f.parseTwoDigitYear&&(s=f.parseTwoDigitYear);var S=h.prototype,A=S.parse;S.parse=function(y){var x=y.date,I=y.utc,v=y.args;this.$u=I;var R=v[1];if(typeof R=="string"){var P=v[2]===!0,b=v[3]===!0,T=P||b,M=v[2];b&&(M=v[2]),i=this.$locale(),!P&&M&&(i=C.Ls[M]),this.$d=function(N,k,L,B){try{if(["x","X"].indexOf(k)>-1)return new Date((k==="X"?1e3:1)*N);var z=m(k)(N),Y=z.year,te=z.month,G=z.day,J=z.hours,K=z.minutes,Z=z.seconds,me=z.milliseconds,re=z.zone,le=z.week,ge=new Date,ot=G||(Y||te?1:ge.getDate()),Pt=Y||ge.getFullYear(),$r=0;Y&&!te||($r=te>0?te-1:ge.getMonth());var gn,yn=J||0,Ja=K||0,Ql=Z||0,Ll=me||0;return re?new Date(Date.UTC(Pt,$r,ot,yn,Ja,Ql,Ll+60*re.offset*1e3)):L?new Date(Date.UTC(Pt,$r,ot,yn,Ja,Ql,Ll)):(gn=new Date(Pt,$r,ot,yn,Ja,Ql,Ll),le&&(gn=B(gn).week(le).toDate()),gn)}catch{return new Date("")}}(x,R,I,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 V=R.length,q=1;q<=V;q+=1){v[1]=R[q-1];var O=C.apply(this,v);if(O.isValid()){this.$d=O.$d,this.$L=O.$L,this.init();break}q===V&&(this.$d=new Date(""))}else A.call(this,y)}}})});var NC=qe((AY,VC)=>{"use strict";var _I=/(^|; )Coveo-Pendragon=([^;]*)/;VC.exports=()=>_I.exec(document.cookie)?.pop()||null});var QC=qe((Xm,Zm)=>{"use strict";(function(e,t){typeof Xm=="object"&&typeof Zm<"u"?Zm.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_timezone=t()})(Xm,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(h,C){C===void 0&&(C={});var S=C.timeZoneName||"short",A=h+"|"+S,y=t[A];return y||(y=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:h,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:S}),t[A]=y),y}(d,p);return f.formatToParts(m)},s=function(l,d){for(var p=i(l,d),m=[],f=0;f<p.length;f+=1){var h=p[f],C=h.type,S=h.value,A=e[C];A>=0&&(m[A]=parseInt(S,10))}var y=m[3],x=y===24?0:y,I=m[0]+"-"+m[1]+"-"+m[2]+" "+x+":"+m[4]+":"+m[5]+":000",v=+l;return(n.utc(I).valueOf()-(v-=v%1e3))/6e4},u=o.prototype;u.tz=function(l,d){l===void 0&&(l=a);var p,m=this.utcOffset(),f=this.toDate(),h=f.toLocaleString("en-US",{timeZone:l}),C=Math.round((f-new Date(h))/1e3/60),S=15*-Math.round(f.getTimezoneOffset()/15)-C;if(!Number(S))p=this.utcOffset(0,d);else if(p=n(h,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(S,!0),d){var A=p.utcOffset();p=p.add(m-A,"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 c=u.startOf;u.startOf=function(l,d){if(!this.$x||!this.$x.$timezone)return c.call(this,l,d);var p=n(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return c.call(p,l,d).tz(this.$x.$timezone,!0)},n.tz=function(l,d,p){var m=p&&d,f=p||d||a,h=s(+n(),f);if(typeof l!="string")return n(l).tz(f);var C=function(x,I,v){var R=x-60*I*1e3,P=s(R,v);if(I===P)return[R,I];var b=s(R-=60*(P-I)*1e3,v);return P===b?[R,P]:[x-60*Math.min(P,b)*1e3,Math.max(P,b)]}(n.utc(l,m).valueOf(),h,f),S=C[0],A=C[1],y=n(S).utcOffset(A);return y.$x.$timezone=f,y},n.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},n.tz.setDefault=function(l){a=l}}})});var LC=qe((ep,tp)=>{"use strict";(function(e,t){typeof ep=="object"&&typeof tp<"u"?tp.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_utc=t()})(ep,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 s=i.parse;i.parse=function(m){m.utc&&(this.$u=!0),this.$utils().u(m.$offset)||(this.$offset=m.$offset),s.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 c=i.utcOffset;i.utcOffset=function(m,f){var h=this.$utils().u;if(h(m))return this.$u?0:h(this.$offset)?c.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 I=(""+x[0]).match(r)||["-",0,0],v=I[0],R=60*+I[1]+ +I[2];return R===0?0:v==="+"?R:-R}(m),m===null))return this;var C=Math.abs(m)<=16?60*m:m,S=this;if(f)return S.$offset=C,S.$u=m===0,S;if(m!==0){var A=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(S=this.local().add(C+A,e)).$offset=C,S.$x.$localOffset=A}else S=this.utc();return S};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,h){if(m&&this.$u===m.$u)return p.call(this,m,f,h);var C=this.local(),S=a(m).local();return p.call(C,S,f,h)}}})});var XC=qe((q3,JC)=>{"use strict";function XI(e){try{return JSON.stringify(e)}catch{return'"[Circular]"'}}JC.exports=ZI;function ZI(e,t,r){var o=r&&r.stringify||XI,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 s=1;s<a;s++)i[s]=o(t[s]);return i.join(" ")}if(typeof e!="string")return e;var u=t.length;if(u===0)return e;for(var c="",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&&(c+=e.slice(d,m)),c+=Number(t[l]),d=m+2,m++;break;case 105:if(l>=u||t[l]==null)break;d<m&&(c+=e.slice(d,m)),c+=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&&(c+=e.slice(d,m));var f=typeof t[l];if(f==="string"){c+="'"+t[l]+"'",d=m+2,m++;break}if(f==="function"){c+=t[l].name||"<anonymous>",d=m+2,m++;break}c+=o(t[l]),d=m+2,m++;break;case 115:if(l>=u)break;d<m&&(c+=e.slice(d,m)),c+=String(t[l]),d=m+2,m++;break;case 37:d<m&&(c+=e.slice(d,m)),c+="%",d=m+2,m++,l--;break}++l}++m}return d===-1?e:(d<p&&(c+=e.slice(d)),c)}});var nx=qe((D3,Qu)=>{"use strict";var ZC=XC();Qu.exports=Br;var Ji=fT().console||{},eT={mapHttpRequest:Mu,mapHttpResponse:Mu,wrapRequestSerializer:np,wrapResponseSerializer:np,wrapErrorSerializer:np,req:Mu,res:Mu,err:tx,errWithCause:tx};function qo(e,t){return e==="silent"?1/0:t.levels.values[e]}var sp=Symbol("pino.logFuncs"),ap=Symbol("pino.hierarchy"),tT={error:"log",fatal:"error",warn:"error",info:"log",debug:"log",trace:"log"};function ex(e,t){let r={logger:t,parent:e[ap]};t[ap]=r}function rT(e,t,r){let o={};t.forEach(n=>{o[n]=r[n]?r[n]:Ji[n]||Ji[tT[n]||"log"]||ka}),e[sp]=o}function oT(e,t){return Array.isArray(e)?e.filter(function(o){return o!=="!stdSerializers.err"}):e===!0?Object.keys(t):!1}function Br(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||Ji;e.browser.write&&(e.browser.asObject=!0);let o=e.serializers||{},n=oT(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||{}),s=["error","fatal","warn","info","debug","trace"].concat(i);typeof r=="function"&&s.forEach(function(h){r[h]=r}),(e.enabled===!1||e.browser.disabled)&&(e.level="silent");let u=e.level||"info",c=Object.create(r);c.log||(c.log=ka),rT(c,s,r),ex({},c),Object.defineProperty(c,"levelVal",{get:d}),Object.defineProperty(c,"level",{get:p,set:m});let l={transmit:t,serialize:n,asObject:e.browser.asObject,formatters:e.browser.formatters,levels:s,timestamp:dT(e),messageKey:e.messageKey||"msg",onChild:e.onChild||ka};c.levels=nT(e),c.level=u,c.setMaxListeners=c.getMaxListeners=c.emit=c.addListener=c.on=c.prependListener=c.once=c.prependOnceListener=c.removeListener=c.removeAllListeners=c.listeners=c.listenerCount=c.eventNames=c.write=c.flush=ka,c.serializers=o,c._serialize=n,c._stdErrSerialize=a,c.child=function(...h){return f.call(this,l,...h)},t&&(c._logEvent=ip());function d(){return qo(this.level,this)}function p(){return this._level}function m(h){if(h!=="silent"&&!this.levels.values[h])throw Error("unknown level "+h);this._level=h,cn(this,l,c,"error"),cn(this,l,c,"fatal"),cn(this,l,c,"warn"),cn(this,l,c,"info"),cn(this,l,c,"debug"),cn(this,l,c,"trace"),i.forEach(C=>{cn(this,l,c,C)})}function f(h,C,S){if(!C)throw new Error("missing bindings for child Pino");S=S||{},n&&C.serializers&&(S.serializers=C.serializers);let A=S.serializers;if(n&&A){var y=Object.assign({},o,A),x=e.browser.serialize===!0?Object.keys(y):n;delete C.serializers,cp([C],x,y,this._stdErrSerialize)}function I(R){this._childLevel=(R._childLevel|0)+1,this.bindings=C,y&&(this.serializers=y,this._serialize=x),t&&(this._logEvent=ip([].concat(R._logEvent.bindings,C)))}I.prototype=this;let v=new I(this);return ex(this,v),v.child=function(...R){return f.call(this,h,...R)},v.level=S.level||this.level,h.onChild(v),v}return c}function nT(e){let t=e.customLevels||{},r=Object.assign({},Br.levels.values,t),o=Object.assign({},Br.levels.labels,aT(t));return{values:r,labels:o}}function aT(e){let t={};return Object.keys(e).forEach(function(r){t[e[r]]=r}),t}Br.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"}};Br.stdSerializers=eT;Br.stdTimeFunctions=Object.assign({},{nullTime:rx,epochTime:ox,unixTime:mT,isoTime:pT});function iT(e){let t=[];e.bindings&&t.push(e.bindings);let r=e[ap];for(;r.parent;)r=r.parent,r.logger.bindings&&t.push(r.logger.bindings);return t.reverse()}function cn(e,t,r,o){if(Object.defineProperty(e,o,{value:qo(e.level,r)>qo(o,r)?ka:r[sp][o],writable:!0,enumerable:!0,configurable:!0}),e[o]===ka){if(!t.transmit)return;let a=t.transmit.level||e.level,i=qo(a,r);if(qo(o,r)<i)return}e[o]=cT(e,t,r,o);let n=iT(e);n.length!==0&&(e[o]=sT(n,e[o]))}function sT(e,t){return function(){return t.apply(this,[...e,...arguments])}}function cT(e,t,r,o){return function(n){return function(){let i=t.timestamp(),s=new Array(arguments.length),u=Object.getPrototypeOf&&Object.getPrototypeOf(this)===Ji?Ji:this;for(var c=0;c<s.length;c++)s[c]=arguments[c];var l=!1;if(t.serialize&&(cp(s,this._serialize,this.serializers,this._stdErrSerialize),l=!0),t.asObject||t.formatters?n.call(u,uT(this,o,s,i,t)):n.apply(u,s),t.transmit){let d=t.transmit.level||e._level,p=qo(d,r),m=qo(o,r);if(m<p)return;lT(this,{ts:i,methodLevel:o,methodValue:m,transmitLevel:d,transmitValue:r.levels.values[t.transmit.level||e._level],send:t.transmit.send,val:qo(e._level,r)},s,l)}}}(e[sp][o])}function uT(e,t,r,o,n){let{level:a,log:i=p=>p}=n.formatters||{},s=r.slice(),u=s[0],c={};if(o&&(c.time=o),a){let p=a(t,e.levels.values[t]);Object.assign(c,p)}else c.level=e.levels.values[t];let l=(e._childLevel|0)+1;if(l<1&&(l=1),u!==null&&typeof u=="object"){for(;l--&&typeof s[0]=="object";)Object.assign(c,s.shift());u=s.length?ZC(s.shift(),s):void 0}else typeof u=="string"&&(u=ZC(s.shift(),s));return u!==void 0&&(c[n.messageKey]=u),i(c)}function cp(e,t,r,o){for(let n in e)if(o&&e[n]instanceof Error)e[n]=Br.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 lT(e,t,r,o=!1){let n=t.send,a=t.ts,i=t.methodLevel,s=t.methodValue,u=t.val,c=e._logEvent.bindings;o||cp(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 c.indexOf(l)===-1}),e._logEvent.level.label=i,e._logEvent.level.value=s,n(i,e._logEvent,u),e._logEvent=ip(c)}function ip(e){return{ts:0,messages:[],bindings:e||[],level:{label:"",value:0}}}function tx(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 dT(e){return typeof e.timestamp=="function"?e.timestamp:e.timestamp===!1?rx:ox}function Mu(){return{}}function np(e){return e}function ka(){}function rx(){return!1}function ox(){return Date.now()}function mT(){return Math.round(Date.now()/1e3)}function pT(){return new Date(Date.now()).toISOString()}function fT(){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)||{}}}Qu.exports.default=Br;Qu.exports.pino=Br});var ck={};pP(ck,{Kind:()=>dn,ProductTemplatesHelpers:()=>GF,SolutionType:()=>De,SortBy:()=>vt,SortOrder:()=>Ei,VERSION:()=>zr,buildCriterionExpression:()=>wi,buildDateSortCriterion:()=>xc,buildFieldSortCriterion:()=>Rc,buildNoSortCriterion:()=>Pc,buildParameterSerializer:()=>HF,buildQueryExpression:()=>ik,buildQueryRankingExpressionSortCriterion:()=>Fc,buildRelevanceSortCriterion:()=>na,buildResultTemplatesManager:()=>zF,defineBreadcrumbManager:()=>XR,defineCart:()=>QR,defineCommerceEngine:()=>FR,defineContext:()=>BR,defineDidYouMean:()=>PR,defineFacetGenerator:()=>AR,defineFilterSuggestionsGenerator:()=>aF,defineInstantProducts:()=>wF,defineNotifyTrigger:()=>sF,definePagination:()=>vR,defineParameterManager:()=>OR,defineProductList:()=>DR,defineProductView:()=>VR,defineQueryTrigger:()=>uF,defineRecentQueriesList:()=>tF,defineRecommendations:()=>MR,defineRedirectionTrigger:()=>dF,defineSearchBox:()=>YR,defineSort:()=>JR,defineStandaloneSearchBox:()=>hF,defineSummary:()=>ZR,deserializeRelativeDate:()=>Ky,getAnalyticsNextApiBaseUrl:()=>hs,getCommerceApiBaseUrl:()=>xs,getOrganizationEndpoint:()=>ke,getSampleCommerceEngineConfiguration:()=>ux,loadCartActions:()=>lD,loadCategoryFacetSetActions:()=>pD,loadConfigurationActions:()=>CD,loadContextActions:()=>nD,loadCoreFacetActions:()=>mD,loadDateFacetActions:()=>gD,loadInstantProductsActions:()=>AD,loadNumericFacetActions:()=>yD,loadPaginationActions:()=>cD,loadProductActions:()=>uD,loadProductListingActions:()=>iD,loadProductListingParametersActions:()=>FD,loadQueryActions:()=>xD,loadQuerySetActions:()=>SD,loadQuerySuggestActions:()=>hD,loadRecentQueriesActions:()=>vD,loadRecommendationsActions:()=>sD,loadRegularFacetActions:()=>fD,loadSearchActions:()=>aD,loadSearchParametersActions:()=>RD,loadSortActions:()=>dD,loadStandaloneSearchBoxSetActions:()=>wD,loadTriggersActions:()=>PD,parseCriterionExpression:()=>WF,validateRelativeDate:()=>lo});module.exports=fP(ck);var Hp="coveo-headless-internal-state",U=Symbol.for(Hp),Yp=e=>new Proxy(e,{ownKeys(t){return Reflect.ownKeys(t).filter(r=>r!==U)},get(t,r,o){return typeof r=="symbol"&&r.description===Hp&&r!==U&&e.logger.warn(`You might be loading Headless twice. Please check your setup.
19
- If you are trying to access the inner state... Don't`),Reflect.get(t,r,o)}});var Vo=(e,t=5)=>e+Math.random().toString(36).substring(2,2+t);function Jp(e){return Array.isArray(e)}function ds(e){return e.trim()===""}function Xp(e){let t={};for(let[r,o]of e)t[r]=o;return t}function ms(e,t){return Object.fromEntries(Object.entries(e).map(([r,o])=>[r,t(o,r)]))}function ps(e,t){return Object.fromEntries(Object.entries(e).filter(([r,o])=>t(o,r)))}function Fr(e){if(typeof e!="object"||!e)return e;try{return JSON.parse(JSON.stringify(e))}catch{return e}}function Zp(){let e=null,t=null;return{promise:new Promise((o,n)=>{e=o,t=n}),resolve:e,reject:t}}function fs(e){let{promise:t,resolve:r}=Zp();return{promise:t,middleware:()=>n=>a=>{n(a),e(a)&&r(a)}}}function gP(e){return e==null?!1:typeof e=="object"&&"meta"in e?e.meta?.arg?.slotId!==void 0:!1}function ef(e,t){let{promise:r,resolve:o}=Zp(),n=!1,a=s=>t.has(s);return{promise:r,middleware:()=>s=>u=>{s(u),e(u)&&!n&&gP(u)&&!a(u.meta.arg.slotId)&&(n=!0,t.add(u.meta.arg.slotId),o(u))}}}var pf=Gt(uf(),1);var De=(n=>(n.search="search",n.listing="listing",n.standalone="standalone",n.recommendation="recommendation",n))(De||{}),UP="recommendation-internal-options",Sn=Symbol.for(UP);var $=new Error("Failed to load reducers."),hn=class extends Error{constructor(){super(),this.name="ExpiredToken",this.message="The token being used to perform the request is expired."}},ys=class extends Error{constructor(){super(),this.name="InvalidControllerDefinition",this.message=`A controller must be defined for at least one solution type: ${Object.keys(De).map(t=>t.toLowerCase()).join(", ")}`}},Cn=class extends Error{constructor(t){super(),this.name="MissingControllerProps",this.message=`${t} props are required but were undefined. Ensure they are included when calling \`fetchStaticState\` or \`hydrateStaticState\`.`}},Ss=class extends Error{constructor(t){super(),this.name="MultipleRecommendationError",this.message=`Multiple recommendation controllers found for the same slotId: ${t}. Only one recommendation controller per slotId is supported.`}},Mo=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 lf(e){let t=[];for(let r in e){let o=encodeURIComponent(r),n=encodeURIComponent(e[r]);t.push(`${o}=${n}`)}return t.join("&")}function df(e){return typeof e!="object"||!e?!1:Object.values(e).every(jP)}function jP(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"}function mf(e){return e===429}var xn=class e{static async call(t){let r=_P(t),{logger:o}=t,n=await e.preprocessRequest(r,t);o.info(n,"Platform request");let{url:a,...i}=n,s=async()=>{let u=await fetch(a,i);if(mf(u.status))throw u;return u};try{let u=await(0,pf.backOff)(s,{retry:c=>{let l=c&&mf(c.status);return l&&o.info("Platform retrying request"),l}});switch(u.status){case 419:case 401:throw o.info("Platform renewing token"),new hn;case 404:throw new Mo(a,u.status);default:return o.info({response:u,requestInfo:n},"Platform response"),u}}catch(u){return u.message==="Failed to fetch"?new Mo(a):u}}static async preprocessRequest(t,r){let{origin:o,preprocessRequest:n,logger:a,requestMetadata:i}=r,{signal:s,...u}=t,c=Fr(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 c}};function ke(e,t="prod",r="platform"){let o=t==="prod"?"":t,n=r==="platform"?"":`.${r}`;return`https://${e}${n}.org${o}.coveo.com`}function nt(e,t="prod"){return`${ke(e,t)}/rest/search/v2`}function hs(e,t="prod"){return`${ke(e,t,"analytics")}/rest/organizations/${e}/events/v1`}function _P(e){let{url:t,method:r,requestParams:o,contentType:n,accessToken:a,signal:i}=e,s=e.method==="POST"||e.method==="PUT",u=$P(o,n);return{url:t,method:r,headers:{"Content-Type":n,Authorization:`Bearer ${a}`,...e.headers},...s&&{body:u},signal:i}}function $P(e,t){return t==="application/x-www-form-urlencoded"?df(e)?lf(e):"":JSON.stringify(e)}function zP(e){return{statusCode:e.statusCode,type:e.name,message:e.message}}function WP(e){return{statusCode:e.code,type:e.name,message:e.message,ignored:!0}}function Gl(e,t){if(t&&e.name==="AbortError")return{error:WP(e)};if(e instanceof Mo)return{error:zP(e)};throw e}var Rn=(e,t)=>({...ti(e,t),requestParams:KP(e)}),KP=e=>{let{trackingId:t,clientId:r,context:o,language:n,country:a,currency:i,page:s,perPage:u,facets:c,sort:l}=e;return{trackingId:t,clientId:r,context:o,language:n,country:a,currency:i,page:s,perPage:u,facets:c,sort:l}},ti=(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 ff=(e,t)=>({...ti(e,t),requestParams:GP(e)}),GP=e=>{let{slotId:t,trackingId:r,clientId:o,context:n,language:a,country:i,currency:s,page:u,perPage:c}=e;return{slotId:t,trackingId:r,clientId:o,context:n,language:a,country:i,currency:s,page:u,perPage:c}};var gf=e=>({...ti(e,"search/querySuggest"),requestParams:HP(e)}),HP=e=>{let{trackingId:t,query:r,clientId:o,context:n,language:a,country:i,currency:s}=e;return{trackingId:t,query:r,clientId:o,context:n,language:a,country:i,currency:s}};var Ue=e=>e.error!==void 0,Cs=class{constructor(t){this.options=t}async getProductListing(t){return this.query({...Rn(t,"listing"),...this.options})}async search(t){let r=Rn(t,"search");return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async getRecommendations(t){return this.query({...ff(t,"recommendations"),...this.options})}async productSuggestions(t){let r=Rn(t,"search/productSuggest");return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async querySuggest(t){let r=gf(t);return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async facetSearch(t,r){let o=Rn(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=Rn(t,"search");return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async query(t){let r=await xn.call(t);if(r instanceof Error)return Gl(r);let o=await r.json();return r.ok?{success:o}:{error:o}}};function xs(e,t="prod"){return`${ke(e,t)}/rest/organizations/${e}/commerce/v2`}var Rs=e=>e;var fd=require("@coveo/bueno");function Ve(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var YP=typeof Symbol=="function"&&Symbol.observable||"@@observable",yf=YP,Hl=()=>Math.random().toString(36).substring(7).split("").join("."),JP={INIT:`@@redux/INIT${Hl()}`,REPLACE:`@@redux/REPLACE${Hl()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Hl()}`},Fs=JP;function Ht(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 Yl(e,t,r){if(typeof e!="function")throw new Error(Ve(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(Ve(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(Ve(1));return r(Yl)(e,t)}let o=e,n=t,a=new Map,i=a,s=0,u=!1;function c(){i===a&&(i=new Map,a.forEach((C,S)=>{i.set(S,C)}))}function l(){if(u)throw new Error(Ve(3));return n}function d(C){if(typeof C!="function")throw new Error(Ve(4));if(u)throw new Error(Ve(5));let S=!0;c();let A=s++;return i.set(A,C),function(){if(S){if(u)throw new Error(Ve(6));S=!1,c(),i.delete(A),a=null}}}function p(C){if(!Ht(C))throw new Error(Ve(7));if(typeof C.type>"u")throw new Error(Ve(8));if(typeof C.type!="string")throw new Error(Ve(17));if(u)throw new Error(Ve(9));try{u=!0,n=o(n,C)}finally{u=!1}return(a=i).forEach(A=>{A()}),C}function m(C){if(typeof C!="function")throw new Error(Ve(10));o=C,p({type:Fs.REPLACE})}function f(){let C=d;return{subscribe(S){if(typeof S!="object"||S===null)throw new Error(Ve(11));function A(){let x=S;x.next&&x.next(l())}return A(),{unsubscribe:C(A)}},[yf](){return this}}}return p({type:Fs.INIT}),{dispatch:p,subscribe:d,getState:l,replaceReducer:m,[yf]:f}}function XP(e){Object.keys(e).forEach(t=>{let r=e[t];if(typeof r(void 0,{type:Fs.INIT})>"u")throw new Error(Ve(12));if(typeof r(void 0,{type:Fs.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Ve(13))})}function Fn(e){let t=Object.keys(e),r={};for(let i=0;i<t.length;i++){let s=t[i];typeof e[s]=="function"&&(r[s]=e[s])}let o=Object.keys(r),n,a;try{XP(r)}catch(i){a=i}return function(s={},u){if(a)throw a;let c=!1,l={};for(let d=0;d<o.length;d++){let p=o[d],m=r[p],f=s[p],h=m(f,u);if(typeof h>"u"){let C=u&&u.type;throw new Error(Ve(14))}l[p]=h,c=c||h!==f}return c=c||o.length!==Object.keys(s).length,c?l:s}}function Pn(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...o)=>t(r(...o)))}function Sf(...e){return t=>(r,o)=>{let n=t(r,o),a=()=>{throw new Error(Ve(15))},i={getState:n.getState,dispatch:(u,...c)=>a(u,...c)},s=e.map(u=>u(i));return a=Pn(...s)(n.dispatch),{...n,dispatch:a}}}function Ps(e){return Ht(e)&&"type"in e&&typeof e.type=="string"}var id=Symbol.for("immer-nothing"),ri=Symbol.for("immer-draftable"),at=Symbol.for("immer-state");function Ne(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Lo=Object.getPrototypeOf;function gt(e){return!!e&&!!e[at]}function it(e){return e?Ff(e)||Array.isArray(e)||!!e[ri]||!!e.constructor?.[ri]||si(e)||ci(e):!1}var ZP=Object.prototype.constructor.toString();function Ff(e){if(!e||typeof e!="object")return!1;let t=Lo(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)===ZP}function sd(e){return gt(e)||Ne(15,e),e[at].base_}function oi(e,t){Bo(e)===0?Reflect.ownKeys(e).forEach(r=>{t(r,e[r],e)}):e.forEach((r,o)=>t(o,r,e))}function Bo(e){let t=e[at];return t?t.type_:Array.isArray(e)?1:si(e)?2:ci(e)?3:0}function ni(e,t){return Bo(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Jl(e,t){return Bo(e)===2?e.get(t):e[t]}function Pf(e,t,r){let o=Bo(e);o===2?e.set(t,r):o===3?e.add(r):e[t]=r}function eA(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function si(e){return e instanceof Map}function ci(e){return e instanceof Set}function Qo(e){return e.copy_||e.base_}function ed(e,t){if(si(e))return new Map(e);if(ci(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);let r=Ff(e);if(t===!0||t==="class_only"&&!r){let o=Object.getOwnPropertyDescriptors(e);delete o[at];let n=Reflect.ownKeys(o);for(let a=0;a<n.length;a++){let i=n[a],s=o[i];s.writable===!1&&(s.writable=!0,s.configurable=!0),(s.get||s.set)&&(o[i]={configurable:!0,writable:!0,enumerable:s.enumerable,value:e[i]})}return Object.create(Lo(e),o)}else{let o=Lo(e);if(o!==null&&r)return{...e};let n=Object.create(o);return Object.assign(n,e)}}function bs(e,t=!1){return Es(e)||gt(e)||!it(e)||(Bo(e)>1&&(e.set=e.add=e.clear=e.delete=tA),Object.freeze(e),t&&Object.entries(e).forEach(([r,o])=>bs(o,!0))),e}function tA(){Ne(2)}function Es(e){return Object.isFrozen(e)}var td={};function Uo(e){let t=td[e];return t||Ne(0,e),t}function rA(e,t){td[e]||(td[e]=t)}var ai;function Af(){return ai}function oA(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function hf(e,t){t&&(Uo("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function rd(e){od(e),e.drafts_.forEach(nA),e.drafts_=null}function od(e){e===ai&&(ai=e.parent_)}function Cf(e){return ai=oA(ai,e)}function nA(e){let t=e[at];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function xf(e,t){t.unfinalizedDrafts_=t.drafts_.length;let r=t.drafts_[0];return e!==void 0&&e!==r?(r[at].modified_&&(rd(t),Ne(4)),it(e)&&(e=As(t,e),t.parent_||vs(t,e)),t.patches_&&Uo("Patches").generateReplacementPatches_(r[at].base_,e,t.patches_,t.inversePatches_)):e=As(t,r,[]),rd(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==id?e:void 0}function As(e,t,r){if(Es(t))return t;let o=t[at];if(!o)return oi(t,(n,a)=>Rf(e,o,t,n,a,r)),t;if(o.scope_!==e)return t;if(!o.modified_)return vs(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),oi(a,(s,u)=>Rf(e,o,n,s,u,r,i)),vs(e,n,!1),r&&e.patches_&&Uo("Patches").generatePatches_(o,r,e.patches_,e.inversePatches_)}return o.copy_}function Rf(e,t,r,o,n,a,i){if(gt(n)){let s=a&&t&&t.type_!==3&&!ni(t.assigned_,o)?a.concat(o):void 0,u=As(e,n,s);if(Pf(r,o,u),gt(u))e.canAutoFreeze_=!1;else return}else i&&r.add(n);if(it(n)&&!Es(n)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;As(e,n),(!t||!t.scope_.parent_)&&typeof o!="symbol"&&Object.prototype.propertyIsEnumerable.call(r,o)&&vs(e,n)}}function vs(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&bs(t,r)}function aA(e,t){let r=Array.isArray(e),o={type_:r?1:0,scope_:t?t.scope_:Af(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1},n=o,a=cd;r&&(n=[o],a=ii);let{revoke:i,proxy:s}=Proxy.revocable(n,a);return o.draft_=s,o.revoke_=i,s}var cd={get(e,t){if(t===at)return e;let r=Qo(e);if(!ni(r,t))return iA(e,r,t);let o=r[t];return e.finalized_||!it(o)?o:o===Xl(e.base_,t)?(Zl(e),e.copy_[t]=ad(o,e)):o},has(e,t){return t in Qo(e)},ownKeys(e){return Reflect.ownKeys(Qo(e))},set(e,t,r){let o=vf(Qo(e),t);if(o?.set)return o.set.call(e.draft_,r),!0;if(!e.modified_){let n=Xl(Qo(e),t),a=n?.[at];if(a&&a.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(eA(r,n)&&(r!==void 0||ni(e.base_,t)))return!0;Zl(e),nd(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 Xl(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Zl(e),nd(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let r=Qo(e),o=Reflect.getOwnPropertyDescriptor(r,t);return o&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:o.enumerable,value:r[t]}},defineProperty(){Ne(11)},getPrototypeOf(e){return Lo(e.base_)},setPrototypeOf(){Ne(12)}},ii={};oi(cd,(e,t)=>{ii[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});ii.deleteProperty=function(e,t){return ii.set.call(this,e,t,void 0)};ii.set=function(e,t,r){return cd.set.call(this,e[0],t,r,e[0])};function Xl(e,t){let r=e[at];return(r?Qo(r):e)[t]}function iA(e,t,r){let o=vf(t,r);return o?"value"in o?o.value:o.get?.call(e.draft_):void 0}function vf(e,t){if(!(t in e))return;let r=Lo(e);for(;r;){let o=Object.getOwnPropertyDescriptor(r,t);if(o)return o;r=Lo(r)}}function nd(e){e.modified_||(e.modified_=!0,e.parent_&&nd(e.parent_))}function Zl(e){e.copy_||(e.copy_=ed(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var sA=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,...c){return i.produce(u,l=>r.call(this,l,...c))}}typeof r!="function"&&Ne(6),o!==void 0&&typeof o!="function"&&Ne(7);let n;if(it(t)){let a=Cf(this),i=ad(t,void 0),s=!0;try{n=r(i),s=!1}finally{s?rd(a):od(a)}return hf(a,o),xf(n,a)}else if(!t||typeof t!="object"){if(n=r(t),n===void 0&&(n=t),n===id&&(n=void 0),this.autoFreeze_&&bs(n,!0),o){let a=[],i=[];Uo("Patches").generateReplacementPatches_(t,n,a,i),o(a,i)}return n}else Ne(1,t)},this.produceWithPatches=(t,r)=>{if(typeof t=="function")return(i,...s)=>this.produceWithPatches(i,u=>t(u,...s));let o,n;return[this.produce(t,r,(i,s)=>{o=i,n=s}),o,n]},typeof e?.autoFreeze=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof e?.useStrictShallowCopy=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){it(e)||Ne(8),gt(e)&&(e=bf(e));let t=Cf(this),r=ad(e,void 0);return r[at].isManual_=!0,od(t),r}finishDraft(e,t){let r=e&&e[at];(!r||!r.isManual_)&&Ne(9);let{scope_:o}=r;return hf(o,t),xf(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=Uo("Patches").applyPatches_;return gt(e)?o(e,t):this.produce(e,n=>o(n,t))}};function ad(e,t){let r=si(e)?Uo("MapSet").proxyMap_(e,t):ci(e)?Uo("MapSet").proxySet_(e,t):aA(e,t);return(t?t.scope_:Af()).drafts_.push(r),r}function bf(e){return gt(e)||Ne(10,e),Ef(e)}function Ef(e){if(!it(e)||Es(e))return e;let t=e[at],r;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=ed(e,t.scope_.immer_.useStrictShallowCopy_)}else r=ed(e,!0);return oi(r,(o,n)=>{Pf(r,o,Ef(n))}),t&&(t.finalized_=!1),r}function wf(){let t="replace",r="add",o="remove";function n(p,m,f,h){switch(p.type_){case 0:case 2:return i(p,m,f,h);case 1:return a(p,m,f,h);case 3:return s(p,m,f,h)}}function a(p,m,f,h){let{base_:C,assigned_:S}=p,A=p.copy_;A.length<C.length&&([C,A]=[A,C],[f,h]=[h,f]);for(let y=0;y<C.length;y++)if(S[y]&&A[y]!==C[y]){let x=m.concat([y]);f.push({op:t,path:x,value:d(A[y])}),h.push({op:t,path:x,value:d(C[y])})}for(let y=C.length;y<A.length;y++){let x=m.concat([y]);f.push({op:r,path:x,value:d(A[y])})}for(let y=A.length-1;C.length<=y;--y){let x=m.concat([y]);h.push({op:o,path:x})}}function i(p,m,f,h){let{base_:C,copy_:S}=p;oi(p.assigned_,(A,y)=>{let x=Jl(C,A),I=Jl(S,A),v=y?ni(C,A)?t:r:o;if(x===I&&v===t)return;let R=m.concat(A);f.push(v===o?{op:v,path:R}:{op:v,path:R,value:I}),h.push(v===r?{op:o,path:R}:v===o?{op:r,path:R,value:d(x)}:{op:t,path:R,value:d(x)})})}function s(p,m,f,h){let{base_:C,copy_:S}=p,A=0;C.forEach(y=>{if(!S.has(y)){let x=m.concat([A]);f.push({op:o,path:x,value:y}),h.unshift({op:r,path:x,value:y})}A++}),A=0,S.forEach(y=>{if(!C.has(y)){let x=m.concat([A]);f.push({op:r,path:x,value:y}),h.unshift({op:o,path:x,value:y})}A++})}function u(p,m,f,h){f.push({op:t,path:[],value:m===id?void 0:m}),h.push({op:t,path:[],value:p})}function c(p,m){return m.forEach(f=>{let{path:h,op:C}=f,S=p;for(let I=0;I<h.length-1;I++){let v=Bo(S),R=h[I];typeof R!="string"&&typeof R!="number"&&(R=""+R),(v===0||v===1)&&(R==="__proto__"||R==="constructor")&&Ne(19),typeof S=="function"&&R==="prototype"&&Ne(19),S=Jl(S,R),typeof S!="object"&&Ne(18,h.join("/"))}let A=Bo(S),y=l(f.value),x=h[h.length-1];switch(C){case t:switch(A){case 2:return S.set(x,y);case 3:Ne(16);default:return S[x]=y}case r:switch(A){case 1:return x==="-"?S.push(y):S.splice(x,0,y);case 2:return S.set(x,y);case 3:return S.add(y);default:return S[x]=y}case o:switch(A){case 1:return S.splice(x,1);case 2:return S.delete(x);case 3:return S.delete(f.value);default:return delete S[x]}default:Ne(17,C)}}),p}function l(p){if(!it(p))return p;if(Array.isArray(p))return p.map(l);if(si(p))return new Map(Array.from(p.entries()).map(([f,h])=>[f,l(h)]));if(ci(p))return new Set(Array.from(p).map(l));let m=Object.create(Lo(p));for(let f in p)m[f]=l(p[f]);return ni(p,ri)&&(m[ri]=p[ri]),m}function d(p){return gt(p)?l(p):p}rA("Patches",{applyPatches_:c,generatePatches_:n,generateReplacementPatches_:u})}var yt=new sA,Ar=yt.produce,ws=yt.produceWithPatches.bind(yt),Jk=yt.setAutoFreeze.bind(yt),Xk=yt.setUseStrictShallowCopy.bind(yt),ud=yt.applyPatches.bind(yt),Zk=yt.createDraft.bind(yt),eV=yt.finishDraft.bind(yt);function cA(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function uA(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function lA(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 If=e=>Array.isArray(e)?e:[e];function dA(e){let t=Array.isArray(e[0])?e[0]:e;return lA(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function mA(e,t){let r=[],{length:o}=e;for(let n=0;n<o;n++)r.push(e[n].apply(null,t));return r}var oV=Symbol();var nV=Object.getPrototypeOf({});var pA=class{constructor(e){this.value=e}deref(){return this.value}},fA=typeof WeakRef<"u"?WeakRef:pA,gA=0,Tf=1;function Is(){return{s:gA,v:void 0,o:null,p:null}}function An(e,t={}){let r=Is(),{resultEqualityCheck:o}=t,n,a=0;function i(){let s=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=s.o;f===null&&(s.o=f=new WeakMap);let h=f.get(m);h===void 0?(s=Is(),f.set(m,s)):s=h}else{let f=s.p;f===null&&(s.p=f=new Map);let h=f.get(m);h===void 0?(s=Is(),f.set(m,s)):s=h}}let c=s,l;if(s.s===Tf)l=s.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 fA(l):l}return c.s=Tf,c.v=l,l}return i.clearCache=()=>{r=Is(),i.resetResultsCount()},i.resultsCount=()=>a,i.resetResultsCount=()=>{a=0},i}function Of(e,...t){let r=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,o=(...n)=>{let a=0,i=0,s,u={},c=n.pop();typeof c=="object"&&(u=c,c=n.pop()),cA(c,`createSelector expects an output function after the inputs, but received: [${typeof c}]`);let l={...r,...u},{memoize:d,memoizeOptions:p=[],argsMemoize:m=An,argsMemoizeOptions:f=[],devModeChecks:h={}}=l,C=If(p),S=If(f),A=dA(n),y=d(function(){return a++,c.apply(null,arguments)},...C),x=!0,I=m(function(){i++;let R=mA(A,arguments);return s=y.apply(null,R),s},...S);return Object.assign(I,{resultFunc:c,memoizedResultFunc:y,dependencies:A,dependencyRecomputations:()=>i,resetDependencyRecomputations:()=>{i=0},lastResult:()=>s,recomputations:()=>a,resetRecomputations:()=>{a=0},memoize:d,argsMemoize:m})};return Object.assign(o,{withTypes:()=>o}),o}var Q=Of(An),yA=Object.assign((e,t=Q)=>{uA(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,s,u)=>(i[r[u]]=s,i),{}))},{withTypes:()=>yA});function qf(e){return({dispatch:r,getState:o})=>n=>a=>typeof a=="function"?a(r,o,e):n(a)}var Df=qf(),kf=qf;var SA=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Pn:Pn.apply(null,arguments)},fV=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}},hA=e=>e&&typeof e.match=="function";function g(e,t){function r(...o){if(t){let n=t(...o);if(!n)throw new Error(Qt(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=>Ps(o)&&o.type===e,r}var Lf=class ui extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,ui.prototype)}static get[Symbol.species](){return ui}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new ui(...t[0].concat(this)):new ui(...t.concat(this))}};function Vf(e){return it(e)?Ar(e,()=>{}):e}function Nf(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function CA(e){return typeof e=="boolean"}var xA=()=>function(t){let{thunk:r=!0,immutableCheck:o=!0,serializableCheck:n=!0,actionCreatorCheck:a=!0}=t??{},i=new Lf;return r&&(CA(r)?i.push(Df):i.push(kf(r.extraArgument))),i},li="RTK_autoBatch",bn=()=>e=>({payload:e,meta:{[li]:!0}}),Mf=e=>t=>{setTimeout(t,e)},RA=(e={type:"raf"})=>t=>(...r)=>{let o=t(...r),n=!0,a=!1,i=!1,s=new Set,u=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Mf(10):e.type==="callback"?e.queueNotification:Mf(e.timeout),c=()=>{i=!1,a&&(a=!1,s.forEach(l=>l()))};return Object.assign({},o,{subscribe(l){let d=()=>n&&l(),p=o.subscribe(d);return s.add(l),()=>{p(),s.delete(l)}},dispatch(l){try{return n=!l?.meta?.[li],a=!n,a&&(i||(i=!0,u(c))),o.dispatch(l)}finally{n=!0}}})},FA=e=>function(r){let{autoBatch:o=!0}=r??{},n=new Lf(e);return o&&n.push(RA(typeof o=="object"?o:void 0)),n};function Bf(e){let t=xA(),{reducer:r=void 0,middleware:o,devTools:n=!0,preloadedState:a=void 0,enhancers:i=void 0}=e||{},s;if(typeof r=="function")s=r;else if(Ht(r))s=Fn(r);else throw new Error(Qt(1));let u;typeof o=="function"?u=o(t):u=t();let c=Pn;n&&(c=SA({trace:!1,...typeof n=="object"&&n}));let l=Sf(...u),d=FA(l),p=typeof i=="function"?i(d):d(),m=c(...p);return Yl(s,a,m)}function Uf(e){let t={},r=[],o,n={addCase(a,i){let s=typeof a=="string"?a:a.type;if(!s)throw new Error(Qt(28));if(s in t)throw new Error(Qt(29));return t[s]=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 PA(e){return typeof e=="function"}function j(e,t){let[r,o,n]=Uf(t),a;if(PA(e))a=()=>Vf(e());else{let s=Vf(e);a=()=>s}function i(s=a(),u){let c=[r[u.type],...o.filter(({matcher:l})=>l(u)).map(({reducer:l})=>l)];return c.filter(l=>!!l).length===0&&(c=[n]),c.reduce((l,d)=>{if(d)if(gt(l)){let m=d(l,u);return m===void 0?l:m}else{if(it(l))return Ar(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},s)}return i.getInitialState=a,i}var jf=(e,t)=>hA(e)?e.match(t):e(t);function Yt(...e){return t=>e.some(r=>jf(r,t))}function vn(...e){return t=>e.every(r=>jf(r,t))}function Os(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 di(e){return typeof e[0]=="function"&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function qs(...e){return e.length===0?t=>Os(t,["pending"]):di(e)?Yt(...e.map(t=>t.pending)):qs()(e[0])}function jo(...e){return e.length===0?t=>Os(t,["rejected"]):di(e)?Yt(...e.map(t=>t.rejected)):jo()(e[0])}function mi(...e){let t=r=>r&&r.meta&&r.meta.rejectedWithValue;return e.length===0?vn(jo(...e),t):di(e)?vn(jo(...e),t):mi()(e[0])}function vr(...e){return e.length===0?t=>Os(t,["fulfilled"]):di(e)?Yt(...e.map(t=>t.fulfilled)):vr()(e[0])}function Ds(...e){return e.length===0?t=>Os(t,["pending","fulfilled","rejected"]):di(e)?Yt(...e.flatMap(t=>[t.pending,t.rejected,t.fulfilled])):Ds()(e[0])}var AA="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",ks=(e=21)=>{let t="",r=e;for(;r--;)t+=AA[Math.random()*64|0];return t},vA=["name","message","stack","code"],ld=class{constructor(e,t){Be(this,"_type");this.payload=e,this.meta=t}},Qf=class{constructor(e,t){Be(this,"_type");this.payload=e,this.meta=t}},bA=e=>{if(typeof e=="object"&&e!==null){let t={};for(let r of vA)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,c,l,d)=>({payload:u,meta:{...d||{},arg:l,requestId:c,requestStatus:"fulfilled"}})),a=g(t+"/pending",(u,c,l)=>({payload:void 0,meta:{...l||{},arg:c,requestId:u,requestStatus:"pending"}})),i=g(t+"/rejected",(u,c,l,d,p)=>({payload:d,error:(o&&o.serializeError||bA)(u||"Rejected"),meta:{...p||{},arg:l,requestId:c,rejectedWithValue:!!d,requestStatus:"rejected",aborted:u?.name==="AbortError",condition:u?.name==="ConditionError"}}));function s(u){return(c,l,d)=>{let p=o?.idGenerator?o.idGenerator(u):ks(),m=new AbortController,f,h;function C(A){h=A,m.abort()}let S=async function(){let A;try{let x=o?.condition?.(u,{getState:l,extra:d});if(wA(x)&&(x=await x),x===!1||m.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let I=new Promise((v,R)=>{f=()=>{R({name:"AbortError",message:h||"Aborted"})},m.signal.addEventListener("abort",f)});c(a(p,u,o?.getPendingMeta?.({requestId:p,arg:u},{getState:l,extra:d}))),A=await Promise.race([I,Promise.resolve(r(u,{dispatch:c,getState:l,extra:d,requestId:p,signal:m.signal,abort:C,rejectWithValue:(v,R)=>new ld(v,R),fulfillWithValue:(v,R)=>new Qf(v,R)})).then(v=>{if(v instanceof ld)throw v;return v instanceof Qf?n(v.payload,p,u,v.meta):n(v,p,u)})])}catch(x){A=x instanceof ld?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(A)&&A.meta.condition||c(A),A}();return Object.assign(S,{abort:C,requestId:p,arg:u,unwrap(){return S.then(EA)}})}}return Object.assign(s,{pending:a,rejected:i,fulfilled:n,settled:Yt(i,n),typePrefix:t})}return e.withTypes=()=>e,e})();function EA(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function wA(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var _f=Symbol.for("rtk-slice-createasyncthunk"),CV={[_f]:_};function IA(e,t){return`${e}/${t}`}function TA({creators:e}={}){let t=e?.asyncThunk?.[_f];return function(o){let{name:n,reducerPath:a=n}=o;if(!n)throw new Error(Qt(11));typeof process<"u";let i=(typeof o.reducers=="function"?o.reducers(qA()):o.reducers)||{},s=Object.keys(i),u={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},c={addCase(A,y){let x=typeof A=="string"?A:A.type;if(!x)throw new Error(Qt(12));if(x in u.sliceCaseReducersByType)throw new Error(Qt(13));return u.sliceCaseReducersByType[x]=y,c},addMatcher(A,y){return u.sliceMatchers.push({matcher:A,reducer:y}),c},exposeAction(A,y){return u.actionCreators[A]=y,c},exposeCaseReducer(A,y){return u.sliceCaseReducersByName[A]=y,c}};s.forEach(A=>{let y=i[A],x={reducerName:A,type:IA(n,A),createNotation:typeof o.reducers=="function"};kA(y)?NA(x,y,c,t):DA(x,y,c)});function l(){let[A={},y=[],x=void 0]=typeof o.extraReducers=="function"?Uf(o.extraReducers):[o.extraReducers],I={...A,...u.sliceCaseReducersByType};return j(o.initialState,v=>{for(let R in I)v.addCase(R,I[R]);for(let R of u.sliceMatchers)v.addMatcher(R.matcher,R.reducer);for(let R of y)v.addMatcher(R.matcher,R.reducer);x&&v.addDefaultCase(x)})}let d=A=>A,p=new Map,m;function f(A,y){return m||(m=l()),m(A,y)}function h(){return m||(m=l()),m.getInitialState()}function C(A,y=!1){function x(v){let R=v[A];return typeof R>"u"&&y&&(R=h()),R}function I(v=d){let R=Nf(p,y,()=>new WeakMap);return Nf(R,v,()=>{let P={};for(let[b,T]of Object.entries(o.selectors??{}))P[b]=OA(T,v,h,y);return P})}return{reducerPath:A,getSelectors:I,get selectors(){return I(x)},selectSlice:x}}let S={name:n,reducer:f,actions:u.actionCreators,caseReducers:u.sliceCaseReducersByName,getInitialState:h,...C(a),injectInto(A,{reducerPath:y,...x}={}){let I=y??a;return A.inject({reducerPath:I,reducer:f},x),{...S,...C(I,!0)}}};return S}}function OA(e,t,r,o){function n(a,...i){let s=t(a);return typeof s>"u"&&o&&(s=r()),e(s,...i)}return n.unwrapped=e,n}var _o=TA();function qA(){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 DA({type:e,reducerName:t,createNotation:r},o,n){let a,i;if("reducer"in o){if(r&&!VA(o))throw new Error(Qt(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 kA(e){return e._reducerDefinitionType==="asyncThunk"}function VA(e){return e._reducerDefinitionType==="reducerWithPrepare"}function NA({type:e,reducerName:t},r,o,n){if(!n)throw new Error(Qt(18));let{payloadCreator:a,fulfilled:i,pending:s,rejected:u,settled:c,options:l}=r,d=n(e,a,l);o.exposeAction(t,d),i&&o.addCase(d.fulfilled,i),s&&o.addCase(d.pending,s),u&&o.addCase(d.rejected,u),c&&o.addMatcher(d.settled,c),o.exposeCaseReducer(t,{fulfilled:i||Ts,pending:s||Ts,rejected:u||Ts,settled:c||Ts})}function Ts(){}var $f="listener",zf="completed",Wf="cancelled",xV=`task-${Wf}`,RV=`task-${zf}`,FV=`${$f}-${Wf}`,PV=`${$f}-${zf}`;var{assign:Kf}=Object;var dd="listenerMiddleware";var MA=Kf(g(`${dd}/add`),{withTypes:()=>MA}),AV=g(`${dd}/removeAll`),QA=Kf(g(`${dd}/remove`),{withTypes:()=>QA});var vV=Symbol.for("rtk-state-proxy-original");function Qt(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 st=require("@coveo/bueno"),D=new st.StringValue({required:!0,emptyAllowed:!1}),ae=new st.StringValue({required:!1,emptyAllowed:!1}),Ce=new st.StringValue({required:!0,emptyAllowed:!0}),Gf=new st.StringValue({required:!1,emptyAllowed:!0}),Vs=new st.ArrayValue({each:D,required:!0}),Hf=new st.StringValue({required:!1,emptyAllowed:!1,regex:/^\d+\.\d+\.\d+$/}),Je=({message:e,name:t,stack:r})=>({message:e,name:t,stack:r}),ve=(e,t)=>{if("required"in t)return{payload:new st.Schema({value:t}).validate({value:e}).value};let n=new st.RecordValue({options:{required:!0},values:t}).validate(e);if(n)throw new st.SchemaValidationError(n);return{payload:e}},F=(e,t)=>{try{return ve(e,t)}catch(r){return{payload:e,error:Je(r)}}},ct=(e,t,r,o)=>{let n=`Check the initialState of ${o}`;return Yf(e,t,r,n,"Controller initialization error")},Xe=(e,t,r,o)=>{let n=`Check the options of ${o}`;return Yf(e,t,r,n,"Controller initialization error")},Yf=(e,t,r,o,n)=>{try{return t.validate(r,o)}catch(a){throw e.logger.error(a,n),a}};var Ze=require("@coveo/bueno");var zr="3.19.0",Jf=["@coveo/atomic","@coveo/quantic"];var md=()=>ae,Xf=()=>D,$o=g("configuration/updateBasicConfiguration",e=>F(e,{accessToken:ae,environment:new Ze.StringValue({required:!1,constrainTo:["prod","hipaa","stg","dev"]}),organizationId:ae})),Zf=g("configuration/updateSearchConfiguration",e=>F(e,{proxyBaseUrl:new Ze.StringValue({required:!1,url:!0}),pipeline:new Ze.StringValue({required:!1,emptyAllowed:!0}),searchHub:ae,timezone:ae,locale:ae,authenticationProviders:new Ze.ArrayValue({required:!1,each:D})})),En={enabled:new Ze.BooleanValue({default:!0}),originContext:md(),originLevel2:md(),originLevel3:md(),proxyBaseUrl:new Ze.StringValue({required:!1,url:!0}),runtimeEnvironment:new Ze.Value,anonymous:new Ze.BooleanValue({default:!1}),deviceId:ae,userDisplayName:ae,documentLocation:ae,trackingId:ae,analyticsMode:new Ze.StringValue({constrainTo:["legacy","next"],required:!1,default:"next"}),source:new Ze.RecordValue({options:{required:!1},values:Jf.reduce((e,t)=>(e[t]=Hf,e),{})})},pd=g("configuration/updateAnalyticsConfiguration",e=>F(e,En)),Ns=g("configuration/analytics/disable"),Ms=g("configuration/analytics/enable"),eg=g("configuration/analytics/originlevel2",e=>F(e,{originLevel2:Xf()})),tg=g("configuration/analytics/originlevel3",e=>F(e,{originLevel3:Xf()}));var wn=g("commerce/configuration/updateBasicConfiguration",e=>F(e,{accessToken:ae,environment:new fd.StringValue({required:!1,constrainTo:["prod","hipaa","stg","dev"]}),organizationId:ae})),In=g("commerce/configuration/updateProxyBaseUrl",e=>F(e,{proxyBaseUrl:new fd.StringValue({required:!1,url:!0})})),Tn=g("commerce/configuration/updateAnalyticsConfiguration",e=>F(e,{enabled:En.enabled,proxyBaseUrl:En.proxyBaseUrl,source:En.source,trackingId:En.trackingId})),Qs=g("commerce/configuration/analytics/disable"),Ls=g("commerce/configuration/analytics/enable");var Wr=require("@coveo/bueno");var rg=()=>({accessToken:"",environment:"prod",organizationId:"",analytics:{enabled:!0,trackingId:"",source:{}},commerce:{}});var gd=j(rg(),e=>e.addCase(wn,(t,r)=>{og(t,r.payload)}).addCase($o,(t,r)=>{og(t,r.payload)}).addCase(In,(t,r)=>{LA(t,r.payload)}).addCase(Tn,(t,r)=>{BA(t,r.payload)}).addCase(Qs,t=>{t.analytics.enabled=!1}).addCase(Ls,t=>{t.analytics.enabled=!0}));function og(e,t){(0,Wr.isNullOrUndefined)(t.accessToken)||(e.accessToken=t.accessToken),e.environment=t.environment??"prod",(0,Wr.isNullOrUndefined)(t.organizationId)||(e.organizationId=t.organizationId)}function LA(e,t){(0,Wr.isNullOrUndefined)(t.proxyBaseUrl)||(e.commerce.apiBaseUrl=t.proxyBaseUrl)}function BA(e,t){(0,Wr.isNullOrUndefined)(t.enabled)||(e.analytics.enabled=t.enabled),(0,Wr.isNullOrUndefined)(t.proxyBaseUrl)||(e.analytics.apiBaseUrl=t.proxyBaseUrl),(0,Wr.isNullOrUndefined)(t.source)||(e.analytics.source=t.source),(0,Wr.isNullOrUndefined)(t.trackingId)||(e.analytics.trackingId=t.trackingId)}function On(e){return e.currency}var ng=(e,t)=>({currency:On(t.commerceContext),products:UA(t.cart),transaction:e}),ag=(e,t)=>({currency:On(t.commerceContext),...e}),zo=Q(e=>e.cart,e=>e.cartItems,(e,t)=>t.map(r=>e[r])),UA=Q(zo,e=>e.map(({quantity:t,...r})=>({quantity:t,product:r})));var Lt=require("@coveo/bueno");var yd={productId:D,quantity:new Lt.NumberValue({required:!0,min:0}),name:new Lt.StringValue({required:!1}),price:new Lt.NumberValue({required:!1,min:0})},Sd=new Lt.ArrayValue({each:new Lt.RecordValue({values:{...yd}})}),hd={items:Sd},ig=new Lt.Schema(hd);var Kr=g("commerce/cart/setItems",e=>F(e,Sd)),qn=g("commerce/cart/updateItemQuantity",e=>F(e,yd)),Dn=g("commerce/cart/purchase"),Bs=_("commerce/cart/emit/purchaseEvent",async(e,{extra:t,getState:r})=>{let o=ng(e,r()),{relay:n}=t;n.emit("ec.purchase",o)}),Us=_("commerce/cart/emit/cartActionEvent",async(e,{extra:t,getState:r})=>{let o=ag(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),s=t!==i;return t=i,s}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(),s;return o()&&(t=JSON.stringify(this.state),s=e.subscribe(()=>{n(this.state)&&r.forEach(u=>u())})),r.set(i,a),()=>{r.delete(i),o()&&s&&s()}},get state(){return{}}}}function sg(e,t){return e.cart[Wo(t)]}var cg=Q(zo,e=>e.reduce((t,r)=>t+r.quantity,0)),ug=Q(zo,e=>e.reduce((t,r)=>t+r.price*r.quantity,0));function lg(e,t={}){if(!jA(e))throw $;let{dispatch:r}=e,o=W(e),n=()=>e[U].cart,a={...t.initialState};ct(e,ig,a,"buildCart"),a.items!==void 0&&r(Kr(a.items));function i(l,d){return d?d.quantity!==l.quantity:!0}function s(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 c(l,d){let{quantity:p,...m}=l,f=s(l,d),h=d?Math.abs(p-d.quantity):p;return{action:f,quantity:h,product:m}}return{...o,empty:function(){for(let l of zo(n()))this.updateItemQuantity({...l,quantity:0})},purchase(l){r(Bs(l)),r(Dn())},updateItemQuantity(l){let d=sg(n(),l);!d&&l.quantity<=0||u(l,d)||(i(l,d)&&r(Us(c(l,d))),r(qn(l)))},get state(){let l=n();return{items:zo(l),totalQuantity:cg(l),totalPrice:ug(l)}}}}function Wo(e){return`${e.productId},${e.name},${e.price}`}function jA(e){return e.addReducers({cart:kn}),!0}var js=()=>({cartItems:[],cart:{},purchasedItems:[],purchased:{}}),dg=e=>pg(e.cartItems,e.cart),mg=e=>pg(e.purchasedItems,e.purchased);function pg(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 kn=j(js(),e=>{e.addCase(Kr,(t,{payload:r})=>{let{cart:o,cartItems:n}=r.reduce((a,i)=>{let s=Wo(i);return{cartItems:[...a.cartItems,s],cart:{...a.cart,[s]:i},purchasedItems:[],purchased:{}}},js());fg(t,n,o)}).addCase(qn,(t,{payload:r})=>{let o=Wo(r);if(!(o in t.cart)){_A(r,t);return}if(r.quantity<=0){$A(r,t);return}t.cart[o]=r}).addCase(Dn,t=>{zA(t);let{cart:r,cartItems:o}=js();fg(t,o,r)})});function fg(e,t,r){e.cartItems=t,e.cart=r}function _A(e,t){if(e.quantity<=0)return;let r=Wo(e);t.cartItems=[...t.cartItems,r],t.cart[r]=e}function $A(e,t){let r=Wo(e);t.cartItems=t.cartItems.filter(o=>o!==r),delete t.cart[r]}function zA(e){for(let t of e.cartItems){if(t in e.purchased){e.purchased[t].quantity+=e.cart[t].quantity;continue}e.purchasedItems=[...e.purchasedItems,t],e.purchased[t]=e.cart[t]}}var Jt=require("@coveo/bueno");var WA=Intl.supportedValuesOf("currency"),KA=new Jt.StringValue({required:!0,emptyAllowed:!1,constrainTo:WA}),Cd={url:D},xd={latitude:new Jt.NumberValue({min:-90,max:90,required:!0}),longitude:new Jt.NumberValue({min:-180,max:180,required:!0})},pi={language:D,country:D,currency:KA,view:new Jt.RecordValue({options:{required:!0},values:Cd}),location:new Jt.RecordValue({options:{required:!1},values:xd})},gg=new Jt.Schema(pi);var de=g("commerce/context/set",e=>F(e,pi)),pe=g("commerce/context/setView",e=>F(e,Cd)),Vn=g("commerce/context/setLocation",e=>F(e,xd));var yg=()=>({language:"",country:"",currency:"",view:{url:""}});var Xt=j(yg(),e=>{e.addCase(de,(t,{payload:r})=>r).addCase(pe,(t,{payload:r})=>{t.view=r}).addCase(Vn,(t,{payload:r})=>{t.location=r})});var _s=()=>({correctedQuery:"",corrections:[],originalQuery:""});var Jo=require("@coveo/bueno");var At=g("breadcrumb/deselectAll"),Gr=g("breadcrumb/deselectAllNonBreadcrumbs");var Hr=Q(e=>e.source,e=>Object.entries(e).map(([t,r])=>`${t}@${r}`).concat(`@coveo/headless@${zr}`));var Yr=(e,t)=>{let{view:r,location:o,...n}=e.commerceContext;return{accessToken:e.configuration.accessToken,url:e.configuration.commerce.apiBaseUrl??xs(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:dg(e.cart),source:Hr(e.configuration.analytics)}}};var Bt=require("@coveo/bueno");var Zt=require("@coveo/bueno"),vt=(r=>(r.Relevance="relevance",r.Fields="fields",r))(vt||{}),Nn=(r=>(r.Ascending="asc",r.Descending="desc",r))(Nn||{}),br=()=>({by:"relevance"});var lM=new Zt.RecordValue({options:{required:!1},values:{by:new Zt.EnumValue({enum:vt,required:!0}),fields:new Zt.ArrayValue({each:new Zt.RecordValue({values:{name:new Zt.StringValue,direction:new Zt.EnumValue({enum:Nn})}})})}});var Rd=e=>({by:"fields",fields:e}),Sg=new Bt.RecordValue({options:{required:!1},values:{by:new Bt.EnumValue({enum:vt,required:!0}),fields:new Bt.ArrayValue({each:new Bt.RecordValue({values:{field:new Bt.StringValue({required:!0}),direction:new Bt.EnumValue({enum:Nn}),displayName:new Bt.StringValue}})})}});var $s=(e,t,r)=>({...Yr(e,t),...GA(e,r)}),GA=(e,t)=>{let r=t?e.commercePagination?.recommendations[t]:e.commercePagination?.principal;return r&&{page:r.page,...r.perPage&&{perPage:r.perPage}}};var bt=(e,t)=>({...$s(e,t),facets:[...HA(e)],...e.commerceSort&&{sort:YA(e.commerceSort.appliedSort)}});function HA(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 YA(e){return e.by==="relevance"?{sortCriteria:"relevance"}:{sortCriteria:"fields",fields:e.fields.map(({name:t,direction:r})=>({field:t,direction:r}))}}var Mn=require("@coveo/bueno");var Ko=g("commerce/facets/core/updateNumberOfValues",e=>F(e,{facetId:D,numberOfValues:new Mn.NumberValue({required:!0,min:1})})),Go=g("commerce/facets/core/updateIsFieldExpanded",e=>F(e,{facetId:D,isFieldExpanded:new Mn.BooleanValue({required:!0})})),xe=g("commerce/facets/core/clearAll"),je=g("commerce/facets/core/deselectAllValues",e=>F(e,{facetId:D})),Ho=g("commerce/facets/core/updateFreezeCurrentValues",e=>F(e,{facetId:D,freezeCurrentValues:new Mn.BooleanValue({required:!0})})),Qn=g("commerce/facets/core/updateAutoSelectionForAll",e=>F(e,{allow:new Mn.BooleanValue({required:!0})}));var Fd=require("@coveo/bueno");var zs={slotId:Gf},JA={...zs,pageSize:new Fd.NumberValue({required:!0,min:0})},Er=g("commerce/pagination/setPageSize",e=>F(e,JA)),XA={...zs,page:new Fd.NumberValue({required:!0,min:0})},er=g("commerce/pagination/selectPage",e=>F(e,XA)),Jr=g("commerce/pagination/nextPage",e=>F(e,zs)),Xr=g("commerce/pagination/previousPage",e=>F(e,zs)),Ln=g("commerce/pagination/registerRecommendationsSlot",e=>F(e,{slotId:D}));var Zr=Q(e=>e.commercePagination?.principal.perPage||0,e=>e),Ws=Q((e,t)=>e.commercePagination?.recommendations[t]?.perPage||0,e=>e),eo=Q(e=>e.commercePagination?.principal.totalEntries||0,e=>e),Ks=Q((e,t)=>e.commercePagination?.recommendations[t]?.totalEntries||0,e=>e),Gs=Q(e=>e.commercePagination?.principal.page||0,e=>e),hg=Q((e,t)=>e.commercePagination?.recommendations[t]?.page||0,e=>e);var Cg=require("@coveo/bueno");var Re=g("commerce/query/update",e=>F(e,{query:new Cg.StringValue}));var Ed=require("@coveo/bueno");var Hs=require("@coveo/bueno");var to=g("commerce/triggers/query/updateIgnore",e=>F(e,{q:new Hs.StringValue({emptyAllowed:!0,required:!0})})),Bn=g("commerce/triggers/query/applyModification",e=>F(e,new Hs.RecordValue({values:{originalQuery:ae,modification:ae}})));var vd=require("@coveo/bueno");function Pd(e,t,r){if(e===void 0)return{};let o=t(e);return o!==r?{q:o}:{}}function Ad(e,t,r){if(e===void 0)return{};let o=t(e);return o!==r?{sortCriteria:o}:{}}function tr(e,t,r,o){if(e===void 0)return{};let n=Object.entries(e).filter(([a])=>t(a)).map(([a,{request:i}])=>{let s=r(i);return s.length?{[a]:s}:{}}).reduce((a,i)=>({...a,...i}),{});return Object.keys(n).length?{[o]:n}:{}}function rr(e){let{activeValue:t,ancestryMap:r}=ZA(e);return t?ev(t,r):[]}function ZA(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 ev(e,t){let r=[];if(!e)return[];let o=e;do r.unshift(o),o=t.get(o);while(o);return r}function xg(){return{principal:ro(),recommendations:{}}}function ro(){return{page:0,perPage:0,totalEntries:0,totalPages:0}}function Yo(){return{appliedSort:br(),availableSorts:[br()]}}function Ys(e){return{...tv(e?.commercePagination,t=>t.principal.page,ro().page),...rv(e?.commercePagination,t=>t.principal.perPage,ro().perPage),...Ad(e?.commerceSort,t=>t.appliedSort,Yo().appliedSort),...tr(e.commerceFacetSet,oo(e,"regular"),ov,"f"),...tr(e.commerceFacetSet,oo(e,"regular"),nv,"fExcluded"),...tr(e.commerceFacetSet,oo(e,"location"),av,"lf"),...tr(e.commerceFacetSet,oo(e,"hierarchical"),iv,"cf"),...tr(e.commerceFacetSet,oo(e,"dateRange"),Rg,"df"),...tr(e.commerceFacetSet,oo(e,"dateRange"),Fg,"dfExcluded"),...tr(e.commerceFacetSet,oo(e,"numericalRange"),Rg,"nf"),...tr(e.commerceFacetSet,oo(e,"numericalRange"),Fg,"nfExcluded"),...Pg("selected",e.manualNumericFacetSet),...Pg("excluded",e.manualNumericFacetSet)}}function tv(e,t,r){if(e===void 0)return{};let o=t(e);return o!==r?{page:o}:{}}function rv(e,t,r){if(e===void 0)return{};let o=t(e);return o!==r?{perPage:o}:{}}function ov(e){return e.values.filter(t=>t.state==="selected").map(t=>t.value)}function nv(e){return e.values.filter(t=>t.state==="excluded").map(t=>t.value)}function av(e){return e.values.filter(t=>t.state==="selected").map(t=>t.value)}function Rg(e){return e.values.filter(t=>t.state==="selected")}function Fg(e){return e.values.filter(t=>t.state==="excluded")}function Pg(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 iv(e){return rr(e.values).map(r=>r.value)}function oo(e,t){return r=>e.commerceFacetSet[r].request.type===t}var Js=()=>({query:""});var n0=Q(e=>e[U].commerceSearch.responseId,e=>e),bd=Q(e=>e.commerceSearch.responseId,e=>e),Ag=Q(e=>e.commerceSearch.requestId,e=>e),fi=Q(e=>e.commerceSearch?.products.length||0,e=>e),vg=Q(e=>({total:eo(e),current:fi(e)}),({current:e,total:t})=>e<t),bg=Q(e=>e.commerceSearch?.isLoading,e=>(0,vd.isNullOrUndefined)(e)?!1:e),Eg=Q(e=>e.commerceSearch?.error,e=>e??null),Xs=Q(e=>e.commerceQuery?.query,e=>e??""),sv=Q(e=>e.commerceSearch?.queryExecuted,e=>e),wg=(e,t)=>(0,vd.isNullOrUndefined)(t.queryCorrection?.correctedQuery)?Xs(e):t.queryCorrection.correctedQuery,Ig=e=>({...Pd(e?.commerceQuery,t=>t.query,Js().query),...Ys(e)});function Tg(e){return{query:sv(e)||""}}var gi=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 Ue(t.response)?this.rejectWithValue(t.response.error):null}async processQueryCorrectionsOrContinue(t){let r=this.getState(),o=this.getSuccessResponse(t);if(!o||!r.didYouMean)return null;let{queryCorrection:n}=o;if(!(!(0,Ed.isNullOrUndefined)(n)&&!(0,Ed.isNullOrUndefined)(n.correctedQuery)))return null;let{correctedQuery:i,originalQuery:s}=o.queryCorrection;return this.onUpdateQueryForCorrection(i??""),{...t,response:{...o},queryExecuted:wg(r,o),originalQuery:s??""}}async processQueryTriggersOrContinue(t){let r=this.getSuccessResponse(t);if(!r)return null;let o=r.triggers.find(s=>s.type==="query")?.content||"";if(!o)return null;if(this.getState().triggers?.queryModification.queryToIgnore===o)return this.dispatch(to({q:""})),null;let a=this.getCurrentQuery(),i=await this.automaticallyRetryQueryWithTriggerModification(o);return Ue(i.response)?this.rejectWithValue(i.response.error):{...i,response:{...i.response.success},originalQuery:a}}async automaticallyRetryQueryWithTriggerModification(t){return this.dispatch(Bn({newQuery:t,originalQuery:this.getCurrentQuery()})),this.onUpdateQueryForCorrection(t),await this.fetchFromAPI({...bt(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 Ue(t.response)?null:t.response.success}get extra(){return this.config.extra}onUpdateQueryForCorrection(t){this.dispatch(Re({query:t}))}};var X=_("commerce/search/executeSearch",async(e,t)=>{let{getState:r}=t,o=r(),{navigatorContext:n}=t.extra,a=bt(o,n),i=Xs(o),s=new gi(t),u=await s.fetchFromAPI({...a,query:i});return s.process(u)}),no=_("commerce/search/fetchMoreProducts",async(e,t)=>{let{getState:r}=t,o=r(),{navigatorContext:n}=t.extra;if(!vg(o))return null;let i=Zr(o),u=fi(o)/i,c=Xs(o),l=bt(o,n),d=new gi(t),p=await d.fetchFromAPI({...l,query:c,page:u});return d.process(p)}),Un=_("commerce/search/prepareForSearchWithQuery",(e,t)=>{let{dispatch:r}=t;F(e,{query:new Jo.StringValue,clearFilters:new Jo.BooleanValue}),e.clearFilters&&(r(xe()),r(Gr())),r(Qn({allow:!0})),r(Re({query:e.query})),r(er({page:0}))}),jn=_("commerce/search/fetchInstantProducts",async(e,{getState:t,rejectWithValue:r,extra:o})=>{let n=t(),{apiClient:a,navigatorContext:i}=o,{q:s}=e,u=await a.productSuggestions({...Yr(n,i),query:s});return Ue(u)?r(u.error):{response:{...u.success,products:u.success.products}}}),cv={child:new Jo.RecordValue({options:{required:!0},values:{permanentid:new Jo.StringValue({required:!0})}})},_n=g("commerce/search/promoteChildToParent",e=>F(e,cv));function Og(){return{wasCorrectedTo:"",queryCorrection:_s(),originalQuery:""}}var Zs=j(Og(),e=>{e.addCase(X.pending,t=>{t.queryCorrection=_s(),t.wasCorrectedTo=""}).addCase(X.fulfilled,(t,r)=>{let{queryCorrection:o}=r.payload.response;t.originalQuery=r.payload.originalQuery,t.wasCorrectedTo=o?.correctedQuery??"",t.queryCorrection={correctedQuery:o?.correctedQuery??o?.corrections[0]?.correctedQuery??"",wordCorrections:o?.corrections[0]?.wordCorrections??[]}})});var ye=require("@coveo/bueno");var H=D;var or=require("@coveo/bueno");var uv={state:new or.Value({required:!0}),numberOfResults:new or.NumberValue({required:!0,min:0}),value:new or.StringValue({required:!0,emptyAllowed:!0}),path:new or.ArrayValue({required:!0,each:D}),moreValuesAvailable:new or.BooleanValue({required:!1})};function yi(e){e.children.forEach(t=>{yi(t)}),ve({state:e.state,numberOfResults:e.numberOfResults,value:e.value,path:e.path,moreValuesAvailable:e.moreValuesAvailable},uv)}var $n={facetId:H,field:D,tabs:new ye.RecordValue({options:{required:!1},values:{included:new ye.ArrayValue({each:new ye.StringValue}),excluded:new ye.ArrayValue({each:new ye.StringValue})}}),activeTab:new ye.StringValue({required:!1}),delimitingCharacter:new ye.StringValue({required:!1,emptyAllowed:!0}),filterFacetCount:new ye.BooleanValue({required:!1}),injectionDepth:new ye.NumberValue({required:!1,min:0}),numberOfValues:new ye.NumberValue({required:!1,min:1}),sortCriteria:new ye.Value({required:!1}),basePath:new ye.ArrayValue({required:!1,each:D}),filterByBasePath:new ye.BooleanValue({required:!1})},zn=5,qg=g("categoryFacet/register",e=>F(e,$n)),Dg=g("categoryFacet/toggleSelectValue",e=>{try{return ve(e.facetId,D),yi(e.selection),{payload:e,error:null}}catch(t){return{payload:e,error:Je(t)}}}),kg=g("categoryFacet/deselectAll",e=>F(e,$n.facetId)),W0=g("categoryFacet/updateNumberOfValues",e=>F(e,{facetId:$n.facetId,numberOfValues:$n.numberOfValues})),K0=g("categoryFacet/updateSortCriterion",e=>F(e,{facetId:$n.facetId,criterion:new ye.Value})),G0=g("categoryFacet/updateBasePath",e=>F(e,{facetId:$n.facetId,basePath:new ye.ArrayValue({each:D})}));var Kn=require("@coveo/bueno");var Wn=require("@coveo/bueno");var Si={facetId:H,captions:new Wn.RecordValue({options:{required:!1}}),numberOfValues:new Wn.NumberValue({required:!1,min:1}),query:new Wn.StringValue({required:!1,emptyAllowed:!0})};var lv={path:new Kn.ArrayValue({required:!0,each:D}),displayValue:Ce,rawValue:Ce,count:new Kn.NumberValue({required:!0,min:0})},nr=g("categoryFacet/selectSearchResult",e=>F(e,{facetId:H,value:new Kn.RecordValue({values:lv})})),ec=g("categoryFacetSearch/register",e=>F(e,Si));var tc=require("@coveo/bueno");var Vg={facetId:H,value:new tc.RecordValue({values:{displayValue:Ce,rawValue:Ce,count:new tc.NumberValue({required:!0,min:0})}})},rc=g("facetSearch/register",e=>F(e,Si)),ao=g("facetSearch/update",e=>F(e,Si)),St=g("facetSearch/toggleSelectValue",e=>F(e,Vg)),Ut=g("facetSearch/toggleExcludeValue",e=>F(e,Vg));var Ng=require("@coveo/bueno");var wr=g("facetOptions/update",(e={freezeFacetOrder:!0})=>F(e,{freezeFacetOrder:new Ng.BooleanValue({required:!1})})),wd=g("facetOptions/facet/enable",e=>F(e,H)),Ir=g("facetOptions/facet/disable",e=>F(e,H));var dv=g("history/undo"),mv=g("history/redo"),ar=g("history/snapshot"),pQ=_("history/back",async(e,{dispatch:t})=>{t(dv()),await t(we())}),fQ=_("history/forward",async(e,{dispatch:t})=>{t(mv()),await t(we())}),we=_("history/change",async(e,{getState:t})=>t().history.present);var Se=require("@coveo/bueno"),oc={q:new Se.StringValue,enableQuerySyntax:new Se.BooleanValue,aq:new Se.StringValue,cq:new Se.StringValue,firstResult:new Se.NumberValue({min:0}),numberOfResults:new Se.NumberValue({min:0}),sortCriteria:new Se.StringValue,f:new Se.RecordValue,fExcluded:new Se.RecordValue,cf:new Se.RecordValue,nf:new Se.RecordValue,mnf:new Se.RecordValue,df:new Se.RecordValue,debug:new Se.BooleanValue,sf:new Se.RecordValue,tab:new Se.StringValue,af:new Se.RecordValue};var Me=g("searchParameters/restore",e=>F(e,oc));var Co=require("@coveo/bueno");function Tr(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 E(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 s(l){try{c(o.next(l))}catch(d){i(d)}}function u(l){try{c(o.throw(l))}catch(d){i(d)}}function c(l){l.done?a(l.value):n(l.value).then(s,u)}c((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 Od(){return typeof window<"u"}function $d(){return typeof navigator<"u"}function Gn(){return typeof document<"u"}function qd(){try{return typeof localStorage<"u"}catch{return!1}}function pv(){try{return typeof sessionStorage<"u"}catch{return!1}}function Yg(){return $d()&&navigator.cookieEnabled}var fv=[ee.click,ee.custom,ee.search,ee.view],gv=(e,t)=>fv.indexOf(e)!==-1?Object.assign({language:Gn()?document.documentElement.lang:"unknown",userAgent:$d()?navigator.userAgent:"unknown"},t):t,xi=class e{static set(t,r,o){var n,a,i,s;o&&(a=new Date,a.setTime(a.getTime()+o)),s=window.location.hostname,s.indexOf(".")===-1?Mg(t,r,a):(i=s.split("."),n=i[i.length-2]+"."+i[i.length-1],Mg(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 Mg(e,t,r,o){document.cookie=`${e}=${t}`+(r?`;expires=${r.toUTCString()}`:"")+(o?`;domain=${o}`:"")+";path=/;SameSite=Lax"}function yv(){return qd()?localStorage:Yg()?new Ri:pv()?sessionStorage:new Yn}var Ri=class e{getItem(t){return xi.get(`${e.prefix}${t}`)}removeItem(t){xi.erase(`${e.prefix}${t}`)}setItem(t,r,o){xi.set(`${e.prefix}${t}`,r,o)}};Ri.prefix="coveo_";var Dd=class{constructor(){this.cookieStorage=new Ri}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)}},Yn=class{getItem(t){return null}removeItem(t){}setItem(t,r){}},hi="__coveo.analytics.history",Jg=20,Xg=1e3*60,Zg=75,Jn=class{constructor(t){this.store=t||yv()}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 E(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 E(this,void 0,void 0,function*(){let t=yield this.getHistoryWithInternalTimeAsync();return this.stripEmptyQueries(this.stripInternalTime(t))})}getHistoryWithInternalTime(){try{let t=this.store.getItem(hi);return t&&typeof t=="string"?JSON.parse(t):[]}catch{return[]}}getHistoryWithInternalTimeAsync(){return E(this,void 0,void 0,function*(){try{let t=yield this.store.getItem(hi);return t?JSON.parse(t):[]}catch{return[]}})}setHistory(t){try{this.store.setItem(hi,JSON.stringify(t.slice(0,Jg)))}catch{}}clear(){try{this.store.removeItem(hi)}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,Zg)),t}isValidEntry(t){let r=this.getMostRecentElement();return r&&r.value==t.value?(t.internalTime||0)-(r.internalTime||0)>Xg:!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))}},ey=Object.freeze({__proto__:null,HistoryStore:Jn,MAX_NUMBER_OF_HISTORY_ELEMENTS:Jg,MAX_VALUE_SIZE:Zg,MIN_THRESHOLD_FOR_DUPLICATE_VALUE:Xg,STORE_KEY:hi,default:Jn}),Sv=(e,t)=>E(void 0,void 0,void 0,function*(){return e===ee.view?(yield hv(t.contentIdValue),Object.assign({location:window.location.toString(),referrer:document.referrer,title:document.title},t)):t}),hv=e=>E(void 0,void 0,void 0,function*(){let t=new Jn,r={name:"PageView",value:e,time:new Date().toISOString()};yield t.addElementAsync(r)}),nc,Cv=new Uint8Array(16);function xv(){if(!nc&&(nc=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!nc))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return nc(Cv)}var Rv=/^(?:[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 ic(e){return typeof e=="string"&&Rv.test(e)}var Qe=[];for(let e=0;e<256;++e)Qe.push((e+256).toString(16).slice(1));function ty(e,t=0){return(Qe[e[t+0]]+Qe[e[t+1]]+Qe[e[t+2]]+Qe[e[t+3]]+"-"+Qe[e[t+4]]+Qe[e[t+5]]+"-"+Qe[e[t+6]]+Qe[e[t+7]]+"-"+Qe[e[t+8]]+Qe[e[t+9]]+"-"+Qe[e[t+10]]+Qe[e[t+11]]+Qe[e[t+12]]+Qe[e[t+13]]+Qe[e[t+14]]+Qe[e[t+15]]).toLowerCase()}function Fv(e){if(!ic(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 Pv(e){e=unescape(encodeURIComponent(e));let t=[];for(let r=0;r<e.length;++r)t.push(e.charCodeAt(r));return t}var Av="6ba7b810-9dad-11d1-80b4-00c04fd430c8",vv="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function bv(e,t,r){function o(n,a,i,s){var u;if(typeof n=="string"&&(n=Pv(n)),typeof a=="string"&&(a=Fv(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 c=new Uint8Array(16+n.length);if(c.set(a),c.set(n,a.length),c=r(c),c[6]=c[6]&15|t,c[8]=c[8]&63|128,i){s=s||0;for(let l=0;l<16;++l)i[s+l]=c[l];return i}return ty(c)}try{o.name=e}catch{}return o.DNS=Av,o.URL=vv,o}var Ev=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Qg={randomUUID:Ev};function Xo(e,t,r){if(Qg.randomUUID&&!t&&!e)return Qg.randomUUID();e=e||{};let o=e.random||(e.rng||xv)();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 ty(o)}function wv(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 Id(e,t){return e<<t|e>>>32-t}function Iv(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 s=0;s<i.length;++s)e.push(i.charCodeAt(s))}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 s=new Uint32Array(16);for(let u=0;u<16;++u)s[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]=s}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 s=new Uint32Array(80);for(let m=0;m<16;++m)s[m]=a[i][m];for(let m=16;m<80;++m)s[m]=Id(s[m-3]^s[m-8]^s[m-14]^s[m-16],1);let u=r[0],c=r[1],l=r[2],d=r[3],p=r[4];for(let m=0;m<80;++m){let f=Math.floor(m/20),h=Id(u,5)+wv(f,c,l,d)+p+t[f]+s[m]>>>0;p=d,d=l,l=Id(c,30)>>>0,c=u,u=h}r[0]=r[0]+u>>>0,r[1]=r[1]+c>>>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 Tv=bv("v5",80,Iv),Lg=Tv,ry="2.30.44",Bg=e=>`${e.protocol}//${e.hostname}${e.pathname.indexOf("/")===0?e.pathname:`/${e.pathname}`}${e.search}`,Ci={pageview:"pageview",event:"event"},sc=class{constructor({client:t,uuidGenerator:r=Xo}){this.client=t,this.uuidGenerator=r}},kd=class extends sc{constructor({client:t,uuidGenerator:r=Xo}){super({client:t,uuidGenerator:r}),this.actionData={},this.pageViewId=r(),this.nextPageViewId=this.pageViewId,this.currentLocation=Bg(window.location),this.lastReferrer=Gn()?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:Gn()?document.title:"",encoding:Gn()?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===Ci.pageview&&(this.nextPageViewId=this.uuidGenerator(),this.hasSentFirstPageView=!0)}getNextValues(t,r){return{pageViewId:t===Ci.pageview?this.nextPageViewId:this.pageViewId,referrer:t===Ci.pageview&&this.hasSentFirstPageView?this.currentLocation:this.lastReferrer,location:t===Ci.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 Bg(window.location)}},io=class e{constructor(t,r){if(!ic(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 ic(a)?new e(a,Number.parseInt(n)*1e3):null}};io.cvo_cid="cvo_cid";io.expirationTime=120;var Vd=class extends sc{constructor({client:t,uuidGenerator:r=Xo}){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 E(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(io.cvo_cid,new io(o,Date.now()).toString()),r.toString()}catch{throw new Error("Invalid URL provided")}})}acceptFrom(t){this.client.setAcceptedLinkReferrers(t)}};Vd.Id="link";var Et=Object.keys;function ac(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}var Td=128,oy=192,Ug=224,jg=240;function Ov(e){return(e&248)===jg?4:(e&jg)===Ug?3:(e&Ug)===oy?2:1}function qv(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&Td)!=Td)break;if(r-=3,(o&oy)!=Td){t-r>=Ov(o)*3&&(r=t);break}}return e.substring(0,r)}var Nd={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"},Dv=Et(Nd).map(e=>Nd[e]),kv=[...Dv].join("|"),Vv=new RegExp(`^(${kv}$)`),Nv={svcAction:"svc_action",svcActionData:"svc_action_data"},Mv=e=>Et(e).filter(t=>e[t]!==void 0).reduce((t,r)=>{let o=Nd[r]||r;return Object.assign(Object.assign({},t),{[o]:e[r]})},{}),Qv=e=>Vv.test(e),Lv=[Qv],_g={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",price:"pr",quantity:"qt",coupon:"cc",position:"ps",group:"group"},$g={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",position:"ps",price:"pr",group:"group"},_e={action:"pa",list:"pal",listSource:"pls"},cc={id:"ti",revenue:"tr",tax:"tt",shipping:"ts",coupon:"tcc",affiliation:"ta",step:"cos",option:"col"},Bv=["loyaltyCardId","loyaltyTier","thirdPartyPersona","companyName","favoriteStore","storeName","userIndustry","userRole","userDepartment","businessUnit"],Md={id:"quoteId",affiliation:"quoteAffiliation"},Qd={id:"reviewId",rating:"reviewRating",comment:"reviewComment"},Uv={add:_e,bookmark_add:_e,bookmark_remove:_e,click:_e,checkout:_e,checkout_option:_e,detail:_e,impression:_e,remove:_e,refund:Object.assign(Object.assign({},_e),cc),purchase:Object.assign(Object.assign({},_e),cc),quickview:_e,quote:Object.assign(Object.assign({},_e),Md),review:Object.assign(Object.assign({},_e),Qd)},jv=Et(_g).map(e=>_g[e]),_v=Et($g).map(e=>$g[e]),$v=Et(_e).map(e=>_e[e]),zv=Et(cc).map(e=>cc[e]),Wv=Et(Qd).map(e=>Qd[e]),Kv=Et(Md).map(e=>Md[e]),Gv=[...jv,"custom"].join("|"),Hv=[..._v,"custom"].join("|"),ny="(pr[0-9]+)",ay="(il[0-9]+pi[0-9]+)",Yv=new RegExp(`^${ny}(${Gv})$`),Jv=new RegExp(`^(${ay}(${Hv}))|(il[0-9]+nm)$`),Xv=new RegExp(`^(${$v.join("|")})$`),Zv=new RegExp(`^(${zv.join("|")})$`),eb=new RegExp(`^${ny}custom$`),tb=new RegExp(`^${ay}custom$`),rb=new RegExp(`^(${[...Bv,...Wv,...Kv].join("|")})$`),ob=e=>Yv.test(e),nb=e=>Jv.test(e),ab=e=>Xv.test(e),ib=e=>Zv.test(e),sb=e=>rb.test(e),cb=[nb,ob,ab,ib,sb],ub=[eb,tb],lb={anonymizeIp:"aip"},db={eventCategory:"ec",eventAction:"ea",eventLabel:"el",eventValue:"ev",page:"dp",visitorId:"cid",clientId:"cid",userId:"uid",currencyCode:"cu"},mb={hitType:"t",pageViewId:"pid",encoding:"de",location:"dl",referrer:"dr",screenColor:"sd",screenResolution:"sr",title:"dt",userAgent:"ua",language:"ul",eventId:"z",time:"tm"},pb=["contentId","contentIdKey","contentType","searchHub","tab","searchUid","permanentId","contentLocale","trackingId"],fb=Object.assign(Object.assign(Object.assign(Object.assign({},lb),db),mb),pb.reduce((e,t)=>Object.assign(Object.assign({},e),{[t]:t}),{})),Ld=Object.assign(Object.assign({},fb),Nv),gb=e=>{let t=!!e.action&&Uv[e.action]||{};return Et(e).reduce((r,o)=>{let n=t[o]||Ld[o]||o;return Object.assign(Object.assign({},r),{[n]:e[o]})},{})},yb=Et(Ld).map(e=>Ld[e]),Sb=e=>yb.indexOf(e)!==-1,hb=e=>e==="custom",Cb=e=>[...cb,...Lv,Sb,hb].some(t=>t(e)),xb=e=>Et(e).reduce((t,r)=>{let o=Rb(r);return o?Object.assign(Object.assign({},t),Fb(o,e[r])):Object.assign(Object.assign({},t),{[r]:e[r]})},{}),Rb=e=>{let t;return[...ub].every(r=>{var o;return t=(o=r.exec(e))===null||o===void 0?void 0:o[1],!t}),t},Fb=(e,t)=>Et(t).reduce((r,o)=>Object.assign(Object.assign({},r),{[`${e}${o}`]:t[o]}),{}),Bd=class{constructor(t){this.opts=t}sendEvent(t,r){return E(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:s}=yield this.preProcessRequestAsPotentialJSONString(`${o}/analytics/${t}?${a}`,r,n),u=this.encodeForEventType(t,s),c=new Blob([u],{type:"application/x-www-form-urlencoded"});navigator.sendBeacon(i,c)})}isAvailable(){return"sendBeacon"in navigator}deleteHttpCookieVisitorId(){return Promise.resolve()}preProcessRequestAsPotentialJSONString(t,r,o){return E(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:s,body:u}=i;n=s||t;try{a=JSON.parse(u)}catch(c){console.error("Unable to process the request body as a JSON string",c)}}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 E(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}},Ud=class{sendEvent(t,r){return E(this,void 0,void 0,function*(){return Promise.resolve()})}deleteHttpCookieVisitorId(){return E(this,void 0,void 0,function*(){return Promise.resolve()})}},zg=globalThis.fetch,uc=class{constructor(t){this.opts=t}sendEvent(t,r){return E(this,void 0,void 0,function*(){let{baseUrl:o,visitorIdProvider:n,preprocessRequest:a}=this.opts,i=this.shouldAppendVisitorId(t)?yield this.getVisitorIdParam():"",s={url:`${o}/analytics/${t}${i}`,credentials:"include",mode:"cors",headers:this.getHeaders(),method:"POST",body:JSON.stringify(r)},u=Object.assign(Object.assign({},s),a?yield a(s,"analyticsFetch"):{}),{url:c}=u,l=Tr(u,["url"]),d;try{d=yield zg(c,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 E(this,void 0,void 0,function*(){let{baseUrl:t}=this.opts,r=`${t}/analytics/visit`;yield zg(r,{headers:this.getHeaders(),method:"DELETE"})})}shouldAppendVisitorId(t){return[ee.click,ee.custom,ee.search,ee.view].indexOf(t)!==-1}getVisitorIdParam(){return E(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"})}},jd=class{constructor(t,r){qd()&&Yg()?this.storage=new Dd:qd()?this.storage=localStorage:(console.warn("BrowserRuntime detected no valid storage available.",this),this.storage=new Yn),this.client=new uc(t),this.beaconClient=new Bd(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}},_d=class{constructor(t,r){this.storage=r||new Yn,this.client=new uc(t)}getClientDependingOnEventType(t){return this.client}},lc=class{constructor(){this.storage=new Yn,this.client=new Ud}getClientDependingOnEventType(t){return this.client}},Pb="xx",Ab=e=>e?.startsWith(Pb)||!1,vb=`
19
+ If you are trying to access the inner state... Don't`),Reflect.get(t,r,o)}});var Vo=(e,t=5)=>e+Math.random().toString(36).substring(2,2+t);function Jp(e){return Array.isArray(e)}function ds(e){return e.trim()===""}function Xp(e){let t={};for(let[r,o]of e)t[r]=o;return t}function ms(e,t){return Object.fromEntries(Object.entries(e).map(([r,o])=>[r,t(o,r)]))}function ps(e,t){return Object.fromEntries(Object.entries(e).filter(([r,o])=>t(o,r)))}function Fr(e){if(typeof e!="object"||!e)return e;try{return JSON.parse(JSON.stringify(e))}catch{return e}}function Zp(){let e=null,t=null;return{promise:new Promise((o,n)=>{e=o,t=n}),resolve:e,reject:t}}function fs(e){let{promise:t,resolve:r}=Zp();return{promise:t,middleware:()=>n=>a=>{n(a),e(a)&&r(a)}}}function gP(e){return e==null?!1:typeof e=="object"&&"meta"in e?e.meta?.arg?.slotId!==void 0:!1}function ef(e,t){let{promise:r,resolve:o}=Zp(),n=!1,a=s=>t.has(s);return{promise:r,middleware:()=>s=>u=>{s(u),e(u)&&!n&&gP(u)&&!a(u.meta.arg.slotId)&&(n=!0,t.add(u.meta.arg.slotId),o(u))}}}var pf=Gt(uf(),1);var De=(n=>(n.search="search",n.listing="listing",n.standalone="standalone",n.recommendation="recommendation",n))(De||{}),UP="recommendation-internal-options",Sn=Symbol.for(UP);var $=new Error("Failed to load reducers."),hn=class extends Error{constructor(){super(),this.name="ExpiredToken",this.message="The token being used to perform the request is expired."}},ys=class extends Error{constructor(){super(),this.name="InvalidControllerDefinition",this.message=`A controller must be defined for at least one solution type: ${Object.keys(De).map(t=>t.toLowerCase()).join(", ")}`}},Cn=class extends Error{constructor(t){super(),this.name="MissingControllerProps",this.message=`${t} props are required but were undefined. Ensure they are included when calling \`fetchStaticState\` or \`hydrateStaticState\`.`}},Ss=class extends Error{constructor(t){super(),this.name="MultipleRecommendationError",this.message=`Multiple recommendation controllers found for the same slotId: ${t}. Only one recommendation controller per slotId is supported.`}},Mo=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 lf(e){let t=[];for(let r in e){let o=encodeURIComponent(r),n=encodeURIComponent(e[r]);t.push(`${o}=${n}`)}return t.join("&")}function df(e){return typeof e!="object"||!e?!1:Object.values(e).every(jP)}function jP(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"}function mf(e){return e===429}var xn=class e{static async call(t){let r=_P(t),{logger:o}=t,n=await e.preprocessRequest(r,t);o.info(n,"Platform request");let{url:a,...i}=n,s=async()=>{let u=await fetch(a,i);if(mf(u.status))throw u;return u};try{let u=await(0,pf.backOff)(s,{retry:c=>{let l=c&&mf(c.status);return l&&o.info("Platform retrying request"),l}});switch(u.status){case 419:case 401:throw o.info("Platform renewing token"),new hn;case 404:throw new Mo(a,u.status);default:return o.info({response:u,requestInfo:n},"Platform response"),u}}catch(u){return u.message==="Failed to fetch"?new Mo(a):u}}static async preprocessRequest(t,r){let{origin:o,preprocessRequest:n,logger:a,requestMetadata:i}=r,{signal:s,...u}=t,c=Fr(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 c}};function ke(e,t="prod",r="platform"){let o=t==="prod"?"":t,n=r==="platform"?"":`.${r}`;return`https://${e}${n}.org${o}.coveo.com`}function nt(e,t="prod"){return`${ke(e,t)}/rest/search/v2`}function hs(e,t="prod"){return`${ke(e,t,"analytics")}/rest/organizations/${e}/events/v1`}function _P(e){let{url:t,method:r,requestParams:o,contentType:n,accessToken:a,signal:i}=e,s=e.method==="POST"||e.method==="PUT",u=$P(o,n);return{url:t,method:r,headers:{"Content-Type":n,Authorization:`Bearer ${a}`,...e.headers},...s&&{body:u},signal:i}}function $P(e,t){return t==="application/x-www-form-urlencoded"?df(e)?lf(e):"":JSON.stringify(e)}function zP(e){return{statusCode:e.statusCode,type:e.name,message:e.message}}function WP(e){return{statusCode:e.code,type:e.name,message:e.message,ignored:!0}}function Gl(e,t){if(t&&e.name==="AbortError")return{error:WP(e)};if(e instanceof Mo)return{error:zP(e)};throw e}var Rn=(e,t)=>({...ti(e,t),requestParams:KP(e)}),KP=e=>{let{trackingId:t,clientId:r,context:o,language:n,country:a,currency:i,page:s,perPage:u,facets:c,sort:l}=e;return{trackingId:t,clientId:r,context:o,language:n,country:a,currency:i,page:s,perPage:u,facets:c,sort:l}},ti=(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 ff=(e,t)=>({...ti(e,t),requestParams:GP(e)}),GP=e=>{let{slotId:t,trackingId:r,clientId:o,context:n,language:a,country:i,currency:s,page:u,perPage:c}=e;return{slotId:t,trackingId:r,clientId:o,context:n,language:a,country:i,currency:s,page:u,perPage:c}};var gf=e=>({...ti(e,"search/querySuggest"),requestParams:HP(e)}),HP=e=>{let{trackingId:t,query:r,clientId:o,context:n,language:a,country:i,currency:s}=e;return{trackingId:t,query:r,clientId:o,context:n,language:a,country:i,currency:s}};var Ue=e=>e.error!==void 0,Cs=class{constructor(t){this.options=t}async getProductListing(t){return this.query({...Rn(t,"listing"),...this.options})}async search(t){let r=Rn(t,"search");return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async getRecommendations(t){return this.query({...ff(t,"recommendations"),...this.options})}async productSuggestions(t){let r=Rn(t,"search/productSuggest");return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async querySuggest(t){let r=gf(t);return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async facetSearch(t,r){let o=Rn(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=Rn(t,"search");return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async query(t){let r=await xn.call(t);if(r instanceof Error)return Gl(r);let o=await r.json();return r.ok?{success:o}:{error:o}}};function xs(e,t="prod"){return`${ke(e,t)}/rest/organizations/${e}/commerce/v2`}var Rs=e=>e;var fd=require("@coveo/bueno");function Ve(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var YP=typeof Symbol=="function"&&Symbol.observable||"@@observable",yf=YP,Hl=()=>Math.random().toString(36).substring(7).split("").join("."),JP={INIT:`@@redux/INIT${Hl()}`,REPLACE:`@@redux/REPLACE${Hl()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Hl()}`},Fs=JP;function Ht(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 Yl(e,t,r){if(typeof e!="function")throw new Error(Ve(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(Ve(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(Ve(1));return r(Yl)(e,t)}let o=e,n=t,a=new Map,i=a,s=0,u=!1;function c(){i===a&&(i=new Map,a.forEach((C,S)=>{i.set(S,C)}))}function l(){if(u)throw new Error(Ve(3));return n}function d(C){if(typeof C!="function")throw new Error(Ve(4));if(u)throw new Error(Ve(5));let S=!0;c();let A=s++;return i.set(A,C),function(){if(S){if(u)throw new Error(Ve(6));S=!1,c(),i.delete(A),a=null}}}function p(C){if(!Ht(C))throw new Error(Ve(7));if(typeof C.type>"u")throw new Error(Ve(8));if(typeof C.type!="string")throw new Error(Ve(17));if(u)throw new Error(Ve(9));try{u=!0,n=o(n,C)}finally{u=!1}return(a=i).forEach(A=>{A()}),C}function m(C){if(typeof C!="function")throw new Error(Ve(10));o=C,p({type:Fs.REPLACE})}function f(){let C=d;return{subscribe(S){if(typeof S!="object"||S===null)throw new Error(Ve(11));function A(){let x=S;x.next&&x.next(l())}return A(),{unsubscribe:C(A)}},[yf](){return this}}}return p({type:Fs.INIT}),{dispatch:p,subscribe:d,getState:l,replaceReducer:m,[yf]:f}}function XP(e){Object.keys(e).forEach(t=>{let r=e[t];if(typeof r(void 0,{type:Fs.INIT})>"u")throw new Error(Ve(12));if(typeof r(void 0,{type:Fs.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Ve(13))})}function Fn(e){let t=Object.keys(e),r={};for(let i=0;i<t.length;i++){let s=t[i];typeof e[s]=="function"&&(r[s]=e[s])}let o=Object.keys(r),n,a;try{XP(r)}catch(i){a=i}return function(s={},u){if(a)throw a;let c=!1,l={};for(let d=0;d<o.length;d++){let p=o[d],m=r[p],f=s[p],h=m(f,u);if(typeof h>"u"){let C=u&&u.type;throw new Error(Ve(14))}l[p]=h,c=c||h!==f}return c=c||o.length!==Object.keys(s).length,c?l:s}}function Pn(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...o)=>t(r(...o)))}function Sf(...e){return t=>(r,o)=>{let n=t(r,o),a=()=>{throw new Error(Ve(15))},i={getState:n.getState,dispatch:(u,...c)=>a(u,...c)},s=e.map(u=>u(i));return a=Pn(...s)(n.dispatch),{...n,dispatch:a}}}function Ps(e){return Ht(e)&&"type"in e&&typeof e.type=="string"}var id=Symbol.for("immer-nothing"),ri=Symbol.for("immer-draftable"),at=Symbol.for("immer-state");function Ne(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Lo=Object.getPrototypeOf;function gt(e){return!!e&&!!e[at]}function it(e){return e?Ff(e)||Array.isArray(e)||!!e[ri]||!!e.constructor?.[ri]||si(e)||ci(e):!1}var ZP=Object.prototype.constructor.toString();function Ff(e){if(!e||typeof e!="object")return!1;let t=Lo(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)===ZP}function sd(e){return gt(e)||Ne(15,e),e[at].base_}function oi(e,t){Bo(e)===0?Reflect.ownKeys(e).forEach(r=>{t(r,e[r],e)}):e.forEach((r,o)=>t(o,r,e))}function Bo(e){let t=e[at];return t?t.type_:Array.isArray(e)?1:si(e)?2:ci(e)?3:0}function ni(e,t){return Bo(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Jl(e,t){return Bo(e)===2?e.get(t):e[t]}function Pf(e,t,r){let o=Bo(e);o===2?e.set(t,r):o===3?e.add(r):e[t]=r}function eA(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function si(e){return e instanceof Map}function ci(e){return e instanceof Set}function Qo(e){return e.copy_||e.base_}function ed(e,t){if(si(e))return new Map(e);if(ci(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);let r=Ff(e);if(t===!0||t==="class_only"&&!r){let o=Object.getOwnPropertyDescriptors(e);delete o[at];let n=Reflect.ownKeys(o);for(let a=0;a<n.length;a++){let i=n[a],s=o[i];s.writable===!1&&(s.writable=!0,s.configurable=!0),(s.get||s.set)&&(o[i]={configurable:!0,writable:!0,enumerable:s.enumerable,value:e[i]})}return Object.create(Lo(e),o)}else{let o=Lo(e);if(o!==null&&r)return{...e};let n=Object.create(o);return Object.assign(n,e)}}function bs(e,t=!1){return Es(e)||gt(e)||!it(e)||(Bo(e)>1&&(e.set=e.add=e.clear=e.delete=tA),Object.freeze(e),t&&Object.entries(e).forEach(([r,o])=>bs(o,!0))),e}function tA(){Ne(2)}function Es(e){return Object.isFrozen(e)}var td={};function Uo(e){let t=td[e];return t||Ne(0,e),t}function rA(e,t){td[e]||(td[e]=t)}var ai;function Af(){return ai}function oA(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function hf(e,t){t&&(Uo("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function rd(e){od(e),e.drafts_.forEach(nA),e.drafts_=null}function od(e){e===ai&&(ai=e.parent_)}function Cf(e){return ai=oA(ai,e)}function nA(e){let t=e[at];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function xf(e,t){t.unfinalizedDrafts_=t.drafts_.length;let r=t.drafts_[0];return e!==void 0&&e!==r?(r[at].modified_&&(rd(t),Ne(4)),it(e)&&(e=As(t,e),t.parent_||vs(t,e)),t.patches_&&Uo("Patches").generateReplacementPatches_(r[at].base_,e,t.patches_,t.inversePatches_)):e=As(t,r,[]),rd(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==id?e:void 0}function As(e,t,r){if(Es(t))return t;let o=t[at];if(!o)return oi(t,(n,a)=>Rf(e,o,t,n,a,r)),t;if(o.scope_!==e)return t;if(!o.modified_)return vs(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),oi(a,(s,u)=>Rf(e,o,n,s,u,r,i)),vs(e,n,!1),r&&e.patches_&&Uo("Patches").generatePatches_(o,r,e.patches_,e.inversePatches_)}return o.copy_}function Rf(e,t,r,o,n,a,i){if(gt(n)){let s=a&&t&&t.type_!==3&&!ni(t.assigned_,o)?a.concat(o):void 0,u=As(e,n,s);if(Pf(r,o,u),gt(u))e.canAutoFreeze_=!1;else return}else i&&r.add(n);if(it(n)&&!Es(n)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;As(e,n),(!t||!t.scope_.parent_)&&typeof o!="symbol"&&Object.prototype.propertyIsEnumerable.call(r,o)&&vs(e,n)}}function vs(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&bs(t,r)}function aA(e,t){let r=Array.isArray(e),o={type_:r?1:0,scope_:t?t.scope_:Af(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1},n=o,a=cd;r&&(n=[o],a=ii);let{revoke:i,proxy:s}=Proxy.revocable(n,a);return o.draft_=s,o.revoke_=i,s}var cd={get(e,t){if(t===at)return e;let r=Qo(e);if(!ni(r,t))return iA(e,r,t);let o=r[t];return e.finalized_||!it(o)?o:o===Xl(e.base_,t)?(Zl(e),e.copy_[t]=ad(o,e)):o},has(e,t){return t in Qo(e)},ownKeys(e){return Reflect.ownKeys(Qo(e))},set(e,t,r){let o=vf(Qo(e),t);if(o?.set)return o.set.call(e.draft_,r),!0;if(!e.modified_){let n=Xl(Qo(e),t),a=n?.[at];if(a&&a.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(eA(r,n)&&(r!==void 0||ni(e.base_,t)))return!0;Zl(e),nd(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 Xl(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Zl(e),nd(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let r=Qo(e),o=Reflect.getOwnPropertyDescriptor(r,t);return o&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:o.enumerable,value:r[t]}},defineProperty(){Ne(11)},getPrototypeOf(e){return Lo(e.base_)},setPrototypeOf(){Ne(12)}},ii={};oi(cd,(e,t)=>{ii[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});ii.deleteProperty=function(e,t){return ii.set.call(this,e,t,void 0)};ii.set=function(e,t,r){return cd.set.call(this,e[0],t,r,e[0])};function Xl(e,t){let r=e[at];return(r?Qo(r):e)[t]}function iA(e,t,r){let o=vf(t,r);return o?"value"in o?o.value:o.get?.call(e.draft_):void 0}function vf(e,t){if(!(t in e))return;let r=Lo(e);for(;r;){let o=Object.getOwnPropertyDescriptor(r,t);if(o)return o;r=Lo(r)}}function nd(e){e.modified_||(e.modified_=!0,e.parent_&&nd(e.parent_))}function Zl(e){e.copy_||(e.copy_=ed(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var sA=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,...c){return i.produce(u,l=>r.call(this,l,...c))}}typeof r!="function"&&Ne(6),o!==void 0&&typeof o!="function"&&Ne(7);let n;if(it(t)){let a=Cf(this),i=ad(t,void 0),s=!0;try{n=r(i),s=!1}finally{s?rd(a):od(a)}return hf(a,o),xf(n,a)}else if(!t||typeof t!="object"){if(n=r(t),n===void 0&&(n=t),n===id&&(n=void 0),this.autoFreeze_&&bs(n,!0),o){let a=[],i=[];Uo("Patches").generateReplacementPatches_(t,n,a,i),o(a,i)}return n}else Ne(1,t)},this.produceWithPatches=(t,r)=>{if(typeof t=="function")return(i,...s)=>this.produceWithPatches(i,u=>t(u,...s));let o,n;return[this.produce(t,r,(i,s)=>{o=i,n=s}),o,n]},typeof e?.autoFreeze=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof e?.useStrictShallowCopy=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){it(e)||Ne(8),gt(e)&&(e=bf(e));let t=Cf(this),r=ad(e,void 0);return r[at].isManual_=!0,od(t),r}finishDraft(e,t){let r=e&&e[at];(!r||!r.isManual_)&&Ne(9);let{scope_:o}=r;return hf(o,t),xf(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=Uo("Patches").applyPatches_;return gt(e)?o(e,t):this.produce(e,n=>o(n,t))}};function ad(e,t){let r=si(e)?Uo("MapSet").proxyMap_(e,t):ci(e)?Uo("MapSet").proxySet_(e,t):aA(e,t);return(t?t.scope_:Af()).drafts_.push(r),r}function bf(e){return gt(e)||Ne(10,e),Ef(e)}function Ef(e){if(!it(e)||Es(e))return e;let t=e[at],r;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=ed(e,t.scope_.immer_.useStrictShallowCopy_)}else r=ed(e,!0);return oi(r,(o,n)=>{Pf(r,o,Ef(n))}),t&&(t.finalized_=!1),r}function wf(){let t="replace",r="add",o="remove";function n(p,m,f,h){switch(p.type_){case 0:case 2:return i(p,m,f,h);case 1:return a(p,m,f,h);case 3:return s(p,m,f,h)}}function a(p,m,f,h){let{base_:C,assigned_:S}=p,A=p.copy_;A.length<C.length&&([C,A]=[A,C],[f,h]=[h,f]);for(let y=0;y<C.length;y++)if(S[y]&&A[y]!==C[y]){let x=m.concat([y]);f.push({op:t,path:x,value:d(A[y])}),h.push({op:t,path:x,value:d(C[y])})}for(let y=C.length;y<A.length;y++){let x=m.concat([y]);f.push({op:r,path:x,value:d(A[y])})}for(let y=A.length-1;C.length<=y;--y){let x=m.concat([y]);h.push({op:o,path:x})}}function i(p,m,f,h){let{base_:C,copy_:S}=p;oi(p.assigned_,(A,y)=>{let x=Jl(C,A),I=Jl(S,A),v=y?ni(C,A)?t:r:o;if(x===I&&v===t)return;let R=m.concat(A);f.push(v===o?{op:v,path:R}:{op:v,path:R,value:I}),h.push(v===r?{op:o,path:R}:v===o?{op:r,path:R,value:d(x)}:{op:t,path:R,value:d(x)})})}function s(p,m,f,h){let{base_:C,copy_:S}=p,A=0;C.forEach(y=>{if(!S.has(y)){let x=m.concat([A]);f.push({op:o,path:x,value:y}),h.unshift({op:r,path:x,value:y})}A++}),A=0,S.forEach(y=>{if(!C.has(y)){let x=m.concat([A]);f.push({op:r,path:x,value:y}),h.unshift({op:o,path:x,value:y})}A++})}function u(p,m,f,h){f.push({op:t,path:[],value:m===id?void 0:m}),h.push({op:t,path:[],value:p})}function c(p,m){return m.forEach(f=>{let{path:h,op:C}=f,S=p;for(let I=0;I<h.length-1;I++){let v=Bo(S),R=h[I];typeof R!="string"&&typeof R!="number"&&(R=""+R),(v===0||v===1)&&(R==="__proto__"||R==="constructor")&&Ne(19),typeof S=="function"&&R==="prototype"&&Ne(19),S=Jl(S,R),typeof S!="object"&&Ne(18,h.join("/"))}let A=Bo(S),y=l(f.value),x=h[h.length-1];switch(C){case t:switch(A){case 2:return S.set(x,y);case 3:Ne(16);default:return S[x]=y}case r:switch(A){case 1:return x==="-"?S.push(y):S.splice(x,0,y);case 2:return S.set(x,y);case 3:return S.add(y);default:return S[x]=y}case o:switch(A){case 1:return S.splice(x,1);case 2:return S.delete(x);case 3:return S.delete(f.value);default:return delete S[x]}default:Ne(17,C)}}),p}function l(p){if(!it(p))return p;if(Array.isArray(p))return p.map(l);if(si(p))return new Map(Array.from(p.entries()).map(([f,h])=>[f,l(h)]));if(ci(p))return new Set(Array.from(p).map(l));let m=Object.create(Lo(p));for(let f in p)m[f]=l(p[f]);return ni(p,ri)&&(m[ri]=p[ri]),m}function d(p){return gt(p)?l(p):p}rA("Patches",{applyPatches_:c,generatePatches_:n,generateReplacementPatches_:u})}var yt=new sA,Ar=yt.produce,ws=yt.produceWithPatches.bind(yt),Jk=yt.setAutoFreeze.bind(yt),Xk=yt.setUseStrictShallowCopy.bind(yt),ud=yt.applyPatches.bind(yt),Zk=yt.createDraft.bind(yt),eV=yt.finishDraft.bind(yt);function cA(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function uA(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function lA(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 If=e=>Array.isArray(e)?e:[e];function dA(e){let t=Array.isArray(e[0])?e[0]:e;return lA(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function mA(e,t){let r=[],{length:o}=e;for(let n=0;n<o;n++)r.push(e[n].apply(null,t));return r}var oV=Symbol();var nV=Object.getPrototypeOf({});var pA=class{constructor(e){this.value=e}deref(){return this.value}},fA=typeof WeakRef<"u"?WeakRef:pA,gA=0,Tf=1;function Is(){return{s:gA,v:void 0,o:null,p:null}}function An(e,t={}){let r=Is(),{resultEqualityCheck:o}=t,n,a=0;function i(){let s=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=s.o;f===null&&(s.o=f=new WeakMap);let h=f.get(m);h===void 0?(s=Is(),f.set(m,s)):s=h}else{let f=s.p;f===null&&(s.p=f=new Map);let h=f.get(m);h===void 0?(s=Is(),f.set(m,s)):s=h}}let c=s,l;if(s.s===Tf)l=s.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 fA(l):l}return c.s=Tf,c.v=l,l}return i.clearCache=()=>{r=Is(),i.resetResultsCount()},i.resultsCount=()=>a,i.resetResultsCount=()=>{a=0},i}function Of(e,...t){let r=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,o=(...n)=>{let a=0,i=0,s,u={},c=n.pop();typeof c=="object"&&(u=c,c=n.pop()),cA(c,`createSelector expects an output function after the inputs, but received: [${typeof c}]`);let l={...r,...u},{memoize:d,memoizeOptions:p=[],argsMemoize:m=An,argsMemoizeOptions:f=[],devModeChecks:h={}}=l,C=If(p),S=If(f),A=dA(n),y=d(function(){return a++,c.apply(null,arguments)},...C),x=!0,I=m(function(){i++;let R=mA(A,arguments);return s=y.apply(null,R),s},...S);return Object.assign(I,{resultFunc:c,memoizedResultFunc:y,dependencies:A,dependencyRecomputations:()=>i,resetDependencyRecomputations:()=>{i=0},lastResult:()=>s,recomputations:()=>a,resetRecomputations:()=>{a=0},memoize:d,argsMemoize:m})};return Object.assign(o,{withTypes:()=>o}),o}var Q=Of(An),yA=Object.assign((e,t=Q)=>{uA(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,s,u)=>(i[r[u]]=s,i),{}))},{withTypes:()=>yA});function qf(e){return({dispatch:r,getState:o})=>n=>a=>typeof a=="function"?a(r,o,e):n(a)}var Df=qf(),kf=qf;var SA=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Pn:Pn.apply(null,arguments)},fV=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}},hA=e=>e&&typeof e.match=="function";function g(e,t){function r(...o){if(t){let n=t(...o);if(!n)throw new Error(Qt(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=>Ps(o)&&o.type===e,r}var Lf=class ui extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,ui.prototype)}static get[Symbol.species](){return ui}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new ui(...t[0].concat(this)):new ui(...t.concat(this))}};function Vf(e){return it(e)?Ar(e,()=>{}):e}function Nf(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function CA(e){return typeof e=="boolean"}var xA=()=>function(t){let{thunk:r=!0,immutableCheck:o=!0,serializableCheck:n=!0,actionCreatorCheck:a=!0}=t??{},i=new Lf;return r&&(CA(r)?i.push(Df):i.push(kf(r.extraArgument))),i},li="RTK_autoBatch",bn=()=>e=>({payload:e,meta:{[li]:!0}}),Mf=e=>t=>{setTimeout(t,e)},RA=(e={type:"raf"})=>t=>(...r)=>{let o=t(...r),n=!0,a=!1,i=!1,s=new Set,u=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Mf(10):e.type==="callback"?e.queueNotification:Mf(e.timeout),c=()=>{i=!1,a&&(a=!1,s.forEach(l=>l()))};return Object.assign({},o,{subscribe(l){let d=()=>n&&l(),p=o.subscribe(d);return s.add(l),()=>{p(),s.delete(l)}},dispatch(l){try{return n=!l?.meta?.[li],a=!n,a&&(i||(i=!0,u(c))),o.dispatch(l)}finally{n=!0}}})},FA=e=>function(r){let{autoBatch:o=!0}=r??{},n=new Lf(e);return o&&n.push(RA(typeof o=="object"?o:void 0)),n};function Bf(e){let t=xA(),{reducer:r=void 0,middleware:o,devTools:n=!0,preloadedState:a=void 0,enhancers:i=void 0}=e||{},s;if(typeof r=="function")s=r;else if(Ht(r))s=Fn(r);else throw new Error(Qt(1));let u;typeof o=="function"?u=o(t):u=t();let c=Pn;n&&(c=SA({trace:!1,...typeof n=="object"&&n}));let l=Sf(...u),d=FA(l),p=typeof i=="function"?i(d):d(),m=c(...p);return Yl(s,a,m)}function Uf(e){let t={},r=[],o,n={addCase(a,i){let s=typeof a=="string"?a:a.type;if(!s)throw new Error(Qt(28));if(s in t)throw new Error(Qt(29));return t[s]=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 PA(e){return typeof e=="function"}function j(e,t){let[r,o,n]=Uf(t),a;if(PA(e))a=()=>Vf(e());else{let s=Vf(e);a=()=>s}function i(s=a(),u){let c=[r[u.type],...o.filter(({matcher:l})=>l(u)).map(({reducer:l})=>l)];return c.filter(l=>!!l).length===0&&(c=[n]),c.reduce((l,d)=>{if(d)if(gt(l)){let m=d(l,u);return m===void 0?l:m}else{if(it(l))return Ar(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},s)}return i.getInitialState=a,i}var jf=(e,t)=>hA(e)?e.match(t):e(t);function Yt(...e){return t=>e.some(r=>jf(r,t))}function vn(...e){return t=>e.every(r=>jf(r,t))}function Os(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 di(e){return typeof e[0]=="function"&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function qs(...e){return e.length===0?t=>Os(t,["pending"]):di(e)?Yt(...e.map(t=>t.pending)):qs()(e[0])}function jo(...e){return e.length===0?t=>Os(t,["rejected"]):di(e)?Yt(...e.map(t=>t.rejected)):jo()(e[0])}function mi(...e){let t=r=>r&&r.meta&&r.meta.rejectedWithValue;return e.length===0?vn(jo(...e),t):di(e)?vn(jo(...e),t):mi()(e[0])}function vr(...e){return e.length===0?t=>Os(t,["fulfilled"]):di(e)?Yt(...e.map(t=>t.fulfilled)):vr()(e[0])}function Ds(...e){return e.length===0?t=>Os(t,["pending","fulfilled","rejected"]):di(e)?Yt(...e.flatMap(t=>[t.pending,t.rejected,t.fulfilled])):Ds()(e[0])}var AA="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",ks=(e=21)=>{let t="",r=e;for(;r--;)t+=AA[Math.random()*64|0];return t},vA=["name","message","stack","code"],ld=class{constructor(e,t){Be(this,"_type");this.payload=e,this.meta=t}},Qf=class{constructor(e,t){Be(this,"_type");this.payload=e,this.meta=t}},bA=e=>{if(typeof e=="object"&&e!==null){let t={};for(let r of vA)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,c,l,d)=>({payload:u,meta:{...d||{},arg:l,requestId:c,requestStatus:"fulfilled"}})),a=g(t+"/pending",(u,c,l)=>({payload:void 0,meta:{...l||{},arg:c,requestId:u,requestStatus:"pending"}})),i=g(t+"/rejected",(u,c,l,d,p)=>({payload:d,error:(o&&o.serializeError||bA)(u||"Rejected"),meta:{...p||{},arg:l,requestId:c,rejectedWithValue:!!d,requestStatus:"rejected",aborted:u?.name==="AbortError",condition:u?.name==="ConditionError"}}));function s(u){return(c,l,d)=>{let p=o?.idGenerator?o.idGenerator(u):ks(),m=new AbortController,f,h;function C(A){h=A,m.abort()}let S=async function(){let A;try{let x=o?.condition?.(u,{getState:l,extra:d});if(wA(x)&&(x=await x),x===!1||m.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let I=new Promise((v,R)=>{f=()=>{R({name:"AbortError",message:h||"Aborted"})},m.signal.addEventListener("abort",f)});c(a(p,u,o?.getPendingMeta?.({requestId:p,arg:u},{getState:l,extra:d}))),A=await Promise.race([I,Promise.resolve(r(u,{dispatch:c,getState:l,extra:d,requestId:p,signal:m.signal,abort:C,rejectWithValue:(v,R)=>new ld(v,R),fulfillWithValue:(v,R)=>new Qf(v,R)})).then(v=>{if(v instanceof ld)throw v;return v instanceof Qf?n(v.payload,p,u,v.meta):n(v,p,u)})])}catch(x){A=x instanceof ld?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(A)&&A.meta.condition||c(A),A}();return Object.assign(S,{abort:C,requestId:p,arg:u,unwrap(){return S.then(EA)}})}}return Object.assign(s,{pending:a,rejected:i,fulfilled:n,settled:Yt(i,n),typePrefix:t})}return e.withTypes=()=>e,e})();function EA(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function wA(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var _f=Symbol.for("rtk-slice-createasyncthunk"),CV={[_f]:_};function IA(e,t){return`${e}/${t}`}function TA({creators:e}={}){let t=e?.asyncThunk?.[_f];return function(o){let{name:n,reducerPath:a=n}=o;if(!n)throw new Error(Qt(11));typeof process<"u";let i=(typeof o.reducers=="function"?o.reducers(qA()):o.reducers)||{},s=Object.keys(i),u={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},c={addCase(A,y){let x=typeof A=="string"?A:A.type;if(!x)throw new Error(Qt(12));if(x in u.sliceCaseReducersByType)throw new Error(Qt(13));return u.sliceCaseReducersByType[x]=y,c},addMatcher(A,y){return u.sliceMatchers.push({matcher:A,reducer:y}),c},exposeAction(A,y){return u.actionCreators[A]=y,c},exposeCaseReducer(A,y){return u.sliceCaseReducersByName[A]=y,c}};s.forEach(A=>{let y=i[A],x={reducerName:A,type:IA(n,A),createNotation:typeof o.reducers=="function"};kA(y)?NA(x,y,c,t):DA(x,y,c)});function l(){let[A={},y=[],x=void 0]=typeof o.extraReducers=="function"?Uf(o.extraReducers):[o.extraReducers],I={...A,...u.sliceCaseReducersByType};return j(o.initialState,v=>{for(let R in I)v.addCase(R,I[R]);for(let R of u.sliceMatchers)v.addMatcher(R.matcher,R.reducer);for(let R of y)v.addMatcher(R.matcher,R.reducer);x&&v.addDefaultCase(x)})}let d=A=>A,p=new Map,m;function f(A,y){return m||(m=l()),m(A,y)}function h(){return m||(m=l()),m.getInitialState()}function C(A,y=!1){function x(v){let R=v[A];return typeof R>"u"&&y&&(R=h()),R}function I(v=d){let R=Nf(p,y,()=>new WeakMap);return Nf(R,v,()=>{let P={};for(let[b,T]of Object.entries(o.selectors??{}))P[b]=OA(T,v,h,y);return P})}return{reducerPath:A,getSelectors:I,get selectors(){return I(x)},selectSlice:x}}let S={name:n,reducer:f,actions:u.actionCreators,caseReducers:u.sliceCaseReducersByName,getInitialState:h,...C(a),injectInto(A,{reducerPath:y,...x}={}){let I=y??a;return A.inject({reducerPath:I,reducer:f},x),{...S,...C(I,!0)}}};return S}}function OA(e,t,r,o){function n(a,...i){let s=t(a);return typeof s>"u"&&o&&(s=r()),e(s,...i)}return n.unwrapped=e,n}var _o=TA();function qA(){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 DA({type:e,reducerName:t,createNotation:r},o,n){let a,i;if("reducer"in o){if(r&&!VA(o))throw new Error(Qt(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 kA(e){return e._reducerDefinitionType==="asyncThunk"}function VA(e){return e._reducerDefinitionType==="reducerWithPrepare"}function NA({type:e,reducerName:t},r,o,n){if(!n)throw new Error(Qt(18));let{payloadCreator:a,fulfilled:i,pending:s,rejected:u,settled:c,options:l}=r,d=n(e,a,l);o.exposeAction(t,d),i&&o.addCase(d.fulfilled,i),s&&o.addCase(d.pending,s),u&&o.addCase(d.rejected,u),c&&o.addMatcher(d.settled,c),o.exposeCaseReducer(t,{fulfilled:i||Ts,pending:s||Ts,rejected:u||Ts,settled:c||Ts})}function Ts(){}var $f="listener",zf="completed",Wf="cancelled",xV=`task-${Wf}`,RV=`task-${zf}`,FV=`${$f}-${Wf}`,PV=`${$f}-${zf}`;var{assign:Kf}=Object;var dd="listenerMiddleware";var MA=Kf(g(`${dd}/add`),{withTypes:()=>MA}),AV=g(`${dd}/removeAll`),QA=Kf(g(`${dd}/remove`),{withTypes:()=>QA});var vV=Symbol.for("rtk-state-proxy-original");function Qt(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 st=require("@coveo/bueno"),D=new st.StringValue({required:!0,emptyAllowed:!1}),ae=new st.StringValue({required:!1,emptyAllowed:!1}),Ce=new st.StringValue({required:!0,emptyAllowed:!0}),Gf=new st.StringValue({required:!1,emptyAllowed:!0}),Vs=new st.ArrayValue({each:D,required:!0}),Hf=new st.StringValue({required:!1,emptyAllowed:!1,regex:/^\d+\.\d+\.\d+$/}),Je=({message:e,name:t,stack:r})=>({message:e,name:t,stack:r}),ve=(e,t)=>{if("required"in t)return{payload:new st.Schema({value:t}).validate({value:e}).value};let n=new st.RecordValue({options:{required:!0},values:t}).validate(e);if(n)throw new st.SchemaValidationError(n);return{payload:e}},F=(e,t)=>{try{return ve(e,t)}catch(r){return{payload:e,error:Je(r)}}},ct=(e,t,r,o)=>{let n=`Check the initialState of ${o}`;return Yf(e,t,r,n,"Controller initialization error")},Xe=(e,t,r,o)=>{let n=`Check the options of ${o}`;return Yf(e,t,r,n,"Controller initialization error")},Yf=(e,t,r,o,n)=>{try{return t.validate(r,o)}catch(a){throw e.logger.error(a,n),a}};var Ze=require("@coveo/bueno");var zr="3.19.1",Jf=["@coveo/atomic","@coveo/quantic"];var md=()=>ae,Xf=()=>D,$o=g("configuration/updateBasicConfiguration",e=>F(e,{accessToken:ae,environment:new Ze.StringValue({required:!1,constrainTo:["prod","hipaa","stg","dev"]}),organizationId:ae})),Zf=g("configuration/updateSearchConfiguration",e=>F(e,{proxyBaseUrl:new Ze.StringValue({required:!1,url:!0}),pipeline:new Ze.StringValue({required:!1,emptyAllowed:!0}),searchHub:ae,timezone:ae,locale:ae,authenticationProviders:new Ze.ArrayValue({required:!1,each:D})})),En={enabled:new Ze.BooleanValue({default:!0}),originContext:md(),originLevel2:md(),originLevel3:md(),proxyBaseUrl:new Ze.StringValue({required:!1,url:!0}),runtimeEnvironment:new Ze.Value,anonymous:new Ze.BooleanValue({default:!1}),deviceId:ae,userDisplayName:ae,documentLocation:ae,trackingId:ae,analyticsMode:new Ze.StringValue({constrainTo:["legacy","next"],required:!1,default:"next"}),source:new Ze.RecordValue({options:{required:!1},values:Jf.reduce((e,t)=>(e[t]=Hf,e),{})})},pd=g("configuration/updateAnalyticsConfiguration",e=>F(e,En)),Ns=g("configuration/analytics/disable"),Ms=g("configuration/analytics/enable"),eg=g("configuration/analytics/originlevel2",e=>F(e,{originLevel2:Xf()})),tg=g("configuration/analytics/originlevel3",e=>F(e,{originLevel3:Xf()}));var wn=g("commerce/configuration/updateBasicConfiguration",e=>F(e,{accessToken:ae,environment:new fd.StringValue({required:!1,constrainTo:["prod","hipaa","stg","dev"]}),organizationId:ae})),In=g("commerce/configuration/updateProxyBaseUrl",e=>F(e,{proxyBaseUrl:new fd.StringValue({required:!1,url:!0})})),Tn=g("commerce/configuration/updateAnalyticsConfiguration",e=>F(e,{enabled:En.enabled,proxyBaseUrl:En.proxyBaseUrl,source:En.source,trackingId:En.trackingId})),Qs=g("commerce/configuration/analytics/disable"),Ls=g("commerce/configuration/analytics/enable");var Wr=require("@coveo/bueno");var rg=()=>({accessToken:"",environment:"prod",organizationId:"",analytics:{enabled:!0,trackingId:"",source:{}},commerce:{}});var gd=j(rg(),e=>e.addCase(wn,(t,r)=>{og(t,r.payload)}).addCase($o,(t,r)=>{og(t,r.payload)}).addCase(In,(t,r)=>{LA(t,r.payload)}).addCase(Tn,(t,r)=>{BA(t,r.payload)}).addCase(Qs,t=>{t.analytics.enabled=!1}).addCase(Ls,t=>{t.analytics.enabled=!0}));function og(e,t){(0,Wr.isNullOrUndefined)(t.accessToken)||(e.accessToken=t.accessToken),e.environment=t.environment??"prod",(0,Wr.isNullOrUndefined)(t.organizationId)||(e.organizationId=t.organizationId)}function LA(e,t){(0,Wr.isNullOrUndefined)(t.proxyBaseUrl)||(e.commerce.apiBaseUrl=t.proxyBaseUrl)}function BA(e,t){(0,Wr.isNullOrUndefined)(t.enabled)||(e.analytics.enabled=t.enabled),(0,Wr.isNullOrUndefined)(t.proxyBaseUrl)||(e.analytics.apiBaseUrl=t.proxyBaseUrl),(0,Wr.isNullOrUndefined)(t.source)||(e.analytics.source=t.source),(0,Wr.isNullOrUndefined)(t.trackingId)||(e.analytics.trackingId=t.trackingId)}function On(e){return e.currency}var ng=(e,t)=>({currency:On(t.commerceContext),products:UA(t.cart),transaction:e}),ag=(e,t)=>({currency:On(t.commerceContext),...e}),zo=Q(e=>e.cart,e=>e.cartItems,(e,t)=>t.map(r=>e[r])),UA=Q(zo,e=>e.map(({quantity:t,...r})=>({quantity:t,product:r})));var Lt=require("@coveo/bueno");var yd={productId:D,quantity:new Lt.NumberValue({required:!0,min:0}),name:new Lt.StringValue({required:!1}),price:new Lt.NumberValue({required:!1,min:0})},Sd=new Lt.ArrayValue({each:new Lt.RecordValue({values:{...yd}})}),hd={items:Sd},ig=new Lt.Schema(hd);var Kr=g("commerce/cart/setItems",e=>F(e,Sd)),qn=g("commerce/cart/updateItemQuantity",e=>F(e,yd)),Dn=g("commerce/cart/purchase"),Bs=_("commerce/cart/emit/purchaseEvent",async(e,{extra:t,getState:r})=>{let o=ng(e,r()),{relay:n}=t;n.emit("ec.purchase",o)}),Us=_("commerce/cart/emit/cartActionEvent",async(e,{extra:t,getState:r})=>{let o=ag(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),s=t!==i;return t=i,s}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(),s;return o()&&(t=JSON.stringify(this.state),s=e.subscribe(()=>{n(this.state)&&r.forEach(u=>u())})),r.set(i,a),()=>{r.delete(i),o()&&s&&s()}},get state(){return{}}}}function sg(e,t){return e.cart[Wo(t)]}var cg=Q(zo,e=>e.reduce((t,r)=>t+r.quantity,0)),ug=Q(zo,e=>e.reduce((t,r)=>t+r.price*r.quantity,0));function lg(e,t={}){if(!jA(e))throw $;let{dispatch:r}=e,o=W(e),n=()=>e[U].cart,a={...t.initialState};ct(e,ig,a,"buildCart"),a.items!==void 0&&r(Kr(a.items));function i(l,d){return d?d.quantity!==l.quantity:!0}function s(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 c(l,d){let{quantity:p,...m}=l,f=s(l,d),h=d?Math.abs(p-d.quantity):p;return{action:f,quantity:h,product:m}}return{...o,empty:function(){for(let l of zo(n()))this.updateItemQuantity({...l,quantity:0})},purchase(l){r(Bs(l)),r(Dn())},updateItemQuantity(l){let d=sg(n(),l);!d&&l.quantity<=0||u(l,d)||(i(l,d)&&r(Us(c(l,d))),r(qn(l)))},get state(){let l=n();return{items:zo(l),totalQuantity:cg(l),totalPrice:ug(l)}}}}function Wo(e){return`${e.productId},${e.name},${e.price}`}function jA(e){return e.addReducers({cart:kn}),!0}var js=()=>({cartItems:[],cart:{},purchasedItems:[],purchased:{}}),dg=e=>pg(e.cartItems,e.cart),mg=e=>pg(e.purchasedItems,e.purchased);function pg(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 kn=j(js(),e=>{e.addCase(Kr,(t,{payload:r})=>{let{cart:o,cartItems:n}=r.reduce((a,i)=>{let s=Wo(i);return{cartItems:[...a.cartItems,s],cart:{...a.cart,[s]:i},purchasedItems:[],purchased:{}}},js());fg(t,n,o)}).addCase(qn,(t,{payload:r})=>{let o=Wo(r);if(!(o in t.cart)){_A(r,t);return}if(r.quantity<=0){$A(r,t);return}t.cart[o]=r}).addCase(Dn,t=>{zA(t);let{cart:r,cartItems:o}=js();fg(t,o,r)})});function fg(e,t,r){e.cartItems=t,e.cart=r}function _A(e,t){if(e.quantity<=0)return;let r=Wo(e);t.cartItems=[...t.cartItems,r],t.cart[r]=e}function $A(e,t){let r=Wo(e);t.cartItems=t.cartItems.filter(o=>o!==r),delete t.cart[r]}function zA(e){for(let t of e.cartItems){if(t in e.purchased){e.purchased[t].quantity+=e.cart[t].quantity;continue}e.purchasedItems=[...e.purchasedItems,t],e.purchased[t]=e.cart[t]}}var Jt=require("@coveo/bueno");var WA=Intl.supportedValuesOf("currency"),KA=new Jt.StringValue({required:!0,emptyAllowed:!1,constrainTo:WA}),Cd={url:D},xd={latitude:new Jt.NumberValue({min:-90,max:90,required:!0}),longitude:new Jt.NumberValue({min:-180,max:180,required:!0})},pi={language:D,country:D,currency:KA,view:new Jt.RecordValue({options:{required:!0},values:Cd}),location:new Jt.RecordValue({options:{required:!1},values:xd})},gg=new Jt.Schema(pi);var de=g("commerce/context/set",e=>F(e,pi)),pe=g("commerce/context/setView",e=>F(e,Cd)),Vn=g("commerce/context/setLocation",e=>F(e,xd));var yg=()=>({language:"",country:"",currency:"",view:{url:""}});var Xt=j(yg(),e=>{e.addCase(de,(t,{payload:r})=>r).addCase(pe,(t,{payload:r})=>{t.view=r}).addCase(Vn,(t,{payload:r})=>{t.location=r})});var _s=()=>({correctedQuery:"",corrections:[],originalQuery:""});var Jo=require("@coveo/bueno");var At=g("breadcrumb/deselectAll"),Gr=g("breadcrumb/deselectAllNonBreadcrumbs");var Hr=Q(e=>e.source,e=>Object.entries(e).map(([t,r])=>`${t}@${r}`).concat(`@coveo/headless@${zr}`));var Yr=(e,t)=>{let{view:r,location:o,...n}=e.commerceContext;return{accessToken:e.configuration.accessToken,url:e.configuration.commerce.apiBaseUrl??xs(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:dg(e.cart),source:Hr(e.configuration.analytics)}}};var Bt=require("@coveo/bueno");var Zt=require("@coveo/bueno"),vt=(r=>(r.Relevance="relevance",r.Fields="fields",r))(vt||{}),Nn=(r=>(r.Ascending="asc",r.Descending="desc",r))(Nn||{}),br=()=>({by:"relevance"});var lM=new Zt.RecordValue({options:{required:!1},values:{by:new Zt.EnumValue({enum:vt,required:!0}),fields:new Zt.ArrayValue({each:new Zt.RecordValue({values:{name:new Zt.StringValue,direction:new Zt.EnumValue({enum:Nn})}})})}});var Rd=e=>({by:"fields",fields:e}),Sg=new Bt.RecordValue({options:{required:!1},values:{by:new Bt.EnumValue({enum:vt,required:!0}),fields:new Bt.ArrayValue({each:new Bt.RecordValue({values:{field:new Bt.StringValue({required:!0}),direction:new Bt.EnumValue({enum:Nn}),displayName:new Bt.StringValue}})})}});var $s=(e,t,r)=>({...Yr(e,t),...GA(e,r)}),GA=(e,t)=>{let r=t?e.commercePagination?.recommendations[t]:e.commercePagination?.principal;return r&&{page:r.page,...r.perPage&&{perPage:r.perPage}}};var bt=(e,t)=>({...$s(e,t),facets:[...HA(e)],...e.commerceSort&&{sort:YA(e.commerceSort.appliedSort)}});function HA(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 YA(e){return e.by==="relevance"?{sortCriteria:"relevance"}:{sortCriteria:"fields",fields:e.fields.map(({name:t,direction:r})=>({field:t,direction:r}))}}var Mn=require("@coveo/bueno");var Ko=g("commerce/facets/core/updateNumberOfValues",e=>F(e,{facetId:D,numberOfValues:new Mn.NumberValue({required:!0,min:1})})),Go=g("commerce/facets/core/updateIsFieldExpanded",e=>F(e,{facetId:D,isFieldExpanded:new Mn.BooleanValue({required:!0})})),xe=g("commerce/facets/core/clearAll"),je=g("commerce/facets/core/deselectAllValues",e=>F(e,{facetId:D})),Ho=g("commerce/facets/core/updateFreezeCurrentValues",e=>F(e,{facetId:D,freezeCurrentValues:new Mn.BooleanValue({required:!0})})),Qn=g("commerce/facets/core/updateAutoSelectionForAll",e=>F(e,{allow:new Mn.BooleanValue({required:!0})}));var Fd=require("@coveo/bueno");var zs={slotId:Gf},JA={...zs,pageSize:new Fd.NumberValue({required:!0,min:0})},Er=g("commerce/pagination/setPageSize",e=>F(e,JA)),XA={...zs,page:new Fd.NumberValue({required:!0,min:0})},er=g("commerce/pagination/selectPage",e=>F(e,XA)),Jr=g("commerce/pagination/nextPage",e=>F(e,zs)),Xr=g("commerce/pagination/previousPage",e=>F(e,zs)),Ln=g("commerce/pagination/registerRecommendationsSlot",e=>F(e,{slotId:D}));var Zr=Q(e=>e.commercePagination?.principal.perPage||0,e=>e),Ws=Q((e,t)=>e.commercePagination?.recommendations[t]?.perPage||0,e=>e),eo=Q(e=>e.commercePagination?.principal.totalEntries||0,e=>e),Ks=Q((e,t)=>e.commercePagination?.recommendations[t]?.totalEntries||0,e=>e),Gs=Q(e=>e.commercePagination?.principal.page||0,e=>e),hg=Q((e,t)=>e.commercePagination?.recommendations[t]?.page||0,e=>e);var Cg=require("@coveo/bueno");var Re=g("commerce/query/update",e=>F(e,{query:new Cg.StringValue}));var Ed=require("@coveo/bueno");var Hs=require("@coveo/bueno");var to=g("commerce/triggers/query/updateIgnore",e=>F(e,{q:new Hs.StringValue({emptyAllowed:!0,required:!0})})),Bn=g("commerce/triggers/query/applyModification",e=>F(e,new Hs.RecordValue({values:{originalQuery:ae,modification:ae}})));var vd=require("@coveo/bueno");function Pd(e,t,r){if(e===void 0)return{};let o=t(e);return o!==r?{q:o}:{}}function Ad(e,t,r){if(e===void 0)return{};let o=t(e);return o!==r?{sortCriteria:o}:{}}function tr(e,t,r,o){if(e===void 0)return{};let n=Object.entries(e).filter(([a])=>t(a)).map(([a,{request:i}])=>{let s=r(i);return s.length?{[a]:s}:{}}).reduce((a,i)=>({...a,...i}),{});return Object.keys(n).length?{[o]:n}:{}}function rr(e){let{activeValue:t,ancestryMap:r}=ZA(e);return t?ev(t,r):[]}function ZA(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 ev(e,t){let r=[];if(!e)return[];let o=e;do r.unshift(o),o=t.get(o);while(o);return r}function xg(){return{principal:ro(),recommendations:{}}}function ro(){return{page:0,perPage:0,totalEntries:0,totalPages:0}}function Yo(){return{appliedSort:br(),availableSorts:[br()]}}function Ys(e){return{...tv(e?.commercePagination,t=>t.principal.page,ro().page),...rv(e?.commercePagination,t=>t.principal.perPage,ro().perPage),...Ad(e?.commerceSort,t=>t.appliedSort,Yo().appliedSort),...tr(e.commerceFacetSet,oo(e,"regular"),ov,"f"),...tr(e.commerceFacetSet,oo(e,"regular"),nv,"fExcluded"),...tr(e.commerceFacetSet,oo(e,"location"),av,"lf"),...tr(e.commerceFacetSet,oo(e,"hierarchical"),iv,"cf"),...tr(e.commerceFacetSet,oo(e,"dateRange"),Rg,"df"),...tr(e.commerceFacetSet,oo(e,"dateRange"),Fg,"dfExcluded"),...tr(e.commerceFacetSet,oo(e,"numericalRange"),Rg,"nf"),...tr(e.commerceFacetSet,oo(e,"numericalRange"),Fg,"nfExcluded"),...Pg("selected",e.manualNumericFacetSet),...Pg("excluded",e.manualNumericFacetSet)}}function tv(e,t,r){if(e===void 0)return{};let o=t(e);return o!==r?{page:o}:{}}function rv(e,t,r){if(e===void 0)return{};let o=t(e);return o!==r?{perPage:o}:{}}function ov(e){return e.values.filter(t=>t.state==="selected").map(t=>t.value)}function nv(e){return e.values.filter(t=>t.state==="excluded").map(t=>t.value)}function av(e){return e.values.filter(t=>t.state==="selected").map(t=>t.value)}function Rg(e){return e.values.filter(t=>t.state==="selected")}function Fg(e){return e.values.filter(t=>t.state==="excluded")}function Pg(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 iv(e){return rr(e.values).map(r=>r.value)}function oo(e,t){return r=>e.commerceFacetSet[r].request.type===t}var Js=()=>({query:""});var n0=Q(e=>e[U].commerceSearch.responseId,e=>e),bd=Q(e=>e.commerceSearch.responseId,e=>e),Ag=Q(e=>e.commerceSearch.requestId,e=>e),fi=Q(e=>e.commerceSearch?.products.length||0,e=>e),vg=Q(e=>({total:eo(e),current:fi(e)}),({current:e,total:t})=>e<t),bg=Q(e=>e.commerceSearch?.isLoading,e=>(0,vd.isNullOrUndefined)(e)?!1:e),Eg=Q(e=>e.commerceSearch?.error,e=>e??null),Xs=Q(e=>e.commerceQuery?.query,e=>e??""),sv=Q(e=>e.commerceSearch?.queryExecuted,e=>e),wg=(e,t)=>(0,vd.isNullOrUndefined)(t.queryCorrection?.correctedQuery)?Xs(e):t.queryCorrection.correctedQuery,Ig=e=>({...Pd(e?.commerceQuery,t=>t.query,Js().query),...Ys(e)});function Tg(e){return{query:sv(e)||""}}var gi=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 Ue(t.response)?this.rejectWithValue(t.response.error):null}async processQueryCorrectionsOrContinue(t){let r=this.getState(),o=this.getSuccessResponse(t);if(!o||!r.didYouMean)return null;let{queryCorrection:n}=o;if(!(!(0,Ed.isNullOrUndefined)(n)&&!(0,Ed.isNullOrUndefined)(n.correctedQuery)))return null;let{correctedQuery:i,originalQuery:s}=o.queryCorrection;return this.onUpdateQueryForCorrection(i??""),{...t,response:{...o},queryExecuted:wg(r,o),originalQuery:s??""}}async processQueryTriggersOrContinue(t){let r=this.getSuccessResponse(t);if(!r)return null;let o=r.triggers.find(s=>s.type==="query")?.content||"";if(!o)return null;if(this.getState().triggers?.queryModification.queryToIgnore===o)return this.dispatch(to({q:""})),null;let a=this.getCurrentQuery(),i=await this.automaticallyRetryQueryWithTriggerModification(o);return Ue(i.response)?this.rejectWithValue(i.response.error):{...i,response:{...i.response.success},originalQuery:a}}async automaticallyRetryQueryWithTriggerModification(t){return this.dispatch(Bn({newQuery:t,originalQuery:this.getCurrentQuery()})),this.onUpdateQueryForCorrection(t),await this.fetchFromAPI({...bt(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 Ue(t.response)?null:t.response.success}get extra(){return this.config.extra}onUpdateQueryForCorrection(t){this.dispatch(Re({query:t}))}};var X=_("commerce/search/executeSearch",async(e,t)=>{let{getState:r}=t,o=r(),{navigatorContext:n}=t.extra,a=bt(o,n),i=Xs(o),s=new gi(t),u=await s.fetchFromAPI({...a,query:i});return s.process(u)}),no=_("commerce/search/fetchMoreProducts",async(e,t)=>{let{getState:r}=t,o=r(),{navigatorContext:n}=t.extra;if(!vg(o))return null;let i=Zr(o),u=fi(o)/i,c=Xs(o),l=bt(o,n),d=new gi(t),p=await d.fetchFromAPI({...l,query:c,page:u});return d.process(p)}),Un=_("commerce/search/prepareForSearchWithQuery",(e,t)=>{let{dispatch:r}=t;F(e,{query:new Jo.StringValue,clearFilters:new Jo.BooleanValue}),e.clearFilters&&(r(xe()),r(Gr())),r(Qn({allow:!0})),r(Re({query:e.query})),r(er({page:0}))}),jn=_("commerce/search/fetchInstantProducts",async(e,{getState:t,rejectWithValue:r,extra:o})=>{let n=t(),{apiClient:a,navigatorContext:i}=o,{q:s}=e,u=await a.productSuggestions({...Yr(n,i),query:s});return Ue(u)?r(u.error):{response:{...u.success,products:u.success.products}}}),cv={child:new Jo.RecordValue({options:{required:!0},values:{permanentid:new Jo.StringValue({required:!0})}})},_n=g("commerce/search/promoteChildToParent",e=>F(e,cv));function Og(){return{wasCorrectedTo:"",queryCorrection:_s(),originalQuery:""}}var Zs=j(Og(),e=>{e.addCase(X.pending,t=>{t.queryCorrection=_s(),t.wasCorrectedTo=""}).addCase(X.fulfilled,(t,r)=>{let{queryCorrection:o}=r.payload.response;t.originalQuery=r.payload.originalQuery,t.wasCorrectedTo=o?.correctedQuery??"",t.queryCorrection={correctedQuery:o?.correctedQuery??o?.corrections[0]?.correctedQuery??"",wordCorrections:o?.corrections[0]?.wordCorrections??[]}})});var ye=require("@coveo/bueno");var H=D;var or=require("@coveo/bueno");var uv={state:new or.Value({required:!0}),numberOfResults:new or.NumberValue({required:!0,min:0}),value:new or.StringValue({required:!0,emptyAllowed:!0}),path:new or.ArrayValue({required:!0,each:D}),moreValuesAvailable:new or.BooleanValue({required:!1})};function yi(e){e.children.forEach(t=>{yi(t)}),ve({state:e.state,numberOfResults:e.numberOfResults,value:e.value,path:e.path,moreValuesAvailable:e.moreValuesAvailable},uv)}var $n={facetId:H,field:D,tabs:new ye.RecordValue({options:{required:!1},values:{included:new ye.ArrayValue({each:new ye.StringValue}),excluded:new ye.ArrayValue({each:new ye.StringValue})}}),activeTab:new ye.StringValue({required:!1}),delimitingCharacter:new ye.StringValue({required:!1,emptyAllowed:!0}),filterFacetCount:new ye.BooleanValue({required:!1}),injectionDepth:new ye.NumberValue({required:!1,min:0}),numberOfValues:new ye.NumberValue({required:!1,min:1}),sortCriteria:new ye.Value({required:!1}),basePath:new ye.ArrayValue({required:!1,each:D}),filterByBasePath:new ye.BooleanValue({required:!1})},zn=5,qg=g("categoryFacet/register",e=>F(e,$n)),Dg=g("categoryFacet/toggleSelectValue",e=>{try{return ve(e.facetId,D),yi(e.selection),{payload:e,error:null}}catch(t){return{payload:e,error:Je(t)}}}),kg=g("categoryFacet/deselectAll",e=>F(e,$n.facetId)),W0=g("categoryFacet/updateNumberOfValues",e=>F(e,{facetId:$n.facetId,numberOfValues:$n.numberOfValues})),K0=g("categoryFacet/updateSortCriterion",e=>F(e,{facetId:$n.facetId,criterion:new ye.Value})),G0=g("categoryFacet/updateBasePath",e=>F(e,{facetId:$n.facetId,basePath:new ye.ArrayValue({each:D})}));var Kn=require("@coveo/bueno");var Wn=require("@coveo/bueno");var Si={facetId:H,captions:new Wn.RecordValue({options:{required:!1}}),numberOfValues:new Wn.NumberValue({required:!1,min:1}),query:new Wn.StringValue({required:!1,emptyAllowed:!0})};var lv={path:new Kn.ArrayValue({required:!0,each:D}),displayValue:Ce,rawValue:Ce,count:new Kn.NumberValue({required:!0,min:0})},nr=g("categoryFacet/selectSearchResult",e=>F(e,{facetId:H,value:new Kn.RecordValue({values:lv})})),ec=g("categoryFacetSearch/register",e=>F(e,Si));var tc=require("@coveo/bueno");var Vg={facetId:H,value:new tc.RecordValue({values:{displayValue:Ce,rawValue:Ce,count:new tc.NumberValue({required:!0,min:0})}})},rc=g("facetSearch/register",e=>F(e,Si)),ao=g("facetSearch/update",e=>F(e,Si)),St=g("facetSearch/toggleSelectValue",e=>F(e,Vg)),Ut=g("facetSearch/toggleExcludeValue",e=>F(e,Vg));var Ng=require("@coveo/bueno");var wr=g("facetOptions/update",(e={freezeFacetOrder:!0})=>F(e,{freezeFacetOrder:new Ng.BooleanValue({required:!1})})),wd=g("facetOptions/facet/enable",e=>F(e,H)),Ir=g("facetOptions/facet/disable",e=>F(e,H));var dv=g("history/undo"),mv=g("history/redo"),ar=g("history/snapshot"),pQ=_("history/back",async(e,{dispatch:t})=>{t(dv()),await t(we())}),fQ=_("history/forward",async(e,{dispatch:t})=>{t(mv()),await t(we())}),we=_("history/change",async(e,{getState:t})=>t().history.present);var Se=require("@coveo/bueno"),oc={q:new Se.StringValue,enableQuerySyntax:new Se.BooleanValue,aq:new Se.StringValue,cq:new Se.StringValue,firstResult:new Se.NumberValue({min:0}),numberOfResults:new Se.NumberValue({min:0}),sortCriteria:new Se.StringValue,f:new Se.RecordValue,fExcluded:new Se.RecordValue,cf:new Se.RecordValue,nf:new Se.RecordValue,mnf:new Se.RecordValue,df:new Se.RecordValue,debug:new Se.BooleanValue,sf:new Se.RecordValue,tab:new Se.StringValue,af:new Se.RecordValue};var Me=g("searchParameters/restore",e=>F(e,oc));var Co=require("@coveo/bueno");function Tr(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 E(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 s(l){try{c(o.next(l))}catch(d){i(d)}}function u(l){try{c(o.throw(l))}catch(d){i(d)}}function c(l){l.done?a(l.value):n(l.value).then(s,u)}c((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 Od(){return typeof window<"u"}function $d(){return typeof navigator<"u"}function Gn(){return typeof document<"u"}function qd(){try{return typeof localStorage<"u"}catch{return!1}}function pv(){try{return typeof sessionStorage<"u"}catch{return!1}}function Yg(){return $d()&&navigator.cookieEnabled}var fv=[ee.click,ee.custom,ee.search,ee.view],gv=(e,t)=>fv.indexOf(e)!==-1?Object.assign({language:Gn()?document.documentElement.lang:"unknown",userAgent:$d()?navigator.userAgent:"unknown"},t):t,xi=class e{static set(t,r,o){var n,a,i,s;o&&(a=new Date,a.setTime(a.getTime()+o)),s=window.location.hostname,s.indexOf(".")===-1?Mg(t,r,a):(i=s.split("."),n=i[i.length-2]+"."+i[i.length-1],Mg(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 Mg(e,t,r,o){document.cookie=`${e}=${t}`+(r?`;expires=${r.toUTCString()}`:"")+(o?`;domain=${o}`:"")+";path=/;SameSite=Lax"}function yv(){return qd()?localStorage:Yg()?new Ri:pv()?sessionStorage:new Yn}var Ri=class e{getItem(t){return xi.get(`${e.prefix}${t}`)}removeItem(t){xi.erase(`${e.prefix}${t}`)}setItem(t,r,o){xi.set(`${e.prefix}${t}`,r,o)}};Ri.prefix="coveo_";var Dd=class{constructor(){this.cookieStorage=new Ri}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)}},Yn=class{getItem(t){return null}removeItem(t){}setItem(t,r){}},hi="__coveo.analytics.history",Jg=20,Xg=1e3*60,Zg=75,Jn=class{constructor(t){this.store=t||yv()}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 E(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 E(this,void 0,void 0,function*(){let t=yield this.getHistoryWithInternalTimeAsync();return this.stripEmptyQueries(this.stripInternalTime(t))})}getHistoryWithInternalTime(){try{let t=this.store.getItem(hi);return t&&typeof t=="string"?JSON.parse(t):[]}catch{return[]}}getHistoryWithInternalTimeAsync(){return E(this,void 0,void 0,function*(){try{let t=yield this.store.getItem(hi);return t?JSON.parse(t):[]}catch{return[]}})}setHistory(t){try{this.store.setItem(hi,JSON.stringify(t.slice(0,Jg)))}catch{}}clear(){try{this.store.removeItem(hi)}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,Zg)),t}isValidEntry(t){let r=this.getMostRecentElement();return r&&r.value==t.value?(t.internalTime||0)-(r.internalTime||0)>Xg:!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))}},ey=Object.freeze({__proto__:null,HistoryStore:Jn,MAX_NUMBER_OF_HISTORY_ELEMENTS:Jg,MAX_VALUE_SIZE:Zg,MIN_THRESHOLD_FOR_DUPLICATE_VALUE:Xg,STORE_KEY:hi,default:Jn}),Sv=(e,t)=>E(void 0,void 0,void 0,function*(){return e===ee.view?(yield hv(t.contentIdValue),Object.assign({location:window.location.toString(),referrer:document.referrer,title:document.title},t)):t}),hv=e=>E(void 0,void 0,void 0,function*(){let t=new Jn,r={name:"PageView",value:e,time:new Date().toISOString()};yield t.addElementAsync(r)}),nc,Cv=new Uint8Array(16);function xv(){if(!nc&&(nc=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!nc))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return nc(Cv)}var Rv=/^(?:[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 ic(e){return typeof e=="string"&&Rv.test(e)}var Qe=[];for(let e=0;e<256;++e)Qe.push((e+256).toString(16).slice(1));function ty(e,t=0){return(Qe[e[t+0]]+Qe[e[t+1]]+Qe[e[t+2]]+Qe[e[t+3]]+"-"+Qe[e[t+4]]+Qe[e[t+5]]+"-"+Qe[e[t+6]]+Qe[e[t+7]]+"-"+Qe[e[t+8]]+Qe[e[t+9]]+"-"+Qe[e[t+10]]+Qe[e[t+11]]+Qe[e[t+12]]+Qe[e[t+13]]+Qe[e[t+14]]+Qe[e[t+15]]).toLowerCase()}function Fv(e){if(!ic(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 Pv(e){e=unescape(encodeURIComponent(e));let t=[];for(let r=0;r<e.length;++r)t.push(e.charCodeAt(r));return t}var Av="6ba7b810-9dad-11d1-80b4-00c04fd430c8",vv="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function bv(e,t,r){function o(n,a,i,s){var u;if(typeof n=="string"&&(n=Pv(n)),typeof a=="string"&&(a=Fv(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 c=new Uint8Array(16+n.length);if(c.set(a),c.set(n,a.length),c=r(c),c[6]=c[6]&15|t,c[8]=c[8]&63|128,i){s=s||0;for(let l=0;l<16;++l)i[s+l]=c[l];return i}return ty(c)}try{o.name=e}catch{}return o.DNS=Av,o.URL=vv,o}var Ev=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Qg={randomUUID:Ev};function Xo(e,t,r){if(Qg.randomUUID&&!t&&!e)return Qg.randomUUID();e=e||{};let o=e.random||(e.rng||xv)();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 ty(o)}function wv(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 Id(e,t){return e<<t|e>>>32-t}function Iv(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 s=0;s<i.length;++s)e.push(i.charCodeAt(s))}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 s=new Uint32Array(16);for(let u=0;u<16;++u)s[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]=s}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 s=new Uint32Array(80);for(let m=0;m<16;++m)s[m]=a[i][m];for(let m=16;m<80;++m)s[m]=Id(s[m-3]^s[m-8]^s[m-14]^s[m-16],1);let u=r[0],c=r[1],l=r[2],d=r[3],p=r[4];for(let m=0;m<80;++m){let f=Math.floor(m/20),h=Id(u,5)+wv(f,c,l,d)+p+t[f]+s[m]>>>0;p=d,d=l,l=Id(c,30)>>>0,c=u,u=h}r[0]=r[0]+u>>>0,r[1]=r[1]+c>>>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 Tv=bv("v5",80,Iv),Lg=Tv,ry="2.30.44",Bg=e=>`${e.protocol}//${e.hostname}${e.pathname.indexOf("/")===0?e.pathname:`/${e.pathname}`}${e.search}`,Ci={pageview:"pageview",event:"event"},sc=class{constructor({client:t,uuidGenerator:r=Xo}){this.client=t,this.uuidGenerator=r}},kd=class extends sc{constructor({client:t,uuidGenerator:r=Xo}){super({client:t,uuidGenerator:r}),this.actionData={},this.pageViewId=r(),this.nextPageViewId=this.pageViewId,this.currentLocation=Bg(window.location),this.lastReferrer=Gn()?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:Gn()?document.title:"",encoding:Gn()?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===Ci.pageview&&(this.nextPageViewId=this.uuidGenerator(),this.hasSentFirstPageView=!0)}getNextValues(t,r){return{pageViewId:t===Ci.pageview?this.nextPageViewId:this.pageViewId,referrer:t===Ci.pageview&&this.hasSentFirstPageView?this.currentLocation:this.lastReferrer,location:t===Ci.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 Bg(window.location)}},io=class e{constructor(t,r){if(!ic(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 ic(a)?new e(a,Number.parseInt(n)*1e3):null}};io.cvo_cid="cvo_cid";io.expirationTime=120;var Vd=class extends sc{constructor({client:t,uuidGenerator:r=Xo}){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 E(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(io.cvo_cid,new io(o,Date.now()).toString()),r.toString()}catch{throw new Error("Invalid URL provided")}})}acceptFrom(t){this.client.setAcceptedLinkReferrers(t)}};Vd.Id="link";var Et=Object.keys;function ac(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}var Td=128,oy=192,Ug=224,jg=240;function Ov(e){return(e&248)===jg?4:(e&jg)===Ug?3:(e&Ug)===oy?2:1}function qv(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&Td)!=Td)break;if(r-=3,(o&oy)!=Td){t-r>=Ov(o)*3&&(r=t);break}}return e.substring(0,r)}var Nd={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"},Dv=Et(Nd).map(e=>Nd[e]),kv=[...Dv].join("|"),Vv=new RegExp(`^(${kv}$)`),Nv={svcAction:"svc_action",svcActionData:"svc_action_data"},Mv=e=>Et(e).filter(t=>e[t]!==void 0).reduce((t,r)=>{let o=Nd[r]||r;return Object.assign(Object.assign({},t),{[o]:e[r]})},{}),Qv=e=>Vv.test(e),Lv=[Qv],_g={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",price:"pr",quantity:"qt",coupon:"cc",position:"ps",group:"group"},$g={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",position:"ps",price:"pr",group:"group"},_e={action:"pa",list:"pal",listSource:"pls"},cc={id:"ti",revenue:"tr",tax:"tt",shipping:"ts",coupon:"tcc",affiliation:"ta",step:"cos",option:"col"},Bv=["loyaltyCardId","loyaltyTier","thirdPartyPersona","companyName","favoriteStore","storeName","userIndustry","userRole","userDepartment","businessUnit"],Md={id:"quoteId",affiliation:"quoteAffiliation"},Qd={id:"reviewId",rating:"reviewRating",comment:"reviewComment"},Uv={add:_e,bookmark_add:_e,bookmark_remove:_e,click:_e,checkout:_e,checkout_option:_e,detail:_e,impression:_e,remove:_e,refund:Object.assign(Object.assign({},_e),cc),purchase:Object.assign(Object.assign({},_e),cc),quickview:_e,quote:Object.assign(Object.assign({},_e),Md),review:Object.assign(Object.assign({},_e),Qd)},jv=Et(_g).map(e=>_g[e]),_v=Et($g).map(e=>$g[e]),$v=Et(_e).map(e=>_e[e]),zv=Et(cc).map(e=>cc[e]),Wv=Et(Qd).map(e=>Qd[e]),Kv=Et(Md).map(e=>Md[e]),Gv=[...jv,"custom"].join("|"),Hv=[..._v,"custom"].join("|"),ny="(pr[0-9]+)",ay="(il[0-9]+pi[0-9]+)",Yv=new RegExp(`^${ny}(${Gv})$`),Jv=new RegExp(`^(${ay}(${Hv}))|(il[0-9]+nm)$`),Xv=new RegExp(`^(${$v.join("|")})$`),Zv=new RegExp(`^(${zv.join("|")})$`),eb=new RegExp(`^${ny}custom$`),tb=new RegExp(`^${ay}custom$`),rb=new RegExp(`^(${[...Bv,...Wv,...Kv].join("|")})$`),ob=e=>Yv.test(e),nb=e=>Jv.test(e),ab=e=>Xv.test(e),ib=e=>Zv.test(e),sb=e=>rb.test(e),cb=[nb,ob,ab,ib,sb],ub=[eb,tb],lb={anonymizeIp:"aip"},db={eventCategory:"ec",eventAction:"ea",eventLabel:"el",eventValue:"ev",page:"dp",visitorId:"cid",clientId:"cid",userId:"uid",currencyCode:"cu"},mb={hitType:"t",pageViewId:"pid",encoding:"de",location:"dl",referrer:"dr",screenColor:"sd",screenResolution:"sr",title:"dt",userAgent:"ua",language:"ul",eventId:"z",time:"tm"},pb=["contentId","contentIdKey","contentType","searchHub","tab","searchUid","permanentId","contentLocale","trackingId"],fb=Object.assign(Object.assign(Object.assign(Object.assign({},lb),db),mb),pb.reduce((e,t)=>Object.assign(Object.assign({},e),{[t]:t}),{})),Ld=Object.assign(Object.assign({},fb),Nv),gb=e=>{let t=!!e.action&&Uv[e.action]||{};return Et(e).reduce((r,o)=>{let n=t[o]||Ld[o]||o;return Object.assign(Object.assign({},r),{[n]:e[o]})},{})},yb=Et(Ld).map(e=>Ld[e]),Sb=e=>yb.indexOf(e)!==-1,hb=e=>e==="custom",Cb=e=>[...cb,...Lv,Sb,hb].some(t=>t(e)),xb=e=>Et(e).reduce((t,r)=>{let o=Rb(r);return o?Object.assign(Object.assign({},t),Fb(o,e[r])):Object.assign(Object.assign({},t),{[r]:e[r]})},{}),Rb=e=>{let t;return[...ub].every(r=>{var o;return t=(o=r.exec(e))===null||o===void 0?void 0:o[1],!t}),t},Fb=(e,t)=>Et(t).reduce((r,o)=>Object.assign(Object.assign({},r),{[`${e}${o}`]:t[o]}),{}),Bd=class{constructor(t){this.opts=t}sendEvent(t,r){return E(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:s}=yield this.preProcessRequestAsPotentialJSONString(`${o}/analytics/${t}?${a}`,r,n),u=this.encodeForEventType(t,s),c=new Blob([u],{type:"application/x-www-form-urlencoded"});navigator.sendBeacon(i,c)})}isAvailable(){return"sendBeacon"in navigator}deleteHttpCookieVisitorId(){return Promise.resolve()}preProcessRequestAsPotentialJSONString(t,r,o){return E(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:s,body:u}=i;n=s||t;try{a=JSON.parse(u)}catch(c){console.error("Unable to process the request body as a JSON string",c)}}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 E(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}},Ud=class{sendEvent(t,r){return E(this,void 0,void 0,function*(){return Promise.resolve()})}deleteHttpCookieVisitorId(){return E(this,void 0,void 0,function*(){return Promise.resolve()})}},zg=globalThis.fetch,uc=class{constructor(t){this.opts=t}sendEvent(t,r){return E(this,void 0,void 0,function*(){let{baseUrl:o,visitorIdProvider:n,preprocessRequest:a}=this.opts,i=this.shouldAppendVisitorId(t)?yield this.getVisitorIdParam():"",s={url:`${o}/analytics/${t}${i}`,credentials:"include",mode:"cors",headers:this.getHeaders(),method:"POST",body:JSON.stringify(r)},u=Object.assign(Object.assign({},s),a?yield a(s,"analyticsFetch"):{}),{url:c}=u,l=Tr(u,["url"]),d;try{d=yield zg(c,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 E(this,void 0,void 0,function*(){let{baseUrl:t}=this.opts,r=`${t}/analytics/visit`;yield zg(r,{headers:this.getHeaders(),method:"DELETE"})})}shouldAppendVisitorId(t){return[ee.click,ee.custom,ee.search,ee.view].indexOf(t)!==-1}getVisitorIdParam(){return E(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"})}},jd=class{constructor(t,r){qd()&&Yg()?this.storage=new Dd:qd()?this.storage=localStorage:(console.warn("BrowserRuntime detected no valid storage available.",this),this.storage=new Yn),this.client=new uc(t),this.beaconClient=new Bd(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}},_d=class{constructor(t,r){this.storage=r||new Yn,this.client=new uc(t)}getClientDependingOnEventType(t){return this.client}},lc=class{constructor(){this.storage=new Yn,this.client=new Ud}getClientDependingOnEventType(t){return this.client}},Pb="xx",Ab=e=>e?.startsWith(Pb)||!1,vb=`
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
@@ -8917,7 +8917,7 @@ var setSearchHub = createAction(
8917
8917
  );
8918
8918
 
8919
8919
  // src/utils/version.ts
8920
- var VERSION = "3.19.0";
8920
+ var VERSION = "3.19.1";
8921
8921
  var COVEO_FRAMEWORK = ["@coveo/atomic", "@coveo/quantic"];
8922
8922
 
8923
8923
  // src/features/configuration/configuration-actions.ts
@@ -4511,7 +4511,7 @@ var setSearchHub = createAction(
4511
4511
  );
4512
4512
 
4513
4513
  // src/utils/version.ts
4514
- var VERSION = "3.19.0";
4514
+ var VERSION = "3.19.1";
4515
4515
  var COVEO_FRAMEWORK = ["@coveo/atomic", "@coveo/quantic"];
4516
4516
 
4517
4517
  // src/features/configuration/configuration-actions.ts
@@ -9293,7 +9293,7 @@ var validateObject = (engine, schema, obj, validationMessage, errorMessage) => {
9293
9293
  };
9294
9294
 
9295
9295
  // src/utils/version.ts
9296
- var VERSION = "3.19.0";
9296
+ var VERSION = "3.19.1";
9297
9297
  var COVEO_FRAMEWORK = ["@coveo/atomic", "@coveo/quantic"];
9298
9298
 
9299
9299
  // src/features/configuration/configuration-actions.ts
@@ -4847,7 +4847,7 @@ var validateObject = (engine, schema, obj, validationMessage, errorMessage) => {
4847
4847
  };
4848
4848
 
4849
4849
  // src/utils/version.ts
4850
- var VERSION = "3.19.0";
4850
+ var VERSION = "3.19.1";
4851
4851
  var COVEO_FRAMEWORK = ["@coveo/atomic", "@coveo/quantic"];
4852
4852
 
4853
4853
  // src/features/configuration/configuration-actions.ts
package/dist/headless.cjs CHANGED
@@ -9816,7 +9816,7 @@ function createRelay(initialConfig) {
9816
9816
  }
9817
9817
 
9818
9818
  // src/utils/version.ts
9819
- var VERSION = "3.19.0";
9819
+ var VERSION = "3.19.1";
9820
9820
  var COVEO_FRAMEWORK = ["@coveo/atomic", "@coveo/quantic"];
9821
9821
 
9822
9822
  // src/api/analytics/analytics-selectors.ts
@@ -5308,7 +5308,7 @@ function createRelay(initialConfig) {
5308
5308
  }
5309
5309
 
5310
5310
  // src/utils/version.ts
5311
- var VERSION = "3.19.0";
5311
+ var VERSION = "3.19.1";
5312
5312
  var COVEO_FRAMEWORK = ["@coveo/atomic", "@coveo/quantic"];
5313
5313
 
5314
5314
  // src/api/analytics/analytics-selectors.ts
@@ -9723,7 +9723,7 @@ function createRelay(initialConfig) {
9723
9723
  }
9724
9724
 
9725
9725
  // src/utils/version.ts
9726
- var VERSION = "3.19.0";
9726
+ var VERSION = "3.19.1";
9727
9727
  var COVEO_FRAMEWORK = ["@coveo/atomic", "@coveo/quantic"];
9728
9728
 
9729
9729
  // src/api/analytics/analytics-selectors.ts
@@ -5274,7 +5274,7 @@ function createRelay(initialConfig) {
5274
5274
  }
5275
5275
 
5276
5276
  // src/utils/version.ts
5277
- var VERSION = "3.19.0";
5277
+ var VERSION = "3.19.1";
5278
5278
  var COVEO_FRAMEWORK = ["@coveo/atomic", "@coveo/quantic"];
5279
5279
 
5280
5280
  // src/api/analytics/analytics-selectors.ts