@coveo/headless 3.13.1-pre.cf8bb8919d → 3.13.1-pre.db77dd01fb

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/dist/browser/case-assist/headless.esm.js +1 -1
  2. package/dist/browser/case-assist/headless.js +1 -1
  3. package/dist/browser/commerce/headless.esm.js +1 -1
  4. package/dist/browser/commerce/headless.js +1 -1
  5. package/dist/browser/headless.esm.js +1 -1
  6. package/dist/browser/headless.js +1 -1
  7. package/dist/browser/insight/headless.esm.js +1 -1
  8. package/dist/browser/insight/headless.js +1 -1
  9. package/dist/browser/recommendation/headless.esm.js +1 -1
  10. package/dist/browser/recommendation/headless.js +1 -1
  11. package/dist/browser/ssr/headless.esm.js +1 -1
  12. package/dist/browser/ssr/headless.js +1 -1
  13. package/dist/browser/ssr-commerce/headless.esm.js +1 -1
  14. package/dist/browser/ssr-commerce/headless.js +1 -1
  15. package/dist/case-assist/headless.cjs +1 -1
  16. package/dist/case-assist/headless.esm.js +1 -1
  17. package/dist/commerce/headless.cjs +1 -1
  18. package/dist/commerce/headless.esm.js +1 -1
  19. package/dist/headless.cjs +1 -1
  20. package/dist/headless.esm.js +1 -1
  21. package/dist/insight/headless.cjs +1 -1
  22. package/dist/insight/headless.esm.js +1 -1
  23. package/dist/parsed_doc.json +136 -136
  24. package/dist/quantic/case-assist/headless.js +1 -1
  25. package/dist/quantic/commerce/headless.js +1 -1
  26. package/dist/quantic/headless.js +1 -1
  27. package/dist/quantic/insight/headless.js +1 -1
  28. package/dist/quantic/recommendation/headless.js +1 -1
  29. package/dist/recommendation/headless.cjs +1 -1
  30. package/dist/recommendation/headless.esm.js +1 -1
  31. package/dist/ssr/headless.cjs +1 -1
  32. package/dist/ssr/headless.esm.js +1 -1
  33. package/dist/ssr-commerce/headless.cjs +1 -1
  34. package/dist/ssr-commerce/headless.esm.js +1 -1
  35. package/package.json +1 -1
@@ -16,7 +16,7 @@
16
16
  * limitations under the License.
