@coveo/headless 3.23.2-pre.57bb336b29 → 3.23.2-pre.d35ebef42a
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/case-assist/headless.esm.js +1 -1
- package/dist/browser/case-assist/headless.js +1 -1
- package/dist/browser/commerce/headless.esm.js +1 -1
- package/dist/browser/commerce/headless.js +1 -1
- package/dist/browser/headless.esm.js +1 -1
- package/dist/browser/headless.js +1 -1
- package/dist/browser/insight/headless.esm.js +1 -1
- package/dist/browser/insight/headless.js +1 -1
- package/dist/browser/recommendation/headless.esm.js +1 -1
- package/dist/browser/recommendation/headless.js +1 -1
- package/dist/browser/ssr/headless.esm.js +1 -1
- package/dist/browser/ssr/headless.js +1 -1
- package/dist/browser/ssr-commerce/headless.esm.js +1 -1
- package/dist/browser/ssr-commerce/headless.js +1 -1
- package/dist/case-assist/headless.cjs +1 -1
- package/dist/case-assist/headless.esm.js +1 -1
- package/dist/commerce/headless.cjs +1 -1
- package/dist/commerce/headless.esm.js +1 -1
- package/dist/headless.cjs +1 -1
- package/dist/headless.esm.js +1 -1
- package/dist/insight/headless.cjs +1 -1
- package/dist/insight/headless.esm.js +1 -1
- package/dist/quantic/case-assist/headless.js +1 -1
- package/dist/quantic/commerce/headless.js +1 -1
- package/dist/quantic/headless.js +1 -1
- package/dist/quantic/insight/headless.js +1 -1
- package/dist/quantic/recommendation/headless.js +1 -1
- package/dist/recommendation/headless.cjs +1 -1
- package/dist/recommendation/headless.esm.js +1 -1
- package/dist/ssr/headless.cjs +1 -1
- package/dist/ssr/headless.esm.js +1 -1
- package/dist/ssr-commerce/headless.cjs +1 -1
- package/dist/ssr-commerce/headless.esm.js +1 -1
- package/package.json +1 -1
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
* limitations under the License.
|
|
17
17
|
*/(function(g,f){if(typeof exports=="object"&&typeof module<"u"){module.exports=f(require)}else if("function"==typeof define && define.amd){define("CoveoHeadlessSSR",["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["CoveoHeadlessSSR"]=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 BP=Object.create;var Is=Object.defineProperty;var UP=Object.getOwnPropertyDescriptor;var jP=Object.getOwnPropertyNames;var _P=Object.getPrototypeOf,$P=Object.prototype.hasOwnProperty;var WP=(e,t,r)=>t in e?Is(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Le=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),HP=(e,t)=>{for(var r in t)Is(e,r,{get:t[r],enumerable:!0})},CS=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of jP(t))!$P.call(e,o)&&o!==r&&Is(e,o,{get:()=>t[o],enumerable:!(n=UP(t,o))||n.enumerable});return e};var nr=(e,t,r)=>(r=e!=null?BP(_P(e)):{},CS(t||!e||!e.__esModule?Is(r,"default",{value:e,enumerable:!0}):r,e)),zP=e=>CS(Is({},"__esModule",{value:!0}),e);var Ae=(e,t,r)=>WP(e,typeof t!="symbol"?t+"":t,r);var PS=Le((zQ,vS)=>{"use strict";function JP(e){try{return JSON.stringify(e)}catch{return'"[Circular]"'}}vS.exports=XP;function XP(e,t,r){var n=r&&r.stringify||JP,o=1;if(typeof e=="object"&&e!==null){var a=t.length+o;if(a===1)return e;var i=new Array(a);i[0]=n(e);for(var s=1;s<a;s++)i[s]=n(t[s]);return i.join(" ")}if(typeof e!="string")return e;var c=t.length;if(c===0)return e;for(var u="",l=1-o,p=-1,m=e&&e.length||0,d=0;d<m;){if(e.charCodeAt(d)===37&&d+1<m){switch(p=p>-1?p:0,e.charCodeAt(d+1)){case 100:case 102:if(l>=c||t[l]==null)break;p<d&&(u+=e.slice(p,d)),u+=Number(t[l]),p=d+2,d++;break;case 105:if(l>=c||t[l]==null)break;p<d&&(u+=e.slice(p,d)),u+=Math.floor(Number(t[l])),p=d+2,d++;break;case 79:case 111:case 106:if(l>=c||t[l]===void 0)break;p<d&&(u+=e.slice(p,d));var f=typeof t[l];if(f==="string"){u+="'"+t[l]+"'",p=d+2,d++;break}if(f==="function"){u+=t[l].name||"<anonymous>",p=d+2,d++;break}u+=n(t[l]),p=d+2,d++;break;case 115:if(l>=c)break;p<d&&(u+=e.slice(p,d)),u+=String(t[l]),p=d+2,d++;break;case 37:p<d&&(u+=e.slice(p,d)),u+="%",p=d+2,d++,l--;break}++l}++d}return p===-1?e:(p<m&&(u+=e.slice(p)),u)}});var OS=Le((GQ,tu)=>{"use strict";var wS=PS();tu.exports=jr;var ks=mw().console||{},ZP={mapHttpRequest:eu,mapHttpResponse:eu,wrapRequestSerializer:om,wrapResponseSerializer:om,wrapErrorSerializer:om,req:eu,res:eu,err:IS,errWithCause:IS};function dn(e,t){return e==="silent"?1/0:t.levels.values[e]}var sm=Symbol("pino.logFuncs"),am=Symbol("pino.hierarchy"),ew={error:"log",fatal:"error",warn:"error",info:"log",debug:"log",trace:"log"};function ES(e,t){let r={logger:t,parent:e[am]};t[am]=r}function tw(e,t,r){let n={};t.forEach(o=>{n[o]=r[o]?r[o]:ks[o]||ks[ew[o]||"log"]||oa}),e[sm]=n}function rw(e,t){return Array.isArray(e)?e.filter(function(n){return n!=="!stdSerializers.err"}):e===!0?Object.keys(t):!1}function jr(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||ks;e.browser.write&&(e.browser.asObject=!0);let n=e.serializers||{},o=rw(e.browser.serialize,n),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(F){r[F]=r}),(e.enabled===!1||e.browser.disabled)&&(e.level="silent");let c=e.level||"info",u=Object.create(r);u.log||(u.log=oa),tw(u,s,r),ES({},u),Object.defineProperty(u,"levelVal",{get:p}),Object.defineProperty(u,"level",{get:m,set:d});let l={transmit:t,serialize:o,asObject:e.browser.asObject,formatters:e.browser.formatters,levels:s,timestamp:lw(e),messageKey:e.messageKey||"msg",onChild:e.onChild||oa};u.levels=nw(e),u.level=c,u.setMaxListeners=u.getMaxListeners=u.emit=u.addListener=u.on=u.prependListener=u.once=u.prependOnceListener=u.removeListener=u.removeAllListeners=u.listeners=u.listenerCount=u.eventNames=u.write=u.flush=oa,u.serializers=n,u._serialize=o,u._stdErrSerialize=a,u.child=function(...F){return f.call(this,l,...F)},t&&(u._logEvent=im());function p(){return dn(this.level,this)}function m(){return this._level}function d(F){if(F!=="silent"&&!this.levels.values[F])throw Error("unknown level "+F);this._level=F,So(this,l,u,"error"),So(this,l,u,"fatal"),So(this,l,u,"warn"),So(this,l,u,"info"),So(this,l,u,"debug"),So(this,l,u,"trace"),i.forEach(S=>{So(this,l,u,S)})}function f(F,S,g){if(!S)throw new Error("missing bindings for child Pino");g=g||{},o&&S.serializers&&(g.serializers=S.serializers);let C=g.serializers;if(o&&C){var y=Object.assign({},n,C),R=e.browser.serialize===!0?Object.keys(y):o;delete S.serializers,cm([S],R,y,this._stdErrSerialize)}function E(A){this._childLevel=(A._childLevel|0)+1,this.bindings=S,y&&(this.serializers=y,this._serialize=R),t&&(this._logEvent=im([].concat(A._logEvent.bindings,S)))}E.prototype=this;let v=new E(this);return ES(this,v),v.child=function(...A){return f.call(this,F,...A)},v.level=g.level||this.level,F.onChild(v),v}return u}function nw(e){let t=e.customLevels||{},r=Object.assign({},jr.levels.values,t),n=Object.assign({},jr.levels.labels,ow(t));return{values:r,labels:n}}function ow(e){let t={};return Object.keys(e).forEach(function(r){t[e[r]]=r}),t}jr.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"}};jr.stdSerializers=ZP;jr.stdTimeFunctions=Object.assign({},{nullTime:TS,epochTime:kS,unixTime:dw,isoTime:pw});function aw(e){let t=[];e.bindings&&t.push(e.bindings);let r=e[am];for(;r.parent;)r=r.parent,r.logger.bindings&&t.push(r.logger.bindings);return t.reverse()}function So(e,t,r,n){if(Object.defineProperty(e,n,{value:dn(e.level,r)>dn(n,r)?oa:r[sm][n],writable:!0,enumerable:!0,configurable:!0}),e[n]===oa){if(!t.transmit)return;let a=t.transmit.level||e.level,i=dn(a,r);if(dn(n,r)<i)return}e[n]=sw(e,t,r,n);let o=aw(e);o.length!==0&&(e[n]=iw(o,e[n]))}function iw(e,t){return function(){return t.apply(this,[...e,...arguments])}}function sw(e,t,r,n){return function(o){return function(){let i=t.timestamp(),s=new Array(arguments.length),c=Object.getPrototypeOf&&Object.getPrototypeOf(this)===ks?ks:this;for(var u=0;u<s.length;u++)s[u]=arguments[u];var l=!1;if(t.serialize&&(cm(s,this._serialize,this.serializers,this._stdErrSerialize),l=!0),t.asObject||t.formatters?o.call(c,cw(this,n,s,i,t)):o.apply(c,s),t.transmit){let p=t.transmit.level||e._level,m=dn(p,r),d=dn(n,r);if(d<m)return;uw(this,{ts:i,methodLevel:n,methodValue:d,transmitLevel:p,transmitValue:r.levels.values[t.transmit.level||e._level],send:t.transmit.send,val:dn(e._level,r)},s,l)}}}(e[sm][n])}function cw(e,t,r,n,o){let{level:a,log:i=m=>m}=o.formatters||{},s=r.slice(),c=s[0],u={};if(n&&(u.time=n),a){let m=a(t,e.levels.values[t]);Object.assign(u,m)}else u.level=e.levels.values[t];let l=(e._childLevel|0)+1;if(l<1&&(l=1),c!==null&&typeof c=="object"){for(;l--&&typeof s[0]=="object";)Object.assign(u,s.shift());c=s.length?wS(s.shift(),s):void 0}else typeof c=="string"&&(c=wS(s.shift(),s));return c!==void 0&&(u[o.messageKey]=c),i(u)}function cm(e,t,r,n){for(let o in e)if(n&&e[o]instanceof Error)e[o]=jr.stdSerializers.err(e[o]);else if(typeof e[o]=="object"&&!Array.isArray(e[o])&&t)for(let a in e[o])t.indexOf(a)>-1&&a in r&&(e[o][a]=r[a](e[o][a]))}function uw(e,t,r,n=!1){let o=t.send,a=t.ts,i=t.methodLevel,s=t.methodValue,c=t.val,u=e._logEvent.bindings;n||cm(r,e._serialize||Object.keys(e.serializers),e.serializers,e._stdErrSerialize===void 0?!0:e._stdErrSerialize),e._logEvent.ts=a,e._logEvent.messages=r.filter(function(l){return u.indexOf(l)===-1}),e._logEvent.level.label=i,e._logEvent.level.value=s,o(i,e._logEvent,c),e._logEvent=im(u)}function im(e){return{ts:0,messages:[],bindings:e||[],level:{label:"",value:0}}}function IS(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 lw(e){return typeof e.timestamp=="function"?e.timestamp:e.timestamp===!1?TS:kS}function eu(){return{}}function om(e){return e}function oa(){}function TS(){return!1}function kS(){return Date.now()}function dw(){return Math.round(Date.now()/1e3)}function pw(){return new Date(Date.now()).toISOString()}function mw(){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)||{}}}tu.exports.default=jr;tu.exports.pino=jr});var _S=Le(Ds=>{"use strict";var au=Ds&&Ds.__assign||function(){return au=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},au.apply(this,arguments)};Object.defineProperty(Ds,"__esModule",{value:!0});var Rw={delayFirstAttempt:!1,jitter:"none",maxDelay:1/0,numOfAttempts:10,retry:function(){return!0},startingDelay:100,timeMultiple:2};function Aw(e){var t=au(au({},Rw),e);return t.numOfAttempts<1&&(t.numOfAttempts=1),t}Ds.getSanitizedOptions=Aw});var $S=Le(fm=>{"use strict";Object.defineProperty(fm,"__esModule",{value:!0});function bw(e){var t=Math.random()*e;return Math.round(t)}fm.fullJitter=bw});var WS=Le(gm=>{"use strict";Object.defineProperty(gm,"__esModule",{value:!0});function vw(e){return e}gm.noJitter=vw});var HS=Le(Sm=>{"use strict";Object.defineProperty(Sm,"__esModule",{value:!0});var Pw=$S(),ww=WS();function Ew(e){switch(e.jitter){case"full":return Pw.fullJitter;case"none":default:return ww.noJitter}}Sm.JitterFactory=Ew});var ym=Le(hm=>{"use strict";Object.defineProperty(hm,"__esModule",{value:!0});var Iw=HS(),Tw=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=Iw.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,n=this.numOfDelayedAttempts,o=t*Math.pow(r,n);return Math.min(o,this.options.maxDelay)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"numOfDelayedAttempts",{get:function(){return this.attempt},enumerable:!0,configurable:!0}),e}();hm.Delay=Tw});var zS=Le(_r=>{"use strict";var kw=_r&&_r.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var a in o)o.hasOwnProperty(a)&&(n[a]=o[a])},e(t,r)};return function(t,r){e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ow=_r&&_r.__awaiter||function(e,t,r,n){function o(a){return a instanceof r?a:new r(function(i){i(a)})}return new(r||(r=Promise))(function(a,i){function s(l){try{u(n.next(l))}catch(p){i(p)}}function c(l){try{u(n.throw(l))}catch(p){i(p)}}function u(l){l.done?a(l.value):o(l.value).then(s,c)}u((n=n.apply(e,t||[])).next())})},Dw=_r&&_r.__generator||function(e,t){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,o,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(u){return function(l){return c([u,l])}}function c(u){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,o&&(a=u[0]&2?o.return:u[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,u[1])).done)return a;switch(o=0,a&&(u=[u[0]&2,a.value]),u[0]){case 0:case 1:a=u;break;case 4:return r.label++,{value:u[1],done:!1};case 5:r.label++,o=u[1],u=[0];continue;case 7:u=r.ops.pop(),r.trys.pop();continue;default:if(a=r.trys,!(a=a.length>0&&a[a.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!a||u[1]>a[0]&&u[1]<a[3])){r.label=u[1];break}if(u[0]===6&&r.label<a[1]){r.label=a[1],a=u;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(u);break}a[2]&&r.ops.pop(),r.trys.pop();continue}u=t.call(e,r)}catch(l){u=[6,l],o=0}finally{n=a=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}};Object.defineProperty(_r,"__esModule",{value:!0});var qw=ym(),Vw=function(e){kw(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.apply=function(){return Ow(this,void 0,void 0,function(){return Dw(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}(qw.Delay);_r.SkipFirstDelay=Vw});var GS=Le(qs=>{"use strict";var Nw=qs&&qs.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var a in o)o.hasOwnProperty(a)&&(n[a]=o[a])},e(t,r)};return function(t,r){e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(qs,"__esModule",{value:!0});var Mw=ym(),Qw=function(e){Nw(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(Mw.Delay);qs.AlwaysDelay=Qw});var KS=Le(Cm=>{"use strict";Object.defineProperty(Cm,"__esModule",{value:!0});var Lw=zS(),Bw=GS();function Uw(e,t){var r=jw(e);return r.setAttemptNumber(t),r}Cm.DelayFactory=Uw;function jw(e){return e.delayFirstAttempt?new Bw.AlwaysDelay(e):new Lw.SkipFirstDelay(e)}});var YS=Le(ho=>{"use strict";var xm=ho&&ho.__awaiter||function(e,t,r,n){function o(a){return a instanceof r?a:new r(function(i){i(a)})}return new(r||(r=Promise))(function(a,i){function s(l){try{u(n.next(l))}catch(p){i(p)}}function c(l){try{u(n.throw(l))}catch(p){i(p)}}function u(l){l.done?a(l.value):o(l.value).then(s,c)}u((n=n.apply(e,t||[])).next())})},Fm=ho&&ho.__generator||function(e,t){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,o,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(u){return function(l){return c([u,l])}}function c(u){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,o&&(a=u[0]&2?o.return:u[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,u[1])).done)return a;switch(o=0,a&&(u=[u[0]&2,a.value]),u[0]){case 0:case 1:a=u;break;case 4:return r.label++,{value:u[1],done:!1};case 5:r.label++,o=u[1],u=[0];continue;case 7:u=r.ops.pop(),r.trys.pop();continue;default:if(a=r.trys,!(a=a.length>0&&a[a.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!a||u[1]>a[0]&&u[1]<a[3])){r.label=u[1];break}if(u[0]===6&&r.label<a[1]){r.label=a[1],a=u;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(u);break}a[2]&&r.ops.pop(),r.trys.pop();continue}u=t.call(e,r)}catch(l){u=[6,l],o=0}finally{n=a=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}};Object.defineProperty(ho,"__esModule",{value:!0});var _w=_S(),$w=KS();function Ww(e,t){return t===void 0&&(t={}),xm(this,void 0,void 0,function(){var r,n;return Fm(this,function(o){switch(o.label){case 0:return r=_w.getSanitizedOptions(t),n=new Hw(e,r),[4,n.execute()];case 1:return[2,o.sent()]}})})}ho.backOff=Ww;var Hw=function(){function e(t,r){this.request=t,this.options=r,this.attemptNumber=0}return e.prototype.execute=function(){return xm(this,void 0,void 0,function(){var t,r;return Fm(this,function(n){switch(n.label){case 0:if(this.attemptLimitReached)return[3,7];n.label=1;case 1:return n.trys.push([1,4,,6]),[4,this.applyDelay()];case 2:return n.sent(),[4,this.request()];case 3:return[2,n.sent()];case 4:return t=n.sent(),this.attemptNumber++,[4,this.options.retry(t,this.attemptNumber)];case 5:if(r=n.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 xm(this,void 0,void 0,function(){var t;return Fm(this,function(r){switch(r.label){case 0:return t=$w.DelayFactory(this.options,this.attemptNumber),[4,t.apply()];case 1:return r.sent(),[2]}})})},e}()});var el=Le((Rf,Af)=>{"use strict";(function(e,t){typeof Rf=="object"&&typeof Af<"u"?Af.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs=t()})(Rf,function(){"use strict";var e=1e3,t=6e4,r=36e5,n="millisecond",o="second",a="minute",i="hour",s="day",c="week",u="month",l="quarter",p="year",m="date",d="Invalid Date",f=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,F=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,S={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(q){var O=["th","st","nd","rd"],k=q%100;return"["+q+(O[(k-20)%10]||O[k]||O[0])+"]"}},g=function(q,O,k){var M=String(q);return!M||M.length>=O?q:""+Array(O+1-M.length).join(k)+q},C={s:g,z:function(q){var O=-q.utcOffset(),k=Math.abs(O),M=Math.floor(k/60),D=k%60;return(O<=0?"+":"-")+g(M,2,"0")+":"+g(D,2,"0")},m:function q(O,k){if(O.date()<k.date())return-q(k,O);var M=12*(k.year()-O.year())+(k.month()-O.month()),D=O.clone().add(M,u),U=k-D<0,j=O.clone().add(M+(U?-1:1),u);return+(-(M+(k-D)/(U?D-j:j-D))||0)},a:function(q){return q<0?Math.ceil(q)||0:Math.floor(q)},p:function(q){return{M:u,y:p,w:c,d:s,D:m,h:i,m:a,s:o,ms:n,Q:l}[q]||String(q||"").toLowerCase().replace(/s$/,"")},u:function(q){return q===void 0}},y="en",R={};R[y]=S;var E="$isDayjsObject",v=function(q){return q instanceof T||!(!q||!q[E])},A=function q(O,k,M){var D;if(!O)return y;if(typeof O=="string"){var U=O.toLowerCase();R[U]&&(D=U),k&&(R[U]=k,D=U);var j=O.split("-");if(!D&&j.length>1)return q(j[0])}else{var z=O.name;R[z]=O,D=z}return!M&&D&&(y=D),D||!M&&y},b=function(q,O){if(v(q))return q.clone();var k=typeof O=="object"?O:{};return k.date=q,k.args=arguments,new T(k)},P=C;P.l=A,P.i=v,P.w=function(q,O){return b(q,{locale:O.$L,utc:O.$u,x:O.$x,$offset:O.$offset})};var T=function(){function q(k){this.$L=A(k.locale,null,!0),this.parse(k),this.$x=this.$x||k.x||{},this[E]=!0}var O=q.prototype;return O.parse=function(k){this.$d=function(M){var D=M.date,U=M.utc;if(D===null)return new Date(NaN);if(P.u(D))return new Date;if(D instanceof Date)return new Date(D);if(typeof D=="string"&&!/Z$/i.test(D)){var j=D.match(f);if(j){var z=j[2]-1||0,ee=(j[7]||"0").substring(0,3);return U?new Date(Date.UTC(j[1],z,j[3]||1,j[4]||0,j[5]||0,j[6]||0,ee)):new Date(j[1],z,j[3]||1,j[4]||0,j[5]||0,j[6]||0,ee)}}return new Date(D)}(k),this.init()},O.init=function(){var k=this.$d;this.$y=k.getFullYear(),this.$M=k.getMonth(),this.$D=k.getDate(),this.$W=k.getDay(),this.$H=k.getHours(),this.$m=k.getMinutes(),this.$s=k.getSeconds(),this.$ms=k.getMilliseconds()},O.$utils=function(){return P},O.isValid=function(){return this.$d.toString()!==d},O.isSame=function(k,M){var D=b(k);return this.startOf(M)<=D&&D<=this.endOf(M)},O.isAfter=function(k,M){return b(k)<this.startOf(M)},O.isBefore=function(k,M){return this.endOf(M)<b(k)},O.$g=function(k,M,D){return P.u(k)?this[M]:this.set(D,k)},O.unix=function(){return Math.floor(this.valueOf()/1e3)},O.valueOf=function(){return this.$d.getTime()},O.startOf=function(k,M){var D=this,U=!!P.u(M)||M,j=P.p(k),z=function(ie,Se){var Re=P.w(D.$u?Date.UTC(D.$y,Se,ie):new Date(D.$y,Se,ie),D);return U?Re:Re.endOf(s)},ee=function(ie,Se){return P.w(D.toDate()[ie].apply(D.toDate("s"),(U?[0,0,0,0]:[23,59,59,999]).slice(Se)),D)},oe=this.$W,X=this.$M,te=this.$D,J="set"+(this.$u?"UTC":"");switch(j){case p:return U?z(1,0):z(31,11);case u:return U?z(1,X):z(0,X+1);case c:var re=this.$locale().weekStart||0,ye=(oe<re?oe+7:oe)-re;return z(U?te-ye:te+(6-ye),X);case s:case m:return ee(J+"Hours",0);case i:return ee(J+"Minutes",1);case a:return ee(J+"Seconds",2);case o:return ee(J+"Milliseconds",3);default:return this.clone()}},O.endOf=function(k){return this.startOf(k,!1)},O.$set=function(k,M){var D,U=P.p(k),j="set"+(this.$u?"UTC":""),z=(D={},D[s]=j+"Date",D[m]=j+"Date",D[u]=j+"Month",D[p]=j+"FullYear",D[i]=j+"Hours",D[a]=j+"Minutes",D[o]=j+"Seconds",D[n]=j+"Milliseconds",D)[U],ee=U===s?this.$D+(M-this.$W):M;if(U===u||U===p){var oe=this.clone().set(m,1);oe.$d[z](ee),oe.init(),this.$d=oe.set(m,Math.min(this.$D,oe.daysInMonth())).$d}else z&&this.$d[z](ee);return this.init(),this},O.set=function(k,M){return this.clone().$set(k,M)},O.get=function(k){return this[P.p(k)]()},O.add=function(k,M){var D,U=this;k=Number(k);var j=P.p(M),z=function(X){var te=b(U);return P.w(te.date(te.date()+Math.round(X*k)),U)};if(j===u)return this.set(u,this.$M+k);if(j===p)return this.set(p,this.$y+k);if(j===s)return z(1);if(j===c)return z(7);var ee=(D={},D[a]=t,D[i]=r,D[o]=e,D)[j]||1,oe=this.$d.getTime()+k*ee;return P.w(oe,this)},O.subtract=function(k,M){return this.add(-1*k,M)},O.format=function(k){var M=this,D=this.$locale();if(!this.isValid())return D.invalidDate||d;var U=k||"YYYY-MM-DDTHH:mm:ssZ",j=P.z(this),z=this.$H,ee=this.$m,oe=this.$M,X=D.weekdays,te=D.months,J=D.meridiem,re=function(Se,Re,rt,xt){return Se&&(Se[Re]||Se(M,U))||rt[Re].slice(0,xt)},ye=function(Se){return P.s(z%12||12,Se,"0")},ie=J||function(Se,Re,rt){var xt=Se<12?"AM":"PM";return rt?xt.toLowerCase():xt};return U.replace(F,function(Se,Re){return Re||function(rt){switch(rt){case"YY":return String(M.$y).slice(-2);case"YYYY":return P.s(M.$y,4,"0");case"M":return oe+1;case"MM":return P.s(oe+1,2,"0");case"MMM":return re(D.monthsShort,oe,te,3);case"MMMM":return re(te,oe);case"D":return M.$D;case"DD":return P.s(M.$D,2,"0");case"d":return String(M.$W);case"dd":return re(D.weekdaysMin,M.$W,X,2);case"ddd":return re(D.weekdaysShort,M.$W,X,3);case"dddd":return X[M.$W];case"H":return String(z);case"HH":return P.s(z,2,"0");case"h":return ye(1);case"hh":return ye(2);case"a":return ie(z,ee,!0);case"A":return ie(z,ee,!1);case"m":return String(ee);case"mm":return P.s(ee,2,"0");case"s":return String(M.$s);case"ss":return P.s(M.$s,2,"0");case"SSS":return P.s(M.$ms,3,"0");case"Z":return j}return null}(Se)||j.replace(":","")})},O.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},O.diff=function(k,M,D){var U,j=this,z=P.p(M),ee=b(k),oe=(ee.utcOffset()-this.utcOffset())*t,X=this-ee,te=function(){return P.m(j,ee)};switch(z){case p:U=te()/12;break;case u:U=te();break;case l:U=te()/3;break;case c:U=(X-oe)/6048e5;break;case s:U=(X-oe)/864e5;break;case i:U=X/r;break;case a:U=X/t;break;case o:U=X/e;break;default:U=X}return D?U:P.a(U)},O.daysInMonth=function(){return this.endOf(u).$D},O.$locale=function(){return R[this.$L]},O.locale=function(k,M){if(!k)return this.$L;var D=this.clone(),U=A(k,M,!0);return U&&(D.$L=U),D},O.clone=function(){return P.w(this.$d,this)},O.toDate=function(){return new Date(this.valueOf())},O.toJSON=function(){return this.isValid()?this.toISOString():null},O.toISOString=function(){return this.$d.toISOString()},O.toString=function(){return this.$d.toUTCString()},q}(),L=T.prototype;return b.prototype=L,[["$ms",n],["$s",o],["$m",a],["$H",i],["$W",s],["$M",u],["$y",p],["$D",m]].forEach(function(q){L[q[1]]=function(O){return this.$g(O,q[0],q[1])}}),b.extend=function(q,O){return q.$i||(q(O,T,b),q.$i=!0),b},b.locale=A,b.isDayjs=v,b.unix=function(q){return b(1e3*q)},b.en=R[y],b.Ls=R,b.p={},b})});var sC=Le((bf,vf)=>{"use strict";(function(e,t){typeof bf=="object"&&typeof vf<"u"?vf.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_quarterOfYear=t()})(bf,function(){"use strict";var e="month",t="quarter";return function(r,n){var o=n.prototype;o.quarter=function(s){return this.$utils().u(s)?Math.ceil((this.month()+1)/3):this.month(this.month()%3+3*(s-1))};var a=o.add;o.add=function(s,c){return s=Number(s),this.$utils().p(c)===t?this.add(3*s,e):a.bind(this)(s,c)};var i=o.startOf;o.startOf=function(s,c){var u=this.$utils(),l=!!u.u(c)||c;if(u.p(s)===t){var p=this.quarter()-1;return l?this.month(3*p).startOf(e).startOf("day"):this.month(3*p+2).endOf(e).endOf("day")}return i.bind(this)(s,c)}}})});var cC=Le((Pf,wf)=>{"use strict";(function(e,t){typeof Pf=="object"&&typeof wf<"u"?wf.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_customParseFormat=t()})(Pf,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/,n=/\d\d/,o=/\d\d?/,a=/\d*[^-_:/,()\s\d]+/,i={},s=function(f){return(f=+f)+(f>68?1900:2e3)},c=function(f){return function(F){this[f]=+F}},u=[/[+-]\d\d:?(\d\d)?|Z/,function(f){(this.zone||(this.zone={})).offset=function(F){if(!F||F==="Z")return 0;var S=F.match(/([+-]|\d\d)/g),g=60*S[1]+(+S[2]||0);return g===0?0:S[0]==="+"?-g:g}(f)}],l=function(f){var F=i[f];return F&&(F.indexOf?F:F.s.concat(F.f))},p=function(f,F){var S,g=i.meridiem;if(g){for(var C=1;C<=24;C+=1)if(f.indexOf(g(C,0,F))>-1){S=C>12;break}}else S=f===(F?"pm":"PM");return S},m={A:[a,function(f){this.afternoon=p(f,!1)}],a:[a,function(f){this.afternoon=p(f,!0)}],Q:[r,function(f){this.month=3*(f-1)+1}],S:[r,function(f){this.milliseconds=100*+f}],SS:[n,function(f){this.milliseconds=10*+f}],SSS:[/\d{3}/,function(f){this.milliseconds=+f}],s:[o,c("seconds")],ss:[o,c("seconds")],m:[o,c("minutes")],mm:[o,c("minutes")],H:[o,c("hours")],h:[o,c("hours")],HH:[o,c("hours")],hh:[o,c("hours")],D:[o,c("day")],DD:[n,c("day")],Do:[a,function(f){var F=i.ordinal,S=f.match(/\d+/);if(this.day=S[0],F)for(var g=1;g<=31;g+=1)F(g).replace(/\[|\]/g,"")===f&&(this.day=g)}],w:[o,c("week")],ww:[n,c("week")],M:[o,c("month")],MM:[n,c("month")],MMM:[a,function(f){var F=l("months"),S=(l("monthsShort")||F.map(function(g){return g.slice(0,3)})).indexOf(f)+1;if(S<1)throw new Error;this.month=S%12||S}],MMMM:[a,function(f){var F=l("months").indexOf(f)+1;if(F<1)throw new Error;this.month=F%12||F}],Y:[/[+-]?\d+/,c("year")],YY:[n,function(f){this.year=s(f)}],YYYY:[/\d{4}/,c("year")],Z:u,ZZ:u};function d(f){var F,S;F=f,S=i&&i.formats;for(var g=(f=F.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(b,P,T){var L=T&&T.toUpperCase();return P||S[T]||e[T]||S[L].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(q,O,k){return O||k.slice(1)})})).match(t),C=g.length,y=0;y<C;y+=1){var R=g[y],E=m[R],v=E&&E[0],A=E&&E[1];g[y]=A?{regex:v,parser:A}:R.replace(/^\[|\]$/g,"")}return function(b){for(var P={},T=0,L=0;T<C;T+=1){var q=g[T];if(typeof q=="string")L+=q.length;else{var O=q.regex,k=q.parser,M=b.slice(L),D=O.exec(M)[0];k.call(P,D),b=b.replace(D,"")}}return function(U){var j=U.afternoon;if(j!==void 0){var z=U.hours;j?z<12&&(U.hours+=12):z===12&&(U.hours=0),delete U.afternoon}}(P),P}}return function(f,F,S){S.p.customParseFormat=!0,f&&f.parseTwoDigitYear&&(s=f.parseTwoDigitYear);var g=F.prototype,C=g.parse;g.parse=function(y){var R=y.date,E=y.utc,v=y.args;this.$u=E;var A=v[1];if(typeof A=="string"){var b=v[2]===!0,P=v[3]===!0,T=b||P,L=v[2];P&&(L=v[2]),i=this.$locale(),!b&&L&&(i=S.Ls[L]),this.$d=function(M,D,U,j){try{if(["x","X"].indexOf(D)>-1)return new Date((D==="X"?1e3:1)*M);var z=d(D)(M),ee=z.year,oe=z.month,X=z.day,te=z.hours,J=z.minutes,re=z.seconds,ye=z.milliseconds,ie=z.zone,Se=z.week,Re=new Date,rt=X||(ee||oe?1:Re.getDate()),xt=ee||Re.getFullYear(),un=0;ee&&!oe||(un=oe>0?oe-1:Re.getMonth());var ta,ra=te||0,Es=J||0,tm=re||0,rm=ye||0;return ie?new Date(Date.UTC(xt,un,rt,ra,Es,tm,rm+60*ie.offset*1e3)):U?new Date(Date.UTC(xt,un,rt,ra,Es,tm,rm)):(ta=new Date(xt,un,rt,ra,Es,tm,rm),Se&&(ta=j(ta).week(Se).toDate()),ta)}catch{return new Date("")}}(R,A,E,S),this.init(),L&&L!==!0&&(this.$L=this.locale(L).$L),T&&R!=this.format(A)&&(this.$d=new Date("")),i={}}else if(A instanceof Array)for(var q=A.length,O=1;O<=q;O+=1){v[1]=A[O-1];var k=S.apply(this,v);if(k.isValid()){this.$d=k.$d,this.$L=k.$L,this.init();break}O===q&&(this.$d=new Date(""))}else C.call(this,y)}}})});var Vx=Le((GH,qx)=>{"use strict";var jO=/(^|; )Coveo-Pendragon=([^;]*)/;qx.exports=()=>jO.exec(document.cookie)?.pop()||null});var Mx=Le((rg,ng)=>{"use strict";(function(e,t){typeof rg=="object"&&typeof ng<"u"?ng.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_timezone=t()})(rg,function(){"use strict";var e={year:0,month:1,day:2,hour:3,minute:4,second:5},t={};return function(r,n,o){var a,i=function(l,p,m){m===void 0&&(m={});var d=new Date(l),f=function(F,S){S===void 0&&(S={});var g=S.timeZoneName||"short",C=F+"|"+g,y=t[C];return y||(y=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:F,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:g}),t[C]=y),y}(p,m);return f.formatToParts(d)},s=function(l,p){for(var m=i(l,p),d=[],f=0;f<m.length;f+=1){var F=m[f],S=F.type,g=F.value,C=e[S];C>=0&&(d[C]=parseInt(g,10))}var y=d[3],R=y===24?0:y,E=d[0]+"-"+d[1]+"-"+d[2]+" "+R+":"+d[4]+":"+d[5]+":000",v=+l;return(o.utc(E).valueOf()-(v-=v%1e3))/6e4},c=n.prototype;c.tz=function(l,p){l===void 0&&(l=a);var m,d=this.utcOffset(),f=this.toDate(),F=f.toLocaleString("en-US",{timeZone:l}),S=Math.round((f-new Date(F))/1e3/60),g=15*-Math.round(f.getTimezoneOffset()/15)-S;if(!Number(g))m=this.utcOffset(0,p);else if(m=o(F,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(g,!0),p){var C=m.utcOffset();m=m.add(d-C,"minute")}return m.$x.$timezone=l,m},c.offsetName=function(l){var p=this.$x.$timezone||o.tz.guess(),m=i(this.valueOf(),p,{timeZoneName:l}).find(function(d){return d.type.toLowerCase()==="timezonename"});return m&&m.value};var u=c.startOf;c.startOf=function(l,p){if(!this.$x||!this.$x.$timezone)return u.call(this,l,p);var m=o(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return u.call(m,l,p).tz(this.$x.$timezone,!0)},o.tz=function(l,p,m){var d=m&&p,f=m||p||a,F=s(+o(),f);if(typeof l!="string")return o(l).tz(f);var S=function(R,E,v){var A=R-60*E*1e3,b=s(A,v);if(E===b)return[A,E];var P=s(A-=60*(b-E)*1e3,v);return b===P?[A,b]:[R-60*Math.min(b,P)*1e3,Math.max(b,P)]}(o.utc(l,d).valueOf(),F,f),g=S[0],C=S[1],y=o(g).utcOffset(C);return y.$x.$timezone=f,y},o.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},o.tz.setDefault=function(l){a=l}}})});var Qx=Le((og,ag)=>{"use strict";(function(e,t){typeof og=="object"&&typeof ag<"u"?ag.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_utc=t()})(og,function(){"use strict";var e="minute",t=/[+-]\d\d(?::?\d\d)?/g,r=/([+-]|\d\d)/g;return function(n,o,a){var i=o.prototype;a.utc=function(d){var f={date:d,utc:!0,args:arguments};return new o(f)},i.utc=function(d){var f=a(this.toDate(),{locale:this.$L,utc:!0});return d?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(d){d.utc&&(this.$u=!0),this.$utils().u(d.$offset)||(this.$offset=d.$offset),s.call(this,d)};var c=i.init;i.init=function(){if(this.$u){var d=this.$d;this.$y=d.getUTCFullYear(),this.$M=d.getUTCMonth(),this.$D=d.getUTCDate(),this.$W=d.getUTCDay(),this.$H=d.getUTCHours(),this.$m=d.getUTCMinutes(),this.$s=d.getUTCSeconds(),this.$ms=d.getUTCMilliseconds()}else c.call(this)};var u=i.utcOffset;i.utcOffset=function(d,f){var F=this.$utils().u;if(F(d))return this.$u?0:F(this.$offset)?u.call(this):this.$offset;if(typeof d=="string"&&(d=function(y){y===void 0&&(y="");var R=y.match(t);if(!R)return null;var E=(""+R[0]).match(r)||["-",0,0],v=E[0],A=60*+E[1]+ +E[2];return A===0?0:v==="+"?A:-A}(d),d===null))return this;var S=Math.abs(d)<=16?60*d:d,g=this;if(f)return g.$offset=S,g.$u=d===0,g;if(d!==0){var C=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(g=this.local().add(S+C,e)).$offset=S,g.$x.$localOffset=C}else g=this.utc();return g};var l=i.format;i.format=function(d){var f=d||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return l.call(this,f)},i.valueOf=function(){var d=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*d},i.isUTC=function(){return!!this.$u},i.toISOString=function(){return this.toDate().toISOString()},i.toString=function(){return this.toDate().toUTCString()};var p=i.toDate;i.toDate=function(d){return d==="s"&&this.$offset?a(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():p.call(this)};var m=i.diff;i.diff=function(d,f,F){if(d&&this.$u===d.$u)return m.call(this,d,f,F);var S=this.local(),g=a(d).local();return m.call(S,g,f,F)}}})});var _Q={};HP(_Q,{DefaultFieldsToInclude:()=>mg,EcommerceDefaultFieldsToInclude:()=>dF,MinimumFieldsToInclude:()=>ql,ResultTemplatesHelpers:()=>qC,SortBy:()=>wo,SortOrder:()=>ec,VERSION:()=>hn,baseFacetResponseSelector:()=>$t,buildCriterionExpression:()=>ur,buildDateRange:()=>rn,buildDateSortCriterion:()=>Qu,buildFieldSortCriterion:()=>Lu,buildNoSortCriterion:()=>Uu,buildNumericRange:()=>Go,buildQueryExpression:()=>UQ,buildQueryRankingExpressionSortCriterion:()=>Bu,buildRelevanceSortCriterion:()=>Pa,buildResultTemplatesManager:()=>CP,buildSSRSearchParameterSerializer:()=>wP,buildSearchParameterSerializer:()=>zc,buildStaticFilterValue:()=>xp,currentPageSelector:()=>an,currentPagesSelector:()=>np,defineAutomaticFacetGenerator:()=>pP,defineBreadcrumbManager:()=>Wb,defineCategoryFacet:()=>AR,defineCategoryFieldSuggestions:()=>cP,defineContext:()=>yF,defineDateFacet:()=>GR,defineDateFilter:()=>pA,defineDictionaryFieldContext:()=>xF,defineDidYouMean:()=>wF,defineExecuteTrigger:()=>Qv,defineFacet:()=>LR,defineFacetManager:()=>Bb,defineFieldSuggestions:()=>iP,defineFoldedResultList:()=>Ev,defineHistoryManager:()=>qA,defineInstantResults:()=>Rb,defineNotifyTrigger:()=>Bv,defineNumericFacet:()=>eA,defineNumericFilter:()=>iA,definePager:()=>QA,defineQueryError:()=>UA,defineQuerySummary:()=>$A,defineQueryTrigger:()=>Nv,defineQuickview:()=>xv,defineRecentQueriesList:()=>eP,defineRecentResultsList:()=>oP,defineRedirectionTrigger:()=>qv,defineRelevanceInspector:()=>fF,defineResultList:()=>HA,defineResultsPerPage:()=>KA,defineSearchBox:()=>pb,defineSearchEngine:()=>iF,defineSearchParameterManager:()=>iv,defineSearchStatus:()=>fv,defineSmartSnippet:()=>Wv,defineSmartSnippetQuestionsList:()=>Kv,defineSort:()=>wb,defineStandaloneSearchBox:()=>Yb,defineStaticFilter:()=>Tb,defineTab:()=>qb,defineTabManager:()=>Mb,defineUrlManager:()=>pv,deserializeRelativeDate:()=>yC,facetRequestSelector:()=>Mu,facetResponseSelectedValuesSelector:()=>wy,facetResponseSelector:()=>Ca,getAnalyticsNextApiBaseUrl:()=>iu,getOrganizationEndpoint:()=>Be,getSampleSearchEngineConfiguration:()=>dg,loadAdvancedSearchQueryActions:()=>WM,loadBreadcrumbActions:()=>CQ,loadCategoryFacetSetActions:()=>HM,loadClickAnalyticsActions:()=>EQ,loadConfigurationActions:()=>GM,loadContextActions:()=>YM,loadDateFacetSetActions:()=>ZM,loadDebugActions:()=>XM,loadDictionaryFieldContextActions:()=>JM,loadDidYouMeanActions:()=>tQ,loadExcerptLengthActions:()=>RQ,loadFacetOptionsActions:()=>eQ,loadFacetSetActions:()=>zM,loadFieldActions:()=>rQ,loadFoldingActions:()=>aQ,loadGeneratedAnswerActions:()=>bQ,loadGenericAnalyticsActions:()=>IQ,loadHistoryActions:()=>nQ,loadInstantResultsActions:()=>lQ,loadNumericFacetSetActions:()=>oQ,loadPaginationActions:()=>iQ,loadPipelineActions:()=>sQ,loadQueryActions:()=>cQ,loadQuerySetActions:()=>uQ,loadQuerySuggestActions:()=>dQ,loadQuestionAnsweringActions:()=>yQ,loadRecentQueriesActions:()=>xQ,loadRecentResultsActions:()=>FQ,loadResultPreviewActions:()=>AQ,loadSearchActions:()=>pQ,loadSearchAnalyticsActions:()=>wQ,loadSearchConfigurationActions:()=>KM,loadSearchHubActions:()=>mQ,loadSortCriteriaActions:()=>fQ,loadStandaloneSearchBoxSetActions:()=>gQ,loadStaticFilterSetActions:()=>SQ,loadTabSetActions:()=>hQ,maxPageSelector:()=>Nc,parseCriterionExpression:()=>EP,validateRelativeDate:()=>Tn});module.exports=zP(_Q);var na=(e,t=5)=>e+Math.random().toString(36).substring(2,2+t);function Jc(e){return Array.isArray(e)}function Ts(e){return e.trim()===""}function xS(e,t){return[...e.reduce((r,n)=>{let o=t(n);return r.has(o)||r.set(o,n),r},new Map).values()]}function GP(e){return btoa(encodeURI(e))}function Xc(e,t){let{[e]:r,...n}=t;return n}function Zc(e){return GP(JSON.stringify(e))}var KP=new Set(["1",1,"yes",!0]);function FS(){if(typeof navigator>"u"||typeof window>"u")return!1;let e=navigator,t=window;return[e.globalPrivacyControl,e.doNotTrack,e.msDoNotTrack,t.doNotTrack].some(r=>KP.has(r))}function RS(e){let t={};for(let[r,n]of e)t[r]=n;return t}function AS(e,t,r){return clearTimeout(t),setTimeout(e,r)}function nm(e,t){return Object.fromEntries(Object.entries(e).map(([r,n])=>[r,t(n,r)]))}function ln(e){if(typeof e!="object"||!e)return e;try{return JSON.parse(JSON.stringify(e))}catch{return e}}function YP(){let e=null,t=null;return{promise:new Promise((n,o)=>{e=n,t=o}),resolve:e,reject:t}}function bS(e){let{promise:t,resolve:r}=YP();return{promise:t,middleware:()=>o=>a=>{o(a),e(a)&&r(a)}}}var DS=nr(OS(),1);function ru(e){return(0,DS.pino)({name:"@coveo/headless",level:e?.level||"warn",formatters:{log:e?.logFormatter}})}function fw({definition:e,engine:t,props:r}){return"build"in e?e.build(t):e.buildWithProps(t,r)}function qS({definitionsMap:e,engine:t,propsMap:r}){return nm(e,(n,o)=>fw({definition:n,engine:t,props:r?.[o]}))}function VS({searchAction:e,controllers:t}){return{controllers:nm(t,r=>({state:ln(r.state)})),searchAction:ln(e)}}function um(e,t){let r=function(...n){return e(...n)};for(let[n,o]of Object.entries(t))r[n]=o;return r}async function MS(e,t){let r=e.getReader(),n;for(;!(n=await r.read()).done;)t(n.value)}function QS(e){let t,r,n,o=!1;return function(i){t===void 0?(t=i,r=0,n=-1):t=Sw(t,i);let s=t.length,c=0;for(;r<s;){o&&(t[r]===10&&(c=++r),o=!1);let u=-1;for(;r<s&&u===-1;++r)switch(t[r]){case 58:n===-1&&(n=r-c);break;case 13:o=!0,u=r;break;case 10:u=r;break}if(u===-1)break;e(t.subarray(c,u),n),c=r,n=-1}c===s?t=void 0:c!==0&&(t=t.subarray(c),r-=c)}}function LS(e,t,r){let n=NS(),o=new TextDecoder;return function(i,s){if(i.length===0)r?.(n),n=NS();else if(s>0){let c=o.decode(i.subarray(0,s)),u=s+(i[s+1]===32?2:1),l=o.decode(i.subarray(u));switch(c){case"data":n.data=n.data?n.data+`
|
|
19
|
-
`+l:l;break;case"event":n.event=l;break;case"id":e(n.id=l);break;case"retry":gw(l,n,t);break}}}}function gw(e,t,r){let n=parseInt(e,10);isNaN(n)||r(t.retry=n)}function Sw(e,t){let r=new Uint8Array(e.length+t.length);return r.set(e),r.set(t,e.length),r}function NS(){return{data:"",event:"",id:"",retry:void 0}}var lm="text/event-stream",hw=1e3,BS="last-event-id";function US(){return typeof window<"u"}function nu(e,{signal:t,headers:r,onopen:n,onmessage:o,onclose:a,onerror:i,openWhenHidden:s,fetch:c,...u}){return new Promise((l,p)=>{let m={...r};m.accept||(m.accept=lm);let d;function f(){d?.abort(),document.hidden||R()}!s&&US()&&document.addEventListener("visibilitychange",f);let F=hw,S;function g(){US()&&document.removeEventListener("visibilitychange",f),clearTimeout(S),d?.abort()}t?.addEventListener("abort",()=>{g(),l()});let C=c??fetch,y=n??yw;async function R(){d=AbortController?new AbortController:null;try{let E=await C(e,{...u,headers:m,signal:d?.signal});await y(E),await MS(E.body,QS(LS(v=>{v?m[BS]=v:delete m[BS]},v=>{F=v},o))),a?.(),g(),l()}catch(E){if(!d?.signal?.aborted)try{let v=i?.(E)??F;clearTimeout(S),S=setTimeout(R,v)}catch(v){g(),p(v)}}}R()})}function yw(e){let t=e.headers.get("content-type");if(!t?.startsWith(lm))throw new Error(`Expected content-type to be ${lm}, Actual: ${t}`)}var pn=class{constructor(t){Ae(this,"_basePath");Ae(this,"_params",{});this._basePath=t}addParam(t,r){this._params={...this.params,[t]:r}}get basePath(){return this._basePath}get params(){return this._params}get hasParams(){return Object.entries(this._params).length}get href(){return this.hasParams?`${this.basePath}?${Object.entries(this.params).map(([t,r])=>`${t}=${encodeURIComponent(r)}`).join("&")}`:this.basePath}};var Cw=(e,t,r)=>new pn(`${e}/rest/organizations/${t}/machinelearning/streaming/${r}`).href,jS=3,xw=5e3,Fw="text/event-stream",mm=1,dm=class extends Error{},Os=class extends Error{constructor(r){super(r.message);this.payload=r}},pm=class{constructor(){Ae(this,"timeouts",new Set)}add(t){this.timeouts.add(t)}remove(t){clearTimeout(t),this.timeouts.delete(t)}isActive(t){return this.timeouts.has(t)}},ou=class{constructor(t){Ae(this,"logger");this.logger=t.logger}streamGeneratedAnswer(t,r){let{url:n,organizationId:o,streamId:a,accessToken:i}=t,{write:s,abort:c,close:u,resetAnswer:l}=r,p=new pm;if(!a){this.logger.error("No stream ID found");return}let m=0,d,f=()=>{d&&!p.isActive(d)&&(S?.abort(),l(),g())},F=()=>{p.remove(d),d=AS(f,d,xw),p.add(d)},S=new AbortController,g=()=>nu(Cw(n,o,a),{method:"GET",fetch,headers:{Authorization:`Bearer ${i}`,accept:"*/*"},openWhenHidden:!0,signal:S?.signal,async onopen(C){if(C.ok&&C.headers.get("content-type")===Fw)return;throw C.status>=400&&C.status<500&&C.status!==429?new Os({message:"Error opening stream",code:C.status}):new dm},onmessage:C=>{if(S?.signal.aborted)return;let y=JSON.parse(C.data);if(y.finishReason==="ERROR"){p.remove(d),S?.abort(),c({message:y.errorMessage,code:y.statusCode});return}s(y),m=0,y.finishReason==="COMPLETED"?(p.remove(d),u()):F()},onerror:C=>{if(!S?.signal.aborted){if(p.remove(d),C instanceof Os)throw S?.abort(),c(C),C;if(++m>jS){this.logger.info("Maximum retry exceeded.");let y={message:"Failed to complete stream.",code:mm};throw S?.abort(),c(y),new Os(y)}this.logger.info(`Retrying...(${m}/${jS})`),l()}}});return g(),S}};var eh=nr(YS(),1);var zw="recommendation-internal-options",CL=Symbol.for(zw);var Q=new Error("Failed to load reducers."),aa=class extends Error{constructor(){super(),this.name="ExpiredToken",this.message="The token being used to perform the request is expired."}};var mn=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\`.`}};var yo=class extends Error{constructor(r,n){super();Ae(this,"statusCode");this.name="Disconnected",this.message=`Client could not connect to the following URL: ${r}`,this.statusCode=n??0}};function JS(e){let t=[];for(let r in e){let n=encodeURIComponent(r),o=encodeURIComponent(e[r]);t.push(`${n}=${o}`)}return t.join("&")}function XS(e){return typeof e!="object"||!e?!1:Object.values(e).every(Gw)}function Gw(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"}function ZS(e){return e===429}var Ft=class e{static async call(t){let r=Kw(t),{logger:n}=t,o=await e.preprocessRequest(r,t);n.info(o,"Platform request");let{url:a,...i}=o,s=async()=>{let c=await fetch(a,i);if(ZS(c.status))throw c;return c};try{let c=await(0,eh.backOff)(s,{retry:u=>{let l=u&&ZS(u.status);return l&&n.info("Platform retrying request"),l}});switch(c.status){case 419:case 401:throw n.info("Platform renewing token"),new aa;case 404:throw new yo(a,c.status);default:return n.info({response:c,requestInfo:o},"Platform response"),c}}catch(c){return c.message==="Failed to fetch"?new yo(a):c}}static async preprocessRequest(t,r){let{origin:n,preprocessRequest:o,logger:a,requestMetadata:i}=r,{signal:s,...c}=t,u=ln(c);try{let l=await o(t,n,i);return{...t,...l}}catch(l){a.error(l,"Platform request preprocessing failed. Returning default request options.")}return u}};function Be(e,t="prod",r="platform"){let n=t==="prod"?"":t,o=r==="platform"?"":`.${r}`;return`https://${e}${o}.org${n}.coveo.com`}function De(e,t="prod"){return`${Be(e,t)}/rest/search/v2`}function iu(e,t="prod"){return`${Be(e,t,"analytics")}/rest/organizations/${e}/events/v1`}function Kw(e){let{url:t,method:r,requestParams:n,contentType:o,accessToken:a,signal:i}=e,s=e.method==="POST"||e.method==="PUT",c=Yw(n,o);return{url:t,method:r,headers:{"Content-Type":o,Authorization:`Bearer ${a}`,...e.headers},...s&&{body:c},signal:i}}function Yw(e,t){return t==="application/x-www-form-urlencoded"?XS(e)?JS(e):"":JSON.stringify(e)}var su=e=>e;var th=e=>e,rh=e=>e,nh=e=>e;var uh=require("@coveo/bueno");function ia(){return{answerSnippet:"",documentId:{contentIdKey:"",contentIdValue:""},question:"",relatedQuestions:[],score:0}}function pt(){return{response:{results:[],searchUid:"",totalCountFiltered:0,facets:[],generateAutomaticFacets:{facets:[]},queryCorrections:[],triggers:[],questionAnswer:ia(),pipeline:"",splitTestRun:"",termsToHighlight:{},phrasesToHighlight:{},extendedResults:{}},duration:0,queryExecuted:"",error:null,automaticallyCorrected:!1,isLoading:!1,results:[],searchResponseId:"",requestId:"",questionAnswer:ia(),extendedResults:{}}}function fn(e){let{url:t,accessToken:r,organizationId:n,authentication:o,...a}=e;return a}var gn=e=>{let{response:t}=e;return t.body?Jw(e):Xw(t)},Jw=e=>eE(e)?tE(e):Zw(e)?e.body:{message:"unknown",statusCode:0,type:"unknown"},Xw=e=>{let t=JSON.parse(JSON.stringify(e,Object.getOwnPropertyNames(e)));return{...t,message:`Client side error: ${t.message||""}`,statusCode:400,type:"ClientError"}};function Zw(e){return e.body.statusCode!==void 0}function eE(e){return e.body.exception!==void 0}var tE=e=>({message:e.body.exception.code,statusCode:e.response.status,type:e.body.exception.code});var Sn=class{constructor(){Ae(this,"currentAbortController",null)}async enqueue(t,r){let n=this.currentAbortController,o=this.currentAbortController=new AbortController;n&&(r.warnOnAbort&&r.logger.warn("Cancelling current pending search query"),n.abort());try{return await t(o?.signal??null)}finally{this.currentAbortController===o&&(this.currentAbortController=null)}}};function oh(e){return((e.headers.get("content-type")||"").split(";").find(n=>n.indexOf("charset=")!==-1)||"").split("=")[1]||"UTF-8"}var $r=(e,t,r,n)=>{let o=new pn(`${e.url}${n}`);return o.addParam("organizationId",e.organizationId),e.authentication&&o.addParam("authentication",e.authentication),{accessToken:e.accessToken,method:t,contentType:r,url:o.href,origin:"searchApiFetch"}};var ah=(e,t)=>{let r=new pn(`${e.url}${t}`);return r.addParam("access_token",e.accessToken),r.addParam("organizationId",e.organizationId),r.addParam("uniqueId",e.uniqueId),e.authentication&&r.addParam("authentication",e.authentication),e.q!==void 0&&r.addParam("q",e.q),e.enableNavigation!==void 0&&r.addParam("enableNavigation",`${e.enableNavigation}`),e.requestedOutputSize!==void 0&&r.addParam("requestedOutputSize",`${e.requestedOutputSize}`),r.href},ih=async(e,t)=>{let r=await Ft.call({...$r(e,"POST","application/x-www-form-urlencoded","/html"),requestParams:fn(e),requestMetadata:{method:"html"},...t});if(r instanceof Error)throw r;let n=oh(r),o=await r.arrayBuffer(),i=new TextDecoder(n).decode(o);return rE(i)?{success:i}:{error:gn({response:r,body:i})}};function rE(e){return typeof e=="string"}function nE(e){return{statusCode:e.statusCode,type:e.name,message:e.message}}function oE(e){return{statusCode:e.code,type:e.name,message:e.message,ignored:!0}}function Vs(e,t){if(t&&e.name==="AbortError")return{error:oE(e)};if(e instanceof yo)return{error:nE(e)};throw e}var cu=class{constructor(t){this.options=t;Ae(this,"apiCallsQueues",{unknown:new Sn,mainSearch:new Sn,facetValues:new Sn,foldingCollection:new Sn,instantResults:new Sn})}async plan(t){let r=await Ft.call({...$r(t,"POST","application/json","/plan"),requestParams:fn(t),requestMetadata:{method:"plan"},...this.options});if(r instanceof Error)return Vs(r);let n=await r.json();return iE(n)?{success:n}:{error:gn({response:r,body:n})}}async querySuggest(t){let r=await Ft.call({...$r(t,"POST","application/json","/querySuggest"),requestMetadata:{method:"querySuggest"},requestParams:fn(t),...this.options});if(r instanceof Error)return Vs(r);let n=await r.json(),o={response:r,body:n};return aE(n)?{success:(await this.options.postprocessQuerySuggestResponseMiddleware(o)).body}:{error:gn(o)}}async search(t,r){let n=r?.origin??"unknown",o=await this.apiCallsQueues[n].enqueue(s=>Ft.call({...$r(t,"POST","application/json",""),requestParams:fn(t),requestMetadata:{method:"search",origin:r?.origin},...this.options,signal:s??void 0}),{logger:this.options.logger,warnOnAbort:!r?.disableAbortWarning});if(o instanceof Error)return Vs(o,r?.disableAbortWarning);let a=await o.json(),i={response:o,body:a};return sh(a)?(i.body=ch(a),{success:(await this.options.postprocessSearchResponseMiddleware(i)).body}):{error:gn(i)}}async facetSearch(t){let r=await Ft.call({...$r(t,"POST","application/json","/facet"),requestParams:fn(t),requestMetadata:{method:"facetSearch"},...this.options});if(r instanceof Error)throw r;let n=await r.json(),o={response:r,body:n};return(await this.options.postprocessFacetSearchResponseMiddleware(o)).body}async recommendations(t){let r=await Ft.call({...$r(t,"POST","application/json",""),requestParams:fn(t),requestMetadata:{method:"recommendations"},...this.options});if(r instanceof Error)throw r;let n=await r.json();if(sh(n)){let o={response:r,body:n};return o.body=ch(n),{success:(await this.options.postprocessSearchResponseMiddleware(o)).body}}return{error:gn({response:r,body:n})}}async html(t){return ih(t,{...this.options})}async fieldDescriptions(t){let r=await Ft.call({...$r(t,"GET","application/json","/fields"),requestParams:{},requestMetadata:{method:"fieldDescriptions"},...this.options});if(r instanceof Error)throw r;let n=await r.json();return sE(n)?{success:n}:{error:gn({response:r,body:n})}}},uu=e=>e.success!==void 0,qe=e=>e.error!==void 0;function sh(e){return e.results!==void 0}function ch(e){let t=ia();return(0,uh.isNullOrUndefined)(e.questionAnswer)?(e.questionAnswer=t,e):(e.questionAnswer={...t,...e.questionAnswer},e)}function aE(e){return e.completions!==void 0}function iE(e){return e.preprocessingOutput!==void 0}function sE(e){return e.fields!==void 0}var nt=require("@coveo/bueno"),V=new nt.StringValue({required:!0,emptyAllowed:!1}),de=new nt.StringValue({required:!1,emptyAllowed:!1}),se=new nt.StringValue({required:!0,emptyAllowed:!0}),lh=new nt.StringValue({required:!1,emptyAllowed:!0}),lu=new nt.ArrayValue({each:V,required:!0}),dh=new nt.StringValue({required:!1,emptyAllowed:!1,regex:/^\d+\.\d+\.\d+$/}),Wr=({message:e,name:t,stack:r})=>({message:e,name:t,stack:r}),Rt=(e,t)=>{if("required"in t)return{payload:new nt.Schema({value:t}).validate({value:e}).value};let o=new nt.RecordValue({options:{required:!0},values:t}).validate(e);if(o)throw new nt.SchemaValidationError(o);return{payload:e}},x=(e,t)=>{try{return Rt(e,t)}catch(r){return{payload:e,error:Wr(r)}}},Ee=(e,t,r,n)=>{let o=`Check the initialState of ${n}`;return ph(e,t,r,o,"Controller initialization error")},ue=(e,t,r,n)=>{let o=`Check the options of ${n}`;return ph(e,t,r,o,"Controller initialization error")},ph=(e,t,r,n,o)=>{try{return t.validate(r,n)}catch(a){throw e.logger.error(a,o),a}};var Pt=require("@coveo/bueno");function Ue(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 cE=typeof Symbol=="function"&&Symbol.observable||"@@observable",mh=cE,Rm=()=>Math.random().toString(36).substring(7).split("").join("."),uE={INIT:`@@redux/INIT${Rm()}`,REPLACE:`@@redux/REPLACE${Rm()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Rm()}`},du=uE;function or(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 Am(e,t,r){if(typeof e!="function")throw new Error(Ue(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(Ue(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(Ue(1));return r(Am)(e,t)}let n=e,o=t,a=new Map,i=a,s=0,c=!1;function u(){i===a&&(i=new Map,a.forEach((S,g)=>{i.set(g,S)}))}function l(){if(c)throw new Error(Ue(3));return o}function p(S){if(typeof S!="function")throw new Error(Ue(4));if(c)throw new Error(Ue(5));let g=!0;u();let C=s++;return i.set(C,S),function(){if(g){if(c)throw new Error(Ue(6));g=!1,u(),i.delete(C),a=null}}}function m(S){if(!or(S))throw new Error(Ue(7));if(typeof S.type>"u")throw new Error(Ue(8));if(typeof S.type!="string")throw new Error(Ue(17));if(c)throw new Error(Ue(9));try{c=!0,o=n(o,S)}finally{c=!1}return(a=i).forEach(C=>{C()}),S}function d(S){if(typeof S!="function")throw new Error(Ue(10));n=S,m({type:du.REPLACE})}function f(){let S=p;return{subscribe(g){if(typeof g!="object"||g===null)throw new Error(Ue(11));function C(){let R=g;R.next&&R.next(l())}return C(),{unsubscribe:S(C)}},[mh](){return this}}}return m({type:du.INIT}),{dispatch:m,subscribe:p,getState:l,replaceReducer:d,[mh]:f}}function lE(e){Object.keys(e).forEach(t=>{let r=e[t];if(typeof r(void 0,{type:du.INIT})>"u")throw new Error(Ue(12));if(typeof r(void 0,{type:du.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Ue(13))})}function sa(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 n=Object.keys(r),o,a;try{lE(r)}catch(i){a=i}return function(s={},c){if(a)throw a;let u=!1,l={};for(let p=0;p<n.length;p++){let m=n[p],d=r[m],f=s[m],F=d(f,c);if(typeof F>"u"){let S=c&&c.type;throw new Error(Ue(14))}l[m]=F,u=u||F!==f}return u=u||n.length!==Object.keys(s).length,u?l:s}}function ca(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function fh(...e){return t=>(r,n)=>{let o=t(r,n),a=()=>{throw new Error(Ue(15))},i={getState:o.getState,dispatch:(c,...u)=>a(c,...u)},s=e.map(c=>c(i));return a=ca(...s)(o.dispatch),{...o,dispatch:a}}}function pu(e){return or(e)&&"type"in e&&typeof e.type=="string"}var Dm=Symbol.for("immer-nothing"),Ns=Symbol.for("immer-draftable"),ot=Symbol.for("immer-state");function je(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var xo=Object.getPrototypeOf;function mt(e){return!!e&&!!e[ot]}function at(e){return e?Ch(e)||Array.isArray(e)||!!e[Ns]||!!e.constructor?.[Ns]||Us(e)||js(e):!1}var dE=Object.prototype.constructor.toString();function Ch(e){if(!e||typeof e!="object")return!1;let t=xo(e);if(t===null)return!0;let r=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return r===Object?!0:typeof r=="function"&&Function.toString.call(r)===dE}function qm(e){return mt(e)||je(15,e),e[ot].base_}function Ms(e,t){Fo(e)===0?Reflect.ownKeys(e).forEach(r=>{t(r,e[r],e)}):e.forEach((r,n)=>t(n,r,e))}function Fo(e){let t=e[ot];return t?t.type_:Array.isArray(e)?1:Us(e)?2:js(e)?3:0}function Qs(e,t){return Fo(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function bm(e,t){return Fo(e)===2?e.get(t):e[t]}function xh(e,t,r){let n=Fo(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function pE(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Us(e){return e instanceof Map}function js(e){return e instanceof Set}function Co(e){return e.copy_||e.base_}function wm(e,t){if(Us(e))return new Map(e);if(js(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);let r=Ch(e);if(t===!0||t==="class_only"&&!r){let n=Object.getOwnPropertyDescriptors(e);delete n[ot];let o=Reflect.ownKeys(n);for(let a=0;a<o.length;a++){let i=o[a],s=n[i];s.writable===!1&&(s.writable=!0,s.configurable=!0),(s.get||s.set)&&(n[i]={configurable:!0,writable:!0,enumerable:s.enumerable,value:e[i]})}return Object.create(xo(e),n)}else{let n=xo(e);if(n!==null&&r)return{...e};let o=Object.create(n);return Object.assign(o,e)}}function gu(e,t=!1){return Su(e)||mt(e)||!at(e)||(Fo(e)>1&&(e.set=e.add=e.clear=e.delete=mE),Object.freeze(e),t&&Object.entries(e).forEach(([r,n])=>gu(n,!0))),e}function mE(){je(2)}function Su(e){return Object.isFrozen(e)}var Em={};function Ro(e){let t=Em[e];return t||je(0,e),t}function fE(e,t){Em[e]||(Em[e]=t)}var Ls;function Fh(){return Ls}function gE(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function gh(e,t){t&&(Ro("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Im(e){Tm(e),e.drafts_.forEach(SE),e.drafts_=null}function Tm(e){e===Ls&&(Ls=e.parent_)}function Sh(e){return Ls=gE(Ls,e)}function SE(e){let t=e[ot];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function hh(e,t){t.unfinalizedDrafts_=t.drafts_.length;let r=t.drafts_[0];return e!==void 0&&e!==r?(r[ot].modified_&&(Im(t),je(4)),at(e)&&(e=mu(t,e),t.parent_||fu(t,e)),t.patches_&&Ro("Patches").generateReplacementPatches_(r[ot].base_,e,t.patches_,t.inversePatches_)):e=mu(t,r,[]),Im(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Dm?e:void 0}function mu(e,t,r){if(Su(t))return t;let n=t[ot];if(!n)return Ms(t,(o,a)=>yh(e,n,t,o,a,r)),t;if(n.scope_!==e)return t;if(!n.modified_)return fu(e,n.base_,!0),n.base_;if(!n.finalized_){n.finalized_=!0,n.scope_.unfinalizedDrafts_--;let o=n.copy_,a=o,i=!1;n.type_===3&&(a=new Set(o),o.clear(),i=!0),Ms(a,(s,c)=>yh(e,n,o,s,c,r,i)),fu(e,o,!1),r&&e.patches_&&Ro("Patches").generatePatches_(n,r,e.patches_,e.inversePatches_)}return n.copy_}function yh(e,t,r,n,o,a,i){if(mt(o)){let s=a&&t&&t.type_!==3&&!Qs(t.assigned_,n)?a.concat(n):void 0,c=mu(e,o,s);if(xh(r,n,c),mt(c))e.canAutoFreeze_=!1;else return}else i&&r.add(o);if(at(o)&&!Su(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;mu(e,o),(!t||!t.scope_.parent_)&&typeof n!="symbol"&&Object.prototype.propertyIsEnumerable.call(r,n)&&fu(e,o)}}function fu(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&gu(t,r)}function hE(e,t){let r=Array.isArray(e),n={type_:r?1:0,scope_:t?t.scope_:Fh(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1},o=n,a=Vm;r&&(o=[n],a=Bs);let{revoke:i,proxy:s}=Proxy.revocable(o,a);return n.draft_=s,n.revoke_=i,s}var Vm={get(e,t){if(t===ot)return e;let r=Co(e);if(!Qs(r,t))return yE(e,r,t);let n=r[t];return e.finalized_||!at(n)?n:n===vm(e.base_,t)?(Pm(e),e.copy_[t]=Om(n,e)):n},has(e,t){return t in Co(e)},ownKeys(e){return Reflect.ownKeys(Co(e))},set(e,t,r){let n=Rh(Co(e),t);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){let o=vm(Co(e),t),a=o?.[ot];if(a&&a.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(pE(r,o)&&(r!==void 0||Qs(e.base_,t)))return!0;Pm(e),km(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 vm(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Pm(e),km(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let r=Co(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty(){je(11)},getPrototypeOf(e){return xo(e.base_)},setPrototypeOf(){je(12)}},Bs={};Ms(Vm,(e,t)=>{Bs[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});Bs.deleteProperty=function(e,t){return Bs.set.call(this,e,t,void 0)};Bs.set=function(e,t,r){return Vm.set.call(this,e[0],t,r,e[0])};function vm(e,t){let r=e[ot];return(r?Co(r):e)[t]}function yE(e,t,r){let n=Rh(t,r);return n?"value"in n?n.value:n.get?.call(e.draft_):void 0}function Rh(e,t){if(!(t in e))return;let r=xo(e);for(;r;){let n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=xo(r)}}function km(e){e.modified_||(e.modified_=!0,e.parent_&&km(e.parent_))}function Pm(e){e.copy_||(e.copy_=wm(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var CE=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,r,n)=>{if(typeof t=="function"&&typeof r!="function"){let a=r;r=t;let i=this;return function(c=a,...u){return i.produce(c,l=>r.call(this,l,...u))}}typeof r!="function"&&je(6),n!==void 0&&typeof n!="function"&&je(7);let o;if(at(t)){let a=Sh(this),i=Om(t,void 0),s=!0;try{o=r(i),s=!1}finally{s?Im(a):Tm(a)}return gh(a,n),hh(o,a)}else if(!t||typeof t!="object"){if(o=r(t),o===void 0&&(o=t),o===Dm&&(o=void 0),this.autoFreeze_&&gu(o,!0),n){let a=[],i=[];Ro("Patches").generateReplacementPatches_(t,o,a,i),n(a,i)}return o}else je(1,t)},this.produceWithPatches=(t,r)=>{if(typeof t=="function")return(i,...s)=>this.produceWithPatches(i,c=>t(c,...s));let n,o;return[this.produce(t,r,(i,s)=>{n=i,o=s}),n,o]},typeof e?.autoFreeze=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof e?.useStrictShallowCopy=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){at(e)||je(8),mt(e)&&(e=Ah(e));let t=Sh(this),r=Om(e,void 0);return r[ot].isManual_=!0,Tm(t),r}finishDraft(e,t){let r=e&&e[ot];(!r||!r.isManual_)&&je(9);let{scope_:n}=r;return gh(n,t),hh(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){let o=t[r];if(o.path.length===0&&o.op==="replace"){e=o.value;break}}r>-1&&(t=t.slice(r+1));let n=Ro("Patches").applyPatches_;return mt(e)?n(e,t):this.produce(e,o=>n(o,t))}};function Om(e,t){let r=Us(e)?Ro("MapSet").proxyMap_(e,t):js(e)?Ro("MapSet").proxySet_(e,t):hE(e,t);return(t?t.scope_:Fh()).drafts_.push(r),r}function Ah(e){return mt(e)||je(10,e),bh(e)}function bh(e){if(!at(e)||Su(e))return e;let t=e[ot],r;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=wm(e,t.scope_.immer_.useStrictShallowCopy_)}else r=wm(e,!0);return Ms(r,(n,o)=>{xh(r,n,bh(o))}),t&&(t.finalized_=!1),r}function vh(){let t="replace",r="add",n="remove";function o(m,d,f,F){switch(m.type_){case 0:case 2:return i(m,d,f,F);case 1:return a(m,d,f,F);case 3:return s(m,d,f,F)}}function a(m,d,f,F){let{base_:S,assigned_:g}=m,C=m.copy_;C.length<S.length&&([S,C]=[C,S],[f,F]=[F,f]);for(let y=0;y<S.length;y++)if(g[y]&&C[y]!==S[y]){let R=d.concat([y]);f.push({op:t,path:R,value:p(C[y])}),F.push({op:t,path:R,value:p(S[y])})}for(let y=S.length;y<C.length;y++){let R=d.concat([y]);f.push({op:r,path:R,value:p(C[y])})}for(let y=C.length-1;S.length<=y;--y){let R=d.concat([y]);F.push({op:n,path:R})}}function i(m,d,f,F){let{base_:S,copy_:g}=m;Ms(m.assigned_,(C,y)=>{let R=bm(S,C),E=bm(g,C),v=y?Qs(S,C)?t:r:n;if(R===E&&v===t)return;let A=d.concat(C);f.push(v===n?{op:v,path:A}:{op:v,path:A,value:E}),F.push(v===r?{op:n,path:A}:v===n?{op:r,path:A,value:p(R)}:{op:t,path:A,value:p(R)})})}function s(m,d,f,F){let{base_:S,copy_:g}=m,C=0;S.forEach(y=>{if(!g.has(y)){let R=d.concat([C]);f.push({op:n,path:R,value:y}),F.unshift({op:r,path:R,value:y})}C++}),C=0,g.forEach(y=>{if(!S.has(y)){let R=d.concat([C]);f.push({op:r,path:R,value:y}),F.unshift({op:n,path:R,value:y})}C++})}function c(m,d,f,F){f.push({op:t,path:[],value:d===Dm?void 0:d}),F.push({op:t,path:[],value:m})}function u(m,d){return d.forEach(f=>{let{path:F,op:S}=f,g=m;for(let E=0;E<F.length-1;E++){let v=Fo(g),A=F[E];typeof A!="string"&&typeof A!="number"&&(A=""+A),(v===0||v===1)&&(A==="__proto__"||A==="constructor")&&je(19),typeof g=="function"&&A==="prototype"&&je(19),g=bm(g,A),typeof g!="object"&&je(18,F.join("/"))}let C=Fo(g),y=l(f.value),R=F[F.length-1];switch(S){case t:switch(C){case 2:return g.set(R,y);case 3:je(16);default:return g[R]=y}case r:switch(C){case 1:return R==="-"?g.push(y):g.splice(R,0,y);case 2:return g.set(R,y);case 3:return g.add(y);default:return g[R]=y}case n:switch(C){case 1:return g.splice(R,1);case 2:return g.delete(R);case 3:return g.delete(f.value);default:return delete g[R]}default:je(17,S)}}),m}function l(m){if(!at(m))return m;if(Array.isArray(m))return m.map(l);if(Us(m))return new Map(Array.from(m.entries()).map(([f,F])=>[f,l(F)]));if(js(m))return new Set(Array.from(m).map(l));let d=Object.create(xo(m));for(let f in m)d[f]=l(m[f]);return Qs(m,Ns)&&(d[Ns]=m[Ns]),d}function p(m){return mt(m)?l(m):m}fE("Patches",{applyPatches_:u,generatePatches_:o,generateReplacementPatches_:c})}var ft=new CE,Hr=ft.produce,hu=ft.produceWithPatches.bind(ft),c0=ft.setAutoFreeze.bind(ft),u0=ft.setUseStrictShallowCopy.bind(ft),Nm=ft.applyPatches.bind(ft),l0=ft.createDraft.bind(ft),d0=ft.finishDraft.bind(ft);function xE(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function FE(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function RE(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(r=>typeof r=="function")){let r=e.map(n=>typeof n=="function"?`function ${n.name||"unnamed"}()`:typeof n).join(", ");throw new TypeError(`${t}[${r}]`)}}var Ph=e=>Array.isArray(e)?e:[e];function AE(e){let t=Array.isArray(e[0])?e[0]:e;return RE(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function bE(e,t){let r=[],{length:n}=e;for(let o=0;o<n;o++)r.push(e[o].apply(null,t));return r}var f0=Symbol();var g0=Object.getPrototypeOf({});var vE=class{constructor(e){this.value=e}deref(){return this.value}},PE=typeof WeakRef<"u"?WeakRef:vE,wE=0,wh=1;function yu(){return{s:wE,v:void 0,o:null,p:null}}function ua(e,t={}){let r=yu(),{resultEqualityCheck:n}=t,o,a=0;function i(){let s=r,{length:c}=arguments;for(let p=0,m=c;p<m;p++){let d=arguments[p];if(typeof d=="function"||typeof d=="object"&&d!==null){let f=s.o;f===null&&(s.o=f=new WeakMap);let F=f.get(d);F===void 0?(s=yu(),f.set(d,s)):s=F}else{let f=s.p;f===null&&(s.p=f=new Map);let F=f.get(d);F===void 0?(s=yu(),f.set(d,s)):s=F}}let u=s,l;if(s.s===wh)l=s.v;else if(l=e.apply(null,arguments),a++,n){let p=o?.deref?.()??o;p!=null&&n(p,l)&&(l=p,a!==0&&a--),o=typeof l=="object"&&l!==null||typeof l=="function"?new PE(l):l}return u.s=wh,u.v=l,l}return i.clearCache=()=>{r=yu(),i.resetResultsCount()},i.resultsCount=()=>a,i.resetResultsCount=()=>{a=0},i}function Eh(e,...t){let r=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,n=(...o)=>{let a=0,i=0,s,c={},u=o.pop();typeof u=="object"&&(c=u,u=o.pop()),xE(u,`createSelector expects an output function after the inputs, but received: [${typeof u}]`);let l={...r,...c},{memoize:p,memoizeOptions:m=[],argsMemoize:d=ua,argsMemoizeOptions:f=[],devModeChecks:F={}}=l,S=Ph(m),g=Ph(f),C=AE(o),y=p(function(){return a++,u.apply(null,arguments)},...S),R=!0,E=d(function(){i++;let A=bE(C,arguments);return s=y.apply(null,A),s},...g);return Object.assign(E,{resultFunc:u,memoizedResultFunc:y,dependencies:C,dependencyRecomputations:()=>i,resetDependencyRecomputations:()=>{i=0},lastResult:()=>s,recomputations:()=>a,resetRecomputations:()=>{a=0},memoize:p,argsMemoize:d})};return Object.assign(n,{withTypes:()=>n}),n}var Y=Eh(ua),EE=Object.assign((e,t=Y)=>{FE(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),n=r.map(a=>e[a]);return t(n,(...a)=>a.reduce((i,s,c)=>(i[r[c]]=s,i),{}))},{withTypes:()=>EE});function Ih(e){return({dispatch:r,getState:n})=>o=>a=>typeof a=="function"?a(r,n,e):o(a)}var Th=Ih(),kh=Ih;var IE=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?ca:ca.apply(null,arguments)},v0=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}},TE=e=>e&&typeof e.match=="function";function h(e,t){function r(...n){if(t){let o=t(...n);if(!o)throw new Error(_t(0));return{type:e,payload:o.payload,..."meta"in o&&{meta:o.meta},..."error"in o&&{error:o.error}}}return{type:e,payload:n[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=n=>pu(n)&&n.type===e,r}var Nh=class _s extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,_s.prototype)}static get[Symbol.species](){return _s}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new _s(...t[0].concat(this)):new _s(...t.concat(this))}};function Oh(e){return at(e)?Hr(e,()=>{}):e}function Dh(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function kE(e){return typeof e=="boolean"}var OE=()=>function(t){let{thunk:r=!0,immutableCheck:n=!0,serializableCheck:o=!0,actionCreatorCheck:a=!0}=t??{},i=new Nh;return r&&(kE(r)?i.push(Th):i.push(kh(r.extraArgument))),i},$s="RTK_autoBatch",da=()=>e=>({payload:e,meta:{[$s]:!0}}),qh=e=>t=>{setTimeout(t,e)},DE=(e={type:"raf"})=>t=>(...r)=>{let n=t(...r),o=!0,a=!1,i=!1,s=new Set,c=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:qh(10):e.type==="callback"?e.queueNotification:qh(e.timeout),u=()=>{i=!1,a&&(a=!1,s.forEach(l=>l()))};return Object.assign({},n,{subscribe(l){let p=()=>o&&l(),m=n.subscribe(p);return s.add(l),()=>{m(),s.delete(l)}},dispatch(l){try{return o=!l?.meta?.[$s],a=!o,a&&(i||(i=!0,c(u))),n.dispatch(l)}finally{o=!0}}})},qE=e=>function(r){let{autoBatch:n=!0}=r??{},o=new Nh(e);return n&&o.push(DE(typeof n=="object"?n:void 0)),o};function Mh(e){let t=OE(),{reducer:r=void 0,middleware:n,devTools:o=!0,preloadedState:a=void 0,enhancers:i=void 0}=e||{},s;if(typeof r=="function")s=r;else if(or(r))s=sa(r);else throw new Error(_t(1));let c;typeof n=="function"?c=n(t):c=t();let u=ca;o&&(u=IE({trace:!1,...typeof o=="object"&&o}));let l=fh(...c),p=qE(l),m=typeof i=="function"?i(p):p(),d=u(...m);return Am(s,a,d)}function Qh(e){let t={},r=[],n,o={addCase(a,i){let s=typeof a=="string"?a:a.type;if(!s)throw new Error(_t(28));if(s in t)throw new Error(_t(29));return t[s]=i,o},addMatcher(a,i){return r.push({matcher:a,reducer:i}),o},addDefaultCase(a){return n=a,o}};return e(o),[t,r,n]}function VE(e){return typeof e=="function"}function _(e,t){let[r,n,o]=Qh(t),a;if(VE(e))a=()=>Oh(e());else{let s=Oh(e);a=()=>s}function i(s=a(),c){let u=[r[c.type],...n.filter(({matcher:l})=>l(c)).map(({reducer:l})=>l)];return u.filter(l=>!!l).length===0&&(u=[o]),u.reduce((l,p)=>{if(p)if(mt(l)){let d=p(l,c);return d===void 0?l:d}else{if(at(l))return Hr(l,m=>p(m,c));{let m=p(l,c);if(m===void 0){if(l===null)return l;throw Error("A case reducer on a non-draftable value must not return undefined")}return m}}return l},s)}return i.getInitialState=a,i}var Lh=(e,t)=>TE(e)?e.match(t):e(t);function ar(...e){return t=>e.some(r=>Lh(r,t))}function la(...e){return t=>e.every(r=>Lh(r,t))}function xu(e,t){if(!e||!e.meta)return!1;let r=typeof e.meta.requestId=="string",n=t.indexOf(e.meta.requestStatus)>-1;return r&&n}function Ws(e){return typeof e[0]=="function"&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function Fu(...e){return e.length===0?t=>xu(t,["pending"]):Ws(e)?ar(...e.map(t=>t.pending)):Fu()(e[0])}function Ao(...e){return e.length===0?t=>xu(t,["rejected"]):Ws(e)?ar(...e.map(t=>t.rejected)):Ao()(e[0])}function Hs(...e){let t=r=>r&&r.meta&&r.meta.rejectedWithValue;return e.length===0?la(Ao(...e),t):Ws(e)?la(Ao(...e),t):Hs()(e[0])}function zr(...e){return e.length===0?t=>xu(t,["fulfilled"]):Ws(e)?ar(...e.map(t=>t.fulfilled)):zr()(e[0])}function Ru(...e){return e.length===0?t=>xu(t,["pending","fulfilled","rejected"]):Ws(e)?ar(...e.flatMap(t=>[t.pending,t.rejected,t.fulfilled])):Ru()(e[0])}var NE="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Au=(e=21)=>{let t="",r=e;for(;r--;)t+=NE[Math.random()*64|0];return t},ME=["name","message","stack","code"],Mm=class{constructor(e,t){Ae(this,"_type");this.payload=e,this.meta=t}},Vh=class{constructor(e,t){Ae(this,"_type");this.payload=e,this.meta=t}},QE=e=>{if(typeof e=="object"&&e!==null){let t={};for(let r of ME)typeof e[r]=="string"&&(t[r]=e[r]);return t}return{message:String(e)}},H=(()=>{function e(t,r,n){let o=h(t+"/fulfilled",(c,u,l,p)=>({payload:c,meta:{...p||{},arg:l,requestId:u,requestStatus:"fulfilled"}})),a=h(t+"/pending",(c,u,l)=>({payload:void 0,meta:{...l||{},arg:u,requestId:c,requestStatus:"pending"}})),i=h(t+"/rejected",(c,u,l,p,m)=>({payload:p,error:(n&&n.serializeError||QE)(c||"Rejected"),meta:{...m||{},arg:l,requestId:u,rejectedWithValue:!!p,requestStatus:"rejected",aborted:c?.name==="AbortError",condition:c?.name==="ConditionError"}}));function s(c){return(u,l,p)=>{let m=n?.idGenerator?n.idGenerator(c):Au(),d=new AbortController,f,F;function S(C){F=C,d.abort()}let g=async function(){let C;try{let R=n?.condition?.(c,{getState:l,extra:p});if(BE(R)&&(R=await R),R===!1||d.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let E=new Promise((v,A)=>{f=()=>{A({name:"AbortError",message:F||"Aborted"})},d.signal.addEventListener("abort",f)});u(a(m,c,n?.getPendingMeta?.({requestId:m,arg:c},{getState:l,extra:p}))),C=await Promise.race([E,Promise.resolve(r(c,{dispatch:u,getState:l,extra:p,requestId:m,signal:d.signal,abort:S,rejectWithValue:(v,A)=>new Mm(v,A),fulfillWithValue:(v,A)=>new Vh(v,A)})).then(v=>{if(v instanceof Mm)throw v;return v instanceof Vh?o(v.payload,m,c,v.meta):o(v,m,c)})])}catch(R){C=R instanceof Mm?i(null,m,c,R.payload,R.meta):i(R,m,c)}finally{f&&d.signal.removeEventListener("abort",f)}return n&&!n.dispatchConditionRejection&&i.match(C)&&C.meta.condition||u(C),C}();return Object.assign(g,{abort:S,requestId:m,arg:c,unwrap(){return g.then(LE)}})}}return Object.assign(s,{pending:a,rejected:i,fulfilled:o,settled:ar(i,o),typePrefix:t})}return e.withTypes=()=>e,e})();function LE(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function BE(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var Bh=Symbol.for("rtk-slice-createasyncthunk"),T0={[Bh]:H};function UE(e,t){return`${e}/${t}`}function jE({creators:e}={}){let t=e?.asyncThunk?.[Bh];return function(n){let{name:o,reducerPath:a=o}=n;if(!o)throw new Error(_t(11));typeof process<"u";let i=(typeof n.reducers=="function"?n.reducers($E()):n.reducers)||{},s=Object.keys(i),c={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},u={addCase(C,y){let R=typeof C=="string"?C:C.type;if(!R)throw new Error(_t(12));if(R in c.sliceCaseReducersByType)throw new Error(_t(13));return c.sliceCaseReducersByType[R]=y,u},addMatcher(C,y){return c.sliceMatchers.push({matcher:C,reducer:y}),u},exposeAction(C,y){return c.actionCreators[C]=y,u},exposeCaseReducer(C,y){return c.sliceCaseReducersByName[C]=y,u}};s.forEach(C=>{let y=i[C],R={reducerName:C,type:UE(o,C),createNotation:typeof n.reducers=="function"};HE(y)?GE(R,y,u,t):WE(R,y,u)});function l(){let[C={},y=[],R=void 0]=typeof n.extraReducers=="function"?Qh(n.extraReducers):[n.extraReducers],E={...C,...c.sliceCaseReducersByType};return _(n.initialState,v=>{for(let A in E)v.addCase(A,E[A]);for(let A of c.sliceMatchers)v.addMatcher(A.matcher,A.reducer);for(let A of y)v.addMatcher(A.matcher,A.reducer);R&&v.addDefaultCase(R)})}let p=C=>C,m=new Map,d;function f(C,y){return d||(d=l()),d(C,y)}function F(){return d||(d=l()),d.getInitialState()}function S(C,y=!1){function R(v){let A=v[C];return typeof A>"u"&&y&&(A=F()),A}function E(v=p){let A=Dh(m,y,()=>new WeakMap);return Dh(A,v,()=>{let b={};for(let[P,T]of Object.entries(n.selectors??{}))b[P]=_E(T,v,F,y);return b})}return{reducerPath:C,getSelectors:E,get selectors(){return E(R)},selectSlice:R}}let g={name:o,reducer:f,actions:c.actionCreators,caseReducers:c.sliceCaseReducersByName,getInitialState:F,...S(a),injectInto(C,{reducerPath:y,...R}={}){let E=y??a;return C.inject({reducerPath:E,reducer:f},R),{...g,...S(E,!0)}}};return g}}function _E(e,t,r,n){function o(a,...i){let s=t(a);return typeof s>"u"&&n&&(s=r()),e(s,...i)}return o.unwrapped=e,o}var bo=jE();function $E(){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 WE({type:e,reducerName:t,createNotation:r},n,o){let a,i;if("reducer"in n){if(r&&!zE(n))throw new Error(_t(17));a=n.reducer,i=n.prepare}else a=n;o.addCase(e,a).exposeCaseReducer(t,a).exposeAction(t,i?h(e,i):h(e))}function HE(e){return e._reducerDefinitionType==="asyncThunk"}function zE(e){return e._reducerDefinitionType==="reducerWithPrepare"}function GE({type:e,reducerName:t},r,n,o){if(!o)throw new Error(_t(18));let{payloadCreator:a,fulfilled:i,pending:s,rejected:c,settled:u,options:l}=r,p=o(e,a,l);n.exposeAction(t,p),i&&n.addCase(p.fulfilled,i),s&&n.addCase(p.pending,s),c&&n.addCase(p.rejected,c),u&&n.addMatcher(p.settled,u),n.exposeCaseReducer(t,{fulfilled:i||Cu,pending:s||Cu,rejected:c||Cu,settled:u||Cu})}function Cu(){}var Uh="listener",jh="completed",_h="cancelled",k0=`task-${_h}`,O0=`task-${jh}`,D0=`${Uh}-${_h}`,q0=`${Uh}-${jh}`;var{assign:$h}=Object;var Qm="listenerMiddleware";var KE=$h(h(`${Qm}/add`),{withTypes:()=>KE}),V0=h(`${Qm}/removeAll`),YE=$h(h(`${Qm}/remove`),{withTypes:()=>YE});var N0=Symbol.for("rtk-state-proxy-original");function _t(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 Wh=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i;function JE(e){return typeof e=="string"&&Wh.test(e)}var Lm=JE;var _e=[];for(let e=0;e<256;++e)_e.push((e+256).toString(16).slice(1));function Hh(e,t=0){return(_e[e[t+0]]+_e[e[t+1]]+_e[e[t+2]]+_e[e[t+3]]+"-"+_e[e[t+4]]+_e[e[t+5]]+"-"+_e[e[t+6]]+_e[e[t+7]]+"-"+_e[e[t+8]]+_e[e[t+9]]+"-"+_e[e[t+10]]+_e[e[t+11]]+_e[e[t+12]]+_e[e[t+13]]+_e[e[t+14]]+_e[e[t+15]]).toLowerCase()}var Bm,XE=new Uint8Array(16);function Um(){if(!Bm){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Bm=crypto.getRandomValues.bind(crypto)}return Bm(XE)}var ZE=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),jm={randomUUID:ZE};function eI(e,t,r){if(jm.randomUUID&&!t&&!e)return jm.randomUUID();e=e||{};let n=e.random??e.rng?.()??Um();if(n.length<16)throw new Error("Random bytes length must be >= 16");if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,t){if(r=r||0,r<0||r+16>t.length)throw new RangeError(`UUID byte range ${r}:${r+15} is out of buffer bounds`);for(let o=0;o<16;++o)t[r+o]=n[o];return t}return Hh(n)}var _m=eI;function zh(){let e=typeof window<"u";return{sendMessage(t){e&&window.postMessage(t,"*")}}}function tI({config:e,environment:t,event:r,listenerManager:n}){let{url:o,token:a,mode:i}=e;i!=="disabled"&&(n.call(r),t.send(o,a,r))}function rI(e){return{getClientId:()=>{let t="visitorId",r=e.get(),n=r.storage,o=n.getItem(t),a=o&&Lm(o)?o:r.generateUUID();return n.setItem(t,a),a}}}var Kh="1.1.1";function nI(e){let{trackingId:t}=e;return{trackingId:t}}function oI(e){return(e.source||[]).concat([`relay@${Kh}`])}function Yh(e,t,r,n){let{getReferrer:o,getLocation:a,getUserAgent:i}=r,s=nI(t),c=n.getClientId();return Object.freeze({type:e,config:s,ts:Date.now(),source:oI(t),clientId:c,userAgent:i(),referrer:o(),location:a()})}function aI(e,t,r,n,o){return{...t,meta:Yh(e,r,n,o)}}var iI="*";function sI(){let e=[];function t({type:c,callback:u}){return e.findIndex(l=>l.type===c&&l.callback===u)}function r(c,u){return c.type==="*"||u===c.type}function n(c){return t(c)<0&&e.push(c),()=>s(c.type,c.callback)}function o(c){e.forEach(u=>{if(r(u,c.meta.type))try{u.callback(c)}catch(l){console.error(l)}})}function a(c){if(c===iI)e.length=0;else for(let u=e.length-1;u>=0;u--)e[u].type===c&&e.splice(u,1)}function i(c){let u=t(c);u>=0&&e.splice(u,1)}function s(c,u){u?i({type:c,callback:u}):a(c)}return{add:n,call:o,remove:s}}function Gh({url:e,token:t,trackingId:r,...n}){return Object.freeze({url:e,token:t,trackingId:r,...!!n.mode&&{mode:n.mode},...!!n.source&&{source:n.source},...!!n.environment&&{environment:n.environment}})}function cI(e){let t=Gh(e);return{get:()=>t,update:r=>{t=Gh({...t,...r})}}}var $m=uI();function uI(){let e="coveo_",t=r=>{let n=r.split(".").slice(-2);return n.length==2?n.join("."):""};return{getItem(r){let n=`${e}${r}=`,o=document.cookie.split(";");for(let a of o){let i=a.replace(/^\s+/,"");if(i.lastIndexOf(n,0)===0)return i.substring(n.length,i.length)}return null},setItem(r,n,o){let a=t(window.location.hostname),i=`;expires=${new Date(new Date().getTime()+o).toUTCString()}`,s=a?`;domain=${a}`:"";document.cookie=`${e}${r}=${n}${i}${s};path=/;SameSite=Lax`},removeItem(r){this.setItem(r,"",-1)}}}function lI(){return{getItem(e){return $m.getItem(e)||localStorage.getItem(e)},removeItem(e){$m.removeItem(e),localStorage.removeItem(e)},setItem(e,t){localStorage.setItem(e,t),$m.setItem(e,t,31556952e3)}}}function dI(){let e=document.referrer;return e===""?null:e}function pI(){return{runtime:"browser",send:(e,t,r)=>{let n=navigator.sendBeacon(`${e}?access_token=${t}`,new Blob([JSON.stringify([r])],{type:"application/json"}));if(zh().sendMessage({kind:"EVENT_PROTOCOL",event:r,url:e,token:t}),!n)throw new Error("Failed to send the event(s) because the payload size exceeded the maximum allowed size (32 KB). Please contact support if the problem persists.")},getReferrer:()=>dI(),getLocation:()=>window.location.href,getUserAgent:()=>navigator.userAgent,generateUUID:()=>_m(),storage:lI()}}function mI(){try{let e="__storage_test__";return localStorage.setItem(e,e),localStorage.removeItem(e),!0}catch(e){return e instanceof DOMException&&e.name==="QuotaExceededError"&&localStorage&&localStorage.length!==0}}function fI(){return{getItem(){return null},removeItem(){},setItem(){}}}function gI(){return{runtime:"null",send:()=>{},getReferrer:()=>null,getLocation:()=>null,getUserAgent:()=>null,generateUUID:()=>"",storage:fI()}}function SI(e){let t=e.get().mode!=="disabled",r=e.get().environment;return t&&r?{...r,runtime:"custom"}:t&&hI()&&mI()?pI():gI()}function hI(){try{return typeof window=="object"}catch{return!1}}function yI(e){return{get:()=>Object.freeze(SI(e))}}function Jh(e){let t=cI(e),r=sI(),n=yI(t),o=rI(n);return{emit:(a,i)=>{let s=t.get(),c=n.get(),u=aI(a,i,s,c,o);return tI({config:s,environment:c,event:u,listenerManager:r})},getMeta:a=>Yh(a,t.get(),n.get(),o),on:(a,i)=>r.add({type:a,callback:i}),off:(a,i)=>r.remove(a,i),updateConfig:a=>t.update(a),version:Kh}}var hn="3.23.2-pre.57bb336b29",Xh=["@coveo/atomic","@coveo/quantic"];var yn=Y(e=>e.source,e=>Object.entries(e).map(([t,r])=>`${t}@${r}`).concat(`@coveo/headless@${hn}`));var pa=Y(e=>e.configuration.organizationId,e=>e.configuration.environment,e=>e.configuration.accessToken,e=>e.configuration.analytics,e=>yn(e.configuration.analytics),(e,t,r,{trackingId:n,apiBaseUrl:o,enabled:a},i)=>Jh({mode:a?"emit":"disabled",url:o??iu(e,t),token:r,trackingId:n,source:i}));function Gr(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function w(e,t,r,n){function o(a){return a instanceof r?a:new r(function(i){i(a)})}return new(r||(r=Promise))(function(a,i){function s(l){try{u(n.next(l))}catch(p){i(p)}}function c(l){try{u(n.throw(l))}catch(p){i(p)}}function u(l){l.done?a(l.value):o(l.value).then(s,c)}u((n=n.apply(e,t||[])).next())})}var ne;(function(e){e.search="search",e.click="click",e.custom="custom",e.view="view",e.collect="collect"})(ne||(ne={}));function zm(){return typeof window<"u"}function sf(){return typeof navigator<"u"}function ma(){return typeof document<"u"}function Gm(){try{return typeof localStorage<"u"}catch{return!1}}function CI(){try{return typeof sessionStorage<"u"}catch{return!1}}function py(){return sf()&&navigator.cookieEnabled}var xI=[ne.click,ne.custom,ne.search,ne.view],FI=(e,t)=>xI.indexOf(e)!==-1?Object.assign({language:ma()?document.documentElement.lang:"unknown",userAgent:sf()?navigator.userAgent:"unknown"},t):t,Ks=class e{static set(t,r,n){var o,a,i,s;n&&(a=new Date,a.setTime(a.getTime()+n)),s=window.location.hostname,s.indexOf(".")===-1?Zh(t,r,a):(i=s.split("."),o=i[i.length-2]+"."+i[i.length-1],Zh(t,r,a,o))}static get(t){for(var r=t+"=",n=document.cookie.split(";"),o=0;o<n.length;o++){var a=n[o];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 Zh(e,t,r,n){document.cookie=`${e}=${t}`+(r?`;expires=${r.toUTCString()}`:"")+(n?`;domain=${n}`:"")+";path=/;SameSite=Lax"}function RI(){return Gm()?localStorage:py()?new Ys:CI()?sessionStorage:new ga}var Ys=class e{getItem(t){return Ks.get(`${e.prefix}${t}`)}removeItem(t){Ks.erase(`${e.prefix}${t}`)}setItem(t,r,n){Ks.set(`${e.prefix}${t}`,r,n)}};Ys.prefix="coveo_";var Km=class{constructor(){this.cookieStorage=new Ys}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)}},ga=class{getItem(t){return null}removeItem(t){}setItem(t,r){}},zs="__coveo.analytics.history",my=20,fy=1e3*60,gy=75,Sa=class{constructor(t){this.store=t||RI()}addElement(t){t.internalTime=new Date().getTime(),t=this.cropQueryElement(this.stripEmptyQuery(t));let r=this.getHistoryWithInternalTime();r!=null?this.isValidEntry(t)&&this.setHistory([t].concat(r)):this.setHistory([t])}addElementAsync(t){return w(this,void 0,void 0,function*(){t.internalTime=new Date().getTime(),t=this.cropQueryElement(this.stripEmptyQuery(t));let r=yield this.getHistoryWithInternalTimeAsync();r!=null?this.isValidEntry(t)&&this.setHistory([t].concat(r)):this.setHistory([t])})}getHistory(){let t=this.getHistoryWithInternalTime();return this.stripEmptyQueries(this.stripInternalTime(t))}getHistoryAsync(){return w(this,void 0,void 0,function*(){let t=yield this.getHistoryWithInternalTimeAsync();return this.stripEmptyQueries(this.stripInternalTime(t))})}getHistoryWithInternalTime(){try{let t=this.store.getItem(zs);return t&&typeof t=="string"?JSON.parse(t):[]}catch{return[]}}getHistoryWithInternalTimeAsync(){return w(this,void 0,void 0,function*(){try{let t=yield this.store.getItem(zs);return t?JSON.parse(t):[]}catch{return[]}})}setHistory(t){try{this.store.setItem(zs,JSON.stringify(t.slice(0,my)))}catch{}}clear(){try{this.store.removeItem(zs)}catch{}}getMostRecentElement(){let t=this.getHistoryWithInternalTime();return Array.isArray(t)?t.sort((n,o)=>(o.internalTime||0)-(n.internalTime||0))[0]:null}cropQueryElement(t){return t.name&&t.value&&t.name.toLowerCase()==="query"&&(t.value=t.value.slice(0,gy)),t}isValidEntry(t){let r=this.getMostRecentElement();return r&&r.value==t.value?(t.internalTime||0)-(r.internalTime||0)>fy:!0}stripInternalTime(t){return Array.isArray(t)?t.map(r=>{let{name:n,time:o,value:a}=r;return{name:n,time:o,value:a}}):[]}stripEmptyQuery(t){let{name:r,time:n,value:o}=t;return r&&typeof o=="string"&&r.toLowerCase()==="query"&&o.trim()===""?{name:r,time:n}:t}stripEmptyQueries(t){return t.map(r=>this.stripEmptyQuery(r))}},Sy=Object.freeze({__proto__:null,HistoryStore:Sa,MAX_NUMBER_OF_HISTORY_ELEMENTS:my,MAX_VALUE_SIZE:gy,MIN_THRESHOLD_FOR_DUPLICATE_VALUE:fy,STORE_KEY:zs,default:Sa}),AI=(e,t)=>w(void 0,void 0,void 0,function*(){return e===ne.view?(yield bI(t.contentIdValue),Object.assign({location:window.location.toString(),referrer:document.referrer,title:document.title},t)):t}),bI=e=>w(void 0,void 0,void 0,function*(){let t=new Sa,r={name:"PageView",value:e,time:new Date().toISOString()};yield t.addElementAsync(r)}),bu,vI=new Uint8Array(16);function PI(){if(!bu&&(bu=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!bu))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return bu(vI)}var wI=/^(?:[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 Pu(e){return typeof e=="string"&&wI.test(e)}var $e=[];for(let e=0;e<256;++e)$e.push((e+256).toString(16).slice(1));function hy(e,t=0){return($e[e[t+0]]+$e[e[t+1]]+$e[e[t+2]]+$e[e[t+3]]+"-"+$e[e[t+4]]+$e[e[t+5]]+"-"+$e[e[t+6]]+$e[e[t+7]]+"-"+$e[e[t+8]]+$e[e[t+9]]+"-"+$e[e[t+10]]+$e[e[t+11]]+$e[e[t+12]]+$e[e[t+13]]+$e[e[t+14]]+$e[e[t+15]]).toLowerCase()}function EI(e){if(!Pu(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 II(e){e=unescape(encodeURIComponent(e));let t=[];for(let r=0;r<e.length;++r)t.push(e.charCodeAt(r));return t}var TI="6ba7b810-9dad-11d1-80b4-00c04fd430c8",kI="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function OI(e,t,r){function n(o,a,i,s){var c;if(typeof o=="string"&&(o=II(o)),typeof a=="string"&&(a=EI(a)),((c=a)===null||c===void 0?void 0:c.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let u=new Uint8Array(16+o.length);if(u.set(a),u.set(o,a.length),u=r(u),u[6]=u[6]&15|t,u[8]=u[8]&63|128,i){s=s||0;for(let l=0;l<16;++l)i[s+l]=u[l];return i}return hy(u)}try{n.name=e}catch{}return n.DNS=TI,n.URL=kI,n}var DI=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),ey={randomUUID:DI};function vo(e,t,r){if(ey.randomUUID&&!t&&!e)return ey.randomUUID();e=e||{};let n=e.random||(e.rng||PI)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,t){r=r||0;for(let o=0;o<16;++o)t[r+o]=n[o];return t}return hy(n)}function qI(e,t,r,n){switch(e){case 0:return t&r^~t&n;case 1:return t^r^n;case 2:return t&r^t&n^r&n;case 3:return t^r^n}}function Wm(e,t){return e<<t|e>>>32-t}function VI(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 n=e.length/4+2,o=Math.ceil(n/16),a=new Array(o);for(let i=0;i<o;++i){let s=new Uint32Array(16);for(let c=0;c<16;++c)s[c]=e[i*64+c*4]<<24|e[i*64+c*4+1]<<16|e[i*64+c*4+2]<<8|e[i*64+c*4+3];a[i]=s}a[o-1][14]=(e.length-1)*8/Math.pow(2,32),a[o-1][14]=Math.floor(a[o-1][14]),a[o-1][15]=(e.length-1)*8&4294967295;for(let i=0;i<o;++i){let s=new Uint32Array(80);for(let d=0;d<16;++d)s[d]=a[i][d];for(let d=16;d<80;++d)s[d]=Wm(s[d-3]^s[d-8]^s[d-14]^s[d-16],1);let c=r[0],u=r[1],l=r[2],p=r[3],m=r[4];for(let d=0;d<80;++d){let f=Math.floor(d/20),F=Wm(c,5)+qI(f,u,l,p)+m+t[f]+s[d]>>>0;m=p,p=l,l=Wm(u,30)>>>0,u=c,c=F}r[0]=r[0]+c>>>0,r[1]=r[1]+u>>>0,r[2]=r[2]+l>>>0,r[3]=r[3]+p>>>0,r[4]=r[4]+m>>>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 NI=OI("v5",80,VI),ty=NI,yy="2.30.45",ry=e=>`${e.protocol}//${e.hostname}${e.pathname.indexOf("/")===0?e.pathname:`/${e.pathname}`}${e.search}`,Gs={pageview:"pageview",event:"event"},wu=class{constructor({client:t,uuidGenerator:r=vo}){this.client=t,this.uuidGenerator=r}},Ym=class extends wu{constructor({client:t,uuidGenerator:r=vo}){super({client:t,uuidGenerator:r}),this.actionData={},this.pageViewId=r(),this.nextPageViewId=this.pageViewId,this.currentLocation=ry(window.location),this.lastReferrer=ma()?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:ma()?document.title:"",encoding:ma()?document.characterSet:"UTF-8"},n={screenResolution:`${screen.width}x${screen.height}`,screenColor:`${screen.colorDepth}-bit`},o={language:navigator.language,userAgent:navigator.userAgent},a={time:Date.now(),eventId:this.uuidGenerator()};return Object.assign(Object.assign(Object.assign(Object.assign({},a),n),o),r)}updateLocationForNextPageView(t,r){let{pageViewId:n,referrer:o,location:a}=this.getNextValues(t,r);this.lastReferrer=o,this.pageViewId=n,this.currentLocation=a,t===Gs.pageview&&(this.nextPageViewId=this.uuidGenerator(),this.hasSentFirstPageView=!0)}getNextValues(t,r){return{pageViewId:t===Gs.pageview?this.nextPageViewId:this.pageViewId,referrer:t===Gs.pageview&&this.hasSentFirstPageView?this.currentLocation:this.lastReferrer,location:t===Gs.pageview?this.getCurrentLocationFromPayload(r):this.currentLocation}}getCurrentLocationFromPayload(t){if(t.page){let r=o=>o.replace(/^\/?(.*)$/,"/$1");return`${(o=>o.split("/").slice(0,3).join("/"))(this.currentLocation)}${r(t.page)}`}else return ry(window.location)}},Cn=class e{constructor(t,r){if(!Pu(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 n=new URL(t);return r.some(o=>new RegExp(o.replace(/\\/g,"\\\\").replace(/\./g,"\\.").replace(/\*/g,".*")+"$").test(n.host))}catch{return!1}}static fromString(t){let r=t.split(".");if(r.length!==2)return null;let[n,o]=r;if(n.length!==32||isNaN(parseInt(o)))return null;let a=n.substring(0,8)+"-"+n.substring(8,12)+"-"+n.substring(12,16)+"-"+n.substring(16,20)+"-"+n.substring(20,32);return Pu(a)?new e(a,Number.parseInt(o)*1e3):null}};Cn.cvo_cid="cvo_cid";Cn.expirationTime=120;var Jm=class extends wu{constructor({client:t,uuidGenerator:r=vo}){super({client:t,uuidGenerator:r})}getApi(t){switch(t){case"decorate":return this.decorate;case"acceptFrom":return this.acceptFrom;default:return null}}decorate(t){return w(this,void 0,void 0,function*(){if(!this.client.getCurrentVisitorId)throw new Error("Could not retrieve current clientId");try{let r=new URL(t),n=yield this.client.getCurrentVisitorId();return r.searchParams.set(Cn.cvo_cid,new Cn(n,Date.now()).toString()),r.toString()}catch{throw new Error("Invalid URL provided")}})}acceptFrom(t){this.client.setAcceptedLinkReferrers(t)}};Jm.Id="link";var bt=Object.keys;function vu(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}var Hm=128,Cy=192,ny=224,oy=240;function MI(e){return(e&248)===oy?4:(e&oy)===ny?3:(e&ny)===Cy?2:1}function QI(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 n=Number.parseInt(e.substring(r-2,r),16);if((n&Hm)!=Hm)break;if(r-=3,(n&Cy)!=Hm){t-r>=MI(n)*3&&(r=t);break}}return e.substring(0,r)}var Xm={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"},LI=bt(Xm).map(e=>Xm[e]),BI=[...LI].join("|"),UI=new RegExp(`^(${BI}$)`),jI={svcAction:"svc_action",svcActionData:"svc_action_data"},_I=e=>bt(e).filter(t=>e[t]!==void 0).reduce((t,r)=>{let n=Xm[r]||r;return Object.assign(Object.assign({},t),{[n]:e[r]})},{}),$I=e=>UI.test(e),WI=[$I],ay={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",price:"pr",quantity:"qt",coupon:"cc",position:"ps",group:"group"},iy={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",position:"ps",price:"pr",group:"group"},He={action:"pa",list:"pal",listSource:"pls"},Eu={id:"ti",revenue:"tr",tax:"tt",shipping:"ts",coupon:"tcc",affiliation:"ta",step:"cos",option:"col"},HI=["loyaltyCardId","loyaltyTier","thirdPartyPersona","companyName","favoriteStore","storeName","userIndustry","userRole","userDepartment","businessUnit"],Zm={id:"quoteId",affiliation:"quoteAffiliation"},ef={id:"reviewId",rating:"reviewRating",comment:"reviewComment"},zI={add:He,bookmark_add:He,bookmark_remove:He,click:He,checkout:He,checkout_option:He,detail:He,impression:He,remove:He,refund:Object.assign(Object.assign({},He),Eu),purchase:Object.assign(Object.assign({},He),Eu),quickview:He,quote:Object.assign(Object.assign({},He),Zm),review:Object.assign(Object.assign({},He),ef)},GI=bt(ay).map(e=>ay[e]),KI=bt(iy).map(e=>iy[e]),YI=bt(He).map(e=>He[e]),JI=bt(Eu).map(e=>Eu[e]),XI=bt(ef).map(e=>ef[e]),ZI=bt(Zm).map(e=>Zm[e]),eT=[...GI,"custom"].join("|"),tT=[...KI,"custom"].join("|"),xy="(pr[0-9]+)",Fy="(il[0-9]+pi[0-9]+)",rT=new RegExp(`^${xy}(${eT})$`),nT=new RegExp(`^(${Fy}(${tT}))|(il[0-9]+nm)$`),oT=new RegExp(`^(${YI.join("|")})$`),aT=new RegExp(`^(${JI.join("|")})$`),iT=new RegExp(`^${xy}custom$`),sT=new RegExp(`^${Fy}custom$`),cT=new RegExp(`^(${[...HI,...XI,...ZI].join("|")})$`),uT=e=>rT.test(e),lT=e=>nT.test(e),dT=e=>oT.test(e),pT=e=>aT.test(e),mT=e=>cT.test(e),fT=[lT,uT,dT,pT,mT],gT=[iT,sT],ST={anonymizeIp:"aip"},hT={eventCategory:"ec",eventAction:"ea",eventLabel:"el",eventValue:"ev",page:"dp",visitorId:"cid",clientId:"cid",userId:"uid",currencyCode:"cu"},yT={hitType:"t",pageViewId:"pid",encoding:"de",location:"dl",referrer:"dr",screenColor:"sd",screenResolution:"sr",title:"dt",userAgent:"ua",language:"ul",eventId:"z",time:"tm"},CT=["contentId","contentIdKey","contentType","searchHub","tab","searchUid","permanentId","contentLocale","trackingId"],xT=Object.assign(Object.assign(Object.assign(Object.assign({},ST),hT),yT),CT.reduce((e,t)=>Object.assign(Object.assign({},e),{[t]:t}),{})),tf=Object.assign(Object.assign({},xT),jI),FT=e=>{let t=!!e.action&&zI[e.action]||{};return bt(e).reduce((r,n)=>{let o=t[n]||tf[n]||n;return Object.assign(Object.assign({},r),{[o]:e[n]})},{})},RT=bt(tf).map(e=>tf[e]),AT=e=>RT.indexOf(e)!==-1,bT=e=>e==="custom",vT=e=>[...fT,...WI,AT,bT].some(t=>t(e)),PT=e=>bt(e).reduce((t,r)=>{let n=wT(r);return n?Object.assign(Object.assign({},t),ET(n,e[r])):Object.assign(Object.assign({},t),{[r]:e[r]})},{}),wT=e=>{let t;return[...gT].every(r=>{var n;return t=(n=r.exec(e))===null||n===void 0?void 0:n[1],!t}),t},ET=(e,t)=>bt(t).reduce((r,n)=>Object.assign(Object.assign({},r),{[`${e}${n}`]:t[n]}),{}),rf=class{constructor(t){this.opts=t}sendEvent(t,r){return w(this,void 0,void 0,function*(){if(!this.isAvailable())throw new Error('navigator.sendBeacon is not supported in this browser. Consider adding a polyfill like "sendbeacon-polyfill".');let{baseUrl:n,preprocessRequest:o}=this.opts,a=yield this.getQueryParamsForEventType(t),{url:i,payload:s}=yield this.preProcessRequestAsPotentialJSONString(`${n}/analytics/${t}?${a}`,r,o),c=this.encodeForEventType(t,s),u=new Blob([c],{type:"application/x-www-form-urlencoded"});navigator.sendBeacon(i,u)})}isAvailable(){return"sendBeacon"in navigator}deleteHttpCookieVisitorId(){return Promise.resolve()}preProcessRequestAsPotentialJSONString(t,r,n){return w(this,void 0,void 0,function*(){let o=t,a=r;if(n){let i=yield n({url:t,body:JSON.stringify(r)},"analyticsBeacon"),{url:s,body:c}=i;o=s||t;try{a=JSON.parse(c)}catch(u){console.error("Unable to process the request body as a JSON string",u)}}return{payload:a,url:o}})}encodeForEventType(t,r){return this.isEventTypeLegacy(t)?this.encodeEventToJson(t,r):this.encodeEventToJson(t,r,this.opts.token)}getQueryParamsForEventType(t){return w(this,void 0,void 0,function*(){let{token:r,visitorIdProvider:n}=this.opts,o=yield n.getCurrentVisitorId();return[r&&this.isEventTypeLegacy(t)?`access_token=${r}`:"",o?`visitorId=${o}`:"","discardVisitInfo=true"].filter(a=>!!a).join("&")})}isEventTypeLegacy(t){return[ne.click,ne.custom,ne.search,ne.view].indexOf(t)!==-1}encodeEventToJson(t,r,n){let o=`${t}Event=${encodeURIComponent(JSON.stringify(r))}`;return n&&(o=`access_token=${encodeURIComponent(n)}&${o}`),o}},nf=class{sendEvent(t,r){return w(this,void 0,void 0,function*(){return Promise.resolve()})}deleteHttpCookieVisitorId(){return w(this,void 0,void 0,function*(){return Promise.resolve()})}},sy=globalThis.fetch,Iu=class{constructor(t){this.opts=t}sendEvent(t,r){return w(this,void 0,void 0,function*(){let{baseUrl:n,visitorIdProvider:o,preprocessRequest:a}=this.opts,i=this.shouldAppendVisitorId(t)?yield this.getVisitorIdParam():"",s={url:`${n}/analytics/${t}${i}`,credentials:"include",mode:"cors",headers:this.getHeaders(),method:"POST",body:JSON.stringify(r)},c=Object.assign(Object.assign({},s),a?yield a(s,"analyticsFetch"):{}),{url:u}=c,l=Gr(c,["url"]),p;try{p=yield sy(u,l)}catch(m){console.error("An error has occured when sending the event.",m);return}if(p.ok){let m=yield p.json();return m.visitorId&&o.setCurrentVisitorId(m.visitorId),m}else{try{p.json()}catch{}throw console.error(`An error has occured when sending the "${t}" event.`,p,r),new Error(`An error has occurred when sending the "${t}" event. Check the console logs for more details.`)}})}deleteHttpCookieVisitorId(){return w(this,void 0,void 0,function*(){let{baseUrl:t}=this.opts,r=`${t}/analytics/visit`;yield sy(r,{headers:this.getHeaders(),method:"DELETE"})})}shouldAppendVisitorId(t){return[ne.click,ne.custom,ne.search,ne.view].indexOf(t)!==-1}getVisitorIdParam(){return w(this,void 0,void 0,function*(){let{visitorIdProvider:t}=this.opts,r=yield t.getCurrentVisitorId();return r?`?visitor=${r}`:""})}getHeaders(){let{token:t}=this.opts;return Object.assign(Object.assign({},t?{Authorization:`Bearer ${t}`}:{}),{"Content-Type":"application/json"})}},of=class{constructor(t,r){Gm()&&py()?this.storage=new Km:Gm()?this.storage=localStorage:(console.warn("BrowserRuntime detected no valid storage available.",this),this.storage=new ga),this.client=new Iu(t),this.beaconClient=new rf(t),window.addEventListener("beforeunload",()=>{let n=r();for(let{eventType:o,payload:a}of n)this.beaconClient.sendEvent(o,a)})}getClientDependingOnEventType(t){return t==="click"&&this.beaconClient.isAvailable()?this.beaconClient:this.client}},af=class{constructor(t,r){this.storage=r||new ga,this.client=new Iu(t)}getClientDependingOnEventType(t){return this.client}},Tu=class{constructor(){this.storage=new ga,this.client=new nf}getClientDependingOnEventType(t){return this.client}},IT="xx",TT=e=>e?.startsWith(IT)||!1,kT=`
|
|
19
|
+
`+l:l;break;case"event":n.event=l;break;case"id":e(n.id=l);break;case"retry":gw(l,n,t);break}}}}function gw(e,t,r){let n=parseInt(e,10);isNaN(n)||r(t.retry=n)}function Sw(e,t){let r=new Uint8Array(e.length+t.length);return r.set(e),r.set(t,e.length),r}function NS(){return{data:"",event:"",id:"",retry:void 0}}var lm="text/event-stream",hw=1e3,BS="last-event-id";function US(){return typeof window<"u"}function nu(e,{signal:t,headers:r,onopen:n,onmessage:o,onclose:a,onerror:i,openWhenHidden:s,fetch:c,...u}){return new Promise((l,p)=>{let m={...r};m.accept||(m.accept=lm);let d;function f(){d?.abort(),document.hidden||R()}!s&&US()&&document.addEventListener("visibilitychange",f);let F=hw,S;function g(){US()&&document.removeEventListener("visibilitychange",f),clearTimeout(S),d?.abort()}t?.addEventListener("abort",()=>{g(),l()});let C=c??fetch,y=n??yw;async function R(){d=AbortController?new AbortController:null;try{let E=await C(e,{...u,headers:m,signal:d?.signal});await y(E),await MS(E.body,QS(LS(v=>{v?m[BS]=v:delete m[BS]},v=>{F=v},o))),a?.(),g(),l()}catch(E){if(!d?.signal?.aborted)try{let v=i?.(E)??F;clearTimeout(S),S=setTimeout(R,v)}catch(v){g(),p(v)}}}R()})}function yw(e){let t=e.headers.get("content-type");if(!t?.startsWith(lm))throw new Error(`Expected content-type to be ${lm}, Actual: ${t}`)}var pn=class{constructor(t){Ae(this,"_basePath");Ae(this,"_params",{});this._basePath=t}addParam(t,r){this._params={...this.params,[t]:r}}get basePath(){return this._basePath}get params(){return this._params}get hasParams(){return Object.entries(this._params).length}get href(){return this.hasParams?`${this.basePath}?${Object.entries(this.params).map(([t,r])=>`${t}=${encodeURIComponent(r)}`).join("&")}`:this.basePath}};var Cw=(e,t,r)=>new pn(`${e}/rest/organizations/${t}/machinelearning/streaming/${r}`).href,jS=3,xw=5e3,Fw="text/event-stream",mm=1,dm=class extends Error{},Os=class extends Error{constructor(r){super(r.message);this.payload=r}},pm=class{constructor(){Ae(this,"timeouts",new Set)}add(t){this.timeouts.add(t)}remove(t){clearTimeout(t),this.timeouts.delete(t)}isActive(t){return this.timeouts.has(t)}},ou=class{constructor(t){Ae(this,"logger");this.logger=t.logger}streamGeneratedAnswer(t,r){let{url:n,organizationId:o,streamId:a,accessToken:i}=t,{write:s,abort:c,close:u,resetAnswer:l}=r,p=new pm;if(!a){this.logger.error("No stream ID found");return}let m=0,d,f=()=>{d&&!p.isActive(d)&&(S?.abort(),l(),g())},F=()=>{p.remove(d),d=AS(f,d,xw),p.add(d)},S=new AbortController,g=()=>nu(Cw(n,o,a),{method:"GET",fetch,headers:{Authorization:`Bearer ${i}`,accept:"*/*"},openWhenHidden:!0,signal:S?.signal,async onopen(C){if(C.ok&&C.headers.get("content-type")===Fw)return;throw C.status>=400&&C.status<500&&C.status!==429?new Os({message:"Error opening stream",code:C.status}):new dm},onmessage:C=>{if(S?.signal.aborted)return;let y=JSON.parse(C.data);if(y.finishReason==="ERROR"){p.remove(d),S?.abort(),c({message:y.errorMessage,code:y.statusCode});return}s(y),m=0,y.finishReason==="COMPLETED"?(p.remove(d),u()):F()},onerror:C=>{if(!S?.signal.aborted){if(p.remove(d),C instanceof Os)throw S?.abort(),c(C),C;if(++m>jS){this.logger.info("Maximum retry exceeded.");let y={message:"Failed to complete stream.",code:mm};throw S?.abort(),c(y),new Os(y)}this.logger.info(`Retrying...(${m}/${jS})`),l()}}});return g(),S}};var eh=nr(YS(),1);var zw="recommendation-internal-options",CL=Symbol.for(zw);var Q=new Error("Failed to load reducers."),aa=class extends Error{constructor(){super(),this.name="ExpiredToken",this.message="The token being used to perform the request is expired."}};var mn=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\`.`}};var yo=class extends Error{constructor(r,n){super();Ae(this,"statusCode");this.name="Disconnected",this.message=`Client could not connect to the following URL: ${r}`,this.statusCode=n??0}};function JS(e){let t=[];for(let r in e){let n=encodeURIComponent(r),o=encodeURIComponent(e[r]);t.push(`${n}=${o}`)}return t.join("&")}function XS(e){return typeof e!="object"||!e?!1:Object.values(e).every(Gw)}function Gw(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"}function ZS(e){return e===429}var Ft=class e{static async call(t){let r=Kw(t),{logger:n}=t,o=await e.preprocessRequest(r,t);n.info(o,"Platform request");let{url:a,...i}=o,s=async()=>{let c=await fetch(a,i);if(ZS(c.status))throw c;return c};try{let c=await(0,eh.backOff)(s,{retry:u=>{let l=u&&ZS(u.status);return l&&n.info("Platform retrying request"),l}});switch(c.status){case 419:case 401:throw n.info("Platform renewing token"),new aa;case 404:throw new yo(a,c.status);default:return n.info({response:c,requestInfo:o},"Platform response"),c}}catch(c){return c.message==="Failed to fetch"?new yo(a):c}}static async preprocessRequest(t,r){let{origin:n,preprocessRequest:o,logger:a,requestMetadata:i}=r,{signal:s,...c}=t,u=ln(c);try{let l=await o(t,n,i);return{...t,...l}}catch(l){a.error(l,"Platform request preprocessing failed. Returning default request options.")}return u}};function Be(e,t="prod",r="platform"){let n=t==="prod"?"":t,o=r==="platform"?"":`.${r}`;return`https://${e}${o}.org${n}.coveo.com`}function De(e,t="prod"){return`${Be(e,t)}/rest/search/v2`}function iu(e,t="prod"){return`${Be(e,t,"analytics")}/rest/organizations/${e}/events/v1`}function Kw(e){let{url:t,method:r,requestParams:n,contentType:o,accessToken:a,signal:i}=e,s=e.method==="POST"||e.method==="PUT",c=Yw(n,o);return{url:t,method:r,headers:{"Content-Type":o,Authorization:`Bearer ${a}`,...e.headers},...s&&{body:c},signal:i}}function Yw(e,t){return t==="application/x-www-form-urlencoded"?XS(e)?JS(e):"":JSON.stringify(e)}var su=e=>e;var th=e=>e,rh=e=>e,nh=e=>e;var uh=require("@coveo/bueno");function ia(){return{answerSnippet:"",documentId:{contentIdKey:"",contentIdValue:""},question:"",relatedQuestions:[],score:0}}function pt(){return{response:{results:[],searchUid:"",totalCountFiltered:0,facets:[],generateAutomaticFacets:{facets:[]},queryCorrections:[],triggers:[],questionAnswer:ia(),pipeline:"",splitTestRun:"",termsToHighlight:{},phrasesToHighlight:{},extendedResults:{}},duration:0,queryExecuted:"",error:null,automaticallyCorrected:!1,isLoading:!1,results:[],searchResponseId:"",requestId:"",questionAnswer:ia(),extendedResults:{}}}function fn(e){let{url:t,accessToken:r,organizationId:n,authentication:o,...a}=e;return a}var gn=e=>{let{response:t}=e;return t.body?Jw(e):Xw(t)},Jw=e=>eE(e)?tE(e):Zw(e)?e.body:{message:"unknown",statusCode:0,type:"unknown"},Xw=e=>{let t=JSON.parse(JSON.stringify(e,Object.getOwnPropertyNames(e)));return{...t,message:`Client side error: ${t.message||""}`,statusCode:400,type:"ClientError"}};function Zw(e){return e.body.statusCode!==void 0}function eE(e){return e.body.exception!==void 0}var tE=e=>({message:e.body.exception.code,statusCode:e.response.status,type:e.body.exception.code});var Sn=class{constructor(){Ae(this,"currentAbortController",null)}async enqueue(t,r){let n=this.currentAbortController,o=this.currentAbortController=new AbortController;n&&(r.warnOnAbort&&r.logger.warn("Cancelling current pending search query"),n.abort());try{return await t(o?.signal??null)}finally{this.currentAbortController===o&&(this.currentAbortController=null)}}};function oh(e){return((e.headers.get("content-type")||"").split(";").find(n=>n.indexOf("charset=")!==-1)||"").split("=")[1]||"UTF-8"}var $r=(e,t,r,n)=>{let o=new pn(`${e.url}${n}`);return o.addParam("organizationId",e.organizationId),e.authentication&&o.addParam("authentication",e.authentication),{accessToken:e.accessToken,method:t,contentType:r,url:o.href,origin:"searchApiFetch"}};var ah=(e,t)=>{let r=new pn(`${e.url}${t}`);return r.addParam("access_token",e.accessToken),r.addParam("organizationId",e.organizationId),r.addParam("uniqueId",e.uniqueId),e.authentication&&r.addParam("authentication",e.authentication),e.q!==void 0&&r.addParam("q",e.q),e.enableNavigation!==void 0&&r.addParam("enableNavigation",`${e.enableNavigation}`),e.requestedOutputSize!==void 0&&r.addParam("requestedOutputSize",`${e.requestedOutputSize}`),r.href},ih=async(e,t)=>{let r=await Ft.call({...$r(e,"POST","application/x-www-form-urlencoded","/html"),requestParams:fn(e),requestMetadata:{method:"html"},...t});if(r instanceof Error)throw r;let n=oh(r),o=await r.arrayBuffer(),i=new TextDecoder(n).decode(o);return rE(i)?{success:i}:{error:gn({response:r,body:i})}};function rE(e){return typeof e=="string"}function nE(e){return{statusCode:e.statusCode,type:e.name,message:e.message}}function oE(e){return{statusCode:e.code,type:e.name,message:e.message,ignored:!0}}function Vs(e,t){if(t&&e.name==="AbortError")return{error:oE(e)};if(e instanceof yo)return{error:nE(e)};throw e}var cu=class{constructor(t){this.options=t;Ae(this,"apiCallsQueues",{unknown:new Sn,mainSearch:new Sn,facetValues:new Sn,foldingCollection:new Sn,instantResults:new Sn})}async plan(t){let r=await Ft.call({...$r(t,"POST","application/json","/plan"),requestParams:fn(t),requestMetadata:{method:"plan"},...this.options});if(r instanceof Error)return Vs(r);let n=await r.json();return iE(n)?{success:n}:{error:gn({response:r,body:n})}}async querySuggest(t){let r=await Ft.call({...$r(t,"POST","application/json","/querySuggest"),requestMetadata:{method:"querySuggest"},requestParams:fn(t),...this.options});if(r instanceof Error)return Vs(r);let n=await r.json(),o={response:r,body:n};return aE(n)?{success:(await this.options.postprocessQuerySuggestResponseMiddleware(o)).body}:{error:gn(o)}}async search(t,r){let n=r?.origin??"unknown",o=await this.apiCallsQueues[n].enqueue(s=>Ft.call({...$r(t,"POST","application/json",""),requestParams:fn(t),requestMetadata:{method:"search",origin:r?.origin},...this.options,signal:s??void 0}),{logger:this.options.logger,warnOnAbort:!r?.disableAbortWarning});if(o instanceof Error)return Vs(o,r?.disableAbortWarning);let a=await o.json(),i={response:o,body:a};return sh(a)?(i.body=ch(a),{success:(await this.options.postprocessSearchResponseMiddleware(i)).body}):{error:gn(i)}}async facetSearch(t){let r=await Ft.call({...$r(t,"POST","application/json","/facet"),requestParams:fn(t),requestMetadata:{method:"facetSearch"},...this.options});if(r instanceof Error)throw r;let n=await r.json(),o={response:r,body:n};return(await this.options.postprocessFacetSearchResponseMiddleware(o)).body}async recommendations(t){let r=await Ft.call({...$r(t,"POST","application/json",""),requestParams:fn(t),requestMetadata:{method:"recommendations"},...this.options});if(r instanceof Error)throw r;let n=await r.json();if(sh(n)){let o={response:r,body:n};return o.body=ch(n),{success:(await this.options.postprocessSearchResponseMiddleware(o)).body}}return{error:gn({response:r,body:n})}}async html(t){return ih(t,{...this.options})}async fieldDescriptions(t){let r=await Ft.call({...$r(t,"GET","application/json","/fields"),requestParams:{},requestMetadata:{method:"fieldDescriptions"},...this.options});if(r instanceof Error)throw r;let n=await r.json();return sE(n)?{success:n}:{error:gn({response:r,body:n})}}},uu=e=>e.success!==void 0,qe=e=>e.error!==void 0;function sh(e){return e.results!==void 0}function ch(e){let t=ia();return(0,uh.isNullOrUndefined)(e.questionAnswer)?(e.questionAnswer=t,e):(e.questionAnswer={...t,...e.questionAnswer},e)}function aE(e){return e.completions!==void 0}function iE(e){return e.preprocessingOutput!==void 0}function sE(e){return e.fields!==void 0}var nt=require("@coveo/bueno"),V=new nt.StringValue({required:!0,emptyAllowed:!1}),de=new nt.StringValue({required:!1,emptyAllowed:!1}),se=new nt.StringValue({required:!0,emptyAllowed:!0}),lh=new nt.StringValue({required:!1,emptyAllowed:!0}),lu=new nt.ArrayValue({each:V,required:!0}),dh=new nt.StringValue({required:!1,emptyAllowed:!1,regex:/^\d+\.\d+\.\d+$/}),Wr=({message:e,name:t,stack:r})=>({message:e,name:t,stack:r}),Rt=(e,t)=>{if("required"in t)return{payload:new nt.Schema({value:t}).validate({value:e}).value};let o=new nt.RecordValue({options:{required:!0},values:t}).validate(e);if(o)throw new nt.SchemaValidationError(o);return{payload:e}},x=(e,t)=>{try{return Rt(e,t)}catch(r){return{payload:e,error:Wr(r)}}},Ee=(e,t,r,n)=>{let o=`Check the initialState of ${n}`;return ph(e,t,r,o,"Controller initialization error")},ue=(e,t,r,n)=>{let o=`Check the options of ${n}`;return ph(e,t,r,o,"Controller initialization error")},ph=(e,t,r,n,o)=>{try{return t.validate(r,n)}catch(a){throw e.logger.error(a,o),a}};var Pt=require("@coveo/bueno");function Ue(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 cE=typeof Symbol=="function"&&Symbol.observable||"@@observable",mh=cE,Rm=()=>Math.random().toString(36).substring(7).split("").join("."),uE={INIT:`@@redux/INIT${Rm()}`,REPLACE:`@@redux/REPLACE${Rm()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Rm()}`},du=uE;function or(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 Am(e,t,r){if(typeof e!="function")throw new Error(Ue(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(Ue(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(Ue(1));return r(Am)(e,t)}let n=e,o=t,a=new Map,i=a,s=0,c=!1;function u(){i===a&&(i=new Map,a.forEach((S,g)=>{i.set(g,S)}))}function l(){if(c)throw new Error(Ue(3));return o}function p(S){if(typeof S!="function")throw new Error(Ue(4));if(c)throw new Error(Ue(5));let g=!0;u();let C=s++;return i.set(C,S),function(){if(g){if(c)throw new Error(Ue(6));g=!1,u(),i.delete(C),a=null}}}function m(S){if(!or(S))throw new Error(Ue(7));if(typeof S.type>"u")throw new Error(Ue(8));if(typeof S.type!="string")throw new Error(Ue(17));if(c)throw new Error(Ue(9));try{c=!0,o=n(o,S)}finally{c=!1}return(a=i).forEach(C=>{C()}),S}function d(S){if(typeof S!="function")throw new Error(Ue(10));n=S,m({type:du.REPLACE})}function f(){let S=p;return{subscribe(g){if(typeof g!="object"||g===null)throw new Error(Ue(11));function C(){let R=g;R.next&&R.next(l())}return C(),{unsubscribe:S(C)}},[mh](){return this}}}return m({type:du.INIT}),{dispatch:m,subscribe:p,getState:l,replaceReducer:d,[mh]:f}}function lE(e){Object.keys(e).forEach(t=>{let r=e[t];if(typeof r(void 0,{type:du.INIT})>"u")throw new Error(Ue(12));if(typeof r(void 0,{type:du.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Ue(13))})}function sa(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 n=Object.keys(r),o,a;try{lE(r)}catch(i){a=i}return function(s={},c){if(a)throw a;let u=!1,l={};for(let p=0;p<n.length;p++){let m=n[p],d=r[m],f=s[m],F=d(f,c);if(typeof F>"u"){let S=c&&c.type;throw new Error(Ue(14))}l[m]=F,u=u||F!==f}return u=u||n.length!==Object.keys(s).length,u?l:s}}function ca(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function fh(...e){return t=>(r,n)=>{let o=t(r,n),a=()=>{throw new Error(Ue(15))},i={getState:o.getState,dispatch:(c,...u)=>a(c,...u)},s=e.map(c=>c(i));return a=ca(...s)(o.dispatch),{...o,dispatch:a}}}function pu(e){return or(e)&&"type"in e&&typeof e.type=="string"}var Dm=Symbol.for("immer-nothing"),Ns=Symbol.for("immer-draftable"),ot=Symbol.for("immer-state");function je(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var xo=Object.getPrototypeOf;function mt(e){return!!e&&!!e[ot]}function at(e){return e?Ch(e)||Array.isArray(e)||!!e[Ns]||!!e.constructor?.[Ns]||Us(e)||js(e):!1}var dE=Object.prototype.constructor.toString();function Ch(e){if(!e||typeof e!="object")return!1;let t=xo(e);if(t===null)return!0;let r=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return r===Object?!0:typeof r=="function"&&Function.toString.call(r)===dE}function qm(e){return mt(e)||je(15,e),e[ot].base_}function Ms(e,t){Fo(e)===0?Reflect.ownKeys(e).forEach(r=>{t(r,e[r],e)}):e.forEach((r,n)=>t(n,r,e))}function Fo(e){let t=e[ot];return t?t.type_:Array.isArray(e)?1:Us(e)?2:js(e)?3:0}function Qs(e,t){return Fo(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function bm(e,t){return Fo(e)===2?e.get(t):e[t]}function xh(e,t,r){let n=Fo(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function pE(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Us(e){return e instanceof Map}function js(e){return e instanceof Set}function Co(e){return e.copy_||e.base_}function wm(e,t){if(Us(e))return new Map(e);if(js(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);let r=Ch(e);if(t===!0||t==="class_only"&&!r){let n=Object.getOwnPropertyDescriptors(e);delete n[ot];let o=Reflect.ownKeys(n);for(let a=0;a<o.length;a++){let i=o[a],s=n[i];s.writable===!1&&(s.writable=!0,s.configurable=!0),(s.get||s.set)&&(n[i]={configurable:!0,writable:!0,enumerable:s.enumerable,value:e[i]})}return Object.create(xo(e),n)}else{let n=xo(e);if(n!==null&&r)return{...e};let o=Object.create(n);return Object.assign(o,e)}}function gu(e,t=!1){return Su(e)||mt(e)||!at(e)||(Fo(e)>1&&(e.set=e.add=e.clear=e.delete=mE),Object.freeze(e),t&&Object.entries(e).forEach(([r,n])=>gu(n,!0))),e}function mE(){je(2)}function Su(e){return Object.isFrozen(e)}var Em={};function Ro(e){let t=Em[e];return t||je(0,e),t}function fE(e,t){Em[e]||(Em[e]=t)}var Ls;function Fh(){return Ls}function gE(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function gh(e,t){t&&(Ro("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Im(e){Tm(e),e.drafts_.forEach(SE),e.drafts_=null}function Tm(e){e===Ls&&(Ls=e.parent_)}function Sh(e){return Ls=gE(Ls,e)}function SE(e){let t=e[ot];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function hh(e,t){t.unfinalizedDrafts_=t.drafts_.length;let r=t.drafts_[0];return e!==void 0&&e!==r?(r[ot].modified_&&(Im(t),je(4)),at(e)&&(e=mu(t,e),t.parent_||fu(t,e)),t.patches_&&Ro("Patches").generateReplacementPatches_(r[ot].base_,e,t.patches_,t.inversePatches_)):e=mu(t,r,[]),Im(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Dm?e:void 0}function mu(e,t,r){if(Su(t))return t;let n=t[ot];if(!n)return Ms(t,(o,a)=>yh(e,n,t,o,a,r)),t;if(n.scope_!==e)return t;if(!n.modified_)return fu(e,n.base_,!0),n.base_;if(!n.finalized_){n.finalized_=!0,n.scope_.unfinalizedDrafts_--;let o=n.copy_,a=o,i=!1;n.type_===3&&(a=new Set(o),o.clear(),i=!0),Ms(a,(s,c)=>yh(e,n,o,s,c,r,i)),fu(e,o,!1),r&&e.patches_&&Ro("Patches").generatePatches_(n,r,e.patches_,e.inversePatches_)}return n.copy_}function yh(e,t,r,n,o,a,i){if(mt(o)){let s=a&&t&&t.type_!==3&&!Qs(t.assigned_,n)?a.concat(n):void 0,c=mu(e,o,s);if(xh(r,n,c),mt(c))e.canAutoFreeze_=!1;else return}else i&&r.add(o);if(at(o)&&!Su(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;mu(e,o),(!t||!t.scope_.parent_)&&typeof n!="symbol"&&Object.prototype.propertyIsEnumerable.call(r,n)&&fu(e,o)}}function fu(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&gu(t,r)}function hE(e,t){let r=Array.isArray(e),n={type_:r?1:0,scope_:t?t.scope_:Fh(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1},o=n,a=Vm;r&&(o=[n],a=Bs);let{revoke:i,proxy:s}=Proxy.revocable(o,a);return n.draft_=s,n.revoke_=i,s}var Vm={get(e,t){if(t===ot)return e;let r=Co(e);if(!Qs(r,t))return yE(e,r,t);let n=r[t];return e.finalized_||!at(n)?n:n===vm(e.base_,t)?(Pm(e),e.copy_[t]=Om(n,e)):n},has(e,t){return t in Co(e)},ownKeys(e){return Reflect.ownKeys(Co(e))},set(e,t,r){let n=Rh(Co(e),t);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){let o=vm(Co(e),t),a=o?.[ot];if(a&&a.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(pE(r,o)&&(r!==void 0||Qs(e.base_,t)))return!0;Pm(e),km(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 vm(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Pm(e),km(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let r=Co(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty(){je(11)},getPrototypeOf(e){return xo(e.base_)},setPrototypeOf(){je(12)}},Bs={};Ms(Vm,(e,t)=>{Bs[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});Bs.deleteProperty=function(e,t){return Bs.set.call(this,e,t,void 0)};Bs.set=function(e,t,r){return Vm.set.call(this,e[0],t,r,e[0])};function vm(e,t){let r=e[ot];return(r?Co(r):e)[t]}function yE(e,t,r){let n=Rh(t,r);return n?"value"in n?n.value:n.get?.call(e.draft_):void 0}function Rh(e,t){if(!(t in e))return;let r=xo(e);for(;r;){let n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=xo(r)}}function km(e){e.modified_||(e.modified_=!0,e.parent_&&km(e.parent_))}function Pm(e){e.copy_||(e.copy_=wm(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var CE=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,r,n)=>{if(typeof t=="function"&&typeof r!="function"){let a=r;r=t;let i=this;return function(c=a,...u){return i.produce(c,l=>r.call(this,l,...u))}}typeof r!="function"&&je(6),n!==void 0&&typeof n!="function"&&je(7);let o;if(at(t)){let a=Sh(this),i=Om(t,void 0),s=!0;try{o=r(i),s=!1}finally{s?Im(a):Tm(a)}return gh(a,n),hh(o,a)}else if(!t||typeof t!="object"){if(o=r(t),o===void 0&&(o=t),o===Dm&&(o=void 0),this.autoFreeze_&&gu(o,!0),n){let a=[],i=[];Ro("Patches").generateReplacementPatches_(t,o,a,i),n(a,i)}return o}else je(1,t)},this.produceWithPatches=(t,r)=>{if(typeof t=="function")return(i,...s)=>this.produceWithPatches(i,c=>t(c,...s));let n,o;return[this.produce(t,r,(i,s)=>{n=i,o=s}),n,o]},typeof e?.autoFreeze=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof e?.useStrictShallowCopy=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){at(e)||je(8),mt(e)&&(e=Ah(e));let t=Sh(this),r=Om(e,void 0);return r[ot].isManual_=!0,Tm(t),r}finishDraft(e,t){let r=e&&e[ot];(!r||!r.isManual_)&&je(9);let{scope_:n}=r;return gh(n,t),hh(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){let o=t[r];if(o.path.length===0&&o.op==="replace"){e=o.value;break}}r>-1&&(t=t.slice(r+1));let n=Ro("Patches").applyPatches_;return mt(e)?n(e,t):this.produce(e,o=>n(o,t))}};function Om(e,t){let r=Us(e)?Ro("MapSet").proxyMap_(e,t):js(e)?Ro("MapSet").proxySet_(e,t):hE(e,t);return(t?t.scope_:Fh()).drafts_.push(r),r}function Ah(e){return mt(e)||je(10,e),bh(e)}function bh(e){if(!at(e)||Su(e))return e;let t=e[ot],r;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=wm(e,t.scope_.immer_.useStrictShallowCopy_)}else r=wm(e,!0);return Ms(r,(n,o)=>{xh(r,n,bh(o))}),t&&(t.finalized_=!1),r}function vh(){let t="replace",r="add",n="remove";function o(m,d,f,F){switch(m.type_){case 0:case 2:return i(m,d,f,F);case 1:return a(m,d,f,F);case 3:return s(m,d,f,F)}}function a(m,d,f,F){let{base_:S,assigned_:g}=m,C=m.copy_;C.length<S.length&&([S,C]=[C,S],[f,F]=[F,f]);for(let y=0;y<S.length;y++)if(g[y]&&C[y]!==S[y]){let R=d.concat([y]);f.push({op:t,path:R,value:p(C[y])}),F.push({op:t,path:R,value:p(S[y])})}for(let y=S.length;y<C.length;y++){let R=d.concat([y]);f.push({op:r,path:R,value:p(C[y])})}for(let y=C.length-1;S.length<=y;--y){let R=d.concat([y]);F.push({op:n,path:R})}}function i(m,d,f,F){let{base_:S,copy_:g}=m;Ms(m.assigned_,(C,y)=>{let R=bm(S,C),E=bm(g,C),v=y?Qs(S,C)?t:r:n;if(R===E&&v===t)return;let A=d.concat(C);f.push(v===n?{op:v,path:A}:{op:v,path:A,value:E}),F.push(v===r?{op:n,path:A}:v===n?{op:r,path:A,value:p(R)}:{op:t,path:A,value:p(R)})})}function s(m,d,f,F){let{base_:S,copy_:g}=m,C=0;S.forEach(y=>{if(!g.has(y)){let R=d.concat([C]);f.push({op:n,path:R,value:y}),F.unshift({op:r,path:R,value:y})}C++}),C=0,g.forEach(y=>{if(!S.has(y)){let R=d.concat([C]);f.push({op:r,path:R,value:y}),F.unshift({op:n,path:R,value:y})}C++})}function c(m,d,f,F){f.push({op:t,path:[],value:d===Dm?void 0:d}),F.push({op:t,path:[],value:m})}function u(m,d){return d.forEach(f=>{let{path:F,op:S}=f,g=m;for(let E=0;E<F.length-1;E++){let v=Fo(g),A=F[E];typeof A!="string"&&typeof A!="number"&&(A=""+A),(v===0||v===1)&&(A==="__proto__"||A==="constructor")&&je(19),typeof g=="function"&&A==="prototype"&&je(19),g=bm(g,A),typeof g!="object"&&je(18,F.join("/"))}let C=Fo(g),y=l(f.value),R=F[F.length-1];switch(S){case t:switch(C){case 2:return g.set(R,y);case 3:je(16);default:return g[R]=y}case r:switch(C){case 1:return R==="-"?g.push(y):g.splice(R,0,y);case 2:return g.set(R,y);case 3:return g.add(y);default:return g[R]=y}case n:switch(C){case 1:return g.splice(R,1);case 2:return g.delete(R);case 3:return g.delete(f.value);default:return delete g[R]}default:je(17,S)}}),m}function l(m){if(!at(m))return m;if(Array.isArray(m))return m.map(l);if(Us(m))return new Map(Array.from(m.entries()).map(([f,F])=>[f,l(F)]));if(js(m))return new Set(Array.from(m).map(l));let d=Object.create(xo(m));for(let f in m)d[f]=l(m[f]);return Qs(m,Ns)&&(d[Ns]=m[Ns]),d}function p(m){return mt(m)?l(m):m}fE("Patches",{applyPatches_:u,generatePatches_:o,generateReplacementPatches_:c})}var ft=new CE,Hr=ft.produce,hu=ft.produceWithPatches.bind(ft),c0=ft.setAutoFreeze.bind(ft),u0=ft.setUseStrictShallowCopy.bind(ft),Nm=ft.applyPatches.bind(ft),l0=ft.createDraft.bind(ft),d0=ft.finishDraft.bind(ft);function xE(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function FE(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function RE(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(r=>typeof r=="function")){let r=e.map(n=>typeof n=="function"?`function ${n.name||"unnamed"}()`:typeof n).join(", ");throw new TypeError(`${t}[${r}]`)}}var Ph=e=>Array.isArray(e)?e:[e];function AE(e){let t=Array.isArray(e[0])?e[0]:e;return RE(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function bE(e,t){let r=[],{length:n}=e;for(let o=0;o<n;o++)r.push(e[o].apply(null,t));return r}var f0=Symbol();var g0=Object.getPrototypeOf({});var vE=class{constructor(e){this.value=e}deref(){return this.value}},PE=typeof WeakRef<"u"?WeakRef:vE,wE=0,wh=1;function yu(){return{s:wE,v:void 0,o:null,p:null}}function ua(e,t={}){let r=yu(),{resultEqualityCheck:n}=t,o,a=0;function i(){let s=r,{length:c}=arguments;for(let p=0,m=c;p<m;p++){let d=arguments[p];if(typeof d=="function"||typeof d=="object"&&d!==null){let f=s.o;f===null&&(s.o=f=new WeakMap);let F=f.get(d);F===void 0?(s=yu(),f.set(d,s)):s=F}else{let f=s.p;f===null&&(s.p=f=new Map);let F=f.get(d);F===void 0?(s=yu(),f.set(d,s)):s=F}}let u=s,l;if(s.s===wh)l=s.v;else if(l=e.apply(null,arguments),a++,n){let p=o?.deref?.()??o;p!=null&&n(p,l)&&(l=p,a!==0&&a--),o=typeof l=="object"&&l!==null||typeof l=="function"?new PE(l):l}return u.s=wh,u.v=l,l}return i.clearCache=()=>{r=yu(),i.resetResultsCount()},i.resultsCount=()=>a,i.resetResultsCount=()=>{a=0},i}function Eh(e,...t){let r=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,n=(...o)=>{let a=0,i=0,s,c={},u=o.pop();typeof u=="object"&&(c=u,u=o.pop()),xE(u,`createSelector expects an output function after the inputs, but received: [${typeof u}]`);let l={...r,...c},{memoize:p,memoizeOptions:m=[],argsMemoize:d=ua,argsMemoizeOptions:f=[],devModeChecks:F={}}=l,S=Ph(m),g=Ph(f),C=AE(o),y=p(function(){return a++,u.apply(null,arguments)},...S),R=!0,E=d(function(){i++;let A=bE(C,arguments);return s=y.apply(null,A),s},...g);return Object.assign(E,{resultFunc:u,memoizedResultFunc:y,dependencies:C,dependencyRecomputations:()=>i,resetDependencyRecomputations:()=>{i=0},lastResult:()=>s,recomputations:()=>a,resetRecomputations:()=>{a=0},memoize:p,argsMemoize:d})};return Object.assign(n,{withTypes:()=>n}),n}var Y=Eh(ua),EE=Object.assign((e,t=Y)=>{FE(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),n=r.map(a=>e[a]);return t(n,(...a)=>a.reduce((i,s,c)=>(i[r[c]]=s,i),{}))},{withTypes:()=>EE});function Ih(e){return({dispatch:r,getState:n})=>o=>a=>typeof a=="function"?a(r,n,e):o(a)}var Th=Ih(),kh=Ih;var IE=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?ca:ca.apply(null,arguments)},v0=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}},TE=e=>e&&typeof e.match=="function";function h(e,t){function r(...n){if(t){let o=t(...n);if(!o)throw new Error(_t(0));return{type:e,payload:o.payload,..."meta"in o&&{meta:o.meta},..."error"in o&&{error:o.error}}}return{type:e,payload:n[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=n=>pu(n)&&n.type===e,r}var Nh=class _s extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,_s.prototype)}static get[Symbol.species](){return _s}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new _s(...t[0].concat(this)):new _s(...t.concat(this))}};function Oh(e){return at(e)?Hr(e,()=>{}):e}function Dh(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function kE(e){return typeof e=="boolean"}var OE=()=>function(t){let{thunk:r=!0,immutableCheck:n=!0,serializableCheck:o=!0,actionCreatorCheck:a=!0}=t??{},i=new Nh;return r&&(kE(r)?i.push(Th):i.push(kh(r.extraArgument))),i},$s="RTK_autoBatch",da=()=>e=>({payload:e,meta:{[$s]:!0}}),qh=e=>t=>{setTimeout(t,e)},DE=(e={type:"raf"})=>t=>(...r)=>{let n=t(...r),o=!0,a=!1,i=!1,s=new Set,c=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:qh(10):e.type==="callback"?e.queueNotification:qh(e.timeout),u=()=>{i=!1,a&&(a=!1,s.forEach(l=>l()))};return Object.assign({},n,{subscribe(l){let p=()=>o&&l(),m=n.subscribe(p);return s.add(l),()=>{m(),s.delete(l)}},dispatch(l){try{return o=!l?.meta?.[$s],a=!o,a&&(i||(i=!0,c(u))),n.dispatch(l)}finally{o=!0}}})},qE=e=>function(r){let{autoBatch:n=!0}=r??{},o=new Nh(e);return n&&o.push(DE(typeof n=="object"?n:void 0)),o};function Mh(e){let t=OE(),{reducer:r=void 0,middleware:n,devTools:o=!0,preloadedState:a=void 0,enhancers:i=void 0}=e||{},s;if(typeof r=="function")s=r;else if(or(r))s=sa(r);else throw new Error(_t(1));let c;typeof n=="function"?c=n(t):c=t();let u=ca;o&&(u=IE({trace:!1,...typeof o=="object"&&o}));let l=fh(...c),p=qE(l),m=typeof i=="function"?i(p):p(),d=u(...m);return Am(s,a,d)}function Qh(e){let t={},r=[],n,o={addCase(a,i){let s=typeof a=="string"?a:a.type;if(!s)throw new Error(_t(28));if(s in t)throw new Error(_t(29));return t[s]=i,o},addMatcher(a,i){return r.push({matcher:a,reducer:i}),o},addDefaultCase(a){return n=a,o}};return e(o),[t,r,n]}function VE(e){return typeof e=="function"}function _(e,t){let[r,n,o]=Qh(t),a;if(VE(e))a=()=>Oh(e());else{let s=Oh(e);a=()=>s}function i(s=a(),c){let u=[r[c.type],...n.filter(({matcher:l})=>l(c)).map(({reducer:l})=>l)];return u.filter(l=>!!l).length===0&&(u=[o]),u.reduce((l,p)=>{if(p)if(mt(l)){let d=p(l,c);return d===void 0?l:d}else{if(at(l))return Hr(l,m=>p(m,c));{let m=p(l,c);if(m===void 0){if(l===null)return l;throw Error("A case reducer on a non-draftable value must not return undefined")}return m}}return l},s)}return i.getInitialState=a,i}var Lh=(e,t)=>TE(e)?e.match(t):e(t);function ar(...e){return t=>e.some(r=>Lh(r,t))}function la(...e){return t=>e.every(r=>Lh(r,t))}function xu(e,t){if(!e||!e.meta)return!1;let r=typeof e.meta.requestId=="string",n=t.indexOf(e.meta.requestStatus)>-1;return r&&n}function Ws(e){return typeof e[0]=="function"&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function Fu(...e){return e.length===0?t=>xu(t,["pending"]):Ws(e)?ar(...e.map(t=>t.pending)):Fu()(e[0])}function Ao(...e){return e.length===0?t=>xu(t,["rejected"]):Ws(e)?ar(...e.map(t=>t.rejected)):Ao()(e[0])}function Hs(...e){let t=r=>r&&r.meta&&r.meta.rejectedWithValue;return e.length===0?la(Ao(...e),t):Ws(e)?la(Ao(...e),t):Hs()(e[0])}function zr(...e){return e.length===0?t=>xu(t,["fulfilled"]):Ws(e)?ar(...e.map(t=>t.fulfilled)):zr()(e[0])}function Ru(...e){return e.length===0?t=>xu(t,["pending","fulfilled","rejected"]):Ws(e)?ar(...e.flatMap(t=>[t.pending,t.rejected,t.fulfilled])):Ru()(e[0])}var NE="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Au=(e=21)=>{let t="",r=e;for(;r--;)t+=NE[Math.random()*64|0];return t},ME=["name","message","stack","code"],Mm=class{constructor(e,t){Ae(this,"_type");this.payload=e,this.meta=t}},Vh=class{constructor(e,t){Ae(this,"_type");this.payload=e,this.meta=t}},QE=e=>{if(typeof e=="object"&&e!==null){let t={};for(let r of ME)typeof e[r]=="string"&&(t[r]=e[r]);return t}return{message:String(e)}},H=(()=>{function e(t,r,n){let o=h(t+"/fulfilled",(c,u,l,p)=>({payload:c,meta:{...p||{},arg:l,requestId:u,requestStatus:"fulfilled"}})),a=h(t+"/pending",(c,u,l)=>({payload:void 0,meta:{...l||{},arg:u,requestId:c,requestStatus:"pending"}})),i=h(t+"/rejected",(c,u,l,p,m)=>({payload:p,error:(n&&n.serializeError||QE)(c||"Rejected"),meta:{...m||{},arg:l,requestId:u,rejectedWithValue:!!p,requestStatus:"rejected",aborted:c?.name==="AbortError",condition:c?.name==="ConditionError"}}));function s(c){return(u,l,p)=>{let m=n?.idGenerator?n.idGenerator(c):Au(),d=new AbortController,f,F;function S(C){F=C,d.abort()}let g=async function(){let C;try{let R=n?.condition?.(c,{getState:l,extra:p});if(BE(R)&&(R=await R),R===!1||d.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let E=new Promise((v,A)=>{f=()=>{A({name:"AbortError",message:F||"Aborted"})},d.signal.addEventListener("abort",f)});u(a(m,c,n?.getPendingMeta?.({requestId:m,arg:c},{getState:l,extra:p}))),C=await Promise.race([E,Promise.resolve(r(c,{dispatch:u,getState:l,extra:p,requestId:m,signal:d.signal,abort:S,rejectWithValue:(v,A)=>new Mm(v,A),fulfillWithValue:(v,A)=>new Vh(v,A)})).then(v=>{if(v instanceof Mm)throw v;return v instanceof Vh?o(v.payload,m,c,v.meta):o(v,m,c)})])}catch(R){C=R instanceof Mm?i(null,m,c,R.payload,R.meta):i(R,m,c)}finally{f&&d.signal.removeEventListener("abort",f)}return n&&!n.dispatchConditionRejection&&i.match(C)&&C.meta.condition||u(C),C}();return Object.assign(g,{abort:S,requestId:m,arg:c,unwrap(){return g.then(LE)}})}}return Object.assign(s,{pending:a,rejected:i,fulfilled:o,settled:ar(i,o),typePrefix:t})}return e.withTypes=()=>e,e})();function LE(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function BE(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var Bh=Symbol.for("rtk-slice-createasyncthunk"),T0={[Bh]:H};function UE(e,t){return`${e}/${t}`}function jE({creators:e}={}){let t=e?.asyncThunk?.[Bh];return function(n){let{name:o,reducerPath:a=o}=n;if(!o)throw new Error(_t(11));typeof process<"u";let i=(typeof n.reducers=="function"?n.reducers($E()):n.reducers)||{},s=Object.keys(i),c={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},u={addCase(C,y){let R=typeof C=="string"?C:C.type;if(!R)throw new Error(_t(12));if(R in c.sliceCaseReducersByType)throw new Error(_t(13));return c.sliceCaseReducersByType[R]=y,u},addMatcher(C,y){return c.sliceMatchers.push({matcher:C,reducer:y}),u},exposeAction(C,y){return c.actionCreators[C]=y,u},exposeCaseReducer(C,y){return c.sliceCaseReducersByName[C]=y,u}};s.forEach(C=>{let y=i[C],R={reducerName:C,type:UE(o,C),createNotation:typeof n.reducers=="function"};HE(y)?GE(R,y,u,t):WE(R,y,u)});function l(){let[C={},y=[],R=void 0]=typeof n.extraReducers=="function"?Qh(n.extraReducers):[n.extraReducers],E={...C,...c.sliceCaseReducersByType};return _(n.initialState,v=>{for(let A in E)v.addCase(A,E[A]);for(let A of c.sliceMatchers)v.addMatcher(A.matcher,A.reducer);for(let A of y)v.addMatcher(A.matcher,A.reducer);R&&v.addDefaultCase(R)})}let p=C=>C,m=new Map,d;function f(C,y){return d||(d=l()),d(C,y)}function F(){return d||(d=l()),d.getInitialState()}function S(C,y=!1){function R(v){let A=v[C];return typeof A>"u"&&y&&(A=F()),A}function E(v=p){let A=Dh(m,y,()=>new WeakMap);return Dh(A,v,()=>{let b={};for(let[P,T]of Object.entries(n.selectors??{}))b[P]=_E(T,v,F,y);return b})}return{reducerPath:C,getSelectors:E,get selectors(){return E(R)},selectSlice:R}}let g={name:o,reducer:f,actions:c.actionCreators,caseReducers:c.sliceCaseReducersByName,getInitialState:F,...S(a),injectInto(C,{reducerPath:y,...R}={}){let E=y??a;return C.inject({reducerPath:E,reducer:f},R),{...g,...S(E,!0)}}};return g}}function _E(e,t,r,n){function o(a,...i){let s=t(a);return typeof s>"u"&&n&&(s=r()),e(s,...i)}return o.unwrapped=e,o}var bo=jE();function $E(){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 WE({type:e,reducerName:t,createNotation:r},n,o){let a,i;if("reducer"in n){if(r&&!zE(n))throw new Error(_t(17));a=n.reducer,i=n.prepare}else a=n;o.addCase(e,a).exposeCaseReducer(t,a).exposeAction(t,i?h(e,i):h(e))}function HE(e){return e._reducerDefinitionType==="asyncThunk"}function zE(e){return e._reducerDefinitionType==="reducerWithPrepare"}function GE({type:e,reducerName:t},r,n,o){if(!o)throw new Error(_t(18));let{payloadCreator:a,fulfilled:i,pending:s,rejected:c,settled:u,options:l}=r,p=o(e,a,l);n.exposeAction(t,p),i&&n.addCase(p.fulfilled,i),s&&n.addCase(p.pending,s),c&&n.addCase(p.rejected,c),u&&n.addMatcher(p.settled,u),n.exposeCaseReducer(t,{fulfilled:i||Cu,pending:s||Cu,rejected:c||Cu,settled:u||Cu})}function Cu(){}var Uh="listener",jh="completed",_h="cancelled",k0=`task-${_h}`,O0=`task-${jh}`,D0=`${Uh}-${_h}`,q0=`${Uh}-${jh}`;var{assign:$h}=Object;var Qm="listenerMiddleware";var KE=$h(h(`${Qm}/add`),{withTypes:()=>KE}),V0=h(`${Qm}/removeAll`),YE=$h(h(`${Qm}/remove`),{withTypes:()=>YE});var N0=Symbol.for("rtk-state-proxy-original");function _t(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 Wh=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i;function JE(e){return typeof e=="string"&&Wh.test(e)}var Lm=JE;var _e=[];for(let e=0;e<256;++e)_e.push((e+256).toString(16).slice(1));function Hh(e,t=0){return(_e[e[t+0]]+_e[e[t+1]]+_e[e[t+2]]+_e[e[t+3]]+"-"+_e[e[t+4]]+_e[e[t+5]]+"-"+_e[e[t+6]]+_e[e[t+7]]+"-"+_e[e[t+8]]+_e[e[t+9]]+"-"+_e[e[t+10]]+_e[e[t+11]]+_e[e[t+12]]+_e[e[t+13]]+_e[e[t+14]]+_e[e[t+15]]).toLowerCase()}var Bm,XE=new Uint8Array(16);function Um(){if(!Bm){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Bm=crypto.getRandomValues.bind(crypto)}return Bm(XE)}var ZE=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),jm={randomUUID:ZE};function eI(e,t,r){if(jm.randomUUID&&!t&&!e)return jm.randomUUID();e=e||{};let n=e.random??e.rng?.()??Um();if(n.length<16)throw new Error("Random bytes length must be >= 16");if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,t){if(r=r||0,r<0||r+16>t.length)throw new RangeError(`UUID byte range ${r}:${r+15} is out of buffer bounds`);for(let o=0;o<16;++o)t[r+o]=n[o];return t}return Hh(n)}var _m=eI;function zh(){let e=typeof window<"u";return{sendMessage(t){e&&window.postMessage(t,"*")}}}function tI({config:e,environment:t,event:r,listenerManager:n}){let{url:o,token:a,mode:i}=e;i!=="disabled"&&(n.call(r),t.send(o,a,r))}function rI(e){return{getClientId:()=>{let t="visitorId",r=e.get(),n=r.storage,o=n.getItem(t),a=o&&Lm(o)?o:r.generateUUID();return n.setItem(t,a),a}}}var Kh="1.1.1";function nI(e){let{trackingId:t}=e;return{trackingId:t}}function oI(e){return(e.source||[]).concat([`relay@${Kh}`])}function Yh(e,t,r,n){let{getReferrer:o,getLocation:a,getUserAgent:i}=r,s=nI(t),c=n.getClientId();return Object.freeze({type:e,config:s,ts:Date.now(),source:oI(t),clientId:c,userAgent:i(),referrer:o(),location:a()})}function aI(e,t,r,n,o){return{...t,meta:Yh(e,r,n,o)}}var iI="*";function sI(){let e=[];function t({type:c,callback:u}){return e.findIndex(l=>l.type===c&&l.callback===u)}function r(c,u){return c.type==="*"||u===c.type}function n(c){return t(c)<0&&e.push(c),()=>s(c.type,c.callback)}function o(c){e.forEach(u=>{if(r(u,c.meta.type))try{u.callback(c)}catch(l){console.error(l)}})}function a(c){if(c===iI)e.length=0;else for(let u=e.length-1;u>=0;u--)e[u].type===c&&e.splice(u,1)}function i(c){let u=t(c);u>=0&&e.splice(u,1)}function s(c,u){u?i({type:c,callback:u}):a(c)}return{add:n,call:o,remove:s}}function Gh({url:e,token:t,trackingId:r,...n}){return Object.freeze({url:e,token:t,trackingId:r,...!!n.mode&&{mode:n.mode},...!!n.source&&{source:n.source},...!!n.environment&&{environment:n.environment}})}function cI(e){let t=Gh(e);return{get:()=>t,update:r=>{t=Gh({...t,...r})}}}var $m=uI();function uI(){let e="coveo_",t=r=>{let n=r.split(".").slice(-2);return n.length==2?n.join("."):""};return{getItem(r){let n=`${e}${r}=`,o=document.cookie.split(";");for(let a of o){let i=a.replace(/^\s+/,"");if(i.lastIndexOf(n,0)===0)return i.substring(n.length,i.length)}return null},setItem(r,n,o){let a=t(window.location.hostname),i=`;expires=${new Date(new Date().getTime()+o).toUTCString()}`,s=a?`;domain=${a}`:"";document.cookie=`${e}${r}=${n}${i}${s};path=/;SameSite=Lax`},removeItem(r){this.setItem(r,"",-1)}}}function lI(){return{getItem(e){return $m.getItem(e)||localStorage.getItem(e)},removeItem(e){$m.removeItem(e),localStorage.removeItem(e)},setItem(e,t){localStorage.setItem(e,t),$m.setItem(e,t,31556952e3)}}}function dI(){let e=document.referrer;return e===""?null:e}function pI(){return{runtime:"browser",send:(e,t,r)=>{let n=navigator.sendBeacon(`${e}?access_token=${t}`,new Blob([JSON.stringify([r])],{type:"application/json"}));if(zh().sendMessage({kind:"EVENT_PROTOCOL",event:r,url:e,token:t}),!n)throw new Error("Failed to send the event(s) because the payload size exceeded the maximum allowed size (32 KB). Please contact support if the problem persists.")},getReferrer:()=>dI(),getLocation:()=>window.location.href,getUserAgent:()=>navigator.userAgent,generateUUID:()=>_m(),storage:lI()}}function mI(){try{let e="__storage_test__";return localStorage.setItem(e,e),localStorage.removeItem(e),!0}catch(e){return e instanceof DOMException&&e.name==="QuotaExceededError"&&localStorage&&localStorage.length!==0}}function fI(){return{getItem(){return null},removeItem(){},setItem(){}}}function gI(){return{runtime:"null",send:()=>{},getReferrer:()=>null,getLocation:()=>null,getUserAgent:()=>null,generateUUID:()=>"",storage:fI()}}function SI(e){let t=e.get().mode!=="disabled",r=e.get().environment;return t&&r?{...r,runtime:"custom"}:t&&hI()&&mI()?pI():gI()}function hI(){try{return typeof window=="object"}catch{return!1}}function yI(e){return{get:()=>Object.freeze(SI(e))}}function Jh(e){let t=cI(e),r=sI(),n=yI(t),o=rI(n);return{emit:(a,i)=>{let s=t.get(),c=n.get(),u=aI(a,i,s,c,o);return tI({config:s,environment:c,event:u,listenerManager:r})},getMeta:a=>Yh(a,t.get(),n.get(),o),on:(a,i)=>r.add({type:a,callback:i}),off:(a,i)=>r.remove(a,i),updateConfig:a=>t.update(a),version:Kh}}var hn="3.23.2-pre.d35ebef42a",Xh=["@coveo/atomic","@coveo/quantic"];var yn=Y(e=>e.source,e=>Object.entries(e).map(([t,r])=>`${t}@${r}`).concat(`@coveo/headless@${hn}`));var pa=Y(e=>e.configuration.organizationId,e=>e.configuration.environment,e=>e.configuration.accessToken,e=>e.configuration.analytics,e=>yn(e.configuration.analytics),(e,t,r,{trackingId:n,apiBaseUrl:o,enabled:a},i)=>Jh({mode:a?"emit":"disabled",url:o??iu(e,t),token:r,trackingId:n,source:i}));function Gr(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function w(e,t,r,n){function o(a){return a instanceof r?a:new r(function(i){i(a)})}return new(r||(r=Promise))(function(a,i){function s(l){try{u(n.next(l))}catch(p){i(p)}}function c(l){try{u(n.throw(l))}catch(p){i(p)}}function u(l){l.done?a(l.value):o(l.value).then(s,c)}u((n=n.apply(e,t||[])).next())})}var ne;(function(e){e.search="search",e.click="click",e.custom="custom",e.view="view",e.collect="collect"})(ne||(ne={}));function zm(){return typeof window<"u"}function sf(){return typeof navigator<"u"}function ma(){return typeof document<"u"}function Gm(){try{return typeof localStorage<"u"}catch{return!1}}function CI(){try{return typeof sessionStorage<"u"}catch{return!1}}function py(){return sf()&&navigator.cookieEnabled}var xI=[ne.click,ne.custom,ne.search,ne.view],FI=(e,t)=>xI.indexOf(e)!==-1?Object.assign({language:ma()?document.documentElement.lang:"unknown",userAgent:sf()?navigator.userAgent:"unknown"},t):t,Ks=class e{static set(t,r,n){var o,a,i,s;n&&(a=new Date,a.setTime(a.getTime()+n)),s=window.location.hostname,s.indexOf(".")===-1?Zh(t,r,a):(i=s.split("."),o=i[i.length-2]+"."+i[i.length-1],Zh(t,r,a,o))}static get(t){for(var r=t+"=",n=document.cookie.split(";"),o=0;o<n.length;o++){var a=n[o];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 Zh(e,t,r,n){document.cookie=`${e}=${t}`+(r?`;expires=${r.toUTCString()}`:"")+(n?`;domain=${n}`:"")+";path=/;SameSite=Lax"}function RI(){return Gm()?localStorage:py()?new Ys:CI()?sessionStorage:new ga}var Ys=class e{getItem(t){return Ks.get(`${e.prefix}${t}`)}removeItem(t){Ks.erase(`${e.prefix}${t}`)}setItem(t,r,n){Ks.set(`${e.prefix}${t}`,r,n)}};Ys.prefix="coveo_";var Km=class{constructor(){this.cookieStorage=new Ys}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)}},ga=class{getItem(t){return null}removeItem(t){}setItem(t,r){}},zs="__coveo.analytics.history",my=20,fy=1e3*60,gy=75,Sa=class{constructor(t){this.store=t||RI()}addElement(t){t.internalTime=new Date().getTime(),t=this.cropQueryElement(this.stripEmptyQuery(t));let r=this.getHistoryWithInternalTime();r!=null?this.isValidEntry(t)&&this.setHistory([t].concat(r)):this.setHistory([t])}addElementAsync(t){return w(this,void 0,void 0,function*(){t.internalTime=new Date().getTime(),t=this.cropQueryElement(this.stripEmptyQuery(t));let r=yield this.getHistoryWithInternalTimeAsync();r!=null?this.isValidEntry(t)&&this.setHistory([t].concat(r)):this.setHistory([t])})}getHistory(){let t=this.getHistoryWithInternalTime();return this.stripEmptyQueries(this.stripInternalTime(t))}getHistoryAsync(){return w(this,void 0,void 0,function*(){let t=yield this.getHistoryWithInternalTimeAsync();return this.stripEmptyQueries(this.stripInternalTime(t))})}getHistoryWithInternalTime(){try{let t=this.store.getItem(zs);return t&&typeof t=="string"?JSON.parse(t):[]}catch{return[]}}getHistoryWithInternalTimeAsync(){return w(this,void 0,void 0,function*(){try{let t=yield this.store.getItem(zs);return t?JSON.parse(t):[]}catch{return[]}})}setHistory(t){try{this.store.setItem(zs,JSON.stringify(t.slice(0,my)))}catch{}}clear(){try{this.store.removeItem(zs)}catch{}}getMostRecentElement(){let t=this.getHistoryWithInternalTime();return Array.isArray(t)?t.sort((n,o)=>(o.internalTime||0)-(n.internalTime||0))[0]:null}cropQueryElement(t){return t.name&&t.value&&t.name.toLowerCase()==="query"&&(t.value=t.value.slice(0,gy)),t}isValidEntry(t){let r=this.getMostRecentElement();return r&&r.value==t.value?(t.internalTime||0)-(r.internalTime||0)>fy:!0}stripInternalTime(t){return Array.isArray(t)?t.map(r=>{let{name:n,time:o,value:a}=r;return{name:n,time:o,value:a}}):[]}stripEmptyQuery(t){let{name:r,time:n,value:o}=t;return r&&typeof o=="string"&&r.toLowerCase()==="query"&&o.trim()===""?{name:r,time:n}:t}stripEmptyQueries(t){return t.map(r=>this.stripEmptyQuery(r))}},Sy=Object.freeze({__proto__:null,HistoryStore:Sa,MAX_NUMBER_OF_HISTORY_ELEMENTS:my,MAX_VALUE_SIZE:gy,MIN_THRESHOLD_FOR_DUPLICATE_VALUE:fy,STORE_KEY:zs,default:Sa}),AI=(e,t)=>w(void 0,void 0,void 0,function*(){return e===ne.view?(yield bI(t.contentIdValue),Object.assign({location:window.location.toString(),referrer:document.referrer,title:document.title},t)):t}),bI=e=>w(void 0,void 0,void 0,function*(){let t=new Sa,r={name:"PageView",value:e,time:new Date().toISOString()};yield t.addElementAsync(r)}),bu,vI=new Uint8Array(16);function PI(){if(!bu&&(bu=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!bu))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return bu(vI)}var wI=/^(?:[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 Pu(e){return typeof e=="string"&&wI.test(e)}var $e=[];for(let e=0;e<256;++e)$e.push((e+256).toString(16).slice(1));function hy(e,t=0){return($e[e[t+0]]+$e[e[t+1]]+$e[e[t+2]]+$e[e[t+3]]+"-"+$e[e[t+4]]+$e[e[t+5]]+"-"+$e[e[t+6]]+$e[e[t+7]]+"-"+$e[e[t+8]]+$e[e[t+9]]+"-"+$e[e[t+10]]+$e[e[t+11]]+$e[e[t+12]]+$e[e[t+13]]+$e[e[t+14]]+$e[e[t+15]]).toLowerCase()}function EI(e){if(!Pu(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 II(e){e=unescape(encodeURIComponent(e));let t=[];for(let r=0;r<e.length;++r)t.push(e.charCodeAt(r));return t}var TI="6ba7b810-9dad-11d1-80b4-00c04fd430c8",kI="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function OI(e,t,r){function n(o,a,i,s){var c;if(typeof o=="string"&&(o=II(o)),typeof a=="string"&&(a=EI(a)),((c=a)===null||c===void 0?void 0:c.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let u=new Uint8Array(16+o.length);if(u.set(a),u.set(o,a.length),u=r(u),u[6]=u[6]&15|t,u[8]=u[8]&63|128,i){s=s||0;for(let l=0;l<16;++l)i[s+l]=u[l];return i}return hy(u)}try{n.name=e}catch{}return n.DNS=TI,n.URL=kI,n}var DI=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),ey={randomUUID:DI};function vo(e,t,r){if(ey.randomUUID&&!t&&!e)return ey.randomUUID();e=e||{};let n=e.random||(e.rng||PI)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,t){r=r||0;for(let o=0;o<16;++o)t[r+o]=n[o];return t}return hy(n)}function qI(e,t,r,n){switch(e){case 0:return t&r^~t&n;case 1:return t^r^n;case 2:return t&r^t&n^r&n;case 3:return t^r^n}}function Wm(e,t){return e<<t|e>>>32-t}function VI(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 n=e.length/4+2,o=Math.ceil(n/16),a=new Array(o);for(let i=0;i<o;++i){let s=new Uint32Array(16);for(let c=0;c<16;++c)s[c]=e[i*64+c*4]<<24|e[i*64+c*4+1]<<16|e[i*64+c*4+2]<<8|e[i*64+c*4+3];a[i]=s}a[o-1][14]=(e.length-1)*8/Math.pow(2,32),a[o-1][14]=Math.floor(a[o-1][14]),a[o-1][15]=(e.length-1)*8&4294967295;for(let i=0;i<o;++i){let s=new Uint32Array(80);for(let d=0;d<16;++d)s[d]=a[i][d];for(let d=16;d<80;++d)s[d]=Wm(s[d-3]^s[d-8]^s[d-14]^s[d-16],1);let c=r[0],u=r[1],l=r[2],p=r[3],m=r[4];for(let d=0;d<80;++d){let f=Math.floor(d/20),F=Wm(c,5)+qI(f,u,l,p)+m+t[f]+s[d]>>>0;m=p,p=l,l=Wm(u,30)>>>0,u=c,c=F}r[0]=r[0]+c>>>0,r[1]=r[1]+u>>>0,r[2]=r[2]+l>>>0,r[3]=r[3]+p>>>0,r[4]=r[4]+m>>>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 NI=OI("v5",80,VI),ty=NI,yy="2.30.45",ry=e=>`${e.protocol}//${e.hostname}${e.pathname.indexOf("/")===0?e.pathname:`/${e.pathname}`}${e.search}`,Gs={pageview:"pageview",event:"event"},wu=class{constructor({client:t,uuidGenerator:r=vo}){this.client=t,this.uuidGenerator=r}},Ym=class extends wu{constructor({client:t,uuidGenerator:r=vo}){super({client:t,uuidGenerator:r}),this.actionData={},this.pageViewId=r(),this.nextPageViewId=this.pageViewId,this.currentLocation=ry(window.location),this.lastReferrer=ma()?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:ma()?document.title:"",encoding:ma()?document.characterSet:"UTF-8"},n={screenResolution:`${screen.width}x${screen.height}`,screenColor:`${screen.colorDepth}-bit`},o={language:navigator.language,userAgent:navigator.userAgent},a={time:Date.now(),eventId:this.uuidGenerator()};return Object.assign(Object.assign(Object.assign(Object.assign({},a),n),o),r)}updateLocationForNextPageView(t,r){let{pageViewId:n,referrer:o,location:a}=this.getNextValues(t,r);this.lastReferrer=o,this.pageViewId=n,this.currentLocation=a,t===Gs.pageview&&(this.nextPageViewId=this.uuidGenerator(),this.hasSentFirstPageView=!0)}getNextValues(t,r){return{pageViewId:t===Gs.pageview?this.nextPageViewId:this.pageViewId,referrer:t===Gs.pageview&&this.hasSentFirstPageView?this.currentLocation:this.lastReferrer,location:t===Gs.pageview?this.getCurrentLocationFromPayload(r):this.currentLocation}}getCurrentLocationFromPayload(t){if(t.page){let r=o=>o.replace(/^\/?(.*)$/,"/$1");return`${(o=>o.split("/").slice(0,3).join("/"))(this.currentLocation)}${r(t.page)}`}else return ry(window.location)}},Cn=class e{constructor(t,r){if(!Pu(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 n=new URL(t);return r.some(o=>new RegExp(o.replace(/\\/g,"\\\\").replace(/\./g,"\\.").replace(/\*/g,".*")+"$").test(n.host))}catch{return!1}}static fromString(t){let r=t.split(".");if(r.length!==2)return null;let[n,o]=r;if(n.length!==32||isNaN(parseInt(o)))return null;let a=n.substring(0,8)+"-"+n.substring(8,12)+"-"+n.substring(12,16)+"-"+n.substring(16,20)+"-"+n.substring(20,32);return Pu(a)?new e(a,Number.parseInt(o)*1e3):null}};Cn.cvo_cid="cvo_cid";Cn.expirationTime=120;var Jm=class extends wu{constructor({client:t,uuidGenerator:r=vo}){super({client:t,uuidGenerator:r})}getApi(t){switch(t){case"decorate":return this.decorate;case"acceptFrom":return this.acceptFrom;default:return null}}decorate(t){return w(this,void 0,void 0,function*(){if(!this.client.getCurrentVisitorId)throw new Error("Could not retrieve current clientId");try{let r=new URL(t),n=yield this.client.getCurrentVisitorId();return r.searchParams.set(Cn.cvo_cid,new Cn(n,Date.now()).toString()),r.toString()}catch{throw new Error("Invalid URL provided")}})}acceptFrom(t){this.client.setAcceptedLinkReferrers(t)}};Jm.Id="link";var bt=Object.keys;function vu(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}var Hm=128,Cy=192,ny=224,oy=240;function MI(e){return(e&248)===oy?4:(e&oy)===ny?3:(e&ny)===Cy?2:1}function QI(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 n=Number.parseInt(e.substring(r-2,r),16);if((n&Hm)!=Hm)break;if(r-=3,(n&Cy)!=Hm){t-r>=MI(n)*3&&(r=t);break}}return e.substring(0,r)}var Xm={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"},LI=bt(Xm).map(e=>Xm[e]),BI=[...LI].join("|"),UI=new RegExp(`^(${BI}$)`),jI={svcAction:"svc_action",svcActionData:"svc_action_data"},_I=e=>bt(e).filter(t=>e[t]!==void 0).reduce((t,r)=>{let n=Xm[r]||r;return Object.assign(Object.assign({},t),{[n]:e[r]})},{}),$I=e=>UI.test(e),WI=[$I],ay={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",price:"pr",quantity:"qt",coupon:"cc",position:"ps",group:"group"},iy={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",position:"ps",price:"pr",group:"group"},He={action:"pa",list:"pal",listSource:"pls"},Eu={id:"ti",revenue:"tr",tax:"tt",shipping:"ts",coupon:"tcc",affiliation:"ta",step:"cos",option:"col"},HI=["loyaltyCardId","loyaltyTier","thirdPartyPersona","companyName","favoriteStore","storeName","userIndustry","userRole","userDepartment","businessUnit"],Zm={id:"quoteId",affiliation:"quoteAffiliation"},ef={id:"reviewId",rating:"reviewRating",comment:"reviewComment"},zI={add:He,bookmark_add:He,bookmark_remove:He,click:He,checkout:He,checkout_option:He,detail:He,impression:He,remove:He,refund:Object.assign(Object.assign({},He),Eu),purchase:Object.assign(Object.assign({},He),Eu),quickview:He,quote:Object.assign(Object.assign({},He),Zm),review:Object.assign(Object.assign({},He),ef)},GI=bt(ay).map(e=>ay[e]),KI=bt(iy).map(e=>iy[e]),YI=bt(He).map(e=>He[e]),JI=bt(Eu).map(e=>Eu[e]),XI=bt(ef).map(e=>ef[e]),ZI=bt(Zm).map(e=>Zm[e]),eT=[...GI,"custom"].join("|"),tT=[...KI,"custom"].join("|"),xy="(pr[0-9]+)",Fy="(il[0-9]+pi[0-9]+)",rT=new RegExp(`^${xy}(${eT})$`),nT=new RegExp(`^(${Fy}(${tT}))|(il[0-9]+nm)$`),oT=new RegExp(`^(${YI.join("|")})$`),aT=new RegExp(`^(${JI.join("|")})$`),iT=new RegExp(`^${xy}custom$`),sT=new RegExp(`^${Fy}custom$`),cT=new RegExp(`^(${[...HI,...XI,...ZI].join("|")})$`),uT=e=>rT.test(e),lT=e=>nT.test(e),dT=e=>oT.test(e),pT=e=>aT.test(e),mT=e=>cT.test(e),fT=[lT,uT,dT,pT,mT],gT=[iT,sT],ST={anonymizeIp:"aip"},hT={eventCategory:"ec",eventAction:"ea",eventLabel:"el",eventValue:"ev",page:"dp",visitorId:"cid",clientId:"cid",userId:"uid",currencyCode:"cu"},yT={hitType:"t",pageViewId:"pid",encoding:"de",location:"dl",referrer:"dr",screenColor:"sd",screenResolution:"sr",title:"dt",userAgent:"ua",language:"ul",eventId:"z",time:"tm"},CT=["contentId","contentIdKey","contentType","searchHub","tab","searchUid","permanentId","contentLocale","trackingId"],xT=Object.assign(Object.assign(Object.assign(Object.assign({},ST),hT),yT),CT.reduce((e,t)=>Object.assign(Object.assign({},e),{[t]:t}),{})),tf=Object.assign(Object.assign({},xT),jI),FT=e=>{let t=!!e.action&&zI[e.action]||{};return bt(e).reduce((r,n)=>{let o=t[n]||tf[n]||n;return Object.assign(Object.assign({},r),{[o]:e[n]})},{})},RT=bt(tf).map(e=>tf[e]),AT=e=>RT.indexOf(e)!==-1,bT=e=>e==="custom",vT=e=>[...fT,...WI,AT,bT].some(t=>t(e)),PT=e=>bt(e).reduce((t,r)=>{let n=wT(r);return n?Object.assign(Object.assign({},t),ET(n,e[r])):Object.assign(Object.assign({},t),{[r]:e[r]})},{}),wT=e=>{let t;return[...gT].every(r=>{var n;return t=(n=r.exec(e))===null||n===void 0?void 0:n[1],!t}),t},ET=(e,t)=>bt(t).reduce((r,n)=>Object.assign(Object.assign({},r),{[`${e}${n}`]:t[n]}),{}),rf=class{constructor(t){this.opts=t}sendEvent(t,r){return w(this,void 0,void 0,function*(){if(!this.isAvailable())throw new Error('navigator.sendBeacon is not supported in this browser. Consider adding a polyfill like "sendbeacon-polyfill".');let{baseUrl:n,preprocessRequest:o}=this.opts,a=yield this.getQueryParamsForEventType(t),{url:i,payload:s}=yield this.preProcessRequestAsPotentialJSONString(`${n}/analytics/${t}?${a}`,r,o),c=this.encodeForEventType(t,s),u=new Blob([c],{type:"application/x-www-form-urlencoded"});navigator.sendBeacon(i,u)})}isAvailable(){return"sendBeacon"in navigator}deleteHttpCookieVisitorId(){return Promise.resolve()}preProcessRequestAsPotentialJSONString(t,r,n){return w(this,void 0,void 0,function*(){let o=t,a=r;if(n){let i=yield n({url:t,body:JSON.stringify(r)},"analyticsBeacon"),{url:s,body:c}=i;o=s||t;try{a=JSON.parse(c)}catch(u){console.error("Unable to process the request body as a JSON string",u)}}return{payload:a,url:o}})}encodeForEventType(t,r){return this.isEventTypeLegacy(t)?this.encodeEventToJson(t,r):this.encodeEventToJson(t,r,this.opts.token)}getQueryParamsForEventType(t){return w(this,void 0,void 0,function*(){let{token:r,visitorIdProvider:n}=this.opts,o=yield n.getCurrentVisitorId();return[r&&this.isEventTypeLegacy(t)?`access_token=${r}`:"",o?`visitorId=${o}`:"","discardVisitInfo=true"].filter(a=>!!a).join("&")})}isEventTypeLegacy(t){return[ne.click,ne.custom,ne.search,ne.view].indexOf(t)!==-1}encodeEventToJson(t,r,n){let o=`${t}Event=${encodeURIComponent(JSON.stringify(r))}`;return n&&(o=`access_token=${encodeURIComponent(n)}&${o}`),o}},nf=class{sendEvent(t,r){return w(this,void 0,void 0,function*(){return Promise.resolve()})}deleteHttpCookieVisitorId(){return w(this,void 0,void 0,function*(){return Promise.resolve()})}},sy=globalThis.fetch,Iu=class{constructor(t){this.opts=t}sendEvent(t,r){return w(this,void 0,void 0,function*(){let{baseUrl:n,visitorIdProvider:o,preprocessRequest:a}=this.opts,i=this.shouldAppendVisitorId(t)?yield this.getVisitorIdParam():"",s={url:`${n}/analytics/${t}${i}`,credentials:"include",mode:"cors",headers:this.getHeaders(),method:"POST",body:JSON.stringify(r)},c=Object.assign(Object.assign({},s),a?yield a(s,"analyticsFetch"):{}),{url:u}=c,l=Gr(c,["url"]),p;try{p=yield sy(u,l)}catch(m){console.error("An error has occured when sending the event.",m);return}if(p.ok){let m=yield p.json();return m.visitorId&&o.setCurrentVisitorId(m.visitorId),m}else{try{p.json()}catch{}throw console.error(`An error has occured when sending the "${t}" event.`,p,r),new Error(`An error has occurred when sending the "${t}" event. Check the console logs for more details.`)}})}deleteHttpCookieVisitorId(){return w(this,void 0,void 0,function*(){let{baseUrl:t}=this.opts,r=`${t}/analytics/visit`;yield sy(r,{headers:this.getHeaders(),method:"DELETE"})})}shouldAppendVisitorId(t){return[ne.click,ne.custom,ne.search,ne.view].indexOf(t)!==-1}getVisitorIdParam(){return w(this,void 0,void 0,function*(){let{visitorIdProvider:t}=this.opts,r=yield t.getCurrentVisitorId();return r?`?visitor=${r}`:""})}getHeaders(){let{token:t}=this.opts;return Object.assign(Object.assign({},t?{Authorization:`Bearer ${t}`}:{}),{"Content-Type":"application/json"})}},of=class{constructor(t,r){Gm()&&py()?this.storage=new Km:Gm()?this.storage=localStorage:(console.warn("BrowserRuntime detected no valid storage available.",this),this.storage=new ga),this.client=new Iu(t),this.beaconClient=new rf(t),window.addEventListener("beforeunload",()=>{let n=r();for(let{eventType:o,payload:a}of n)this.beaconClient.sendEvent(o,a)})}getClientDependingOnEventType(t){return t==="click"&&this.beaconClient.isAvailable()?this.beaconClient:this.client}},af=class{constructor(t,r){this.storage=r||new ga,this.client=new Iu(t)}getClientDependingOnEventType(t){return this.client}},Tu=class{constructor(){this.storage=new ga,this.client=new nf}getClientDependingOnEventType(t){return this.client}},IT="xx",TT=e=>e?.startsWith(IT)||!1,kT=`
|
|
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
|