@coveo/quantic 3.21.1 → 3.21.2-pre.41f1eb2e37

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.
@@ -14,21 +14,21 @@ function asyncGeneratorStep(n,t,e,r,o,a,c){try{var i=n[a](c),u=i.value}catch(n){
14
14
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
15
  * See the License for the specific language governing permissions and
16
16
  * limitations under the License.
17
- */(function(g,f){if(typeof exports=="object"&&typeof module<"u"){module.exports=f(require)}else if("function"==typeof define&&define.amd){define("CoveoHeadlessRecommendation",["crypto"],function(_d_0){var d={"crypto":_d_0},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"},gReq=function(r){var mod=r in gN?g[gN[r]]:g[r];return mod};g["CoveoHeadlessRecommendation"]=f(gReq)}})(typeof globalThis<"u"?globalThis:typeof self<"u"?self:this,function(require){var exports={};var __exports=exports;var module={exports};"use strict";var Kp=Object.create;var Qr=Object.defineProperty;var Yp=Object.getOwnPropertyDescriptor;var Jp=Object.getOwnPropertyNames;var Xp=Object.getPrototypeOf,Zp=Object.prototype.hasOwnProperty;var ef=(e,t,r)=>t in e?Qr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var $r=(e,t)=>()=>(e&&(t=e(e=0)),t);var Se=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Vs=(e,t)=>{for(var r in t)Qr(e,r,{get:t[r],enumerable:!0})},Ls=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Jp(t))!Zp.call(e,o)&&o!==r&&Qr(e,o,{get:()=>t[o],enumerable:!(n=Yp(t,o))||n.enumerable});return e};var je=(e,t,r)=>(r=e!=null?Kp(Xp(e)):{},Ls(t||!e||!e.__esModule?Qr(r,"default",{value:e,enumerable:!0}):r,e)),tf=e=>Ls(Qr({},"__esModule",{value:!0}),e);var pe=(e,t,r)=>ef(e,typeof t!="symbol"?t+"":t,r);var C,u=$r(()=>{"use strict";C=typeof globalThis<"u"?globalThis:window});function On(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?On=function(t){return typeof t}:On=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},On(e)}function of(){"navigator"in this||(this.navigator={}),typeof this.navigator.sendBeacon!="function"&&(this.navigator.sendBeacon=af.bind(this))}function af(e,t){var r=this.event&&this.event.type,n=r==="unload"||r==="beforeunload",o="XMLHttpRequest"in this?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP");o.open("POST",e,!n),o.withCredentials=!0,o.setRequestHeader("Accept","*/*"),rf(t)?(o.setRequestHeader("Content-Type","text/plain;charset=UTF-8"),o.responseType="text"):nf(t)&&t.type&&o.setRequestHeader("Content-Type",t.type);try{o.send(t)}catch{return!1}return!0}var rf,nf,l=$r(()=>{"use strict";rf=function(t){return typeof t=="string"},nf=function(t){return t instanceof Blob};of.call((typeof window>"u"?"undefined":On(window))==="object"?window:{})});var Ti=Se(Hr=>{"use strict";p();u();d();l();Object.defineProperty(Hr,"__esModule",{value:!0});function js(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function sf(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function cf(e,t,r){return t=Zt(t),lf(e,$s()?Reflect.construct(t,r||[],Zt(e).constructor):t.apply(e,r))}function Ei(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Us(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,mf(n.key),n)}}function Pi(e,t,r){return t&&Us(e.prototype,t),r&&Us(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Bs(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=gf(e))||t&&e&&typeof e.length=="number"){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(f){throw f},f:o}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
18
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var i,a=!0,m=!1;return{s:function(){r=r.call(e)},n:function(){var f=r.next();return a=f.done,f},e:function(f){m=!0,i=f},f:function(){try{a||r.return==null||r.return()}finally{if(m)throw i}}}}function xi(){return xi=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=df(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(arguments.length<3?e:r):o.value}},xi.apply(null,arguments)}function Zt(e){return Zt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Zt(e)}function uf(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ri(e,t)}function $s(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return($s=function(){return!!e})()}function lf(e,t){if(t&&(typeof t=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return sf(e)}function Ri(e,t){return Ri=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},Ri(e,t)}function df(e,t){for(;!{}.hasOwnProperty.call(e,t)&&(e=Zt(e))!==null;);return e}function pf(e,t,r,n){var o=xi(Zt(1&n?e.prototype:e),t,r);return 2&n&&typeof o=="function"?function(i){return o.apply(r,i)}:o}function ff(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function mf(e){var t=ff(e,"string");return typeof t=="symbol"?t:t+""}function gf(e,t){if(e){if(typeof e=="string")return js(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?js(e,t):void 0}}(function(e){return{NativeAbortSignal:e.AbortSignal,NativeAbortController:e.AbortController}})(typeof self<"u"?self:global);function hf(e){var t;try{t=new Event("abort")}catch{typeof document<"u"?document.createEvent?(t=document.createEvent("Event"),t.initEvent("abort",!1,!1)):(t=document.createEventObject(),t.type="abort"):t={type:"abort",bubbles:!1,cancelable:!1}}return t.reason=e,t}function yf(e){if(e===void 0)if(typeof document>"u")e=new Error("This operation was aborted"),e.name="AbortError";else try{e=new DOMException("signal is aborted without reason"),Object.defineProperty(e,"name",{value:"AbortError"})}catch{e=new Error("This operation was aborted"),e.name="AbortError"}return e}var Qs=function(){function e(){Ei(this,e),Object.defineProperty(this,"listeners",{value:{},writable:!0,configurable:!0})}return Pi(e,[{key:"addEventListener",value:function(r,n,o){r in this.listeners||(this.listeners[r]=[]),this.listeners[r].push({callback:n,options:o})}},{key:"removeEventListener",value:function(r,n){if(r in this.listeners){for(var o=this.listeners[r],i=0,a=o.length;i<a;i++)if(o[i].callback===n){o.splice(i,1);return}}}},{key:"dispatchEvent",value:function(r){var n=this;if(r.type in this.listeners){for(var o=this.listeners[r.type],i=o.slice(),a=function(){var h=i[m];try{h.callback.call(n,r)}catch(y){Promise.resolve().then(function(){throw y})}h.options&&h.options.once&&n.removeEventListener(r.type,h.callback)},m=0,f=i.length;m<f;m++)a();return!r.defaultPrevented}}}])}(),Ii=function(e){function t(){var r;return Ei(this,t),r=cf(this,t),r.listeners||Qs.call(r),Object.defineProperty(r,"aborted",{value:!1,writable:!0,configurable:!0}),Object.defineProperty(r,"onabort",{value:null,writable:!0,configurable:!0}),Object.defineProperty(r,"reason",{value:void 0,writable:!0,configurable:!0}),r}return uf(t,e),Pi(t,[{key:"toString",value:function(){return"[object AbortSignal]"}},{key:"dispatchEvent",value:function(n){n.type==="abort"&&(this.aborted=!0,typeof this.onabort=="function"&&this.onabort.call(this,n)),pf(t,"dispatchEvent",this,3)([n])}},{key:"throwIfAborted",value:function(){var n=this.aborted,o=this.reason,i=o===void 0?"Aborted":o;if(n)throw i}}],[{key:"timeout",value:function(n){var o=new Dn;return setTimeout(function(){return o.abort(new DOMException("This signal is timeout in ".concat(n,"ms"),"TimeoutError"))},n),o.signal}},{key:"any",value:function(n){var o=new Dn;function i(){o.abort(this.reason),a()}function a(){var h=Bs(n),y;try{for(h.s();!(y=h.n()).done;){var S=y.value;S.removeEventListener("abort",i)}}catch(g){h.e(g)}finally{h.f()}}var m=Bs(n),f;try{for(m.s();!(f=m.n()).done;){var c=f.value;if(c.aborted){o.abort(c.reason);break}else c.addEventListener("abort",i)}}catch(h){m.e(h)}finally{m.f()}return o.signal}}])}(Qs),Dn=function(){function e(){Ei(this,e),Object.defineProperty(this,"signal",{value:new Ii,writable:!0,configurable:!0})}return Pi(e,[{key:"abort",value:function(r){var n=yf(r),o=hf(n);this.signal.reason=n,this.signal.dispatchEvent(o)}},{key:"toString",value:function(){return"[object AbortController]"}}])}();typeof Symbol<"u"&&Symbol.toStringTag&&(Dn.prototype[Symbol.toStringTag]="AbortController",Ii.prototype[Symbol.toStringTag]="AbortSignal");function Sf(e){return e.__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL?(console.log("__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL=true is set, will force install polyfill"),!0):typeof e.Request=="function"&&!e.Request.prototype.hasOwnProperty("signal")||!e.AbortController}function vf(e){typeof e=="function"&&(e={fetch:e});var t=e,r=t.fetch,n=t.Request,o=n===void 0?r.Request:n,i=t.AbortController,a=t.__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL,m=a===void 0?!1:a;if(!Sf({fetch:r,Request:o,AbortController:i,__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL:m}))return{fetch:r,Request:f};var f=o;(f&&!f.prototype.hasOwnProperty("signal")||m)&&(f=function(S,g){var v;g&&g.signal&&(v=g.signal,delete g.signal);var R=new o(S,g);return v&&Object.defineProperty(R,"signal",{writable:!1,enumerable:!1,configurable:!0,value:v}),R},f.prototype=o.prototype);var c=r,h=function(S,g){var v=f&&f.prototype.isPrototypeOf(S)?S.signal:g?g.signal:void 0;if(v){var R;try{R=new DOMException("Aborted","AbortError")}catch{R=new Error("Aborted"),R.name="AbortError"}if(v.aborted)return Promise.reject(R);var I=new Promise(function(x,T){v.addEventListener("abort",function(){return T(R)},{once:!0})});return g&&g.signal&&delete g.signal,Promise.race([I,c(S,g)])}return c(S,g)};return{fetch:h,Request:f}}Hr.AbortController=Dn;Hr.AbortSignal=Ii;Hr.abortableFetch=vf});var Hs,s,b,d=$r(()=>{"use strict";Hs=je(Ti(),1),s=je(Ti(),1),{fetch:b}=(0,Hs.abortableFetch)({fetch})});function zr(e){if(Tf.test(e)||e.trim()==="")throw new TypeError("Invalid character in header field name");return e.trim().toLowerCase()}function Fi(e){return e.replace(Ff,"")}function Wr(e){if(typeof e!="string"||e.length===0)return!1;for(let t=0;t<e.length;t++){let r=e.charCodeAt(t);if(r>127||!kf(r))return!1}return!0}function kf(e){return![127,32,"(",")","<",">","@",",",";",":","\\","\"","/","[","]","?","=","{","}"].includes(e)}function Ws(e){if(typeof e!="string"||e.trim()!==e)return!1;for(let t=0;t<e.length;t++){let r=e.charCodeAt(t);if(r===0||r===10||r===13)return!1}return!0}var Cf,Xs,bf,Zs,Af,wf,xf,Rf,Ef,Pf,If,Tf,zs,Ff,er,ki,Gs,Ks,Ys,Js,A,tc=$r(()=>{"use strict";p();u();d();l();Cf=Object.create,Xs=Object.defineProperty,bf=Object.getOwnPropertyDescriptor,Zs=Object.getOwnPropertyNames,Af=Object.getPrototypeOf,wf=Object.prototype.hasOwnProperty,xf=(e,t)=>function(){return t||(0,e[Zs(e)[0]])((t={exports:{}}).exports,t),t.exports},Rf=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Zs(t))!wf.call(e,o)&&o!==r&&Xs(e,o,{get:()=>t[o],enumerable:!(n=bf(t,o))||n.enumerable});return e},Ef=(e,t,r)=>(r=e!=null?Cf(Af(e)):{},Rf(t||!e||!e.__esModule?Xs(r,"default",{value:e,enumerable:!0}):r,e)),Pf=xf({"node_modules/set-cookie-parser/lib/set-cookie.js"(e,t){"use strict";var r={decodeValues:!0,map:!1,silent:!1};function n(f){return typeof f=="string"&&!!f.trim()}function o(f,c){var h=f.split(";").filter(n),y=h.shift(),S=i(y),g=S.name,v=S.value;c=c?Object.assign({},r,c):r;try{v=c.decodeValues?decodeURIComponent(v):v}catch(I){console.error("set-cookie-parser encountered an error while decoding a cookie with value '"+v+"'. Set options.decodeValues to false to disable this feature.",I)}var R={name:g,value:v};return h.forEach(function(I){var x=I.split("="),T=x.shift().trimLeft().toLowerCase(),w=x.join("=");T==="expires"?R.expires=new Date(w):T==="max-age"?R.maxAge=parseInt(w,10):T==="secure"?R.secure=!0:T==="httponly"?R.httpOnly=!0:T==="samesite"?R.sameSite=w:R[T]=w}),R}function i(f){var c="",h="",y=f.split("=");return y.length>1?(c=y.shift(),h=y.join("=")):h=f,{name:c,value:h}}function a(f,c){if(c=c?Object.assign({},r,c):r,!f)return c.map?{}:[];if(f.headers)if(typeof f.headers.getSetCookie=="function")f=f.headers.getSetCookie();else if(f.headers["set-cookie"])f=f.headers["set-cookie"];else{var h=f.headers[Object.keys(f.headers).find(function(S){return S.toLowerCase()==="set-cookie"})];!h&&f.headers.cookie&&!c.silent&&console.warn("Warning: set-cookie-parser appears to have been called on a request object. It is designed to parse Set-Cookie headers from responses, not Cookie headers from requests. Set the option {silent: true} to suppress this warning."),f=h}if(Array.isArray(f)||(f=[f]),c=c?Object.assign({},r,c):r,c.map){var y={};return f.filter(n).reduce(function(S,g){var v=o(g,c);return S[v.name]=v,S},y)}else return f.filter(n).map(function(S){return o(S,c)})}function m(f){if(Array.isArray(f))return f;if(typeof f!="string")return[];var c=[],h=0,y,S,g,v,R;function I(){for(;h<f.length&&/\s/.test(f.charAt(h));)h+=1;return h<f.length}function x(){return S=f.charAt(h),S!=="="&&S!==";"&&S!==","}for(;h<f.length;){for(y=h,R=!1;I();)if(S=f.charAt(h),S===","){for(g=h,h+=1,I(),v=h;h<f.length&&x();)h+=1;h<f.length&&f.charAt(h)==="="?(R=!0,h=v,c.push(f.substring(y,g)),y=h):h=g+1}else h+=1;(!R||h>=f.length)&&c.push(f.substring(y,f.length))}return c}t.exports=a,t.exports.parse=a,t.exports.parseString=o,t.exports.splitCookiesString=m}}),If=Ef(Pf()),Tf=/[^a-z0-9\-#$%&'*+.^_`|~]/i;zs=[`
19
- `,"\r","\t"," "],Ff=new RegExp(`(^[${zs.join("")}]|$[${zs.join("")}])`,"g");er=Symbol("normalizedHeaders"),ki=Symbol("rawHeaderNames"),Gs=", ",A=class ec{constructor(t){this[Ks]={},this[Ys]=new Map,this[Js]="Headers",["Headers","HeadersPolyfill"].includes(t?.constructor.name)||t instanceof ec||typeof C.Headers<"u"&&t instanceof C.Headers?t.forEach((n,o)=>{this.append(o,n)},this):Array.isArray(t)?t.forEach(([r,n])=>{this.append(r,Array.isArray(n)?n.join(Gs):n)}):t&&Object.getOwnPropertyNames(t).forEach(r=>{let n=t[r];this.append(r,Array.isArray(n)?n.join(Gs):n)})}[(Ks=er,Ys=ki,Js=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}*keys(){for(let[t]of this.entries())yield t}*values(){for(let[,t]of this.entries())yield t}*entries(){let t=Object.keys(this[er]).sort((r,n)=>r.localeCompare(n));for(let r of t)if(r==="set-cookie")for(let n of this.getSetCookie())yield[r,n];else yield[r,this.get(r)]}has(t){if(!Wr(t))throw new TypeError(`Invalid header name "${t}"`);return this[er].hasOwnProperty(zr(t))}get(t){if(!Wr(t))throw TypeError(`Invalid header name "${t}"`);return this[er][zr(t)]??null}set(t,r){if(!Wr(t)||!Ws(r))return;let n=zr(t),o=Fi(r);this[er][n]=Fi(o),this[ki].set(n,t)}append(t,r){if(!Wr(t)||!Ws(r))return;let n=zr(t),o=Fi(r),i=this.has(n)?`${this.get(n)}, ${o}`:o;this.set(t,i)}delete(t){if(!Wr(t)||!this.has(t))return;let r=zr(t);delete this[er][r],this[ki].delete(r)}forEach(t,r){for(let[n,o]of this.entries())t.call(r,o,n,this)}getSetCookie(){let t=this.get("set-cookie");return t===null?[]:t===""?[""]:(0,If.splitCookiesString)(t)}}});var p=$r(()=>{"use strict";tc()});var pc=Se(Yr=>{"use strict";p();u();d();l();var _n=Yr&&Yr.__assign||function(){return _n=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},_n.apply(this,arguments)};Object.defineProperty(Yr,"__esModule",{value:!0});var Hf={delayFirstAttempt:!1,jitter:"none",maxDelay:1/0,numOfAttempts:10,retry:function(){return!0},startingDelay:100,timeMultiple:2};function zf(e){var t=_n(_n({},Hf),e);return t.numOfAttempts<1&&(t.numOfAttempts=1),t}Yr.getSanitizedOptions=zf});var fc=Se(qi=>{"use strict";p();u();d();l();Object.defineProperty(qi,"__esModule",{value:!0});function Wf(e){var t=Math.random()*e;return Math.round(t)}qi.fullJitter=Wf});var mc=Se(Ni=>{"use strict";p();u();d();l();Object.defineProperty(Ni,"__esModule",{value:!0});function Gf(e){return e}Ni.noJitter=Gf});var gc=Se(_i=>{"use strict";p();u();d();l();Object.defineProperty(_i,"__esModule",{value:!0});var Kf=fc(),Yf=mc();function Jf(e){switch(e.jitter){case"full":return Kf.fullJitter;case"none":default:return Yf.noJitter}}_i.JitterFactory=Jf});var Li=Se(Vi=>{"use strict";p();u();d();l();Object.defineProperty(Vi,"__esModule",{value:!0});var Xf=gc(),Zf=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=Xf.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}();Vi.Delay=Zf});var hc=Se(nt=>{"use strict";p();u();d();l();var em=nt&&nt.__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)}}(),tm=nt&&nt.__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 m(h){try{c(n.next(h))}catch(y){a(y)}}function f(h){try{c(n.throw(h))}catch(y){a(y)}}function c(h){h.done?i(h.value):o(h.value).then(m,f)}c((n=n.apply(e,t||[])).next())})},rm=nt&&nt.__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:m(0),throw:m(1),return:m(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function m(c){return function(h){return f([c,h])}}function f(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(h){c=[6,h],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(nt,"__esModule",{value:!0});var nm=Li(),om=function(e){em(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.apply=function(){return tm(this,void 0,void 0,function(){return rm(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}(nm.Delay);nt.SkipFirstDelay=om});var yc=Se(Jr=>{"use strict";p();u();d();l();var im=Jr&&Jr.__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(Jr,"__esModule",{value:!0});var am=Li(),sm=function(e){im(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(am.Delay);Jr.AlwaysDelay=sm});var Sc=Se(ji=>{"use strict";p();u();d();l();Object.defineProperty(ji,"__esModule",{value:!0});var cm=hc(),um=yc();function lm(e,t){var r=dm(e);return r.setAttemptNumber(t),r}ji.DelayFactory=lm;function dm(e){return e.delayFirstAttempt?new um.AlwaysDelay(e):new cm.SkipFirstDelay(e)}});var vc=Se(Vt=>{"use strict";p();u();d();l();var Ui=Vt&&Vt.__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 m(h){try{c(n.next(h))}catch(y){a(y)}}function f(h){try{c(n.throw(h))}catch(y){a(y)}}function c(h){h.done?i(h.value):o(h.value).then(m,f)}c((n=n.apply(e,t||[])).next())})},Bi=Vt&&Vt.__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:m(0),throw:m(1),return:m(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function m(c){return function(h){return f([c,h])}}function f(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(h){c=[6,h],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(Vt,"__esModule",{value:!0});var pm=pc(),fm=Sc();function mm(e,t){return t===void 0&&(t={}),Ui(this,void 0,void 0,function(){var r,n;return Bi(this,function(o){switch(o.label){case 0:return r=pm.getSanitizedOptions(t),n=new gm(e,r),[4,n.execute()];case 1:return[2,o.sent()]}})})}Vt.backOff=mm;var gm=function(){function e(t,r){this.request=t,this.options=r,this.attemptNumber=0}return e.prototype.execute=function(){return Ui(this,void 0,void 0,function(){var t,r;return Bi(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 Ui(this,void 0,void 0,function(){var t;return Bi(this,function(r){switch(r.label){case 0:return t=fm.DelayFactory(this.options,this.attemptNumber),[4,t.apply()];case 1:return r.sent(),[2]}})})},e}()});var Do=Se((Qa,$a)=>{"use strict";p();u();d();l();(function(e,t){typeof Qa=="object"&&typeof $a<"u"?$a.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof C<"u"?C:e||self).dayjs=t()})(Qa,function(){"use strict";var e=1e3,t=6e4,r=36e5,n="millisecond",o="second",i="minute",a="hour",m="day",f="week",c="month",h="quarter",y="year",S="date",g="Invalid Date",v=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,R=/\[([^\]]+)]|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,I={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(U){var L=["th","st","nd","rd"],V=U%100;return"["+U+(L[(V-20)%10]||L[V]||L[0])+"]"}},x=function(U,L,V){var Q=String(U);return!Q||Q.length>=L?U:""+Array(L+1-Q.length).join(V)+U},T={s:x,z:function(U){var L=-U.utcOffset(),V=Math.abs(L),Q=Math.floor(V/60),j=V%60;return(L<=0?"+":"-")+x(Q,2,"0")+":"+x(j,2,"0")},m:function U(L,V){if(L.date()<V.date())return-U(V,L);var Q=12*(V.year()-L.year())+(V.month()-L.month()),j=L.clone().add(Q,c),z=V-j<0,W=L.clone().add(Q+(z?-1:1),c);return+(-(Q+(V-j)/(z?j-W:W-j))||0)},a:function(U){return U<0?Math.ceil(U)||0:Math.floor(U)},p:function(U){return{M:c,y,w:f,d:m,D:S,h:a,m:i,s:o,ms:n,Q:h}[U]||String(U||"").toLowerCase().replace(/s$/,"")},u:function(U){return U===void 0}},w="en",E={};E[w]=I;var N="$isDayjsObject",k=function(U){return U instanceof _||!(!U||!U[N])},P=function U(L,V,Q){var j;if(!L)return w;if(typeof L=="string"){var z=L.toLowerCase();E[z]&&(j=z),V&&(E[z]=V,j=z);var W=L.split("-");if(!j&&W.length>1)return U(W[0])}else{var Y=L.name;E[Y]=L,j=Y}return!Q&&j&&(w=j),j||!Q&&w},F=function(U,L){if(k(U))return U.clone();var V=typeof L=="object"?L:{};return V.date=U,V.args=arguments,new _(V)},O=T;O.l=P,O.i=k,O.w=function(U,L){return F(U,{locale:L.$L,utc:L.$u,x:L.$x,$offset:L.$offset})};var _=function(){function U(V){this.$L=P(V.locale,null,!0),this.parse(V),this.$x=this.$x||V.x||{},this[N]=!0}var L=U.prototype;return L.parse=function(V){this.$d=function(Q){var j=Q.date,z=Q.utc;if(j===null)return new Date(NaN);if(O.u(j))return new Date;if(j instanceof Date)return new Date(j);if(typeof j=="string"&&!/Z$/i.test(j)){var W=j.match(v);if(W){var Y=W[2]-1||0,re=(W[7]||"0").substring(0,3);return z?new Date(Date.UTC(W[1],Y,W[3]||1,W[4]||0,W[5]||0,W[6]||0,re)):new Date(W[1],Y,W[3]||1,W[4]||0,W[5]||0,W[6]||0,re)}}return new Date(j)}(V),this.init()},L.init=function(){var V=this.$d;this.$y=V.getFullYear(),this.$M=V.getMonth(),this.$D=V.getDate(),this.$W=V.getDay(),this.$H=V.getHours(),this.$m=V.getMinutes(),this.$s=V.getSeconds(),this.$ms=V.getMilliseconds()},L.$utils=function(){return O},L.isValid=function(){return this.$d.toString()!==g},L.isSame=function(V,Q){var j=F(V);return this.startOf(Q)<=j&&j<=this.endOf(Q)},L.isAfter=function(V,Q){return F(V)<this.startOf(Q)},L.isBefore=function(V,Q){return this.endOf(Q)<F(V)},L.$g=function(V,Q,j){return O.u(V)?this[Q]:this.set(j,V)},L.unix=function(){return Math.floor(this.valueOf()/1e3)},L.valueOf=function(){return this.$d.getTime()},L.startOf=function(V,Q){var j=this,z=!!O.u(Q)||Q,W=O.p(V),Y=function(ce,me){var ye=O.w(j.$u?Date.UTC(j.$y,me,ce):new Date(j.$y,me,ce),j);return z?ye:ye.endOf(m)},re=function(ce,me){return O.w(j.toDate()[ce].apply(j.toDate("s"),(z?[0,0,0,0]:[23,59,59,999]).slice(me)),j)},se=this.$W,ee=this.$M,ne=this.$D,Z="set"+(this.$u?"UTC":"");switch(W){case y:return z?Y(1,0):Y(31,11);case c:return z?Y(1,ee):Y(0,ee+1);case f:var oe=this.$locale().weekStart||0,he=(se<oe?se+7:se)-oe;return Y(z?ne-he:ne+(6-he),ee);case m:case S:return re(Z+"Hours",0);case a:return re(Z+"Minutes",1);case i:return re(Z+"Seconds",2);case o:return re(Z+"Milliseconds",3);default:return this.clone()}},L.endOf=function(V){return this.startOf(V,!1)},L.$set=function(V,Q){var j,z=O.p(V),W="set"+(this.$u?"UTC":""),Y=(j={},j[m]=W+"Date",j[S]=W+"Date",j[c]=W+"Month",j[y]=W+"FullYear",j[a]=W+"Hours",j[i]=W+"Minutes",j[o]=W+"Seconds",j[n]=W+"Milliseconds",j)[z],re=z===m?this.$D+(Q-this.$W):Q;if(z===c||z===y){var se=this.clone().set(S,1);se.$d[Y](re),se.init(),this.$d=se.set(S,Math.min(this.$D,se.daysInMonth())).$d}else Y&&this.$d[Y](re);return this.init(),this},L.set=function(V,Q){return this.clone().$set(V,Q)},L.get=function(V){return this[O.p(V)]()},L.add=function(V,Q){var j,z=this;V=Number(V);var W=O.p(Q),Y=function(ee){var ne=F(z);return O.w(ne.date(ne.date()+Math.round(ee*V)),z)};if(W===c)return this.set(c,this.$M+V);if(W===y)return this.set(y,this.$y+V);if(W===m)return Y(1);if(W===f)return Y(7);var re=(j={},j[i]=t,j[a]=r,j[o]=e,j)[W]||1,se=this.$d.getTime()+V*re;return O.w(se,this)},L.subtract=function(V,Q){return this.add(-1*V,Q)},L.format=function(V){var Q=this,j=this.$locale();if(!this.isValid())return j.invalidDate||g;var z=V||"YYYY-MM-DDTHH:mm:ssZ",W=O.z(this),Y=this.$H,re=this.$m,se=this.$M,ee=j.weekdays,ne=j.months,Z=j.meridiem,oe=function(me,ye,Te,Le){return me&&(me[ye]||me(Q,z))||Te[ye].slice(0,Le)},he=function(me){return O.s(Y%12||12,me,"0")},ce=Z||function(me,ye,Te){var Le=me<12?"AM":"PM";return Te?Le.toLowerCase():Le};return z.replace(R,function(me,ye){return ye||function(Te){switch(Te){case"YY":return String(Q.$y).slice(-2);case"YYYY":return O.s(Q.$y,4,"0");case"M":return se+1;case"MM":return O.s(se+1,2,"0");case"MMM":return oe(j.monthsShort,se,ne,3);case"MMMM":return oe(ne,se);case"D":return Q.$D;case"DD":return O.s(Q.$D,2,"0");case"d":return String(Q.$W);case"dd":return oe(j.weekdaysMin,Q.$W,ee,2);case"ddd":return oe(j.weekdaysShort,Q.$W,ee,3);case"dddd":return ee[Q.$W];case"H":return String(Y);case"HH":return O.s(Y,2,"0");case"h":return he(1);case"hh":return he(2);case"a":return ce(Y,re,!0);case"A":return ce(Y,re,!1);case"m":return String(re);case"mm":return O.s(re,2,"0");case"s":return String(Q.$s);case"ss":return O.s(Q.$s,2,"0");case"SSS":return O.s(Q.$ms,3,"0");case"Z":return W}return null}(me)||W.replace(":","")})},L.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},L.diff=function(V,Q,j){var z,W=this,Y=O.p(Q),re=F(V),se=(re.utcOffset()-this.utcOffset())*t,ee=this-re,ne=function(){return O.m(W,re)};switch(Y){case y:z=ne()/12;break;case c:z=ne();break;case h:z=ne()/3;break;case f:z=(ee-se)/6048e5;break;case m:z=(ee-se)/864e5;break;case a:z=ee/r;break;case i:z=ee/t;break;case o:z=ee/e;break;default:z=ee}return j?z:O.a(z)},L.daysInMonth=function(){return this.endOf(c).$D},L.$locale=function(){return E[this.$L]},L.locale=function(V,Q){if(!V)return this.$L;var j=this.clone(),z=P(V,Q,!0);return z&&(j.$L=z),j},L.clone=function(){return O.w(this.$d,this)},L.toDate=function(){return new Date(this.valueOf())},L.toJSON=function(){return this.isValid()?this.toISOString():null},L.toISOString=function(){return this.$d.toISOString()},L.toString=function(){return this.$d.toUTCString()},U}(),$=_.prototype;return F.prototype=$,[["$ms",n],["$s",o],["$m",i],["$H",a],["$W",m],["$M",c],["$y",y],["$D",S]].forEach(function(U){$[U[1]]=function(L){return this.$g(L,U[0],U[1])}}),F.extend=function(U,L){return U.$i||(U(L,_,F),U.$i=!0),F},F.locale=P,F.isDayjs=k,F.unix=function(U){return F(1e3*U)},F.en=E[w],F.Ls=E,F.p={},F})});var Cl=Se((Ha,za)=>{"use strict";p();u();d();l();(function(e,t){typeof Ha=="object"&&typeof za<"u"?za.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof C<"u"?C:e||self).dayjs_plugin_quarterOfYear=t()})(Ha,function(){"use strict";var e="month",t="quarter";return function(r,n){var o=n.prototype;o.quarter=function(m){return this.$utils().u(m)?Math.ceil((this.month()+1)/3):this.month(this.month()%3+3*(m-1))};var i=o.add;o.add=function(m,f){return m=Number(m),this.$utils().p(f)===t?this.add(3*m,e):i.bind(this)(m,f)};var a=o.startOf;o.startOf=function(m,f){var c=this.$utils(),h=!!c.u(f)||f;if(c.p(m)===t){var y=this.quarter()-1;return h?this.month(3*y).startOf(e).startOf("day"):this.month(3*y+2).endOf(e).endOf("day")}return a.bind(this)(m,f)}}})});var bl=Se((Wa,Ga)=>{"use strict";p();u();d();l();(function(e,t){typeof Wa=="object"&&typeof Ga<"u"?Ga.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof C<"u"?C:e||self).dayjs_plugin_customParseFormat=t()})(Wa,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={},m=function(v){return(v=+v)+(v>68?1900:2e3)},f=function(v){return function(R){this[v]=+R}},c=[/[+-]\d\d:?(\d\d)?|Z/,function(v){(this.zone||(this.zone={})).offset=function(R){if(!R||R==="Z")return 0;var I=R.match(/([+-]|\d\d)/g),x=60*I[1]+(+I[2]||0);return x===0?0:I[0]==="+"?-x:x}(v)}],h=function(v){var R=a[v];return R&&(R.indexOf?R:R.s.concat(R.f))},y=function(v,R){var I,x=a.meridiem;if(x){for(var T=1;T<=24;T+=1)if(v.indexOf(x(T,0,R))>-1){I=T>12;break}}else I=v===(R?"pm":"PM");return I},S={A:[i,function(v){this.afternoon=y(v,!1)}],a:[i,function(v){this.afternoon=y(v,!0)}],Q:[r,function(v){this.month=3*(v-1)+1}],S:[r,function(v){this.milliseconds=100*+v}],SS:[n,function(v){this.milliseconds=10*+v}],SSS:[/\d{3}/,function(v){this.milliseconds=+v}],s:[o,f("seconds")],ss:[o,f("seconds")],m:[o,f("minutes")],mm:[o,f("minutes")],H:[o,f("hours")],h:[o,f("hours")],HH:[o,f("hours")],hh:[o,f("hours")],D:[o,f("day")],DD:[n,f("day")],Do:[i,function(v){var R=a.ordinal,I=v.match(/\d+/);if(this.day=I[0],R)for(var x=1;x<=31;x+=1)R(x).replace(/\[|\]/g,"")===v&&(this.day=x)}],w:[o,f("week")],ww:[n,f("week")],M:[o,f("month")],MM:[n,f("month")],MMM:[i,function(v){var R=h("months"),I=(h("monthsShort")||R.map(function(x){return x.slice(0,3)})).indexOf(v)+1;if(I<1)throw new Error;this.month=I%12||I}],MMMM:[i,function(v){var R=h("months").indexOf(v)+1;if(R<1)throw new Error;this.month=R%12||R}],Y:[/[+-]?\d+/,f("year")],YY:[n,function(v){this.year=m(v)}],YYYY:[/\d{4}/,f("year")],Z:c,ZZ:c};function g(v){var R,I;R=v,I=a&&a.formats;for(var x=(v=R.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(F,O,_){var $=_&&_.toUpperCase();return O||I[_]||e[_]||I[$].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(U,L,V){return L||V.slice(1)})})).match(t),T=x.length,w=0;w<T;w+=1){var E=x[w],N=S[E],k=N&&N[0],P=N&&N[1];x[w]=P?{regex:k,parser:P}:E.replace(/^\[|\]$/g,"")}return function(F){for(var O={},_=0,$=0;_<T;_+=1){var U=x[_];if(typeof U=="string")$+=U.length;else{var L=U.regex,V=U.parser,Q=F.slice($),j=L.exec(Q)[0];V.call(O,j),F=F.replace(j,"")}}return function(z){var W=z.afternoon;if(W!==void 0){var Y=z.hours;W?Y<12&&(z.hours+=12):Y===12&&(z.hours=0),delete z.afternoon}}(O),O}}return function(v,R,I){I.p.customParseFormat=!0,v&&v.parseTwoDigitYear&&(m=v.parseTwoDigitYear);var x=R.prototype,T=x.parse;x.parse=function(w){var E=w.date,N=w.utc,k=w.args;this.$u=N;var P=k[1];if(typeof P=="string"){var F=k[2]===!0,O=k[3]===!0,_=F||O,$=k[2];O&&($=k[2]),a=this.$locale(),!F&&$&&(a=I.Ls[$]),this.$d=function(Q,j,z,W){try{if(["x","X"].indexOf(j)>-1)return new Date((j==="X"?1e3:1)*Q);var Y=g(j)(Q),re=Y.year,se=Y.month,ee=Y.day,ne=Y.hours,Z=Y.minutes,oe=Y.seconds,he=Y.milliseconds,ce=Y.zone,me=Y.week,ye=new Date,Te=ee||(re||se?1:ye.getDate()),Le=re||ye.getFullYear(),ft=0;re&&!se||(ft=se>0?se-1:ye.getMonth());var Jt,Xt=ne||0,Br=Z||0,Ai=oe||0,wi=he||0;return ce?new Date(Date.UTC(Le,ft,Te,Xt,Br,Ai,wi+60*ce.offset*1e3)):z?new Date(Date.UTC(Le,ft,Te,Xt,Br,Ai,wi)):(Jt=new Date(Le,ft,Te,Xt,Br,Ai,wi),me&&(Jt=W(Jt).week(me).toDate()),Jt)}catch{return new Date("")}}(E,P,N,I),this.init(),$&&$!==!0&&(this.$L=this.locale($).$L),_&&E!=this.format(P)&&(this.$d=new Date("")),a={}}else if(P instanceof Array)for(var U=P.length,L=1;L<=U;L+=1){k[1]=P[L-1];var V=I.apply(this,k);if(V.isValid()){this.$d=V.$d,this.$L=V.$L,this.init();break}L===U&&(this.$d=new Date(""))}else T.call(this,w)}}})});var Sd=Se((lN,yd)=>{"use strict";p();u();d();l();var zS=/(^|; )Coveo-Pendragon=([^;]*)/;yd.exports=()=>zS.exec(document.cookie)?.pop()||null});var vd=Se((ms,gs)=>{"use strict";p();u();d();l();(function(e,t){typeof ms=="object"&&typeof gs<"u"?gs.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof C<"u"?C:e||self).dayjs_plugin_timezone=t()})(ms,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(h,y,S){S===void 0&&(S={});var g=new Date(h),v=function(R,I){I===void 0&&(I={});var x=I.timeZoneName||"short",T=R+"|"+x,w=t[T];return w||(w=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:R,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:x}),t[T]=w),w}(y,S);return v.formatToParts(g)},m=function(h,y){for(var S=a(h,y),g=[],v=0;v<S.length;v+=1){var R=S[v],I=R.type,x=R.value,T=e[I];T>=0&&(g[T]=parseInt(x,10))}var w=g[3],E=w===24?0:w,N=g[0]+"-"+g[1]+"-"+g[2]+" "+E+":"+g[4]+":"+g[5]+":000",k=+h;return(o.utc(N).valueOf()-(k-=k%1e3))/6e4},f=n.prototype;f.tz=function(h,y){h===void 0&&(h=i);var S,g=this.utcOffset(),v=this.toDate(),R=v.toLocaleString("en-US",{timeZone:h}),I=Math.round((v-new Date(R))/1e3/60),x=15*-Math.round(v.getTimezoneOffset()/15)-I;if(!Number(x))S=this.utcOffset(0,y);else if(S=o(R,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(x,!0),y){var T=S.utcOffset();S=S.add(g-T,"minute")}return S.$x.$timezone=h,S},f.offsetName=function(h){var y=this.$x.$timezone||o.tz.guess(),S=a(this.valueOf(),y,{timeZoneName:h}).find(function(g){return g.type.toLowerCase()==="timezonename"});return S&&S.value};var c=f.startOf;f.startOf=function(h,y){if(!this.$x||!this.$x.$timezone)return c.call(this,h,y);var S=o(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return c.call(S,h,y).tz(this.$x.$timezone,!0)},o.tz=function(h,y,S){var g=S&&y,v=S||y||i,R=m(+o(),v);if(typeof h!="string")return o(h).tz(v);var I=function(E,N,k){var P=E-60*N*1e3,F=m(P,k);if(N===F)return[P,N];var O=m(P-=60*(F-N)*1e3,k);return F===O?[P,F]:[E-60*Math.min(F,O)*1e3,Math.max(F,O)]}(o.utc(h,g).valueOf(),R,v),x=I[0],T=I[1],w=o(x).utcOffset(T);return w.$x.$timezone=v,w},o.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},o.tz.setDefault=function(h){i=h}}})});var Cd=Se((hs,ys)=>{"use strict";p();u();d();l();(function(e,t){typeof hs=="object"&&typeof ys<"u"?ys.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof C<"u"?C:e||self).dayjs_plugin_utc=t()})(hs,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(g){var v={date:g,utc:!0,args:arguments};return new o(v)},a.utc=function(g){var v=i(this.toDate(),{locale:this.$L,utc:!0});return g?v.add(this.utcOffset(),e):v},a.local=function(){return i(this.toDate(),{locale:this.$L,utc:!1})};var m=a.parse;a.parse=function(g){g.utc&&(this.$u=!0),this.$utils().u(g.$offset)||(this.$offset=g.$offset),m.call(this,g)};var f=a.init;a.init=function(){if(this.$u){var g=this.$d;this.$y=g.getUTCFullYear(),this.$M=g.getUTCMonth(),this.$D=g.getUTCDate(),this.$W=g.getUTCDay(),this.$H=g.getUTCHours(),this.$m=g.getUTCMinutes(),this.$s=g.getUTCSeconds(),this.$ms=g.getUTCMilliseconds()}else f.call(this)};var c=a.utcOffset;a.utcOffset=function(g,v){var R=this.$utils().u;if(R(g))return this.$u?0:R(this.$offset)?c.call(this):this.$offset;if(typeof g=="string"&&(g=function(w){w===void 0&&(w="");var E=w.match(t);if(!E)return null;var N=(""+E[0]).match(r)||["-",0,0],k=N[0],P=60*+N[1]+ +N[2];return P===0?0:k==="+"?P:-P}(g),g===null))return this;var I=Math.abs(g)<=16?60*g:g,x=this;if(v)return x.$offset=I,x.$u=g===0,x;if(g!==0){var T=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(x=this.local().add(I+T,e)).$offset=I,x.$x.$localOffset=T}else x=this.utc();return x};var h=a.format;a.format=function(g){var v=g||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return h.call(this,v)},a.valueOf=function(){var g=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*g},a.isUTC=function(){return!!this.$u},a.toISOString=function(){return this.toDate().toISOString()},a.toString=function(){return this.toDate().toUTCString()};var y=a.toDate;a.toDate=function(g){return g==="s"&&this.$offset?i(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():y.call(this)};var S=a.diff;a.diff=function(g,v,R){if(g&&this.$u===g.$u)return S.call(this,g,v,R);var I=this.local(),x=i(g).local();return S.call(I,x,v,R)}}})});var Md=Se((RV,Dd)=>{"use strict";p();u();d();l();function nv(e){try{return JSON.stringify(e)}catch{return"\"[Circular]\""}}Dd.exports=ov;function ov(e,t,r){var n=r&&r.stringify||nv,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 m=1;m<i;m++)a[m]=n(t[m]);return a.join(" ")}if(typeof e!="string")return e;var f=t.length;if(f===0)return e;for(var c="",h=1-o,y=-1,S=e&&e.length||0,g=0;g<S;){if(e.charCodeAt(g)===37&&g+1<S){switch(y=y>-1?y:0,e.charCodeAt(g+1)){case 100:case 102:if(h>=f||t[h]==null)break;y<g&&(c+=e.slice(y,g)),c+=Number(t[h]),y=g+2,g++;break;case 105:if(h>=f||t[h]==null)break;y<g&&(c+=e.slice(y,g)),c+=Math.floor(Number(t[h])),y=g+2,g++;break;case 79:case 111:case 106:if(h>=f||t[h]===void 0)break;y<g&&(c+=e.slice(y,g));var v=typeof t[h];if(v==="string"){c+="'"+t[h]+"'",y=g+2,g++;break}if(v==="function"){c+=t[h].name||"<anonymous>",y=g+2,g++;break}c+=n(t[h]),y=g+2,g++;break;case 115:if(h>=f)break;y<g&&(c+=e.slice(y,g)),c+=String(t[h]),y=g+2,g++;break;case 37:y<g&&(c+=e.slice(y,g)),c+="%",y=g+2,g++,h--;break}++h}++g}return y===-1?e:(y<S&&(c+=e.slice(y)),c)}});var jd=Se((FV,zo)=>{"use strict";p();u();d();l();var qd=Md();zo.exports=pt;var En=vv().console||{},iv={mapHttpRequest:Ho,mapHttpResponse:Ho,wrapRequestSerializer:bs,wrapResponseSerializer:bs,wrapErrorSerializer:bs,req:Ho,res:Ho,err:_d,errWithCause:_d};function Et(e,t){return e==="silent"?1/0:t.levels.values[e]}var xs=Symbol("pino.logFuncs"),As=Symbol("pino.hierarchy"),av={error:"log",fatal:"error",warn:"error",info:"log",debug:"log",trace:"log"};function Nd(e,t){let r={logger:t,parent:e[As]};t[As]=r}function sv(e,t,r){let n={};t.forEach(o=>{n[o]=r[o]?r[o]:En[o]||En[av[o]||"log"]||Mr}),e[xs]=n}function cv(e,t){return Array.isArray(e)?e.filter(function(n){return n!=="!stdSerializers.err"}):e===!0?Object.keys(t):!1}function pt(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||En;e.browser.write&&(e.browser.asObject=!0);let n=e.serializers||{},o=cv(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||{}),m=["error","fatal","warn","info","debug","trace"].concat(a);typeof r=="function"&&m.forEach(function(R){r[R]=r}),(e.enabled===!1||e.browser.disabled)&&(e.level="silent");let f=e.level||"info",c=Object.create(r);c.log||(c.log=Mr),sv(c,m,r),Nd({},c),Object.defineProperty(c,"levelVal",{get:y}),Object.defineProperty(c,"level",{get:S,set:g});let h={transmit:t,serialize:o,asObject:e.browser.asObject,formatters:e.browser.formatters,levels:m,timestamp:hv(e),messageKey:e.messageKey||"msg",onChild:e.onChild||Mr};c.levels=uv(e),c.level=f,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=Mr,c.serializers=n,c._serialize=o,c._stdErrSerialize=i,c.child=function(...R){return v.call(this,h,...R)},t&&(c._logEvent=ws());function y(){return Et(this.level,this)}function S(){return this._level}function g(R){if(R!=="silent"&&!this.levels.values[R])throw Error("unknown level "+R);this._level=R,Wt(this,h,c,"error"),Wt(this,h,c,"fatal"),Wt(this,h,c,"warn"),Wt(this,h,c,"info"),Wt(this,h,c,"debug"),Wt(this,h,c,"trace"),a.forEach(I=>{Wt(this,h,c,I)})}function v(R,I,x){if(!I)throw new Error("missing bindings for child Pino");x=x||{},o&&I.serializers&&(x.serializers=I.serializers);let T=x.serializers;if(o&&T){var w=Object.assign({},n,T),E=e.browser.serialize===!0?Object.keys(w):o;delete I.serializers,Rs([I],E,w,this._stdErrSerialize)}function N(P){this._childLevel=(P._childLevel|0)+1,this.bindings=I,w&&(this.serializers=w,this._serialize=E),t&&(this._logEvent=ws([].concat(P._logEvent.bindings,I)))}N.prototype=this;let k=new N(this);return Nd(this,k),k.child=function(...P){return v.call(this,R,...P)},k.level=x.level||this.level,R.onChild(k),k}return c}function uv(e){let t=e.customLevels||{},r=Object.assign({},pt.levels.values,t),n=Object.assign({},pt.levels.labels,lv(t));return{values:r,labels:n}}function lv(e){let t={};return Object.keys(e).forEach(function(r){t[e[r]]=r}),t}pt.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"}};pt.stdSerializers=iv;pt.stdTimeFunctions=Object.assign({},{nullTime:Vd,epochTime:Ld,unixTime:yv,isoTime:Sv});function dv(e){let t=[];e.bindings&&t.push(e.bindings);let r=e[As];for(;r.parent;)r=r.parent,r.logger.bindings&&t.push(r.logger.bindings);return t.reverse()}function Wt(e,t,r,n){if(Object.defineProperty(e,n,{value:Et(e.level,r)>Et(n,r)?Mr:r[xs][n],writable:!0,enumerable:!0,configurable:!0}),e[n]===Mr){if(!t.transmit)return;let i=t.transmit.level||e.level,a=Et(i,r);if(Et(n,r)<a)return}e[n]=fv(e,t,r,n);let o=dv(e);o.length!==0&&(e[n]=pv(o,e[n]))}function pv(e,t){return function(){return t.apply(this,[...e,...arguments])}}function fv(e,t,r,n){return function(o){return function(){let a=t.timestamp(),m=new Array(arguments.length),f=Object.getPrototypeOf&&Object.getPrototypeOf(this)===En?En:this;for(var c=0;c<m.length;c++)m[c]=arguments[c];var h=!1;if(t.serialize&&(Rs(m,this._serialize,this.serializers,this._stdErrSerialize),h=!0),t.asObject||t.formatters?o.call(f,mv(this,n,m,a,t)):o.apply(f,m),t.transmit){let y=t.transmit.level||e._level,S=Et(y,r),g=Et(n,r);if(g<S)return;gv(this,{ts:a,methodLevel:n,methodValue:g,transmitLevel:y,transmitValue:r.levels.values[t.transmit.level||e._level],send:t.transmit.send,val:Et(e._level,r)},m,h)}}}(e[xs][n])}function mv(e,t,r,n,o){let{level:i,log:a=S=>S}=o.formatters||{},m=r.slice(),f=m[0],c={};if(n&&(c.time=n),i){let S=i(t,e.levels.values[t]);Object.assign(c,S)}else c.level=e.levels.values[t];let h=(e._childLevel|0)+1;if(h<1&&(h=1),f!==null&&typeof f=="object"){for(;h--&&typeof m[0]=="object";)Object.assign(c,m.shift());f=m.length?qd(m.shift(),m):void 0}else typeof f=="string"&&(f=qd(m.shift(),m));return f!==void 0&&(c[o.messageKey]=f),a(c)}function Rs(e,t,r,n){for(let o in e)if(n&&e[o]instanceof Error)e[o]=pt.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 gv(e,t,r,n=!1){let o=t.send,i=t.ts,a=t.methodLevel,m=t.methodValue,f=t.val,c=e._logEvent.bindings;n||Rs(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(h){return c.indexOf(h)===-1}),e._logEvent.level.label=a,e._logEvent.level.value=m,o(a,e._logEvent,f),e._logEvent=ws(c)}function ws(e){return{ts:0,messages:[],bindings:e||[],level:{label:"",value:0}}}function _d(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 hv(e){return typeof e.timestamp=="function"?e.timestamp:e.timestamp===!1?Vd:Ld}function Ho(){return{}}function bs(e){return e}function Mr(){}function Vd(){return!1}function Ld(){return Date.now()}function yv(){return Math.round(Date.now()/1e3)}function Sv(){return new Date(Date.now()).toISOString()}function vv(){function e(t){return typeof t<"u"&&t}try{return typeof C<"u"?C:(Object.defineProperty(Object.prototype,"globalThis",{get:function(){return delete Object.prototype.globalThis,this.globalThis=this},configurable:!0}),C)}catch{return e(self)||e(window)||e(this)||{}}}zo.exports.default=pt;zo.exports.pino=pt});var QC={};Vs(QC,{DefaultFieldsToInclude:()=>Ps,EcommerceDefaultFieldsToInclude:()=>Zd,HighlightUtils:()=>Mi,MinimumFieldsToInclude:()=>ri,ResultTemplatesHelpers:()=>Gp,buildContext:()=>Qp,buildController:()=>_t,buildDictionaryFieldContext:()=>$p,buildInteractiveResult:()=>Up,buildRecommendationEngine:()=>Wd,buildRecommendationList:()=>Lp,buildResultTemplatesManager:()=>zp,getAnalyticsNextApiBaseUrl:()=>Vn,getOrganizationEndpoint:()=>Ie,getSampleRecommendationEngineConfiguration:()=>Es,loadAdvancedSearchQueryActions:()=>Pv,loadClickAnalyticsActions:()=>Vv,loadConfigurationActions:()=>Rv,loadContextActions:()=>Tv,loadDebugActions:()=>Nv,loadDictionaryFieldContextActions:()=>Fv,loadFieldActions:()=>Dv,loadPaginationActions:()=>Ns,loadPipelineActions:()=>Mv,loadRecommendationActions:()=>_v,loadSearchConfigurationActions:()=>Ev,loadSearchHubActions:()=>qv});module.exports=tf(QC);p();u();d();l();var Mi={};Vs(Mi,{escape:()=>rr,getHighlightedSuggestion:()=>Lf,highlightString:()=>Vf});p();u();d();l();p();u();d();l();function Of(e,t){let r=`
17
+ */(function(g,f){if(typeof exports=="object"&&typeof module<"u"){module.exports=f(require)}else if("function"==typeof define&&define.amd){define("CoveoHeadlessRecommendation",["crypto"],function(_d_0){var d={"crypto":_d_0},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"},gReq=function(r){var mod=r in gN?g[gN[r]]:g[r];return mod};g["CoveoHeadlessRecommendation"]=f(gReq)}})(typeof globalThis<"u"?globalThis:typeof self<"u"?self:this,function(require){var exports={};var __exports=exports;var module={exports};"use strict";var Yp=Object.create;var Br=Object.defineProperty;var Jp=Object.getOwnPropertyDescriptor;var Xp=Object.getOwnPropertyNames;var Zp=Object.getPrototypeOf,ef=Object.prototype.hasOwnProperty;var tf=(e,t,r)=>t in e?Br(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Qr=(e,t)=>()=>(e&&(t=e(e=0)),t);var Se=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),js=(e,t)=>{for(var r in t)Br(e,r,{get:t[r],enumerable:!0})},Us=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Xp(t))!ef.call(e,o)&&o!==r&&Br(e,o,{get:()=>t[o],enumerable:!(n=Jp(t,o))||n.enumerable});return e};var je=(e,t,r)=>(r=e!=null?Yp(Zp(e)):{},Us(t||!e||!e.__esModule?Br(r,"default",{value:e,enumerable:!0}):r,e)),rf=e=>Us(Br({},"__esModule",{value:!0}),e);var pe=(e,t,r)=>tf(e,typeof t!="symbol"?t+"":t,r);var C,c=Qr(()=>{"use strict";C=typeof globalThis<"u"?globalThis:window});function On(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?On=function(t){return typeof t}:On=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},On(e)}function af(){"navigator"in this||(this.navigator={}),typeof this.navigator.sendBeacon!="function"&&(this.navigator.sendBeacon=sf.bind(this))}function sf(e,t){var r=this.event&&this.event.type,n=r==="unload"||r==="beforeunload",o="XMLHttpRequest"in this?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP");o.open("POST",e,!n),o.withCredentials=!0,o.setRequestHeader("Accept","*/*"),nf(t)?(o.setRequestHeader("Content-Type","text/plain;charset=UTF-8"),o.responseType="text"):of(t)&&t.type&&o.setRequestHeader("Content-Type",t.type);try{o.send(t)}catch{return!1}return!0}var nf,of,u=Qr(()=>{"use strict";nf=function(t){return typeof t=="string"},of=function(t){return t instanceof Blob};af.call((typeof window>"u"?"undefined":On(window))==="object"?window:{})});var Oi=Se($r=>{"use strict";d();c();l();u();Object.defineProperty($r,"__esModule",{value:!0});function Bs(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function cf(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function uf(e,t,r){return t=Zt(t),df(e,zs()?Reflect.construct(t,r||[],Zt(e).constructor):t.apply(e,r))}function Ti(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Qs(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,gf(n.key),n)}}function Fi(e,t,r){return t&&Qs(e.prototype,t),r&&Qs(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function $s(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=hf(e))||t&&e&&typeof e.length=="number"){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(f){throw f},f:o}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
18
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var i,a=!0,m=!1;return{s:function(){r=r.call(e)},n:function(){var f=r.next();return a=f.done,f},e:function(f){m=!0,i=f},f:function(){try{a||r.return==null||r.return()}finally{if(m)throw i}}}}function Pi(){return Pi=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=pf(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(arguments.length<3?e:r):o.value}},Pi.apply(null,arguments)}function Zt(e){return Zt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Zt(e)}function lf(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ii(e,t)}function zs(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(zs=function(){return!!e})()}function df(e,t){if(t&&(typeof t=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return cf(e)}function Ii(e,t){return Ii=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},Ii(e,t)}function pf(e,t){for(;!{}.hasOwnProperty.call(e,t)&&(e=Zt(e))!==null;);return e}function ff(e,t,r,n){var o=Pi(Zt(1&n?e.prototype:e),t,r);return 2&n&&typeof o=="function"?function(i){return o.apply(r,i)}:o}function mf(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function gf(e){var t=mf(e,"string");return typeof t=="symbol"?t:t+""}function hf(e,t){if(e){if(typeof e=="string")return Bs(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Bs(e,t):void 0}}(function(e){return{NativeAbortSignal:e.AbortSignal,NativeAbortController:e.AbortController}})(typeof self<"u"?self:global);function yf(e){var t;try{t=new Event("abort")}catch{typeof document<"u"?document.createEvent?(t=document.createEvent("Event"),t.initEvent("abort",!1,!1)):(t=document.createEventObject(),t.type="abort"):t={type:"abort",bubbles:!1,cancelable:!1}}return t.reason=e,t}function Sf(e){if(e===void 0)if(typeof document>"u")e=new Error("This operation was aborted"),e.name="AbortError";else try{e=new DOMException("signal is aborted without reason"),Object.defineProperty(e,"name",{value:"AbortError"})}catch{e=new Error("This operation was aborted"),e.name="AbortError"}return e}var Hs=function(){function e(){Ti(this,e),Object.defineProperty(this,"listeners",{value:{},writable:!0,configurable:!0})}return Fi(e,[{key:"addEventListener",value:function(r,n,o){r in this.listeners||(this.listeners[r]=[]),this.listeners[r].push({callback:n,options:o})}},{key:"removeEventListener",value:function(r,n){if(r in this.listeners){for(var o=this.listeners[r],i=0,a=o.length;i<a;i++)if(o[i].callback===n){o.splice(i,1);return}}}},{key:"dispatchEvent",value:function(r){var n=this;if(r.type in this.listeners){for(var o=this.listeners[r.type],i=o.slice(),a=function(){var h=i[m];try{h.callback.call(n,r)}catch(y){Promise.resolve().then(function(){throw y})}h.options&&h.options.once&&n.removeEventListener(r.type,h.callback)},m=0,f=i.length;m<f;m++)a();return!r.defaultPrevented}}}])}(),ki=function(e){function t(){var r;return Ti(this,t),r=uf(this,t),r.listeners||Hs.call(r),Object.defineProperty(r,"aborted",{value:!1,writable:!0,configurable:!0}),Object.defineProperty(r,"onabort",{value:null,writable:!0,configurable:!0}),Object.defineProperty(r,"reason",{value:void 0,writable:!0,configurable:!0}),r}return lf(t,e),Fi(t,[{key:"toString",value:function(){return"[object AbortSignal]"}},{key:"dispatchEvent",value:function(n){n.type==="abort"&&(this.aborted=!0,typeof this.onabort=="function"&&this.onabort.call(this,n)),ff(t,"dispatchEvent",this,3)([n])}},{key:"throwIfAborted",value:function(){var n=this.aborted,o=this.reason,i=o===void 0?"Aborted":o;if(n)throw i}}],[{key:"timeout",value:function(n){var o=new Dn;return setTimeout(function(){return o.abort(new DOMException("This signal is timeout in ".concat(n,"ms"),"TimeoutError"))},n),o.signal}},{key:"any",value:function(n){var o=new Dn;function i(){o.abort(this.reason),a()}function a(){var h=$s(n),y;try{for(h.s();!(y=h.n()).done;){var S=y.value;S.removeEventListener("abort",i)}}catch(g){h.e(g)}finally{h.f()}}var m=$s(n),f;try{for(m.s();!(f=m.n()).done;){var p=f.value;if(p.aborted){o.abort(p.reason);break}else p.addEventListener("abort",i)}}catch(h){m.e(h)}finally{m.f()}return o.signal}}])}(Hs),Dn=function(){function e(){Ti(this,e),Object.defineProperty(this,"signal",{value:new ki,writable:!0,configurable:!0})}return Fi(e,[{key:"abort",value:function(r){var n=Sf(r),o=yf(n);this.signal.reason=n,this.signal.dispatchEvent(o)}},{key:"toString",value:function(){return"[object AbortController]"}}])}();typeof Symbol<"u"&&Symbol.toStringTag&&(Dn.prototype[Symbol.toStringTag]="AbortController",ki.prototype[Symbol.toStringTag]="AbortSignal");function vf(e){return e.__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL?(console.log("__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL=true is set, will force install polyfill"),!0):typeof e.Request=="function"&&!e.Request.prototype.hasOwnProperty("signal")||!e.AbortController}function Cf(e){typeof e=="function"&&(e={fetch:e});var t=e,r=t.fetch,n=t.Request,o=n===void 0?r.Request:n,i=t.AbortController,a=t.__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL,m=a===void 0?!1:a;if(!vf({fetch:r,Request:o,AbortController:i,__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL:m}))return{fetch:r,Request:f};var f=o;(f&&!f.prototype.hasOwnProperty("signal")||m)&&(f=function(S,g){var v;g&&g.signal&&(v=g.signal,delete g.signal);var R=new o(S,g);return v&&Object.defineProperty(R,"signal",{writable:!1,enumerable:!1,configurable:!0,value:v}),R},f.prototype=o.prototype);var p=r,h=function(S,g){var v=f&&f.prototype.isPrototypeOf(S)?S.signal:g?g.signal:void 0;if(v){var R;try{R=new DOMException("Aborted","AbortError")}catch{R=new Error("Aborted"),R.name="AbortError"}if(v.aborted)return Promise.reject(R);var I=new Promise(function(x,T){v.addEventListener("abort",function(){return T(R)},{once:!0})});return g&&g.signal&&delete g.signal,Promise.race([I,p(S,g)])}return p(S,g)};return{fetch:h,Request:f}}$r.AbortController=Dn;$r.AbortSignal=ki;$r.abortableFetch=Cf});var Ws,s,b,l=Qr(()=>{"use strict";Ws=je(Oi(),1),s=je(Oi(),1),{fetch:b}=(0,Ws.abortableFetch)({fetch})});function Hr(e){if(Ff.test(e)||e.trim()==="")throw new TypeError("Invalid character in header field name");return e.trim().toLowerCase()}function Di(e){return e.replace(kf,"")}function zr(e){if(typeof e!="string"||e.length===0)return!1;for(let t=0;t<e.length;t++){let r=e.charCodeAt(t);if(r>127||!Of(r))return!1}return!0}function Of(e){return![127,32,"(",")","<",">","@",",",";",":","\\","\"","/","[","]","?","=","{","}"].includes(e)}function Ks(e){if(typeof e!="string"||e.trim()!==e)return!1;for(let t=0;t<e.length;t++){let r=e.charCodeAt(t);if(r===0||r===10||r===13)return!1}return!0}var bf,ec,Af,tc,wf,xf,Rf,Ef,Pf,If,Tf,Ff,Gs,kf,er,Mi,Ys,Js,Xs,Zs,A,nc=Qr(()=>{"use strict";d();c();l();u();bf=Object.create,ec=Object.defineProperty,Af=Object.getOwnPropertyDescriptor,tc=Object.getOwnPropertyNames,wf=Object.getPrototypeOf,xf=Object.prototype.hasOwnProperty,Rf=(e,t)=>function(){return t||(0,e[tc(e)[0]])((t={exports:{}}).exports,t),t.exports},Ef=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of tc(t))!xf.call(e,o)&&o!==r&&ec(e,o,{get:()=>t[o],enumerable:!(n=Af(t,o))||n.enumerable});return e},Pf=(e,t,r)=>(r=e!=null?bf(wf(e)):{},Ef(t||!e||!e.__esModule?ec(r,"default",{value:e,enumerable:!0}):r,e)),If=Rf({"node_modules/set-cookie-parser/lib/set-cookie.js"(e,t){"use strict";var r={decodeValues:!0,map:!1,silent:!1};function n(f){return typeof f=="string"&&!!f.trim()}function o(f,p){var h=f.split(";").filter(n),y=h.shift(),S=i(y),g=S.name,v=S.value;p=p?Object.assign({},r,p):r;try{v=p.decodeValues?decodeURIComponent(v):v}catch(I){console.error("set-cookie-parser encountered an error while decoding a cookie with value '"+v+"'. Set options.decodeValues to false to disable this feature.",I)}var R={name:g,value:v};return h.forEach(function(I){var x=I.split("="),T=x.shift().trimLeft().toLowerCase(),w=x.join("=");T==="expires"?R.expires=new Date(w):T==="max-age"?R.maxAge=parseInt(w,10):T==="secure"?R.secure=!0:T==="httponly"?R.httpOnly=!0:T==="samesite"?R.sameSite=w:R[T]=w}),R}function i(f){var p="",h="",y=f.split("=");return y.length>1?(p=y.shift(),h=y.join("=")):h=f,{name:p,value:h}}function a(f,p){if(p=p?Object.assign({},r,p):r,!f)return p.map?{}:[];if(f.headers)if(typeof f.headers.getSetCookie=="function")f=f.headers.getSetCookie();else if(f.headers["set-cookie"])f=f.headers["set-cookie"];else{var h=f.headers[Object.keys(f.headers).find(function(S){return S.toLowerCase()==="set-cookie"})];!h&&f.headers.cookie&&!p.silent&&console.warn("Warning: set-cookie-parser appears to have been called on a request object. It is designed to parse Set-Cookie headers from responses, not Cookie headers from requests. Set the option {silent: true} to suppress this warning."),f=h}if(Array.isArray(f)||(f=[f]),p=p?Object.assign({},r,p):r,p.map){var y={};return f.filter(n).reduce(function(S,g){var v=o(g,p);return S[v.name]=v,S},y)}else return f.filter(n).map(function(S){return o(S,p)})}function m(f){if(Array.isArray(f))return f;if(typeof f!="string")return[];var p=[],h=0,y,S,g,v,R;function I(){for(;h<f.length&&/\s/.test(f.charAt(h));)h+=1;return h<f.length}function x(){return S=f.charAt(h),S!=="="&&S!==";"&&S!==","}for(;h<f.length;){for(y=h,R=!1;I();)if(S=f.charAt(h),S===","){for(g=h,h+=1,I(),v=h;h<f.length&&x();)h+=1;h<f.length&&f.charAt(h)==="="?(R=!0,h=v,p.push(f.substring(y,g)),y=h):h=g+1}else h+=1;(!R||h>=f.length)&&p.push(f.substring(y,f.length))}return p}t.exports=a,t.exports.parse=a,t.exports.parseString=o,t.exports.splitCookiesString=m}}),Tf=Pf(If()),Ff=/[^a-z0-9\-#$%&'*+.^_`|~]/i;Gs=[`
19
+ `,"\r","\t"," "],kf=new RegExp(`(^[${Gs.join("")}]|$[${Gs.join("")}])`,"g");er=Symbol("normalizedHeaders"),Mi=Symbol("rawHeaderNames"),Ys=", ",A=class rc{constructor(t){this[Js]={},this[Xs]=new Map,this[Zs]="Headers",["Headers","HeadersPolyfill"].includes(t?.constructor.name)||t instanceof rc||typeof C.Headers<"u"&&t instanceof C.Headers?t.forEach((n,o)=>{this.append(o,n)},this):Array.isArray(t)?t.forEach(([r,n])=>{this.append(r,Array.isArray(n)?n.join(Ys):n)}):t&&Object.getOwnPropertyNames(t).forEach(r=>{let n=t[r];this.append(r,Array.isArray(n)?n.join(Ys):n)})}[(Js=er,Xs=Mi,Zs=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}*keys(){for(let[t]of this.entries())yield t}*values(){for(let[,t]of this.entries())yield t}*entries(){let t=Object.keys(this[er]).sort((r,n)=>r.localeCompare(n));for(let r of t)if(r==="set-cookie")for(let n of this.getSetCookie())yield[r,n];else yield[r,this.get(r)]}has(t){if(!zr(t))throw new TypeError(`Invalid header name "${t}"`);return this[er].hasOwnProperty(Hr(t))}get(t){if(!zr(t))throw TypeError(`Invalid header name "${t}"`);return this[er][Hr(t)]??null}set(t,r){if(!zr(t)||!Ks(r))return;let n=Hr(t),o=Di(r);this[er][n]=Di(o),this[Mi].set(n,t)}append(t,r){if(!zr(t)||!Ks(r))return;let n=Hr(t),o=Di(r),i=this.has(n)?`${this.get(n)}, ${o}`:o;this.set(t,i)}delete(t){if(!zr(t)||!this.has(t))return;let r=Hr(t);delete this[er][r],this[Mi].delete(r)}forEach(t,r){for(let[n,o]of this.entries())t.call(r,o,n,this)}getSetCookie(){let t=this.get("set-cookie");return t===null?[]:t===""?[""]:(0,Tf.splitCookiesString)(t)}}});var d=Qr(()=>{"use strict";nc()});var mc=Se(Kr=>{"use strict";d();c();l();u();var Vn=Kr&&Kr.__assign||function(){return Vn=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},Vn.apply(this,arguments)};Object.defineProperty(Kr,"__esModule",{value:!0});var zf={delayFirstAttempt:!1,jitter:"none",maxDelay:1/0,numOfAttempts:10,retry:function(){return!0},startingDelay:100,timeMultiple:2};function Wf(e){var t=Vn(Vn({},zf),e);return t.numOfAttempts<1&&(t.numOfAttempts=1),t}Kr.getSanitizedOptions=Wf});var gc=Se(Vi=>{"use strict";d();c();l();u();Object.defineProperty(Vi,"__esModule",{value:!0});function Gf(e){var t=Math.random()*e;return Math.round(t)}Vi.fullJitter=Gf});var hc=Se(Li=>{"use strict";d();c();l();u();Object.defineProperty(Li,"__esModule",{value:!0});function Kf(e){return e}Li.noJitter=Kf});var yc=Se(ji=>{"use strict";d();c();l();u();Object.defineProperty(ji,"__esModule",{value:!0});var Yf=gc(),Jf=hc();function Xf(e){switch(e.jitter){case"full":return Yf.fullJitter;case"none":default:return Jf.noJitter}}ji.JitterFactory=Xf});var Bi=Se(Ui=>{"use strict";d();c();l();u();Object.defineProperty(Ui,"__esModule",{value:!0});var Zf=yc(),em=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=Zf.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}();Ui.Delay=em});var Sc=Se(nt=>{"use strict";d();c();l();u();var tm=nt&&nt.__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)}}(),rm=nt&&nt.__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 m(h){try{p(n.next(h))}catch(y){a(y)}}function f(h){try{p(n.throw(h))}catch(y){a(y)}}function p(h){h.done?i(h.value):o(h.value).then(m,f)}p((n=n.apply(e,t||[])).next())})},nm=nt&&nt.__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:m(0),throw:m(1),return:m(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function m(p){return function(h){return f([p,h])}}function f(p){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,o&&(i=p[0]&2?o.return:p[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,p[1])).done)return i;switch(o=0,i&&(p=[p[0]&2,i.value]),p[0]){case 0:case 1:i=p;break;case 4:return r.label++,{value:p[1],done:!1};case 5:r.label++,o=p[1],p=[0];continue;case 7:p=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(p[0]===6||p[0]===2)){r=0;continue}if(p[0]===3&&(!i||p[1]>i[0]&&p[1]<i[3])){r.label=p[1];break}if(p[0]===6&&r.label<i[1]){r.label=i[1],i=p;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(p);break}i[2]&&r.ops.pop(),r.trys.pop();continue}p=t.call(e,r)}catch(h){p=[6,h],o=0}finally{n=i=0}if(p[0]&5)throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}};Object.defineProperty(nt,"__esModule",{value:!0});var om=Bi(),im=function(e){tm(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.apply=function(){return rm(this,void 0,void 0,function(){return nm(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}(om.Delay);nt.SkipFirstDelay=im});var vc=Se(Yr=>{"use strict";d();c();l();u();var am=Yr&&Yr.__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(Yr,"__esModule",{value:!0});var sm=Bi(),cm=function(e){am(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(sm.Delay);Yr.AlwaysDelay=cm});var Cc=Se(Qi=>{"use strict";d();c();l();u();Object.defineProperty(Qi,"__esModule",{value:!0});var um=Sc(),lm=vc();function dm(e,t){var r=pm(e);return r.setAttemptNumber(t),r}Qi.DelayFactory=dm;function pm(e){return e.delayFirstAttempt?new lm.AlwaysDelay(e):new um.SkipFirstDelay(e)}});var bc=Se(Vt=>{"use strict";d();c();l();u();var $i=Vt&&Vt.__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 m(h){try{p(n.next(h))}catch(y){a(y)}}function f(h){try{p(n.throw(h))}catch(y){a(y)}}function p(h){h.done?i(h.value):o(h.value).then(m,f)}p((n=n.apply(e,t||[])).next())})},Hi=Vt&&Vt.__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:m(0),throw:m(1),return:m(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function m(p){return function(h){return f([p,h])}}function f(p){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,o&&(i=p[0]&2?o.return:p[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,p[1])).done)return i;switch(o=0,i&&(p=[p[0]&2,i.value]),p[0]){case 0:case 1:i=p;break;case 4:return r.label++,{value:p[1],done:!1};case 5:r.label++,o=p[1],p=[0];continue;case 7:p=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(p[0]===6||p[0]===2)){r=0;continue}if(p[0]===3&&(!i||p[1]>i[0]&&p[1]<i[3])){r.label=p[1];break}if(p[0]===6&&r.label<i[1]){r.label=i[1],i=p;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(p);break}i[2]&&r.ops.pop(),r.trys.pop();continue}p=t.call(e,r)}catch(h){p=[6,h],o=0}finally{n=i=0}if(p[0]&5)throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}};Object.defineProperty(Vt,"__esModule",{value:!0});var fm=mc(),mm=Cc();function gm(e,t){return t===void 0&&(t={}),$i(this,void 0,void 0,function(){var r,n;return Hi(this,function(o){switch(o.label){case 0:return r=fm.getSanitizedOptions(t),n=new hm(e,r),[4,n.execute()];case 1:return[2,o.sent()]}})})}Vt.backOff=gm;var hm=function(){function e(t,r){this.request=t,this.options=r,this.attemptNumber=0}return e.prototype.execute=function(){return $i(this,void 0,void 0,function(){var t,r;return Hi(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 $i(this,void 0,void 0,function(){var t;return Hi(this,function(r){switch(r.label){case 0:return t=mm.DelayFactory(this.options,this.attemptNumber),[4,t.apply()];case 1:return r.sent(),[2]}})})},e}()});var qo=Se((Wa,Ga)=>{"use strict";d();c();l();u();(function(e,t){typeof Wa=="object"&&typeof Ga<"u"?Ga.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof C<"u"?C:e||self).dayjs=t()})(Wa,function(){"use strict";var e=1e3,t=6e4,r=36e5,n="millisecond",o="second",i="minute",a="hour",m="day",f="week",p="month",h="quarter",y="year",S="date",g="Invalid Date",v=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,R=/\[([^\]]+)]|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,I={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(U){var L=["th","st","nd","rd"],V=U%100;return"["+U+(L[(V-20)%10]||L[V]||L[0])+"]"}},x=function(U,L,V){var Q=String(U);return!Q||Q.length>=L?U:""+Array(L+1-Q.length).join(V)+U},T={s:x,z:function(U){var L=-U.utcOffset(),V=Math.abs(L),Q=Math.floor(V/60),j=V%60;return(L<=0?"+":"-")+x(Q,2,"0")+":"+x(j,2,"0")},m:function U(L,V){if(L.date()<V.date())return-U(V,L);var Q=12*(V.year()-L.year())+(V.month()-L.month()),j=L.clone().add(Q,p),z=V-j<0,W=L.clone().add(Q+(z?-1:1),p);return+(-(Q+(V-j)/(z?j-W:W-j))||0)},a:function(U){return U<0?Math.ceil(U)||0:Math.floor(U)},p:function(U){return{M:p,y,w:f,d:m,D:S,h:a,m:i,s:o,ms:n,Q:h}[U]||String(U||"").toLowerCase().replace(/s$/,"")},u:function(U){return U===void 0}},w="en",E={};E[w]=I;var N="$isDayjsObject",k=function(U){return U instanceof _||!(!U||!U[N])},P=function U(L,V,Q){var j;if(!L)return w;if(typeof L=="string"){var z=L.toLowerCase();E[z]&&(j=z),V&&(E[z]=V,j=z);var W=L.split("-");if(!j&&W.length>1)return U(W[0])}else{var Y=L.name;E[Y]=L,j=Y}return!Q&&j&&(w=j),j||!Q&&w},F=function(U,L){if(k(U))return U.clone();var V=typeof L=="object"?L:{};return V.date=U,V.args=arguments,new _(V)},O=T;O.l=P,O.i=k,O.w=function(U,L){return F(U,{locale:L.$L,utc:L.$u,x:L.$x,$offset:L.$offset})};var _=function(){function U(V){this.$L=P(V.locale,null,!0),this.parse(V),this.$x=this.$x||V.x||{},this[N]=!0}var L=U.prototype;return L.parse=function(V){this.$d=function(Q){var j=Q.date,z=Q.utc;if(j===null)return new Date(NaN);if(O.u(j))return new Date;if(j instanceof Date)return new Date(j);if(typeof j=="string"&&!/Z$/i.test(j)){var W=j.match(v);if(W){var Y=W[2]-1||0,re=(W[7]||"0").substring(0,3);return z?new Date(Date.UTC(W[1],Y,W[3]||1,W[4]||0,W[5]||0,W[6]||0,re)):new Date(W[1],Y,W[3]||1,W[4]||0,W[5]||0,W[6]||0,re)}}return new Date(j)}(V),this.init()},L.init=function(){var V=this.$d;this.$y=V.getFullYear(),this.$M=V.getMonth(),this.$D=V.getDate(),this.$W=V.getDay(),this.$H=V.getHours(),this.$m=V.getMinutes(),this.$s=V.getSeconds(),this.$ms=V.getMilliseconds()},L.$utils=function(){return O},L.isValid=function(){return this.$d.toString()!==g},L.isSame=function(V,Q){var j=F(V);return this.startOf(Q)<=j&&j<=this.endOf(Q)},L.isAfter=function(V,Q){return F(V)<this.startOf(Q)},L.isBefore=function(V,Q){return this.endOf(Q)<F(V)},L.$g=function(V,Q,j){return O.u(V)?this[Q]:this.set(j,V)},L.unix=function(){return Math.floor(this.valueOf()/1e3)},L.valueOf=function(){return this.$d.getTime()},L.startOf=function(V,Q){var j=this,z=!!O.u(Q)||Q,W=O.p(V),Y=function(ce,me){var ye=O.w(j.$u?Date.UTC(j.$y,me,ce):new Date(j.$y,me,ce),j);return z?ye:ye.endOf(m)},re=function(ce,me){return O.w(j.toDate()[ce].apply(j.toDate("s"),(z?[0,0,0,0]:[23,59,59,999]).slice(me)),j)},se=this.$W,ee=this.$M,ne=this.$D,Z="set"+(this.$u?"UTC":"");switch(W){case y:return z?Y(1,0):Y(31,11);case p:return z?Y(1,ee):Y(0,ee+1);case f:var oe=this.$locale().weekStart||0,he=(se<oe?se+7:se)-oe;return Y(z?ne-he:ne+(6-he),ee);case m:case S:return re(Z+"Hours",0);case a:return re(Z+"Minutes",1);case i:return re(Z+"Seconds",2);case o:return re(Z+"Milliseconds",3);default:return this.clone()}},L.endOf=function(V){return this.startOf(V,!1)},L.$set=function(V,Q){var j,z=O.p(V),W="set"+(this.$u?"UTC":""),Y=(j={},j[m]=W+"Date",j[S]=W+"Date",j[p]=W+"Month",j[y]=W+"FullYear",j[a]=W+"Hours",j[i]=W+"Minutes",j[o]=W+"Seconds",j[n]=W+"Milliseconds",j)[z],re=z===m?this.$D+(Q-this.$W):Q;if(z===p||z===y){var se=this.clone().set(S,1);se.$d[Y](re),se.init(),this.$d=se.set(S,Math.min(this.$D,se.daysInMonth())).$d}else Y&&this.$d[Y](re);return this.init(),this},L.set=function(V,Q){return this.clone().$set(V,Q)},L.get=function(V){return this[O.p(V)]()},L.add=function(V,Q){var j,z=this;V=Number(V);var W=O.p(Q),Y=function(ee){var ne=F(z);return O.w(ne.date(ne.date()+Math.round(ee*V)),z)};if(W===p)return this.set(p,this.$M+V);if(W===y)return this.set(y,this.$y+V);if(W===m)return Y(1);if(W===f)return Y(7);var re=(j={},j[i]=t,j[a]=r,j[o]=e,j)[W]||1,se=this.$d.getTime()+V*re;return O.w(se,this)},L.subtract=function(V,Q){return this.add(-1*V,Q)},L.format=function(V){var Q=this,j=this.$locale();if(!this.isValid())return j.invalidDate||g;var z=V||"YYYY-MM-DDTHH:mm:ssZ",W=O.z(this),Y=this.$H,re=this.$m,se=this.$M,ee=j.weekdays,ne=j.months,Z=j.meridiem,oe=function(me,ye,Te,Le){return me&&(me[ye]||me(Q,z))||Te[ye].slice(0,Le)},he=function(me){return O.s(Y%12||12,me,"0")},ce=Z||function(me,ye,Te){var Le=me<12?"AM":"PM";return Te?Le.toLowerCase():Le};return z.replace(R,function(me,ye){return ye||function(Te){switch(Te){case"YY":return String(Q.$y).slice(-2);case"YYYY":return O.s(Q.$y,4,"0");case"M":return se+1;case"MM":return O.s(se+1,2,"0");case"MMM":return oe(j.monthsShort,se,ne,3);case"MMMM":return oe(ne,se);case"D":return Q.$D;case"DD":return O.s(Q.$D,2,"0");case"d":return String(Q.$W);case"dd":return oe(j.weekdaysMin,Q.$W,ee,2);case"ddd":return oe(j.weekdaysShort,Q.$W,ee,3);case"dddd":return ee[Q.$W];case"H":return String(Y);case"HH":return O.s(Y,2,"0");case"h":return he(1);case"hh":return he(2);case"a":return ce(Y,re,!0);case"A":return ce(Y,re,!1);case"m":return String(re);case"mm":return O.s(re,2,"0");case"s":return String(Q.$s);case"ss":return O.s(Q.$s,2,"0");case"SSS":return O.s(Q.$ms,3,"0");case"Z":return W}return null}(me)||W.replace(":","")})},L.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},L.diff=function(V,Q,j){var z,W=this,Y=O.p(Q),re=F(V),se=(re.utcOffset()-this.utcOffset())*t,ee=this-re,ne=function(){return O.m(W,re)};switch(Y){case y:z=ne()/12;break;case p:z=ne();break;case h:z=ne()/3;break;case f:z=(ee-se)/6048e5;break;case m:z=(ee-se)/864e5;break;case a:z=ee/r;break;case i:z=ee/t;break;case o:z=ee/e;break;default:z=ee}return j?z:O.a(z)},L.daysInMonth=function(){return this.endOf(p).$D},L.$locale=function(){return E[this.$L]},L.locale=function(V,Q){if(!V)return this.$L;var j=this.clone(),z=P(V,Q,!0);return z&&(j.$L=z),j},L.clone=function(){return O.w(this.$d,this)},L.toDate=function(){return new Date(this.valueOf())},L.toJSON=function(){return this.isValid()?this.toISOString():null},L.toISOString=function(){return this.$d.toISOString()},L.toString=function(){return this.$d.toUTCString()},U}(),$=_.prototype;return F.prototype=$,[["$ms",n],["$s",o],["$m",i],["$H",a],["$W",m],["$M",p],["$y",y],["$D",S]].forEach(function(U){$[U[1]]=function(L){return this.$g(L,U[0],U[1])}}),F.extend=function(U,L){return U.$i||(U(L,_,F),U.$i=!0),F},F.locale=P,F.isDayjs=k,F.unix=function(U){return F(1e3*U)},F.en=E[w],F.Ls=E,F.p={},F})});var Al=Se((Ka,Ya)=>{"use strict";d();c();l();u();(function(e,t){typeof Ka=="object"&&typeof Ya<"u"?Ya.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof C<"u"?C:e||self).dayjs_plugin_quarterOfYear=t()})(Ka,function(){"use strict";var e="month",t="quarter";return function(r,n){var o=n.prototype;o.quarter=function(m){return this.$utils().u(m)?Math.ceil((this.month()+1)/3):this.month(this.month()%3+3*(m-1))};var i=o.add;o.add=function(m,f){return m=Number(m),this.$utils().p(f)===t?this.add(3*m,e):i.bind(this)(m,f)};var a=o.startOf;o.startOf=function(m,f){var p=this.$utils(),h=!!p.u(f)||f;if(p.p(m)===t){var y=this.quarter()-1;return h?this.month(3*y).startOf(e).startOf("day"):this.month(3*y+2).endOf(e).endOf("day")}return a.bind(this)(m,f)}}})});var wl=Se((Ja,Xa)=>{"use strict";d();c();l();u();(function(e,t){typeof Ja=="object"&&typeof Xa<"u"?Xa.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof C<"u"?C:e||self).dayjs_plugin_customParseFormat=t()})(Ja,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={},m=function(v){return(v=+v)+(v>68?1900:2e3)},f=function(v){return function(R){this[v]=+R}},p=[/[+-]\d\d:?(\d\d)?|Z/,function(v){(this.zone||(this.zone={})).offset=function(R){if(!R||R==="Z")return 0;var I=R.match(/([+-]|\d\d)/g),x=60*I[1]+(+I[2]||0);return x===0?0:I[0]==="+"?-x:x}(v)}],h=function(v){var R=a[v];return R&&(R.indexOf?R:R.s.concat(R.f))},y=function(v,R){var I,x=a.meridiem;if(x){for(var T=1;T<=24;T+=1)if(v.indexOf(x(T,0,R))>-1){I=T>12;break}}else I=v===(R?"pm":"PM");return I},S={A:[i,function(v){this.afternoon=y(v,!1)}],a:[i,function(v){this.afternoon=y(v,!0)}],Q:[r,function(v){this.month=3*(v-1)+1}],S:[r,function(v){this.milliseconds=100*+v}],SS:[n,function(v){this.milliseconds=10*+v}],SSS:[/\d{3}/,function(v){this.milliseconds=+v}],s:[o,f("seconds")],ss:[o,f("seconds")],m:[o,f("minutes")],mm:[o,f("minutes")],H:[o,f("hours")],h:[o,f("hours")],HH:[o,f("hours")],hh:[o,f("hours")],D:[o,f("day")],DD:[n,f("day")],Do:[i,function(v){var R=a.ordinal,I=v.match(/\d+/);if(this.day=I[0],R)for(var x=1;x<=31;x+=1)R(x).replace(/\[|\]/g,"")===v&&(this.day=x)}],w:[o,f("week")],ww:[n,f("week")],M:[o,f("month")],MM:[n,f("month")],MMM:[i,function(v){var R=h("months"),I=(h("monthsShort")||R.map(function(x){return x.slice(0,3)})).indexOf(v)+1;if(I<1)throw new Error;this.month=I%12||I}],MMMM:[i,function(v){var R=h("months").indexOf(v)+1;if(R<1)throw new Error;this.month=R%12||R}],Y:[/[+-]?\d+/,f("year")],YY:[n,function(v){this.year=m(v)}],YYYY:[/\d{4}/,f("year")],Z:p,ZZ:p};function g(v){var R,I;R=v,I=a&&a.formats;for(var x=(v=R.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(F,O,_){var $=_&&_.toUpperCase();return O||I[_]||e[_]||I[$].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(U,L,V){return L||V.slice(1)})})).match(t),T=x.length,w=0;w<T;w+=1){var E=x[w],N=S[E],k=N&&N[0],P=N&&N[1];x[w]=P?{regex:k,parser:P}:E.replace(/^\[|\]$/g,"")}return function(F){for(var O={},_=0,$=0;_<T;_+=1){var U=x[_];if(typeof U=="string")$+=U.length;else{var L=U.regex,V=U.parser,Q=F.slice($),j=L.exec(Q)[0];V.call(O,j),F=F.replace(j,"")}}return function(z){var W=z.afternoon;if(W!==void 0){var Y=z.hours;W?Y<12&&(z.hours+=12):Y===12&&(z.hours=0),delete z.afternoon}}(O),O}}return function(v,R,I){I.p.customParseFormat=!0,v&&v.parseTwoDigitYear&&(m=v.parseTwoDigitYear);var x=R.prototype,T=x.parse;x.parse=function(w){var E=w.date,N=w.utc,k=w.args;this.$u=N;var P=k[1];if(typeof P=="string"){var F=k[2]===!0,O=k[3]===!0,_=F||O,$=k[2];O&&($=k[2]),a=this.$locale(),!F&&$&&(a=I.Ls[$]),this.$d=function(Q,j,z,W){try{if(["x","X"].indexOf(j)>-1)return new Date((j==="X"?1e3:1)*Q);var Y=g(j)(Q),re=Y.year,se=Y.month,ee=Y.day,ne=Y.hours,Z=Y.minutes,oe=Y.seconds,he=Y.milliseconds,ce=Y.zone,me=Y.week,ye=new Date,Te=ee||(re||se?1:ye.getDate()),Le=re||ye.getFullYear(),ft=0;re&&!se||(ft=se>0?se-1:ye.getMonth());var Jt,Xt=ne||0,Ur=Z||0,Ri=oe||0,Ei=he||0;return ce?new Date(Date.UTC(Le,ft,Te,Xt,Ur,Ri,Ei+60*ce.offset*1e3)):z?new Date(Date.UTC(Le,ft,Te,Xt,Ur,Ri,Ei)):(Jt=new Date(Le,ft,Te,Xt,Ur,Ri,Ei),me&&(Jt=W(Jt).week(me).toDate()),Jt)}catch{return new Date("")}}(E,P,N,I),this.init(),$&&$!==!0&&(this.$L=this.locale($).$L),_&&E!=this.format(P)&&(this.$d=new Date("")),a={}}else if(P instanceof Array)for(var U=P.length,L=1;L<=U;L+=1){k[1]=P[L-1];var V=I.apply(this,k);if(V.isValid()){this.$d=V.$d,this.$L=V.$L,this.init();break}L===U&&(this.$d=new Date(""))}else T.call(this,w)}}})});var Cd=Se((kN,vd)=>{"use strict";d();c();l();u();var GS=/(^|; )Coveo-Pendragon=([^;]*)/;vd.exports=()=>GS.exec(document.cookie)?.pop()||null});var bd=Se((Ss,vs)=>{"use strict";d();c();l();u();(function(e,t){typeof Ss=="object"&&typeof vs<"u"?vs.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof C<"u"?C:e||self).dayjs_plugin_timezone=t()})(Ss,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(h,y,S){S===void 0&&(S={});var g=new Date(h),v=function(R,I){I===void 0&&(I={});var x=I.timeZoneName||"short",T=R+"|"+x,w=t[T];return w||(w=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:R,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:x}),t[T]=w),w}(y,S);return v.formatToParts(g)},m=function(h,y){for(var S=a(h,y),g=[],v=0;v<S.length;v+=1){var R=S[v],I=R.type,x=R.value,T=e[I];T>=0&&(g[T]=parseInt(x,10))}var w=g[3],E=w===24?0:w,N=g[0]+"-"+g[1]+"-"+g[2]+" "+E+":"+g[4]+":"+g[5]+":000",k=+h;return(o.utc(N).valueOf()-(k-=k%1e3))/6e4},f=n.prototype;f.tz=function(h,y){h===void 0&&(h=i);var S,g=this.utcOffset(),v=this.toDate(),R=v.toLocaleString("en-US",{timeZone:h}),I=Math.round((v-new Date(R))/1e3/60),x=15*-Math.round(v.getTimezoneOffset()/15)-I;if(!Number(x))S=this.utcOffset(0,y);else if(S=o(R,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(x,!0),y){var T=S.utcOffset();S=S.add(g-T,"minute")}return S.$x.$timezone=h,S},f.offsetName=function(h){var y=this.$x.$timezone||o.tz.guess(),S=a(this.valueOf(),y,{timeZoneName:h}).find(function(g){return g.type.toLowerCase()==="timezonename"});return S&&S.value};var p=f.startOf;f.startOf=function(h,y){if(!this.$x||!this.$x.$timezone)return p.call(this,h,y);var S=o(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return p.call(S,h,y).tz(this.$x.$timezone,!0)},o.tz=function(h,y,S){var g=S&&y,v=S||y||i,R=m(+o(),v);if(typeof h!="string")return o(h).tz(v);var I=function(E,N,k){var P=E-60*N*1e3,F=m(P,k);if(N===F)return[P,N];var O=m(P-=60*(F-N)*1e3,k);return F===O?[P,F]:[E-60*Math.min(F,O)*1e3,Math.max(F,O)]}(o.utc(h,g).valueOf(),R,v),x=I[0],T=I[1],w=o(x).utcOffset(T);return w.$x.$timezone=v,w},o.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},o.tz.setDefault=function(h){i=h}}})});var Ad=Se((Cs,bs)=>{"use strict";d();c();l();u();(function(e,t){typeof Cs=="object"&&typeof bs<"u"?bs.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof C<"u"?C:e||self).dayjs_plugin_utc=t()})(Cs,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(g){var v={date:g,utc:!0,args:arguments};return new o(v)},a.utc=function(g){var v=i(this.toDate(),{locale:this.$L,utc:!0});return g?v.add(this.utcOffset(),e):v},a.local=function(){return i(this.toDate(),{locale:this.$L,utc:!1})};var m=a.parse;a.parse=function(g){g.utc&&(this.$u=!0),this.$utils().u(g.$offset)||(this.$offset=g.$offset),m.call(this,g)};var f=a.init;a.init=function(){if(this.$u){var g=this.$d;this.$y=g.getUTCFullYear(),this.$M=g.getUTCMonth(),this.$D=g.getUTCDate(),this.$W=g.getUTCDay(),this.$H=g.getUTCHours(),this.$m=g.getUTCMinutes(),this.$s=g.getUTCSeconds(),this.$ms=g.getUTCMilliseconds()}else f.call(this)};var p=a.utcOffset;a.utcOffset=function(g,v){var R=this.$utils().u;if(R(g))return this.$u?0:R(this.$offset)?p.call(this):this.$offset;if(typeof g=="string"&&(g=function(w){w===void 0&&(w="");var E=w.match(t);if(!E)return null;var N=(""+E[0]).match(r)||["-",0,0],k=N[0],P=60*+N[1]+ +N[2];return P===0?0:k==="+"?P:-P}(g),g===null))return this;var I=Math.abs(g)<=16?60*g:g,x=this;if(v)return x.$offset=I,x.$u=g===0,x;if(g!==0){var T=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(x=this.local().add(I+T,e)).$offset=I,x.$x.$localOffset=T}else x=this.utc();return x};var h=a.format;a.format=function(g){var v=g||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return h.call(this,v)},a.valueOf=function(){var g=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*g},a.isUTC=function(){return!!this.$u},a.toISOString=function(){return this.toDate().toISOString()},a.toString=function(){return this.toDate().toUTCString()};var y=a.toDate;a.toDate=function(g){return g==="s"&&this.$offset?i(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():y.call(this)};var S=a.diff;a.diff=function(g,v,R){if(g&&this.$u===g.$u)return S.call(this,g,v,R);var I=this.local(),x=i(g).local();return S.call(I,x,v,R)}}})});var Nd=Se((UV,qd)=>{"use strict";d();c();l();u();function iv(e){try{return JSON.stringify(e)}catch{return"\"[Circular]\""}}qd.exports=av;function av(e,t,r){var n=r&&r.stringify||iv,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 m=1;m<i;m++)a[m]=n(t[m]);return a.join(" ")}if(typeof e!="string")return e;var f=t.length;if(f===0)return e;for(var p="",h=1-o,y=-1,S=e&&e.length||0,g=0;g<S;){if(e.charCodeAt(g)===37&&g+1<S){switch(y=y>-1?y:0,e.charCodeAt(g+1)){case 100:case 102:if(h>=f||t[h]==null)break;y<g&&(p+=e.slice(y,g)),p+=Number(t[h]),y=g+2,g++;break;case 105:if(h>=f||t[h]==null)break;y<g&&(p+=e.slice(y,g)),p+=Math.floor(Number(t[h])),y=g+2,g++;break;case 79:case 111:case 106:if(h>=f||t[h]===void 0)break;y<g&&(p+=e.slice(y,g));var v=typeof t[h];if(v==="string"){p+="'"+t[h]+"'",y=g+2,g++;break}if(v==="function"){p+=t[h].name||"<anonymous>",y=g+2,g++;break}p+=n(t[h]),y=g+2,g++;break;case 115:if(h>=f)break;y<g&&(p+=e.slice(y,g)),p+=String(t[h]),y=g+2,g++;break;case 37:y<g&&(p+=e.slice(y,g)),p+="%",y=g+2,g++,h--;break}++h}++g}return y===-1?e:(y<S&&(p+=e.slice(y)),p)}});var Bd=Se((zV,Ko)=>{"use strict";d();c();l();u();var _d=Nd();Ko.exports=pt;var En=bv().console||{},sv={mapHttpRequest:Go,mapHttpResponse:Go,wrapRequestSerializer:ws,wrapResponseSerializer:ws,wrapErrorSerializer:ws,req:Go,res:Go,err:Ld,errWithCause:Ld};function Et(e,t){return e==="silent"?1/0:t.levels.values[e]}var Es=Symbol("pino.logFuncs"),xs=Symbol("pino.hierarchy"),cv={error:"log",fatal:"error",warn:"error",info:"log",debug:"log",trace:"log"};function Vd(e,t){let r={logger:t,parent:e[xs]};t[xs]=r}function uv(e,t,r){let n={};t.forEach(o=>{n[o]=r[o]?r[o]:En[o]||En[cv[o]||"log"]||Dr}),e[Es]=n}function lv(e,t){return Array.isArray(e)?e.filter(function(n){return n!=="!stdSerializers.err"}):e===!0?Object.keys(t):!1}function pt(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||En;e.browser.write&&(e.browser.asObject=!0);let n=e.serializers||{},o=lv(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||{}),m=["error","fatal","warn","info","debug","trace"].concat(a);typeof r=="function"&&m.forEach(function(R){r[R]=r}),(e.enabled===!1||e.browser.disabled)&&(e.level="silent");let f=e.level||"info",p=Object.create(r);p.log||(p.log=Dr),uv(p,m,r),Vd({},p),Object.defineProperty(p,"levelVal",{get:y}),Object.defineProperty(p,"level",{get:S,set:g});let h={transmit:t,serialize:o,asObject:e.browser.asObject,formatters:e.browser.formatters,levels:m,timestamp:Sv(e),messageKey:e.messageKey||"msg",onChild:e.onChild||Dr};p.levels=dv(e),p.level=f,p.setMaxListeners=p.getMaxListeners=p.emit=p.addListener=p.on=p.prependListener=p.once=p.prependOnceListener=p.removeListener=p.removeAllListeners=p.listeners=p.listenerCount=p.eventNames=p.write=p.flush=Dr,p.serializers=n,p._serialize=o,p._stdErrSerialize=i,p.child=function(...R){return v.call(this,h,...R)},t&&(p._logEvent=Rs());function y(){return Et(this.level,this)}function S(){return this._level}function g(R){if(R!=="silent"&&!this.levels.values[R])throw Error("unknown level "+R);this._level=R,Wt(this,h,p,"error"),Wt(this,h,p,"fatal"),Wt(this,h,p,"warn"),Wt(this,h,p,"info"),Wt(this,h,p,"debug"),Wt(this,h,p,"trace"),a.forEach(I=>{Wt(this,h,p,I)})}function v(R,I,x){if(!I)throw new Error("missing bindings for child Pino");x=x||{},o&&I.serializers&&(x.serializers=I.serializers);let T=x.serializers;if(o&&T){var w=Object.assign({},n,T),E=e.browser.serialize===!0?Object.keys(w):o;delete I.serializers,Ps([I],E,w,this._stdErrSerialize)}function N(P){this._childLevel=(P._childLevel|0)+1,this.bindings=I,w&&(this.serializers=w,this._serialize=E),t&&(this._logEvent=Rs([].concat(P._logEvent.bindings,I)))}N.prototype=this;let k=new N(this);return Vd(this,k),k.child=function(...P){return v.call(this,R,...P)},k.level=x.level||this.level,R.onChild(k),k}return p}function dv(e){let t=e.customLevels||{},r=Object.assign({},pt.levels.values,t),n=Object.assign({},pt.levels.labels,pv(t));return{values:r,labels:n}}function pv(e){let t={};return Object.keys(e).forEach(function(r){t[e[r]]=r}),t}pt.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"}};pt.stdSerializers=sv;pt.stdTimeFunctions=Object.assign({},{nullTime:jd,epochTime:Ud,unixTime:vv,isoTime:Cv});function fv(e){let t=[];e.bindings&&t.push(e.bindings);let r=e[xs];for(;r.parent;)r=r.parent,r.logger.bindings&&t.push(r.logger.bindings);return t.reverse()}function Wt(e,t,r,n){if(Object.defineProperty(e,n,{value:Et(e.level,r)>Et(n,r)?Dr:r[Es][n],writable:!0,enumerable:!0,configurable:!0}),e[n]===Dr){if(!t.transmit)return;let i=t.transmit.level||e.level,a=Et(i,r);if(Et(n,r)<a)return}e[n]=gv(e,t,r,n);let o=fv(e);o.length!==0&&(e[n]=mv(o,e[n]))}function mv(e,t){return function(){return t.apply(this,[...e,...arguments])}}function gv(e,t,r,n){return function(o){return function(){let a=t.timestamp(),m=new Array(arguments.length),f=Object.getPrototypeOf&&Object.getPrototypeOf(this)===En?En:this;for(var p=0;p<m.length;p++)m[p]=arguments[p];var h=!1;if(t.serialize&&(Ps(m,this._serialize,this.serializers,this._stdErrSerialize),h=!0),t.asObject||t.formatters?o.call(f,hv(this,n,m,a,t)):o.apply(f,m),t.transmit){let y=t.transmit.level||e._level,S=Et(y,r),g=Et(n,r);if(g<S)return;yv(this,{ts:a,methodLevel:n,methodValue:g,transmitLevel:y,transmitValue:r.levels.values[t.transmit.level||e._level],send:t.transmit.send,val:Et(e._level,r)},m,h)}}}(e[Es][n])}function hv(e,t,r,n,o){let{level:i,log:a=S=>S}=o.formatters||{},m=r.slice(),f=m[0],p={};if(n&&(p.time=n),i){let S=i(t,e.levels.values[t]);Object.assign(p,S)}else p.level=e.levels.values[t];let h=(e._childLevel|0)+1;if(h<1&&(h=1),f!==null&&typeof f=="object"){for(;h--&&typeof m[0]=="object";)Object.assign(p,m.shift());f=m.length?_d(m.shift(),m):void 0}else typeof f=="string"&&(f=_d(m.shift(),m));return f!==void 0&&(p[o.messageKey]=f),a(p)}function Ps(e,t,r,n){for(let o in e)if(n&&e[o]instanceof Error)e[o]=pt.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 yv(e,t,r,n=!1){let o=t.send,i=t.ts,a=t.methodLevel,m=t.methodValue,f=t.val,p=e._logEvent.bindings;n||Ps(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(h){return p.indexOf(h)===-1}),e._logEvent.level.label=a,e._logEvent.level.value=m,o(a,e._logEvent,f),e._logEvent=Rs(p)}function Rs(e){return{ts:0,messages:[],bindings:e||[],level:{label:"",value:0}}}function Ld(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 Sv(e){return typeof e.timestamp=="function"?e.timestamp:e.timestamp===!1?jd:Ud}function Go(){return{}}function ws(e){return e}function Dr(){}function jd(){return!1}function Ud(){return Date.now()}function vv(){return Math.round(Date.now()/1e3)}function Cv(){return new Date(Date.now()).toISOString()}function bv(){function e(t){return typeof t<"u"&&t}try{return typeof C<"u"?C:(Object.defineProperty(Object.prototype,"globalThis",{get:function(){return delete Object.prototype.globalThis,this.globalThis=this},configurable:!0}),C)}catch{return e(self)||e(window)||e(this)||{}}}Ko.exports.default=pt;Ko.exports.pino=pt});var $C={};js($C,{DefaultFieldsToInclude:()=>Ts,EcommerceDefaultFieldsToInclude:()=>ep,HighlightUtils:()=>_i,MinimumFieldsToInclude:()=>ii,ResultTemplatesHelpers:()=>Kp,buildContext:()=>$p,buildController:()=>_t,buildDictionaryFieldContext:()=>Hp,buildInteractiveResult:()=>Bp,buildRecommendationEngine:()=>Kd,buildRecommendationList:()=>jp,buildResultTemplatesManager:()=>Wp,getAnalyticsNextApiBaseUrl:()=>Ln,getOrganizationEndpoint:()=>Ie,getSampleRecommendationEngineConfiguration:()=>Is,loadAdvancedSearchQueryActions:()=>Tv,loadClickAnalyticsActions:()=>jv,loadConfigurationActions:()=>Pv,loadContextActions:()=>kv,loadDebugActions:()=>Vv,loadDictionaryFieldContextActions:()=>Ov,loadFieldActions:()=>qv,loadPaginationActions:()=>Vs,loadPipelineActions:()=>Nv,loadRecommendationActions:()=>Lv,loadSearchConfigurationActions:()=>Iv,loadSearchHubActions:()=>_v});module.exports=rf($C);d();c();l();u();var _i={};js(_i,{escape:()=>tr,getHighlightedSuggestion:()=>jf,highlightString:()=>Lf});d();c();l();u();d();c();l();u();function Df(e,t){let r=`
20
20
  The following properties are invalid:
21
21
 
22
22
  ${e.join(`
23
23
  `)}
24
24
 
25
25
  ${t}
26
- `;return new Gr(r)}var Gr=class extends Error{constructor(e){super(e),this.name="SchemaValidationError"}},Fe=class{constructor(e){this.definition=e}validate(e={},t=""){let r={...this.default,...e},n=[];for(let o in this.definition){let i=this.definition[o].validate(r[o]);i&&n.push(`${o}: ${i}`)}if(n.length)throw Of(n,t);return r}get default(){let e={};for(let t in this.definition){let r=this.definition[t].default;r!==void 0&&(e[t]=r)}return e}},de=class{constructor(e={}){this.baseConfig=e}validate(e){return this.baseConfig.required&&X(e)?"value is required.":null}get default(){return this.baseConfig.default instanceof Function?this.baseConfig.default():this.baseConfig.default}get required(){return this.baseConfig.required===!0}};function Ce(e){return e===void 0}function Df(e){return e===null}function X(e){return Ce(e)||Df(e)}var J=class{constructor(e={}){pe(this,"value");this.config=e,this.value=new de(e)}validate(e){let t=this.value.validate(e);return t||(Mf(e)?e<this.config.min?`minimum value of ${this.config.min} not respected.`:e>this.config.max?`maximum value of ${this.config.max} not respected.`:null:"value is not a number.")}get default(){return this.value.default}get required(){return this.value.required}};function Mf(e){return Ce(e)||rc(e)}function rc(e){return typeof e=="number"&&!isNaN(e)}var te=class{constructor(e={}){pe(this,"value");this.value=new de(e)}validate(e){let t=this.value.validate(e);return t||(qf(e)?null:"value is not a boolean.")}get default(){return this.value.default}get required(){return this.value.required}};function qf(e){return Ce(e)||nc(e)}function nc(e){return typeof e=="boolean"}var Nf=/^\d{4}(-\d\d(-\d\d(T\d\d:\d\d(:\d\d)?(\.\d+)?(([+-]\d\d:\d\d)|Z)?)?)?)?$/i,H=class{constructor(e={}){pe(this,"value");pe(this,"config");this.config={emptyAllowed:!0,url:!1,...e},this.value=new de(this.config)}validate(e){let{emptyAllowed:t,url:r,regex:n,constrainTo:o,ISODate:i}=this.config,a=this.value.validate(e);if(a)return a;if(Ce(e))return null;if(!Mn(e))return"value is not a string.";if(!t&&!e.length)return"value is an empty string.";if(r)try{new URL(e)}catch{return"value is not a valid URL."}return n&&!n.test(e)?`value did not match provided regex ${n}`:o&&!o.includes(e)?`value should be one of: ${o.join(", ")}.`:i&&!(Nf.test(e)&&new Date(e).toString()!=="Invalid Date")?"value is not a valid ISO8601 date string":null}get default(){return this.value.default}get required(){return this.value.required}};function Mn(e){return Object.prototype.toString.call(e)==="[object String]"}var K=class{constructor(e={}){pe(this,"config");this.config={options:{required:!1},values:{},...e}}validate(e){if(Ce(e))return this.config.options.required?"value is required and is currently undefined":null;if(!oc(e))return"value is not an object";for(let[r,n]of Object.entries(this.config.values))if(n.required&&X(e[r]))return`value does not contain ${r}`;let t="";for(let[r,n]of Object.entries(this.config.values)){let o=e[r],i=n.validate(o);i!==null&&(t+=" "+i)}return t===""?null:t}get default(){}get required(){return!!this.config.options.required}};function oc(e){return e!==void 0&&typeof e=="object"}var ie=class{constructor(e={}){pe(this,"value");this.config=e,this.value=new de(this.config)}validate(e){if(!X(e)&&!Array.isArray(e))return"value is not an array";let t=this.value.validate(e);if(t!==null)return t;if(X(e))return null;if(this.config.max!==void 0&&e.length>this.config.max)return`value contains more than ${this.config.max}`;if(this.config.min!==void 0&&e.length<this.config.min)return`value contains less than ${this.config.min}`;if(this.config.each!==void 0){let r="";return e.forEach(n=>{this.config.each.required&&X(n)&&(r=`value is null or undefined: ${e.join(",")}`);let o=this.validatePrimitiveValue(n,this.config.each);o!==null&&(r+=" "+o)}),r===""?null:r}return null}validatePrimitiveValue(e,t){return nc(e)||Mn(e)||rc(e)||oc(e)?t.validate(e):"value is not a primitive value"}get default(){}get required(){return this.value.required}};function ic(e){return Array.isArray(e)}var Oi=class{constructor(e){pe(this,"value");this.config=e,this.value=new de(e)}validate(e){let t=this.value.validate(e);return t!==null?t:Ce(e)||Object.values(this.config.enum).find(n=>n===e)?null:"value is not in enum."}get default(){return this.value.default}get required(){return this.value.required}};p();u();d();l();function ac(e){return Array.isArray(e)}function tr(e){return e.trim()===""}var _f=new Set(["1",1,"yes",!0]);function sc(){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=>_f.has(r))}function cc(e){let t={};for(let[r,n]of e)t[r]=n;return t}function Kr(e){if(typeof e!="object"||!e)return e;try{return JSON.parse(JSON.stringify(e))}catch{return e}}function Vf(e){if(tr(e.openingDelimiter)||tr(e.closingDelimiter))throw Error("delimiters should be a non-empty string");if(X(e.content)||tr(e.content))return e.content;if(e.highlights.length===0)return rr(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,m=a+i.length;if(m>t)break;r+=rr(e.content.slice(n,a)),r+=e.openingDelimiter,r+=rr(e.content.slice(a,m)),r+=e.closingDelimiter,n=m}return n!==t&&(r+=rr(e.content.slice(n))),r}function Lf(e,t){return e=rr(e),e.replace(/\[(.*?)\]|\{(.*?)\}|\((.*?)\)/g,(r,n,o,i)=>n?Di(n,t.notMatchDelimiters):o?Di(o,t.exactMatchDelimiters):i?Di(i,t.correctionDelimiters):r)}function Di(e,t){return t?t.open+e+t.close:e}function rr(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}p();u();d();l();p();u();d();l();var qn=e=>e;p();u();d();l();var uc=e=>e,lc=e=>e,dc=e=>e;p();u();d();l();p();u();d();l();function Nn(){return{answerSnippet:"",documentId:{contentIdKey:"",contentIdValue:""},question:"",relatedQuestions:[],score:0}}function We(){return{response:{results:[],searchUid:"",totalCountFiltered:0,facets:[],generateAutomaticFacets:{facets:[]},queryCorrections:[],triggers:[],questionAnswer:Nn(),pipeline:"",splitTestRun:"",termsToHighlight:{},phrasesToHighlight:{},extendedResults:{}},duration:0,queryExecuted:"",error:null,automaticallyCorrected:!1,isLoading:!1,results:[],searchResponseId:"",requestId:"",questionAnswer:Nn(),extendedResults:{}}}p();u();d();l();function mt(e){let{url:t,accessToken:r,organizationId:n,authentication:o,...i}=e;return i}var gt=e=>{let{response:t}=e;return t.body?jf(e):Uf(t)},jf=e=>Qf(e)?$f(e):Bf(e)?e.body:{message:"unknown",statusCode:0,type:"unknown"},Uf=e=>{let t=JSON.parse(JSON.stringify(e,Object.getOwnPropertyNames(e)));return{...t,message:`Client side error: ${t.message||""}`,statusCode:400,type:"ClientError"}};function Bf(e){return e.body.statusCode!==void 0}function Qf(e){return e.body.exception!==void 0}var $f=e=>({message:e.body.exception.code,statusCode:e.response.status,type:e.body.exception.code});p();u();d();l();var wc=je(vc(),1);p();u();d();l();p();u();d();l();var hm="recommendation-internal-options",QA=Symbol.for(hm);var Ge=new Error("Failed to load reducers."),nr=class extends Error{constructor(){super(),this.name="ExpiredToken",this.message="The token being used to perform the request is expired."}};var Lt=class extends Error{constructor(r,n){super();pe(this,"statusCode");this.name="Disconnected",this.message=`Client could not connect to the following URL: ${r}`,this.statusCode=n??0}};p();u();d();l();function Cc(e){let t=[];for(let r in e){let n=encodeURIComponent(r),o=encodeURIComponent(e[r]);t.push(`${n}=${o}`)}return t.join("&")}function bc(e){return typeof e!="object"||!e?!1:Object.values(e).every(ym)}function ym(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"}function Ac(e){return e===429}var $e=class e{static call(t){return _asyncToGenerator(function*(){let r=Sm(t),{logger:n}=t,o=yield e.preprocessRequest(r,t);n.info(o,"Platform request");let{url:i,...a}=o,m=/*#__PURE__*/function(){var _ref=_asyncToGenerator(function*(){let f=yield b(i,a);if(Ac(f.status))throw f;return f});return function m(){return _ref.apply(this,arguments)}}();try{let f=yield(0,wc.backOff)(m,{retry:c=>{let h=c&&Ac(c.status);return h&&n.info("Platform retrying request"),h}});switch(f.status){case 419:case 401:throw n.info("Platform renewing token"),new nr;case 404:throw new Lt(i,f.status);default:return n.info({response:f,requestInfo:o},"Platform response"),f}}catch(f){return f.message==="Failed to fetch"?new Lt(i):f}})()}static preprocessRequest(t,r){return _asyncToGenerator(function*(){let{origin:n,preprocessRequest:o,logger:i,requestMetadata:a}=r,{signal:m,...f}=t,c=Kr(f);try{let h=yield o(t,n,a);return{...t,...h}}catch(h){i.error(h,"Platform request preprocessing failed. Returning default request options.")}return c})()}};function Ie(e,t="prod",r="platform"){let n=t==="prod"?"":t,o=r==="platform"?"":`.${r}`;return`https://${e}${o}.org${n}.coveo.com`}function ht(e,t="prod"){return`${Ie(e,t)}/rest/search/v2`}function Vn(e,t="prod"){return`${Ie(e,t,"analytics")}/rest/organizations/${e}/events/v1`}function Sm(e){let{url:t,method:r,requestParams:n,contentType:o,accessToken:i,signal:a}=e,m=e.method==="POST"||e.method==="PUT",f=vm(n,o);return{url:t,method:r,headers:{"Content-Type":o,Authorization:`Bearer ${i}`,...e.headers},...(m&&{body:f}),signal:a}}function vm(e,t){return t==="application/x-www-form-urlencoded"?bc(e)?Cc(e):"":JSON.stringify(e)}p();u();d();l();var yt=class{constructor(){pe(this,"currentAbortController",null)}enqueue(t,r){var _this=this;return _asyncToGenerator(function*(){let n=_this.currentAbortController,o=_this.currentAbortController=new s.AbortController;n&&(r.warnOnAbort&&r.logger.warn("Cancelling current pending search query"),n.abort());try{return yield t(o?.signal??null)}finally{_this.currentAbortController===o&&(_this.currentAbortController=null)}})()}};p();u();d();l();p();u();d();l();var Xr=class{constructor(t){pe(this,"_basePath");pe(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}};p();u();d();l();function xc(e){return((e.headers.get("content-type")||"").split(";").find(n=>n.indexOf("charset=")!==-1)||"").split("=")[1]||"UTF-8"}p();u();d();l();var ot=(e,t,r,n)=>{let o=new Xr(`${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 Rc=/*#__PURE__*/function(){var _ref2=_asyncToGenerator(function*(e,t){let r=yield $e.call({...ot(e,"POST","application/x-www-form-urlencoded","/html"),requestParams:mt(e),requestMetadata:{method:"html"},...t});if(r instanceof Error)throw r;let n=xc(r),o=yield r.arrayBuffer(),a=new TextDecoder(n).decode(o);return Cm(a)?{success:a}:{error:gt({response:r,body:a})}});return function Rc(_x,_x2){return _ref2.apply(this,arguments)}}();function Cm(e){return typeof e=="string"}p();u();d();l();function bm(e){return{statusCode:e.statusCode,type:e.name,message:e.message}}function Am(e){return{statusCode:e.code,type:e.name,message:e.message,ignored:!0}}function Ln(e,t){if(t&&e.name==="AbortError")return{error:Am(e)};if(e instanceof Lt)return{error:bm(e)};throw e}var jn=class{constructor(t){this.options=t;pe(this,"apiCallsQueues",{unknown:new yt,mainSearch:new yt,facetValues:new yt,foldingCollection:new yt,instantResults:new yt})}plan(t){var _this2=this;return _asyncToGenerator(function*(){let r=yield $e.call({...ot(t,"POST","application/json","/plan"),requestParams:mt(t),requestMetadata:{method:"plan"},..._this2.options});if(r instanceof Error)return Ln(r);let n=yield r.json();return xm(n)?{success:n}:{error:gt({response:r,body:n})}})()}querySuggest(t){var _this3=this;return _asyncToGenerator(function*(){let r=yield $e.call({...ot(t,"POST","application/json","/querySuggest"),requestMetadata:{method:"querySuggest"},requestParams:mt(t),..._this3.options});if(r instanceof Error)return Ln(r);let n=yield r.json(),o={response:r,body:n};return wm(n)?{success:(yield _this3.options.postprocessQuerySuggestResponseMiddleware(o)).body}:{error:gt(o)}})()}search(t,r){var _this4=this;return _asyncToGenerator(function*(){let n=r?.origin??"unknown",o=yield _this4.apiCallsQueues[n].enqueue(m=>$e.call({...ot(t,"POST","application/json",""),requestParams:mt(t),requestMetadata:{method:"search",origin:r?.origin},..._this4.options,signal:m??void 0}),{logger:_this4.options.logger,warnOnAbort:!r?.disableAbortWarning});if(o instanceof Error)return Ln(o,r?.disableAbortWarning);let i=yield o.json(),a={response:o,body:i};return Ec(i)?(a.body=Pc(i),{success:(yield _this4.options.postprocessSearchResponseMiddleware(a)).body}):{error:gt(a)}})()}facetSearch(t){var _this5=this;return _asyncToGenerator(function*(){let r=yield $e.call({...ot(t,"POST","application/json","/facet"),requestParams:mt(t),requestMetadata:{method:"facetSearch"},..._this5.options});if(r instanceof Error)throw r;let n=yield r.json(),o={response:r,body:n};return(yield _this5.options.postprocessFacetSearchResponseMiddleware(o)).body})()}recommendations(t){var _this6=this;return _asyncToGenerator(function*(){let r=yield $e.call({...ot(t,"POST","application/json",""),requestParams:mt(t),requestMetadata:{method:"recommendations"},..._this6.options});if(r instanceof Error)throw r;let n=yield r.json();if(Ec(n)){let o={response:r,body:n};return o.body=Pc(n),{success:(yield _this6.options.postprocessSearchResponseMiddleware(o)).body}}return{error:gt({response:r,body:n})}})()}html(t){var _this7=this;return _asyncToGenerator(function*(){return Rc(t,{..._this7.options})})()}fieldDescriptions(t){var _this8=this;return _asyncToGenerator(function*(){let r=yield $e.call({...ot(t,"GET","application/json","/fields"),requestParams:{},requestMetadata:{method:"fieldDescriptions"},..._this8.options});if(r instanceof Error)throw r;let n=yield r.json();return Rm(n)?{success:n}:{error:gt({response:r,body:n})}})()}},Un=e=>e.success!==void 0,ke=e=>e.error!==void 0;function Ec(e){return e.results!==void 0}function Pc(e){let t=Nn();return X(e.questionAnswer)?(e.questionAnswer=t,e):(e.questionAnswer={...t,...e.questionAnswer},e)}function wm(e){return e.completions!==void 0}function xm(e){return e.preprocessingOutput!==void 0}function Rm(e){return e.fields!==void 0}p();u();d();l();p();u();d();l();p();u();d();l();function be(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 Em=typeof Symbol=="function"&&Symbol.observable||"@@observable",Ic=Em,Qi=()=>Math.random().toString(36).substring(7).split("").join("."),Pm={INIT:`@@redux/INIT${Qi()}`,REPLACE:`@@redux/REPLACE${Qi()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Qi()}`},Bn=Pm;function Ke(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 $i(e,t,r){if(typeof e!="function")throw new Error(be(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(be(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(be(1));return r($i)(e,t)}let n=e,o=t,i=new Map,a=i,m=0,f=!1;function c(){a===i&&(a=new Map,i.forEach((I,x)=>{a.set(x,I)}))}function h(){if(f)throw new Error(be(3));return o}function y(I){if(typeof I!="function")throw new Error(be(4));if(f)throw new Error(be(5));let x=!0;c();let T=m++;return a.set(T,I),function(){if(x){if(f)throw new Error(be(6));x=!1,c(),a.delete(T),i=null}}}function S(I){if(!Ke(I))throw new Error(be(7));if(typeof I.type>"u")throw new Error(be(8));if(typeof I.type!="string")throw new Error(be(17));if(f)throw new Error(be(9));try{f=!0,o=n(o,I)}finally{f=!1}return(i=a).forEach(T=>{T()}),I}function g(I){if(typeof I!="function")throw new Error(be(10));n=I,S({type:Bn.REPLACE})}function v(){let I=y;return{subscribe(x){if(typeof x!="object"||x===null)throw new Error(be(11));function T(){let E=x;E.next&&E.next(h())}return T(),{unsubscribe:I(T)}},[Ic](){return this}}}return S({type:Bn.INIT}),{dispatch:S,subscribe:y,getState:h,replaceReducer:g,[Ic]:v}}function Im(e){Object.keys(e).forEach(t=>{let r=e[t];if(typeof r(void 0,{type:Bn.INIT})>"u")throw new Error(be(12));if(typeof r(void 0,{type:Bn.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(be(13))})}function or(e){let t=Object.keys(e),r={};for(let a=0;a<t.length;a++){let m=t[a];typeof e[m]=="function"&&(r[m]=e[m])}let n=Object.keys(r),o,i;try{Im(r)}catch(a){i=a}return function(m={},f){if(i)throw i;let c=!1,h={};for(let y=0;y<n.length;y++){let S=n[y],g=r[S],v=m[S],R=g(v,f);if(typeof R>"u"){let I=f&&f.type;throw new Error(be(14))}h[S]=R,c=c||R!==v}return c=c||n.length!==Object.keys(m).length,c?h:m}}function ir(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function Tc(...e){return t=>(r,n)=>{let o=t(r,n),i=()=>{throw new Error(be(15))},a={getState:o.getState,dispatch:(f,...c)=>i(f,...c)},m=e.map(f=>f(a));return i=ir(...m)(o.dispatch),{...o,dispatch:i}}}function Qn(e){return Ke(e)&&"type"in e&&typeof e.type=="string"}p();u();d();l();var ea=Symbol.for("immer-nothing"),Zr=Symbol.for("immer-draftable"),Oe=Symbol.for("immer-state");function Ae(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Ut=Object.getPrototypeOf;function Ne(e){return!!e&&!!e[Oe]}function De(e){return e?Mc(e)||Array.isArray(e)||!!e[Zr]||!!e.constructor?.[Zr]||on(e)||an(e):!1}var Tm=Object.prototype.constructor.toString();function Mc(e){if(!e||typeof e!="object")return!1;let t=Ut(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)===Tm}function ta(e){return Ne(e)||Ae(15,e),e[Oe].base_}function en(e,t){Bt(e)===0?Reflect.ownKeys(e).forEach(r=>{t(r,e[r],e)}):e.forEach((r,n)=>t(n,r,e))}function Bt(e){let t=e[Oe];return t?t.type_:Array.isArray(e)?1:on(e)?2:an(e)?3:0}function tn(e,t){return Bt(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Hi(e,t){return Bt(e)===2?e.get(t):e[t]}function qc(e,t,r){let n=Bt(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function Fm(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function on(e){return e instanceof Map}function an(e){return e instanceof Set}function jt(e){return e.copy_||e.base_}function Gi(e,t){if(on(e))return new Map(e);if(an(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);let r=Mc(e);if(t===!0||t==="class_only"&&!r){let n=Object.getOwnPropertyDescriptors(e);delete n[Oe];let o=Reflect.ownKeys(n);for(let i=0;i<o.length;i++){let a=o[i],m=n[a];m.writable===!1&&(m.writable=!0,m.configurable=!0),(m.get||m.set)&&(n[a]={configurable:!0,writable:!0,enumerable:m.enumerable,value:e[a]})}return Object.create(Ut(e),n)}else{let n=Ut(e);if(n!==null&&r)return{...e};let o=Object.create(n);return Object.assign(o,e)}}function zn(e,t=!1){return Wn(e)||Ne(e)||!De(e)||(Bt(e)>1&&(e.set=e.add=e.clear=e.delete=km),Object.freeze(e),t&&Object.entries(e).forEach(([r,n])=>zn(n,!0))),e}function km(){Ae(2)}function Wn(e){return Object.isFrozen(e)}var Ki={};function Qt(e){let t=Ki[e];return t||Ae(0,e),t}function Om(e,t){Ki[e]||(Ki[e]=t)}var rn;function Nc(){return rn}function Dm(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Fc(e,t){t&&(Qt("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Yi(e){Ji(e),e.drafts_.forEach(Mm),e.drafts_=null}function Ji(e){e===rn&&(rn=e.parent_)}function kc(e){return rn=Dm(rn,e)}function Mm(e){let t=e[Oe];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Oc(e,t){t.unfinalizedDrafts_=t.drafts_.length;let r=t.drafts_[0];return e!==void 0&&e!==r?(r[Oe].modified_&&(Yi(t),Ae(4)),De(e)&&(e=$n(t,e),t.parent_||Hn(t,e)),t.patches_&&Qt("Patches").generateReplacementPatches_(r[Oe].base_,e,t.patches_,t.inversePatches_)):e=$n(t,r,[]),Yi(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==ea?e:void 0}function $n(e,t,r){if(Wn(t))return t;let n=t[Oe];if(!n)return en(t,(o,i)=>Dc(e,n,t,o,i,r)),t;if(n.scope_!==e)return t;if(!n.modified_)return Hn(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),en(i,(m,f)=>Dc(e,n,o,m,f,r,a)),Hn(e,o,!1),r&&e.patches_&&Qt("Patches").generatePatches_(n,r,e.patches_,e.inversePatches_)}return n.copy_}function Dc(e,t,r,n,o,i,a){if(Ne(o)){let m=i&&t&&t.type_!==3&&!tn(t.assigned_,n)?i.concat(n):void 0,f=$n(e,o,m);if(qc(r,n,f),Ne(f))e.canAutoFreeze_=!1;else return}else a&&r.add(o);if(De(o)&&!Wn(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;$n(e,o),(!t||!t.scope_.parent_)&&typeof n!="symbol"&&Object.prototype.propertyIsEnumerable.call(r,n)&&Hn(e,o)}}function Hn(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&zn(t,r)}function qm(e,t){let r=Array.isArray(e),n={type_:r?1:0,scope_:t?t.scope_:Nc(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1},o=n,i=ra;r&&(o=[n],i=nn);let{revoke:a,proxy:m}=Proxy.revocable(o,i);return n.draft_=m,n.revoke_=a,m}var ra={get(e,t){if(t===Oe)return e;let r=jt(e);if(!tn(r,t))return Nm(e,r,t);let n=r[t];return e.finalized_||!De(n)?n:n===zi(e.base_,t)?(Wi(e),e.copy_[t]=Zi(n,e)):n},has(e,t){return t in jt(e)},ownKeys(e){return Reflect.ownKeys(jt(e))},set(e,t,r){let n=_c(jt(e),t);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){let o=zi(jt(e),t),i=o?.[Oe];if(i&&i.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(Fm(r,o)&&(r!==void 0||tn(e.base_,t)))return!0;Wi(e),Xi(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 zi(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Wi(e),Xi(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let r=jt(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty(){Ae(11)},getPrototypeOf(e){return Ut(e.base_)},setPrototypeOf(){Ae(12)}},nn={};en(ra,(e,t)=>{nn[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});nn.deleteProperty=function(e,t){return nn.set.call(this,e,t,void 0)};nn.set=function(e,t,r){return ra.set.call(this,e[0],t,r,e[0])};function zi(e,t){let r=e[Oe];return(r?jt(r):e)[t]}function Nm(e,t,r){let n=_c(t,r);return n?"value"in n?n.value:n.get?.call(e.draft_):void 0}function _c(e,t){if(!(t in e))return;let r=Ut(e);for(;r;){let n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Ut(r)}}function Xi(e){e.modified_||(e.modified_=!0,e.parent_&&Xi(e.parent_))}function Wi(e){e.copy_||(e.copy_=Gi(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var _m=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(f=i,...c){return a.produce(f,h=>r.call(this,h,...c))}}typeof r!="function"&&Ae(6),n!==void 0&&typeof n!="function"&&Ae(7);let o;if(De(t)){let i=kc(this),a=Zi(t,void 0),m=!0;try{o=r(a),m=!1}finally{m?Yi(i):Ji(i)}return Fc(i,n),Oc(o,i)}else if(!t||typeof t!="object"){if(o=r(t),o===void 0&&(o=t),o===ea&&(o=void 0),this.autoFreeze_&&zn(o,!0),n){let i=[],a=[];Qt("Patches").generateReplacementPatches_(t,o,i,a),n(i,a)}return o}else Ae(1,t)},this.produceWithPatches=(t,r)=>{if(typeof t=="function")return(a,...m)=>this.produceWithPatches(a,f=>t(f,...m));let n,o;return[this.produce(t,r,(a,m)=>{n=a,o=m}),n,o]},typeof e?.autoFreeze=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof e?.useStrictShallowCopy=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){De(e)||Ae(8),Ne(e)&&(e=Vc(e));let t=kc(this),r=Zi(e,void 0);return r[Oe].isManual_=!0,Ji(t),r}finishDraft(e,t){let r=e&&e[Oe];(!r||!r.isManual_)&&Ae(9);let{scope_:n}=r;return Fc(n,t),Oc(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=Qt("Patches").applyPatches_;return Ne(e)?n(e,t):this.produce(e,o=>n(o,t))}};function Zi(e,t){let r=on(e)?Qt("MapSet").proxyMap_(e,t):an(e)?Qt("MapSet").proxySet_(e,t):qm(e,t);return(t?t.scope_:Nc()).drafts_.push(r),r}function Vc(e){return Ne(e)||Ae(10,e),Lc(e)}function Lc(e){if(!De(e)||Wn(e))return e;let t=e[Oe],r;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=Gi(e,t.scope_.immer_.useStrictShallowCopy_)}else r=Gi(e,!0);return en(r,(n,o)=>{qc(r,n,Lc(o))}),t&&(t.finalized_=!1),r}function jc(){let t="replace",r="add",n="remove";function o(S,g,v,R){switch(S.type_){case 0:case 2:return a(S,g,v,R);case 1:return i(S,g,v,R);case 3:return m(S,g,v,R)}}function i(S,g,v,R){let{base_:I,assigned_:x}=S,T=S.copy_;T.length<I.length&&([I,T]=[T,I],[v,R]=[R,v]);for(let w=0;w<I.length;w++)if(x[w]&&T[w]!==I[w]){let E=g.concat([w]);v.push({op:t,path:E,value:y(T[w])}),R.push({op:t,path:E,value:y(I[w])})}for(let w=I.length;w<T.length;w++){let E=g.concat([w]);v.push({op:r,path:E,value:y(T[w])})}for(let w=T.length-1;I.length<=w;--w){let E=g.concat([w]);R.push({op:n,path:E})}}function a(S,g,v,R){let{base_:I,copy_:x}=S;en(S.assigned_,(T,w)=>{let E=Hi(I,T),N=Hi(x,T),k=w?tn(I,T)?t:r:n;if(E===N&&k===t)return;let P=g.concat(T);v.push(k===n?{op:k,path:P}:{op:k,path:P,value:N}),R.push(k===r?{op:n,path:P}:k===n?{op:r,path:P,value:y(E)}:{op:t,path:P,value:y(E)})})}function m(S,g,v,R){let{base_:I,copy_:x}=S,T=0;I.forEach(w=>{if(!x.has(w)){let E=g.concat([T]);v.push({op:n,path:E,value:w}),R.unshift({op:r,path:E,value:w})}T++}),T=0,x.forEach(w=>{if(!I.has(w)){let E=g.concat([T]);v.push({op:r,path:E,value:w}),R.unshift({op:n,path:E,value:w})}T++})}function f(S,g,v,R){v.push({op:t,path:[],value:g===ea?void 0:g}),R.push({op:t,path:[],value:S})}function c(S,g){return g.forEach(v=>{let{path:R,op:I}=v,x=S;for(let N=0;N<R.length-1;N++){let k=Bt(x),P=R[N];typeof P!="string"&&typeof P!="number"&&(P=""+P),(k===0||k===1)&&(P==="__proto__"||P==="constructor")&&Ae(19),typeof x=="function"&&P==="prototype"&&Ae(19),x=Hi(x,P),typeof x!="object"&&Ae(18,R.join("/"))}let T=Bt(x),w=h(v.value),E=R[R.length-1];switch(I){case t:switch(T){case 2:return x.set(E,w);case 3:Ae(16);default:return x[E]=w}case r:switch(T){case 1:return E==="-"?x.push(w):x.splice(E,0,w);case 2:return x.set(E,w);case 3:return x.add(w);default:return x[E]=w}case n:switch(T){case 1:return x.splice(E,1);case 2:return x.delete(E);case 3:return x.delete(v.value);default:return delete x[E]}default:Ae(17,I)}}),S}function h(S){if(!De(S))return S;if(Array.isArray(S))return S.map(h);if(on(S))return new Map(Array.from(S.entries()).map(([v,R])=>[v,h(R)]));if(an(S))return new Set(Array.from(S).map(h));let g=Object.create(Ut(S));for(let v in S)g[v]=h(S[v]);return tn(S,Zr)&&(g[Zr]=S[Zr]),g}function y(S){return Ne(S)?h(S):S}Om("Patches",{applyPatches_:c,generatePatches_:o,generateReplacementPatches_:f})}var _e=new _m,it=_e.produce,Gn=_e.produceWithPatches.bind(_e),Ax=_e.setAutoFreeze.bind(_e),wx=_e.setUseStrictShallowCopy.bind(_e),na=_e.applyPatches.bind(_e),xx=_e.createDraft.bind(_e),Rx=_e.finishDraft.bind(_e);p();u();d();l();function Vm(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function Lm(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function jm(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 Uc=e=>Array.isArray(e)?e:[e];function Um(e){let t=Array.isArray(e[0])?e[0]:e;return jm(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function Bm(e,t){let r=[],{length:n}=e;for(let o=0;o<n;o++)r.push(e[o].apply(null,t));return r}var Ox=Symbol();var Dx=Object.getPrototypeOf({});var Qm=class{constructor(e){this.value=e}deref(){return this.value}},$m=typeof WeakRef<"u"?WeakRef:Qm,Hm=0,Bc=1;function Kn(){return{s:Hm,v:void 0,o:null,p:null}}function ar(e,t={}){let r=Kn(),{resultEqualityCheck:n}=t,o,i=0;function a(){let m=r,{length:f}=arguments;for(let y=0,S=f;y<S;y++){let g=arguments[y];if(typeof g=="function"||typeof g=="object"&&g!==null){let v=m.o;v===null&&(m.o=v=new WeakMap);let R=v.get(g);R===void 0?(m=Kn(),v.set(g,m)):m=R}else{let v=m.p;v===null&&(m.p=v=new Map);let R=v.get(g);R===void 0?(m=Kn(),v.set(g,m)):m=R}}let c=m,h;if(m.s===Bc)h=m.v;else if(h=e.apply(null,arguments),i++,n){let y=o?.deref?.()??o;y!=null&&n(y,h)&&(h=y,i!==0&&i--),o=typeof h=="object"&&h!==null||typeof h=="function"?new $m(h):h}return c.s=Bc,c.v=h,h}return a.clearCache=()=>{r=Kn(),a.resetResultsCount()},a.resultsCount=()=>i,a.resetResultsCount=()=>{i=0},a}function Qc(e,...t){let r=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,n=(...o)=>{let i=0,a=0,m,f={},c=o.pop();typeof c=="object"&&(f=c,c=o.pop()),Vm(c,`createSelector expects an output function after the inputs, but received: [${typeof c}]`);let h={...r,...f},{memoize:y,memoizeOptions:S=[],argsMemoize:g=ar,argsMemoizeOptions:v=[],devModeChecks:R={}}=h,I=Uc(S),x=Uc(v),T=Um(o),w=y(function(){return i++,c.apply(null,arguments)},...I),E=!0,N=g(function(){a++;let P=Bm(T,arguments);return m=w.apply(null,P),m},...x);return Object.assign(N,{resultFunc:c,memoizedResultFunc:w,dependencies:T,dependencyRecomputations:()=>a,resetDependencyRecomputations:()=>{a=0},lastResult:()=>m,recomputations:()=>i,resetRecomputations:()=>{i=0},memoize:y,argsMemoize:g})};return Object.assign(n,{withTypes:()=>n}),n}var fe=Qc(ar),zm=Object.assign((e,t=fe)=>{Lm(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,m,f)=>(a[r[f]]=m,a),{}))},{withTypes:()=>zm});p();u();d();l();function $c(e){return({dispatch:r,getState:n})=>o=>i=>typeof i=="function"?i(r,n,e):o(i)}var Hc=$c(),zc=$c;var Wm=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?ir:ir.apply(null,arguments)},Jx=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}},Gm=e=>e&&typeof e.match=="function";function D(e,t){function r(...n){if(t){let o=t(...n);if(!o)throw new Error(He(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=>Qn(n)&&n.type===e,r}var Jc=class sn extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,sn.prototype)}static get[Symbol.species](){return sn}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new sn(...t[0].concat(this)):new sn(...t.concat(this))}};function Wc(e){return De(e)?it(e,()=>{}):e}function Gc(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function Km(e){return typeof e=="boolean"}var Ym=()=>function(t){let{thunk:r=!0,immutableCheck:n=!0,serializableCheck:o=!0,actionCreatorCheck:i=!0}=t??{},a=new Jc;return r&&(Km(r)?a.push(Hc):a.push(zc(r.extraArgument))),a},cn="RTK_autoBatch",cr=()=>e=>({payload:e,meta:{[cn]:!0}}),Kc=e=>t=>{setTimeout(t,e)},Jm=(e={type:"raf"})=>t=>(...r)=>{let n=t(...r),o=!0,i=!1,a=!1,m=new Set,f=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Kc(10):e.type==="callback"?e.queueNotification:Kc(e.timeout),c=()=>{a=!1,i&&(i=!1,m.forEach(h=>h()))};return Object.assign({},n,{subscribe(h){let y=()=>o&&h(),S=n.subscribe(y);return m.add(h),()=>{S(),m.delete(h)}},dispatch(h){try{return o=!h?.meta?.[cn],i=!o,i&&(a||(a=!0,f(c))),n.dispatch(h)}finally{o=!0}}})},Xm=e=>function(r){let{autoBatch:n=!0}=r??{},o=new Jc(e);return n&&o.push(Jm(typeof n=="object"?n:void 0)),o};function Xc(e){let t=Ym(),{reducer:r=void 0,middleware:n,devTools:o=!0,preloadedState:i=void 0,enhancers:a=void 0}=e||{},m;if(typeof r=="function")m=r;else if(Ke(r))m=or(r);else throw new Error(He(1));let f;typeof n=="function"?f=n(t):f=t();let c=ir;o&&(c=Wm({trace:!1,...(typeof o=="object"&&o)}));let h=Tc(...f),y=Xm(h),S=typeof a=="function"?a(y):y(),g=c(...S);return $i(m,i,g)}function Zc(e){let t={},r=[],n,o={addCase(i,a){let m=typeof i=="string"?i:i.type;if(!m)throw new Error(He(28));if(m in t)throw new Error(He(29));return t[m]=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 Zm(e){return typeof e=="function"}function ge(e,t){let[r,n,o]=Zc(t),i;if(Zm(e))i=()=>Wc(e());else{let m=Wc(e);i=()=>m}function a(m=i(),f){let c=[r[f.type],...n.filter(({matcher:h})=>h(f)).map(({reducer:h})=>h)];return c.filter(h=>!!h).length===0&&(c=[o]),c.reduce((h,y)=>{if(y)if(Ne(h)){let g=y(h,f);return g===void 0?h:g}else{if(De(h))return it(h,S=>y(S,f));{let S=y(h,f);if(S===void 0){if(h===null)return h;throw Error("A case reducer on a non-draftable value must not return undefined")}return S}}return h},m)}return a.getInitialState=i,a}var eu=(e,t)=>Gm(e)?e.match(t):e(t);function Ye(...e){return t=>e.some(r=>eu(r,t))}function sr(...e){return t=>e.every(r=>eu(r,t))}function Jn(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 un(e){return typeof e[0]=="function"&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function Xn(...e){return e.length===0?t=>Jn(t,["pending"]):un(e)?Ye(...e.map(t=>t.pending)):Xn()(e[0])}function $t(...e){return e.length===0?t=>Jn(t,["rejected"]):un(e)?Ye(...e.map(t=>t.rejected)):$t()(e[0])}function ln(...e){let t=r=>r&&r.meta&&r.meta.rejectedWithValue;return e.length===0?sr($t(...e),t):un(e)?sr($t(...e),t):ln()(e[0])}function at(...e){return e.length===0?t=>Jn(t,["fulfilled"]):un(e)?Ye(...e.map(t=>t.fulfilled)):at()(e[0])}function Zn(...e){return e.length===0?t=>Jn(t,["pending","fulfilled","rejected"]):un(e)?Ye(...e.flatMap(t=>[t.pending,t.rejected,t.fulfilled])):Zn()(e[0])}var eg="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",eo=(e=21)=>{let t="",r=e;for(;r--;)t+=eg[Math.random()*64|0];return t},tg=["name","message","stack","code"],oa=class{constructor(e,t){pe(this,"_type");this.payload=e,this.meta=t}},Yc=class{constructor(e,t){pe(this,"_type");this.payload=e,this.meta=t}},rg=e=>{if(typeof e=="object"&&e!==null){let t={};for(let r of tg)typeof e[r]=="string"&&(t[r]=e[r]);return t}return{message:String(e)}},ue=(()=>{function e(t,r,n){let o=D(t+"/fulfilled",(f,c,h,y)=>({payload:f,meta:{...(y||{}),arg:h,requestId:c,requestStatus:"fulfilled"}})),i=D(t+"/pending",(f,c,h)=>({payload:void 0,meta:{...(h||{}),arg:c,requestId:f,requestStatus:"pending"}})),a=D(t+"/rejected",(f,c,h,y,S)=>({payload:y,error:(n&&n.serializeError||rg)(f||"Rejected"),meta:{...(S||{}),arg:h,requestId:c,rejectedWithValue:!!y,requestStatus:"rejected",aborted:f?.name==="AbortError",condition:f?.name==="ConditionError"}}));function m(f){return(c,h,y)=>{let S=n?.idGenerator?n.idGenerator(f):eo(),g=new s.AbortController,v,R;function I(T){R=T,g.abort()}let x=_asyncToGenerator(function*(){let T;try{let E=n?.condition?.(f,{getState:h,extra:y});if(og(E)&&(E=yield E),E===!1||g.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let N=new Promise((k,P)=>{v=()=>{P({name:"AbortError",message:R||"Aborted"})},g.signal.addEventListener("abort",v)});c(i(S,f,n?.getPendingMeta?.({requestId:S,arg:f},{getState:h,extra:y}))),T=yield Promise.race([N,Promise.resolve(r(f,{dispatch:c,getState:h,extra:y,requestId:S,signal:g.signal,abort:I,rejectWithValue:(k,P)=>new oa(k,P),fulfillWithValue:(k,P)=>new Yc(k,P)})).then(k=>{if(k instanceof oa)throw k;return k instanceof Yc?o(k.payload,S,f,k.meta):o(k,S,f)})])}catch(E){T=E instanceof oa?a(null,S,f,E.payload,E.meta):a(E,S,f)}finally{v&&g.signal.removeEventListener("abort",v)}return n&&!n.dispatchConditionRejection&&a.match(T)&&T.meta.condition||c(T),T})();return Object.assign(x,{abort:I,requestId:S,arg:f,unwrap(){return x.then(ng)}})}}return Object.assign(m,{pending:i,rejected:a,fulfilled:o,settled:Ye(a,o),typePrefix:t})}return e.withTypes=()=>e,e})();function ng(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function og(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var tu=Symbol.for("rtk-slice-createasyncthunk"),rR={[tu]:ue};function ig(e,t){return`${e}/${t}`}function ag({creators:e}={}){let t=e?.asyncThunk?.[tu];return function(n){let{name:o,reducerPath:i=o}=n;if(!o)throw new Error(He(11));typeof process<"u";let a=(typeof n.reducers=="function"?n.reducers(cg()):n.reducers)||{},m=Object.keys(a),f={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},c={addCase(T,w){let E=typeof T=="string"?T:T.type;if(!E)throw new Error(He(12));if(E in f.sliceCaseReducersByType)throw new Error(He(13));return f.sliceCaseReducersByType[E]=w,c},addMatcher(T,w){return f.sliceMatchers.push({matcher:T,reducer:w}),c},exposeAction(T,w){return f.actionCreators[T]=w,c},exposeCaseReducer(T,w){return f.sliceCaseReducersByName[T]=w,c}};m.forEach(T=>{let w=a[T],E={reducerName:T,type:ig(o,T),createNotation:typeof n.reducers=="function"};lg(w)?pg(E,w,c,t):ug(E,w,c)});function h(){let[T={},w=[],E=void 0]=typeof n.extraReducers=="function"?Zc(n.extraReducers):[n.extraReducers],N={...T,...f.sliceCaseReducersByType};return ge(n.initialState,k=>{for(let P in N)k.addCase(P,N[P]);for(let P of f.sliceMatchers)k.addMatcher(P.matcher,P.reducer);for(let P of w)k.addMatcher(P.matcher,P.reducer);E&&k.addDefaultCase(E)})}let y=T=>T,S=new Map,g;function v(T,w){return g||(g=h()),g(T,w)}function R(){return g||(g=h()),g.getInitialState()}function I(T,w=!1){function E(k){let P=k[T];return typeof P>"u"&&w&&(P=R()),P}function N(k=y){let P=Gc(S,w,()=>new WeakMap);return Gc(P,k,()=>{let F={};for(let[O,_]of Object.entries(n.selectors??{}))F[O]=sg(_,k,R,w);return F})}return{reducerPath:T,getSelectors:N,get selectors(){return N(E)},selectSlice:E}}let x={name:o,reducer:v,actions:f.actionCreators,caseReducers:f.sliceCaseReducersByName,getInitialState:R,...I(i),injectInto(T,{reducerPath:w,...E}={}){let N=w??i;return T.inject({reducerPath:N,reducer:v},E),{...x,...I(N,!0)}}};return x}}function sg(e,t,r,n){function o(i,...a){let m=t(i);return typeof m>"u"&&n&&(m=r()),e(m,...a)}return o.unwrapped=e,o}var Ht=ag();function cg(){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 ug({type:e,reducerName:t,createNotation:r},n,o){let i,a;if("reducer"in n){if(r&&!dg(n))throw new Error(He(17));i=n.reducer,a=n.prepare}else i=n;o.addCase(e,i).exposeCaseReducer(t,i).exposeAction(t,a?D(e,a):D(e))}function lg(e){return e._reducerDefinitionType==="asyncThunk"}function dg(e){return e._reducerDefinitionType==="reducerWithPrepare"}function pg({type:e,reducerName:t},r,n,o){if(!o)throw new Error(He(18));let{payloadCreator:i,fulfilled:a,pending:m,rejected:f,settled:c,options:h}=r,y=o(e,i,h);n.exposeAction(t,y),a&&n.addCase(y.fulfilled,a),m&&n.addCase(y.pending,m),f&&n.addCase(y.rejected,f),c&&n.addMatcher(y.settled,c),n.exposeCaseReducer(t,{fulfilled:a||Yn,pending:m||Yn,rejected:f||Yn,settled:c||Yn})}function Yn(){}var ru="listener",nu="completed",ou="cancelled",nR=`task-${ou}`,oR=`task-${nu}`,iR=`${ru}-${ou}`,aR=`${ru}-${nu}`;var{assign:iu}=Object;var ia="listenerMiddleware";var fg=iu(D(`${ia}/add`),{withTypes:()=>fg}),sR=D(`${ia}/removeAll`),mg=iu(D(`${ia}/remove`),{withTypes:()=>mg});var cR=Symbol.for("rtk-state-proxy-original");function He(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. `}p();u();d();l();var G=new H({required:!0,emptyAllowed:!1}),ve=new H({required:!1,emptyAllowed:!1}),we=new H({required:!0,emptyAllowed:!0}),bR=new H({required:!1,emptyAllowed:!0}),to=new ie({each:G,required:!0}),au=new H({required:!1,emptyAllowed:!1,regex:/^\d+\.\d+\.\d+$/}),st=({message:e,name:t,stack:r})=>({message:e,name:t,stack:r}),Ue=(e,t)=>{if("required"in t)return{payload:new Fe({value:t}).validate({value:e}).value};let o=new K({options:{required:!0},values:t}).validate(e);if(o)throw new Gr(o);return{payload:e}},B=(e,t)=>{try{return Ue(e,t)}catch(r){return{payload:e,error:st(r)}}},su=(e,t,r,n)=>{let o=`Check the initialState of ${n}`;return uu(e,t,r,o,"Controller initialization error")},cu=(e,t,r,n)=>{let o=`Check the options of ${n}`;return uu(e,t,r,o,"Controller initialization error")},uu=(e,t,r,n,o)=>{try{return t.validate(r,n)}catch(i){throw e.logger.error(i,o),i}};p();u();d();l();var ur="3.24.1",lu=["@coveo/atomic","@coveo/quantic"];var aa=()=>ve,du=()=>G,St=D("configuration/updateBasicConfiguration",e=>B(e,{accessToken:ve,environment:new H({required:!1,constrainTo:["prod","hipaa","stg","dev"]}),organizationId:ve})),Je=D("configuration/updateSearchConfiguration",e=>B(e,{proxyBaseUrl:new H({required:!1,url:!0}),pipeline:new H({required:!1,emptyAllowed:!0}),searchHub:ve,timezone:ve,locale:ve,authenticationProviders:new ie({required:!1,each:G})})),gg={enabled:new te({default:!0}),originContext:aa(),originLevel2:aa(),originLevel3:aa(),proxyBaseUrl:new H({required:!1,url:!0}),runtimeEnvironment:new de,anonymous:new te({default:!1}),deviceId:ve,userDisplayName:ve,documentLocation:ve,trackingId:ve,analyticsMode:new H({constrainTo:["legacy","next"],required:!1,default:"next"}),source:new K({options:{required:!1},values:lu.reduce((e,t)=>(e[t]=au,e),{})})},lr=D("configuration/updateAnalyticsConfiguration",e=>B(e,gg)),dr=D("configuration/analytics/disable"),pr=D("configuration/analytics/enable"),ro=D("configuration/analytics/originlevel2",e=>B(e,{originLevel2:du()})),no=D("configuration/analytics/originlevel3",e=>B(e,{originLevel3:du()}));p();u();d();l();p();u();d();l();p();u();d();l();var pu={q:new H,enableQuerySyntax:new te,aq:new H,cq:new H,firstResult:new J({min:0}),numberOfResults:new J({min:0}),sortCriteria:new H,f:new K,fExcluded:new K,cf:new K,nf:new K,mnf:new K,df:new K,debug:new te,sf:new K,tab:new H,af:new K};var vt=D("searchParameters/restore",e=>B(e,pu)),ZR=D("searchParameters/restoreTab",e=>B(e,G));p();u();d();l();var oo=D("debug/enable"),io=D("debug/disable");p();u();d();l();var ao=()=>!1;var so=ge(ao(),e=>{e.addCase(oo,()=>!0).addCase(io,()=>!1).addCase(vt,(t,r)=>r.payload.debug??t)});p();u();d();l();var fr=D("pipeline/set",e=>B(e,new H({required:!0,emptyAllowed:!0})));p();u();d();l();p();u();d();l();var hg=D("history/undo"),yg=D("history/redo"),Xe=D("history/snapshot"),ME=ue("history/back",/*#__PURE__*/function(){var _ref4=_asyncToGenerator(function*(e,{dispatch:t}){t(hg()),yield t(Me())});return function(_x3,_x4){return _ref4.apply(this,arguments)}}()),qE=ue("history/forward",/*#__PURE__*/function(){var _ref5=_asyncToGenerator(function*(e,{dispatch:t}){t(yg()),yield t(Me())});return function(_x5,_x6){return _ref5.apply(this,arguments)}}()),Me=ue("history/change",/*#__PURE__*/function(){var _ref6=_asyncToGenerator(function*(e,{getState:t}){return t().history.present});return function(_x7,_x8){return _ref6.apply(this,arguments)}}());p();u();d();l();var mr=()=>"";var gr=ge(mr(),e=>{e.addCase(fr,(t,r)=>r.payload).addCase(Me.fulfilled,(t,r)=>r.payload?.pipeline??t).addCase(Je,(t,r)=>r.payload.pipeline||t)});p();u();d();l();p();u();d();l();p();u();d();l();p();u();d();l();function ct(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 M(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 m(h){try{c(n.next(h))}catch(y){a(y)}}function f(h){try{c(n.throw(h))}catch(y){a(y)}}function c(h){h.done?i(h.value):o(h.value).then(m,f)}c((n=n.apply(e,t||[])).next())})}var ae;(function(e){e.search="search",e.click="click",e.custom="custom",e.view="view",e.collect="collect"})(ae||(ae={}));function ua(){return typeof window<"u"}function Aa(){return typeof navigator<"u"}function hr(){return typeof document<"u"}function la(){try{return typeof localStorage<"u"}catch{return!1}}function Sg(){try{return typeof sessionStorage<"u"}catch{return!1}}function Eu(){return Aa()&&navigator.cookieEnabled}var vg=[ae.click,ae.custom,ae.search,ae.view],Cg=(e,t)=>vg.indexOf(e)!==-1?Object.assign({language:hr()?document.documentElement.lang:"unknown",userAgent:Aa()?navigator.userAgent:"unknown"},t):t,fn=class e{static set(t,r,n){var o,i,a,m;n&&(i=new Date,i.setTime(i.getTime()+n)),m=window.location.hostname,m.indexOf(".")===-1?fu(t,r,i):(a=m.split("."),o=a[a.length-2]+"."+a[a.length-1],fu(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 fu(e,t,r,n){document.cookie=`${e}=${t}`+(r?`;expires=${r.toUTCString()}`:"")+(n?`;domain=${n}`:"")+";path=/;SameSite=Lax"}function bg(){return la()?localStorage:Eu()?new mn:Sg()?sessionStorage:new Sr}var mn=class e{getItem(t){return fn.get(`${e.prefix}${t}`)}removeItem(t){fn.erase(`${e.prefix}${t}`)}setItem(t,r,n){fn.set(`${e.prefix}${t}`,r,n)}};mn.prefix="coveo_";var da=class{constructor(){this.cookieStorage=new mn}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)}},Sr=class{getItem(t){return null}removeItem(t){}setItem(t,r){}},dn="__coveo.analytics.history",Pu=20,Iu=1e3*60,Tu=75,vr=class{constructor(t){this.store=t||bg()}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 M(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 M(this,void 0,void 0,function*(){let t=yield this.getHistoryWithInternalTimeAsync();return this.stripEmptyQueries(this.stripInternalTime(t))})}getHistoryWithInternalTime(){try{let t=this.store.getItem(dn);return t&&typeof t=="string"?JSON.parse(t):[]}catch{return[]}}getHistoryWithInternalTimeAsync(){return M(this,void 0,void 0,function*(){try{let t=yield this.store.getItem(dn);return t?JSON.parse(t):[]}catch{return[]}})}setHistory(t){try{this.store.setItem(dn,JSON.stringify(t.slice(0,Pu)))}catch{}}clear(){try{this.store.removeItem(dn)}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,Tu)),t}isValidEntry(t){let r=this.getMostRecentElement();return r&&r.value==t.value?(t.internalTime||0)-(r.internalTime||0)>Iu:!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))}},Fu=Object.freeze({__proto__:null,HistoryStore:vr,MAX_NUMBER_OF_HISTORY_ELEMENTS:Pu,MAX_VALUE_SIZE:Tu,MIN_THRESHOLD_FOR_DUPLICATE_VALUE:Iu,STORE_KEY:dn,default:vr}),Ag=(e,t)=>M(void 0,void 0,void 0,function*(){return e===ae.view?(yield wg(t.contentIdValue),Object.assign({location:window.location.toString(),referrer:document.referrer,title:document.title},t)):t}),wg=e=>M(void 0,void 0,void 0,function*(){let t=new vr,r={name:"PageView",value:e,time:new Date().toISOString()};yield t.addElementAsync(r)}),co,xg=new Uint8Array(16);function Rg(){if(!co&&(co=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!co))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return co(xg)}var Eg=/^(?:[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 lo(e){return typeof e=="string"&&Eg.test(e)}var xe=[];for(let e=0;e<256;++e)xe.push((e+256).toString(16).slice(1));function ku(e,t=0){return(xe[e[t+0]]+xe[e[t+1]]+xe[e[t+2]]+xe[e[t+3]]+"-"+xe[e[t+4]]+xe[e[t+5]]+"-"+xe[e[t+6]]+xe[e[t+7]]+"-"+xe[e[t+8]]+xe[e[t+9]]+"-"+xe[e[t+10]]+xe[e[t+11]]+xe[e[t+12]]+xe[e[t+13]]+xe[e[t+14]]+xe[e[t+15]]).toLowerCase()}function Pg(e){if(!lo(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 Ig(e){e=unescape(encodeURIComponent(e));let t=[];for(let r=0;r<e.length;++r)t.push(e.charCodeAt(r));return t}var Tg="6ba7b810-9dad-11d1-80b4-00c04fd430c8",Fg="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function kg(e,t,r){function n(o,i,a,m){var f;if(typeof o=="string"&&(o=Ig(o)),typeof i=="string"&&(i=Pg(i)),((f=i)===null||f===void 0?void 0:f.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){m=m||0;for(let h=0;h<16;++h)a[m+h]=c[h];return a}return ku(c)}try{n.name=e}catch{}return n.DNS=Tg,n.URL=Fg,n}var Og=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),mu={randomUUID:Og};function zt(e,t,r){if(mu.randomUUID&&!t&&!e)return mu.randomUUID();e=e||{};let n=e.random||(e.rng||Rg)();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 ku(n)}function Dg(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 sa(e,t){return e<<t|e>>>32-t}function Mg(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 m=0;m<a.length;++m)e.push(a.charCodeAt(m))}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 m=new Uint32Array(16);for(let f=0;f<16;++f)m[f]=e[a*64+f*4]<<24|e[a*64+f*4+1]<<16|e[a*64+f*4+2]<<8|e[a*64+f*4+3];i[a]=m}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 m=new Uint32Array(80);for(let g=0;g<16;++g)m[g]=i[a][g];for(let g=16;g<80;++g)m[g]=sa(m[g-3]^m[g-8]^m[g-14]^m[g-16],1);let f=r[0],c=r[1],h=r[2],y=r[3],S=r[4];for(let g=0;g<80;++g){let v=Math.floor(g/20),R=sa(f,5)+Dg(v,c,h,y)+S+t[v]+m[g]>>>0;S=y,y=h,h=sa(c,30)>>>0,c=f,f=R}r[0]=r[0]+f>>>0,r[1]=r[1]+c>>>0,r[2]=r[2]+h>>>0,r[3]=r[3]+y>>>0,r[4]=r[4]+S>>>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 qg=kg("v5",80,Mg),gu=qg,Ou="2.30.45",hu=e=>`${e.protocol}//${e.hostname}${e.pathname.indexOf("/")===0?e.pathname:`/${e.pathname}`}${e.search}`,pn={pageview:"pageview",event:"event"},po=class{constructor({client:t,uuidGenerator:r=zt}){this.client=t,this.uuidGenerator=r}},pa=class extends po{constructor({client:t,uuidGenerator:r=zt}){super({client:t,uuidGenerator:r}),this.actionData={},this.pageViewId=r(),this.nextPageViewId=this.pageViewId,this.currentLocation=hu(window.location),this.lastReferrer=hr()?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:hr()?document.title:"",encoding:hr()?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===pn.pageview&&(this.nextPageViewId=this.uuidGenerator(),this.hasSentFirstPageView=!0)}getNextValues(t,r){return{pageViewId:t===pn.pageview?this.nextPageViewId:this.pageViewId,referrer:t===pn.pageview&&this.hasSentFirstPageView?this.currentLocation:this.lastReferrer,location:t===pn.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 hu(window.location)}},Ct=class e{constructor(t,r){if(!lo(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 lo(i)?new e(i,Number.parseInt(o)*1e3):null}};Ct.cvo_cid="cvo_cid";Ct.expirationTime=120;var fa=class extends po{constructor({client:t,uuidGenerator:r=zt}){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 M(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(Ct.cvo_cid,new Ct(n,Date.now()).toString()),r.toString()}catch{throw new Error("Invalid URL provided")}})}acceptFrom(t){this.client.setAcceptedLinkReferrers(t)}};fa.Id="link";var Qe=Object.keys;function uo(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}var ca=128,Du=192,yu=224,Su=240;function Ng(e){return(e&248)===Su?4:(e&Su)===yu?3:(e&yu)===Du?2:1}function _g(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&ca)!=ca)break;if(r-=3,(n&Du)!=ca){t-r>=Ng(n)*3&&(r=t);break}}return e.substring(0,r)}var ma={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"},Vg=Qe(ma).map(e=>ma[e]),Lg=[...Vg].join("|"),jg=new RegExp(`^(${Lg}$)`),Ug={svcAction:"svc_action",svcActionData:"svc_action_data"},Bg=e=>Qe(e).filter(t=>e[t]!==void 0).reduce((t,r)=>{let n=ma[r]||r;return Object.assign(Object.assign({},t),{[n]:e[r]})},{}),Qg=e=>jg.test(e),$g=[Qg],vu={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",price:"pr",quantity:"qt",coupon:"cc",position:"ps",group:"group"},Cu={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",position:"ps",price:"pr",group:"group"},Ee={action:"pa",list:"pal",listSource:"pls"},fo={id:"ti",revenue:"tr",tax:"tt",shipping:"ts",coupon:"tcc",affiliation:"ta",step:"cos",option:"col"},Hg=["loyaltyCardId","loyaltyTier","thirdPartyPersona","companyName","favoriteStore","storeName","userIndustry","userRole","userDepartment","businessUnit"],ga={id:"quoteId",affiliation:"quoteAffiliation"},ha={id:"reviewId",rating:"reviewRating",comment:"reviewComment"},zg={add:Ee,bookmark_add:Ee,bookmark_remove:Ee,click:Ee,checkout:Ee,checkout_option:Ee,detail:Ee,impression:Ee,remove:Ee,refund:Object.assign(Object.assign({},Ee),fo),purchase:Object.assign(Object.assign({},Ee),fo),quickview:Ee,quote:Object.assign(Object.assign({},Ee),ga),review:Object.assign(Object.assign({},Ee),ha)},Wg=Qe(vu).map(e=>vu[e]),Gg=Qe(Cu).map(e=>Cu[e]),Kg=Qe(Ee).map(e=>Ee[e]),Yg=Qe(fo).map(e=>fo[e]),Jg=Qe(ha).map(e=>ha[e]),Xg=Qe(ga).map(e=>ga[e]),Zg=[...Wg,"custom"].join("|"),eh=[...Gg,"custom"].join("|"),Mu="(pr[0-9]+)",qu="(il[0-9]+pi[0-9]+)",th=new RegExp(`^${Mu}(${Zg})$`),rh=new RegExp(`^(${qu}(${eh}))|(il[0-9]+nm)$`),nh=new RegExp(`^(${Kg.join("|")})$`),oh=new RegExp(`^(${Yg.join("|")})$`),ih=new RegExp(`^${Mu}custom$`),ah=new RegExp(`^${qu}custom$`),sh=new RegExp(`^(${[...Hg,...Jg,...Xg].join("|")})$`),ch=e=>th.test(e),uh=e=>rh.test(e),lh=e=>nh.test(e),dh=e=>oh.test(e),ph=e=>sh.test(e),fh=[uh,ch,lh,dh,ph],mh=[ih,ah],gh={anonymizeIp:"aip"},hh={eventCategory:"ec",eventAction:"ea",eventLabel:"el",eventValue:"ev",page:"dp",visitorId:"cid",clientId:"cid",userId:"uid",currencyCode:"cu"},yh={hitType:"t",pageViewId:"pid",encoding:"de",location:"dl",referrer:"dr",screenColor:"sd",screenResolution:"sr",title:"dt",userAgent:"ua",language:"ul",eventId:"z",time:"tm"},Sh=["contentId","contentIdKey","contentType","searchHub","tab","searchUid","permanentId","contentLocale","trackingId"],vh=Object.assign(Object.assign(Object.assign(Object.assign({},gh),hh),yh),Sh.reduce((e,t)=>Object.assign(Object.assign({},e),{[t]:t}),{})),ya=Object.assign(Object.assign({},vh),Ug),Ch=e=>{let t=!!e.action&&zg[e.action]||{};return Qe(e).reduce((r,n)=>{let o=t[n]||ya[n]||n;return Object.assign(Object.assign({},r),{[o]:e[n]})},{})},bh=Qe(ya).map(e=>ya[e]),Ah=e=>bh.indexOf(e)!==-1,wh=e=>e==="custom",xh=e=>[...fh,...$g,Ah,wh].some(t=>t(e)),Rh=e=>Qe(e).reduce((t,r)=>{let n=Eh(r);return n?Object.assign(Object.assign({},t),Ph(n,e[r])):Object.assign(Object.assign({},t),{[r]:e[r]})},{}),Eh=e=>{let t;return[...mh].every(r=>{var n;return t=(n=r.exec(e))===null||n===void 0?void 0:n[1],!t}),t},Ph=(e,t)=>Qe(t).reduce((r,n)=>Object.assign(Object.assign({},r),{[`${e}${n}`]:t[n]}),{}),Sa=class{constructor(t){this.opts=t}sendEvent(t,r){return M(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:m}=yield this.preProcessRequestAsPotentialJSONString(`${n}/analytics/${t}?${i}`,r,o),f=this.encodeForEventType(t,m),c=new Blob([f],{type:"application/x-www-form-urlencoded"});navigator.sendBeacon(a,c)})}isAvailable(){return"sendBeacon"in navigator}deleteHttpCookieVisitorId(){return Promise.resolve()}preProcessRequestAsPotentialJSONString(t,r,n){return M(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:m,body:f}=a;o=m||t;try{i=JSON.parse(f)}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 M(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[ae.click,ae.custom,ae.search,ae.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}},va=class{sendEvent(t,r){return M(this,void 0,void 0,function*(){return Promise.resolve()})}deleteHttpCookieVisitorId(){return M(this,void 0,void 0,function*(){return Promise.resolve()})}},bu=C.fetch,mo=class{constructor(t){this.opts=t}sendEvent(t,r){return M(this,void 0,void 0,function*(){let{baseUrl:n,visitorIdProvider:o,preprocessRequest:i}=this.opts,a=this.shouldAppendVisitorId(t)?yield this.getVisitorIdParam():"",m={url:`${n}/analytics/${t}${a}`,credentials:"include",mode:"cors",headers:this.getHeaders(),method:"POST",body:JSON.stringify(r)},f=Object.assign(Object.assign({},m),i?yield i(m,"analyticsFetch"):{}),{url:c}=f,h=ct(f,["url"]),y;try{y=yield bu(c,h)}catch(S){console.error("An error has occured when sending the event.",S);return}if(y.ok){let S=yield y.json();return S.visitorId&&o.setCurrentVisitorId(S.visitorId),S}else{try{y.json()}catch{}throw console.error(`An error has occured when sending the "${t}" event.`,y,r),new Error(`An error has occurred when sending the "${t}" event. Check the console logs for more details.`)}})}deleteHttpCookieVisitorId(){return M(this,void 0,void 0,function*(){let{baseUrl:t}=this.opts,r=`${t}/analytics/visit`;yield bu(r,{headers:this.getHeaders(),method:"DELETE"})})}shouldAppendVisitorId(t){return[ae.click,ae.custom,ae.search,ae.view].indexOf(t)!==-1}getVisitorIdParam(){return M(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"})}},Ca=class{constructor(t,r){la()&&Eu()?this.storage=new da:la()?this.storage=localStorage:(console.warn("BrowserRuntime detected no valid storage available.",this),this.storage=new Sr),this.client=new mo(t),this.beaconClient=new Sa(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}},ba=class{constructor(t,r){this.storage=r||new Sr,this.client=new mo(t)}getClientDependingOnEventType(t){return this.client}},go=class{constructor(){this.storage=new Sr,this.client=new va}getClientDependingOnEventType(t){return this.client}},Ih="xx",Th=e=>e?.startsWith(Ih)||!1,Fh=`
26
+ `;return new Wr(r)}var Wr=class extends Error{constructor(e){super(e),this.name="SchemaValidationError"}},Fe=class{constructor(e){this.definition=e}validate(e={},t=""){let r={...this.default,...e},n=[];for(let o in this.definition){let i=this.definition[o].validate(r[o]);i&&n.push(`${o}: ${i}`)}if(n.length)throw Df(n,t);return r}get default(){let e={};for(let t in this.definition){let r=this.definition[t].default;r!==void 0&&(e[t]=r)}return e}},de=class{constructor(e={}){this.baseConfig=e}validate(e){return this.baseConfig.required&&X(e)?"value is required.":null}get default(){return this.baseConfig.default instanceof Function?this.baseConfig.default():this.baseConfig.default}get required(){return this.baseConfig.required===!0}};function Ce(e){return e===void 0}function Mf(e){return e===null}function X(e){return Ce(e)||Mf(e)}var J=class{constructor(e={}){pe(this,"value");this.config=e,this.value=new de(e)}validate(e){let t=this.value.validate(e);return t||(qf(e)?e<this.config.min?`minimum value of ${this.config.min} not respected.`:e>this.config.max?`maximum value of ${this.config.max} not respected.`:null:"value is not a number.")}get default(){return this.value.default}get required(){return this.value.required}};function qf(e){return Ce(e)||oc(e)}function oc(e){return typeof e=="number"&&!isNaN(e)}var te=class{constructor(e={}){pe(this,"value");this.value=new de(e)}validate(e){let t=this.value.validate(e);return t||(Nf(e)?null:"value is not a boolean.")}get default(){return this.value.default}get required(){return this.value.required}};function Nf(e){return Ce(e)||ic(e)}function ic(e){return typeof e=="boolean"}var _f=/^\d{4}(-\d\d(-\d\d(T\d\d:\d\d(:\d\d)?(\.\d+)?(([+-]\d\d:\d\d)|Z)?)?)?)?$/i,H=class{constructor(e={}){pe(this,"value");pe(this,"config");this.config={emptyAllowed:!0,url:!1,...e},this.value=new de(this.config)}validate(e){let{emptyAllowed:t,url:r,regex:n,constrainTo:o,ISODate:i}=this.config,a=this.value.validate(e);if(a)return a;if(Ce(e))return null;if(!Mn(e))return"value is not a string.";if(!t&&!e.length)return"value is an empty string.";if(r)try{new URL(e)}catch{return"value is not a valid URL."}return n&&!n.test(e)?`value did not match provided regex ${n}`:o&&!o.includes(e)?`value should be one of: ${o.join(", ")}.`:i&&!(_f.test(e)&&new Date(e).toString()!=="Invalid Date")?"value is not a valid ISO8601 date string":null}get default(){return this.value.default}get required(){return this.value.required}};function Mn(e){return Object.prototype.toString.call(e)==="[object String]"}var K=class{constructor(e={}){pe(this,"config");this.config={options:{required:!1},values:{},...e}}validate(e){if(Ce(e))return this.config.options.required?"value is required and is currently undefined":null;if(!ac(e))return"value is not an object";for(let[r,n]of Object.entries(this.config.values))if(n.required&&X(e[r]))return`value does not contain ${r}`;let t="";for(let[r,n]of Object.entries(this.config.values)){let o=e[r],i=n.validate(o);i!==null&&(t+=" "+i)}return t===""?null:t}get default(){}get required(){return!!this.config.options.required}};function ac(e){return e!==void 0&&typeof e=="object"}var ie=class{constructor(e={}){pe(this,"value");this.config=e,this.value=new de(this.config)}validate(e){if(!X(e)&&!Array.isArray(e))return"value is not an array";let t=this.value.validate(e);if(t!==null)return t;if(X(e))return null;if(this.config.max!==void 0&&e.length>this.config.max)return`value contains more than ${this.config.max}`;if(this.config.min!==void 0&&e.length<this.config.min)return`value contains less than ${this.config.min}`;if(this.config.each!==void 0){let r="";return e.forEach(n=>{this.config.each.required&&X(n)&&(r=`value is null or undefined: ${e.join(",")}`);let o=this.validatePrimitiveValue(n,this.config.each);o!==null&&(r+=" "+o)}),r===""?null:r}return null}validatePrimitiveValue(e,t){return ic(e)||Mn(e)||oc(e)||ac(e)?t.validate(e):"value is not a primitive value"}get default(){}get required(){return this.value.required}};function sc(e){return Array.isArray(e)}var qi=class{constructor(e){pe(this,"value");this.config=e,this.value=new de(e)}validate(e){let t=this.value.validate(e);return t!==null?t:Ce(e)||Object.values(this.config.enum).find(n=>n===e)?null:"value is not in enum."}get default(){return this.value.default}get required(){return this.value.required}};d();c();l();u();function cc(e){return Array.isArray(e)}function qn(e){return e.trim()===""}var Vf=new Set(["1",1,"yes",!0]);function uc(){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=>Vf.has(r))}function lc(e){let t={};for(let[r,n]of e)t[r]=n;return t}function Gr(e){if(typeof e!="object"||!e)return e;try{return JSON.parse(JSON.stringify(e))}catch{return e}}function Lf(e){if(qn(e.openingDelimiter)||qn(e.closingDelimiter))throw Error("delimiters should be a non-empty string");if(X(e.content)||qn(e.content))return e.content;if(e.highlights.length===0)return tr(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,m=a+i.length;if(m>t)break;r+=tr(e.content.slice(n,a)),r+=e.openingDelimiter,r+=tr(e.content.slice(a,m)),r+=e.closingDelimiter,n=m}return n!==t&&(r+=tr(e.content.slice(n))),r}function jf(e,t){return e=tr(e),e.replace(/\[(.*?)\]|\{(.*?)\}|\((.*?)\)/g,(r,n,o,i)=>n?Ni(n,t.notMatchDelimiters):o?Ni(o,t.exactMatchDelimiters):i?Ni(i,t.correctionDelimiters):r)}function Ni(e,t){return t?t.open+e+t.close:e}function tr(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}d();c();l();u();d();c();l();u();var Nn=e=>e;d();c();l();u();var dc=e=>e,pc=e=>e,fc=e=>e;d();c();l();u();d();c();l();u();function _n(){return{answerSnippet:"",documentId:{contentIdKey:"",contentIdValue:""},question:"",relatedQuestions:[],score:0}}function We(){return{response:{results:[],searchUid:"",totalCountFiltered:0,facets:[],generateAutomaticFacets:{facets:[]},queryCorrections:[],triggers:[],questionAnswer:_n(),pipeline:"",splitTestRun:"",termsToHighlight:{},phrasesToHighlight:{},extendedResults:{}},duration:0,queryExecuted:"",error:null,automaticallyCorrected:!1,isLoading:!1,results:[],searchResponseId:"",requestId:"",questionAnswer:_n(),extendedResults:{}}}d();c();l();u();function mt(e){let{url:t,accessToken:r,organizationId:n,authentication:o,...i}=e;return i}var gt=e=>{let{response:t}=e;return t.body?Uf(e):Bf(t)},Uf=e=>$f(e)?Hf(e):Qf(e)?e.body:{message:"unknown",statusCode:0,type:"unknown"},Bf=e=>{let t=JSON.parse(JSON.stringify(e,Object.getOwnPropertyNames(e)));return{...t,message:`Client side error: ${t.message||""}`,statusCode:400,type:"ClientError"}};function Qf(e){return e.body.statusCode!==void 0}function $f(e){return e.body.exception!==void 0}var Hf=e=>({message:e.body.exception.code,statusCode:e.response.status,type:e.body.exception.code});d();c();l();u();var Rc=je(bc(),1);d();c();l();u();d();c();l();u();var ym="recommendation-internal-options",$A=Symbol.for(ym);var Ge=new Error("Failed to load reducers."),rr=class extends Error{constructor(){super(),this.name="ExpiredToken",this.message="The token being used to perform the request is expired."}};var Lt=class extends Error{constructor(r,n){super();pe(this,"statusCode");this.name="Disconnected",this.message=`Client could not connect to the following URL: ${r}`,this.statusCode=n??0}};d();c();l();u();function Ac(e){let t=[];for(let r in e){let n=encodeURIComponent(r),o=encodeURIComponent(e[r]);t.push(`${n}=${o}`)}return t.join("&")}function wc(e){return typeof e!="object"||!e?!1:Object.values(e).every(Sm)}function Sm(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"}function xc(e){return e===429}var $e=class e{static call(t){return _asyncToGenerator(function*(){let r=vm(t),{logger:n}=t,o=yield e.preprocessRequest(r,t);n.info(o,"Platform request");let{url:i,...a}=o,m=/*#__PURE__*/function(){var _ref=_asyncToGenerator(function*(){let f=yield b(i,a);if(xc(f.status))throw f;return f});return function m(){return _ref.apply(this,arguments)}}();try{let f=yield(0,Rc.backOff)(m,{retry:p=>{let h=p&&xc(p.status);return h&&n.info("Platform retrying request"),h}});switch(f.status){case 419:case 401:throw n.info("Platform renewing token"),new rr;case 404:throw new Lt(i,f.status);default:return n.info({response:f,requestInfo:o},"Platform response"),f}}catch(f){return f.message==="Failed to fetch"?new Lt(i):f}})()}static preprocessRequest(t,r){return _asyncToGenerator(function*(){let{origin:n,preprocessRequest:o,logger:i,requestMetadata:a}=r,{signal:m,...f}=t,p=Gr(f);try{let h=yield o(t,n,a);return{...t,...h}}catch(h){i.error(h,"Platform request preprocessing failed. Returning default request options.")}return p})()}};function Ie(e,t="prod",r="platform"){let n=t==="prod"?"":t,o=r==="platform"?"":`.${r}`;return`https://${e}${o}.org${n}.coveo.com`}function ht(e,t="prod"){return`${Ie(e,t)}/rest/search/v2`}function Ln(e,t="prod"){return`${Ie(e,t,"analytics")}/rest/organizations/${e}/events/v1`}function vm(e){let{url:t,method:r,requestParams:n,contentType:o,accessToken:i,signal:a}=e,m=e.method==="POST"||e.method==="PUT",f=Cm(n,o);return{url:t,method:r,headers:{"Content-Type":o,Authorization:`Bearer ${i}`,...e.headers},...(m&&{body:f}),signal:a}}function Cm(e,t){return t==="application/x-www-form-urlencoded"?wc(e)?Ac(e):"":JSON.stringify(e)}d();c();l();u();var yt=class{constructor(){pe(this,"currentAbortController",null)}enqueue(t,r){var _this=this;return _asyncToGenerator(function*(){let n=_this.currentAbortController,o=_this.currentAbortController=new s.AbortController;n&&(r.warnOnAbort&&r.logger.warn("Cancelling current pending search query"),n.abort());try{return yield t(o?.signal??null)}finally{_this.currentAbortController===o&&(_this.currentAbortController=null)}})()}};d();c();l();u();d();c();l();u();var Jr=class{constructor(t){pe(this,"_basePath");pe(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}};d();c();l();u();function Ec(e){return((e.headers.get("content-type")||"").split(";").find(n=>n.indexOf("charset=")!==-1)||"").split("=")[1]||"UTF-8"}d();c();l();u();var ot=(e,t,r,n)=>{let o=new Jr(`${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 Pc=/*#__PURE__*/function(){var _ref2=_asyncToGenerator(function*(e,t){let r=yield $e.call({...ot(e,"POST","application/x-www-form-urlencoded","/html"),requestParams:mt(e),requestMetadata:{method:"html"},...t});if(r instanceof Error)throw r;let n=Ec(r),o=yield r.arrayBuffer(),a=new TextDecoder(n).decode(o);return bm(a)?{success:a}:{error:gt({response:r,body:a})}});return function Pc(_x,_x2){return _ref2.apply(this,arguments)}}();function bm(e){return typeof e=="string"}d();c();l();u();function Am(e){return{statusCode:e.statusCode,type:e.name,message:e.message}}function wm(e){return{statusCode:e.code,type:e.name,message:e.message,ignored:!0}}function jn(e,t){if(t&&e.name==="AbortError")return{error:wm(e)};if(e instanceof Lt)return{error:Am(e)};throw e}var Un=class{constructor(t){this.options=t;pe(this,"apiCallsQueues",{unknown:new yt,mainSearch:new yt,facetValues:new yt,foldingCollection:new yt,instantResults:new yt})}plan(t){var _this2=this;return _asyncToGenerator(function*(){let r=yield $e.call({...ot(t,"POST","application/json","/plan"),requestParams:mt(t),requestMetadata:{method:"plan"},..._this2.options});if(r instanceof Error)return jn(r);let n=yield r.json();return Rm(n)?{success:n}:{error:gt({response:r,body:n})}})()}querySuggest(t){var _this3=this;return _asyncToGenerator(function*(){let r=yield $e.call({...ot(t,"POST","application/json","/querySuggest"),requestMetadata:{method:"querySuggest"},requestParams:mt(t),..._this3.options});if(r instanceof Error)return jn(r);let n=yield r.json(),o={response:r,body:n};return xm(n)?{success:(yield _this3.options.postprocessQuerySuggestResponseMiddleware(o)).body}:{error:gt(o)}})()}search(t,r){var _this4=this;return _asyncToGenerator(function*(){let n=r?.origin??"unknown",o=yield _this4.apiCallsQueues[n].enqueue(m=>$e.call({...ot(t,"POST","application/json",""),requestParams:mt(t),requestMetadata:{method:"search",origin:r?.origin},..._this4.options,signal:m??void 0}),{logger:_this4.options.logger,warnOnAbort:!r?.disableAbortWarning});if(o instanceof Error)return jn(o,r?.disableAbortWarning);let i=yield o.json(),a={response:o,body:i};return Ic(i)?(a.body=Tc(i),{success:(yield _this4.options.postprocessSearchResponseMiddleware(a)).body}):{error:gt(a)}})()}facetSearch(t){var _this5=this;return _asyncToGenerator(function*(){let r=yield $e.call({...ot(t,"POST","application/json","/facet"),requestParams:mt(t),requestMetadata:{method:"facetSearch"},..._this5.options});if(r instanceof Error)throw r;let n=yield r.json(),o={response:r,body:n};return(yield _this5.options.postprocessFacetSearchResponseMiddleware(o)).body})()}recommendations(t){var _this6=this;return _asyncToGenerator(function*(){let r=yield $e.call({...ot(t,"POST","application/json",""),requestParams:mt(t),requestMetadata:{method:"recommendations"},..._this6.options});if(r instanceof Error)throw r;let n=yield r.json();if(Ic(n)){let o={response:r,body:n};return o.body=Tc(n),{success:(yield _this6.options.postprocessSearchResponseMiddleware(o)).body}}return{error:gt({response:r,body:n})}})()}html(t){var _this7=this;return _asyncToGenerator(function*(){return Pc(t,{..._this7.options})})()}fieldDescriptions(t){var _this8=this;return _asyncToGenerator(function*(){let r=yield $e.call({...ot(t,"GET","application/json","/fields"),requestParams:{},requestMetadata:{method:"fieldDescriptions"},..._this8.options});if(r instanceof Error)throw r;let n=yield r.json();return Em(n)?{success:n}:{error:gt({response:r,body:n})}})()}},Bn=e=>e.success!==void 0,ke=e=>e.error!==void 0;function Ic(e){return e.results!==void 0}function Tc(e){let t=_n();return X(e.questionAnswer)?(e.questionAnswer=t,e):(e.questionAnswer={...t,...e.questionAnswer},e)}function xm(e){return e.completions!==void 0}function Rm(e){return e.preprocessingOutput!==void 0}function Em(e){return e.fields!==void 0}d();c();l();u();d();c();l();u();d();c();l();u();function be(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 Pm=typeof Symbol=="function"&&Symbol.observable||"@@observable",Fc=Pm,zi=()=>Math.random().toString(36).substring(7).split("").join("."),Im={INIT:`@@redux/INIT${zi()}`,REPLACE:`@@redux/REPLACE${zi()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${zi()}`},Qn=Im;function Ke(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 Wi(e,t,r){if(typeof e!="function")throw new Error(be(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(be(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(be(1));return r(Wi)(e,t)}let n=e,o=t,i=new Map,a=i,m=0,f=!1;function p(){a===i&&(a=new Map,i.forEach((I,x)=>{a.set(x,I)}))}function h(){if(f)throw new Error(be(3));return o}function y(I){if(typeof I!="function")throw new Error(be(4));if(f)throw new Error(be(5));let x=!0;p();let T=m++;return a.set(T,I),function(){if(x){if(f)throw new Error(be(6));x=!1,p(),a.delete(T),i=null}}}function S(I){if(!Ke(I))throw new Error(be(7));if(typeof I.type>"u")throw new Error(be(8));if(typeof I.type!="string")throw new Error(be(17));if(f)throw new Error(be(9));try{f=!0,o=n(o,I)}finally{f=!1}return(i=a).forEach(T=>{T()}),I}function g(I){if(typeof I!="function")throw new Error(be(10));n=I,S({type:Qn.REPLACE})}function v(){let I=y;return{subscribe(x){if(typeof x!="object"||x===null)throw new Error(be(11));function T(){let E=x;E.next&&E.next(h())}return T(),{unsubscribe:I(T)}},[Fc](){return this}}}return S({type:Qn.INIT}),{dispatch:S,subscribe:y,getState:h,replaceReducer:g,[Fc]:v}}function Tm(e){Object.keys(e).forEach(t=>{let r=e[t];if(typeof r(void 0,{type:Qn.INIT})>"u")throw new Error(be(12));if(typeof r(void 0,{type:Qn.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(be(13))})}function nr(e){let t=Object.keys(e),r={};for(let a=0;a<t.length;a++){let m=t[a];typeof e[m]=="function"&&(r[m]=e[m])}let n=Object.keys(r),o,i;try{Tm(r)}catch(a){i=a}return function(m={},f){if(i)throw i;let p=!1,h={};for(let y=0;y<n.length;y++){let S=n[y],g=r[S],v=m[S],R=g(v,f);if(typeof R>"u"){let I=f&&f.type;throw new Error(be(14))}h[S]=R,p=p||R!==v}return p=p||n.length!==Object.keys(m).length,p?h:m}}function or(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function kc(...e){return t=>(r,n)=>{let o=t(r,n),i=()=>{throw new Error(be(15))},a={getState:o.getState,dispatch:(f,...p)=>i(f,...p)},m=e.map(f=>f(a));return i=or(...m)(o.dispatch),{...o,dispatch:i}}}function $n(e){return Ke(e)&&"type"in e&&typeof e.type=="string"}d();c();l();u();var na=Symbol.for("immer-nothing"),Xr=Symbol.for("immer-draftable"),Oe=Symbol.for("immer-state");function Ae(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Ut=Object.getPrototypeOf;function Ne(e){return!!e&&!!e[Oe]}function De(e){return e?Nc(e)||Array.isArray(e)||!!e[Xr]||!!e.constructor?.[Xr]||nn(e)||on(e):!1}var Fm=Object.prototype.constructor.toString();function Nc(e){if(!e||typeof e!="object")return!1;let t=Ut(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)===Fm}function oa(e){return Ne(e)||Ae(15,e),e[Oe].base_}function Zr(e,t){Bt(e)===0?Reflect.ownKeys(e).forEach(r=>{t(r,e[r],e)}):e.forEach((r,n)=>t(n,r,e))}function Bt(e){let t=e[Oe];return t?t.type_:Array.isArray(e)?1:nn(e)?2:on(e)?3:0}function en(e,t){return Bt(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Gi(e,t){return Bt(e)===2?e.get(t):e[t]}function _c(e,t,r){let n=Bt(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function km(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function nn(e){return e instanceof Map}function on(e){return e instanceof Set}function jt(e){return e.copy_||e.base_}function Ji(e,t){if(nn(e))return new Map(e);if(on(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);let r=Nc(e);if(t===!0||t==="class_only"&&!r){let n=Object.getOwnPropertyDescriptors(e);delete n[Oe];let o=Reflect.ownKeys(n);for(let i=0;i<o.length;i++){let a=o[i],m=n[a];m.writable===!1&&(m.writable=!0,m.configurable=!0),(m.get||m.set)&&(n[a]={configurable:!0,writable:!0,enumerable:m.enumerable,value:e[a]})}return Object.create(Ut(e),n)}else{let n=Ut(e);if(n!==null&&r)return{...e};let o=Object.create(n);return Object.assign(o,e)}}function Wn(e,t=!1){return Gn(e)||Ne(e)||!De(e)||(Bt(e)>1&&(e.set=e.add=e.clear=e.delete=Om),Object.freeze(e),t&&Object.entries(e).forEach(([r,n])=>Wn(n,!0))),e}function Om(){Ae(2)}function Gn(e){return Object.isFrozen(e)}var Xi={};function Qt(e){let t=Xi[e];return t||Ae(0,e),t}function Dm(e,t){Xi[e]||(Xi[e]=t)}var tn;function Vc(){return tn}function Mm(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Oc(e,t){t&&(Qt("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Zi(e){ea(e),e.drafts_.forEach(qm),e.drafts_=null}function ea(e){e===tn&&(tn=e.parent_)}function Dc(e){return tn=Mm(tn,e)}function qm(e){let t=e[Oe];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Mc(e,t){t.unfinalizedDrafts_=t.drafts_.length;let r=t.drafts_[0];return e!==void 0&&e!==r?(r[Oe].modified_&&(Zi(t),Ae(4)),De(e)&&(e=Hn(t,e),t.parent_||zn(t,e)),t.patches_&&Qt("Patches").generateReplacementPatches_(r[Oe].base_,e,t.patches_,t.inversePatches_)):e=Hn(t,r,[]),Zi(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==na?e:void 0}function Hn(e,t,r){if(Gn(t))return t;let n=t[Oe];if(!n)return Zr(t,(o,i)=>qc(e,n,t,o,i,r)),t;if(n.scope_!==e)return t;if(!n.modified_)return zn(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),Zr(i,(m,f)=>qc(e,n,o,m,f,r,a)),zn(e,o,!1),r&&e.patches_&&Qt("Patches").generatePatches_(n,r,e.patches_,e.inversePatches_)}return n.copy_}function qc(e,t,r,n,o,i,a){if(Ne(o)){let m=i&&t&&t.type_!==3&&!en(t.assigned_,n)?i.concat(n):void 0,f=Hn(e,o,m);if(_c(r,n,f),Ne(f))e.canAutoFreeze_=!1;else return}else a&&r.add(o);if(De(o)&&!Gn(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Hn(e,o),(!t||!t.scope_.parent_)&&typeof n!="symbol"&&Object.prototype.propertyIsEnumerable.call(r,n)&&zn(e,o)}}function zn(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Wn(t,r)}function Nm(e,t){let r=Array.isArray(e),n={type_:r?1:0,scope_:t?t.scope_:Vc(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1},o=n,i=ia;r&&(o=[n],i=rn);let{revoke:a,proxy:m}=Proxy.revocable(o,i);return n.draft_=m,n.revoke_=a,m}var ia={get(e,t){if(t===Oe)return e;let r=jt(e);if(!en(r,t))return _m(e,r,t);let n=r[t];return e.finalized_||!De(n)?n:n===Ki(e.base_,t)?(Yi(e),e.copy_[t]=ra(n,e)):n},has(e,t){return t in jt(e)},ownKeys(e){return Reflect.ownKeys(jt(e))},set(e,t,r){let n=Lc(jt(e),t);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){let o=Ki(jt(e),t),i=o?.[Oe];if(i&&i.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(km(r,o)&&(r!==void 0||en(e.base_,t)))return!0;Yi(e),ta(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 Ki(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Yi(e),ta(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let r=jt(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty(){Ae(11)},getPrototypeOf(e){return Ut(e.base_)},setPrototypeOf(){Ae(12)}},rn={};Zr(ia,(e,t)=>{rn[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});rn.deleteProperty=function(e,t){return rn.set.call(this,e,t,void 0)};rn.set=function(e,t,r){return ia.set.call(this,e[0],t,r,e[0])};function Ki(e,t){let r=e[Oe];return(r?jt(r):e)[t]}function _m(e,t,r){let n=Lc(t,r);return n?"value"in n?n.value:n.get?.call(e.draft_):void 0}function Lc(e,t){if(!(t in e))return;let r=Ut(e);for(;r;){let n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Ut(r)}}function ta(e){e.modified_||(e.modified_=!0,e.parent_&&ta(e.parent_))}function Yi(e){e.copy_||(e.copy_=Ji(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Vm=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(f=i,...p){return a.produce(f,h=>r.call(this,h,...p))}}typeof r!="function"&&Ae(6),n!==void 0&&typeof n!="function"&&Ae(7);let o;if(De(t)){let i=Dc(this),a=ra(t,void 0),m=!0;try{o=r(a),m=!1}finally{m?Zi(i):ea(i)}return Oc(i,n),Mc(o,i)}else if(!t||typeof t!="object"){if(o=r(t),o===void 0&&(o=t),o===na&&(o=void 0),this.autoFreeze_&&Wn(o,!0),n){let i=[],a=[];Qt("Patches").generateReplacementPatches_(t,o,i,a),n(i,a)}return o}else Ae(1,t)},this.produceWithPatches=(t,r)=>{if(typeof t=="function")return(a,...m)=>this.produceWithPatches(a,f=>t(f,...m));let n,o;return[this.produce(t,r,(a,m)=>{n=a,o=m}),n,o]},typeof e?.autoFreeze=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof e?.useStrictShallowCopy=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){De(e)||Ae(8),Ne(e)&&(e=jc(e));let t=Dc(this),r=ra(e,void 0);return r[Oe].isManual_=!0,ea(t),r}finishDraft(e,t){let r=e&&e[Oe];(!r||!r.isManual_)&&Ae(9);let{scope_:n}=r;return Oc(n,t),Mc(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=Qt("Patches").applyPatches_;return Ne(e)?n(e,t):this.produce(e,o=>n(o,t))}};function ra(e,t){let r=nn(e)?Qt("MapSet").proxyMap_(e,t):on(e)?Qt("MapSet").proxySet_(e,t):Nm(e,t);return(t?t.scope_:Vc()).drafts_.push(r),r}function jc(e){return Ne(e)||Ae(10,e),Uc(e)}function Uc(e){if(!De(e)||Gn(e))return e;let t=e[Oe],r;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=Ji(e,t.scope_.immer_.useStrictShallowCopy_)}else r=Ji(e,!0);return Zr(r,(n,o)=>{_c(r,n,Uc(o))}),t&&(t.finalized_=!1),r}function Bc(){let t="replace",r="add",n="remove";function o(S,g,v,R){switch(S.type_){case 0:case 2:return a(S,g,v,R);case 1:return i(S,g,v,R);case 3:return m(S,g,v,R)}}function i(S,g,v,R){let{base_:I,assigned_:x}=S,T=S.copy_;T.length<I.length&&([I,T]=[T,I],[v,R]=[R,v]);for(let w=0;w<I.length;w++)if(x[w]&&T[w]!==I[w]){let E=g.concat([w]);v.push({op:t,path:E,value:y(T[w])}),R.push({op:t,path:E,value:y(I[w])})}for(let w=I.length;w<T.length;w++){let E=g.concat([w]);v.push({op:r,path:E,value:y(T[w])})}for(let w=T.length-1;I.length<=w;--w){let E=g.concat([w]);R.push({op:n,path:E})}}function a(S,g,v,R){let{base_:I,copy_:x}=S;Zr(S.assigned_,(T,w)=>{let E=Gi(I,T),N=Gi(x,T),k=w?en(I,T)?t:r:n;if(E===N&&k===t)return;let P=g.concat(T);v.push(k===n?{op:k,path:P}:{op:k,path:P,value:N}),R.push(k===r?{op:n,path:P}:k===n?{op:r,path:P,value:y(E)}:{op:t,path:P,value:y(E)})})}function m(S,g,v,R){let{base_:I,copy_:x}=S,T=0;I.forEach(w=>{if(!x.has(w)){let E=g.concat([T]);v.push({op:n,path:E,value:w}),R.unshift({op:r,path:E,value:w})}T++}),T=0,x.forEach(w=>{if(!I.has(w)){let E=g.concat([T]);v.push({op:r,path:E,value:w}),R.unshift({op:n,path:E,value:w})}T++})}function f(S,g,v,R){v.push({op:t,path:[],value:g===na?void 0:g}),R.push({op:t,path:[],value:S})}function p(S,g){return g.forEach(v=>{let{path:R,op:I}=v,x=S;for(let N=0;N<R.length-1;N++){let k=Bt(x),P=R[N];typeof P!="string"&&typeof P!="number"&&(P=""+P),(k===0||k===1)&&(P==="__proto__"||P==="constructor")&&Ae(19),typeof x=="function"&&P==="prototype"&&Ae(19),x=Gi(x,P),typeof x!="object"&&Ae(18,R.join("/"))}let T=Bt(x),w=h(v.value),E=R[R.length-1];switch(I){case t:switch(T){case 2:return x.set(E,w);case 3:Ae(16);default:return x[E]=w}case r:switch(T){case 1:return E==="-"?x.push(w):x.splice(E,0,w);case 2:return x.set(E,w);case 3:return x.add(w);default:return x[E]=w}case n:switch(T){case 1:return x.splice(E,1);case 2:return x.delete(E);case 3:return x.delete(v.value);default:return delete x[E]}default:Ae(17,I)}}),S}function h(S){if(!De(S))return S;if(Array.isArray(S))return S.map(h);if(nn(S))return new Map(Array.from(S.entries()).map(([v,R])=>[v,h(R)]));if(on(S))return new Set(Array.from(S).map(h));let g=Object.create(Ut(S));for(let v in S)g[v]=h(S[v]);return en(S,Xr)&&(g[Xr]=S[Xr]),g}function y(S){return Ne(S)?h(S):S}Dm("Patches",{applyPatches_:p,generatePatches_:o,generateReplacementPatches_:f})}var _e=new Vm,it=_e.produce,Kn=_e.produceWithPatches.bind(_e),wx=_e.setAutoFreeze.bind(_e),xx=_e.setUseStrictShallowCopy.bind(_e),aa=_e.applyPatches.bind(_e),Rx=_e.createDraft.bind(_e),Ex=_e.finishDraft.bind(_e);d();c();l();u();function Lm(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function jm(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function Um(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 Qc=e=>Array.isArray(e)?e:[e];function Bm(e){let t=Array.isArray(e[0])?e[0]:e;return Um(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function Qm(e,t){let r=[],{length:n}=e;for(let o=0;o<n;o++)r.push(e[o].apply(null,t));return r}var Dx=Symbol();var Mx=Object.getPrototypeOf({});var $m=class{constructor(e){this.value=e}deref(){return this.value}},Hm=typeof WeakRef<"u"?WeakRef:$m,zm=0,$c=1;function Yn(){return{s:zm,v:void 0,o:null,p:null}}function ir(e,t={}){let r=Yn(),{resultEqualityCheck:n}=t,o,i=0;function a(){let m=r,{length:f}=arguments;for(let y=0,S=f;y<S;y++){let g=arguments[y];if(typeof g=="function"||typeof g=="object"&&g!==null){let v=m.o;v===null&&(m.o=v=new WeakMap);let R=v.get(g);R===void 0?(m=Yn(),v.set(g,m)):m=R}else{let v=m.p;v===null&&(m.p=v=new Map);let R=v.get(g);R===void 0?(m=Yn(),v.set(g,m)):m=R}}let p=m,h;if(m.s===$c)h=m.v;else if(h=e.apply(null,arguments),i++,n){let y=o?.deref?.()??o;y!=null&&n(y,h)&&(h=y,i!==0&&i--),o=typeof h=="object"&&h!==null||typeof h=="function"?new Hm(h):h}return p.s=$c,p.v=h,h}return a.clearCache=()=>{r=Yn(),a.resetResultsCount()},a.resultsCount=()=>i,a.resetResultsCount=()=>{i=0},a}function Hc(e,...t){let r=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,n=(...o)=>{let i=0,a=0,m,f={},p=o.pop();typeof p=="object"&&(f=p,p=o.pop()),Lm(p,`createSelector expects an output function after the inputs, but received: [${typeof p}]`);let h={...r,...f},{memoize:y,memoizeOptions:S=[],argsMemoize:g=ir,argsMemoizeOptions:v=[],devModeChecks:R={}}=h,I=Qc(S),x=Qc(v),T=Bm(o),w=y(function(){return i++,p.apply(null,arguments)},...I),E=!0,N=g(function(){a++;let P=Qm(T,arguments);return m=w.apply(null,P),m},...x);return Object.assign(N,{resultFunc:p,memoizedResultFunc:w,dependencies:T,dependencyRecomputations:()=>a,resetDependencyRecomputations:()=>{a=0},lastResult:()=>m,recomputations:()=>i,resetRecomputations:()=>{i=0},memoize:y,argsMemoize:g})};return Object.assign(n,{withTypes:()=>n}),n}var fe=Hc(ir),Wm=Object.assign((e,t=fe)=>{jm(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,m,f)=>(a[r[f]]=m,a),{}))},{withTypes:()=>Wm});d();c();l();u();function zc(e){return({dispatch:r,getState:n})=>o=>i=>typeof i=="function"?i(r,n,e):o(i)}var Wc=zc(),Gc=zc;var Gm=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?or:or.apply(null,arguments)},Xx=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}},Km=e=>e&&typeof e.match=="function";function D(e,t){function r(...n){if(t){let o=t(...n);if(!o)throw new Error(He(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=>$n(n)&&n.type===e,r}var Zc=class an extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,an.prototype)}static get[Symbol.species](){return an}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new an(...t[0].concat(this)):new an(...t.concat(this))}};function Kc(e){return De(e)?it(e,()=>{}):e}function Yc(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function Ym(e){return typeof e=="boolean"}var Jm=()=>function(t){let{thunk:r=!0,immutableCheck:n=!0,serializableCheck:o=!0,actionCreatorCheck:i=!0}=t??{},a=new Zc;return r&&(Ym(r)?a.push(Wc):a.push(Gc(r.extraArgument))),a},sn="RTK_autoBatch",sr=()=>e=>({payload:e,meta:{[sn]:!0}}),Jc=e=>t=>{setTimeout(t,e)},Xm=(e={type:"raf"})=>t=>(...r)=>{let n=t(...r),o=!0,i=!1,a=!1,m=new Set,f=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Jc(10):e.type==="callback"?e.queueNotification:Jc(e.timeout),p=()=>{a=!1,i&&(i=!1,m.forEach(h=>h()))};return Object.assign({},n,{subscribe(h){let y=()=>o&&h(),S=n.subscribe(y);return m.add(h),()=>{S(),m.delete(h)}},dispatch(h){try{return o=!h?.meta?.[sn],i=!o,i&&(a||(a=!0,f(p))),n.dispatch(h)}finally{o=!0}}})},Zm=e=>function(r){let{autoBatch:n=!0}=r??{},o=new Zc(e);return n&&o.push(Xm(typeof n=="object"?n:void 0)),o};function eu(e){let t=Jm(),{reducer:r=void 0,middleware:n,devTools:o=!0,preloadedState:i=void 0,enhancers:a=void 0}=e||{},m;if(typeof r=="function")m=r;else if(Ke(r))m=nr(r);else throw new Error(He(1));let f;typeof n=="function"?f=n(t):f=t();let p=or;o&&(p=Gm({trace:!1,...(typeof o=="object"&&o)}));let h=kc(...f),y=Zm(h),S=typeof a=="function"?a(y):y(),g=p(...S);return Wi(m,i,g)}function tu(e){let t={},r=[],n,o={addCase(i,a){let m=typeof i=="string"?i:i.type;if(!m)throw new Error(He(28));if(m in t)throw new Error(He(29));return t[m]=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 eg(e){return typeof e=="function"}function ge(e,t){let[r,n,o]=tu(t),i;if(eg(e))i=()=>Kc(e());else{let m=Kc(e);i=()=>m}function a(m=i(),f){let p=[r[f.type],...n.filter(({matcher:h})=>h(f)).map(({reducer:h})=>h)];return p.filter(h=>!!h).length===0&&(p=[o]),p.reduce((h,y)=>{if(y)if(Ne(h)){let g=y(h,f);return g===void 0?h:g}else{if(De(h))return it(h,S=>y(S,f));{let S=y(h,f);if(S===void 0){if(h===null)return h;throw Error("A case reducer on a non-draftable value must not return undefined")}return S}}return h},m)}return a.getInitialState=i,a}var ru=(e,t)=>Km(e)?e.match(t):e(t);function Ye(...e){return t=>e.some(r=>ru(r,t))}function ar(...e){return t=>e.every(r=>ru(r,t))}function Xn(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 cn(e){return typeof e[0]=="function"&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function Zn(...e){return e.length===0?t=>Xn(t,["pending"]):cn(e)?Ye(...e.map(t=>t.pending)):Zn()(e[0])}function $t(...e){return e.length===0?t=>Xn(t,["rejected"]):cn(e)?Ye(...e.map(t=>t.rejected)):$t()(e[0])}function un(...e){let t=r=>r&&r.meta&&r.meta.rejectedWithValue;return e.length===0?ar($t(...e),t):cn(e)?ar($t(...e),t):un()(e[0])}function at(...e){return e.length===0?t=>Xn(t,["fulfilled"]):cn(e)?Ye(...e.map(t=>t.fulfilled)):at()(e[0])}function eo(...e){return e.length===0?t=>Xn(t,["pending","fulfilled","rejected"]):cn(e)?Ye(...e.flatMap(t=>[t.pending,t.rejected,t.fulfilled])):eo()(e[0])}var tg="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",to=(e=21)=>{let t="",r=e;for(;r--;)t+=tg[Math.random()*64|0];return t},rg=["name","message","stack","code"],sa=class{constructor(e,t){pe(this,"_type");this.payload=e,this.meta=t}},Xc=class{constructor(e,t){pe(this,"_type");this.payload=e,this.meta=t}},ng=e=>{if(typeof e=="object"&&e!==null){let t={};for(let r of rg)typeof e[r]=="string"&&(t[r]=e[r]);return t}return{message:String(e)}},ue=(()=>{function e(t,r,n){let o=D(t+"/fulfilled",(f,p,h,y)=>({payload:f,meta:{...(y||{}),arg:h,requestId:p,requestStatus:"fulfilled"}})),i=D(t+"/pending",(f,p,h)=>({payload:void 0,meta:{...(h||{}),arg:p,requestId:f,requestStatus:"pending"}})),a=D(t+"/rejected",(f,p,h,y,S)=>({payload:y,error:(n&&n.serializeError||ng)(f||"Rejected"),meta:{...(S||{}),arg:h,requestId:p,rejectedWithValue:!!y,requestStatus:"rejected",aborted:f?.name==="AbortError",condition:f?.name==="ConditionError"}}));function m(f){return(p,h,y)=>{let S=n?.idGenerator?n.idGenerator(f):to(),g=new s.AbortController,v,R;function I(T){R=T,g.abort()}let x=_asyncToGenerator(function*(){let T;try{let E=n?.condition?.(f,{getState:h,extra:y});if(ig(E)&&(E=yield E),E===!1||g.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let N=new Promise((k,P)=>{v=()=>{P({name:"AbortError",message:R||"Aborted"})},g.signal.addEventListener("abort",v)});p(i(S,f,n?.getPendingMeta?.({requestId:S,arg:f},{getState:h,extra:y}))),T=yield Promise.race([N,Promise.resolve(r(f,{dispatch:p,getState:h,extra:y,requestId:S,signal:g.signal,abort:I,rejectWithValue:(k,P)=>new sa(k,P),fulfillWithValue:(k,P)=>new Xc(k,P)})).then(k=>{if(k instanceof sa)throw k;return k instanceof Xc?o(k.payload,S,f,k.meta):o(k,S,f)})])}catch(E){T=E instanceof sa?a(null,S,f,E.payload,E.meta):a(E,S,f)}finally{v&&g.signal.removeEventListener("abort",v)}return n&&!n.dispatchConditionRejection&&a.match(T)&&T.meta.condition||p(T),T})();return Object.assign(x,{abort:I,requestId:S,arg:f,unwrap(){return x.then(og)}})}}return Object.assign(m,{pending:i,rejected:a,fulfilled:o,settled:Ye(a,o),typePrefix:t})}return e.withTypes=()=>e,e})();function og(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function ig(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var nu=Symbol.for("rtk-slice-createasyncthunk"),nR={[nu]:ue};function ag(e,t){return`${e}/${t}`}function sg({creators:e}={}){let t=e?.asyncThunk?.[nu];return function(n){let{name:o,reducerPath:i=o}=n;if(!o)throw new Error(He(11));typeof process<"u";let a=(typeof n.reducers=="function"?n.reducers(ug()):n.reducers)||{},m=Object.keys(a),f={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},p={addCase(T,w){let E=typeof T=="string"?T:T.type;if(!E)throw new Error(He(12));if(E in f.sliceCaseReducersByType)throw new Error(He(13));return f.sliceCaseReducersByType[E]=w,p},addMatcher(T,w){return f.sliceMatchers.push({matcher:T,reducer:w}),p},exposeAction(T,w){return f.actionCreators[T]=w,p},exposeCaseReducer(T,w){return f.sliceCaseReducersByName[T]=w,p}};m.forEach(T=>{let w=a[T],E={reducerName:T,type:ag(o,T),createNotation:typeof n.reducers=="function"};dg(w)?fg(E,w,p,t):lg(E,w,p)});function h(){let[T={},w=[],E=void 0]=typeof n.extraReducers=="function"?tu(n.extraReducers):[n.extraReducers],N={...T,...f.sliceCaseReducersByType};return ge(n.initialState,k=>{for(let P in N)k.addCase(P,N[P]);for(let P of f.sliceMatchers)k.addMatcher(P.matcher,P.reducer);for(let P of w)k.addMatcher(P.matcher,P.reducer);E&&k.addDefaultCase(E)})}let y=T=>T,S=new Map,g;function v(T,w){return g||(g=h()),g(T,w)}function R(){return g||(g=h()),g.getInitialState()}function I(T,w=!1){function E(k){let P=k[T];return typeof P>"u"&&w&&(P=R()),P}function N(k=y){let P=Yc(S,w,()=>new WeakMap);return Yc(P,k,()=>{let F={};for(let[O,_]of Object.entries(n.selectors??{}))F[O]=cg(_,k,R,w);return F})}return{reducerPath:T,getSelectors:N,get selectors(){return N(E)},selectSlice:E}}let x={name:o,reducer:v,actions:f.actionCreators,caseReducers:f.sliceCaseReducersByName,getInitialState:R,...I(i),injectInto(T,{reducerPath:w,...E}={}){let N=w??i;return T.inject({reducerPath:N,reducer:v},E),{...x,...I(N,!0)}}};return x}}function cg(e,t,r,n){function o(i,...a){let m=t(i);return typeof m>"u"&&n&&(m=r()),e(m,...a)}return o.unwrapped=e,o}var Ht=sg();function ug(){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 lg({type:e,reducerName:t,createNotation:r},n,o){let i,a;if("reducer"in n){if(r&&!pg(n))throw new Error(He(17));i=n.reducer,a=n.prepare}else i=n;o.addCase(e,i).exposeCaseReducer(t,i).exposeAction(t,a?D(e,a):D(e))}function dg(e){return e._reducerDefinitionType==="asyncThunk"}function pg(e){return e._reducerDefinitionType==="reducerWithPrepare"}function fg({type:e,reducerName:t},r,n,o){if(!o)throw new Error(He(18));let{payloadCreator:i,fulfilled:a,pending:m,rejected:f,settled:p,options:h}=r,y=o(e,i,h);n.exposeAction(t,y),a&&n.addCase(y.fulfilled,a),m&&n.addCase(y.pending,m),f&&n.addCase(y.rejected,f),p&&n.addMatcher(y.settled,p),n.exposeCaseReducer(t,{fulfilled:a||Jn,pending:m||Jn,rejected:f||Jn,settled:p||Jn})}function Jn(){}var ou="listener",iu="completed",au="cancelled",oR=`task-${au}`,iR=`task-${iu}`,aR=`${ou}-${au}`,sR=`${ou}-${iu}`;var{assign:su}=Object;var ca="listenerMiddleware";var mg=su(D(`${ca}/add`),{withTypes:()=>mg}),cR=D(`${ca}/removeAll`),gg=su(D(`${ca}/remove`),{withTypes:()=>gg});var uR=Symbol.for("rtk-state-proxy-original");function He(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. `}d();c();l();u();var G=new H({required:!0,emptyAllowed:!1}),ve=new H({required:!1,emptyAllowed:!1}),we=new H({required:!0,emptyAllowed:!0}),AR=new H({required:!1,emptyAllowed:!0}),ro=new ie({each:G,required:!0}),cu=new H({required:!1,emptyAllowed:!1,regex:/^\d+\.\d+\.\d+$/}),st=({message:e,name:t,stack:r})=>({message:e,name:t,stack:r}),Ue=(e,t)=>{if("required"in t)return{payload:new Fe({value:t}).validate({value:e}).value};let o=new K({options:{required:!0},values:t}).validate(e);if(o)throw new Wr(o);return{payload:e}},B=(e,t)=>{try{return Ue(e,t)}catch(r){return{payload:e,error:st(r)}}},uu=(e,t,r,n)=>{let o=`Check the initialState of ${n}`;return du(e,t,r,o,"Controller initialization error")},lu=(e,t,r,n)=>{let o=`Check the options of ${n}`;return du(e,t,r,o,"Controller initialization error")},du=(e,t,r,n,o)=>{try{return t.validate(r,n)}catch(i){throw e.logger.error(i,o),i}};d();c();l();u();var cr="3.24.2-pre.41f1eb2e37",pu=["@coveo/atomic","@coveo/quantic"];var ua=()=>ve,fu=()=>G,St=D("configuration/updateBasicConfiguration",e=>B(e,{accessToken:ve,environment:new H({required:!1,constrainTo:["prod","hipaa","stg","dev"]}),organizationId:ve})),Je=D("configuration/updateSearchConfiguration",e=>B(e,{proxyBaseUrl:new H({required:!1,url:!0}),pipeline:new H({required:!1,emptyAllowed:!0}),searchHub:ve,timezone:ve,locale:ve,authenticationProviders:new ie({required:!1,each:G})})),hg={enabled:new te({default:!0}),originContext:ua(),originLevel2:ua(),originLevel3:ua(),proxyBaseUrl:new H({required:!1,url:!0}),runtimeEnvironment:new de,anonymous:new te({default:!1}),deviceId:ve,userDisplayName:ve,documentLocation:ve,trackingId:ve,analyticsMode:new H({constrainTo:["legacy","next"],required:!1,default:"next"}),source:new K({options:{required:!1},values:pu.reduce((e,t)=>(e[t]=cu,e),{})})},ur=D("configuration/updateAnalyticsConfiguration",e=>B(e,hg)),lr=D("configuration/analytics/disable"),dr=D("configuration/analytics/enable"),no=D("configuration/analytics/originlevel2",e=>B(e,{originLevel2:fu()})),oo=D("configuration/analytics/originlevel3",e=>B(e,{originLevel3:fu()}));d();c();l();u();d();c();l();u();d();c();l();u();var mu={q:new H,enableQuerySyntax:new te,aq:new H,cq:new H,firstResult:new J({min:0}),numberOfResults:new J({min:0}),sortCriteria:new H,f:new K,fExcluded:new K,cf:new K,nf:new K,mnf:new K,df:new K,debug:new te,sf:new K,tab:new H,af:new K};var vt=D("searchParameters/restore",e=>B(e,mu)),eE=D("searchParameters/restoreTab",e=>B(e,G));d();c();l();u();var io=D("debug/enable"),ao=D("debug/disable");d();c();l();u();var so=()=>!1;var co=ge(so(),e=>{e.addCase(io,()=>!0).addCase(ao,()=>!1).addCase(vt,(t,r)=>r.payload.debug??t)});d();c();l();u();var pr=D("pipeline/set",e=>B(e,new H({required:!0,emptyAllowed:!0})));d();c();l();u();d();c();l();u();var yg=D("history/undo"),Sg=D("history/redo"),Xe=D("history/snapshot"),qE=ue("history/back",/*#__PURE__*/function(){var _ref4=_asyncToGenerator(function*(e,{dispatch:t}){t(yg()),yield t(Me())});return function(_x3,_x4){return _ref4.apply(this,arguments)}}()),NE=ue("history/forward",/*#__PURE__*/function(){var _ref5=_asyncToGenerator(function*(e,{dispatch:t}){t(Sg()),yield t(Me())});return function(_x5,_x6){return _ref5.apply(this,arguments)}}()),Me=ue("history/change",/*#__PURE__*/function(){var _ref6=_asyncToGenerator(function*(e,{getState:t}){return t().history.present});return function(_x7,_x8){return _ref6.apply(this,arguments)}}());d();c();l();u();var fr=()=>"";var mr=ge(fr(),e=>{e.addCase(pr,(t,r)=>r.payload).addCase(Me.fulfilled,(t,r)=>r.payload?.pipeline??t).addCase(Je,(t,r)=>r.payload.pipeline||t)});d();c();l();u();d();c();l();u();d();c();l();u();d();c();l();u();function ct(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 M(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 m(h){try{p(n.next(h))}catch(y){a(y)}}function f(h){try{p(n.throw(h))}catch(y){a(y)}}function p(h){h.done?i(h.value):o(h.value).then(m,f)}p((n=n.apply(e,t||[])).next())})}var ae;(function(e){e.search="search",e.click="click",e.custom="custom",e.view="view",e.collect="collect"})(ae||(ae={}));function pa(){return typeof window<"u"}function Ra(){return typeof navigator<"u"}function gr(){return typeof document<"u"}function fa(){try{return typeof localStorage<"u"}catch{return!1}}function vg(){try{return typeof sessionStorage<"u"}catch{return!1}}function Iu(){return Ra()&&navigator.cookieEnabled}var Cg=[ae.click,ae.custom,ae.search,ae.view],bg=(e,t)=>Cg.indexOf(e)!==-1?Object.assign({language:gr()?document.documentElement.lang:"unknown",userAgent:Ra()?navigator.userAgent:"unknown"},t):t,pn=class e{static set(t,r,n){var o,i,a,m;n&&(i=new Date,i.setTime(i.getTime()+n)),m=window.location.hostname,m.indexOf(".")===-1?gu(t,r,i):(a=m.split("."),o=a[a.length-2]+"."+a[a.length-1],gu(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 gu(e,t,r,n){document.cookie=`${e}=${t}`+(r?`;expires=${r.toUTCString()}`:"")+(n?`;domain=${n}`:"")+";path=/;SameSite=Lax"}function Ag(){return fa()?localStorage:Iu()?new fn:vg()?sessionStorage:new yr}var fn=class e{getItem(t){return pn.get(`${e.prefix}${t}`)}removeItem(t){pn.erase(`${e.prefix}${t}`)}setItem(t,r,n){pn.set(`${e.prefix}${t}`,r,n)}};fn.prefix="coveo_";var ma=class{constructor(){this.cookieStorage=new fn}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)}},yr=class{getItem(t){return null}removeItem(t){}setItem(t,r){}},ln="__coveo.analytics.history",Tu=20,Fu=1e3*60,ku=75,Sr=class{constructor(t){this.store=t||Ag()}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 M(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 M(this,void 0,void 0,function*(){let t=yield this.getHistoryWithInternalTimeAsync();return this.stripEmptyQueries(this.stripInternalTime(t))})}getHistoryWithInternalTime(){try{let t=this.store.getItem(ln);return t&&typeof t=="string"?JSON.parse(t):[]}catch{return[]}}getHistoryWithInternalTimeAsync(){return M(this,void 0,void 0,function*(){try{let t=yield this.store.getItem(ln);return t?JSON.parse(t):[]}catch{return[]}})}setHistory(t){try{this.store.setItem(ln,JSON.stringify(t.slice(0,Tu)))}catch{}}clear(){try{this.store.removeItem(ln)}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,ku)),t}isValidEntry(t){let r=this.getMostRecentElement();return r&&r.value==t.value?(t.internalTime||0)-(r.internalTime||0)>Fu:!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))}},Ou=Object.freeze({__proto__:null,HistoryStore:Sr,MAX_NUMBER_OF_HISTORY_ELEMENTS:Tu,MAX_VALUE_SIZE:ku,MIN_THRESHOLD_FOR_DUPLICATE_VALUE:Fu,STORE_KEY:ln,default:Sr}),wg=(e,t)=>M(void 0,void 0,void 0,function*(){return e===ae.view?(yield xg(t.contentIdValue),Object.assign({location:window.location.toString(),referrer:document.referrer,title:document.title},t)):t}),xg=e=>M(void 0,void 0,void 0,function*(){let t=new Sr,r={name:"PageView",value:e,time:new Date().toISOString()};yield t.addElementAsync(r)}),uo,Rg=new Uint8Array(16);function Eg(){if(!uo&&(uo=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!uo))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return uo(Rg)}var Pg=/^(?:[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 po(e){return typeof e=="string"&&Pg.test(e)}var xe=[];for(let e=0;e<256;++e)xe.push((e+256).toString(16).slice(1));function Du(e,t=0){return(xe[e[t+0]]+xe[e[t+1]]+xe[e[t+2]]+xe[e[t+3]]+"-"+xe[e[t+4]]+xe[e[t+5]]+"-"+xe[e[t+6]]+xe[e[t+7]]+"-"+xe[e[t+8]]+xe[e[t+9]]+"-"+xe[e[t+10]]+xe[e[t+11]]+xe[e[t+12]]+xe[e[t+13]]+xe[e[t+14]]+xe[e[t+15]]).toLowerCase()}function Ig(e){if(!po(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 Tg(e){e=unescape(encodeURIComponent(e));let t=[];for(let r=0;r<e.length;++r)t.push(e.charCodeAt(r));return t}var Fg="6ba7b810-9dad-11d1-80b4-00c04fd430c8",kg="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function Og(e,t,r){function n(o,i,a,m){var f;if(typeof o=="string"&&(o=Tg(o)),typeof i=="string"&&(i=Ig(i)),((f=i)===null||f===void 0?void 0:f.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let p=new Uint8Array(16+o.length);if(p.set(i),p.set(o,i.length),p=r(p),p[6]=p[6]&15|t,p[8]=p[8]&63|128,a){m=m||0;for(let h=0;h<16;++h)a[m+h]=p[h];return a}return Du(p)}try{n.name=e}catch{}return n.DNS=Fg,n.URL=kg,n}var Dg=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),hu={randomUUID:Dg};function zt(e,t,r){if(hu.randomUUID&&!t&&!e)return hu.randomUUID();e=e||{};let n=e.random||(e.rng||Eg)();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 Du(n)}function Mg(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 la(e,t){return e<<t|e>>>32-t}function qg(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 m=0;m<a.length;++m)e.push(a.charCodeAt(m))}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 m=new Uint32Array(16);for(let f=0;f<16;++f)m[f]=e[a*64+f*4]<<24|e[a*64+f*4+1]<<16|e[a*64+f*4+2]<<8|e[a*64+f*4+3];i[a]=m}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 m=new Uint32Array(80);for(let g=0;g<16;++g)m[g]=i[a][g];for(let g=16;g<80;++g)m[g]=la(m[g-3]^m[g-8]^m[g-14]^m[g-16],1);let f=r[0],p=r[1],h=r[2],y=r[3],S=r[4];for(let g=0;g<80;++g){let v=Math.floor(g/20),R=la(f,5)+Mg(v,p,h,y)+S+t[v]+m[g]>>>0;S=y,y=h,h=la(p,30)>>>0,p=f,f=R}r[0]=r[0]+f>>>0,r[1]=r[1]+p>>>0,r[2]=r[2]+h>>>0,r[3]=r[3]+y>>>0,r[4]=r[4]+S>>>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 Ng=Og("v5",80,qg),yu=Ng,Mu="2.30.45",Su=e=>`${e.protocol}//${e.hostname}${e.pathname.indexOf("/")===0?e.pathname:`/${e.pathname}`}${e.search}`,dn={pageview:"pageview",event:"event"},fo=class{constructor({client:t,uuidGenerator:r=zt}){this.client=t,this.uuidGenerator=r}},ga=class extends fo{constructor({client:t,uuidGenerator:r=zt}){super({client:t,uuidGenerator:r}),this.actionData={},this.pageViewId=r(),this.nextPageViewId=this.pageViewId,this.currentLocation=Su(window.location),this.lastReferrer=gr()?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:gr()?document.title:"",encoding:gr()?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===dn.pageview&&(this.nextPageViewId=this.uuidGenerator(),this.hasSentFirstPageView=!0)}getNextValues(t,r){return{pageViewId:t===dn.pageview?this.nextPageViewId:this.pageViewId,referrer:t===dn.pageview&&this.hasSentFirstPageView?this.currentLocation:this.lastReferrer,location:t===dn.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 Su(window.location)}},Ct=class e{constructor(t,r){if(!po(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 po(i)?new e(i,Number.parseInt(o)*1e3):null}};Ct.cvo_cid="cvo_cid";Ct.expirationTime=120;var ha=class extends fo{constructor({client:t,uuidGenerator:r=zt}){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 M(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(Ct.cvo_cid,new Ct(n,Date.now()).toString()),r.toString()}catch{throw new Error("Invalid URL provided")}})}acceptFrom(t){this.client.setAcceptedLinkReferrers(t)}};ha.Id="link";var Qe=Object.keys;function lo(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}var da=128,qu=192,vu=224,Cu=240;function _g(e){return(e&248)===Cu?4:(e&Cu)===vu?3:(e&vu)===qu?2:1}function Vg(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&da)!=da)break;if(r-=3,(n&qu)!=da){t-r>=_g(n)*3&&(r=t);break}}return e.substring(0,r)}var ya={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"},Lg=Qe(ya).map(e=>ya[e]),jg=[...Lg].join("|"),Ug=new RegExp(`^(${jg}$)`),Bg={svcAction:"svc_action",svcActionData:"svc_action_data"},Qg=e=>Qe(e).filter(t=>e[t]!==void 0).reduce((t,r)=>{let n=ya[r]||r;return Object.assign(Object.assign({},t),{[n]:e[r]})},{}),$g=e=>Ug.test(e),Hg=[$g],bu={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",price:"pr",quantity:"qt",coupon:"cc",position:"ps",group:"group"},Au={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",position:"ps",price:"pr",group:"group"},Ee={action:"pa",list:"pal",listSource:"pls"},mo={id:"ti",revenue:"tr",tax:"tt",shipping:"ts",coupon:"tcc",affiliation:"ta",step:"cos",option:"col"},zg=["loyaltyCardId","loyaltyTier","thirdPartyPersona","companyName","favoriteStore","storeName","userIndustry","userRole","userDepartment","businessUnit"],Sa={id:"quoteId",affiliation:"quoteAffiliation"},va={id:"reviewId",rating:"reviewRating",comment:"reviewComment"},Wg={add:Ee,bookmark_add:Ee,bookmark_remove:Ee,click:Ee,checkout:Ee,checkout_option:Ee,detail:Ee,impression:Ee,remove:Ee,refund:Object.assign(Object.assign({},Ee),mo),purchase:Object.assign(Object.assign({},Ee),mo),quickview:Ee,quote:Object.assign(Object.assign({},Ee),Sa),review:Object.assign(Object.assign({},Ee),va)},Gg=Qe(bu).map(e=>bu[e]),Kg=Qe(Au).map(e=>Au[e]),Yg=Qe(Ee).map(e=>Ee[e]),Jg=Qe(mo).map(e=>mo[e]),Xg=Qe(va).map(e=>va[e]),Zg=Qe(Sa).map(e=>Sa[e]),eh=[...Gg,"custom"].join("|"),th=[...Kg,"custom"].join("|"),Nu="(pr[0-9]+)",_u="(il[0-9]+pi[0-9]+)",rh=new RegExp(`^${Nu}(${eh})$`),nh=new RegExp(`^(${_u}(${th}))|(il[0-9]+nm)$`),oh=new RegExp(`^(${Yg.join("|")})$`),ih=new RegExp(`^(${Jg.join("|")})$`),ah=new RegExp(`^${Nu}custom$`),sh=new RegExp(`^${_u}custom$`),ch=new RegExp(`^(${[...zg,...Xg,...Zg].join("|")})$`),uh=e=>rh.test(e),lh=e=>nh.test(e),dh=e=>oh.test(e),ph=e=>ih.test(e),fh=e=>ch.test(e),mh=[lh,uh,dh,ph,fh],gh=[ah,sh],hh={anonymizeIp:"aip"},yh={eventCategory:"ec",eventAction:"ea",eventLabel:"el",eventValue:"ev",page:"dp",visitorId:"cid",clientId:"cid",userId:"uid",currencyCode:"cu"},Sh={hitType:"t",pageViewId:"pid",encoding:"de",location:"dl",referrer:"dr",screenColor:"sd",screenResolution:"sr",title:"dt",userAgent:"ua",language:"ul",eventId:"z",time:"tm"},vh=["contentId","contentIdKey","contentType","searchHub","tab","searchUid","permanentId","contentLocale","trackingId"],Ch=Object.assign(Object.assign(Object.assign(Object.assign({},hh),yh),Sh),vh.reduce((e,t)=>Object.assign(Object.assign({},e),{[t]:t}),{})),Ca=Object.assign(Object.assign({},Ch),Bg),bh=e=>{let t=!!e.action&&Wg[e.action]||{};return Qe(e).reduce((r,n)=>{let o=t[n]||Ca[n]||n;return Object.assign(Object.assign({},r),{[o]:e[n]})},{})},Ah=Qe(Ca).map(e=>Ca[e]),wh=e=>Ah.indexOf(e)!==-1,xh=e=>e==="custom",Rh=e=>[...mh,...Hg,wh,xh].some(t=>t(e)),Eh=e=>Qe(e).reduce((t,r)=>{let n=Ph(r);return n?Object.assign(Object.assign({},t),Ih(n,e[r])):Object.assign(Object.assign({},t),{[r]:e[r]})},{}),Ph=e=>{let t;return[...gh].every(r=>{var n;return t=(n=r.exec(e))===null||n===void 0?void 0:n[1],!t}),t},Ih=(e,t)=>Qe(t).reduce((r,n)=>Object.assign(Object.assign({},r),{[`${e}${n}`]:t[n]}),{}),ba=class{constructor(t){this.opts=t}sendEvent(t,r){return M(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:m}=yield this.preProcessRequestAsPotentialJSONString(`${n}/analytics/${t}?${i}`,r,o),f=this.encodeForEventType(t,m),p=new Blob([f],{type:"application/x-www-form-urlencoded"});navigator.sendBeacon(a,p)})}isAvailable(){return"sendBeacon"in navigator}deleteHttpCookieVisitorId(){return Promise.resolve()}preProcessRequestAsPotentialJSONString(t,r,n){return M(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:m,body:f}=a;o=m||t;try{i=JSON.parse(f)}catch(p){console.error("Unable to process the request body as a JSON string",p)}}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 M(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[ae.click,ae.custom,ae.search,ae.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}},Aa=class{sendEvent(t,r){return M(this,void 0,void 0,function*(){return Promise.resolve()})}deleteHttpCookieVisitorId(){return M(this,void 0,void 0,function*(){return Promise.resolve()})}},wu=C.fetch,go=class{constructor(t){this.opts=t}sendEvent(t,r){return M(this,void 0,void 0,function*(){let{baseUrl:n,visitorIdProvider:o,preprocessRequest:i}=this.opts,a=this.shouldAppendVisitorId(t)?yield this.getVisitorIdParam():"",m={url:`${n}/analytics/${t}${a}`,credentials:"include",mode:"cors",headers:this.getHeaders(),method:"POST",body:JSON.stringify(r)},f=Object.assign(Object.assign({},m),i?yield i(m,"analyticsFetch"):{}),{url:p}=f,h=ct(f,["url"]),y;try{y=yield wu(p,h)}catch(S){console.error("An error has occured when sending the event.",S);return}if(y.ok){let S=yield y.json();return S.visitorId&&o.setCurrentVisitorId(S.visitorId),S}else{try{y.json()}catch{}throw console.error(`An error has occured when sending the "${t}" event.`,y,r),new Error(`An error has occurred when sending the "${t}" event. Check the console logs for more details.`)}})}deleteHttpCookieVisitorId(){return M(this,void 0,void 0,function*(){let{baseUrl:t}=this.opts,r=`${t}/analytics/visit`;yield wu(r,{headers:this.getHeaders(),method:"DELETE"})})}shouldAppendVisitorId(t){return[ae.click,ae.custom,ae.search,ae.view].indexOf(t)!==-1}getVisitorIdParam(){return M(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"})}},wa=class{constructor(t,r){fa()&&Iu()?this.storage=new ma:fa()?this.storage=localStorage:(console.warn("BrowserRuntime detected no valid storage available.",this),this.storage=new yr),this.client=new go(t),this.beaconClient=new ba(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}},xa=class{constructor(t,r){this.storage=r||new yr,this.client=new go(t)}getClientDependingOnEventType(t){return this.client}},ho=class{constructor(){this.storage=new yr,this.client=new Aa}getClientDependingOnEventType(t){return this.client}},Th="xx",Fh=e=>e?.startsWith(Th)||!1,kh=`
27
27
  We've detected you're using React Native but have not provided the corresponding runtime,
28
28
  for an optimal experience please use the "coveo.analytics/react-native" subpackage.
29
29
  Follow the Readme on how to set it up: https://github.com/coveo/coveo.analytics.js#using-react-native
30
- `;function kh(){return typeof navigator<"u"&&navigator.product=="ReactNative"}var Oh=["1",1,"yes",!0];function ho(){let e=[];return ua()&&e.push(window.doNotTrack),Aa()&&e.push(navigator.doNotTrack,navigator.msDoNotTrack,navigator.globalPrivacyControl),e.some(t=>Oh.indexOf(t)!==-1)}var Nu="v15",_u={default:"https://analytics.cloud.coveo.com/rest/ua",production:"https://analytics.cloud.coveo.com/rest/ua",hipaa:"https://analyticshipaa.cloud.coveo.com/rest/ua"};function Dh(e=_u.default,t=Nu,r=!1){if(e=e.replace(/\/$/,""),r)return`${e}/${t}`;let n=e.endsWith("/rest")||e.endsWith("/rest/ua");return`${e}${n?"":"/rest"}/${t}`}var Mh="38824e1f-37f5-42d3-8372-a4b8fa9df946",Ze=class{get defaultOptions(){return{endpoint:_u.default,isCustomEndpoint:!1,token:"",version:Nu,beforeSendHooks:[],afterSendHooks:[]}}get version(){return Ou}constructor(t){if(this.acceptedLinkReferrers=[],!t)throw new Error("You have to pass options to this constructor");this.options=Object.assign(Object.assign({},this.defaultOptions),t),this.visitorId="",this.bufferedRequests=[],this.beforeSendHooks=[Ag,Cg].concat(this.options.beforeSendHooks),this.afterSendHooks=this.options.afterSendHooks,this.eventTypeMapping={};let r={baseUrl:this.baseUrl,token:this.options.token,visitorIdProvider:this,preprocessRequest:this.options.preprocessRequest};ho()?this.runtime=new go:this.runtime=this.options.runtimeEnvironment||this.initRuntime(r),this.addEventTypeMapping(ae.view,{newEventType:ae.view,addClientIdParameter:!0}),this.addEventTypeMapping(ae.click,{newEventType:ae.click,addClientIdParameter:!0}),this.addEventTypeMapping(ae.custom,{newEventType:ae.custom,addClientIdParameter:!0}),this.addEventTypeMapping(ae.search,{newEventType:ae.search,addClientIdParameter:!0})}initRuntime(t){return ua()&&hr()?new Ca(t,()=>{let r=[...this.bufferedRequests];return this.bufferedRequests=[],r}):(kh()&&console.warn(Fh),new ba(t))}get storage(){return this.runtime.storage}determineVisitorId(){return M(this,void 0,void 0,function*(){try{return ua()&&this.extractClientIdFromLink(window.location.href)||(yield this.storage.getItem("visitorId"))||zt()}catch(t){return console.log("Could not get visitor ID from the current runtime environment storage. Using a random ID instead.",t),zt()}})}getCurrentVisitorId(){return M(this,void 0,void 0,function*(){if(!this.visitorId){let t=yield this.determineVisitorId();yield this.setCurrentVisitorId(t)}return this.visitorId})}setCurrentVisitorId(t){return M(this,void 0,void 0,function*(){this.visitorId=t,yield this.storage.setItem("visitorId",t)})}setClientId(t,r){return M(this,void 0,void 0,function*(){if(lo(t))this.setCurrentVisitorId(t.toLowerCase());else{if(!r)throw Error("Cannot generate uuid client id without a specific namespace string.");this.setCurrentVisitorId(gu(t,gu(r,Mh)))}})}getParameters(t,...r){return M(this,void 0,void 0,function*(){return yield this.resolveParameters(t,...r)})}getPayload(t,...r){return M(this,void 0,void 0,function*(){let n=yield this.resolveParameters(t,...r);return yield this.resolvePayloadForParameters(t,n)})}get currentVisitorId(){return typeof(this.visitorId||this.storage.getItem("visitorId"))!="string"&&this.setCurrentVisitorId(zt()),this.visitorId}set currentVisitorId(t){this.visitorId=t,this.storage.setItem("visitorId",t)}extractClientIdFromLink(t){if(ho())return null;try{let r=new URL(t).searchParams.get(Ct.cvo_cid);if(r==null)return null;let n=Ct.fromString(r);return!n||!hr()||!n.validate(document.referrer,this.acceptedLinkReferrers)?null:n.clientId}catch{}return null}resolveParameters(t,...r){return M(this,void 0,void 0,function*(){let{variableLengthArgumentsNames:n=[],addVisitorIdParameter:o=!1,usesMeasurementProtocol:i=!1,addClientIdParameter:a=!1}=this.eventTypeMapping[t]||{};return yield[g=>n.length>0?this.parseVariableArgumentsPayload(n,g):g[0],g=>M(this,void 0,void 0,function*(){return Object.assign(Object.assign({},g),{visitorId:o?yield this.getCurrentVisitorId():""})}),g=>M(this,void 0,void 0,function*(){return a?Object.assign(Object.assign({},g),{clientId:yield this.getCurrentVisitorId()}):g}),g=>i?this.ensureAnonymousUserWhenUsingApiKey(g):g,g=>this.beforeSendHooks.reduce((v,R)=>M(this,void 0,void 0,function*(){let I=yield v;return yield R(t,I)}),g)].reduce((g,v)=>M(this,void 0,void 0,function*(){let R=yield g;return yield v(R)}),Promise.resolve(r))})}resolvePayloadForParameters(t,r){return M(this,void 0,void 0,function*(){let{usesMeasurementProtocol:n=!1}=this.eventTypeMapping[t]||{};return yield[y=>this.setTrackingIdIfTrackingIdNotPresent(y),y=>this.removeEmptyPayloadValues(y,t),y=>this.validateParams(y,t),y=>n?Ch(y):y,y=>n?this.removeUnknownParameters(y):y,y=>n?this.processCustomParameters(y):this.mapCustomParametersToCustomData(y)].reduce((y,S)=>M(this,void 0,void 0,function*(){let g=yield y;return yield S(g)}),Promise.resolve(r))})}makeEvent(t,...r){return M(this,void 0,void 0,function*(){let{newEventType:n=t}=this.eventTypeMapping[t]||{},o=yield this.resolveParameters(t,...r),i=yield this.resolvePayloadForParameters(t,o);return{eventType:n,payload:i,log:a=>M(this,void 0,void 0,function*(){return this.bufferedRequests.push({eventType:n,payload:Object.assign(Object.assign({},i),a)}),yield Promise.all(this.afterSendHooks.map(m=>m(t,Object.assign(Object.assign({},o),a)))),yield this.deferExecution(),yield this.sendFromBuffer()})}})}sendEvent(t,...r){return M(this,void 0,void 0,function*(){return(yield this.makeEvent(t,...r)).log({})})}deferExecution(){return new Promise(t=>setTimeout(t,0))}sendFromBuffer(){return M(this,void 0,void 0,function*(){let t=this.bufferedRequests.shift();if(t){let{eventType:r,payload:n}=t;return this.runtime.getClientDependingOnEventType(r).sendEvent(r,n)}})}clear(){this.storage.removeItem("visitorId"),new vr().clear()}deleteHttpOnlyVisitorId(){this.runtime.client.deleteHttpCookieVisitorId()}makeSearchEvent(t){return M(this,void 0,void 0,function*(){return this.makeEvent(ae.search,t)})}sendSearchEvent(t){var{searchQueryUid:r}=t,n=ct(t,["searchQueryUid"]);return M(this,void 0,void 0,function*(){return(yield this.makeSearchEvent(n)).log({searchQueryUid:r})})}makeClickEvent(t){return M(this,void 0,void 0,function*(){return this.makeEvent(ae.click,t)})}sendClickEvent(t){var{searchQueryUid:r}=t,n=ct(t,["searchQueryUid"]);return M(this,void 0,void 0,function*(){return(yield this.makeClickEvent(n)).log({searchQueryUid:r})})}makeCustomEvent(t){return M(this,void 0,void 0,function*(){return this.makeEvent(ae.custom,t)})}sendCustomEvent(t){var{lastSearchQueryUid:r}=t,n=ct(t,["lastSearchQueryUid"]);return M(this,void 0,void 0,function*(){return(yield this.makeCustomEvent(n)).log({lastSearchQueryUid:r})})}makeViewEvent(t){return M(this,void 0,void 0,function*(){return this.makeEvent(ae.view,t)})}sendViewEvent(t){return M(this,void 0,void 0,function*(){return(yield this.makeViewEvent(t)).log({})})}getVisit(){return M(this,void 0,void 0,function*(){let r=yield(yield b(`${this.baseUrl}/analytics/visit`)).json();return this.visitorId=r.visitorId,r})}getHealth(){return M(this,void 0,void 0,function*(){return yield(yield b(`${this.baseUrl}/analytics/monitoring/health`)).json()})}registerBeforeSendEventHook(t){this.beforeSendHooks.push(t)}registerAfterSendEventHook(t){this.afterSendHooks.push(t)}addEventTypeMapping(t,r){this.eventTypeMapping[t]=r}setAcceptedLinkReferrers(t){if(Array.isArray(t)&&t.every(r=>typeof r=="string"))this.acceptedLinkReferrers=t;else throw Error("Parameter should be an array of domain strings")}parseVariableArgumentsPayload(t,r){let n={};for(let o=0,i=r.length;o<i;o++){let a=r[o];if(typeof a=="string")n[t[o]]=a;else if(typeof a=="object")return Object.assign(Object.assign({},n),a)}return n}isKeyAllowedEmpty(t,r){return({[ae.search]:["queryText"]}[t]||[]).indexOf(r)!==-1}removeEmptyPayloadValues(t,r){let n=o=>typeof o<"u"&&o!==null&&o!=="";return Object.keys(t).filter(o=>this.isKeyAllowedEmpty(r,o)||n(t[o])).reduce((o,i)=>Object.assign(Object.assign({},o),{[i]:t[i]}),{})}removeUnknownParameters(t){return Object.keys(t).filter(n=>{if(xh(n))return!0;console.log(n,"is not processed by coveoua")}).reduce((n,o)=>Object.assign(Object.assign({},n),{[o]:t[o]}),{})}processCustomParameters(t){let{custom:r}=t,n=ct(t,["custom"]),o={};r&&uo(r)&&(o=this.lowercaseKeys(r));let i=Rh(n);return Object.assign(Object.assign({},o),i)}mapCustomParametersToCustomData(t){let{custom:r}=t,n=ct(t,["custom"]);if(r&&uo(r)){let o=this.lowercaseKeys(r);return Object.assign(Object.assign({},n),{customData:Object.assign(Object.assign({},o),t.customData)})}else return t}lowercaseKeys(t){let r=Object.keys(t),n={};return r.forEach(o=>{n[o.toLowerCase()]=t[o]}),n}validateParams(t,r){let{anonymizeIp:n}=t,o=ct(t,["anonymizeIp"]);return n!==void 0&&["0","false","undefined","null","{}","[]",""].indexOf(`${n}`.toLowerCase())==-1&&(o.anonymizeIp=1),(r==ae.view||r==ae.click||r==ae.search||r==ae.custom)&&(o.originLevel3=this.limit(o.originLevel3,1024)),r==ae.view&&(o.location=this.limit(o.location,1024)),(r=="pageview"||r=="event")&&(o.referrer=this.limit(o.referrer,2048),o.location=this.limit(o.location,2048),o.page=this.limit(o.page,2048)),o}ensureAnonymousUserWhenUsingApiKey(t){let{userId:r}=t,n=ct(t,["userId"]);return Th(this.options.token)&&!r?(n.userId="anonymous",n):t}setTrackingIdIfTrackingIdNotPresent(t){let{trackingId:r}=t,n=ct(t,["trackingId"]);return r?t:(n.hasOwnProperty("custom")&&uo(n.custom)&&(n.custom.hasOwnProperty("context_website")||n.custom.hasOwnProperty("siteName"))&&(n.trackingId=n.custom.context_website||n.custom.siteName),n.hasOwnProperty("customData")&&uo(n.customData)&&(n.customData.hasOwnProperty("context_website")||n.customData.hasOwnProperty("siteName"))&&(n.trackingId=n.customData.context_website||n.customData.siteName),n)}limit(t,r){return typeof t=="string"?_g(t,r):t}get baseUrl(){return Dh(this.options.endpoint,this.options.version,this.options.isCustomEndpoint)}},ut;(function(e){e.contextChanged="contextChanged",e.expandToFullUI="expandToFullUI",e.openUserActions="openUserActions",e.showPrecedingSessions="showPrecedingSessions",e.showFollowingSessions="showFollowingSessions",e.clickViewedDocument="clickViewedDocument",e.clickPageView="clickPageView",e.createArticle="createArticle"})(ut||(ut={}));var q;(function(e){e.interfaceLoad="interfaceLoad",e.interfaceChange="interfaceChange",e.didyoumeanAutomatic="didyoumeanAutomatic",e.didyoumeanClick="didyoumeanClick",e.resultsSort="resultsSort",e.searchboxSubmit="searchboxSubmit",e.searchboxClear="searchboxClear",e.searchboxAsYouType="searchboxAsYouType",e.breadcrumbFacet="breadcrumbFacet",e.breadcrumbResetAll="breadcrumbResetAll",e.documentQuickview="documentQuickview",e.documentOpen="documentOpen",e.omniboxAnalytics="omniboxAnalytics",e.omniboxFromLink="omniboxFromLink",e.searchFromLink="searchFromLink",e.triggerNotify="notify",e.triggerExecute="execute",e.triggerQuery="query",e.undoTriggerQuery="undoQuery",e.triggerRedirect="redirect",e.pagerResize="pagerResize",e.pagerNumber="pagerNumber",e.pagerNext="pagerNext",e.pagerPrevious="pagerPrevious",e.pagerScrolling="pagerScrolling",e.staticFilterClearAll="staticFilterClearAll",e.staticFilterSelect="staticFilterSelect",e.staticFilterDeselect="staticFilterDeselect",e.facetClearAll="facetClearAll",e.facetSearch="facetSearch",e.facetSelect="facetSelect",e.facetSelectAll="facetSelectAll",e.facetDeselect="facetDeselect",e.facetExclude="facetExclude",e.facetUnexclude="facetUnexclude",e.facetUpdateSort="facetUpdateSort",e.facetShowMore="showMoreFacetResults",e.facetShowLess="showLessFacetResults",e.queryError="query",e.queryErrorBack="errorBack",e.queryErrorClear="errorClearQuery",e.queryErrorRetry="errorRetry",e.recommendation="recommendation",e.recommendationInterfaceLoad="recommendationInterfaceLoad",e.recommendationOpen="recommendationOpen",e.likeSmartSnippet="likeSmartSnippet",e.dislikeSmartSnippet="dislikeSmartSnippet",e.expandSmartSnippet="expandSmartSnippet",e.collapseSmartSnippet="collapseSmartSnippet",e.openSmartSnippetFeedbackModal="openSmartSnippetFeedbackModal",e.closeSmartSnippetFeedbackModal="closeSmartSnippetFeedbackModal",e.sendSmartSnippetReason="sendSmartSnippetReason",e.expandSmartSnippetSuggestion="expandSmartSnippetSuggestion",e.collapseSmartSnippetSuggestion="collapseSmartSnippetSuggestion",e.showMoreSmartSnippetSuggestion="showMoreSmartSnippetSuggestion",e.showLessSmartSnippetSuggestion="showLessSmartSnippetSuggestion",e.openSmartSnippetSource="openSmartSnippetSource",e.openSmartSnippetSuggestionSource="openSmartSnippetSuggestionSource",e.openSmartSnippetInlineLink="openSmartSnippetInlineLink",e.openSmartSnippetSuggestionInlineLink="openSmartSnippetSuggestionInlineLink",e.recentQueryClick="recentQueriesClick",e.clearRecentQueries="clearRecentQueries",e.recentResultClick="recentResultClick",e.clearRecentResults="clearRecentResults",e.noResultsBack="noResultsBack",e.showMoreFoldedResults="showMoreFoldedResults",e.showLessFoldedResults="showLessFoldedResults",e.copyToClipboard="copyToClipboard",e.caseSendEmail="Case.SendEmail",e.feedItemTextPost="FeedItem.TextPost",e.caseAttach="caseAttach",e.caseDetach="caseDetach",e.retryGeneratedAnswer="retryGeneratedAnswer",e.likeGeneratedAnswer="likeGeneratedAnswer",e.dislikeGeneratedAnswer="dislikeGeneratedAnswer",e.openGeneratedAnswerSource="openGeneratedAnswerSource",e.generatedAnswerStreamEnd="generatedAnswerStreamEnd",e.generatedAnswerSourceHover="generatedAnswerSourceHover",e.generatedAnswerCopyToClipboard="generatedAnswerCopyToClipboard",e.generatedAnswerHideAnswers="generatedAnswerHideAnswers",e.generatedAnswerShowAnswers="generatedAnswerShowAnswers",e.generatedAnswerExpand="generatedAnswerExpand",e.generatedAnswerCollapse="generatedAnswerCollapse",e.generatedAnswerFeedbackSubmit="generatedAnswerFeedbackSubmit",e.rephraseGeneratedAnswer="rephraseGeneratedAnswer",e.generatedAnswerFeedbackSubmitV2="generatedAnswerFeedbackSubmitV2",e.generatedAnswerCitationClick="generatedAnswerCitationClick"})(q||(q={}));var Au={[q.triggerNotify]:"queryPipelineTriggers",[q.triggerExecute]:"queryPipelineTriggers",[q.triggerQuery]:"queryPipelineTriggers",[q.triggerRedirect]:"queryPipelineTriggers",[q.queryError]:"errors",[q.queryErrorBack]:"errors",[q.queryErrorClear]:"errors",[q.queryErrorRetry]:"errors",[q.pagerNext]:"getMoreResults",[q.pagerPrevious]:"getMoreResults",[q.pagerNumber]:"getMoreResults",[q.pagerResize]:"getMoreResults",[q.pagerScrolling]:"getMoreResults",[q.facetSearch]:"facet",[q.facetShowLess]:"facet",[q.facetShowMore]:"facet",[q.recommendation]:"recommendation",[q.likeSmartSnippet]:"smartSnippet",[q.dislikeSmartSnippet]:"smartSnippet",[q.expandSmartSnippet]:"smartSnippet",[q.collapseSmartSnippet]:"smartSnippet",[q.openSmartSnippetFeedbackModal]:"smartSnippet",[q.closeSmartSnippetFeedbackModal]:"smartSnippet",[q.sendSmartSnippetReason]:"smartSnippet",[q.expandSmartSnippetSuggestion]:"smartSnippetSuggestions",[q.collapseSmartSnippetSuggestion]:"smartSnippetSuggestions",[q.showMoreSmartSnippetSuggestion]:"smartSnippetSuggestions",[q.showLessSmartSnippetSuggestion]:"smartSnippetSuggestions",[q.clearRecentQueries]:"recentQueries",[q.recentResultClick]:"recentlyClickedDocuments",[q.clearRecentResults]:"recentlyClickedDocuments",[q.showLessFoldedResults]:"folding",[q.caseDetach]:"case",[q.likeGeneratedAnswer]:"generatedAnswer",[q.dislikeGeneratedAnswer]:"generatedAnswer",[q.openGeneratedAnswerSource]:"generatedAnswer",[q.generatedAnswerStreamEnd]:"generatedAnswer",[q.generatedAnswerSourceHover]:"generatedAnswer",[q.generatedAnswerCopyToClipboard]:"generatedAnswer",[q.generatedAnswerHideAnswers]:"generatedAnswer",[q.generatedAnswerShowAnswers]:"generatedAnswer",[q.generatedAnswerExpand]:"generatedAnswer",[q.generatedAnswerCollapse]:"generatedAnswer",[q.generatedAnswerFeedbackSubmit]:"generatedAnswer",[q.generatedAnswerFeedbackSubmitV2]:"generatedAnswer",[ut.expandToFullUI]:"interface",[ut.openUserActions]:"User Actions",[ut.showPrecedingSessions]:"User Actions",[ut.showFollowingSessions]:"User Actions",[ut.clickViewedDocument]:"User Actions",[ut.clickPageView]:"User Actions",[ut.createArticle]:"createArticle"},Cr=class{constructor(){this.runtime=new go,this.currentVisitorId=""}getPayload(){return Promise.resolve()}getParameters(){return Promise.resolve()}makeEvent(t){return Promise.resolve({eventType:t,payload:null,log:()=>Promise.resolve()})}sendEvent(){return Promise.resolve()}makeSearchEvent(){return this.makeEvent(ae.search)}sendSearchEvent(){return Promise.resolve()}makeClickEvent(){return this.makeEvent(ae.click)}sendClickEvent(){return Promise.resolve()}makeCustomEvent(){return this.makeEvent(ae.custom)}sendCustomEvent(){return Promise.resolve()}makeViewEvent(){return this.makeEvent(ae.view)}sendViewEvent(){return Promise.resolve()}getVisit(){return Promise.resolve({id:"",visitorId:""})}getHealth(){return Promise.resolve({status:""})}registerBeforeSendEventHook(){}registerAfterSendEventHook(){}addEventTypeMapping(){}get version(){return Ou}};function qh(e){let t="";return e.filter(r=>{let n=r!==t;return t=r,n})}function Nh(e){return e.map(t=>t.replace(/;/g,""))}function Vu(e){let r=e.join(";");return r.length<=256?r:Vu(e.slice(1))}var wu=e=>{let t=Nh(e),r=qh(t);return Vu(r)};function xu(e){let t=typeof e.partialQueries=="string"?e.partialQueries:wu(e.partialQueries),r=typeof e.suggestions=="string"?e.suggestions:wu(e.suggestions);return Object.assign(Object.assign({},e),{partialQueries:t,suggestions:r})}var yo=class{constructor(t,r){this.opts=t,this.provider=r;let n=t.enableAnalytics===!1||ho();this.coveoAnalyticsClient=n?new Cr:new Ze(t)}disable(){this.coveoAnalyticsClient=new Cr}enable(){this.coveoAnalyticsClient=new Ze(this.opts)}makeInterfaceLoad(){return this.makeSearchEvent(q.interfaceLoad)}logInterfaceLoad(){return M(this,void 0,void 0,function*(){return(yield this.makeInterfaceLoad()).log({searchUID:this.provider.getSearchUID()})})}makeRecommendationInterfaceLoad(){return this.makeSearchEvent(q.recommendationInterfaceLoad)}logRecommendationInterfaceLoad(){return M(this,void 0,void 0,function*(){return(yield this.makeRecommendationInterfaceLoad()).log({searchUID:this.provider.getSearchUID()})})}makeRecommendation(){return this.makeCustomEvent(q.recommendation)}logRecommendation(){return M(this,void 0,void 0,function*(){return(yield this.makeRecommendation()).log({searchUID:this.provider.getSearchUID()})})}makeRecommendationOpen(t,r){return this.makeClickEvent(q.recommendationOpen,t,r)}logRecommendationOpen(t,r){return M(this,void 0,void 0,function*(){return(yield this.makeRecommendationOpen(t,r)).log({searchUID:this.provider.getSearchUID()})})}makeStaticFilterClearAll(t){return this.makeSearchEvent(q.staticFilterClearAll,t)}logStaticFilterClearAll(t){return M(this,void 0,void 0,function*(){return(yield this.makeStaticFilterClearAll(t)).log({searchUID:this.provider.getSearchUID()})})}makeStaticFilterSelect(t){return this.makeSearchEvent(q.staticFilterSelect,t)}logStaticFilterSelect(t){return M(this,void 0,void 0,function*(){return(yield this.makeStaticFilterSelect(t)).log({searchUID:this.provider.getSearchUID()})})}makeStaticFilterDeselect(t){return this.makeSearchEvent(q.staticFilterDeselect,t)}logStaticFilterDeselect(t){return M(this,void 0,void 0,function*(){return(yield this.makeStaticFilterDeselect(t)).log({searchUID:this.provider.getSearchUID()})})}makeFetchMoreResults(){return this.makeCustomEvent(q.pagerScrolling,{type:"getMoreResults"})}logFetchMoreResults(){return M(this,void 0,void 0,function*(){return(yield this.makeFetchMoreResults()).log({searchUID:this.provider.getSearchUID()})})}makeInterfaceChange(t){return this.makeSearchEvent(q.interfaceChange,t)}logInterfaceChange(t){return M(this,void 0,void 0,function*(){return(yield this.makeInterfaceChange(t)).log({searchUID:this.provider.getSearchUID()})})}makeDidYouMeanAutomatic(){return this.makeSearchEvent(q.didyoumeanAutomatic)}logDidYouMeanAutomatic(){return M(this,void 0,void 0,function*(){return(yield this.makeDidYouMeanAutomatic()).log({searchUID:this.provider.getSearchUID()})})}makeDidYouMeanClick(){return this.makeSearchEvent(q.didyoumeanClick)}logDidYouMeanClick(){return M(this,void 0,void 0,function*(){return(yield this.makeDidYouMeanClick()).log({searchUID:this.provider.getSearchUID()})})}makeResultsSort(t){return this.makeSearchEvent(q.resultsSort,t)}logResultsSort(t){return M(this,void 0,void 0,function*(){return(yield this.makeResultsSort(t)).log({searchUID:this.provider.getSearchUID()})})}makeSearchboxSubmit(){return this.makeSearchEvent(q.searchboxSubmit)}logSearchboxSubmit(){return M(this,void 0,void 0,function*(){return(yield this.makeSearchboxSubmit()).log({searchUID:this.provider.getSearchUID()})})}makeSearchboxClear(){return this.makeSearchEvent(q.searchboxClear)}logSearchboxClear(){return M(this,void 0,void 0,function*(){return(yield this.makeSearchboxClear()).log({searchUID:this.provider.getSearchUID()})})}makeSearchboxAsYouType(){return this.makeSearchEvent(q.searchboxAsYouType)}logSearchboxAsYouType(){return M(this,void 0,void 0,function*(){return(yield this.makeSearchboxAsYouType()).log({searchUID:this.provider.getSearchUID()})})}makeBreadcrumbFacet(t){return this.makeSearchEvent(q.breadcrumbFacet,t)}logBreadcrumbFacet(t){return M(this,void 0,void 0,function*(){return(yield this.makeBreadcrumbFacet(t)).log({searchUID:this.provider.getSearchUID()})})}makeBreadcrumbResetAll(){return this.makeSearchEvent(q.breadcrumbResetAll)}logBreadcrumbResetAll(){return M(this,void 0,void 0,function*(){return(yield this.makeBreadcrumbResetAll()).log({searchUID:this.provider.getSearchUID()})})}makeDocumentQuickview(t,r){return this.makeClickEvent(q.documentQuickview,t,r)}logDocumentQuickview(t,r){return M(this,void 0,void 0,function*(){return(yield this.makeDocumentQuickview(t,r)).log({searchUID:this.provider.getSearchUID()})})}makeDocumentOpen(t,r){return this.makeClickEvent(q.documentOpen,t,r)}logDocumentOpen(t,r){return M(this,void 0,void 0,function*(){return(yield this.makeDocumentOpen(t,r)).log({searchUID:this.provider.getSearchUID()})})}makeOmniboxAnalytics(t){return this.makeSearchEvent(q.omniboxAnalytics,xu(t))}logOmniboxAnalytics(t){return M(this,void 0,void 0,function*(){return(yield this.makeOmniboxAnalytics(t)).log({searchUID:this.provider.getSearchUID()})})}makeOmniboxFromLink(t){return this.makeSearchEvent(q.omniboxFromLink,xu(t))}logOmniboxFromLink(t){return M(this,void 0,void 0,function*(){return(yield this.makeOmniboxFromLink(t)).log({searchUID:this.provider.getSearchUID()})})}makeSearchFromLink(){return this.makeSearchEvent(q.searchFromLink)}logSearchFromLink(){return M(this,void 0,void 0,function*(){return(yield this.makeSearchFromLink()).log({searchUID:this.provider.getSearchUID()})})}makeTriggerNotify(t){return this.makeCustomEvent(q.triggerNotify,t)}logTriggerNotify(t){return M(this,void 0,void 0,function*(){return(yield this.makeTriggerNotify(t)).log({searchUID:this.provider.getSearchUID()})})}makeTriggerExecute(t){return this.makeCustomEvent(q.triggerExecute,t)}logTriggerExecute(t){return M(this,void 0,void 0,function*(){return(yield this.makeTriggerExecute(t)).log({searchUID:this.provider.getSearchUID()})})}makeTriggerQuery(){return this.makeCustomEvent(q.triggerQuery,{query:this.provider.getSearchEventRequestPayload().queryText},"queryPipelineTriggers")}logTriggerQuery(){return M(this,void 0,void 0,function*(){return(yield this.makeTriggerQuery()).log({searchUID:this.provider.getSearchUID()})})}makeUndoTriggerQuery(t){return this.makeSearchEvent(q.undoTriggerQuery,t)}logUndoTriggerQuery(t){return M(this,void 0,void 0,function*(){return(yield this.makeUndoTriggerQuery(t)).log({searchUID:this.provider.getSearchUID()})})}makeTriggerRedirect(t){return this.makeCustomEvent(q.triggerRedirect,Object.assign(Object.assign({},t),{query:this.provider.getSearchEventRequestPayload().queryText}))}logTriggerRedirect(t){return M(this,void 0,void 0,function*(){return(yield this.makeTriggerRedirect(t)).log({searchUID:this.provider.getSearchUID()})})}makePagerResize(t){return this.makeCustomEvent(q.pagerResize,t)}logPagerResize(t){return M(this,void 0,void 0,function*(){return(yield this.makePagerResize(t)).log({searchUID:this.provider.getSearchUID()})})}makePagerNumber(t){return this.makeCustomEvent(q.pagerNumber,t)}logPagerNumber(t){return M(this,void 0,void 0,function*(){return(yield this.makePagerNumber(t)).log({searchUID:this.provider.getSearchUID()})})}makePagerNext(t){return this.makeCustomEvent(q.pagerNext,t)}logPagerNext(t){return M(this,void 0,void 0,function*(){return(yield this.makePagerNext(t)).log({searchUID:this.provider.getSearchUID()})})}makePagerPrevious(t){return this.makeCustomEvent(q.pagerPrevious,t)}logPagerPrevious(t){return M(this,void 0,void 0,function*(){return(yield this.makePagerPrevious(t)).log({searchUID:this.provider.getSearchUID()})})}makePagerScrolling(){return this.makeCustomEvent(q.pagerScrolling)}logPagerScrolling(){return M(this,void 0,void 0,function*(){return(yield this.makePagerScrolling()).log({searchUID:this.provider.getSearchUID()})})}makeFacetClearAll(t){return this.makeSearchEvent(q.facetClearAll,t)}logFacetClearAll(t){return M(this,void 0,void 0,function*(){return(yield this.makeFacetClearAll(t)).log({searchUID:this.provider.getSearchUID()})})}makeFacetSearch(t){return this.makeSearchEvent(q.facetSearch,t)}logFacetSearch(t){return M(this,void 0,void 0,function*(){return(yield this.makeFacetSearch(t)).log({searchUID:this.provider.getSearchUID()})})}makeFacetSelect(t){return this.makeSearchEvent(q.facetSelect,t)}logFacetSelect(t){return M(this,void 0,void 0,function*(){return(yield this.makeFacetSelect(t)).log({searchUID:this.provider.getSearchUID()})})}makeFacetDeselect(t){return this.makeSearchEvent(q.facetDeselect,t)}logFacetDeselect(t){return M(this,void 0,void 0,function*(){return(yield this.makeFacetDeselect(t)).log({searchUID:this.provider.getSearchUID()})})}makeFacetExclude(t){return this.makeSearchEvent(q.facetExclude,t)}logFacetExclude(t){return M(this,void 0,void 0,function*(){return(yield this.makeFacetExclude(t)).log({searchUID:this.provider.getSearchUID()})})}makeFacetUnexclude(t){return this.makeSearchEvent(q.facetUnexclude,t)}logFacetUnexclude(t){return M(this,void 0,void 0,function*(){return(yield this.makeFacetUnexclude(t)).log({searchUID:this.provider.getSearchUID()})})}makeFacetSelectAll(t){return this.makeSearchEvent(q.facetSelectAll,t)}logFacetSelectAll(t){return M(this,void 0,void 0,function*(){return(yield this.makeFacetSelectAll(t)).log({searchUID:this.provider.getSearchUID()})})}makeFacetUpdateSort(t){return this.makeSearchEvent(q.facetUpdateSort,t)}logFacetUpdateSort(t){return M(this,void 0,void 0,function*(){return(yield this.makeFacetUpdateSort(t)).log({searchUID:this.provider.getSearchUID()})})}makeFacetShowMore(t){return this.makeCustomEvent(q.facetShowMore,t)}logFacetShowMore(t){return M(this,void 0,void 0,function*(){return(yield this.makeFacetShowMore(t)).log({searchUID:this.provider.getSearchUID()})})}makeFacetShowLess(t){return this.makeCustomEvent(q.facetShowLess,t)}logFacetShowLess(t){return M(this,void 0,void 0,function*(){return(yield this.makeFacetShowLess(t)).log({searchUID:this.provider.getSearchUID()})})}makeQueryError(t){return this.makeCustomEvent(q.queryError,t)}logQueryError(t){return M(this,void 0,void 0,function*(){return(yield this.makeQueryError(t)).log({searchUID:this.provider.getSearchUID()})})}makeQueryErrorBack(){return M(this,void 0,void 0,function*(){let t=yield this.makeCustomEvent(q.queryErrorBack);return{description:t.description,log:()=>M(this,void 0,void 0,function*(){return yield t.log({searchUID:this.provider.getSearchUID()}),this.logSearchEvent(q.queryErrorBack)})}})}logQueryErrorBack(){return M(this,void 0,void 0,function*(){return(yield this.makeQueryErrorBack()).log({searchUID:this.provider.getSearchUID()})})}makeQueryErrorRetry(){return M(this,void 0,void 0,function*(){let t=yield this.makeCustomEvent(q.queryErrorRetry);return{description:t.description,log:()=>M(this,void 0,void 0,function*(){return yield t.log({searchUID:this.provider.getSearchUID()}),this.logSearchEvent(q.queryErrorRetry)})}})}logQueryErrorRetry(){return M(this,void 0,void 0,function*(){return(yield this.makeQueryErrorRetry()).log({searchUID:this.provider.getSearchUID()})})}makeQueryErrorClear(){return M(this,void 0,void 0,function*(){let t=yield this.makeCustomEvent(q.queryErrorClear);return{description:t.description,log:()=>M(this,void 0,void 0,function*(){return yield t.log({searchUID:this.provider.getSearchUID()}),this.logSearchEvent(q.queryErrorClear)})}})}logQueryErrorClear(){return M(this,void 0,void 0,function*(){return(yield this.makeQueryErrorClear()).log({searchUID:this.provider.getSearchUID()})})}makeLikeSmartSnippet(){return this.makeCustomEvent(q.likeSmartSnippet)}logLikeSmartSnippet(){return M(this,void 0,void 0,function*(){return(yield this.makeLikeSmartSnippet()).log({searchUID:this.provider.getSearchUID()})})}makeDislikeSmartSnippet(){return this.makeCustomEvent(q.dislikeSmartSnippet)}logDislikeSmartSnippet(){return M(this,void 0,void 0,function*(){return(yield this.makeDislikeSmartSnippet()).log({searchUID:this.provider.getSearchUID()})})}makeExpandSmartSnippet(){return this.makeCustomEvent(q.expandSmartSnippet)}logExpandSmartSnippet(){return M(this,void 0,void 0,function*(){return(yield this.makeExpandSmartSnippet()).log({searchUID:this.provider.getSearchUID()})})}makeCollapseSmartSnippet(){return this.makeCustomEvent(q.collapseSmartSnippet)}logCollapseSmartSnippet(){return M(this,void 0,void 0,function*(){return(yield this.makeCollapseSmartSnippet()).log({searchUID:this.provider.getSearchUID()})})}makeOpenSmartSnippetFeedbackModal(){return this.makeCustomEvent(q.openSmartSnippetFeedbackModal)}logOpenSmartSnippetFeedbackModal(){return M(this,void 0,void 0,function*(){return(yield this.makeOpenSmartSnippetFeedbackModal()).log({searchUID:this.provider.getSearchUID()})})}makeCloseSmartSnippetFeedbackModal(){return this.makeCustomEvent(q.closeSmartSnippetFeedbackModal)}logCloseSmartSnippetFeedbackModal(){return M(this,void 0,void 0,function*(){return(yield this.makeCloseSmartSnippetFeedbackModal()).log({searchUID:this.provider.getSearchUID()})})}makeSmartSnippetFeedbackReason(t,r){return this.makeCustomEvent(q.sendSmartSnippetReason,{reason:t,details:r})}logSmartSnippetFeedbackReason(t,r){return M(this,void 0,void 0,function*(){return(yield this.makeSmartSnippetFeedbackReason(t,r)).log({searchUID:this.provider.getSearchUID()})})}makeExpandSmartSnippetSuggestion(t){return this.makeCustomEvent(q.expandSmartSnippetSuggestion,"documentId"in t?t:{documentId:t})}logExpandSmartSnippetSuggestion(t){return M(this,void 0,void 0,function*(){return(yield this.makeExpandSmartSnippetSuggestion(t)).log({searchUID:this.provider.getSearchUID()})})}makeCollapseSmartSnippetSuggestion(t){return this.makeCustomEvent(q.collapseSmartSnippetSuggestion,"documentId"in t?t:{documentId:t})}logCollapseSmartSnippetSuggestion(t){return M(this,void 0,void 0,function*(){return(yield this.makeCollapseSmartSnippetSuggestion(t)).log({searchUID:this.provider.getSearchUID()})})}makeShowMoreSmartSnippetSuggestion(t){return this.makeCustomEvent(q.showMoreSmartSnippetSuggestion,t)}logShowMoreSmartSnippetSuggestion(t){return M(this,void 0,void 0,function*(){return(yield this.makeShowMoreSmartSnippetSuggestion(t)).log({searchUID:this.provider.getSearchUID()})})}makeShowLessSmartSnippetSuggestion(t){return this.makeCustomEvent(q.showLessSmartSnippetSuggestion,t)}logShowLessSmartSnippetSuggestion(t){return M(this,void 0,void 0,function*(){return(yield this.makeShowLessSmartSnippetSuggestion(t)).log({searchUID:this.provider.getSearchUID()})})}makeOpenSmartSnippetSource(t,r){return this.makeClickEvent(q.openSmartSnippetSource,t,r)}logOpenSmartSnippetSource(t,r){return M(this,void 0,void 0,function*(){return(yield this.makeOpenSmartSnippetSource(t,r)).log({searchUID:this.provider.getSearchUID()})})}makeOpenSmartSnippetSuggestionSource(t,r){return this.makeClickEvent(q.openSmartSnippetSuggestionSource,t,{contentIDKey:r.documentId.contentIdKey,contentIDValue:r.documentId.contentIdValue},r)}makeCopyToClipboard(t,r){return this.makeClickEvent(q.copyToClipboard,t,r)}logCopyToClipboard(t,r){return M(this,void 0,void 0,function*(){return(yield this.makeCopyToClipboard(t,r)).log({searchUID:this.provider.getSearchUID()})})}logOpenSmartSnippetSuggestionSource(t,r){return M(this,void 0,void 0,function*(){return(yield this.makeOpenSmartSnippetSuggestionSource(t,r)).log({searchUID:this.provider.getSearchUID()})})}makeOpenSmartSnippetInlineLink(t,r){return this.makeClickEvent(q.openSmartSnippetInlineLink,t,{contentIDKey:r.contentIDKey,contentIDValue:r.contentIDValue},r)}logOpenSmartSnippetInlineLink(t,r){return M(this,void 0,void 0,function*(){return(yield this.makeOpenSmartSnippetInlineLink(t,r)).log({searchUID:this.provider.getSearchUID()})})}makeOpenSmartSnippetSuggestionInlineLink(t,r){return this.makeClickEvent(q.openSmartSnippetSuggestionInlineLink,t,{contentIDKey:r.documentId.contentIdKey,contentIDValue:r.documentId.contentIdValue},r)}logOpenSmartSnippetSuggestionInlineLink(t,r){return M(this,void 0,void 0,function*(){return(yield this.makeOpenSmartSnippetSuggestionInlineLink(t,r)).log({searchUID:this.provider.getSearchUID()})})}makeRecentQueryClick(){return this.makeSearchEvent(q.recentQueryClick)}logRecentQueryClick(){return M(this,void 0,void 0,function*(){return(yield this.makeRecentQueryClick()).log({searchUID:this.provider.getSearchUID()})})}makeClearRecentQueries(){return this.makeCustomEvent(q.clearRecentQueries)}logClearRecentQueries(){return M(this,void 0,void 0,function*(){return(yield this.makeClearRecentQueries()).log({searchUID:this.provider.getSearchUID()})})}makeRecentResultClick(t,r){return this.makeCustomEvent(q.recentResultClick,{info:t,identifier:r})}logRecentResultClick(t,r){return M(this,void 0,void 0,function*(){return(yield this.makeRecentResultClick(t,r)).log({searchUID:this.provider.getSearchUID()})})}makeClearRecentResults(){return this.makeCustomEvent(q.clearRecentResults)}logClearRecentResults(){return M(this,void 0,void 0,function*(){return(yield this.makeClearRecentResults()).log({searchUID:this.provider.getSearchUID()})})}makeNoResultsBack(){return this.makeSearchEvent(q.noResultsBack)}logNoResultsBack(){return M(this,void 0,void 0,function*(){return(yield this.makeNoResultsBack()).log({searchUID:this.provider.getSearchUID()})})}makeShowMoreFoldedResults(t,r){return this.makeClickEvent(q.showMoreFoldedResults,t,r)}logShowMoreFoldedResults(t,r){return M(this,void 0,void 0,function*(){return(yield this.makeShowMoreFoldedResults(t,r)).log({searchUID:this.provider.getSearchUID()})})}makeShowLessFoldedResults(){return this.makeCustomEvent(q.showLessFoldedResults)}logShowLessFoldedResults(){return M(this,void 0,void 0,function*(){return(yield this.makeShowLessFoldedResults()).log({searchUID:this.provider.getSearchUID()})})}makeEventDescription(t,r){var n;return{actionCause:r,customData:(n=t.payload)===null||n===void 0?void 0:n.customData}}makeCustomEvent(t,r,n=Au[t]){return M(this,void 0,void 0,function*(){this.coveoAnalyticsClient.getParameters;let o=Object.assign(Object.assign({},this.provider.getBaseMetadata()),r),i=Object.assign(Object.assign({},yield this.getBaseEventRequest(o)),{eventType:n,eventValue:t}),a=yield this.coveoAnalyticsClient.makeCustomEvent(i);return{description:this.makeEventDescription(a,t),log:({searchUID:m})=>a.log({lastSearchQueryUid:m})}})}logCustomEvent(t,r,n=Au[t]){return M(this,void 0,void 0,function*(){return(yield this.makeCustomEvent(t,r,n)).log({searchUID:this.provider.getSearchUID()})})}makeCustomEventWithType(t,r,n){return M(this,void 0,void 0,function*(){let o=Object.assign(Object.assign({},this.provider.getBaseMetadata()),n),i=Object.assign(Object.assign({},yield this.getBaseEventRequest(o)),{eventType:r,eventValue:t}),a=yield this.coveoAnalyticsClient.makeCustomEvent(i);return{description:this.makeEventDescription(a,t),log:({searchUID:m})=>a.log({lastSearchQueryUid:m})}})}logCustomEventWithType(t,r,n){return M(this,void 0,void 0,function*(){return(yield this.makeCustomEventWithType(t,r,n)).log({searchUID:this.provider.getSearchUID()})})}logSearchEvent(t,r){return M(this,void 0,void 0,function*(){return(yield this.makeSearchEvent(t,r)).log({searchUID:this.provider.getSearchUID()})})}makeSearchEvent(t,r){return M(this,void 0,void 0,function*(){let n=yield this.getBaseSearchEventRequest(t,r),o=yield this.coveoAnalyticsClient.makeSearchEvent(n);return{description:this.makeEventDescription(o,t),log:({searchUID:i})=>o.log({searchQueryUid:i})}})}makeClickEvent(t,r,n,o){return M(this,void 0,void 0,function*(){let i=Object.assign(Object.assign(Object.assign({},r),yield this.getBaseEventRequest(Object.assign(Object.assign({},n),o))),{queryPipeline:this.provider.getPipeline(),actionCause:t}),a=yield this.coveoAnalyticsClient.makeClickEvent(i);return{description:this.makeEventDescription(a,t),log:({searchUID:m})=>a.log({searchQueryUid:m})}})}logClickEvent(t,r,n,o){return M(this,void 0,void 0,function*(){return(yield this.makeClickEvent(t,r,n,o)).log({searchUID:this.provider.getSearchUID()})})}getBaseSearchEventRequest(t,r){var n,o;return M(this,void 0,void 0,function*(){return Object.assign(Object.assign(Object.assign({},yield this.getBaseEventRequest(Object.assign(Object.assign({},r),(o=(n=this.provider).getGeneratedAnswerMetadata)===null||o===void 0?void 0:o.call(n)))),this.provider.getSearchEventRequestPayload()),{queryPipeline:this.provider.getPipeline(),actionCause:t})})}getBaseEventRequest(t){return M(this,void 0,void 0,function*(){let r=Object.assign(Object.assign({},this.provider.getBaseMetadata()),t);return Object.assign(Object.assign(Object.assign({},this.getOrigins()),this.getSplitTestRun()),{customData:r,language:this.provider.getLanguage(),facetState:this.provider.getFacetState?this.provider.getFacetState():[],anonymous:this.provider.getIsAnonymous(),clientId:yield this.getClientId()})})}getOrigins(){var t,r;return{originContext:(r=(t=this.provider).getOriginContext)===null||r===void 0?void 0:r.call(t),originLevel1:this.provider.getOriginLevel1(),originLevel2:this.provider.getOriginLevel2(),originLevel3:this.provider.getOriginLevel3()}}getClientId(){return this.coveoAnalyticsClient instanceof Ze?this.coveoAnalyticsClient.getCurrentVisitorId():void 0}getSplitTestRun(){let t=this.provider.getSplitTestRunName?this.provider.getSplitTestRunName():"",r=this.provider.getSplitTestRunVersion?this.provider.getSplitTestRunVersion():"";return Object.assign(Object.assign({},t&&{splitTestRunName:t}),r&&{splitTestRunVersion:r})}makeLikeGeneratedAnswer(t){return this.makeCustomEvent(q.likeGeneratedAnswer,t)}logLikeGeneratedAnswer(t){return M(this,void 0,void 0,function*(){return(yield this.makeLikeGeneratedAnswer(t)).log({searchUID:this.provider.getSearchUID()})})}makeDislikeGeneratedAnswer(t){return this.makeCustomEvent(q.dislikeGeneratedAnswer,t)}logDislikeGeneratedAnswer(t){return M(this,void 0,void 0,function*(){return(yield this.makeDislikeGeneratedAnswer(t)).log({searchUID:this.provider.getSearchUID()})})}makeOpenGeneratedAnswerSource(t){return this.makeCustomEvent(q.openGeneratedAnswerSource,t)}logOpenGeneratedAnswerSource(t){return M(this,void 0,void 0,function*(){return(yield this.makeOpenGeneratedAnswerSource(t)).log({searchUID:this.provider.getSearchUID()})})}makeGeneratedAnswerCitationClick(t,r){return this.makeClickEvent(q.generatedAnswerCitationClick,Object.assign(Object.assign({},t),{documentPosition:1}),{contentIDKey:r.documentId.contentIdKey,contentIDValue:r.documentId.contentIdValue},r)}logGeneratedAnswerCitationClick(t,r){return M(this,void 0,void 0,function*(){return(yield this.makeGeneratedAnswerCitationClick(t,r)).log({searchUID:this.provider.getSearchUID()})})}makeGeneratedAnswerSourceHover(t){return this.makeCustomEvent(q.generatedAnswerSourceHover,t)}logGeneratedAnswerSourceHover(t){return M(this,void 0,void 0,function*(){return(yield this.makeGeneratedAnswerSourceHover(t)).log({searchUID:this.provider.getSearchUID()})})}makeGeneratedAnswerCopyToClipboard(t){return this.makeCustomEvent(q.generatedAnswerCopyToClipboard,t)}logGeneratedAnswerCopyToClipboard(t){return M(this,void 0,void 0,function*(){return(yield this.makeGeneratedAnswerCopyToClipboard(t)).log({searchUID:this.provider.getSearchUID()})})}makeGeneratedAnswerHideAnswers(t){return this.makeCustomEvent(q.generatedAnswerHideAnswers,t)}logGeneratedAnswerHideAnswers(t){return M(this,void 0,void 0,function*(){return(yield this.makeGeneratedAnswerHideAnswers(t)).log({searchUID:this.provider.getSearchUID()})})}makeGeneratedAnswerShowAnswers(t){return this.makeCustomEvent(q.generatedAnswerShowAnswers,t)}logGeneratedAnswerShowAnswers(t){return M(this,void 0,void 0,function*(){return(yield this.makeGeneratedAnswerShowAnswers(t)).log({searchUID:this.provider.getSearchUID()})})}makeGeneratedAnswerExpand(t){return this.makeCustomEvent(q.generatedAnswerExpand,t)}logGeneratedAnswerExpand(t){return M(this,void 0,void 0,function*(){return(yield this.makeGeneratedAnswerExpand(t)).log({searchUID:this.provider.getSearchUID()})})}makeGeneratedAnswerCollapse(t){return this.makeCustomEvent(q.generatedAnswerCollapse,t)}logGeneratedAnswerCollapse(t){return M(this,void 0,void 0,function*(){return(yield this.makeGeneratedAnswerCollapse(t)).log({searchUID:this.provider.getSearchUID()})})}makeGeneratedAnswerFeedbackSubmit(t){return this.makeCustomEvent(q.generatedAnswerFeedbackSubmit,t)}logGeneratedAnswerFeedbackSubmit(t){return M(this,void 0,void 0,function*(){return(yield this.makeGeneratedAnswerFeedbackSubmit(t)).log({searchUID:this.provider.getSearchUID()})})}makeGeneratedAnswerFeedbackSubmitV2(t){return this.makeCustomEvent(q.generatedAnswerFeedbackSubmitV2,t)}logGeneratedAnswerFeedbackSubmitV2(t){return M(this,void 0,void 0,function*(){return(yield this.makeGeneratedAnswerFeedbackSubmitV2(t)).log({searchUID:this.provider.getSearchUID()})})}makeRephraseGeneratedAnswer(t){return this.makeSearchEvent(q.rephraseGeneratedAnswer,t)}logRephraseGeneratedAnswer(t){return M(this,void 0,void 0,function*(){return(yield this.makeRephraseGeneratedAnswer(t)).log({searchUID:this.provider.getSearchUID()})})}makeRetryGeneratedAnswer(){return this.makeSearchEvent(q.retryGeneratedAnswer)}logRetryGeneratedAnswer(){return M(this,void 0,void 0,function*(){return(yield this.makeRetryGeneratedAnswer()).log({searchUID:this.provider.getSearchUID()})})}makeGeneratedAnswerStreamEnd(t){return this.makeCustomEvent(q.generatedAnswerStreamEnd,t)}logGeneratedAnswerStreamEnd(t){return M(this,void 0,void 0,function*(){return(yield this.makeGeneratedAnswerStreamEnd(t)).log({searchUID:this.provider.getSearchUID()})})}},So=Object.assign({},pn),Ru=Object.keys(So).map(e=>So[e]),yr=class extends pa{constructor({client:t,uuidGenerator:r=zt}){super({client:t,uuidGenerator:r}),this.ticket={}}getApi(t){let r=super.getApi(t);if(r!==null)return r;switch(t){case"setTicket":return this.setTicket;default:return null}}addHooks(){this.addHooksForEvent(),this.addHooksForPageView(),this.addHooksForSVCEvents()}setTicket(t){this.ticket=t}clearPluginData(){this.ticket={}}addHooksForSVCEvents(){this.client.registerBeforeSendEventHook((t,...[r])=>Ru.indexOf(t)!==-1?this.addSVCDataToPayload(t,r):r),this.client.registerAfterSendEventHook((t,...[r])=>(Ru.indexOf(t)!==-1&&this.updateLocationInformation(t,r),r))}addHooksForPageView(){this.client.addEventTypeMapping(So.pageview,{newEventType:ae.collect,variableLengthArgumentsNames:["page"],addVisitorIdParameter:!0,usesMeasurementProtocol:!0})}addHooksForEvent(){this.client.addEventTypeMapping(So.event,{newEventType:ae.collect,variableLengthArgumentsNames:["eventCategory","eventAction","eventLabel","eventValue"],addVisitorIdParameter:!0,usesMeasurementProtocol:!0})}addSVCDataToPayload(t,r){var n;let o=Object.assign(Object.assign(Object.assign(Object.assign({},this.getLocationInformation(t,r)),this.getDefaultContextInformation(t)),this.action?{svcAction:this.action}:{}),Object.keys((n=this.actionData)!==null&&n!==void 0?n:{}).length>0?{svcActionData:this.actionData}:{}),i=this.getTicketPayload();return this.clearData(),Object.assign(Object.assign(Object.assign({},i),o),r)}getTicketPayload(){return Bg(this.ticket)}};yr.Id="svc";var vo;(function(e){e.click="click",e.flowStart="flowStart"})(vo||(vo={}));var Be;(function(e){e.enterInterface="ticket_create_start",e.fieldUpdate="ticket_field_update",e.fieldSuggestionClick="ticket_classification_click",e.documentSuggestionClick="documentSuggestionClick",e.documentSuggestionQuickview="documentSuggestionQuickview",e.suggestionRate="suggestion_rate",e.nextCaseStep="ticket_next_stage",e.caseCancelled="ticket_cancel",e.caseSolved="ticket_cancel",e.caseCreated="ticket_create"})(Be||(Be={}));var Co;(function(e){e.quit="Quit",e.solved="Solved"})(Co||(Co={}));var bo=class{constructor(t,r){var n;this.options=t,this.provider=r;let o=((n=t.enableAnalytics)!==null&&n!==void 0?n:!0)&&!ho();this.coveoAnalyticsClient=o?new Ze(t):new Cr,this.svc=new yr({client:this.coveoAnalyticsClient})}disable(){this.coveoAnalyticsClient=new Cr,this.svc=new yr({client:this.coveoAnalyticsClient})}enable(){this.coveoAnalyticsClient=new Ze(this.options),this.svc=new yr({client:this.coveoAnalyticsClient})}logEnterInterface(t){return this.svc.setAction(Be.enterInterface),this.svc.setTicket(t.ticket),this.sendFlowStartEvent()}logUpdateCaseField(t){return this.svc.setAction(Be.fieldUpdate,{fieldName:t.fieldName}),this.svc.setTicket(t.ticket),this.sendClickEvent()}logSelectFieldSuggestion(t){return this.svc.setAction(Be.fieldSuggestionClick,t.suggestion),this.svc.setTicket(t.ticket),this.sendClickEvent()}logSelectDocumentSuggestion(t){return this.logClickEvent(Be.documentSuggestionClick,t.suggestion.suggestion,{contentIDKey:"permanentId",contentIDValue:t.suggestion.permanentId})}logQuickviewDocumentSuggestion(t){return this.logClickEvent(Be.documentSuggestionQuickview,t.suggestion.suggestion,{contentIDKey:"permanentId",contentIDValue:t.suggestion.permanentId})}logRateDocumentSuggestion(t){return this.svc.setAction(Be.suggestionRate,Object.assign({rate:t.rating},t.suggestion)),this.svc.setTicket(t.ticket),this.sendClickEvent()}logMoveToNextCaseStep(t){return this.svc.setAction(Be.nextCaseStep,{stage:t?.stage}),this.svc.setTicket(t.ticket),this.sendClickEvent()}logCaseCancelled(t){return this.svc.setAction(Be.caseCancelled,{reason:Co.quit}),this.svc.setTicket(t.ticket),this.sendClickEvent()}logCaseSolved(t){return this.svc.setAction(Be.caseSolved,{reason:Co.solved}),this.svc.setTicket(t.ticket),this.sendClickEvent()}logCaseCreated(t){return this.svc.setAction(Be.caseCreated),this.svc.setTicket(t.ticket),this.sendClickEvent()}sendFlowStartEvent(){return this.coveoAnalyticsClient.sendEvent("event","svc",vo.flowStart,this.provider?{searchHub:this.provider.getOriginLevel1()}:null)}sendClickEvent(){return this.coveoAnalyticsClient.sendEvent("event","svc",vo.click,this.provider?{searchHub:this.provider.getOriginLevel1()}:null)}getBaseEventRequest(t){var r,n;return M(this,void 0,void 0,function*(){let o=Object.assign({},t);return Object.assign(Object.assign({},this.getOrigins()),{customData:o,language:(r=this.provider)===null||r===void 0?void 0:r.getLanguage(),anonymous:(n=this.provider)===null||n===void 0?void 0:n.getIsAnonymous(),clientId:yield this.getClientId()})})}getClientId(){return this.coveoAnalyticsClient instanceof Ze?this.coveoAnalyticsClient.getCurrentVisitorId():void 0}getOrigins(){var t,r,n,o,i;return{originContext:(r=(t=this.provider)===null||t===void 0?void 0:t.getOriginContext)===null||r===void 0?void 0:r.call(t),originLevel1:(n=this.provider)===null||n===void 0?void 0:n.getOriginLevel1(),originLevel2:(o=this.provider)===null||o===void 0?void 0:o.getOriginLevel2(),originLevel3:(i=this.provider)===null||i===void 0?void 0:i.getOriginLevel3()}}logClickEvent(t,r,n,o){var i,a;return M(this,void 0,void 0,function*(){let m=Object.assign(Object.assign(Object.assign({},r),yield this.getBaseEventRequest(Object.assign(Object.assign({},n),o))),{searchQueryUid:(a=(i=this.provider)===null||i===void 0?void 0:i.getSearchUID())!==null&&a!==void 0?a:"",actionCause:t});return this.coveoAnalyticsClient.sendClickEvent(m)})}};var Lu=e=>new Ze(e).getCurrentVisitorId(),et=new Fu.HistoryStore,gn=(e,t)=>typeof t=="function"?(...r)=>{let n=Kr(r[0]);try{return t.apply(t,r)}catch(o){return e.error(o,"Error in analytics preprocessRequest. Returning original request."),n}}:void 0,hn=(e,t)=>(...r)=>{let n=Kr(r[1]);try{return t.apply(t,r)}catch(o){return e.error(o,"Error in analytics hook. Returning original request."),n}};p();u();d();l();p();u();d();l();var br=fe(e=>e.source,e=>Object.entries(e).map(([t,r])=>`${t}@${r}`).concat(`@coveo/headless@${ur}`));p();u();d();l();p();u();d();l();p();u();d();l();p();u();d();l();function Ao(){return{desiredCount:5,numberOfValues:8,set:{}}}p();u();d();l();p();u();d();l();p();u();d();l();function ju(e){let{activeValue:t,ancestryMap:r}=_h(e);return t?Vh(t,r):[]}function _h(e){let t=[...e],r=new Map;for(;t.length>0;){let n=t.shift();if(n.state==="selected")return{activeValue:n,ancestryMap:r};if(r)for(let o of n.children)r.set(o,n);t.unshift(...n.children)}return{}}function Vh(e,t){let r=[];if(!e)return[];let n=e;do r.unshift(n),n=t.get(n);while(n);return r}var Lh=(e,t)=>e.categoryFacetSet[t]?.request;var Ra=(e,t)=>{let r=Lh(e,t);return ju(r?.currentValues??[])};p();u();d();l();function wo(){return{}}p();u();d();l();function xo(){return{}}p();u();d();l();function Ro(){return{}}p();u();d();l();function Eo(){return{}}function Ea(e){return{facetSet:e.facetSet??Eo(),categoryFacetSet:e.categoryFacetSet??wo(),dateFacetSet:e.dateFacetSet??xo(),numericFacetSet:e.numericFacetSet??Ro(),automaticFacetSet:e.automaticFacetSet??Ao()}}var Pa=e=>{let t=[];return Bh(e).forEach((r,n)=>{let o=Yh(e,r.facetId),i=Gh(r,n+1);if(Uh(r)){if(!!!Ra(e,r.facetId).length)return;t.push({...i,...zh(e,r.facetId),facetType:o,state:"selected"});return}r.currentValues.forEach((a,m)=>{if(a.state==="idle")return;let f=Uu(a,m+1,o),c=jh(r)?Bu(a):$h(a);t.push({...i,...f,...c})})}),Qh(e).forEach((r,n)=>{let o=Wh(r,n+1);r.values.forEach((i,a)=>{if(i.state==="idle")return;let m=Uu(i,a+1,"specific"),f=Bu(i);t.push({...o,...m,...f})})}),t},jh=e=>e.type==="specific",Uh=e=>e.type==="hierarchical",Bh=e=>[...Object.values(e.facetSet),...Object.values(e.categoryFacetSet),...Object.values(e.dateFacetSet),...Object.values(e.numericFacetSet)].map(t=>t.request),Qh=e=>[...Object.values(e.automaticFacetSet.set)].map(t=>t.response),Uu=(e,t,r)=>({state:e.state,valuePosition:t,facetType:r}),$h=e=>({displayValue:`${e.start}..${e.end}`,value:`${e.start}..${e.end}`,start:e.start,end:e.end,endInclusive:e.endInclusive}),Bu=e=>({displayValue:e.value,value:e.value}),Hh=(e,t)=>Ra(e,t).map(n=>n.value).join(";"),zh=(e,t)=>{let n=Hh(e,t);return{value:n,valuePosition:1,displayValue:n}},Wh=(e,t)=>({title:Qu(e.field,e.field),field:e.field,id:e.field,facetPosition:t}),Gh=(e,t)=>({title:Qu(e.field,e.facetId),field:e.field,id:e.facetId,facetPosition:t}),Qu=(e,t)=>`${e}_${t}`,Kh=(e,t)=>e.facetSet[t]?.request||e.categoryFacetSet[t]?.request||e.dateFacetSet[t]?.request||e.numericFacetSet[t]?.request||e.automaticFacetSet.set[t]?.response,Yh=(e,t)=>{let r=Kh(e,t);return r?r.type:"specific"};p();u();d();l();var Ve=()=>({q:"",enableQuerySyntax:!1});p();u();d();l();p();u();d();l();var $u=(r=>(r.Ascending="ascending",r.Descending="descending",r))($u||{}),Hu=(i=>(i.Relevancy="relevancy",i.QRE="qre",i.Date="date",i.Field="field",i.NoSort="nosort",i))(Hu||{}),Ia=e=>{if(ic(e))return e.map(t=>Ia(t)).join(",");switch(e.by){case"relevancy":case"qre":case"nosort":return e.by;case"date":return`date ${e.order}`;case"field":return`@${e.field} ${e.order}`;default:return""}},zu=()=>({by:"relevancy"});var qI=new K({values:{by:new Oi({enum:Hu,required:!0}),order:new Oi({enum:$u}),field:new H}});function Po(){return Ia(zu())}p();u();d();l();p();u();d();l();var Ar=()=>"default";var Jh=e=>{let t=e.configuration.search.locale.split("-")[0];return!t||t.length!==2?"en":t},lt=class{constructor(t){this.getState=t;pe(this,"state");this.state=t()}getLanguage(){return Jh(this.state)}getBaseMetadata(){let{context:t,configuration:r}=this.state,n=t?.contextValues||{},o={};for(let[i,a]of Object.entries(n)){let m=`context_${i}`;o[m]=a}return r.analytics.analyticsMode==="legacy"&&(o.coveoHeadlessVersion=ur),o}getOriginContext(){return this.state.configuration.analytics.originContext}getOriginLevel1(){return this.state.searchHub||Ar()}getOriginLevel2(){return this.state.configuration.analytics.originLevel2}getOriginLevel3(){return this.state.configuration.analytics.originLevel3}getIsAnonymous(){return this.state.configuration.analytics.anonymous}};var yn=class yn extends lt{constructor(){super(...arguments);pe(this,"getFacetRequest",r=>this.state.facetSet?.[r]?.request||this.state.categoryFacetSet?.[r]?.request||this.state.dateFacetSet?.[r]?.request||this.state.numericFacetSet?.[r]?.request||this.state.automaticFacetSet?.set[r]?.response)}getFacetState(){return Pa(Ea(this.getState()))}getPipeline(){return this.state.pipeline||this.state.search?.response.pipeline||yn.fallbackPipelineName}getSearchEventRequestPayload(){return{queryText:this.queryText,responseTime:this.responseTime,results:this.resultURIs,numberOfResults:this.numberOfResults}}getSearchUID(){let r=this.getState();return r.search?.searchResponseId||r.search?.response.searchUid||We().response.searchUid}getSplitTestRunName(){return this.state.search?.response.splitTestRun}getSplitTestRunVersion(){let r=!!this.getSplitTestRunName(),n=this.state.search?.response.pipeline||this.state.pipeline||yn.fallbackPipelineName;return r?n:void 0}getBaseMetadata(){let r=this.getState(),n=super.getBaseMetadata(),o=r.search?.response?.extendedResults?.generativeQuestionAnsweringId;return o&&(n.generativeQuestionAnsweringId=o),n}getFacetMetadata(r,n){let i=this.getFacetRequest(r)?.field??"";return{...this.getBaseMetadata(),facetId:r,facetField:i,facetValue:n,facetTitle:`${i}_${r}`}}getFacetClearAllMetadata(r){let o=this.getFacetRequest(r)?.field??"";return{...this.getBaseMetadata(),facetId:r,facetField:o,facetTitle:`${o}_${r}`}}getFacetUpdateSortMetadata(r,n){let i=this.getFacetRequest(r)?.field??"";return{...this.getBaseMetadata(),facetId:r,facetField:i,criteria:n,facetTitle:`${i}_${r}`}}getRangeBreadcrumbFacetMetadata(r,n){let i=this.getFacetRequest(r)?.field??"";return{...this.getBaseMetadata(),facetId:r,facetField:i,facetRangeEnd:n.end,facetRangeEndInclusive:n.endInclusive,facetRangeStart:n.start,facetTitle:`${i}_${r}`}}getResultSortMetadata(){return{...this.getBaseMetadata(),resultsSortBy:this.state.sortCriteria??Po()}}getStaticFilterToggleMetadata(r,n){return{...this.getBaseMetadata(),staticFilterId:r,staticFilterValue:n}}getStaticFilterClearAllMetadata(r){return{...this.getBaseMetadata(),staticFilterId:r}}getUndoTriggerQueryMetadata(r){return{...this.getBaseMetadata(),undoneQuery:r}}getCategoryBreadcrumbFacetMetadata(r,n){let i=this.getFacetRequest(r)?.field??"";return{...this.getBaseMetadata(),categoryFacetId:r,categoryFacetField:i,categoryFacetPath:n,categoryFacetTitle:`${i}_${r}`}}getOmniboxAnalyticsMetadata(r,n){let o=this.state.querySuggest&&this.state.querySuggest[r],i=o.completions.map(c=>c.expression),a=o.partialQueries.length-1,m=o.partialQueries[a]||"",f=o.responseId;return{...this.getBaseMetadata(),suggestionRanking:i.indexOf(n),partialQuery:m,partialQueries:o.partialQueries.length>0?o.partialQueries:"",suggestions:i.length>0?i:"",querySuggestResponseId:f}}getInterfaceChangeMetadata(){return{...this.getBaseMetadata(),interfaceChangeTo:this.state.configuration.analytics.originLevel2}}getOmniboxFromLinkMetadata(r){return{...this.getBaseMetadata(),...r}}getGeneratedAnswerMetadata(){let r=this.getState(),n={};return r.generatedAnswer?.isVisible!==void 0&&(n.showGeneratedAnswer=r.generatedAnswer.isVisible),n}get resultURIs(){return this.results?.map(r=>({documentUri:r.uri,documentUriHash:r.raw.urihash}))}get results(){return this.state.search?.response.results}get queryText(){return this.state.query?.q||Ve().q}get responseTime(){return this.state.search?.duration||We().duration}get numberOfResults(){return this.state.search?.response.totalCountFiltered||We().response.totalCountFiltered}};pe(yn,"fallbackPipelineName","default");var bt=yn,Wu=({logger:e,getState:t,analyticsClientMiddleware:r=(i,a)=>a,preprocessRequest:n,provider:o=new bt(t)})=>{let i=t(),a=i.configuration.accessToken,m=i.configuration.analytics.apiBaseUrl??Ie(i.configuration.organizationId,i.configuration.environment,"analytics"),f=i.configuration.analytics.runtimeEnvironment,c=i.configuration.analytics.enabled,h=new yo({token:a,endpoint:m,runtimeEnvironment:f,preprocessRequest:gn(e,n),beforeSendHooks:[hn(e,r),(y,S)=>(e.info({...S,type:y,endpoint:m,token:a},"Analytics request"),S)]},o);return c||h.disable(),h},Ta=()=>{let t=et.getHistory().reverse().find(r=>r.name==="PageView"&&r.value);return t?t.value:""};var Io=/*#__PURE__*/function(){var _ref7=_asyncToGenerator(function*(e,t){let r=e.analyticsMode==="next";return{analytics:{clientId:yield Lu(e),clientTimestamp:new Date().toISOString(),documentReferrer:e.originLevel3,originContext:e.originContext,...(t&&{actionCause:t.actionCause,customData:t.customData}),...(t&&!r&&{customData:t.customData}),...(e.userDisplayName&&{userDisplayName:e.userDisplayName}),...(e.documentLocation&&{documentLocation:e.documentLocation}),...(e.deviceId&&{deviceId:e.deviceId}),...(Ta()&&{pageId:Ta()}),...(r&&e.trackingId&&{trackingId:e.trackingId}),capture:r,...(r&&{source:br(e)})}}});return function Io(_x9,_x10){return _ref7.apply(this,arguments)}}();p();u();d();l();p();u();d();l();p();u();d();l();var wr=()=>({duration:0,error:null,isLoading:!1,id:"Recommendation",recommendations:[],searchUid:"",splitTestRun:"",pipeline:""});var Sn=class extends lt{getPipeline(){return this.state.pipeline||this.state.recommendation?.pipeline||"default"}getSearchEventRequestPayload(){return{queryText:Ve().q,responseTime:this.responseTime,results:this.mapResultsToAnalyticsDocument(),numberOfResults:this.numberOfResults}}getSearchUID(){return this.getState().recommendation?.searchUid||wr().searchUid}getSplitTestRunName(){return this.state.recommendation?.splitTestRun}getSplitTestRunVersion(){let t=!!this.getSplitTestRunName(),r=this.state.recommendation?.pipeline||this.state.pipeline||"default";return t?r:void 0}get responseTime(){return this.state.recommendation?.duration||wr().duration}mapResultsToAnalyticsDocument(){return this.state.recommendation?.recommendations.map(t=>({documentUri:t.uri,documentUriHash:t.raw.urihash}))}get numberOfResults(){return this.state.recommendation?.recommendations.length||wr().recommendations.length}};p();u();d();l();p();u();d();l();p();u();d();l();p();u();d();l();p();u();d();l();p();u();d();l();var Gu=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i;function Xh(e){return typeof e=="string"&&Gu.test(e)}var Fa=Xh;p();u();d();l();var Re=[];for(let e=0;e<256;++e)Re.push((e+256).toString(16).slice(1));function Ku(e,t=0){return(Re[e[t+0]]+Re[e[t+1]]+Re[e[t+2]]+Re[e[t+3]]+"-"+Re[e[t+4]]+Re[e[t+5]]+"-"+Re[e[t+6]]+Re[e[t+7]]+"-"+Re[e[t+8]]+Re[e[t+9]]+"-"+Re[e[t+10]]+Re[e[t+11]]+Re[e[t+12]]+Re[e[t+13]]+Re[e[t+14]]+Re[e[t+15]]).toLowerCase()}p();u();d();l();var ka,Zh=new Uint8Array(16);function Oa(){if(!ka){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");ka=crypto.getRandomValues.bind(crypto)}return ka(Zh)}p();u();d();l();p();u();d();l();var ey=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Da={randomUUID:ey};function ty(e,t,r){if(Da.randomUUID&&!t&&!e)return Da.randomUUID();e=e||{};let n=e.random??e.rng?.()??Oa();if(n.length<16)throw new Error("Random bytes length must be >= 16");if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,t){if(r=r||0,r<0||r+16>t.length)throw new RangeError(`UUID byte range ${r}:${r+15} is out of buffer bounds`);for(let o=0;o<16;++o)t[r+o]=n[o];return t}return Ku(n)}var Ma=ty;p();u();d();l();function Yu(){let e=typeof window<"u";return{sendMessage(t){e&&window.postMessage(t,"*")}}}function ry({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 Ju="visitorId";function ny(e){return{getClientId:()=>{let t=e.get(),r=t.storage,n=r.getItem(Ju),o=n&&Fa(n)?n:t.generateUUID();return r.setItem(Ju,o),o}}}var Zu="1.2.0";function oy(e){let{trackingId:t}=e;return{trackingId:t}}function iy(e){return(e.source||[]).concat([`relay@${Zu}`])}function el(e,t,r,n){let{getReferrer:o,getLocation:i,getUserAgent:a}=r,m=oy(t),f=n.getClientId();return Object.freeze({type:e,config:m,ts:Date.now(),source:iy(t),clientId:f,userAgent:a(),referrer:o(),location:i()})}function ay(e,t,r,n,o){return{...t,meta:el(e,r,n,o)}}var sy="*";function cy(){let e=[];function t({type:f,callback:c}){return e.findIndex(h=>h.type===f&&h.callback===c)}function r(f,c){return f.type==="*"||c===f.type}function n(f){return t(f)<0&&e.push(f),()=>m(f.type,f.callback)}function o(f){e.forEach(c=>{if(r(c,f.meta.type))try{c.callback(f)}catch(h){console.error(h)}})}function i(f){if(f===sy)e.length=0;else for(let c=e.length-1;c>=0;c--)e[c].type===f&&e.splice(c,1)}function a(f){let c=t(f);c>=0&&e.splice(c,1)}function m(f,c){c?a({type:f,callback:c}):i(f)}return{add:n,call:o,remove:m}}function Xu({url:e,token:t,trackingId:r,...n}){return Object.freeze({url:e,token:t,trackingId:r,...(!!n.mode&&{mode:n.mode}),...(!!n.source&&{source:n.source}),...(!!n.environment&&{environment:n.environment})})}function uy(e){let t=Xu(e);return{get:()=>t,update:r=>{t=Xu({...t,...r})}}}var qa=ly();function ly(){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()}`,m=i?`;domain=${i}`:"";document.cookie=`${e}${r}=${n}${a}${m};path=/;SameSite=Lax`},removeItem(r){this.setItem(r,"",-1)}}}function dy(){return{getItem(e){return qa.getItem(e)||localStorage.getItem(e)},removeItem(e){qa.removeItem(e),localStorage.removeItem(e)},setItem(e,t){localStorage.setItem(e,t),qa.setItem(e,t,31556952e3)}}}function py(){let e=document.referrer;return e===""?null:e}function fy(){return{runtime:"browser",send:(e,t,r)=>{let n=navigator.sendBeacon(`${e}?access_token=${t}`,new Blob([JSON.stringify([r])],{type:"application/json"}));if(Yu().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:()=>py(),getLocation:()=>window.location.href,getUserAgent:()=>navigator.userAgent,generateUUID:()=>Ma(),storage:dy()}}function my(){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 gy(){return{getItem(){return null},removeItem(){},setItem(){}}}function hy(){return{runtime:"null",send:()=>{},getReferrer:()=>null,getLocation:()=>null,getUserAgent:()=>null,generateUUID:()=>"",storage:gy()}}function yy(e){let t=e.get().mode!=="disabled",r=e.get().environment,n=hy();return t&&r?{storage:n.storage,...r,runtime:"custom"}:t&&Sy()&&my()?fy():n}function Sy(){try{return typeof window=="object"}catch{return!1}}function vy(e){return{get:()=>Object.freeze(yy(e))}}function tl(e){let t=uy(e),r=cy(),n=vy(t),o=ny(n);return{emit:(i,a)=>{let m=t.get(),f=n.get(),c=ay(i,a,m,f,o);return ry({config:m,environment:f,event:c,listenerManager:r})},getMeta:i=>el(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:Zu}}var xr=fe(e=>e.configuration.organizationId,e=>e.configuration.environment,e=>e.configuration.accessToken,e=>e.configuration.analytics,e=>br(e.configuration.analytics),(e,t,r,{trackingId:n,apiBaseUrl:o,enabled:i},a)=>tl({mode:i?"emit":"disabled",url:o??Vn(e,t),token:r,trackingId:n,source:a}));p();u();d();l();var vn=class extends lt{getSearchUID(){return this.state.documentSuggestion?.status.lastResponseId??""}},rl=({logger:e,getState:t,analyticsClientMiddleware:r=(i,a)=>a,preprocessRequest:n,provider:o=new vn(t)})=>{let i=t(),a=i.configuration.accessToken,m=i.configuration.analytics.apiBaseUrl??Ie(i.configuration.organizationId,i.configuration.environment,"analytics"),f=i.configuration.analytics.runtimeEnvironment,c=i.configuration.analytics.enabled,h=new bo({enableAnalytics:c,token:a,endpoint:m,runtimeEnvironment:f,preprocessRequest:gn(e,n),beforeSendHooks:[hn(e,r),(y,S)=>(e.info({...S,type:y,endpoint:m,token:a},"Analytics request"),S)]},o);return c||h.disable(),h};p();u();d();l();p();u();d();l();function nl(e,t){return{...new bt(t).getBaseMetadata(),actionCause:e,type:e}}function Cy(e){return Object.assign(e,{instantlyCallable:!0})}function by(e,t){let r=i=>Cy(ue(e,i)),n=r(/*#__PURE__*/function(){var _ref8=_asyncToGenerator(function*(i,{getState:a,extra:m}){let{analyticsClientMiddleware:f,preprocessRequest:c,logger:h}=m;return yield(yield t({getState:a,analyticsClientMiddleware:f,preprocessRequest:c,logger:h})).log({state:a(),extra:m})});return function(_x11,_x12){return _ref8.apply(this,arguments)}}());return Object.assign(n,{prepare:function(){var _ref9=_asyncToGenerator(function*({getState:i,analyticsClientMiddleware:a,preprocessRequest:m,logger:f}){let{description:c,log:h}=yield t({getState:i,analyticsClientMiddleware:a,preprocessRequest:m,logger:f});return{description:c,action:r(/*#__PURE__*/function(){var _ref10=_asyncToGenerator(function*(y,{getState:S,extra:g}){return yield h({state:S(),extra:g})});return function(_x14,_x15){return _ref10.apply(this,arguments)}}())}});return function prepare(_x13){return _ref9.apply(this,arguments)}}()}),n}var ol=(e,t,r)=>{function n(...o){let i=o.length===1?{...o[0],__legacy__getBuilder:t(o[0].__legacy__getBuilder),analyticsConfigurator:e,providerClass:r}:{prefix:o[0],__legacy__getBuilder:t(o[1]),__legacy__provider:o[2],analyticsConfigurator:e,providerClass:r};return xy(i)}return n},Ay=e=>e.configuration.analytics.analyticsMode==="legacy",wy=e=>e.configuration.analytics.analyticsMode==="next",xy=({prefix:e,__legacy__getBuilder:t,__legacy__provider:r,analyticsPayloadBuilder:n,analyticsType:o,analyticsConfigurator:i,providerClass:a})=>(r??(r=m=>new a(m)),by(e,/*#__PURE__*/function(){var _ref11=_asyncToGenerator(function*({getState:m,analyticsClientMiddleware:f,preprocessRequest:c,logger:h}){let y=[],S={log:function(){var _ref12=_asyncToGenerator(function*({state:x}){for(let T of y)yield T(x)});return function log(_x17){return _ref12.apply(this,arguments)}}()},g=m(),v=i({getState:m,logger:h,analyticsClientMiddleware:f,preprocessRequest:c,provider:r(m)}),R=yield t(v,m());S.description=R?.description,y.push(/*#__PURE__*/function(){var _ref13=_asyncToGenerator(function*(x){Ay(x)&&(yield Ry(R,r,x,h,v.coveoAnalyticsClient))});return function(_x18){return _ref13.apply(this,arguments)}}());let{emit:I}=xr(g);return y.push(/*#__PURE__*/function(){var _ref14=_asyncToGenerator(function*(x){if(wy(x)&&o&&n){let T=n(x);yield Oy(I,o,T)}});return function(_x19){return _ref14.apply(this,arguments)}}()),S});return function(_x16){return _ref11.apply(this,arguments)}}()));function Ry(_x20,_x21,_x22,_x23,_x24){return _Ry.apply(this,arguments)}function _Ry(){_Ry=_asyncToGenerator(function*(e,t,r,n,o){t(()=>r);let i=yield e?.log({searchUID:t(()=>r).getSearchUID()});n.info({client:o,response:i},"Analytics response")});return _Ry.apply(this,arguments)}var Ey=e=>r=>(n,o)=>Promise.resolve({description:{actionCause:e},log:function(){var _ref15=_asyncToGenerator(function*(i){r(n,o)});return function log(_x25){return _ref15.apply(this,arguments)}}()}),qe=ol(Wu,e=>e,bt),Gk=ol(rl,Ey("caseAssist"),vn);var Na=(e,t)=>{let r=t.recommendation?.recommendations.findIndex(({uniqueId:n})=>e.uniqueId===n)||0;return Py(e,r,t)};function Py(e,t,r){let n=e.raw.collection;return{collectionName:typeof n=="string"?n:"default",documentAuthor:Fy(e),documentPosition:t+1,documentTitle:e.title,documentUri:e.uri,documentUriHash:e.raw.urihash,documentUrl:e.clickUri,rankingModifier:e.rankingModifier||"",sourceName:ky(e),queryPipeline:r.pipeline||mr()}}var To=e=>(e.raw.permanentid||console.warn("Missing field permanentid on result. This might cause many issues with your Coveo deployment. See https://docs.coveo.com/en/1913 and https://docs.coveo.com/en/1640 for more information.",e),{contentIDKey:"permanentid",contentIDValue:e.raw.permanentid||""}),il={urihash:new H,sourcetype:new H,permanentid:new H},al={uniqueId:G,raw:new K({values:il}),title:G,uri:G,clickUri:G,rankingModifier:new H({required:!1,emptyAllowed:!0})};function Iy(e){return Object.assign({},...Object.keys(il).map(t=>({[t]:e[t]})))}function Ty(e){return Object.assign({},...Object.keys(al).map(t=>({[t]:e[t]})),{raw:Iy(e.raw)})}function Fy(e){let t=e.raw.author;return X(t)?"unknown":Array.isArray(t)?t.join(";"):`${t}`}function ky(e){let t=e.raw.source;return X(t)?"unknown":t}var _a=e=>new Fe(al).validate(Ty(e));function Oy(_x26,_x27,_x28){return _Oy.apply(this,arguments)}function _Oy(){_Oy=_asyncToGenerator(function*(e,t,r){yield e(t,r)});return _Oy.apply(this,arguments)}p();u();d();l();var sl=()=>qe("analytics/recommendation/update",e=>e.makeRecommendationInterfaceLoad(),e=>new Sn(e)),cl=()=>({actionCause:"recommendationInterfaceLoad"}),ko=e=>qe({prefix:"analytics/recommendation/open",__legacy__getBuilder:(t,r)=>(_a(e),t.makeRecommendationOpen(Na(e,r),To(e))),__legacy__provider:t=>new Sn(t),analyticsType:"itemClick",analyticsPayloadBuilder:t=>{let r=Na(e,t),n=To(e);return{responseId:e.searchUid??"",position:r.documentPosition,itemMetadata:{uniqueFieldName:n.contentIDKey,uniqueFieldValue:n.contentIDValue,title:r.documentTitle,author:r.documentAuthor,url:r.documentUrl}}}});var Rr=D("recommendation/set",e=>B(e,{id:G})),At=ue("recommendation/get",/*#__PURE__*/function(){var _ref16=_asyncToGenerator(function*(e,{getState:t,rejectWithValue:r,extra:{apiClient:n}}){let o=t(),i=new Date().getTime(),a=yield Dy(o),m=yield n.recommendations(a),f=new Date().getTime()-i;return ke(m)?r(m.error):{recommendations:m.success.results,analyticsAction:sl(),duration:f,searchUid:m.success.searchUid,splitTestRun:m.success.splitTestRun,pipeline:m.success.pipeline}});return function(_x29,_x30){return _ref16.apply(this,arguments)}}()),Dy=/*#__PURE__*/function(){var _ref17=_asyncToGenerator(function*(e){return{accessToken:e.configuration.accessToken,organizationId:e.configuration.organizationId,url:e.configuration.search.apiBaseUrl??ht(e.configuration.organizationId,e.configuration.environment),recommendation:e.recommendation.id,tab:e.configuration.analytics.originLevel2,referrer:e.configuration.analytics.originLevel3,timezone:e.configuration.search.timezone,locale:e.configuration.search.locale,actionsHistory:e.configuration.analytics.enabled?et.getHistory():[],...(e.advancedSearchQueries&&{aq:e.advancedSearchQueries.aq,cq:e.advancedSearchQueries.cq}),...(e.pipeline&&{pipeline:e.pipeline}),...(e.searchHub&&{searchHub:e.searchHub}),...(e.context&&{context:e.context.contextValues}),...(e.dictionaryFieldContext&&{dictionaryFieldContext:e.dictionaryFieldContext.contextValues}),...(e.fields&&{fieldsToInclude:e.fields.fieldsToInclude}),...(e.configuration.analytics.enabled&&(yield My(e,cl()))),...(e.configuration.search.authenticationProviders.length&&{authentication:e.configuration.search.authenticationProviders.join(",")}),...(e.pagination&&{numberOfResults:e.pagination.numberOfResults})}});return function Dy(_x31){return _ref17.apply(this,arguments)}}(),My=/*#__PURE__*/function(){var _ref18=_asyncToGenerator(function*(e,t){let r=e.configuration.analytics.analyticsMode==="legacy"?void 0:{actionCause:t.actionCause,type:t.actionCause};return yield Io(e.configuration.analytics,r)});return function My(_x32,_x33){return _ref18.apply(this,arguments)}}();var Er=ge(wr(),e=>{e.addCase(Rr,(t,r)=>{t.id=r.payload.id}).addCase(At.rejected,(t,r)=>{t.error=r.payload?r.payload:null,t.isLoading=!1}).addCase(At.fulfilled,(t,r)=>{t.error=null,t.recommendations=r.payload.recommendations.map(n=>({...n,searchUid:r.payload.searchUid})),t.duration=r.payload.duration,t.isLoading=!1,t.searchUid=r.payload.searchUid,t.splitTestRun=r.payload.splitTestRun,t.pipeline=r.payload.pipeline}).addCase(At.pending,t=>{t.isLoading=!0})});p();u();d();l();var Pr=D("searchHub/set",e=>B(e,new H({required:!0,emptyAllowed:!0})));p();u();d();l();var Ir=ge(Ar(),e=>{e.addCase(Pr,(t,r)=>r.payload).addCase(Me.fulfilled,(t,r)=>r.payload?.searchHub??t).addCase(Je,(t,r)=>r.payload.searchHub||t)});p();u();d();l();p();u();d();l();p();u();d();l();var ul=fe(e=>e.advancedSearchQueries,e=>{if(!e)return{};let{aq:t,cq:r,dq:n,lq:o}=e;return{...(t&&{aq:t}),...(r&&{cq:r}),...(n&&{dq:n}),...(o&&{lq:o})}});p();u();d();l();p();u();d();l();p();u();d();l();p();u();d();l();var Cn=fe(e=>e.query,e=>e);var ll=e=>Ny(e)?{answerAPIEnabled:!0,id:pl(e).data?.answerId}:qy(e)?{answerAPIEnabled:!1,id:e.search.response.extendedResults.generativeQuestionAnsweringId}:{answerAPIEnabled:!1,id:void 0},qy=e=>"search"in e,Ny=e=>"answer"in e&&"generatedAnswer"in e&&!X(e.generatedAnswer?.answerConfigurationId),dl=e=>e.generatedAnswer?.fieldsToIncludeInCitations,_y=fe(e=>e.generatedAnswer?.citations,(e,t)=>t,(e,t)=>e?.find(r=>r.id===t)),yD=fe(e=>Cn(e)?.q,e=>e.search.requestId,(e,t)=>({q:e,requestId:t}));var Oo=e=>qe({prefix:"analytics/generatedAnswer/streamEnd",__legacy__getBuilder:(t,r)=>{let{id:n,answerAPIEnabled:o}=ll(r),i=e?!r.generatedAnswer?.answer||!r.generatedAnswer?.answer.length:void 0;return n?t.makeGeneratedAnswerStreamEnd({...(o?{answerAPIStreamId:n}:{generativeQuestionAnsweringId:n}),answerGenerated:e,answerTextIsEmpty:i}):null},analyticsType:"Rga.AnswerReceived",analyticsPayloadBuilder:t=>({answerId:t.search?.response.searchUid||"",answerGenerated:e??!1})});p();u();d();l();var fl=/*#__PURE__*/function(){var _ref19=_asyncToGenerator(function*(e){return{accessToken:e.configuration.accessToken,organizationId:e.configuration.organizationId,url:Ie(e.configuration.organizationId,e.configuration.environment),streamId:e.search.extendedResults?.generativeQuestionAnsweringId}});return function fl(_x34){return _ref19.apply(this,arguments)}}();p();u();d();l();var ml=["text/plain","text/markdown"];var Tr=new H({required:!0}),hl=new H,Fr=new te({required:!0}),Vy={id:Tr,title:Tr,uri:Tr,permanentid:Tr,clickUri:hl},yl=new H({required:!0,constrainTo:ml}),e0=D("generatedAnswer/setIsVisible",e=>B(e,Fr)),t0=D("generatedAnswer/setIsEnabled",e=>B(e,Fr)),La=D("generatedAnswer/updateMessage",e=>B(e,{textDelta:Tr})),ja=D("generatedAnswer/updateCitations",e=>B(e,{citations:new ie({required:!0,each:new K({values:Vy})})})),Ly=D("generatedAnswer/updateError",e=>B(e,{message:hl,code:new J({min:0})})),jy=D("generatedAnswer/resetAnswer"),r0=D("generatedAnswer/like"),n0=D("generatedAnswer/dislike"),o0=D("generatedAnswer/feedbackModal/open"),i0=D("generatedAnswer/expand"),a0=D("generatedAnswer/collapse"),s0=D("generatedAnswer/setId",e=>B(e,{id:new H({required:!0})})),c0=D("generatedAnswer/feedbackModal/close"),u0=D("generatedAnswer/sendFeedback"),Va=D("generatedAnswer/setIsLoading",e=>B(e,Fr)),gl=D("generatedAnswer/setIsStreaming",e=>B(e,Fr)),Ua=D("generatedAnswer/setAnswerContentFormat",e=>B(e,yl)),l0=D("generatedAnswer/updateResponseFormat",e=>B(e,{contentFormat:new ie({each:yl,default:["text/plain"]})})),d0=D("knowledge/updateAnswerConfigurationId",e=>B(e,Tr)),p0=D("generatedAnswer/registerFieldsToIncludeInCitations",e=>B(e,to)),Uy=D("generatedAnswer/setIsAnswerGenerated",e=>B(e,Fr)),Ba=D("generatedAnswer/setCannotAnswer",e=>B(e,Fr)),f0=ue("generatedAnswer/streamAnswer",/*#__PURE__*/function(){var _ref20=_asyncToGenerator(function*(e,t){let r=t.getState(),{dispatch:n,extra:o,getState:i}=t,{search:a}=i(),{queryExecuted:m}=a,{setAbortControllerRef:f}=e,c=yield fl(r),h=(g,v)=>{switch(g){case"genqa.headerMessageType":{let R=JSON.parse(v);n(Ua(R.contentFormat));break}case"genqa.messageType":n(La(JSON.parse(v)));break;case"genqa.citationsType":n(ja(JSON.parse(v)));break;case"genqa.endOfStreamType":{let R=JSON.parse(v).answerGenerated,I=m.length!==0&&!R;n(Ba(I)),n(gl(!1)),n(Uy(R)),n(Oo(R));break}default:r.debug&&o.logger.warn(`Unknown payloadType: "${g}"`)}};n(Va(!0));let y=g=>g.streamId===t.getState().search.extendedResults.generativeQuestionAnsweringId,S=o.streamingClient?.streamGeneratedAnswer(c,{write:g=>{y(c)&&(n(Va(!1)),g.payload&&g.payloadType&&h(g.payloadType,g.payload))},abort:g=>{y(c)&&n(Ly(g))},close:()=>{y(c)&&n(gl(!1))},resetAnswer:()=>{y(c)&&n(jy())}});S?f(S):n(Va(!1))});return function(_x35,_x36){return _ref20.apply(this,arguments)}}());p();u();d();l();p();u();d();l();var Sl=fe(e=>e.pipeline,e=>e);p();u();d();l();var vl=fe(e=>e.searchHub,e=>e);p();u();d();l();p();u();d();l();var bn=je(Do(),1),Rl=je(Cl(),1);p();u();d();l();var Mo=je(Do(),1),Al=je(bl(),1);Mo.default.extend(Al.default);var wl="YYYY/MM/DD@HH:mm:ss",By="1401-01-01";function kr(e,t){let r=(0,Mo.default)(e,t);return!r.isValid()&&!t?(0,Mo.default)(e,wl):r}function qo(e){return e.format(wl)}function xl(e,t){let r=kr(e,t);if(!r.isValid()){let n=". Please provide a date format string in the configuration options. See https://day.js.org/docs/en/parse/string-format for more information.",o=` with the format "${t}"`;throw new Error(`Could not parse the provided date "${e}"${t?o:n}`)}Ka(r)}function Ka(e){if(e.isBefore(By))throw new Error(`Date is before year 1401, which is unsupported by the API: ${e}`)}bn.default.extend(Rl.default);var El=["past","now","next"],Pl=["minute","hour","day","week","month","quarter","year"],Qy=e=>{let t=e==="now";return{amount:new J({required:!t,min:1}),unit:new H({required:!t,constrainTo:Pl}),period:new H({required:!0,constrainTo:El})}};function Ya(e){if(typeof e=="string"&&!wt(e))throw new Error(`The value "${e}" is not respecting the relative date format "period-amount-unit"`);let t=typeof e=="string"?Ol(e):e;new Fe(Qy(t.period)).validate(t);let r=Tl(t),n=JSON.stringify(t);if(!r.isValid())throw new Error(`Date is invalid: ${n}`);Ka(r)}function Il(e){let{period:t,amount:r,unit:n}=e;switch(t){case"past":case"next":return`${t}-${r}-${n}`;case"now":return t}}function Tl(e){let{period:t,amount:r,unit:n}=e;switch(t){case"past":return(0,bn.default)().subtract(r,n);case"next":return(0,bn.default)().add(r,n);case"now":return(0,bn.default)()}}function An(e){return qo(Tl(Ol(e)))}function Fl(e){return e.toLocaleLowerCase().split("-")}function wt(e){let[t,r,n]=Fl(e);if(t==="now")return!0;if(!El.includes(t)||!Pl.includes(n))return!1;let o=parseInt(r);return!(isNaN(o)||o<=0)}function kl(e){return!!e&&typeof e=="object"&&"period"in e}function Ol(e){let[t,r,n]=Fl(e);return t==="now"?{period:"now"}:{period:t,amount:r?parseInt(r):void 0,unit:n||void 0}}p();u();d();l();function Dl(e){return e.type==="dateRange"}function Ml(e){return`start${e}`}function ql(e){return`end${e}`}var Ja=()=>({dateFacetValueMap:{}});function $y(e,t,r){let n=e.start,o=e.end;return wt(n)&&(n=An(n),r.dateFacetValueMap[t][Ml(n)]=e.start),wt(o)&&(o=An(o),r.dateFacetValueMap[t][ql(o)]=e.end),{...e,start:n,end:o}}function Xa(e,t){if(Dl(e)){let{facetId:r,currentValues:n}=e;return t.dateFacetValueMap[r]={},{...e,currentValues:n.map(o=>$y(o,r,t))}}return e}function xt(e){let t=Ja();return{request:{...e,facets:e.facets?.map(n=>Xa(n,t))},mappings:t}}function Hy(e,t,r){return{...e,start:r.dateFacetValueMap[t][Ml(e.start)]||e.start,end:r.dateFacetValueMap[t][ql(e.end)]||e.end}}function zy(e,t){return e.facetId in t.dateFacetValueMap}function Wy(e,t){return zy(e,t)?{...e,values:e.values.map(r=>Hy(r,e.facetId,t))}:e}function No(e,t){return"success"in e?{success:{...e.success,facets:e.success.facets?.map(n=>Wy(n,t))}}:e}p();u();d();l();var Za=fe(e=>e,e=>{if(!e)return"";for(let t in e)if(e[t].isActive)return e[t].id;return""}),Nl=fe(e=>e,e=>{let t=Za(e);return t&&e?e[t].expression:""});p();u();d();l();p();u();d();l();function Rt(e){return Object.values(e).map(t=>t.request)}function es(e,t){let r={};e.forEach(i=>r[i.facetId]=i);let n=[];t.forEach(i=>{i in r&&(n.push(r[i]),delete r[i])});let o=Object.values(r);return[...n,...o]}function _l(e){return Rt(e).map(t=>{let n=t.currentValues.some(({state:o})=>o!=="idle");return t.generateAutomaticRanges&&!n?{...t,currentValues:[]}:t})}var ts={alphanumericDescending:{type:"alphanumeric",order:"descending"},alphanumericNaturalDescending:{type:"alphanumericNatural",order:"descending"}};function Gy(e){return Rt(e).map(t=>{let r=ts[t.sortCriteria];return r?{...t,sortCriteria:r}:t})}function Ky(e){return[...Gy(e.facetSet??{}),..._l(e.numericFacetSet??{}),..._l(e.dateFacetSet??{}),...Rt(e.categoryFacetSet??{})]}function Yy(e){return Ky(e).filter(({facetId:t})=>e.facetOptions?.facets[t]?.enabled??!0)}function _o(e){return es(Yy(e),e.facetOrder??[])}p();u();d();l();p();u();d();l();function Ll(_x37,_x38){return _Ll.apply(this,arguments)}function _Ll(){_Ll=_asyncToGenerator(function*(e,t){let r=e.getReader(),n;for(;!(n=yield r.read()).done;)t(n.value)});return _Ll.apply(this,arguments)}function jl(e){let t,r,n,o=!1;return function(a){t===void 0?(t=a,r=0,n=-1):t=Xy(t,a);let m=t.length,f=0;for(;r<m;){o&&(t[r]===10&&(f=++r),o=!1);let c=-1;for(;r<m&&c===-1;++r)switch(t[r]){case 58:n===-1&&(n=r-f);break;case 13:o=!0,c=r;break;case 10:c=r;break}if(c===-1)break;e(t.subarray(f,c),n),f=r,n=-1}f===m?t=void 0:f!==0&&(t=t.subarray(f),r-=f)}}function Ul(e,t,r){let n=Vl(),o=new TextDecoder;return function(a,m){if(a.length===0)r?.(n),n=Vl();else if(m>0){let f=o.decode(a.subarray(0,m)),c=m+(a[m+1]===32?2:1),h=o.decode(a.subarray(c));switch(f){case"data":n.data=n.data?n.data+`
31
- `+h:h;break;case"event":n.event=h;break;case"id":e(n.id=h);break;case"retry":Jy(h,n,t);break}}}}function Jy(e,t,r){let n=parseInt(e,10);isNaN(n)||r(t.retry=n)}function Xy(e,t){let r=new Uint8Array(e.length+t.length);return r.set(e),r.set(t,e.length),r}function Vl(){return{data:"",event:"",id:"",retry:void 0}}var rs="text/event-stream",Zy=1e3,Bl="last-event-id";function Ql(){return typeof window<"u"}function $l(e,{signal:t,headers:r,onopen:n,onmessage:o,onclose:i,onerror:a,openWhenHidden:m,fetch:f,...c}){return new Promise((h,y)=>{let S={...r};S.accept||(S.accept=rs);let g;function v(){g?.abort(),document.hidden||E()}!m&&Ql()&&document.addEventListener("visibilitychange",v);let R=Zy,I;function x(){Ql()&&document.removeEventListener("visibilitychange",v),clearTimeout(I),g?.abort()}t?.addEventListener("abort",()=>{x(),h()});let T=f??b,w=n??eS;function E(){return _E.apply(this,arguments)}function _E(){_E=_asyncToGenerator(function*(){g=s.AbortController?new s.AbortController:null;try{let N=yield T(e,{...c,headers:S,signal:g?.signal});yield w(N),yield Ll(N.body,jl(Ul(k=>{k?S[Bl]=k:delete S[Bl]},k=>{R=k},o))),i?.(),x(),h()}catch(N){if(!g?.signal?.aborted)try{let k=a?.(N)??R;clearTimeout(I),I=setTimeout(E,k)}catch(k){x(),y(k)}}});return _E.apply(this,arguments)}E()})}function eS(e){let t=e.headers.get("content-type");if(!t?.startsWith(rs))throw new Error(`Expected content-type to be ${rs}, Actual: ${t}`)}p();u();d();l();p();u();d();l();function Hl(e){return{status:e,isUninitialized:e==="uninitialized",isLoading:e==="pending",isSuccess:e==="fulfilled",isError:e==="rejected"}}var zl=Ke;function od(e,t){if(e===t||!(zl(e)&&zl(t)||Array.isArray(e)&&Array.isArray(t)))return t;let r=Object.keys(t),n=Object.keys(e),o=r.length===n.length,i=Array.isArray(t)?[]:{};for(let a of r)i[a]=od(e[a],t[a]),o&&(o=e[a]===i[a]);return o?e:i}function Or(e){let t=0;for(let r in e)t++;return t}var Wl=e=>[].concat(...e);function tS(e){return new RegExp("(^|:)//").test(e)}function rS(){return typeof document>"u"?!0:document.visibilityState!=="hidden"}function jo(e){return e!=null}function nS(){return typeof navigator>"u"||navigator.onLine===void 0?!0:navigator.onLine}var oS=e=>e.replace(/\/$/,""),iS=e=>e.replace(/^\//,"");function aS(e,t){if(!e)return t;if(!t)return e;if(tS(t))return t;let r=e.endsWith("/")||!t.startsWith("?")?"/":"";return e=oS(e),t=iS(t),`${e}${r}${t}`}function sS(e,t,r){return e.has(t)?e.get(t):e.set(t,r).get(t)}var Gl=(...e)=>b(...e),cS=e=>e.status>=200&&e.status<=299,uS=e=>/ion\/(vnd\.api\+)?json/.test(e.get("content-type")||"");function Kl(e){if(!Ke(e))return e;let t={...e};for(let[r,n]of Object.entries(t))n===void 0&&delete t[r];return t}function id({baseUrl:e,prepareHeaders:t=y=>y,fetchFn:r=Gl,paramsSerializer:n,isJsonContentType:o=uS,jsonContentType:i="application/json",jsonReplacer:a,timeout:m,responseHandler:f,validateStatus:c,...h}={}){return typeof b>"u"&&r===Gl&&console.warn("Warning: `fetch` is not available. Please supply a custom `fetchFn` property to use `fetchBaseQuery` on SSR environments."),(/*#__PURE__*/function(){var _ref21=_asyncToGenerator(function*(S,g,v){let{getState:R,extra:I,endpoint:x,forced:T,type:w}=g,E,{url:N,headers:k=new A(h.headers),params:P=void 0,responseHandler:F=f??"json",validateStatus:O=c??cS,timeout:_=m,...$}=typeof S=="string"?{url:S}:S,U,L=g.signal;_&&(U=new s.AbortController,g.signal.addEventListener("abort",U.abort),L=U.signal);let V={...h,signal:L,...$};k=new A(Kl(k)),V.headers=(yield t(k,{getState:R,arg:S,extra:I,endpoint:x,forced:T,type:w,extraOptions:v}))||k;let Q=Z=>typeof Z=="object"&&(Ke(Z)||Array.isArray(Z)||typeof Z.toJSON=="function");if(!V.headers.has("content-type")&&Q(V.body)&&V.headers.set("content-type",i),Q(V.body)&&o(V.headers)&&(V.body=JSON.stringify(V.body,a)),P){let Z=~N.indexOf("?")?"&":"?",oe=n?n(P):new URLSearchParams(Kl(P));N+=Z+oe}N=aS(e,N);let j=new Request(N,V);E={request:new Request(N,V)};let W,Y=!1,re=U&&setTimeout(()=>{Y=!0,U.abort()},_);try{W=yield r(j)}catch(Z){return{error:{status:Y?"TIMEOUT_ERROR":"FETCH_ERROR",error:String(Z)},meta:E}}finally{re&&clearTimeout(re),U?.signal.removeEventListener("abort",U.abort)}let se=W.clone();E.response=se;let ee,ne="";try{let Z;if(yield Promise.all([y(W,F).then(oe=>ee=oe,oe=>Z=oe),se.text().then(oe=>ne=oe,()=>{})]),Z)throw Z}catch(Z){return{error:{status:"PARSING_ERROR",originalStatus:W.status,data:ne,error:String(Z)},meta:E}}return O(W,ee)?{data:ee,meta:E}:{error:{status:W.status,data:ee},meta:E}});return function(_x39,_x40,_x41){return _ref21.apply(this,arguments)}}());function y(_x42,_x43){return _y2.apply(this,arguments)}function _y2(){_y2=_asyncToGenerator(function*(S,g){if(typeof g=="function")return g(S);if(g==="content-type"&&(g=o(S.headers)?"json":"text"),g==="json"){let v=yield S.text();return v.length?JSON.parse(v):null}return S.text()});return _y2.apply(this,arguments)}}var Dr=class{constructor(e,t=void 0){this.value=e,this.meta=t}};function lS(){return _lS.apply(this,arguments)}function _lS(){_lS=_asyncToGenerator(function*(e=0,t=5){let r=Math.min(e,t),n=~~((Math.random()+.4)*(300<<r));yield new Promise(o=>setTimeout(i=>o(i),n))});return _lS.apply(this,arguments)}function dS(e,t){throw Object.assign(new Dr({error:e,meta:t}),{throwImmediately:!0})}var Yl={},pS=(e,t)=>(/*#__PURE__*/function(){var _ref22=_asyncToGenerator(function*(r,n,o){let i=[5,(t||Yl).maxRetries,(o||Yl).maxRetries].filter(h=>h!==void 0),[a]=i.slice(-1),f={maxRetries:a,backoff:lS,retryCondition:(h,y,{attempt:S})=>S<=a,...t,...o},c=0;for(;;)try{let h=yield e(r,n,o);if(h.error)throw new Dr(h);return h}catch(h){if(c++,h.throwImmediately){if(h instanceof Dr)return h.value;throw h}if(h instanceof Dr&&!f.retryCondition(h.value.error,r,{attempt:c,baseQueryApi:n,extraOptions:o}))return h.value;yield f.backoff(c,f.maxRetries)}});return function(_x44,_x45,_x46){return _ref22.apply(this,arguments)}}()),ad=Object.assign(pS,{fail:dS}),ss=D("__rtkq/focused"),sd=D("__rtkq/unfocused"),cs=D("__rtkq/online"),cd=D("__rtkq/offline");function us(e){return e.type==="query"}function fS(e){return e.type==="mutation"}function ls(e){return e.type==="infinitequery"}function ds(e,t,r,n,o,i){return mS(e)?e(t,r,n,o).filter(jo).map(os).map(i):Array.isArray(e)?e.map(os).map(i):[]}function mS(e){return typeof e=="function"}function os(e){return typeof e=="string"?{type:e}:e}function gS(e,t){return e.catch(t)}var xn=Symbol("forceQueryFn"),is=e=>typeof e[xn]=="function";function hS({serializeQueryArgs:e,queryThunk:t,infiniteQueryThunk:r,mutationThunk:n,api:o,context:i}){let a=new Map,m=new Map,{unsubscribeQueryResult:f,removeMutationResult:c,updateSubscriptionOptions:h}=o.internalActions;return{buildInitiateQuery:x,buildInitiateInfiniteQuery:T,buildInitiateMutation:w,getRunningQueryThunk:y,getRunningMutationThunk:S,getRunningQueriesThunk:g,getRunningMutationsThunk:v};function y(E,N){return k=>{let P=i.endpointDefinitions[E],F=e({queryArgs:N,endpointDefinition:P,endpointName:E});return a.get(k)?.[F]}}function S(E,N){return k=>m.get(k)?.[N]}function g(){return E=>Object.values(a.get(E)||{}).filter(jo)}function v(){return E=>Object.values(m.get(E)||{}).filter(jo)}function R(E){}function I(E,N){let k=(P,{subscribe:F=!0,forceRefetch:O,subscriptionOptions:_,[xn]:$,...U}={})=>(L,V)=>{let Q=e({queryArgs:P,endpointDefinition:N,endpointName:E}),j,z={...U,type:"query",subscribe:F,forceRefetch:O,subscriptionOptions:_,endpointName:E,originalArgs:P,queryCacheKey:Q,[xn]:$};if(us(N))j=t(z);else{let{direction:ce,initialPageParam:me}=U;j=r({...z,direction:ce,initialPageParam:me})}let W=o.endpoints[E].select(P),Y=L(j),re=W(V());let{requestId:se,abort:ee}=Y,ne=re.requestId!==se,Z=a.get(L)?.[Q],oe=()=>W(V()),he=Object.assign($?Y.then(oe):ne&&!Z?Promise.resolve(re):Promise.all([Z,Y]).then(oe),{arg:P,requestId:se,subscriptionOptions:_,queryCacheKey:Q,abort:ee,unwrap(){return _asyncToGenerator(function*(){let ce=yield he;if(ce.isError)throw ce.error;return ce.data})()},refetch:()=>L(k(P,{subscribe:!1,forceRefetch:!0})),unsubscribe(){F&&L(f({queryCacheKey:Q,requestId:se}))},updateSubscriptionOptions(ce){he.subscriptionOptions=ce,L(h({endpointName:E,requestId:se,queryCacheKey:Q,options:ce}))}});if(!Z&&!ne&&!$){let ce=sS(a,L,{});ce[Q]=he,he.then(()=>{delete ce[Q],Or(ce)||a.delete(L)})}return he};return k}function x(E,N){return I(E,N)}function T(E,N){return I(E,N)}function w(E){return(N,{track:k=!0,fixedCacheKey:P}={})=>(F,O)=>{let _=n({type:"mutation",endpointName:E,originalArgs:N,track:k,fixedCacheKey:P}),$=F(_);let{requestId:U,abort:L,unwrap:V}=$,Q=gS($.unwrap().then(Y=>({data:Y})),Y=>({error:Y})),j=()=>{F(c({requestId:U,fixedCacheKey:P}))},z=Object.assign(Q,{arg:$.arg,requestId:U,abort:L,unwrap:V,reset:j}),W=m.get(F)||{};return m.set(F,W),W[U]=z,z.then(()=>{delete W[U],Or(W)||m.delete(F)}),P&&(W[P]=z,z.then(()=>{W[P]===z&&(delete W[P],Or(W)||m.delete(F))})),z}}}function yS(e){return e}var Vo=(e={})=>({...e,[cn]:!0});function SS({reducerPath:e,baseQuery:t,context:{endpointDefinitions:r},serializeQueryArgs:n,api:o,assertTagType:i,selectors:a}){let m=(F,O,_,$)=>(U,L)=>{let V=r[F],Q=n({queryArgs:O,endpointDefinition:V,endpointName:F});if(U(o.internalActions.queryResultPatched({queryCacheKey:Q,patches:_})),!$)return;let j=o.endpoints[F].select(O)(L()),z=ds(V.providesTags,j.data,void 0,O,{},i);U(o.internalActions.updateProvidedBy({queryCacheKey:Q,providedTags:z}))};function f(F,O,_=0){let $=[O,...F];return _&&$.length>_?$.slice(0,-1):$}function c(F,O,_=0){let $=[...F,O];return _&&$.length>_?$.slice(1):$}let h=(F,O,_,$=!0)=>(U,L)=>{let Q=o.endpoints[F].select(O)(L()),j={patches:[],inversePatches:[],undo:()=>U(o.util.patchQueryData(F,O,j.inversePatches,$))};if(Q.status==="uninitialized")return j;let z;if("data"in Q)if(De(Q.data)){let[W,Y,re]=Gn(Q.data,_);j.patches.push(...Y),j.inversePatches.push(...re),z=W}else z=_(Q.data),j.patches.push({op:"replace",path:[],value:z}),j.inversePatches.push({op:"replace",path:[],value:Q.data});return j.patches.length===0||U(o.util.patchQueryData(F,O,j.patches,$)),j},y=(F,O,_)=>$=>$(o.endpoints[F].initiate(O,{subscribe:!1,forceRefetch:!0,[xn]:()=>({data:_})})),S=(F,O)=>F.query&&F[O]?F[O]:yS,g=/*#__PURE__*/function(){var _ref23=_asyncToGenerator(function*(F,{signal:O,abort:_,rejectWithValue:$,fulfillWithValue:U,dispatch:L,getState:V,extra:Q}){let j=r[F.endpointName];try{let z=S(j,"transformResponse"),W={signal:O,abort:_,dispatch:L,getState:V,extra:Q,endpoint:F.endpointName,type:F.type,forced:F.type==="query"?v(F,V()):void 0,queryCacheKey:F.type==="query"?F.queryCacheKey:void 0},Y=F.type==="query"?F[xn]:void 0,re,se=/*#__PURE__*/function(){var _ref24=_asyncToGenerator(function*(ne,Z,oe,he){if(Z==null&&ne.pages.length)return Promise.resolve({data:ne});let ce={queryArg:F.originalArgs,pageParam:Z},me=yield ee(ce),ye=he?f:c;return{data:{pages:ye(ne.pages,me.data,oe),pageParams:ye(ne.pageParams,Z,oe)}}});return function se(_x49,_x50,_x51,_x52){return _ref24.apply(this,arguments)}}();function ee(_x53){return _ee.apply(this,arguments)}function _ee(){_ee=_asyncToGenerator(function*(ne){let Z,{extraOptions:oe}=j;if(Y?Z=Y():j.query?Z=yield t(j.query(ne),W,oe):Z=yield j.queryFn(ne,W,oe,ce=>t(ce,W,oe)),typeof process<"u",Z.error)throw new Dr(Z.error,Z.meta);let he=yield z(Z.data,Z.meta,ne);return{...Z,data:he}});return _ee.apply(this,arguments)}if(F.type==="query"&&"infiniteQueryOptions"in j){let{infiniteQueryOptions:ne}=j,{maxPages:Z=1/0}=ne,oe,he={pages:[],pageParams:[]},ce=a.selectQueryEntry(V(),F.queryCacheKey)?.data,ye=v(F,V())&&!F.direction||!ce?he:ce;if("direction"in F&&F.direction&&ye.pages.length){let Te=F.direction==="backward",ft=(Te?ud:as)(ne,ye);oe=yield se(ye,ft,Z,Te)}else{let{initialPageParam:Te=ne.initialPageParam}=F,Le=ce?.pageParams??[],ft=Le[0]??Te,Jt=Le.length;oe=yield se(ye,ft,Z),Y&&(oe={data:oe.data.pages[0]});for(let Xt=1;Xt<Jt;Xt++){let Br=as(ne,oe.data);oe=yield se(oe.data,Br,Z)}}re=oe}else re=yield ee(F.originalArgs);return U(re.data,Vo({fulfilledTimeStamp:Date.now(),baseQueryMeta:re.meta}))}catch(z){let W=z;if(W instanceof Dr){let Y=S(j,"transformErrorResponse");try{return $(yield Y(W.value,W.meta,F.originalArgs),Vo({baseQueryMeta:W.meta}))}catch(re){W=re}}throw typeof process<"u",console.error(W),W}});return function g(_x47,_x48){return _ref23.apply(this,arguments)}}();function v(F,O){let _=a.selectQueryEntry(O,F.queryCacheKey),$=a.selectConfig(O).refetchOnMountOrArgChange,U=_?.fulfilledTimeStamp,L=F.forceRefetch??(F.subscribe&&$);return L?L===!0||(Number(new Date)-Number(U))/1e3>=L:!1}let R=()=>ue(`${e}/executeQuery`,g,{getPendingMeta({arg:O}){let _=r[O.endpointName];return Vo({startedTimeStamp:Date.now(),...(ls(_)?{direction:O.direction}:{})})},condition(O,{getState:_}){let $=_(),U=a.selectQueryEntry($,O.queryCacheKey),L=U?.fulfilledTimeStamp,V=O.originalArgs,Q=U?.originalArgs,j=r[O.endpointName],z=O.direction;return is(O)?!0:U?.status==="pending"?!1:v(O,$)||us(j)&&j?.forceRefetch?.({currentArg:V,previousArg:Q,endpointState:U,state:$})?!0:!(L&&!z)},dispatchConditionRejection:!0}),I=R(),x=R(),T=ue(`${e}/executeMutation`,g,{getPendingMeta(){return Vo({startedTimeStamp:Date.now()})}}),w=F=>"force"in F,E=F=>"ifOlderThan"in F,N=(F,O,_)=>($,U)=>{let L=w(_)&&_.force,V=E(_)&&_.ifOlderThan,Q=(z=!0)=>{let W={forceRefetch:z,isPrefetch:!0};return o.endpoints[F].initiate(O,W)},j=o.endpoints[F].select(O)(U());if(L)$(Q());else if(V){let z=j?.fulfilledTimeStamp;if(!z){$(Q());return}(Number(new Date)-Number(new Date(z)))/1e3>=V&&$(Q())}else $(Q(!1))};function k(F){return O=>O?.meta?.arg?.endpointName===F}function P(F,O){return{matchPending:sr(Xn(F),k(O)),matchFulfilled:sr(at(F),k(O)),matchRejected:sr($t(F),k(O))}}return{queryThunk:I,mutationThunk:T,infiniteQueryThunk:x,prefetch:N,updateQueryData:h,upsertQueryData:y,patchQueryData:m,buildMatchThunkActions:P}}function as(e,{pages:t,pageParams:r}){let n=t.length-1;return e.getNextPageParam(t[n],t,r[n],r)}function ud(e,{pages:t,pageParams:r}){return e.getPreviousPageParam?.(t[0],t,r[0],r)}function ld(e,t,r,n){return ds(r[e.meta.arg.endpointName][t],at(e)?e.payload:void 0,ln(e)?e.payload:void 0,e.meta.arg.originalArgs,"baseQueryMeta"in e.meta?e.meta.baseQueryMeta:void 0,n)}function Lo(e,t,r){let n=e[t];n&&r(n)}function Rn(e){return("arg"in e?e.arg.fixedCacheKey:e.fixedCacheKey)??e.requestId}function Jl(e,t,r){let n=e[Rn(t)];n&&r(n)}var wn={};function vS({reducerPath:e,queryThunk:t,mutationThunk:r,serializeQueryArgs:n,context:{endpointDefinitions:o,apiUid:i,extractRehydrationInfo:a,hasRehydrationInfo:m},assertTagType:f,config:c}){let h=D(`${e}/resetApiState`);function y(k,P,F,O){var _;k[_=P.queryCacheKey]??(k[_]={status:"uninitialized",endpointName:P.endpointName}),Lo(k,P.queryCacheKey,$=>{$.status="pending",$.requestId=F&&$.requestId?$.requestId:O.requestId,P.originalArgs!==void 0&&($.originalArgs=P.originalArgs),$.startedTimeStamp=O.startedTimeStamp;let U=o[O.arg.endpointName];ls(U)&&"direction"in P&&($.direction=P.direction)})}function S(k,P,F,O){Lo(k,P.arg.queryCacheKey,_=>{if(_.requestId!==P.requestId&&!O)return;let{merge:$}=o[P.arg.endpointName];if(_.status="fulfilled",$){if(_.data!==void 0){let{fulfilledTimeStamp:U,arg:L,baseQueryMeta:V,requestId:Q}=P,j=it(_.data,z=>$(z,F,{arg:L.originalArgs,baseQueryMeta:V,fulfilledTimeStamp:U,requestId:Q}));_.data=j}else _.data=F;}else _.data=o[P.arg.endpointName].structuralSharing??!0?od(Ne(_.data)?ta(_.data):_.data,F):F;delete _.error,_.fulfilledTimeStamp=P.fulfilledTimeStamp})}let g=Ht({name:`${e}/queries`,initialState:wn,reducers:{removeQueryResult:{reducer(k,{payload:{queryCacheKey:P}}){delete k[P]},prepare:cr()},cacheEntriesUpserted:{reducer(k,P){for(let F of P.payload){let{queryDescription:O,value:_}=F;y(k,O,!0,{arg:O,requestId:P.meta.requestId,startedTimeStamp:P.meta.timestamp}),S(k,{arg:O,requestId:P.meta.requestId,fulfilledTimeStamp:P.meta.timestamp,baseQueryMeta:{}},_,!0)}},prepare:k=>({payload:k.map(O=>{let{endpointName:_,arg:$,value:U}=O,L=o[_];return{queryDescription:{type:"query",endpointName:_,originalArgs:O.arg,queryCacheKey:n({queryArgs:$,endpointDefinition:L,endpointName:_})},value:U}}),meta:{[cn]:!0,requestId:eo(),timestamp:Date.now()}})},queryResultPatched:{reducer(k,{payload:{queryCacheKey:P,patches:F}}){Lo(k,P,O=>{O.data=na(O.data,F.concat())})},prepare:cr()}},extraReducers(k){k.addCase(t.pending,(P,{meta:F,meta:{arg:O}})=>{let _=is(O);y(P,O,_,F)}).addCase(t.fulfilled,(P,{meta:F,payload:O})=>{let _=is(F.arg);S(P,F,O,_)}).addCase(t.rejected,(P,{meta:{condition:F,arg:O,requestId:_},error:$,payload:U})=>{Lo(P,O.queryCacheKey,L=>{if(!F){if(L.requestId!==_)return;L.status="rejected",L.error=U??$}})}).addMatcher(m,(P,F)=>{let{queries:O}=a(F);for(let[_,$]of Object.entries(O))($?.status==="fulfilled"||$?.status==="rejected")&&(P[_]=$)})}}),v=Ht({name:`${e}/mutations`,initialState:wn,reducers:{removeMutationResult:{reducer(k,{payload:P}){let F=Rn(P);F in k&&delete k[F]},prepare:cr()}},extraReducers(k){k.addCase(r.pending,(P,{meta:F,meta:{requestId:O,arg:_,startedTimeStamp:$}})=>{_.track&&(P[Rn(F)]={requestId:O,status:"pending",endpointName:_.endpointName,startedTimeStamp:$})}).addCase(r.fulfilled,(P,{payload:F,meta:O})=>{O.arg.track&&Jl(P,O,_=>{_.requestId===O.requestId&&(_.status="fulfilled",_.data=F,_.fulfilledTimeStamp=O.fulfilledTimeStamp)})}).addCase(r.rejected,(P,{payload:F,error:O,meta:_})=>{_.arg.track&&Jl(P,_,$=>{$.requestId===_.requestId&&($.status="rejected",$.error=F??O)})}).addMatcher(m,(P,F)=>{let{mutations:O}=a(F);for(let[_,$]of Object.entries(O))($?.status==="fulfilled"||$?.status==="rejected")&&_!==$?.requestId&&(P[_]=$)})}}),R=Ht({name:`${e}/invalidation`,initialState:wn,reducers:{updateProvidedBy:{reducer(k,P){var _,$;let{queryCacheKey:F,providedTags:O}=P.payload;for(let U of Object.values(k))for(let L of Object.values(U)){let V=L.indexOf(F);V!==-1&&L.splice(V,1)}for(let{type:U,id:L}of O){let V=(_=k[U]??(k[U]={}))[$=L||"__internal_without_id"]??(_[$]=[]);V.includes(F)||V.push(F)}},prepare:cr()}},extraReducers(k){k.addCase(g.actions.removeQueryResult,(P,{payload:{queryCacheKey:F}})=>{for(let O of Object.values(P))for(let _ of Object.values(O)){let $=_.indexOf(F);$!==-1&&_.splice($,1)}}).addMatcher(m,(P,F)=>{var _,$;let{provided:O}=a(F);for(let[U,L]of Object.entries(O))for(let[V,Q]of Object.entries(L)){let j=(_=P[U]??(P[U]={}))[$=V||"__internal_without_id"]??(_[$]=[]);for(let z of Q)j.includes(z)||j.push(z)}}).addMatcher(Ye(at(t),ln(t)),(P,F)=>{let O=ld(F,"providesTags",o,f),{queryCacheKey:_}=F.meta.arg;R.caseReducers.updateProvidedBy(P,R.actions.updateProvidedBy({queryCacheKey:_,providedTags:O}))})}}),I=Ht({name:`${e}/subscriptions`,initialState:wn,reducers:{updateSubscriptionOptions(k,P){},unsubscribeQueryResult(k,P){},internal_getRTKQSubscriptions(){}}}),x=Ht({name:`${e}/internalSubscriptions`,initialState:wn,reducers:{subscriptionsUpdated:{reducer(k,P){return na(k,P.payload)},prepare:cr()}}}),T=Ht({name:`${e}/config`,initialState:{online:nS(),focused:rS(),middlewareRegistered:!1,...c},reducers:{middlewareRegistered(k,{payload:P}){k.middlewareRegistered=k.middlewareRegistered==="conflict"||i!==P?"conflict":!0}},extraReducers:k=>{k.addCase(cs,P=>{P.online=!0}).addCase(cd,P=>{P.online=!1}).addCase(ss,P=>{P.focused=!0}).addCase(sd,P=>{P.focused=!1}).addMatcher(m,P=>({...P}))}}),w=or({queries:g.reducer,mutations:v.reducer,provided:R.reducer,subscriptions:x.reducer,config:T.reducer}),E=(k,P)=>w(h.match(P)?void 0:k,P),N={...T.actions,...g.actions,...I.actions,...x.actions,...v.actions,...R.actions,resetApiState:h};return{reducer:E,actions:N}}var ns=Symbol.for("RTKQ/skipToken"),dd={status:"uninitialized"},Xl=it(dd,()=>{}),Zl=it(dd,()=>{});function CS({serializeQueryArgs:e,reducerPath:t,createSelector:r}){let n=w=>Xl,o=w=>Zl;return{buildQuerySelector:S,buildInfiniteQuerySelector:g,buildMutationSelector:v,selectInvalidatedBy:R,selectCachedArgsForQuery:I,selectApiState:a,selectQueries:m,selectMutations:c,selectQueryEntry:f,selectConfig:h};function i(w){return{...w,...Hl(w.status)}}function a(w){return w[t]}function m(w){return a(w)?.queries}function f(w,E){return m(w)?.[E]}function c(w){return a(w)?.mutations}function h(w){return a(w)?.config}function y(w,E,N){return k=>{if(k===ns)return r(n,N);let P=e({queryArgs:k,endpointDefinition:E,endpointName:w});return r(O=>f(O,P)??Xl,N)}}function S(w,E){return y(w,E,i)}function g(w,E){let{infiniteQueryOptions:N}=E;function k(P){let F={...P,...Hl(P.status)},{isLoading:O,isError:_,direction:$}=F,U=$==="forward",L=$==="backward";return{...F,hasNextPage:x(N,F.data),hasPreviousPage:T(N,F.data),isFetchingNextPage:O&&U,isFetchingPreviousPage:O&&L,isFetchNextPageError:_&&U,isFetchPreviousPageError:_&&L}}return y(w,E,k)}function v(){return w=>{let E;return typeof w=="object"?E=Rn(w)??ns:E=w,r(E===ns?o:P=>a(P)?.mutations?.[E]??Zl,i)}}function R(w,E){let N=w[t],k=new Set;for(let P of E.filter(jo).map(os)){let F=N.provided[P.type];if(!F)continue;let O=(P.id!==void 0?F[P.id]:Wl(Object.values(F)))??[];for(let _ of O)k.add(_)}return Wl(Array.from(k.values()).map(P=>{let F=N.queries[P];return F?[{queryCacheKey:P,endpointName:F.endpointName,originalArgs:F.originalArgs}]:[]}))}function I(w,E){return Object.values(m(w)).filter(N=>N?.endpointName===E&&N.status!=="uninitialized").map(N=>N.originalArgs)}function x(w,E){return E?as(w,E)!=null:!1}function T(w,E){return!E||!w.getPreviousPageParam?!1:ud(w,E)!=null}}var ed=WeakMap?new WeakMap:void 0,td=({endpointName:e,queryArgs:t})=>{let r="",n=ed?.get(t);if(typeof n=="string")r=n;else{let o=JSON.stringify(t,(i,a)=>(a=typeof a=="bigint"?{$bigint:a.toString()}:a,a=Ke(a)?Object.keys(a).sort().reduce((m,f)=>(m[f]=a[f],m),{}):a,a));Ke(t)&&ed?.set(t,o),r=o}return`${e}(${r})`};function bS(...e){return function(r){let n=ar(c=>r.extractRehydrationInfo?.(c,{reducerPath:r.reducerPath??"api"})),o={reducerPath:"api",keepUnusedDataFor:60,refetchOnMountOrArgChange:!1,refetchOnFocus:!1,refetchOnReconnect:!1,invalidationBehavior:"delayed",...r,extractRehydrationInfo:n,serializeQueryArgs(c){let h=td;if("serializeQueryArgs"in c.endpointDefinition){let y=c.endpointDefinition.serializeQueryArgs;h=S=>{let g=y(S);return typeof g=="string"?g:td({...S,queryArgs:g})}}else r.serializeQueryArgs&&(h=r.serializeQueryArgs);return h(c)},tagTypes:[...(r.tagTypes||[])]},i={endpointDefinitions:{},batch(c){c()},apiUid:eo(),extractRehydrationInfo:n,hasRehydrationInfo:ar(c=>n(c)!=null)},a={injectEndpoints:f,enhanceEndpoints({addTagTypes:c,endpoints:h}){if(c)for(let y of c)o.tagTypes.includes(y)||o.tagTypes.push(y);if(h)for(let[y,S]of Object.entries(h))typeof S=="function"?S(i.endpointDefinitions[y]):Object.assign(i.endpointDefinitions[y]||{},S);return a}},m=e.map(c=>c.init(a,o,i));function f(c){let h=c.endpoints({query:y=>({...y,type:"query"}),mutation:y=>({...y,type:"mutation"}),infiniteQuery:y=>({...y,type:"infinitequery"})});for(let[y,S]of Object.entries(h)){if(c.overrideExisting!==!0&&y in i.endpointDefinitions){if(c.overrideExisting==="throw")throw new Error(He(39));typeof process<"u";continue}typeof process<"u",i.endpointDefinitions[y]=S;for(let g of m)g.injectEndpoint(y,S)}return a}return a.injectEndpoints({endpoints:r.endpoints})}}function dt(e,...t){return Object.assign(e,...t)}var AS=({api:e,queryThunk:t,internalState:r})=>{let n=`${e.reducerPath}/subscriptions`,o=null,i=null,{updateSubscriptionOptions:a,unsubscribeQueryResult:m}=e.internalActions,f=(g,v)=>{var I,x;if(a.match(v)){let{queryCacheKey:T,requestId:w,options:E}=v.payload;return g?.[T]?.[w]&&(g[T][w]=E),!0}if(m.match(v)){let{queryCacheKey:T,requestId:w}=v.payload;return g[T]&&delete g[T][w],!0}if(e.internalActions.removeQueryResult.match(v))return delete g[v.payload.queryCacheKey],!0;if(t.pending.match(v)){let{meta:{arg:T,requestId:w}}=v,E=g[I=T.queryCacheKey]??(g[I]={});return E[`${w}_running`]={},T.subscribe&&(E[w]=T.subscriptionOptions??E[w]??{}),!0}let R=!1;if(t.fulfilled.match(v)||t.rejected.match(v)){let T=g[v.meta.arg.queryCacheKey]||{},w=`${v.meta.requestId}_running`;R||(R=!!T[w]),delete T[w]}if(t.rejected.match(v)){let{meta:{condition:T,arg:w,requestId:E}}=v;if(T&&w.subscribe){let N=g[x=w.queryCacheKey]??(g[x]={});N[E]=w.subscriptionOptions??N[E]??{},R=!0}}return R},c=()=>r.currentSubscriptions,S={getSubscriptions:c,getSubscriptionCount:g=>{let R=c()[g]??{};return Or(R)},isRequestSubscribed:(g,v)=>!!c()?.[g]?.[v]};return(g,v)=>{if(o||(o=JSON.parse(JSON.stringify(r.currentSubscriptions))),e.util.resetApiState.match(g))return o=r.currentSubscriptions={},i=null,[!0,!1];if(e.internalActions.internal_getRTKQSubscriptions.match(g))return[!1,S];let R=f(r.currentSubscriptions,g),I=!0;if(R){i||(i=setTimeout(()=>{let w=JSON.parse(JSON.stringify(r.currentSubscriptions)),[,E]=Gn(o,()=>w);v.next(e.internalActions.subscriptionsUpdated(E)),o=w,i=null},500));let x=typeof g.type=="string"&&!!g.type.startsWith(n),T=t.rejected.match(g)&&g.meta.condition&&!!g.meta.arg.subscribe;I=!x&&!T}return[I,!1]}};function wS(e){for(let t in e)return!1;return!0}var xS=2147483647/1e3-1,RS=({reducerPath:e,api:t,queryThunk:r,context:n,internalState:o,selectors:{selectQueryEntry:i,selectConfig:a}})=>{let{removeQueryResult:m,unsubscribeQueryResult:f,cacheEntriesUpserted:c}=t.internalActions,h=Ye(f.match,r.fulfilled,r.rejected,c.match);function y(I){let x=o.currentSubscriptions[I];return!!x&&!wS(x)}let S={},g=(I,x,T)=>{let w=x.getState(),E=a(w);if(h(I)){let N;if(c.match(I))N=I.payload.map(k=>k.queryDescription.queryCacheKey);else{let{queryCacheKey:k}=f.match(I)?I.payload:I.meta.arg;N=[k]}v(N,x,E)}if(t.util.resetApiState.match(I))for(let[N,k]of Object.entries(S))k&&clearTimeout(k),delete S[N];if(n.hasRehydrationInfo(I)){let{queries:N}=n.extractRehydrationInfo(I);v(Object.keys(N),x,E)}};function v(I,x,T){let w=x.getState();for(let E of I){let N=i(w,E);R(E,N?.endpointName,x,T)}}function R(I,x,T,w){let N=n.endpointDefinitions[x]?.keepUnusedDataFor??w.keepUnusedDataFor;if(N===1/0)return;let k=Math.max(0,Math.min(N,xS));if(!y(I)){let P=S[I];P&&clearTimeout(P),S[I]=setTimeout(()=>{y(I)||T.dispatch(m({queryCacheKey:I})),delete S[I]},k*1e3)}}return g},rd=new Error("Promise never resolved before cacheEntryRemoved."),ES=({api:e,reducerPath:t,context:r,queryThunk:n,mutationThunk:o,internalState:i,selectors:{selectQueryEntry:a,selectApiState:m}})=>{let f=Zn(n),c=Zn(o),h=at(n,o),y={};function S(x,T,w){let E=y[x];E?.valueResolved&&(E.valueResolved({data:T,meta:w}),delete E.valueResolved)}function g(x){let T=y[x];T&&(delete y[x],T.cacheEntryRemoved())}let v=(x,T,w)=>{let E=R(x);function N(k,P,F,O){let _=a(w,P),$=a(T.getState(),P);!_&&$&&I(k,O,P,T,F)}if(n.pending.match(x))N(x.meta.arg.endpointName,E,x.meta.requestId,x.meta.arg.originalArgs);else if(e.internalActions.cacheEntriesUpserted.match(x))for(let{queryDescription:k,value:P}of x.payload){let{endpointName:F,originalArgs:O,queryCacheKey:_}=k;N(F,_,x.meta.requestId,O),S(_,P,{})}else if(o.pending.match(x))T.getState()[t].mutations[E]&&I(x.meta.arg.endpointName,x.meta.arg.originalArgs,E,T,x.meta.requestId);else if(h(x))S(E,x.payload,x.meta.baseQueryMeta);else if(e.internalActions.removeQueryResult.match(x)||e.internalActions.removeMutationResult.match(x))g(E);else if(e.util.resetApiState.match(x))for(let k of Object.keys(y))g(k)};function R(x){return f(x)?x.meta.arg.queryCacheKey:c(x)?x.meta.arg.fixedCacheKey??x.meta.requestId:e.internalActions.removeQueryResult.match(x)?x.payload.queryCacheKey:e.internalActions.removeMutationResult.match(x)?Rn(x.payload):""}function I(x,T,w,E,N){let k=r.endpointDefinitions[x],P=k?.onCacheEntryAdded;if(!P)return;let F={},O=new Promise(Q=>{F.cacheEntryRemoved=Q}),_=Promise.race([new Promise(Q=>{F.valueResolved=Q}),O.then(()=>{throw rd})]);_.catch(()=>{}),y[w]=F;let $=e.endpoints[x].select(k.type==="query"?T:w),U=E.dispatch((Q,j,z)=>z),L={...E,getCacheEntry:()=>$(E.getState()),requestId:N,extra:U,updateCachedData:k.type==="query"?Q=>E.dispatch(e.util.updateQueryData(x,T,Q)):void 0,cacheDataLoaded:_,cacheEntryRemoved:O},V=P(T,L);Promise.resolve(V).catch(Q=>{if(Q!==rd)throw Q})}return v},PS=({api:e,context:{apiUid:t},reducerPath:r})=>(n,o)=>{e.util.resetApiState.match(n)&&o.dispatch(e.internalActions.middlewareRegistered(t)),typeof process<"u"},IS=({reducerPath:e,context:t,context:{endpointDefinitions:r},mutationThunk:n,queryThunk:o,api:i,assertTagType:a,refetchQuery:m,internalState:f})=>{let{removeQueryResult:c}=i.internalActions,h=Ye(at(n),ln(n)),y=Ye(at(n,o),$t(n,o)),S=[],g=(I,x)=>{h(I)?R(ld(I,"invalidatesTags",r,a),x):y(I)?R([],x):i.util.invalidateTags.match(I)&&R(ds(I.payload,void 0,void 0,void 0,void 0,a),x)};function v(I){let{queries:x,mutations:T}=I;for(let w of[x,T])for(let E in w)if(w[E]?.status==="pending")return!0;return!1}function R(I,x){let T=x.getState(),w=T[e];if(S.push(...I),w.config.invalidationBehavior==="delayed"&&v(w))return;let E=S;if(S=[],E.length===0)return;let N=i.util.selectInvalidatedBy(T,E);t.batch(()=>{let k=Array.from(N.values());for(let{queryCacheKey:P}of k){let F=w.queries[P],O=f.currentSubscriptions[P]??{};F&&(Or(O)===0?x.dispatch(c({queryCacheKey:P})):F.status!=="uninitialized"&&x.dispatch(m(F)))}})}return g},TS=({reducerPath:e,queryThunk:t,api:r,refetchQuery:n,internalState:o})=>{let i={},a=(g,v)=>{(r.internalActions.updateSubscriptionOptions.match(g)||r.internalActions.unsubscribeQueryResult.match(g))&&c(g.payload,v),(t.pending.match(g)||t.rejected.match(g)&&g.meta.condition)&&c(g.meta.arg,v),(t.fulfilled.match(g)||t.rejected.match(g)&&!g.meta.condition)&&f(g.meta.arg,v),r.util.resetApiState.match(g)&&y()};function m(g,v){let I=v.getState()[e].queries[g],x=o.currentSubscriptions[g];if(!(!I||I.status==="uninitialized"))return x}function f({queryCacheKey:g},v){let R=v.getState()[e],I=R.queries[g],x=o.currentSubscriptions[g];if(!I||I.status==="uninitialized")return;let{lowestPollingInterval:T,skipPollingIfUnfocused:w}=S(x);if(!Number.isFinite(T))return;let E=i[g];E?.timeout&&(clearTimeout(E.timeout),E.timeout=void 0);let N=Date.now()+T;i[g]={nextPollTimestamp:N,pollingInterval:T,timeout:setTimeout(()=>{(R.config.focused||!w)&&v.dispatch(n(I)),f({queryCacheKey:g},v)},T)}}function c({queryCacheKey:g},v){let I=v.getState()[e].queries[g],x=o.currentSubscriptions[g];if(!I||I.status==="uninitialized")return;let{lowestPollingInterval:T}=S(x);if(!Number.isFinite(T)){h(g);return}let w=i[g],E=Date.now()+T;(!w||E<w.nextPollTimestamp)&&f({queryCacheKey:g},v)}function h(g){let v=i[g];v?.timeout&&clearTimeout(v.timeout),delete i[g]}function y(){for(let g of Object.keys(i))h(g)}function S(g={}){let v=!1,R=Number.POSITIVE_INFINITY;for(let I in g)g[I].pollingInterval&&(R=Math.min(g[I].pollingInterval,R),v=g[I].skipPollingIfUnfocused||v);return{lowestPollingInterval:R,skipPollingIfUnfocused:v}}return a},FS=({api:e,context:t,queryThunk:r,mutationThunk:n})=>{let o=Xn(r,n),i=$t(r,n),a=at(r,n),m={};return(c,h)=>{if(o(c)){let{requestId:y,arg:{endpointName:S,originalArgs:g}}=c.meta,v=t.endpointDefinitions[S],R=v?.onQueryStarted;if(R){let I={},x=new Promise((N,k)=>{I.resolve=N,I.reject=k});x.catch(()=>{}),m[y]=I;let T=e.endpoints[S].select(v.type==="query"?g:y),w=h.dispatch((N,k,P)=>P),E={...h,getCacheEntry:()=>T(h.getState()),requestId:y,extra:w,updateCachedData:v.type==="query"?N=>h.dispatch(e.util.updateQueryData(S,g,N)):void 0,queryFulfilled:x};R(g,E)}}else if(a(c)){let{requestId:y,baseQueryMeta:S}=c.meta;m[y]?.resolve({data:c.payload,meta:S}),delete m[y]}else if(i(c)){let{requestId:y,rejectedWithValue:S,baseQueryMeta:g}=c.meta;m[y]?.reject({error:c.payload??c.error,isUnhandledError:!S,meta:g}),delete m[y]}}},kS=({reducerPath:e,context:t,api:r,refetchQuery:n,internalState:o})=>{let{removeQueryResult:i}=r.internalActions,a=(f,c)=>{ss.match(f)&&m(c,"refetchOnFocus"),cs.match(f)&&m(c,"refetchOnReconnect")};function m(f,c){let h=f.getState()[e],y=h.queries,S=o.currentSubscriptions;t.batch(()=>{for(let g of Object.keys(S)){let v=y[g],R=S[g];if(!R||!v)continue;(Object.values(R).some(x=>x[c]===!0)||Object.values(R).every(x=>x[c]===void 0)&&h.config[c])&&(Or(R)===0?f.dispatch(i({queryCacheKey:g})):v.status!=="uninitialized"&&f.dispatch(n(v)))}})}return a};function OS(e){let{reducerPath:t,queryThunk:r,api:n,context:o}=e,{apiUid:i}=o,a={invalidateTags:D(`${t}/invalidateTags`)},m=y=>y.type.startsWith(`${t}/`),f=[PS,RS,IS,TS,ES,FS];return{middleware:y=>{let S=!1,v={...e,internalState:{currentSubscriptions:{}},refetchQuery:h,isThisApiSliceAction:m},R=f.map(T=>T(v)),I=AS(v),x=kS(v);return T=>w=>{if(!Qn(w))return T(w);S||(S=!0,y.dispatch(n.internalActions.middlewareRegistered(i)));let E={...y,next:T},N=y.getState(),[k,P]=I(w,E,N),F;if(k?F=T(w):F=P,y.getState()[t]&&(x(w,E,N),m(w)||o.hasRehydrationInfo(w)))for(let O of R)O(w,E,N);return F}},actions:a};function h(y){return e.api.endpoints[y.endpointName].initiate(y.originalArgs,{subscribe:!1,forceRefetch:!0})}}var nd=Symbol(),DS=({createSelector:e=fe}={})=>({name:nd,init(t,{baseQuery:r,tagTypes:n,reducerPath:o,serializeQueryArgs:i,keepUnusedDataFor:a,refetchOnMountOrArgChange:m,refetchOnFocus:f,refetchOnReconnect:c,invalidationBehavior:h},y){jc();let S=ee=>(typeof process<"u",ee);Object.assign(t,{reducerPath:o,endpoints:{},internalActions:{onOnline:cs,onOffline:cd,onFocus:ss,onFocusLost:sd},util:{}});let g=CS({serializeQueryArgs:i,reducerPath:o,createSelector:e}),{selectInvalidatedBy:v,selectCachedArgsForQuery:R,buildQuerySelector:I,buildInfiniteQuerySelector:x,buildMutationSelector:T}=g;dt(t.util,{selectInvalidatedBy:v,selectCachedArgsForQuery:R});let{queryThunk:w,infiniteQueryThunk:E,mutationThunk:N,patchQueryData:k,updateQueryData:P,upsertQueryData:F,prefetch:O,buildMatchThunkActions:_}=SS({baseQuery:r,reducerPath:o,context:y,api:t,serializeQueryArgs:i,assertTagType:S,selectors:g}),{reducer:$,actions:U}=vS({context:y,queryThunk:w,infiniteQueryThunk:E,mutationThunk:N,serializeQueryArgs:i,reducerPath:o,assertTagType:S,config:{refetchOnFocus:f,refetchOnReconnect:c,refetchOnMountOrArgChange:m,keepUnusedDataFor:a,reducerPath:o,invalidationBehavior:h}});dt(t.util,{patchQueryData:k,updateQueryData:P,upsertQueryData:F,prefetch:O,resetApiState:U.resetApiState,upsertQueryEntries:U.cacheEntriesUpserted}),dt(t.internalActions,U);let{middleware:L,actions:V}=OS({reducerPath:o,context:y,queryThunk:w,mutationThunk:N,infiniteQueryThunk:E,api:t,assertTagType:S,selectors:g});dt(t.util,V),dt(t,{reducer:$,middleware:L});let{buildInitiateQuery:Q,buildInitiateInfiniteQuery:j,buildInitiateMutation:z,getRunningMutationThunk:W,getRunningMutationsThunk:Y,getRunningQueriesThunk:re,getRunningQueryThunk:se}=hS({queryThunk:w,mutationThunk:N,infiniteQueryThunk:E,api:t,serializeQueryArgs:i,context:y});return dt(t.util,{getRunningMutationThunk:W,getRunningMutationsThunk:Y,getRunningQueryThunk:se,getRunningQueriesThunk:re}),{name:nd,injectEndpoint(ee,ne){var he;let oe=(he=t.endpoints)[ee]??(he[ee]={});us(ne)&&dt(oe,{name:ee,select:I(ee,ne),initiate:Q(ee,ne)},_(w,ee)),fS(ne)&&dt(oe,{name:ee,select:T(),initiate:z(ee)},_(N,ee)),ls(ne)&&dt(oe,{name:ee,select:x(ee,ne),initiate:j(ee,ne)},_(w,ee))}}}}),pd=bS(DS());var MS=/*#__PURE__*/function(){var _ref25=_asyncToGenerator(function*(e,t,r){let n=t.getState(),{accessToken:o,environment:i,organizationId:a}=n.configuration,m=n.generatedAnswer.answerConfigurationId,f={...e,headers:{...(e?.headers||{}),Authorization:`Bearer ${o}`}};try{let c=Ie(a,i);return{data:id({baseUrl:`${c}/rest/organizations/${a}/answer/v1/configs/${m}`,fetchFn:function(){var _ref26=_asyncToGenerator(function*(y){if(y instanceof String)throw new Error("The provided 'request' must be a Request object.");let S=y.url,g={};return["method","headers","mode","credentials","cache","redirect","referrer","referrerPolicy","integrity","keepalive","signal"].forEach(v=>{g[v]=y[v]}),g.duplex="half",g.body=yield y.text(),b(S,g)});return function fetchFn(_x57){return _ref26.apply(this,arguments)}}()})(f,{...t,signal:null},r)}}catch(c){return{error:c}}});return function MS(_x54,_x55,_x56){return _ref25.apply(this,arguments)}}(),fd=pd({reducerPath:"answer",baseQuery:ad(MS,{maxRetries:3}),endpoints:()=>({})});var qS=(e,t)=>{let{contentFormat:r}=t;e.contentFormat=r,e.isStreaming=!0,e.isLoading=!1},NS=(e,t)=>{e.answer===void 0?e.answer=t.textDelta:typeof t.textDelta=="string"&&(e.answer=e.answer.concat(t.textDelta))},_S=(e,t)=>{e.citations=t.citations},VS=(e,t)=>{e.generated=t.answerGenerated,e.isStreaming=!1},LS=(e,t)=>{e.error={message:t.errorMessage,code:t.code},e.isStreaming=!1,e.isLoading=!1,console.error(`${t.errorMessage} - code ${t.code}`)},jS=(e,t,r)=>{let n=JSON.parse(e.data);n.finishReason==="ERROR"&&n.errorMessage&&LS(t,n);let o=n.payload.length?JSON.parse(n.payload):{};switch(n.payloadType){case"genqa.headerMessageType":o.contentFormat&&(qS(t,o),r(Ua(o.contentFormat)));break;case"genqa.messageType":o.textDelta&&(NS(t,o),r(La({textDelta:o.textDelta})));break;case"genqa.citationsType":o.citations&&(_S(t,o),r(ja({citations:o.citations})));break;case"genqa.endOfStreamType":VS(t,o),r(Oo(o.answerGenerated??!1));break}},ps=fd.injectEndpoints({overrideExisting:!0,endpoints:e=>({getAnswer:e.query({queryFn:()=>({data:{contentFormat:void 0,answer:void 0,citations:void 0,error:void 0,generated:!1,isStreaming:!0,isLoading:!0}}),onCacheEntryAdded(t,{getState:r,cacheDataLoaded:n,updateCachedData:o,dispatch:i}){return _asyncToGenerator(function*(){yield n;let{configuration:a,generatedAnswer:m,insightConfiguration:f}=r(),{organizationId:c,environment:h,accessToken:y}=a,S=Ie(c,h),g=`${S}/rest/organizations/${c}/insight/v1/configs/${f?.insightId}/answer/${m.answerConfigurationId}/generate`,v=`${S}/rest/organizations/${c}/answer/v1/configs/${m.answerConfigurationId}/generate`;yield $l(f?g:v,{method:"POST",body:JSON.stringify(t),headers:{Authorization:`Bearer ${y}`,Accept:"application/json","Content-Type":"application/json","Accept-Encoding":"*"},fetch:b,onopen:function(){var _ref27=_asyncToGenerator(function*(R){let I=R.headers.get("x-answer-id");I&&o(x=>{x.answerId=I})});return function onopen(_x58){return _ref27.apply(this,arguments)}}(),onmessage:R=>{o(I=>{jS(R,I,i)})},onerror:R=>{throw R},onclose:()=>{o(R=>{i(Ba(!R.generated))})}})})()}})})}),jq=fe(e=>Cn(e)?.q,e=>e.search.requestId,(e,t)=>({q:e,requestId:t})),Uo={},US=(e,t)=>({...Uo,[e]:_o(t)?.map(r=>Xa(r,Ja())).sort((r,n)=>r.facetId>n.facetId?1:n.facetId>r.facetId?-1:0)}),BS=e=>e.pagination?e.pagination.firstResult+e.pagination.numberOfResults>5e3?5e3-e.pagination.firstResult:e.pagination.numberOfResults:void 0,QS=e=>{let t=ul(e),r=Nl(e.tabSet),n={...t};return tr(r)||(n.cq=`${r} AND ${t.cq}`),n},$S=(e,t)=>{let r=Cn(e)?.q,{aq:n,cq:o,dq:i,lq:a}=QS(e),m=vl(e),f=Sl(e),c=dl(e)??[];return r&&t==="fetch"&&(Uo=US(r,e)),{q:r,...(n&&{aq:n}),...(o&&{cq:o}),...(i&&{dq:i}),...(a&&{lq:a}),pipelineRuleParameters:{mlGenerativeQuestionAnswering:{responseFormat:e.generatedAnswer.responseFormat,citationsFieldToInclude:c}},...(m?.length&&{searchHub:m}),...(f?.length&&{pipeline:f}),...(Uo[r]?.length&&{facets:Uo[r]}),...(e.fields&&{fieldsToInclude:e.fields.fieldsToInclude}),...(e.didYouMean&&{queryCorrection:{enabled:e.didYouMean.enableDidYouMean&&e.didYouMean.queryCorrectionMode==="next",options:{automaticallyCorrect:e.didYouMean.automaticallyCorrectQuery?"whenNoResults":"never"}},enableDidYouMean:e.didYouMean.enableDidYouMean&&e.didYouMean.queryCorrectionMode==="legacy"}),...(e.pagination&&{numberOfResults:BS(e),firstResult:e.pagination.firstResult}),tab:Za(e.tabSet)}};var pl=e=>ps.endpoints.getAnswer.select($S(e,"select"))(e);p();u();d();l();var md=ge(ur,e=>e);p();u();d();l();function fs(){return typeof window<"u"&&typeof document<"u"}p();u();d();l();function HS(e){let t=e.payload?.analyticsAction;return gd(e)&&!X(t)}function gd(e){return"type"in e}var hd=e=>t=>r=>{let n;HS(r)&&(n=r.payload.analyticsAction,delete r.payload.analyticsAction);let o=t(r);return gd(r)&&(r.type==="search/executeSearch/fullfilled"&&n===void 0&&console.error("No analytics action associated with search:",r),r.type==="recommendation/get/fullfilled"&&n===void 0&&console.error("No analytics action associated with recommendation:",r),r.type==="productRecommendations/get/fullfilled"&&n===void 0&&console.error("No analytics action associated with product recommendation:",r)),n!==void 0&&e.dispatch(n),o};p();u();d();l();p();u();d();l();var xd=je(Sd(),1);p();u();d();l();var SN=D("tab/register",e=>{let t=new K({values:{id:G,expression:we}});return B(e,t)}),Bo=D("tab/updateActiveTab",e=>B(e,G));p();u();d();l();var Qo=je(Do(),1),bd=je(vd(),1),Ad=je(Cd(),1);Qo.default.extend(Ad.default);Qo.default.extend(bd.default);var wd=()=>({organizationId:"",accessToken:"",search:{locale:"en-US",timezone:Qo.default.tz.guess(),authenticationProviders:[]},analytics:{enabled:!0,originContext:"Search",originLevel2:"default",originLevel3:"default",anonymous:!1,deviceId:"",userDisplayName:"",documentLocation:"",trackingId:"",analyticsMode:"next",source:{}},knowledge:{answerConfigurationId:""},environment:"prod"});var Rd=ge(wd(),e=>e.addCase(St,(t,r)=>{WS(t,r.payload)}).addCase(Je,(t,r)=>{GS(t,r.payload)}).addCase(lr,(t,r)=>{KS(t,r.payload)}).addCase(dr,t=>{t.analytics.enabled=!1}).addCase(pr,t=>{t.analytics.enabled=!0}).addCase(ro,(t,r)=>{t.analytics.originLevel2=r.payload.originLevel2}).addCase(no,(t,r)=>{t.analytics.originLevel3=r.payload.originLevel3}).addCase(Bo,(t,r)=>{t.analytics.originLevel2=r.payload}).addCase(vt,(t,r)=>{t.analytics.originLevel2=r.payload.tab||t.analytics.originLevel2}));function WS(e,t){X(t.accessToken)||(e.accessToken=t.accessToken),e.environment=t.environment??"prod",X(t.organizationId)||(e.organizationId=t.organizationId)}function GS(e,t){X(t.proxyBaseUrl)||(e.search.apiBaseUrl=t.proxyBaseUrl),X(t.locale)||(e.search.locale=t.locale),X(t.timezone)||(e.search.timezone=t.timezone),X(t.authenticationProviders)||(e.search.authenticationProviders=t.authenticationProviders)}function KS(e,t){X(t.enabled)||(e.analytics.enabled=t.enabled),X(t.originContext)||(e.analytics.originContext=t.originContext),X(t.originLevel2)||(e.analytics.originLevel2=t.originLevel2),X(t.originLevel3)||(e.analytics.originLevel3=t.originLevel3),X(t.proxyBaseUrl)||(e.analytics.apiBaseUrl=t.proxyBaseUrl),X(t.trackingId)||(e.analytics.trackingId=t.trackingId),X(t.analyticsMode)||(e.analytics.analyticsMode=t.analyticsMode),X(t.source)||(e.analytics.source=t.source);try{let r=(0,xd.default)();r&&(e.analytics.analyticsMode="next",e.analytics.trackingId=r)}catch{}X(t.runtimeEnvironment)||(e.analytics.runtimeEnvironment=t.runtimeEnvironment),X(t.anonymous)||(e.analytics.anonymous=t.anonymous),X(t.deviceId)||(e.analytics.deviceId=t.deviceId),X(t.userDisplayName)||(e.analytics.userDisplayName=t.userDisplayName),X(t.documentLocation)||(e.analytics.documentLocation=t.documentLocation)}var ze=Rd;p();u();d();l();function YS(e){return e.instantlyCallable}var Ed=()=>e=>t=>e(YS(t)?t():t);p();u();d();l();var Pd=e=>()=>t=>r=>{let n=r;if(!n.error)return t(r);let o=n.error,i=[n.payload?.errorCode,n.payload?.message].filter(Boolean).join(" - ");if(n.payload?.ignored||e.error(i||o.stack||o.message||o.name||"Error",`Action dispatch error ${n.type}`,r),n.error.name!=="SchemaValidationError")return t(r)},Id=e=>t=>r=>n=>(e.debug({action:n,nextState:t.getState()},`Action dispatched: ${n.type}`),r(n));p();u();d();l();var Ss=e=>({referrer:document.referrer,userAgent:navigator.userAgent,location:window.location.href,clientId:e}),vs=()=>({referrer:null,userAgent:null,location:null,clientId:""});p();u();d();l();function Td(e,t){let r={...e},n,o=i=>(a,m)=>{let f=i(a,m);return n?n(f,m):f};return{get combinedReducer(){let i=cc(Object.entries(t).filter(([a])=>!(a in r)).map(([a,m])=>[a,()=>m]));return o(or({...i,...r}))},containsAll(i){return Object.keys(i).every(m=>m in r)},add(i){Object.keys(i).filter(a=>!(a in r)).forEach(a=>r[a]=i[a])},addCrossReducer(i){n=i}}}p();u();d();l();p();u();d();l();function $o(e,t,r){var n,o,i;t===void 0&&(t=50),r===void 0&&(r={});var a=(n=r.isImmediate)!=null&&n,m=(o=r.callback)!=null&&o,f=r.maxWait,c=Date.now(),h=[];function y(){if(f!==void 0){var g=Date.now()-c;if(g+t>=f)return f-g}return t}var S=function(){var g=[].slice.call(arguments),v=this;return new Promise(function(R,I){var x=a&&i===void 0;if(i!==void 0&&clearTimeout(i),i=setTimeout(function(){if(i=void 0,c=Date.now(),!a){var w=e.apply(v,g);m&&m(w),h.forEach(function(E){return(0,E.resolve)(w)}),h=[]}},y()),x){var T=e.apply(v,g);return m&&m(T),R(T)}h.push({resolve:R,reject:I})})};return S.cancel=function(g){i!==void 0&&clearTimeout(i),h.forEach(function(v){return(0,v.reject)(g)}),h=[]},S}function Fd(e,t){let r=0,n=$o(()=>r=0,500);return o=>i=>(/*#__PURE__*/function(){var _ref28=_asyncToGenerator(function*(a){if(!(typeof a=="function"))return i(a);let f=yield i(a);if(!JS(f))return f;if(typeof t!="function")return e.warn("Unable to renew the expired token because a renew function was not provided. Please specify the #renewAccessToken option when initializing the engine."),f;if(r>=5)return e.warn("Attempted to renew the token but was not successful. Please check the #renewAccessToken function."),f;r++,n();let c=yield XS(t);o.dispatch(St({accessToken:c})),o.dispatch(a)});return function(_x59){return _ref28.apply(this,arguments)}}())}function JS(e){return e?.error?.name===new nr().name}function XS(_x60){return _XS.apply(this,arguments)}function _XS(){_XS=_asyncToGenerator(function*(e){try{return yield e()}catch{return""}});return _XS.apply(this,arguments)}p();u();d();l();function kd({reducer:e,preloadedState:t,middlewares:r=[],thunkExtraArguments:n,name:o}){return Xc({reducer:e,preloadedState:t,devTools:{stateSanitizer:i=>i.history?{...i,history:"<<OMIT>>"}:i,name:o,shouldHotReload:!1},middleware:i=>i({thunk:{extraArgument:n}}).prepend(...r).concat(Id(n.logger))})}function ZS(e,t){let{analytics:r}=e,{analyticsClientMiddleware:n,...o}=r??{},i={...o,...(r?.proxyBaseUrl&&{apiBaseUrl:r.proxyBaseUrl,nexApiBaseUrl:r.proxyBaseUrl})};if(i.analyticsMode!=="next"&&sc())return t.info("Analytics disabled since doNotTrack is active."),{...i,enabled:!1};if(i.analyticsMode==="next"&&!o.trackingId)throw new Cs("analytics.trackingId is required when analytics.analyticsMode=\"next\"");return i}function Od(e,t){let r={...e.reducers,configuration:ze,version:md},n=ev({...e,reducers:r},t,ze),{accessToken:o,environment:i,organizationId:a}=e.configuration;n.dispatch(St({accessToken:o,environment:i,organizationId:a}));let m=ZS(e.configuration,n.logger);return m&&n.dispatch(lr(m)),n}function ev(e,t,r){let{reducers:n}=e,o=Td({...n,configurationReducer:r},e.preloadedState??{});e.crossReducer&&o.addCrossReducer(e.crossReducer);let i=t.logger,a=()=>{let h="";try{h=xr(c.state).getMeta("").clientId}catch(y){i.warn("Error while obtaining clientID from relay",y)}return h},m={...t,get relay(){return xr(c.state)},get navigatorContext(){return e.navigatorContextProvider?e.navigatorContextProvider():fs()?Ss(a()):vs()}},f=tv(e,m,o),c={addReducers(h){o.containsAll(h)||(o.add(h),f.replaceReducer(o.combinedReducer))},dispatch:f.dispatch,subscribe:f.subscribe,enableAnalytics(){f.dispatch(pr())},disableAnalytics(){f.dispatch(dr())},get state(){return f.getState()},get relay(){return xr(this.state)},get navigatorContext(){return e.navigatorContextProvider?e.navigatorContextProvider():fs()?Ss(a()):vs()},logger:i,store:f};return c}function tv(e,t,r){let{preloadedState:n,configuration:o}=e,i=o.name||"coveo-headless",a=rv(e,t.logger);return kd({preloadedState:n,reducer:r.combinedReducer,middlewares:a,thunkExtraArguments:t,name:i})}function rv(e,t){let{renewAccessToken:r}=e.configuration,n=Fd(t,r);return[Ed,n,Pd(t),hd].concat(ps.middleware,e.middlewares||[])}var Cs=class extends Error{constructor(t){super(t),this.name="InvalidEngineConfiguration"}};p();u();d();l();var Ud=je(jd(),1);function Bd(e){return(0,Ud.pino)({name:"@coveo/headless",level:e?.level||"warn",formatters:{log:e?.logFormatter}})}p();u();d();l();function Qd(e,t){let r=Cv(e),n=Ue,o=bv(e);return{analyticsClientMiddleware:r,validatePayload:n,preprocessRequest:o,logger:t}}function Cv(e){let{analytics:t}=e,r=(n,o)=>o;return t?.analyticsClientMiddleware||r}function bv(e){return e.preprocessRequest||qn}p();u();d();l();p();u();d();l();var $d={organizationId:G,accessToken:G,name:new H({required:!1,emptyAllowed:!1}),analytics:new K({options:{required:!1},values:{enabled:new te({required:!1}),originContext:new H({required:!1}),originLevel2:new H({required:!1}),originLevel3:new H({required:!1}),analyticsMode:new H({constrainTo:["legacy","next"],required:!1,default:"next"}),proxyBaseUrl:new H({required:!1,url:!0}),trackingId:new H({required:!1,emptyAllowed:!1,regex:/^[a-zA-Z0-9_\-.]{1,100}$/})}}),environment:new H({required:!1,default:"prod",constrainTo:["prod","hipaa","stg","dev"]})};function Hd(){return{organizationId:"searchuisamples",accessToken:"xx564559b1-0045-48e1-953c-3addd1ee4457"}}var zd=new Fe({...$d,pipeline:new H({required:!1,emptyAllowed:!0}),searchHub:ve,locale:ve,timezone:ve});function Es(){return{...Hd(),searchHub:"default"}}var Av={debug:so,pipeline:gr,searchHub:Ir,recommendation:Er};function Wd(e){let t=Bd(e.loggerOptions);wv(e.configuration,t);let r=xv(e.configuration,t),n={...Qd(e.configuration,t),apiClient:r},o={...e,reducers:Av},i=Od(o,n),{pipeline:a,searchHub:m,timezone:f,locale:c,proxyBaseUrl:h}=e.configuration;return i.dispatch(Je({timezone:f,locale:c,proxyBaseUrl:h})),X(a)||i.dispatch(fr(a)),X(m)||i.dispatch(Pr(m)),{...i,get state(){return i.state}}}function wv(e,t){try{zd.validate(e)}catch(r){throw t.error(r,"Recommendation engine configuration error"),r}}function xv(e,t){return new jn({logger:t,preprocessRequest:e.preprocessRequest||qn,postprocessSearchResponseMiddleware:e.preprocessSearchResponseMiddleware||uc,postprocessFacetSearchResponseMiddleware:lc,postprocessQuerySuggestResponseMiddleware:dc})}p();u();d();l();function Rv(e){return e.addReducers({configuration:ze}),{disableAnalytics:dr,enableAnalytics:pr,setOriginLevel2:ro,setOriginLevel3:no,updateAnalyticsConfiguration:lr,updateBasicConfiguration:St}}p();u();d();l();function Ev(e){return e.addReducers({configuration:ze,pipeline:gr,searchHub:Ir}),{updateSearchConfiguration:Je}}p();u();d();l();p();u();d();l();p();u();d();l();var Pt=()=>new H({required:!1,emptyAllowed:!0}),Wo=D("advancedSearchQueries/update",e=>B(e,{aq:Pt(),cq:Pt(),lq:Pt(),dq:Pt()})),Go=D("advancedSearchQueries/register",e=>B(e,{aq:Pt(),cq:Pt(),lq:Pt(),dq:Pt()}));p();u();d();l();var It=()=>({cq:"",cqWasSet:!1,aq:"",aqWasSet:!1,lq:"",lqWasSet:!1,dq:"",dqWasSet:!1,defaultFilters:{cq:"",aq:"",lq:"",dq:""}});var Gd=ge(It(),e=>{e.addCase(Wo,(t,r)=>{let{aq:n,cq:o,lq:i,dq:a}=r.payload;Ce(n)||(t.aq=n,t.aqWasSet=!0),Ce(o)||(t.cq=o,t.cqWasSet=!0),Ce(i)||(t.lq=i,t.lqWasSet=!0),Ce(a)||(t.dq=a,t.dqWasSet=!0)}).addCase(Go,(t,r)=>{let{aq:n,cq:o,lq:i,dq:a}=r.payload;Ce(n)||(t.defaultFilters.aq=n,t.aqWasSet||(t.aq=n)),Ce(o)||(t.defaultFilters.cq=o,t.cqWasSet||(t.cq=o)),Ce(i)||(t.defaultFilters.lq=i,t.lqWasSet||(t.lq=i)),Ce(a)||(t.defaultFilters.dq=a,t.dqWasSet||(t.dq=a))}).addCase(Me.fulfilled,(t,r)=>r.payload?.advancedSearchQueries??t).addCase(vt,(t,r)=>{let{aq:n,cq:o}=r.payload;Ce(n)||(t.aq=n,t.aqWasSet=!0),Ce(o)||(t.cq=o,t.cqWasSet=!0)})});function Pv(e){return e.addReducers({advancedSearchQueries:Gd}),{updateAdvancedSearchQueries:Wo,registerAdvancedSearchQueries:Go}}p();u();d();l();p();u();d();l();p();u();d();l();var Iv=new ie({each:G,required:!0}),Kd=(e,t)=>(B(e,G),Mn(t)?B(t,G):B(t,Iv),{payload:{contextKey:e,contextValue:t}}),Gt=D("context/set",e=>{for(let[t,r]of Object.entries(e))Kd(t,r);return{payload:e}}),Kt=D("context/add",e=>Kd(e.contextKey,e.contextValue)),Yt=D("context/remove",e=>B(e,G));p();u();d();l();function Ko(){return{contextValues:{}}}var Yo=ge(Ko(),e=>{e.addCase(Gt,(t,r)=>{t.contextValues=r.payload}).addCase(Kt,(t,r)=>{t.contextValues[r.payload.contextKey]=r.payload.contextValue}).addCase(Yt,(t,r)=>{delete t.contextValues[r.payload]}).addCase(Me.fulfilled,(t,r)=>{r.payload&&(t.contextValues=r.payload.context.contextValues)})});function Tv(e){return e.addReducers({context:Yo}),{addContext:Kt,removeContext:Yt,setContext:Gt}}p();u();d();l();p();u();d();l();p();u();d();l();var qr=D("dictionaryFieldContext/set",e=>{let t=new K({options:{required:!0}}),r=B(e,t).error;if(r)return{payload:e,error:r};let n=Object.values(e),o=new ie({each:we}),i=B(n,o).error;return i?{payload:e,error:i}:{payload:e}}),Nr=D("dictionaryFieldContext/add",e=>{let t=new K({options:{required:!0},values:{field:we,key:we}});return B(e,t)}),_r=D("dictionaryFieldContext/remove",e=>B(e,we));p();u();d();l();function Jo(){return{contextValues:{}}}var Xo=ge(Jo(),e=>{e.addCase(qr,(t,r)=>{t.contextValues=r.payload}).addCase(Nr,(t,r)=>{let{field:n,key:o}=r.payload;t.contextValues[n]=o}).addCase(_r,(t,r)=>{delete t.contextValues[r.payload]}).addCase(Me.fulfilled,(t,r)=>{r.payload&&(t.contextValues=r.payload.dictionaryFieldContext.contextValues)})});function Fv(e){return e.addReducers({dictionaryFieldContext:Xo}),{addContext:Nr,removeContext:_r,setContext:qr}}p();u();d();l();p();u();d();l();p();u();d();l();p();u();d();l();var Tt=/*#__PURE__*/function(){var _ref29=_asyncToGenerator(function*(e,t){return{accessToken:e.configuration.accessToken,organizationId:e.configuration.organizationId,url:e.configuration.search.apiBaseUrl??ht(e.configuration.organizationId,e.configuration.environment),locale:e.configuration.search.locale,debug:e.debug,tab:e.configuration.analytics.originLevel2,referrer:e.configuration.analytics.originLevel3,timezone:e.configuration.search.timezone,...(e.configuration.analytics.enabled&&{actionsHistory:et.getHistory()}),...(e.advancedSearchQueries?.aq&&{aq:e.advancedSearchQueries.aq}),...(e.advancedSearchQueries?.cq&&{cq:e.advancedSearchQueries.cq}),...(e.advancedSearchQueries?.lq&&{lq:e.advancedSearchQueries.lq}),...(e.advancedSearchQueries?.dq&&{dq:e.advancedSearchQueries.dq}),...(e.context&&{context:e.context.contextValues}),...(e.fields&&!e.fields.fetchAllFields&&{fieldsToInclude:e.fields.fieldsToInclude}),...(e.dictionaryFieldContext&&{dictionaryFieldContext:e.dictionaryFieldContext.contextValues}),...(e.pipeline&&{pipeline:e.pipeline}),...(e.query&&{q:e.query.q,enableQuerySyntax:e.query.enableQuerySyntax}),...(e.searchHub&&{searchHub:e.searchHub}),...(e.sortCriteria&&{sortCriteria:e.sortCriteria}),...(e.configuration.analytics.enabled&&(yield Io(e.configuration.analytics,t))),...(e.excerptLength&&!X(e.excerptLength.length)&&{excerptLength:e.excerptLength.length}),...(e.configuration.search.authenticationProviders.length&&{authentication:e.configuration.search.authenticationProviders.join(",")})}});return function Tt(_x61,_x62){return _ref29.apply(this,arguments)}}();p();u();d();l();p();u();d();l();var Yd=(e,t,r)=>({analytics:{clientId:t.clientId,clientTimestamp:new Date().toISOString(),documentReferrer:t.referrer,documentLocation:t.location,originContext:e.originContext,...(r&&{actionCause:r.actionCause}),...(r&&{customData:r.customData}),...(e.userDisplayName&&{userDisplayName:e.userDisplayName}),...(e.deviceId&&{deviceId:e.deviceId}),...(e.trackingId&&{trackingId:e.trackingId}),capture:t.capture??t.clientId!=="",source:br(e)}});var Vr=(e,t,r)=>({accessToken:e.configuration.accessToken,organizationId:e.configuration.organizationId,url:e.configuration.search.apiBaseUrl??ht(e.configuration.organizationId,e.configuration.environment),locale:e.configuration.search.locale,debug:e.debug,tab:e.configuration.analytics.originLevel2,referrer:t.referrer,timezone:e.configuration.search.timezone,...(e.advancedSearchQueries?.aq&&{aq:e.advancedSearchQueries.aq}),...(e.advancedSearchQueries?.cq&&{cq:e.advancedSearchQueries.cq}),...(e.advancedSearchQueries?.lq&&{lq:e.advancedSearchQueries.lq}),...(e.advancedSearchQueries?.dq&&{dq:e.advancedSearchQueries.dq}),...(e.context&&{context:e.context.contextValues}),...(e.fields&&!e.fields.fetchAllFields&&{fieldsToInclude:e.fields.fieldsToInclude}),...(e.dictionaryFieldContext&&{dictionaryFieldContext:e.dictionaryFieldContext.contextValues}),...(e.pipeline&&{pipeline:e.pipeline}),...(e.query&&{q:e.query.q,enableQuerySyntax:e.query.enableQuerySyntax}),...(e.searchHub&&{searchHub:e.searchHub}),...(e.sortCriteria&&{sortCriteria:e.sortCriteria}),...(e.configuration.analytics.enabled&&Yd(e.configuration.analytics,t,r)),...(e.excerptLength&&!X(e.excerptLength.length)&&{excerptLength:e.excerptLength.length}),...(e.configuration.search.authenticationProviders.length&&{authentication:e.configuration.search.authenticationProviders.join(",")})});var kv={collectionField:new H({emptyAllowed:!1,required:!1}),parentField:new H({emptyAllowed:!1,required:!1}),childField:new H({emptyAllowed:!1,required:!1}),numberOfFoldedResults:new J({min:0,required:!1})},Jd=D("folding/register",e=>B(e,kv)),SB=ue("folding/loadCollection",/*#__PURE__*/function(){var _ref30=_asyncToGenerator(function*(e,{getState:t,rejectWithValue:r,extra:{apiClient:n,navigatorContext:o}}){let i=t(),a=i.configuration.analytics.analyticsMode==="legacy"?yield Tt(i):Vr(i,o),m=yield n.search({...a,q:Ov(i),enableQuerySyntax:!0,cq:`@${i.folding.fields.collection}="${e}"`,filterField:i.folding.fields.collection,childField:i.folding.fields.parent,parentField:i.folding.fields.child,filterFieldRange:100},{origin:"foldingCollection"});return ke(m)?r(m.error):{collectionId:e,results:m.success.results,searchUid:m.success.searchUid,rootResult:i.folding.collections[e].result}});return function(_x63,_x64){return _ref30.apply(this,arguments)}}());function Ov(e){return e.query.q===""?"":e.query.enableQuerySyntax?`${e.query.q} OR @uri`:`( <@- ${e.query.q} -@> ) OR @uri`}p();u();d();l();var Xd=()=>({enabled:!1,fields:{collection:"foldingcollection",parent:"foldingparent",child:"foldingchild"},filterFieldRange:2,collections:{}});p();u();d();l();var Lr=D("fields/registerFieldsToInclude",e=>B(e,to)),Zo=D("fields/fetchall/enable"),ei=D("fields/fetchall/disable"),ti=ue("fields/fetchDescription",/*#__PURE__*/function(){var _ref31=_asyncToGenerator(function*(e,{extra:t,getState:r,rejectWithValue:n}){let o=r(),{accessToken:i,environment:a,organizationId:m}=o.configuration,{apiBaseUrl:f}=o.configuration.search,c=yield t.apiClient.fieldDescriptions({accessToken:i,organizationId:m,url:f??ht(m,a)});return ke(c)?n(c.error):c.success.fields});return function(_x65,_x66){return _ref31.apply(this,arguments)}}());p();u();d();l();var ri=["author","language","urihash","objecttype","collection","source","permanentid"],Ps=[...ri,"date","filetype","parents"],Zd=[...Ps,"ec_price","ec_name","ec_description","ec_brand","ec_category","ec_item_group_id","ec_shortdesc","ec_thumbnails","ec_images","ec_promo_price","ec_in_stock","ec_rating"],ep=()=>({fieldsToInclude:ri,fetchAllFields:!1,fieldsDescription:[]});var ni=ge(ep(),e=>e.addCase(Lr,(t,r)=>{t.fieldsToInclude=[...new Set(t.fieldsToInclude.concat(r.payload))]}).addCase(Zo,t=>{t.fetchAllFields=!0}).addCase(ei,t=>{t.fetchAllFields=!1}).addCase(ti.fulfilled,(t,{payload:r})=>{t.fieldsDescription=r}).addCase(Jd,(t,{payload:r})=>{let n=Xd().fields;t.fieldsToInclude.push(r.collectionField??n.collection,r.parentField??n.parent,r.childField??n.child)}));function Dv(e){return e.addReducers({fields:ni}),{registerFieldsToInclude:Lr,enableFetchAllFields:Zo,disableFetchAllFields:ei,fetchFieldsDescription:ti}}p();u();d();l();function Mv(e){return e.addReducers({pipeline:gr}),{setPipeline:fr}}p();u();d();l();function qv(e){return e.addReducers({searchHub:Ir}),{setSearchHub:Pr}}p();u();d();l();function Nv(e){return e.addReducers({debug:so}),{disableDebug:io,enableDebug:oo}}p();u();d();l();function _v(e){return e.addReducers({recommendation:Er}),{getRecommendations:At,setRecommendationId:Rr}}p();u();d();l();function Vv(e){return e.addReducers({}),{logRecommendationOpen:ko}}p();u();d();l();p();u();d();l();p();u();d();l();var jr=D("breadcrumb/deselectAll"),oi=D("breadcrumb/deselectAllNonBreadcrumbs");p();u();d();l();p();u();d();l();var Pn={value:G,numberOfResults:new J({min:0}),state:G};p();u();d();l();var le=G;var Bv=new J({min:1,default:8,required:!1}),Qv=new J({min:1,max:20,default:5,required:!1}),$v={desiredCount:Qv,numberOfValues:Bv},g1=D("automaticFacet/setOptions",e=>B(e,$v)),h1=D("automaticFacet/deselectAll",e=>B(e,le)),Hv=G,tp=D("automaticFacet/toggleSelectValue",e=>B(e,{field:Hv,selection:new K({values:Pn})}));p();u();d();l();p();u();d();l();var zv={state:new de({required:!0}),numberOfResults:new J({required:!0,min:0}),value:new H({required:!0,emptyAllowed:!0}),path:new ie({required:!0,each:G}),moreValuesAvailable:new te({required:!1})};function Is(e){e.children.forEach(t=>{Is(t)}),Ue({state:e.state,numberOfResults:e.numberOfResults,value:e.value,path:e.path,moreValuesAvailable:e.moreValuesAvailable},zv)}var Ur={facetId:le,field:G,tabs:new K({options:{required:!1},values:{included:new ie({each:new H}),excluded:new ie({each:new H})}}),activeTab:new H({required:!1}),delimitingCharacter:new H({required:!1,emptyAllowed:!0}),filterFacetCount:new te({required:!1}),injectionDepth:new J({required:!1,min:0}),numberOfValues:new J({required:!1,min:1}),sortCriteria:new de({required:!1}),basePath:new ie({required:!1,each:G}),filterByBasePath:new te({required:!1})};var M1=D("categoryFacet/register",e=>B(e,Ur)),rp=D("categoryFacet/toggleSelectValue",e=>{try{return Ue(e.facetId,G),Is(e.selection),{payload:e,error:null}}catch(t){return{payload:e,error:st(t)}}}),np=D("categoryFacet/deselectAll",e=>B(e,Ur.facetId)),q1=D("categoryFacet/updateNumberOfValues",e=>B(e,{facetId:Ur.facetId,numberOfValues:Ur.numberOfValues})),N1=D("categoryFacet/updateSortCriterion",e=>B(e,{facetId:Ur.facetId,criterion:new de})),_1=D("categoryFacet/updateBasePath",e=>B(e,{facetId:Ur.facetId,basePath:new ie({each:G})}));p();u();d();l();p();u();d();l();var In={facetId:le,captions:new K({options:{required:!1}}),numberOfValues:new J({required:!1,min:1}),query:new H({required:!1,emptyAllowed:!0})};var Wv={path:new ie({required:!0,each:G}),displayValue:we,rawValue:we,count:new J({required:!0,min:0})},op=D("categoryFacet/selectSearchResult",e=>B(e,{facetId:le,value:new K({values:Wv})})),t$=D("categoryFacetSearch/register",e=>B(e,In));p();u();d();l();var ip={facetId:le,value:new K({values:{displayValue:we,rawValue:we,count:new J({required:!0,min:0})}})},p$=D("facetSearch/register",e=>B(e,In)),f$=D("facetSearch/update",e=>B(e,In)),ap=D("facetSearch/toggleSelectValue",e=>B(e,ip)),sp=D("facetSearch/toggleExcludeValue",e=>B(e,ip));p();u();d();l();p();u();d();l();function up(e){let t=cp(e.start,e),r=cp(e.end,e),n=e.endInclusive??!1,o=e.state??"idle";return{start:t,end:r,endInclusive:n,state:o}}function cp(e,t){let{dateFormat:r}=t;return kl(e)?(Ya(e),Il(e)):typeof e=="string"&&wt(e)?(Ya(e),e):(xl(e,r),qo(kr(e,r)))}p();u();d();l();p();u();d();l();var F$=new H({regex:/^[a-zA-Z0-9-_]+$/}),k$=new H({required:!0}),O$=new ie({each:new H}),D$=new H,M$=new te,q$=new te,N$=new J({min:0}),Gv=new J({min:1}),_$=new te({required:!0}),Kv=new K,Yv=new H,Jv={captions:Kv,numberOfValues:Gv,query:Yv},V$=new K({values:Jv}),lp=new K({options:{required:!1},values:{type:new H({constrainTo:["simple"],emptyAllowed:!1,required:!0}),values:new ie({required:!0,max:25,each:new H({emptyAllowed:!1,required:!0})})}}),L$=new te,dp=new ie({min:1,max:25,required:!1,each:new H({emptyAllowed:!1,required:!0})});var Xv={facetId:le,field:new H({required:!0,emptyAllowed:!0}),tabs:new K({options:{required:!1},values:{included:new ie({each:new H}),excluded:new ie({each:new H})}}),activeTab:new H({required:!1}),filterFacetCount:new te({required:!1}),injectionDepth:new J({required:!1,min:0}),numberOfValues:new J({required:!1,min:1}),sortCriteria:new de({required:!1}),resultsMustMatch:new de({required:!1}),allowedValues:lp,customSort:dp},J$=D("facet/register",e=>B(e,Xv)),pp=D("facet/toggleSelectValue",e=>B(e,{facetId:le,selection:new K({values:Pn})})),fp=D("facet/toggleExcludeValue",e=>B(e,{facetId:le,selection:new K({values:Pn})})),ii=D("facet/deselectAll",e=>B(e,le)),X$=D("facet/updateSortCriterion",e=>B(e,{facetId:le,criterion:new de({required:!0})})),Z$=D("facet/updateNumberOfValues",e=>B(e,{facetId:le,numberOfValues:new J({required:!0,min:1})})),eH=D("facet/updateIsFieldExpanded",e=>B(e,{facetId:le,isFieldExpanded:new te({required:!0})})),tH=D("facet/updateFreezeCurrentValues",e=>B(e,{facetId:le,freezeCurrentValues:new te({required:!0})}));p();u();d();l();var mp=D("rangeFacet/updateSortCriterion",e=>B(e,{facetId:le,criterion:new de({required:!0})}));p();u();d();l();var ai={state:G,start:new J({required:!0}),end:new J({required:!0}),endInclusive:new te({required:!0}),numberOfResults:new J({required:!0,min:0})},si={start:G,end:G,endInclusive:new te({required:!0}),state:G,numberOfResults:new J({required:!0,min:0})};var Zv={start:G,end:G,endInclusive:new te({required:!0}),state:G},eC={facetId:le,field:G,tabs:new K({options:{required:!1},values:{included:new ie({each:new H}),excluded:new ie({each:new H})}}),activeTab:new H({required:!1}),currentValues:new ie({required:!1,each:new K({values:Zv})}),generateAutomaticRanges:new te({required:!0}),filterFacetCount:new te({required:!1}),injectionDepth:new J({required:!1,min:0}),numberOfValues:new J({required:!1,min:1}),sortCriteria:new de({required:!1}),rangeAlgorithm:new de({required:!1})};function gp(e){return wt(e)?An(e):e}function hp(e){e.currentValues&&e.currentValues.forEach(t=>{let{start:r,end:n}=up(t);if(kr(gp(r)).isAfter(kr(gp(n))))throw new Error(`The start value is greater than the end value for the date range ${t.start} to ${t.end}`)})}var MH=D("dateFacet/register",e=>{try{return Ue(e,eC),hp(e),{payload:e,error:null}}catch(t){return{payload:e,error:st(t)}}}),yp=D("dateFacet/toggleSelectValue",e=>B(e,{facetId:le,selection:new K({values:si})})),Sp=D("dateFacet/toggleExcludeValue",e=>B(e,{facetId:le,selection:new K({values:si})})),vp=D("dateFacet/updateFacetValues",e=>{try{return Ue(e,{facetId:le,values:new ie({each:new K({values:si})})}),hp({currentValues:e.values}),{payload:e,error:null}}catch(t){return{payload:e,error:st(t)}}});p();u();d();l();var tC={state:G,start:new J({required:!0}),end:new J({required:!0}),endInclusive:new te({required:!0})},rC={facetId:le,field:G,tabs:new K({options:{required:!1},values:{included:new ie({each:new H}),excluded:new ie({each:new H})}}),activeTab:new H({required:!1}),currentValues:new ie({required:!1,each:new K({values:tC})}),generateAutomaticRanges:new te({required:!0}),filterFacetCount:new te({required:!1}),injectionDepth:new J({required:!1,min:0}),numberOfValues:new J({required:!1,min:1}),sortCriteria:new de({required:!1}),rangeAlgorithm:new de({required:!1})};function Cp(e){e.currentValues&&e.currentValues.forEach(({start:t,end:r})=>{if(t>r)throw new Error(`The start value is greater than the end value for the numeric range ${t} to ${r}`)})}var WH=D("numericFacet/register",e=>{try{return B(e,rC),Cp(e),{payload:e,error:null}}catch(t){return{payload:e,error:st(t)}}}),bp=D("numericFacet/toggleSelectValue",e=>B(e,{facetId:le,selection:new K({values:ai})})),Ap=D("numericFacet/toggleExcludeValue",e=>B(e,{facetId:le,selection:new K({values:ai})})),wp=D("numericFacet/updateFacetValues",e=>{try{return Ue(e,{facetId:le,values:new ie({each:new K({values:ai})})}),Cp({currentValues:e.values}),{payload:e,error:null}}catch(t){return{payload:e,error:st(t)}}});p();u();d();l();p();u();d();l();var ci=D("facet/updateFacetAutoSelection",e=>B(e,{allow:new te({required:!0})}));p();u();d();l();p();u();d();l();var ui=class extends bt{constructor(r){super(r);this.getState=r}get activeInstantResultQuery(){let r=this.getState().instantResults;for(let n in r)for(let o in r[n].cache)if(r[n].cache[o].isActive)return r[n].q;return null}get activeInstantResultCache(){let r=this.getState().instantResults;for(let n in r)for(let o in r[n].cache)if(r[n].cache[o].isActive)return r[n].cache[o];return null}get results(){return this.activeInstantResultCache?.results}get queryText(){return this.activeInstantResultQuery??Ve().q}get responseTime(){return this.activeInstantResultCache?.duration??We().duration}get numberOfResults(){return this.activeInstantResultCache?.totalCountFiltered??We().response.totalCountFiltered}getSearchUID(){return this.activeInstantResultCache?.searchUid||super.getSearchUID()}};var xp=()=>qe("analytics/instantResult/searchboxAsYouType",e=>e.makeSearchboxAsYouType(),e=>new ui(e)),Rp=()=>({actionCause:"searchboxAsYouType"});p();u();d();l();var Ts={id:G},nC={...Ts,q:we},Fz=D("instantResults/register",e=>B(e,Ts)),li=D("instantResults/updateQuery",e=>B(e,nC)),kz=D("instantResults/clearExpired",e=>B(e,Ts));p();u();d();l();var di=new J({required:!0,min:0}),pi=D("pagination/registerNumberOfResults",e=>B(e,di)),fi=D("pagination/updateNumberOfResults",e=>B(e,di)),mi=D("pagination/registerPage",e=>B(e,di)),Ft=D("pagination/updatePage",e=>B(e,di)),gi=D("pagination/nextPage"),hi=D("pagination/previousPage");p();u();d();l();var kt=D("query/updateQuery",e=>B(e,{q:new H,enableQuerySyntax:new te}));p();u();d();l();p();u();d();l();var Fs=()=>qe("search/logFetchMoreResults",e=>e.makeFetchMoreResults()),Ot=e=>qe("search/queryError",(t,r)=>t.makeQueryError({query:r.query?.q||Ve().q,aq:r.advancedSearchQueries?.aq||It().aq,cq:r.advancedSearchQueries?.cq||It().cq,dq:r.advancedSearchQueries?.dq||It().dq,errorType:e.type,errorMessage:e.message}));p();u();d();l();p();u();d();l();var dW=D("didYouMean/enable"),pW=D("didYouMean/disable"),fW=D("didYouMean/automaticCorrections/disable"),mW=D("didYouMean/automaticCorrections/enable"),yi=D("didYouMean/correction",e=>B(e,G)),gW=D("didYouMean/automaticCorrections/mode",e=>B(e,new H({constrainTo:["next","legacy"],emptyAllowed:!1,required:!0})));p();u();d();l();var ks=()=>qe("analytics/didyoumean/automatic",e=>e.makeDidYouMeanAutomatic());var Ep=()=>({actionCause:"didYouMeanAutomatic"});p();u();d();l();p();u();d();l();function Pp(){return{freezeFacetOrder:!1,facets:{}}}p();u();d();l();function Ip(){return[]}p();u();d();l();function Tn(){return{firstResult:0,defaultNumberOfResults:10,numberOfResults:10,totalCountFiltered:0}}p();u();d();l();function Tp(){return{}}p();u();d();l();function Fp(){return{}}p();u();d();l();function kp(){return{}}function rt(e){return{context:e.context||Ko(),dictionaryFieldContext:e.dictionaryFieldContext||Jo(),facetSet:e.facetSet||Eo(),numericFacetSet:e.numericFacetSet||Ro(),dateFacetSet:e.dateFacetSet||xo(),categoryFacetSet:e.categoryFacetSet||wo(),automaticFacetSet:e.automaticFacetSet??Ao(),pagination:e.pagination||Tn(),query:e.query||Ve(),tabSet:e.tabSet||kp(),advancedSearchQueries:e.advancedSearchQueries||It(),staticFilterSet:e.staticFilterSet||Fp(),querySet:e.querySet||Tp(),sortCriteria:e.sortCriteria||Po(),pipeline:e.pipeline||mr(),searchHub:e.searchHub||Ar(),facetOptions:e.facetOptions||Pp(),facetOrder:e.facetOrder??Ip(),debug:e.debug??ao()}}p();u();d();l();var D2=new K({values:{undoneQuery:we},options:{required:!0}}),Op=()=>qe("analytics/trigger/query",(e,t)=>t.triggers?.queryModification.newQuery?e.makeTriggerQuery():null);p();u();d();l();var Si=D("trigger/query/ignore",e=>B(e,new H({emptyAllowed:!0,required:!0}))),vi=D("trigger/query/modification",e=>B(e,new K({values:{originalQuery:ve,modification:ve}})));p();u();d();l();var Dt=/*#__PURE__*/function(){var _ref32=_asyncToGenerator(function*(e,t){let r=aC(e),n=_o(e),o=oC(e),i=yield Tt(e,t),a=()=>e.pagination?e.pagination.firstResult+e.pagination.numberOfResults>5e3?5e3-e.pagination.firstResult:e.pagination.numberOfResults:void 0;return xt({...i,...(e.didYouMean&&{queryCorrection:{enabled:e.didYouMean.enableDidYouMean&&e.didYouMean.queryCorrectionMode==="next",options:{automaticallyCorrect:e.didYouMean.automaticallyCorrectQuery?"whenNoResults":"never"}},enableDidYouMean:e.didYouMean.enableDidYouMean&&e.didYouMean.queryCorrectionMode==="legacy"}),...(r&&{cq:r}),...(n.length&&{facets:n}),...(e.pagination&&{numberOfResults:a(),firstResult:e.pagination.firstResult}),...(e.facetOptions&&{facetOptions:{freezeFacetOrder:e.facetOptions.freezeFacetOrder}}),...(e.folding?.enabled&&{filterField:e.folding.fields.collection,childField:e.folding.fields.parent,parentField:e.folding.fields.child,filterFieldRange:e.folding.filterFieldRange}),...(e.automaticFacetSet&&{generateAutomaticFacets:{desiredCount:e.automaticFacetSet.desiredCount,numberOfValues:e.automaticFacetSet.numberOfValues,currentFacets:o}}),...(e.generatedAnswer&&{pipelineRuleParameters:{mlGenerativeQuestionAnswering:{responseFormat:e.generatedAnswer.responseFormat,citationsFieldToInclude:e.generatedAnswer.fieldsToIncludeInCitations}}})})});return function Dt(_x67,_x68){return _ref32.apply(this,arguments)}}();function oC(e){let t=e.automaticFacetSet?.set;return t?Object.values(t).map(r=>r.response).map(iC).filter(r=>r.currentValues.length>0):void 0}function iC(e){let{field:t,label:r,values:n}=e,o=n.filter(i=>i.state==="selected");return{field:t,label:r,currentValues:o}}function aC(e){let t=e.advancedSearchQueries?.cq.trim()||"",n=Object.values(e.tabSet||{}).find(i=>i.isActive)?.expression.trim()||"",o=sC(e);return[t,n,...o].filter(i=>!!i).join(" AND ")}function sC(e){return Object.values(e.staticFilterSet||{}).map(r=>{let n=r.values.filter(i=>i.state==="selected"&&!!i.expression.trim()),o=n.map(i=>i.expression).join(" OR ");return n.length>1?`(${o})`:o})}var Mt=class{constructor(t,r=n=>{this.dispatch(kt({q:n}))}){this.config=t;this.onUpdateQueryForCorrection=r}fetchFromAPI({mappings:t,request:r},n){var _this9=this;return _asyncToGenerator(function*(){let o=new Date().getTime(),i=No(yield _this9.extra.apiClient.search(r,n),t),a=new Date().getTime()-o,m=_this9.getState().query?.q||"";return{response:i,duration:a,queryExecuted:m,requestExecuted:r}})()}process(t){var _this10=this;return _asyncToGenerator(function*(){return _this10.processQueryErrorOrContinue(t)??(yield _this10.processQueryCorrectionsOrContinue(t))??(yield _this10.processQueryTriggersOrContinue(t))??_this10.processSuccessResponse(t)})()}processQueryErrorOrContinue(t){return ke(t.response)?(this.dispatch(Ot(t.response.error)),this.rejectWithValue(t.response.error)):null}processQueryCorrectionsOrContinue(t){var _this11=this;return _asyncToGenerator(function*(){let r=_this11.getState(),n=_this11.getSuccessResponse(t);if(!n||!r.didYouMean)return null;let{enableDidYouMean:o,automaticallyCorrectQuery:i}=r.didYouMean,{results:a,queryCorrections:m,queryCorrection:f}=n;if(!o||!i)return null;let c=a.length===0&&m&&m.length!==0,h=!X(f)&&!X(f.correctedQuery);if(!c&&!h)return null;let S=c?yield _this11.processLegacyDidYouMeanAutoCorrection(t):_this11.processModernDidYouMeanAutoCorrection(t);return _this11.dispatch(Xe(rt(_this11.getState()))),S})()}processLegacyDidYouMeanAutoCorrection(t){var _this12=this;return _asyncToGenerator(function*(){let r=_this12.getCurrentQuery(),n=_this12.getSuccessResponse(t);if(!n.queryCorrections)return null;let{correctedQuery:o}=n.queryCorrections[0],i=yield _this12.automaticallyRetryQueryWithCorrection(o);return ke(i.response)?(_this12.dispatch(Ot(i.response.error)),_this12.rejectWithValue(i.response.error)):(_this12.logOriginalAnalyticsQueryBeforeAutoCorrection(t),_this12.dispatch(Xe(rt(_this12.getState()))),{...i,response:{...i.response.success,queryCorrections:n.queryCorrections},automaticallyCorrected:!0,originalQuery:r,analyticsAction:ks()})})()}processModernDidYouMeanAutoCorrection(t){let r=this.getSuccessResponse(t),{correctedQuery:n,originalQuery:o}=r.queryCorrection;return this.onUpdateQueryForCorrection(n),{...t,response:{...r},queryExecuted:n,automaticallyCorrected:!0,originalQuery:o,analyticsAction:ks()}}logOriginalAnalyticsQueryBeforeAutoCorrection(t){let r=this.getState(),n=this.getSuccessResponse(t);this.analyticsAction&&this.analyticsAction()(this.dispatch,()=>this.getStateAfterResponse(t.queryExecuted,t.duration,r,n),this.extra)}processQueryTriggersOrContinue(t){var _this13=this;return _asyncToGenerator(function*(){let r=_this13.getSuccessResponse(t);if(!r)return null;let n=r.triggers.find(m=>m.type==="query")?.content||"";if(!n)return null;if(_this13.getState().triggers?.queryModification.queryToIgnore===n)return _this13.dispatch(Si("")),null;_this13.analyticsAction&&(yield _this13.dispatch(_this13.analyticsAction));let i=_this13.getCurrentQuery(),a=yield _this13.automaticallyRetryQueryWithTriggerModification(n);return ke(a.response)?(_this13.dispatch(Ot(a.response.error)),_this13.rejectWithValue(a.response.error)):(_this13.dispatch(Xe(rt(_this13.getState()))),{...a,response:{...a.response.success},automaticallyCorrected:!1,originalQuery:i,analyticsAction:Op()})})()}getStateAfterResponse(t,r,n,o){return{...n,query:{q:t,enableQuerySyntax:n.query?.enableQuerySyntax??Ve().enableQuerySyntax},search:{...We(),duration:r,response:o,results:o.results}}}processSuccessResponse(t){return this.dispatch(Xe(rt(this.getState()))),{...t,response:this.getSuccessResponse(t),automaticallyCorrected:!1,originalQuery:this.getCurrentQuery(),analyticsAction:this.analyticsAction}}getSuccessResponse(t){return Un(t.response)?t.response.success:null}automaticallyRetryQueryWithCorrection(t){var _this14=this;return _asyncToGenerator(function*(){_this14.onUpdateQueryForCorrection(t);let r=yield _this14.fetchFromAPI(yield Dt(_this14.getState()),{origin:"mainSearch"});return _this14.dispatch(yi(t)),r})()}automaticallyRetryQueryWithTriggerModification(t){var _this15=this;return _asyncToGenerator(function*(){return _this15.dispatch(vi({newQuery:t,originalQuery:_this15.getCurrentQuery()})),_this15.onUpdateQueryForCorrection(t),yield _this15.fetchFromAPI(yield Dt(_this15.getState()),{origin:"mainSearch"})})()}getCurrentQuery(){let t=this.getState();return t.query?.q!==void 0?t.query.q:""}get extra(){return this.config.extra}getState(){return this.config.getState()}get dispatch(){return this.config.dispatch}get analyticsAction(){return this.config.analyticsAction}get rejectWithValue(){return this.config.rejectWithValue}};var HG=ue("search/prepareForSearchWithQuery",(e,t)=>{let{dispatch:r}=t;B(e,{q:new H,enableQuerySyntax:new te,clearFilters:new te}),e.clearFilters&&(r(jr()),r(oi())),r(ci({allow:!0})),r(kt({q:e.q,enableQuerySyntax:e.enableQuerySyntax})),r(Ft(1))}),zG=ue("search/executeSearch",/*#__PURE__*/function(){var _ref33=_asyncToGenerator(function*(e,t){let r=t.getState();return yield Ci(r,t,e)});return function(_x69,_x70){return _ref33.apply(this,arguments)}}()),WG=ue("search/fetchPage",/*#__PURE__*/function(){var _ref34=_asyncToGenerator(function*(e,t){let r=t.getState();return yield Ds(r,t,e)});return function(_x71,_x72){return _ref34.apply(this,arguments)}}()),GG=ue("search/fetchMoreResults",/*#__PURE__*/function(){var _ref35=_asyncToGenerator(function*(e,t){let r=t.getState();return yield Ms(t,r)});return function(_x73,_x74){return _ref35.apply(this,arguments)}}()),KG=ue("search/fetchFacetValues",/*#__PURE__*/function(){var _ref36=_asyncToGenerator(function*(e,t){let r=t.getState();return yield dC(t,e,r)});return function(_x75,_x76){return _ref36.apply(this,arguments)}}()),YG=ue("search/fetchInstantResults",/*#__PURE__*/function(){var _ref37=_asyncToGenerator(function*(e,t){return Os(e,t)});return function(_x77,_x78){return _ref37.apply(this,arguments)}}()),cC=/*#__PURE__*/function(){var _ref38=_asyncToGenerator(function*(e,t){let r=yield Dt(e,t);return r.request={...r.request,firstResult:(e.pagination?.firstResult??0)+(e.search?.results.length??0)},r});return function cC(_x79,_x80){return _ref38.apply(this,arguments)}}(),uC=/*#__PURE__*/function(){var _ref39=_asyncToGenerator(function*(e,t,r){let n=yield Tt(e);return xt({...n,...(e.didYouMean&&{enableDidYouMean:e.didYouMean.enableDidYouMean}),numberOfResults:r,q:t})});return function uC(_x81,_x82,_x83){return _ref39.apply(this,arguments)}}(),lC=/*#__PURE__*/function(){var _ref40=_asyncToGenerator(function*(e,t){let r=yield Dt(e,t);return r.request.numberOfResults=0,r});return function lC(_x84,_x85){return _ref40.apply(this,arguments)}}(),Dp=e=>{e.configuration.analytics.enabled&&et.addElement({name:"Query",...(e.query?.q&&{value:e.query.q}),time:JSON.stringify(new Date)})};function Os(_x86,_x87){return _Os.apply(this,arguments)}function _Os(){_Os=_asyncToGenerator(function*(e,t){B(e,{id:G,q:G,maxResultsPerQuery:new J({required:!0,min:1}),cacheTimeout:new J});let{q:r,maxResultsPerQuery:n}=e,o=t.getState(),i=new Mt({...t,analyticsAction:xp()},c=>{t.dispatch(li({q:c,id:e.id}))}),a=yield uC(o,r,n),m=yield i.fetchFromAPI(a,{origin:"instantResults",disableAbortWarning:!0}),f=yield i.process(m);return"response"in f?{results:f.response.results,searchUid:f.response.searchUid,analyticsAction:f.analyticsAction,totalCountFiltered:f.response.totalCountFiltered,duration:f.duration}:f});return _Os.apply(this,arguments)}function Ds(_x88,_x89,_x90){return _Ds.apply(this,arguments)}function _Ds(){_Ds=_asyncToGenerator(function*(e,t,r){Dp(e);let{analyticsClientMiddleware:n,preprocessRequest:o,logger:i}=t.extra,{description:a}=yield r.prepare({getState:()=>t.getState(),analyticsClientMiddleware:n,preprocessRequest:o,logger:i}),m=new Mt({...t,analyticsAction:r}),f=yield Dt(e,a),c=yield m.fetchFromAPI(f,{origin:"mainSearch"});return yield m.process(c)});return _Ds.apply(this,arguments)}function Ms(_x91,_x92){return _Ms.apply(this,arguments)}function _Ms(){_Ms=_asyncToGenerator(function*(e,t){let{analyticsClientMiddleware:r,preprocessRequest:n,logger:o}=e.extra,{description:i}=yield Fs().prepare({getState:()=>e.getState(),analyticsClientMiddleware:r,preprocessRequest:n,logger:o}),a=new Mt({...e,analyticsAction:Fs()}),m=yield cC(t,i),f=yield a.fetchFromAPI(m,{origin:"mainSearch"});return yield a.process(f)});return _Ms.apply(this,arguments)}function dC(_x93,_x94,_x95){return _dC.apply(this,arguments)}function _dC(){_dC=_asyncToGenerator(function*(e,t,r){let{analyticsClientMiddleware:n,preprocessRequest:o,logger:i}=e.extra,{description:a}=yield t.prepare({getState:()=>e.getState(),analyticsClientMiddleware:n,preprocessRequest:o,logger:i}),m=new Mt({...e,analyticsAction:t}),f=yield lC(r,a),c=yield m.fetchFromAPI(f,{origin:"facetValues"});return yield m.process(c)});return _dC.apply(this,arguments)}function Ci(_x96,_x97,_x98){return _Ci.apply(this,arguments)}function _Ci(){_Ci=_asyncToGenerator(function*(e,t,r){Dp(e);let{analyticsClientMiddleware:n,preprocessRequest:o,logger:i}=t.extra,{description:a}=yield r.prepare({getState:()=>t.getState(),analyticsClientMiddleware:n,preprocessRequest:o,logger:i}),m=yield Dt(e,a),f=new Mt({...t,analyticsAction:r}),c=yield f.fetchFromAPI(m,{origin:"mainSearch"});return yield f.process(c)});return _Ci.apply(this,arguments)}p();u();d();l();p();u();d();l();var qt=/*#__PURE__*/function(){var _ref41=_asyncToGenerator(function*(e,t,r){let n=SC(e),o=pC(e),i=fC(e),a=e.configuration.analytics.analyticsMode==="legacy"?yield Tt(e,r):Vr(e,t,r),m=()=>e.pagination?e.pagination.firstResult+e.pagination.numberOfResults>5e3?5e3-e.pagination.firstResult:e.pagination.numberOfResults:void 0;return xt({...a,...(e.didYouMean&&{queryCorrection:{enabled:e.didYouMean.enableDidYouMean&&e.didYouMean.queryCorrectionMode==="next",options:{automaticallyCorrect:e.didYouMean.automaticallyCorrectQuery?"whenNoResults":"never"}},enableDidYouMean:e.didYouMean.enableDidYouMean&&e.didYouMean.queryCorrectionMode==="legacy"}),...(n&&{cq:n}),...(o.length&&{facets:o}),...(e.pagination&&{numberOfResults:m(),firstResult:e.pagination.firstResult}),...(e.facetOptions&&{facetOptions:{freezeFacetOrder:e.facetOptions.freezeFacetOrder}}),...(e.folding?.enabled&&{filterField:e.folding.fields.collection,childField:e.folding.fields.parent,parentField:e.folding.fields.child,filterFieldRange:e.folding.filterFieldRange}),...(e.automaticFacetSet&&{generateAutomaticFacets:{desiredCount:e.automaticFacetSet.desiredCount,numberOfValues:e.automaticFacetSet.numberOfValues,currentFacets:i}}),...(e.generatedAnswer&&{pipelineRuleParameters:{mlGenerativeQuestionAnswering:{responseFormat:e.generatedAnswer.responseFormat,citationsFieldToInclude:e.generatedAnswer.fieldsToIncludeInCitations}}})})});return function qt(_x99,_x100,_x101){return _ref41.apply(this,arguments)}}();function pC(e){return es(gC(e),e.facetOrder??[])}function fC(e){let t=e.automaticFacetSet?.set;return t?Object.values(t).map(r=>r.response).map(mC).filter(r=>r.currentValues.length>0):void 0}function mC(e){let{field:t,label:r,values:n}=e,o=n.filter(i=>i.state==="selected");return{field:t,label:r,currentValues:o}}function gC(e){return hC(e).filter(({facetId:t})=>e.facetOptions?.facets[t]?.enabled??!0)}function hC(e){return[...yC(e.facetSet??{}),...Mp(e.numericFacetSet??{}),...Mp(e.dateFacetSet??{}),...Rt(e.categoryFacetSet??{})]}function yC(e){return Rt(e).map(t=>{let r=ts[t.sortCriteria];return r?{...t,sortCriteria:r}:t})}function Mp(e){return Rt(e).map(t=>{let n=t.currentValues.some(({state:o})=>o!=="idle");return t.generateAutomaticRanges&&!n?{...t,currentValues:[]}:t})}function SC(e){let t=e.advancedSearchQueries?.cq.trim()||"",n=Object.values(e.tabSet||{}).find(i=>i.isActive)?.expression.trim()||"",o=vC(e);return[t,n,...o].filter(i=>!!i).join(" AND ")}function vC(e){return Object.values(e.staticFilterSet||{}).map(r=>{let n=r.values.filter(i=>i.state==="selected"&&!!i.expression.trim()),o=n.map(i=>i.expression).join(" OR ");return n.length>1?`(${o})`:o})}var Nt=class{constructor(t,r=n=>{this.dispatch(kt({q:n}))}){this.config=t;this.onUpdateQueryForCorrection=r}fetchFromAPI({mappings:t,request:r},n){var _this16=this;return _asyncToGenerator(function*(){let o=new Date().getTime(),i=No(yield _this16.extra.apiClient.search(r,n),t),a=new Date().getTime()-o,m=_this16.getState().query?.q||"";return{response:i,duration:a,queryExecuted:m,requestExecuted:r}})()}process(t){var _this17=this;return _asyncToGenerator(function*(){return _this17.processQueryErrorOrContinue(t)??(yield _this17.processQueryCorrectionsOrContinue(t))??(yield _this17.processQueryTriggersOrContinue(t))??_this17.processSuccessResponse(t)})()}processQueryErrorOrContinue(t){return ke(t.response)?(this.dispatch(Ot(t.response.error)),this.rejectWithValue(t.response.error)):null}processQueryCorrectionsOrContinue(t){var _this18=this;return _asyncToGenerator(function*(){let r=_this18.getState(),n=_this18.getSuccessResponse(t);if(!n||!r.didYouMean)return null;let{enableDidYouMean:o,automaticallyCorrectQuery:i}=r.didYouMean,{results:a,queryCorrections:m,queryCorrection:f}=n;if(!o||!i)return null;let c=a.length===0&&m&&m.length!==0,h=!X(f)&&!X(f.correctedQuery);if(!c&&!h)return null;let S=c?yield _this18.processLegacyDidYouMeanAutoCorrection(t):_this18.processModernDidYouMeanAutoCorrection(t);return _this18.dispatch(Xe(rt(_this18.getState()))),S})()}processLegacyDidYouMeanAutoCorrection(t){var _this19=this;return _asyncToGenerator(function*(){let r=_this19.getCurrentQuery(),n=_this19.getSuccessResponse(t);if(!n.queryCorrections)return null;let{correctedQuery:o}=n.queryCorrections[0],i=yield _this19.automaticallyRetryQueryWithCorrection(o);return ke(i.response)?(_this19.dispatch(Ot(i.response.error)),_this19.rejectWithValue(i.response.error)):(_this19.dispatch(Xe(rt(_this19.getState()))),{...i,response:{...i.response.success,queryCorrections:n.queryCorrections},automaticallyCorrected:!0,originalQuery:r})})()}processModernDidYouMeanAutoCorrection(t){let r=this.getSuccessResponse(t),{correctedQuery:n,originalQuery:o}=r.queryCorrection;return this.onUpdateQueryForCorrection(n),{...t,response:{...r},queryExecuted:n,automaticallyCorrected:!0,originalQuery:o}}processQueryTriggersOrContinue(t){var _this20=this;return _asyncToGenerator(function*(){let r=_this20.getSuccessResponse(t);if(!r)return null;let n=r.triggers.find(m=>m.type==="query")?.content||"";if(!n)return null;if(_this20.getState().triggers?.queryModification.queryToIgnore===n)return _this20.dispatch(Si("")),null;let i=_this20.getCurrentQuery(),a=yield _this20.automaticallyRetryQueryWithTriggerModification(n);return ke(a.response)?(_this20.dispatch(Ot(a.response.error)),_this20.rejectWithValue(a.response.error)):(_this20.dispatch(Xe(rt(_this20.getState()))),{...a,response:{...a.response.success},automaticallyCorrected:!1,originalQuery:i})})()}processSuccessResponse(t){return this.dispatch(Xe(rt(this.getState()))),{...t,response:this.getSuccessResponse(t),automaticallyCorrected:!1,originalQuery:this.getCurrentQuery()}}getSuccessResponse(t){return Un(t.response)?t.response.success:null}automaticallyRetryQueryWithCorrection(t){var _this21=this;return _asyncToGenerator(function*(){_this21.onUpdateQueryForCorrection(t);let r=_this21.getState(),{actionCause:n}=Ep(),o=yield _this21.fetchFromAPI(yield qt(r,_this21.extra.navigatorContext,{actionCause:n}),{origin:"mainSearch"});return _this21.dispatch(yi(t)),o})()}automaticallyRetryQueryWithTriggerModification(t){var _this22=this;return _asyncToGenerator(function*(){return _this22.dispatch(vi({newQuery:t,originalQuery:_this22.getCurrentQuery()})),_this22.onUpdateQueryForCorrection(t),yield _this22.fetchFromAPI(yield qt(_this22.getState(),_this22.extra.navigatorContext),{origin:"mainSearch"})})()}getCurrentQuery(){let t=this.getState();return t.query?.q!==void 0?t.query.q:""}get extra(){return this.config.extra}getState(){return this.config.getState()}get dispatch(){return this.config.dispatch}get rejectWithValue(){return this.config.rejectWithValue}};var rY=ue("search/prepareForSearchWithQuery",(e,t)=>{let{dispatch:r}=t;B(e,{q:new H,enableQuerySyntax:new te,clearFilters:new te}),e.clearFilters&&(r(jr()),r(oi())),r(ci({allow:!0})),r(kt({q:e.q,enableQuerySyntax:e.enableQuerySyntax})),r(Ft(1))}),qp=ue("search/executeSearch",/*#__PURE__*/function(){var _ref42=_asyncToGenerator(function*(e,t){let r=t.getState();if(r.configuration.analytics.analyticsMode==="legacy")return Ci(r,t,e.legacy);Np(r);let n=e.next?_p(e.next):void 0,o=yield qt(r,t.extra.navigatorContext,n),i=new Nt({...t,analyticsAction:n??{}}),a=yield i.fetchFromAPI(o,{origin:"mainSearch"});return yield i.process(a)});return function(_x102,_x103){return _ref42.apply(this,arguments)}}()),nY=ue("search/fetchPage",/*#__PURE__*/function(){var _ref43=_asyncToGenerator(function*(e,t){let r=t.getState();if(Np(r),r.configuration.analytics.analyticsMode==="legacy"||!e.next)return Ds(r,t,e.legacy);let n=new Nt({...t,analyticsAction:e.next}),o=yield qt(r,t.extra.navigatorContext,e.next),i=yield n.fetchFromAPI(o,{origin:"mainSearch"});return yield n.process(i)});return function(_x104,_x105){return _ref43.apply(this,arguments)}}()),oY=ue("search/fetchMoreResults",/*#__PURE__*/function(){var _ref44=_asyncToGenerator(function*(e,t){let r=t.getState();if(r.configuration.analytics.analyticsMode==="legacy")return Ms(t,r);let n=nl("browseResults",t.getState),o=new Nt({...t,analyticsAction:n}),i=yield CC(r,t.extra.navigatorContext,n),a=yield o.fetchFromAPI(i,{origin:"mainSearch"});return yield o.process(a)});return function(_x106,_x107){return _ref44.apply(this,arguments)}}()),iY=ue("search/fetchFacetValues",/*#__PURE__*/function(){var _ref45=_asyncToGenerator(function*(e,t){let r=t.getState();if(r.configuration.analytics.analyticsMode==="legacy")return Ci(r,t,e.legacy);let n=new Nt({...t,analyticsAction:{}}),o=yield AC(r,t.extra.navigatorContext),i=yield n.fetchFromAPI(o,{origin:"facetValues"});return yield n.process(i)});return function(_x108,_x109){return _ref45.apply(this,arguments)}}()),aY=ue("search/fetchInstantResults",/*#__PURE__*/function(){var _ref46=_asyncToGenerator(function*(e,t){let r=t.getState();if(r.configuration.analytics.analyticsMode==="legacy")return Os(e,t);B(e,{id:G,q:G,maxResultsPerQuery:new J({required:!0,min:1}),cacheTimeout:new J});let{q:n,maxResultsPerQuery:o}=e,i=_p(Rp()),a=yield bC(r,t.extra.navigatorContext,n,o,i),m=new Nt({...t,analyticsAction:i},h=>{t.dispatch(li({q:h,id:e.id}))}),f=yield m.fetchFromAPI(a,{origin:"instantResults",disableAbortWarning:!0}),c=yield m.process(f);return"response"in c?{results:c.response.results,searchUid:c.response.searchUid,totalCountFiltered:c.response.totalCountFiltered,duration:c.duration}:c});return function(_x110,_x111){return _ref46.apply(this,arguments)}}()),CC=/*#__PURE__*/function(){var _ref47=_asyncToGenerator(function*(e,t,r){let n=yield qt(e,t,r);return n.request={...n.request,firstResult:(e.pagination?.firstResult??0)+(e.search?.results.length??0)},n});return function CC(_x112,_x113,_x114){return _ref47.apply(this,arguments)}}(),bC=/*#__PURE__*/function(){var _ref48=_asyncToGenerator(function*(e,t,r,n,o){let i=Vr(e,t,o);return xt({...i,...(e.didYouMean&&{enableDidYouMean:e.didYouMean.enableDidYouMean}),numberOfResults:n,q:r})});return function bC(_x115,_x116,_x117,_x118,_x119){return _ref48.apply(this,arguments)}}(),AC=/*#__PURE__*/function(){var _ref49=_asyncToGenerator(function*(e,t,r){let n=yield qt(e,t,r);return n.request.numberOfResults=0,n});return function AC(_x120,_x121,_x122){return _ref49.apply(this,arguments)}}(),Np=e=>{e.configuration.analytics.enabled&&et.addElement({name:"Query",...(e.query?.q&&{value:e.query.q}),time:JSON.stringify(new Date)})},_p=e=>({actionCause:e.actionCause,type:e.actionCause});var Vp=ge(Tn(),e=>{e.addCase(pi,(t,r)=>{let n=qs(t),o=r.payload;t.defaultNumberOfResults=t.numberOfResults=o,t.firstResult=Fn(n,o)}).addCase(fi,(t,r)=>{t.numberOfResults=r.payload,t.firstResult=0}).addCase(Bo,t=>{t.firstResult=0}).addCase(mi,(t,r)=>{let n=r.payload;t.firstResult=Fn(n,t.numberOfResults)}).addCase(Ft,(t,r)=>{let n=r.payload;t.firstResult=Fn(n,t.numberOfResults)}).addCase(hi,t=>{let r=qs(t),n=Math.max(r-1,1);t.firstResult=Fn(n,t.numberOfResults)}).addCase(gi,t=>{let r=qs(t),n=xC(t),o=Math.min(r+1,n);t.firstResult=Fn(o,t.numberOfResults)}).addCase(Me.fulfilled,(t,r)=>{r.payload&&(t.numberOfResults=r.payload.pagination.numberOfResults,t.firstResult=r.payload.pagination.firstResult)}).addCase(vt,(t,r)=>{t.firstResult=r.payload.firstResult??t.firstResult,t.numberOfResults=r.payload.numberOfResults??t.defaultNumberOfResults}).addCase(qp.fulfilled,(t,r)=>{let{response:n}=r.payload;t.totalCountFiltered=n.totalCountFiltered}).addCase(ii,t=>{Pe(t)}).addCase(Sp,t=>{Pe(t)}).addCase(fp,t=>{Pe(t)}).addCase(Ap,t=>{Pe(t)}).addCase(sp,t=>{Pe(t)}).addCase(pp,t=>{Pe(t)}).addCase(np,t=>{Pe(t)}).addCase(rp,t=>{Pe(t)}).addCase(op,t=>{Pe(t)}).addCase(yp,t=>{Pe(t)}).addCase(bp,t=>{Pe(t)}).addCase(jr,t=>{Pe(t)}).addCase(vp,t=>{Pe(t)}).addCase(wp,t=>{Pe(t)}).addCase(ap,t=>{Pe(t)}).addCase(tp,t=>{Pe(t)})});function Pe(e){e.firstResult=Tn().firstResult}function qs(e){let{firstResult:t,numberOfResults:r}=e;return RC(t,r)}function xC(e){let{totalCountFiltered:t,numberOfResults:r}=e;return EC(t,r)}function Fn(e,t){return(e-1)*t}function RC(e,t){return Math.round(e/t)+1}function EC(e,t){let r=Math.min(e,5e3);return Math.ceil(r/t)}function Ns(e){return e.addReducers({pagination:Vp}),{nextPage:gi,previousPage:hi,registerNumberOfResults:pi,registerPage:mi,updateNumberOfResults:fi,updatePage:Ft}}p();u();d();l();function _t(e){let t,r=new Map,n=()=>r.size===0,o=i=>{try{let a=JSON.stringify(i),m=t!==a;return t=a,m}catch(a){return console.warn("Could not detect if state has changed, check the controller \"get state method\"",a),!0}};return{subscribe(i){i();let a=Symbol(),m;return n()&&(t=JSON.stringify(this.state),m=e.subscribe(()=>{o(this.state)&&r.forEach(f=>f())})),r.set(a,i),()=>{r.delete(a),n()&&m&&m()}},get state(){return{}}}}p();u();d();l();var PC=new Fe({id:new H({emptyAllowed:!0,required:!1,default:""}),numberOfRecommendations:new J({min:0})});function Lp(e,t={}){if(!IC(e))throw Ge;let r=_t(e),{dispatch:n}=e,o=()=>e.state,i=cu(e,PC,t.options,"buildRecommendationList");return i.id!==""&&n(Rr({id:i.id})),i.numberOfRecommendations&&n(Ns(e).updateNumberOfResults(i.numberOfRecommendations)),{...r,refresh(){n(At())},get state(){let a=o();return{recommendations:a.recommendation.recommendations,error:a.recommendation.error,isLoading:a.recommendation.isLoading,searchResponseId:a.recommendation.searchUid}}}}function IC(e){return e.addReducers({recommendation:Er,configuration:ze}),!0}p();u();d();l();p();u();d();l();function jp(e,t,r){if(!TC(e))throw Ge;let n=1e3,o={selectionDelay:n,debounceWait:n,...t.options},i;return{select:$o(r,o.debounceWait,{isImmediate:!0}),beginDelayedSelect(){i=setTimeout(r,o.selectionDelay)},cancelPendingSelect(){i&&clearTimeout(i)}}}function TC(e){return e.addReducers({configuration:ze}),!0}function Up(e,t){let r=!1,n=()=>{r||(r=!0,e.dispatch(ko(t.options.result)))};return jp(e,t,()=>{n()})}p();u();d();l();p();u();d();l();p();u();d();l();var FC=["caseId","caseNumber"],kC={caseId:"caseContext",caseNumber:"caseContext"},kn=class extends Error{constructor(t){super(`The key "${t}" is reserved for internal use. Use ${kC[t]} to set this value.}`)}};function _s(e){return FC.includes(e)}var OC=new Fe({values:new K({options:{required:!1}})});function Bp(e,t={}){if(!qC(e))throw Ge;let r=_t(e),{dispatch:n}=e,o=()=>e.state,i=su(e,OC,t.initialState,"buildContext");return i.values&&n(Gt(i.values)),{...r,get state(){return{values:o().context.contextValues}},set(a){n(Gt(a))},...(o().configuration.analytics.analyticsMode==="legacy"?DC(n):MC(n))}}var DC=e=>({add(t,r){e(Kt({contextKey:t,contextValue:r}))},remove(t){e(Yt(t))}}),MC=e=>({add(t,r){if(_s(t))throw new kn(t);e(Kt({contextKey:t,contextValue:r}))},remove(t){if(_s(t))throw new kn(t);e(Yt(t))}});function qC(e){return e.addReducers({context:Yo}),!0}function Qp(e,t){return Bp(e,t)}p();u();d();l();function $p(e){if(!NC(e))throw Ge;let t=_t(e),{dispatch:r}=e,n=()=>e.state;return{...t,get state(){return{values:n().dictionaryFieldContext.contextValues}},set(o){r(qr(o))},add(o,i){r(Nr({field:o,key:i}))},remove(o){r(_r(o))}}}function NC(e){return e.addReducers({dictionaryFieldContext:Xo}),!0}p();u();d();l();p();u();d();l();var _C=new Fe({content:new de({required:!0}),conditions:new de({required:!0}),priority:new J({required:!1,default:0,min:0}),fields:new ie({required:!1,each:G})});function Hp(){let e=[],t=r=>{let n=_C.validate(r);if(!r.conditions.every(i=>i instanceof Function))throw new Gr("Each template condition should be a function that takes a Result or Product as an argument and returns a boolean");return n};return{registerTemplates(...r){r.forEach(n=>{let o={...t(n),fields:n.fields||[]};e.push(o)}),e.sort((n,o)=>o.priority-n.priority)},selectTemplate(r){let n=e.find(o=>o.conditions.every(i=>i(r)));return n?n.content:null},selectLinkTemplate(r){let n=e.find(o=>o.conditions.every(i=>i(r)));return n?n.linkContent:null}}}function zp(e){if(!VC(e))throw Ge;let{registerTemplates:t,selectTemplate:r,selectLinkTemplate:n}=Hp();return{registerTemplates:(...o)=>{t(...o);let i=[];o.forEach(a=>{a.fields&&i.push(...a.fields)}),e.dispatch(Lr(i))},selectTemplate:r,selectLinkTemplate:n}}function VC(e){return e.addReducers({fields:ni}),!0}p();u();d();l();var bi=(e,t)=>{let r=e;return X(r[t])?X(e.raw[t])?null:e.raw[t]:r[t]},LC=e=>t=>e.every(r=>!X(bi(t,r))),jC=e=>t=>e.every(r=>X(bi(t,r))),UC=(e,t)=>r=>{let n=Wp(e,r);return t.some(o=>n.some(i=>`${i}`.toLowerCase()===o.toLowerCase()))},BC=(e,t)=>r=>{let n=Wp(e,r);return t.every(o=>n.every(i=>`${i}`.toLowerCase()!==o.toLowerCase()))},Wp=(e,t)=>{let r=bi(t,e);return ac(r)?r:[r]},Gp={getResultProperty:bi,fieldsMustBeDefined:LC,fieldsMustNotBeDefined:jC,fieldMustMatch:UC,fieldMustNotMatch:BC};/**
30
+ `;function Oh(){return typeof navigator<"u"&&navigator.product=="ReactNative"}var Dh=["1",1,"yes",!0];function yo(){let e=[];return pa()&&e.push(window.doNotTrack),Ra()&&e.push(navigator.doNotTrack,navigator.msDoNotTrack,navigator.globalPrivacyControl),e.some(t=>Dh.indexOf(t)!==-1)}var Vu="v15",Lu={default:"https://analytics.cloud.coveo.com/rest/ua",production:"https://analytics.cloud.coveo.com/rest/ua",hipaa:"https://analyticshipaa.cloud.coveo.com/rest/ua"};function Mh(e=Lu.default,t=Vu,r=!1){if(e=e.replace(/\/$/,""),r)return`${e}/${t}`;let n=e.endsWith("/rest")||e.endsWith("/rest/ua");return`${e}${n?"":"/rest"}/${t}`}var qh="38824e1f-37f5-42d3-8372-a4b8fa9df946",Ze=class{get defaultOptions(){return{endpoint:Lu.default,isCustomEndpoint:!1,token:"",version:Vu,beforeSendHooks:[],afterSendHooks:[]}}get version(){return Mu}constructor(t){if(this.acceptedLinkReferrers=[],!t)throw new Error("You have to pass options to this constructor");this.options=Object.assign(Object.assign({},this.defaultOptions),t),this.visitorId="",this.bufferedRequests=[],this.beforeSendHooks=[wg,bg].concat(this.options.beforeSendHooks),this.afterSendHooks=this.options.afterSendHooks,this.eventTypeMapping={};let r={baseUrl:this.baseUrl,token:this.options.token,visitorIdProvider:this,preprocessRequest:this.options.preprocessRequest};yo()?this.runtime=new ho:this.runtime=this.options.runtimeEnvironment||this.initRuntime(r),this.addEventTypeMapping(ae.view,{newEventType:ae.view,addClientIdParameter:!0}),this.addEventTypeMapping(ae.click,{newEventType:ae.click,addClientIdParameter:!0}),this.addEventTypeMapping(ae.custom,{newEventType:ae.custom,addClientIdParameter:!0}),this.addEventTypeMapping(ae.search,{newEventType:ae.search,addClientIdParameter:!0})}initRuntime(t){return pa()&&gr()?new wa(t,()=>{let r=[...this.bufferedRequests];return this.bufferedRequests=[],r}):(Oh()&&console.warn(kh),new xa(t))}get storage(){return this.runtime.storage}determineVisitorId(){return M(this,void 0,void 0,function*(){try{return pa()&&this.extractClientIdFromLink(window.location.href)||(yield this.storage.getItem("visitorId"))||zt()}catch(t){return console.log("Could not get visitor ID from the current runtime environment storage. Using a random ID instead.",t),zt()}})}getCurrentVisitorId(){return M(this,void 0,void 0,function*(){if(!this.visitorId){let t=yield this.determineVisitorId();yield this.setCurrentVisitorId(t)}return this.visitorId})}setCurrentVisitorId(t){return M(this,void 0,void 0,function*(){this.visitorId=t,yield this.storage.setItem("visitorId",t)})}setClientId(t,r){return M(this,void 0,void 0,function*(){if(po(t))this.setCurrentVisitorId(t.toLowerCase());else{if(!r)throw Error("Cannot generate uuid client id without a specific namespace string.");this.setCurrentVisitorId(yu(t,yu(r,qh)))}})}getParameters(t,...r){return M(this,void 0,void 0,function*(){return yield this.resolveParameters(t,...r)})}getPayload(t,...r){return M(this,void 0,void 0,function*(){let n=yield this.resolveParameters(t,...r);return yield this.resolvePayloadForParameters(t,n)})}get currentVisitorId(){return typeof(this.visitorId||this.storage.getItem("visitorId"))!="string"&&this.setCurrentVisitorId(zt()),this.visitorId}set currentVisitorId(t){this.visitorId=t,this.storage.setItem("visitorId",t)}extractClientIdFromLink(t){if(yo())return null;try{let r=new URL(t).searchParams.get(Ct.cvo_cid);if(r==null)return null;let n=Ct.fromString(r);return!n||!gr()||!n.validate(document.referrer,this.acceptedLinkReferrers)?null:n.clientId}catch{}return null}resolveParameters(t,...r){return M(this,void 0,void 0,function*(){let{variableLengthArgumentsNames:n=[],addVisitorIdParameter:o=!1,usesMeasurementProtocol:i=!1,addClientIdParameter:a=!1}=this.eventTypeMapping[t]||{};return yield[g=>n.length>0?this.parseVariableArgumentsPayload(n,g):g[0],g=>M(this,void 0,void 0,function*(){return Object.assign(Object.assign({},g),{visitorId:o?yield this.getCurrentVisitorId():""})}),g=>M(this,void 0,void 0,function*(){return a?Object.assign(Object.assign({},g),{clientId:yield this.getCurrentVisitorId()}):g}),g=>i?this.ensureAnonymousUserWhenUsingApiKey(g):g,g=>this.beforeSendHooks.reduce((v,R)=>M(this,void 0,void 0,function*(){let I=yield v;return yield R(t,I)}),g)].reduce((g,v)=>M(this,void 0,void 0,function*(){let R=yield g;return yield v(R)}),Promise.resolve(r))})}resolvePayloadForParameters(t,r){return M(this,void 0,void 0,function*(){let{usesMeasurementProtocol:n=!1}=this.eventTypeMapping[t]||{};return yield[y=>this.setTrackingIdIfTrackingIdNotPresent(y),y=>this.removeEmptyPayloadValues(y,t),y=>this.validateParams(y,t),y=>n?bh(y):y,y=>n?this.removeUnknownParameters(y):y,y=>n?this.processCustomParameters(y):this.mapCustomParametersToCustomData(y)].reduce((y,S)=>M(this,void 0,void 0,function*(){let g=yield y;return yield S(g)}),Promise.resolve(r))})}makeEvent(t,...r){return M(this,void 0,void 0,function*(){let{newEventType:n=t}=this.eventTypeMapping[t]||{},o=yield this.resolveParameters(t,...r),i=yield this.resolvePayloadForParameters(t,o);return{eventType:n,payload:i,log:a=>M(this,void 0,void 0,function*(){return this.bufferedRequests.push({eventType:n,payload:Object.assign(Object.assign({},i),a)}),yield Promise.all(this.afterSendHooks.map(m=>m(t,Object.assign(Object.assign({},o),a)))),yield this.deferExecution(),yield this.sendFromBuffer()})}})}sendEvent(t,...r){return M(this,void 0,void 0,function*(){return(yield this.makeEvent(t,...r)).log({})})}deferExecution(){return new Promise(t=>setTimeout(t,0))}sendFromBuffer(){return M(this,void 0,void 0,function*(){let t=this.bufferedRequests.shift();if(t){let{eventType:r,payload:n}=t;return this.runtime.getClientDependingOnEventType(r).sendEvent(r,n)}})}clear(){this.storage.removeItem("visitorId"),new Sr().clear()}deleteHttpOnlyVisitorId(){this.runtime.client.deleteHttpCookieVisitorId()}makeSearchEvent(t){return M(this,void 0,void 0,function*(){return this.makeEvent(ae.search,t)})}sendSearchEvent(t){var{searchQueryUid:r}=t,n=ct(t,["searchQueryUid"]);return M(this,void 0,void 0,function*(){return(yield this.makeSearchEvent(n)).log({searchQueryUid:r})})}makeClickEvent(t){return M(this,void 0,void 0,function*(){return this.makeEvent(ae.click,t)})}sendClickEvent(t){var{searchQueryUid:r}=t,n=ct(t,["searchQueryUid"]);return M(this,void 0,void 0,function*(){return(yield this.makeClickEvent(n)).log({searchQueryUid:r})})}makeCustomEvent(t){return M(this,void 0,void 0,function*(){return this.makeEvent(ae.custom,t)})}sendCustomEvent(t){var{lastSearchQueryUid:r}=t,n=ct(t,["lastSearchQueryUid"]);return M(this,void 0,void 0,function*(){return(yield this.makeCustomEvent(n)).log({lastSearchQueryUid:r})})}makeViewEvent(t){return M(this,void 0,void 0,function*(){return this.makeEvent(ae.view,t)})}sendViewEvent(t){return M(this,void 0,void 0,function*(){return(yield this.makeViewEvent(t)).log({})})}getVisit(){return M(this,void 0,void 0,function*(){let r=yield(yield b(`${this.baseUrl}/analytics/visit`)).json();return this.visitorId=r.visitorId,r})}getHealth(){return M(this,void 0,void 0,function*(){return yield(yield b(`${this.baseUrl}/analytics/monitoring/health`)).json()})}registerBeforeSendEventHook(t){this.beforeSendHooks.push(t)}registerAfterSendEventHook(t){this.afterSendHooks.push(t)}addEventTypeMapping(t,r){this.eventTypeMapping[t]=r}setAcceptedLinkReferrers(t){if(Array.isArray(t)&&t.every(r=>typeof r=="string"))this.acceptedLinkReferrers=t;else throw Error("Parameter should be an array of domain strings")}parseVariableArgumentsPayload(t,r){let n={};for(let o=0,i=r.length;o<i;o++){let a=r[o];if(typeof a=="string")n[t[o]]=a;else if(typeof a=="object")return Object.assign(Object.assign({},n),a)}return n}isKeyAllowedEmpty(t,r){return({[ae.search]:["queryText"]}[t]||[]).indexOf(r)!==-1}removeEmptyPayloadValues(t,r){let n=o=>typeof o<"u"&&o!==null&&o!=="";return Object.keys(t).filter(o=>this.isKeyAllowedEmpty(r,o)||n(t[o])).reduce((o,i)=>Object.assign(Object.assign({},o),{[i]:t[i]}),{})}removeUnknownParameters(t){return Object.keys(t).filter(n=>{if(Rh(n))return!0;console.log(n,"is not processed by coveoua")}).reduce((n,o)=>Object.assign(Object.assign({},n),{[o]:t[o]}),{})}processCustomParameters(t){let{custom:r}=t,n=ct(t,["custom"]),o={};r&&lo(r)&&(o=this.lowercaseKeys(r));let i=Eh(n);return Object.assign(Object.assign({},o),i)}mapCustomParametersToCustomData(t){let{custom:r}=t,n=ct(t,["custom"]);if(r&&lo(r)){let o=this.lowercaseKeys(r);return Object.assign(Object.assign({},n),{customData:Object.assign(Object.assign({},o),t.customData)})}else return t}lowercaseKeys(t){let r=Object.keys(t),n={};return r.forEach(o=>{n[o.toLowerCase()]=t[o]}),n}validateParams(t,r){let{anonymizeIp:n}=t,o=ct(t,["anonymizeIp"]);return n!==void 0&&["0","false","undefined","null","{}","[]",""].indexOf(`${n}`.toLowerCase())==-1&&(o.anonymizeIp=1),(r==ae.view||r==ae.click||r==ae.search||r==ae.custom)&&(o.originLevel3=this.limit(o.originLevel3,1024)),r==ae.view&&(o.location=this.limit(o.location,1024)),(r=="pageview"||r=="event")&&(o.referrer=this.limit(o.referrer,2048),o.location=this.limit(o.location,2048),o.page=this.limit(o.page,2048)),o}ensureAnonymousUserWhenUsingApiKey(t){let{userId:r}=t,n=ct(t,["userId"]);return Fh(this.options.token)&&!r?(n.userId="anonymous",n):t}setTrackingIdIfTrackingIdNotPresent(t){let{trackingId:r}=t,n=ct(t,["trackingId"]);return r?t:(n.hasOwnProperty("custom")&&lo(n.custom)&&(n.custom.hasOwnProperty("context_website")||n.custom.hasOwnProperty("siteName"))&&(n.trackingId=n.custom.context_website||n.custom.siteName),n.hasOwnProperty("customData")&&lo(n.customData)&&(n.customData.hasOwnProperty("context_website")||n.customData.hasOwnProperty("siteName"))&&(n.trackingId=n.customData.context_website||n.customData.siteName),n)}limit(t,r){return typeof t=="string"?Vg(t,r):t}get baseUrl(){return Mh(this.options.endpoint,this.options.version,this.options.isCustomEndpoint)}},ut;(function(e){e.contextChanged="contextChanged",e.expandToFullUI="expandToFullUI",e.openUserActions="openUserActions",e.showPrecedingSessions="showPrecedingSessions",e.showFollowingSessions="showFollowingSessions",e.clickViewedDocument="clickViewedDocument",e.clickPageView="clickPageView",e.createArticle="createArticle"})(ut||(ut={}));var q;(function(e){e.interfaceLoad="interfaceLoad",e.interfaceChange="interfaceChange",e.didyoumeanAutomatic="didyoumeanAutomatic",e.didyoumeanClick="didyoumeanClick",e.resultsSort="resultsSort",e.searchboxSubmit="searchboxSubmit",e.searchboxClear="searchboxClear",e.searchboxAsYouType="searchboxAsYouType",e.breadcrumbFacet="breadcrumbFacet",e.breadcrumbResetAll="breadcrumbResetAll",e.documentQuickview="documentQuickview",e.documentOpen="documentOpen",e.omniboxAnalytics="omniboxAnalytics",e.omniboxFromLink="omniboxFromLink",e.searchFromLink="searchFromLink",e.triggerNotify="notify",e.triggerExecute="execute",e.triggerQuery="query",e.undoTriggerQuery="undoQuery",e.triggerRedirect="redirect",e.pagerResize="pagerResize",e.pagerNumber="pagerNumber",e.pagerNext="pagerNext",e.pagerPrevious="pagerPrevious",e.pagerScrolling="pagerScrolling",e.staticFilterClearAll="staticFilterClearAll",e.staticFilterSelect="staticFilterSelect",e.staticFilterDeselect="staticFilterDeselect",e.facetClearAll="facetClearAll",e.facetSearch="facetSearch",e.facetSelect="facetSelect",e.facetSelectAll="facetSelectAll",e.facetDeselect="facetDeselect",e.facetExclude="facetExclude",e.facetUnexclude="facetUnexclude",e.facetUpdateSort="facetUpdateSort",e.facetShowMore="showMoreFacetResults",e.facetShowLess="showLessFacetResults",e.queryError="query",e.queryErrorBack="errorBack",e.queryErrorClear="errorClearQuery",e.queryErrorRetry="errorRetry",e.recommendation="recommendation",e.recommendationInterfaceLoad="recommendationInterfaceLoad",e.recommendationOpen="recommendationOpen",e.likeSmartSnippet="likeSmartSnippet",e.dislikeSmartSnippet="dislikeSmartSnippet",e.expandSmartSnippet="expandSmartSnippet",e.collapseSmartSnippet="collapseSmartSnippet",e.openSmartSnippetFeedbackModal="openSmartSnippetFeedbackModal",e.closeSmartSnippetFeedbackModal="closeSmartSnippetFeedbackModal",e.sendSmartSnippetReason="sendSmartSnippetReason",e.expandSmartSnippetSuggestion="expandSmartSnippetSuggestion",e.collapseSmartSnippetSuggestion="collapseSmartSnippetSuggestion",e.showMoreSmartSnippetSuggestion="showMoreSmartSnippetSuggestion",e.showLessSmartSnippetSuggestion="showLessSmartSnippetSuggestion",e.openSmartSnippetSource="openSmartSnippetSource",e.openSmartSnippetSuggestionSource="openSmartSnippetSuggestionSource",e.openSmartSnippetInlineLink="openSmartSnippetInlineLink",e.openSmartSnippetSuggestionInlineLink="openSmartSnippetSuggestionInlineLink",e.recentQueryClick="recentQueriesClick",e.clearRecentQueries="clearRecentQueries",e.recentResultClick="recentResultClick",e.clearRecentResults="clearRecentResults",e.noResultsBack="noResultsBack",e.showMoreFoldedResults="showMoreFoldedResults",e.showLessFoldedResults="showLessFoldedResults",e.copyToClipboard="copyToClipboard",e.caseSendEmail="Case.SendEmail",e.feedItemTextPost="FeedItem.TextPost",e.caseAttach="caseAttach",e.caseDetach="caseDetach",e.retryGeneratedAnswer="retryGeneratedAnswer",e.likeGeneratedAnswer="likeGeneratedAnswer",e.dislikeGeneratedAnswer="dislikeGeneratedAnswer",e.openGeneratedAnswerSource="openGeneratedAnswerSource",e.generatedAnswerStreamEnd="generatedAnswerStreamEnd",e.generatedAnswerSourceHover="generatedAnswerSourceHover",e.generatedAnswerCopyToClipboard="generatedAnswerCopyToClipboard",e.generatedAnswerHideAnswers="generatedAnswerHideAnswers",e.generatedAnswerShowAnswers="generatedAnswerShowAnswers",e.generatedAnswerExpand="generatedAnswerExpand",e.generatedAnswerCollapse="generatedAnswerCollapse",e.generatedAnswerFeedbackSubmit="generatedAnswerFeedbackSubmit",e.rephraseGeneratedAnswer="rephraseGeneratedAnswer",e.generatedAnswerFeedbackSubmitV2="generatedAnswerFeedbackSubmitV2",e.generatedAnswerCitationClick="generatedAnswerCitationClick"})(q||(q={}));var xu={[q.triggerNotify]:"queryPipelineTriggers",[q.triggerExecute]:"queryPipelineTriggers",[q.triggerQuery]:"queryPipelineTriggers",[q.triggerRedirect]:"queryPipelineTriggers",[q.queryError]:"errors",[q.queryErrorBack]:"errors",[q.queryErrorClear]:"errors",[q.queryErrorRetry]:"errors",[q.pagerNext]:"getMoreResults",[q.pagerPrevious]:"getMoreResults",[q.pagerNumber]:"getMoreResults",[q.pagerResize]:"getMoreResults",[q.pagerScrolling]:"getMoreResults",[q.facetSearch]:"facet",[q.facetShowLess]:"facet",[q.facetShowMore]:"facet",[q.recommendation]:"recommendation",[q.likeSmartSnippet]:"smartSnippet",[q.dislikeSmartSnippet]:"smartSnippet",[q.expandSmartSnippet]:"smartSnippet",[q.collapseSmartSnippet]:"smartSnippet",[q.openSmartSnippetFeedbackModal]:"smartSnippet",[q.closeSmartSnippetFeedbackModal]:"smartSnippet",[q.sendSmartSnippetReason]:"smartSnippet",[q.expandSmartSnippetSuggestion]:"smartSnippetSuggestions",[q.collapseSmartSnippetSuggestion]:"smartSnippetSuggestions",[q.showMoreSmartSnippetSuggestion]:"smartSnippetSuggestions",[q.showLessSmartSnippetSuggestion]:"smartSnippetSuggestions",[q.clearRecentQueries]:"recentQueries",[q.recentResultClick]:"recentlyClickedDocuments",[q.clearRecentResults]:"recentlyClickedDocuments",[q.showLessFoldedResults]:"folding",[q.caseDetach]:"case",[q.likeGeneratedAnswer]:"generatedAnswer",[q.dislikeGeneratedAnswer]:"generatedAnswer",[q.openGeneratedAnswerSource]:"generatedAnswer",[q.generatedAnswerStreamEnd]:"generatedAnswer",[q.generatedAnswerSourceHover]:"generatedAnswer",[q.generatedAnswerCopyToClipboard]:"generatedAnswer",[q.generatedAnswerHideAnswers]:"generatedAnswer",[q.generatedAnswerShowAnswers]:"generatedAnswer",[q.generatedAnswerExpand]:"generatedAnswer",[q.generatedAnswerCollapse]:"generatedAnswer",[q.generatedAnswerFeedbackSubmit]:"generatedAnswer",[q.generatedAnswerFeedbackSubmitV2]:"generatedAnswer",[ut.expandToFullUI]:"interface",[ut.openUserActions]:"User Actions",[ut.showPrecedingSessions]:"User Actions",[ut.showFollowingSessions]:"User Actions",[ut.clickViewedDocument]:"User Actions",[ut.clickPageView]:"User Actions",[ut.createArticle]:"createArticle"},vr=class{constructor(){this.runtime=new ho,this.currentVisitorId=""}getPayload(){return Promise.resolve()}getParameters(){return Promise.resolve()}makeEvent(t){return Promise.resolve({eventType:t,payload:null,log:()=>Promise.resolve()})}sendEvent(){return Promise.resolve()}makeSearchEvent(){return this.makeEvent(ae.search)}sendSearchEvent(){return Promise.resolve()}makeClickEvent(){return this.makeEvent(ae.click)}sendClickEvent(){return Promise.resolve()}makeCustomEvent(){return this.makeEvent(ae.custom)}sendCustomEvent(){return Promise.resolve()}makeViewEvent(){return this.makeEvent(ae.view)}sendViewEvent(){return Promise.resolve()}getVisit(){return Promise.resolve({id:"",visitorId:""})}getHealth(){return Promise.resolve({status:""})}registerBeforeSendEventHook(){}registerAfterSendEventHook(){}addEventTypeMapping(){}get version(){return Mu}};function Nh(e){let t="";return e.filter(r=>{let n=r!==t;return t=r,n})}function _h(e){return e.map(t=>t.replace(/;/g,""))}function ju(e){let r=e.join(";");return r.length<=256?r:ju(e.slice(1))}var Ru=e=>{let t=_h(e),r=Nh(t);return ju(r)};function Eu(e){let t=typeof e.partialQueries=="string"?e.partialQueries:Ru(e.partialQueries),r=typeof e.suggestions=="string"?e.suggestions:Ru(e.suggestions);return Object.assign(Object.assign({},e),{partialQueries:t,suggestions:r})}var So=class{constructor(t,r){this.opts=t,this.provider=r;let n=t.enableAnalytics===!1||yo();this.coveoAnalyticsClient=n?new vr:new Ze(t)}disable(){this.coveoAnalyticsClient=new vr}enable(){this.coveoAnalyticsClient=new Ze(this.opts)}makeInterfaceLoad(){return this.makeSearchEvent(q.interfaceLoad)}logInterfaceLoad(){return M(this,void 0,void 0,function*(){return(yield this.makeInterfaceLoad()).log({searchUID:this.provider.getSearchUID()})})}makeRecommendationInterfaceLoad(){return this.makeSearchEvent(q.recommendationInterfaceLoad)}logRecommendationInterfaceLoad(){return M(this,void 0,void 0,function*(){return(yield this.makeRecommendationInterfaceLoad()).log({searchUID:this.provider.getSearchUID()})})}makeRecommendation(){return this.makeCustomEvent(q.recommendation)}logRecommendation(){return M(this,void 0,void 0,function*(){return(yield this.makeRecommendation()).log({searchUID:this.provider.getSearchUID()})})}makeRecommendationOpen(t,r){return this.makeClickEvent(q.recommendationOpen,t,r)}logRecommendationOpen(t,r){return M(this,void 0,void 0,function*(){return(yield this.makeRecommendationOpen(t,r)).log({searchUID:this.provider.getSearchUID()})})}makeStaticFilterClearAll(t){return this.makeSearchEvent(q.staticFilterClearAll,t)}logStaticFilterClearAll(t){return M(this,void 0,void 0,function*(){return(yield this.makeStaticFilterClearAll(t)).log({searchUID:this.provider.getSearchUID()})})}makeStaticFilterSelect(t){return this.makeSearchEvent(q.staticFilterSelect,t)}logStaticFilterSelect(t){return M(this,void 0,void 0,function*(){return(yield this.makeStaticFilterSelect(t)).log({searchUID:this.provider.getSearchUID()})})}makeStaticFilterDeselect(t){return this.makeSearchEvent(q.staticFilterDeselect,t)}logStaticFilterDeselect(t){return M(this,void 0,void 0,function*(){return(yield this.makeStaticFilterDeselect(t)).log({searchUID:this.provider.getSearchUID()})})}makeFetchMoreResults(){return this.makeCustomEvent(q.pagerScrolling,{type:"getMoreResults"})}logFetchMoreResults(){return M(this,void 0,void 0,function*(){return(yield this.makeFetchMoreResults()).log({searchUID:this.provider.getSearchUID()})})}makeInterfaceChange(t){return this.makeSearchEvent(q.interfaceChange,t)}logInterfaceChange(t){return M(this,void 0,void 0,function*(){return(yield this.makeInterfaceChange(t)).log({searchUID:this.provider.getSearchUID()})})}makeDidYouMeanAutomatic(){return this.makeSearchEvent(q.didyoumeanAutomatic)}logDidYouMeanAutomatic(){return M(this,void 0,void 0,function*(){return(yield this.makeDidYouMeanAutomatic()).log({searchUID:this.provider.getSearchUID()})})}makeDidYouMeanClick(){return this.makeSearchEvent(q.didyoumeanClick)}logDidYouMeanClick(){return M(this,void 0,void 0,function*(){return(yield this.makeDidYouMeanClick()).log({searchUID:this.provider.getSearchUID()})})}makeResultsSort(t){return this.makeSearchEvent(q.resultsSort,t)}logResultsSort(t){return M(this,void 0,void 0,function*(){return(yield this.makeResultsSort(t)).log({searchUID:this.provider.getSearchUID()})})}makeSearchboxSubmit(){return this.makeSearchEvent(q.searchboxSubmit)}logSearchboxSubmit(){return M(this,void 0,void 0,function*(){return(yield this.makeSearchboxSubmit()).log({searchUID:this.provider.getSearchUID()})})}makeSearchboxClear(){return this.makeSearchEvent(q.searchboxClear)}logSearchboxClear(){return M(this,void 0,void 0,function*(){return(yield this.makeSearchboxClear()).log({searchUID:this.provider.getSearchUID()})})}makeSearchboxAsYouType(){return this.makeSearchEvent(q.searchboxAsYouType)}logSearchboxAsYouType(){return M(this,void 0,void 0,function*(){return(yield this.makeSearchboxAsYouType()).log({searchUID:this.provider.getSearchUID()})})}makeBreadcrumbFacet(t){return this.makeSearchEvent(q.breadcrumbFacet,t)}logBreadcrumbFacet(t){return M(this,void 0,void 0,function*(){return(yield this.makeBreadcrumbFacet(t)).log({searchUID:this.provider.getSearchUID()})})}makeBreadcrumbResetAll(){return this.makeSearchEvent(q.breadcrumbResetAll)}logBreadcrumbResetAll(){return M(this,void 0,void 0,function*(){return(yield this.makeBreadcrumbResetAll()).log({searchUID:this.provider.getSearchUID()})})}makeDocumentQuickview(t,r){return this.makeClickEvent(q.documentQuickview,t,r)}logDocumentQuickview(t,r){return M(this,void 0,void 0,function*(){return(yield this.makeDocumentQuickview(t,r)).log({searchUID:this.provider.getSearchUID()})})}makeDocumentOpen(t,r){return this.makeClickEvent(q.documentOpen,t,r)}logDocumentOpen(t,r){return M(this,void 0,void 0,function*(){return(yield this.makeDocumentOpen(t,r)).log({searchUID:this.provider.getSearchUID()})})}makeOmniboxAnalytics(t){return this.makeSearchEvent(q.omniboxAnalytics,Eu(t))}logOmniboxAnalytics(t){return M(this,void 0,void 0,function*(){return(yield this.makeOmniboxAnalytics(t)).log({searchUID:this.provider.getSearchUID()})})}makeOmniboxFromLink(t){return this.makeSearchEvent(q.omniboxFromLink,Eu(t))}logOmniboxFromLink(t){return M(this,void 0,void 0,function*(){return(yield this.makeOmniboxFromLink(t)).log({searchUID:this.provider.getSearchUID()})})}makeSearchFromLink(){return this.makeSearchEvent(q.searchFromLink)}logSearchFromLink(){return M(this,void 0,void 0,function*(){return(yield this.makeSearchFromLink()).log({searchUID:this.provider.getSearchUID()})})}makeTriggerNotify(t){return this.makeCustomEvent(q.triggerNotify,t)}logTriggerNotify(t){return M(this,void 0,void 0,function*(){return(yield this.makeTriggerNotify(t)).log({searchUID:this.provider.getSearchUID()})})}makeTriggerExecute(t){return this.makeCustomEvent(q.triggerExecute,t)}logTriggerExecute(t){return M(this,void 0,void 0,function*(){return(yield this.makeTriggerExecute(t)).log({searchUID:this.provider.getSearchUID()})})}makeTriggerQuery(){return this.makeCustomEvent(q.triggerQuery,{query:this.provider.getSearchEventRequestPayload().queryText},"queryPipelineTriggers")}logTriggerQuery(){return M(this,void 0,void 0,function*(){return(yield this.makeTriggerQuery()).log({searchUID:this.provider.getSearchUID()})})}makeUndoTriggerQuery(t){return this.makeSearchEvent(q.undoTriggerQuery,t)}logUndoTriggerQuery(t){return M(this,void 0,void 0,function*(){return(yield this.makeUndoTriggerQuery(t)).log({searchUID:this.provider.getSearchUID()})})}makeTriggerRedirect(t){return this.makeCustomEvent(q.triggerRedirect,Object.assign(Object.assign({},t),{query:this.provider.getSearchEventRequestPayload().queryText}))}logTriggerRedirect(t){return M(this,void 0,void 0,function*(){return(yield this.makeTriggerRedirect(t)).log({searchUID:this.provider.getSearchUID()})})}makePagerResize(t){return this.makeCustomEvent(q.pagerResize,t)}logPagerResize(t){return M(this,void 0,void 0,function*(){return(yield this.makePagerResize(t)).log({searchUID:this.provider.getSearchUID()})})}makePagerNumber(t){return this.makeCustomEvent(q.pagerNumber,t)}logPagerNumber(t){return M(this,void 0,void 0,function*(){return(yield this.makePagerNumber(t)).log({searchUID:this.provider.getSearchUID()})})}makePagerNext(t){return this.makeCustomEvent(q.pagerNext,t)}logPagerNext(t){return M(this,void 0,void 0,function*(){return(yield this.makePagerNext(t)).log({searchUID:this.provider.getSearchUID()})})}makePagerPrevious(t){return this.makeCustomEvent(q.pagerPrevious,t)}logPagerPrevious(t){return M(this,void 0,void 0,function*(){return(yield this.makePagerPrevious(t)).log({searchUID:this.provider.getSearchUID()})})}makePagerScrolling(){return this.makeCustomEvent(q.pagerScrolling)}logPagerScrolling(){return M(this,void 0,void 0,function*(){return(yield this.makePagerScrolling()).log({searchUID:this.provider.getSearchUID()})})}makeFacetClearAll(t){return this.makeSearchEvent(q.facetClearAll,t)}logFacetClearAll(t){return M(this,void 0,void 0,function*(){return(yield this.makeFacetClearAll(t)).log({searchUID:this.provider.getSearchUID()})})}makeFacetSearch(t){return this.makeSearchEvent(q.facetSearch,t)}logFacetSearch(t){return M(this,void 0,void 0,function*(){return(yield this.makeFacetSearch(t)).log({searchUID:this.provider.getSearchUID()})})}makeFacetSelect(t){return this.makeSearchEvent(q.facetSelect,t)}logFacetSelect(t){return M(this,void 0,void 0,function*(){return(yield this.makeFacetSelect(t)).log({searchUID:this.provider.getSearchUID()})})}makeFacetDeselect(t){return this.makeSearchEvent(q.facetDeselect,t)}logFacetDeselect(t){return M(this,void 0,void 0,function*(){return(yield this.makeFacetDeselect(t)).log({searchUID:this.provider.getSearchUID()})})}makeFacetExclude(t){return this.makeSearchEvent(q.facetExclude,t)}logFacetExclude(t){return M(this,void 0,void 0,function*(){return(yield this.makeFacetExclude(t)).log({searchUID:this.provider.getSearchUID()})})}makeFacetUnexclude(t){return this.makeSearchEvent(q.facetUnexclude,t)}logFacetUnexclude(t){return M(this,void 0,void 0,function*(){return(yield this.makeFacetUnexclude(t)).log({searchUID:this.provider.getSearchUID()})})}makeFacetSelectAll(t){return this.makeSearchEvent(q.facetSelectAll,t)}logFacetSelectAll(t){return M(this,void 0,void 0,function*(){return(yield this.makeFacetSelectAll(t)).log({searchUID:this.provider.getSearchUID()})})}makeFacetUpdateSort(t){return this.makeSearchEvent(q.facetUpdateSort,t)}logFacetUpdateSort(t){return M(this,void 0,void 0,function*(){return(yield this.makeFacetUpdateSort(t)).log({searchUID:this.provider.getSearchUID()})})}makeFacetShowMore(t){return this.makeCustomEvent(q.facetShowMore,t)}logFacetShowMore(t){return M(this,void 0,void 0,function*(){return(yield this.makeFacetShowMore(t)).log({searchUID:this.provider.getSearchUID()})})}makeFacetShowLess(t){return this.makeCustomEvent(q.facetShowLess,t)}logFacetShowLess(t){return M(this,void 0,void 0,function*(){return(yield this.makeFacetShowLess(t)).log({searchUID:this.provider.getSearchUID()})})}makeQueryError(t){return this.makeCustomEvent(q.queryError,t)}logQueryError(t){return M(this,void 0,void 0,function*(){return(yield this.makeQueryError(t)).log({searchUID:this.provider.getSearchUID()})})}makeQueryErrorBack(){return M(this,void 0,void 0,function*(){let t=yield this.makeCustomEvent(q.queryErrorBack);return{description:t.description,log:()=>M(this,void 0,void 0,function*(){return yield t.log({searchUID:this.provider.getSearchUID()}),this.logSearchEvent(q.queryErrorBack)})}})}logQueryErrorBack(){return M(this,void 0,void 0,function*(){return(yield this.makeQueryErrorBack()).log({searchUID:this.provider.getSearchUID()})})}makeQueryErrorRetry(){return M(this,void 0,void 0,function*(){let t=yield this.makeCustomEvent(q.queryErrorRetry);return{description:t.description,log:()=>M(this,void 0,void 0,function*(){return yield t.log({searchUID:this.provider.getSearchUID()}),this.logSearchEvent(q.queryErrorRetry)})}})}logQueryErrorRetry(){return M(this,void 0,void 0,function*(){return(yield this.makeQueryErrorRetry()).log({searchUID:this.provider.getSearchUID()})})}makeQueryErrorClear(){return M(this,void 0,void 0,function*(){let t=yield this.makeCustomEvent(q.queryErrorClear);return{description:t.description,log:()=>M(this,void 0,void 0,function*(){return yield t.log({searchUID:this.provider.getSearchUID()}),this.logSearchEvent(q.queryErrorClear)})}})}logQueryErrorClear(){return M(this,void 0,void 0,function*(){return(yield this.makeQueryErrorClear()).log({searchUID:this.provider.getSearchUID()})})}makeLikeSmartSnippet(){return this.makeCustomEvent(q.likeSmartSnippet)}logLikeSmartSnippet(){return M(this,void 0,void 0,function*(){return(yield this.makeLikeSmartSnippet()).log({searchUID:this.provider.getSearchUID()})})}makeDislikeSmartSnippet(){return this.makeCustomEvent(q.dislikeSmartSnippet)}logDislikeSmartSnippet(){return M(this,void 0,void 0,function*(){return(yield this.makeDislikeSmartSnippet()).log({searchUID:this.provider.getSearchUID()})})}makeExpandSmartSnippet(){return this.makeCustomEvent(q.expandSmartSnippet)}logExpandSmartSnippet(){return M(this,void 0,void 0,function*(){return(yield this.makeExpandSmartSnippet()).log({searchUID:this.provider.getSearchUID()})})}makeCollapseSmartSnippet(){return this.makeCustomEvent(q.collapseSmartSnippet)}logCollapseSmartSnippet(){return M(this,void 0,void 0,function*(){return(yield this.makeCollapseSmartSnippet()).log({searchUID:this.provider.getSearchUID()})})}makeOpenSmartSnippetFeedbackModal(){return this.makeCustomEvent(q.openSmartSnippetFeedbackModal)}logOpenSmartSnippetFeedbackModal(){return M(this,void 0,void 0,function*(){return(yield this.makeOpenSmartSnippetFeedbackModal()).log({searchUID:this.provider.getSearchUID()})})}makeCloseSmartSnippetFeedbackModal(){return this.makeCustomEvent(q.closeSmartSnippetFeedbackModal)}logCloseSmartSnippetFeedbackModal(){return M(this,void 0,void 0,function*(){return(yield this.makeCloseSmartSnippetFeedbackModal()).log({searchUID:this.provider.getSearchUID()})})}makeSmartSnippetFeedbackReason(t,r){return this.makeCustomEvent(q.sendSmartSnippetReason,{reason:t,details:r})}logSmartSnippetFeedbackReason(t,r){return M(this,void 0,void 0,function*(){return(yield this.makeSmartSnippetFeedbackReason(t,r)).log({searchUID:this.provider.getSearchUID()})})}makeExpandSmartSnippetSuggestion(t){return this.makeCustomEvent(q.expandSmartSnippetSuggestion,"documentId"in t?t:{documentId:t})}logExpandSmartSnippetSuggestion(t){return M(this,void 0,void 0,function*(){return(yield this.makeExpandSmartSnippetSuggestion(t)).log({searchUID:this.provider.getSearchUID()})})}makeCollapseSmartSnippetSuggestion(t){return this.makeCustomEvent(q.collapseSmartSnippetSuggestion,"documentId"in t?t:{documentId:t})}logCollapseSmartSnippetSuggestion(t){return M(this,void 0,void 0,function*(){return(yield this.makeCollapseSmartSnippetSuggestion(t)).log({searchUID:this.provider.getSearchUID()})})}makeShowMoreSmartSnippetSuggestion(t){return this.makeCustomEvent(q.showMoreSmartSnippetSuggestion,t)}logShowMoreSmartSnippetSuggestion(t){return M(this,void 0,void 0,function*(){return(yield this.makeShowMoreSmartSnippetSuggestion(t)).log({searchUID:this.provider.getSearchUID()})})}makeShowLessSmartSnippetSuggestion(t){return this.makeCustomEvent(q.showLessSmartSnippetSuggestion,t)}logShowLessSmartSnippetSuggestion(t){return M(this,void 0,void 0,function*(){return(yield this.makeShowLessSmartSnippetSuggestion(t)).log({searchUID:this.provider.getSearchUID()})})}makeOpenSmartSnippetSource(t,r){return this.makeClickEvent(q.openSmartSnippetSource,t,r)}logOpenSmartSnippetSource(t,r){return M(this,void 0,void 0,function*(){return(yield this.makeOpenSmartSnippetSource(t,r)).log({searchUID:this.provider.getSearchUID()})})}makeOpenSmartSnippetSuggestionSource(t,r){return this.makeClickEvent(q.openSmartSnippetSuggestionSource,t,{contentIDKey:r.documentId.contentIdKey,contentIDValue:r.documentId.contentIdValue},r)}makeCopyToClipboard(t,r){return this.makeClickEvent(q.copyToClipboard,t,r)}logCopyToClipboard(t,r){return M(this,void 0,void 0,function*(){return(yield this.makeCopyToClipboard(t,r)).log({searchUID:this.provider.getSearchUID()})})}logOpenSmartSnippetSuggestionSource(t,r){return M(this,void 0,void 0,function*(){return(yield this.makeOpenSmartSnippetSuggestionSource(t,r)).log({searchUID:this.provider.getSearchUID()})})}makeOpenSmartSnippetInlineLink(t,r){return this.makeClickEvent(q.openSmartSnippetInlineLink,t,{contentIDKey:r.contentIDKey,contentIDValue:r.contentIDValue},r)}logOpenSmartSnippetInlineLink(t,r){return M(this,void 0,void 0,function*(){return(yield this.makeOpenSmartSnippetInlineLink(t,r)).log({searchUID:this.provider.getSearchUID()})})}makeOpenSmartSnippetSuggestionInlineLink(t,r){return this.makeClickEvent(q.openSmartSnippetSuggestionInlineLink,t,{contentIDKey:r.documentId.contentIdKey,contentIDValue:r.documentId.contentIdValue},r)}logOpenSmartSnippetSuggestionInlineLink(t,r){return M(this,void 0,void 0,function*(){return(yield this.makeOpenSmartSnippetSuggestionInlineLink(t,r)).log({searchUID:this.provider.getSearchUID()})})}makeRecentQueryClick(){return this.makeSearchEvent(q.recentQueryClick)}logRecentQueryClick(){return M(this,void 0,void 0,function*(){return(yield this.makeRecentQueryClick()).log({searchUID:this.provider.getSearchUID()})})}makeClearRecentQueries(){return this.makeCustomEvent(q.clearRecentQueries)}logClearRecentQueries(){return M(this,void 0,void 0,function*(){return(yield this.makeClearRecentQueries()).log({searchUID:this.provider.getSearchUID()})})}makeRecentResultClick(t,r){return this.makeCustomEvent(q.recentResultClick,{info:t,identifier:r})}logRecentResultClick(t,r){return M(this,void 0,void 0,function*(){return(yield this.makeRecentResultClick(t,r)).log({searchUID:this.provider.getSearchUID()})})}makeClearRecentResults(){return this.makeCustomEvent(q.clearRecentResults)}logClearRecentResults(){return M(this,void 0,void 0,function*(){return(yield this.makeClearRecentResults()).log({searchUID:this.provider.getSearchUID()})})}makeNoResultsBack(){return this.makeSearchEvent(q.noResultsBack)}logNoResultsBack(){return M(this,void 0,void 0,function*(){return(yield this.makeNoResultsBack()).log({searchUID:this.provider.getSearchUID()})})}makeShowMoreFoldedResults(t,r){return this.makeClickEvent(q.showMoreFoldedResults,t,r)}logShowMoreFoldedResults(t,r){return M(this,void 0,void 0,function*(){return(yield this.makeShowMoreFoldedResults(t,r)).log({searchUID:this.provider.getSearchUID()})})}makeShowLessFoldedResults(){return this.makeCustomEvent(q.showLessFoldedResults)}logShowLessFoldedResults(){return M(this,void 0,void 0,function*(){return(yield this.makeShowLessFoldedResults()).log({searchUID:this.provider.getSearchUID()})})}makeEventDescription(t,r){var n;return{actionCause:r,customData:(n=t.payload)===null||n===void 0?void 0:n.customData}}makeCustomEvent(t,r,n=xu[t]){return M(this,void 0,void 0,function*(){this.coveoAnalyticsClient.getParameters;let o=Object.assign(Object.assign({},this.provider.getBaseMetadata()),r),i=Object.assign(Object.assign({},yield this.getBaseEventRequest(o)),{eventType:n,eventValue:t}),a=yield this.coveoAnalyticsClient.makeCustomEvent(i);return{description:this.makeEventDescription(a,t),log:({searchUID:m})=>a.log({lastSearchQueryUid:m})}})}logCustomEvent(t,r,n=xu[t]){return M(this,void 0,void 0,function*(){return(yield this.makeCustomEvent(t,r,n)).log({searchUID:this.provider.getSearchUID()})})}makeCustomEventWithType(t,r,n){return M(this,void 0,void 0,function*(){let o=Object.assign(Object.assign({},this.provider.getBaseMetadata()),n),i=Object.assign(Object.assign({},yield this.getBaseEventRequest(o)),{eventType:r,eventValue:t}),a=yield this.coveoAnalyticsClient.makeCustomEvent(i);return{description:this.makeEventDescription(a,t),log:({searchUID:m})=>a.log({lastSearchQueryUid:m})}})}logCustomEventWithType(t,r,n){return M(this,void 0,void 0,function*(){return(yield this.makeCustomEventWithType(t,r,n)).log({searchUID:this.provider.getSearchUID()})})}logSearchEvent(t,r){return M(this,void 0,void 0,function*(){return(yield this.makeSearchEvent(t,r)).log({searchUID:this.provider.getSearchUID()})})}makeSearchEvent(t,r){return M(this,void 0,void 0,function*(){let n=yield this.getBaseSearchEventRequest(t,r),o=yield this.coveoAnalyticsClient.makeSearchEvent(n);return{description:this.makeEventDescription(o,t),log:({searchUID:i})=>o.log({searchQueryUid:i})}})}makeClickEvent(t,r,n,o){return M(this,void 0,void 0,function*(){let i=Object.assign(Object.assign(Object.assign({},r),yield this.getBaseEventRequest(Object.assign(Object.assign({},n),o))),{queryPipeline:this.provider.getPipeline(),actionCause:t}),a=yield this.coveoAnalyticsClient.makeClickEvent(i);return{description:this.makeEventDescription(a,t),log:({searchUID:m})=>a.log({searchQueryUid:m})}})}logClickEvent(t,r,n,o){return M(this,void 0,void 0,function*(){return(yield this.makeClickEvent(t,r,n,o)).log({searchUID:this.provider.getSearchUID()})})}getBaseSearchEventRequest(t,r){var n,o;return M(this,void 0,void 0,function*(){return Object.assign(Object.assign(Object.assign({},yield this.getBaseEventRequest(Object.assign(Object.assign({},r),(o=(n=this.provider).getGeneratedAnswerMetadata)===null||o===void 0?void 0:o.call(n)))),this.provider.getSearchEventRequestPayload()),{queryPipeline:this.provider.getPipeline(),actionCause:t})})}getBaseEventRequest(t){return M(this,void 0,void 0,function*(){let r=Object.assign(Object.assign({},this.provider.getBaseMetadata()),t);return Object.assign(Object.assign(Object.assign({},this.getOrigins()),this.getSplitTestRun()),{customData:r,language:this.provider.getLanguage(),facetState:this.provider.getFacetState?this.provider.getFacetState():[],anonymous:this.provider.getIsAnonymous(),clientId:yield this.getClientId()})})}getOrigins(){var t,r;return{originContext:(r=(t=this.provider).getOriginContext)===null||r===void 0?void 0:r.call(t),originLevel1:this.provider.getOriginLevel1(),originLevel2:this.provider.getOriginLevel2(),originLevel3:this.provider.getOriginLevel3()}}getClientId(){return this.coveoAnalyticsClient instanceof Ze?this.coveoAnalyticsClient.getCurrentVisitorId():void 0}getSplitTestRun(){let t=this.provider.getSplitTestRunName?this.provider.getSplitTestRunName():"",r=this.provider.getSplitTestRunVersion?this.provider.getSplitTestRunVersion():"";return Object.assign(Object.assign({},t&&{splitTestRunName:t}),r&&{splitTestRunVersion:r})}makeLikeGeneratedAnswer(t){return this.makeCustomEvent(q.likeGeneratedAnswer,t)}logLikeGeneratedAnswer(t){return M(this,void 0,void 0,function*(){return(yield this.makeLikeGeneratedAnswer(t)).log({searchUID:this.provider.getSearchUID()})})}makeDislikeGeneratedAnswer(t){return this.makeCustomEvent(q.dislikeGeneratedAnswer,t)}logDislikeGeneratedAnswer(t){return M(this,void 0,void 0,function*(){return(yield this.makeDislikeGeneratedAnswer(t)).log({searchUID:this.provider.getSearchUID()})})}makeOpenGeneratedAnswerSource(t){return this.makeCustomEvent(q.openGeneratedAnswerSource,t)}logOpenGeneratedAnswerSource(t){return M(this,void 0,void 0,function*(){return(yield this.makeOpenGeneratedAnswerSource(t)).log({searchUID:this.provider.getSearchUID()})})}makeGeneratedAnswerCitationClick(t,r){return this.makeClickEvent(q.generatedAnswerCitationClick,Object.assign(Object.assign({},t),{documentPosition:1}),{contentIDKey:r.documentId.contentIdKey,contentIDValue:r.documentId.contentIdValue},r)}logGeneratedAnswerCitationClick(t,r){return M(this,void 0,void 0,function*(){return(yield this.makeGeneratedAnswerCitationClick(t,r)).log({searchUID:this.provider.getSearchUID()})})}makeGeneratedAnswerSourceHover(t){return this.makeCustomEvent(q.generatedAnswerSourceHover,t)}logGeneratedAnswerSourceHover(t){return M(this,void 0,void 0,function*(){return(yield this.makeGeneratedAnswerSourceHover(t)).log({searchUID:this.provider.getSearchUID()})})}makeGeneratedAnswerCopyToClipboard(t){return this.makeCustomEvent(q.generatedAnswerCopyToClipboard,t)}logGeneratedAnswerCopyToClipboard(t){return M(this,void 0,void 0,function*(){return(yield this.makeGeneratedAnswerCopyToClipboard(t)).log({searchUID:this.provider.getSearchUID()})})}makeGeneratedAnswerHideAnswers(t){return this.makeCustomEvent(q.generatedAnswerHideAnswers,t)}logGeneratedAnswerHideAnswers(t){return M(this,void 0,void 0,function*(){return(yield this.makeGeneratedAnswerHideAnswers(t)).log({searchUID:this.provider.getSearchUID()})})}makeGeneratedAnswerShowAnswers(t){return this.makeCustomEvent(q.generatedAnswerShowAnswers,t)}logGeneratedAnswerShowAnswers(t){return M(this,void 0,void 0,function*(){return(yield this.makeGeneratedAnswerShowAnswers(t)).log({searchUID:this.provider.getSearchUID()})})}makeGeneratedAnswerExpand(t){return this.makeCustomEvent(q.generatedAnswerExpand,t)}logGeneratedAnswerExpand(t){return M(this,void 0,void 0,function*(){return(yield this.makeGeneratedAnswerExpand(t)).log({searchUID:this.provider.getSearchUID()})})}makeGeneratedAnswerCollapse(t){return this.makeCustomEvent(q.generatedAnswerCollapse,t)}logGeneratedAnswerCollapse(t){return M(this,void 0,void 0,function*(){return(yield this.makeGeneratedAnswerCollapse(t)).log({searchUID:this.provider.getSearchUID()})})}makeGeneratedAnswerFeedbackSubmit(t){return this.makeCustomEvent(q.generatedAnswerFeedbackSubmit,t)}logGeneratedAnswerFeedbackSubmit(t){return M(this,void 0,void 0,function*(){return(yield this.makeGeneratedAnswerFeedbackSubmit(t)).log({searchUID:this.provider.getSearchUID()})})}makeGeneratedAnswerFeedbackSubmitV2(t){return this.makeCustomEvent(q.generatedAnswerFeedbackSubmitV2,t)}logGeneratedAnswerFeedbackSubmitV2(t){return M(this,void 0,void 0,function*(){return(yield this.makeGeneratedAnswerFeedbackSubmitV2(t)).log({searchUID:this.provider.getSearchUID()})})}makeRephraseGeneratedAnswer(t){return this.makeSearchEvent(q.rephraseGeneratedAnswer,t)}logRephraseGeneratedAnswer(t){return M(this,void 0,void 0,function*(){return(yield this.makeRephraseGeneratedAnswer(t)).log({searchUID:this.provider.getSearchUID()})})}makeRetryGeneratedAnswer(){return this.makeSearchEvent(q.retryGeneratedAnswer)}logRetryGeneratedAnswer(){return M(this,void 0,void 0,function*(){return(yield this.makeRetryGeneratedAnswer()).log({searchUID:this.provider.getSearchUID()})})}makeGeneratedAnswerStreamEnd(t){return this.makeCustomEvent(q.generatedAnswerStreamEnd,t)}logGeneratedAnswerStreamEnd(t){return M(this,void 0,void 0,function*(){return(yield this.makeGeneratedAnswerStreamEnd(t)).log({searchUID:this.provider.getSearchUID()})})}},vo=Object.assign({},dn),Pu=Object.keys(vo).map(e=>vo[e]),hr=class extends ga{constructor({client:t,uuidGenerator:r=zt}){super({client:t,uuidGenerator:r}),this.ticket={}}getApi(t){let r=super.getApi(t);if(r!==null)return r;switch(t){case"setTicket":return this.setTicket;default:return null}}addHooks(){this.addHooksForEvent(),this.addHooksForPageView(),this.addHooksForSVCEvents()}setTicket(t){this.ticket=t}clearPluginData(){this.ticket={}}addHooksForSVCEvents(){this.client.registerBeforeSendEventHook((t,...[r])=>Pu.indexOf(t)!==-1?this.addSVCDataToPayload(t,r):r),this.client.registerAfterSendEventHook((t,...[r])=>(Pu.indexOf(t)!==-1&&this.updateLocationInformation(t,r),r))}addHooksForPageView(){this.client.addEventTypeMapping(vo.pageview,{newEventType:ae.collect,variableLengthArgumentsNames:["page"],addVisitorIdParameter:!0,usesMeasurementProtocol:!0})}addHooksForEvent(){this.client.addEventTypeMapping(vo.event,{newEventType:ae.collect,variableLengthArgumentsNames:["eventCategory","eventAction","eventLabel","eventValue"],addVisitorIdParameter:!0,usesMeasurementProtocol:!0})}addSVCDataToPayload(t,r){var n;let o=Object.assign(Object.assign(Object.assign(Object.assign({},this.getLocationInformation(t,r)),this.getDefaultContextInformation(t)),this.action?{svcAction:this.action}:{}),Object.keys((n=this.actionData)!==null&&n!==void 0?n:{}).length>0?{svcActionData:this.actionData}:{}),i=this.getTicketPayload();return this.clearData(),Object.assign(Object.assign(Object.assign({},i),o),r)}getTicketPayload(){return Qg(this.ticket)}};hr.Id="svc";var Co;(function(e){e.click="click",e.flowStart="flowStart"})(Co||(Co={}));var Be;(function(e){e.enterInterface="ticket_create_start",e.fieldUpdate="ticket_field_update",e.fieldSuggestionClick="ticket_classification_click",e.documentSuggestionClick="documentSuggestionClick",e.documentSuggestionQuickview="documentSuggestionQuickview",e.suggestionRate="suggestion_rate",e.nextCaseStep="ticket_next_stage",e.caseCancelled="ticket_cancel",e.caseSolved="ticket_cancel",e.caseCreated="ticket_create"})(Be||(Be={}));var bo;(function(e){e.quit="Quit",e.solved="Solved"})(bo||(bo={}));var Ao=class{constructor(t,r){var n;this.options=t,this.provider=r;let o=((n=t.enableAnalytics)!==null&&n!==void 0?n:!0)&&!yo();this.coveoAnalyticsClient=o?new Ze(t):new vr,this.svc=new hr({client:this.coveoAnalyticsClient})}disable(){this.coveoAnalyticsClient=new vr,this.svc=new hr({client:this.coveoAnalyticsClient})}enable(){this.coveoAnalyticsClient=new Ze(this.options),this.svc=new hr({client:this.coveoAnalyticsClient})}logEnterInterface(t){return this.svc.setAction(Be.enterInterface),this.svc.setTicket(t.ticket),this.sendFlowStartEvent()}logUpdateCaseField(t){return this.svc.setAction(Be.fieldUpdate,{fieldName:t.fieldName}),this.svc.setTicket(t.ticket),this.sendClickEvent()}logSelectFieldSuggestion(t){return this.svc.setAction(Be.fieldSuggestionClick,t.suggestion),this.svc.setTicket(t.ticket),this.sendClickEvent()}logSelectDocumentSuggestion(t){return this.logClickEvent(Be.documentSuggestionClick,t.suggestion.suggestion,{contentIDKey:"permanentId",contentIDValue:t.suggestion.permanentId})}logQuickviewDocumentSuggestion(t){return this.logClickEvent(Be.documentSuggestionQuickview,t.suggestion.suggestion,{contentIDKey:"permanentId",contentIDValue:t.suggestion.permanentId})}logRateDocumentSuggestion(t){return this.svc.setAction(Be.suggestionRate,Object.assign({rate:t.rating},t.suggestion)),this.svc.setTicket(t.ticket),this.sendClickEvent()}logMoveToNextCaseStep(t){return this.svc.setAction(Be.nextCaseStep,{stage:t?.stage}),this.svc.setTicket(t.ticket),this.sendClickEvent()}logCaseCancelled(t){return this.svc.setAction(Be.caseCancelled,{reason:bo.quit}),this.svc.setTicket(t.ticket),this.sendClickEvent()}logCaseSolved(t){return this.svc.setAction(Be.caseSolved,{reason:bo.solved}),this.svc.setTicket(t.ticket),this.sendClickEvent()}logCaseCreated(t){return this.svc.setAction(Be.caseCreated),this.svc.setTicket(t.ticket),this.sendClickEvent()}sendFlowStartEvent(){return this.coveoAnalyticsClient.sendEvent("event","svc",Co.flowStart,this.provider?{searchHub:this.provider.getOriginLevel1()}:null)}sendClickEvent(){return this.coveoAnalyticsClient.sendEvent("event","svc",Co.click,this.provider?{searchHub:this.provider.getOriginLevel1()}:null)}getBaseEventRequest(t){var r,n;return M(this,void 0,void 0,function*(){let o=Object.assign({},t);return Object.assign(Object.assign({},this.getOrigins()),{customData:o,language:(r=this.provider)===null||r===void 0?void 0:r.getLanguage(),anonymous:(n=this.provider)===null||n===void 0?void 0:n.getIsAnonymous(),clientId:yield this.getClientId()})})}getClientId(){return this.coveoAnalyticsClient instanceof Ze?this.coveoAnalyticsClient.getCurrentVisitorId():void 0}getOrigins(){var t,r,n,o,i;return{originContext:(r=(t=this.provider)===null||t===void 0?void 0:t.getOriginContext)===null||r===void 0?void 0:r.call(t),originLevel1:(n=this.provider)===null||n===void 0?void 0:n.getOriginLevel1(),originLevel2:(o=this.provider)===null||o===void 0?void 0:o.getOriginLevel2(),originLevel3:(i=this.provider)===null||i===void 0?void 0:i.getOriginLevel3()}}logClickEvent(t,r,n,o){var i,a;return M(this,void 0,void 0,function*(){let m=Object.assign(Object.assign(Object.assign({},r),yield this.getBaseEventRequest(Object.assign(Object.assign({},n),o))),{searchQueryUid:(a=(i=this.provider)===null||i===void 0?void 0:i.getSearchUID())!==null&&a!==void 0?a:"",actionCause:t});return this.coveoAnalyticsClient.sendClickEvent(m)})}};var Uu=e=>new Ze(e).getCurrentVisitorId(),et=new Ou.HistoryStore,mn=(e,t)=>typeof t=="function"?(...r)=>{let n=Gr(r[0]);try{return t.apply(t,r)}catch(o){return e.error(o,"Error in analytics preprocessRequest. Returning original request."),n}}:void 0,gn=(e,t)=>(...r)=>{let n=Gr(r[1]);try{return t.apply(t,r)}catch(o){return e.error(o,"Error in analytics hook. Returning original request."),n}};d();c();l();u();d();c();l();u();var Cr=fe(e=>e.source,e=>Object.entries(e).map(([t,r])=>`${t}@${r}`).concat(`@coveo/headless@${cr}`));d();c();l();u();d();c();l();u();d();c();l();u();d();c();l();u();function wo(){return{desiredCount:5,numberOfValues:8,set:{}}}d();c();l();u();d();c();l();u();d();c();l();u();function Bu(e){let{activeValue:t,ancestryMap:r}=Vh(e);return t?Lh(t,r):[]}function Vh(e){let t=[...e],r=new Map;for(;t.length>0;){let n=t.shift();if(n.state==="selected")return{activeValue:n,ancestryMap:r};if(r)for(let o of n.children)r.set(o,n);t.unshift(...n.children)}return{}}function Lh(e,t){let r=[];if(!e)return[];let n=e;do r.unshift(n),n=t.get(n);while(n);return r}var jh=(e,t)=>e.categoryFacetSet[t]?.request;var Ia=(e,t)=>{let r=jh(e,t);return Bu(r?.currentValues??[])};d();c();l();u();function xo(){return{}}d();c();l();u();function Ro(){return{}}d();c();l();u();function Eo(){return{}}d();c();l();u();function Po(){return{}}function Ta(e){return{facetSet:e.facetSet??Po(),categoryFacetSet:e.categoryFacetSet??xo(),dateFacetSet:e.dateFacetSet??Ro(),numericFacetSet:e.numericFacetSet??Eo(),automaticFacetSet:e.automaticFacetSet??wo()}}var Fa=e=>{let t=[];return Qh(e).forEach((r,n)=>{let o=Jh(e,r.facetId),i=Kh(r,n+1);if(Bh(r)){if(!!!Ia(e,r.facetId).length)return;t.push({...i,...Wh(e,r.facetId),facetType:o,state:"selected"});return}r.currentValues.forEach((a,m)=>{if(a.state==="idle")return;let f=Qu(a,m+1,o),p=Uh(r)?$u(a):Hh(a);t.push({...i,...f,...p})})}),$h(e).forEach((r,n)=>{let o=Gh(r,n+1);r.values.forEach((i,a)=>{if(i.state==="idle")return;let m=Qu(i,a+1,"specific"),f=$u(i);t.push({...o,...m,...f})})}),t},Uh=e=>e.type==="specific",Bh=e=>e.type==="hierarchical",Qh=e=>[...Object.values(e.facetSet),...Object.values(e.categoryFacetSet),...Object.values(e.dateFacetSet),...Object.values(e.numericFacetSet)].map(t=>t.request),$h=e=>[...Object.values(e.automaticFacetSet.set)].map(t=>t.response),Qu=(e,t,r)=>({state:e.state,valuePosition:t,facetType:r}),Hh=e=>({displayValue:`${e.start}..${e.end}`,value:`${e.start}..${e.end}`,start:e.start,end:e.end,endInclusive:e.endInclusive}),$u=e=>({displayValue:e.value,value:e.value}),zh=(e,t)=>Ia(e,t).map(n=>n.value).join(";"),Wh=(e,t)=>{let n=zh(e,t);return{value:n,valuePosition:1,displayValue:n}},Gh=(e,t)=>({title:Hu(e.field,e.field),field:e.field,id:e.field,facetPosition:t}),Kh=(e,t)=>({title:Hu(e.field,e.facetId),field:e.field,id:e.facetId,facetPosition:t}),Hu=(e,t)=>`${e}_${t}`,Yh=(e,t)=>e.facetSet[t]?.request||e.categoryFacetSet[t]?.request||e.dateFacetSet[t]?.request||e.numericFacetSet[t]?.request||e.automaticFacetSet.set[t]?.response,Jh=(e,t)=>{let r=Yh(e,t);return r?r.type:"specific"};d();c();l();u();var Ve=()=>({q:"",enableQuerySyntax:!1});d();c();l();u();d();c();l();u();var zu=(r=>(r.Ascending="ascending",r.Descending="descending",r))(zu||{}),Wu=(i=>(i.Relevancy="relevancy",i.QRE="qre",i.Date="date",i.Field="field",i.NoSort="nosort",i))(Wu||{}),ka=e=>{if(sc(e))return e.map(t=>ka(t)).join(",");switch(e.by){case"relevancy":case"qre":case"nosort":return e.by;case"date":return`date ${e.order}`;case"field":return`@${e.field} ${e.order}`;default:return""}},Gu=()=>({by:"relevancy"});var NI=new K({values:{by:new qi({enum:Wu,required:!0}),order:new qi({enum:zu}),field:new H}});function Io(){return ka(Gu())}d();c();l();u();d();c();l();u();var br=()=>"default";var Xh=e=>{let t=e.configuration.search.locale.split("-")[0];return!t||t.length!==2?"en":t},lt=class{constructor(t){this.getState=t;pe(this,"state");this.state=t()}getLanguage(){return Xh(this.state)}getBaseMetadata(){let{context:t,configuration:r}=this.state,n=t?.contextValues||{},o={};for(let[i,a]of Object.entries(n)){let m=`context_${i}`;o[m]=a}return r.analytics.analyticsMode==="legacy"&&(o.coveoHeadlessVersion=cr),o}getOriginContext(){return this.state.configuration.analytics.originContext}getOriginLevel1(){return this.state.searchHub||br()}getOriginLevel2(){return this.state.configuration.analytics.originLevel2}getOriginLevel3(){return this.state.configuration.analytics.originLevel3}getIsAnonymous(){return this.state.configuration.analytics.anonymous}};var hn=class hn extends lt{constructor(){super(...arguments);pe(this,"getFacetRequest",r=>this.state.facetSet?.[r]?.request||this.state.categoryFacetSet?.[r]?.request||this.state.dateFacetSet?.[r]?.request||this.state.numericFacetSet?.[r]?.request||this.state.automaticFacetSet?.set[r]?.response)}getFacetState(){return Fa(Ta(this.getState()))}getPipeline(){return this.state.pipeline||this.state.search?.response.pipeline||hn.fallbackPipelineName}getSearchEventRequestPayload(){return{queryText:this.queryText,responseTime:this.responseTime,results:this.resultURIs,numberOfResults:this.numberOfResults}}getSearchUID(){let r=this.getState();return r.search?.searchResponseId||r.search?.response.searchUid||We().response.searchUid}getSplitTestRunName(){return this.state.search?.response.splitTestRun}getSplitTestRunVersion(){let r=!!this.getSplitTestRunName(),n=this.state.search?.response.pipeline||this.state.pipeline||hn.fallbackPipelineName;return r?n:void 0}getBaseMetadata(){let r=this.getState(),n=super.getBaseMetadata(),o=r.search?.response?.extendedResults?.generativeQuestionAnsweringId;return o&&(n.generativeQuestionAnsweringId=o),n}getFacetMetadata(r,n){let i=this.getFacetRequest(r)?.field??"";return{...this.getBaseMetadata(),facetId:r,facetField:i,facetValue:n,facetTitle:`${i}_${r}`}}getFacetClearAllMetadata(r){let o=this.getFacetRequest(r)?.field??"";return{...this.getBaseMetadata(),facetId:r,facetField:o,facetTitle:`${o}_${r}`}}getFacetUpdateSortMetadata(r,n){let i=this.getFacetRequest(r)?.field??"";return{...this.getBaseMetadata(),facetId:r,facetField:i,criteria:n,facetTitle:`${i}_${r}`}}getRangeBreadcrumbFacetMetadata(r,n){let i=this.getFacetRequest(r)?.field??"";return{...this.getBaseMetadata(),facetId:r,facetField:i,facetRangeEnd:n.end,facetRangeEndInclusive:n.endInclusive,facetRangeStart:n.start,facetTitle:`${i}_${r}`}}getResultSortMetadata(){return{...this.getBaseMetadata(),resultsSortBy:this.state.sortCriteria??Io()}}getStaticFilterToggleMetadata(r,n){return{...this.getBaseMetadata(),staticFilterId:r,staticFilterValue:n}}getStaticFilterClearAllMetadata(r){return{...this.getBaseMetadata(),staticFilterId:r}}getUndoTriggerQueryMetadata(r){return{...this.getBaseMetadata(),undoneQuery:r}}getCategoryBreadcrumbFacetMetadata(r,n){let i=this.getFacetRequest(r)?.field??"";return{...this.getBaseMetadata(),categoryFacetId:r,categoryFacetField:i,categoryFacetPath:n,categoryFacetTitle:`${i}_${r}`}}getOmniboxAnalyticsMetadata(r,n){let o=this.state.querySuggest&&this.state.querySuggest[r],i=o.completions.map(p=>p.expression),a=o.partialQueries.length-1,m=o.partialQueries[a]||"",f=o.responseId;return{...this.getBaseMetadata(),suggestionRanking:i.indexOf(n),partialQuery:m,partialQueries:o.partialQueries.length>0?o.partialQueries:"",suggestions:i.length>0?i:"",querySuggestResponseId:f}}getInterfaceChangeMetadata(){return{...this.getBaseMetadata(),interfaceChangeTo:this.state.configuration.analytics.originLevel2}}getOmniboxFromLinkMetadata(r){return{...this.getBaseMetadata(),...r}}getGeneratedAnswerMetadata(){let r=this.getState(),n={};return r.generatedAnswer?.isVisible!==void 0&&(n.showGeneratedAnswer=r.generatedAnswer.isVisible),n}get resultURIs(){return this.results?.map(r=>({documentUri:r.uri,documentUriHash:r.raw.urihash}))}get results(){return this.state.search?.response.results}get queryText(){return this.state.query?.q||Ve().q}get responseTime(){return this.state.search?.duration||We().duration}get numberOfResults(){return this.state.search?.response.totalCountFiltered||We().response.totalCountFiltered}};pe(hn,"fallbackPipelineName","default");var bt=hn,Ku=({logger:e,getState:t,analyticsClientMiddleware:r=(i,a)=>a,preprocessRequest:n,provider:o=new bt(t)})=>{let i=t(),a=i.configuration.accessToken,m=i.configuration.analytics.apiBaseUrl??Ie(i.configuration.organizationId,i.configuration.environment,"analytics"),f=i.configuration.analytics.runtimeEnvironment,p=i.configuration.analytics.enabled,h=new So({token:a,endpoint:m,runtimeEnvironment:f,preprocessRequest:mn(e,n),beforeSendHooks:[gn(e,r),(y,S)=>(e.info({...S,type:y,endpoint:m,token:a},"Analytics request"),S)]},o);return p||h.disable(),h},Oa=()=>{let t=et.getHistory().reverse().find(r=>r.name==="PageView"&&r.value);return t?t.value:""};var To=/*#__PURE__*/function(){var _ref7=_asyncToGenerator(function*(e,t){let r=e.analyticsMode==="next";return{analytics:{clientId:yield Uu(e),clientTimestamp:new Date().toISOString(),documentReferrer:e.originLevel3,originContext:e.originContext,...(t&&{actionCause:t.actionCause,customData:t.customData}),...(t&&!r&&{customData:t.customData}),...(e.userDisplayName&&{userDisplayName:e.userDisplayName}),...(e.documentLocation&&{documentLocation:e.documentLocation}),...(e.deviceId&&{deviceId:e.deviceId}),...(Oa()&&{pageId:Oa()}),...(r&&e.trackingId&&{trackingId:e.trackingId}),capture:r,...(r&&{source:Cr(e)})}}});return function To(_x9,_x10){return _ref7.apply(this,arguments)}}();d();c();l();u();d();c();l();u();d();c();l();u();var Ar=()=>({duration:0,error:null,isLoading:!1,id:"Recommendation",recommendations:[],searchUid:"",splitTestRun:"",pipeline:""});var yn=class extends lt{getPipeline(){return this.state.pipeline||this.state.recommendation?.pipeline||"default"}getSearchEventRequestPayload(){return{queryText:Ve().q,responseTime:this.responseTime,results:this.mapResultsToAnalyticsDocument(),numberOfResults:this.numberOfResults}}getSearchUID(){return this.getState().recommendation?.searchUid||Ar().searchUid}getSplitTestRunName(){return this.state.recommendation?.splitTestRun}getSplitTestRunVersion(){let t=!!this.getSplitTestRunName(),r=this.state.recommendation?.pipeline||this.state.pipeline||"default";return t?r:void 0}get responseTime(){return this.state.recommendation?.duration||Ar().duration}mapResultsToAnalyticsDocument(){return this.state.recommendation?.recommendations.map(t=>({documentUri:t.uri,documentUriHash:t.raw.urihash}))}get numberOfResults(){return this.state.recommendation?.recommendations.length||Ar().recommendations.length}};d();c();l();u();d();c();l();u();d();c();l();u();d();c();l();u();d();c();l();u();d();c();l();u();var Yu=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i;function Zh(e){return typeof e=="string"&&Yu.test(e)}var Da=Zh;d();c();l();u();var Re=[];for(let e=0;e<256;++e)Re.push((e+256).toString(16).slice(1));function Ju(e,t=0){return(Re[e[t+0]]+Re[e[t+1]]+Re[e[t+2]]+Re[e[t+3]]+"-"+Re[e[t+4]]+Re[e[t+5]]+"-"+Re[e[t+6]]+Re[e[t+7]]+"-"+Re[e[t+8]]+Re[e[t+9]]+"-"+Re[e[t+10]]+Re[e[t+11]]+Re[e[t+12]]+Re[e[t+13]]+Re[e[t+14]]+Re[e[t+15]]).toLowerCase()}d();c();l();u();var Ma,ey=new Uint8Array(16);function qa(){if(!Ma){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Ma=crypto.getRandomValues.bind(crypto)}return Ma(ey)}d();c();l();u();d();c();l();u();var ty=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Na={randomUUID:ty};function ry(e,t,r){if(Na.randomUUID&&!t&&!e)return Na.randomUUID();e=e||{};let n=e.random??e.rng?.()??qa();if(n.length<16)throw new Error("Random bytes length must be >= 16");if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,t){if(r=r||0,r<0||r+16>t.length)throw new RangeError(`UUID byte range ${r}:${r+15} is out of buffer bounds`);for(let o=0;o<16;++o)t[r+o]=n[o];return t}return Ju(n)}var _a=ry;d();c();l();u();function Xu(){let e=typeof window<"u";return{sendMessage(t){e&&window.postMessage(t,"*")}}}function ny({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 Zu="visitorId";function oy(e){return{getClientId:()=>{let t=e.get(),r=t.storage,n=r.getItem(Zu),o=n&&Da(n)?n:t.generateUUID();return r.setItem(Zu,o),o}}}var tl="1.2.0";function iy(e){let{trackingId:t}=e;return{trackingId:t}}function ay(e){return(e.source||[]).concat([`relay@${tl}`])}function rl(e,t,r,n){let{getReferrer:o,getLocation:i,getUserAgent:a}=r,m=iy(t),f=n.getClientId();return Object.freeze({type:e,config:m,ts:Date.now(),source:ay(t),clientId:f,userAgent:a(),referrer:o(),location:i()})}function sy(e,t,r,n,o){return{...t,meta:rl(e,r,n,o)}}var cy="*";function uy(){let e=[];function t({type:f,callback:p}){return e.findIndex(h=>h.type===f&&h.callback===p)}function r(f,p){return f.type==="*"||p===f.type}function n(f){return t(f)<0&&e.push(f),()=>m(f.type,f.callback)}function o(f){e.forEach(p=>{if(r(p,f.meta.type))try{p.callback(f)}catch(h){console.error(h)}})}function i(f){if(f===cy)e.length=0;else for(let p=e.length-1;p>=0;p--)e[p].type===f&&e.splice(p,1)}function a(f){let p=t(f);p>=0&&e.splice(p,1)}function m(f,p){p?a({type:f,callback:p}):i(f)}return{add:n,call:o,remove:m}}function el({url:e,token:t,trackingId:r,...n}){return Object.freeze({url:e,token:t,trackingId:r,...(!!n.mode&&{mode:n.mode}),...(!!n.source&&{source:n.source}),...(!!n.environment&&{environment:n.environment})})}function ly(e){let t=el(e);return{get:()=>t,update:r=>{t=el({...t,...r})}}}var Va=dy();function dy(){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()}`,m=i?`;domain=${i}`:"";document.cookie=`${e}${r}=${n}${a}${m};path=/;SameSite=Lax`},removeItem(r){this.setItem(r,"",-1)}}}function py(){return{getItem(e){return Va.getItem(e)||localStorage.getItem(e)},removeItem(e){Va.removeItem(e),localStorage.removeItem(e)},setItem(e,t){localStorage.setItem(e,t),Va.setItem(e,t,31556952e3)}}}function fy(){let e=document.referrer;return e===""?null:e}function my(){return{runtime:"browser",send:(e,t,r)=>{let n=navigator.sendBeacon(`${e}?access_token=${t}`,new Blob([JSON.stringify([r])],{type:"application/json"}));if(Xu().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:()=>fy(),getLocation:()=>window.location.href,getUserAgent:()=>navigator.userAgent,generateUUID:()=>_a(),storage:py()}}function gy(){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 hy(){return{getItem(){return null},removeItem(){},setItem(){}}}function yy(){return{runtime:"null",send:()=>{},getReferrer:()=>null,getLocation:()=>null,getUserAgent:()=>null,generateUUID:()=>"",storage:hy()}}function Sy(e){let t=e.get().mode!=="disabled",r=e.get().environment,n=yy();return t&&r?{storage:n.storage,...r,runtime:"custom"}:t&&vy()&&gy()?my():n}function vy(){try{return typeof window=="object"}catch{return!1}}function Cy(e){return{get:()=>Object.freeze(Sy(e))}}function nl(e){let t=ly(e),r=uy(),n=Cy(t),o=oy(n);return{emit:(i,a)=>{let m=t.get(),f=n.get(),p=sy(i,a,m,f,o);return ny({config:m,environment:f,event:p,listenerManager:r})},getMeta:i=>rl(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:tl}}var wr=fe(e=>e.configuration.organizationId,e=>e.configuration.environment,e=>e.configuration.accessToken,e=>e.configuration.analytics,e=>Cr(e.configuration.analytics),(e,t,r,{trackingId:n,apiBaseUrl:o,enabled:i},a)=>nl({mode:i?"emit":"disabled",url:o??Ln(e,t),token:r,trackingId:n,source:a}));d();c();l();u();var Sn=class extends lt{getSearchUID(){return this.state.documentSuggestion?.status.lastResponseId??""}},ol=({logger:e,getState:t,analyticsClientMiddleware:r=(i,a)=>a,preprocessRequest:n,provider:o=new Sn(t)})=>{let i=t(),a=i.configuration.accessToken,m=i.configuration.analytics.apiBaseUrl??Ie(i.configuration.organizationId,i.configuration.environment,"analytics"),f=i.configuration.analytics.runtimeEnvironment,p=i.configuration.analytics.enabled,h=new Ao({enableAnalytics:p,token:a,endpoint:m,runtimeEnvironment:f,preprocessRequest:mn(e,n),beforeSendHooks:[gn(e,r),(y,S)=>(e.info({...S,type:y,endpoint:m,token:a},"Analytics request"),S)]},o);return p||h.disable(),h};d();c();l();u();d();c();l();u();function il(e,t){return{...new bt(t).getBaseMetadata(),actionCause:e,type:e}}function by(e){return Object.assign(e,{instantlyCallable:!0})}function Ay(e,t){let r=i=>by(ue(e,i)),n=r(/*#__PURE__*/function(){var _ref8=_asyncToGenerator(function*(i,{getState:a,extra:m}){let{analyticsClientMiddleware:f,preprocessRequest:p,logger:h}=m;return yield(yield t({getState:a,analyticsClientMiddleware:f,preprocessRequest:p,logger:h})).log({state:a(),extra:m})});return function(_x11,_x12){return _ref8.apply(this,arguments)}}());return Object.assign(n,{prepare:function(){var _ref9=_asyncToGenerator(function*({getState:i,analyticsClientMiddleware:a,preprocessRequest:m,logger:f}){let{description:p,log:h}=yield t({getState:i,analyticsClientMiddleware:a,preprocessRequest:m,logger:f});return{description:p,action:r(/*#__PURE__*/function(){var _ref10=_asyncToGenerator(function*(y,{getState:S,extra:g}){return yield h({state:S(),extra:g})});return function(_x14,_x15){return _ref10.apply(this,arguments)}}())}});return function prepare(_x13){return _ref9.apply(this,arguments)}}()}),n}var al=(e,t,r)=>{function n(...o){let i=o.length===1?{...o[0],__legacy__getBuilder:t(o[0].__legacy__getBuilder),analyticsConfigurator:e,providerClass:r}:{prefix:o[0],__legacy__getBuilder:t(o[1]),__legacy__provider:o[2],analyticsConfigurator:e,providerClass:r};return Ry(i)}return n},wy=e=>e.configuration.analytics.analyticsMode==="legacy",xy=e=>e.configuration.analytics.analyticsMode==="next",Ry=({prefix:e,__legacy__getBuilder:t,__legacy__provider:r,analyticsPayloadBuilder:n,analyticsType:o,analyticsConfigurator:i,providerClass:a})=>(r??(r=m=>new a(m)),Ay(e,/*#__PURE__*/function(){var _ref11=_asyncToGenerator(function*({getState:m,analyticsClientMiddleware:f,preprocessRequest:p,logger:h}){let y=[],S={log:function(){var _ref12=_asyncToGenerator(function*({state:x}){for(let T of y)yield T(x)});return function log(_x17){return _ref12.apply(this,arguments)}}()},g=m(),v=i({getState:m,logger:h,analyticsClientMiddleware:f,preprocessRequest:p,provider:r(m)}),R=yield t(v,m());S.description=R?.description,y.push(/*#__PURE__*/function(){var _ref13=_asyncToGenerator(function*(x){wy(x)&&(yield Ey(R,r,x,h,v.coveoAnalyticsClient))});return function(_x18){return _ref13.apply(this,arguments)}}());let{emit:I}=wr(g);return y.push(/*#__PURE__*/function(){var _ref14=_asyncToGenerator(function*(x){if(xy(x)&&o&&n){let T=n(x);yield Dy(I,o,T)}});return function(_x19){return _ref14.apply(this,arguments)}}()),S});return function(_x16){return _ref11.apply(this,arguments)}}()));function Ey(_x20,_x21,_x22,_x23,_x24){return _Ey.apply(this,arguments)}function _Ey(){_Ey=_asyncToGenerator(function*(e,t,r,n,o){t(()=>r);let i=yield e?.log({searchUID:t(()=>r).getSearchUID()});n.info({client:o,response:i},"Analytics response")});return _Ey.apply(this,arguments)}var Py=e=>r=>(n,o)=>Promise.resolve({description:{actionCause:e},log:function(){var _ref15=_asyncToGenerator(function*(i){r(n,o)});return function log(_x25){return _ref15.apply(this,arguments)}}()}),qe=al(Ku,e=>e,bt),Kk=al(ol,Py("caseAssist"),Sn);var La=(e,t)=>{let r=t.recommendation?.recommendations.findIndex(({uniqueId:n})=>e.uniqueId===n)||0;return Iy(e,r,t)};function Iy(e,t,r){let n=e.raw.collection;return{collectionName:typeof n=="string"?n:"default",documentAuthor:ky(e),documentPosition:t+1,documentTitle:e.title,documentUri:e.uri,documentUriHash:e.raw.urihash,documentUrl:e.clickUri,rankingModifier:e.rankingModifier||"",sourceName:Oy(e),queryPipeline:r.pipeline||fr()}}var Fo=e=>(e.raw.permanentid||console.warn("Missing field permanentid on result. This might cause many issues with your Coveo deployment. See https://docs.coveo.com/en/1913 and https://docs.coveo.com/en/1640 for more information.",e),{contentIDKey:"permanentid",contentIDValue:e.raw.permanentid||""}),sl={urihash:new H,sourcetype:new H,permanentid:new H},cl={uniqueId:G,raw:new K({values:sl}),title:G,uri:G,clickUri:G,rankingModifier:new H({required:!1,emptyAllowed:!0})};function Ty(e){return Object.assign({},...Object.keys(sl).map(t=>({[t]:e[t]})))}function Fy(e){return Object.assign({},...Object.keys(cl).map(t=>({[t]:e[t]})),{raw:Ty(e.raw)})}function ky(e){let t=e.raw.author;return X(t)?"unknown":Array.isArray(t)?t.join(";"):`${t}`}function Oy(e){let t=e.raw.source;return X(t)?"unknown":t}var ja=e=>new Fe(cl).validate(Fy(e));function Dy(_x26,_x27,_x28){return _Dy.apply(this,arguments)}function _Dy(){_Dy=_asyncToGenerator(function*(e,t,r){yield e(t,r)});return _Dy.apply(this,arguments)}d();c();l();u();var ul=()=>qe("analytics/recommendation/update",e=>e.makeRecommendationInterfaceLoad(),e=>new yn(e)),ll=()=>({actionCause:"recommendationInterfaceLoad"}),Oo=e=>qe({prefix:"analytics/recommendation/open",__legacy__getBuilder:(t,r)=>(ja(e),t.makeRecommendationOpen(La(e,r),Fo(e))),__legacy__provider:t=>new yn(t),analyticsType:"itemClick",analyticsPayloadBuilder:t=>{let r=La(e,t),n=Fo(e);return{responseId:e.searchUid??"",position:r.documentPosition,itemMetadata:{uniqueFieldName:n.contentIDKey,uniqueFieldValue:n.contentIDValue,title:r.documentTitle,author:r.documentAuthor,url:r.documentUrl}}}});var xr=D("recommendation/set",e=>B(e,{id:G})),At=ue("recommendation/get",/*#__PURE__*/function(){var _ref16=_asyncToGenerator(function*(e,{getState:t,rejectWithValue:r,extra:{apiClient:n}}){let o=t(),i=new Date().getTime(),a=yield My(o),m=yield n.recommendations(a),f=new Date().getTime()-i;return ke(m)?r(m.error):{recommendations:m.success.results,analyticsAction:ul(),duration:f,searchUid:m.success.searchUid,splitTestRun:m.success.splitTestRun,pipeline:m.success.pipeline}});return function(_x29,_x30){return _ref16.apply(this,arguments)}}()),My=/*#__PURE__*/function(){var _ref17=_asyncToGenerator(function*(e){return{accessToken:e.configuration.accessToken,organizationId:e.configuration.organizationId,url:e.configuration.search.apiBaseUrl??ht(e.configuration.organizationId,e.configuration.environment),recommendation:e.recommendation.id,tab:e.configuration.analytics.originLevel2,referrer:e.configuration.analytics.originLevel3,timezone:e.configuration.search.timezone,locale:e.configuration.search.locale,actionsHistory:e.configuration.analytics.enabled?et.getHistory():[],...(e.advancedSearchQueries&&{aq:e.advancedSearchQueries.aq,cq:e.advancedSearchQueries.cq}),...(e.pipeline&&{pipeline:e.pipeline}),...(e.searchHub&&{searchHub:e.searchHub}),...(e.context&&{context:e.context.contextValues}),...(e.dictionaryFieldContext&&{dictionaryFieldContext:e.dictionaryFieldContext.contextValues}),...(e.fields&&{fieldsToInclude:e.fields.fieldsToInclude}),...(e.configuration.analytics.enabled&&(yield qy(e,ll()))),...(e.configuration.search.authenticationProviders.length&&{authentication:e.configuration.search.authenticationProviders.join(",")}),...(e.pagination&&{numberOfResults:e.pagination.numberOfResults})}});return function My(_x31){return _ref17.apply(this,arguments)}}(),qy=/*#__PURE__*/function(){var _ref18=_asyncToGenerator(function*(e,t){let r=e.configuration.analytics.analyticsMode==="legacy"?void 0:{actionCause:t.actionCause,type:t.actionCause};return yield To(e.configuration.analytics,r)});return function qy(_x32,_x33){return _ref18.apply(this,arguments)}}();var Rr=ge(Ar(),e=>{e.addCase(xr,(t,r)=>{t.id=r.payload.id}).addCase(At.rejected,(t,r)=>{t.error=r.payload?r.payload:null,t.isLoading=!1}).addCase(At.fulfilled,(t,r)=>{t.error=null,t.recommendations=r.payload.recommendations.map(n=>({...n,searchUid:r.payload.searchUid})),t.duration=r.payload.duration,t.isLoading=!1,t.searchUid=r.payload.searchUid,t.splitTestRun=r.payload.splitTestRun,t.pipeline=r.payload.pipeline}).addCase(At.pending,t=>{t.isLoading=!0})});d();c();l();u();var Er=D("searchHub/set",e=>B(e,new H({required:!0,emptyAllowed:!0})));d();c();l();u();var Pr=ge(br(),e=>{e.addCase(Er,(t,r)=>r.payload).addCase(Me.fulfilled,(t,r)=>r.payload?.searchHub??t).addCase(Je,(t,r)=>r.payload.searchHub||t)});d();c();l();u();d();c();l();u();d();c();l();u();var Ua=e=>({referrer:document.referrer,userAgent:navigator.userAgent,location:window.location.href,clientId:e}),vn=()=>({referrer:null,userAgent:null,location:null,clientId:""});d();c();l();u();var dl=fe(e=>e.advancedSearchQueries,e=>{if(!e)return{};let{aq:t,cq:r,dq:n,lq:o}=e;return{...(t&&{aq:t}),...(r&&{cq:r}),...(n&&{dq:n}),...(o&&{lq:o})}});d();c();l();u();var Do=(e,t,r)=>({analytics:{clientId:t.clientId,clientTimestamp:new Date().toISOString(),documentReferrer:t.referrer,documentLocation:t.location,originContext:e.originContext,...(r&&{actionCause:r.actionCause}),...(r&&{customData:r.customData}),...(e.userDisplayName&&{userDisplayName:e.userDisplayName}),...(e.deviceId&&{deviceId:e.deviceId}),...(e.trackingId&&{trackingId:e.trackingId}),capture:t.capture??t.clientId!=="",source:Cr(e)}});d();c();l();u();d();c();l();u();d();c();l();u();d();c();l();u();var Cn=fe(e=>e.query,e=>e);var pl=e=>_y(e)?{answerAPIEnabled:!0,id:ml(e).data?.answerId}:Ny(e)?{answerAPIEnabled:!1,id:e.search.response.extendedResults.generativeQuestionAnsweringId}:{answerAPIEnabled:!1,id:void 0},Ny=e=>"search"in e,_y=e=>"answer"in e&&"generatedAnswer"in e&&!X(e.generatedAnswer?.answerConfigurationId),fl=e=>e.generatedAnswer?.fieldsToIncludeInCitations,Vy=fe(e=>e.generatedAnswer?.citations,(e,t)=>t,(e,t)=>e?.find(r=>r.id===t)),TD=fe(e=>Cn(e)?.q,e=>e.search.requestId,(e,t)=>({q:e,requestId:t}));var Mo=e=>qe({prefix:"analytics/generatedAnswer/streamEnd",__legacy__getBuilder:(t,r)=>{let{id:n,answerAPIEnabled:o}=pl(r),i=e?!r.generatedAnswer?.answer||!r.generatedAnswer?.answer.length:void 0;return n?t.makeGeneratedAnswerStreamEnd({...(o?{answerAPIStreamId:n}:{generativeQuestionAnsweringId:n}),answerGenerated:e,answerTextIsEmpty:i}):null},analyticsType:"Rga.AnswerReceived",analyticsPayloadBuilder:t=>({answerId:t.search?.response.searchUid||"",answerGenerated:e??!1})});d();c();l();u();var gl=/*#__PURE__*/function(){var _ref19=_asyncToGenerator(function*(e){return{accessToken:e.configuration.accessToken,organizationId:e.configuration.organizationId,url:Ie(e.configuration.organizationId,e.configuration.environment),streamId:e.search.extendedResults?.generativeQuestionAnsweringId}});return function gl(_x34){return _ref19.apply(this,arguments)}}();d();c();l();u();var hl=["text/plain","text/markdown"];var Ir=new H({required:!0}),Sl=new H,Tr=new te({required:!0}),Ly={id:Ir,title:Ir,uri:Ir,permanentid:Ir,clickUri:Sl},vl=new H({required:!0,constrainTo:hl}),p0=D("generatedAnswer/setIsVisible",e=>B(e,Tr)),f0=D("generatedAnswer/setIsEnabled",e=>B(e,Tr)),Qa=D("generatedAnswer/updateMessage",e=>B(e,{textDelta:Ir})),$a=D("generatedAnswer/updateCitations",e=>B(e,{citations:new ie({required:!0,each:new K({values:Ly})})})),jy=D("generatedAnswer/updateError",e=>B(e,{message:Sl,code:new J({min:0})})),Uy=D("generatedAnswer/resetAnswer"),m0=D("generatedAnswer/like"),g0=D("generatedAnswer/dislike"),h0=D("generatedAnswer/feedbackModal/open"),y0=D("generatedAnswer/expand"),S0=D("generatedAnswer/collapse"),v0=D("generatedAnswer/setId",e=>B(e,{id:new H({required:!0})})),C0=D("generatedAnswer/feedbackModal/close"),b0=D("generatedAnswer/sendFeedback"),Ba=D("generatedAnswer/setIsLoading",e=>B(e,Tr)),yl=D("generatedAnswer/setIsStreaming",e=>B(e,Tr)),Ha=D("generatedAnswer/setAnswerContentFormat",e=>B(e,vl)),A0=D("generatedAnswer/updateResponseFormat",e=>B(e,{contentFormat:new ie({each:vl,default:["text/plain"]})})),w0=D("knowledge/updateAnswerConfigurationId",e=>B(e,Ir)),x0=D("generatedAnswer/registerFieldsToIncludeInCitations",e=>B(e,ro)),By=D("generatedAnswer/setIsAnswerGenerated",e=>B(e,Tr)),za=D("generatedAnswer/setCannotAnswer",e=>B(e,Tr)),R0=ue("generatedAnswer/streamAnswer",/*#__PURE__*/function(){var _ref20=_asyncToGenerator(function*(e,t){let r=t.getState(),{dispatch:n,extra:o,getState:i}=t,{search:a}=i(),{queryExecuted:m}=a,{setAbortControllerRef:f}=e,p=yield gl(r),h=(g,v)=>{switch(g){case"genqa.headerMessageType":{let R=JSON.parse(v);n(Ha(R.contentFormat));break}case"genqa.messageType":n(Qa(JSON.parse(v)));break;case"genqa.citationsType":n($a(JSON.parse(v)));break;case"genqa.endOfStreamType":{let R=JSON.parse(v).answerGenerated,I=m.length!==0&&!R;n(za(I)),n(yl(!1)),n(By(R)),n(Mo(R));break}default:r.debug&&o.logger.warn(`Unknown payloadType: "${g}"`)}};n(Ba(!0));let y=g=>g.streamId===t.getState().search.extendedResults.generativeQuestionAnsweringId,S=o.streamingClient?.streamGeneratedAnswer(p,{write:g=>{y(p)&&(n(Ba(!1)),g.payload&&g.payloadType&&h(g.payloadType,g.payload))},abort:g=>{y(p)&&n(jy(g))},close:()=>{y(p)&&n(yl(!1))},resetAnswer:()=>{y(p)&&n(Uy())}});S?f(S):n(Ba(!1))});return function(_x35,_x36){return _ref20.apply(this,arguments)}}());d();c();l();u();d();c();l();u();var Cl=fe(e=>e.pipeline,e=>e);d();c();l();u();var bl=fe(e=>e.searchHub,e=>e);d();c();l();u();d();c();l();u();var bn=je(qo(),1),Pl=je(Al(),1);d();c();l();u();var No=je(qo(),1),xl=je(wl(),1);No.default.extend(xl.default);var Rl="YYYY/MM/DD@HH:mm:ss",Qy="1401-01-01";function Fr(e,t){let r=(0,No.default)(e,t);return!r.isValid()&&!t?(0,No.default)(e,Rl):r}function _o(e){return e.format(Rl)}function El(e,t){let r=Fr(e,t);if(!r.isValid()){let n=". Please provide a date format string in the configuration options. See https://day.js.org/docs/en/parse/string-format for more information.",o=` with the format "${t}"`;throw new Error(`Could not parse the provided date "${e}"${t?o:n}`)}Za(r)}function Za(e){if(e.isBefore(Qy))throw new Error(`Date is before year 1401, which is unsupported by the API: ${e}`)}bn.default.extend(Pl.default);var Il=["past","now","next"],Tl=["minute","hour","day","week","month","quarter","year"],$y=e=>{let t=e==="now";return{amount:new J({required:!t,min:1}),unit:new H({required:!t,constrainTo:Tl}),period:new H({required:!0,constrainTo:Il})}};function es(e){if(typeof e=="string"&&!wt(e))throw new Error(`The value "${e}" is not respecting the relative date format "period-amount-unit"`);let t=typeof e=="string"?Ml(e):e;new Fe($y(t.period)).validate(t);let r=kl(t),n=JSON.stringify(t);if(!r.isValid())throw new Error(`Date is invalid: ${n}`);Za(r)}function Fl(e){let{period:t,amount:r,unit:n}=e;switch(t){case"past":case"next":return`${t}-${r}-${n}`;case"now":return t}}function kl(e){let{period:t,amount:r,unit:n}=e;switch(t){case"past":return(0,bn.default)().subtract(r,n);case"next":return(0,bn.default)().add(r,n);case"now":return(0,bn.default)()}}function An(e){return _o(kl(Ml(e)))}function Ol(e){return e.toLocaleLowerCase().split("-")}function wt(e){let[t,r,n]=Ol(e);if(t==="now")return!0;if(!Il.includes(t)||!Tl.includes(n))return!1;let o=parseInt(r);return!(isNaN(o)||o<=0)}function Dl(e){return!!e&&typeof e=="object"&&"period"in e}function Ml(e){let[t,r,n]=Ol(e);return t==="now"?{period:"now"}:{period:t,amount:r?parseInt(r):void 0,unit:n||void 0}}d();c();l();u();function ql(e){return e.type==="dateRange"}function Nl(e){return`start${e}`}function _l(e){return`end${e}`}var ts=()=>({dateFacetValueMap:{}});function Hy(e,t,r){let n=e.start,o=e.end;return wt(n)&&(n=An(n),r.dateFacetValueMap[t][Nl(n)]=e.start),wt(o)&&(o=An(o),r.dateFacetValueMap[t][_l(o)]=e.end),{...e,start:n,end:o}}function rs(e,t){if(ql(e)){let{facetId:r,currentValues:n}=e;return t.dateFacetValueMap[r]={},{...e,currentValues:n.map(o=>Hy(o,r,t))}}return e}function xt(e){let t=ts();return{request:{...e,facets:e.facets?.map(n=>rs(n,t))},mappings:t}}function zy(e,t,r){return{...e,start:r.dateFacetValueMap[t][Nl(e.start)]||e.start,end:r.dateFacetValueMap[t][_l(e.end)]||e.end}}function Wy(e,t){return e.facetId in t.dateFacetValueMap}function Gy(e,t){return Wy(e,t)?{...e,values:e.values.map(r=>zy(r,e.facetId,t))}:e}function Vo(e,t){return"success"in e?{success:{...e.success,facets:e.success.facets?.map(n=>Gy(n,t))}}:e}d();c();l();u();var Lo=fe(e=>e.staticFilterSet,e=>Object.values(e||{}).map(r=>{let n=r.values.filter(i=>i.state==="selected"&&!!i.expression.trim()),o=n.map(i=>i.expression).join(" OR ");return n.length>1?`(${o})`:o}));d();c();l();u();var ns=fe(e=>e,e=>{if(!e)return"";for(let t in e)if(e[t].isActive)return e[t].id;return""}),Vl=fe(e=>e,e=>{let t=ns(e);return t&&e?e[t].expression:""});d();c();l();u();d();c();l();u();function Rt(e){return Object.values(e).map(t=>t.request)}function os(e,t){let r={};e.forEach(i=>r[i.facetId]=i);let n=[];t.forEach(i=>{i in r&&(n.push(r[i]),delete r[i])});let o=Object.values(r);return[...n,...o]}function Ll(e){return Rt(e).map(t=>{let n=t.currentValues.some(({state:o})=>o!=="idle");return t.generateAutomaticRanges&&!n?{...t,currentValues:[]}:t})}var is={alphanumericDescending:{type:"alphanumeric",order:"descending"},alphanumericNaturalDescending:{type:"alphanumericNatural",order:"descending"}};function Ky(e){return Rt(e).map(t=>{let r=is[t.sortCriteria];return r?{...t,sortCriteria:r}:t})}function Yy(e){return[...Ky(e.facetSet??{}),...Ll(e.numericFacetSet??{}),...Ll(e.dateFacetSet??{}),...Rt(e.categoryFacetSet??{})]}function Jy(e){return Yy(e).filter(({facetId:t})=>e.facetOptions?.facets[t]?.enabled??!0)}function jo(e){return os(Jy(e),e.facetOrder??[])}d();c();l();u();d();c();l();u();function Ul(_x37,_x38){return _Ul.apply(this,arguments)}function _Ul(){_Ul=_asyncToGenerator(function*(e,t){let r=e.getReader(),n;for(;!(n=yield r.read()).done;)t(n.value)});return _Ul.apply(this,arguments)}function Bl(e){let t,r,n,o=!1;return function(a){t===void 0?(t=a,r=0,n=-1):t=Zy(t,a);let m=t.length,f=0;for(;r<m;){o&&(t[r]===10&&(f=++r),o=!1);let p=-1;for(;r<m&&p===-1;++r)switch(t[r]){case 58:n===-1&&(n=r-f);break;case 13:o=!0,p=r;break;case 10:p=r;break}if(p===-1)break;e(t.subarray(f,p),n),f=r,n=-1}f===m?t=void 0:f!==0&&(t=t.subarray(f),r-=f)}}function Ql(e,t,r){let n=jl(),o=new TextDecoder;return function(a,m){if(a.length===0)r?.(n),n=jl();else if(m>0){let f=o.decode(a.subarray(0,m)),p=m+(a[m+1]===32?2:1),h=o.decode(a.subarray(p));switch(f){case"data":n.data=n.data?n.data+`
31
+ `+h:h;break;case"event":n.event=h;break;case"id":e(n.id=h);break;case"retry":Xy(h,n,t);break}}}}function Xy(e,t,r){let n=parseInt(e,10);isNaN(n)||r(t.retry=n)}function Zy(e,t){let r=new Uint8Array(e.length+t.length);return r.set(e),r.set(t,e.length),r}function jl(){return{data:"",event:"",id:"",retry:void 0}}var as="text/event-stream",eS=1e3,$l="last-event-id";function Hl(){return typeof window<"u"}function zl(e,{signal:t,headers:r,onopen:n,onmessage:o,onclose:i,onerror:a,openWhenHidden:m,fetch:f,...p}){return new Promise((h,y)=>{let S={...r};S.accept||(S.accept=as);let g;function v(){g?.abort(),document.hidden||E()}!m&&Hl()&&document.addEventListener("visibilitychange",v);let R=eS,I;function x(){Hl()&&document.removeEventListener("visibilitychange",v),clearTimeout(I),g?.abort()}t?.addEventListener("abort",()=>{x(),h()});let T=f??b,w=n??tS;function E(){return _E.apply(this,arguments)}function _E(){_E=_asyncToGenerator(function*(){g=s.AbortController?new s.AbortController:null;try{let N=yield T(e,{...p,headers:S,signal:g?.signal});yield w(N),yield Ul(N.body,Bl(Ql(k=>{k?S[$l]=k:delete S[$l]},k=>{R=k},o))),i?.(),x(),h()}catch(N){if(!g?.signal?.aborted)try{let k=a?.(N)??R;clearTimeout(I),I=setTimeout(E,k)}catch(k){x(),y(k)}}});return _E.apply(this,arguments)}E()})}function tS(e){let t=e.headers.get("content-type");if(!t?.startsWith(as))throw new Error(`Expected content-type to be ${as}, Actual: ${t}`)}d();c();l();u();d();c();l();u();function Wl(e){return{status:e,isUninitialized:e==="uninitialized",isLoading:e==="pending",isSuccess:e==="fulfilled",isError:e==="rejected"}}var Gl=Ke;function ad(e,t){if(e===t||!(Gl(e)&&Gl(t)||Array.isArray(e)&&Array.isArray(t)))return t;let r=Object.keys(t),n=Object.keys(e),o=r.length===n.length,i=Array.isArray(t)?[]:{};for(let a of r)i[a]=ad(e[a],t[a]),o&&(o=e[a]===i[a]);return o?e:i}function kr(e){let t=0;for(let r in e)t++;return t}var Kl=e=>[].concat(...e);function rS(e){return new RegExp("(^|:)//").test(e)}function nS(){return typeof document>"u"?!0:document.visibilityState!=="hidden"}function Qo(e){return e!=null}function oS(){return typeof navigator>"u"||navigator.onLine===void 0?!0:navigator.onLine}var iS=e=>e.replace(/\/$/,""),aS=e=>e.replace(/^\//,"");function sS(e,t){if(!e)return t;if(!t)return e;if(rS(t))return t;let r=e.endsWith("/")||!t.startsWith("?")?"/":"";return e=iS(e),t=aS(t),`${e}${r}${t}`}function cS(e,t,r){return e.has(t)?e.get(t):e.set(t,r).get(t)}var Yl=(...e)=>b(...e),uS=e=>e.status>=200&&e.status<=299,lS=e=>/ion\/(vnd\.api\+)?json/.test(e.get("content-type")||"");function Jl(e){if(!Ke(e))return e;let t={...e};for(let[r,n]of Object.entries(t))n===void 0&&delete t[r];return t}function sd({baseUrl:e,prepareHeaders:t=y=>y,fetchFn:r=Yl,paramsSerializer:n,isJsonContentType:o=lS,jsonContentType:i="application/json",jsonReplacer:a,timeout:m,responseHandler:f,validateStatus:p,...h}={}){return typeof b>"u"&&r===Yl&&console.warn("Warning: `fetch` is not available. Please supply a custom `fetchFn` property to use `fetchBaseQuery` on SSR environments."),(/*#__PURE__*/function(){var _ref21=_asyncToGenerator(function*(S,g,v){let{getState:R,extra:I,endpoint:x,forced:T,type:w}=g,E,{url:N,headers:k=new A(h.headers),params:P=void 0,responseHandler:F=f??"json",validateStatus:O=p??uS,timeout:_=m,...$}=typeof S=="string"?{url:S}:S,U,L=g.signal;_&&(U=new s.AbortController,g.signal.addEventListener("abort",U.abort),L=U.signal);let V={...h,signal:L,...$};k=new A(Jl(k)),V.headers=(yield t(k,{getState:R,arg:S,extra:I,endpoint:x,forced:T,type:w,extraOptions:v}))||k;let Q=Z=>typeof Z=="object"&&(Ke(Z)||Array.isArray(Z)||typeof Z.toJSON=="function");if(!V.headers.has("content-type")&&Q(V.body)&&V.headers.set("content-type",i),Q(V.body)&&o(V.headers)&&(V.body=JSON.stringify(V.body,a)),P){let Z=~N.indexOf("?")?"&":"?",oe=n?n(P):new URLSearchParams(Jl(P));N+=Z+oe}N=sS(e,N);let j=new Request(N,V);E={request:new Request(N,V)};let W,Y=!1,re=U&&setTimeout(()=>{Y=!0,U.abort()},_);try{W=yield r(j)}catch(Z){return{error:{status:Y?"TIMEOUT_ERROR":"FETCH_ERROR",error:String(Z)},meta:E}}finally{re&&clearTimeout(re),U?.signal.removeEventListener("abort",U.abort)}let se=W.clone();E.response=se;let ee,ne="";try{let Z;if(yield Promise.all([y(W,F).then(oe=>ee=oe,oe=>Z=oe),se.text().then(oe=>ne=oe,()=>{})]),Z)throw Z}catch(Z){return{error:{status:"PARSING_ERROR",originalStatus:W.status,data:ne,error:String(Z)},meta:E}}return O(W,ee)?{data:ee,meta:E}:{error:{status:W.status,data:ee},meta:E}});return function(_x39,_x40,_x41){return _ref21.apply(this,arguments)}}());function y(_x42,_x43){return _y2.apply(this,arguments)}function _y2(){_y2=_asyncToGenerator(function*(S,g){if(typeof g=="function")return g(S);if(g==="content-type"&&(g=o(S.headers)?"json":"text"),g==="json"){let v=yield S.text();return v.length?JSON.parse(v):null}return S.text()});return _y2.apply(this,arguments)}}var Or=class{constructor(e,t=void 0){this.value=e,this.meta=t}};function dS(){return _dS.apply(this,arguments)}function _dS(){_dS=_asyncToGenerator(function*(e=0,t=5){let r=Math.min(e,t),n=~~((Math.random()+.4)*(300<<r));yield new Promise(o=>setTimeout(i=>o(i),n))});return _dS.apply(this,arguments)}function pS(e,t){throw Object.assign(new Or({error:e,meta:t}),{throwImmediately:!0})}var Xl={},fS=(e,t)=>(/*#__PURE__*/function(){var _ref22=_asyncToGenerator(function*(r,n,o){let i=[5,(t||Xl).maxRetries,(o||Xl).maxRetries].filter(h=>h!==void 0),[a]=i.slice(-1),f={maxRetries:a,backoff:dS,retryCondition:(h,y,{attempt:S})=>S<=a,...t,...o},p=0;for(;;)try{let h=yield e(r,n,o);if(h.error)throw new Or(h);return h}catch(h){if(p++,h.throwImmediately){if(h instanceof Or)return h.value;throw h}if(h instanceof Or&&!f.retryCondition(h.value.error,r,{attempt:p,baseQueryApi:n,extraOptions:o}))return h.value;yield f.backoff(p,f.maxRetries)}});return function(_x44,_x45,_x46){return _ref22.apply(this,arguments)}}()),cd=Object.assign(fS,{fail:pS}),ds=D("__rtkq/focused"),ud=D("__rtkq/unfocused"),ps=D("__rtkq/online"),ld=D("__rtkq/offline");function fs(e){return e.type==="query"}function mS(e){return e.type==="mutation"}function ms(e){return e.type==="infinitequery"}function gs(e,t,r,n,o,i){return gS(e)?e(t,r,n,o).filter(Qo).map(cs).map(i):Array.isArray(e)?e.map(cs).map(i):[]}function gS(e){return typeof e=="function"}function cs(e){return typeof e=="string"?{type:e}:e}function hS(e,t){return e.catch(t)}var xn=Symbol("forceQueryFn"),us=e=>typeof e[xn]=="function";function yS({serializeQueryArgs:e,queryThunk:t,infiniteQueryThunk:r,mutationThunk:n,api:o,context:i}){let a=new Map,m=new Map,{unsubscribeQueryResult:f,removeMutationResult:p,updateSubscriptionOptions:h}=o.internalActions;return{buildInitiateQuery:x,buildInitiateInfiniteQuery:T,buildInitiateMutation:w,getRunningQueryThunk:y,getRunningMutationThunk:S,getRunningQueriesThunk:g,getRunningMutationsThunk:v};function y(E,N){return k=>{let P=i.endpointDefinitions[E],F=e({queryArgs:N,endpointDefinition:P,endpointName:E});return a.get(k)?.[F]}}function S(E,N){return k=>m.get(k)?.[N]}function g(){return E=>Object.values(a.get(E)||{}).filter(Qo)}function v(){return E=>Object.values(m.get(E)||{}).filter(Qo)}function R(E){}function I(E,N){let k=(P,{subscribe:F=!0,forceRefetch:O,subscriptionOptions:_,[xn]:$,...U}={})=>(L,V)=>{let Q=e({queryArgs:P,endpointDefinition:N,endpointName:E}),j,z={...U,type:"query",subscribe:F,forceRefetch:O,subscriptionOptions:_,endpointName:E,originalArgs:P,queryCacheKey:Q,[xn]:$};if(fs(N))j=t(z);else{let{direction:ce,initialPageParam:me}=U;j=r({...z,direction:ce,initialPageParam:me})}let W=o.endpoints[E].select(P),Y=L(j),re=W(V());let{requestId:se,abort:ee}=Y,ne=re.requestId!==se,Z=a.get(L)?.[Q],oe=()=>W(V()),he=Object.assign($?Y.then(oe):ne&&!Z?Promise.resolve(re):Promise.all([Z,Y]).then(oe),{arg:P,requestId:se,subscriptionOptions:_,queryCacheKey:Q,abort:ee,unwrap(){return _asyncToGenerator(function*(){let ce=yield he;if(ce.isError)throw ce.error;return ce.data})()},refetch:()=>L(k(P,{subscribe:!1,forceRefetch:!0})),unsubscribe(){F&&L(f({queryCacheKey:Q,requestId:se}))},updateSubscriptionOptions(ce){he.subscriptionOptions=ce,L(h({endpointName:E,requestId:se,queryCacheKey:Q,options:ce}))}});if(!Z&&!ne&&!$){let ce=cS(a,L,{});ce[Q]=he,he.then(()=>{delete ce[Q],kr(ce)||a.delete(L)})}return he};return k}function x(E,N){return I(E,N)}function T(E,N){return I(E,N)}function w(E){return(N,{track:k=!0,fixedCacheKey:P}={})=>(F,O)=>{let _=n({type:"mutation",endpointName:E,originalArgs:N,track:k,fixedCacheKey:P}),$=F(_);let{requestId:U,abort:L,unwrap:V}=$,Q=hS($.unwrap().then(Y=>({data:Y})),Y=>({error:Y})),j=()=>{F(p({requestId:U,fixedCacheKey:P}))},z=Object.assign(Q,{arg:$.arg,requestId:U,abort:L,unwrap:V,reset:j}),W=m.get(F)||{};return m.set(F,W),W[U]=z,z.then(()=>{delete W[U],kr(W)||m.delete(F)}),P&&(W[P]=z,z.then(()=>{W[P]===z&&(delete W[P],kr(W)||m.delete(F))})),z}}}function SS(e){return e}var Uo=(e={})=>({...e,[sn]:!0});function vS({reducerPath:e,baseQuery:t,context:{endpointDefinitions:r},serializeQueryArgs:n,api:o,assertTagType:i,selectors:a}){let m=(F,O,_,$)=>(U,L)=>{let V=r[F],Q=n({queryArgs:O,endpointDefinition:V,endpointName:F});if(U(o.internalActions.queryResultPatched({queryCacheKey:Q,patches:_})),!$)return;let j=o.endpoints[F].select(O)(L()),z=gs(V.providesTags,j.data,void 0,O,{},i);U(o.internalActions.updateProvidedBy({queryCacheKey:Q,providedTags:z}))};function f(F,O,_=0){let $=[O,...F];return _&&$.length>_?$.slice(0,-1):$}function p(F,O,_=0){let $=[...F,O];return _&&$.length>_?$.slice(1):$}let h=(F,O,_,$=!0)=>(U,L)=>{let Q=o.endpoints[F].select(O)(L()),j={patches:[],inversePatches:[],undo:()=>U(o.util.patchQueryData(F,O,j.inversePatches,$))};if(Q.status==="uninitialized")return j;let z;if("data"in Q)if(De(Q.data)){let[W,Y,re]=Kn(Q.data,_);j.patches.push(...Y),j.inversePatches.push(...re),z=W}else z=_(Q.data),j.patches.push({op:"replace",path:[],value:z}),j.inversePatches.push({op:"replace",path:[],value:Q.data});return j.patches.length===0||U(o.util.patchQueryData(F,O,j.patches,$)),j},y=(F,O,_)=>$=>$(o.endpoints[F].initiate(O,{subscribe:!1,forceRefetch:!0,[xn]:()=>({data:_})})),S=(F,O)=>F.query&&F[O]?F[O]:SS,g=/*#__PURE__*/function(){var _ref23=_asyncToGenerator(function*(F,{signal:O,abort:_,rejectWithValue:$,fulfillWithValue:U,dispatch:L,getState:V,extra:Q}){let j=r[F.endpointName];try{let z=S(j,"transformResponse"),W={signal:O,abort:_,dispatch:L,getState:V,extra:Q,endpoint:F.endpointName,type:F.type,forced:F.type==="query"?v(F,V()):void 0,queryCacheKey:F.type==="query"?F.queryCacheKey:void 0},Y=F.type==="query"?F[xn]:void 0,re,se=/*#__PURE__*/function(){var _ref24=_asyncToGenerator(function*(ne,Z,oe,he){if(Z==null&&ne.pages.length)return Promise.resolve({data:ne});let ce={queryArg:F.originalArgs,pageParam:Z},me=yield ee(ce),ye=he?f:p;return{data:{pages:ye(ne.pages,me.data,oe),pageParams:ye(ne.pageParams,Z,oe)}}});return function se(_x49,_x50,_x51,_x52){return _ref24.apply(this,arguments)}}();function ee(_x53){return _ee.apply(this,arguments)}function _ee(){_ee=_asyncToGenerator(function*(ne){let Z,{extraOptions:oe}=j;if(Y?Z=Y():j.query?Z=yield t(j.query(ne),W,oe):Z=yield j.queryFn(ne,W,oe,ce=>t(ce,W,oe)),typeof process<"u",Z.error)throw new Or(Z.error,Z.meta);let he=yield z(Z.data,Z.meta,ne);return{...Z,data:he}});return _ee.apply(this,arguments)}if(F.type==="query"&&"infiniteQueryOptions"in j){let{infiniteQueryOptions:ne}=j,{maxPages:Z=1/0}=ne,oe,he={pages:[],pageParams:[]},ce=a.selectQueryEntry(V(),F.queryCacheKey)?.data,ye=v(F,V())&&!F.direction||!ce?he:ce;if("direction"in F&&F.direction&&ye.pages.length){let Te=F.direction==="backward",ft=(Te?dd:ls)(ne,ye);oe=yield se(ye,ft,Z,Te)}else{let{initialPageParam:Te=ne.initialPageParam}=F,Le=ce?.pageParams??[],ft=Le[0]??Te,Jt=Le.length;oe=yield se(ye,ft,Z),Y&&(oe={data:oe.data.pages[0]});for(let Xt=1;Xt<Jt;Xt++){let Ur=ls(ne,oe.data);oe=yield se(oe.data,Ur,Z)}}re=oe}else re=yield ee(F.originalArgs);return U(re.data,Uo({fulfilledTimeStamp:Date.now(),baseQueryMeta:re.meta}))}catch(z){let W=z;if(W instanceof Or){let Y=S(j,"transformErrorResponse");try{return $(yield Y(W.value,W.meta,F.originalArgs),Uo({baseQueryMeta:W.meta}))}catch(re){W=re}}throw typeof process<"u",console.error(W),W}});return function g(_x47,_x48){return _ref23.apply(this,arguments)}}();function v(F,O){let _=a.selectQueryEntry(O,F.queryCacheKey),$=a.selectConfig(O).refetchOnMountOrArgChange,U=_?.fulfilledTimeStamp,L=F.forceRefetch??(F.subscribe&&$);return L?L===!0||(Number(new Date)-Number(U))/1e3>=L:!1}let R=()=>ue(`${e}/executeQuery`,g,{getPendingMeta({arg:O}){let _=r[O.endpointName];return Uo({startedTimeStamp:Date.now(),...(ms(_)?{direction:O.direction}:{})})},condition(O,{getState:_}){let $=_(),U=a.selectQueryEntry($,O.queryCacheKey),L=U?.fulfilledTimeStamp,V=O.originalArgs,Q=U?.originalArgs,j=r[O.endpointName],z=O.direction;return us(O)?!0:U?.status==="pending"?!1:v(O,$)||fs(j)&&j?.forceRefetch?.({currentArg:V,previousArg:Q,endpointState:U,state:$})?!0:!(L&&!z)},dispatchConditionRejection:!0}),I=R(),x=R(),T=ue(`${e}/executeMutation`,g,{getPendingMeta(){return Uo({startedTimeStamp:Date.now()})}}),w=F=>"force"in F,E=F=>"ifOlderThan"in F,N=(F,O,_)=>($,U)=>{let L=w(_)&&_.force,V=E(_)&&_.ifOlderThan,Q=(z=!0)=>{let W={forceRefetch:z,isPrefetch:!0};return o.endpoints[F].initiate(O,W)},j=o.endpoints[F].select(O)(U());if(L)$(Q());else if(V){let z=j?.fulfilledTimeStamp;if(!z){$(Q());return}(Number(new Date)-Number(new Date(z)))/1e3>=V&&$(Q())}else $(Q(!1))};function k(F){return O=>O?.meta?.arg?.endpointName===F}function P(F,O){return{matchPending:ar(Zn(F),k(O)),matchFulfilled:ar(at(F),k(O)),matchRejected:ar($t(F),k(O))}}return{queryThunk:I,mutationThunk:T,infiniteQueryThunk:x,prefetch:N,updateQueryData:h,upsertQueryData:y,patchQueryData:m,buildMatchThunkActions:P}}function ls(e,{pages:t,pageParams:r}){let n=t.length-1;return e.getNextPageParam(t[n],t,r[n],r)}function dd(e,{pages:t,pageParams:r}){return e.getPreviousPageParam?.(t[0],t,r[0],r)}function pd(e,t,r,n){return gs(r[e.meta.arg.endpointName][t],at(e)?e.payload:void 0,un(e)?e.payload:void 0,e.meta.arg.originalArgs,"baseQueryMeta"in e.meta?e.meta.baseQueryMeta:void 0,n)}function Bo(e,t,r){let n=e[t];n&&r(n)}function Rn(e){return("arg"in e?e.arg.fixedCacheKey:e.fixedCacheKey)??e.requestId}function Zl(e,t,r){let n=e[Rn(t)];n&&r(n)}var wn={};function CS({reducerPath:e,queryThunk:t,mutationThunk:r,serializeQueryArgs:n,context:{endpointDefinitions:o,apiUid:i,extractRehydrationInfo:a,hasRehydrationInfo:m},assertTagType:f,config:p}){let h=D(`${e}/resetApiState`);function y(k,P,F,O){var _;k[_=P.queryCacheKey]??(k[_]={status:"uninitialized",endpointName:P.endpointName}),Bo(k,P.queryCacheKey,$=>{$.status="pending",$.requestId=F&&$.requestId?$.requestId:O.requestId,P.originalArgs!==void 0&&($.originalArgs=P.originalArgs),$.startedTimeStamp=O.startedTimeStamp;let U=o[O.arg.endpointName];ms(U)&&"direction"in P&&($.direction=P.direction)})}function S(k,P,F,O){Bo(k,P.arg.queryCacheKey,_=>{if(_.requestId!==P.requestId&&!O)return;let{merge:$}=o[P.arg.endpointName];if(_.status="fulfilled",$){if(_.data!==void 0){let{fulfilledTimeStamp:U,arg:L,baseQueryMeta:V,requestId:Q}=P,j=it(_.data,z=>$(z,F,{arg:L.originalArgs,baseQueryMeta:V,fulfilledTimeStamp:U,requestId:Q}));_.data=j}else _.data=F;}else _.data=o[P.arg.endpointName].structuralSharing??!0?ad(Ne(_.data)?oa(_.data):_.data,F):F;delete _.error,_.fulfilledTimeStamp=P.fulfilledTimeStamp})}let g=Ht({name:`${e}/queries`,initialState:wn,reducers:{removeQueryResult:{reducer(k,{payload:{queryCacheKey:P}}){delete k[P]},prepare:sr()},cacheEntriesUpserted:{reducer(k,P){for(let F of P.payload){let{queryDescription:O,value:_}=F;y(k,O,!0,{arg:O,requestId:P.meta.requestId,startedTimeStamp:P.meta.timestamp}),S(k,{arg:O,requestId:P.meta.requestId,fulfilledTimeStamp:P.meta.timestamp,baseQueryMeta:{}},_,!0)}},prepare:k=>({payload:k.map(O=>{let{endpointName:_,arg:$,value:U}=O,L=o[_];return{queryDescription:{type:"query",endpointName:_,originalArgs:O.arg,queryCacheKey:n({queryArgs:$,endpointDefinition:L,endpointName:_})},value:U}}),meta:{[sn]:!0,requestId:to(),timestamp:Date.now()}})},queryResultPatched:{reducer(k,{payload:{queryCacheKey:P,patches:F}}){Bo(k,P,O=>{O.data=aa(O.data,F.concat())})},prepare:sr()}},extraReducers(k){k.addCase(t.pending,(P,{meta:F,meta:{arg:O}})=>{let _=us(O);y(P,O,_,F)}).addCase(t.fulfilled,(P,{meta:F,payload:O})=>{let _=us(F.arg);S(P,F,O,_)}).addCase(t.rejected,(P,{meta:{condition:F,arg:O,requestId:_},error:$,payload:U})=>{Bo(P,O.queryCacheKey,L=>{if(!F){if(L.requestId!==_)return;L.status="rejected",L.error=U??$}})}).addMatcher(m,(P,F)=>{let{queries:O}=a(F);for(let[_,$]of Object.entries(O))($?.status==="fulfilled"||$?.status==="rejected")&&(P[_]=$)})}}),v=Ht({name:`${e}/mutations`,initialState:wn,reducers:{removeMutationResult:{reducer(k,{payload:P}){let F=Rn(P);F in k&&delete k[F]},prepare:sr()}},extraReducers(k){k.addCase(r.pending,(P,{meta:F,meta:{requestId:O,arg:_,startedTimeStamp:$}})=>{_.track&&(P[Rn(F)]={requestId:O,status:"pending",endpointName:_.endpointName,startedTimeStamp:$})}).addCase(r.fulfilled,(P,{payload:F,meta:O})=>{O.arg.track&&Zl(P,O,_=>{_.requestId===O.requestId&&(_.status="fulfilled",_.data=F,_.fulfilledTimeStamp=O.fulfilledTimeStamp)})}).addCase(r.rejected,(P,{payload:F,error:O,meta:_})=>{_.arg.track&&Zl(P,_,$=>{$.requestId===_.requestId&&($.status="rejected",$.error=F??O)})}).addMatcher(m,(P,F)=>{let{mutations:O}=a(F);for(let[_,$]of Object.entries(O))($?.status==="fulfilled"||$?.status==="rejected")&&_!==$?.requestId&&(P[_]=$)})}}),R=Ht({name:`${e}/invalidation`,initialState:wn,reducers:{updateProvidedBy:{reducer(k,P){var _,$;let{queryCacheKey:F,providedTags:O}=P.payload;for(let U of Object.values(k))for(let L of Object.values(U)){let V=L.indexOf(F);V!==-1&&L.splice(V,1)}for(let{type:U,id:L}of O){let V=(_=k[U]??(k[U]={}))[$=L||"__internal_without_id"]??(_[$]=[]);V.includes(F)||V.push(F)}},prepare:sr()}},extraReducers(k){k.addCase(g.actions.removeQueryResult,(P,{payload:{queryCacheKey:F}})=>{for(let O of Object.values(P))for(let _ of Object.values(O)){let $=_.indexOf(F);$!==-1&&_.splice($,1)}}).addMatcher(m,(P,F)=>{var _,$;let{provided:O}=a(F);for(let[U,L]of Object.entries(O))for(let[V,Q]of Object.entries(L)){let j=(_=P[U]??(P[U]={}))[$=V||"__internal_without_id"]??(_[$]=[]);for(let z of Q)j.includes(z)||j.push(z)}}).addMatcher(Ye(at(t),un(t)),(P,F)=>{let O=pd(F,"providesTags",o,f),{queryCacheKey:_}=F.meta.arg;R.caseReducers.updateProvidedBy(P,R.actions.updateProvidedBy({queryCacheKey:_,providedTags:O}))})}}),I=Ht({name:`${e}/subscriptions`,initialState:wn,reducers:{updateSubscriptionOptions(k,P){},unsubscribeQueryResult(k,P){},internal_getRTKQSubscriptions(){}}}),x=Ht({name:`${e}/internalSubscriptions`,initialState:wn,reducers:{subscriptionsUpdated:{reducer(k,P){return aa(k,P.payload)},prepare:sr()}}}),T=Ht({name:`${e}/config`,initialState:{online:oS(),focused:nS(),middlewareRegistered:!1,...p},reducers:{middlewareRegistered(k,{payload:P}){k.middlewareRegistered=k.middlewareRegistered==="conflict"||i!==P?"conflict":!0}},extraReducers:k=>{k.addCase(ps,P=>{P.online=!0}).addCase(ld,P=>{P.online=!1}).addCase(ds,P=>{P.focused=!0}).addCase(ud,P=>{P.focused=!1}).addMatcher(m,P=>({...P}))}}),w=nr({queries:g.reducer,mutations:v.reducer,provided:R.reducer,subscriptions:x.reducer,config:T.reducer}),E=(k,P)=>w(h.match(P)?void 0:k,P),N={...T.actions,...g.actions,...I.actions,...x.actions,...v.actions,...R.actions,resetApiState:h};return{reducer:E,actions:N}}var ss=Symbol.for("RTKQ/skipToken"),fd={status:"uninitialized"},ed=it(fd,()=>{}),td=it(fd,()=>{});function bS({serializeQueryArgs:e,reducerPath:t,createSelector:r}){let n=w=>ed,o=w=>td;return{buildQuerySelector:S,buildInfiniteQuerySelector:g,buildMutationSelector:v,selectInvalidatedBy:R,selectCachedArgsForQuery:I,selectApiState:a,selectQueries:m,selectMutations:p,selectQueryEntry:f,selectConfig:h};function i(w){return{...w,...Wl(w.status)}}function a(w){return w[t]}function m(w){return a(w)?.queries}function f(w,E){return m(w)?.[E]}function p(w){return a(w)?.mutations}function h(w){return a(w)?.config}function y(w,E,N){return k=>{if(k===ss)return r(n,N);let P=e({queryArgs:k,endpointDefinition:E,endpointName:w});return r(O=>f(O,P)??ed,N)}}function S(w,E){return y(w,E,i)}function g(w,E){let{infiniteQueryOptions:N}=E;function k(P){let F={...P,...Wl(P.status)},{isLoading:O,isError:_,direction:$}=F,U=$==="forward",L=$==="backward";return{...F,hasNextPage:x(N,F.data),hasPreviousPage:T(N,F.data),isFetchingNextPage:O&&U,isFetchingPreviousPage:O&&L,isFetchNextPageError:_&&U,isFetchPreviousPageError:_&&L}}return y(w,E,k)}function v(){return w=>{let E;return typeof w=="object"?E=Rn(w)??ss:E=w,r(E===ss?o:P=>a(P)?.mutations?.[E]??td,i)}}function R(w,E){let N=w[t],k=new Set;for(let P of E.filter(Qo).map(cs)){let F=N.provided[P.type];if(!F)continue;let O=(P.id!==void 0?F[P.id]:Kl(Object.values(F)))??[];for(let _ of O)k.add(_)}return Kl(Array.from(k.values()).map(P=>{let F=N.queries[P];return F?[{queryCacheKey:P,endpointName:F.endpointName,originalArgs:F.originalArgs}]:[]}))}function I(w,E){return Object.values(m(w)).filter(N=>N?.endpointName===E&&N.status!=="uninitialized").map(N=>N.originalArgs)}function x(w,E){return E?ls(w,E)!=null:!1}function T(w,E){return!E||!w.getPreviousPageParam?!1:dd(w,E)!=null}}var rd=WeakMap?new WeakMap:void 0,nd=({endpointName:e,queryArgs:t})=>{let r="",n=rd?.get(t);if(typeof n=="string")r=n;else{let o=JSON.stringify(t,(i,a)=>(a=typeof a=="bigint"?{$bigint:a.toString()}:a,a=Ke(a)?Object.keys(a).sort().reduce((m,f)=>(m[f]=a[f],m),{}):a,a));Ke(t)&&rd?.set(t,o),r=o}return`${e}(${r})`};function AS(...e){return function(r){let n=ir(p=>r.extractRehydrationInfo?.(p,{reducerPath:r.reducerPath??"api"})),o={reducerPath:"api",keepUnusedDataFor:60,refetchOnMountOrArgChange:!1,refetchOnFocus:!1,refetchOnReconnect:!1,invalidationBehavior:"delayed",...r,extractRehydrationInfo:n,serializeQueryArgs(p){let h=nd;if("serializeQueryArgs"in p.endpointDefinition){let y=p.endpointDefinition.serializeQueryArgs;h=S=>{let g=y(S);return typeof g=="string"?g:nd({...S,queryArgs:g})}}else r.serializeQueryArgs&&(h=r.serializeQueryArgs);return h(p)},tagTypes:[...(r.tagTypes||[])]},i={endpointDefinitions:{},batch(p){p()},apiUid:to(),extractRehydrationInfo:n,hasRehydrationInfo:ir(p=>n(p)!=null)},a={injectEndpoints:f,enhanceEndpoints({addTagTypes:p,endpoints:h}){if(p)for(let y of p)o.tagTypes.includes(y)||o.tagTypes.push(y);if(h)for(let[y,S]of Object.entries(h))typeof S=="function"?S(i.endpointDefinitions[y]):Object.assign(i.endpointDefinitions[y]||{},S);return a}},m=e.map(p=>p.init(a,o,i));function f(p){let h=p.endpoints({query:y=>({...y,type:"query"}),mutation:y=>({...y,type:"mutation"}),infiniteQuery:y=>({...y,type:"infinitequery"})});for(let[y,S]of Object.entries(h)){if(p.overrideExisting!==!0&&y in i.endpointDefinitions){if(p.overrideExisting==="throw")throw new Error(He(39));typeof process<"u";continue}typeof process<"u",i.endpointDefinitions[y]=S;for(let g of m)g.injectEndpoint(y,S)}return a}return a.injectEndpoints({endpoints:r.endpoints})}}function dt(e,...t){return Object.assign(e,...t)}var wS=({api:e,queryThunk:t,internalState:r})=>{let n=`${e.reducerPath}/subscriptions`,o=null,i=null,{updateSubscriptionOptions:a,unsubscribeQueryResult:m}=e.internalActions,f=(g,v)=>{var I,x;if(a.match(v)){let{queryCacheKey:T,requestId:w,options:E}=v.payload;return g?.[T]?.[w]&&(g[T][w]=E),!0}if(m.match(v)){let{queryCacheKey:T,requestId:w}=v.payload;return g[T]&&delete g[T][w],!0}if(e.internalActions.removeQueryResult.match(v))return delete g[v.payload.queryCacheKey],!0;if(t.pending.match(v)){let{meta:{arg:T,requestId:w}}=v,E=g[I=T.queryCacheKey]??(g[I]={});return E[`${w}_running`]={},T.subscribe&&(E[w]=T.subscriptionOptions??E[w]??{}),!0}let R=!1;if(t.fulfilled.match(v)||t.rejected.match(v)){let T=g[v.meta.arg.queryCacheKey]||{},w=`${v.meta.requestId}_running`;R||(R=!!T[w]),delete T[w]}if(t.rejected.match(v)){let{meta:{condition:T,arg:w,requestId:E}}=v;if(T&&w.subscribe){let N=g[x=w.queryCacheKey]??(g[x]={});N[E]=w.subscriptionOptions??N[E]??{},R=!0}}return R},p=()=>r.currentSubscriptions,S={getSubscriptions:p,getSubscriptionCount:g=>{let R=p()[g]??{};return kr(R)},isRequestSubscribed:(g,v)=>!!p()?.[g]?.[v]};return(g,v)=>{if(o||(o=JSON.parse(JSON.stringify(r.currentSubscriptions))),e.util.resetApiState.match(g))return o=r.currentSubscriptions={},i=null,[!0,!1];if(e.internalActions.internal_getRTKQSubscriptions.match(g))return[!1,S];let R=f(r.currentSubscriptions,g),I=!0;if(R){i||(i=setTimeout(()=>{let w=JSON.parse(JSON.stringify(r.currentSubscriptions)),[,E]=Kn(o,()=>w);v.next(e.internalActions.subscriptionsUpdated(E)),o=w,i=null},500));let x=typeof g.type=="string"&&!!g.type.startsWith(n),T=t.rejected.match(g)&&g.meta.condition&&!!g.meta.arg.subscribe;I=!x&&!T}return[I,!1]}};function xS(e){for(let t in e)return!1;return!0}var RS=2147483647/1e3-1,ES=({reducerPath:e,api:t,queryThunk:r,context:n,internalState:o,selectors:{selectQueryEntry:i,selectConfig:a}})=>{let{removeQueryResult:m,unsubscribeQueryResult:f,cacheEntriesUpserted:p}=t.internalActions,h=Ye(f.match,r.fulfilled,r.rejected,p.match);function y(I){let x=o.currentSubscriptions[I];return!!x&&!xS(x)}let S={},g=(I,x,T)=>{let w=x.getState(),E=a(w);if(h(I)){let N;if(p.match(I))N=I.payload.map(k=>k.queryDescription.queryCacheKey);else{let{queryCacheKey:k}=f.match(I)?I.payload:I.meta.arg;N=[k]}v(N,x,E)}if(t.util.resetApiState.match(I))for(let[N,k]of Object.entries(S))k&&clearTimeout(k),delete S[N];if(n.hasRehydrationInfo(I)){let{queries:N}=n.extractRehydrationInfo(I);v(Object.keys(N),x,E)}};function v(I,x,T){let w=x.getState();for(let E of I){let N=i(w,E);R(E,N?.endpointName,x,T)}}function R(I,x,T,w){let N=n.endpointDefinitions[x]?.keepUnusedDataFor??w.keepUnusedDataFor;if(N===1/0)return;let k=Math.max(0,Math.min(N,RS));if(!y(I)){let P=S[I];P&&clearTimeout(P),S[I]=setTimeout(()=>{y(I)||T.dispatch(m({queryCacheKey:I})),delete S[I]},k*1e3)}}return g},od=new Error("Promise never resolved before cacheEntryRemoved."),PS=({api:e,reducerPath:t,context:r,queryThunk:n,mutationThunk:o,internalState:i,selectors:{selectQueryEntry:a,selectApiState:m}})=>{let f=eo(n),p=eo(o),h=at(n,o),y={};function S(x,T,w){let E=y[x];E?.valueResolved&&(E.valueResolved({data:T,meta:w}),delete E.valueResolved)}function g(x){let T=y[x];T&&(delete y[x],T.cacheEntryRemoved())}let v=(x,T,w)=>{let E=R(x);function N(k,P,F,O){let _=a(w,P),$=a(T.getState(),P);!_&&$&&I(k,O,P,T,F)}if(n.pending.match(x))N(x.meta.arg.endpointName,E,x.meta.requestId,x.meta.arg.originalArgs);else if(e.internalActions.cacheEntriesUpserted.match(x))for(let{queryDescription:k,value:P}of x.payload){let{endpointName:F,originalArgs:O,queryCacheKey:_}=k;N(F,_,x.meta.requestId,O),S(_,P,{})}else if(o.pending.match(x))T.getState()[t].mutations[E]&&I(x.meta.arg.endpointName,x.meta.arg.originalArgs,E,T,x.meta.requestId);else if(h(x))S(E,x.payload,x.meta.baseQueryMeta);else if(e.internalActions.removeQueryResult.match(x)||e.internalActions.removeMutationResult.match(x))g(E);else if(e.util.resetApiState.match(x))for(let k of Object.keys(y))g(k)};function R(x){return f(x)?x.meta.arg.queryCacheKey:p(x)?x.meta.arg.fixedCacheKey??x.meta.requestId:e.internalActions.removeQueryResult.match(x)?x.payload.queryCacheKey:e.internalActions.removeMutationResult.match(x)?Rn(x.payload):""}function I(x,T,w,E,N){let k=r.endpointDefinitions[x],P=k?.onCacheEntryAdded;if(!P)return;let F={},O=new Promise(Q=>{F.cacheEntryRemoved=Q}),_=Promise.race([new Promise(Q=>{F.valueResolved=Q}),O.then(()=>{throw od})]);_.catch(()=>{}),y[w]=F;let $=e.endpoints[x].select(k.type==="query"?T:w),U=E.dispatch((Q,j,z)=>z),L={...E,getCacheEntry:()=>$(E.getState()),requestId:N,extra:U,updateCachedData:k.type==="query"?Q=>E.dispatch(e.util.updateQueryData(x,T,Q)):void 0,cacheDataLoaded:_,cacheEntryRemoved:O},V=P(T,L);Promise.resolve(V).catch(Q=>{if(Q!==od)throw Q})}return v},IS=({api:e,context:{apiUid:t},reducerPath:r})=>(n,o)=>{e.util.resetApiState.match(n)&&o.dispatch(e.internalActions.middlewareRegistered(t)),typeof process<"u"},TS=({reducerPath:e,context:t,context:{endpointDefinitions:r},mutationThunk:n,queryThunk:o,api:i,assertTagType:a,refetchQuery:m,internalState:f})=>{let{removeQueryResult:p}=i.internalActions,h=Ye(at(n),un(n)),y=Ye(at(n,o),$t(n,o)),S=[],g=(I,x)=>{h(I)?R(pd(I,"invalidatesTags",r,a),x):y(I)?R([],x):i.util.invalidateTags.match(I)&&R(gs(I.payload,void 0,void 0,void 0,void 0,a),x)};function v(I){let{queries:x,mutations:T}=I;for(let w of[x,T])for(let E in w)if(w[E]?.status==="pending")return!0;return!1}function R(I,x){let T=x.getState(),w=T[e];if(S.push(...I),w.config.invalidationBehavior==="delayed"&&v(w))return;let E=S;if(S=[],E.length===0)return;let N=i.util.selectInvalidatedBy(T,E);t.batch(()=>{let k=Array.from(N.values());for(let{queryCacheKey:P}of k){let F=w.queries[P],O=f.currentSubscriptions[P]??{};F&&(kr(O)===0?x.dispatch(p({queryCacheKey:P})):F.status!=="uninitialized"&&x.dispatch(m(F)))}})}return g},FS=({reducerPath:e,queryThunk:t,api:r,refetchQuery:n,internalState:o})=>{let i={},a=(g,v)=>{(r.internalActions.updateSubscriptionOptions.match(g)||r.internalActions.unsubscribeQueryResult.match(g))&&p(g.payload,v),(t.pending.match(g)||t.rejected.match(g)&&g.meta.condition)&&p(g.meta.arg,v),(t.fulfilled.match(g)||t.rejected.match(g)&&!g.meta.condition)&&f(g.meta.arg,v),r.util.resetApiState.match(g)&&y()};function m(g,v){let I=v.getState()[e].queries[g],x=o.currentSubscriptions[g];if(!(!I||I.status==="uninitialized"))return x}function f({queryCacheKey:g},v){let R=v.getState()[e],I=R.queries[g],x=o.currentSubscriptions[g];if(!I||I.status==="uninitialized")return;let{lowestPollingInterval:T,skipPollingIfUnfocused:w}=S(x);if(!Number.isFinite(T))return;let E=i[g];E?.timeout&&(clearTimeout(E.timeout),E.timeout=void 0);let N=Date.now()+T;i[g]={nextPollTimestamp:N,pollingInterval:T,timeout:setTimeout(()=>{(R.config.focused||!w)&&v.dispatch(n(I)),f({queryCacheKey:g},v)},T)}}function p({queryCacheKey:g},v){let I=v.getState()[e].queries[g],x=o.currentSubscriptions[g];if(!I||I.status==="uninitialized")return;let{lowestPollingInterval:T}=S(x);if(!Number.isFinite(T)){h(g);return}let w=i[g],E=Date.now()+T;(!w||E<w.nextPollTimestamp)&&f({queryCacheKey:g},v)}function h(g){let v=i[g];v?.timeout&&clearTimeout(v.timeout),delete i[g]}function y(){for(let g of Object.keys(i))h(g)}function S(g={}){let v=!1,R=Number.POSITIVE_INFINITY;for(let I in g)g[I].pollingInterval&&(R=Math.min(g[I].pollingInterval,R),v=g[I].skipPollingIfUnfocused||v);return{lowestPollingInterval:R,skipPollingIfUnfocused:v}}return a},kS=({api:e,context:t,queryThunk:r,mutationThunk:n})=>{let o=Zn(r,n),i=$t(r,n),a=at(r,n),m={};return(p,h)=>{if(o(p)){let{requestId:y,arg:{endpointName:S,originalArgs:g}}=p.meta,v=t.endpointDefinitions[S],R=v?.onQueryStarted;if(R){let I={},x=new Promise((N,k)=>{I.resolve=N,I.reject=k});x.catch(()=>{}),m[y]=I;let T=e.endpoints[S].select(v.type==="query"?g:y),w=h.dispatch((N,k,P)=>P),E={...h,getCacheEntry:()=>T(h.getState()),requestId:y,extra:w,updateCachedData:v.type==="query"?N=>h.dispatch(e.util.updateQueryData(S,g,N)):void 0,queryFulfilled:x};R(g,E)}}else if(a(p)){let{requestId:y,baseQueryMeta:S}=p.meta;m[y]?.resolve({data:p.payload,meta:S}),delete m[y]}else if(i(p)){let{requestId:y,rejectedWithValue:S,baseQueryMeta:g}=p.meta;m[y]?.reject({error:p.payload??p.error,isUnhandledError:!S,meta:g}),delete m[y]}}},OS=({reducerPath:e,context:t,api:r,refetchQuery:n,internalState:o})=>{let{removeQueryResult:i}=r.internalActions,a=(f,p)=>{ds.match(f)&&m(p,"refetchOnFocus"),ps.match(f)&&m(p,"refetchOnReconnect")};function m(f,p){let h=f.getState()[e],y=h.queries,S=o.currentSubscriptions;t.batch(()=>{for(let g of Object.keys(S)){let v=y[g],R=S[g];if(!R||!v)continue;(Object.values(R).some(x=>x[p]===!0)||Object.values(R).every(x=>x[p]===void 0)&&h.config[p])&&(kr(R)===0?f.dispatch(i({queryCacheKey:g})):v.status!=="uninitialized"&&f.dispatch(n(v)))}})}return a};function DS(e){let{reducerPath:t,queryThunk:r,api:n,context:o}=e,{apiUid:i}=o,a={invalidateTags:D(`${t}/invalidateTags`)},m=y=>y.type.startsWith(`${t}/`),f=[IS,ES,TS,FS,PS,kS];return{middleware:y=>{let S=!1,v={...e,internalState:{currentSubscriptions:{}},refetchQuery:h,isThisApiSliceAction:m},R=f.map(T=>T(v)),I=wS(v),x=OS(v);return T=>w=>{if(!$n(w))return T(w);S||(S=!0,y.dispatch(n.internalActions.middlewareRegistered(i)));let E={...y,next:T},N=y.getState(),[k,P]=I(w,E,N),F;if(k?F=T(w):F=P,y.getState()[t]&&(x(w,E,N),m(w)||o.hasRehydrationInfo(w)))for(let O of R)O(w,E,N);return F}},actions:a};function h(y){return e.api.endpoints[y.endpointName].initiate(y.originalArgs,{subscribe:!1,forceRefetch:!0})}}var id=Symbol(),MS=({createSelector:e=fe}={})=>({name:id,init(t,{baseQuery:r,tagTypes:n,reducerPath:o,serializeQueryArgs:i,keepUnusedDataFor:a,refetchOnMountOrArgChange:m,refetchOnFocus:f,refetchOnReconnect:p,invalidationBehavior:h},y){Bc();let S=ee=>(typeof process<"u",ee);Object.assign(t,{reducerPath:o,endpoints:{},internalActions:{onOnline:ps,onOffline:ld,onFocus:ds,onFocusLost:ud},util:{}});let g=bS({serializeQueryArgs:i,reducerPath:o,createSelector:e}),{selectInvalidatedBy:v,selectCachedArgsForQuery:R,buildQuerySelector:I,buildInfiniteQuerySelector:x,buildMutationSelector:T}=g;dt(t.util,{selectInvalidatedBy:v,selectCachedArgsForQuery:R});let{queryThunk:w,infiniteQueryThunk:E,mutationThunk:N,patchQueryData:k,updateQueryData:P,upsertQueryData:F,prefetch:O,buildMatchThunkActions:_}=vS({baseQuery:r,reducerPath:o,context:y,api:t,serializeQueryArgs:i,assertTagType:S,selectors:g}),{reducer:$,actions:U}=CS({context:y,queryThunk:w,infiniteQueryThunk:E,mutationThunk:N,serializeQueryArgs:i,reducerPath:o,assertTagType:S,config:{refetchOnFocus:f,refetchOnReconnect:p,refetchOnMountOrArgChange:m,keepUnusedDataFor:a,reducerPath:o,invalidationBehavior:h}});dt(t.util,{patchQueryData:k,updateQueryData:P,upsertQueryData:F,prefetch:O,resetApiState:U.resetApiState,upsertQueryEntries:U.cacheEntriesUpserted}),dt(t.internalActions,U);let{middleware:L,actions:V}=DS({reducerPath:o,context:y,queryThunk:w,mutationThunk:N,infiniteQueryThunk:E,api:t,assertTagType:S,selectors:g});dt(t.util,V),dt(t,{reducer:$,middleware:L});let{buildInitiateQuery:Q,buildInitiateInfiniteQuery:j,buildInitiateMutation:z,getRunningMutationThunk:W,getRunningMutationsThunk:Y,getRunningQueriesThunk:re,getRunningQueryThunk:se}=yS({queryThunk:w,mutationThunk:N,infiniteQueryThunk:E,api:t,serializeQueryArgs:i,context:y});return dt(t.util,{getRunningMutationThunk:W,getRunningMutationsThunk:Y,getRunningQueryThunk:se,getRunningQueriesThunk:re}),{name:id,injectEndpoint(ee,ne){var he;let oe=(he=t.endpoints)[ee]??(he[ee]={});fs(ne)&&dt(oe,{name:ee,select:I(ee,ne),initiate:Q(ee,ne)},_(w,ee)),mS(ne)&&dt(oe,{name:ee,select:T(),initiate:z(ee)},_(N,ee)),ms(ne)&&dt(oe,{name:ee,select:x(ee,ne),initiate:j(ee,ne)},_(w,ee))}}}}),md=AS(MS());var qS=/*#__PURE__*/function(){var _ref25=_asyncToGenerator(function*(e,t,r){let n=t.getState(),{accessToken:o,environment:i,organizationId:a}=n.configuration,m=n.generatedAnswer.answerConfigurationId,f={...e,headers:{...(e?.headers||{}),Authorization:`Bearer ${o}`}};try{let p=Ie(a,i);return{data:sd({baseUrl:`${p}/rest/organizations/${a}/answer/v1/configs/${m}`,fetchFn:function(){var _ref26=_asyncToGenerator(function*(y){if(y instanceof String)throw new Error("The provided 'request' must be a Request object.");let S=y.url,g={};return["method","headers","mode","credentials","cache","redirect","referrer","referrerPolicy","integrity","keepalive","signal"].forEach(v=>{g[v]=y[v]}),g.duplex="half",g.body=yield y.text(),b(S,g)});return function fetchFn(_x57){return _ref26.apply(this,arguments)}}()})(f,{...t,signal:null},r)}}catch(p){return{error:p}}});return function qS(_x54,_x55,_x56){return _ref25.apply(this,arguments)}}(),gd=md({reducerPath:"answer",baseQuery:cd(qS,{maxRetries:3}),endpoints:()=>({})});var NS=(e,t)=>{let{contentFormat:r}=t;e.contentFormat=r,e.isStreaming=!0,e.isLoading=!1},_S=(e,t)=>{e.answer===void 0?e.answer=t.textDelta:typeof t.textDelta=="string"&&(e.answer=e.answer.concat(t.textDelta))},VS=(e,t)=>{e.citations=t.citations},LS=(e,t)=>{e.generated=t.answerGenerated,e.isStreaming=!1},jS=(e,t)=>{e.error={message:t.errorMessage,code:t.code},e.isStreaming=!1,e.isLoading=!1,console.error(`${t.errorMessage} - code ${t.code}`)},US=(e,t,r)=>{let n=JSON.parse(e.data);n.finishReason==="ERROR"&&n.errorMessage&&jS(t,n);let o=n.payload.length?JSON.parse(n.payload):{};switch(n.payloadType){case"genqa.headerMessageType":o.contentFormat&&(NS(t,o),r(Ha(o.contentFormat)));break;case"genqa.messageType":o.textDelta&&(_S(t,o),r(Qa({textDelta:o.textDelta})));break;case"genqa.citationsType":o.citations&&(VS(t,o),r($a({citations:o.citations})));break;case"genqa.endOfStreamType":LS(t,o),r(Mo(o.answerGenerated??!1));break}},hs=gd.injectEndpoints({overrideExisting:!0,endpoints:e=>({getAnswer:e.query({queryFn:()=>({data:{contentFormat:void 0,answer:void 0,citations:void 0,error:void 0,generated:!1,isStreaming:!0,isLoading:!0}}),serializeQueryArgs:({endpointName:t,queryArgs:r})=>{let n=JSON.parse(JSON.stringify(r));return n.analytics&&(n.analytics.clientTimestamp=""),`${t}(${JSON.stringify(n)})`},onCacheEntryAdded(t,{getState:r,cacheDataLoaded:n,updateCachedData:o,dispatch:i}){return _asyncToGenerator(function*(){yield n;let{configuration:a,generatedAnswer:m,insightConfiguration:f}=r(),{organizationId:p,environment:h,accessToken:y}=a,S=Ie(p,h),g=`${S}/rest/organizations/${p}/insight/v1/configs/${f?.insightId}/answer/${m.answerConfigurationId}/generate`,v=`${S}/rest/organizations/${p}/answer/v1/configs/${m.answerConfigurationId}/generate`;yield zl(f?g:v,{method:"POST",body:JSON.stringify(t),headers:{Authorization:`Bearer ${y}`,Accept:"application/json","Content-Type":"application/json","Accept-Encoding":"*"},fetch:b,onopen:function(){var _ref27=_asyncToGenerator(function*(R){let I=R.headers.get("x-answer-id");I&&o(x=>{x.answerId=I})});return function onopen(_x58){return _ref27.apply(this,arguments)}}(),onmessage:R=>{o(I=>{US(R,I,i)})},onerror:R=>{throw R},onclose:()=>{o(R=>{i(za(!R.generated))})}})})()}})})}),sN=fe(e=>Cn(e)?.q,e=>e.search.requestId,(e,t)=>({q:e,requestId:t})),$o={},BS=(e,t)=>({...$o,[e]:jo(t)?.map(r=>rs(r,ts())).sort((r,n)=>r.facetId>n.facetId?1:n.facetId>r.facetId?-1:0)}),QS=e=>e.pagination?e.pagination.firstResult+e.pagination.numberOfResults>5e3?5e3-e.pagination.firstResult:e.pagination.numberOfResults:void 0,$S=e=>{let t=dl(e),r=HS(e),n={...t};return r.length&&(n.cq=`${r} AND ${t.cq}`),n},HS=e=>{let t=Vl(e.tabSet),r=Lo(e);return[t,...r].filter(n=>!!n).join(" AND ")},zS=(e,t,r)=>{let n=Cn(e)?.q,{aq:o,cq:i,dq:a,lq:m}=$S(e),f=bl(e),p=Cl(e),h=fl(e)??[];return n&&t==="fetch"&&($o=BS(n,e)),{q:n,...(o&&{aq:o}),...(i&&{cq:i}),...(a&&{dq:a}),...(m&&{lq:m}),pipelineRuleParameters:{mlGenerativeQuestionAnswering:{responseFormat:e.generatedAnswer.responseFormat,citationsFieldToInclude:h}},...(f?.length&&{searchHub:f}),...(p?.length&&{pipeline:p}),...($o[n]?.length&&{facets:$o[n]}),...(e.fields&&{fieldsToInclude:e.fields.fieldsToInclude}),...(e.didYouMean&&{queryCorrection:{enabled:e.didYouMean.enableDidYouMean&&e.didYouMean.queryCorrectionMode==="next",options:{automaticallyCorrect:e.didYouMean.automaticallyCorrectQuery?"whenNoResults":"never"}},enableDidYouMean:e.didYouMean.enableDidYouMean&&e.didYouMean.queryCorrectionMode==="legacy"}),...(e.pagination&&{numberOfResults:QS(e),firstResult:e.pagination.firstResult}),tab:ns(e.tabSet),...Do(e.configuration.analytics,r)}};var ml=(e,t)=>hs.endpoints.getAnswer.select(zS(e,"select",t||vn()))(e);d();c();l();u();var hd=ge(cr,e=>e);d();c();l();u();function ys(){return typeof window<"u"&&typeof document<"u"}d();c();l();u();function WS(e){let t=e.payload?.analyticsAction;return yd(e)&&!X(t)}function yd(e){return"type"in e}var Sd=e=>t=>r=>{let n;WS(r)&&(n=r.payload.analyticsAction,delete r.payload.analyticsAction);let o=t(r);return yd(r)&&(r.type==="search/executeSearch/fullfilled"&&n===void 0&&console.error("No analytics action associated with search:",r),r.type==="recommendation/get/fullfilled"&&n===void 0&&console.error("No analytics action associated with recommendation:",r),r.type==="productRecommendations/get/fullfilled"&&n===void 0&&console.error("No analytics action associated with product recommendation:",r)),n!==void 0&&e.dispatch(n),o};d();c();l();u();d();c();l();u();var Ed=je(Cd(),1);d();c();l();u();var LN=D("tab/register",e=>{let t=new K({values:{id:G,expression:we}});return B(e,t)}),Ho=D("tab/updateActiveTab",e=>B(e,G));d();c();l();u();var zo=je(qo(),1),wd=je(bd(),1),xd=je(Ad(),1);zo.default.extend(xd.default);zo.default.extend(wd.default);var Rd=()=>({organizationId:"",accessToken:"",search:{locale:"en-US",timezone:zo.default.tz.guess(),authenticationProviders:[]},analytics:{enabled:!0,originContext:"Search",originLevel2:"default",originLevel3:"default",anonymous:!1,deviceId:"",userDisplayName:"",documentLocation:"",trackingId:"",analyticsMode:"next",source:{}},knowledge:{answerConfigurationId:""},environment:"prod"});var Pd=ge(Rd(),e=>e.addCase(St,(t,r)=>{KS(t,r.payload)}).addCase(Je,(t,r)=>{YS(t,r.payload)}).addCase(ur,(t,r)=>{JS(t,r.payload)}).addCase(lr,t=>{t.analytics.enabled=!1}).addCase(dr,t=>{t.analytics.enabled=!0}).addCase(no,(t,r)=>{t.analytics.originLevel2=r.payload.originLevel2}).addCase(oo,(t,r)=>{t.analytics.originLevel3=r.payload.originLevel3}).addCase(Ho,(t,r)=>{t.analytics.originLevel2=r.payload}).addCase(vt,(t,r)=>{t.analytics.originLevel2=r.payload.tab||t.analytics.originLevel2}));function KS(e,t){X(t.accessToken)||(e.accessToken=t.accessToken),e.environment=t.environment??"prod",X(t.organizationId)||(e.organizationId=t.organizationId)}function YS(e,t){X(t.proxyBaseUrl)||(e.search.apiBaseUrl=t.proxyBaseUrl),X(t.locale)||(e.search.locale=t.locale),X(t.timezone)||(e.search.timezone=t.timezone),X(t.authenticationProviders)||(e.search.authenticationProviders=t.authenticationProviders)}function JS(e,t){X(t.enabled)||(e.analytics.enabled=t.enabled),X(t.originContext)||(e.analytics.originContext=t.originContext),X(t.originLevel2)||(e.analytics.originLevel2=t.originLevel2),X(t.originLevel3)||(e.analytics.originLevel3=t.originLevel3),X(t.proxyBaseUrl)||(e.analytics.apiBaseUrl=t.proxyBaseUrl),X(t.trackingId)||(e.analytics.trackingId=t.trackingId),X(t.analyticsMode)||(e.analytics.analyticsMode=t.analyticsMode),X(t.source)||(e.analytics.source=t.source);try{let r=(0,Ed.default)();r&&(e.analytics.analyticsMode="next",e.analytics.trackingId=r)}catch{}X(t.runtimeEnvironment)||(e.analytics.runtimeEnvironment=t.runtimeEnvironment),X(t.anonymous)||(e.analytics.anonymous=t.anonymous),X(t.deviceId)||(e.analytics.deviceId=t.deviceId),X(t.userDisplayName)||(e.analytics.userDisplayName=t.userDisplayName),X(t.documentLocation)||(e.analytics.documentLocation=t.documentLocation)}var ze=Pd;d();c();l();u();function XS(e){return e.instantlyCallable}var Id=()=>e=>t=>e(XS(t)?t():t);d();c();l();u();var Td=e=>()=>t=>r=>{let n=r;if(!n.error)return t(r);let o=n.error,i=[n.payload?.errorCode,n.payload?.message].filter(Boolean).join(" - ");if(n.payload?.ignored||e.error(i||o.stack||o.message||o.name||"Error",`Action dispatch error ${n.type}`,r),n.error.name!=="SchemaValidationError")return t(r)},Fd=e=>t=>r=>n=>(e.debug({action:n,nextState:t.getState()},`Action dispatched: ${n.type}`),r(n));d();c();l();u();function kd(e,t){let r={...e},n,o=i=>(a,m)=>{let f=i(a,m);return n?n(f,m):f};return{get combinedReducer(){let i=lc(Object.entries(t).filter(([a])=>!(a in r)).map(([a,m])=>[a,()=>m]));return o(nr({...i,...r}))},containsAll(i){return Object.keys(i).every(m=>m in r)},add(i){Object.keys(i).filter(a=>!(a in r)).forEach(a=>r[a]=i[a])},addCrossReducer(i){n=i}}}d();c();l();u();d();c();l();u();function Wo(e,t,r){var n,o,i;t===void 0&&(t=50),r===void 0&&(r={});var a=(n=r.isImmediate)!=null&&n,m=(o=r.callback)!=null&&o,f=r.maxWait,p=Date.now(),h=[];function y(){if(f!==void 0){var g=Date.now()-p;if(g+t>=f)return f-g}return t}var S=function(){var g=[].slice.call(arguments),v=this;return new Promise(function(R,I){var x=a&&i===void 0;if(i!==void 0&&clearTimeout(i),i=setTimeout(function(){if(i=void 0,p=Date.now(),!a){var w=e.apply(v,g);m&&m(w),h.forEach(function(E){return(0,E.resolve)(w)}),h=[]}},y()),x){var T=e.apply(v,g);return m&&m(T),R(T)}h.push({resolve:R,reject:I})})};return S.cancel=function(g){i!==void 0&&clearTimeout(i),h.forEach(function(v){return(0,v.reject)(g)}),h=[]},S}function Od(e,t){let r=0,n=Wo(()=>r=0,500);return o=>i=>(/*#__PURE__*/function(){var _ref28=_asyncToGenerator(function*(a){if(!(typeof a=="function"))return i(a);let f=yield i(a);if(!ZS(f))return f;if(typeof t!="function")return e.warn("Unable to renew the expired token because a renew function was not provided. Please specify the #renewAccessToken option when initializing the engine."),f;if(r>=5)return e.warn("Attempted to renew the token but was not successful. Please check the #renewAccessToken function."),f;r++,n();let p=yield ev(t);o.dispatch(St({accessToken:p})),o.dispatch(a)});return function(_x59){return _ref28.apply(this,arguments)}}())}function ZS(e){return e?.error?.name===new rr().name}function ev(_x60){return _ev.apply(this,arguments)}function _ev(){_ev=_asyncToGenerator(function*(e){try{return yield e()}catch{return""}});return _ev.apply(this,arguments)}d();c();l();u();function Dd({reducer:e,preloadedState:t,middlewares:r=[],thunkExtraArguments:n,name:o}){return eu({reducer:e,preloadedState:t,devTools:{stateSanitizer:i=>i.history?{...i,history:"<<OMIT>>"}:i,name:o,shouldHotReload:!1},middleware:i=>i({thunk:{extraArgument:n}}).prepend(...r).concat(Fd(n.logger))})}function tv(e,t){let{analytics:r}=e,{analyticsClientMiddleware:n,...o}=r??{},i={...o,...(r?.proxyBaseUrl&&{apiBaseUrl:r.proxyBaseUrl,nexApiBaseUrl:r.proxyBaseUrl})};if(i.analyticsMode!=="next"&&uc())return t.info("Analytics disabled since doNotTrack is active."),{...i,enabled:!1};if(i.analyticsMode==="next"&&!o.trackingId)throw new As("analytics.trackingId is required when analytics.analyticsMode=\"next\"");return i}function Md(e,t){let r={...e.reducers,configuration:ze,version:hd},n=rv({...e,reducers:r},t,ze),{accessToken:o,environment:i,organizationId:a}=e.configuration;n.dispatch(St({accessToken:o,environment:i,organizationId:a}));let m=tv(e.configuration,n.logger);return m&&n.dispatch(ur(m)),n}function rv(e,t,r){let{reducers:n}=e,o=kd({...n,configurationReducer:r},e.preloadedState??{});e.crossReducer&&o.addCrossReducer(e.crossReducer);let i=t.logger,a=()=>{let h="";try{h=wr(p.state).getMeta("").clientId}catch(y){i.warn("Error while obtaining clientID from relay",y)}return h},m={...t,get relay(){return wr(p.state)},get navigatorContext(){return e.navigatorContextProvider?e.navigatorContextProvider():ys()?Ua(a()):vn()}},f=nv(e,m,o),p={addReducers(h){o.containsAll(h)||(o.add(h),f.replaceReducer(o.combinedReducer))},dispatch:f.dispatch,subscribe:f.subscribe,enableAnalytics(){f.dispatch(dr())},disableAnalytics(){f.dispatch(lr())},get state(){return f.getState()},get relay(){return wr(this.state)},get navigatorContext(){return e.navigatorContextProvider?e.navigatorContextProvider():ys()?Ua(a()):vn()},logger:i,store:f};return p}function nv(e,t,r){let{preloadedState:n,configuration:o}=e,i=o.name||"coveo-headless",a=ov(e,t.logger);return Dd({preloadedState:n,reducer:r.combinedReducer,middlewares:a,thunkExtraArguments:t,name:i})}function ov(e,t){let{renewAccessToken:r}=e.configuration,n=Od(t,r);return[Id,n,Td(t),Sd].concat(hs.middleware,e.middlewares||[])}var As=class extends Error{constructor(t){super(t),this.name="InvalidEngineConfiguration"}};d();c();l();u();var Qd=je(Bd(),1);function $d(e){return(0,Qd.pino)({name:"@coveo/headless",level:e?.level||"warn",formatters:{log:e?.logFormatter}})}d();c();l();u();function Hd(e,t){let r=Av(e),n=Ue,o=wv(e);return{analyticsClientMiddleware:r,validatePayload:n,preprocessRequest:o,logger:t}}function Av(e){let{analytics:t}=e,r=(n,o)=>o;return t?.analyticsClientMiddleware||r}function wv(e){return e.preprocessRequest||Nn}d();c();l();u();d();c();l();u();var zd={organizationId:G,accessToken:G,name:new H({required:!1,emptyAllowed:!1}),analytics:new K({options:{required:!1},values:{enabled:new te({required:!1}),originContext:new H({required:!1}),originLevel2:new H({required:!1}),originLevel3:new H({required:!1}),analyticsMode:new H({constrainTo:["legacy","next"],required:!1,default:"next"}),proxyBaseUrl:new H({required:!1,url:!0}),trackingId:new H({required:!1,emptyAllowed:!1,regex:/^[a-zA-Z0-9_\-.]{1,100}$/})}}),environment:new H({required:!1,default:"prod",constrainTo:["prod","hipaa","stg","dev"]})};function Wd(){return{organizationId:"searchuisamples",accessToken:"xx564559b1-0045-48e1-953c-3addd1ee4457"}}var Gd=new Fe({...zd,pipeline:new H({required:!1,emptyAllowed:!0}),searchHub:ve,locale:ve,timezone:ve});function Is(){return{...Wd(),searchHub:"default"}}var xv={debug:co,pipeline:mr,searchHub:Pr,recommendation:Rr};function Kd(e){let t=$d(e.loggerOptions);Rv(e.configuration,t);let r=Ev(e.configuration,t),n={...Hd(e.configuration,t),apiClient:r},o={...e,reducers:xv},i=Md(o,n),{pipeline:a,searchHub:m,timezone:f,locale:p,proxyBaseUrl:h}=e.configuration;return i.dispatch(Je({timezone:f,locale:p,proxyBaseUrl:h})),X(a)||i.dispatch(pr(a)),X(m)||i.dispatch(Er(m)),{...i,get state(){return i.state}}}function Rv(e,t){try{Gd.validate(e)}catch(r){throw t.error(r,"Recommendation engine configuration error"),r}}function Ev(e,t){return new Un({logger:t,preprocessRequest:e.preprocessRequest||Nn,postprocessSearchResponseMiddleware:e.preprocessSearchResponseMiddleware||dc,postprocessFacetSearchResponseMiddleware:pc,postprocessQuerySuggestResponseMiddleware:fc})}d();c();l();u();function Pv(e){return e.addReducers({configuration:ze}),{disableAnalytics:lr,enableAnalytics:dr,setOriginLevel2:no,setOriginLevel3:oo,updateAnalyticsConfiguration:ur,updateBasicConfiguration:St}}d();c();l();u();function Iv(e){return e.addReducers({configuration:ze,pipeline:mr,searchHub:Pr}),{updateSearchConfiguration:Je}}d();c();l();u();d();c();l();u();d();c();l();u();var Pt=()=>new H({required:!1,emptyAllowed:!0}),Yo=D("advancedSearchQueries/update",e=>B(e,{aq:Pt(),cq:Pt(),lq:Pt(),dq:Pt()})),Jo=D("advancedSearchQueries/register",e=>B(e,{aq:Pt(),cq:Pt(),lq:Pt(),dq:Pt()}));d();c();l();u();var It=()=>({cq:"",cqWasSet:!1,aq:"",aqWasSet:!1,lq:"",lqWasSet:!1,dq:"",dqWasSet:!1,defaultFilters:{cq:"",aq:"",lq:"",dq:""}});var Yd=ge(It(),e=>{e.addCase(Yo,(t,r)=>{let{aq:n,cq:o,lq:i,dq:a}=r.payload;Ce(n)||(t.aq=n,t.aqWasSet=!0),Ce(o)||(t.cq=o,t.cqWasSet=!0),Ce(i)||(t.lq=i,t.lqWasSet=!0),Ce(a)||(t.dq=a,t.dqWasSet=!0)}).addCase(Jo,(t,r)=>{let{aq:n,cq:o,lq:i,dq:a}=r.payload;Ce(n)||(t.defaultFilters.aq=n,t.aqWasSet||(t.aq=n)),Ce(o)||(t.defaultFilters.cq=o,t.cqWasSet||(t.cq=o)),Ce(i)||(t.defaultFilters.lq=i,t.lqWasSet||(t.lq=i)),Ce(a)||(t.defaultFilters.dq=a,t.dqWasSet||(t.dq=a))}).addCase(Me.fulfilled,(t,r)=>r.payload?.advancedSearchQueries??t).addCase(vt,(t,r)=>{let{aq:n,cq:o}=r.payload;Ce(n)||(t.aq=n,t.aqWasSet=!0),Ce(o)||(t.cq=o,t.cqWasSet=!0)})});function Tv(e){return e.addReducers({advancedSearchQueries:Yd}),{updateAdvancedSearchQueries:Yo,registerAdvancedSearchQueries:Jo}}d();c();l();u();d();c();l();u();d();c();l();u();var Fv=new ie({each:G,required:!0}),Jd=(e,t)=>(B(e,G),Mn(t)?B(t,G):B(t,Fv),{payload:{contextKey:e,contextValue:t}}),Gt=D("context/set",e=>{for(let[t,r]of Object.entries(e))Jd(t,r);return{payload:e}}),Kt=D("context/add",e=>Jd(e.contextKey,e.contextValue)),Yt=D("context/remove",e=>B(e,G));d();c();l();u();function Xo(){return{contextValues:{}}}var Zo=ge(Xo(),e=>{e.addCase(Gt,(t,r)=>{t.contextValues=r.payload}).addCase(Kt,(t,r)=>{t.contextValues[r.payload.contextKey]=r.payload.contextValue}).addCase(Yt,(t,r)=>{delete t.contextValues[r.payload]}).addCase(Me.fulfilled,(t,r)=>{r.payload&&(t.contextValues=r.payload.context.contextValues)})});function kv(e){return e.addReducers({context:Zo}),{addContext:Kt,removeContext:Yt,setContext:Gt}}d();c();l();u();d();c();l();u();d();c();l();u();var Mr=D("dictionaryFieldContext/set",e=>{let t=new K({options:{required:!0}}),r=B(e,t).error;if(r)return{payload:e,error:r};let n=Object.values(e),o=new ie({each:we}),i=B(n,o).error;return i?{payload:e,error:i}:{payload:e}}),qr=D("dictionaryFieldContext/add",e=>{let t=new K({options:{required:!0},values:{field:we,key:we}});return B(e,t)}),Nr=D("dictionaryFieldContext/remove",e=>B(e,we));d();c();l();u();function ei(){return{contextValues:{}}}var ti=ge(ei(),e=>{e.addCase(Mr,(t,r)=>{t.contextValues=r.payload}).addCase(qr,(t,r)=>{let{field:n,key:o}=r.payload;t.contextValues[n]=o}).addCase(Nr,(t,r)=>{delete t.contextValues[r.payload]}).addCase(Me.fulfilled,(t,r)=>{r.payload&&(t.contextValues=r.payload.dictionaryFieldContext.contextValues)})});function Ov(e){return e.addReducers({dictionaryFieldContext:ti}),{addContext:qr,removeContext:Nr,setContext:Mr}}d();c();l();u();d();c();l();u();d();c();l();u();d();c();l();u();var Tt=/*#__PURE__*/function(){var _ref29=_asyncToGenerator(function*(e,t){return{accessToken:e.configuration.accessToken,organizationId:e.configuration.organizationId,url:e.configuration.search.apiBaseUrl??ht(e.configuration.organizationId,e.configuration.environment),locale:e.configuration.search.locale,debug:e.debug,tab:e.configuration.analytics.originLevel2,referrer:e.configuration.analytics.originLevel3,timezone:e.configuration.search.timezone,...(e.configuration.analytics.enabled&&{actionsHistory:et.getHistory()}),...(e.advancedSearchQueries?.aq&&{aq:e.advancedSearchQueries.aq}),...(e.advancedSearchQueries?.cq&&{cq:e.advancedSearchQueries.cq}),...(e.advancedSearchQueries?.lq&&{lq:e.advancedSearchQueries.lq}),...(e.advancedSearchQueries?.dq&&{dq:e.advancedSearchQueries.dq}),...(e.context&&{context:e.context.contextValues}),...(e.fields&&!e.fields.fetchAllFields&&{fieldsToInclude:e.fields.fieldsToInclude}),...(e.dictionaryFieldContext&&{dictionaryFieldContext:e.dictionaryFieldContext.contextValues}),...(e.pipeline&&{pipeline:e.pipeline}),...(e.query&&{q:e.query.q,enableQuerySyntax:e.query.enableQuerySyntax}),...(e.searchHub&&{searchHub:e.searchHub}),...(e.sortCriteria&&{sortCriteria:e.sortCriteria}),...(e.configuration.analytics.enabled&&(yield To(e.configuration.analytics,t))),...(e.excerptLength&&!X(e.excerptLength.length)&&{excerptLength:e.excerptLength.length}),...(e.configuration.search.authenticationProviders.length&&{authentication:e.configuration.search.authenticationProviders.join(",")})}});return function Tt(_x61,_x62){return _ref29.apply(this,arguments)}}();d();c();l();u();var _r=(e,t,r)=>({accessToken:e.configuration.accessToken,organizationId:e.configuration.organizationId,url:e.configuration.search.apiBaseUrl??ht(e.configuration.organizationId,e.configuration.environment),locale:e.configuration.search.locale,debug:e.debug,tab:e.configuration.analytics.originLevel2,referrer:t.referrer,timezone:e.configuration.search.timezone,...(e.advancedSearchQueries?.aq&&{aq:e.advancedSearchQueries.aq}),...(e.advancedSearchQueries?.cq&&{cq:e.advancedSearchQueries.cq}),...(e.advancedSearchQueries?.lq&&{lq:e.advancedSearchQueries.lq}),...(e.advancedSearchQueries?.dq&&{dq:e.advancedSearchQueries.dq}),...(e.context&&{context:e.context.contextValues}),...(e.fields&&!e.fields.fetchAllFields&&{fieldsToInclude:e.fields.fieldsToInclude}),...(e.dictionaryFieldContext&&{dictionaryFieldContext:e.dictionaryFieldContext.contextValues}),...(e.pipeline&&{pipeline:e.pipeline}),...(e.query&&{q:e.query.q,enableQuerySyntax:e.query.enableQuerySyntax}),...(e.searchHub&&{searchHub:e.searchHub}),...(e.sortCriteria&&{sortCriteria:e.sortCriteria}),...(e.configuration.analytics.enabled&&Do(e.configuration.analytics,t,r)),...(e.excerptLength&&!X(e.excerptLength.length)&&{excerptLength:e.excerptLength.length}),...(e.configuration.search.authenticationProviders.length&&{authentication:e.configuration.search.authenticationProviders.join(",")})});var Dv={collectionField:new H({emptyAllowed:!1,required:!1}),parentField:new H({emptyAllowed:!1,required:!1}),childField:new H({emptyAllowed:!1,required:!1}),numberOfFoldedResults:new J({min:0,required:!1})},Xd=D("folding/register",e=>B(e,Dv)),IB=ue("folding/loadCollection",/*#__PURE__*/function(){var _ref30=_asyncToGenerator(function*(e,{getState:t,rejectWithValue:r,extra:{apiClient:n,navigatorContext:o}}){let i=t(),a=i.configuration.analytics.analyticsMode==="legacy"?yield Tt(i):_r(i,o),m=yield n.search({...a,q:Mv(i),enableQuerySyntax:!0,cq:`@${i.folding.fields.collection}="${e}"`,filterField:i.folding.fields.collection,childField:i.folding.fields.parent,parentField:i.folding.fields.child,filterFieldRange:100},{origin:"foldingCollection"});return ke(m)?r(m.error):{collectionId:e,results:m.success.results,searchUid:m.success.searchUid,rootResult:i.folding.collections[e].result}});return function(_x63,_x64){return _ref30.apply(this,arguments)}}());function Mv(e){return e.query.q===""?"":e.query.enableQuerySyntax?`${e.query.q} OR @uri`:`( <@- ${e.query.q} -@> ) OR @uri`}d();c();l();u();var Zd=()=>({enabled:!1,fields:{collection:"foldingcollection",parent:"foldingparent",child:"foldingchild"},filterFieldRange:2,collections:{}});d();c();l();u();var Vr=D("fields/registerFieldsToInclude",e=>B(e,ro)),ri=D("fields/fetchall/enable"),ni=D("fields/fetchall/disable"),oi=ue("fields/fetchDescription",/*#__PURE__*/function(){var _ref31=_asyncToGenerator(function*(e,{extra:t,getState:r,rejectWithValue:n}){let o=r(),{accessToken:i,environment:a,organizationId:m}=o.configuration,{apiBaseUrl:f}=o.configuration.search,p=yield t.apiClient.fieldDescriptions({accessToken:i,organizationId:m,url:f??ht(m,a)});return ke(p)?n(p.error):p.success.fields});return function(_x65,_x66){return _ref31.apply(this,arguments)}}());d();c();l();u();var ii=["author","language","urihash","objecttype","collection","source","permanentid"],Ts=[...ii,"date","filetype","parents"],ep=[...Ts,"ec_price","ec_name","ec_description","ec_brand","ec_category","ec_item_group_id","ec_shortdesc","ec_thumbnails","ec_images","ec_promo_price","ec_in_stock","ec_rating"],tp=()=>({fieldsToInclude:ii,fetchAllFields:!1,fieldsDescription:[]});var ai=ge(tp(),e=>e.addCase(Vr,(t,r)=>{t.fieldsToInclude=[...new Set(t.fieldsToInclude.concat(r.payload))]}).addCase(ri,t=>{t.fetchAllFields=!0}).addCase(ni,t=>{t.fetchAllFields=!1}).addCase(oi.fulfilled,(t,{payload:r})=>{t.fieldsDescription=r}).addCase(Xd,(t,{payload:r})=>{let n=Zd().fields;t.fieldsToInclude.push(r.collectionField??n.collection,r.parentField??n.parent,r.childField??n.child)}));function qv(e){return e.addReducers({fields:ai}),{registerFieldsToInclude:Vr,enableFetchAllFields:ri,disableFetchAllFields:ni,fetchFieldsDescription:oi}}d();c();l();u();function Nv(e){return e.addReducers({pipeline:mr}),{setPipeline:pr}}d();c();l();u();function _v(e){return e.addReducers({searchHub:Pr}),{setSearchHub:Er}}d();c();l();u();function Vv(e){return e.addReducers({debug:co}),{disableDebug:ao,enableDebug:io}}d();c();l();u();function Lv(e){return e.addReducers({recommendation:Rr}),{getRecommendations:At,setRecommendationId:xr}}d();c();l();u();function jv(e){return e.addReducers({}),{logRecommendationOpen:Oo}}d();c();l();u();d();c();l();u();d();c();l();u();var Lr=D("breadcrumb/deselectAll"),si=D("breadcrumb/deselectAllNonBreadcrumbs");d();c();l();u();d();c();l();u();var Pn={value:G,numberOfResults:new J({min:0}),state:G};d();c();l();u();var le=G;var $v=new J({min:1,default:8,required:!1}),Hv=new J({min:1,max:20,default:5,required:!1}),zv={desiredCount:Hv,numberOfValues:$v},R1=D("automaticFacet/setOptions",e=>B(e,zv)),E1=D("automaticFacet/deselectAll",e=>B(e,le)),Wv=G,rp=D("automaticFacet/toggleSelectValue",e=>B(e,{field:Wv,selection:new K({values:Pn})}));d();c();l();u();d();c();l();u();var Gv={state:new de({required:!0}),numberOfResults:new J({required:!0,min:0}),value:new H({required:!0,emptyAllowed:!0}),path:new ie({required:!0,each:G}),moreValuesAvailable:new te({required:!1})};function Fs(e){e.children.forEach(t=>{Fs(t)}),Ue({state:e.state,numberOfResults:e.numberOfResults,value:e.value,path:e.path,moreValuesAvailable:e.moreValuesAvailable},Gv)}var jr={facetId:le,field:G,tabs:new K({options:{required:!1},values:{included:new ie({each:new H}),excluded:new ie({each:new H})}}),activeTab:new H({required:!1}),delimitingCharacter:new H({required:!1,emptyAllowed:!0}),filterFacetCount:new te({required:!1}),injectionDepth:new J({required:!1,min:0}),numberOfValues:new J({required:!1,min:1}),sortCriteria:new de({required:!1}),basePath:new ie({required:!1,each:G}),filterByBasePath:new te({required:!1})};var $1=D("categoryFacet/register",e=>B(e,jr)),np=D("categoryFacet/toggleSelectValue",e=>{try{return Ue(e.facetId,G),Fs(e.selection),{payload:e,error:null}}catch(t){return{payload:e,error:st(t)}}}),op=D("categoryFacet/deselectAll",e=>B(e,jr.facetId)),H1=D("categoryFacet/updateNumberOfValues",e=>B(e,{facetId:jr.facetId,numberOfValues:jr.numberOfValues})),z1=D("categoryFacet/updateSortCriterion",e=>B(e,{facetId:jr.facetId,criterion:new de})),W1=D("categoryFacet/updateBasePath",e=>B(e,{facetId:jr.facetId,basePath:new ie({each:G})}));d();c();l();u();d();c();l();u();var In={facetId:le,captions:new K({options:{required:!1}}),numberOfValues:new J({required:!1,min:1}),query:new H({required:!1,emptyAllowed:!0})};var Kv={path:new ie({required:!0,each:G}),displayValue:we,rawValue:we,count:new J({required:!0,min:0})},ip=D("categoryFacet/selectSearchResult",e=>B(e,{facetId:le,value:new K({values:Kv})})),d$=D("categoryFacetSearch/register",e=>B(e,In));d();c();l();u();var ap={facetId:le,value:new K({values:{displayValue:we,rawValue:we,count:new J({required:!0,min:0})}})},A$=D("facetSearch/register",e=>B(e,In)),w$=D("facetSearch/update",e=>B(e,In)),sp=D("facetSearch/toggleSelectValue",e=>B(e,ap)),cp=D("facetSearch/toggleExcludeValue",e=>B(e,ap));d();c();l();u();d();c();l();u();function lp(e){let t=up(e.start,e),r=up(e.end,e),n=e.endInclusive??!1,o=e.state??"idle";return{start:t,end:r,endInclusive:n,state:o}}function up(e,t){let{dateFormat:r}=t;return Dl(e)?(es(e),Fl(e)):typeof e=="string"&&wt(e)?(es(e),e):(El(e,r),_o(Fr(e,r)))}d();c();l();u();d();c();l();u();var j$=new H({regex:/^[a-zA-Z0-9-_]+$/}),U$=new H({required:!0}),B$=new ie({each:new H}),Q$=new H,$$=new te,H$=new te,z$=new J({min:0}),Yv=new J({min:1}),W$=new te({required:!0}),Jv=new K,Xv=new H,Zv={captions:Jv,numberOfValues:Yv,query:Xv},G$=new K({values:Zv}),dp=new K({options:{required:!1},values:{type:new H({constrainTo:["simple"],emptyAllowed:!1,required:!0}),values:new ie({required:!0,max:25,each:new H({emptyAllowed:!1,required:!0})})}}),K$=new te,pp=new ie({min:1,max:25,required:!1,each:new H({emptyAllowed:!1,required:!0})});var eC={facetId:le,field:new H({required:!0,emptyAllowed:!0}),tabs:new K({options:{required:!1},values:{included:new ie({each:new H}),excluded:new ie({each:new H})}}),activeTab:new H({required:!1}),filterFacetCount:new te({required:!1}),injectionDepth:new J({required:!1,min:0}),numberOfValues:new J({required:!1,min:1}),sortCriteria:new de({required:!1}),resultsMustMatch:new de({required:!1}),allowedValues:dp,customSort:pp},sH=D("facet/register",e=>B(e,eC)),fp=D("facet/toggleSelectValue",e=>B(e,{facetId:le,selection:new K({values:Pn})})),mp=D("facet/toggleExcludeValue",e=>B(e,{facetId:le,selection:new K({values:Pn})})),ci=D("facet/deselectAll",e=>B(e,le)),cH=D("facet/updateSortCriterion",e=>B(e,{facetId:le,criterion:new de({required:!0})})),uH=D("facet/updateNumberOfValues",e=>B(e,{facetId:le,numberOfValues:new J({required:!0,min:1})})),lH=D("facet/updateIsFieldExpanded",e=>B(e,{facetId:le,isFieldExpanded:new te({required:!0})})),dH=D("facet/updateFreezeCurrentValues",e=>B(e,{facetId:le,freezeCurrentValues:new te({required:!0})}));d();c();l();u();var gp=D("rangeFacet/updateSortCriterion",e=>B(e,{facetId:le,criterion:new de({required:!0})}));d();c();l();u();var ui={state:G,start:new J({required:!0}),end:new J({required:!0}),endInclusive:new te({required:!0}),numberOfResults:new J({required:!0,min:0})},li={start:G,end:G,endInclusive:new te({required:!0}),state:G,numberOfResults:new J({required:!0,min:0})};var tC={start:G,end:G,endInclusive:new te({required:!0}),state:G},rC={facetId:le,field:G,tabs:new K({options:{required:!1},values:{included:new ie({each:new H}),excluded:new ie({each:new H})}}),activeTab:new H({required:!1}),currentValues:new ie({required:!1,each:new K({values:tC})}),generateAutomaticRanges:new te({required:!0}),filterFacetCount:new te({required:!1}),injectionDepth:new J({required:!1,min:0}),numberOfValues:new J({required:!1,min:1}),sortCriteria:new de({required:!1}),rangeAlgorithm:new de({required:!1})};function hp(e){return wt(e)?An(e):e}function yp(e){e.currentValues&&e.currentValues.forEach(t=>{let{start:r,end:n}=lp(t);if(Fr(hp(r)).isAfter(Fr(hp(n))))throw new Error(`The start value is greater than the end value for the date range ${t.start} to ${t.end}`)})}var $H=D("dateFacet/register",e=>{try{return Ue(e,rC),yp(e),{payload:e,error:null}}catch(t){return{payload:e,error:st(t)}}}),Sp=D("dateFacet/toggleSelectValue",e=>B(e,{facetId:le,selection:new K({values:li})})),vp=D("dateFacet/toggleExcludeValue",e=>B(e,{facetId:le,selection:new K({values:li})})),Cp=D("dateFacet/updateFacetValues",e=>{try{return Ue(e,{facetId:le,values:new ie({each:new K({values:li})})}),yp({currentValues:e.values}),{payload:e,error:null}}catch(t){return{payload:e,error:st(t)}}});d();c();l();u();var nC={state:G,start:new J({required:!0}),end:new J({required:!0}),endInclusive:new te({required:!0})},oC={facetId:le,field:G,tabs:new K({options:{required:!1},values:{included:new ie({each:new H}),excluded:new ie({each:new H})}}),activeTab:new H({required:!1}),currentValues:new ie({required:!1,each:new K({values:nC})}),generateAutomaticRanges:new te({required:!0}),filterFacetCount:new te({required:!1}),injectionDepth:new J({required:!1,min:0}),numberOfValues:new J({required:!1,min:1}),sortCriteria:new de({required:!1}),rangeAlgorithm:new de({required:!1})};function bp(e){e.currentValues&&e.currentValues.forEach(({start:t,end:r})=>{if(t>r)throw new Error(`The start value is greater than the end value for the numeric range ${t} to ${r}`)})}var nz=D("numericFacet/register",e=>{try{return B(e,oC),bp(e),{payload:e,error:null}}catch(t){return{payload:e,error:st(t)}}}),Ap=D("numericFacet/toggleSelectValue",e=>B(e,{facetId:le,selection:new K({values:ui})})),wp=D("numericFacet/toggleExcludeValue",e=>B(e,{facetId:le,selection:new K({values:ui})})),xp=D("numericFacet/updateFacetValues",e=>{try{return Ue(e,{facetId:le,values:new ie({each:new K({values:ui})})}),bp({currentValues:e.values}),{payload:e,error:null}}catch(t){return{payload:e,error:st(t)}}});d();c();l();u();d();c();l();u();var di=D("facet/updateFacetAutoSelection",e=>B(e,{allow:new te({required:!0})}));d();c();l();u();d();c();l();u();var pi=class extends bt{constructor(r){super(r);this.getState=r}get activeInstantResultQuery(){let r=this.getState().instantResults;for(let n in r)for(let o in r[n].cache)if(r[n].cache[o].isActive)return r[n].q;return null}get activeInstantResultCache(){let r=this.getState().instantResults;for(let n in r)for(let o in r[n].cache)if(r[n].cache[o].isActive)return r[n].cache[o];return null}get results(){return this.activeInstantResultCache?.results}get queryText(){return this.activeInstantResultQuery??Ve().q}get responseTime(){return this.activeInstantResultCache?.duration??We().duration}get numberOfResults(){return this.activeInstantResultCache?.totalCountFiltered??We().response.totalCountFiltered}getSearchUID(){return this.activeInstantResultCache?.searchUid||super.getSearchUID()}};var Rp=()=>qe("analytics/instantResult/searchboxAsYouType",e=>e.makeSearchboxAsYouType(),e=>new pi(e)),Ep=()=>({actionCause:"searchboxAsYouType"});d();c();l();u();var ks={id:G},iC={...ks,q:we},jz=D("instantResults/register",e=>B(e,ks)),fi=D("instantResults/updateQuery",e=>B(e,iC)),Uz=D("instantResults/clearExpired",e=>B(e,ks));d();c();l();u();var mi=new J({required:!0,min:0}),gi=D("pagination/registerNumberOfResults",e=>B(e,mi)),hi=D("pagination/updateNumberOfResults",e=>B(e,mi)),yi=D("pagination/registerPage",e=>B(e,mi)),Ft=D("pagination/updatePage",e=>B(e,mi)),Si=D("pagination/nextPage"),vi=D("pagination/previousPage");d();c();l();u();var kt=D("query/updateQuery",e=>B(e,{q:new H,enableQuerySyntax:new te}));d();c();l();u();d();c();l();u();var Os=()=>qe("search/logFetchMoreResults",e=>e.makeFetchMoreResults()),Ot=e=>qe("search/queryError",(t,r)=>t.makeQueryError({query:r.query?.q||Ve().q,aq:r.advancedSearchQueries?.aq||It().aq,cq:r.advancedSearchQueries?.cq||It().cq,dq:r.advancedSearchQueries?.dq||It().dq,errorType:e.type,errorMessage:e.message}));d();c();l();u();d();c();l();u();var bW=D("didYouMean/enable"),AW=D("didYouMean/disable"),wW=D("didYouMean/automaticCorrections/disable"),xW=D("didYouMean/automaticCorrections/enable"),Ci=D("didYouMean/correction",e=>B(e,G)),RW=D("didYouMean/automaticCorrections/mode",e=>B(e,new H({constrainTo:["next","legacy"],emptyAllowed:!1,required:!0})));d();c();l();u();var Ds=()=>qe("analytics/didyoumean/automatic",e=>e.makeDidYouMeanAutomatic());var Pp=()=>({actionCause:"didYouMeanAutomatic"});d();c();l();u();d();c();l();u();function Ip(){return{freezeFacetOrder:!1,facets:{}}}d();c();l();u();function Tp(){return[]}d();c();l();u();function Tn(){return{firstResult:0,defaultNumberOfResults:10,numberOfResults:10,totalCountFiltered:0}}d();c();l();u();function Fp(){return{}}d();c();l();u();function kp(){return{}}d();c();l();u();function Op(){return{}}function rt(e){return{context:e.context||Xo(),dictionaryFieldContext:e.dictionaryFieldContext||ei(),facetSet:e.facetSet||Po(),numericFacetSet:e.numericFacetSet||Eo(),dateFacetSet:e.dateFacetSet||Ro(),categoryFacetSet:e.categoryFacetSet||xo(),automaticFacetSet:e.automaticFacetSet??wo(),pagination:e.pagination||Tn(),query:e.query||Ve(),tabSet:e.tabSet||Op(),advancedSearchQueries:e.advancedSearchQueries||It(),staticFilterSet:e.staticFilterSet||kp(),querySet:e.querySet||Fp(),sortCriteria:e.sortCriteria||Io(),pipeline:e.pipeline||fr(),searchHub:e.searchHub||br(),facetOptions:e.facetOptions||Ip(),facetOrder:e.facetOrder??Tp(),debug:e.debug??so()}}d();c();l();u();var Q2=new K({values:{undoneQuery:we},options:{required:!0}}),Dp=()=>qe("analytics/trigger/query",(e,t)=>t.triggers?.queryModification.newQuery?e.makeTriggerQuery():null);d();c();l();u();var bi=D("trigger/query/ignore",e=>B(e,new H({emptyAllowed:!0,required:!0}))),Ai=D("trigger/query/modification",e=>B(e,new K({values:{originalQuery:ve,modification:ve}})));d();c();l();u();var Dt=/*#__PURE__*/function(){var _ref32=_asyncToGenerator(function*(e,t){let r=cC(e),n=jo(e),o=aC(e),i=yield Tt(e,t),a=()=>e.pagination?e.pagination.firstResult+e.pagination.numberOfResults>5e3?5e3-e.pagination.firstResult:e.pagination.numberOfResults:void 0;return xt({...i,...(e.didYouMean&&{queryCorrection:{enabled:e.didYouMean.enableDidYouMean&&e.didYouMean.queryCorrectionMode==="next",options:{automaticallyCorrect:e.didYouMean.automaticallyCorrectQuery?"whenNoResults":"never"}},enableDidYouMean:e.didYouMean.enableDidYouMean&&e.didYouMean.queryCorrectionMode==="legacy"}),...(r&&{cq:r}),...(n.length&&{facets:n}),...(e.pagination&&{numberOfResults:a(),firstResult:e.pagination.firstResult}),...(e.facetOptions&&{facetOptions:{freezeFacetOrder:e.facetOptions.freezeFacetOrder}}),...(e.folding?.enabled&&{filterField:e.folding.fields.collection,childField:e.folding.fields.parent,parentField:e.folding.fields.child,filterFieldRange:e.folding.filterFieldRange}),...(e.automaticFacetSet&&{generateAutomaticFacets:{desiredCount:e.automaticFacetSet.desiredCount,numberOfValues:e.automaticFacetSet.numberOfValues,currentFacets:o}}),...(e.generatedAnswer&&{pipelineRuleParameters:{mlGenerativeQuestionAnswering:{responseFormat:e.generatedAnswer.responseFormat,citationsFieldToInclude:e.generatedAnswer.fieldsToIncludeInCitations}}})})});return function Dt(_x67,_x68){return _ref32.apply(this,arguments)}}();function aC(e){let t=e.automaticFacetSet?.set;return t?Object.values(t).map(r=>r.response).map(sC).filter(r=>r.currentValues.length>0):void 0}function sC(e){let{field:t,label:r,values:n}=e,o=n.filter(i=>i.state==="selected");return{field:t,label:r,currentValues:o}}function cC(e){let t=e.advancedSearchQueries?.cq.trim()||"",n=Object.values(e.tabSet||{}).find(i=>i.isActive)?.expression.trim()||"",o=uC(e);return[t,n,...o].filter(i=>!!i).join(" AND ")}function uC(e){return Object.values(e.staticFilterSet||{}).map(r=>{let n=r.values.filter(i=>i.state==="selected"&&!!i.expression.trim()),o=n.map(i=>i.expression).join(" OR ");return n.length>1?`(${o})`:o})}var Mt=class{constructor(t,r=n=>{this.dispatch(kt({q:n}))}){this.config=t;this.onUpdateQueryForCorrection=r}fetchFromAPI({mappings:t,request:r},n){var _this9=this;return _asyncToGenerator(function*(){let o=new Date().getTime(),i=Vo(yield _this9.extra.apiClient.search(r,n),t),a=new Date().getTime()-o,m=_this9.getState().query?.q||"";return{response:i,duration:a,queryExecuted:m,requestExecuted:r}})()}process(t){var _this10=this;return _asyncToGenerator(function*(){return _this10.processQueryErrorOrContinue(t)??(yield _this10.processQueryCorrectionsOrContinue(t))??(yield _this10.processQueryTriggersOrContinue(t))??_this10.processSuccessResponse(t)})()}processQueryErrorOrContinue(t){return ke(t.response)?(this.dispatch(Ot(t.response.error)),this.rejectWithValue(t.response.error)):null}processQueryCorrectionsOrContinue(t){var _this11=this;return _asyncToGenerator(function*(){let r=_this11.getState(),n=_this11.getSuccessResponse(t);if(!n||!r.didYouMean)return null;let{enableDidYouMean:o,automaticallyCorrectQuery:i}=r.didYouMean,{results:a,queryCorrections:m,queryCorrection:f}=n;if(!o||!i)return null;let p=a.length===0&&m&&m.length!==0,h=!X(f)&&!X(f.correctedQuery);if(!p&&!h)return null;let S=p?yield _this11.processLegacyDidYouMeanAutoCorrection(t):_this11.processModernDidYouMeanAutoCorrection(t);return _this11.dispatch(Xe(rt(_this11.getState()))),S})()}processLegacyDidYouMeanAutoCorrection(t){var _this12=this;return _asyncToGenerator(function*(){let r=_this12.getCurrentQuery(),n=_this12.getSuccessResponse(t);if(!n.queryCorrections)return null;let{correctedQuery:o}=n.queryCorrections[0],i=yield _this12.automaticallyRetryQueryWithCorrection(o);return ke(i.response)?(_this12.dispatch(Ot(i.response.error)),_this12.rejectWithValue(i.response.error)):(_this12.logOriginalAnalyticsQueryBeforeAutoCorrection(t),_this12.dispatch(Xe(rt(_this12.getState()))),{...i,response:{...i.response.success,queryCorrections:n.queryCorrections},automaticallyCorrected:!0,originalQuery:r,analyticsAction:Ds()})})()}processModernDidYouMeanAutoCorrection(t){let r=this.getSuccessResponse(t),{correctedQuery:n,originalQuery:o}=r.queryCorrection;return this.onUpdateQueryForCorrection(n),{...t,response:{...r},queryExecuted:n,automaticallyCorrected:!0,originalQuery:o,analyticsAction:Ds()}}logOriginalAnalyticsQueryBeforeAutoCorrection(t){let r=this.getState(),n=this.getSuccessResponse(t);this.analyticsAction&&this.analyticsAction()(this.dispatch,()=>this.getStateAfterResponse(t.queryExecuted,t.duration,r,n),this.extra)}processQueryTriggersOrContinue(t){var _this13=this;return _asyncToGenerator(function*(){let r=_this13.getSuccessResponse(t);if(!r)return null;let n=r.triggers.find(m=>m.type==="query")?.content||"";if(!n)return null;if(_this13.getState().triggers?.queryModification.queryToIgnore===n)return _this13.dispatch(bi("")),null;_this13.analyticsAction&&(yield _this13.dispatch(_this13.analyticsAction));let i=_this13.getCurrentQuery(),a=yield _this13.automaticallyRetryQueryWithTriggerModification(n);return ke(a.response)?(_this13.dispatch(Ot(a.response.error)),_this13.rejectWithValue(a.response.error)):(_this13.dispatch(Xe(rt(_this13.getState()))),{...a,response:{...a.response.success},automaticallyCorrected:!1,originalQuery:i,analyticsAction:Dp()})})()}getStateAfterResponse(t,r,n,o){return{...n,query:{q:t,enableQuerySyntax:n.query?.enableQuerySyntax??Ve().enableQuerySyntax},search:{...We(),duration:r,response:o,results:o.results}}}processSuccessResponse(t){return this.dispatch(Xe(rt(this.getState()))),{...t,response:this.getSuccessResponse(t),automaticallyCorrected:!1,originalQuery:this.getCurrentQuery(),analyticsAction:this.analyticsAction}}getSuccessResponse(t){return Bn(t.response)?t.response.success:null}automaticallyRetryQueryWithCorrection(t){var _this14=this;return _asyncToGenerator(function*(){_this14.onUpdateQueryForCorrection(t);let r=yield _this14.fetchFromAPI(yield Dt(_this14.getState()),{origin:"mainSearch"});return _this14.dispatch(Ci(t)),r})()}automaticallyRetryQueryWithTriggerModification(t){var _this15=this;return _asyncToGenerator(function*(){return _this15.dispatch(Ai({newQuery:t,originalQuery:_this15.getCurrentQuery()})),_this15.onUpdateQueryForCorrection(t),yield _this15.fetchFromAPI(yield Dt(_this15.getState()),{origin:"mainSearch"})})()}getCurrentQuery(){let t=this.getState();return t.query?.q!==void 0?t.query.q:""}get extra(){return this.config.extra}getState(){return this.config.getState()}get dispatch(){return this.config.dispatch}get analyticsAction(){return this.config.analyticsAction}get rejectWithValue(){return this.config.rejectWithValue}};var tK=ue("search/prepareForSearchWithQuery",(e,t)=>{let{dispatch:r}=t;B(e,{q:new H,enableQuerySyntax:new te,clearFilters:new te}),e.clearFilters&&(r(Lr()),r(si())),r(di({allow:!0})),r(kt({q:e.q,enableQuerySyntax:e.enableQuerySyntax})),r(Ft(1))}),rK=ue("search/executeSearch",/*#__PURE__*/function(){var _ref33=_asyncToGenerator(function*(e,t){let r=t.getState();return yield wi(r,t,e)});return function(_x69,_x70){return _ref33.apply(this,arguments)}}()),nK=ue("search/fetchPage",/*#__PURE__*/function(){var _ref34=_asyncToGenerator(function*(e,t){let r=t.getState();return yield qs(r,t,e)});return function(_x71,_x72){return _ref34.apply(this,arguments)}}()),oK=ue("search/fetchMoreResults",/*#__PURE__*/function(){var _ref35=_asyncToGenerator(function*(e,t){let r=t.getState();return yield Ns(t,r)});return function(_x73,_x74){return _ref35.apply(this,arguments)}}()),iK=ue("search/fetchFacetValues",/*#__PURE__*/function(){var _ref36=_asyncToGenerator(function*(e,t){let r=t.getState();return yield fC(t,e,r)});return function(_x75,_x76){return _ref36.apply(this,arguments)}}()),aK=ue("search/fetchInstantResults",/*#__PURE__*/function(){var _ref37=_asyncToGenerator(function*(e,t){return Ms(e,t)});return function(_x77,_x78){return _ref37.apply(this,arguments)}}()),lC=/*#__PURE__*/function(){var _ref38=_asyncToGenerator(function*(e,t){let r=yield Dt(e,t);return r.request={...r.request,firstResult:(e.pagination?.firstResult??0)+(e.search?.results.length??0)},r});return function lC(_x79,_x80){return _ref38.apply(this,arguments)}}(),dC=/*#__PURE__*/function(){var _ref39=_asyncToGenerator(function*(e,t,r){let n=yield Tt(e);return xt({...n,...(e.didYouMean&&{enableDidYouMean:e.didYouMean.enableDidYouMean}),numberOfResults:r,q:t})});return function dC(_x81,_x82,_x83){return _ref39.apply(this,arguments)}}(),pC=/*#__PURE__*/function(){var _ref40=_asyncToGenerator(function*(e,t){let r=yield Dt(e,t);return r.request.numberOfResults=0,r});return function pC(_x84,_x85){return _ref40.apply(this,arguments)}}(),Mp=e=>{e.configuration.analytics.enabled&&et.addElement({name:"Query",...(e.query?.q&&{value:e.query.q}),time:JSON.stringify(new Date)})};function Ms(_x86,_x87){return _Ms.apply(this,arguments)}function _Ms(){_Ms=_asyncToGenerator(function*(e,t){B(e,{id:G,q:G,maxResultsPerQuery:new J({required:!0,min:1}),cacheTimeout:new J});let{q:r,maxResultsPerQuery:n}=e,o=t.getState(),i=new Mt({...t,analyticsAction:Rp()},p=>{t.dispatch(fi({q:p,id:e.id}))}),a=yield dC(o,r,n),m=yield i.fetchFromAPI(a,{origin:"instantResults",disableAbortWarning:!0}),f=yield i.process(m);return"response"in f?{results:f.response.results,searchUid:f.response.searchUid,analyticsAction:f.analyticsAction,totalCountFiltered:f.response.totalCountFiltered,duration:f.duration}:f});return _Ms.apply(this,arguments)}function qs(_x88,_x89,_x90){return _qs.apply(this,arguments)}function _qs(){_qs=_asyncToGenerator(function*(e,t,r){Mp(e);let{analyticsClientMiddleware:n,preprocessRequest:o,logger:i}=t.extra,{description:a}=yield r.prepare({getState:()=>t.getState(),analyticsClientMiddleware:n,preprocessRequest:o,logger:i}),m=new Mt({...t,analyticsAction:r}),f=yield Dt(e,a),p=yield m.fetchFromAPI(f,{origin:"mainSearch"});return yield m.process(p)});return _qs.apply(this,arguments)}function Ns(_x91,_x92){return _Ns.apply(this,arguments)}function _Ns(){_Ns=_asyncToGenerator(function*(e,t){let{analyticsClientMiddleware:r,preprocessRequest:n,logger:o}=e.extra,{description:i}=yield Os().prepare({getState:()=>e.getState(),analyticsClientMiddleware:r,preprocessRequest:n,logger:o}),a=new Mt({...e,analyticsAction:Os()}),m=yield lC(t,i),f=yield a.fetchFromAPI(m,{origin:"mainSearch"});return yield a.process(f)});return _Ns.apply(this,arguments)}function fC(_x93,_x94,_x95){return _fC.apply(this,arguments)}function _fC(){_fC=_asyncToGenerator(function*(e,t,r){let{analyticsClientMiddleware:n,preprocessRequest:o,logger:i}=e.extra,{description:a}=yield t.prepare({getState:()=>e.getState(),analyticsClientMiddleware:n,preprocessRequest:o,logger:i}),m=new Mt({...e,analyticsAction:t}),f=yield pC(r,a),p=yield m.fetchFromAPI(f,{origin:"facetValues"});return yield m.process(p)});return _fC.apply(this,arguments)}function wi(_x96,_x97,_x98){return _wi.apply(this,arguments)}function _wi(){_wi=_asyncToGenerator(function*(e,t,r){Mp(e);let{analyticsClientMiddleware:n,preprocessRequest:o,logger:i}=t.extra,{description:a}=yield r.prepare({getState:()=>t.getState(),analyticsClientMiddleware:n,preprocessRequest:o,logger:i}),m=yield Dt(e,a),f=new Mt({...t,analyticsAction:r}),p=yield f.fetchFromAPI(m,{origin:"mainSearch"});return yield f.process(p)});return _wi.apply(this,arguments)}d();c();l();u();d();c();l();u();var qt=/*#__PURE__*/function(){var _ref41=_asyncToGenerator(function*(e,t,r){let n=CC(e),o=mC(e),i=gC(e),a=e.configuration.analytics.analyticsMode==="legacy"?yield Tt(e,r):_r(e,t,r),m=()=>e.pagination?e.pagination.firstResult+e.pagination.numberOfResults>5e3?5e3-e.pagination.firstResult:e.pagination.numberOfResults:void 0;return xt({...a,...(e.didYouMean&&{queryCorrection:{enabled:e.didYouMean.enableDidYouMean&&e.didYouMean.queryCorrectionMode==="next",options:{automaticallyCorrect:e.didYouMean.automaticallyCorrectQuery?"whenNoResults":"never"}},enableDidYouMean:e.didYouMean.enableDidYouMean&&e.didYouMean.queryCorrectionMode==="legacy"}),...(n&&{cq:n}),...(o.length&&{facets:o}),...(e.pagination&&{numberOfResults:m(),firstResult:e.pagination.firstResult}),...(e.facetOptions&&{facetOptions:{freezeFacetOrder:e.facetOptions.freezeFacetOrder}}),...(e.folding?.enabled&&{filterField:e.folding.fields.collection,childField:e.folding.fields.parent,parentField:e.folding.fields.child,filterFieldRange:e.folding.filterFieldRange}),...(e.automaticFacetSet&&{generateAutomaticFacets:{desiredCount:e.automaticFacetSet.desiredCount,numberOfValues:e.automaticFacetSet.numberOfValues,currentFacets:i}}),...(e.generatedAnswer&&{pipelineRuleParameters:{mlGenerativeQuestionAnswering:{responseFormat:e.generatedAnswer.responseFormat,citationsFieldToInclude:e.generatedAnswer.fieldsToIncludeInCitations}}})})});return function qt(_x99,_x100,_x101){return _ref41.apply(this,arguments)}}();function mC(e){return os(yC(e),e.facetOrder??[])}function gC(e){let t=e.automaticFacetSet?.set;return t?Object.values(t).map(r=>r.response).map(hC).filter(r=>r.currentValues.length>0):void 0}function hC(e){let{field:t,label:r,values:n}=e,o=n.filter(i=>i.state==="selected");return{field:t,label:r,currentValues:o}}function yC(e){return SC(e).filter(({facetId:t})=>e.facetOptions?.facets[t]?.enabled??!0)}function SC(e){return[...vC(e.facetSet??{}),...qp(e.numericFacetSet??{}),...qp(e.dateFacetSet??{}),...Rt(e.categoryFacetSet??{})]}function vC(e){return Rt(e).map(t=>{let r=is[t.sortCriteria];return r?{...t,sortCriteria:r}:t})}function qp(e){return Rt(e).map(t=>{let n=t.currentValues.some(({state:o})=>o!=="idle");return t.generateAutomaticRanges&&!n?{...t,currentValues:[]}:t})}function CC(e){let t=e.advancedSearchQueries?.cq.trim()||"",n=Object.values(e.tabSet||{}).find(i=>i.isActive)?.expression.trim()||"",o=Lo(e);return[t,n,...o].filter(i=>!!i).join(" AND ")}var Nt=class{constructor(t,r=n=>{this.dispatch(kt({q:n}))}){this.config=t;this.onUpdateQueryForCorrection=r}fetchFromAPI({mappings:t,request:r},n){var _this16=this;return _asyncToGenerator(function*(){let o=new Date().getTime(),i=Vo(yield _this16.extra.apiClient.search(r,n),t),a=new Date().getTime()-o,m=_this16.getState().query?.q||"";return{response:i,duration:a,queryExecuted:m,requestExecuted:r}})()}process(t){var _this17=this;return _asyncToGenerator(function*(){return _this17.processQueryErrorOrContinue(t)??(yield _this17.processQueryCorrectionsOrContinue(t))??(yield _this17.processQueryTriggersOrContinue(t))??_this17.processSuccessResponse(t)})()}processQueryErrorOrContinue(t){return ke(t.response)?(this.dispatch(Ot(t.response.error)),this.rejectWithValue(t.response.error)):null}processQueryCorrectionsOrContinue(t){var _this18=this;return _asyncToGenerator(function*(){let r=_this18.getState(),n=_this18.getSuccessResponse(t);if(!n||!r.didYouMean)return null;let{enableDidYouMean:o,automaticallyCorrectQuery:i}=r.didYouMean,{results:a,queryCorrections:m,queryCorrection:f}=n;if(!o||!i)return null;let p=a.length===0&&m&&m.length!==0,h=!X(f)&&!X(f.correctedQuery);if(!p&&!h)return null;let S=p?yield _this18.processLegacyDidYouMeanAutoCorrection(t):_this18.processModernDidYouMeanAutoCorrection(t);return _this18.dispatch(Xe(rt(_this18.getState()))),S})()}processLegacyDidYouMeanAutoCorrection(t){var _this19=this;return _asyncToGenerator(function*(){let r=_this19.getCurrentQuery(),n=_this19.getSuccessResponse(t);if(!n.queryCorrections)return null;let{correctedQuery:o}=n.queryCorrections[0],i=yield _this19.automaticallyRetryQueryWithCorrection(o);return ke(i.response)?(_this19.dispatch(Ot(i.response.error)),_this19.rejectWithValue(i.response.error)):(_this19.dispatch(Xe(rt(_this19.getState()))),{...i,response:{...i.response.success,queryCorrections:n.queryCorrections},automaticallyCorrected:!0,originalQuery:r})})()}processModernDidYouMeanAutoCorrection(t){let r=this.getSuccessResponse(t),{correctedQuery:n,originalQuery:o}=r.queryCorrection;return this.onUpdateQueryForCorrection(n),{...t,response:{...r},queryExecuted:n,automaticallyCorrected:!0,originalQuery:o}}processQueryTriggersOrContinue(t){var _this20=this;return _asyncToGenerator(function*(){let r=_this20.getSuccessResponse(t);if(!r)return null;let n=r.triggers.find(m=>m.type==="query")?.content||"";if(!n)return null;if(_this20.getState().triggers?.queryModification.queryToIgnore===n)return _this20.dispatch(bi("")),null;let i=_this20.getCurrentQuery(),a=yield _this20.automaticallyRetryQueryWithTriggerModification(n);return ke(a.response)?(_this20.dispatch(Ot(a.response.error)),_this20.rejectWithValue(a.response.error)):(_this20.dispatch(Xe(rt(_this20.getState()))),{...a,response:{...a.response.success},automaticallyCorrected:!1,originalQuery:i})})()}processSuccessResponse(t){return this.dispatch(Xe(rt(this.getState()))),{...t,response:this.getSuccessResponse(t),automaticallyCorrected:!1,originalQuery:this.getCurrentQuery()}}getSuccessResponse(t){return Bn(t.response)?t.response.success:null}automaticallyRetryQueryWithCorrection(t){var _this21=this;return _asyncToGenerator(function*(){_this21.onUpdateQueryForCorrection(t);let r=_this21.getState(),{actionCause:n}=Pp(),o=yield _this21.fetchFromAPI(yield qt(r,_this21.extra.navigatorContext,{actionCause:n}),{origin:"mainSearch"});return _this21.dispatch(Ci(t)),o})()}automaticallyRetryQueryWithTriggerModification(t){var _this22=this;return _asyncToGenerator(function*(){return _this22.dispatch(Ai({newQuery:t,originalQuery:_this22.getCurrentQuery()})),_this22.onUpdateQueryForCorrection(t),yield _this22.fetchFromAPI(yield qt(_this22.getState(),_this22.extra.navigatorContext),{origin:"mainSearch"})})()}getCurrentQuery(){let t=this.getState();return t.query?.q!==void 0?t.query.q:""}get extra(){return this.config.extra}getState(){return this.config.getState()}get dispatch(){return this.config.dispatch}get rejectWithValue(){return this.config.rejectWithValue}};var fY=ue("search/prepareForSearchWithQuery",(e,t)=>{let{dispatch:r}=t;B(e,{q:new H,enableQuerySyntax:new te,clearFilters:new te}),e.clearFilters&&(r(Lr()),r(si())),r(di({allow:!0})),r(kt({q:e.q,enableQuerySyntax:e.enableQuerySyntax})),r(Ft(1))}),Np=ue("search/executeSearch",/*#__PURE__*/function(){var _ref42=_asyncToGenerator(function*(e,t){let r=t.getState();if(r.configuration.analytics.analyticsMode==="legacy")return wi(r,t,e.legacy);_p(r);let n=e.next?Vp(e.next):void 0,o=yield qt(r,t.extra.navigatorContext,n),i=new Nt({...t,analyticsAction:n??{}}),a=yield i.fetchFromAPI(o,{origin:"mainSearch"});return yield i.process(a)});return function(_x102,_x103){return _ref42.apply(this,arguments)}}()),mY=ue("search/fetchPage",/*#__PURE__*/function(){var _ref43=_asyncToGenerator(function*(e,t){let r=t.getState();if(_p(r),r.configuration.analytics.analyticsMode==="legacy"||!e.next)return qs(r,t,e.legacy);let n=new Nt({...t,analyticsAction:e.next}),o=yield qt(r,t.extra.navigatorContext,e.next),i=yield n.fetchFromAPI(o,{origin:"mainSearch"});return yield n.process(i)});return function(_x104,_x105){return _ref43.apply(this,arguments)}}()),gY=ue("search/fetchMoreResults",/*#__PURE__*/function(){var _ref44=_asyncToGenerator(function*(e,t){let r=t.getState();if(r.configuration.analytics.analyticsMode==="legacy")return Ns(t,r);let n=il("browseResults",t.getState),o=new Nt({...t,analyticsAction:n}),i=yield bC(r,t.extra.navigatorContext,n),a=yield o.fetchFromAPI(i,{origin:"mainSearch"});return yield o.process(a)});return function(_x106,_x107){return _ref44.apply(this,arguments)}}()),hY=ue("search/fetchFacetValues",/*#__PURE__*/function(){var _ref45=_asyncToGenerator(function*(e,t){let r=t.getState();if(r.configuration.analytics.analyticsMode==="legacy")return wi(r,t,e.legacy);let n=new Nt({...t,analyticsAction:{}}),o=yield wC(r,t.extra.navigatorContext),i=yield n.fetchFromAPI(o,{origin:"facetValues"});return yield n.process(i)});return function(_x108,_x109){return _ref45.apply(this,arguments)}}()),yY=ue("search/fetchInstantResults",/*#__PURE__*/function(){var _ref46=_asyncToGenerator(function*(e,t){let r=t.getState();if(r.configuration.analytics.analyticsMode==="legacy")return Ms(e,t);B(e,{id:G,q:G,maxResultsPerQuery:new J({required:!0,min:1}),cacheTimeout:new J});let{q:n,maxResultsPerQuery:o}=e,i=Vp(Ep()),a=yield AC(r,t.extra.navigatorContext,n,o,i),m=new Nt({...t,analyticsAction:i},h=>{t.dispatch(fi({q:h,id:e.id}))}),f=yield m.fetchFromAPI(a,{origin:"instantResults",disableAbortWarning:!0}),p=yield m.process(f);return"response"in p?{results:p.response.results,searchUid:p.response.searchUid,totalCountFiltered:p.response.totalCountFiltered,duration:p.duration}:p});return function(_x110,_x111){return _ref46.apply(this,arguments)}}()),bC=/*#__PURE__*/function(){var _ref47=_asyncToGenerator(function*(e,t,r){let n=yield qt(e,t,r);return n.request={...n.request,firstResult:(e.pagination?.firstResult??0)+(e.search?.results.length??0)},n});return function bC(_x112,_x113,_x114){return _ref47.apply(this,arguments)}}(),AC=/*#__PURE__*/function(){var _ref48=_asyncToGenerator(function*(e,t,r,n,o){let i=_r(e,t,o);return xt({...i,...(e.didYouMean&&{enableDidYouMean:e.didYouMean.enableDidYouMean}),numberOfResults:n,q:r})});return function AC(_x115,_x116,_x117,_x118,_x119){return _ref48.apply(this,arguments)}}(),wC=/*#__PURE__*/function(){var _ref49=_asyncToGenerator(function*(e,t,r){let n=yield qt(e,t,r);return n.request.numberOfResults=0,n});return function wC(_x120,_x121,_x122){return _ref49.apply(this,arguments)}}(),_p=e=>{e.configuration.analytics.enabled&&et.addElement({name:"Query",...(e.query?.q&&{value:e.query.q}),time:JSON.stringify(new Date)})},Vp=e=>({actionCause:e.actionCause,type:e.actionCause});var Lp=ge(Tn(),e=>{e.addCase(gi,(t,r)=>{let n=_s(t),o=r.payload;t.defaultNumberOfResults=t.numberOfResults=o,t.firstResult=Fn(n,o)}).addCase(hi,(t,r)=>{t.numberOfResults=r.payload,t.firstResult=0}).addCase(Ho,t=>{t.firstResult=0}).addCase(yi,(t,r)=>{let n=r.payload;t.firstResult=Fn(n,t.numberOfResults)}).addCase(Ft,(t,r)=>{let n=r.payload;t.firstResult=Fn(n,t.numberOfResults)}).addCase(vi,t=>{let r=_s(t),n=Math.max(r-1,1);t.firstResult=Fn(n,t.numberOfResults)}).addCase(Si,t=>{let r=_s(t),n=RC(t),o=Math.min(r+1,n);t.firstResult=Fn(o,t.numberOfResults)}).addCase(Me.fulfilled,(t,r)=>{r.payload&&(t.numberOfResults=r.payload.pagination.numberOfResults,t.firstResult=r.payload.pagination.firstResult)}).addCase(vt,(t,r)=>{t.firstResult=r.payload.firstResult??t.firstResult,t.numberOfResults=r.payload.numberOfResults??t.defaultNumberOfResults}).addCase(Np.fulfilled,(t,r)=>{let{response:n}=r.payload;t.totalCountFiltered=n.totalCountFiltered}).addCase(ci,t=>{Pe(t)}).addCase(vp,t=>{Pe(t)}).addCase(mp,t=>{Pe(t)}).addCase(wp,t=>{Pe(t)}).addCase(cp,t=>{Pe(t)}).addCase(fp,t=>{Pe(t)}).addCase(op,t=>{Pe(t)}).addCase(np,t=>{Pe(t)}).addCase(ip,t=>{Pe(t)}).addCase(Sp,t=>{Pe(t)}).addCase(Ap,t=>{Pe(t)}).addCase(Lr,t=>{Pe(t)}).addCase(Cp,t=>{Pe(t)}).addCase(xp,t=>{Pe(t)}).addCase(sp,t=>{Pe(t)}).addCase(rp,t=>{Pe(t)})});function Pe(e){e.firstResult=Tn().firstResult}function _s(e){let{firstResult:t,numberOfResults:r}=e;return EC(t,r)}function RC(e){let{totalCountFiltered:t,numberOfResults:r}=e;return PC(t,r)}function Fn(e,t){return(e-1)*t}function EC(e,t){return Math.round(e/t)+1}function PC(e,t){let r=Math.min(e,5e3);return Math.ceil(r/t)}function Vs(e){return e.addReducers({pagination:Lp}),{nextPage:Si,previousPage:vi,registerNumberOfResults:gi,registerPage:yi,updateNumberOfResults:hi,updatePage:Ft}}d();c();l();u();function _t(e){let t,r=new Map,n=()=>r.size===0,o=i=>{try{let a=JSON.stringify(i),m=t!==a;return t=a,m}catch(a){return console.warn("Could not detect if state has changed, check the controller \"get state method\"",a),!0}};return{subscribe(i){i();let a=Symbol(),m;return n()&&(t=JSON.stringify(this.state),m=e.subscribe(()=>{o(this.state)&&r.forEach(f=>f())})),r.set(a,i),()=>{r.delete(a),n()&&m&&m()}},get state(){return{}}}}d();c();l();u();var IC=new Fe({id:new H({emptyAllowed:!0,required:!1,default:""}),numberOfRecommendations:new J({min:0})});function jp(e,t={}){if(!TC(e))throw Ge;let r=_t(e),{dispatch:n}=e,o=()=>e.state,i=lu(e,IC,t.options,"buildRecommendationList");return i.id!==""&&n(xr({id:i.id})),i.numberOfRecommendations&&n(Vs(e).updateNumberOfResults(i.numberOfRecommendations)),{...r,refresh(){n(At())},get state(){let a=o();return{recommendations:a.recommendation.recommendations,error:a.recommendation.error,isLoading:a.recommendation.isLoading,searchResponseId:a.recommendation.searchUid}}}}function TC(e){return e.addReducers({recommendation:Rr,configuration:ze}),!0}d();c();l();u();d();c();l();u();function Up(e,t,r){if(!FC(e))throw Ge;let n=1e3,o={selectionDelay:n,debounceWait:n,...t.options},i;return{select:Wo(r,o.debounceWait,{isImmediate:!0}),beginDelayedSelect(){i=setTimeout(r,o.selectionDelay)},cancelPendingSelect(){i&&clearTimeout(i)}}}function FC(e){return e.addReducers({configuration:ze}),!0}function Bp(e,t){let r=!1,n=()=>{r||(r=!0,e.dispatch(Oo(t.options.result)))};return Up(e,t,()=>{n()})}d();c();l();u();d();c();l();u();d();c();l();u();var kC=["caseId","caseNumber"],OC={caseId:"caseContext",caseNumber:"caseContext"},kn=class extends Error{constructor(t){super(`The key "${t}" is reserved for internal use. Use ${OC[t]} to set this value.}`)}};function Ls(e){return kC.includes(e)}var DC=new Fe({values:new K({options:{required:!1}})});function Qp(e,t={}){if(!NC(e))throw Ge;let r=_t(e),{dispatch:n}=e,o=()=>e.state,i=uu(e,DC,t.initialState,"buildContext");return i.values&&n(Gt(i.values)),{...r,get state(){return{values:o().context.contextValues}},set(a){n(Gt(a))},...(o().configuration.analytics.analyticsMode==="legacy"?MC(n):qC(n))}}var MC=e=>({add(t,r){e(Kt({contextKey:t,contextValue:r}))},remove(t){e(Yt(t))}}),qC=e=>({add(t,r){if(Ls(t))throw new kn(t);e(Kt({contextKey:t,contextValue:r}))},remove(t){if(Ls(t))throw new kn(t);e(Yt(t))}});function NC(e){return e.addReducers({context:Zo}),!0}function $p(e,t){return Qp(e,t)}d();c();l();u();function Hp(e){if(!_C(e))throw Ge;let t=_t(e),{dispatch:r}=e,n=()=>e.state;return{...t,get state(){return{values:n().dictionaryFieldContext.contextValues}},set(o){r(Mr(o))},add(o,i){r(qr({field:o,key:i}))},remove(o){r(Nr(o))}}}function _C(e){return e.addReducers({dictionaryFieldContext:ti}),!0}d();c();l();u();d();c();l();u();var VC=new Fe({content:new de({required:!0}),conditions:new de({required:!0}),priority:new J({required:!1,default:0,min:0}),fields:new ie({required:!1,each:G})});function zp(){let e=[],t=r=>{let n=VC.validate(r);if(!r.conditions.every(i=>i instanceof Function))throw new Wr("Each template condition should be a function that takes a Result or Product as an argument and returns a boolean");return n};return{registerTemplates(...r){r.forEach(n=>{let o={...t(n),fields:n.fields||[]};e.push(o)}),e.sort((n,o)=>o.priority-n.priority)},selectTemplate(r){let n=e.find(o=>o.conditions.every(i=>i(r)));return n?n.content:null},selectLinkTemplate(r){let n=e.find(o=>o.conditions.every(i=>i(r)));return n?n.linkContent:null}}}function Wp(e){if(!LC(e))throw Ge;let{registerTemplates:t,selectTemplate:r,selectLinkTemplate:n}=zp();return{registerTemplates:(...o)=>{t(...o);let i=[];o.forEach(a=>{a.fields&&i.push(...a.fields)}),e.dispatch(Vr(i))},selectTemplate:r,selectLinkTemplate:n}}function LC(e){return e.addReducers({fields:ai}),!0}d();c();l();u();var xi=(e,t)=>{let r=e;return X(r[t])?X(e.raw[t])?null:e.raw[t]:r[t]},jC=e=>t=>e.every(r=>!X(xi(t,r))),UC=e=>t=>e.every(r=>X(xi(t,r))),BC=(e,t)=>r=>{let n=Gp(e,r);return t.some(o=>n.some(i=>`${i}`.toLowerCase()===o.toLowerCase()))},QC=(e,t)=>r=>{let n=Gp(e,r);return t.every(o=>n.every(i=>`${i}`.toLowerCase()!==o.toLowerCase()))},Gp=(e,t)=>{let r=xi(t,e);return cc(r)?r:[r]},Kp={getResultProperty:xi,fieldsMustBeDefined:jC,fieldsMustNotBeDefined:UC,fieldMustMatch:BC,fieldMustNotMatch:QC};/**
32
32
  * @license
33
33
  *
34
34
  * Copyright 2025 Coveo Solutions Inc.
@@ -44,4 +44,6 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
44
44
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
45
45
  * See the License for the specific language governing permissions and
46
46
  * limitations under the License.
47
- */if(__exports!=exports)module.exports=exports;return module.exports});
47
+ */if(__exports!=exports)module.exports=exports;return module.exports});
48
+
49
+ window.coveoQuanticVersion = '3.21.2-pre.41f1eb2e37';