17
17
  */(function(g,f){if(typeof exports=="object"&&typeof module<"u"){module.exports=f(require)}else if("function"==typeof define && define.amd){define("CoveoHeadlessInsight",["crypto","@coveo/bueno"],function(_d_0,_d_1){var d={"crypto": _d_0,"@coveo/bueno": _d_1},r=function(m){if(m in d) return d[m];if(typeof require=="function") return require(m);throw new Error("Cannot find module '"+m+"'")};return f(r)})}else {var gN={"crypto":"crypto","@coveo/bueno":"@coveo/bueno"},gReq=function(r){var mod = r in gN ? g[gN[r]] : g[r]; return mod };g["CoveoHeadlessInsight"]=f(gReq)}}(typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : this,function(require){var exports={};var __exports=exports;var module={exports};
18
18
  "use strict";var GF=Object.create;var Ui=Object.defineProperty;var zF=Object.getOwnPropertyDescriptor;var HF=Object.getOwnPropertyNames;var WF=Object.getPrototypeOf,YF=Object.prototype.hasOwnProperty;var KF=(e,t,r)=>t in e?Ui(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Ne=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Og=(e,t)=>{for(var r in t)Ui(e,r,{get:t[r],enumerable:!0})},Dg=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of HF(t))!YF.call(e,o)&&o!==r&&Ui(e,o,{get:()=>t[o],enumerable:!(n=zF(t,o))||n.enumerable});return e};var Wt=(e,t,r)=>(r=e!=null?GF(WF(e)):{},Dg(t||!e||!e.__esModule?Ui(r,"default",{value:e,enumerable:!0}):r,e)),JF=e=>Dg(Ui({},"__esModule",{value:!0}),e);var be=(e,t,r)=>KF(e,typeof t!="symbol"?t+"":t,r);var Hg=Ne($i=>{"use strict";var ys=$i&&$i.__assign||function(){return ys=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},ys.apply(this,arguments)};Object.defineProperty($i,"__esModule",{value:!0});var cb={delayFirstAttempt:!1,jitter:"none",maxDelay:1/0,numOfAttempts:10,retry:function(){return!0},startingDelay:100,timeMultiple:2};function ub(e){var t=ys(ys({},cb),e);return t.numOfAttempts<1&&(t.numOfAttempts=1),t}$i.getSanitizedOptions=ub});var Wg=Ne(Qd=>{"use strict";Object.defineProperty(Qd,"__esModule",{value:!0});function lb(e){var t=Math.random()*e;return Math.round(t)}Qd.fullJitter=lb});var Yg=Ne(Ld=>{"use strict";Object.defineProperty(Ld,"__esModule",{value:!0});function db(e){return e}Ld.noJitter=db});var Kg=Ne(Ud=>{"use strict";Object.defineProperty(Ud,"__esModule",{value:!0});var pb=Wg(),mb=Yg();function gb(e){switch(e.jitter){case"full":return pb.fullJitter;case"none":default:return mb.noJitter}}Ud.JitterFactory=gb});var _d=Ne(Bd=>{"use strict";Object.defineProperty(Bd,"__esModule",{value:!0});var fb=Kg(),hb=function(){function e(t){this.options=t,this.attempt=0}return e.prototype.apply=function(){var t=this;return new Promise(function(r){return setTimeout(r,t.jitteredDelay)})},e.prototype.setAttemptNumber=function(t){this.attempt=t},Object.defineProperty(e.prototype,"jitteredDelay",{get:function(){var t=fb.JitterFactory(this.options);return t(this.delay)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"delay",{get:function(){var t=this.options.startingDelay,r=this.options.timeMultiple,n=this.numOfDelayedAttempts,o=t*Math.pow(r,n);return Math.min(o,this.options.maxDelay)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"numOfDelayedAttempts",{get:function(){return this.attempt},enumerable:!0,configurable:!0}),e}();Bd.Delay=hb});var Jg=Ne(Pr=>{"use strict";var yb=Pr&&Pr.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)o.hasOwnProperty(i)&&(n[i]=o[i])},e(t,r)};return function(t,r){e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Sb=Pr&&Pr.__awaiter||function(e,t,r,n){function o(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function s(l){try{c(n.next(l))}catch(m){a(m)}}function u(l){try{c(n.throw(l))}catch(m){a(m)}}function c(l){l.done?i(l.value):o(l.value).then(s,u)}c((n=n.apply(e,t||[])).next())})},Cb=Pr&&Pr.__generator||function(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,o,i,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(c){return function(l){return u([c,l])}}function u(c){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,o&&(i=c[0]&2?o.return:c[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,c[1])).done)return i;switch(o=0,i&&(c=[c[0]&2,i.value]),c[0]){case 0:case 1:i=c;break;case 4:return r.label++,{value:c[1],done:!1};case 5:r.label++,o=c[1],c=[0];continue;case 7:c=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!i||c[1]>i[0]&&c[1]<i[3])){r.label=c[1];break}if(c[0]===6&&r.label<i[1]){r.label=i[1],i=c;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(c);break}i[2]&&r.ops.pop(),r.trys.pop();continue}c=t.call(e,r)}catch(l){c=[6,l],o=0}finally{n=i=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}};Object.defineProperty(Pr,"__esModule",{value:!0});var Ab=_d(),xb=function(e){yb(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.apply=function(){return Sb(this,void 0,void 0,function(){return Cb(this,function(r){return[2,this.isFirstAttempt?!0:e.prototype.apply.call(this)]})})},Object.defineProperty(t.prototype,"isFirstAttempt",{get:function(){return this.attempt===0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"numOfDelayedAttempts",{get:function(){return this.attempt-1},enumerable:!0,configurable:!0}),t}(Ab.Delay);Pr.SkipFirstDelay=xb});var Xg=Ne(Gi=>{"use strict";var Rb=Gi&&Gi.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)o.hasOwnProperty(i)&&(n[i]=o[i])},e(t,r)};return function(t,r){e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(Gi,"__esModule",{value:!0});var Fb=_d(),bb=function(e){Rb(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(Fb.Delay);Gi.AlwaysDelay=bb});var Zg=Ne(jd=>{"use strict";Object.defineProperty(jd,"__esModule",{value:!0});var vb=Jg(),Ib=Xg();function wb(e,t){var r=Pb(e);return r.setAttemptNumber(t),r}jd.DelayFactory=wb;function Pb(e){return e.delayFirstAttempt?new Ib.AlwaysDelay(e):new vb.SkipFirstDelay(e)}});var ef=Ne(Vn=>{"use strict";var $d=Vn&&Vn.__awaiter||function(e,t,r,n){function o(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function s(l){try{c(n.next(l))}catch(m){a(m)}}function u(l){try{c(n.throw(l))}catch(m){a(m)}}function c(l){l.done?i(l.value):o(l.value).then(s,u)}c((n=n.apply(e,t||[])).next())})},Gd=Vn&&Vn.__generator||function(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,o,i,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(c){return function(l){return u([c,l])}}function u(c){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,o&&(i=c[0]&2?o.return:c[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,c[1])).done)return i;switch(o=0,i&&(c=[c[0]&2,i.value]),c[0]){case 0:case 1:i=c;break;case 4:return r.label++,{value:c[1],done:!1};case 5:r.label++,o=c[1],c=[0];continue;case 7:c=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!i||c[1]>i[0]&&c[1]<i[3])){r.label=c[1];break}if(c[0]===6&&r.label<i[1]){r.label=i[1],i=c;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(c);break}i[2]&&r.ops.pop(),r.trys.pop();continue}c=t.call(e,r)}catch(l){c=[6,l],o=0}finally{n=i=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}};Object.defineProperty(Vn,"__esModule",{value:!0});var Eb=Hg(),Tb=Zg();function kb(e,t){return t===void 0&&(t={}),$d(this,void 0,void 0,function(){var r,n;return Gd(this,function(o){switch(o.label){case 0:return r=Eb.getSanitizedOptions(t),n=new qb(e,r),[4,n.execute()];case 1:return[2,o.sent()]}})})}Vn.backOff=kb;var qb=function(){function e(t,r){this.request=t,this.options=r,this.attemptNumber=0}return e.prototype.execute=function(){return $d(this,void 0,void 0,function(){var t,r;return Gd(this,function(n){switch(n.label){case 0:if(this.attemptLimitReached)return[3,7];n.label=1;case 1:return n.trys.push([1,4,,6]),[4,this.applyDelay()];case 2:return n.sent(),[4,this.request()];case 3:return[2,n.sent()];case 4:return t=n.sent(),this.attemptNumber++,[4,this.options.retry(t,this.attemptNumber)];case 5:if(r=n.sent(),!r||this.attemptLimitReached)throw t;return[3,6];case 6:return[3,0];case 7:throw new Error("Something went wrong.")}})})},Object.defineProperty(e.prototype,"attemptLimitReached",{get:function(){return this.attemptNumber>=this.options.numOfAttempts},enumerable:!0,configurable:!0}),e.prototype.applyDelay=function(){return $d(this,void 0,void 0,function(){var t;return Gd(this,function(r){switch(r.label){case 0:return t=Tb.DelayFactory(this.options,this.attemptNumber),[4,t.apply()];case 1:return r.sent(),[2]}})})},e}()});var ac=Ne((Gp,zp)=>{"use strict";(function(e,t){typeof Gp=="object"&&typeof zp<"u"?zp.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs=t()})(Gp,function(){"use strict";var e=1e3,t=6e4,r=36e5,n="millisecond",o="second",i="minute",a="hour",s="day",u="week",c="month",l="quarter",m="year",p="date",d="Invalid Date",g=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,h=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,y={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(O){var k=["th","st","nd","rd"],T=O%100;return"["+O+(k[(T-20)%10]||k[T]||k[0])+"]"}},C=function(O,k,T){var M=String(O);return!M||M.length>=k?O:""+Array(k+1-M.length).join(T)+O},f={s:C,z:function(O){var k=-O.utcOffset(),T=Math.abs(k),M=Math.floor(T/60),V=T%60;return(k<=0?"+":"-")+C(M,2,"0")+":"+C(V,2,"0")},m:function O(k,T){if(k.date()<T.date())return-O(T,k);var M=12*(T.year()-k.year())+(T.month()-k.month()),V=k.clone().add(M,c),G=T-V<0,_=k.clone().add(M+(G?-1:1),c);return+(-(M+(T-V)/(G?V-_:_-V))||0)},a:function(O){return O<0?Math.ceil(O)||0:Math.floor(O)},p:function(O){return{M:c,y:m,w:u,d:s,D:p,h:a,m:i,s:o,ms:n,Q:l}[O]||String(O||"").toLowerCase().replace(/s$/,"")},u:function(O){return O===void 0}},A="en",b={};b[A]=y;var E="$isDayjsObject",v=function(O){return O instanceof D||!(!O||!O[E])},F=function O(k,T,M){var V;if(!k)return A;if(typeof k=="string"){var G=k.toLowerCase();b[G]&&(V=G),T&&(b[G]=T,V=G);var _=k.split("-");if(!V&&_.length>1)return O(_[0])}else{var W=k.name;b[W]=k,V=W}return!M&&V&&(A=V),V||!M&&A},P=function(O,k){if(v(O))return O.clone();var T=typeof k=="object"?k:{};return T.date=O,T.args=arguments,new D(T)},w=f;w.l=F,w.i=v,w.w=function(O,k){return P(O,{locale:k.$L,utc:k.$u,x:k.$x,$offset:k.$offset})};var D=function(){function O(T){this.$L=F(T.locale,null,!0),this.parse(T),this.$x=this.$x||T.x||{},this[E]=!0}var k=O.prototype;return k.parse=function(T){this.$d=function(M){var V=M.date,G=M.utc;if(V===null)return new Date(NaN);if(w.u(V))return new Date;if(V instanceof Date)return new Date(V);if(typeof V=="string"&&!/Z$/i.test(V)){var _=V.match(g);if(_){var W=_[2]-1||0,ee=(_[7]||"0").substring(0,3);return G?new Date(Date.UTC(_[1],W,_[3]||1,_[4]||0,_[5]||0,_[6]||0,ee)):new Date(_[1],W,_[3]||1,_[4]||0,_[5]||0,_[6]||0,ee)}}return new Date(V)}(T),this.init()},k.init=function(){var T=this.$d;this.$y=T.getFullYear(),this.$M=T.getMonth(),this.$D=T.getDate(),this.$W=T.getDay(),this.$H=T.getHours(),this.$m=T.getMinutes(),this.$s=T.getSeconds(),this.$ms=T.getMilliseconds()},k.$utils=function(){return w},k.isValid=function(){return this.$d.toString()!==d},k.isSame=function(T,M){var V=P(T);return this.startOf(M)<=V&&V<=this.endOf(M)},k.isAfter=function(T,M){return P(T)<this.startOf(M)},k.isBefore=function(T,M){return this.endOf(M)<P(T)},k.$g=function(T,M,V){return w.u(T)?this[M]:this.set(V,T)},k.unix=function(){return Math.floor(this.valueOf()/1e3)},k.valueOf=function(){return this.$d.getTime()},k.startOf=function(T,M){var V=this,G=!!w.u(M)||M,_=w.p(T),W=function(Ht,Me){var St=w.w(V.$u?Date.UTC(V.$y,Me,Ht):new Date(V.$y,Me,Ht),V);return G?St:St.endOf(s)},ee=function(Ht,Me){return w.w(V.toDate()[Ht].apply(V.toDate("s"),(G?[0,0,0,0]:[23,59,59,999]).slice(Me)),V)},ne=this.$W,ce=this.$M,le=this.$D,Ae="set"+(this.$u?"UTC":"");switch(_){case m:return G?W(1,0):W(31,11);case c:return G?W(1,ce):W(0,ce+1);case u:var Ve=this.$locale().weekStart||0,Dn=(ne<Ve?ne+7:ne)-Ve;return W(G?le-Dn:le+(6-Dn),ce);case s:case p:return ee(Ae+"Hours",0);case a:return ee(Ae+"Minutes",1);case i:return ee(Ae+"Seconds",2);case o:return ee(Ae+"Milliseconds",3);default:return this.clone()}},k.endOf=function(T){return this.startOf(T,!1)},k.$set=function(T,M){var V,G=w.p(T),_="set"+(this.$u?"UTC":""),W=(V={},V[s]=_+"Date",V[p]=_+"Date",V[c]=_+"Month",V[m]=_+"FullYear",V[a]=_+"Hours",V[i]=_+"Minutes",V[o]=_+"Seconds",V[n]=_+"Milliseconds",V)[G],ee=G===s?this.$D+(M-this.$W):M;if(G===c||G===m){var ne=this.clone().set(p,1);ne.$d[W](ee),ne.init(),this.$d=ne.set(p,Math.min(this.$D,ne.daysInMonth())).$d}else W&&this.$d[W](ee);return this.init(),this},k.set=function(T,M){return this.clone().$set(T,M)},k.get=function(T){return this[w.p(T)]()},k.add=function(T,M){var V,G=this;T=Number(T);var _=w.p(M),W=function(ce){var le=P(G);return w.w(le.date(le.date()+Math.round(ce*T)),G)};if(_===c)return this.set(c,this.$M+T);if(_===m)return this.set(m,this.$y+T);if(_===s)return W(1);if(_===u)return W(7);var ee=(V={},V[i]=t,V[a]=r,V[o]=e,V)[_]||1,ne=this.$d.getTime()+T*ee;return w.w(ne,this)},k.subtract=function(T,M){return this.add(-1*T,M)},k.format=function(T){var M=this,V=this.$locale();if(!this.isValid())return V.invalidDate||d;var G=T||"YYYY-MM-DDTHH:mm:ssZ",_=w.z(this),W=this.$H,ee=this.$m,ne=this.$M,ce=V.weekdays,le=V.months,Ae=V.meridiem,Ve=function(Me,St,wr,Ur){return Me&&(Me[St]||Me(M,G))||wr[St].slice(0,Ur)},Dn=function(Me){return w.s(W%12||12,Me,"0")},Ht=Ae||function(Me,St,wr){var Ur=Me<12?"AM":"PM";return wr?Ur.toLowerCase():Ur};return G.replace(h,function(Me,St){return St||function(wr){switch(wr){case"YY":return String(M.$y).slice(-2);case"YYYY":return w.s(M.$y,4,"0");case"M":return ne+1;case"MM":return w.s(ne+1,2,"0");case"MMM":return Ve(V.monthsShort,ne,le,3);case"MMMM":return Ve(le,ne);case"D":return M.$D;case"DD":return w.s(M.$D,2,"0");case"d":return String(M.$W);case"dd":return Ve(V.weekdaysMin,M.$W,ce,2);case"ddd":return Ve(V.weekdaysShort,M.$W,ce,3);case"dddd":return ce[M.$W];case"H":return String(W);case"HH":return w.s(W,2,"0");case"h":return Dn(1);case"hh":return Dn(2);case"a":return Ht(W,ee,!0);case"A":return Ht(W,ee,!1);case"m":return String(ee);case"mm":return w.s(ee,2,"0");case"s":return String(M.$s);case"ss":return w.s(M.$s,2,"0");case"SSS":return w.s(M.$ms,3,"0");case"Z":return _}return null}(Me)||_.replace(":","")})},k.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},k.diff=function(T,M,V){var G,_=this,W=w.p(M),ee=P(T),ne=(ee.utcOffset()-this.utcOffset())*t,ce=this-ee,le=function(){return w.m(_,ee)};switch(W){case m:G=le()/12;break;case c:G=le();break;case l:G=le()/3;break;case u:G=(ce-ne)/6048e5;break;case s:G=(ce-ne)/864e5;break;case a:G=ce/r;break;case i:G=ce/t;break;case o:G=ce/e;break;default:G=ce}return V?G:w.a(G)},k.daysInMonth=function(){return this.endOf(c).$D},k.$locale=function(){return b[this.$L]},k.locale=function(T,M){if(!T)return this.$L;var V=this.clone(),G=F(T,M,!0);return G&&(V.$L=G),V},k.clone=function(){return w.w(this.$d,this)},k.toDate=function(){return new Date(this.valueOf())},k.toJSON=function(){return this.isValid()?this.toISOString():null},k.toISOString=function(){return this.$d.toISOString()},k.toString=function(){return this.$d.toUTCString()},O}(),L=D.prototype;return P.prototype=L,[["$ms",n],["$s",o],["$m",i],["$H",a],["$W",s],["$M",c],["$y",m],["$D",p]].forEach(function(O){L[O[1]]=function(k){return this.$g(k,O[0],O[1])}}),P.extend=function(O,k){return O.$i||(O(k,D,P),O.$i=!0),P},P.locale=F,P.isDayjs=v,P.unix=function(O){return P(1e3*O)},P.en=b[A],P.Ls=b,P.p={},P})});var sy=Ne((Hp,Wp)=>{"use strict";(function(e,t){typeof Hp=="object"&&typeof Wp<"u"?Wp.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_quarterOfYear=t()})(Hp,function(){"use strict";var e="month",t="quarter";return function(r,n){var o=n.prototype;o.quarter=function(s){return this.$utils().u(s)?Math.ceil((this.month()+1)/3):this.month(this.month()%3+3*(s-1))};var i=o.add;o.add=function(s,u){return s=Number(s),this.$utils().p(u)===t?this.add(3*s,e):i.bind(this)(s,u)};var a=o.startOf;o.startOf=function(s,u){var c=this.$utils(),l=!!c.u(u)||u;if(c.p(s)===t){var m=this.quarter()-1;return l?this.month(3*m).startOf(e).startOf("day"):this.month(3*m+2).endOf(e).endOf("day")}return a.bind(this)(s,u)}}})});var cy=Ne((Yp,Kp)=>{"use strict";(function(e,t){typeof Yp=="object"&&typeof Kp<"u"?Kp.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_customParseFormat=t()})(Yp,function(){"use strict";var e={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},t=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,r=/\d/,n=/\d\d/,o=/\d\d?/,i=/\d*[^-_:/,()\s\d]+/,a={},s=function(g){return(g=+g)+(g>68?1900:2e3)},u=function(g){return function(h){this[g]=+h}},c=[/[+-]\d\d:?(\d\d)?|Z/,function(g){(this.zone||(this.zone={})).offset=function(h){if(!h||h==="Z")return 0;var y=h.match(/([+-]|\d\d)/g),C=60*y[1]+(+y[2]||0);return C===0?0:y[0]==="+"?-C:C}(g)}],l=function(g){var h=a[g];return h&&(h.indexOf?h:h.s.concat(h.f))},m=function(g,h){var y,C=a.meridiem;if(C){for(var f=1;f<=24;f+=1)if(g.indexOf(C(f,0,h))>-1){y=f>12;break}}else y=g===(h?"pm":"PM");return y},p={A:[i,function(g){this.afternoon=m(g,!1)}],a:[i,function(g){this.afternoon=m(g,!0)}],Q:[r,function(g){this.month=3*(g-1)+1}],S:[r,function(g){this.milliseconds=100*+g}],SS:[n,function(g){this.milliseconds=10*+g}],SSS:[/\d{3}/,function(g){this.milliseconds=+g}],s:[o,u("seconds")],ss:[o,u("seconds")],m:[o,u("minutes")],mm:[o,u("minutes")],H:[o,u("hours")],h:[o,u("hours")],HH:[o,u("hours")],hh:[o,u("hours")],D:[o,u("day")],DD:[n,u("day")],Do:[i,function(g){var h=a.ordinal,y=g.match(/\d+/);if(this.day=y[0],h)for(var C=1;C<=31;C+=1)h(C).replace(/\[|\]/g,"")===g&&(this.day=C)}],w:[o,u("week")],ww:[n,u("week")],M:[o,u("month")],MM:[n,u("month")],MMM:[i,function(g){var h=l("months"),y=(l("monthsShort")||h.map(function(C){return C.slice(0,3)})).indexOf(g)+1;if(y<1)throw new Error;this.month=y%12||y}],MMMM:[i,function(g){var h=l("months").indexOf(g)+1;if(h<1)throw new Error;this.month=h%12||h}],Y:[/[+-]?\d+/,u("year")],YY:[n,function(g){this.year=s(g)}],YYYY:[/\d{4}/,u("year")],Z:c,ZZ:c};function d(g){var h,y;h=g,y=a&&a.formats;for(var C=(g=h.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(P,w,D){var L=D&&D.toUpperCase();return w||y[D]||e[D]||y[L].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(O,k,T){return k||T.slice(1)})})).match(t),f=C.length,A=0;A<f;A+=1){var b=C[A],E=p[b],v=E&&E[0],F=E&&E[1];C[A]=F?{regex:v,parser:F}:b.replace(/^\[|\]$/g,"")}return function(P){for(var w={},D=0,L=0;D<f;D+=1){var O=C[D];if(typeof O=="string")L+=O.length;else{var k=O.regex,T=O.parser,M=P.slice(L),V=k.exec(M)[0];T.call(w,V),P=P.replace(V,"")}}return function(G){var _=G.afternoon;if(_!==void 0){var W=G.hours;_?W<12&&(G.hours+=12):W===12&&(G.hours=0),delete G.afternoon}}(w),w}}return function(g,h,y){y.p.customParseFormat=!0,g&&g.parseTwoDigitYear&&(s=g.parseTwoDigitYear);var C=h.prototype,f=C.parse;C.parse=function(A){var b=A.date,E=A.utc,v=A.args;this.$u=E;var F=v[1];if(typeof F=="string"){var P=v[2]===!0,w=v[3]===!0,D=P||w,L=v[2];w&&(L=v[2]),a=this.$locale(),!P&&L&&(a=y.Ls[L]),this.$d=function(M,V,G,_){try{if(["x","X"].indexOf(V)>-1)return new Date((V==="X"?1e3:1)*M);var W=d(V)(M),ee=W.year,ne=W.month,ce=W.day,le=W.hours,Ae=W.minutes,Ve=W.seconds,Dn=W.milliseconds,Ht=W.zone,Me=W.week,St=new Date,wr=ce||(ee||ne?1:St.getDate()),Ur=ee||St.getFullYear(),cs=0;ee&&!ne||(cs=ne>0?ne-1:St.getMonth());var us,Pd=le||0,Ed=Ae||0,Td=Ve||0,kd=Dn||0;return Ht?new Date(Date.UTC(Ur,cs,wr,Pd,Ed,Td,kd+60*Ht.offset*1e3)):G?new Date(Date.UTC(Ur,cs,wr,Pd,Ed,Td,kd)):(us=new Date(Ur,cs,wr,Pd,Ed,Td,kd),Me&&(us=_(us).week(Me).toDate()),us)}catch{return new Date("")}}(b,F,E,y),this.init(),L&&L!==!0&&(this.$L=this.locale(L).$L),D&&b!=this.format(F)&&(this.$d=new Date("")),a={}}else if(F instanceof Array)for(var O=F.length,k=1;k<=O;k+=1){v[1]=F[k-1];var T=y.apply(this,v);if(T.isValid()){this.$d=T.$d,this.$L=T.$L,this.init();break}k===O&&(this.$d=new Date(""))}else f.call(this,A)}}})});var WS=Ne((X1,HS)=>{"use strict";var EE=/(^|; )Coveo-Pendragon=([^;]*)/;HS.exports=()=>EE.exec(document.cookie)?.pop()||null});var KS=Ne((Mm,Nm)=>{"use strict";(function(e,t){typeof Mm=="object"&&typeof Nm<"u"?Nm.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_timezone=t()})(Mm,function(){"use strict";var e={year:0,month:1,day:2,hour:3,minute:4,second:5},t={};return function(r,n,o){var i,a=function(l,m,p){p===void 0&&(p={});var d=new Date(l),g=function(h,y){y===void 0&&(y={});var C=y.timeZoneName||"short",f=h+"|"+C,A=t[f];return A||(A=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:h,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:C}),t[f]=A),A}(m,p);return g.formatToParts(d)},s=function(l,m){for(var p=a(l,m),d=[],g=0;g<p.length;g+=1){var h=p[g],y=h.type,C=h.value,f=e[y];f>=0&&(d[f]=parseInt(C,10))}var A=d[3],b=A===24?0:A,E=d[0]+"-"+d[1]+"-"+d[2]+" "+b+":"+d[4]+":"+d[5]+":000",v=+l;return(o.utc(E).valueOf()-(v-=v%1e3))/6e4},u=n.prototype;u.tz=function(l,m){l===void 0&&(l=i);var p,d=this.utcOffset(),g=this.toDate(),h=g.toLocaleString("en-US",{timeZone:l}),y=Math.round((g-new Date(h))/1e3/60),C=15*-Math.round(g.getTimezoneOffset()/15)-y;if(!Number(C))p=this.utcOffset(0,m);else if(p=o(h,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(C,!0),m){var f=p.utcOffset();p=p.add(d-f,"minute")}return p.$x.$timezone=l,p},u.offsetName=function(l){var m=this.$x.$timezone||o.tz.guess(),p=a(this.valueOf(),m,{timeZoneName:l}).find(function(d){return d.type.toLowerCase()==="timezonename"});return p&&p.value};var c=u.startOf;u.startOf=function(l,m){if(!this.$x||!this.$x.$timezone)return c.call(this,l,m);var p=o(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return c.call(p,l,m).tz(this.$x.$timezone,!0)},o.tz=function(l,m,p){var d=p&&m,g=p||m||i,h=s(+o(),g);if(typeof l!="string")return o(l).tz(g);var y=function(b,E,v){var F=b-60*E*1e3,P=s(F,v);if(E===P)return[F,E];var w=s(F-=60*(P-E)*1e3,v);return P===w?[F,P]:[b-60*Math.min(P,w)*1e3,Math.max(P,w)]}(o.utc(l,d).valueOf(),h,g),C=y[0],f=y[1],A=o(C).utcOffset(f);return A.$x.$timezone=g,A},o.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},o.tz.setDefault=function(l){i=l}}})});var JS=Ne((Qm,Lm)=>{"use strict";(function(e,t){typeof Qm=="object"&&typeof Lm<"u"?Lm.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_utc=t()})(Qm,function(){"use strict";var e="minute",t=/[+-]\d\d(?::?\d\d)?/g,r=/([+-]|\d\d)/g;return function(n,o,i){var a=o.prototype;i.utc=function(d){var g={date:d,utc:!0,args:arguments};return new o(g)},a.utc=function(d){var g=i(this.toDate(),{locale:this.$L,utc:!0});return d?g.add(this.utcOffset(),e):g},a.local=function(){return i(this.toDate(),{locale:this.$L,utc:!1})};var s=a.parse;a.parse=function(d){d.utc&&(this.$u=!0),this.$utils().u(d.$offset)||(this.$offset=d.$offset),s.call(this,d)};var u=a.init;a.init=function(){if(this.$u){var d=this.$d;this.$y=d.getUTCFullYear(),this.$M=d.getUTCMonth(),this.$D=d.getUTCDate(),this.$W=d.getUTCDay(),this.$H=d.getUTCHours(),this.$m=d.getUTCMinutes(),this.$s=d.getUTCSeconds(),this.$ms=d.getUTCMilliseconds()}else u.call(this)};var c=a.utcOffset;a.utcOffset=function(d,g){var h=this.$utils().u;if(h(d))return this.$u?0:h(this.$offset)?c.call(this):this.$offset;if(typeof d=="string"&&(d=function(A){A===void 0&&(A="");var b=A.match(t);if(!b)return null;var E=(""+b[0]).match(r)||["-",0,0],v=E[0],F=60*+E[1]+ +E[2];return F===0?0:v==="+"?F:-F}(d),d===null))return this;var y=Math.abs(d)<=16?60*d:d,C=this;if(g)return C.$offset=y,C.$u=d===0,C;if(d!==0){var f=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(C=this.local().add(y+f,e)).$offset=y,C.$x.$localOffset=f}else C=this.utc();return C};var l=a.format;a.format=function(d){var g=d||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return l.call(this,g)},a.valueOf=function(){var d=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*d},a.isUTC=function(){return!!this.$u},a.toISOString=function(){return this.toDate().toISOString()},a.toString=function(){return this.toDate().toUTCString()};var m=a.toDate;a.toDate=function(d){return d==="s"&&this.$offset?i(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():m.call(this)};var p=a.diff;a.diff=function(d,g,h){if(d&&this.$u===d.$u)return p.call(this,d,g,h);var y=this.local(),C=i(d).local();return p.call(y,C,g,h)}}})});var uC=Ne((lG,cC)=>{"use strict";function UE(e){try{return JSON.stringify(e)}catch{return'"[Circular]"'}}cC.exports=BE;function BE(e,t,r){var n=r&&r.stringify||UE,o=1;if(typeof e=="object"&&e!==null){var i=t.length+o;if(i===1)return e;var a=new Array(i);a[0]=n(e);for(var s=1;s<i;s++)a[s]=n(t[s]);return a.join(" ")}if(typeof e!="string")return e;var u=t.length;if(u===0)return e;for(var c="",l=1-o,m=-1,p=e&&e.length||0,d=0;d<p;){if(e.charCodeAt(d)===37&&d+1<p){switch(m=m>-1?m:0,e.charCodeAt(d+1)){case 100:case 102:if(l>=u||t[l]==null)break;m<d&&(c+=e.slice(m,d)),c+=Number(t[l]),m=d+2,d++;break;case 105:if(l>=u||t[l]==null)break;m<d&&(c+=e.slice(m,d)),c+=Math.floor(Number(t[l])),m=d+2,d++;break;case 79:case 111:case 106:if(l>=u||t[l]===void 0)break;m<d&&(c+=e.slice(m,d));var g=typeof t[l];if(g==="string"){c+="'"+t[l]+"'",m=d+2,d++;break}if(g==="function"){c+=t[l].name||"<anonymous>",m=d+2,d++;break}c+=n(t[l]),m=d+2,d++;break;case 115:if(l>=u)break;m<d&&(c+=e.slice(m,d)),c+=String(t[l]),m=d+2,d++;break;case 37:m<d&&(c+=e.slice(m,d)),c+="%",m=d+2,d++,l--;break}++l}++d}return m===-1?e:(m<p&&(c+=e.slice(m)),c)}});var fC=Ne((dG,hu)=>{"use strict";var lC=uC();hu.exports=Dr;var Oa=rT().console||{},_E={mapHttpRequest:fu,mapHttpResponse:fu,wrapRequestSerializer:jm,wrapResponseSerializer:jm,wrapErrorSerializer:jm,req:fu,res:fu,err:pC,errWithCause:pC};function pn(e,t){return e==="silent"?1/0:t.levels.values[e]}var zm=Symbol("pino.logFuncs"),$m=Symbol("pino.hierarchy"),jE={error:"log",fatal:"error",warn:"error",info:"log",debug:"log",trace:"log"};function dC(e,t){let r={logger:t,parent:e[$m]};t[$m]=r}function $E(e,t,r){let n={};t.forEach(o=>{n[o]=r[o]?r[o]:Oa[o]||Oa[jE[o]||"log"]||zo}),e[zm]=n}function GE(e,t){return Array.isArray(e)?e.filter(function(n){return n!=="!stdSerializers.err"}):e===!0?Object.keys(t):!1}function Dr(e){e=e||{},e.browser=e.browser||{};let t=e.browser.transmit;if(t&&typeof t.send!="function")throw Error("pino: transmit option must have a send function");let r=e.browser.write||Oa;e.browser.write&&(e.browser.asObject=!0);let n=e.serializers||{},o=GE(e.browser.serialize,n),i=e.browser.serialize;Array.isArray(e.browser.serialize)&&e.browser.serialize.indexOf("!stdSerializers.err")>-1&&(i=!1);let a=Object.keys(e.customLevels||{}),s=["error","fatal","warn","info","debug","trace"].concat(a);typeof r=="function"&&s.forEach(function(h){r[h]=r}),(e.enabled===!1||e.browser.disabled)&&(e.level="silent");let u=e.level||"info",c=Object.create(r);c.log||(c.log=zo),$E(c,s,r),dC({},c),Object.defineProperty(c,"levelVal",{get:m}),Object.defineProperty(c,"level",{get:p,set:d});let l={transmit:t,serialize:o,asObject:e.browser.asObject,formatters:e.browser.formatters,levels:s,timestamp:ZE(e),messageKey:e.messageKey||"msg",onChild:e.onChild||zo};c.levels=zE(e),c.level=u,c.setMaxListeners=c.getMaxListeners=c.emit=c.addListener=c.on=c.prependListener=c.once=c.prependOnceListener=c.removeListener=c.removeAllListeners=c.listeners=c.listenerCount=c.eventNames=c.write=c.flush=zo,c.serializers=n,c._serialize=o,c._stdErrSerialize=i,c.child=function(...h){return g.call(this,l,...h)},t&&(c._logEvent=Gm());function m(){return pn(this.level,this)}function p(){return this._level}function d(h){if(h!=="silent"&&!this.levels.values[h])throw Error("unknown level "+h);this._level=h,Kn(this,l,c,"error"),Kn(this,l,c,"fatal"),Kn(this,l,c,"warn"),Kn(this,l,c,"info"),Kn(this,l,c,"debug"),Kn(this,l,c,"trace"),a.forEach(y=>{Kn(this,l,c,y)})}function g(h,y,C){if(!y)throw new Error("missing bindings for child Pino");C=C||{},o&&y.serializers&&(C.serializers=y.serializers);let f=C.serializers;if(o&&f){var A=Object.assign({},n,f),b=e.browser.serialize===!0?Object.keys(A):o;delete y.serializers,Hm([y],b,A,this._stdErrSerialize)}function E(F){this._childLevel=(F._childLevel|0)+1,this.bindings=y,A&&(this.serializers=A,this._serialize=b),t&&(this._logEvent=Gm([].concat(F._logEvent.bindings,y)))}E.prototype=this;let v=new E(this);return dC(this,v),v.child=function(...F){return g.call(this,h,...F)},v.level=C.level||this.level,h.onChild(v),v}return c}function zE(e){let t=e.customLevels||{},r=Object.assign({},Dr.levels.values,t),n=Object.assign({},Dr.levels.labels,HE(t));return{values:r,labels:n}}function HE(e){let t={};return Object.keys(e).forEach(function(r){t[e[r]]=r}),t}Dr.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"}};Dr.stdSerializers=_E;Dr.stdTimeFunctions=Object.assign({},{nullTime:mC,epochTime:gC,unixTime:eT,isoTime:tT});function WE(e){let t=[];e.bindings&&t.push(e.bindings);let r=e[$m];for(;r.parent;)r=r.parent,r.logger.bindings&&t.push(r.logger.bindings);return t.reverse()}function Kn(e,t,r,n){if(Object.defineProperty(e,n,{value:pn(e.level,r)>pn(n,r)?zo:r[zm][n],writable:!0,enumerable:!0,configurable:!0}),e[n]===zo){if(!t.transmit)return;let i=t.transmit.level||e.level,a=pn(i,r);if(pn(n,r)<a)return}e[n]=KE(e,t,r,n);let o=WE(e);o.length!==0&&(e[n]=YE(o,e[n]))}function YE(e,t){return function(){return t.apply(this,[...e,...arguments])}}function KE(e,t,r,n){return function(o){return function(){let a=t.timestamp(),s=new Array(arguments.length),u=Object.getPrototypeOf&&Object.getPrototypeOf(this)===Oa?Oa:this;for(var c=0;c<s.length;c++)s[c]=arguments[c];var l=!1;if(t.serialize&&(Hm(s,this._serialize,this.serializers,this._stdErrSerialize),l=!0),t.asObject||t.formatters?o.call(u,JE(this,n,s,a,t)):o.apply(u,s),t.transmit){let m=t.transmit.level||e._level,p=pn(m,r),d=pn(n,r);if(d<p)return;XE(this,{ts:a,methodLevel:n,methodValue:d,transmitLevel:m,transmitValue:r.levels.values[t.transmit.level||e._level],send:t.transmit.send,val:pn(e._level,r)},s,l)}}}(e[zm][n])}function JE(e,t,r,n,o){let{level:i,log:a=p=>p}=o.formatters||{},s=r.slice(),u=s[0],c={};if(n&&(c.time=n),i){let p=i(t,e.levels.values[t]);Object.assign(c,p)}else c.level=e.levels.values[t];let l=(e._childLevel|0)+1;if(l<1&&(l=1),u!==null&&typeof u=="object"){for(;l--&&typeof s[0]=="object";)Object.assign(c,s.shift());u=s.length?lC(s.shift(),s):void 0}else typeof u=="string"&&(u=lC(s.shift(),s));return u!==void 0&&(c[o.messageKey]=u),a(c)}function Hm(e,t,r,n){for(let o in e)if(n&&e[o]instanceof Error)e[o]=Dr.stdSerializers.err(e[o]);else if(typeof e[o]=="object"&&!Array.isArray(e[o])&&t)for(let i in e[o])t.indexOf(i)>-1&&i in r&&(e[o][i]=r[i](e[o][i]))}function XE(e,t,r,n=!1){let o=t.send,i=t.ts,a=t.methodLevel,s=t.methodValue,u=t.val,c=e._logEvent.bindings;n||Hm(r,e._serialize||Object.keys(e.serializers),e.serializers,e._stdErrSerialize===void 0?!0:e._stdErrSerialize),e._logEvent.ts=i,e._logEvent.messages=r.filter(function(l){return c.indexOf(l)===-1}),e._logEvent.level.label=a,e._logEvent.level.value=s,o(a,e._logEvent,u),e._logEvent=Gm(c)}function Gm(e){return{ts:0,messages:[],bindings:e||[],level:{label:"",value:0}}}function pC(e){let t={type:e.constructor.name,msg:e.message,stack:e.stack};for(let r in e)t[r]===void 0&&(t[r]=e[r]);return t}function ZE(e){return typeof e.timestamp=="function"?e.timestamp:e.timestamp===!1?mC:gC}function fu(){return{}}function jm(e){return e}function zo(){}function mC(){return!1}function gC(){return Date.now()}function eT(){return Math.round(Date.now()/1e3)}function tT(){return new Date(Date.now()).toISOString()}function rT(){function e(t){return typeof t<"u"&&t}try{return typeof globalThis<"u"||Object.defineProperty(Object.prototype,"globalThis",{get:function(){return delete Object.prototype.globalThis,this.globalThis=this},configurable:!0}),globalThis}catch{return e(self)||e(window)||e(this)||{}}}hu.exports.default=Dr;hu.exports.pino=Dr});var CD={};Og(CD,{HighlightUtils:()=>Dd,ResultTemplatesHelpers:()=>sS,SortOrder:()=>Ys,buildAttachToCase:()=>MR,buildBreadcrumbManager:()=>mx,buildCategoryFacet:()=>tR,buildController:()=>H,buildCriterionExpression:()=>tr,buildDateFacet:()=>xR,buildDateFilter:()=>TR,buildDateRange:()=>ii,buildDateSortCriterion:()=>jh,buildDidYouMean:()=>WA,buildFacet:()=>gR,buildFacetConditionsManager:()=>vF,buildFacetManager:()=>Nx,buildFoldedResultList:()=>WR,buildGeneratedAnswer:()=>NF,buildInsightEngine:()=>RC,buildInsightInterface:()=>IF,buildInteractiveCitation:()=>LF,buildInteractiveResult:()=>KR,buildNotifyTrigger:()=>FF,buildNumericFacet:()=>IR,buildNumericFilter:()=>PR,buildNumericRange:()=>fd,buildPager:()=>qR,buildQueryError:()=>$F,buildQuerySummary:()=>QR,buildQuickview:()=>_R,buildRelevanceSortCriterion:()=>Js,buildResultList:()=>jR,buildResultTemplatesManager:()=>_F,buildResultsPerPage:()=>XR,buildSearchBox:()=>oF,buildSearchParameterManager:()=>Vx,buildSearchStatus:()=>iF,buildSmartSnippet:()=>TF,buildSmartSnippetQuestionsList:()=>OF,buildSort:()=>lF,buildTab:()=>gF,buildUserActions:()=>UF,deserializeRelativeDate:()=>Cy,getAnalyticsNextApiBaseUrl:()=>Ss,getOrganizationEndpoint:()=>de,getSampleInsightEngineConfiguration:()=>Wm,loadAttachedResultsActions:()=>fk,loadCaseContextActions:()=>sk,loadContextActions:()=>uk,loadDateFacetSetActions:()=>tk,loadFieldActions:()=>mk,loadFoldingActions:()=>Fk,loadGenericAnalyticsActions:()=>hk,loadInsightAnalyticsActions:()=>XT,loadInsightInterfaceActions:()=>lT,loadInsightSearchActions:()=>pT,loadInsightSearchAnalyticsActions:()=>lk,loadInsightUserActionsActions:()=>Ok,loadNumericFacetSetActions:()=>ok,loadQuerySetActions:()=>vT,loadQuerySuggestActions:()=>Vk,loadQuestionAnsweringActions:()=>Sk,loadRecentResultsActions:()=>ak});module.exports=JF(CD);var Dd={};Og(Dd,{escape:()=>so,getHighlightedSuggestion:()=>Od,highlightString:()=>eb});var Lg=require("@coveo/bueno");var ls=(e,t=5)=>e+Math.random().toString(36).substring(2,2+t);function ds(e){return Array.isArray(e)}function ps(e){return e.trim()===""}function Vg(e,t){return[...e.reduce((r,n)=>{let o=t(n);return r.has(o)||r.set(o,n),r},new Map).values()]}function XF(e){return btoa(encodeURI(e))}function ms(e,t){let{[e]:r,...n}=t;return n}function ao(e){return XF(JSON.stringify(e))}var ZF=new Set(["1",1,"yes",!0]);function Mg(){if(typeof navigator>"u"||typeof window>"u")return!1;let e=navigator,t=window;return[e.globalPrivacyControl,e.doNotTrack,e.msDoNotTrack,t.doNotTrack].some(r=>ZF.has(r))}function Ng(e){let t={};for(let[r,n]of e)t[r]=n;return t}function Qg(e,t,r){return clearTimeout(t),setTimeout(e,r)}function Bi(e){if(typeof e!="object"||!e)return e;try{return JSON.parse(JSON.stringify(e))}catch{return e}}function eb(e){if(ps(e.openingDelimiter)||ps(e.closingDelimiter))throw Error("delimiters should be a non-empty string");if((0,Lg.isNullOrUndefined)(e.content)||ps(e.content))return e.content;if(e.highlights.length===0)return so(e.content);let t=e.content.length,r="",n=0;for(let o=0;o<e.highlights.length;o++){let i=e.highlights[o],a=i.offset,s=a+i.length;if(s>t)break;r+=so(e.content.slice(n,a)),r+=e.openingDelimiter,r+=so(e.content.slice(a,s)),r+=e.closingDelimiter,n=s}return n!==t&&(r+=so(e.content.slice(n))),r}function Od(e,t){return e=so(e),e.replace(/\[(.*?)\]|\{(.*?)\}|\((.*?)\)/g,(r,n,o,i)=>n?qd(n,t.notMatchDelimiters):o?qd(o,t.exactMatchDelimiters):i?qd(i,t.correctionDelimiters):r)}function qd(e,t){return t?t.open+e+t.close:e}function so(e){let t={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},r="(?:"+Object.keys(t).join("|")+")",n=RegExp(r),o=RegExp(r,"g");return n.test(e)?e.replace(o,i=>t[i]):e}async function Bg(e,t){let r=e.getReader(),n;for(;!(n=await r.read()).done;)t(n.value)}function _g(e){let t,r,n,o=!1;return function(a){t===void 0?(t=a,r=0,n=-1):t=tb(t,a);let s=t.length,u=0;for(;r<s;){o&&(t[r]===10&&(u=++r),o=!1);let c=-1;for(;r<s&&c===-1;++r)switch(t[r]){case 58:n===-1&&(n=r-u);break;case 13:o=!0;case 10:c=r;break}if(c===-1)break;e(t.subarray(u,c),n),u=r,n=-1}u===s?t=void 0:u!==0&&(t=t.subarray(u),r-=u)}}function jg(e,t,r){let n=Ug(),o=new TextDecoder;return function(a,s){if(a.length===0)r?.(n),n=Ug();else if(s>0){let u=o.decode(a.subarray(0,s)),c=s+(a[s+1]===32?2:1),l=o.decode(a.subarray(c));switch(u){case"data":n.data=n.data?n.data+`
19
- `+l:l;break;case"event":n.event=l;break;case"id":e(n.id=l);break;case"retry":let m=parseInt(l,10);isNaN(m)||t(n.retry=m);break}}}}function tb(e,t){let r=new Uint8Array(e.length+t.length);return r.set(e),r.set(t,e.length),r}function Ug(){return{data:"",event:"",id:"",retry:void 0}}var rb=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r},gs="text/event-stream",nb=1e3,$g="last-event-id";function Gg(){typeof window<"u"}function _i(e,t){var{signal:r,headers:n,onopen:o,onmessage:i,onclose:a,onerror:s,openWhenHidden:u,fetch:c}=t,l=rb(t,["signal","headers","onopen","onmessage","onclose","onerror","openWhenHidden","fetch"]);return new Promise((m,p)=>{let d=Object.assign({},n);d.accept||(d.accept=gs);let g;function h(){g?.abort(),document.hidden||E()}!u&&Gg()&&document.addEventListener("visibilitychange",h);let y=nb,C=0;function f(){Gg()&&document.removeEventListener("visibilitychange",h),clearTimeout(C),g?.abort()}r?.addEventListener("abort",()=>{f(),m()});let A=c??A,b=o??ob;async function E(){var v;g=typeof AbortController>"u"?null:new AbortController;try{let F=await A(e,Object.assign(Object.assign({},l),{headers:d,signal:g?.signal}));await b(F),await Bg(F.body,_g(jg(P=>{P?d[$g]=P:delete d[$g]},P=>{y=P},i))),a?.(),f(),m()}catch(F){if(!g?.signal.aborted)try{let P=(v=s?.(F))!==null&&v!==void 0?v:y;clearTimeout(C),C=setTimeout(E,P)}catch(P){f(),p(P)}}}E()})}function ob(e){let t=e.headers.get("content-type");if(!t?.startsWith(gs))throw new Error(`Expected content-type to be ${gs}, Actual: ${t}`)}var Br=class{constructor(t){be(this,"_basePath");be(this,"_params",{});this._basePath=t}addParam(t,r){this._params={...this.params,[t]:r}}get basePath(){return this._basePath}get params(){return this._params}get hasParams(){return Object.entries(this._params).length}get href(){return this.hasParams?`${this.basePath}?${Object.entries(this.params).map(([t,r])=>`${t}=${encodeURIComponent(r)}`).join("&")}`:this.basePath}};var ib=(e,t,r)=>new Br(`${e}/rest/organizations/${t}/machinelearning/streaming/${r}`).href,zg=3,ab=5e3,sb="text/event-stream",Nd=1,Vd=class extends Error{},ji=class extends Error{constructor(r){super(r.message);this.payload=r}},Md=class{constructor(){be(this,"timeouts",new Set)}add(t){this.timeouts.add(t)}remove(t){clearTimeout(t),this.timeouts.delete(t)}isActive(t){return this.timeouts.has(t)}},fs=class{constructor(t){be(this,"logger");this.logger=t.logger}streamGeneratedAnswer(t,r){let{url:n,organizationId:o,streamId:i,accessToken:a}=t,{write:s,abort:u,close:c,resetAnswer:l}=r,m=new Md;if(!i){this.logger.error("No stream ID found");return}let p=0,d,g=()=>{d&&!m.isActive(d)&&(y?.abort(),l(),C())},h=()=>{m.remove(d),d=Qg(g,d,ab),m.add(d)},y=new AbortController,C=()=>_i(ib(n,o,i),{method:"GET",fetch,headers:{Authorization:`Bearer ${a}`,accept:"*/*"},openWhenHidden:!0,signal:y?.signal,async onopen(f){if(f.ok&&f.headers.get("content-type")===sb)return;throw f.status>=400&&f.status<500&&f.status!==429?new ji({message:"Error opening stream",code:f.status}):new Vd},onmessage:f=>{if(y?.signal.aborted)return;let A=JSON.parse(f.data);if(A.finishReason==="ERROR"){m.remove(d),y?.abort(),u({message:A.errorMessage,code:A.statusCode});return}s(A),p=0,A.finishReason==="COMPLETED"?(m.remove(d),c()):h()},onerror:f=>{if(!y?.signal.aborted){if(m.remove(d),f instanceof ji)throw y?.abort(),u(f),f;if(++p>zg){this.logger.info("Maximum retry exceeded.");let A={message:"Failed to complete stream.",code:Nd};throw y?.abort(),u(A),new ji(A)}this.logger.info(`Retrying...(${p}/${zg})`),l()}}});return C(),y}};var hs=e=>e;var of=Wt(ef(),1);var Ob="recommendation-internal-options",zD=Symbol.for(Ob);var B=new Error("Failed to load reducers."),co=class extends Error{constructor(){super(),this.name="ExpiredToken",this.message="The token being used to perform the request is expired."}};var Mn=class extends Error{constructor(r,n){super();be(this,"statusCode");this.name="Disconnected",this.message=`Client could not connect to the following URL: ${r}`,this.statusCode=n??0}};function tf(e){let t=[];for(let r in e){let n=encodeURIComponent(r),o=encodeURIComponent(e[r]);t.push(`${n}=${o}`)}return t.join("&")}function rf(e){return typeof e!="object"||!e?!1:Object.values(e).every(Db)}function Db(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"}function nf(e){return e===429}var kt=class e{static async call(t){let r=Vb(t),{logger:n}=t,o=await e.preprocessRequest(r,t);n.info(o,"Platform request");let{url:i,...a}=o,s=async()=>{let u=await fetch(i,a);if(nf(u.status))throw u;return u};try{let u=await(0,of.backOff)(s,{retry:c=>{let l=c&&nf(c.status);return l&&n.info("Platform retrying request"),l}});switch(u.status){case 419:case 401:throw n.info("Platform renewing token"),new co;case 404:throw new Mn(i,u.status);default:return n.info({response:u,requestInfo:o},"Platform response"),u}}catch(u){return u.message==="Failed to fetch"?new Mn(i):u}}static async preprocessRequest(t,r){let{origin:n,preprocessRequest:o,logger:i,requestMetadata:a}=r,{signal:s,...u}=t,c=Bi(u);try{let l=await o(t,n,a);return{...t,...l}}catch(l){i.error(l,"Platform request preprocessing failed. Returning default request options.")}return c}};function de(e,t="prod",r="platform"){let n=t==="prod"?"":t,o=r==="platform"?"":`.${r}`;return`https://${e}${o}.org${n}.coveo.com`}function et(e,t="prod"){return`${de(e,t)}/rest/search/v2`}function Ss(e,t="prod"){return`${de(e,t,"analytics")}/rest/organizations/${e}/events/v1`}function Vb(e){let{url:t,method:r,requestParams:n,contentType:o,accessToken:i,signal:a}=e,s=e.method==="POST"||e.method==="PUT",u=Mb(n,o);return{url:t,method:r,headers:{"Content-Type":o,Authorization:`Bearer ${i}`,...e.headers},...s&&{body:u},signal:a}}function Mb(e,t){return t==="application/x-www-form-urlencoded"?rf(e)?tf(e):"":JSON.stringify(e)}function zi(e){let{url:t,accessToken:r,organizationId:n,authentication:o,...i}=e;return i}var zd=e=>{let{response:t}=e;return t.body?Nb(e):Qb(t)},Nb=e=>Ub(e)?Bb(e):Lb(e)?e.body:{message:"unknown",statusCode:0,type:"unknown"},Qb=e=>{let t=JSON.parse(JSON.stringify(e,Object.getOwnPropertyNames(e)));return{...t,message:`Client side error: ${t.message||""}`,statusCode:400,type:"ClientError"}};function Lb(e){return e.body.statusCode!==void 0}function Ub(e){return e.body.exception!==void 0}var Bb=e=>({message:e.body.exception.code,statusCode:e.response.status,type:e.body.exception.code});function af(e){return((e.headers.get("content-type")||"").split(";").find(n=>n.indexOf("charset=")!==-1)||"").split("=")[1]||"UTF-8"}var Hd=(e,t,r,n)=>{let o=new Br(`${e.url}${n}`);return o.addParam("organizationId",e.organizationId),e.authentication&&o.addParam("authentication",e.authentication),{accessToken:e.accessToken,method:t,contentType:r,url:o.href,origin:"searchApiFetch"}};var sf=(e,t)=>{let r=new Br(`${e.url}${t}`);return r.addParam("access_token",e.accessToken),r.addParam("organizationId",e.organizationId),r.addParam("uniqueId",e.uniqueId),e.q!==void 0&&r.addParam("q",e.q),e.enableNavigation!==void 0&&r.addParam("enableNavigation",`${e.enableNavigation}`),e.requestedOutputSize!==void 0&&r.addParam("requestedOutputSize",`${e.requestedOutputSize}`),r.href},Wd=async(e,t)=>{let r=await kt.call({...Hd(e,"POST","application/x-www-form-urlencoded","/html"),requestParams:zi(e),requestMetadata:{method:"html"},...t});if(r instanceof Error)throw r;let n=af(r),o=await r.arrayBuffer(),a=new TextDecoder(n).decode(o);return _b(a)?{success:a}:{error:zd({response:r,body:a})}};function _b(e){return typeof e=="string"}var cf=require("@coveo/bueno");function uo(){return{answerSnippet:"",documentId:{contentIdKey:"",contentIdValue:""},question:"",relatedQuestions:[],score:0}}function ke(){return{response:{results:[],searchUid:"",totalCountFiltered:0,facets:[],generateAutomaticFacets:{facets:[]},queryCorrections:[],triggers:[],questionAnswer:uo(),pipeline:"",splitTestRun:"",termsToHighlight:{},phrasesToHighlight:{},extendedResults:{}},duration:0,queryExecuted:"",error:null,automaticallyCorrected:!1,isLoading:!1,results:[],searchResponseId:"",requestId:"",questionAnswer:uo(),extendedResults:{}}}function jb(e){return{statusCode:e.statusCode,type:e.name,message:e.message}}function $b(e){return{statusCode:e.code,type:e.name,message:e.message,ignored:!0}}function Nn(e,t){if(t&&e.name==="AbortError")return{error:$b(e)};if(e instanceof Mn)return{error:jb(e)};throw e}var _r=e=>e.success!==void 0,ie=e=>e.error!==void 0;function uf(e){return e.results!==void 0}function lf(e){let t=uo();return(0,cf.isNullOrUndefined)(e.questionAnswer)?(e.questionAnswer=t,e):(e.questionAnswer={...t,...e.questionAnswer},e)}var Yd=(e,t)=>`${e.url}/rest/organizations/${e.organizationId}/insight/v1/configs/${e.insightId}${t??""}`,Gb=e=>`${e.url}/rest/organizations/${e.organizationId}/machinelearning/user/actions`,Hi=(e,t,r,n)=>{zb(e);let o=Yd(e,n);return{accessToken:e.accessToken,method:t,contentType:r,url:o,origin:"insightApiFetch"}},df=(e,t,r)=>{Hb(e);let n=Gb(e);return{accessToken:e.accessToken,method:t,contentType:r,url:n,origin:"insightApiFetch"}},Kd=e=>{let{insightId:t,...r}=zi(e);return r},pf=e=>{if(!e.url)throw new Error("The 'url' attribute must contain a valid platform URL.");if(!e.organizationId)throw new Error("The 'organizationId' attribute must contain a valid organization ID.");if(!e.accessToken)throw new Error("The 'accessToken' attribute must contain a valid platform access token.")},zb=e=>{if(pf(e),!e.insightId)throw new Error("The 'insightId' attribute must contain a valid Insight Panel configuration ID.")},Hb=e=>{if(pf(e),!e.userId)throw new Error("The 'userId' attribute must contain a valid user ID.")};var mf=e=>({...Hi(e,"GET","application/json","/interface"),requestParams:{}});var gf=e=>({...Hi(e,"POST","application/json","/search"),requestParams:Kd(e)}),ff=e=>({...Hi(e,"POST","application/json","/querysuggest"),requestParams:Kd(e)});var hf=e=>({...df(e,"POST","application/json"),requestParams:{objectId:e.userId}});var Cs=class{constructor(t){this.options=t}async getInterface(t){let r=await kt.call({...mf(t),...this.options});if(r instanceof Error)return Nn(r);let n=await r.json();return r.ok?{success:n}:{error:n}}async query(t,r){let n=await kt.call({...gf(t),requestMetadata:{method:"search",origin:r?.origin},...this.options});if(n instanceof Error)return Nn(n);let o=await n.json();return uf(o)&&(o=lf(o)),n.ok?{success:o}:{error:o}}async querySuggest(t){let r=await kt.call({...ff(t),...this.options});if(r instanceof Error)return Nn(r);let n=await r.json();return n.completions?{success:n}:{error:n}}async userActions(t){let r=await kt.call({...hf(t),...this.options});if(r instanceof Error)return Nn(r);let n=await r.json();return r.ok?{success:n}:{error:n}}async html(t){return Wd(t,{...this.options})}};var tt=require("@coveo/bueno"),q=new tt.StringValue({required:!0,emptyAllowed:!1}),te=new tt.StringValue({required:!1,emptyAllowed:!1}),ae=new tt.StringValue({required:!0,emptyAllowed:!0}),yf=new tt.StringValue({required:!1,emptyAllowed:!0}),As=new tt.ArrayValue({each:q,required:!0}),Sf=new tt.StringValue({required:!1,emptyAllowed:!1,regex:/^\d+\.\d+\.\d+$/}),qt=({message:e,name:t,stack:r})=>({message:e,name:t,stack:r}),Ct=(e,t)=>{if("required"in t)return{payload:new tt.Schema({value:t}).validate({value:e}).value};let o=new tt.RecordValue({options:{required:!0},values:t}).validate(e);if(o)throw new tt.SchemaValidationError(o);return{payload:e}},x=(e,t)=>{try{return Ct(e,t)}catch(r){return{payload:e,error:qt(r)}}},Yt=(e,t,r,n)=>{let o=`Check the initialState of ${n}`;return Cf(e,t,r,o,"Controller initialization error")},qe=(e,t,r,n)=>{let o=`Check the options of ${n}`;return Cf(e,t,r,o,"Controller initialization error")},Cf=(e,t,r,n,o)=>{try{return t.validate(r,n)}catch(i){throw e.logger.error(i,o),i}};var gt=require("@coveo/bueno");function Qe(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 Wb=typeof Symbol=="function"&&Symbol.observable||"@@observable",Af=Wb,Jd=()=>Math.random().toString(36).substring(7).split("").join("."),Yb={INIT:`@@redux/INIT${Jd()}`,REPLACE:`@@redux/REPLACE${Jd()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Jd()}`},xs=Yb;function Kt(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function Xd(e,t,r){if(typeof e!="function")throw new Error(Qe(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(Qe(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(Qe(1));return r(Xd)(e,t)}let n=e,o=t,i=new Map,a=i,s=0,u=!1;function c(){a===i&&(a=new Map,i.forEach((y,C)=>{a.set(C,y)}))}function l(){if(u)throw new Error(Qe(3));return o}function m(y){if(typeof y!="function")throw new Error(Qe(4));if(u)throw new Error(Qe(5));let C=!0;c();let f=s++;return a.set(f,y),function(){if(C){if(u)throw new Error(Qe(6));C=!1,c(),a.delete(f),i=null}}}function p(y){if(!Kt(y))throw new Error(Qe(7));if(typeof y.type>"u")throw new Error(Qe(8));if(typeof y.type!="string")throw new Error(Qe(17));if(u)throw new Error(Qe(9));try{u=!0,o=n(o,y)}finally{u=!1}return(i=a).forEach(f=>{f()}),y}function d(y){if(typeof y!="function")throw new Error(Qe(10));n=y,p({type:xs.REPLACE})}function g(){let y=m;return{subscribe(C){if(typeof C!="object"||C===null)throw new Error(Qe(11));function f(){let b=C;b.next&&b.next(l())}return f(),{unsubscribe:y(f)}},[Af](){return this}}}return p({type:xs.INIT}),{dispatch:p,subscribe:m,getState:l,replaceReducer:d,[Af]:g}}function Kb(e){Object.keys(e).forEach(t=>{let r=e[t];if(typeof r(void 0,{type:xs.INIT})>"u")throw new Error(Qe(12));if(typeof r(void 0,{type:xs.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Qe(13))})}function lo(e){let t=Object.keys(e),r={};for(let a=0;a<t.length;a++){let s=t[a];typeof e[s]=="function"&&(r[s]=e[s])}let n=Object.keys(r),o,i;try{Kb(r)}catch(a){i=a}return function(s={},u){if(i)throw i;let c=!1,l={};for(let m=0;m<n.length;m++){let p=n[m],d=r[p],g=s[p],h=d(g,u);if(typeof h>"u"){let y=u&&u.type;throw new Error(Qe(14))}l[p]=h,c=c||h!==g}return c=c||n.length!==Object.keys(s).length,c?l:s}}function po(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function xf(...e){return t=>(r,n)=>{let o=t(r,n),i=()=>{throw new Error(Qe(15))},a={getState:o.getState,dispatch:(u,...c)=>i(u,...c)},s=e.map(u=>u(a));return i=po(...s)(o.dispatch),{...o,dispatch:i}}}function Rs(e){return Kt(e)&&"type"in e&&typeof e.type=="string"}var cp=Symbol.for("immer-nothing"),Wi=Symbol.for("immer-draftable"),rt=Symbol.for("immer-state");function Le(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Ln=Object.getPrototypeOf;function dt(e){return!!e&&!!e[rt]}function nt(e){return e?If(e)||Array.isArray(e)||!!e[Wi]||!!e.constructor?.[Wi]||Zi(e)||ea(e):!1}var Jb=Object.prototype.constructor.toString();function If(e){if(!e||typeof e!="object")return!1;let t=Ln(e);if(t===null)return!0;let r=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return r===Object?!0:typeof r=="function"&&Function.toString.call(r)===Jb}function up(e){return dt(e)||Le(15,e),e[rt].base_}function Yi(e,t){Un(e)===0?Reflect.ownKeys(e).forEach(r=>{t(r,e[r],e)}):e.forEach((r,n)=>t(n,r,e))}function Un(e){let t=e[rt];return t?t.type_:Array.isArray(e)?1:Zi(e)?2:ea(e)?3:0}function Ki(e,t){return Un(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Zd(e,t){return Un(e)===2?e.get(t):e[t]}function wf(e,t,r){let n=Un(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function Xb(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Zi(e){return e instanceof Map}function ea(e){return e instanceof Set}function Qn(e){return e.copy_||e.base_}function rp(e,t){if(Zi(e))return new Map(e);if(ea(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);let r=If(e);if(t===!0||t==="class_only"&&!r){let n=Object.getOwnPropertyDescriptors(e);delete n[rt];let o=Reflect.ownKeys(n);for(let i=0;i<o.length;i++){let a=o[i],s=n[a];s.writable===!1&&(s.writable=!0,s.configurable=!0),(s.get||s.set)&&(n[a]={configurable:!0,writable:!0,enumerable:s.enumerable,value:e[a]})}return Object.create(Ln(e),n)}else{let n=Ln(e);if(n!==null&&r)return{...e};let o=Object.create(n);return Object.assign(o,e)}}function vs(e,t=!1){return Is(e)||dt(e)||!nt(e)||(Un(e)>1&&(e.set=e.add=e.clear=e.delete=Zb),Object.freeze(e),t&&Object.entries(e).forEach(([r,n])=>vs(n,!0))),e}function Zb(){Le(2)}function Is(e){return Object.isFrozen(e)}var np={};function Bn(e){let t=np[e];return t||Le(0,e),t}function ev(e,t){np[e]||(np[e]=t)}var Ji;function Pf(){return Ji}function tv(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Rf(e,t){t&&(Bn("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function op(e){ip(e),e.drafts_.forEach(rv),e.drafts_=null}function ip(e){e===Ji&&(Ji=e.parent_)}function Ff(e){return Ji=tv(Ji,e)}function rv(e){let t=e[rt];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function bf(e,t){t.unfinalizedDrafts_=t.drafts_.length;let r=t.drafts_[0];return e!==void 0&&e!==r?(r[rt].modified_&&(op(t),Le(4)),nt(e)&&(e=Fs(t,e),t.parent_||bs(t,e)),t.patches_&&Bn("Patches").generateReplacementPatches_(r[rt].base_,e,t.patches_,t.inversePatches_)):e=Fs(t,r,[]),op(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==cp?e:void 0}function Fs(e,t,r){if(Is(t))return t;let n=t[rt];if(!n)return Yi(t,(o,i)=>vf(e,n,t,o,i,r)),t;if(n.scope_!==e)return t;if(!n.modified_)return bs(e,n.base_,!0),n.base_;if(!n.finalized_){n.finalized_=!0,n.scope_.unfinalizedDrafts_--;let o=n.copy_,i=o,a=!1;n.type_===3&&(i=new Set(o),o.clear(),a=!0),Yi(i,(s,u)=>vf(e,n,o,s,u,r,a)),bs(e,o,!1),r&&e.patches_&&Bn("Patches").generatePatches_(n,r,e.patches_,e.inversePatches_)}return n.copy_}function vf(e,t,r,n,o,i,a){if(dt(o)){let s=i&&t&&t.type_!==3&&!Ki(t.assigned_,n)?i.concat(n):void 0,u=Fs(e,o,s);if(wf(r,n,u),dt(u))e.canAutoFreeze_=!1;else return}else a&&r.add(o);if(nt(o)&&!Is(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Fs(e,o),(!t||!t.scope_.parent_)&&typeof n!="symbol"&&Object.prototype.propertyIsEnumerable.call(r,n)&&bs(e,o)}}function bs(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&vs(t,r)}function nv(e,t){let r=Array.isArray(e),n={type_:r?1:0,scope_:t?t.scope_:Pf(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1},o=n,i=lp;r&&(o=[n],i=Xi);let{revoke:a,proxy:s}=Proxy.revocable(o,i);return n.draft_=s,n.revoke_=a,s}var lp={get(e,t){if(t===rt)return e;let r=Qn(e);if(!Ki(r,t))return ov(e,r,t);let n=r[t];return e.finalized_||!nt(n)?n:n===ep(e.base_,t)?(tp(e),e.copy_[t]=sp(n,e)):n},has(e,t){return t in Qn(e)},ownKeys(e){return Reflect.ownKeys(Qn(e))},set(e,t,r){let n=Ef(Qn(e),t);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){let o=ep(Qn(e),t),i=o?.[rt];if(i&&i.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(Xb(r,o)&&(r!==void 0||Ki(e.base_,t)))return!0;tp(e),ap(e)}return e.copy_[t]===r&&(r!==void 0||t in e.copy_)||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_[t]=!0),!0},deleteProperty(e,t){return ep(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,tp(e),ap(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let r=Qn(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty(){Le(11)},getPrototypeOf(e){return Ln(e.base_)},setPrototypeOf(){Le(12)}},Xi={};Yi(lp,(e,t)=>{Xi[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});Xi.deleteProperty=function(e,t){return Xi.set.call(this,e,t,void 0)};Xi.set=function(e,t,r){return lp.set.call(this,e[0],t,r,e[0])};function ep(e,t){let r=e[rt];return(r?Qn(r):e)[t]}function ov(e,t,r){let n=Ef(t,r);return n?"value"in n?n.value:n.get?.call(e.draft_):void 0}function Ef(e,t){if(!(t in e))return;let r=Ln(e);for(;r;){let n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Ln(r)}}function ap(e){e.modified_||(e.modified_=!0,e.parent_&&ap(e.parent_))}function tp(e){e.copy_||(e.copy_=rp(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var iv=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,r,n)=>{if(typeof t=="function"&&typeof r!="function"){let i=r;r=t;let a=this;return function(u=i,...c){return a.produce(u,l=>r.call(this,l,...c))}}typeof r!="function"&&Le(6),n!==void 0&&typeof n!="function"&&Le(7);let o;if(nt(t)){let i=Ff(this),a=sp(t,void 0),s=!0;try{o=r(a),s=!1}finally{s?op(i):ip(i)}return Rf(i,n),bf(o,i)}else if(!t||typeof t!="object"){if(o=r(t),o===void 0&&(o=t),o===cp&&(o=void 0),this.autoFreeze_&&vs(o,!0),n){let i=[],a=[];Bn("Patches").generateReplacementPatches_(t,o,i,a),n(i,a)}return o}else Le(1,t)},this.produceWithPatches=(t,r)=>{if(typeof t=="function")return(a,...s)=>this.produceWithPatches(a,u=>t(u,...s));let n,o;return[this.produce(t,r,(a,s)=>{n=a,o=s}),n,o]},typeof e?.autoFreeze=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof e?.useStrictShallowCopy=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){nt(e)||Le(8),dt(e)&&(e=Tf(e));let t=Ff(this),r=sp(e,void 0);return r[rt].isManual_=!0,ip(t),r}finishDraft(e,t){let r=e&&e[rt];(!r||!r.isManual_)&&Le(9);let{scope_:n}=r;return Rf(n,t),bf(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){let o=t[r];if(o.path.length===0&&o.op==="replace"){e=o.value;break}}r>-1&&(t=t.slice(r+1));let n=Bn("Patches").applyPatches_;return dt(e)?n(e,t):this.produce(e,o=>n(o,t))}};function sp(e,t){let r=Zi(e)?Bn("MapSet").proxyMap_(e,t):ea(e)?Bn("MapSet").proxySet_(e,t):nv(e,t);return(t?t.scope_:Pf()).drafts_.push(r),r}function Tf(e){return dt(e)||Le(10,e),kf(e)}function kf(e){if(!nt(e)||Is(e))return e;let t=e[rt],r;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=rp(e,t.scope_.immer_.useStrictShallowCopy_)}else r=rp(e,!0);return Yi(r,(n,o)=>{wf(r,n,kf(o))}),t&&(t.finalized_=!1),r}function qf(){let t="replace",r="add",n="remove";function o(p,d,g,h){switch(p.type_){case 0:case 2:return a(p,d,g,h);case 1:return i(p,d,g,h);case 3:return s(p,d,g,h)}}function i(p,d,g,h){let{base_:y,assigned_:C}=p,f=p.copy_;f.length<y.length&&([y,f]=[f,y],[g,h]=[h,g]);for(let A=0;A<y.length;A++)if(C[A]&&f[A]!==y[A]){let b=d.concat([A]);g.push({op:t,path:b,value:m(f[A])}),h.push({op:t,path:b,value:m(y[A])})}for(let A=y.length;A<f.length;A++){let b=d.concat([A]);g.push({op:r,path:b,value:m(f[A])})}for(let A=f.length-1;y.length<=A;--A){let b=d.concat([A]);h.push({op:n,path:b})}}function a(p,d,g,h){let{base_:y,copy_:C}=p;Yi(p.assigned_,(f,A)=>{let b=Zd(y,f),E=Zd(C,f),v=A?Ki(y,f)?t:r:n;if(b===E&&v===t)return;let F=d.concat(f);g.push(v===n?{op:v,path:F}:{op:v,path:F,value:E}),h.push(v===r?{op:n,path:F}:v===n?{op:r,path:F,value:m(b)}:{op:t,path:F,value:m(b)})})}function s(p,d,g,h){let{base_:y,copy_:C}=p,f=0;y.forEach(A=>{if(!C.has(A)){let b=d.concat([f]);g.push({op:n,path:b,value:A}),h.unshift({op:r,path:b,value:A})}f++}),f=0,C.forEach(A=>{if(!y.has(A)){let b=d.concat([f]);g.push({op:r,path:b,value:A}),h.unshift({op:n,path:b,value:A})}f++})}function u(p,d,g,h){g.push({op:t,path:[],value:d===cp?void 0:d}),h.push({op:t,path:[],value:p})}function c(p,d){return d.forEach(g=>{let{path:h,op:y}=g,C=p;for(let E=0;E<h.length-1;E++){let v=Un(C),F=h[E];typeof F!="string"&&typeof F!="number"&&(F=""+F),(v===0||v===1)&&(F==="__proto__"||F==="constructor")&&Le(19),typeof C=="function"&&F==="prototype"&&Le(19),C=Zd(C,F),typeof C!="object"&&Le(18,h.join("/"))}let f=Un(C),A=l(g.value),b=h[h.length-1];switch(y){case t:switch(f){case 2:return C.set(b,A);case 3:Le(16);default:return C[b]=A}case r:switch(f){case 1:return b==="-"?C.push(A):C.splice(b,0,A);case 2:return C.set(b,A);case 3:return C.add(A);default:return C[b]=A}case n:switch(f){case 1:return C.splice(b,1);case 2:return C.delete(b);case 3:return C.delete(g.value);default:return delete C[b]}default:Le(17,y)}}),p}function l(p){if(!nt(p))return p;if(Array.isArray(p))return p.map(l);if(Zi(p))return new Map(Array.from(p.entries()).map(([g,h])=>[g,l(h)]));if(ea(p))return new Set(Array.from(p).map(l));let d=Object.create(Ln(p));for(let g in p)d[g]=l(p[g]);return Ki(p,Wi)&&(d[Wi]=p[Wi]),d}function m(p){return dt(p)?l(p):p}ev("Patches",{applyPatches_:c,generatePatches_:o,generateReplacementPatches_:u})}var pt=new iv,Er=pt.produce,ws=pt.produceWithPatches.bind(pt),nM=pt.setAutoFreeze.bind(pt),oM=pt.setUseStrictShallowCopy.bind(pt),dp=pt.applyPatches.bind(pt),iM=pt.createDraft.bind(pt),aM=pt.finishDraft.bind(pt);function av(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function sv(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function cv(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(r=>typeof r=="function")){let r=e.map(n=>typeof n=="function"?`function ${n.name||"unnamed"}()`:typeof n).join(", ");throw new TypeError(`${t}[${r}]`)}}var Of=e=>Array.isArray(e)?e:[e];function uv(e){let t=Array.isArray(e[0])?e[0]:e;return cv(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function lv(e,t){let r=[],{length:n}=e;for(let o=0;o<n;o++)r.push(e[o].apply(null,t));return r}var uM=Symbol();var lM=Object.getPrototypeOf({});var dv=class{constructor(e){this.value=e}deref(){return this.value}},pv=typeof WeakRef<"u"?WeakRef:dv,mv=0,Df=1;function Ps(){return{s:mv,v:void 0,o:null,p:null}}function mo(e,t={}){let r=Ps(),{resultEqualityCheck:n}=t,o,i=0;function a(){let s=r,{length:u}=arguments;for(let m=0,p=u;m<p;m++){let d=arguments[m];if(typeof d=="function"||typeof d=="object"&&d!==null){let g=s.o;g===null&&(s.o=g=new WeakMap);let h=g.get(d);h===void 0?(s=Ps(),g.set(d,s)):s=h}else{let g=s.p;g===null&&(s.p=g=new Map);let h=g.get(d);h===void 0?(s=Ps(),g.set(d,s)):s=h}}let c=s,l;if(s.s===Df)l=s.v;else if(l=e.apply(null,arguments),i++,n){let m=o?.deref?.()??o;m!=null&&n(m,l)&&(l=m,i!==0&&i--),o=typeof l=="object"&&l!==null||typeof l=="function"?new pv(l):l}return c.s=Df,c.v=l,l}return a.clearCache=()=>{r=Ps(),a.resetResultsCount()},a.resultsCount=()=>i,a.resetResultsCount=()=>{i=0},a}function Vf(e,...t){let r=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,n=(...o)=>{let i=0,a=0,s,u={},c=o.pop();typeof c=="object"&&(u=c,c=o.pop()),av(c,`createSelector expects an output function after the inputs, but received: [${typeof c}]`);let l={...r,...u},{memoize:m,memoizeOptions:p=[],argsMemoize:d=mo,argsMemoizeOptions:g=[],devModeChecks:h={}}=l,y=Of(p),C=Of(g),f=uv(o),A=m(function(){return i++,c.apply(null,arguments)},...y),b=!0,E=d(function(){a++;let F=lv(f,arguments);return s=A.apply(null,F),s},...C);return Object.assign(E,{resultFunc:c,memoizedResultFunc:A,dependencies:f,dependencyRecomputations:()=>a,resetDependencyRecomputations:()=>{a=0},lastResult:()=>s,recomputations:()=>i,resetRecomputations:()=>{i=0},memoize:m,argsMemoize:d})};return Object.assign(n,{withTypes:()=>n}),n}var Y=Vf(mo),gv=Object.assign((e,t=Y)=>{sv(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);let r=Object.keys(e),n=r.map(i=>e[i]);return t(n,(...i)=>i.reduce((a,s,u)=>(a[r[u]]=s,a),{}))},{withTypes:()=>gv});function Mf(e){return({dispatch:r,getState:n})=>o=>i=>typeof i=="function"?i(r,n,e):o(i)}var Nf=Mf(),Qf=Mf;var fv=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?po:po.apply(null,arguments)},AM=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}},hv=e=>e&&typeof e.match=="function";function S(e,t){function r(...n){if(t){let o=t(...n);if(!o)throw new Error(Ot(0));return{type:e,payload:o.payload,..."meta"in o&&{meta:o.meta},..."error"in o&&{error:o.error}}}return{type:e,payload:n[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=n=>Rs(n)&&n.type===e,r}var jf=class ta extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,ta.prototype)}static get[Symbol.species](){return ta}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new ta(...t[0].concat(this)):new ta(...t.concat(this))}};function Lf(e){return nt(e)?Er(e,()=>{}):e}function Uf(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function yv(e){return typeof e=="boolean"}var Sv=()=>function(t){let{thunk:r=!0,immutableCheck:n=!0,serializableCheck:o=!0,actionCreatorCheck:i=!0}=t??{},a=new jf;return r&&(yv(r)?a.push(Nf):a.push(Qf(r.extraArgument))),a},jr="RTK_autoBatch",fo=()=>e=>({payload:e,meta:{[jr]:!0}}),Bf=e=>t=>{setTimeout(t,e)},Cv=(e={type:"raf"})=>t=>(...r)=>{let n=t(...r),o=!0,i=!1,a=!1,s=new Set,u=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Bf(10):e.type==="callback"?e.queueNotification:Bf(e.timeout),c=()=>{a=!1,i&&(i=!1,s.forEach(l=>l()))};return Object.assign({},n,{subscribe(l){let m=()=>o&&l(),p=n.subscribe(m);return s.add(l),()=>{p(),s.delete(l)}},dispatch(l){try{return o=!l?.meta?.[jr],i=!o,i&&(a||(a=!0,u(c))),n.dispatch(l)}finally{o=!0}}})},Av=e=>function(r){let{autoBatch:n=!0}=r??{},o=new jf(e);return n&&o.push(Cv(typeof n=="object"?n:void 0)),o};function $f(e){let t=Sv(),{reducer:r=void 0,middleware:n,devTools:o=!0,preloadedState:i=void 0,enhancers:a=void 0}=e||{},s;if(typeof r=="function")s=r;else if(Kt(r))s=lo(r);else throw new Error(Ot(1));let u;typeof n=="function"?u=n(t):u=t();let c=po;o&&(c=fv({trace:!1,...typeof o=="object"&&o}));let l=xf(...u),m=Av(l),p=typeof a=="function"?a(m):m(),d=c(...p);return Xd(s,i,d)}function Gf(e){let t={},r=[],n,o={addCase(i,a){let s=typeof i=="string"?i:i.type;if(!s)throw new Error(Ot(28));if(s in t)throw new Error(Ot(29));return t[s]=a,o},addMatcher(i,a){return r.push({matcher:i,reducer:a}),o},addDefaultCase(i){return n=i,o}};return e(o),[t,r,n]}function xv(e){return typeof e=="function"}function $(e,t){let[r,n,o]=Gf(t),i;if(xv(e))i=()=>Lf(e());else{let s=Lf(e);i=()=>s}function a(s=i(),u){let c=[r[u.type],...n.filter(({matcher:l})=>l(u)).map(({reducer:l})=>l)];return c.filter(l=>!!l).length===0&&(c=[o]),c.reduce((l,m)=>{if(m)if(dt(l)){let d=m(l,u);return d===void 0?l:d}else{if(nt(l))return Er(l,p=>m(p,u));{let p=m(l,u);if(p===void 0){if(l===null)return l;throw Error("A case reducer on a non-draftable value must not return undefined")}return p}}return l},s)}return a.getInitialState=i,a}var zf=(e,t)=>hv(e)?e.match(t):e(t);function Jt(...e){return t=>e.some(r=>zf(r,t))}function go(...e){return t=>e.every(r=>zf(r,t))}function Ts(e,t){if(!e||!e.meta)return!1;let r=typeof e.meta.requestId=="string",n=t.indexOf(e.meta.requestStatus)>-1;return r&&n}function ra(e){return typeof e[0]=="function"&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function ks(...e){return e.length===0?t=>Ts(t,["pending"]):ra(e)?Jt(...e.map(t=>t.pending)):ks()(e[0])}function _n(...e){return e.length===0?t=>Ts(t,["rejected"]):ra(e)?Jt(...e.map(t=>t.rejected)):_n()(e[0])}function na(...e){let t=r=>r&&r.meta&&r.meta.rejectedWithValue;return e.length===0?go(_n(...e),t):ra(e)?go(_n(...e),t):na()(e[0])}function Tr(...e){return e.length===0?t=>Ts(t,["fulfilled"]):ra(e)?Jt(...e.map(t=>t.fulfilled)):Tr()(e[0])}function qs(...e){return e.length===0?t=>Ts(t,["pending","fulfilled","rejected"]):ra(e)?Jt(...e.flatMap(t=>[t.pending,t.rejected,t.fulfilled])):qs()(e[0])}var Rv="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Os=(e=21)=>{let t="",r=e;for(;r--;)t+=Rv[Math.random()*64|0];return t},Fv=["name","message","stack","code"],pp=class{constructor(e,t){be(this,"_type");this.payload=e,this.meta=t}},_f=class{constructor(e,t){be(this,"_type");this.payload=e,this.meta=t}},bv=e=>{if(typeof e=="object"&&e!==null){let t={};for(let r of Fv)typeof e[r]=="string"&&(t[r]=e[r]);return t}return{message:String(e)}},U=(()=>{function e(t,r,n){let o=S(t+"/fulfilled",(u,c,l,m)=>({payload:u,meta:{...m||{},arg:l,requestId:c,requestStatus:"fulfilled"}})),i=S(t+"/pending",(u,c,l)=>({payload:void 0,meta:{...l||{},arg:c,requestId:u,requestStatus:"pending"}})),a=S(t+"/rejected",(u,c,l,m,p)=>({payload:m,error:(n&&n.serializeError||bv)(u||"Rejected"),meta:{...p||{},arg:l,requestId:c,rejectedWithValue:!!m,requestStatus:"rejected",aborted:u?.name==="AbortError",condition:u?.name==="ConditionError"}}));function s(u){return(c,l,m)=>{let p=n?.idGenerator?n.idGenerator(u):Os(),d=new AbortController,g,h;function y(f){h=f,d.abort()}let C=async function(){let f;try{let b=n?.condition?.(u,{getState:l,extra:m});if(Iv(b)&&(b=await b),b===!1||d.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let E=new Promise((v,F)=>{g=()=>{F({name:"AbortError",message:h||"Aborted"})},d.signal.addEventListener("abort",g)});c(i(p,u,n?.getPendingMeta?.({requestId:p,arg:u},{getState:l,extra:m}))),f=await Promise.race([E,Promise.resolve(r(u,{dispatch:c,getState:l,extra:m,requestId:p,signal:d.signal,abort:y,rejectWithValue:(v,F)=>new pp(v,F),fulfillWithValue:(v,F)=>new _f(v,F)})).then(v=>{if(v instanceof pp)throw v;return v instanceof _f?o(v.payload,p,u,v.meta):o(v,p,u)})])}catch(b){f=b instanceof pp?a(null,p,u,b.payload,b.meta):a(b,p,u)}finally{g&&d.signal.removeEventListener("abort",g)}return n&&!n.dispatchConditionRejection&&a.match(f)&&f.meta.condition||c(f),f}();return Object.assign(C,{abort:y,requestId:p,arg:u,unwrap(){return C.then(vv)}})}}return Object.assign(s,{pending:i,rejected:a,fulfilled:o,settled:Jt(a,o),typePrefix:t})}return e.withTypes=()=>e,e})();function vv(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function Iv(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var Hf=Symbol.for("rtk-slice-createasyncthunk"),vM={[Hf]:U};function wv(e,t){return`${e}/${t}`}function Pv({creators:e}={}){let t=e?.asyncThunk?.[Hf];return function(n){let{name:o,reducerPath:i=o}=n;if(!o)throw new Error(Ot(11));typeof process<"u";let a=(typeof n.reducers=="function"?n.reducers(Tv()):n.reducers)||{},s=Object.keys(a),u={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},c={addCase(f,A){let b=typeof f=="string"?f:f.type;if(!b)throw new Error(Ot(12));if(b in u.sliceCaseReducersByType)throw new Error(Ot(13));return u.sliceCaseReducersByType[b]=A,c},addMatcher(f,A){return u.sliceMatchers.push({matcher:f,reducer:A}),c},exposeAction(f,A){return u.actionCreators[f]=A,c},exposeCaseReducer(f,A){return u.sliceCaseReducersByName[f]=A,c}};s.forEach(f=>{let A=a[f],b={reducerName:f,type:wv(o,f),createNotation:typeof n.reducers=="function"};qv(A)?Dv(b,A,c,t):kv(b,A,c)});function l(){let[f={},A=[],b=void 0]=typeof n.extraReducers=="function"?Gf(n.extraReducers):[n.extraReducers],E={...f,...u.sliceCaseReducersByType};return $(n.initialState,v=>{for(let F in E)v.addCase(F,E[F]);for(let F of u.sliceMatchers)v.addMatcher(F.matcher,F.reducer);for(let F of A)v.addMatcher(F.matcher,F.reducer);b&&v.addDefaultCase(b)})}let m=f=>f,p=new Map,d;function g(f,A){return d||(d=l()),d(f,A)}function h(){return d||(d=l()),d.getInitialState()}function y(f,A=!1){function b(v){let F=v[f];return typeof F>"u"&&A&&(F=h()),F}function E(v=m){let F=Uf(p,A,()=>new WeakMap);return Uf(F,v,()=>{let P={};for(let[w,D]of Object.entries(n.selectors??{}))P[w]=Ev(D,v,h,A);return P})}return{reducerPath:f,getSelectors:E,get selectors(){return E(b)},selectSlice:b}}let C={name:o,reducer:g,actions:u.actionCreators,caseReducers:u.sliceCaseReducersByName,getInitialState:h,...y(i),injectInto(f,{reducerPath:A,...b}={}){let E=A??i;return f.inject({reducerPath:E,reducer:g},b),{...C,...y(E,!0)}}};return C}}function Ev(e,t,r,n){function o(i,...a){let s=t(i);return typeof s>"u"&&n&&(s=r()),e(s,...a)}return o.unwrapped=e,o}var jn=Pv();function Tv(){function e(t,r){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...r}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...r){return t(...r)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,r){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:r}},asyncThunk:e}}function kv({type:e,reducerName:t,createNotation:r},n,o){let i,a;if("reducer"in n){if(r&&!Ov(n))throw new Error(Ot(17));i=n.reducer,a=n.prepare}else i=n;o.addCase(e,i).exposeCaseReducer(t,i).exposeAction(t,a?S(e,a):S(e))}function qv(e){return e._reducerDefinitionType==="asyncThunk"}function Ov(e){return e._reducerDefinitionType==="reducerWithPrepare"}function Dv({type:e,reducerName:t},r,n,o){if(!o)throw new Error(Ot(18));let{payloadCreator:i,fulfilled:a,pending:s,rejected:u,settled:c,options:l}=r,m=o(e,i,l);n.exposeAction(t,m),a&&n.addCase(m.fulfilled,a),s&&n.addCase(m.pending,s),u&&n.addCase(m.rejected,u),c&&n.addMatcher(m.settled,c),n.exposeCaseReducer(t,{fulfilled:a||Es,pending:s||Es,rejected:u||Es,settled:c||Es})}function Es(){}var Wf="listener",Yf="completed",Kf="cancelled",IM=`task-${Kf}`,wM=`task-${Yf}`,PM=`${Wf}-${Kf}`,EM=`${Wf}-${Yf}`;var{assign:Jf}=Object;var mp="listenerMiddleware";var Vv=Jf(S(`${mp}/add`),{withTypes:()=>Vv}),TM=S(`${mp}/removeAll`),Mv=Jf(S(`${mp}/remove`),{withTypes:()=>Mv});var kM=Symbol.for("rtk-state-proxy-original");function Ot(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. `}function Nv({config:e,environment:t,event:r,listenerManager:n}){let{url:o,token:i,mode:a}=e;a!=="disabled"&&(n.call(r),t.send(o,i,r))}var Qv=/^(?:[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 Lv(e){return typeof e=="string"&&Qv.test(e)}function Uv(e){return{getClientId:()=>{let t="visitorId",r=e.get(),n=r.storage,o=n.getItem(t),i=o&&Lv(o)?o:r.generateUUID();return n.setItem(t,i),i}}}var Zf="0.7.10";function Bv(e){let{trackingId:t}=e;return{trackingId:t}}function _v(e){return(e.source||[]).concat([`relay@${Zf}`])}function eh(e,t,r,n){let{getReferrer:o,getLocation:i,getUserAgent:a}=r,s=Bv(t),u=n.getClientId();return Object.freeze({type:e,config:s,ts:Date.now(),source:_v(t),clientId:u,userAgent:a(),referrer:o(),location:i()})}function jv(e,t,r,n,o){return{...t,meta:eh(e,r,n,o)}}var $v="*";function Gv(){let e=[];function t({type:u,callback:c}){return e.findIndex(l=>l.type===u&&l.callback===c)}function r(u,c){return u.type==="*"||c===u.type}function n(u){return t(u)<0&&e.push(u),()=>s(u.type,u.callback)}function o(u){e.forEach(c=>{if(r(c,u.meta.type))try{c.callback(u)}catch(l){console.error(l)}})}function i(u){if(u===$v)e.length=0;else for(let c=e.length-1;c>=0;c--)e[c].type===u&&e.splice(c,1)}function a(u){let c=t(u);c>=0&&e.splice(c,1)}function s(u,c){c?a({type:u,callback:c}):i(u)}return{add:n,call:o,remove:s}}function Xf({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}})}function zv(e){let t=Xf(e);return{get:()=>t,update:r=>{t=Xf({...t,...r})}}}function Hv(){let e=typeof window<"u";return{sendMessage(t){e&&window.postMessage(t,"*")}}}var gp=Wv();function Wv(){let e="coveo_",t=r=>{let n=r.split(".").slice(-2);return n.length==2?n.join("."):""};return{getItem(r){let n=`${e}${r}=`,o=document.cookie.split(";");for(let i of o){let a=i.replace(/^\s+/,"");if(a.lastIndexOf(n,0)===0)return a.substring(n.length,a.length)}return null},setItem(r,n,o){let i=t(window.location.hostname),a=`;expires=${new Date(new Date().getTime()+o).toUTCString()}`,s=i?`;domain=${i}`:"";document.cookie=`${e}${r}=${n}${a}${s};path=/;SameSite=Lax`},removeItem(r){this.setItem(r,"",-1)}}}function Yv(){return{getItem(e){return gp.getItem(e)||localStorage.getItem(e)},removeItem(e){gp.removeItem(e),localStorage.removeItem(e)},setItem(e,t){localStorage.setItem(e,t),gp.setItem(e,t,31556952e3)}}}function Kv(){let e=document.referrer;return e===""?null:e}function Jv(){return{runtime:"browser",send:(e,t,r)=>{let n=navigator.sendBeacon(`${e}?access_token=${t}`,new Blob([JSON.stringify([r])],{type:"application/json"}));if(Hv().sendMessage({kind:"EVENT_PROTOCOL",event:r,url:e,token:t}),!n)throw new Error("Failed to send the event(s) because the payload size exceeded the maximum allowed size (32 KB). Please contact support if the problem persists.")},getReferrer:()=>Kv(),getLocation:()=>window.location.href,getUserAgent:()=>navigator.userAgent,generateUUID:()=>crypto.randomUUID(),storage:Yv()}}function Xv(){try{let e="__storage_test__";return localStorage.setItem(e,e),localStorage.removeItem(e),!0}catch(e){return e instanceof DOMException&&e.name==="QuotaExceededError"&&localStorage&&localStorage.length!==0}}function Zv(){return{getItem(){return null},removeItem(){},setItem(){}}}function eI(){return{runtime:"null",send:()=>{},getReferrer:()=>null,getLocation:()=>null,getUserAgent:()=>null,generateUUID:()=>"",storage:Zv()}}function tI(e){return e.get().mode!=="disabled"&&rI()&&Xv()?Jv():eI()}function rI(){try{return typeof window=="object"}catch{return!1}}function nI(e){return{get:()=>Object.freeze(tI(e))}}function th(e){let t=zv(e),r=Gv(),n=nI(t),o=Uv(n);return{emit:(i,a)=>{let s=t.get(),u=n.get(),c=jv(i,a,s,u,o);return Nv({config:s,environment:u,event:c,listenerManager:r})},getMeta:i=>eh(i,t.get(),n.get(),o),on:(i,a)=>r.add({type:i,callback:a}),off:(i,a)=>r.remove(i,a),updateConfig:i=>t.update(i),version:Zf}}var ho="3.13.1-pre.cf8bb8919d",rh=["@coveo/atomic","@coveo/quantic"];var Xt=Y(e=>e.source,e=>Object.entries(e).map(([t,r])=>`${t}@${r}`).concat(`@coveo/headless@${ho}`));var yo=Y(e=>e.configuration.organizationId,e=>e.configuration.environment,e=>e.configuration.accessToken,e=>e.configuration.analytics,e=>Xt(e.configuration.analytics),(e,t,r,{trackingId:n,apiBaseUrl:o,enabled:i},a)=>th({mode:i?"emit":"disabled",url:o??Ss(e,t),token:r,trackingId:n,source:a}));function Zt(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function I(e,t,r,n){function o(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function s(l){try{c(n.next(l))}catch(m){a(m)}}function u(l){try{c(n.throw(l))}catch(m){a(m)}}function c(l){l.done?i(l.value):o(l.value).then(s,u)}c((n=n.apply(e,t||[])).next())})}var Z;(function(e){e.search="search",e.click="click",e.custom="custom",e.view="view",e.collect="collect"})(Z||(Z={}));function yp(){return typeof window<"u"}function kp(){return typeof navigator<"u"}function So(){return typeof document<"u"}function Sp(){try{return typeof localStorage<"u"}catch{return!1}}function oI(){try{return typeof sessionStorage<"u"}catch{return!1}}function fh(){return kp()&&navigator.cookieEnabled}var iI=[Z.click,Z.custom,Z.search,Z.view],aI=(e,t)=>iI.indexOf(e)!==-1?Object.assign({language:So()?document.documentElement.lang:"unknown",userAgent:kp()?navigator.userAgent:"unknown"},t):t,aa=class e{static set(t,r,n){var o,i,a,s;n&&(i=new Date,i.setTime(i.getTime()+n)),s=window.location.hostname,s.indexOf(".")===-1?nh(t,r,i):(a=s.split("."),o=a[a.length-2]+"."+a[a.length-1],nh(t,r,i,o))}static get(t){for(var r=t+"=",n=document.cookie.split(";"),o=0;o<n.length;o++){var i=n[o];if(i=i.replace(/^\s+/,""),i.lastIndexOf(r,0)===0)return i.substring(r.length,i.length)}return null}static erase(t){e.set(t,"",-1)}};function nh(e,t,r,n){document.cookie=`${e}=${t}`+(r?`;expires=${r.toUTCString()}`:"")+(n?`;domain=${n}`:"")+";path=/;SameSite=Lax"}function sI(){return Sp()?localStorage:fh()?new sa:oI()?sessionStorage:new Ao}var sa=class e{getItem(t){return aa.get(`${e.prefix}${t}`)}removeItem(t){aa.erase(`${e.prefix}${t}`)}setItem(t,r,n){aa.set(`${e.prefix}${t}`,r,n)}};sa.prefix="coveo_";var Cp=class{constructor(){this.cookieStorage=new sa}getItem(t){return localStorage.getItem(t)||this.cookieStorage.getItem(t)}removeItem(t){this.cookieStorage.removeItem(t),localStorage.removeItem(t)}setItem(t,r){localStorage.setItem(t,r),this.cookieStorage.setItem(t,r,31556926e3)}},Ao=class{getItem(t){return null}removeItem(t){}setItem(t,r){}},oa="__coveo.analytics.history",hh=20,yh=1e3*60,Sh=75,xo=class{constructor(t){this.store=t||sI()}addElement(t){t.internalTime=new Date().getTime(),t=this.cropQueryElement(this.stripEmptyQuery(t));let r=this.getHistoryWithInternalTime();r!=null?this.isValidEntry(t)&&this.setHistory([t].concat(r)):this.setHistory([t])}addElementAsync(t){return I(this,void 0,void 0,function*(){t.internalTime=new Date().getTime(),t=this.cropQueryElement(this.stripEmptyQuery(t));let r=yield this.getHistoryWithInternalTimeAsync();r!=null?this.isValidEntry(t)&&this.setHistory([t].concat(r)):this.setHistory([t])})}getHistory(){let t=this.getHistoryWithInternalTime();return this.stripEmptyQueries(this.stripInternalTime(t))}getHistoryAsync(){return I(this,void 0,void 0,function*(){let t=yield this.getHistoryWithInternalTimeAsync();return this.stripEmptyQueries(this.stripInternalTime(t))})}getHistoryWithInternalTime(){try{let t=this.store.getItem(oa);return t&&typeof t=="string"?JSON.parse(t):[]}catch{return[]}}getHistoryWithInternalTimeAsync(){return I(this,void 0,void 0,function*(){try{let t=yield this.store.getItem(oa);return t?JSON.parse(t):[]}catch{return[]}})}setHistory(t){try{this.store.setItem(oa,JSON.stringify(t.slice(0,hh)))}catch{}}clear(){try{this.store.removeItem(oa)}catch{}}getMostRecentElement(){let t=this.getHistoryWithInternalTime();return Array.isArray(t)?t.sort((n,o)=>(o.internalTime||0)-(n.internalTime||0))[0]:null}cropQueryElement(t){return t.name&&t.value&&t.name.toLowerCase()==="query"&&(t.value=t.value.slice(0,Sh)),t}isValidEntry(t){let r=this.getMostRecentElement();return r&&r.value==t.value?(t.internalTime||0)-(r.internalTime||0)>yh:!0}stripInternalTime(t){return Array.isArray(t)?t.map(r=>{let{name:n,time:o,value:i}=r;return{name:n,time:o,value:i}}):[]}stripEmptyQuery(t){let{name:r,time:n,value:o}=t;return r&&typeof o=="string"&&r.toLowerCase()==="query"&&o.trim()===""?{name:r,time:n}:t}stripEmptyQueries(t){return t.map(r=>this.stripEmptyQuery(r))}},Ch=Object.freeze({__proto__:null,HistoryStore:xo,MAX_NUMBER_OF_HISTORY_ELEMENTS:hh,MAX_VALUE_SIZE:Sh,MIN_THRESHOLD_FOR_DUPLICATE_VALUE:yh,STORE_KEY:oa,default:xo}),cI=(e,t)=>I(void 0,void 0,void 0,function*(){return e===Z.view?(yield uI(t.contentIdValue),Object.assign({location:window.location.toString(),referrer:document.referrer,title:document.title},t)):t}),uI=e=>I(void 0,void 0,void 0,function*(){let t=new xo,r={name:"PageView",value:e,time:new Date().toISOString()};yield t.addElementAsync(r)}),Ds,lI=new Uint8Array(16);function dI(){if(!Ds&&(Ds=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Ds))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Ds(lI)}var pI=/^(?:[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 Ms(e){return typeof e=="string"&&pI.test(e)}var Ue=[];for(let e=0;e<256;++e)Ue.push((e+256).toString(16).slice(1));function Ah(e,t=0){return(Ue[e[t+0]]+Ue[e[t+1]]+Ue[e[t+2]]+Ue[e[t+3]]+"-"+Ue[e[t+4]]+Ue[e[t+5]]+"-"+Ue[e[t+6]]+Ue[e[t+7]]+"-"+Ue[e[t+8]]+Ue[e[t+9]]+"-"+Ue[e[t+10]]+Ue[e[t+11]]+Ue[e[t+12]]+Ue[e[t+13]]+Ue[e[t+14]]+Ue[e[t+15]]).toLowerCase()}function mI(e){if(!Ms(e))throw TypeError("Invalid UUID");let t,r=new Uint8Array(16);return r[0]=(t=parseInt(e.slice(0,8),16))>>>24,r[1]=t>>>16&255,r[2]=t>>>8&255,r[3]=t&255,r[4]=(t=parseInt(e.slice(9,13),16))>>>8,r[5]=t&255,r[6]=(t=parseInt(e.slice(14,18),16))>>>8,r[7]=t&255,r[8]=(t=parseInt(e.slice(19,23),16))>>>8,r[9]=t&255,r[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,r[11]=t/4294967296&255,r[12]=t>>>24&255,r[13]=t>>>16&255,r[14]=t>>>8&255,r[15]=t&255,r}function gI(e){e=unescape(encodeURIComponent(e));let t=[];for(let r=0;r<e.length;++r)t.push(e.charCodeAt(r));return t}var fI="6ba7b810-9dad-11d1-80b4-00c04fd430c8",hI="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function yI(e,t,r){function n(o,i,a,s){var u;if(typeof o=="string"&&(o=gI(o)),typeof i=="string"&&(i=mI(i)),((u=i)===null||u===void 0?void 0:u.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let c=new Uint8Array(16+o.length);if(c.set(i),c.set(o,i.length),c=r(c),c[6]=c[6]&15|t,c[8]=c[8]&63|128,a){s=s||0;for(let l=0;l<16;++l)a[s+l]=c[l];return a}return Ah(c)}try{n.name=e}catch{}return n.DNS=fI,n.URL=hI,n}var SI=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),oh={randomUUID:SI};function $n(e,t,r){if(oh.randomUUID&&!t&&!e)return oh.randomUUID();e=e||{};let n=e.random||(e.rng||dI)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,t){r=r||0;for(let o=0;o<16;++o)t[r+o]=n[o];return t}return Ah(n)}function CI(e,t,r,n){switch(e){case 0:return t&r^~t&n;case 1:return t^r^n;case 2:return t&r^t&n^r&n;case 3:return t^r^n}}function fp(e,t){return e<<t|e>>>32-t}function AI(e){let t=[1518500249,1859775393,2400959708,3395469782],r=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof e=="string"){let a=unescape(encodeURIComponent(e));e=[];for(let s=0;s<a.length;++s)e.push(a.charCodeAt(s))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);let n=e.length/4+2,o=Math.ceil(n/16),i=new Array(o);for(let a=0;a<o;++a){let s=new Uint32Array(16);for(let u=0;u<16;++u)s[u]=e[a*64+u*4]<<24|e[a*64+u*4+1]<<16|e[a*64+u*4+2]<<8|e[a*64+u*4+3];i[a]=s}i[o-1][14]=(e.length-1)*8/Math.pow(2,32),i[o-1][14]=Math.floor(i[o-1][14]),i[o-1][15]=(e.length-1)*8&4294967295;for(let a=0;a<o;++a){let s=new Uint32Array(80);for(let d=0;d<16;++d)s[d]=i[a][d];for(let d=16;d<80;++d)s[d]=fp(s[d-3]^s[d-8]^s[d-14]^s[d-16],1);let u=r[0],c=r[1],l=r[2],m=r[3],p=r[4];for(let d=0;d<80;++d){let g=Math.floor(d/20),h=fp(u,5)+CI(g,c,l,m)+p+t[g]+s[d]>>>0;p=m,m=l,l=fp(c,30)>>>0,c=u,u=h}r[0]=r[0]+u>>>0,r[1]=r[1]+c>>>0,r[2]=r[2]+l>>>0,r[3]=r[3]+m>>>0,r[4]=r[4]+p>>>0}return[r[0]>>24&255,r[0]>>16&255,r[0]>>8&255,r[0]&255,r[1]>>24&255,r[1]>>16&255,r[1]>>8&255,r[1]&255,r[2]>>24&255,r[2]>>16&255,r[2]>>8&255,r[2]&255,r[3]>>24&255,r[3]>>16&255,r[3]>>8&255,r[3]&255,r[4]>>24&255,r[4]>>16&255,r[4]>>8&255,r[4]&255]}var xI=yI("v5",80,AI),ih=xI,xh="2.30.42",ah=e=>`${e.protocol}//${e.hostname}${e.pathname.indexOf("/")===0?e.pathname:`/${e.pathname}`}${e.search}`,ia={pageview:"pageview",event:"event"},Ns=class{constructor({client:t,uuidGenerator:r=$n}){this.client=t,this.uuidGenerator=r}},Ap=class extends Ns{constructor({client:t,uuidGenerator:r=$n}){super({client:t,uuidGenerator:r}),this.actionData={},this.pageViewId=r(),this.nextPageViewId=this.pageViewId,this.currentLocation=ah(window.location),this.lastReferrer=So()?document.referrer:"",this.addHooks()}getApi(t){switch(t){case"setAction":return this.setAction;default:return null}}setAction(t,r){this.action=t,this.actionData=r}clearData(){this.clearPluginData(),this.action=void 0,this.actionData={}}getLocationInformation(t,r){return Object.assign({hitType:t},this.getNextValues(t,r))}updateLocationInformation(t,r){this.updateLocationForNextPageView(t,r)}getDefaultContextInformation(t){let r={title:So()?document.title:"",encoding:So()?document.characterSet:"UTF-8"},n={screenResolution:`${screen.width}x${screen.height}`,screenColor:`${screen.colorDepth}-bit`},o={language:navigator.language,userAgent:navigator.userAgent},i={time:Date.now(),eventId:this.uuidGenerator()};return Object.assign(Object.assign(Object.assign(Object.assign({},i),n),o),r)}updateLocationForNextPageView(t,r){let{pageViewId:n,referrer:o,location:i}=this.getNextValues(t,r);this.lastReferrer=o,this.pageViewId=n,this.currentLocation=i,t===ia.pageview&&(this.nextPageViewId=this.uuidGenerator(),this.hasSentFirstPageView=!0)}getNextValues(t,r){return{pageViewId:t===ia.pageview?this.nextPageViewId:this.pageViewId,referrer:t===ia.pageview&&this.hasSentFirstPageView?this.currentLocation:this.lastReferrer,location:t===ia.pageview?this.getCurrentLocationFromPayload(r):this.currentLocation}}getCurrentLocationFromPayload(t){if(t.page){let r=o=>o.replace(/^\/?(.*)$/,"/$1");return`${(o=>o.split("/").slice(0,3).join("/"))(this.currentLocation)}${r(t.page)}`}else return ah(window.location)}},$r=class e{constructor(t,r){if(!Ms(t))throw Error("Not a valid uuid");this.clientId=t,this.creationDate=Math.floor(r/1e3)}toString(){return this.clientId.replace(/-/g,"")+"."+this.creationDate.toString()}get expired(){let t=Math.floor(Date.now()/1e3)-this.creationDate;return t<0||t>e.expirationTime}validate(t,r){return!this.expired&&this.matchReferrer(t,r)}matchReferrer(t,r){try{let n=new URL(t);return r.some(o=>new RegExp(o.replace(/\\/g,"\\\\").replace(/\./g,"\\.").replace(/\*/g,".*")+"$").test(n.host))}catch{return!1}}static fromString(t){let r=t.split(".");if(r.length!==2)return null;let[n,o]=r;if(n.length!==32||isNaN(parseInt(o)))return null;let i=n.substring(0,8)+"-"+n.substring(8,12)+"-"+n.substring(12,16)+"-"+n.substring(16,20)+"-"+n.substring(20,32);return Ms(i)?new e(i,Number.parseInt(o)*1e3):null}};$r.cvo_cid="cvo_cid";$r.expirationTime=120;var xp=class extends Ns{constructor({client:t,uuidGenerator:r=$n}){super({client:t,uuidGenerator:r})}getApi(t){switch(t){case"decorate":return this.decorate;case"acceptFrom":return this.acceptFrom;default:return null}}decorate(t){return I(this,void 0,void 0,function*(){if(!this.client.getCurrentVisitorId)throw new Error("Could not retrieve current clientId");try{let r=new URL(t),n=yield this.client.getCurrentVisitorId();return r.searchParams.set($r.cvo_cid,new $r(n,Date.now()).toString()),r.toString()}catch{throw new Error("Invalid URL provided")}})}acceptFrom(t){this.client.setAcceptedLinkReferrers(t)}};xp.Id="link";var xt=Object.keys;function Vs(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}var hp=128,Rh=192,sh=224,ch=240;function RI(e){return(e&248)===ch?4:(e&ch)===sh?3:(e&sh)===Rh?2:1}function FI(e,t){if(t<0||e.length<=t)return e;let r=e.indexOf("%",t-2);for(r<0||r>t?r=t:t=r;r>2&&e.charAt(r-3)=="%";){let n=Number.parseInt(e.substring(r-2,r),16);if((n&hp)!=hp)break;if(r-=3,(n&Rh)!=hp){t-r>=RI(n)*3&&(r=t);break}}return e.substring(0,r)}var Rp={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"},bI=xt(Rp).map(e=>Rp[e]),vI=[...bI].join("|"),II=new RegExp(`^(${vI}$)`),wI={svcAction:"svc_action",svcActionData:"svc_action_data"},PI=e=>xt(e).filter(t=>e[t]!==void 0).reduce((t,r)=>{let n=Rp[r]||r;return Object.assign(Object.assign({},t),{[n]:e[r]})},{}),EI=e=>II.test(e),TI=[EI],uh={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",price:"pr",quantity:"qt",coupon:"cc",position:"ps",group:"group"},lh={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",position:"ps",price:"pr",group:"group"},je={action:"pa",list:"pal",listSource:"pls"},Qs={id:"ti",revenue:"tr",tax:"tt",shipping:"ts",coupon:"tcc",affiliation:"ta",step:"cos",option:"col"},kI=["loyaltyCardId","loyaltyTier","thirdPartyPersona","companyName","favoriteStore","storeName","userIndustry","userRole","userDepartment","businessUnit"],Fp={id:"quoteId",affiliation:"quoteAffiliation"},bp={id:"reviewId",rating:"reviewRating",comment:"reviewComment"},qI={add:je,bookmark_add:je,bookmark_remove:je,click:je,checkout:je,checkout_option:je,detail:je,impression:je,remove:je,refund:Object.assign(Object.assign({},je),Qs),purchase:Object.assign(Object.assign({},je),Qs),quickview:je,quote:Object.assign(Object.assign({},je),Fp),review:Object.assign(Object.assign({},je),bp)},OI=xt(uh).map(e=>uh[e]),DI=xt(lh).map(e=>lh[e]),VI=xt(je).map(e=>je[e]),MI=xt(Qs).map(e=>Qs[e]),NI=xt(bp).map(e=>bp[e]),QI=xt(Fp).map(e=>Fp[e]),LI=[...OI,"custom"].join("|"),UI=[...DI,"custom"].join("|"),Fh="(pr[0-9]+)",bh="(il[0-9]+pi[0-9]+)",BI=new RegExp(`^${Fh}(${LI})$`),_I=new RegExp(`^(${bh}(${UI}))|(il[0-9]+nm)$`),jI=new RegExp(`^(${VI.join("|")})$`),$I=new RegExp(`^(${MI.join("|")})$`),GI=new RegExp(`^${Fh}custom$`),zI=new RegExp(`^${bh}custom$`),HI=new RegExp(`^(${[...kI,...NI,...QI].join("|")})$`),WI=e=>BI.test(e),YI=e=>_I.test(e),KI=e=>jI.test(e),JI=e=>$I.test(e),XI=e=>HI.test(e),ZI=[YI,WI,KI,JI,XI],ew=[GI,zI],tw={anonymizeIp:"aip"},rw={eventCategory:"ec",eventAction:"ea",eventLabel:"el",eventValue:"ev",page:"dp",visitorId:"cid",clientId:"cid",userId:"uid",currencyCode:"cu"},nw={hitType:"t",pageViewId:"pid",encoding:"de",location:"dl",referrer:"dr",screenColor:"sd",screenResolution:"sr",title:"dt",userAgent:"ua",language:"ul",eventId:"z",time:"tm"},ow=["contentId","contentIdKey","contentType","searchHub","tab","searchUid","permanentId","contentLocale","trackingId"],iw=Object.assign(Object.assign(Object.assign(Object.assign({},tw),rw),nw),ow.reduce((e,t)=>Object.assign(Object.assign({},e),{[t]:t}),{})),vp=Object.assign(Object.assign({},iw),wI),aw=e=>{let t=!!e.action&&qI[e.action]||{};return xt(e).reduce((r,n)=>{let o=t[n]||vp[n]||n;return Object.assign(Object.assign({},r),{[o]:e[n]})},{})},sw=xt(vp).map(e=>vp[e]),cw=e=>sw.indexOf(e)!==-1,uw=e=>e==="custom",lw=e=>[...ZI,...TI,cw,uw].some(t=>t(e)),dw=e=>xt(e).reduce((t,r)=>{let n=pw(r);return n?Object.assign(Object.assign({},t),mw(n,e[r])):Object.assign(Object.assign({},t),{[r]:e[r]})},{}),pw=e=>{let t;return[...ew].every(r=>{var n;return t=(n=r.exec(e))===null||n===void 0?void 0:n[1],!t}),t},mw=(e,t)=>xt(t).reduce((r,n)=>Object.assign(Object.assign({},r),{[`${e}${n}`]:t[n]}),{}),Ip=class{constructor(t){this.opts=t}sendEvent(t,r){return I(this,void 0,void 0,function*(){if(!this.isAvailable())throw new Error('navigator.sendBeacon is not supported in this browser. Consider adding a polyfill like "sendbeacon-polyfill".');let{baseUrl:n,preprocessRequest:o}=this.opts,i=yield this.getQueryParamsForEventType(t),{url:a,payload:s}=yield this.preProcessRequestAsPotentialJSONString(`${n}/analytics/${t}?${i}`,r,o),u=this.encodeForEventType(t,s),c=new Blob([u],{type:"application/x-www-form-urlencoded"});navigator.sendBeacon(a,c)})}isAvailable(){return"sendBeacon"in navigator}deleteHttpCookieVisitorId(){return Promise.resolve()}preProcessRequestAsPotentialJSONString(t,r,n){return I(this,void 0,void 0,function*(){let o=t,i=r;if(n){let a=yield n({url:t,body:JSON.stringify(r)},"analyticsBeacon"),{url:s,body:u}=a;o=s||t;try{i=JSON.parse(u)}catch(c){console.error("Unable to process the request body as a JSON string",c)}}return{payload:i,url:o}})}encodeForEventType(t,r){return this.isEventTypeLegacy(t)?this.encodeEventToJson(t,r):this.encodeEventToJson(t,r,this.opts.token)}getQueryParamsForEventType(t){return I(this,void 0,void 0,function*(){let{token:r,visitorIdProvider:n}=this.opts,o=yield n.getCurrentVisitorId();return[r&&this.isEventTypeLegacy(t)?`access_token=${r}`:"",o?`visitorId=${o}`:"","discardVisitInfo=true"].filter(i=>!!i).join("&")})}isEventTypeLegacy(t){return[Z.click,Z.custom,Z.search,Z.view].indexOf(t)!==-1}encodeEventToJson(t,r,n){let o=`${t}Event=${encodeURIComponent(JSON.stringify(r))}`;return n&&(o=`access_token=${encodeURIComponent(n)}&${o}`),o}},wp=class{sendEvent(t,r){return I(this,void 0,void 0,function*(){return Promise.resolve()})}deleteHttpCookieVisitorId(){return I(this,void 0,void 0,function*(){return Promise.resolve()})}},dh=globalThis.fetch,Ls=class{constructor(t){this.opts=t}sendEvent(t,r){return I(this,void 0,void 0,function*(){let{baseUrl:n,visitorIdProvider:o,preprocessRequest:i}=this.opts,a=this.shouldAppendVisitorId(t)?yield this.getVisitorIdParam():"",s={url:`${n}/analytics/${t}${a}`,credentials:"include",mode:"cors",headers:this.getHeaders(),method:"POST",body:JSON.stringify(r)},u=Object.assign(Object.assign({},s),i?yield i(s,"analyticsFetch"):{}),{url:c}=u,l=Zt(u,["url"]),m;try{m=yield dh(c,l)}catch(p){console.error("An error has occured when sending the event.",p);return}if(m.ok){let p=yield m.json();return p.visitorId&&o.setCurrentVisitorId(p.visitorId),p}else{try{m.json()}catch{}throw console.error(`An error has occured when sending the "${t}" event.`,m,r),new Error(`An error has occurred when sending the "${t}" event. Check the console logs for more details.`)}})}deleteHttpCookieVisitorId(){return I(this,void 0,void 0,function*(){let{baseUrl:t}=this.opts,r=`${t}/analytics/visit`;yield dh(r,{headers:this.getHeaders(),method:"DELETE"})})}shouldAppendVisitorId(t){return[Z.click,Z.custom,Z.search,Z.view].indexOf(t)!==-1}getVisitorIdParam(){return I(this,void 0,void 0,function*(){let{visitorIdProvider:t}=this.opts,r=yield t.getCurrentVisitorId();return r?`?visitor=${r}`:""})}getHeaders(){let{token:t}=this.opts;return Object.assign(Object.assign({},t?{Authorization:`Bearer ${t}`}:{}),{"Content-Type":"application/json"})}},Pp=class{constructor(t,r){Sp()&&fh()?this.storage=new Cp:Sp()?this.storage=localStorage:(console.warn("BrowserRuntime detected no valid storage available.",this),this.storage=new Ao),this.client=new Ls(t),this.beaconClient=new Ip(t),window.addEventListener("beforeunload",()=>{let n=r();for(let{eventType:o,payload:i}of n)this.beaconClient.sendEvent(o,i)})}getClientDependingOnEventType(t){return t==="click"&&this.beaconClient.isAvailable()?this.beaconClient:this.client}},Ep=class{constructor(t,r){this.storage=r||new Ao,this.client=new Ls(t)}getClientDependingOnEventType(t){return this.client}},Us=class{constructor(){this.storage=new Ao,this.client=new wp}getClientDependingOnEventType(t){return this.client}},gw="xx",fw=e=>e?.startsWith(gw)||!1,hw=`
19
+ `+l:l;break;case"event":n.event=l;break;case"id":e(n.id=l);break;case"retry":let m=parseInt(l,10);isNaN(m)||t(n.retry=m);break}}}}function tb(e,t){let r=new Uint8Array(e.length+t.length);return r.set(e),r.set(t,e.length),r}function Ug(){return{data:"",event:"",id:"",retry:void 0}}var rb=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r},gs="text/event-stream",nb=1e3,$g="last-event-id";function Gg(){typeof window<"u"}function _i(e,t){var{signal:r,headers:n,onopen:o,onmessage:i,onclose:a,onerror:s,openWhenHidden:u,fetch:c}=t,l=rb(t,["signal","headers","onopen","onmessage","onclose","onerror","openWhenHidden","fetch"]);return new Promise((m,p)=>{let d=Object.assign({},n);d.accept||(d.accept=gs);let g;function h(){g?.abort(),document.hidden||E()}!u&&Gg()&&document.addEventListener("visibilitychange",h);let y=nb,C=0;function f(){Gg()&&document.removeEventListener("visibilitychange",h),clearTimeout(C),g?.abort()}r?.addEventListener("abort",()=>{f(),m()});let A=c??A,b=o??ob;async function E(){var v;g=typeof AbortController>"u"?null:new AbortController;try{let F=await A(e,Object.assign(Object.assign({},l),{headers:d,signal:g?.signal}));await b(F),await Bg(F.body,_g(jg(P=>{P?d[$g]=P:delete d[$g]},P=>{y=P},i))),a?.(),f(),m()}catch(F){if(!g?.signal.aborted)try{let P=(v=s?.(F))!==null&&v!==void 0?v:y;clearTimeout(C),C=setTimeout(E,P)}catch(P){f(),p(P)}}}E()})}function ob(e){let t=e.headers.get("content-type");if(!t?.startsWith(gs))throw new Error(`Expected content-type to be ${gs}, Actual: ${t}`)}var Br=class{constructor(t){be(this,"_basePath");be(this,"_params",{});this._basePath=t}addParam(t,r){this._params={...this.params,[t]:r}}get basePath(){return this._basePath}get params(){return this._params}get hasParams(){return Object.entries(this._params).length}get href(){return this.hasParams?`${this.basePath}?${Object.entries(this.params).map(([t,r])=>`${t}=${encodeURIComponent(r)}`).join("&")}`:this.basePath}};var ib=(e,t,r)=>new Br(`${e}/rest/organizations/${t}/machinelearning/streaming/${r}`).href,zg=3,ab=5e3,sb="text/event-stream",Nd=1,Vd=class extends Error{},ji=class extends Error{constructor(r){super(r.message);this.payload=r}},Md=class{constructor(){be(this,"timeouts",new Set)}add(t){this.timeouts.add(t)}remove(t){clearTimeout(t),this.timeouts.delete(t)}isActive(t){return this.timeouts.has(t)}},fs=class{constructor(t){be(this,"logger");this.logger=t.logger}streamGeneratedAnswer(t,r){let{url:n,organizationId:o,streamId:i,accessToken:a}=t,{write:s,abort:u,close:c,resetAnswer:l}=r,m=new Md;if(!i){this.logger.error("No stream ID found");return}let p=0,d,g=()=>{d&&!m.isActive(d)&&(y?.abort(),l(),C())},h=()=>{m.remove(d),d=Qg(g,d,ab),m.add(d)},y=new AbortController,C=()=>_i(ib(n,o,i),{method:"GET",fetch,headers:{Authorization:`Bearer ${a}`,accept:"*/*"},openWhenHidden:!0,signal:y?.signal,async onopen(f){if(f.ok&&f.headers.get("content-type")===sb)return;throw f.status>=400&&f.status<500&&f.status!==429?new ji({message:"Error opening stream",code:f.status}):new Vd},onmessage:f=>{if(y?.signal.aborted)return;let A=JSON.parse(f.data);if(A.finishReason==="ERROR"){m.remove(d),y?.abort(),u({message:A.errorMessage,code:A.statusCode});return}s(A),p=0,A.finishReason==="COMPLETED"?(m.remove(d),c()):h()},onerror:f=>{if(!y?.signal.aborted){if(m.remove(d),f instanceof ji)throw y?.abort(),u(f),f;if(++p>zg){this.logger.info("Maximum retry exceeded.");let A={message:"Failed to complete stream.",code:Nd};throw y?.abort(),u(A),new ji(A)}this.logger.info(`Retrying...(${p}/${zg})`),l()}}});return C(),y}};var hs=e=>e;var of=Wt(ef(),1);var Ob="recommendation-internal-options",zD=Symbol.for(Ob);var B=new Error("Failed to load reducers."),co=class extends Error{constructor(){super(),this.name="ExpiredToken",this.message="The token being used to perform the request is expired."}};var Mn=class extends Error{constructor(r,n){super();be(this,"statusCode");this.name="Disconnected",this.message=`Client could not connect to the following URL: ${r}`,this.statusCode=n??0}};function tf(e){let t=[];for(let r in e){let n=encodeURIComponent(r),o=encodeURIComponent(e[r]);t.push(`${n}=${o}`)}return t.join("&")}function rf(e){return typeof e!="object"||!e?!1:Object.values(e).every(Db)}function Db(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"}function nf(e){return e===429}var kt=class e{static async call(t){let r=Vb(t),{logger:n}=t,o=await e.preprocessRequest(r,t);n.info(o,"Platform request");let{url:i,...a}=o,s=async()=>{let u=await fetch(i,a);if(nf(u.status))throw u;return u};try{let u=await(0,of.backOff)(s,{retry:c=>{let l=c&&nf(c.status);return l&&n.info("Platform retrying request"),l}});switch(u.status){case 419:case 401:throw n.info("Platform renewing token"),new co;case 404:throw new Mn(i,u.status);default:return n.info({response:u,requestInfo:o},"Platform response"),u}}catch(u){return u.message==="Failed to fetch"?new Mn(i):u}}static async preprocessRequest(t,r){let{origin:n,preprocessRequest:o,logger:i,requestMetadata:a}=r,{signal:s,...u}=t,c=Bi(u);try{let l=await o(t,n,a);return{...t,...l}}catch(l){i.error(l,"Platform request preprocessing failed. Returning default request options.")}return c}};function de(e,t="prod",r="platform"){let n=t==="prod"?"":t,o=r==="platform"?"":`.${r}`;return`https://${e}${o}.org${n}.coveo.com`}function et(e,t="prod"){return`${de(e,t)}/rest/search/v2`}function Ss(e,t="prod"){return`${de(e,t,"analytics")}/rest/organizations/${e}/events/v1`}function Vb(e){let{url:t,method:r,requestParams:n,contentType:o,accessToken:i,signal:a}=e,s=e.method==="POST"||e.method==="PUT",u=Mb(n,o);return{url:t,method:r,headers:{"Content-Type":o,Authorization:`Bearer ${i}`,...e.headers},...s&&{body:u},signal:a}}function Mb(e,t){return t==="application/x-www-form-urlencoded"?rf(e)?tf(e):"":JSON.stringify(e)}function zi(e){let{url:t,accessToken:r,organizationId:n,authentication:o,...i}=e;return i}var zd=e=>{let{response:t}=e;return t.body?Nb(e):Qb(t)},Nb=e=>Ub(e)?Bb(e):Lb(e)?e.body:{message:"unknown",statusCode:0,type:"unknown"},Qb=e=>{let t=JSON.parse(JSON.stringify(e,Object.getOwnPropertyNames(e)));return{...t,message:`Client side error: ${t.message||""}`,statusCode:400,type:"ClientError"}};function Lb(e){return e.body.statusCode!==void 0}function Ub(e){return e.body.exception!==void 0}var Bb=e=>({message:e.body.exception.code,statusCode:e.response.status,type:e.body.exception.code});function af(e){return((e.headers.get("content-type")||"").split(";").find(n=>n.indexOf("charset=")!==-1)||"").split("=")[1]||"UTF-8"}var Hd=(e,t,r,n)=>{let o=new Br(`${e.url}${n}`);return o.addParam("organizationId",e.organizationId),e.authentication&&o.addParam("authentication",e.authentication),{accessToken:e.accessToken,method:t,contentType:r,url:o.href,origin:"searchApiFetch"}};var sf=(e,t)=>{let r=new Br(`${e.url}${t}`);return r.addParam("access_token",e.accessToken),r.addParam("organizationId",e.organizationId),r.addParam("uniqueId",e.uniqueId),e.q!==void 0&&r.addParam("q",e.q),e.enableNavigation!==void 0&&r.addParam("enableNavigation",`${e.enableNavigation}`),e.requestedOutputSize!==void 0&&r.addParam("requestedOutputSize",`${e.requestedOutputSize}`),r.href},Wd=async(e,t)=>{let r=await kt.call({...Hd(e,"POST","application/x-www-form-urlencoded","/html"),requestParams:zi(e),requestMetadata:{method:"html"},...t});if(r instanceof Error)throw r;let n=af(r),o=await r.arrayBuffer(),a=new TextDecoder(n).decode(o);return _b(a)?{success:a}:{error:zd({response:r,body:a})}};function _b(e){return typeof e=="string"}var cf=require("@coveo/bueno");function uo(){return{answerSnippet:"",documentId:{contentIdKey:"",contentIdValue:""},question:"",relatedQuestions:[],score:0}}function ke(){return{response:{results:[],searchUid:"",totalCountFiltered:0,facets:[],generateAutomaticFacets:{facets:[]},queryCorrections:[],triggers:[],questionAnswer:uo(),pipeline:"",splitTestRun:"",termsToHighlight:{},phrasesToHighlight:{},extendedResults:{}},duration:0,queryExecuted:"",error:null,automaticallyCorrected:!1,isLoading:!1,results:[],searchResponseId:"",requestId:"",questionAnswer:uo(),extendedResults:{}}}function jb(e){return{statusCode:e.statusCode,type:e.name,message:e.message}}function $b(e){return{statusCode:e.code,type:e.name,message:e.message,ignored:!0}}function Nn(e,t){if(t&&e.name==="AbortError")return{error:$b(e)};if(e instanceof Mn)return{error:jb(e)};throw e}var _r=e=>e.success!==void 0,ie=e=>e.error!==void 0;function uf(e){return e.results!==void 0}function lf(e){let t=uo();return(0,cf.isNullOrUndefined)(e.questionAnswer)?(e.questionAnswer=t,e):(e.questionAnswer={...t,...e.questionAnswer},e)}var Yd=(e,t)=>`${e.url}/rest/organizations/${e.organizationId}/insight/v1/configs/${e.insightId}${t??""}`,Gb=e=>`${e.url}/rest/organizations/${e.organizationId}/machinelearning/user/actions`,Hi=(e,t,r,n)=>{zb(e);let o=Yd(e,n);return{accessToken:e.accessToken,method:t,contentType:r,url:o,origin:"insightApiFetch"}},df=(e,t,r)=>{Hb(e);let n=Gb(e);return{accessToken:e.accessToken,method:t,contentType:r,url:n,origin:"insightApiFetch"}},Kd=e=>{let{insightId:t,...r}=zi(e);return r},pf=e=>{if(!e.url)throw new Error("The 'url' attribute must contain a valid platform URL.");if(!e.organizationId)throw new Error("The 'organizationId' attribute must contain a valid organization ID.");if(!e.accessToken)throw new Error("The 'accessToken' attribute must contain a valid platform access token.")},zb=e=>{if(pf(e),!e.insightId)throw new Error("The 'insightId' attribute must contain a valid Insight Panel configuration ID.")},Hb=e=>{if(pf(e),!e.userId)throw new Error("The 'userId' attribute must contain a valid user ID.")};var mf=e=>({...Hi(e,"GET","application/json","/interface"),requestParams:{}});var gf=e=>({...Hi(e,"POST","application/json","/search"),requestParams:Kd(e)}),ff=e=>({...Hi(e,"POST","application/json","/querysuggest"),requestParams:Kd(e)});var hf=e=>({...df(e,"POST","application/json"),requestParams:{objectId:e.userId}});var Cs=class{constructor(t){this.options=t}async getInterface(t){let r=await kt.call({...mf(t),...this.options});if(r instanceof Error)return Nn(r);let n=await r.json();return r.ok?{success:n}:{error:n}}async query(t,r){let n=await kt.call({...gf(t),requestMetadata:{method:"search",origin:r?.origin},...this.options});if(n instanceof Error)return Nn(n);let o=await n.json();return uf(o)&&(o=lf(o)),n.ok?{success:o}:{error:o}}async querySuggest(t){let r=await kt.call({...ff(t),...this.options});if(r instanceof Error)return Nn(r);let n=await r.json();return n.completions?{success:n}:{error:n}}async userActions(t){let r=await kt.call({...hf(t),...this.options});if(r instanceof Error)return Nn(r);let n=await r.json();return r.ok?{success:n}:{error:n}}async html(t){return Wd(t,{...this.options})}};var tt=require("@coveo/bueno"),q=new tt.StringValue({required:!0,emptyAllowed:!1}),te=new tt.StringValue({required:!1,emptyAllowed:!1}),ae=new tt.StringValue({required:!0,emptyAllowed:!0}),yf=new tt.StringValue({required:!1,emptyAllowed:!0}),As=new tt.ArrayValue({each:q,required:!0}),Sf=new tt.StringValue({required:!1,emptyAllowed:!1,regex:/^\d+\.\d+\.\d+$/}),qt=({message:e,name:t,stack:r})=>({message:e,name:t,stack:r}),Ct=(e,t)=>{if("required"in t)return{payload:new tt.Schema({value:t}).validate({value:e}).value};let o=new tt.RecordValue({options:{required:!0},values:t}).validate(e);if(o)throw new tt.SchemaValidationError(o);return{payload:e}},x=(e,t)=>{try{return Ct(e,t)}catch(r){return{payload:e,error:qt(r)}}},Yt=(e,t,r,n)=>{let o=`Check the initialState of ${n}`;return Cf(e,t,r,o,"Controller initialization error")},qe=(e,t,r,n)=>{let o=`Check the options of ${n}`;return Cf(e,t,r,o,"Controller initialization error")},Cf=(e,t,r,n,o)=>{try{return t.validate(r,n)}catch(i){throw e.logger.error(i,o),i}};var gt=require("@coveo/bueno");function Qe(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 Wb=typeof Symbol=="function"&&Symbol.observable||"@@observable",Af=Wb,Jd=()=>Math.random().toString(36).substring(7).split("").join("."),Yb={INIT:`@@redux/INIT${Jd()}`,REPLACE:`@@redux/REPLACE${Jd()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Jd()}`},xs=Yb;function Kt(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function Xd(e,t,r){if(typeof e!="function")throw new Error(Qe(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(Qe(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(Qe(1));return r(Xd)(e,t)}let n=e,o=t,i=new Map,a=i,s=0,u=!1;function c(){a===i&&(a=new Map,i.forEach((y,C)=>{a.set(C,y)}))}function l(){if(u)throw new Error(Qe(3));return o}function m(y){if(typeof y!="function")throw new Error(Qe(4));if(u)throw new Error(Qe(5));let C=!0;c();let f=s++;return a.set(f,y),function(){if(C){if(u)throw new Error(Qe(6));C=!1,c(),a.delete(f),i=null}}}function p(y){if(!Kt(y))throw new Error(Qe(7));if(typeof y.type>"u")throw new Error(Qe(8));if(typeof y.type!="string")throw new Error(Qe(17));if(u)throw new Error(Qe(9));try{u=!0,o=n(o,y)}finally{u=!1}return(i=a).forEach(f=>{f()}),y}function d(y){if(typeof y!="function")throw new Error(Qe(10));n=y,p({type:xs.REPLACE})}function g(){let y=m;return{subscribe(C){if(typeof C!="object"||C===null)throw new Error(Qe(11));function f(){let b=C;b.next&&b.next(l())}return f(),{unsubscribe:y(f)}},[Af](){return this}}}return p({type:xs.INIT}),{dispatch:p,subscribe:m,getState:l,replaceReducer:d,[Af]:g}}function Kb(e){Object.keys(e).forEach(t=>{let r=e[t];if(typeof r(void 0,{type:xs.INIT})>"u")throw new Error(Qe(12));if(typeof r(void 0,{type:xs.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Qe(13))})}function lo(e){let t=Object.keys(e),r={};for(let a=0;a<t.length;a++){let s=t[a];typeof e[s]=="function"&&(r[s]=e[s])}let n=Object.keys(r),o,i;try{Kb(r)}catch(a){i=a}return function(s={},u){if(i)throw i;let c=!1,l={};for(let m=0;m<n.length;m++){let p=n[m],d=r[p],g=s[p],h=d(g,u);if(typeof h>"u"){let y=u&&u.type;throw new Error(Qe(14))}l[p]=h,c=c||h!==g}return c=c||n.length!==Object.keys(s).length,c?l:s}}function po(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function xf(...e){return t=>(r,n)=>{let o=t(r,n),i=()=>{throw new Error(Qe(15))},a={getState:o.getState,dispatch:(u,...c)=>i(u,...c)},s=e.map(u=>u(a));return i=po(...s)(o.dispatch),{...o,dispatch:i}}}function Rs(e){return Kt(e)&&"type"in e&&typeof e.type=="string"}var cp=Symbol.for("immer-nothing"),Wi=Symbol.for("immer-draftable"),rt=Symbol.for("immer-state");function Le(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Ln=Object.getPrototypeOf;function dt(e){return!!e&&!!e[rt]}function nt(e){return e?If(e)||Array.isArray(e)||!!e[Wi]||!!e.constructor?.[Wi]||Zi(e)||ea(e):!1}var Jb=Object.prototype.constructor.toString();function If(e){if(!e||typeof e!="object")return!1;let t=Ln(e);if(t===null)return!0;let r=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return r===Object?!0:typeof r=="function"&&Function.toString.call(r)===Jb}function up(e){return dt(e)||Le(15,e),e[rt].base_}function Yi(e,t){Un(e)===0?Reflect.ownKeys(e).forEach(r=>{t(r,e[r],e)}):e.forEach((r,n)=>t(n,r,e))}function Un(e){let t=e[rt];return t?t.type_:Array.isArray(e)?1:Zi(e)?2:ea(e)?3:0}function Ki(e,t){return Un(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Zd(e,t){return Un(e)===2?e.get(t):e[t]}function wf(e,t,r){let n=Un(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function Xb(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Zi(e){return e instanceof Map}function ea(e){return e instanceof Set}function Qn(e){return e.copy_||e.base_}function rp(e,t){if(Zi(e))return new Map(e);if(ea(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);let r=If(e);if(t===!0||t==="class_only"&&!r){let n=Object.getOwnPropertyDescriptors(e);delete n[rt];let o=Reflect.ownKeys(n);for(let i=0;i<o.length;i++){let a=o[i],s=n[a];s.writable===!1&&(s.writable=!0,s.configurable=!0),(s.get||s.set)&&(n[a]={configurable:!0,writable:!0,enumerable:s.enumerable,value:e[a]})}return Object.create(Ln(e),n)}else{let n=Ln(e);if(n!==null&&r)return{...e};let o=Object.create(n);return Object.assign(o,e)}}function vs(e,t=!1){return Is(e)||dt(e)||!nt(e)||(Un(e)>1&&(e.set=e.add=e.clear=e.delete=Zb),Object.freeze(e),t&&Object.entries(e).forEach(([r,n])=>vs(n,!0))),e}function Zb(){Le(2)}function Is(e){return Object.isFrozen(e)}var np={};function Bn(e){let t=np[e];return t||Le(0,e),t}function ev(e,t){np[e]||(np[e]=t)}var Ji;function Pf(){return Ji}function tv(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Rf(e,t){t&&(Bn("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function op(e){ip(e),e.drafts_.forEach(rv),e.drafts_=null}function ip(e){e===Ji&&(Ji=e.parent_)}function Ff(e){return Ji=tv(Ji,e)}function rv(e){let t=e[rt];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function bf(e,t){t.unfinalizedDrafts_=t.drafts_.length;let r=t.drafts_[0];return e!==void 0&&e!==r?(r[rt].modified_&&(op(t),Le(4)),nt(e)&&(e=Fs(t,e),t.parent_||bs(t,e)),t.patches_&&Bn("Patches").generateReplacementPatches_(r[rt].base_,e,t.patches_,t.inversePatches_)):e=Fs(t,r,[]),op(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==cp?e:void 0}function Fs(e,t,r){if(Is(t))return t;let n=t[rt];if(!n)return Yi(t,(o,i)=>vf(e,n,t,o,i,r)),t;if(n.scope_!==e)return t;if(!n.modified_)return bs(e,n.base_,!0),n.base_;if(!n.finalized_){n.finalized_=!0,n.scope_.unfinalizedDrafts_--;let o=n.copy_,i=o,a=!1;n.type_===3&&(i=new Set(o),o.clear(),a=!0),Yi(i,(s,u)=>vf(e,n,o,s,u,r,a)),bs(e,o,!1),r&&e.patches_&&Bn("Patches").generatePatches_(n,r,e.patches_,e.inversePatches_)}return n.copy_}function vf(e,t,r,n,o,i,a){if(dt(o)){let s=i&&t&&t.type_!==3&&!Ki(t.assigned_,n)?i.concat(n):void 0,u=Fs(e,o,s);if(wf(r,n,u),dt(u))e.canAutoFreeze_=!1;else return}else a&&r.add(o);if(nt(o)&&!Is(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Fs(e,o),(!t||!t.scope_.parent_)&&typeof n!="symbol"&&Object.prototype.propertyIsEnumerable.call(r,n)&&bs(e,o)}}function bs(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&vs(t,r)}function nv(e,t){let r=Array.isArray(e),n={type_:r?1:0,scope_:t?t.scope_:Pf(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1},o=n,i=lp;r&&(o=[n],i=Xi);let{revoke:a,proxy:s}=Proxy.revocable(o,i);return n.draft_=s,n.revoke_=a,s}var lp={get(e,t){if(t===rt)return e;let r=Qn(e);if(!Ki(r,t))return ov(e,r,t);let n=r[t];return e.finalized_||!nt(n)?n:n===ep(e.base_,t)?(tp(e),e.copy_[t]=sp(n,e)):n},has(e,t){return t in Qn(e)},ownKeys(e){return Reflect.ownKeys(Qn(e))},set(e,t,r){let n=Ef(Qn(e),t);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){let o=ep(Qn(e),t),i=o?.[rt];if(i&&i.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(Xb(r,o)&&(r!==void 0||Ki(e.base_,t)))return!0;tp(e),ap(e)}return e.copy_[t]===r&&(r!==void 0||t in e.copy_)||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_[t]=!0),!0},deleteProperty(e,t){return ep(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,tp(e),ap(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let r=Qn(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty(){Le(11)},getPrototypeOf(e){return Ln(e.base_)},setPrototypeOf(){Le(12)}},Xi={};Yi(lp,(e,t)=>{Xi[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});Xi.deleteProperty=function(e,t){return Xi.set.call(this,e,t,void 0)};Xi.set=function(e,t,r){return lp.set.call(this,e[0],t,r,e[0])};function ep(e,t){let r=e[rt];return(r?Qn(r):e)[t]}function ov(e,t,r){let n=Ef(t,r);return n?"value"in n?n.value:n.get?.call(e.draft_):void 0}function Ef(e,t){if(!(t in e))return;let r=Ln(e);for(;r;){let n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Ln(r)}}function ap(e){e.modified_||(e.modified_=!0,e.parent_&&ap(e.parent_))}function tp(e){e.copy_||(e.copy_=rp(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var iv=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,r,n)=>{if(typeof t=="function"&&typeof r!="function"){let i=r;r=t;let a=this;return function(u=i,...c){return a.produce(u,l=>r.call(this,l,...c))}}typeof r!="function"&&Le(6),n!==void 0&&typeof n!="function"&&Le(7);let o;if(nt(t)){let i=Ff(this),a=sp(t,void 0),s=!0;try{o=r(a),s=!1}finally{s?op(i):ip(i)}return Rf(i,n),bf(o,i)}else if(!t||typeof t!="object"){if(o=r(t),o===void 0&&(o=t),o===cp&&(o=void 0),this.autoFreeze_&&vs(o,!0),n){let i=[],a=[];Bn("Patches").generateReplacementPatches_(t,o,i,a),n(i,a)}return o}else Le(1,t)},this.produceWithPatches=(t,r)=>{if(typeof t=="function")return(a,...s)=>this.produceWithPatches(a,u=>t(u,...s));let n,o;return[this.produce(t,r,(a,s)=>{n=a,o=s}),n,o]},typeof e?.autoFreeze=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof e?.useStrictShallowCopy=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){nt(e)||Le(8),dt(e)&&(e=Tf(e));let t=Ff(this),r=sp(e,void 0);return r[rt].isManual_=!0,ip(t),r}finishDraft(e,t){let r=e&&e[rt];(!r||!r.isManual_)&&Le(9);let{scope_:n}=r;return Rf(n,t),bf(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){let o=t[r];if(o.path.length===0&&o.op==="replace"){e=o.value;break}}r>-1&&(t=t.slice(r+1));let n=Bn("Patches").applyPatches_;return dt(e)?n(e,t):this.produce(e,o=>n(o,t))}};function sp(e,t){let r=Zi(e)?Bn("MapSet").proxyMap_(e,t):ea(e)?Bn("MapSet").proxySet_(e,t):nv(e,t);return(t?t.scope_:Pf()).drafts_.push(r),r}function Tf(e){return dt(e)||Le(10,e),kf(e)}function kf(e){if(!nt(e)||Is(e))return e;let t=e[rt],r;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=rp(e,t.scope_.immer_.useStrictShallowCopy_)}else r=rp(e,!0);return Yi(r,(n,o)=>{wf(r,n,kf(o))}),t&&(t.finalized_=!1),r}function qf(){let t="replace",r="add",n="remove";function o(p,d,g,h){switch(p.type_){case 0:case 2:return a(p,d,g,h);case 1:return i(p,d,g,h);case 3:return s(p,d,g,h)}}function i(p,d,g,h){let{base_:y,assigned_:C}=p,f=p.copy_;f.length<y.length&&([y,f]=[f,y],[g,h]=[h,g]);for(let A=0;A<y.length;A++)if(C[A]&&f[A]!==y[A]){let b=d.concat([A]);g.push({op:t,path:b,value:m(f[A])}),h.push({op:t,path:b,value:m(y[A])})}for(let A=y.length;A<f.length;A++){let b=d.concat([A]);g.push({op:r,path:b,value:m(f[A])})}for(let A=f.length-1;y.length<=A;--A){let b=d.concat([A]);h.push({op:n,path:b})}}function a(p,d,g,h){let{base_:y,copy_:C}=p;Yi(p.assigned_,(f,A)=>{let b=Zd(y,f),E=Zd(C,f),v=A?Ki(y,f)?t:r:n;if(b===E&&v===t)return;let F=d.concat(f);g.push(v===n?{op:v,path:F}:{op:v,path:F,value:E}),h.push(v===r?{op:n,path:F}:v===n?{op:r,path:F,value:m(b)}:{op:t,path:F,value:m(b)})})}function s(p,d,g,h){let{base_:y,copy_:C}=p,f=0;y.forEach(A=>{if(!C.has(A)){let b=d.concat([f]);g.push({op:n,path:b,value:A}),h.unshift({op:r,path:b,value:A})}f++}),f=0,C.forEach(A=>{if(!y.has(A)){let b=d.concat([f]);g.push({op:r,path:b,value:A}),h.unshift({op:n,path:b,value:A})}f++})}function u(p,d,g,h){g.push({op:t,path:[],value:d===cp?void 0:d}),h.push({op:t,path:[],value:p})}function c(p,d){return d.forEach(g=>{let{path:h,op:y}=g,C=p;for(let E=0;E<h.length-1;E++){let v=Un(C),F=h[E];typeof F!="string"&&typeof F!="number"&&(F=""+F),(v===0||v===1)&&(F==="__proto__"||F==="constructor")&&Le(19),typeof C=="function"&&F==="prototype"&&Le(19),C=Zd(C,F),typeof C!="object"&&Le(18,h.join("/"))}let f=Un(C),A=l(g.value),b=h[h.length-1];switch(y){case t:switch(f){case 2:return C.set(b,A);case 3:Le(16);default:return C[b]=A}case r:switch(f){case 1:return b==="-"?C.push(A):C.splice(b,0,A);case 2:return C.set(b,A);case 3:return C.add(A);default:return C[b]=A}case n:switch(f){case 1:return C.splice(b,1);case 2:return C.delete(b);case 3:return C.delete(g.value);default:return delete C[b]}default:Le(17,y)}}),p}function l(p){if(!nt(p))return p;if(Array.isArray(p))return p.map(l);if(Zi(p))return new Map(Array.from(p.entries()).map(([g,h])=>[g,l(h)]));if(ea(p))return new Set(Array.from(p).map(l));let d=Object.create(Ln(p));for(let g in p)d[g]=l(p[g]);return Ki(p,Wi)&&(d[Wi]=p[Wi]),d}function m(p){return dt(p)?l(p):p}ev("Patches",{applyPatches_:c,generatePatches_:o,generateReplacementPatches_:u})}var pt=new iv,Er=pt.produce,ws=pt.produceWithPatches.bind(pt),nM=pt.setAutoFreeze.bind(pt),oM=pt.setUseStrictShallowCopy.bind(pt),dp=pt.applyPatches.bind(pt),iM=pt.createDraft.bind(pt),aM=pt.finishDraft.bind(pt);function av(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function sv(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function cv(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(r=>typeof r=="function")){let r=e.map(n=>typeof n=="function"?`function ${n.name||"unnamed"}()`:typeof n).join(", ");throw new TypeError(`${t}[${r}]`)}}var Of=e=>Array.isArray(e)?e:[e];function uv(e){let t=Array.isArray(e[0])?e[0]:e;return cv(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function lv(e,t){let r=[],{length:n}=e;for(let o=0;o<n;o++)r.push(e[o].apply(null,t));return r}var uM=Symbol();var lM=Object.getPrototypeOf({});var dv=class{constructor(e){this.value=e}deref(){return this.value}},pv=typeof WeakRef<"u"?WeakRef:dv,mv=0,Df=1;function Ps(){return{s:mv,v:void 0,o:null,p:null}}function mo(e,t={}){let r=Ps(),{resultEqualityCheck:n}=t,o,i=0;function a(){let s=r,{length:u}=arguments;for(let m=0,p=u;m<p;m++){let d=arguments[m];if(typeof d=="function"||typeof d=="object"&&d!==null){let g=s.o;g===null&&(s.o=g=new WeakMap);let h=g.get(d);h===void 0?(s=Ps(),g.set(d,s)):s=h}else{let g=s.p;g===null&&(s.p=g=new Map);let h=g.get(d);h===void 0?(s=Ps(),g.set(d,s)):s=h}}let c=s,l;if(s.s===Df)l=s.v;else if(l=e.apply(null,arguments),i++,n){let m=o?.deref?.()??o;m!=null&&n(m,l)&&(l=m,i!==0&&i--),o=typeof l=="object"&&l!==null||typeof l=="function"?new pv(l):l}return c.s=Df,c.v=l,l}return a.clearCache=()=>{r=Ps(),a.resetResultsCount()},a.resultsCount=()=>i,a.resetResultsCount=()=>{i=0},a}function Vf(e,...t){let r=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,n=(...o)=>{let i=0,a=0,s,u={},c=o.pop();typeof c=="object"&&(u=c,c=o.pop()),av(c,`createSelector expects an output function after the inputs, but received: [${typeof c}]`);let l={...r,...u},{memoize:m,memoizeOptions:p=[],argsMemoize:d=mo,argsMemoizeOptions:g=[],devModeChecks:h={}}=l,y=Of(p),C=Of(g),f=uv(o),A=m(function(){return i++,c.apply(null,arguments)},...y),b=!0,E=d(function(){a++;let F=lv(f,arguments);return s=A.apply(null,F),s},...C);return Object.assign(E,{resultFunc:c,memoizedResultFunc:A,dependencies:f,dependencyRecomputations:()=>a,resetDependencyRecomputations:()=>{a=0},lastResult:()=>s,recomputations:()=>i,resetRecomputations:()=>{i=0},memoize:m,argsMemoize:d})};return Object.assign(n,{withTypes:()=>n}),n}var Y=Vf(mo),gv=Object.assign((e,t=Y)=>{sv(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);let r=Object.keys(e),n=r.map(i=>e[i]);return t(n,(...i)=>i.reduce((a,s,u)=>(a[r[u]]=s,a),{}))},{withTypes:()=>gv});function Mf(e){return({dispatch:r,getState:n})=>o=>i=>typeof i=="function"?i(r,n,e):o(i)}var Nf=Mf(),Qf=Mf;var fv=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?po:po.apply(null,arguments)},AM=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}},hv=e=>e&&typeof e.match=="function";function S(e,t){function r(...n){if(t){let o=t(...n);if(!o)throw new Error(Ot(0));return{type:e,payload:o.payload,..."meta"in o&&{meta:o.meta},..."error"in o&&{error:o.error}}}return{type:e,payload:n[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=n=>Rs(n)&&n.type===e,r}var jf=class ta extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,ta.prototype)}static get[Symbol.species](){return ta}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new ta(...t[0].concat(this)):new ta(...t.concat(this))}};function Lf(e){return nt(e)?Er(e,()=>{}):e}function Uf(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function yv(e){return typeof e=="boolean"}var Sv=()=>function(t){let{thunk:r=!0,immutableCheck:n=!0,serializableCheck:o=!0,actionCreatorCheck:i=!0}=t??{},a=new jf;return r&&(yv(r)?a.push(Nf):a.push(Qf(r.extraArgument))),a},jr="RTK_autoBatch",fo=()=>e=>({payload:e,meta:{[jr]:!0}}),Bf=e=>t=>{setTimeout(t,e)},Cv=(e={type:"raf"})=>t=>(...r)=>{let n=t(...r),o=!0,i=!1,a=!1,s=new Set,u=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Bf(10):e.type==="callback"?e.queueNotification:Bf(e.timeout),c=()=>{a=!1,i&&(i=!1,s.forEach(l=>l()))};return Object.assign({},n,{subscribe(l){let m=()=>o&&l(),p=n.subscribe(m);return s.add(l),()=>{p(),s.delete(l)}},dispatch(l){try{return o=!l?.meta?.[jr],i=!o,i&&(a||(a=!0,u(c))),n.dispatch(l)}finally{o=!0}}})},Av=e=>function(r){let{autoBatch:n=!0}=r??{},o=new jf(e);return n&&o.push(Cv(typeof n=="object"?n:void 0)),o};function $f(e){let t=Sv(),{reducer:r=void 0,middleware:n,devTools:o=!0,preloadedState:i=void 0,enhancers:a=void 0}=e||{},s;if(typeof r=="function")s=r;else if(Kt(r))s=lo(r);else throw new Error(Ot(1));let u;typeof n=="function"?u=n(t):u=t();let c=po;o&&(c=fv({trace:!1,...typeof o=="object"&&o}));let l=xf(...u),m=Av(l),p=typeof a=="function"?a(m):m(),d=c(...p);return Xd(s,i,d)}function Gf(e){let t={},r=[],n,o={addCase(i,a){let s=typeof i=="string"?i:i.type;if(!s)throw new Error(Ot(28));if(s in t)throw new Error(Ot(29));return t[s]=a,o},addMatcher(i,a){return r.push({matcher:i,reducer:a}),o},addDefaultCase(i){return n=i,o}};return e(o),[t,r,n]}function xv(e){return typeof e=="function"}function $(e,t){let[r,n,o]=Gf(t),i;if(xv(e))i=()=>Lf(e());else{let s=Lf(e);i=()=>s}function a(s=i(),u){let c=[r[u.type],...n.filter(({matcher:l})=>l(u)).map(({reducer:l})=>l)];return c.filter(l=>!!l).length===0&&(c=[o]),c.reduce((l,m)=>{if(m)if(dt(l)){let d=m(l,u);return d===void 0?l:d}else{if(nt(l))return Er(l,p=>m(p,u));{let p=m(l,u);if(p===void 0){if(l===null)return l;throw Error("A case reducer on a non-draftable value must not return undefined")}return p}}return l},s)}return a.getInitialState=i,a}var zf=(e,t)=>hv(e)?e.match(t):e(t);function Jt(...e){return t=>e.some(r=>zf(r,t))}function go(...e){return t=>e.every(r=>zf(r,t))}function Ts(e,t){if(!e||!e.meta)return!1;let r=typeof e.meta.requestId=="string",n=t.indexOf(e.meta.requestStatus)>-1;return r&&n}function ra(e){return typeof e[0]=="function"&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function ks(...e){return e.length===0?t=>Ts(t,["pending"]):ra(e)?Jt(...e.map(t=>t.pending)):ks()(e[0])}function _n(...e){return e.length===0?t=>Ts(t,["rejected"]):ra(e)?Jt(...e.map(t=>t.rejected)):_n()(e[0])}function na(...e){let t=r=>r&&r.meta&&r.meta.rejectedWithValue;return e.length===0?go(_n(...e),t):ra(e)?go(_n(...e),t):na()(e[0])}function Tr(...e){return e.length===0?t=>Ts(t,["fulfilled"]):ra(e)?Jt(...e.map(t=>t.fulfilled)):Tr()(e[0])}function qs(...e){return e.length===0?t=>Ts(t,["pending","fulfilled","rejected"]):ra(e)?Jt(...e.flatMap(t=>[t.pending,t.rejected,t.fulfilled])):qs()(e[0])}var Rv="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Os=(e=21)=>{let t="",r=e;for(;r--;)t+=Rv[Math.random()*64|0];return t},Fv=["name","message","stack","code"],pp=class{constructor(e,t){be(this,"_type");this.payload=e,this.meta=t}},_f=class{constructor(e,t){be(this,"_type");this.payload=e,this.meta=t}},bv=e=>{if(typeof e=="object"&&e!==null){let t={};for(let r of Fv)typeof e[r]=="string"&&(t[r]=e[r]);return t}return{message:String(e)}},U=(()=>{function e(t,r,n){let o=S(t+"/fulfilled",(u,c,l,m)=>({payload:u,meta:{...m||{},arg:l,requestId:c,requestStatus:"fulfilled"}})),i=S(t+"/pending",(u,c,l)=>({payload:void 0,meta:{...l||{},arg:c,requestId:u,requestStatus:"pending"}})),a=S(t+"/rejected",(u,c,l,m,p)=>({payload:m,error:(n&&n.serializeError||bv)(u||"Rejected"),meta:{...p||{},arg:l,requestId:c,rejectedWithValue:!!m,requestStatus:"rejected",aborted:u?.name==="AbortError",condition:u?.name==="ConditionError"}}));function s(u){return(c,l,m)=>{let p=n?.idGenerator?n.idGenerator(u):Os(),d=new AbortController,g,h;function y(f){h=f,d.abort()}let C=async function(){let f;try{let b=n?.condition?.(u,{getState:l,extra:m});if(Iv(b)&&(b=await b),b===!1||d.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let E=new Promise((v,F)=>{g=()=>{F({name:"AbortError",message:h||"Aborted"})},d.signal.addEventListener("abort",g)});c(i(p,u,n?.getPendingMeta?.({requestId:p,arg:u},{getState:l,extra:m}))),f=await Promise.race([E,Promise.resolve(r(u,{dispatch:c,getState:l,extra:m,requestId:p,signal:d.signal,abort:y,rejectWithValue:(v,F)=>new pp(v,F),fulfillWithValue:(v,F)=>new _f(v,F)})).then(v=>{if(v instanceof pp)throw v;return v instanceof _f?o(v.payload,p,u,v.meta):o(v,p,u)})])}catch(b){f=b instanceof pp?a(null,p,u,b.payload,b.meta):a(b,p,u)}finally{g&&d.signal.removeEventListener("abort",g)}return n&&!n.dispatchConditionRejection&&a.match(f)&&f.meta.condition||c(f),f}();return Object.assign(C,{abort:y,requestId:p,arg:u,unwrap(){return C.then(vv)}})}}return Object.assign(s,{pending:i,rejected:a,fulfilled:o,settled:Jt(a,o),typePrefix:t})}return e.withTypes=()=>e,e})();function vv(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function Iv(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var Hf=Symbol.for("rtk-slice-createasyncthunk"),vM={[Hf]:U};function wv(e,t){return`${e}/${t}`}function Pv({creators:e}={}){let t=e?.asyncThunk?.[Hf];return function(n){let{name:o,reducerPath:i=o}=n;if(!o)throw new Error(Ot(11));typeof process<"u";let a=(typeof n.reducers=="function"?n.reducers(Tv()):n.reducers)||{},s=Object.keys(a),u={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},c={addCase(f,A){let b=typeof f=="string"?f:f.type;if(!b)throw new Error(Ot(12));if(b in u.sliceCaseReducersByType)throw new Error(Ot(13));return u.sliceCaseReducersByType[b]=A,c},addMatcher(f,A){return u.sliceMatchers.push({matcher:f,reducer:A}),c},exposeAction(f,A){return u.actionCreators[f]=A,c},exposeCaseReducer(f,A){return u.sliceCaseReducersByName[f]=A,c}};s.forEach(f=>{let A=a[f],b={reducerName:f,type:wv(o,f),createNotation:typeof n.reducers=="function"};qv(A)?Dv(b,A,c,t):kv(b,A,c)});function l(){let[f={},A=[],b=void 0]=typeof n.extraReducers=="function"?Gf(n.extraReducers):[n.extraReducers],E={...f,...u.sliceCaseReducersByType};return $(n.initialState,v=>{for(let F in E)v.addCase(F,E[F]);for(let F of u.sliceMatchers)v.addMatcher(F.matcher,F.reducer);for(let F of A)v.addMatcher(F.matcher,F.reducer);b&&v.addDefaultCase(b)})}let m=f=>f,p=new Map,d;function g(f,A){return d||(d=l()),d(f,A)}function h(){return d||(d=l()),d.getInitialState()}function y(f,A=!1){function b(v){let F=v[f];return typeof F>"u"&&A&&(F=h()),F}function E(v=m){let F=Uf(p,A,()=>new WeakMap);return Uf(F,v,()=>{let P={};for(let[w,D]of Object.entries(n.selectors??{}))P[w]=Ev(D,v,h,A);return P})}return{reducerPath:f,getSelectors:E,get selectors(){return E(b)},selectSlice:b}}let C={name:o,reducer:g,actions:u.actionCreators,caseReducers:u.sliceCaseReducersByName,getInitialState:h,...y(i),injectInto(f,{reducerPath:A,...b}={}){let E=A??i;return f.inject({reducerPath:E,reducer:g},b),{...C,...y(E,!0)}}};return C}}function Ev(e,t,r,n){function o(i,...a){let s=t(i);return typeof s>"u"&&n&&(s=r()),e(s,...a)}return o.unwrapped=e,o}var jn=Pv();function Tv(){function e(t,r){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...r}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...r){return t(...r)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,r){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:r}},asyncThunk:e}}function kv({type:e,reducerName:t,createNotation:r},n,o){let i,a;if("reducer"in n){if(r&&!Ov(n))throw new Error(Ot(17));i=n.reducer,a=n.prepare}else i=n;o.addCase(e,i).exposeCaseReducer(t,i).exposeAction(t,a?S(e,a):S(e))}function qv(e){return e._reducerDefinitionType==="asyncThunk"}function Ov(e){return e._reducerDefinitionType==="reducerWithPrepare"}function Dv({type:e,reducerName:t},r,n,o){if(!o)throw new Error(Ot(18));let{payloadCreator:i,fulfilled:a,pending:s,rejected:u,settled:c,options:l}=r,m=o(e,i,l);n.exposeAction(t,m),a&&n.addCase(m.fulfilled,a),s&&n.addCase(m.pending,s),u&&n.addCase(m.rejected,u),c&&n.addMatcher(m.settled,c),n.exposeCaseReducer(t,{fulfilled:a||Es,pending:s||Es,rejected:u||Es,settled:c||Es})}function Es(){}var Wf="listener",Yf="completed",Kf="cancelled",IM=`task-${Kf}`,wM=`task-${Yf}`,PM=`${Wf}-${Kf}`,EM=`${Wf}-${Yf}`;var{assign:Jf}=Object;var mp="listenerMiddleware";var Vv=Jf(S(`${mp}/add`),{withTypes:()=>Vv}),TM=S(`${mp}/removeAll`),Mv=Jf(S(`${mp}/remove`),{withTypes:()=>Mv});var kM=Symbol.for("rtk-state-proxy-original");function Ot(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. `}function Nv({config:e,environment:t,event:r,listenerManager:n}){let{url:o,token:i,mode:a}=e;a!=="disabled"&&(n.call(r),t.send(o,i,r))}var Qv=/^(?:[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 Lv(e){return typeof e=="string"&&Qv.test(e)}function Uv(e){return{getClientId:()=>{let t="visitorId",r=e.get(),n=r.storage,o=n.getItem(t),i=o&&Lv(o)?o:r.generateUUID();return n.setItem(t,i),i}}}var Zf="0.7.10";function Bv(e){let{trackingId:t}=e;return{trackingId:t}}function _v(e){return(e.source||[]).concat([`relay@${Zf}`])}function eh(e,t,r,n){let{getReferrer:o,getLocation:i,getUserAgent:a}=r,s=Bv(t),u=n.getClientId();return Object.freeze({type:e,config:s,ts:Date.now(),source:_v(t),clientId:u,userAgent:a(),referrer:o(),location:i()})}function jv(e,t,r,n,o){return{...t,meta:eh(e,r,n,o)}}var $v="*";function Gv(){let e=[];function t({type:u,callback:c}){return e.findIndex(l=>l.type===u&&l.callback===c)}function r(u,c){return u.type==="*"||c===u.type}function n(u){return t(u)<0&&e.push(u),()=>s(u.type,u.callback)}function o(u){e.forEach(c=>{if(r(c,u.meta.type))try{c.callback(u)}catch(l){console.error(l)}})}function i(u){if(u===$v)e.length=0;else for(let c=e.length-1;c>=0;c--)e[c].type===u&&e.splice(c,1)}function a(u){let c=t(u);c>=0&&e.splice(c,1)}function s(u,c){c?a({type:u,callback:c}):i(u)}return{add:n,call:o,remove:s}}function Xf({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}})}function zv(e){let t=Xf(e);return{get:()=>t,update:r=>{t=Xf({...t,...r})}}}function Hv(){let e=typeof window<"u";return{sendMessage(t){e&&window.postMessage(t,"*")}}}var gp=Wv();function Wv(){let e="coveo_",t=r=>{let n=r.split(".").slice(-2);return n.length==2?n.join("."):""};return{getItem(r){let n=`${e}${r}=`,o=document.cookie.split(";");for(let i of o){let a=i.replace(/^\s+/,"");if(a.lastIndexOf(n,0)===0)return a.substring(n.length,a.length)}return null},setItem(r,n,o){let i=t(window.location.hostname),a=`;expires=${new Date(new Date().getTime()+o).toUTCString()}`,s=i?`;domain=${i}`:"";document.cookie=`${e}${r}=${n}${a}${s};path=/;SameSite=Lax`},removeItem(r){this.setItem(r,"",-1)}}}function Yv(){return{getItem(e){return gp.getItem(e)||localStorage.getItem(e)},removeItem(e){gp.removeItem(e),localStorage.removeItem(e)},setItem(e,t){localStorage.setItem(e,t),gp.setItem(e,t,31556952e3)}}}function Kv(){let e=document.referrer;return e===""?null:e}function Jv(){return{runtime:"browser",send:(e,t,r)=>{let n=navigator.sendBeacon(`${e}?access_token=${t}`,new Blob([JSON.stringify([r])],{type:"application/json"}));if(Hv().sendMessage({kind:"EVENT_PROTOCOL",event:r,url:e,token:t}),!n)throw new Error("Failed to send the event(s) because the payload size exceeded the maximum allowed size (32 KB). Please contact support if the problem persists.")},getReferrer:()=>Kv(),getLocation:()=>window.location.href,getUserAgent:()=>navigator.userAgent,generateUUID:()=>crypto.randomUUID(),storage:Yv()}}function Xv(){try{let e="__storage_test__";return localStorage.setItem(e,e),localStorage.removeItem(e),!0}catch(e){return e instanceof DOMException&&e.name==="QuotaExceededError"&&localStorage&&localStorage.length!==0}}function Zv(){return{getItem(){return null},removeItem(){},setItem(){}}}function eI(){return{runtime:"null",send:()=>{},getReferrer:()=>null,getLocation:()=>null,getUserAgent:()=>null,generateUUID:()=>"",storage:Zv()}}function tI(e){return e.get().mode!=="disabled"&&rI()&&Xv()?Jv():eI()}function rI(){try{return typeof window=="object"}catch{return!1}}function nI(e){return{get:()=>Object.freeze(tI(e))}}function th(e){let t=zv(e),r=Gv(),n=nI(t),o=Uv(n);return{emit:(i,a)=>{let s=t.get(),u=n.get(),c=jv(i,a,s,u,o);return Nv({config:s,environment:u,event:c,listenerManager:r})},getMeta:i=>eh(i,t.get(),n.get(),o),on:(i,a)=>r.add({type:i,callback:a}),off:(i,a)=>r.remove(i,a),updateConfig:i=>t.update(i),version:Zf}}var ho="3.13.1-pre.db77dd01fb",rh=["@coveo/atomic","@coveo/quantic"];var Xt=Y(e=>e.source,e=>Object.entries(e).map(([t,r])=>`${t}@${r}`).concat(`@coveo/headless@${ho}`));var yo=Y(e=>e.configuration.organizationId,e=>e.configuration.environment,e=>e.configuration.accessToken,e=>e.configuration.analytics,e=>Xt(e.configuration.analytics),(e,t,r,{trackingId:n,apiBaseUrl:o,enabled:i},a)=>th({mode:i?"emit":"disabled",url:o??Ss(e,t),token:r,trackingId:n,source:a}));function Zt(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function I(e,t,r,n){function o(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function s(l){try{c(n.next(l))}catch(m){a(m)}}function u(l){try{c(n.throw(l))}catch(m){a(m)}}function c(l){l.done?i(l.value):o(l.value).then(s,u)}c((n=n.apply(e,t||[])).next())})}var Z;(function(e){e.search="search",e.click="click",e.custom="custom",e.view="view",e.collect="collect"})(Z||(Z={}));function yp(){return typeof window<"u"}function kp(){return typeof navigator<"u"}function So(){return typeof document<"u"}function Sp(){try{return typeof localStorage<"u"}catch{return!1}}function oI(){try{return typeof sessionStorage<"u"}catch{return!1}}function fh(){return kp()&&navigator.cookieEnabled}var iI=[Z.click,Z.custom,Z.search,Z.view],aI=(e,t)=>iI.indexOf(e)!==-1?Object.assign({language:So()?document.documentElement.lang:"unknown",userAgent:kp()?navigator.userAgent:"unknown"},t):t,aa=class e{static set(t,r,n){var o,i,a,s;n&&(i=new Date,i.setTime(i.getTime()+n)),s=window.location.hostname,s.indexOf(".")===-1?nh(t,r,i):(a=s.split("."),o=a[a.length-2]+"."+a[a.length-1],nh(t,r,i,o))}static get(t){for(var r=t+"=",n=document.cookie.split(";"),o=0;o<n.length;o++){var i=n[o];if(i=i.replace(/^\s+/,""),i.lastIndexOf(r,0)===0)return i.substring(r.length,i.length)}return null}static erase(t){e.set(t,"",-1)}};function nh(e,t,r,n){document.cookie=`${e}=${t}`+(r?`;expires=${r.toUTCString()}`:"")+(n?`;domain=${n}`:"")+";path=/;SameSite=Lax"}function sI(){return Sp()?localStorage:fh()?new sa:oI()?sessionStorage:new Ao}var sa=class e{getItem(t){return aa.get(`${e.prefix}${t}`)}removeItem(t){aa.erase(`${e.prefix}${t}`)}setItem(t,r,n){aa.set(`${e.prefix}${t}`,r,n)}};sa.prefix="coveo_";var Cp=class{constructor(){this.cookieStorage=new sa}getItem(t){return localStorage.getItem(t)||this.cookieStorage.getItem(t)}removeItem(t){this.cookieStorage.removeItem(t),localStorage.removeItem(t)}setItem(t,r){localStorage.setItem(t,r),this.cookieStorage.setItem(t,r,31556926e3)}},Ao=class{getItem(t){return null}removeItem(t){}setItem(t,r){}},oa="__coveo.analytics.history",hh=20,yh=1e3*60,Sh=75,xo=class{constructor(t){this.store=t||sI()}addElement(t){t.internalTime=new Date().getTime(),t=this.cropQueryElement(this.stripEmptyQuery(t));let r=this.getHistoryWithInternalTime();r!=null?this.isValidEntry(t)&&this.setHistory([t].concat(r)):this.setHistory([t])}addElementAsync(t){return I(this,void 0,void 0,function*(){t.internalTime=new Date().getTime(),t=this.cropQueryElement(this.stripEmptyQuery(t));let r=yield this.getHistoryWithInternalTimeAsync();r!=null?this.isValidEntry(t)&&this.setHistory([t].concat(r)):this.setHistory([t])})}getHistory(){let t=this.getHistoryWithInternalTime();return this.stripEmptyQueries(this.stripInternalTime(t))}getHistoryAsync(){return I(this,void 0,void 0,function*(){let t=yield this.getHistoryWithInternalTimeAsync();return this.stripEmptyQueries(this.stripInternalTime(t))})}getHistoryWithInternalTime(){try{let t=this.store.getItem(oa);return t&&typeof t=="string"?JSON.parse(t):[]}catch{return[]}}getHistoryWithInternalTimeAsync(){return I(this,void 0,void 0,function*(){try{let t=yield this.store.getItem(oa);return t?JSON.parse(t):[]}catch{return[]}})}setHistory(t){try{this.store.setItem(oa,JSON.stringify(t.slice(0,hh)))}catch{}}clear(){try{this.store.removeItem(oa)}catch{}}getMostRecentElement(){let t=this.getHistoryWithInternalTime();return Array.isArray(t)?t.sort((n,o)=>(o.internalTime||0)-(n.internalTime||0))[0]:null}cropQueryElement(t){return t.name&&t.value&&t.name.toLowerCase()==="query"&&(t.value=t.value.slice(0,Sh)),t}isValidEntry(t){let r=this.getMostRecentElement();return r&&r.value==t.value?(t.internalTime||0)-(r.internalTime||0)>yh:!0}stripInternalTime(t){return Array.isArray(t)?t.map(r=>{let{name:n,time:o,value:i}=r;return{name:n,time:o,value:i}}):[]}stripEmptyQuery(t){let{name:r,time:n,value:o}=t;return r&&typeof o=="string"&&r.toLowerCase()==="query"&&o.trim()===""?{name:r,time:n}:t}stripEmptyQueries(t){return t.map(r=>this.stripEmptyQuery(r))}},Ch=Object.freeze({__proto__:null,HistoryStore:xo,MAX_NUMBER_OF_HISTORY_ELEMENTS:hh,MAX_VALUE_SIZE:Sh,MIN_THRESHOLD_FOR_DUPLICATE_VALUE:yh,STORE_KEY:oa,default:xo}),cI=(e,t)=>I(void 0,void 0,void 0,function*(){return e===Z.view?(yield uI(t.contentIdValue),Object.assign({location:window.location.toString(),referrer:document.referrer,title:document.title},t)):t}),uI=e=>I(void 0,void 0,void 0,function*(){let t=new xo,r={name:"PageView",value:e,time:new Date().toISOString()};yield t.addElementAsync(r)}),Ds,lI=new Uint8Array(16);function dI(){if(!Ds&&(Ds=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Ds))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Ds(lI)}var pI=/^(?:[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 Ms(e){return typeof e=="string"&&pI.test(e)}var Ue=[];for(let e=0;e<256;++e)Ue.push((e+256).toString(16).slice(1));function Ah(e,t=0){return(Ue[e[t+0]]+Ue[e[t+1]]+Ue[e[t+2]]+Ue[e[t+3]]+"-"+Ue[e[t+4]]+Ue[e[t+5]]+"-"+Ue[e[t+6]]+Ue[e[t+7]]+"-"+Ue[e[t+8]]+Ue[e[t+9]]+"-"+Ue[e[t+10]]+Ue[e[t+11]]+Ue[e[t+12]]+Ue[e[t+13]]+Ue[e[t+14]]+Ue[e[t+15]]).toLowerCase()}function mI(e){if(!Ms(e))throw TypeError("Invalid UUID");let t,r=new Uint8Array(16);return r[0]=(t=parseInt(e.slice(0,8),16))>>>24,r[1]=t>>>16&255,r[2]=t>>>8&255,r[3]=t&255,r[4]=(t=parseInt(e.slice(9,13),16))>>>8,r[5]=t&255,r[6]=(t=parseInt(e.slice(14,18),16))>>>8,r[7]=t&255,r[8]=(t=parseInt(e.slice(19,23),16))>>>8,r[9]=t&255,r[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,r[11]=t/4294967296&255,r[12]=t>>>24&255,r[13]=t>>>16&255,r[14]=t>>>8&255,r[15]=t&255,r}function gI(e){e=unescape(encodeURIComponent(e));let t=[];for(let r=0;r<e.length;++r)t.push(e.charCodeAt(r));return t}var fI="6ba7b810-9dad-11d1-80b4-00c04fd430c8",hI="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function yI(e,t,r){function n(o,i,a,s){var u;if(typeof o=="string"&&(o=gI(o)),typeof i=="string"&&(i=mI(i)),((u=i)===null||u===void 0?void 0:u.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let c=new Uint8Array(16+o.length);if(c.set(i),c.set(o,i.length),c=r(c),c[6]=c[6]&15|t,c[8]=c[8]&63|128,a){s=s||0;for(let l=0;l<16;++l)a[s+l]=c[l];return a}return Ah(c)}try{n.name=e}catch{}return n.DNS=fI,n.URL=hI,n}var SI=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),oh={randomUUID:SI};function $n(e,t,r){if(oh.randomUUID&&!t&&!e)return oh.randomUUID();e=e||{};let n=e.random||(e.rng||dI)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,t){r=r||0;for(let o=0;o<16;++o)t[r+o]=n[o];return t}return Ah(n)}function CI(e,t,r,n){switch(e){case 0:return t&r^~t&n;case 1:return t^r^n;case 2:return t&r^t&n^r&n;case 3:return t^r^n}}function fp(e,t){return e<<t|e>>>32-t}function AI(e){let t=[1518500249,1859775393,2400959708,3395469782],r=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof e=="string"){let a=unescape(encodeURIComponent(e));e=[];for(let s=0;s<a.length;++s)e.push(a.charCodeAt(s))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);let n=e.length/4+2,o=Math.ceil(n/16),i=new Array(o);for(let a=0;a<o;++a){let s=new Uint32Array(16);for(let u=0;u<16;++u)s[u]=e[a*64+u*4]<<24|e[a*64+u*4+1]<<16|e[a*64+u*4+2]<<8|e[a*64+u*4+3];i[a]=s}i[o-1][14]=(e.length-1)*8/Math.pow(2,32),i[o-1][14]=Math.floor(i[o-1][14]),i[o-1][15]=(e.length-1)*8&4294967295;for(let a=0;a<o;++a){let s=new Uint32Array(80);for(let d=0;d<16;++d)s[d]=i[a][d];for(let d=16;d<80;++d)s[d]=fp(s[d-3]^s[d-8]^s[d-14]^s[d-16],1);let u=r[0],c=r[1],l=r[2],m=r[3],p=r[4];for(let d=0;d<80;++d){let g=Math.floor(d/20),h=fp(u,5)+CI(g,c,l,m)+p+t[g]+s[d]>>>0;p=m,m=l,l=fp(c,30)>>>0,c=u,u=h}r[0]=r[0]+u>>>0,r[1]=r[1]+c>>>0,r[2]=r[2]+l>>>0,r[3]=r[3]+m>>>0,r[4]=r[4]+p>>>0}return[r[0]>>24&255,r[0]>>16&255,r[0]>>8&255,r[0]&255,r[1]>>24&255,r[1]>>16&255,r[1]>>8&255,r[1]&255,r[2]>>24&255,r[2]>>16&255,r[2]>>8&255,r[2]&255,r[3]>>24&255,r[3]>>16&255,r[3]>>8&255,r[3]&255,r[4]>>24&255,r[4]>>16&255,r[4]>>8&255,r[4]&255]}var xI=yI("v5",80,AI),ih=xI,xh="2.30.42",ah=e=>`${e.protocol}//${e.hostname}${e.pathname.indexOf("/")===0?e.pathname:`/${e.pathname}`}${e.search}`,ia={pageview:"pageview",event:"event"},Ns=class{constructor({client:t,uuidGenerator:r=$n}){this.client=t,this.uuidGenerator=r}},Ap=class extends Ns{constructor({client:t,uuidGenerator:r=$n}){super({client:t,uuidGenerator:r}),this.actionData={},this.pageViewId=r(),this.nextPageViewId=this.pageViewId,this.currentLocation=ah(window.location),this.lastReferrer=So()?document.referrer:"",this.addHooks()}getApi(t){switch(t){case"setAction":return this.setAction;default:return null}}setAction(t,r){this.action=t,this.actionData=r}clearData(){this.clearPluginData(),this.action=void 0,this.actionData={}}getLocationInformation(t,r){return Object.assign({hitType:t},this.getNextValues(t,r))}updateLocationInformation(t,r){this.updateLocationForNextPageView(t,r)}getDefaultContextInformation(t){let r={title:So()?document.title:"",encoding:So()?document.characterSet:"UTF-8"},n={screenResolution:`${screen.width}x${screen.height}`,screenColor:`${screen.colorDepth}-bit`},o={language:navigator.language,userAgent:navigator.userAgent},i={time:Date.now(),eventId:this.uuidGenerator()};return Object.assign(Object.assign(Object.assign(Object.assign({},i),n),o),r)}updateLocationForNextPageView(t,r){let{pageViewId:n,referrer:o,location:i}=this.getNextValues(t,r);this.lastReferrer=o,this.pageViewId=n,this.currentLocation=i,t===ia.pageview&&(this.nextPageViewId=this.uuidGenerator(),this.hasSentFirstPageView=!0)}getNextValues(t,r){return{pageViewId:t===ia.pageview?this.nextPageViewId:this.pageViewId,referrer:t===ia.pageview&&this.hasSentFirstPageView?this.currentLocation:this.lastReferrer,location:t===ia.pageview?this.getCurrentLocationFromPayload(r):this.currentLocation}}getCurrentLocationFromPayload(t){if(t.page){let r=o=>o.replace(/^\/?(.*)$/,"/$1");return`${(o=>o.split("/").slice(0,3).join("/"))(this.currentLocation)}${r(t.page)}`}else return ah(window.location)}},$r=class e{constructor(t,r){if(!Ms(t))throw Error("Not a valid uuid");this.clientId=t,this.creationDate=Math.floor(r/1e3)}toString(){return this.clientId.replace(/-/g,"")+"."+this.creationDate.toString()}get expired(){let t=Math.floor(Date.now()/1e3)-this.creationDate;return t<0||t>e.expirationTime}validate(t,r){return!this.expired&&this.matchReferrer(t,r)}matchReferrer(t,r){try{let n=new URL(t);return r.some(o=>new RegExp(o.replace(/\\/g,"\\\\").replace(/\./g,"\\.").replace(/\*/g,".*")+"$").test(n.host))}catch{return!1}}static fromString(t){let r=t.split(".");if(r.length!==2)return null;let[n,o]=r;if(n.length!==32||isNaN(parseInt(o)))return null;let i=n.substring(0,8)+"-"+n.substring(8,12)+"-"+n.substring(12,16)+"-"+n.substring(16,20)+"-"+n.substring(20,32);return Ms(i)?new e(i,Number.parseInt(o)*1e3):null}};$r.cvo_cid="cvo_cid";$r.expirationTime=120;var xp=class extends Ns{constructor({client:t,uuidGenerator:r=$n}){super({client:t,uuidGenerator:r})}getApi(t){switch(t){case"decorate":return this.decorate;case"acceptFrom":return this.acceptFrom;default:return null}}decorate(t){return I(this,void 0,void 0,function*(){if(!this.client.getCurrentVisitorId)throw new Error("Could not retrieve current clientId");try{let r=new URL(t),n=yield this.client.getCurrentVisitorId();return r.searchParams.set($r.cvo_cid,new $r(n,Date.now()).toString()),r.toString()}catch{throw new Error("Invalid URL provided")}})}acceptFrom(t){this.client.setAcceptedLinkReferrers(t)}};xp.Id="link";var xt=Object.keys;function Vs(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}var hp=128,Rh=192,sh=224,ch=240;function RI(e){return(e&248)===ch?4:(e&ch)===sh?3:(e&sh)===Rh?2:1}function FI(e,t){if(t<0||e.length<=t)return e;let r=e.indexOf("%",t-2);for(r<0||r>t?r=t:t=r;r>2&&e.charAt(r-3)=="%";){let n=Number.parseInt(e.substring(r-2,r),16);if((n&hp)!=hp)break;if(r-=3,(n&Rh)!=hp){t-r>=RI(n)*3&&(r=t);break}}return e.substring(0,r)}var Rp={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"},bI=xt(Rp).map(e=>Rp[e]),vI=[...bI].join("|"),II=new RegExp(`^(${vI}$)`),wI={svcAction:"svc_action",svcActionData:"svc_action_data"},PI=e=>xt(e).filter(t=>e[t]!==void 0).reduce((t,r)=>{let n=Rp[r]||r;return Object.assign(Object.assign({},t),{[n]:e[r]})},{}),EI=e=>II.test(e),TI=[EI],uh={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",price:"pr",quantity:"qt",coupon:"cc",position:"ps",group:"group"},lh={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",position:"ps",price:"pr",group:"group"},je={action:"pa",list:"pal",listSource:"pls"},Qs={id:"ti",revenue:"tr",tax:"tt",shipping:"ts",coupon:"tcc",affiliation:"ta",step:"cos",option:"col"},kI=["loyaltyCardId","loyaltyTier","thirdPartyPersona","companyName","favoriteStore","storeName","userIndustry","userRole","userDepartment","businessUnit"],Fp={id:"quoteId",affiliation:"quoteAffiliation"},bp={id:"reviewId",rating:"reviewRating",comment:"reviewComment"},qI={add:je,bookmark_add:je,bookmark_remove:je,click:je,checkout:je,checkout_option:je,detail:je,impression:je,remove:je,refund:Object.assign(Object.assign({},je),Qs),purchase:Object.assign(Object.assign({},je),Qs),quickview:je,quote:Object.assign(Object.assign({},je),Fp),review:Object.assign(Object.assign({},je),bp)},OI=xt(uh).map(e=>uh[e]),DI=xt(lh).map(e=>lh[e]),VI=xt(je).map(e=>je[e]),MI=xt(Qs).map(e=>Qs[e]),NI=xt(bp).map(e=>bp[e]),QI=xt(Fp).map(e=>Fp[e]),LI=[...OI,"custom"].join("|"),UI=[...DI,"custom"].join("|"),Fh="(pr[0-9]+)",bh="(il[0-9]+pi[0-9]+)",BI=new RegExp(`^${Fh}(${LI})$`),_I=new RegExp(`^(${bh}(${UI}))|(il[0-9]+nm)$`),jI=new RegExp(`^(${VI.join("|")})$`),$I=new RegExp(`^(${MI.join("|")})$`),GI=new RegExp(`^${Fh}custom$`),zI=new RegExp(`^${bh}custom$`),HI=new RegExp(`^(${[...kI,...NI,...QI].join("|")})$`),WI=e=>BI.test(e),YI=e=>_I.test(e),KI=e=>jI.test(e),JI=e=>$I.test(e),XI=e=>HI.test(e),ZI=[YI,WI,KI,JI,XI],ew=[GI,zI],tw={anonymizeIp:"aip"},rw={eventCategory:"ec",eventAction:"ea",eventLabel:"el",eventValue:"ev",page:"dp",visitorId:"cid",clientId:"cid",userId:"uid",currencyCode:"cu"},nw={hitType:"t",pageViewId:"pid",encoding:"de",location:"dl",referrer:"dr",screenColor:"sd",screenResolution:"sr",title:"dt",userAgent:"ua",language:"ul",eventId:"z",time:"tm"},ow=["contentId","contentIdKey","contentType","searchHub","tab","searchUid","permanentId","contentLocale","trackingId"],iw=Object.assign(Object.assign(Object.assign(Object.assign({},tw),rw),nw),ow.reduce((e,t)=>Object.assign(Object.assign({},e),{[t]:t}),{})),vp=Object.assign(Object.assign({},iw),wI),aw=e=>{let t=!!e.action&&qI[e.action]||{};return xt(e).reduce((r,n)=>{let o=t[n]||vp[n]||n;return Object.assign(Object.assign({},r),{[o]:e[n]})},{})},sw=xt(vp).map(e=>vp[e]),cw=e=>sw.indexOf(e)!==-1,uw=e=>e==="custom",lw=e=>[...ZI,...TI,cw,uw].some(t=>t(e)),dw=e=>xt(e).reduce((t,r)=>{let n=pw(r);return n?Object.assign(Object.assign({},t),mw(n,e[r])):Object.assign(Object.assign({},t),{[r]:e[r]})},{}),pw=e=>{let t;return[...ew].every(r=>{var n;return t=(n=r.exec(e))===null||n===void 0?void 0:n[1],!t}),t},mw=(e,t)=>xt(t).reduce((r,n)=>Object.assign(Object.assign({},r),{[`${e}${n}`]:t[n]}),{}),Ip=class{constructor(t){this.opts=t}sendEvent(t,r){return I(this,void 0,void 0,function*(){if(!this.isAvailable())throw new Error('navigator.sendBeacon is not supported in this browser. Consider adding a polyfill like "sendbeacon-polyfill".');let{baseUrl:n,preprocessRequest:o}=this.opts,i=yield this.getQueryParamsForEventType(t),{url:a,payload:s}=yield this.preProcessRequestAsPotentialJSONString(`${n}/analytics/${t}?${i}`,r,o),u=this.encodeForEventType(t,s),c=new Blob([u],{type:"application/x-www-form-urlencoded"});navigator.sendBeacon(a,c)})}isAvailable(){return"sendBeacon"in navigator}deleteHttpCookieVisitorId(){return Promise.resolve()}preProcessRequestAsPotentialJSONString(t,r,n){return I(this,void 0,void 0,function*(){let o=t,i=r;if(n){let a=yield n({url:t,body:JSON.stringify(r)},"analyticsBeacon"),{url:s,body:u}=a;o=s||t;try{i=JSON.parse(u)}catch(c){console.error("Unable to process the request body as a JSON string",c)}}return{payload:i,url:o}})}encodeForEventType(t,r){return this.isEventTypeLegacy(t)?this.encodeEventToJson(t,r):this.encodeEventToJson(t,r,this.opts.token)}getQueryParamsForEventType(t){return I(this,void 0,void 0,function*(){let{token:r,visitorIdProvider:n}=this.opts,o=yield n.getCurrentVisitorId();return[r&&this.isEventTypeLegacy(t)?`access_token=${r}`:"",o?`visitorId=${o}`:"","discardVisitInfo=true"].filter(i=>!!i).join("&")})}isEventTypeLegacy(t){return[Z.click,Z.custom,Z.search,Z.view].indexOf(t)!==-1}encodeEventToJson(t,r,n){let o=`${t}Event=${encodeURIComponent(JSON.stringify(r))}`;return n&&(o=`access_token=${encodeURIComponent(n)}&${o}`),o}},wp=class{sendEvent(t,r){return I(this,void 0,void 0,function*(){return Promise.resolve()})}deleteHttpCookieVisitorId(){return I(this,void 0,void 0,function*(){return Promise.resolve()})}},dh=globalThis.fetch,Ls=class{constructor(t){this.opts=t}sendEvent(t,r){return I(this,void 0,void 0,function*(){let{baseUrl:n,visitorIdProvider:o,preprocessRequest:i}=this.opts,a=this.shouldAppendVisitorId(t)?yield this.getVisitorIdParam():"",s={url:`${n}/analytics/${t}${a}`,credentials:"include",mode:"cors",headers:this.getHeaders(),method:"POST",body:JSON.stringify(r)},u=Object.assign(Object.assign({},s),i?yield i(s,"analyticsFetch"):{}),{url:c}=u,l=Zt(u,["url"]),m;try{m=yield dh(c,l)}catch(p){console.error("An error has occured when sending the event.",p);return}if(m.ok){let p=yield m.json();return p.visitorId&&o.setCurrentVisitorId(p.visitorId),p}else{try{m.json()}catch{}throw console.error(`An error has occured when sending the "${t}" event.`,m,r),new Error(`An error has occurred when sending the "${t}" event. Check the console logs for more details.`)}})}deleteHttpCookieVisitorId(){return I(this,void 0,void 0,function*(){let{baseUrl:t}=this.opts,r=`${t}/analytics/visit`;yield dh(r,{headers:this.getHeaders(),method:"DELETE"})})}shouldAppendVisitorId(t){return[Z.click,Z.custom,Z.search,Z.view].indexOf(t)!==-1}getVisitorIdParam(){return I(this,void 0,void 0,function*(){let{visitorIdProvider:t}=this.opts,r=yield t.getCurrentVisitorId();return r?`?visitor=${r}`:""})}getHeaders(){let{token:t}=this.opts;return Object.assign(Object.assign({},t?{Authorization:`Bearer ${t}`}:{}),{"Content-Type":"application/json"})}},Pp=class{constructor(t,r){Sp()&&fh()?this.storage=new Cp:Sp()?this.storage=localStorage:(console.warn("BrowserRuntime detected no valid storage available.",this),this.storage=new Ao),this.client=new Ls(t),this.beaconClient=new Ip(t),window.addEventListener("beforeunload",()=>{let n=r();for(let{eventType:o,payload:i}of n)this.beaconClient.sendEvent(o,i)})}getClientDependingOnEventType(t){return t==="click"&&this.beaconClient.isAvailable()?this.beaconClient:this.client}},Ep=class{constructor(t,r){this.storage=r||new Ao,this.client=new Ls(t)}getClientDependingOnEventType(t){return this.client}},Us=class{constructor(){this.storage=new Ao,this.client=new wp}getClientDependingOnEventType(t){return this.client}},gw="xx",fw=e=>e?.startsWith(gw)||!1,hw=`
20
20
  We've detected you're using React Native but have not provided the corresponding runtime,
21
21
  for an optimal experience please use the "coveo.analytics/react-native" subpackage.
22
22
  Follow the Readme on how to set it up: https://github.com/coveo/coveo.analytics.js#using-react-native