PageSourceSearch

https://www.london.edu/_next/static/chunks/4ee8fff6.4bf8ebc1bf2e5212.js

js london.edu collected 2026-10-01 08:31:50 UTC 202,911 bytes, 14 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[91973],{66152:(e,t,r)=>{let n,i,a;r.r(t),r.d(t,{atomic_frequently_bought_together:()=>oh});var o,s,u,c,l,d,h,p,f,g,m,y=r(28512),v=Object.create,b=Object.defineProperty,w=Object.getOwnPropertyDescriptor,S=Object.getOwnPropertyNames,k=Object.getPrototypeOf,I=Object.prototype.hasOwnProperty,C=r(68273),A=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),O=(e,t,r)=>(r=null!=e?v(k(e)):{},((e,t,r,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let i of S(t))I.call(e,i)||i===r||b(e,i,{get:()=>t[i],enumerable:!(n=w(t,i))||n.enumerable});return e})(!t&&e&&e.__esModule?r:b(r,"default",{value:e,enumerable:!0}),e)),E=(e,t,r)=>{let n;return(n="symbol"!=typeof t?t+"":t)in e?b(e,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[n]=r},D=A((e,t)=>{t.exports=fetch}),R=A(e=>{var t=e&&e.__assign||function(){return(t=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0});var r={delayFirstAttempt:!1,jitter:"none",maxDelay:1/0,numOfAttempts:10,retry:function(){return!0},startingDelay:100,timeMultiple:2};e.getSanitizedOptions=function(e){var n=t(t({},r),e);return n.numOfAttempts<1&&(n.numOfAttempts=1),n}}),x=A(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.fullJitter=function(e){return Math.round(Math.random()*e)}}),T=A(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.noJitter=function(e){return e}}),_=A(e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=x(),r=T();e.JitterFactory=function(e){return"full"===e.jitter?t.fullJitter:r.noJitter}}),q=A(e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=_();e.Delay=function(){function e(e){this.options=e,this.attempt=0}return e.prototype.apply=function(){var e=this;return new Promise(function(t){return setTimeout(t,e.jitteredDelay)})},e.prototype.setAttemptNumber=function(e){this.attempt=e},Object.defineProperty(e.prototype,"jitteredDelay",{get:function(){return t.JitterFactory(this.options)(this.delay)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"delay",{get:function(){return Math.min(this.options.startingDelay*Math.pow(this.options.timeMultiple,this.numOfDelayedAttempts),this.options.maxDelay)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"numOfDelayedAttempts",{get:function(){return this.attempt},enumerable:!0,configurable:!0}),e}()}),U=A(e=>{var t,r=e&&e.__extends||(t=function(e,r){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,r)},function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}),n=e&&e.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(i,a){function o(e){try{u(n.next(e))}catch(e){a(e)}}function s(e){try{u(n.throw(e))}catch(e){a(e)}}function u(e){var t;e.done?i(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(o,s)}u((n=n.apply(e,t||[])).next())})},i=e&&e.__generator||function(e,t){var r,n,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){var u=[a,s];if(r)throw TypeError("Generator is already executing.");for(;o;)try{if(r=1,n&&(i=2&u[0]?n.return:u[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,u[1])).done)return i;switch(n=0,i&&(u=[2&u[0],i.value]),u[0]){case 0:case 1:i=u;break;case 4:return o.label++,{value:u[1],done:!1};case 5:o.label++,n=u[1],u=[0];continue;case 7:u=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===u[0]||2===u[0])){o=0;continue}if(3===u[0]&&(!i||u[1]>i[0]&&u[1]<i[3])){o.label=u[1];break}if(6===u[0]&&o.label<i[1]){o.label=i[1],i=u;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(u);break}i[2]&&o.ops.pop(),o.trys.pop();continue}u=t.call(e,o)}catch(e){u=[6,e],n=0}finally{r=i=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}};
1Object.defineProperty(e,"__esModule",{value:!0}),e.SkipFirstDelay=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.apply=function(){return n(this,void 0,void 0,function(){return i(this,function(t){return[2,!!this.isFirstAttempt||e.prototype.apply.call(this)]})})},Object.defineProperty(t.prototype,"isFirstAttempt",{get:function(){return 0===this.attempt},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"numOfDelayedAttempts",{get:function(){return this.attempt-1},enumerable:!0,configurable:!0}),t}(q().Delay)}),j=A(e=>{var t,r=e&&e.__extends||(t=function(e,r){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,r)},function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.AlwaysDelay=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t}(q().Delay)}),M=A(e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=U(),r=j();e.DelayFactory=function(e,n){var i,a=(i=e).delayFirstAttempt?new r.AlwaysDelay(i):new t.SkipFirstDelay(i);return a.setAttemptNumber(n),a}}),P=A(e=>{var t=e&&e.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(i,a){function o(e){try{u(n.next(e))}catch(e){a(e)}}function s(e){try{u(n.throw(e))}catch(e){a(e)}}function u(e){var t;e.done?i(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(o,s)}u((n=n.apply(e,t||[])).next())})},r=e&&e.__generator||function(e,t){var r,n,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){var u=[a,s];if(r)throw TypeError("Generator is already executing.");for(;o;)try{if(r=1,n&&(i=2&u[0]?n.return:u[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,u[1])).done)return i;switch(n=0,i&&(u=[2&u[0],i.value]),u[0]){case 0:case 1:i=u;break;case 4:return o.label++,{value:u[1],done:!1};case 5:o.label++,n=u[1],u=[0];continue;case 7:u=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===u[0]||2===u[0])){o=0;continue}if(3===u[0]&&(!i||u[1]>i[0]&&u[1]<i[3])){o.label=u[1];break}if(6===u[0]&&o.label<i[1]){o.label=i[1],i=u;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(u);break}i[2]&&o.ops.pop(),o.trys.pop();continue}u=t.call(e,o)}catch(e){u=[6,e],n=0}finally{r=i=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}};Object.defineProperty(e,"__esModule",{value:!0});var n=R(),i=M();e.backOff=function(e,i){return void 0===i&&(i={}),t(this,void 0,void 0,function(){return r(this,function(t){switch(t.label){case 0:return[4,new a(e,n.getSanitizedOptions(i)).execute()];case 1:return[2,t.sent()]}})})};var a=function(){function e(e,t){this.request=e,this.options=t,this.attemptNumber=0}return e.prototype.execute=function(){return t(this,void 0,void 0,function(){var e;return r(this,function(t){switch(t.label){case 0:if(this.attemptLimitReached)return[3,7];t.label=1;case 1:return t.trys.push([1,4,,6]),[4,this.applyDelay()];case 2:return t.sent(),[4,this.request()];case 3:return[2,t.sent()];case 4:return e=t.sent(),this.attemptNumber++,[4,this.options.retry(e,this.attemptNumber)];case 5:if(!t.sent()||this.attemptLimitReached)throw e;return[3,6];case 6:return[3,0];case 7:throw 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 t(this,void 0,void 0,function(){return r(this,function(e){switch(e.label){case 0:return[4,i.DelayFactory(this.options,this.attemptNumber).apply()];case 1:return e.sent(),[2]}})})},e}()}),$=A((e,t)=>{t.exports=function(e){if(0==arguments.length)throw TypeError("1 argument required, but only 0 present.");if((e=(e=`${e}`).replace(/[ \t\n\f\r]/g,"")).length%4==0&&(e=e.replace(/==?$/,"")),e.length%4==1||/[^+/0-9A-Za-z]/.test(e))return null;let t="",r=0,n=0;for(let i=0;i<e.length;i++)r<<=6,r|=function(e){let t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
1+/".indexOf(e);return t<0?void 0:t}(e[i]),24===(n+=6)&&(t+=String.fromCharCode((0xff0000&r)>>16),t+=String.fromCharCode((65280&r)>>8),t+=String.fromCharCode(255&r),r=n=0);return 12===n?(r>>=4,t+=String.fromCharCode(r)):18===n&&(r>>=2,t+=String.fromCharCode((65280&r)>>8),t+=String.fromCharCode(255&r)),t}}),F=A((e,t)=>{t.exports=function(e){let t;if(0==arguments.length)throw TypeError("1 argument required, but only 0 present.");for(e=`${e}`,t=0;t<e.length;t++)if(e.charCodeAt(t)>255)return null;let r="";for(t=0;t<e.length;t+=3){let n=[void 0,void 0,void 0,void 0];n[0]=e.charCodeAt(t)>>2,n[1]=(3&e.charCodeAt(t))<<4,e.length>t+1&&(n[1]|=e.charCodeAt(t+1)>>4,n[2]=(15&e.charCodeAt(t+1))<<2),e.length>t+2&&(n[2]|=e.charCodeAt(t+2)>>6,n[3]=63&e.charCodeAt(t+2));for(let e=0;e<n.length;e++)typeof n[e]>"u"?r+="=":r+=function(e){if(e>=0&&e<64)return"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[e]}(n[e])}return r}}),L=A((e,t)=>{t.exports={atob:$(),btoa:F()}}),N=A((e,t)=>{var r="u">typeof self?self:"u">typeof window?window:void 0;if(!r)throw Error("Unable to find global scope. Are you sure this is running in the browser?");if(!r.AbortController)throw Error('Could not find "AbortController" in the global scope. You need to polyfill it first');t.exports.AbortController=r.AbortController}),z=A((e,t)=>{var n,i;n=e,i=function(){var e="millisecond",t="second",r="minute",n="hour",i="week",a="month",o="quarter",s="year",u="date",c="Invalid Date",l=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,d=/\[([^\]]+)]|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,h=function(e,t,r){var n=String(e);return!n||n.length>=t?e:""+Array(t+1-n.length).join(r)+e},p="en",f={};f[p]={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(e){var t=["th","st","nd","rd"],r=e%100;return"["+e+(t[(r-20)%10]||t[r]||t[0])+"]"}};var g="$isDayjsObject",m=function(e){return e instanceof w||!(!e||!e[g])},y=function e(t,r,n){var i;if(!t)return p;if("string"==typeof t){var a=t.toLowerCase();f[a]&&(i=a),r&&(f[a]=r,i=a);var o=t.split("-");if(!i&&o.length>1)return e(o[0])}else{var s=t.name;f[s]=t,i=s}return!n&&i&&(p=i),i||!n&&p},v=function(e,t){if(m(e))return e.clone();var r="object"==typeof t?t:{};return r.date=e,r.args=arguments,new w(r)},b={s:h,z:function(e){var t=-e.utcOffset(),r=Math.abs(t);return(t<=0?"+":"-")+h(Math.floor(r/60),2,"0")+":"+h(r%60,2,"0")},m:function e(t,r){if(t.date()<r.date())return-e(r,t);var n=12*(r.year()-t.year())+(r.month()-t.month()),i=t.clone().add(n,a),o=r-i<0,s=t.clone().add(n+(o?-1:1),a);return+(-(n+(r-i)/(o?i-s:s-i))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(c){return({M:a,y:s,w:i,d:"day",D:u,h:n,m:r,s:t,ms:e,Q:o})[c]||String(c||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}};b.l=y,b.i=m,b.w=function(e,t){return v(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var w=function(){function h(e){this.$L=y(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[g]=!0}var p=h.prototype;return p.parse=function(e){this.$d=function(e){var t=e.date,r=e.utc;if(null===t)return new Date(NaN);if(b.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var n=t.match(l);if(n){var i=n[2]-1||0,a=(n[7]||"0").substring(0,3);return r?new Date(Date.UTC(n[1],i,n[3]||1,n[4]||0,n[5]||0,n[6]||0,a)):new Date(n[1],i,n[3]||1,n[4]||0,n[5]||0,n[6]||0,a)}}return new Date(t)}(e),this.init()},p.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},p.$utils=function(){return b},p.isValid=function(){return this.$d.toString()!==c},p.isSame=function(e,t){var r=v(e);return this.startOf(t)<=r&&r<=this.endOf(t)},p.isAfter=function(e,t){return v(e)<this.startOf(t)},p.isBefore=function(e,t){return this.endOf(t)<v(e)},p.$g=function(e,t,r){return b.u(e)?this[t]:this.set(r,e)},p.unix=function(){return Math.floor(this.valueOf()/1e3)},p.valueOf=function(){return this.$d.getTime()},p.startOf=function(e,o){var c=this,l=!!b.u(o)||o,d=b.p(e),h=function(e,t){var r=b.w(c.$u?Date.UTC(c.$y,t,e):new Date(c.$y,t,e),c);return l?r:r.endOf("day")},p=function(e,t){return b.w(c.toDate()[e].apply(c.toDate("s"),(l?[0,0,0,0]:[23,59,59,999]).slice(t)),c
1)},f=this.$W,g=this.$M,m=this.$D,y="set"+(this.$u?"UTC":"");switch(d){case s:return l?h(1,0):h(31,11);case a:return l?h(1,g):h(0,g+1);case i:var v=this.$locale().weekStart||0,w=(f<v?f+7:f)-v;return h(l?m-w:m+(6-w),g);case"day":case u:return p(y+"Hours",0);case n:return p(y+"Minutes",1);case r:return p(y+"Seconds",2);case t:return p(y+"Milliseconds",3);default:return this.clone()}},p.endOf=function(e){return this.startOf(e,!1)},p.$set=function(i,o){var c,l=b.p(i),d="set"+(this.$u?"UTC":""),h=((c={}).day=d+"Date",c[u]=d+"Date",c[a]=d+"Month",c[s]=d+"FullYear",c[n]=d+"Hours",c[r]=d+"Minutes",c[t]=d+"Seconds",c[e]=d+"Milliseconds",c)[l],p="day"===l?this.$D+(o-this.$W):o;if(l===a||l===s){var f=this.clone().set(u,1);f.$d[h](p),f.init(),this.$d=f.set(u,Math.min(this.$D,f.daysInMonth())).$d}else h&&this.$d[h](p);return this.init(),this},p.set=function(e,t){return this.clone().$set(e,t)},p.get=function(e){return this[b.p(e)]()},p.add=function(e,o){var u,c=this;e=Number(e);var l=b.p(o),d=function(t){var r=v(c);return b.w(r.date(r.date()+Math.round(t*e)),c)};if(l===a)return this.set(a,this.$M+e);if(l===s)return this.set(s,this.$y+e);if("day"===l)return d(1);if(l===i)return d(7);var h=((u={})[r]=6e4,u[n]=36e5,u[t]=1e3,u)[l]||1,p=this.$d.getTime()+e*h;return b.w(p,this)},p.subtract=function(e,t){return this.add(-1*e,t)},p.format=function(e){var t=this,r=this.$locale();if(!this.isValid())return r.invalidDate||c;var n=e||"YYYY-MM-DDTHH:mm:ssZ",i=b.z(this),a=this.$H,o=this.$m,s=this.$M,u=r.weekdays,l=r.months,h=r.meridiem,p=function(e,r,i,a){return e&&(e[r]||e(t,n))||i[r].slice(0,a)},f=function(e){return b.s(a%12||12,e,"0")},g=h||function(e,t,r){var n=e<12?"AM":"PM";return r?n.toLowerCase():n};return n.replace(d,function(e,n){return n||function(e){switch(e){case"YY":return String(t.$y).slice(-2);case"YYYY":return b.s(t.$y,4,"0");case"M":return s+1;case"MM":return b.s(s+1,2,"0");case"MMM":return p(r.monthsShort,s,l,3);case"MMMM":return p(l,s);case"D":return t.$D;case"DD":return b.s(t.$D,2,"0");case"d":return String(t.$W);case"dd":return p(r.weekdaysMin,t.$W,u,2);case"ddd":return p(r.weekdaysShort,t.$W,u,3);case"dddd":return u[t.$W];case"H":return String(a);case"HH":return b.s(a,2,"0");case"h":return f(1);case"hh":return f(2);case"a":return g(a,o,!0);case"A":return g(a,o,!1);case"m":return String(o);case"mm":return b.s(o,2,"0");case"s":return String(t.$s);case"ss":return b.s(t.$s,2,"0");case"SSS":return b.s(t.$ms,3,"0");case"Z":return i}return null}(e)||i.replace(":","")})},p.utcOffset=function(){return-(15*Math.round(this.$d.getTimezoneOffset()/15))},p.diff=function(e,u,c){var l,d=this,h=b.p(u),p=v(e),f=(p.utcOffset()-this.utcOffset())*6e4,g=this-p,m=function(){return b.m(d,p)};switch(h){case s:l=m()/12;break;case a:l=m();break;case o:l=m()/3;break;case i:l=(g-f)/6048e5;break;case"day":l=(g-f)/864e5;break;case n:l=g/36e5;break;case r:l=g/6e4;break;case t:l=g/1e3;break;default:l=g}return c?l:b.a(l)},p.daysInMonth=function(){return this.endOf(a).$D},p.$locale=function(){return f[this.$L]},p.locale=function(e,t){if(!e)return this.$L;var r=this.clone(),n=y(e,t,!0);return n&&(r.$L=n),r},p.clone=function(){return b.w(this.$d,this)},p.toDate=function(){return new Date(this.valueOf())},p.toJSON=function(){return this.isValid()?this.toISOString():null},p.toISOString=function(){return this.$d.toISOString()},p.toString=function(){return this.$d.toUTCString()},h}(),S=w.prototype;return v.prototype=S,[["$ms",e],["$s",t],["$m",r],["$H",n],["$W","day"],["$M",a],["$y",s],["$D",u]].forEach(function(e){S[e[1]]=function(t){return this.$g(t,e[0],e[1])}}),v.extend=function(e,t){return e.$i||(e(t,w,v),e.$i=!0),v},v.locale=y,v.isDayjs=m,v.unix=function(e){return v(1e3*e)},v.en=f[p],v.Ls=f,v.p={},v},"object"==typeof e&&"u">typeof t?t.exports=i():"function"==typeof define&&r.amdO?define(i):(n="u">typeof globalThis?globalThis:n||self).dayjs=i()}),Q=A((e,t)=>{var n,i;n=e,i=function(){var e="month",t="quarter";return function(r,n){var i=n.prototype;i.quarter=function(e){return this.$utils().u(e)?Math.ceil((this.month()+1)/3):this.month(this.month()%3+3*(e-1))};var a=i.add;i.add=function(r,n){return r=Number(r),this.$utils().p(n)===t?this.add(3*r,e):a.bind(this)(r,n)};var o=i.startOf;i.startOf=function(r,n){var i=this.$utils(),a=!!i.u(n)||n;if(i.p(r)===t){var s=this.quarter()-1;return a?this.month(3*s).startOf(e).startOf("day"):this.month(3*s+2).endOf(e).endOf("day")}return o.bind(this)(r,n)}}},"object"==typeof e&&"u">
1typeof t?t.exports=i():"function"==typeof define&&r.amdO?define(i):(n="u">typeof globalThis?globalThis:n||self).dayjs_plugin_quarterOfYear=i()}),V=A((e,t)=>{var n,i;n=e,i=function(){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|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,r=/\d\d/,n=/\d\d?/,i=/\d*[^-_:/,()\s\d]+/,a={},o=function(e){return(e*=1)+(e>68?1900:2e3)},s=function(e){return function(t){this[e]=+t}},u=[/[+-]\d\d:?(\d\d)?|Z/,function(e){(this.zone||(this.zone={})).offset=function(e){if(!e||"Z"===e)return 0;var t=e.match(/([+-]|\d\d)/g),r=60*t[1]+(+t[2]||0);return 0===r?0:"+"===t[0]?-r:r}(e)}],c=function(e){var t=a[e];return t&&(t.indexOf?t:t.s.concat(t.f))},l=function(e,t){var r,n=a.meridiem;if(n){for(var i=1;i<=24;i+=1)if(e.indexOf(n(i,0,t))>-1){r=i>12;break}}else r=e===(t?"pm":"PM");return r},d={A:[i,function(e){this.afternoon=l(e,!1)}],a:[i,function(e){this.afternoon=l(e,!0)}],S:[/\d/,function(e){this.milliseconds=100*e}],SS:[r,function(e){this.milliseconds=10*e}],SSS:[/\d{3}/,function(e){this.milliseconds=+e}],s:[n,s("seconds")],ss:[n,s("seconds")],m:[n,s("minutes")],mm:[n,s("minutes")],H:[n,s("hours")],h:[n,s("hours")],HH:[n,s("hours")],hh:[n,s("hours")],D:[n,s("day")],DD:[r,s("day")],Do:[i,function(e){var t=a.ordinal,r=e.match(/\d+/);if(this.day=r[0],t)for(var n=1;n<=31;n+=1)t(n).replace(/\[|\]/g,"")===e&&(this.day=n)}],M:[n,s("month")],MM:[r,s("month")],MMM:[i,function(e){var t=c("months"),r=(c("monthsShort")||t.map(function(e){return e.slice(0,3)})).indexOf(e)+1;if(r<1)throw Error();this.month=r%12||r}],MMMM:[i,function(e){var t=c("months").indexOf(e)+1;if(t<1)throw Error();this.month=t%12||t}],Y:[/[+-]?\d+/,s("year")],YY:[r,function(e){this.year=o(e)}],YYYY:[/\d{4}/,s("year")],Z:u,ZZ:u};return function(r,n,i){i.p.customParseFormat=!0,r&&r.parseTwoDigitYear&&(o=r.parseTwoDigitYear);var s=n.prototype,u=s.parse;s.parse=function(r){var n=r.date,o=r.utc,s=r.args;this.$u=o;var c=s[1];if("string"==typeof c){var l=!0===s[2],h=!0===s[3],p=s[2];h&&(p=s[2]),a=this.$locale(),!l&&p&&(a=i.Ls[p]),this.$d=function(r,n,i){try{if(["x","X"].indexOf(n)>-1)return new Date(("X"===n?1e3:1)*r);var o=(function(r){var n,i;n=r,i=a&&a.formats;for(var o=(r=n.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(t,r,n){var a=n&&n.toUpperCase();return r||i[n]||e[n]||i[a].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(e,t,r){return t||r.slice(1)})})).match(t),s=o.length,u=0;u<s;u+=1){var c=o[u],l=d[c],h=l&&l[0],p=l&&l[1];o[u]=p?{regex:h,parser:p}:c.replace(/^\[|\]$/g,"")}return function(e){for(var t={},r=0,n=0;r<s;r+=1){var i=o[r];if("string"==typeof i)n+=i.length;else{var a=i.regex,u=i.parser,c=e.slice(n),l=a.exec(c)[0];u.call(t,l),e=e.replace(l,"")}}return function(e){var t=e.afternoon;if(void 0!==t){var r=e.hours;t?r<12&&(e.hours+=12):12===r&&(e.hours=0),delete e.afternoon}}(t),t}})(n)(r),s=o.year,u=o.month,c=o.day,l=o.hours,h=o.minutes,p=o.seconds,f=o.milliseconds,g=o.zone,m=new Date,y=c||(s||u?1:m.getDate()),v=s||m.getFullYear(),b=0;s&&!u||(b=u>0?u-1:m.getMonth());var w=l||0,S=h||0,k=p||0,I=f||0;return g?new Date(Date.UTC(v,b,y,w,S,k,I+60*g.offset*1e3)):i?new Date(Date.UTC(v,b,y,w,S,k,I)):new Date(v,b,y,w,S,k,I)}catch{return new Date("")}}(n,c,o),this.init(),p&&!0!==p&&(this.$L=this.locale(p).$L),(l||h)&&n!=this.format(c)&&(this.$d=new Date("")),a={}}else if(c instanceof Array)for(var f=c.length,g=1;g<=f;g+=1){s[1]=c[g-1];var m=i.apply(this,s);if(m.isValid()){this.$d=m.$d,this.$L=m.$L,this.init();break}g===f&&(this.$d=new Date(""))}else u.call(this,r)}}},"object"==typeof e&&"u">typeof t?t.exports=i():"function"==typeof define&&r.amdO?define(i):(n="u">typeof globalThis?globalThis:n||self).dayjs_plugin_customParseFormat=i()}),B=A((e,t)=>{var r=/(^|; )Coveo-Pendragon=([^;]*)/;t.exports=()=>r.exec(document.cookie)?.pop()||null}),H=A((e,t)=>{var n,i;n=e,i=function(){var e={year:0,month:1,day:2,hour:3,minute:4,second:5},t={};return function(r,n,i){var a,o=function(e,r,n){void 0===n&&(n={});var i,a,o,s,u=new Date(e);return(void 0===(i=n)&&(i={}),(s=t[o=r+"|"+(a=i.timeZoneName||"short")])||(s=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:r,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:a}),t[o]=s),s).formatToParts(u)},s=function(t,r){for(var n=o(t,r),a=[],s=0;s<n.length;s+=1){var u=n[s],c=u.type,l=u.value,d=e[c];d>=0&&(a[d]=parseInt(l,10))}var h=a[3],p=a[0]+"-"+a[1]+"-"+a[2]+" "+(24===h?0:h)+":"+a[4]+":"+a[5]+":000",f=+t;return(i.utc(p).valueOf()-(f-=f%1e3))/6e4},u=n.prototype;u.tz=function(e,t){void 0===e&&(e=a);
1var r,n=this.utcOffset(),o=this.toDate(),s=o.toLocaleString("en-US",{timeZone:e}),u=Math.round((o-new Date(s))/1e3/60),c=-(15*Math.round(o.getTimezoneOffset()/15))-u;if(Number(c)){if(r=i(s,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(c,!0),t){var l=r.utcOffset();r=r.add(n-l,"minute")}}else r=this.utcOffset(0,t);return r.$x.$timezone=e,r},u.offsetName=function(e){var t=this.$x.$timezone||i.tz.guess(),r=o(this.valueOf(),t,{timeZoneName:e}).find(function(e){return"timezonename"===e.type.toLowerCase()});return r&&r.value};var c=u.startOf;u.startOf=function(e,t){if(!this.$x||!this.$x.$timezone)return c.call(this,e,t);var r=i(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return c.call(r,e,t).tz(this.$x.$timezone,!0)},i.tz=function(e,t,r){var n=r&&t,o=r||t||a,u=s(+i(),o);if("string"!=typeof e)return i(e).tz(o);var c=function(e,t,r){var n=e-60*t*1e3,i=s(n,r);if(t===i)return[n,t];var a=s(n-=60*(i-t)*1e3,r);return i===a?[n,i]:[e-60*Math.min(i,a)*1e3,Math.max(i,a)]}(i.utc(e,n).valueOf(),u,o),l=c[0],d=c[1],h=i(l).utcOffset(d);return h.$x.$timezone=o,h},i.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},i.tz.setDefault=function(e){a=e}}},"object"==typeof e&&"u">typeof t?t.exports=i():"function"==typeof define&&r.amdO?define(i):(n="u">typeof globalThis?globalThis:n||self).dayjs_plugin_timezone=i()}),Y=A((e,t)=>{var n,i;n=e,i=function(){var e="minute",t=/[+-]\d\d(?::?\d\d)?/g,r=/([+-]|\d\d)/g;return function(n,i,a){var o=i.prototype;a.utc=function(e){var t={date:e,utc:!0,args:arguments};return new i(t)},o.utc=function(t){var r=a(this.toDate(),{locale:this.$L,utc:!0});return t?r.add(this.utcOffset(),e):r},o.local=function(){return a(this.toDate(),{locale:this.$L,utc:!1})};var s=o.parse;o.parse=function(e){e.utc&&(this.$u=!0),this.$utils().u(e.$offset)||(this.$offset=e.$offset),s.call(this,e)};var u=o.init;o.init=function(){if(this.$u){var e=this.$d;this.$y=e.getUTCFullYear(),this.$M=e.getUTCMonth(),this.$D=e.getUTCDate(),this.$W=e.getUTCDay(),this.$H=e.getUTCHours(),this.$m=e.getUTCMinutes(),this.$s=e.getUTCSeconds(),this.$ms=e.getUTCMilliseconds()}else u.call(this)};var c=o.utcOffset;o.utcOffset=function(n,i){var a=this.$utils().u;if(a(n))return this.$u?0:a(this.$offset)?c.call(this):this.$offset;if("string"==typeof n&&null===(n=function(e){void 0===e&&(e="");var n=e.match(t);if(!n)return null;var i=(""+n[0]).match(r)||["-",0,0],a=i[0],o=60*i[1]+ +i[2];return 0===o?0:"+"===a?o:-o}(n)))return this;var o=16>=Math.abs(n)?60*n:n,s=this;if(i)return s.$offset=o,s.$u=0===n,s;if(0!==n){var u=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(s=this.local().add(o+u,e)).$offset=o,s.$x.$localOffset=u}else s=this.utc();return s};var l=o.format;o.format=function(e){var t=e||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return l.call(this,t)},o.valueOf=function(){var e=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*e},o.isUTC=function(){return!!this.$u},o.toISOString=function(){return this.toDate().toISOString()},o.toString=function(){return this.toDate().toUTCString()};var d=o.toDate;o.toDate=function(e){return"s"===e&&this.$offset?a(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():d.call(this)};var h=o.diff;o.diff=function(e,t,r){if(e&&this.$u===e.$u)return h.call(this,e,t,r);var n=this.local(),i=a(e).local();return h.call(n,i,t,r)}}},"object"==typeof e&&"u">typeof t?t.exports=i():"function"==typeof define&&r.amdO?define(i):(n="u">typeof globalThis?globalThis:n||self).dayjs_plugin_utc=i()}),G=A((e,t)=>{function r(e){try{return JSON.stringify(e)}catch{return'"[Circular]"'}}t.exports=function(e,t,n){var i=n&&n.stringify||r;if("object"==typeof e&&null!==e){var a=t.length+1;if(1===a)return e;var o=Array(a);o[0]=i(e);for(var s=1;s<a;s++)o[s]=i(t[s]);return o.join(" ")}if("string"!=typeof e)return e;var u=t.length;if(0===u)return e;for(var c="",l=0,d=-1,h=e&&e.length||0,p=0;p<h;){if(37===e.charCodeAt(p)&&p+1<h){switch(d=d>-1?d:0,e.charCodeAt(p+1)){case 100:case 102:if(l>=u||null==t[l])break;d<p&&(c+=e.slice(d,p)),c+=Number(t[l]),d=p+2,p++;break;case 105:if(l>=u||null==t[l])break;d<p&&(c+=e.slice(d,p)),c+=Math.floor(Number(t[l])),d=p+2,p++;break;case 79:case 111:case 106:if(l>=u||void 0===t[l])break;d<p&&(c+=e.slice(d,p));var f=typeof t[l];if("string"===f){c+="'"+t[l]+"'",d=p+2,p++;break}if("function"===f){c+=t[l].name||"<anonymous>",d=p+2,p++;break}c+=i(t[l]),d=p+2,p++;break;case 115:if(l>=u)break;d<p&&(c+=e.slice(d,p)),c+=String(t[l]),d=p+2,p++;break;case 37:d<p&&(c+=e.slice(d,p)),c+="%",d=p+2,p++,l--}++l}++p}return -1===d?e:(d<h&&(c+=e.slice(d)),c)}}),K=A((e,t)=>
1{var r=G();t.exports=c;var n=function(){function e(e){return"u">typeof e&&e}try{return"u">typeof globalThis||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)||{}}}().console||{};function i(e,t){return"silent"===e?1/0:t.levels.values[e]}var a=Symbol("pino.logFuncs"),o=Symbol("pino.hierarchy"),s={error:"log",fatal:"error",warn:"error",info:"log",debug:"log",trace:"log"};function u(e,t){let r={logger:t,parent:e[o]};t[o]=r}function c(e){var t,r,o;let p,f,g;(e=e||{}).browser=e.browser||{};let b=e.browser.transmit;if(b&&"function"!=typeof b.send)throw Error("pino: transmit option must have a send function");let w=e.browser.write||n;e.browser.write&&(e.browser.asObject=!0);let S=e.serializers||{},k=(t=e.browser.serialize,Array.isArray(t)?t.filter(function(e){return"!stdSerializers.err"!==e}):!0===t&&Object.keys(S)),I=e.browser.serialize;Array.isArray(e.browser.serialize)&&e.browser.serialize.indexOf("!stdSerializers.err")>-1&&(I=!1);let C=Object.keys(e.customLevels||{}),A=["error","fatal","warn","info","debug","trace"].concat(C);"function"==typeof w&&A.forEach(function(e){w[e]=w}),(!1===e.enabled||e.browser.disabled)&&(e.level="silent");let O=e.level||"info",E=Object.create(w);E.log||(E.log=m),p={},A.forEach(e=>{p[e]=w[e]?w[e]:n[e]||n[s[e]||"log"]||m}),E[a]=p,u({},E),Object.defineProperty(E,"levelVal",{get:function(){return i(this.level,this)}}),Object.defineProperty(E,"level",{get:function(){return this._level},set:function(e){if("silent"!==e&&!this.levels.values[e])throw Error("unknown level "+e);this._level=e,l(this,D,E,"error"),l(this,D,E,"fatal"),l(this,D,E,"warn"),l(this,D,E,"info"),l(this,D,E,"debug"),l(this,D,E,"trace"),C.forEach(e=>{l(this,D,E,e)})}});let D={transmit:b,serialize:k,asObject:e.browser.asObject,formatters:e.browser.formatters,levels:A,timestamp:"function"==typeof(r=e).timestamp?r.timestamp:!1===r.timestamp?y:v};return f=e.customLevels||{},E.levels={values:Object.assign({},c.levels.values,f),labels:Object.assign({},c.levels.labels,(g={},Object.keys(o=f).forEach(function(e){g[o[e]]=e}),g))},E.level=O,E.setMaxListeners=E.getMaxListeners=E.emit=E.addListener=E.on=E.prependListener=E.once=E.prependOnceListener=E.removeListener=E.removeAllListeners=E.listeners=E.listenerCount=E.eventNames=E.write=E.flush=m,E.serializers=S,E._serialize=k,E._stdErrSerialize=I,E.child=function(t,r){if(!t)throw Error("missing bindings for child Pino");r=r||{},k&&t.serializers&&(r.serializers=t.serializers);let n=r.serializers;if(k&&n){var i=Object.assign({},S,n),a=!0===e.browser.serialize?Object.keys(i):k;delete t.serializers,d([t],a,i,this._stdErrSerialize)}function o(e){this._childLevel=(0|e._childLevel)+1,this.bindings=t,i&&(this.serializers=i,this._serialize=a),b&&(this._logEvent=h([].concat(e._logEvent.bindings,t)))}o.prototype=this;let s=new o(this);return u(this,s),s.level=this.level,s},b&&(E._logEvent=h()),E}function l(e,t,s,u){var c,l,p,f,g,y,v;if(Object.defineProperty(e,u,{value:i(e.level,s)>i(u,s)?m:s[a][u],writable:!0,enumerable:!0,configurable:!0}),!t.transmit&&e[u]===m)return;e[u]=(c=e,l=t,p=s,f=u,g=c[a][f],function(){let e=l.timestamp(),t=Array(arguments.length),a=Object.getPrototypeOf&&Object.getPrototypeOf(this)===n?n:this;for(var o,s,u,m=0;m<t.length;m++)t[m]=arguments[m];if(l.serialize&&!l.asObject&&d(t,this._serialize,this.serializers,this._stdErrSerialize),l.asObject||l.formatters?g.call(a,function(e,t,n,i,a={}){let{level:o=()=>e.levels.values[t],log:s=e=>e}=a;e._serialize&&d(n,e._serialize,e.serializers,e._stdErrSerialize);let u=n.slice(),c=u[0],l={};i&&(l.time=i),l.level=o(t,e.levels.values[t]);let h=(0|e._childLevel)+1;if(h<1&&(h=1),null!==c&&"object"==typeof c){for(;h--&&"object"==typeof u[0];)Object.assign(l,u.shift());c=u.length?r(u.shift(),u):void 0}else"string"==typeof c&&(c=r(u.shift(),u));return void 0!==c&&(l.msg=c),s(l)}(this,f,t,e,l.formatters)):g.apply(a,t),l.transmit){let r,n,a,g,m,y,v=l.transmit.level||c._level,b=p.levels.values[v],w=p.levels.values[f];if(w<b)return;o=this,s={ts:e,methodLevel:f,methodValue:w,transmitLevel:v,transmitValue:p.levels.values[l.transmit.level||c._level],send:l.transmit.send,val:i(c._level,p)},u=t,r=s.send,n=s.ts,a=s.methodLevel,g=s.methodValue,m=s.val,y=o._logEvent.bindings,d(u,o._serialize||Object.keys(o.serializers),o.serializers,void 0===o._stdErrSerialize||o._stdErrSerialize),o._logEvent.ts=n,o._logEvent.messages=u.filter(function(e){return -1===y.indexOf(e)}),o._logEvent.level.label=a,o._logEvent.level.value=g,r(a,o._logEvent,m),o._logEvent=h(y)}});let b=function(e){let t=[];e.bindings&&t.push(e.bindings);let r=e[o];for(;r.parent;)(r=r.parent).logger.bindings&&t.push(r.logger.bindings);return t.reverse()}(e);0!==b.length&&(e[u]=(y=b,v=e[u],function(){return v.apply(this,[...y,...arguments])}))}function d(e,t,r,n){for(let i in e)if(n&&e[i]instanceof Error)e[i]=c.stdSerializers.err(e[i]);else if("object"==typeof e[i]&&!Array.isArray(e[i]))for(let n in e[i])t&&t.indexOf(n)>-1&&n in r&&(e[i][n]=r[n](e[i][n]))}function h(e){return{ts:0,messages:[],bindings:e||[],level:{label:"",value:0}}}function p(e){let t={type:e.constructor.name,msg:e.message,stack:e.stack};for(let r in e)void 0===t[r]&&(t[r]=e[r]);return t}function f(){return{}}function g(e){return e}function m(){}function y(){return!1}function v(){return Date.now()}c.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"}},c.stdSerializers={mapHttpRequest:f,mapHttpResponse:f,wrapRequestSerializer:g,wrapResponseSerializer:g,wrapErrorSerializer:g,req:f,res:f,err:p,errWithCause:p},c.stdTimeFunctions=Object.assign({},{nullTime:y,epochTime:v,unixTime:function(){return Math.round(Date.now()/1e3)},isoTime:function(){return new Date(Date.now()).toISOString()}}),t.exports.default=c,t.exports.pino=c}
1),W=class extends Error{constructor(e){super(e),this.name="SchemaValidationError"}},J=class{constructor(e){this.definition=e}validate(e={},t=""){let r={...this.default,...e},n=[];for(let e in this.definition){let t=this.definition[e].validate(r[e]);t&&n.push(`${e}: ${t}`)}if(n.length)throw new W(`
2  The following properties are invalid:
3
4    ${n.join(`
5	`)}
6  
7  ${t}
8  `);return r}get default(){let e={};for(let t in this.definition){let r=this.definition[t].default;void 0!==r&&(e[t]=r)}return e}},Z=class{constructor(e={}){this.baseConfig=e}validate(e){return this.baseConfig.required&&ee(e)?"value is required.":null}get default(){return this.baseConfig.default instanceof Function?this.baseConfig.default():this.baseConfig.default}get required(){return!0===this.baseConfig.required}};function X(e){return void 0===e}function ee(e){return X(e)||null===e}var et=class{constructor(e={}){this.config=e,this.value=new Z(e)}validate(e){var t;return this.value.validate(e)||(X(t=e)||er(t)?e<this.config.min?`minimum value of ${this.config.min} not respected.`:e>this.config.max?`maximum value of ${this.config.max} not respected.`:null:"value is not a number.")}get default(){return this.value.default}get required(){return this.value.required}};function er(e){return"number"==typeof e&&!isNaN(e)}var en=class{constructor(e={}){this.value=new Z(e)}validate(e){var t;return this.value.validate(e)||(X(t=e)||ei(t)?null:"value is not a boolean.")}get default(){return this.value.default}get required(){return this.value.required}};function ei(e){return"boolean"==typeof e}var ea=/^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})).?)(?::\d{2,5})?(?:[/?#]\S*)?$/i,eo=/^\d{4}(-\d\d(-\d\d(T\d\d:\d\d(:\d\d)?(\.\d+)?(([+-]\d\d:\d\d)|Z)?)?)?)?$/i,es=class{constructor(e={}){this.config={emptyAllowed:!0,url:!1,...e},this.value=new Z(this.config)}validate(e){let{emptyAllowed:t,url:r,regex:n,constrainTo:i,ISODate:a}=this.config;return this.value.validate(e)||(X(e)?null:eu(e)?t||e.length?r&&!ea.test(e)?"value is not a valid URL.":n&&!n.test(e)?`value did not match provided regex ${n}`:i&&!i.includes(e)?`value should be one of: ${i.join(", ")}.`:a&&!(eo.test(e)&&"Invalid Date"!==new Date(e).toString())?"value is not a valid ISO8601 date string":null:"value is an empty string.":"value is not a string.")}get default(){return this.value.default}get required(){return this.value.required}};function eu(e){return"[object String]"===Object.prototype.toString.call(e)}var ec=class{constructor(e={}){this.config={options:{required:!1},values:{},...e}}validate(e){if(X(e))return this.config.options.required?"value is required and is currently undefined":null;if(!el(e))return"value is not an object";for(let[t,r]of Object.entries(this.config.values))if(r.required&&ee(e[t]))return`value does not contain ${t}`;let t="";for(let[r,n]of Object.entries(this.config.values)){let i=e[r],a=n.validate(i);null!==a&&(t+=" "+a)}return""===t?null:t}get default(){}get required(){return!!this.config.options.required}};function el(e){return void 0!==e&&"object"==typeof e}var ed=class{constructor(e={}){this.config=e,this.value=new Z(this.config)}validate(e){if(!ee(e)&&!Array.isArray(e))return"value is not an array";let t=this.value.validate(e);if(null!==t)return t;if(ee(e))return null;if(void 0!==this.config.max&&e.length>this.config.max)return`value contains more than ${this.config.max}`;if(void 0!==this.config.min&&e.length<this.config.min)return`value contains less than ${this.config.min}`;if(void 0!==this.config.each){let t="";return e.forEach(r=>{this.config.each.required&&ee(r)&&(t=`value is null or undefined: ${e.join(",")}`);let n=this.validatePrimitiveValue(r,this.config.each);null!==n&&(t+=" "+n)}),""===t?null:t}return null}validatePrimitiveValue(e,t){return ei(e)||eu(e)||er(e)||el(e)?t.validate(e):"value is not a primitive value"}get default(){}get required(){return this.value.required}},eh=class{constructor(e){this.config=e,this.value=new Z(e)}validate(e){let t=this.value.validate(e);return null!==t?t:X(e)||Object.values(this.config.enum).find(t=>t===e)?null:"value is not in enum."}get default(){return this.value.default}get required(){return this.value.required}}
8,ep=e=>e;function ef(){return{answerSnippet:"",documentId:{contentIdKey:"",contentIdValue:""},question:"",relatedQuestions:[],score:0}}function eg(){return{response:{results:[],searchUid:"",totalCountFiltered:0,facets:[],generateAutomaticFacets:{facets:[]},queryCorrections:[],triggers:[],questionAnswer:ef(),pipeline:"",splitTestRun:"",termsToHighlight:{},phrasesToHighlight:{},extendedResults:{}},duration:0,queryExecuted:"",error:null,automaticallyCorrected:!1,isLoading:!1,results:[],searchResponseId:"",requestId:"",questionAnswer:ef(),extendedResults:{}}}function em(e){let{url:t,accessToken:r,organizationId:n,authentication:i,...a}=e;return a}var ey=e=>{let{response:t}=e;return t.body?ev(e):eb(t)},ev=e=>void 0!==e.body.exception?ew(e):void 0!==e.body.statusCode?e.body:{message:"unknown",statusCode:0,type:"unknown"},eb=e=>{let t=JSON.parse(JSON.stringify(e,Object.getOwnPropertyNames(e)));return{...t,message:`Client side error: ${t.message||""}`,statusCode:400,type:"ClientError"}},ew=e=>({message:e.body.exception.code,statusCode:e.response.status,type:e.body.exception.code}),eS=O(D()),ek=O(P()),eI=class extends Error{constructor(){super(),this.name="ExpiredToken",this.message="The token being used to perform the request is expired."}},eC=class extends Error{constructor(e,t){super(),this.name="Disconnected",this.message=`Client could not connect to the following URL: ${e}`,this.statusCode=t??0}};O(L());var eA=new Set(["1",1,"yes",!0]);function eO(e){if("object"!=typeof e||!e)return e;try{return JSON.parse(JSON.stringify(e))}catch{return e}}function eE(e){return"string"==typeof e||"number"==typeof e||"boolean"==typeof e}var eD=class e{static async call(t){let r=function(e){let{url:t,method:r,requestParams:n,contentType:i,accessToken:a,signal:o}=e,s="POST"===e.method||"PUT"===e.method,u=function(e,t){return"application/x-www-form-urlencoded"===t?"object"==typeof e&&e&&Object.values(e).every(eE)?function(e){let t=[];for(let r in e){let n=encodeURIComponent(r),i=encodeURIComponent(e[r]);t.push(`${n}=${i}`)}return t.join("&")}(e):"":JSON.stringify(e)}(n,i);return{url:t,method:r,headers:{"Content-Type":i,Authorization:`Bearer ${a}`,...e.headers},...s&&{body:u},signal:o}}(t),{logger:n}=t,i=await e.preprocessRequest(r,t);n.info(i,"Platform request");let{url:a,...o}=i,s=async()=>{let e=await (0,eS.default)(a,o);if(429===e.status)throw e;return e};try{let e=await (0,ek.backOff)(s,{retry:e=>{var t;let r=e&&(t=e.status,429===t);return r&&n.info("Platform retrying request"),r}});switch(e.status){case 419:case 401:throw n.info("Platform renewing token"),new eI;case 404:throw new eC(a,e.status);default:return n.info({response:e,requestInfo:i},"Platform response"),e}}catch(e){return"Failed to fetch"===e.message?new eC(a):e}}static async preprocessRequest(e,t){let{origin:r,preprocessRequest:n,logger:i,requestMetadata:a}=t,{signal:o,...s}=e,u=eO(s);try{let t=await n(e,r,a);return{...e,...t}}catch(e){i.error(e,"Platform request preprocessing failed. Returning default request options.")}return u}};function eR(e,t){let r=t&&t.environment&&"prod"!==t.environment?t.environment:"",n=t&&t.region&&"us"!==t.region?`-${t.region}`:"";return`https://${e}${r}${n}.cloud.coveo.com`}function ex(e,t="prod"){let r="prod"===t?"":t,n=`https://${e}.org${r}.coveo.com`,i=`${n}/rest/search/v2`;return{platform:n,analytics:`https://${e}.analytics.org${r}.coveo.com`,search:i,admin:`https://${e}.admin.org${r}.coveo.com`}}function eT(e){return e?.multiRegionSubDomain?`https://${e.multiRegionSubDomain}.org.coveo.com`:eR("platform",e)}var e_=class{constructor(){this.currentAbortController=null}async enqueue(e,t){let r=this.currentAbortController,n=this.currentAbortController=function(){if(typeof window>"u"){let{AbortController:e}=N();return new e}return typeof AbortController>"u"?null:new AbortController}();r&&(t.warnOnAbort&&t.logger.warn("Cancelling current pending search query"),r.abort());try{return await e(n?.signal??null)}finally{this.currentAbortController===n&&(this.currentAbortController=null)}}},eq=class{constructor(e){this._params={},this._basePath=e}addParam(e,t){this._params={...this.params,[e]:t}}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(([e,t])=>`${e}=${encodeURIComponent(t)}`).join("&")}`:this.basePath}},eU=e=>{let t=e.match(/^https:\/\/(?<organizationId>\w+)\.org(?<environment>dev|stg|hipaa)?\.coveo\.com/);return t?.groups?t.groups:null},ej=(e,t,r,n)=>{let i=new eq(`${e.url}${n}`);return i.addParam("organizationId",e.organizationId),e.authentication&&i.addParam("authentication",e.authentication),{accessToken:e.accessToken,method:t,contentType:r,url:i.href,origin:"searchApiFetch"}},eM=async(e,t)=>{let r=await eD.call({...ej(e,"POST","application/x-www-form-urlencoded","/html"),requestParam
8s:em(e),requestMetadata:{method:"html"},...t});if(r instanceof Error)throw r;let n=((r.headers.get("content-type")||"").split(";").find(e=>-1!==e.indexOf("charset="))||"").split("=")[1]||"UTF-8",i=await r.arrayBuffer(),a=new TextDecoder(n).decode(i);return"string"==typeof a?{success:a}:{error:ey({response:r,body:a})}};function eP(e,t){if(t&&"AbortError"===e.name)return{error:{statusCode:e.code,type:e.name,message:e.message,ignored:!0}};if(e instanceof eC)return{error:{statusCode:e.statusCode,type:e.name,message:e.message}};throw e}var e$=class{constructor(e){this.options=e,this.apiCallsQueues={unknown:new e_,mainSearch:new e_,facetValues:new e_,foldingCollection:new e_,instantResults:new e_}}async plan(e){let t=await eD.call({...ej(e,"POST","application/json","/plan"),requestParams:em(e),requestMetadata:{method:"plan"},...this.options});if(t instanceof Error)return eP(t);let r=await t.json();return void 0!==r.preprocessingOutput?{success:r}:{error:ey({response:t,body:r})}}async querySuggest(e){let t=await eD.call({...ej(e,"POST","application/json","/querySuggest"),requestMetadata:{method:"querySuggest"},requestParams:em(e),...this.options});if(t instanceof Error)return eP(t);let r=await t.json(),n={response:t,body:r};return void 0!==r.completions?{success:(await this.options.postprocessQuerySuggestResponseMiddleware(n)).body}:{error:ey(n)}}async search(e,t){let r=t?.origin??"unknown",n=await this.apiCallsQueues[r].enqueue(r=>eD.call({...ej(e,"POST","application/json",""),requestParams:em(e),requestMetadata:{method:"search",origin:t?.origin},...this.options,signal:r??void 0}),{logger:this.options.logger,warnOnAbort:!t?.disableAbortWarning});if(n instanceof Error)return eP(n,t?.disableAbortWarning);let i=await n.json(),a={response:n,body:i};return eF(i)?(a.body=eL(i),{success:(await this.options.postprocessSearchResponseMiddleware(a)).body}):{error:ey(a)}}async facetSearch(e){let t=await eD.call({...ej(e,"POST","application/json","/facet"),requestParams:em(e),requestMetadata:{method:"facetSearch"},...this.options});if(t instanceof Error)throw t;let r=await t.json();return(await this.options.postprocessFacetSearchResponseMiddleware({response:t,body:r})).body}async recommendations(e){let t=await eD.call({...ej(e,"POST","application/json",""),requestParams:em(e),requestMetadata:{method:"recommendations"},...this.options});if(t instanceof Error)throw t;let r=await t.json();if(eF(r)){let e={response:t,body:r};return e.body=eL(r),{success:(await this.options.postprocessSearchResponseMiddleware(e)).body}}return{error:ey({response:t,body:r})}}async html(e){return eM(e,{...this.options})}async productRecommendations(e){let t=await eD.call({...ej(e,"POST","application/json",""),requestParams:em(e),requestMetadata:{method:"productRecommendations"},...this.options});if(t instanceof Error)throw t;let r=await t.json();return eF(r)?{success:r}:{error:ey({response:t,body:r})}}async fieldDescriptions(e){let t=await eD.call({...ej(e,"GET","application/json","/fields"),requestParams:{},requestMetadata:{method:"fieldDescriptions"},...this.options});if(t instanceof Error)throw t;let r=await t.json();return void 0!==r.fields?{success:r}:{error:ey({response:t,body:r})}}};function eF(e){return void 0!==e.results}function eL(e){let t=ef();return ee(e.questionAnswer)?e.questionAnswer=t:e.questionAnswer={...t,...e.questionAnswer},e}var eN=e=>e,ez=e=>e,eQ=e=>e;function eV(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 eB="function"==typeof Symbol&&Symbol.observable||"@@observable",eH=()=>Math.random().toString(36).substring(7).split("").join("."),eY={INIT:`@@redux/INIT${eH()}`,REPLACE:`@@redux/REPLACE${eH()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${eH()}`};function eG(e){if("object"!=typeof e||null===e)return!1;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||null===Object.getPrototypeOf(e)}function eK(e){let t=Object.keys(e),r={};for(let n=0;n<t.length;n++){let i=t[n];"function"==typeof e[i]&&(r[i]=e[i])}let n=Object.keys(r),i;
8try{Object.keys(r).forEach(e=>{let t=r[e];if(typeof t(void 0,{type:eY.INIT})>"u")throw Error(eV(12));if(typeof t(void 0,{type:eY.PROBE_UNKNOWN_ACTION()})>"u")throw Error(eV(13))})}catch(e){i=e}return function(e={},t){if(i)throw i;let a=!1,o={};for(let i=0;i<n.length;i++){let s=n[i],u=r[s],c=e[s],l=u(c,t);if(typeof l>"u")throw Error(eV(14));o[s]=l,a=a||l!==c}return(a=a||n.length!==Object.keys(e).length)?o:e}}function eW(...e){return 0===e.length?e=>e:1===e.length?e[0]:e.reduce((e,t)=>(...r)=>e(t(...r)))}function eJ(e){return eG(e)&&"type"in e&&"string"==typeof e.type}var eZ=Symbol.for("immer-nothing"),eX=Symbol.for("immer-draftable"),e0=Symbol.for("immer-state");function e1(e){throw Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var e2=Object.getPrototypeOf;function e5(e){return!!e&&!!e[e0]}function e3(e){return!!e&&(e6(e)||Array.isArray(e)||!!e[eX]||!!e.constructor?.[eX]||tr(e)||tn(e))}var e4=Object.prototype.constructor.toString();function e6(e){if(!e||"object"!=typeof e)return!1;let t=e2(e);if(null===t)return!0;let r=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return r===Object||"function"==typeof r&&Function.toString.call(r)===e4}function e8(e,t){0===e9(e)?Object.entries(e).forEach(([r,n])=>{t(r,n,e)}):e.forEach((r,n)=>t(n,r,e))}function e9(e){let t=e[e0];return t?t.type_:Array.isArray(e)?1:tr(e)?2:3*!!tn(e)}function e7(e,t){return 2===e9(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function te(e,t){return 2===e9(e)?e.get(t):e[t]}function tt(e,t,r){let n=e9(e);2===n?e.set(t,r):3===n?e.add(r):e[t]=r}function tr(e){return e instanceof Map}function tn(e){return e instanceof Set}function ti(e){return e.copy_||e.base_}function ta(e,t){if(tr(e))return new Map(e);if(tn(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);if(!t&&e6(e))return e2(e)?{...e}:Object.assign(Object.create(null),e);let r=Object.getOwnPropertyDescriptors(e);delete r[e0];let n=Reflect.ownKeys(r);for(let t=0;t<n.length;t++){let i=n[t],a=r[i];!1===a.writable&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(r[i]={configurable:!0,writable:!0,enumerable:a.enumerable,value:e[i]})}return Object.create(e2(e),r)}function to(e,t=!1){return tu(e)||e5(e)||!e3(e)||(e9(e)>1&&(e.set=e.add=e.clear=e.delete=ts),Object.freeze(e),t&&e8(e,(e,t)=>to(t,!0))),e}function ts(){e1(2)}function tu(e){return Object.isFrozen(e)}var tc={};function tl(e){let t=tc[e];return t||e1(0,e),t}function td(e,t){t&&(tl("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function th(e){tp(e),e.drafts_.forEach(tg),e.drafts_=null}function tp(e){e===rN&&(rN=e.parent_)}function tf(e){return rN={drafts_:[],parent_:rN,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function tg(e){let t=e[e0];0===t.type_||1===t.type_?t.revoke_():t.revoked_=!0}function tm(e,t){t.unfinalizedDrafts_=t.drafts_.length;let r=t.drafts_[0];return void 0!==e&&e!==r?(r[e0].modified_&&(th(t),e1(4)),e3(e)&&(e=ty(t,e),t.parent_||tb(t,e)),t.patches_&&tl("Patches").generateReplacementPatches_(r[e0].base_,e,t.patches_,t.inversePatches_)):e=ty(t,r,[]),th(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==eZ?e:void 0}function ty(e,t,r){if(tu(t))return t;let n=t[e0];if(!n)return e8(t,(i,a)=>tv(e,n,t,i,a,r)),t;if(n.scope_!==e)return t;if(!n.modified_)return tb(e,n.base_,!0),n.base_;if(!n.finalized_){n.finalized_=!0,n.scope_.unfinalizedDrafts_--;let t=n.copy_,i=t,a=!1;3===n.type_&&(i=new Set(t),t.clear(),a=!0),e8(i,(i,o)=>tv(e,n,t,i,o,r,a)),tb(e,t,!1),r&&e.patches_&&tl("Patches").generatePatches_(n,r,e.patches_,e.inversePatches_)}return n.copy_}function tv(e,t,r,n,i,a,o){if(e5(i)){let o=ty(e,i,a&&t&&3!==t.type_&&!e7(t.assigned_,n)?a.concat(n):void 0);if(tt(r,n,o),!e5(o))return;e.canAutoFreeze_=!1}else o&&r.add(i);if(e3(i)&&!tu(i)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;ty(e,i),t&&t.scope_.parent_||tb(e,i)}}function tb(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&to(t,r)}var tw={get(e,t){if(t===e0)return e;let r=ti(e);if(!e7(r,t)){var n;let i;return n=e,(i=tI(r,t))?"value"in i?i.value:i.get?.call(n.draft_):void 0}let i=r[t];return e.finalized_||!e3(i)?i:i===tk(e.base_,t)?(tA(e),e.copy_[t]=tO(i,e)):i},has:(e,t)=>t in ti(e),ownKeys:e=>Reflect.ownKeys(ti(e)),set(e,t,r){let n=tI(ti(e),t);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){let n=tk(ti(e),t),i=n?.[e0];if(i&&i.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if((r===n?0!==r||1/r==1/n:r!=r&&n!=n)&&(void 0!==r||e7(e.base_,t)))return!0;tA(e),tC(e)}return e.copy_[t]===r&&(void 0!==r||t in e.copy_)||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_[t]=!0),!0},deleteProperty:(e,t)=>(void 0!==tk(e.base_,t)||t in e.base_?(e.assigned_[t]=!1,tA(e),tC(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0),getOwnPropertyDescriptor(e,t){let r=ti(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:1!==e.type_||"length"!==t,enumerable:n.enumerable,value:r[t]}},defineProperty(){e1(11)},getPrototypeOf:e=>e2(e.base_),setPrototypeOf(){e1(12)}},tS={};function tk(e,t){let r=e[e0];return(r?ti(r):e)[t]}function tI(e,t){if(!(t in e))return;let r=e2(e);for(;r;){let e=Object.getOwnPropertyDescriptor(r,t);if(e)return e;r=e2(r)}}function tC(e){e.modified_||(e.modified_=!0,e.parent_&&tC(e.parent_))}function tA(e){e.copy_||(e.copy_=ta(e.base_,e.scope_.immer_.useStrictShallowCopy_))}function tO(e,t){let r=tr(e)?tl("MapSet").proxyMap_(e,t):tn(e)?tl("MapSet").proxySet_(e,t):function(e,t){let r=Array.isArray(e),n={type_:+!!r,scope_:t?t.scope_:rN,modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1},i=n,a=tw;r&&(i=[n],a=tS);let{revoke:o,proxy:s}=Proxy.revocable(i,a);return n.draft_=s,n.revoke_=o,s}(e,t);return(t?t.scope_:rN).drafts_.push(r),r}e8(tw,(e,t)=>{tS[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),tS.deleteProperty=function(e,t){return tS.set.call(this,e,t,void 0)},tS.set=function(e,t,r){return tw.set.call(this,e[0],t,r,e[0])};var tE=new class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(e,t,r)=>{let n;if("function"==typeof e&&"function"!=typeof t){let r=t;t=e;let n=this;return function(e=r,...i){return n.produce(e,e=>t.call(this,e,...i))}}if("function"!=typeof t&&e1(6),void 0!==r&&"function"!=typeof r&&e1(7),e3(e)){let i=tf(this),a=tO(e,void 0),o=!0;try{n=t(a),o=!1}finally{o?th(i):tp(i)}return td(i,r),tm(n,i)}if(e&&"object"==typeof e)e1(1,e);else{if(void 0===(n=t(e))&&(n=e),n===eZ&&(n=void 0),this.autoFreeze_&&to(n,!0),r){let t=[],i=[];tl("Patches").generateReplacementPatches_(e,n,t,i),r(t,i)}return n}},this.produceWithPatches=(e,t)=>{let r,n;return"function"==typeof e?(t,...r)=>this.produceWithPatches(t,t=>e(t,...r)):[this.produce(e,t,(e,t)=>{r=e,n=t}),r,n]},"boolean"==typeof e?.autoFreeze&&this.setAutoFreeze(e.autoFreeze),"boolean"==typeof e?.useStrictShallowCopy&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){var t;e3(e)||e1(8),e5(e)&&(e5(t=e)||e1(10,t),e=function e(t){if(!e3(t)||tu(t))return t;let r=t[e0],n;if(r){if(!r.modified_)return r.base_;r.finalized_=!0,n=ta(t,r.scope_.immer_.useStrictShallowCopy_)}else n=ta(t,!0);return e8(n,(t,r)=>{tt(n,t,e(r))}),r&&(r.finalized_=!1),n}(t));let r=tf(this),n=tO(e,void 0);return n[e0].isManual_=!0,tp(r),n}finishDraft(e,t){let r=e&&e[e0];r&&r.isManual_||e1(9);let{scope_:n}=r;return td(n,t),tm(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 n=t[r];
8if(0===n.path.length&&"replace"===n.op){e=n.value;break}}r>-1&&(t=t.slice(r+1));let n=tl("Patches").applyPatches_;return e5(e)?n(e,t):this.produce(e,e=>n(e,t))}},tD=tE.produce,tR=tE.produceWithPatches.bind(tE);tE.setAutoFreeze.bind(tE),tE.setUseStrictShallowCopy.bind(tE);var tx=tE.applyPatches.bind(tE);tE.createDraft.bind(tE),tE.finishDraft.bind(tE);var tT=e=>Array.isArray(e)?e:[e],t_="u">typeof WeakRef?WeakRef:class{constructor(e){this.value=e}deref(){return this.value}};function tq(){return{s:0,v:void 0,o:null,p:null}}function tU(e,t={}){let r=tq(),{resultEqualityCheck:n}=t,i,a=0;function o(){let t=r,{length:o}=arguments;for(let e=0;e<o;e++){let r=arguments[e];if("function"==typeof r||"object"==typeof r&&null!==r){let e=t.o;null===e&&(t.o=e=new WeakMap);let n=e.get(r);void 0===n?(t=tq(),e.set(r,t)):t=n}else{let e=t.p;null===e&&(t.p=e=new Map);let n=e.get(r);void 0===n?(t=tq(),e.set(r,t)):t=n}}let s=t,u;if(1===t.s?u=t.v:(u=e.apply(null,arguments),a++),s.s=1,n){let e=i?.deref?.()??i;null!=e&&n(e,u)&&(u=e,0!==a&&a--),i="object"==typeof u&&null!==u||"function"==typeof u?new t_(u):u}return s.v=u,u}return o.clearCache=()=>{r=tq(),o.resetResultsCount()},o.resultsCount=()=>a,o.resetResultsCount=()=>{a=0},o}var tj=function(e,...t){let r="function"==typeof e?{memoize:e,memoizeOptions:t}:e,n=(...e)=>{let t,n=0,i=0,a,o={},s=e.pop();"object"==typeof s&&(o=s,s=e.pop()),function(e,t=`expected a function, instead received ${typeof e}`){if("function"!=typeof e)throw TypeError(t)}(s,`createSelector expects an output function after the inputs, but received: [${typeof s}]`);let{memoize:u,memoizeOptions:c=[],argsMemoize:l=tU,argsMemoizeOptions:d=[],devModeChecks:h={}}={...r,...o},p=tT(c),f=tT(d),g=(function(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(e=>"function"==typeof e)){let r=e.map(e=>"function"==typeof e?`function ${e.name||"unnamed"}()`:typeof e).join(", ");throw TypeError(`${t}[${r}]`)}}(t=Array.isArray(e[0])?e[0]:e,"createSelector expects all input-selectors to be functions, but received the following types: "),t),m=u(function(){return n++,s.apply(null,arguments)},...p);return Object.assign(l(function(){i++;let e=function(e,t){let r=[],{length:n}=e;for(let i=0;i<n;i++)r.push(e[i].apply(null,t));return r}(g,arguments);return a=m.apply(null,e)},...f),{resultFunc:s,memoizedResultFunc:m,dependencies:g,dependencyRecomputations:()=>i,resetDependencyRecomputations:()=>{i=0},lastResult:()=>a,recomputations:()=>n,resetRecomputations:()=>{n=0},memoize:u,argsMemoize:l})};return Object.assign(n,{withTypes:()=>n}),n}(tU),tM=Object.assign((e,t=tj)=>{!function(e,t=`expected an object, instead received ${typeof e}`){if("object"!=typeof e)throw TypeError(t)}(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);return t(r.map(t=>e[t]),(...e)=>e.reduce((e,t,n)=>(e[r[n]]=t,e),{}))},{withTypes:()=>tM});function tP(e){return({dispatch:t,getState:r})=>n=>i=>"function"==typeof i?i(t,r,e):n(i)}var t$=tP(),tF="u">typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!=arguments.length)return"object"==typeof arguments[0]?eW:eW.apply(null,arguments)};function tL(e,t){function r(...n){if(t){let r=t(...n);if(!r)throw Error(rc(0));return{type:e,payload:r.payload,..."meta"in r&&{meta:r.meta},..."error"in r&&{error:r.error}}}return{type:e,payload:n[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=t=>eJ(t)&&t.type===e,r}var tN=class e extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,e.prototype)}static get[Symbol.species](){return e}concat(...e){return super.concat.apply(this,e)}prepend(...t){return 1===t.length&&Array.isArray(t[0])?new e(...t[0].concat(this)):new e(...t.concat(this))}};function tz(e){return e3(e)?tD(e,()=>{}):e}function tQ(e,t,r){if(e.has(t)){let n=e.get(t);return r.update&&(n=r.update(n,t,e),e.set(t,n)),n}if(!r.insert)throw Error(rc(10));let n=r.insert(t,e);return e.set(t,n),n}var tV="RTK_autoBatch",tB=()=>e=>({payload:e,meta:{[tV]:!0}}),tH=e=>t=>{setTimeout(t,e)},tY="u">typeof window&&window.requestAnimationFrame?window.requestAnimationFrame:tH(10);function tG(e){let t={},r=[],n,i={addCase(e,r){let n="string"==typeof e?e:e.type;if(!n)throw Error(rc(28));if(n in t)throw Error(rc(29));return t[n]=r,i},addMatcher:(e,t)=>(r.push({matcher:e,reducer:t}),i),addDefaultCase:e=>(n=e,i)};return e(i),[t,r,n]}function tK(e,t){let[r,n,i]=tG(t),a;if("function"==typeof e)a=()=>tz(e());else{let t=tz(e);a=()=>t}function o(e=a(),t){let s=[r[t.type],...n.filter(({matcher:e})=>e(t)).map(({reducer:e})=>e)];return 0===s.filter(e=>!!e).length&&(s=[i]),s.reduce((e,r)=>{if(r)if(e5(e)){let n=r(e,t);return void 0===n?e:n}else{if(e3(e))return tD(e,e=>r(e,t));{let n=r(e,t);if(void 0===n){if(null===e)return e;throw Error(rc(9))}return n}}return e},e)}return o.getInitialState=a,o}var tW=(e,t)=>e&&"function"==typeof e.match?e.match(t):e(t);function tJ(...e){return t=>e.some(e=>tW(e,t))}function tZ(...e){return t=>e.every(e=>tW(e,t))}function tX(e,t){if(!e||!e.meta)return!1;let r="string"==typeof e.meta.requestId,n=t.indexOf(e.meta.requestStatus)>-1;return r&&n}function t0(e){return"function"==typeof e[0]&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function t1(...e){return 0===e.length?e=>tX(e,["pending"]):t0(e)?tJ(...e.map(e=>e.pending)):t1()(e[0])}function t2(...e){return 0===e.length?e=>tX(e,["rejected"]):t0(e)?tJ(...e.map(e=>e.rejected)):t2()(e[0])}function t5(...e){return 0===e.length||t0(e)?tZ(t2(...e),e=>e&&e.meta&&e.meta.rejectedWithValue):t5()(e[0])}function t3(...e){return 0===e.length?e=>tX(e,["fulfilled"]):t0(e)?tJ(...e.map(e=>e.fulfilled)):t3()(e[0])}function t4(...e){return 0===e.length?e=>tX(e,["pending","fulfilled","rejected"]):t0(e)?tJ(...e.flatMap(e=>[e.pending,e.rejected,e.fulfilled])):t4()(e[0])}var t6=(e=21)=>{let t="",r=e;for(;r--;)t+="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW"[64*Math.random()|0];return t},t8=["name","message","stack","code"],t9=class{constructor(e,t){E(this,"_type"),this.payload=e,this.meta=t}},t7=class{constructor(e,t){E(this,"_type"),this.payload=e,this.meta=t}},re=(()=>{function e(e,t,r){let n=tL(e+"/fulfilled",(e,t,r,n)=>({payload:e,meta:{...n||{},arg:r,requestId:t,requestStatus:"fulfilled"}})),i=tL(e+"/pending",(e,t,r)=>({payload:void 0,meta:{...r||{},arg:t,requestId:e,requestStatus:"pending"}})),a=tL(e+"/rejected",(e,t,n,i,a)=>({payload:i,error:(r&&r.serializeError||(e=>{if("object"==typeof e&&null!==e){let t={};for(let r of t8)"string"==typeof e[r]&&(t[r]=e[r]);return t}return{message:String(e)}}))(e||"Rejected"),meta:{...a||{},arg:n,requestId:t,rejectedWithValue:!!i,requestStatus:"rejected",aborted:e?.name==="AbortError",condition:e?.name==="ConditionError"}}));return Object.assign(function(e){return(o,s,u)=>{let c=r?.idGenerator?r.idGenerator(e):t6(),l=new AbortController,d,h;function p(e){h=e,l.abort()}
8let f=async function(){let f;try{var g;let a=r?.condition?.(e,{getState:s,extra:u});if(g=a,null!==g&&"object"==typeof g&&"function"==typeof g.then&&(a=await a),!1===a||l.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let m=new Promise((e,t)=>{d=()=>{t({name:"AbortError",message:h||"Aborted"})},l.signal.addEventListener("abort",d)});o(i(c,e,r?.getPendingMeta?.({requestId:c,arg:e},{getState:s,extra:u}))),f=await Promise.race([m,Promise.resolve(t(e,{dispatch:o,getState:s,extra:u,requestId:c,signal:l.signal,abort:p,rejectWithValue:(e,t)=>new t9(e,t),fulfillWithValue:(e,t)=>new t7(e,t)})).then(t=>{if(t instanceof t9)throw t;return t instanceof t7?n(t.payload,c,e,t.meta):n(t,c,e)})])}catch(t){f=t instanceof t9?a(null,c,e,t.payload,t.meta):a(t,c,e)}finally{d&&l.signal.removeEventListener("abort",d)}return r&&!r.dispatchConditionRejection&&a.match(f)&&f.meta.condition||o(f),f}();return Object.assign(f,{abort:p,requestId:c,arg:e,unwrap:()=>f.then(rt)})}},{pending:i,rejected:a,fulfilled:n,settled:tJ(a,n),typePrefix:e})}return e.withTypes=()=>e,e})();function rt(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}var rr=Symbol.for("rtk-slice-createasyncthunk"),rn=function({creators:e}={}){let t=e?.asyncThunk?.[rr];return function(e){let{name:r,reducerPath:n=r}=e;if(!r)throw Error(rc(11));let i=("function"==typeof e.reducers?e.reducers(function(){function e(e,t){return{_reducerDefinitionType:"asyncThunk",payloadCreator:e,...t}}return e.withTypes=()=>e,{reducer:e=>Object.assign({[e.name]:(...t)=>e(...t)}[e.name],{_reducerDefinitionType:"reducer"}),preparedReducer:(e,t)=>({_reducerDefinitionType:"reducerWithPrepare",prepare:e,reducer:t}),asyncThunk:e}}()):e.reducers)||{},a=Object.keys(i),o={},s={},u={},c=[],l={addCase(e,t){let r="string"==typeof e?e:e.type;if(!r)throw Error(rc(12));if(r in s)throw Error(rc(13));return s[r]=t,l},addMatcher:(e,t)=>(c.push({matcher:e,reducer:t}),l),exposeAction:(e,t)=>(u[e]=t,l),exposeCaseReducer:(e,t)=>(o[e]=t,l)};function d(){let[t={},r=[],n]="function"==typeof e.extraReducers?tG(e.extraReducers):[e.extraReducers],i={...t,...s};return tK(e.initialState,e=>{for(let t in i)e.addCase(t,i[t]);for(let t of c)e.addMatcher(t.matcher,t.reducer);for(let t of r)e.addMatcher(t.matcher,t.reducer);n&&e.addDefaultCase(n)})}a.forEach(n=>{let a=i[n],o={reducerName:n,type:`${r}/${n}`,createNotation:"function"==typeof e.reducers};"asyncThunk"===a._reducerDefinitionType?function({type:e,reducerName:t},r,n,i){if(!i)throw Error(rc(18));let{payloadCreator:a,fulfilled:o,pending:s,rejected:u,settled:c,options:l}=r,d=i(e,a,l);n.exposeAction(t,d),o&&n.addCase(d.fulfilled,o),s&&n.addCase(d.pending,s),u&&n.addCase(d.rejected,u),c&&n.addMatcher(d.settled,c),n.exposeCaseReducer(t,{fulfilled:o||ri,pending:s||ri,rejected:u||ri,settled:c||ri})}(o,a,l,t):function({type:e,reducerName:t,createNotation:r},n,i){let a,o;if("reducer"in n){if(r&&"reducerWithPrepare"!==n._reducerDefinitionType)throw Error(rc(17));a=n.reducer,o=n.prepare}else a=n;i.addCase(e,a).exposeCaseReducer(t,a).exposeAction(t,o?tL(e,o):tL(e))}(o,a,l)});let h=e=>e,p=new Map,f;function g(e,t){return f||(f=d()),f(e,t)}function m(){return f||(f=d()),f.getInitialState()}function y(t,r=!1){function n(e){let n=e[t];return typeof n>"u"&&r&&(n=m()),n}function i(t=h){let n=tQ(p,r,{insert:()=>new WeakMap});return tQ(n,t,{insert:()=>{let n={};for(let[i,a]of Object.entries(e.selectors??{}))n[i]=function(e,t,r,n){function i(a,...o){let s=t(a);return typeof s>"u"&&n&&(s=r()),e(s,...o)}return i.unwrapped=e,i}(a,t,m,r);return n}})}return{reducerPath:t,getSelectors:i,get selectors(){return i(n)},selectSlice:n}}let v={name:r,reducer:g,actions:u,caseReducers:o,getInitialState:m,...y(n),injectInto(e,{reducerPath:t,...r}={}){let i=t??n;return e.inject({reducerPath:i,reducer:g},r),{...v,...y(i,!0)}}};return v}}();function ri(){}var{assign:ra}=Object,ro="listenerMiddleware",rs=ra(tL(`${ro}/add`),{withTypes:()=>rs});tL(`${ro}/removeAll`);var ru=ra(tL(`${ro}/remove`),{withTypes:()=>ru});function rc(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 rl=new es({required:!0,emptyAllowed:!1}),rd=new es({required:!1,emptyAllowed:!1}),rh=new es({required:!0,emptyAllowed:!0});new es({required:!1,emptyAllowed:!0});var rp=new ed({each:rl,required:!0}),rf=new es({required:!1,emptyAllowed:!1,regex:/^\d+\.\d+\.\d+$/}),rg=(e,t)=>{if("required"in t)return{payload:new J({value:t}
8).validate({value:e}).value};let r=new ec({options:{required:!0},values:t}).validate(e);if(r)throw new W(r);return{payload:e}},rm=(e,t)=>{try{return rg(e,t)}catch(t){return{payload:e,error:(({message:e,name:t,stack:r})=>({message:e,name:t,stack:r}))(t)}}},ry=(e,t,r,n)=>rv(e,t,r,`Check the options of ${n}`,"Controller initialization error"),rv=(e,t,r,n,i)=>{try{return t.validate(r,n)}catch(t){throw e.logger.error(t,i),t}},rb="2.80.7",rw=tL("configuration/updateBasicConfiguration",e=>rm(e,{accessToken:rd,organizationId:rd,platformUrl:rd})),rS=tL("configuration/updateSearchConfiguration",e=>rm(e,{apiBaseUrl:rd,pipeline:new es({required:!1,emptyAllowed:!0}),searchHub:rd,timezone:rd,locale:rd,authenticationProviders:new ed({required:!1,each:rl})})),rk={enabled:new en({default:!0}),originContext:rd,originLevel2:rd,originLevel3:rd,apiBaseUrl:rd,nextApiBaseUrl:rd,runtimeEnvironment:new Z,anonymous:new en({default:!1}),deviceId:rd,userDisplayName:rd,documentLocation:rd,trackingId:rd,analyticsMode:new es({constrainTo:["legacy","next"],required:!1,default:"legacy"}),source:new ec({options:{required:!1},values:["@coveo/atomic","@coveo/quantic"].reduce((e,t)=>(e[t]=rf,e),{})})},rI=tL("configuration/updateAnalyticsConfiguration",e=>rm(e,rk)),rC=tL("configuration/analytics/disable"),rA=tL("configuration/analytics/enable"),rO=tL("configuration/analytics/originlevel2",e=>rm(e,{originLevel2:rl})),rE=tL("configuration/analytics/originlevel3",e=>rm(e,{originLevel3:rl}));function rD(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)0>t.indexOf(n[i])&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r}function rR(e,t,r,n){return new(r||(r=Promise))(function(i,a){function o(e){try{u(n.next(e))}catch(e){a(e)}}function s(e){try{u(n.throw(e))}catch(e){a(e)}}function u(e){var t;e.done?i(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(o,s)}u((n=n.apply(e,t||[])).next())})}function rx(){return"u">typeof window}function rT(){return"u">typeof navigator}function r_(){return"u">typeof document}function rq(){try{return"u">typeof localStorage}catch{return!1}}function rU(){return rT()&&navigator.cookieEnabled}(rL=rz||(rz={})).search="search",rL.click="click",rL.custom="custom",rL.view="view",rL.collect="collect";var rj=[rz.click,rz.custom,rz.search,rz.view],rM=(e,t)=>-1!==rj.indexOf(e)?Object.assign({language:r_()?document.documentElement.lang:"unknown",userAgent:rT()?navigator.userAgent:"unknown"},t):t,rP=class e{static set(e,t,r){var n,i,a;r&&(n=new Date).setTime(n.getTime()+r),-1===(a=window.location.hostname).indexOf(".")?r$(e,t,n):r$(e,t,n,(i=a.split("."))[i.length-2]+"."+i[i.length-1])}static get(e){for(var t=e+"=",r=document.cookie.split(";"),n=0;n<r.length;n++){var i=r[n];if(0===(i=i.replace(/^\s+/,"")).lastIndexOf(t,0))return i.substring(t.length,i.length)}return null}static erase(t){e.set(t,"",-1)}};function r$(e,t,r,n){document.cookie=`${e}=${t}`+(r?`;expires=${r.toUTCString()}`:"")+(n?`;domain=${n}`:"")+";path=/;SameSite=Lax"}var rF=class e{getItem(t){return rP.get(`${e.prefix}${t}`)}removeItem(t){rP.erase(`${e.prefix}${t}`)}setItem(t,r,n){rP.set(`${e.prefix}${t}`,r,n)}};rF.prefix="coveo_";var rL,rN,rz,rQ,rV=class{constructor(){this.cookieStorage=new rF}getItem(e){return localStorage.getItem(e)||this.cookieStorage.getItem(e)}removeItem(e){this.cookieStorage.removeItem(e),localStorage.removeItem(e)}setItem(e,t){localStorage.setItem(e,t),this.cookieStorage.setItem(e,t,31556926e3)}},rB=class{getItem(e){return null}removeItem(e){}setItem(e,t){}},rH="__coveo.analytics.history",rY=class{constructor(e){this.store=e||(rq()?localStorage:rU()?new rF:!function(){try{return"u">typeof sessionStorage}catch{return!1}}()?new rB:sessionStorage)}addElement(e){e.internalTime=new Date().getTime(),e=this.cropQueryElement(this.stripEmptyQuery(e));let t=this.getHistoryWithInternalTime();null!=t?this.isValidEntry(e)&&this.setHistory([e].concat(t)):this.setHistory([e])}addElementAsync(e){return rR(this,void 0,void 0,function*(){e.internalTime=new Date().getTime(),e=this.cropQueryElement(this.stripEmptyQuery(e));let t=yield this.getHistoryWithInternalTimeAsync();null!=t?this.isValidEntry(e)&&this.setHistory([e].concat(t)):this.setHistory([e])})}getHistory(){let e=this.getHistoryWithInternalTime();return this.stripEmptyQueries(this.stripInternalTime(e))}getHistoryAsync(){return rR(this,void 0,void 0,function*(){let e=yield this.getHistoryWithInternalTimeAsync();return this.stripEmptyQueries(this.stripInternalTime(e))})}getHistoryWithInternalTime(){try{let e=this.store.getItem(rH);return e&&"string"==typeof e?JSON.parse(e):[]}catch{return[]}}getHistoryWithInternalTimeAsync(){return rR(this,void 0,void 0,function*(){try{let e=yield this.store.getItem(rH);return e?JSON.parse(e):[]}catch{return[]}})}setHistory(e){try{this.store.setItem(rH,JSON.stringify(e.slice(0,20)))}catch{}}clear(){try{this.store.removeItem(rH)}catch{}}getMostRecentElement(){let e=this.getHistoryWithInternalTime();return Array.isArray(e)?e.sort((e,t)=>
8(t.internalTime||0)-(e.internalTime||0))[0]:null}cropQueryElement(e){return e.name&&e.value&&"query"===e.name.toLowerCase()&&(e.value=e.value.slice(0,75)),e}isValidEntry(e){let t=this.getMostRecentElement();return!t||t.value!=e.value||(e.internalTime||0)-(t.internalTime||0)>6e4}stripInternalTime(e){return Array.isArray(e)?e.map(e=>{let{name:t,time:r,value:n}=e;return{name:t,time:r,value:n}}):[]}stripEmptyQuery(e){let{name:t,time:r,value:n}=e;return t&&"string"==typeof n&&"query"===t.toLowerCase()&&""===n.trim()?{name:t,time:r}:e}stripEmptyQueries(e){return e.map(e=>this.stripEmptyQuery(e))}},rG=Object.freeze({__proto__:null,HistoryStore:rY,MAX_NUMBER_OF_HISTORY_ELEMENTS:20,MAX_VALUE_SIZE:75,MIN_THRESHOLD_FOR_DUPLICATE_VALUE:6e4,STORE_KEY:rH,default:rY}),rK=(e,t)=>rR(void 0,void 0,void 0,function*(){return e===rz.view?(yield rW(t.contentIdValue),Object.assign({location:window.location.toString(),referrer:document.referrer,title:document.title},t)):t}),rW=e=>rR(void 0,void 0,void 0,function*(){let t=new rY,r={name:"PageView",value:e,time:new Date().toISOString()};yield t.addElementAsync(r)}),rJ=new Uint8Array(16),rZ=/^(?:[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 rX(e){return"string"==typeof e&&rZ.test(e)}var r0=[];for(let e=0;e<256;++e)r0.push((e+256).toString(16).slice(1));function r1(e,t=0){return(r0[e[t+0]]+r0[e[t+1]]+r0[e[t+2]]+r0[e[t+3]]+"-"+r0[e[t+4]]+r0[e[t+5]]+"-"+r0[e[t+6]]+r0[e[t+7]]+"-"+r0[e[t+8]]+r0[e[t+9]]+"-"+r0[e[t+10]]+r0[e[t+11]]+r0[e[t+12]]+r0[e[t+13]]+r0[e[t+14]]+r0[e[t+15]]).toLowerCase()}var r2="u">typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);function r5(e,t,r){if(r2&&!t&&!e)return r2();let n=(e=e||{}).random||(e.rng||function(){if(!rQ&&!(rQ="u">typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return rQ(rJ)})();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){r=r||0;for(let e=0;e<16;++e)t[r+e]=n[e];return t}return r1(n)}function r3(e,t){return e<<t|e>>>32-t}var r4=function(e){function t(t,r,n,i){var a;if("string"==typeof t&&(t=function(e){e=unescape(encodeURIComponent(e));let t=[];for(let r=0;r<e.length;++r)t.push(e.charCodeAt(r));return t}(t)),"string"==typeof r&&(r=function(e){if(!rX(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]=255&t,r[4]=(t=parseInt(e.slice(9,13),16))>>>8,r[5]=255&t,r[6]=(t=parseInt(e.slice(14,18),16))>>>8,r[7]=255&t,r[8]=(t=parseInt(e.slice(19,23),16))>>>8,r[9]=255&t,r[10]=(t=parseInt(e.slice(24,36),16))/0x10000000000&255,r[11]=t/0x100000000&255,r[12]=t>>>24&255,r[13]=t>>>16&255,r[14]=t>>>8&255,r[15]=255&t,r}(r)),(null==(a=r)?void 0:a.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let o=new Uint8Array(16+t.length);if(o.set(r),o.set(t,r.length),(o=e(o))[6]=15&o[6]|80,o[8]=63&o[8]|128,n){i=i||0;for(let e=0;e<16;++e)n[i+e]=o[e];return n}return r1(o)}try{t.name="v5"}catch{}return t.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",t.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",t}(function(e){let t=[0x5a827999,0x6ed9eba1,0x8f1bbcdc,0xca62c1d6],r=[0x67452301,0xefcdab89,0x98badcfe,0x10325476,0xc3d2e1f0];if("string"==typeof e){let t=unescape(encodeURIComponent(e));e=[];for(let r=0;r<t.length;++r)e.push(t.charCodeAt(r))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);let n=Math.ceil((e.length/4+2)/16),i=Array(n);for(let t=0;t<n;++t){let r=new Uint32Array(16);for(let n=0;n<16;++n)r[n]=e[64*t+4*n]<<24|e[64*t+4*n+1]<<16|e[64*t+4*n+2]<<8|e[64*t+4*n+3];i[t]=r}i[n-1][14]=(e.length-1)*8/0x100000000,i[n-1][14]=Math.floor(i[n-1][14]),i[n-1][15]=(e.length-1)*8|0;for(let e=0;e<n;++e){let n=new Uint32Array(80);for(let t=0;t<16;++t)n[t]=i[e][t];for(let e=16;e<80;++e)n[e]=r3(n[e-3]^n[e-8]^n[e-14]^n[e-16],1);let a=r[0],o=r[1],s=r[2],u=r[3],c=r[4];for(let e=0;e<80;++e){let r=Math.floor(e/20),i=r3(a,5)+function(e,t,r,n){switch(e){case 0:return t&r^~t&n;case 1:case 3:return t^r^n;case 2:return t&r^t&n^r&n}}(r,o,s,u)+c+t[r]+n[e]>>>0;c=u,u=s,s=r3(o,30)>>>0,o=a,a=i}r[0]=r[0]+a>>>0,r[1]=r[1]+o>>>0,r[2]=r[2]+s>>>0,r[3]=r[3]+u>>>0,r[4]=r[4]+c>>>0}return[r[0]>>24&255,r[0]>>16&255,r[0]>>8&255,255&r[0],r[1]>>24&255,r[1]>>16&255,r[1]>>8&255,255&r[1],r[2]>>24&255,r[2]>>16&255,r[2]>>8&255,255&r[2],r[3]>>24&255,r[3]>>16&255,r[3]>>8&255,255&r[3],r[4]>>24&255,r[4]>>16&255,r[4]>>8&255,255&r[4]]}),r6="2.30.38",r8=class e{constructor(e,t){if(!rX(e))throw Error("Not a valid uuid");this.clientId=e,this.creationDate=Math.floor(t/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(e,t){return!this.expired&&this.matchReferrer(e,t)}matchReferrer(e,t){try{let r=new URL(e);return t.some(e=>RegExp(e.replace(/\\/g,"\\\\").replace(/\./g,"\\.").replace(/\*/g,".*")+"$").test(r.host))}catch{return!1}}static fromString(t){let r=t.split(".");if(2!==r.length)return null;let[n,i]=r;if(32!==n.length||isNaN(parseInt(i)))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 rX(a)?new e(a,1e3*Number.parseInt(i)):null}};r8.cvo_cid="cvo_cid",r8.expirationTime=120;var r9=Object.keys;function r7(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)}var ne={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"},nt=[...r9(ne).map(e=>ne[e])].join("|"),nr=RegExp(`^(${nt}$)`),nn=[e=>nr.test(e)],ni={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",price:"pr",quantity:"qt",coupon:"cc",position:"ps",group:"group"},na={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",position:"ps",price:"pr",group:"group"},no={action:"pa",list:"pal",listSource:"pls"},ns={id:"ti",revenue:"tr",tax:"tt",shipping:"ts",coupon:"tcc",affiliation:"ta",step:"cos",option:"col"},nu={id:"quoteId",affiliation:"quoteAffiliation"},nc={id:"reviewId",rating:"reviewRating",comment:"reviewComment"},nl={add:no,bookmark_add:no,bookmark_remove:no,click:no,checkout:no,checkout_option:no,detail:no,impression:no,remove:no,refund:Object.assign(Object.assign({},no),ns),purchase:Object.assign(Object.assign({},no),ns),quickview:no,quote:Object.assign(Object.assign({},no),nu),review:Object.assign(Object.assign({},no),nc)},nd=r9(ni).map(e=>ni[e]),nh=r9(na).map(e=>na[e]),np=r9(no).map(e=>no[e]),nf=r9(ns).map(e=>ns[e]),ng=r9(nc).map(e=>nc[e]),nm=r9(nu).map(e=>nu[e]),ny=[...nd,"custom"].join("|"),nv=[...nh,"custom"].join("|"),nb="(pr[0-9]+)",nw="(il[0-9]+pi[0-9]+)",nS=RegExp(`^${nb}(${ny})$`),nk=RegExp(`^(${nw}(${nv}))|(il[0-9]+nm)$`),nI=RegExp(`^(${np.join("|")})$`),nC=RegExp(`^(${nf.join("|")})$`),nA=RegExp(`^${nb}custom$`),nO=RegExp(`^${nw}custom$`),nE=RegExp(`^(${["loyaltyCardId","loyaltyTier","thirdPartyPersona","companyName","favoriteStore","storeName","userIndustry","userRole","userDepartment","businessUnit",...ng,...nm].join("|")})$`),nD=[e=>nk.test(e),e=>nS.test(e),e=>nI.test(e),e=>nC.test(e),e=>
8nE.test(e)],nR=[nA,nO],nx=Object.assign(Object.assign({},Object.assign(Object.assign(Object.assign(Object.assign({},{anonymizeIp:"aip"}),{eventCategory:"ec",eventAction:"ea",eventLabel:"el",eventValue:"ev",page:"dp",visitorId:"cid",clientId:"cid",userId:"uid",currencyCode:"cu"}),{hitType:"t",pageViewId:"pid",encoding:"de",location:"dl",referrer:"dr",screenColor:"sd",screenResolution:"sr",title:"dt",userAgent:"ua",language:"ul",eventId:"z",time:"tm"}),["contentId","contentIdKey","contentType","searchHub","tab","searchUid","permanentId","contentLocale","trackingId"].reduce((e,t)=>Object.assign(Object.assign({},e),{[t]:t}),{}))),{svcAction:"svc_action",svcActionData:"svc_action_data"}),nT=r9(nx).map(e=>nx[e]),n_=e=>-1!==nT.indexOf(e),nq=e=>"custom"===e,nU=class{constructor(e){this.opts=e}sendEvent(e,t){return rR(this,void 0,void 0,function*(){if(!this.isAvailable())throw Error('navigator.sendBeacon is not supported in this browser. Consider adding a polyfill like "sendbeacon-polyfill".');let{baseUrl:r,preprocessRequest:n}=this.opts,i=yield this.getQueryParamsForEventType(e),{url:a,payload:o}=yield this.preProcessRequestAsPotentialJSONString(`${r}/analytics/${e}?${i}`,t,n),s=new Blob([this.encodeForEventType(e,o)],{type:"application/x-www-form-urlencoded"});navigator.sendBeacon(a,s)})}isAvailable(){return"sendBeacon"in navigator}deleteHttpCookieVisitorId(){return Promise.resolve()}preProcessRequestAsPotentialJSONString(e,t,r){return rR(this,void 0,void 0,function*(){let n=e,i=t;if(r){let{url:a,body:o}=yield r({url:e,body:JSON.stringify(t)},"analyticsBeacon");n=a||e;try{i=JSON.parse(o)}catch(e){console.error("Unable to process the request body as a JSON string",e)}}return{payload:i,url:n}})}encodeForEventType(e,t){return this.isEventTypeLegacy(e)?this.encodeEventToJson(e,t):this.encodeEventToJson(e,t,this.opts.token)}getQueryParamsForEventType(e){return rR(this,void 0,void 0,function*(){let{token:t,visitorIdProvider:r}=this.opts,n=yield r.getCurrentVisitorId();return[t&&this.isEventTypeLegacy(e)?`access_token=${t}`:"",n?`visitorId=${n}`:"","discardVisitInfo=true"].filter(e=>!!e).join("&")})}isEventTypeLegacy(e){return -1!==[rz.click,rz.custom,rz.search,rz.view].indexOf(e)}encodeEventToJson(e,t,r){let n=`${e}Event=${encodeURIComponent(JSON.stringify(t))}`;return r&&(n=`access_token=${encodeURIComponent(r)}&${n}`),n}},nj=class{sendEvent(e,t){return rR(this,void 0,void 0,function*(){return Promise.resolve()})}deleteHttpCookieVisitorId(){return rR(this,void 0,void 0,function*(){return Promise.resolve()})}},nM=class{constructor(e){this.opts=e}sendEvent(e,t){return rR(this,void 0,void 0,function*(){let{baseUrl:r,visitorIdProvider:n,preprocessRequest:i}=this.opts,a=this.shouldAppendVisitorId(e)?yield this.getVisitorIdParam():"",o={url:`${r}/analytics/${e}${a}`,credentials:"include",mode:"cors",headers:this.getHeaders(),method:"POST",body:JSON.stringify(t)},s=Object.assign(Object.assign({},o),i?yield i(o,"analyticsFetch"):{}),{url:u}=s,c=rD(s,["url"]),l;try{l=yield fetch(u,c)}catch(e){console.error("An error has occured when sending the event.",e);return}if(l.ok){let e=yield l.json();return e.visitorId&&n.setCurrentVisitorId(e.visitorId),e}try{l.json()}catch{}throw console.error(`An error has occured when sending the "${e}" event.`,l,t),Error(`An error has occurred when sending the "${e}" event. Check the console logs for more details.`)})}deleteHttpCookieVisitorId(){return rR(this,void 0,void 0,function*(){let{baseUrl:e}=this.opts,t=`${e}/analytics/visit`;yield fetch(t,{headers:this.getHeaders(),method:"DELETE"})})}shouldAppendVisitorId(e){return -1!==[rz.click,rz.custom,rz.search,rz.view].indexOf(e)}getVisitorIdParam(){return rR(this,void 0,void 0,function*(){let{visitorIdProvider:e}=this.opts,t=yield e.getCurrentVisitorId();return t?`?visitor=${t}`:""})}getHeaders(){let{token:e}=this.opts;return Object.assign(Object.assign({},e?{Authorization:`Bearer ${e}`}:{}),{"Content-Type":"application/json"})}},nP=class{constructor(e,t){rq()&&rU()?this.storage=new rV:rq()?this.storage=localStorage:(console.warn("BrowserRuntime detected no valid storage available.",this),this.storage=new rB),this.client=new nM(e),this.beaconClient=new nU(e),window.addEventListener("beforeunload",()=>{for(let{eventType:e,payload:r}of t())this.beaconClient.sendEvent(e,r)})}
8getClientDependingOnEventType(e){return"click"===e&&this.beaconClient.isAvailable()?this.beaconClient:this.client}},n$=class{constructor(e,t){this.storage=t||new rB,this.client=new nM(e)}getClientDependingOnEventType(e){return this.client}},nF=class{constructor(){this.storage=new rB,this.client=new nj}getClientDependingOnEventType(e){return this.client}},nL=`
9        We've detected you're using React Native but have not provided the corresponding runtime, 
10        for an optimal experience please use the "coveo.analytics/react-native" subpackage.
11        Follow the Readme on how to set it up: https://github.com/coveo/coveo.analytics.js#using-react-native
12    `,nN=["1",1,"yes",!0];function nz(){return rT()&&[navigator.globalPrivacyControl,navigator.doNotTrack,navigator.msDoNotTrack,window.doNotTrack].some(e=>-1!==nN.indexOf(e))}var nQ,nV="https://analytics.cloud.coveo.com/rest/ua",nB=class{get defaultOptions(){return{endpoint:nV,isCustomEndpoint:!1,token:"",version:"v15",beforeSendHooks:[],afterSendHooks:[]}}get version(){return r6}constructor(e){if(this.acceptedLinkReferrers=[],!e)throw Error("You have to pass options to this constructor");this.options=Object.assign(Object.assign({},this.defaultOptions),e),this.visitorId="",this.bufferedRequests=[],this.beforeSendHooks=[rK,rM].concat(this.options.beforeSendHooks),this.afterSendHooks=this.options.afterSendHooks,this.eventTypeMapping={};let t={baseUrl:this.baseUrl,token:this.options.token,visitorIdProvider:this,preprocessRequest:this.options.preprocessRequest};nz()?this.runtime=new nF:this.runtime=this.options.runtimeEnvironment||this.initRuntime(t),this.addEventTypeMapping(rz.view,{newEventType:rz.view,addClientIdParameter:!0}),this.addEventTypeMapping(rz.click,{newEventType:rz.click,addClientIdParameter:!0}),this.addEventTypeMapping(rz.custom,{newEventType:rz.custom,addClientIdParameter:!0}),this.addEventTypeMapping(rz.search,{newEventType:rz.search,addClientIdParameter:!0})}initRuntime(e){return rx()&&r_()?new nP(e,()=>{let e=[...this.bufferedRequests];return this.bufferedRequests=[],e}):("u">typeof navigator&&"ReactNative"==navigator.product&&console.warn(nL),new n$(e))}get storage(){return this.runtime.storage}determineVisitorId(){return rR(this,void 0,void 0,function*(){try{return rx()&&this.extractClientIdFromLink(window.location.href)||(yield this.storage.getItem("visitorId"))||r5()}catch(e){return console.log("Could not get visitor ID from the current runtime environment storage. Using a random ID instead.",e),r5()}})}getCurrentVisitorId(){return rR(this,void 0,void 0,function*(){if(!this.visitorId){let e=yield this.determineVisitorId();yield this.setCurrentVisitorId(e)}return this.visitorId})}setCurrentVisitorId(e){return rR(this,void 0,void 0,function*(){this.visitorId=e,yield this.storage.setItem("visitorId",e)})}setClientId(e,t){return rR(this,void 0,void 0,function*(){if(rX(e))this.setCurrentVisitorId(e.toLowerCase());else{if(!t)throw Error("Cannot generate uuid client id without a specific namespace string.");this.setCurrentVisitorId(r4(e,r4(t,"38824e1f-37f5-42d3-8372-a4b8fa9df946")))}})}getParameters(e,...t){return rR(this,void 0,void 0,function*(){return yield this.resolveParameters(e,...t)})}getPayload(e,...t){return rR(this,void 0,void 0,function*(){let r=yield this.resolveParameters(e,...t);return yield this.resolvePayloadForParameters(e,r)})}get currentVisitorId(){return"string"!=typeof(this.visitorId||this.storage.getItem("visitorId"))&&this.setCurrentVisitorId(r5()),this.visitorId}set currentVisitorId(e){this.visitorId=e,this.storage.setItem("visitorId",e)}extractClientIdFromLink(e){if(nz())return null;try{let t=new URL(e).searchParams.get(r8.cvo_cid);if(null==t)return null;let r=r8.fromString(t);return r&&r_()&&r.validate(document.referrer,this.acceptedLinkReferrers)?r.clientId:null}catch{}return null}resolveParameters(e,...t){return rR(this,void 0,void 0,function*(){let{variableLengthArgumentsNames:r=[],addVisitorIdParameter:n=!1,usesMeasurementProtocol:i=!1,addClientIdParameter:a=!1}=this.eventTypeMapping[e]||{};return yield[e=>r.length>0?this.parseVariableArgumentsPayload(r,e):e[0],e=>rR(this,void 0,void 0,function*(){return Object.assign(Object.assign({},e),{visitorId:n?yield this.getCurrentVisitorId():""})}),e=>rR(this,void 0,void 0,function*(){return a?Object.assign(Object.assign({},e),{clientId:yield this.getCurrentVisitorId()}):e}),e=>i?this.ensureAnonymousUserWhenUsingApiKey(e):e,t=>this.beforeSendHooks.reduce((t,r)=>rR(this,void 0,void 0,function*(){let n=yield t;return yield r(e,n)}),t)].reduce((e,t)=>
12rR(this,void 0,void 0,function*(){let r=yield e;return yield t(r)}),Promise.resolve(t))})}resolvePayloadForParameters(e,t){return rR(this,void 0,void 0,function*(){let{usesMeasurementProtocol:r=!1}=this.eventTypeMapping[e]||{};return yield[e=>this.setTrackingIdIfTrackingIdNotPresent(e),t=>this.removeEmptyPayloadValues(t,e),t=>this.validateParams(t,e),e=>{let t;return r?(t=!!e.action&&nl[e.action]||{},r9(e).reduce((r,n)=>{let i=t[n]||nx[n]||n;return Object.assign(Object.assign({},r),{[i]:e[n]})},{})):e},e=>r?this.removeUnknownParameters(e):e,e=>r?this.processCustomParameters(e):this.mapCustomParametersToCustomData(e)].reduce((e,t)=>rR(this,void 0,void 0,function*(){let r=yield e;return yield t(r)}),Promise.resolve(t))})}makeEvent(e,...t){return rR(this,void 0,void 0,function*(){let{newEventType:r=e}=this.eventTypeMapping[e]||{},n=yield this.resolveParameters(e,...t),i=yield this.resolvePayloadForParameters(e,n);return{eventType:r,payload:i,log:t=>rR(this,void 0,void 0,function*(){return this.bufferedRequests.push({eventType:r,payload:Object.assign(Object.assign({},i),t)}),yield Promise.all(this.afterSendHooks.map(r=>r(e,Object.assign(Object.assign({},n),t)))),yield this.deferExecution(),yield this.sendFromBuffer()})}})}sendEvent(e,...t){return rR(this,void 0,void 0,function*(){return(yield this.makeEvent(e,...t)).log({})})}deferExecution(){return new Promise(e=>setTimeout(e,0))}sendFromBuffer(){return rR(this,void 0,void 0,function*(){let e=this.bufferedRequests.shift();if(e){let{eventType:t,payload:r}=e;return this.runtime.getClientDependingOnEventType(t).sendEvent(t,r)}})}clear(){this.storage.removeItem("visitorId"),new rY().clear()}deleteHttpOnlyVisitorId(){this.runtime.client.deleteHttpCookieVisitorId()}makeSearchEvent(e){return rR(this,void 0,void 0,function*(){return this.makeEvent(rz.search,e)})}sendSearchEvent(e){var{searchQueryUid:t}=e,r=rD(e,["searchQueryUid"]);return rR(this,void 0,void 0,function*(){return(yield this.makeSearchEvent(r)).log({searchQueryUid:t})})}makeClickEvent(e){return rR(this,void 0,void 0,function*(){return this.makeEvent(rz.click,e)})}sendClickEvent(e){var{searchQueryUid:t}=e,r=rD(e,["searchQueryUid"]);return rR(this,void 0,void 0,function*(){return(yield this.makeClickEvent(r)).log({searchQueryUid:t})})}makeCustomEvent(e){return rR(this,void 0,void 0,function*(){return this.makeEvent(rz.custom,e)})}sendCustomEvent(e){var{lastSearchQueryUid:t}=e,r=rD(e,["lastSearchQueryUid"]);return rR(this,void 0,void 0,function*(){return(yield this.makeCustomEvent(r)).log({lastSearchQueryUid:t})})}makeViewEvent(e){return rR(this,void 0,void 0,function*(){return this.makeEvent(rz.view,e)})}sendViewEvent(e){return rR(this,void 0,void 0,function*(){return(yield this.makeViewEvent(e)).log({})})}getVisit(){return rR(this,void 0,void 0,function*(){let e=yield(yield fetch(`${this.baseUrl}/analytics/visit`)).json();return this.visitorId=e.visitorId,e})}getHealth(){return rR(this,void 0,void 0,function*(){return yield(yield fetch(`${this.baseUrl}/analytics/monitoring/health`)).json()})}registerBeforeSendEventHook(e){this.beforeSendHooks.push(e)}registerAfterSendEventHook(e){this.afterSendHooks.push(e)}addEventTypeMapping(e,t){this.eventTypeMapping[e]=t}setAcceptedLinkReferrers(e){if(Array.isArray(e)&&e.every(e=>"string"==typeof e))this.acceptedLinkReferrers=e;else throw Error("Parameter should be an array of domain strings")}parseVariableArgumentsPayload(e,t){let r={};for(let n=0,i=t.length;n<i;n++){let i=t[n];if("string"==typeof i)r[e[n]]=i;else if("object"==typeof i)return Object.assign(Object.assign({},r),i)}return r}isKeyAllowedEmpty(e,t){return -1!==(({[rz.search]:["queryText"]})[e]||[]).indexOf(t)}removeEmptyPayloadValues(e,t){return Object.keys(e).filter(r=>{let n;return this.isKeyAllowedEmpty(t,r)||"u">typeof(n=e[r])&&null!==n&&""!==n}).reduce((t,r)=>Object.assign(Object.assign({},t),{[r]:e[r]}),{})}removeUnknownParameters(e){return Object.keys(e).filter(e=>{if([...nD,...nn,n_,nq].some(t=>t(e)))return!0;console.log(e,"is not processed by coveoua")}).reduce((t,r)=>Object.assign(Object.assign({},t),{[r]:e[r]}),{})}processCustomParameters(e){let{custom:t}=e,r=rD(e,["custom"]),n={};t&&r7(t)&&(n=this.lowercaseKeys(t));let i=r9(r).reduce((e,t)=>
12{var n;let i,a,o,s=(n=t,[...nR].every(e=>{var t;return!(i=null==(t=e.exec(n))?void 0:t[1])}),i);return s?Object.assign(Object.assign({},e),(a=s,r9(o=r[t]).reduce((e,t)=>Object.assign(Object.assign({},e),{[`${a}${t}`]:o[t]}),{}))):Object.assign(Object.assign({},e),{[t]:r[t]})},{});return Object.assign(Object.assign({},n),i)}mapCustomParametersToCustomData(e){let{custom:t}=e,r=rD(e,["custom"]);if(!(t&&r7(t)))return e;{let n=this.lowercaseKeys(t);return Object.assign(Object.assign({},r),{customData:Object.assign(Object.assign({},n),e.customData)})}}lowercaseKeys(e){let t=Object.keys(e),r={};return t.forEach(t=>{r[t.toLowerCase()]=e[t]}),r}validateParams(e,t){let{anonymizeIp:r}=e,n=rD(e,["anonymizeIp"]);return void 0!==r&&-1==["0","false","undefined","null","{}","[]",""].indexOf(`${r}`.toLowerCase())&&(n.anonymizeIp=1),(t==rz.view||t==rz.click||t==rz.search||t==rz.custom)&&(n.originLevel3=this.limit(n.originLevel3,1024)),t==rz.view&&(n.location=this.limit(n.location,1024)),("pageview"==t||"event"==t)&&(n.referrer=this.limit(n.referrer,2048),n.location=this.limit(n.location,2048),n.page=this.limit(n.page,2048)),n}ensureAnonymousUserWhenUsingApiKey(e){let t,{userId:r}=e,n=rD(e,["userId"]);return(t=this.options.token,(t?.startsWith("xx")||0)&&!r)?(n.userId="anonymous",n):e}setTrackingIdIfTrackingIdNotPresent(e){let{trackingId:t}=e,r=rD(e,["trackingId"]);return t?e:(r.hasOwnProperty("custom")&&r7(r.custom)&&(r.custom.hasOwnProperty("context_website")||r.custom.hasOwnProperty("siteName"))&&(r.trackingId=r.custom.context_website||r.custom.siteName),r.hasOwnProperty("customData")&&r7(r.customData)&&(r.customData.hasOwnProperty("context_website")||r.customData.hasOwnProperty("siteName"))&&(r.trackingId=r.customData.context_website||r.customData.siteName),r)}limit(e,t){return"string"==typeof e?function(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((128&n)!=128)break;if(r-=3,(192&n)!=128){t-r>=3*((248&n)==240?4:(240&n)==224?3:(224&n)==192?2:1)&&(r=t);break}}return e.substring(0,r)}(e,t):e}get baseUrl(){return function(e=nV,t="v15",r=!1){if(e=e.replace(/\/$/,""),r)return`${e}/${t}`;let n=e.endsWith("/rest")||e.endsWith("/rest/ua");return`${e}${n?"":"/rest"}/${t}`}(this.options.endpoint,this.options.version,this.options.isCustomEndpoint)}};(o=nQ||(nQ={})).contextChanged="contextChanged",o.expandToFullUI="expandToFullUI",o.openUserActions="openUserActions",o.showPrecedingSessions="showPrecedingSessions",o.showFollowingSessions="showFollowingSessions",o.clickViewedDocument="clickViewedDocument",o.clickPageView="clickPageView",o.createArticle="createArticle",(s=p||(p={})).interfaceLoad="interfaceLoad",s.interfaceChange="interfaceChange",s.didyoumeanAutomatic="didyoumeanAutomatic",s.didyoumeanClick="didyoumeanClick",s.resultsSort="resultsSort",s.searchboxSubmit="searchboxSubmit",s.searchboxClear="searchboxClear",s.searchboxAsYouType="searchboxAsYouType",s.breadcrumbFacet="breadcrumbFacet",s.breadcrumbResetAll="breadcrumbResetAll",s.documentQuickview="documentQuickview",s.documentOpen="documentOpen",s.omniboxAnalytics="omniboxAnalytics",s.omniboxFromLink="omniboxFromLink",s.searchFromLink="searchFromLink",s.triggerNotify="notify",s.triggerExecute="execute",s.triggerQuery="query",s.undoTriggerQuery="undoQuery",s.triggerRedirect="redirect",s.pagerResize="pagerResize",s.pagerNumber="pagerNumber",s.pagerNext="pagerNext",s.pagerPrevious="pagerPrevious",s.pagerScrolling="pagerScrolling",s.staticFilterClearAll="staticFilterClearAll",s.staticFilterSelect="staticFilterSelect",s.staticFilterDeselect="staticFilterDeselect",s.facetClearAll="facetClearAll",s.facetSearch="facetSearch",s.facetSelect="facetSelect",s.facetSelectAll="facetSelectAll",s.facetDeselect="facetDeselect",s.facetExclude="facetExclude",s.facetUnexclude="facetUnexclude",s.facetUpdateSort="facetUpdateSort",s.facetShowMore="showMoreFacetResults",s.facetShowLess="showLessFacetResults",s.queryError="query",s.queryErrorBack="errorBack",s.queryErrorClear="errorClearQuery",s.queryErrorRetry="errorRetry",s.recommendation="recommendation",s.recommendationInterfaceLoad="recommendationInterfaceLoad",s.recommendationOpen="recommendationOpen",s.likeSmartSnippet="likeSmartSnippet",s.dislikeSmartSnippet="dislikeSmartSnippet",s.expandSmartSnippet="expandSmartSnippet",s.collapseSmartSnippet="collapseSmartSnippet",s.openSmartSnippetFeedbackModal="openSmartSnippetFeedbackModal",s.closeSmartSnippetFeedbackModal="closeSmartSnippetFeedbackModal",s.sendSmartSnippetReason="sendSmartSnippetReason",s.expandSmartSnippetSuggestion="expandSmartSnippetSuggestion",s.collapseSmartSnippetSuggestion="collapseSmartSnippetSuggestion",s.showMoreSmartSnippetSuggestion="showMoreSmartSnippetSuggestion",s.showLessSmartSnippetSuggestion="showLessSmartSnippetSuggestion",s.openSmartSnippetSource="openSmartSnippetSource",s.openSmartSnippetSuggestionSource="openSmartSnippetSuggestionSource",s.openSmartSnippetInlineLink="openSmartSnippetInlineLink",s.openSmartSnippetSuggestionInlineLink="openSmartSnippetSuggestionInlineLink",s.recentQueryClick="recentQueriesClick",s.clearRecentQueries="clearRecentQueries",s.recentResultClick="recentResultClick",s.clearRecentResults="clearRecentResults",s.noResultsBack="noResultsBack",s.showMoreFoldedResults="showMoreFoldedResults",s.showLessFoldedResults="showLessFoldedResults",s.copyToClipboard="copyToClipboard",s.caseSendEmail="Case.SendEmail",s.feedItemTextPost="FeedItem.TextPost",s.caseAttach="caseAttach",s.caseDetach="caseDetach",s.retryGeneratedAnswer="retryGeneratedAnswer",s.likeGeneratedAnswer="likeGeneratedAnswer",s.dislikeGeneratedAnswer="dislikeGeneratedAnswer",s.openGeneratedAnswerSource="openGeneratedAnswerSource",s.generatedAnswerStreamEnd="generatedAnswerStreamEnd",s.generatedAnswerSourceHover="generatedAnswerSourceHover",s.generatedAnswerCopyToClipboard="generatedAnswerCopyToClipboard",s.generatedAnswerHideAnswers="generatedAnswerHideAnswers",s.generatedAnswerShowAnswers="generatedAnswerShowAnswers",s.generatedAnswerExpand="generatedAnswerExpand",s.generatedAnswerCollapse="generatedAnswerCollapse",s.generatedAnswerFeedbackSubmit="generatedAnswerFeedbackSubmit",s.rephraseGeneratedAnswer="rephraseGeneratedAnswer",s.generatedAnswerFeedbackSubmitV2="generatedAnswerFeedbackSubmitV2";var nH={[p.triggerNotify]:"queryPipelineTriggers",[p.triggerExecute]:"queryPipelineTriggers",[p.triggerQuery]:"queryPipelineTriggers",[p.triggerRedirect]:"queryPipelineTriggers",[p.queryError]:"errors",[p.queryErrorBack]:"errors",[p.queryErrorClear]:"errors",[p.queryErrorRetry]:"errors",[p.pagerNext]:"getMoreResults",[p.pagerPrevious]:"getMoreResults",[p.pagerNumber]:"getMoreResults",[p.pagerResize]:"getMoreResults",[p.pagerScrolling]:"getMoreResults",[p.facetSearch]:"facet",[p.facetShowLess]:"facet",[p.facetShowMore]:"facet",[p.recommendation]:"recommendation",[p.likeSmartSnippet]:"smartSnippet",[p.dislikeSmartSnippet]:"smartSnippet",[p.expandSmartSnippet]:"smartSnippet",[p.collapseSmartSnippet]:"smartSnippet",[p.openSmartSnippetFeedbackModal]:"smartSnippet",[p.closeSmartSnippetFeedbackModal]:"smartSnippet",[p.sendSmartSnippetReason]:"smartSnippet",[p.expandSmartSnippetSuggestion]:"smartSnippetSuggestions",[p.collapseSmartSnippetSuggestion]:"smartSnippetSuggestions",[p.showMoreSmartSnippetSuggestion]:"smartSnippetSuggestions",[p.showLessSmartSnippetSuggestion]:"smartSnippetSuggestions",[p.clearRecentQueries]:"recentQueries",[p.recentResultClick]:"recentlyClickedDocuments",[p.clearRecentResults]:"recentlyClickedDocuments",[p.showLessFoldedResults]:"folding",[p.caseDetach]:"case",[p.likeGeneratedAnswer]:"generatedAnswer",[p.dislikeGeneratedAnswer]:"generatedAnswer",[p.openGeneratedAnswerSource]:"generatedAnswer",[p.generatedAnswerStreamEnd]:"generatedAnswer",[p.generatedAnswerSourceHover]:"generatedAnswer",[p.generatedAnswerCopyToClipboard]:"generatedAnswer",[p.generatedAnswerHideAnswers]:"generatedAnswer",[p.generatedAnswerShowAnswers]:"generatedAnswer",[p.generatedAnswerExpand]:"generatedAnswer",[p.generatedAnswerCollapse]:"generatedAnswer",[p.generatedAnswerFeedbackSubmit]:"generatedAnswer",[p.generatedAnswerFeedbackSubmitV2]:"generatedAnswer",[nQ.expandToFullUI]:"interface",[nQ.openUserActions]:"User Actions",[nQ.showPrecedingSessions]:"User Actions",[nQ.showFollowingSessions]:"User Actions",[nQ.clickViewedDocument]:"User Actions",[nQ.clickPageView]:"User Actions",[nQ.createArticle]:"createArticle"},nY=class{constructor(){this.runtime=new nF,this.currentVisitorId=""}getPayload(){return Promise.resolve()}getParameters(){return Promise.resolve()}makeEvent(e){return Promise.resolve({eventType:e,payload:null,log:()=>Promise.resolve()})}sendEvent(){return Promise.resolve()}makeSearchEvent(){return this.makeEvent(rz.search)}sendSearchEvent(){return Promise.resolve()}makeClickEvent(){return this.makeEvent(rz.click)}sendClickEvent(){return Promise.resolve()}makeCustomEvent(){return this.makeEvent(rz.custom)}sendCustomEvent(){return Promise.resolve()}makeViewEvent(){return this.makeEvent(rz.view)}sendViewEvent(){return Promise.resolve()}getVisit(){return Promise.resolve({id:"",visitorId:""})}getHealth(){return Promise.resolve({status:""})}registerBeforeSendEventHook(){}registerAfterSendEventHook(){}addEventTypeMapping(){}get version(){return r6}},nG=e=>{let t,r=e.map(e=>e.replace(/;/g,""));return function e(t){let r=t.join(";");return r.length<=256?r:e(t.slice(1))}((t="",r.filter(e=>{let r=e!==t;return t=e,r})))};function nK(e){let t="string"==typeof e.partialQueries?e.partialQueries:nG(e.partialQueries),r="string"==typeof e.suggestions?e.suggestions:nG(e.suggestions);return Object.assign(Object.assign({},e),{partialQueries:t,suggestions:r})}var nW=class{constructor(e,t){this.opts=e,this.provider=t;let r=!1===e.enableAnalytics||nz();this.coveoAnalyticsClient=r?new nY:new nB(e)}disable(){this.coveoAnalyticsClient=new nY}enable(){this.coveoAnalyticsClient=new nB(this.opts)}makeInterfaceLoad(){return this.makeSearchEvent(p.interfaceLoad)}logInterfaceLoad(){return rR(this,void 0,void 0,function*(){return(yield this.makeInterfaceLoad()).log({searchUID:this.provider.getSearchUID()})})}makeRecommendationInterfaceLoad(){return this.makeSearchEvent(p.recommendationInterfaceLoad)}logRecommendationInterfaceLoad(){return rR(this,void 0,void 0,function*(){return(yield this.makeRecommendationInterfaceLoad()).log({searchUID:this.provider.getSearchUID()})})}makeRecommendation(){return this.makeCustomEvent(p.recommendation)}logRecommendation(){return rR(this,void 0,void 0,function*(){return(yield this.makeRecommendation()).log({searchUID:this.provider.getSearchUID()})})}makeRecommendationOpen(e,t){return this.makeClickEvent(p.recommendationOpen,e,t)}logRecommendationOpen(e,t){return rR(this,void 0,void 0,function*(){return(yield this.makeRecommendationOpen(e,t)).log({searchUID:this.provider.getSearchUID()})})}makeStaticFilterClearAll(e){return this.makeSearchEvent(p.staticFilterClearAll,e)}logStaticFilterClearAll(e){return rR(this,void 0,void 0,function*(){return(yield this.makeStaticFilterClearAll(e)).log({searchUID:this.provider.getSearchUID()})})}makeStaticFilterSelect(e){return this.makeSearchEvent(p.staticFilterSelect,e)}logStaticFilterSelect(e){return rR(this,void 0,void 0,function*(){return(yield this.makeStaticFilterSelect(e)).log({searchUID:this.provider.getSearchUID()})})}makeStaticFilterDeselect(e){return this.makeSearchEvent(p.staticFilterDeselect,e)}logStaticFilterDeselect(e){return rR(this,void 0,void 0,function*(){return(yield this.makeStaticFilterDeselect(e)).log({searchUID:this.provider.getSearchUID()})})}makeFetchMoreResults(){return this.makeCustomEvent(p.pagerScrolling,{type:"getMoreResults"})}logFetchMoreResults(){return rR(this,void 0,void 0,function*(){return(yield this.makeFetchMoreResults()).log({searchUID:this.provider.getSearchUID()})})}makeInterfaceChange(e){return this.makeSearchEvent(p.interfaceChange,e)}logInterfaceChange(e){return rR(this,void 0,void 0,function*(){return(yield this.makeInterfaceChange(e)).log({searchUID:this.provider.getSearchUID()})})}makeDidYouMeanAutomatic(){return this.makeSearchEvent(p.didyoumeanAutomatic)}logDidYouMeanAutomatic(){return rR(this,void 0,void 0,function*(){return(yield this.makeDidYouMeanAutomatic()).log({searchUID:this.provider.getSearchUID()})})}makeDidYouMeanClick(){return this.makeSearchEvent(p.didyoumeanClick)}logDidYouMeanClick(){return rR(this,void 0,void 0,function*(){return(yield this.makeDidYouMeanClick()).log({searchUID:this.provider.getSearchUID()})})}makeResultsSort(e){return this.makeSearchEvent(p.resultsSort,e)}logResultsSort(e){return rR(this,void 0,void 0,function*(){return(yield this.makeResultsSort(e)).log({searchUID:this.provider.getSearchUID()})})}makeSearchboxSubmit(){return this.makeSearchEvent(p.searchboxSubmit)}logSearchboxSubmit(){return rR(this,void 0,void 0,function*(){return(yield this.makeSearchboxSubmit()).log({searchUID:this.provider.getSearchUID()})})}makeSearchboxClear(){return this.makeSearchEvent(p.searchboxClear)}logSearchboxClear(){return rR(this,void 0,void 0,function*(){return(yield this.makeSearchboxClear()).log({searchUID:this.provider.getSearchUID()})})}makeSearchboxAsYouType(){return this.makeSearchEvent(p.searchboxAsYouType)}logSearchboxAsYouType(){return rR(this,void 0,void 0,function*(){return(yield this.makeSearchboxAsYouType()).log({searchUID:this.provider.getSearchUID()})})}makeBreadcrumbFacet(e){return this.makeSearchEvent(p.breadcrumbFacet,e)}logBreadcrumbFacet(e){return rR(this,void 0,void 0,function*(){return(yield this.makeBreadcrumbFacet(e)).log({searchUID:this.provider.getSearchUID()})})}makeBreadcrumbResetAll(){return this.makeSearchEvent(p.breadcrumbResetAll)}logBreadcrumbResetAll(){return rR(this,void 0,void 0,function*(){return(yield this.makeBreadcrumbResetAll()).log({searchUID:this.provider.getSearchUID()})})}makeDocumentQuickview(e,t){return this.makeClickEvent(p.documentQuickview,e,t)}logDocumentQuickview(e,t){return rR(this,void 0,void 0,function*(){return(yield this.makeDocumentQuickview(e,t)).log({searchUID:this.provider.getSearchUID()})})}makeDocumentOpen(e,t){return this.makeClickEvent(p.documentOpen,e,t)}logDocumentOpen(e,t){return rR(this,void 0,void 0,function*(){return(yield this.makeDocumentOpen(e,t)).log({searchUID:this.provider.getSearchUID()})})}makeOmniboxAnalytics(e){return this.makeSearchEvent(p.omniboxAnalytics,nK(e))}logOmniboxAnalytics(e){return rR(this,void 0,void 0,function*(){return(yield this.makeOmniboxAnalytics(e)).log({searchUID:this.provider.getSearchUID()})})}makeOmniboxFromLink(e){return this.makeSearchEvent(p.omniboxFromLink,nK(e))}logOmniboxFromLink(e){return rR(this,void 0,void 0,function*(){return(yield this.makeOmniboxFromLink(e)).log({searchUID:this.provider.getSearchUID()})})}makeSearchFromLink(){return this.makeSearchEvent(p.searchFromLink)}logSearchFromLink(){return rR(this,void 0,void 0,function*(){return(yield this.makeSearchFromLink()).log({searchUID:this.provider.getSearchUID()})})}makeTriggerNotify(e){return this.makeCustomEvent(p.triggerNotify,e)}logTriggerNotify(e){return rR(this,void 0,void 0,function*(){return(yield this.makeTriggerNotify(e)).log({searchUID:this.provider.getSearchUID()})})}makeTriggerExecute(e){return this.makeCustomEvent(p.triggerExecute,e)}logTriggerExecute(e){return rR(this,void 0,void 0,function*(){return(yield this.makeTriggerExecute(e)).log({searchUID:this.provider.getSearchUID()})})}makeTriggerQuery(){return this.makeCustomEvent(p.triggerQuery,{query:this.provider.getSearchEventRequestPayload().queryText},"queryPipelineTriggers")}logTriggerQuery(){return rR(this,void 0,void 0,function*(){return(yield this.makeTriggerQuery()).log({searchUID:this.provider.getSearchUID()})})}makeUndoTriggerQuery(e){return this.makeSearchEvent(p.undoTriggerQuery,e)}logUndoTriggerQuery(e){return rR(this,void 0,void 0,function*(){return(yield this.makeUndoTriggerQuery(e)).log({searchUID:this.provider.getSearchUID()})})}makeTriggerRedirect(e){return this.makeCustomEvent(p.triggerRedirect,Object.assign(Object.assign({},e),{query:this.provider.getSearchEventRequestPayload().queryText}))}logTriggerRedirect(e){return rR(this,void 0,void 0,function*(){return(yield this.makeTriggerRedirect(e)).log({searchUID:this.provider.getSearchUID()})})}makePagerResize(e){return this.makeCustomEvent(p.pagerResize,
12e)}logPagerResize(e){return rR(this,void 0,void 0,function*(){return(yield this.makePagerResize(e)).log({searchUID:this.provider.getSearchUID()})})}makePagerNumber(e){return this.makeCustomEvent(p.pagerNumber,e)}logPagerNumber(e){return rR(this,void 0,void 0,function*(){return(yield this.makePagerNumber(e)).log({searchUID:this.provider.getSearchUID()})})}makePagerNext(e){return this.makeCustomEvent(p.pagerNext,e)}logPagerNext(e){return rR(this,void 0,void 0,function*(){return(yield this.makePagerNext(e)).log({searchUID:this.provider.getSearchUID()})})}makePagerPrevious(e){return this.makeCustomEvent(p.pagerPrevious,e)}logPagerPrevious(e){return rR(this,void 0,void 0,function*(){return(yield this.makePagerPrevious(e)).log({searchUID:this.provider.getSearchUID()})})}makePagerScrolling(){return this.makeCustomEvent(p.pagerScrolling)}logPagerScrolling(){return rR(this,void 0,void 0,function*(){return(yield this.makePagerScrolling()).log({searchUID:this.provider.getSearchUID()})})}makeFacetClearAll(e){return this.makeSearchEvent(p.facetClearAll,e)}logFacetClearAll(e){return rR(this,void 0,void 0,function*(){return(yield this.makeFacetClearAll(e)).log({searchUID:this.provider.getSearchUID()})})}makeFacetSearch(e){return this.makeSearchEvent(p.facetSearch,e)}logFacetSearch(e){return rR(this,void 0,void 0,function*(){return(yield this.makeFacetSearch(e)).log({searchUID:this.provider.getSearchUID()})})}makeFacetSelect(e){return this.makeSearchEvent(p.facetSelect,e)}logFacetSelect(e){return rR(this,void 0,void 0,function*(){return(yield this.makeFacetSelect(e)).log({searchUID:this.provider.getSearchUID()})})}makeFacetDeselect(e){return this.makeSearchEvent(p.facetDeselect,e)}logFacetDeselect(e){return rR(this,void 0,void 0,function*(){return(yield this.makeFacetDeselect(e)).log({searchUID:this.provider.getSearchUID()})})}makeFacetExclude(e){return this.makeSearchEvent(p.facetExclude,e)}logFacetExclude(e){return rR(this,void 0,void 0,function*(){return(yield this.makeFacetExclude(e)).log({searchUID:this.provider.getSearchUID()})})}makeFacetUnexclude(e){return this.makeSearchEvent(p.facetUnexclude,e)}logFacetUnexclude(e){return rR(this,void 0,void 0,function*(){return(yield this.makeFacetUnexclude(e)).log({searchUID:this.provider.getSearchUID()})})}makeFacetSelectAll(e){return this.makeSearchEvent(p.facetSelectAll,e)}logFacetSelectAll(e){return rR(this,void 0,void 0,function*(){return(yield this.makeFacetSelectAll(e)).log({searchUID:this.provider.getSearchUID()})})}makeFacetUpdateSort(e){return this.makeSearchEvent(p.facetUpdateSort,e)}logFacetUpdateSort(e){return rR(this,void 0,void 0,function*(){return(yield this.makeFacetUpdateSort(e)).log({searchUID:this.provider.getSearchUID()})})}makeFacetShowMore(e){return this.makeCustomEvent(p.facetShowMore,e)}logFacetShowMore(e){return rR(this,void 0,void 0,function*(){return(yield this.makeFacetShowMore(e)).log({searchUID:this.provider.getSearchUID()})})}makeFacetShowLess(e){return this.makeCustomEvent(p.facetShowLess,e)}logFacetShowLess(e){return rR(this,void 0,void 0,function*(){return(yield this.makeFacetShowLess(e)).log({searchUID:this.provider.getSearchUID()})})}makeQueryError(e){return this.makeCustomEvent(p.queryError,e)}logQueryError(e){return rR(this,void 0,void 0,function*(){return(yield this.makeQueryError(e)).log({searchUID:this.provider.getSearchUID()})})}makeQueryErrorBack(){return rR(this,void 0,void 0,function*(){let e=yield this.makeCustomEvent(p.queryErrorBack);return{description:e.description,log:()=>rR(this,void 0,void 0,function*(){return yield e.log({searchUID:this.provider.getSearchUID()}),this.logSearchEvent(p.queryErrorBack)})}})}logQueryErrorBack(){return rR(this,void 0,void 0,function*(){return(yield this.makeQueryErrorBack()).log({searchUID:this.provider.getSearchUID()})})}makeQueryErrorRetry(){return rR(this,void 0,void 0,function*(){let e=yield this.makeCustomEvent(p.queryErrorRetry);return{description:e.description,log:()=>rR(this,void 0,void 0,function*(){return yield e.log({searchUID:this.provider.getSearchUID()}),this.logSearchEvent(p.queryErrorRetry)})}})}logQueryErrorRetry(){return rR(this,void 0,void 0,function*(){return(yield this.makeQueryErrorRetry()).log({searchUID:this.provider.getSearchUID()})})}makeQueryErrorClear(){return rR(this,void 0,void 0,function*(){let e=yield this.makeCustomEvent(p.queryErrorClear);return{description:e.description,log:()=>rR(this,void 0,void 0,function*(){return yield e.log({searchUID:this.provider.getSearchUID()}),this.logSearchEvent(p.queryErrorClear)})}})}logQueryErrorClear(){return rR(this,void 0,void 0,function*(){return(yield this.makeQueryErrorClear()).log({searchUID:this.provider.getSearchUID()})})}makeLikeSmartSnippet(){return this.makeCustomEvent(p.likeSmartSnippet)}logLikeSmartSnippet(){return rR(this,void 0,void 0,function*(){return(yield this.makeLikeSmartSnippet()).log({searchUID:this.provider.getSearchUID()})})}makeDislikeSmartSnippet(){return this.makeCustomEvent(p.dislikeSmartSnippet)}logDislikeSmartSnippet(){return rR(this,void 0,void 0,function*(){return(yield this.makeDislikeSmartSnippet()).log({searchUID:this.provider.getSearchUID()})})}makeExpandSmartSnippet(){return this.makeCustomEvent(p.expandSmartSnippet)}logExpandSmartSnippet(){return rR(this,void 0,void 0,function*(){return(yield this.makeExpandSmartSnippet()).log({searchUID:this.provider.getSearchUID()})})}makeCollapseSmartSnippet(){return this.makeCustomEvent(p.collapseSmartSnippet)}logCollapseSmartSnippet(){return rR(this,void 0,void 0,function*(){return(yield this.makeCollapseSmartSnippet()).log({searchUID:this.provider.getSearchUID()})})}makeOpenSmartSnippetFeedbackModal(){return this.makeCustomEvent(p.openSmartSnippetFeedbackModal)}logOpenSmartSnippetFeedbackModal(){return rR(this,void 0,void 0,function*(){return(yield this.makeOpenSmartSnippetFeedbackModal()).log({searchUID:this.provider.getSearchUID()})})}makeCloseSmartSnippetFeedbackModal(){return this.makeCustomEvent(p.closeSmartSnippetFeedbackModal)}logCloseSmartSnippetFeedbackModal(){return rR(this,void 0,void 0,function*(){return(yield this.makeCloseSmartSnippetFeedbackModal()).log({searchUID:this.provider.getSearchUID()})})}makeSmartSnippetFeedbackReason(e,t){return this.makeCustomEvent(p.sendSmartSnippetReason,{reason:e,details:t})}logSmartSnippetFeedbackReason(e,t){return rR(this,void 0,void 0,function*(){return(yield this.makeSmartSnippetFeedbackReason(e,t)).log({searchUID:this.provider.getSearchUID()})})}makeExpandSmartSnippetSuggestion(e){return this.makeCustomEvent(p.expandSmartSnippetSuggestion,"documentId"in e?e:{documentId:e})}logExpandSmartSnippetSuggestion(e){return rR(this,void 0,void 0,function*(){return(yield this.makeExpandSmartSnippetSuggestion(e)).log({searchUID:this.provider.getSearchUID()})})}makeCollapseSmartSnippetSuggestion(e){return this.makeCustomEvent(p.collapseSmartSnippetSuggestion,"documentId"in e?e:{documentId:e})}logCollapseSmartSnippetSuggestion(e){return rR(this,void 0,void 0,function*(){return(yield this.makeCollapseSmartSnippetSuggestion(e)).log({searchUID:this.provider.getSearchUID()})})}makeShowMoreSmartSnippetSuggestion(e){return this.makeCustomEvent(p.showMoreSmartSnippetSuggestion,e)}logShowMoreSmartSnippetSuggestion(e){return rR(this,void 0,void 0,function*(){return(yield this.makeShowMoreSmartSnippetSuggestion(e)).log({searchUID:this.provider.getSearchUID()})})}makeShowLessSmartSnippetSuggestion(e){return this.makeCustomEvent(p.showLessSmartSnippetSuggestion,e)}logShowLessSmartSnippetSuggestion(e){return rR(this,void 0,void 0,function*(){return(yield this.makeShowLessSmartSnippetSuggestion(e)).log({searchUID:this.provider.getSearchUID()})})}makeOpenSmartSnippetSource(e,t){return this.makeClickEvent(p.openSmartSnippetSource,e,t)}logOpenSmartSnippetSource(e,t){return rR(this,void 0,void 0,function*(){return(yield this.makeOpenSmartSnippetSource(e,t)).log({searchUID:this.provider.getSearchUID()})})}makeOpenSmartSnippetSuggestionSource(e,t){return this.makeClickEvent(p.openSmartSnippetSuggestionSource,e,{contentIDKey:t.documentId.contentIdKey,contentIDValue:t.documentId.contentIdValue},t)}makeCopyToClipboard(e,t){return this.makeClickEvent(p.copyToClipboard,e,t)}logCopyToClipboard(e,t){return rR(this,void 0,void 0,function*(){return(yield this.makeCopyToClipboard(e,t)).log({searchUID:this.provider.getSearchUID()})})}logOpenSmartSnippetSuggestionSource(e,t){return rR(this,void 0,void 0,function*(){return(yield this.makeOpenSmartSnippetSuggestionSource(e,t)).log({searchUID:this.provider.getSearchUID()})})}makeOpenSmartSnippetInlineLink(e,t){return this.makeClickEvent(p.openSmartSnippetInlineLink,e,{contentIDKey:t.contentIDKey,contentIDValue:t.contentIDValue},t)}logOpenSmartSnippetInlineLink(e,t){return rR(this,void 0,void 0,function*(){return(yield this.makeOpenSmartSnippetInlineLink(e,t)).log({searchUID:this.provider.getSearchUID()})})}makeOpenSmartSnippetSuggestionInlineLink(e,t){return this.makeClickEvent(p.openSmartSnippetSuggestionInlineLink,e,{contentIDKey:t.documentId.contentIdKey,contentIDValue:t.documentId.contentIdValue},t)}logOpenSmartSnippetSuggestionInlineLink(e,t){return rR(this,void 0,void 0,function*(){return(yield this.makeOpenSmartSnippetSuggestionInlineLink(e,t)).log({searchUID:this.provider.getSearchUID()})})}makeRecentQueryClick(){return this.makeSearchEvent(p.recentQueryClick)}logRecentQueryClick(){return rR(this,void 0,void 0,function*(){return(yield this.makeRecentQueryClick()).log({searchUID:this.provider.getSearchUID()})})}makeClearRecentQueries(){return this.makeCustomEvent(p.clearRecentQueries)}logClearRecentQueries(){return rR(this,void 0,void 0,function*(){return(yield this.makeClearRecentQueries()).log({searchUID:this.provider.getSearchUID()})})}makeRecentResultClick(e,t){return this.makeCustomEvent(p.recentResultClick,{info:e,identifier:t})}logRecentResultClick(e,t){return rR(this,void 0,void 0,function*(){return(yield this.makeRecentResultClick(e,t)).log({searchUID:this.provider.getSearchUID()})})}makeClearRecentResults(){return this.makeCustomEvent(p.clearRecentResults)}logClearRecentResults(){return rR(this,void 0,void 0,function*(){return(yield this.makeClearRecentResults()).log({searchUID:this.provider.getSearchUID()})})}makeNoResultsBack(){return this.makeSearchEvent(p.noResultsBack)}logNoResultsBack(){return rR(this,void 0,void 0,function*(){return(yield this.makeNoResultsBack()).log({searchUID:this.provider.getSearchUID()})})}makeShowMoreFoldedResults(e,t){return this.makeClickEvent(p.showMoreFoldedResults,e,t)}logShowMoreFoldedResults(e,t){return rR(this,void 0,void 0,function*(){return(yield this.makeShowMoreFoldedResults(e,t)).log({searchUID:this.provider.getSearchUID()})})}makeShowLessFoldedResults(){return this.makeCustomEvent(p.showLessFoldedResults)}logShowLessFoldedResults(){return rR(this,void 0,void 0,function*(){return(yield this.makeShowLessFoldedResults()).log({searchUID:this.provider.getSearchUID()})})}makeEventDescription(e,t){var r;return{actionCause:t,customData:null==(r=e.payload)?void 0:r.customData}}makeCustomEvent(e,t,r=nH[e]){return rR(this,void 0,void 0,function*(){let n=Object.assign(Object.assign({},this.provider.getBaseMetadata()),t),i=Object.assign(Object.assign({},(yield this.getBaseEventRequest(n))),{eventType:r,eventValue:e}),a=yield this.coveoAnalyticsClient.makeCustomEvent(i);return{description:this.makeEventDescription(a,e),log:({searchUID:e})=>a.log({lastSearchQueryUid:e})}})}logCustomEvent(e,t,r=nH[e]){return rR(this,void 0,void 0,function*(){return(yield this.makeCustomEvent(e,t,r)).log({searchUID:this.provider.getSearchUID()})})}makeCustomEventWithType(e,t,r){return rR(this,void 0,void 0,function*(){let n=Object.assign(Object.assign({},this.provider.getBaseMetadata()),r),i=Object.assign(Object.assign({},(yield this.getBaseEventRequest(n))),{eventType:t,eventValue:e}),a=yield this.coveoAnalyticsClient.makeCustomEvent(i);return{description:this.makeEventDescription(a,e),log:({searchUID:e})=>a.log({lastSearchQueryUid:e})}})}logCustomEventWithType(e,t,r){return rR(this,void 0,void 0,function*(){return(yield this.makeCustomEventWithType(e,t,r)).log({searchUID:this.provider.getSearchUID()})})}logSearchEvent(e,t){return rR(this,void 0,void 0,function*(){return(yield this.makeSearchEvent(e,t)).log({searchUID:this.provider.getSearchUID()})})}makeSearchEvent(e,t){return rR(this,void 0,void 0,function*(){let r=yield this.getBaseSearchEventRequest(e,t),n=yield this.coveoAnalyticsClient.makeSearchEvent(r);return{description:this.makeEventDescription(n,e),log:({searchUID:e})=>n.log({searchQueryUid:e})}})}makeClickEvent(e,t,r,n){return rR(this,void 0,void 0,function*(){let i=Object.assign(Object.assign(Object.assign({},t),(yield this.getBaseEventRequest(Object.assign(Object.assign({},r),n)))),{queryPipeline:this.provider.getPipeline(),actionCause:e}),a=yield this.coveoAnalyticsClient.makeClickEvent(i);return{description:this.makeEventDescription(a,e),log:({searchUID:e})=>a.log({searchQueryUid:e})}})}logClickEvent(e,t,r,n){return rR(this,void 0,void 0,function*(){return(yield this.makeClickEvent(e,t,r,n)).log({searchUID:this.provider.getSearchUID()})})}getBaseSearchEventRequest(e,t){var r,n;return rR(this,void 0,void 0,function*(){return Object.assign(Object.assign(Object.assign({},(yield this.getBaseEventRequest(Object.assign(Object.assign({},t),null==(n=(r=this.provider).getGeneratedAnswerMetadata)?void 0:n.call(r))))),this.provider.getSearchEventRequestPayload()),{queryPipeline:this.provider.getPipeline(),actionCause:e})})}getBaseEventRequest(e){return rR(this,void 0,void 0,function*(){let t=Object.assign(Object.assign({},this.provider.getBaseMetadata()),e);return Object.assign(Object.assign(Object.assign({}
12,this.getOrigins()),this.getSplitTestRun()),{customData:t,language:this.provider.getLanguage(),facetState:this.provider.getFacetState?this.provider.getFacetState():[],anonymous:this.provider.getIsAnonymous(),clientId:yield this.getClientId()})})}getOrigins(){var e,t;return{originContext:null==(t=(e=this.provider).getOriginContext)?void 0:t.call(e),originLevel1:this.provider.getOriginLevel1(),originLevel2:this.provider.getOriginLevel2(),originLevel3:this.provider.getOriginLevel3()}}getClientId(){return this.coveoAnalyticsClient instanceof nB?this.coveoAnalyticsClient.getCurrentVisitorId():void 0}getSplitTestRun(){let e=this.provider.getSplitTestRunName?this.provider.getSplitTestRunName():"",t=this.provider.getSplitTestRunVersion?this.provider.getSplitTestRunVersion():"";return Object.assign(Object.assign({},e&&{splitTestRunName:e}),t&&{splitTestRunVersion:t})}makeLikeGeneratedAnswer(e){return this.makeCustomEvent(p.likeGeneratedAnswer,e)}logLikeGeneratedAnswer(e){return rR(this,void 0,void 0,function*(){return(yield this.makeLikeGeneratedAnswer(e)).log({searchUID:this.provider.getSearchUID()})})}makeDislikeGeneratedAnswer(e){return this.makeCustomEvent(p.dislikeGeneratedAnswer,e)}logDislikeGeneratedAnswer(e){return rR(this,void 0,void 0,function*(){return(yield this.makeDislikeGeneratedAnswer(e)).log({searchUID:this.provider.getSearchUID()})})}makeOpenGeneratedAnswerSource(e){return this.makeCustomEvent(p.openGeneratedAnswerSource,e)}logOpenGeneratedAnswerSource(e){return rR(this,void 0,void 0,function*(){return(yield this.makeOpenGeneratedAnswerSource(e)).log({searchUID:this.provider.getSearchUID()})})}makeGeneratedAnswerSourceHover(e){return this.makeCustomEvent(p.generatedAnswerSourceHover,e)}logGeneratedAnswerSourceHover(e){return rR(this,void 0,void 0,function*(){return(yield this.makeGeneratedAnswerSourceHover(e)).log({searchUID:this.provider.getSearchUID()})})}makeGeneratedAnswerCopyToClipboard(e){return this.makeCustomEvent(p.generatedAnswerCopyToClipboard,e)}logGeneratedAnswerCopyToClipboard(e){return rR(this,void 0,void 0,function*(){return(yield this.makeGeneratedAnswerCopyToClipboard(e)).log({searchUID:this.provider.getSearchUID()})})}makeGeneratedAnswerHideAnswers(e){return this.makeCustomEvent(p.generatedAnswerHideAnswers,e)}logGeneratedAnswerHideAnswers(e){return rR(this,void 0,void 0,function*(){return(yield this.makeGeneratedAnswerHideAnswers(e)).log({searchUID:this.provider.getSearchUID()})})}makeGeneratedAnswerShowAnswers(e){return this.makeCustomEvent(p.generatedAnswerShowAnswers,e)}logGeneratedAnswerShowAnswers(e){return rR(this,void 0,void 0,function*(){return(yield this.makeGeneratedAnswerShowAnswers(e)).log({searchUID:this.provider.getSearchUID()})})}makeGeneratedAnswerExpand(e){return this.makeCustomEvent(p.generatedAnswerExpand,e)}logGeneratedAnswerExpand(e){return rR(this,void 0,void 0,function*(){return(yield this.makeGeneratedAnswerExpand(e)).log({searchUID:this.provider.getSearchUID()})})}makeGeneratedAnswerCollapse(e){return this.makeCustomEvent(p.generatedAnswerCollapse,e)}logGeneratedAnswerCollapse(e){return rR(this,void 0,void 0,function*(){return(yield this.makeGeneratedAnswerCollapse(e)).log({searchUID:this.provider.getSearchUID()})})}makeGeneratedAnswerFeedbackSubmit(e){return this.makeCustomEvent(p.generatedAnswerFeedbackSubmit,e)}logGeneratedAnswerFeedbackSubmit(e){return rR(this,void 0,void 0,function*(){return(yield this.makeGeneratedAnswerFeedbackSubmit(e)).log({searchUID:this.provider.getSearchUID()})})}makeGeneratedAnswerFeedbackSubmitV2(e){return this.makeCustomEvent(p.generatedAnswerFeedbackSubmitV2,e)}logGeneratedAnswerFeedbackSubmitV2(e){return rR(this,void 0,void 0,function*(){return(yield this.makeGeneratedAnswerFeedbackSubmitV2(e)).log({searchUID:this.provider.getSearchUID()})})}makeRephraseGeneratedAnswer(e){return this.makeSearchEvent(p.rephraseGeneratedAnswer,e)}logRephraseGeneratedAnswer(e){return rR(this,void 0,void 0,function*(){return(yield this.makeRephraseGeneratedAnswer(e)).log({searchUID:this.provider.getSearchUID()})})}makeRetryGeneratedAnswer(){return this.makeSearchEvent(p.retryGeneratedAnswer)}logRetryGeneratedAnswer(){return rR(this,void 0,void 0,function*(){return(yield this.makeRetryGeneratedAnswer()).log({searchUID:this.provider.getSearchUID()})})}makeGeneratedAnswerStreamEnd(e){return this.makeCustomEvent(p.generatedAnswerStreamEnd,e)}logGeneratedAnswerStreamEnd(e){return rR(this,void 0,void 0,function*(){return(yield this.makeGeneratedAnswerStreamEnd(e)).log({searchUID:this.provider.getSearchUID()})})}},nJ=Object.assign({},{pageview:"pageview",event:"event"});Object.keys(nJ).map(e=>nJ[e]),(u=f||(f={})).click="click",u.flowStart="flowStart",(c=g||(g={})).enterInterface="ticket_create_start",c.fieldUpdate="ticket_field_update",c.fieldSuggestionClick="ticket_classification_click",c.suggestionClick="suggestion_click",c.suggestionRate="suggestion_rate",c.nextCaseStep="ticket_next_stage",c.caseCancelled="ticket_cancel",c.caseSolved="ticket_cancel",c.caseCreated="ticket_create",(l=m||(m={})).quit="Quit",l.solved="Solved";var nZ=new rG.HistoryStore,nX=["uri","urihash","documentUri","documentUriHash","permanentid","ec_name","ec_brand","ec_category","ec_item_group_id","ec_price","ec_promo_price","ec_shortdesc","ec_thumbnails","ec_images","ec_in_stock","ec_rating","childResults","totalNumberOfChildResults"],n0=()=>({id:"",skus:[],maxNumberOfRecommendations:5,filter:{brand:"",category:""},additionalFields:[],recommendations:[],error:null,isLoading:!1,searchUid:"",duration:0}
12),n1=class{constructor(e){this.getState=e,this.state=e()}getLanguage(){let e;return(e=this.state.configuration.search.locale.split("-")[0])&&2===e.length?e:"en"}getBaseMetadata(){let{context:e,configuration:t}=this.state,r=e?.contextValues||{},n={};for(let[e,t]of Object.entries(r))n[`context_${e}`]=t;return"legacy"===t.analytics.analyticsMode&&(n.coveoHeadlessVersion=rb),n}getOriginContext(){return this.state.configuration.analytics.originContext}getOriginLevel1(){return this.state.searchHub||"default"}getOriginLevel2(){return this.state.configuration.analytics.originLevel2}getOriginLevel3(){return this.state.configuration.analytics.originLevel3}getIsAnonymous(){return this.state.configuration.analytics.anonymous}},n2=class extends n1{constructor(){super(...arguments),this.initialState=n0()}getPipeline(){return""}getSearchEventRequestPayload(){return{queryText:"",responseTime:this.responseTime,results:this.mapResultsToAnalyticsDocument(),numberOfResults:this.numberOfResults}}getSearchUID(){return this.getState().productRecommendations?.searchUid||this.initialState.searchUid}mapResultsToAnalyticsDocument(){return this.state.productRecommendations?.recommendations.map(e=>({documentUri:e.documentUri,documentUriHash:e.documentUriHash,permanentid:e.permanentid}))}get responseTime(){return this.state.productRecommendations?.duration||this.initialState.duration}get numberOfResults(){return this.state.productRecommendations?.recommendations.length||this.initialState.recommendations.length}},n5=/^(?:[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,n3="0.7.10";function n4(e,t,r,n){let{getReferrer:i,getLocation:a,getUserAgent:o}=r,s=function(e){let{trackingId:t}=e;return{trackingId:t}}(t),u=n.getClientId();return Object.freeze({type:e,config:s,ts:Date.now(),source:(t.source||[]).concat([`relay@${n3}`]),clientId:u,userAgent:o(),referrer:i(),location:a()})}function n6({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}})}var n8=(a="coveo_",{getItem(e){let t=`${a}${e}=`;for(let e of document.cookie.split(";")){let r=e.replace(/^\s+/,"");if(0===r.lastIndexOf(t,0))return r.substring(t.length,r.length)}return null},setItem(e,t,r){let n,i=2==(n=window.location.hostname.split(".").slice(-2)).length?n.join("."):"",o=`;expires=${new Date(new Date().getTime()+r).toUTCString()}`,s=i?`;domain=${i}`:"";document.cookie=`${a}${e}=${t}${o}${s};path=/;SameSite=Lax`},removeItem(e){this.setItem(e,"",-1)}}),n9=tj(e=>e.source,e=>Object.entries(e).map(([e,t])=>`${e}@${t}`).concat(`@coveo/headless@${rb}`)),n7=tj(e=>e.configuration.accessToken,e=>e.configuration.analytics,e=>n9(e.configuration.analytics),(e,{trackingId:t,nextApiBaseUrl:r,enabled:n},i)=>(function(e){let t,r=(t=n6(e),{get:()=>t,update:e=>{t=n6({...t,...e})}}),n=function(){let e=[];function t({type:r,callback:n}){return e.findIndex(e=>e.type===r&&e.callback===n)}function r(r,n){let i;n?(i=t({type:r,callback:n}))>=0&&e.splice(i,1):function(t){if("*"===t)e.length=0;else for(let r=e.length-1;r>=0;r--)e[r].type===t&&e.splice(r,1)}(r)}return{add:function(n){return 0>t(n)&&e.push(n),()=>r(n.type,n.callback)},call:function(t){e.forEach(e=>{var r;if(r=t.meta.type,"*"===e.type||r===e.type)try{e.callback(t)}catch(e){console.error(e)}})},remove:r}}(),i={get:()=>Object.freeze("disabled"!==r.get().mode&&function(){try{return"object"==typeof window}catch{return!1}}()&&function(){try{let e="__storage_test__";return localStorage.setItem(e,e),localStorage.removeItem(e),!0}catch(e){return e instanceof DOMException&&"QuotaExceededError"===e.name&&localStorage&&0!==localStorage.length}}()?{runtime:"browser",send:(e,t,r)=>{let n,i=navigator.sendBeacon(`${e}?access_token=${t}`,new Blob([JSON.stringify([r])],{type:"application/json"}));if((n="u">typeof window,{sendMessage(e){n&&window.postMessage(e,"*")}}).sendMessage({kind:"EVENT_PROTOCOL",event:r,url:e,token:t}),!i)throw 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:()=>{let e;return""===(e=document.referrer)?null:e},getLocation:()=>window.location.href,getUserAgent:()=>navigator.userAgent,generateUUID:()=>crypto.randomUUID(),storage:{getItem:e=>n8.getItem(e)||localStorage.getItem(e),removeItem(e){n8.removeItem(e),localStorage.removeItem(e)},setItem(e,t){localStorage.setItem(e,t),n8.setItem(e,t,31556952e3)}}}:{runtime:"null",send:()=>{},getReferrer:()=>null,getLocation:()=>null,getUserAgent:()=>null,generateUUID:()=>"",storage:{getItem:()=>null,removeItem(){},setItem(){}}})},a={getClientId:()=>{var e;let t="visitorId",r=i.get(),n=r.storage,a=n.getItem(t),o=a&&"string"==typeof(e=a)&&n5.test(e)?a:r.generateUUID();return n.setItem(t,o),o}};return{emit:(e,t)=>
12{let o=r.get(),s=i.get(),u={...t,meta:n4(e,o,s,a)};return function({config:e,environment:t,event:r,listenerManager:n}){let{url:i,token:a,mode:o}=e;"disabled"!==o&&(n.call(r),t.send(i,a,r))}({config:o,environment:s,event:u,listenerManager:n})},getMeta:e=>n4(e,r.get(),i.get(),a),on:(e,t)=>n.add({type:e,callback:t}),off:(e,t)=>n.remove(e,t),updateConfig:e=>r.update(e),version:n3}})({mode:n?"emit":"disabled",url:r,token:e,trackingId:t,source:i})),ie=(e,t)=>{let r=e.categoryFacetSet[t]?.request;return function(e){let{activeValue:t,ancestryMap:r}=function(e){let t=[...e],r=new Map;for(;t.length>0;){let e=t.shift();if("selected"===e.state)return{activeValue:e,ancestryMap:r};if(r)for(let t of e.children)r.set(t,e);t.unshift(...e.children)}return{}}(e);return t?function(e,t){let r=[];if(!e)return[];let n=e;do r.unshift(n),n=t.get(n);while(n);return r}(t,r):[]}(r?.currentValues??[])},it=(e,t,r)=>({state:e.state,valuePosition:t,facetType:r}),ir=e=>({displayValue:e.value,value:e.value}),ii=(e,t)=>`${e}_${t}`,ia=((n=ia||{}).Ascending="ascending",n.Descending="descending",n),io=((i=io||{}).Relevancy="relevancy",i.QRE="qre",i.Date="date",i.Field="field",i.NoSort="nosort",i),is=e=>{if(Array.isArray(e))return e.map(e=>is(e)).join(",");switch(e.by){case"relevancy":case"qre":case"nosort":return e.by;case"date":return`date ${e.order}`;case"field":return`@${e.field} ${e.order}`;default:return""}};new ec({values:{by:new eh({enum:io,required:!0}),order:new eh({enum:ia}),field:new es}});var iu=class e extends n1{constructor(){super(...arguments),this.getFacetRequest=e=>this.state.facetSet?.[e]?.request||this.state.categoryFacetSet?.[e]?.request||this.state.dateFacetSet?.[e]?.request||this.state.numericFacetSet?.[e]?.request||this.state.automaticFacetSet?.set[e]?.response}getFacetState(){var e,t;let r,n;return t={facetSet:(e=this.getState()).facetSet??{},categoryFacetSet:e.categoryFacetSet??{},dateFacetSet:e.dateFacetSet??{},numericFacetSet:e.numericFacetSet??{},automaticFacetSet:e.automaticFacetSet??{desiredCount:5,numberOfValues:8,set:{}}},r=[],[...Object.values((n=t).facetSet),...Object.values(n.categoryFacetSet),...Object.values(n.dateFacetSet),...Object.values(n.numericFacetSet)].map(e=>e.request).forEach((e,n)=>{var i,a;let o,s,u,c=(o=(i=t,a=e.facetId,i.facetSet[a]?.request||i.categoryFacetSet[a]?.request||i.dateFacetSet[a]?.request||i.numericFacetSet[a]?.request||i.automaticFacetSet.set[a]?.response))?o.type:"specific",l=(s=e,u=n+1,{title:ii(s.field,s.facetId),field:s.field,id:s.facetId,facetPosition:u});if("hierarchical"===e.type){let n;if(!ie(t,e.facetId).length)return;r.push({...l,...{value:n=ie(t,e.facetId).map(e=>e.value).join(";"),valuePosition:1,displayValue:n},facetType:c,state:"selected"});return}e.currentValues.forEach((t,n)=>{let i;if("idle"===t.state)return;let a=it(t,n+1,c),o="specific"===e.type?ir(t):(i=t,{displayValue:`${i.start}..${i.end}`,value:`${i.start}..${i.end}`,start:i.start,end:i.end,endInclusive:i.endInclusive});r.push({...l,...a,...o})})}),[...Object.values(t.automaticFacetSet.set)].map(e=>e.response).forEach((e,t)=>{let n,i,a=(n=e,i=t+1,{title:ii(n.field,n.field),field:n.field,id:n.field,facetPosition:i});e.values.forEach((e,t)=>{if("idle"===e.state)return;let n=it(e,t+1,"specific"),i=ir(e);r.push({...a,...n,...i})})}),r}getPipeline(){return this.state.pipeline||this.state.search?.response.pipeline||e.fallbackPipelineName}getSearchEventRequestPayload(){return{queryText:this.queryText,responseTime:this.responseTime,results:this.resultURIs,numberOfResults:this.numberOfResults}}getSearchUID(){let e=this.getState();return e.search?.searchResponseId||e.search?.response.searchUid||eg().response.searchUid}getSplitTestRunName(){return this.state.search?.response.splitTestRun}getSplitTestRunVersion(){let t=!!this.getSplitTestRunName(),r=this.state.search?.response.pipeline||this.state.pipeline||e.fallbackPipelineName;return t?r:void 0}getBaseMetadata(){let e=this.getState(),t=super.getBaseMetadata(),r=e.search?.response?.extendedResults?.generativeQuestionAnsweringId;return r&&(t.generativeQuestionAnsweringId=r),t}
12getFacetMetadata(e,t){let r=this.getFacetRequest(e)?.field??"";return{...this.getBaseMetadata(),facetId:e,facetField:r,facetValue:t,facetTitle:`${r}_${e}`}}getFacetClearAllMetadata(e){let t=this.getFacetRequest(e)?.field??"";return{...this.getBaseMetadata(),facetId:e,facetField:t,facetTitle:`${t}_${e}`}}getFacetUpdateSortMetadata(e,t){let r=this.getFacetRequest(e)?.field??"";return{...this.getBaseMetadata(),facetId:e,facetField:r,criteria:t,facetTitle:`${r}_${e}`}}getRangeBreadcrumbFacetMetadata(e,t){let r=this.getFacetRequest(e)?.field??"";return{...this.getBaseMetadata(),facetId:e,facetField:r,facetRangeEnd:t.end,facetRangeEndInclusive:t.endInclusive,facetRangeStart:t.start,facetTitle:`${r}_${e}`}}getResultSortMetadata(){return{...this.getBaseMetadata(),resultsSortBy:this.state.sortCriteria??is({by:"relevancy"})}}getStaticFilterToggleMetadata(e,t){return{...this.getBaseMetadata(),staticFilterId:e,staticFilterValue:t}}getStaticFilterClearAllMetadata(e){return{...this.getBaseMetadata(),staticFilterId:e}}getUndoTriggerQueryMetadata(e){return{...this.getBaseMetadata(),undoneQuery:e}}getCategoryBreadcrumbFacetMetadata(e,t){let r=this.getFacetRequest(e)?.field??"";return{...this.getBaseMetadata(),categoryFacetId:e,categoryFacetField:r,categoryFacetPath:t,categoryFacetTitle:`${r}_${e}`}}getOmniboxAnalyticsMetadata(e,t){let r=this.state.querySuggest&&this.state.querySuggest[e],n=r.completions.map(e=>e.expression),i=r.partialQueries.length-1,a=r.partialQueries[i]||"",o=r.responseId;return{...this.getBaseMetadata(),suggestionRanking:n.indexOf(t),partialQuery:a,partialQueries:r.partialQueries.length>0?r.partialQueries:"",suggestions:n.length>0?n:"",querySuggestResponseId:o}}getInterfaceChangeMetadata(){return{...this.getBaseMetadata(),interfaceChangeTo:this.state.configuration.analytics.originLevel2}}getOmniboxFromLinkMetadata(e){return{...this.getBaseMetadata(),...e}}getGeneratedAnswerMetadata(){let e=this.getState(),t={};return e.generatedAnswer?.isVisible!==void 0&&(t.showGeneratedAnswer=e.generatedAnswer.isVisible),t}get resultURIs(){return this.results?.map(e=>({documentUri:e.uri,documentUriHash:e.raw.urihash}))}get results(){return this.state.search?.response.results}get queryText(){return this.state.query?.q||""}get responseTime(){return this.state.search?.duration||eg().duration}get numberOfResults(){return this.state.search?.response.totalCountFiltered||eg().response.totalCountFiltered}};iu.fallbackPipelineName="default";var ic=iu;async function il(e,t,r,n,i){t(()=>r);let a=await e?.log({searchUID:t(()=>r).getSearchUID()});n.info({client:i,response:a},"Analytics response")}var id=(d=({logger:e,getState:t,analyticsClientMiddleware:r=(e,t)=>t,preprocessRequest:n,provider:i=new ic(t)})=>{let a=t(),o=a.configuration.accessToken,s=a.configuration.analytics.apiBaseUrl,u=a.configuration.analytics.runtimeEnvironment,c=a.configuration.analytics.enabled,l=new nW({token:o,endpoint:s,runtimeEnvironment:u,preprocessRequest:"function"==typeof n?(...t)=>{let r=eO(t[0]);try{return n.apply(n,t)}catch(t){return e.error(t,"Error in analytics preprocessRequest. Returning original request."),r}}:void 0,beforeSendHooks:[(...t)=>{let n=eO(t[1]);try{return r.apply(r,t)}catch(t){return e.error(t,"Error in analytics hook. Returning original request."),n}},(t,r)=>(e.info({...r,type:t,endpoint:s,token:o},"Analytics request"),r)]},i);return c||l.disable(),l},h=e=>e,function(...e){return(({prefix:e,__legacy__getBuilder:t,__legacy__provider:r,analyticsPayloadBuilder:n,analyticsType:i,analyticsConfigurator:a,providerClass:o})=>{var s;let u,c;return r??(r=e=>new o(e)),s=async({getState:e,analyticsClientMiddleware:o,preprocessRequest:s,logger:u})=>{let c=[],l={log:async({state:e})=>{for(let t of c)await t(e)}},d=e(),h=a({getState:e,logger:u,analyticsClientMiddleware:o,preprocessRequest:s,provider:r(e)}),p=await t(h,e());l.description=p?.description,c.push(async e=>{"legacy"===e.configuration.analytics.analyticsMode&&await il(p,r,e,u,h.coveoAnalyticsClient)});let{emit:f}=n7(d);return c.push(async e=>{if("next"===e.configuration.analytics.analyticsMode&&i&&n){let t=n(e);await ih(f,i,t)}}),l},Object.assign(c=(u=t=>Object.assign(re(e,t),{instantlyCallable:!0}))(async(e,{getState:t,extra:r})=>{let{analyticsClientMiddleware:n,preprocessRequest:i,logger:a}=r;return await (await s({getState:t,analyticsClientMiddleware:n,preprocessRequest:i,logger:a})).log({state:t(),extra:r})}),{prepare:async({getState:e,analyticsClientMiddleware:t,preprocessRequest:r,logger:n})=>{let{description:i,log:a}=await s({getState:e,analyticsClientMiddleware:t,preprocessRequest:r,logger:n});return{description:i,action:u(async(e,{getState:t,extra:r})=>await a({state:t(),extra:r}))}}}),c})(1===e.length?{...e[0],__legacy__getBuilder:h(e[0].__legacy__getBuilder),analyticsConfigurator:d,providerClass:ic}:{prefix:e[0],__legacy__getBuilder:h(e[1]),__legacy__provider:e[2],analyticsConfigurator:d,providerClass:ic})});async function ih(e,t,r){await e(t,r)}new ec({values:{urihash:new es,sourcetype:new es,permanentid:new es}}),new es({required:!1,emptyAllowed:!0});var ip=tL("productrecommendations/setId",e=>rm(e,{id:rl})),ig=tL("productrecommendations/setSku",e=>rm(e,{skus:new ed({required:!0,min:1,each:rd})})),im=tL("productrecommendations/setBrand",e=>rm(e,{brand:new es({required:!0,emptyAllowed:!0})})),iy=tL("productrecommendations/setCategory",e=>rm(e,{category:new es({required:!0,emptyAllowed:!0})})),iv=tL("productrecommendations/setAdditionalFields",e=>rm(e,{additionalFields:new ed({required:!0,each:rd})})),ib=tL("productrecommendations/setMaxNumberOfRecommendations",e=>rm(e,{number:new et({required:!0,max:50,min:1})}
12)),iw=re("productRecommendations/get",async(e,{getState:t,rejectWithValue:r,extra:{apiClient:n}})=>{let i=t(),a=new Date().getTime(),o=await n.productRecommendations(await ik(i)),s=new Date().getTime()-a;if(void 0!==o.error)return r(o.error);let u=i.productRecommendations.additionalFields||[];return{recommendations:o.success.results.map(e=>iS(e,{additionalFields:u})),analyticsAction:id("analytics/productRecommendations/load",e=>e.makeRecommendationInterfaceLoad(),e=>new n2(e)),searchUid:o.success.searchUid,duration:s}}),iS=(e,{additionalFields:t})=>{let r=e.raw.ec_price,n=e.raw.ec_promo_price,i=e.raw.ec_in_stock,a={documentUri:e.uri,documentUriHash:e.raw.urihash,permanentid:e.raw.permanentid,clickUri:e.clickUri,ec_name:e.raw.ec_name,ec_brand:e.raw.ec_brand,ec_category:e.raw.ec_category,ec_item_group_id:e.raw.ec_item_group_id,ec_price:r,ec_shortdesc:e.raw.ec_shortdesc,ec_thumbnails:e.raw.ec_thumbnails,ec_images:e.raw.ec_images,ec_promo_price:void 0===n||void 0!==r&&n>=r?void 0:n,ec_in_stock:void 0===i?void 0:"yes"===i.toLowerCase()||"true"===i.toLowerCase(),ec_rating:e.raw.ec_rating,additionalFields:t.reduce((t,r)=>({...t,[r]:e.raw[r]}),{}),childResults:[],totalNumberOfChildResults:0};return e&&"childResults"in e&&"totalNumberOfChildResults"in e&&(a.childResults=e.childResults.map(e=>iS(e,{additionalFields:t})),a.totalNumberOfChildResults=e.totalNumberOfChildResults),a},ik=async e=>({accessToken:e.configuration.accessToken,organizationId:e.configuration.organizationId,url:e.configuration.search.apiBaseUrl,locale:e.configuration.search.locale,timezone:e.configuration.search.timezone,...e.configuration.analytics.enabled&&{visitorId:await new nB(e.configuration.analytics).getCurrentVisitorId()},recommendation:e.productRecommendations.id,numberOfResults:e.productRecommendations.maxNumberOfRecommendations,fieldsToInclude:[...nX,...e.productRecommendations.additionalFields||[]],mlParameters:{...e.productRecommendations.skus&&e.productRecommendations.skus.length>0&&{itemIds:e.productRecommendations.skus},...e.productRecommendations.filter.brand&&{brandFilter:e.productRecommendations.filter.brand},...e.productRecommendations.filter.category&&{categoryFilter:e.productRecommendations.filter.category}},actionsHistory:e.configuration.analytics.enabled?nZ.getHistory():[],...e.context&&{context:e.context.contextValues},...e.dictionaryFieldContext&&{dictionaryFieldContext:e.dictionaryFieldContext.contextValues},...e.searchHub&&{searchHub:e.searchHub}}),iI=tK(n0(),e=>{e.addCase(ip,(e,t)=>{e.id=t.payload.id}).addCase(ig,(e,t)=>{e.skus=t.payload.skus}).addCase(im,(e,t)=>{e.filter.brand=t.payload.brand}).addCase(iy,(e,t)=>{e.filter.category=t.payload.category}).addCase(ib,(e,t)=>{e.maxNumberOfRecommendations=t.payload.number}).addCase(iv,(e,t)=>{e.additionalFields=t.payload.additionalFields}).addCase(iw.rejected,(e,t)=>{e.error=t.payload?t.payload:null,e.isLoading=!1}).addCase(iw.fulfilled,(e,t)=>{e.error=null,e.searchUid=t.payload.searchUid,e.recommendations=t.payload.recommendations,e.isLoading=!1}).addCase(iw.pending,e=>{e.isLoading=!0})}),iC=tL("searchHub/set",e=>rm(e,new es({required:!0,emptyAllowed:!0}))),iA=tL("history/undo"),iO=tL("history/redo");tL("history/snapshot"),re("history/back",async(e,{dispatch:t})=>{t(iA()),await t(iE())}),re("history/forward",async(e,{dispatch:t})=>{t(iO()),await t(iE())});var iE=re("history/change",async(e,{getState:t})=>t().history.present),iD=tK("default",e=>{e.addCase(iC,(e,t)=>t.payload).addCase(iE.fulfilled,(e,t)=>t.payload?.searchHub??e).addCase(rS,(e,t)=>t.payload.searchHub||e)});async function iR(e,t){let r=e.getReader(),n;for(;!(n=await r.read()).done;)t(n.value)}function ix(){return{data:"",event:"",id:"",retry:void 0}}var iT=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)0>t.indexOf(n[i])&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r},i_="text/event-stream",iq="last-event-id";function iU(){}function ij(e){let t=e.headers.get("content-type");if(!t?.startsWith(i_))throw Error(`Expected content-type to be ${i_}, Actual: ${t}`)}var iM=tj(e=>e.query,e=>e);tj(e=>e.generatedAnswer?.citations,(e,t)=>t,(e,t)=>e?.find(e=>e.id===t)),tj(e=>iM(e)?.q,e=>e.search.requestId,(e,t)=>({q:e,requestId:t}));var iP=e=>id("analytics/generatedAnswer/streamEnd",(t,r)=>{let n,{id:i,answerAPIEnabled:a}="answer"in(n=r)&&"generatedAnswer"in n&&!ee(n.generatedAnswer?.answerConfigurationId)?{answerAPIEnabled:!0,id:aP(r).data?.answerId}:"search"in r?{answerAPIEnabled:!1,id:r.search.response.extendedResults.generativeQuestionAnsweringId}:{answerAPIEnabled:!1,id:void 0},o=e?!r.generatedAnswer?.answer||!r.generatedAnswer?.answer.length:void 0;return i?t.makeGeneratedAnswerStreamEnd({...a?{answerAPIStreamId:i}:{generativeQuestionAnsweringId:i},answerGenerated:e,answerTextIsEmpty:o}):null}),i$=async e=>({accessToken:e.configuration.accessToken,organizationId:e.configuration.organizationId,url:e.configuration.platformUrl,streamId:e.search.extendedResults?.generativeQuestionAnsweringId}),iF=["default","bullet","step","concise"],iL=new es({required:!0}),iN=new es,iz=new en({required:!0}),iQ={id:iL,title:iL,uri:iL,permanentid:iL,clickUri:iN},iV=new es({required:!0,constrainTo:["text/plain","text/markdown"]});tL("generatedAnswer/setIsVisible",e=>rm(e,iz));var iB=tL("generatedAnswer/updateMessage",e=>rm(e,{textDelta:iL})),iH=tL("generatedAnswer/updateCitations",e=>rm(e,{citations:new ed({required:!0,each:new ec({values:iQ})})})),iY=tL("generatedAnswer/updateError",e=>rm(e,{message:iN,code:new et({min:0})}
12)),iG=tL("generatedAnswer/resetAnswer");tL("generatedAnswer/like"),tL("generatedAnswer/dislike"),tL("generatedAnswer/feedbackModal/open"),tL("generatedAnswer/expand"),tL("generatedAnswer/collapse"),tL("generatedAnswer/setId",e=>rm(e,{id:new es({required:!0})})),tL("generatedAnswer/feedbackModal/close"),tL("generatedAnswer/sendFeedback");var iK=tL("generatedAnswer/setIsLoading",e=>rm(e,iz)),iW=tL("generatedAnswer/setIsStreaming",e=>rm(e,iz)),iJ=tL("generatedAnswer/setAnswerContentFormat",e=>rm(e,iV));tL("generatedAnswer/updateResponseFormat",e=>rm(e,{answerStyle:new es({required:!0,constrainTo:iF}),contentFormat:new ed({each:iV,default:["text/plain"]})})),tL("knowledge/updateAnswerConfigurationId",e=>rm(e,iL)),tL("generatedAnswer/registerFieldsToIncludeInCitations",e=>rm(e,rp));var iZ=tL("generatedAnswer/setIsAnswerGenerated",e=>rm(e,iz));re("generatedAnswer/streamAnswer",async(e,t)=>{let r=t.getState(),{dispatch:n,extra:i}=t,{setAbortControllerRef:a}=e,o=await i$(r);n(iK(!0));let s=e=>e.streamId===t.getState().search.extendedResults.generativeQuestionAnsweringId,u=i.streamingClient?.streamGeneratedAnswer(o,{write:e=>{s(o)&&(n(iK(!1)),e.payload&&e.payloadType&&((e,t)=>{switch(e){case"genqa.headerMessageType":n(iJ(JSON.parse(t).contentFormat));break;case"genqa.messageType":n(iB(JSON.parse(t)));break;case"genqa.citationsType":n(iH(JSON.parse(t)));break;case"genqa.endOfStreamType":{let e=JSON.parse(t).answerGenerated;n(iW(!1)),n(iZ(e)),n(iP(e));break}default:r.debug&&i.logger.warn(`Unknown payloadType: "${e}"`)}})(e.payloadType,e.payload))},abort:e=>{s(o)&&n(iY(e))},close:()=>{s(o)&&n(iW(!1))},resetAnswer:()=>{s(o)&&n(iG())}});u?a(u):n(iK(!1))});var iX=tj(e=>e.pipeline,e=>e),i0=tj(e=>e.searchHub,e=>e),i1=O(z()),i2=O(Q()),i5=O(z()),i3=O(V());i5.default.extend(i3.default),i1.default.extend(i2.default);function i4(e){let t=0;for(let r in e)t++;return t}var i6=e=>[].concat(...e);function i8(e){return null!=e}var i9=(...e)=>fetch(...e),i7=e=>e.status>=200&&e.status<=299;function ae(e){if(!eG(e))return e;let t={...e};for(let[e,r]of Object.entries(t))void 0===r&&delete t[e];return t}var at=class{constructor(e,t){this.value=e,this.meta=t}};async function ar(e=0,t=5){let r=~~((Math.random()+.4)*(300<<Math.min(e,t)));await new Promise(e=>setTimeout(t=>e(t),r))}var an={},ai=Object.assign((e,t)=>async(r,n,i)=>{let[a]=[5,(t||an).maxRetries,(i||an).maxRetries].filter(e=>void 0!==e).slice(-1),o={maxRetries:a,backoff:ar,retryCondition:(e,t,{attempt:r})=>r<=a,...t,...i},s=0;for(;;)try{let t=await e(r,n,i);if(t.error)throw new at(t);return t}catch(e){if(s++,e.throwImmediately){if(e instanceof at)return e.value;throw e}if(e instanceof at&&!o.retryCondition(e.value.error,r,{attempt:s,baseQueryApi:n,extraOptions:i}))return e.value;await o.backoff(s,o.maxRetries)}},{fail:function(e){throw Object.assign(new at({error:e}),{throwImmediately:!0})}}),aa=tL("__rtkq/focused"),ao=tL("__rtkq/unfocused"),as=tL("__rtkq/online"),au=tL("__rtkq/offline");function ac(e){return"query"===e.type}function al(e,t,r,n,i,a){return"function"==typeof e?e(t,r,n,i).map(ad).map(a):Array.isArray(e)?e.map(ad).map(a):[]}function ad(e){return"string"==typeof e?{type:e}:e}var ah=Symbol("forceQueryFn"),ap=e=>"function"==typeof e[ah];function af(e){return e}function ag(e,t,r,n){return al(r[e.meta.arg.endpointName][t],t3(e)?e.payload:void 0,t5(e)?e.payload:void 0,e.meta.arg.originalArgs,"baseQueryMeta"in e.meta?e.meta.baseQueryMeta:void 0,n)}function am(e,t,r){let n=e[t];n&&r(n)}function ay(e){return("arg"in e?e.arg.fixedCacheKey:e.fixedCacheKey)??e.requestId}function av(e,t,r){let n=e[ay(t)];n&&r(n)}var ab={},aw=Symbol.for("RTKQ/skipToken"),aS={status:"uninitialized"},ak=tD(aS,()=>{}),aI=tD(aS,()=>{}),aC=WeakMap?new WeakMap:void 0,aA=({endpointName:e,queryArgs:t})=>{let r="",n=aC?.get(t);if("string"==typeof n)r=n;else{let e=JSON.stringify(t,(e,t)=>t=eG(t="bigint"==typeof t?{$bigint:t.toString()}:t)?Object.keys(t).sort().reduce((e,r)=>(e[r]=t[r],e),{}):t);eG(t)&&aC?.set(t,e),r=e}return`${e}(${r})`};function aO(e,...t){return Object.assign(e,...t)}var aE=({reducerPath:e,api:t,queryThunk:r,context:n,internalState:i})=>{let{removeQueryResult:a,unsubscribeQueryResult:o}=t.internalActions,s=tJ(o.match,r.fulfilled,r.rejected);function u(e){let t=i.currentSubscriptions[e];return!!t&&!function(e){for(let t in e)return!1;return!0}(t)}let c={};
12function l(e,t,r,i){let o=n.endpointDefinitions[t]?.keepUnusedDataFor??i.keepUnusedDataFor;if(o===1/0)return;let s=Math.max(0,Math.min(o,2147482.647));if(!u(e)){let t=c[e];t&&clearTimeout(t),c[e]=setTimeout(()=>{u(e)||r.dispatch(a({queryCacheKey:e})),delete c[e]},1e3*s)}}return(r,i,a)=>{if(s(r)){let t=i.getState()[e],{queryCacheKey:n}=o.match(r)?r.payload:r.meta.arg;l(n,t.queries[n]?.endpointName,i,t.config)}if(t.util.resetApiState.match(r))for(let[e,t]of Object.entries(c))t&&clearTimeout(t),delete c[e];if(n.hasRehydrationInfo(r)){let t=i.getState()[e],{queries:a}=n.extractRehydrationInfo(r);for(let[e,r]of Object.entries(a))l(e,r?.endpointName,i,t.config)}}},aD=Error("Promise never resolved before cacheEntryRemoved."),aR=({api:e,reducerPath:t,context:r,queryThunk:n,mutationThunk:i,internalState:a})=>{let o=t4(n),s=t4(i),u=t3(n,i),c={};function l(t,n,i,a,o){let s=r.endpointDefinitions[t],u=s?.onCacheEntryAdded;if(!u)return;let l={},d=new Promise(e=>{l.cacheEntryRemoved=e}),h=Promise.race([new Promise(e=>{l.valueResolved=e}),d.then(()=>{throw aD})]);h.catch(()=>{}),c[i]=l;let p=e.endpoints[t].select("query"===s.type?n:i),f=a.dispatch((e,t,r)=>r),g={...a,getCacheEntry:()=>p(a.getState()),requestId:o,extra:f,updateCachedData:"query"===s.type?r=>a.dispatch(e.util.updateQueryData(t,n,r)):void 0,cacheDataLoaded:h,cacheEntryRemoved:d};Promise.resolve(u(n,g)).catch(e=>{if(e!==aD)throw e})}return(r,a,d)=>{var h;let p=o(h=r)?h.meta.arg.queryCacheKey:s(h)?h.meta.arg.fixedCacheKey??h.meta.requestId:e.internalActions.removeQueryResult.match(h)?h.payload.queryCacheKey:e.internalActions.removeMutationResult.match(h)?ay(h.payload):"";if(n.pending.match(r)){let e=d[t].queries[p],n=a.getState()[t].queries[p];!e&&n&&l(r.meta.arg.endpointName,r.meta.arg.originalArgs,p,a,r.meta.requestId)}else if(i.pending.match(r))a.getState()[t].mutations[p]&&l(r.meta.arg.endpointName,r.meta.arg.originalArgs,p,a,r.meta.requestId);else if(u(r)){let e=c[p];e?.valueResolved&&(e.valueResolved({data:r.payload,meta:r.meta.baseQueryMeta}),delete e.valueResolved)}else if(e.internalActions.removeQueryResult.match(r)||e.internalActions.removeMutationResult.match(r)){let e=c[p];e&&(delete c[p],e.cacheEntryRemoved())}else if(e.util.resetApiState.match(r))for(let[e,t]of Object.entries(c))delete c[e],t.cacheEntryRemoved()}},ax=({api:e,context:{apiUid:t},reducerPath:r})=>(r,n)=>{e.util.resetApiState.match(r)&&n.dispatch(e.internalActions.middlewareRegistered(t))},aT=({reducerPath:e,context:t,context:{endpointDefinitions:r},mutationThunk:n,queryThunk:i,api:a,assertTagType:o,refetchQuery:s,internalState:u})=>{let{removeQueryResult:c}=a.internalActions,l=tJ(t3(n),t5(n)),d=tJ(t3(n,i),t2(n,i)),h=[];function p(r,n){let i=n.getState(),o=i[e];if(h.push(...r),"delayed"===o.config.invalidationBehavior&&function(e){for(let t in e.queries)if(e.queries[t]?.status==="pending")return!0;for(let t in e.mutations)if(e.mutations[t]?.status==="pending")return!0;return!1}(o))return;let l=h;if(h=[],0===l.length)return;let d=a.util.selectInvalidatedBy(i,l);t.batch(()=>{for(let{queryCacheKey:e}of Array.from(d.values())){let t=o.queries[e],r=u.currentSubscriptions[e]??{};t&&(0===i4(r)?n.dispatch(c({queryCacheKey:e})):"uninitialized"!==t.status&&n.dispatch(s(t,e)))}})}return(e,t)=>{l(e)?p(ag(e,"invalidatesTags",r,o),t):d(e)?p([],t):a.util.invalidateTags.match(e)&&p(al(e.payload,void 0,void 0,void 0,void 0,o),t)}},a_=({reducerPath:e,queryThunk:t,api:r,refetchQuery:n,internalState:i})=>{let a={};function o({queryCacheKey:t},r){let s=r.getState()[e],u=s.queries[t],l=i.currentSubscriptions[t];if(!u||"uninitialized"===u.status)return;let{lowestPollingInterval:d,skipPollingIfUnfocused:h}=c(l);if(!Number.isFinite(d))return;let p=a[t];p?.timeout&&(clearTimeout(p.timeout),p.timeout=void 0);
12let f=Date.now()+d;a[t]={nextPollTimestamp:f,pollingInterval:d,timeout:setTimeout(()=>{(s.config.focused||!h)&&r.dispatch(n(u,t)),o({queryCacheKey:t},r)},d)}}function s({queryCacheKey:t},r){let n=r.getState()[e].queries[t],l=i.currentSubscriptions[t];if(!n||"uninitialized"===n.status)return;let{lowestPollingInterval:d}=c(l);if(!Number.isFinite(d))return void u(t);let h=a[t],p=Date.now()+d;(!h||p<h.nextPollTimestamp)&&o({queryCacheKey:t},r)}function u(e){let t=a[e];t?.timeout&&clearTimeout(t.timeout),delete a[e]}function c(e={}){let t=!1,r=1/0;for(let n in e)e[n].pollingInterval&&(r=Math.min(e[n].pollingInterval,r),t=e[n].skipPollingIfUnfocused||t);return{lowestPollingInterval:r,skipPollingIfUnfocused:t}}return(e,n)=>{(r.internalActions.updateSubscriptionOptions.match(e)||r.internalActions.unsubscribeQueryResult.match(e))&&s(e.payload,n),(t.pending.match(e)||t.rejected.match(e)&&e.meta.condition)&&s(e.meta.arg,n),(t.fulfilled.match(e)||t.rejected.match(e)&&!e.meta.condition)&&o(e.meta.arg,n),r.util.resetApiState.match(e)&&function(){for(let e of Object.keys(a))u(e)}()}},aq=({api:e,context:t,queryThunk:r,mutationThunk:n})=>{let i=t1(r,n),a=t2(r,n),o=t3(r,n),s={};return(r,n)=>{if(i(r)){let{requestId:i,arg:{endpointName:a,originalArgs:o}}=r.meta,u=t.endpointDefinitions[a],c=u?.onQueryStarted;if(c){let t={},r=new Promise((e,r)=>{t.resolve=e,t.reject=r});r.catch(()=>{}),s[i]=t;let l=e.endpoints[a].select("query"===u.type?o:i),d=n.dispatch((e,t,r)=>r),h={...n,getCacheEntry:()=>l(n.getState()),requestId:i,extra:d,updateCachedData:"query"===u.type?t=>n.dispatch(e.util.updateQueryData(a,o,t)):void 0,queryFulfilled:r};c(o,h)}}else if(o(r)){let{requestId:e,baseQueryMeta:t}=r.meta;s[e]?.resolve({data:r.payload,meta:t}),delete s[e]}else if(a(r)){let{requestId:e,rejectedWithValue:t,baseQueryMeta:n}=r.meta;s[e]?.reject({error:r.payload??r.error,isUnhandledError:!t,meta:n}),delete s[e]}}},aU=Symbol(),aj=(function(...e){return function(t){let r=tU(e=>t.extractRehydrationInfo?.(e,{reducerPath:t.reducerPath??"api"})),n={reducerPath:"api",keepUnusedDataFor:60,refetchOnMountOrArgChange:!1,refetchOnFocus:!1,refetchOnReconnect:!1,invalidationBehavior:"delayed",...t,extractRehydrationInfo:r,serializeQueryArgs(e){let r=aA;
12if("serializeQueryArgs"in e.endpointDefinition){let t=e.endpointDefinition.serializeQueryArgs;r=e=>{let r=t(e);return"string"==typeof r?r:aA({...e,queryArgs:r})}}else t.serializeQueryArgs&&(r=t.serializeQueryArgs);return r(e)},tagTypes:[...t.tagTypes||[]]},i={endpointDefinitions:{},batch(e){e()},apiUid:t6(),extractRehydrationInfo:r,hasRehydrationInfo:tU(e=>null!=r(e))},a={injectEndpoints:function(e){for(let[t,r]of Object.entries(e.endpoints({query:e=>({...e,type:"query"}),mutation:e=>({...e,type:"mutation"})}))){if(!0!==e.overrideExisting&&t in i.endpointDefinitions){if("throw"===e.overrideExisting)throw Error(rc(39));continue}for(let e of(i.endpointDefinitions[t]=r,o))e.injectEndpoint(t,r)}return a},enhanceEndpoints({addTagTypes:e,endpoints:t}){if(e)for(let t of e)n.tagTypes.includes(t)||n.tagTypes.push(t);if(t)for(let[e,r]of Object.entries(t))"function"==typeof r?r(i.endpointDefinitions[e]):Object.assign(i.endpointDefinitions[e]||{},r);return a}},o=e.map(e=>e.init(a,n,i));return a.injectEndpoints({endpoints:t.endpoints})}})((({createSelector:e=tj}={})=>({name:aU,init(t,{baseQuery:r,tagTypes:n,reducerPath:i,serializeQueryArgs:a,keepUnusedDataFor:o,refetchOnMountOrArgChange:s,refetchOnFocus:u,refetchOnReconnect:c,invalidationBehavior:l},d){!function(){let e="replace",t="remove";function r(e){if(!e3(e))return e;if(Array.isArray(e))return e.map(r);if(tr(e))return new Map(Array.from(e.entries()).map(([e,t])=>[e,r(t)]));if(tn(e))return new Set(Array.from(e).map(r));let t=Object.create(e2(e));for(let n in e)t[n]=r(e[n]);return e7(e,eX)&&(t[eX]=e[eX]),t}function n(e){return e5(e)?r(e):e}tc.Patches||(tc.Patches={applyPatches_:function(n,i){return i.forEach(i=>{let{path:a,op:o}=i,s=n;for(let e=0;e<a.length-1;e++){let t=e9(s),r=a[e];"string"!=typeof r&&"number"!=typeof r&&(r=""+r),(0===t||1===t)&&("__proto__"===r||"constructor"===r)&&e1(19),"function"==typeof s&&"prototype"===r&&e1(19),"object"!=typeof(s=te(s,r))&&e1(18,a.join("/"))}let u=e9(s),c=r(i.value),l=a[a.length-1];switch(o){case e:switch(u){case 2:return s.set(l,c);case 3:e1(16);default:return s[l]=c}case"add":switch(u){case 1:return"-"===l?s.push(c):s.splice(l,0,c);case 2:return s.set(l,c);case 3:return s.add(c);default:return s[l]=c}case t:switch(u){case 1:return s.splice(l,1);case 2:return s.delete(l);case 3:return s.delete(i.value);default:return delete s[l]}default:e1(17,o)}}),n},generatePatches_:function(r,i,a,o){switch(r.type_){case 0:case 2:return function(r,i,a,o){let{base_:s,copy_:u}=r;e8(r.assigned_,(r,c)=>{let l=te(s,r),d=te(u,r),h=c?e7(s,r)?e:"add":t;if(l===d&&h===e)return;let p=i.concat(r);a.push(h===t?{op:h,path:p}:{op:h,path:p,value:d}),o.push("add"===h?{op:t,path:p}:h===t?{op:"add",path:p,value:n(l)}:{op:e,path:p,value:n(l)})})}(r,i,a,o);case 1:return function(r,i,a,o){let{base_:s,assigned_:u}=r,c=r.copy_;c.length<s.length&&([s,c]=[c,s],[a,o]=[o,a]);for(let t=0;t<s.length;t++)if(u[t]&&c[t]!==s[t]){let r=i.concat([t]);a.push({op:e,path:r,value:n(c[t])}),o.push({op:e,path:r,value:n(s[t])})}for(let e=s.length;e<c.length;e++){let t=i.concat([e]);a.push({op:"add",path:t,value:n(c[e])})}for(let e=c.length-1;s.length<=e;--e){let r=i.concat([e]);o.push({op:t,path:r})}}(r,i,a,o);case 3:return function(e,r,n,i){let{base_:a,copy_:o}=e,s=0;a.forEach(e=>{if(!o.has(e)){let a=r.concat([s]);n.push({op:t,path:a,value:e}),i.unshift({op:"add",path:a,value:e})}s++}),s=0,o.forEach(e=>{if(!a.has(e)){let a=r.concat([s]);n.push({op:"add",path:a,value:e}),i.unshift({op:t,path:a,value:e})}s++})}(r,i,a,o)}},generateReplacementPatches_:function(t,r,n,i){n.push({op:e,path:[],value:r===eZ?void 0:r}),i.push({op:e,path:[],value:t})}})}();let h=e=>e;Object.assign(t,{reducerPath:i,endpoints:{},internalActions:{onOnline:as,onOffline:au,onFocus:aa,onFocusLost:ao},util:{}});let{queryThunk:p,mutationThunk:f,patchQueryData:g,updateQueryData:m,upsertQueryData:y,prefetch:v,buildMatchThunkActions:b}=function({reducerPath:e,baseQuery:t,context:{endpointDefinitions:r},serializeQueryArgs:n,api:i,assertTagType:a}){let o=async(e,{signal:n,abort:i,rejectWithValue:a,fulfillWithValue:o,dispatch:u,getState:c,extra:l})=>{let d=r[e.endpointName];try{let r=af,a,h={signal:n,abort:i,dispatch:u,getState:c,extra:l,endpoint:e.endpointName,type:e.type,forced:"query"===e.type?s(e,c()):void 0},p="query"===e.type?e[ah]:void 0;if(p?a=p():d.query?(a=await t(d.query(e.originalArgs),h,d.extraOptions),d.transformResponse&&(r=d.transformResponse)):a=await d.queryFn(e.originalArgs,h,d.extraOptions,e=>t(e,h,d.extraOptions)),a.error)throw new at(a.error,a.meta);return o(await r(a.data,a.meta,e.originalArgs),{fulfilledTimeStamp:Date.now(),baseQueryMeta:a.meta,[tV]:!0})}catch(r){let t=r;if(t instanceof at){let r=af;d.query&&d.transformErrorResponse&&(r=d.transformErrorResponse);try{return a(await r(t.value,t.meta,e.originalArgs),{baseQueryMeta:t.meta,[tV]:!0})}catch(e){t=e}}throw console.error(t),t}};function s(t,r){let n=r[e]?.queries?.[t.queryCacheKey],i=r[e]?.config.refetchOnMountOrArgChange,a=n?.fulfilledTimeStamp,o=t.forceRefetch??(t.subscribe&&i);return!!o&&(!0===o||(Number(new Date)-Number(a))/1e3>=o)}function u(e){return t=>t?.meta?.arg?.endpointName===e}return{queryThunk:re(`${e}/executeQuery`,o,{getPendingMeta:()=>({startedTimeStamp:Date.now(),[tV]:!0}),condition(t,{getState:n}){let i=n(),a=i[e]?.queries?.[t.queryCacheKey],o=a?.fulfilledTimeStamp,u=t.originalArgs,c=a?.originalArgs,l=r[t.endpointName];return!!ap(t)||a?.status!=="pending"&&(!!(s(t,i)||ac(l)&&l?.forceRefetch?.({currentArg:u,previousArg:c,endpointState:a,state:i}))||!o)},dispatchConditionRejection:!0}
12),mutationThunk:re(`${e}/executeMutation`,o,{getPendingMeta:()=>({startedTimeStamp:Date.now(),[tV]:!0})}),prefetch:(e,t,r)=>(n,a)=>{let o="force"in r&&r.force,s="ifOlderThan"in r&&r.ifOlderThan,u=(r=!0)=>i.endpoints[e].initiate(t,{forceRefetch:r,isPrefetch:!0}),c=i.endpoints[e].select(t)(a());if(o)n(u());else if(s){let e=c?.fulfilledTimeStamp;if(!e)return void n(u());(Number(new Date)-Number(new Date(e)))/1e3>=s&&n(u())}else n(u(!1))},updateQueryData:(e,t,r,n=!0)=>(a,o)=>{let s,u=i.endpoints[e].select(t)(o()),c={patches:[],inversePatches:[],undo:()=>a(i.util.patchQueryData(e,t,c.inversePatches,n))};if("uninitialized"===u.status)return c;if("data"in u)if(e3(u.data)){let[e,t,n]=tR(u.data,r);c.patches.push(...t),c.inversePatches.push(...n),s=e}else s=r(u.data),c.patches.push({op:"replace",path:[],value:s}),c.inversePatches.push({op:"replace",path:[],value:u.data});return 0===c.patches.length||a(i.util.patchQueryData(e,t,c.patches,n)),c},upsertQueryData:(e,t,r)=>n=>n(i.endpoints[e].initiate(t,{subscribe:!1,forceRefetch:!0,[ah]:()=>({data:r})})),patchQueryData:(e,t,o,s)=>(u,c)=>{let l=r[e],d=n({queryArgs:t,endpointDefinition:l,endpointName:e});if(u(i.internalActions.queryResultPatched({queryCacheKey:d,patches:o})),!s)return;let h=i.endpoints[e].select(t)(c()),p=al(l.providesTags,h.data,void 0,t,{},a);u(i.internalActions.updateProvidedBy({queryCacheKey:d,providedTags:p}))},buildMatchThunkActions:function(e,t){return{matchPending:tZ(t1(e),u(t)),matchFulfilled:tZ(t3(e),u(t)),matchRejected:tZ(t2(e),u(t))}}}}({baseQuery:r,reducerPath:i,context:d,api:t,serializeQueryArgs:a,assertTagType:h}),{reducer:w,actions:S}=function({reducerPath:e,queryThunk:t,mutationThunk:r,context:{endpointDefinitions:n,apiUid:i,extractRehydrationInfo:a,hasRehydrationInfo:o},assertTagType:s,config:u}){let c=tL(`${e}/resetApiState`),l=rn({name:`${e}/queries`,initialState:ab,reducers:{removeQueryResult:{reducer(e,{payload:{queryCacheKey:t}}){delete e[t]},prepare:tB()},queryResultPatched:{reducer(e,{payload:{queryCacheKey:t,patches:r}}){am(e,t,e=>{e.data=tx(e.data,r.concat())})},prepare:tB()}},extraReducers(e){e.addCase(t.pending,(e,{meta:t,meta:{arg:r}})=>{var n;let i=ap(r);e[n=r.queryCacheKey]??(e[n]={status:"uninitialized",endpointName:r.endpointName}),am(e,r.queryCacheKey,e=>{e.status="pending",e.requestId=i&&e.requestId?e.requestId:t.requestId,void 0!==r.originalArgs&&(e.originalArgs=r.originalArgs),e.startedTimeStamp=t.startedTimeStamp})}).addCase(t.fulfilled,(e,{meta:t,payload:r})=>{am(e,t.arg.queryCacheKey,e=>{if(e.requestId!==t.requestId&&!ap(t.arg))return;let{merge:i}=n[t.arg.endpointName];if(e.status="fulfilled",i)if(void 0!==e.data){let{fulfilledTimeStamp:n,arg:a,baseQueryMeta:o,requestId:s}=t,u=tD(e.data,e=>i(e,r,{arg:a.originalArgs,baseQueryMeta:o,fulfilledTimeStamp:n,requestId:s}));e.data=u}else e.data=r;else{var a;e.data=n[t.arg.endpointName].structuralSharing??!0?function e(t,r){if(t===r||!(eG(t)&&eG(r)||Array.isArray(t)&&Array.isArray(r)))return r;let n=Object.keys(r),i=Object.keys(t),a=n.length===i.length,o=Array.isArray(r)?[]:{};for(let i of n)o[i]=e(t[i],r[i]),a&&(a=t[i]===o[i]);return a?t:o}(e5(e.data)?(e5(a=e.data)||e1(15,a),a[e0].base_):e.data,r):r}delete e.error,e.fulfilledTimeStamp=t.fulfilledTimeStamp})}).addCase(t.rejected,(e,{meta:{condition:t,arg:r,requestId:n},error:i,payload:a})=>{am(e,r.queryCacheKey,e=>{t||e.requestId===n&&(e.status="rejected",e.error=a??i)})}).addMatcher(o,(e,t)=>{let{queries:r}=a(t);for(let[t,n]of Object.entries(r))(n?.status==="fulfilled"||n?.status==="rejected")&&(e[t]=n)})}}),d=rn({name:`${e}/mutations`,initialState:ab,reducers:{removeMutationResult:{reducer(e,{payload:t}){let r=ay(t);r in e&&delete e[r]},prepare:tB()}},extraReducers(e){e.addCase(r.pending,(e,{meta:t,meta:{requestId:r,arg:n,startedTimeStamp:i}})=>{n.track&&(e[ay(t)]={requestId:r,status:"pending",endpointName:n.endpointName,startedTimeStamp:i})}).addCase(r.fulfilled,(e,{payload:t,meta:r})=>{r.arg.track&&av(e,r,e=>{e.requestId===r.requestId&&(e.status="fulfilled",e.data=t,e.fulfilledTimeStamp=r.fulfilledTimeStamp)})}).addCase(r.rejected,(e,{payload:t,error:r,meta:n})=>{n.arg.track&&av(e,n,e=>{e.requestId===n.requestId&&(e.status="rejected",e.error=t??r)})}).addMatcher(o,(e,t)=>{let{mutations:r}=a(t);for(let[t,n]of Object.entries(r))(n?.status==="fulfilled"||n?.status==="rejected")&&t!==n?.requestId&&(e[t]=n)})}}),h=rn({name:`${e}/invalidation`,initialState:ab,reducers:{updateProvidedBy:{reducer(e,t){var r,n;let{queryCacheKey:i,providedTags:a}=t.payload;for(let t of Object.values(e))for(let e of Object.values(t)){let t=e.indexOf(i);-1!==t&&e.splice(t,1)}for(let{type:t,id:o}of a){let a=(r=e[t]??(e[t]={}))[n=o||"__internal_without_id"]??(r[n]=[]);a.includes(i)||a.push(i)}},prepare:tB()}},extraReducers(e){e.addCase(l.actions.removeQueryResult,(e,{payload:{queryCacheKey:t}})=>{for(let r of Object.values(e))for(let e of Object.values(r)){let r=e.indexOf(t);-1!==r&&e.splice(r,1)}}).addMatcher(o,(e,t)=>{var r,n;let{provided:i}=a(t);for(let[t,a]of Object.entries(i))for(let[i,o]of Object.entries(a)){let a=(r=e[t]??(e[t]={}))[n=i||"__internal_without_id"]??(r[n]=[]);for(let e of o)a.includes(e)||a.push(e)}}).addMatcher(tJ(t3(t),t5(t)),(e,t)=>{let r=ag(t,"providesTags",n,s),{queryCacheKey:i}=t.meta.arg;h.caseReducers.updateProvidedBy(e,h.actions.updateProvidedBy({queryCacheKey:i,providedTags:r}))})}}),p=rn({name:`${e}/subscriptions`,initialState:ab,reducers:{updateSubscriptionOptions(e,t){},unsubscribeQueryResult(e,t){},internal_getRTKQSubscriptions(){}}}),f=rn({name:`${e}/internalSubscriptions`,initialState:ab,reducers:{subscriptionsUpdated:{reducer:(e,t)=>tx(e,t.payload),prepare:tB()}}}),g=rn({name:`${e}/config`,initialState:{online:typeof navigator>
12"u"||void 0===navigator.onLine||navigator.onLine,focused:typeof document>"u"||"hidden"!==document.visibilityState,middlewareRegistered:!1,...u},reducers:{middlewareRegistered(e,{payload:t}){e.middlewareRegistered="conflict"!==e.middlewareRegistered&&i===t||"conflict"}},extraReducers:e=>{e.addCase(as,e=>{e.online=!0}).addCase(au,e=>{e.online=!1}).addCase(aa,e=>{e.focused=!0}).addCase(ao,e=>{e.focused=!1}).addMatcher(o,e=>({...e}))}}),m=eK({queries:l.reducer,mutations:d.reducer,provided:h.reducer,subscriptions:f.reducer,config:g.reducer});return{reducer:(e,t)=>m(c.match(t)?void 0:e,t),actions:{...g.actions,...l.actions,...p.actions,...f.actions,...d.actions,...h.actions,resetApiState:c}}}({context:d,queryThunk:p,mutationThunk:f,reducerPath:i,assertTagType:h,config:{refetchOnFocus:u,refetchOnReconnect:c,refetchOnMountOrArgChange:s,keepUnusedDataFor:o,reducerPath:i,invalidationBehavior:l}});aO(t.util,{patchQueryData:g,updateQueryData:m,upsertQueryData:y,prefetch:v,resetApiState:S.resetApiState}),aO(t.internalActions,S);let{middleware:k,actions:I}=function(e){let{reducerPath:t,queryThunk:r,api:n,context:i}=e,{apiUid:a}=i,o={invalidateTags:tL(`${t}/invalidateTags`)},s=e=>e.type.startsWith(`${t}/`),u=[ax,aE,aT,a_,aR,aq];return{middleware:r=>{let o=!1,l={...e,internalState:{currentSubscriptions:{}},refetchQuery:c,isThisApiSliceAction:s},d=u.map(e=>e(l)),h=(({api:e,queryThunk:t,internalState:r})=>{let n=`${e.reducerPath}/subscriptions`,i=null,a=null,{updateSubscriptionOptions:o,unsubscribeQueryResult:s}=e.internalActions,u=()=>r.currentSubscriptions,c={getSubscriptions:u,getSubscriptionCount:e=>i4(u()[e]??{}),isRequestSubscribed:(e,t)=>!!u()?.[e]?.[t]};return(u,l)=>{if(i||(i=JSON.parse(JSON.stringify(r.currentSubscriptions))),e.util.resetApiState.match(u))return i=r.currentSubscriptions={},a=null,[!0,!1];if(e.internalActions.internal_getRTKQSubscriptions.match(u))return[!1,c];let d=((r,n)=>{var i,a;if(o.match(n)){let{queryCacheKey:e,requestId:t,options:i}=n.payload;return r?.[e]?.[t]&&(r[e][t]=i),!0}if(s.match(n)){let{queryCacheKey:e,requestId:t}=n.payload;return r[e]&&delete r[e][t],!0}if(e.internalActions.removeQueryResult.match(n))return delete r[n.payload.queryCacheKey],!0;if(t.pending.match(n)){let{meta:{arg:e,requestId:t}}=n,a=r[i=e.queryCacheKey]??(r[i]={});return a[`${t}_running`]={},e.subscribe&&(a[t]=e.subscriptionOptions??a[t]??{}),!0}let u=!1;if(t.fulfilled.match(n)||t.rejected.match(n)){let e=r[n.meta.arg.queryCacheKey]||{},t=`${n.meta.requestId}_running`;u||(u=!!e[t]),delete e[t]}if(t.rejected.match(n)){let{meta:{condition:e,arg:t,requestId:i}}=n;if(e&&t.subscribe){let e=r[a=t.queryCacheKey]??(r[a]={});e[i]=t.subscriptionOptions??e[i]??{},u=!0}}return u})(r.currentSubscriptions,u),h=!0;if(d){a||(a=setTimeout(()=>{let t=JSON.parse(JSON.stringify(r.currentSubscriptions)),[,n]=tR(i,()=>t);l.next(e.internalActions.subscriptionsUpdated(n)),i=t,a=null},500));let o="string"==typeof u.type&&!!u.type.startsWith(n),s=t.rejected.match(u)&&u.meta.condition&&!!u.meta.arg.subscribe;h=!o&&!s}return[h,!1]}})(l),p=(({reducerPath:e,context:t,api:r,refetchQuery:n,internalState:i})=>{let{removeQueryResult:a}=r.internalActions;function o(r,o){let s=r.getState()[e],u=s.queries,c=i.currentSubscriptions;t.batch(()=>{for(let e of Object.keys(c)){let t=u[e],i=c[e];i&&t&&(Object.values(i).some(e=>!0===e[o])||Object.values(i).every(e=>void 0===e[o])&&s.config[o])&&(0===i4(i)?r.dispatch(a({queryCacheKey:e})):"uninitialized"!==t.status&&r.dispatch(n(t,e)))}})}return(e,t)=>{aa.match(e)&&o(t,"refetchOnFocus"),as.match(e)&&o(t,"refetchOnReconnect")}})(l);return e=>u=>{if(!eJ(u))return e(u);o||(o=!0,r.dispatch(n.internalActions.middlewareRegistered(a)));let c={...r,next:e},l=r.getState(),[f,g]=h(u,c,l),m;if(m=f?e(u):g,r.getState()[t]&&(p(u,c,l),s(u)||i.hasRehydrationInfo(u)))for(let e of d)e(u,c,l);return m}},actions:o};function c(e,t,n={}){return r({type:"query",endpointName:e.endpointName,originalArgs:e.originalArgs,subscribe:!1,forceRefetch:!0,queryCacheKey:t,...n})}}({reducerPath:i,context:d,queryThunk:p,mutationThunk:f,api:t,assertTagType:h});aO(t.util,I),aO(t,{reducer:w,middleware:k});let{buildQuerySelector:C,buildMutationSelector:A,selectInvalidatedBy:O,selectCachedArgsForQuery:E}=function({serializeQueryArgs:e,reducerPath:t,createSelector:r}){let n=e=>ak,i=e=>aI;return{buildQuerySelector:function(i,o){return s=>{let u=e({queryArgs:s,endpointDefinition:o,endpointName:i});return r(s===aw?n:e=>e[t]?.queries?.[u]??ak,a)}},buildMutationSelector:function(){return e=>{let n;return r((n="object"==typeof e?ay(e)??aw:e)===aw?i:e=>e[t]?.mutations?.[n]??aI,a)}},selectInvalidatedBy:function(e,r){let n=e[t],i=new Set;for(let e of r.map(ad)){let t=n.provided[e.type];if(t)for(let r of(void 0!==e.id?t[e.id]:i6(Object.values(t)))??[])i.add(r)}return i6(Array.from(i.values()).map(e=>{let t=n.queries[e];return t?[{queryCacheKey:e,endpointName:t.endpointName,originalArgs:t.originalArgs}]:[]}))},selectCachedArgsForQuery:function(e,r){return Object.values(e[t].queries).filter(e=>e?.endpointName===r&&"uninitialized"!==e.status).map(e=>e.originalArgs)}};function a(e){var t;return{...e,...{status:t=e.status,isUninitialized:"uninitialized"===t,isLoading:"pending"===t,isSuccess:"fulfilled"===t,isError:"rejected"===t}}}}({serializeQueryArgs:a,reducerPath:i,createSelector:e});aO(t.util,{selectInvalidatedBy:O,selectCachedArgsForQuery:E});let{buildInitiateQuery:D,buildInitiateMutation:R,getRunningMutationThunk:x,getRunningMutationsThunk:T,getRunningQueriesThunk:_,getRunningQueryThunk:q}=function({serializeQueryArgs:e,queryThunk:t,mutationThunk:r,api:n,context:i}){let a=new Map,o=new Map,{unsubscribeQueryResult:s,removeMutationResult:u,updateSubscriptionOptions:c}=n.internalActions;return{buildInitiateQuery:function(r,i){let o=(u,{subscribe:l=!0,forceRefetch:d,subscriptionOptions:h,[ah]:p,...f}={})=>(g,m)=>{let y=e({queryArgs:u,endpointDefinition:i,endpointName:r}),v=t({...f,type:"query",subscribe:l,forceRefetch:d,subscriptionOptions:h,endpointName:r,originalArgs:u,queryCacheKey:y,[ah]:p}),b=n.endpoints[r].select(u),w=g(v),S=b(m()),{requestId:k,abort:I}=w,C=S.requestId!==k,A=a.get(g)?.[y],O=()=>b(m()),E=Object.assign(p?w.then(O):C&&!A?Promise.resolve(S):Promise.all([A,w]).then(O),{arg:u,requestId:k,subscriptionOptions:h,queryCacheKey:y,abort:I,async unwrap(){let e=await E;if(e.isError)throw e.error;return e.data},refetch:()=>g(o(u,{subscribe:!1,forceRefetch:!0})),unsubscribe(){l&&g(s({queryCacheKey:y,requestId:k}))},updateSubscriptionOptions(e){E.subscriptionOptions=e,g(c({endpointName:r,requestId:k,queryCacheKey:y,options:e}))}});if(!A&&!C&&!p){let e=a.get(g)||{};
12e[y]=E,a.set(g,e),E.then(()=>{delete e[y],i4(e)||a.delete(g)})}return E};return o},buildInitiateMutation:function(e){return(t,{track:n=!0,fixedCacheKey:i}={})=>(a,s)=>{var c,l;let d=a(r({type:"mutation",endpointName:e,originalArgs:t,track:n,fixedCacheKey:i})),{requestId:h,abort:p,unwrap:f}=d,g=Object.assign((c=d.unwrap().then(e=>({data:e})),l=e=>({error:e}),c.catch(l)),{arg:d.arg,requestId:h,abort:p,unwrap:f,reset:()=>{a(u({requestId:h,fixedCacheKey:i}))}}),m=o.get(a)||{};return o.set(a,m),m[h]=g,g.then(()=>{delete m[h],i4(m)||o.delete(a)}),i&&(m[i]=g,g.then(()=>{m[i]===g&&(delete m[i],i4(m)||o.delete(a))})),g}},getRunningQueryThunk:function(t,r){return n=>{let o=e({queryArgs:r,endpointDefinition:i.endpointDefinitions[t],endpointName:t});return a.get(n)?.[o]}},getRunningMutationThunk:function(e,t){return e=>o.get(e)?.[t]},getRunningQueriesThunk:function(){return e=>Object.values(a.get(e)||{}).filter(i8)},getRunningMutationsThunk:function(){return e=>Object.values(o.get(e)||{}).filter(i8)}}}({queryThunk:p,mutationThunk:f,api:t,serializeQueryArgs:a,context:d});return aO(t.util,{getRunningMutationThunk:x,getRunningMutationsThunk:T,getRunningQueryThunk:q,getRunningQueriesThunk:_}),{name:aU,injectEndpoint(e,r){var n;(n=t.endpoints)[e]??(n[e]={}),ac(r)?aO(t.endpoints[e],{name:e,select:C(e,r),initiate:D(e,r)},b(p,e)):"mutation"===r.type&&aO(t.endpoints[e],{name:e,select:A(),initiate:R(e)},b(f,e))}}}}))())({reducerPath:"answer",baseQuery:ai(async(e,t,r)=>{let n=t.getState(),{accessToken:i,organizationId:a,platformUrl:o}=n.configuration,s=n.generatedAnswer.answerConfigurationId,u={...e,headers:{...e?.headers||{},Authorization:`Bearer ${i}`}};try{return{data:(function({baseUrl:e,prepareHeaders:t=e=>e,fetchFn:r=i9,paramsSerializer:n,isJsonContentType:i=e=>/ion\/(vnd\.api\+)?json/.test(e.get("content-type")||""),jsonContentType:a="application/json",jsonReplacer:o,timeout:s,responseHandler:u,validateStatus:c,...l}={}){return typeof fetch>"u"&&r===i9&&console.warn("Warning: `fetch` is not available. Please supply a custom `fetchFn` property to use `fetchBaseQuery` on SSR environments."),async(h,p)=>{let{signal:f,getState:g,extra:m,endpoint:y,forced:v,type:b}=p,w,{url:S,headers:k=new Headers(l.headers),params:I,responseHandler:C=u??"json",validateStatus:A=c??i7,timeout:O=s,...E}="string"==typeof h?{url:h}:h,D={...l,signal:f,...E};k=new Headers(ae(k)),D.headers=await t(k,{getState:g,extra:m,endpoint:y,forced:v,type:b})||k;let R=e=>"object"==typeof e&&(eG(e)||Array.isArray(e)||"function"==typeof e.toJSON);if(!D.headers.has("content-type")&&R(D.body)&&D.headers.set("content-type",a),R(D.body)&&i(D.headers)&&(D.body=JSON.stringify(D.body,o)),I){let e=~S.indexOf("?")?"&":"?";S+=e+(n?n(I):new URLSearchParams(ae(I)))}let x=new Request(S=function(e,t){var r;if(!e)return t;if(!t)return e;if(r=t,RegExp("(^|:)//").test(r))return t;let n=e.endsWith("/")||!t.startsWith("?")?"/":"";return e=e.replace(/\/$/,""),t=t.replace(/^\//,""),`${e}${n}${t}`}(e,S),D);w={request:new Request(S,D)};let T,_=!1,q=O&&setTimeout(()=>{_=!0,p.abort()},O);try{T=await r(x)}catch(e){return{error:{status:_?"TIMEOUT_ERROR":"FETCH_ERROR",error:String(e)},meta:w}}finally{q&&clearTimeout(q)}let U=T.clone();w.response=U;let j,M="";try{let e;if(await Promise.all([d(T,C).then(e=>j=e,t=>e=t),U.text().then(e=>M=e,()=>{})]),e)throw e}catch(e){return{error:{status:"PARSING_ERROR",originalStatus:T.status,data:M,error:String(e)},meta:w}}return A(T,j)?{data:j,meta:w}:{error:{status:T.status,data:j},meta:w}};async function d(e,t){if("function"==typeof t)return t(e);if("content-type"===t&&(t=i(e.headers)?"json":"text"),"json"===t){let t=await e.text();return t.length?JSON.parse(t):null}return e.text()}})({baseUrl:`${o}/rest/organizations/${a}/answer/v1/configs/${s}`})(u,t,r)}}catch(e){return{error:e}}},{maxRetries:3}),endpoints:()=>({})}).injectEndpoints({overrideExisting:!0,endpoints:e=>({getAnswer:e.query({queryFn:()=>({data:{answerStyle:void 0,contentFormat:void 0,answer:void 0,citations:void 0,error:void 0,generated:!1,isStreaming:!0,isLoading:!0}}),async onCacheEntryAdded(e,{getState:t,cacheDataLoaded:r,updateCachedData:n,dispatch:i}){await r;let{configuration:a,generatedAnswer:o}=t(),{platformUrl:s,organizationId:u,accessToken:c}=a;await function(e,t){var{signal:r,headers:n,onopen:i,onmessage:a,onclose:o,onerror:s,openWhenHidden:u,fetch:c}=t,l=iT(t,["signal","headers","onopen","onmessage","onclose","onerror","openWhenHidden","fetch"]);return new Promise((t,d)=>{let h,p=Object.assign({},n);function f(){h?.abort(),document.hidden||w()}p.accept||(p.accept=i_),!u&&iU()&&document.addEventListener("visibilitychange",f);let g=1e3,m=0;function y(){iU()&&document.removeEventListener("visibilitychange",f),clearTimeout(m),h?.abort()}r?.addEventListener("abort",()=>{y(),t()});let v=c??v,b=i??ij;async function w(){var r,n,i,u;h=typeof AbortController>"u"?null:new AbortController;
12try{let r,s,c,d,f,m,w=await v(e,Object.assign(Object.assign({},l),{headers:p,signal:h?.signal}));await b(w),await iR(w.body,(n=e=>{e?p[iq]=e:delete p[iq]},i=e=>{g=e},r=ix(),s=new TextDecoder,u=function(e,t){if(0===e.length)a?.(r),r=ix();else if(t>0){let a=s.decode(e.subarray(0,t)),o=t+(32===e[t+1]?2:1),u=s.decode(e.subarray(o));switch(a){case"data":r.data=r.data?r.data+`
13`+u:u;break;case"event":r.event=u;break;case"id":n(r.id=u);break;case"retry":let c=parseInt(u,10);isNaN(c)||i(r.retry=c)}}},m=!1,function(e){var t,r;let n;void 0===c?(c=e,d=0,f=-1):(t=c,r=e,(n=new Uint8Array(t.length+r.length)).set(t),n.set(r,t.length),c=n);let i=c.length,a=0;for(;d<i;){m&&(10===c[d]&&(a=++d),m=!1);let e=-1;for(;d<i&&-1===e;++d)switch(c[d]){case 58:-1===f&&(f=d-a);break;case 13:m=!0;case 10:e=d}if(-1===e)break;u(c.subarray(a,e),f),a=d,f=-1}a===i?c=void 0:0!==a&&(c=c.subarray(a),d-=a)})),o?.(),y(),t()}catch(e){if(!h?.signal.aborted)try{let t=null!=(r=s?.(e))?r:g;clearTimeout(m),m=setTimeout(w,t)}catch(e){y(),d(e)}}}w()})}(`${s}/rest/organizations/${u}/answer/v1/configs/${o.answerConfigurationId}/generate`,{method:"POST",body:JSON.stringify(e),headers:{Authorization:`Bearer ${c}`,Accept:"application/json","Content-Type":"application/json","Accept-Encoding":"*"},fetch,onopen:async e=>{let t=e.headers.get("x-answer-id");t&&n(e=>{e.answerId=t})},onmessage:e=>{n(t=>{((e,t,r)=>{let n=JSON.parse(e.data);"ERROR"===n.finishReason&&n.errorMessage&&(t.error={message:n.errorMessage,code:n.code},t.isStreaming=!1,t.isLoading=!1,console.error(`${n.errorMessage} - code ${n.code}`));let i=n.payload.length?JSON.parse(n.payload):{};switch(n.payloadType){case"genqa.headerMessageType":i.answerStyle&&i.contentFormat&&(((e,t)=>{let{answerStyle:r,contentFormat:n}=t;e.answerStyle=r,e.contentFormat=n,e.isStreaming=!0,e.isLoading=!1})(t,i),r(iJ(i.contentFormat)));break;case"genqa.messageType":i.textDelta&&(void 0===t.answer?t.answer=i.textDelta:"string"==typeof i.textDelta&&(t.answer=t.answer.concat(i.textDelta)),r(iB({textDelta:i.textDelta})));break;case"genqa.citationsType":i.citations&&(t.citations=i.citations,r(iH({citations:i.citations})));break;case"genqa.endOfStreamType":t.generated=i.answerGenerated,t.isStreaming=!1,r(iP(i.answerGenerated??!1))}})(e,t,i)})},onerror:e=>{throw e}})}})})});tj(e=>iM(e)?.q,e=>e.search.requestId,(e,t)=>({q:e,requestId:t}));var aM={},aP=e=>{let t,r,n,i;return aj.endpoints.getAnswer.select((t=iM(e)?.q,r=i0(e),n=iX(e),i=e.generatedAnswer?.fieldsToIncludeInCitations??[],{q:t,pipelineRuleParameters:{mlGenerativeQuestionAnswering:{responseFormat:e.generatedAnswer.responseFormat,citationsFieldToInclude:i}},...r?.length&&{searchHub:r},...n?.length&&{pipeline:n},...aM[t]?.length&&{facets:aM[t]},...e.fields&&{fieldsToInclude:e.fields.fieldsToInclude},...e.didYouMean&&{queryCorrection:{enabled:e.didYouMean.enableDidYouMean&&"next"===e.didYouMean.queryCorrectionMode,options:{automaticallyCorrect:e.didYouMean.automaticallyCorrectQuery?"whenNoResults":"never"}},enableDidYouMean:e.didYouMean.enableDidYouMean&&"legacy"===e.didYouMean.queryCorrectionMode},...e.pagination&&{numberOfResults:e.pagination?e.pagination.firstResult+e.pagination.numberOfResults>5e3?5e3-e.pagination.firstResult:e.pagination.numberOfResults:void 0,firstResult:e.pagination.firstResult},tab:e.configuration.analytics.originLevel2}))(e)},a$=tK(rb,e=>e);function aF(){return"u">typeof window&&"u">typeof document}var aL=e=>t=>r=>{let n,i;i=r.payload?.analyticsAction,"type"in r&&!ee(i)&&(n=r.payload.analyticsAction,delete r.payload.analyticsAction);let a=t(r);return"type"in r&&("search/executeSearch/fullfilled"===r.type&&void 0===n&&console.error("No anal
13ytics action associated with search:",r),"recommendation/get/fullfilled"===r.type&&void 0===n&&console.error("No analytics action associated with recommendation:",r),"productRecommendations/get/fullfilled"===r.type&&void 0===n&&console.error("No analytics action associated with product recommendation:",r)),void 0!==n&&e.dispatch(n),a},aN=O(B()),az=tL("commerce/configuration/updateBasicConfiguration",e=>rm(e,{accessToken:rd,organizationId:rd,platformUrl:rd})),aQ=tL("commerce/configuration/updateAnalyticsConfiguration",e=>rm(e,{enabled:rk.enabled,source:rk.source,trackingId:rk.trackingId})),aV=tL("commerce/configuration/analytics/disable"),aB=tL("commerce/configuration/analytics/enable"),aH={q:new es,enableQuerySyntax:new en,aq:new es,cq:new es,firstResult:new et({min:0}),numberOfResults:new et({min:0}),sortCriteria:new es,f:new ec,fExcluded:new ec,cf:new ec,nf:new ec,mnf:new ec,df:new ec,debug:new en,sf:new ec,tab:new es,af:new ec},aY=tL("searchParameters/restore",e=>rm(e,aH));tL("tab/register",e=>rm(e,new ec({values:{id:rl,expression:rh}})));var aG=tL("tab/updateActiveTab",e=>rm(e,rl)),aK=O(z()),aW=O(H()),aJ=O(Y());aK.default.extend(aJ.default),aK.default.extend(aW.default);var aZ="/rest/search/v2",aX="/rest/ua",a0=tK({organizationId:"",accessToken:"",platformUrl:eT(),search:{apiBaseUrl:`${eT()}${aZ}`,locale:"en-US",timezone:aK.default.tz.guess(),authenticationProviders:[]},analytics:{enabled:!0,apiBaseUrl:`${eR("analytics",void 0)}${aX}`,nextApiBaseUrl:"",originContext:"Search",originLevel2:"default",originLevel3:"default",anonymous:!1,deviceId:"",userDisplayName:"",documentLocation:"",trackingId:"",analyticsMode:"legacy",source:{}},knowledge:{answerConfigurationId:""}},e=>e.addCase(rw,(e,t)=>{a1(e,t.payload)}).addCase(az,(e,t)=>{a1(e,t.payload)}).addCase(rS,(e,t)=>{t.payload.apiBaseUrl&&(e.search.apiBaseUrl=t.payload.apiBaseUrl),t.payload.locale&&(e.search.locale=t.payload.locale),t.payload.timezone&&(e.search.timezone=t.payload.timezone),t.payload.authenticationProviders&&(e.search.authenticationProviders=t.payload.authenticationProviders)}).addCase(rI,(e,t)=>{ee(t.payload.enabled)||(e.analytics.enabled=t.payload.enabled),ee(t.payload.originContext)||(e.analytics.originContext=t.payload.originContext),ee(t.payload.originLevel2)||(e.analytics.originLevel2=t.payload.originLevel2),ee(t.payload.originLevel3)||(e.analytics.originLevel3=t.payload.originLevel3),ee(t.payload.apiBaseUrl)||(e.analytics.apiBaseUrl=t.payload.apiBaseUrl),ee(t.payload.nextApiBaseUrl)||(e.analytics.nextApiBaseUrl=t.payload.nextApiBaseUrl),ee(t.payload.trackingId)||(e.analytics.trackingId=t.payload.trackingId),ee(t.payload.analyticsMode)||(e.analytics.analyticsMode=t.payload.analyticsMode),ee(t.payload.source)||(e.analytics.source=t.payload.source);let r=(0,aN.default)();r&&(e.analytics.analyticsMode="next",e.analytics.trackingId=r),ee(t.payload.runtimeEnvironment)||(e.analytics.runtimeEnvironment=t.payload.runtimeEnvironment),ee(t.payload.anonymous)||(e.analytics.anonymous=t.payload.anonymous),ee(t.payload.deviceId)||(e.analytics.deviceId=t.payload.deviceId),ee(t.payload.userDisplayName)||(e.analytics.userDisplayName=t.payload.userDisplayName),ee(t.payload.documentLocation)||(e.analytics.documentLocation=t.payload.documentLocation)}).addCase(aQ,(e,t)=>{ee(t.payload.enabled)||(e.analytics.enabled=t.payload.enabled),ee(t.payload.trackingId)||(e.analytics.trackingId=t.payload.trackingId),ee(t.payload.source)||(e.analytics.source=t.payload.source)}).addCase(rC,e=>{e.analytics.enabled=!1}).addCase(aV,e=>{e.analytics.enabled=!1}).addCase(rA,e=>{e.analytics.enabled=!0}).addCase(aB,e=>{e.analytics.enabled=!0}).addCase(rO,(e,t)=>{e.analytics.originLevel2=t.payload.originLevel2}).addCase(rE,(e,t)=>{e.analytics.originLevel3=t.payload.originLevel3}).addCase(aG,(e,t)=>{e.analytics.originLevel2=t.payload}).addCase(aY,(e,t)=>{e.analytics.originLevel2=t.payload.tab||e.analytics.originLevel2}));function a1(e,t){t.accessToken&&(e.accessToken=t.accessToken),t.organizationId&&(e.organizationId=t.organizationId),t.platformUrl&&(e.platformUrl=t.platformUrl,e.search.apiBaseUrl=`${t.platformUrl}${aZ}`,e.analytics.apiBaseUrl=function(e,t){let r;if(/^https:\/\/platform(dev|stg|hipaa)?(-)?(eu|au)?\.cloud\.coveo\.com/.test(e))return e.replace(/^(https:\/\/)platform/,"$1analytics")+aX;let n=(r=eU(e))&&r.organizationId===t?r:null;return n?ex(t,n.environment).analytics:e}(t.platformUrl,e.organizationId))}var a2=()=>e=>t=>e(t.instantlyCallable?t():t),a5=e=>({referrer:document.referrer,userAgent:navigator.userAgent,location:window.location.href,clientId:e}),a3=()=>({referrer:null,userAgent:null,location:null,clientId:""});async function a4(e){try{return await e()}catch{return""}}var a6={configuration:a0,version:a$}
13,a8=class extends Error{constructor(e){super(e),this.name="InvalidEngineConfiguration"}},a9=O(K());new es({required:!1,emptyAllowed:!1}),new es({required:!1,emptyAllowed:!1}),new ec({options:{required:!1},values:{enabled:new en({required:!1}),originContext:new es({required:!1}),originLevel2:new es({required:!1}),originLevel3:new es({required:!1}),analyticsMode:new es({constrainTo:["legacy","next"],required:!1})}});var a7=new J({organizationId:rl,accessToken:rl,platformUrl:new es({required:!1,emptyAllowed:!1}),name:new es({required:!1,emptyAllowed:!1}),analytics:new ec({options:{required:!1},values:{enabled:new en({required:!1}),originContext:new es({required:!1}),originLevel2:new es({required:!1}),originLevel3:new es({required:!1}),analyticsMode:new es({constrainTo:["legacy"],required:!1})}}),searchHub:rd,locale:rd,timezone:rd}),oe={searchHub:iD,productRecommendations:iI},ot=new ed({each:rl,required:!0}),or=(e,t)=>(rm(e,rl),eu(t)?rm(t,rl):rm(t,ot),{payload:{contextKey:e,contextValue:t}}),on=tL("context/set",e=>{for(let[t,r]of Object.entries(e))or(t,r);return{payload:e}}),oi=tL("context/add",e=>or(e.contextKey,e.contextValue)),oa=tL("context/remove",e=>rm(e,rl));tK({contextValues:{}},e=>{e.addCase(on,(e,t)=>{e.contextValues=t.payload}).addCase(oi,(e,t)=>{e.contextValues[t.payload.contextKey]=t.payload.contextValue}).addCase(oa,(e,t)=>{delete e.contextValues[t.payload]}).addCase(iE.fulfilled,(e,t)=>{t.payload&&(e.contextValues=t.payload.context.contextValues)})});var oo=tL("dictionaryFieldContext/set",e=>{let t=rm(e,new ec({options:{required:!0}})).error;if(t)return{payload:e,error:t};let r=rm(Object.values(e),new ed({each:rh})).error;return r?{payload:e,error:r}:{payload:e}}),os=tL("dictionaryFieldContext/add",e=>rm(e,new ec({options:{required:!0},values:{field:rh,key:rh}}))),ou=tL("dictionaryFieldContext/remove",e=>rm(e,rh));tK({contextValues:{}},e=>{e.addCase(oo,(e,t)=>{e.contextValues=t.payload}).addCase(os,(e,t)=>{let{field:r,key:n}=t.payload;e.contextValues[r]=n}).addCase(ou,(e,t)=>{delete e.contextValues[t.payload]}).addCase(iE.fulfilled,(e,t)=>{t.payload&&(e.contextValues=t.payload.dictionaryFieldContext.contextValues)})});var oc={additionalFields:new ed({required:!1,each:rd}),skus:new ed({required:!1,each:rd}),maxNumberOfRecommendations:new et({required:!1,max:50,min:1,default:5})},ol=new J({id:rl,...oc}),od=new J({sku:new es({required:!0,emptyAllowed:!1}),maxNumberOfRecommendations:oc.maxNumberOfRecommendations,additionalFields:oc.additionalFields});new J({...oc}),new J({...oc}),new J({maxNumberOfRecommendations:oc.maxNumberOfRecommendations,additionalFields:oc.additionalFields}),new J({maxNumberOfRecommendations:oc.maxNumberOfRecommendations,additionalFields:oc.additionalFields}),new J({maxNumberOfRecommendations:oc.maxNumberOfRecommendations,additionalFields:oc.additionalFields}),new J({values:new ec({options:{required:!1}})}),new J({...oc}),new J({...oc}),"u">typeof window||(r.g.crypto||(r.g.crypto=C("crypto")),!r.g.crypto.getRandomValues&&r.g.crypto.webcrypto&&(r.g.crypto.getRandomValues=r.g.crypto.webcrypto.getRandomValues.bind(r.g.crypto.webcrypto)));let oh=class{constructor(e){(0,y.r)(this,e),this.unsubscribe=()=>{},this.state=void 0}componentWillLoad(){let e={...{organizationId:"searchuisamples",accessToken:"xx564559b1-0045-48e1-953c-3addd1ee4457",organizationEndpoints:ex("searchuisamples")},searchHub:"default"};this.engine=function(e){let t=(r=e.loggerOptions,(0,a9.default)({name:"@coveo/headless",level:r?.level||"warn",formatters:{log:r?.logFormatter}}));var r,n,i,a=e.configuration,o=t;try{a7.validate(a)}catch(e){throw o.error("Product Recommendation engine configuration error",e),e}let s=(i=e.configuration,new e$({logger:t,preprocessRequest:i.preprocessRequest||ep,postprocessSearchResponseMiddleware:eN,postprocessFacetSearchResponseMiddleware:ez,postprocessQuerySuggestResponseMiddleware:eQ})),u={...(n=e.configuration,{analyticsClientMiddleware:function(e){let{analytics:t}=e;return t?.analyticsClientMiddleware||((e,t)=>t)}(n),validatePayload:rg,preprocessRequest:n.preprocessRequest||ep,logger:t}),apiClient:s},c=function(e,t){var r;let n=function(e,t){var r,n;let i,a,{reducers:o}=e,s=(r={...a6,...o},n=e.preloadedState??{},i={...r},{get combinedReducer(){let e;return e=eK({...function(e){let t={};for(let[r,n]of e)t[r]=n;return t}(Object.entries(n).filter(([e])=>!(e in i)).map(([e,t])=>[e,()=>t])),...i}),(t,r)=>{let n=e(t,r);return a?a(n,r):n}},containsAll:e=>Object.keys(e).every(e=>e in i),add(e){Object.keys(e).filter(e=>
13!(e in i)).forEach(t=>i[t]=e[t])},addCrossReducer(e){a=e}});e.crossReducer&&s.addCrossReducer(e.crossReducer);let u=t.logger,c=()=>{let e="";try{e=n7(h.state).getMeta("").clientId}catch(e){u.warn("Error while obtaining clientID from relay",e)}return e},l={...t,get relay(){return n7(h.state)},get navigatorContext(){return e.navigatorContextProvider?e.navigatorContextProvider():aF()?a5(c()):a3()}},d=function(e,t,r){let{preloadedState:n,configuration:i}=e,a=i.name||"coveo-headless",o=function(e,t){var r,n,i,a,o,s,u,c,l,d,h;let p,f,{renewAccessToken:g}=e.configuration;return[a2,(p=0,r=()=>p=0,void 0===n&&(n={}),s=null!=(i=n.isImmediate)&&i,u=null!=(a=n.callback)&&a,c=n.maxWait,l=Date.now(),d=[],(h=function(){var e=[].slice.call(arguments),t=this;return new Promise(function(n,i){var a=s&&void 0===o;if(void 0!==o&&clearTimeout(o),o=setTimeout(function(){if(o=void 0,l=Date.now(),!s){var n=r.apply(t,e);u&&u(n),d.forEach(function(e){return(0,e.resolve)(n)}),d=[]}},function(){if(void 0!==c){var e=Date.now()-l;if(e+500>=c)return c-e}return 500}()),a){var h=r.apply(t,e);return u&&u(h),n(h)}d.push({resolve:n,reject:i})})}).cancel=function(e){void 0!==o&&clearTimeout(o),d.forEach(function(t){return(0,t.reject)(e)}),d=[]},f=h,e=>r=>async n=>{var i;if("function"!=typeof n)return r(n);let a=await r(n);if(i=a,i?.error?.name!==new eI().name)return a;
13if("function"!=typeof g)return t.warn("Unable to renew the expired token because a renew function was not provided. Please specify the #renewAccessToken option when initializing the engine."),a;if(p>=5)return t.warn("Attempted to renew the token but was not successful. Please check the #renewAccessToken function."),a;p++,f();let o=await a4(g);e.dispatch(rw({accessToken:o})),e.dispatch(n)}),()=>e=>r=>{if(!r.error)return e(r);let n=r.error;if(r.payload?.ignored||t.error(n.stack||n.message||n.name||"Error",`Action dispatch error ${r.type}`,r),"SchemaValidationError"!==r.error.name)return e(r)},aL].concat(aj.middleware,e.middlewares||[])}(e,t.logger);return function({reducer:e,preloadedState:t,middlewares:r=[],thunkExtraArguments:n,name:i}){return function(e){let t,r,n=function(e){let{thunk:t=!0,immutableCheck:r=!0,serializableCheck:n=!0,actionCreatorCheck:i=!0}=e??{},a=new tN;return t&&("boolean"==typeof t?a.push(t$):a.push(tP(t.extraArgument))),a},{reducer:i,middleware:a,devTools:o=!0,preloadedState:s,enhancers:u}=e||{},c;if("function"==typeof i)c=i;else if(eG(i))c=eK(i);else throw Error(rc(1));r="function"==typeof a?a(n):n();let l=eW;o&&(l=tF({trace:!1,..."object"==typeof o&&o}));let d=(t=function(...e){return t=>(r,n)=>{let i=t(r,n),a=()=>{throw Error(eV(15))},o={getState:i.getState,dispatch:(e,...t)=>a(e,...t)};return a=eW(...e.map(e=>e(o)))(i.dispatch),{...i,dispatch:a}}}(...r),function(e){let{autoBatch:r=!0}=e??{},n=new tN(t);return r&&n.push(((e={type:"raf"})=>t=>(...r)=>{let n=t(...r),i=!0,a=!1,o=!1,s=new Set,u="tick"===e.type?queueMicrotask:"raf"===e.type?tY:"callback"===e.type?e.queueNotification:tH(e.timeout),c=()=>{o=!1,a&&(a=!1,s.forEach(e=>e()))};return Object.assign({},n,{subscribe(e){let t=n.subscribe(()=>i&&e());return s.add(e),()=>{t(),s.delete(e)}},dispatch(e){try{return(a=!(i=!e?.meta?.[tV]))&&(o||(o=!0,u(c))),n.dispatch(e)}finally{i=!0}}})})("object"==typeof r?r:void 0)),n});return function e(t,r,n){if("function"!=typeof t)throw Error(eV(2));if("function"==typeof r&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw Error(eV(0));if("function"==typeof r&&typeof n>"u"&&(n=r,r=void 0),"u">typeof n){if("function"!=typeof n)throw Error(eV(1));return n(e)(t,r)}let i=t,a=r,o=new Map,s=o,u=0,c=!1;function l(){s===o&&(s=new Map,o.forEach((e,t)=>{s.set(t,e)}))}function d(){if(c)throw Error(eV(3));return a}function h(e){if("function"!=typeof e)throw Error(eV(4));if(c)throw Error(eV(5));let t=!0;l();let r=u++;return s.set(r,e),function(){if(t){if(c)throw Error(eV(6));t=!1,l(),s.delete(r),o=null}}}function p(e){if(!eG(e))throw Error(eV(7));if(typeof e.type>"u")throw Error(eV(8));if("string"!=typeof e.type)throw Error(eV(17));if(c)throw Error(eV(9));try{c=!0,a=i(a,e)}finally{c=!1}
13return(o=s).forEach(e=>{e()}),e}return p({type:eY.INIT}),{dispatch:p,subscribe:h,getState:d,replaceReducer:function(e){if("function"!=typeof e)throw Error(eV(10));i=e,p({type:eY.REPLACE})},[eB]:function(){return{subscribe(e){if("object"!=typeof e||null===e)throw Error(eV(11));function t(){e.next&&e.next(d())}return t(),{unsubscribe:h(t)}},[eB](){return this}}}}}(c,s,l(..."function"==typeof u?u(d):d()))}({reducer:e,preloadedState:t,devTools:{stateSanitizer:e=>e.history?{...e,history:"<<OMIT>>"}:e,name:i,shouldHotReload:!1},middleware:e=>{let t;return e({thunk:{extraArgument:n}}).prepend(...r).concat((t=n.logger,e=>r=>n=>(t.debug({action:n,nextState:e.getState()},`Action dispatched: ${n.type}`),r(n))))}})}({preloadedState:n,reducer:r.combinedReducer,middlewares:o,thunkExtraArguments:t,name:a})}(e,l,s),h={addReducers(e){s.containsAll(e)||(s.add(e),d.replaceReducer(s.combinedReducer))},dispatch:d.dispatch,subscribe:d.subscribe,enableAnalytics(){d.dispatch(rA())},disableAnalytics(){d.dispatch(rC())},get state(){return d.getState()},get relay(){return n7(this.state)},get navigatorContext(){return e.navigatorContextProvider?e.navigatorContextProvider():aF()?a5(c()):a3()},logger:u,store:d};return h}(e,t),{accessToken:i,organizationId:a}=e.configuration,{organizationEndpoints:o}=e.configuration,s=o?.platform||e.configuration.platformUrl;(!ee((r=e.configuration).platformUrl)||ee(r.organizationEndpoints?.platform))&&n.logger.warn(`The \`platformUrl\` (${e.configuration.platformUrl}
13) option will be deprecated in the next major version. Consider using the \`organizationEndpoints\` option instead. See [Organization endpoints](https://docs.coveo.com/en/mcc80216).`),X(e.configuration.organizationEndpoints)?n.logger.warn("The `organizationEndpoints` options was not explicitly set in the Headless engine configuration. Coveo recommends setting this option, as it has resiliency benefits and simplifies the overall configuration for multi-region deployments. See [Organization endpoints](https://docs.coveo.com/en/mcc80216)."):function(e){let{platform:t}=e.organizationEndpoints;if(X(t))return!1;let r=eU(t);return r&&r.organizationId!==e.organizationId}(e.configuration)&&n.logger.warn(`There is a mismatch between the \`organizationId\` option (${e.configuration.organizationId}) and the organization configured in the \`organizationEndpoints\` option (${e.configuration.organizationEndpoints?.platform}). This could lead to issues that are complex to troubleshoot. Please make sure both values match.`),n.dispatch(rw({accessToken:i,organizationId:a,platformUrl:s}));let u=function(e,t){let r=e.organizationEndpoints?.analytics||void 0,{analyticsClientMiddleware:n,...i}=e.analytics??{},a={...i,nextApiBaseUrl:`${r}/rest/organizations/${e.organizationId}/events/v1`,apiBaseUrl:r};if("next"!==a.analyticsMode&&function(){if(typeof navigator>"u"||typeof window>"u")return!1;let e=navigator,t=window;return[e.globalPrivacyControl,e.doNotTrack,e.msDoNotTrack,t.doNotTrack].some(e=>eA.has(e))}())return t.info("Analytics disabled since doNotTrack is active."),{...a,enabled:!1};if("next"===a.analyticsMode&&!i.trackingId)throw new a8('analytics.trackingId is required when analytics.analyticsMode="next"');return a}(e.configuration,n.logger);return u&&n.dispatch(rI(u)),n}({...e,reducers:oe},u),{searchHub:l,timezone:d,locale:h}=e.configuration;return c.dispatch(rS({timezone:d,locale:h})),ee(l)||c.dispatch(iC(l)),{...c,get state(){return c.state}}}({configuration:{...e,searchHub:"frequently_bought_recommendations"}}),this.frequentlyBoughtTogether=function(e,t){let r=ry(e,od,t.options,"buildFrequentlyBoughtTogetherList"),n=((e,t={})=>{let r,n;e.addReducers({productRecommendations:iI,configuration:a0});let i=(n=new Map,{subscribe(t){t();let i=Symbol(),a;return 0===n.size&&(r=JSON.stringify(this.state),a=e.subscribe(()=>{(e=>{try{let t=JSON.stringify(e),n=r!==t;return r=t,n}catch(e){return console.warn('Could not detect if state has changed, check the controller "get state method"',e),!0}})(this.state)&&n.forEach(e=>e())})),n.set(i,t),()=>{n.delete(i),0===n.size&&a&&a()}},get state(){return{}}}),{dispatch:a}=e,o=ry(e,ol,t.options,"buildBaseProductRecommendationsList");return a(ip({id:o.id})),a(ib({number:o.maxNumberOfRecommendations})),o.additionalFields&&a(iv({additionalFields:o.additionalFields})),o.skus&&a(ig({skus:o.skus})),{...i,setSkus(e){a(ig({skus:e}))},refresh(){a(iw())},get state(){let{skus:t,maxNumberOfRecommendations:r,recommendations:n,error:i,isLoading:a}=e.state.productRecommendations;return{skus:t,maxNumberOfRecommendations:r,recommendations:n,error:i,isLoading:a}}}})(e,{...t,options:{maxNumberOfRecommendations:r.maxNumberOfRecommendations,additionalFields:r.additionalFields,skus:[r.sku],id:"frequentBought"}}),{setSkus:i,...a}=n;return{...a,setSku(e){i([e])},get state(){let{skus:e,...t}=n.state;return{...t,sku:e[0]}}}}(this.engine,{options:{sku:"abc"}}),this.unsubscribe=this.frequentlyBoughtTogether.subscribe(()=>this.updateState()),this.frequentlyBoughtTogether.refresh()}disconnectedCallback(){this.unsubscribe()}updateState(){this.state=this.frequentlyBoughtTogether.state}render(){return(0,y.h)("div",{key:"b64870885d668475b543f5382ce2c9bca593ad95"},"FREQUENTLY BOUGHT TOGETHER:",(0,y.h)("ul",{key:"153108ef11d145bff7435dce9ac7fd15e8ec71e7"},this.state.recommendations.map(e=>(0,y.h)("li",null,e.ec_name))))}}}}]);
14//# sourceMappingURL=4ee8fff6.4bf8ebc1bf2e5212.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.