@coveo/headless 3.23.2-pre.57bb336b29 → 3.23.2-pre.d35ebef42a
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/case-assist/headless.esm.js +1 -1
- package/dist/browser/case-assist/headless.js +1 -1
- package/dist/browser/commerce/headless.esm.js +1 -1
- package/dist/browser/commerce/headless.js +1 -1
- package/dist/browser/headless.esm.js +1 -1
- package/dist/browser/headless.js +1 -1
- package/dist/browser/insight/headless.esm.js +1 -1
- package/dist/browser/insight/headless.js +1 -1
- package/dist/browser/recommendation/headless.esm.js +1 -1
- package/dist/browser/recommendation/headless.js +1 -1
- package/dist/browser/ssr/headless.esm.js +1 -1
- package/dist/browser/ssr/headless.js +1 -1
- package/dist/browser/ssr-commerce/headless.esm.js +1 -1
- package/dist/browser/ssr-commerce/headless.js +1 -1
- package/dist/case-assist/headless.cjs +1 -1
- package/dist/case-assist/headless.esm.js +1 -1
- package/dist/commerce/headless.cjs +1 -1
- package/dist/commerce/headless.esm.js +1 -1
- package/dist/headless.cjs +1 -1
- package/dist/headless.esm.js +1 -1
- package/dist/insight/headless.cjs +1 -1
- package/dist/insight/headless.esm.js +1 -1
- package/dist/quantic/case-assist/headless.js +1 -1
- package/dist/quantic/commerce/headless.js +1 -1
- package/dist/quantic/headless.js +1 -1
- package/dist/quantic/insight/headless.js +1 -1
- package/dist/quantic/recommendation/headless.js +1 -1
- package/dist/recommendation/headless.cjs +1 -1
- package/dist/recommendation/headless.esm.js +1 -1
- package/dist/ssr/headless.cjs +1 -1
- package/dist/ssr/headless.esm.js +1 -1
- package/dist/ssr-commerce/headless.cjs +1 -1
- package/dist/ssr-commerce/headless.esm.js +1 -1
- package/package.json +1 -1
|
@@ -24,7 +24,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
24
24
|
`)}
|
|
25
25
|
|
|
26
26
|
${t}
|
|
27
|
-
`;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 kf(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 Of(e){return e===null}function X(e){return Ce(e)||Of(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||(Df(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 Df(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||(Mf(e)?null:"value is not a boolean.")}get default(){return this.value.default}get required(){return this.value.required}};function Mf(e){return Ce(e)||nc(e)}function nc(e){return typeof e=="boolean"}var qf=/^\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&&!(qf.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 Nf=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=>Nf.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 _f(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 Vf(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={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},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?Lf(e):jf(t)},Lf=e=>Bf(e)?Qf(e):Uf(e)?e.body:{message:"unknown",statusCode:0,type:"unknown"},jf=e=>{let t=JSON.parse(JSON.stringify(e,Object.getOwnPropertyNames(e)));return{...t,message:`Client side error: ${t.message||""}`,statusCode:400,type:"ClientError"}};function Uf(e){return e.body.statusCode!==void 0}function Bf(e){return e.body.exception!==void 0}var Qf=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 gm="recommendation-internal-options",BA=Symbol.for(gm);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(hm)}function hm(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"}function Ac(e){return e===429}var $e=class e{static async call(t){let r=ym(t),{logger:n}=t,o=await e.preprocessRequest(r,t);n.info(o,"Platform request");let{url:i,...a}=o,m=async()=>{let f=await b(i,a);if(Ac(f.status))throw f;return f};try{let f=await(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 async preprocessRequest(t,r){let{origin:n,preprocessRequest:o,logger:i,requestMetadata:a}=r,{signal:m,...f}=t,c=Kr(f);try{let h=await 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 ym(e){let{url:t,method:r,requestParams:n,contentType:o,accessToken:i,signal:a}=e,m=e.method==="POST"||e.method==="PUT",f=Sm(n,o);return{url:t,method:r,headers:{"Content-Type":o,Authorization:`Bearer ${i}`,...e.headers},...m&&{body:f},signal:a}}function Sm(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)}async enqueue(t,r){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 await 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=async(e,t)=>{let r=await $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=await r.arrayBuffer(),a=new TextDecoder(n).decode(o);return vm(a)?{success:a}:{error:gt({response:r,body:a})}};function vm(e){return typeof e=="string"}p();u();d();l();function Cm(e){return{statusCode:e.statusCode,type:e.name,message:e.message}}function bm(e){return{statusCode:e.code,type:e.name,message:e.message,ignored:!0}}function Ln(e,t){if(t&&e.name==="AbortError")return{error:bm(e)};if(e instanceof Lt)return{error:Cm(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})}async plan(t){let r=await $e.call({...ot(t,"POST","application/json","/plan"),requestParams:mt(t),requestMetadata:{method:"plan"},...this.options});if(r instanceof Error)return Ln(r);let n=await r.json();return wm(n)?{success:n}:{error:gt({response:r,body:n})}}async querySuggest(t){let r=await $e.call({...ot(t,"POST","application/json","/querySuggest"),requestMetadata:{method:"querySuggest"},requestParams:mt(t),...this.options});if(r instanceof Error)return Ln(r);let n=await r.json(),o={response:r,body:n};return Am(n)?{success:(await this.options.postprocessQuerySuggestResponseMiddleware(o)).body}:{error:gt(o)}}async search(t,r){let n=r?.origin??"unknown",o=await this.apiCallsQueues[n].enqueue(m=>$e.call({...ot(t,"POST","application/json",""),requestParams:mt(t),requestMetadata:{method:"search",origin:r?.origin},...this.options,signal:m??void 0}),{logger:this.options.logger,warnOnAbort:!r?.disableAbortWarning});if(o instanceof Error)return Ln(o,r?.disableAbortWarning);let i=await o.json(),a={response:o,body:i};return Ec(i)?(a.body=Pc(i),{success:(await this.options.postprocessSearchResponseMiddleware(a)).body}):{error:gt(a)}}async facetSearch(t){let r=await $e.call({...ot(t,"POST","application/json","/facet"),requestParams:mt(t),requestMetadata:{method:"facetSearch"},...this.options});if(r instanceof Error)throw r;let n=await r.json(),o={response:r,body:n};return(await this.options.postprocessFacetSearchResponseMiddleware(o)).body}async recommendations(t){let r=await $e.call({...ot(t,"POST","application/json",""),requestParams:mt(t),requestMetadata:{method:"recommendations"},...this.options});if(r instanceof Error)throw r;let n=await r.json();if(Ec(n)){let o={response:r,body:n};return o.body=Pc(n),{success:(await this.options.postprocessSearchResponseMiddleware(o)).body}}return{error:gt({response:r,body:n})}}async html(t){return Rc(t,{...this.options})}async fieldDescriptions(t){let r=await $e.call({...ot(t,"GET","application/json","/fields"),requestParams:{},requestMetadata:{method:"fieldDescriptions"},...this.options});if(r instanceof Error)throw r;let n=await r.json();return xm(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 Am(e){return e.completions!==void 0}function wm(e){return e.preprocessingOutput!==void 0}function xm(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 Rm=typeof Symbol=="function"&&Symbol.observable||"@@observable",Ic=Rm,Qi=()=>Math.random().toString(36).substring(7).split("").join("."),Em={INIT:`@@redux/INIT${Qi()}`,REPLACE:`@@redux/REPLACE${Qi()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Qi()}`},Bn=Em;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 Pm(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{Pm(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 Im=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)===Im}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 Tm(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=Fm),Object.freeze(e),t&&Object.entries(e).forEach(([r,n])=>zn(n,!0))),e}function Fm(){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 km(e,t){Ki[e]||(Ki[e]=t)}var rn;function Nc(){return rn}function Om(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(Dm),e.drafts_=null}function Ji(e){e===rn&&(rn=e.parent_)}function kc(e){return rn=Om(rn,e)}function Dm(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 Mm(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 qm(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(Tm(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 qm(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 Nm=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):Mm(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}km("Patches",{applyPatches_:c,generatePatches_:o,generateReplacementPatches_:f})}var _e=new Nm,it=_e.produce,Gn=_e.produceWithPatches.bind(_e),bx=_e.setAutoFreeze.bind(_e),Ax=_e.setUseStrictShallowCopy.bind(_e),na=_e.applyPatches.bind(_e),wx=_e.createDraft.bind(_e),xx=_e.finishDraft.bind(_e);p();u();d();l();function _m(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function Vm(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function Lm(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 jm(e){let t=Array.isArray(e[0])?e[0]:e;return Lm(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function Um(e,t){let r=[],{length:n}=e;for(let o=0;o<n;o++)r.push(e[o].apply(null,t));return r}var kx=Symbol();var Ox=Object.getPrototypeOf({});var Bm=class{constructor(e){this.value=e}deref(){return this.value}},Qm=typeof WeakRef<"u"?WeakRef:Bm,$m=0,Bc=1;function Kn(){return{s:$m,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 Qm(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()),_m(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=jm(o),w=y(function(){return i++,c.apply(null,arguments)},...I),E=!0,N=g(function(){a++;let P=Um(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),Hm=Object.assign((e,t=fe)=>{Vm(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:()=>Hm});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 zm=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)},Yx=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}},Wm=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 Gm(e){return typeof e=="boolean"}var Km=()=>function(t){let{thunk:r=!0,immutableCheck:n=!0,serializableCheck:o=!0,actionCreatorCheck:i=!0}=t??{},a=new Jc;return r&&(Gm(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)},Ym=(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}}})},Jm=e=>function(r){let{autoBatch:n=!0}=r??{},o=new Jc(e);return n&&o.push(Ym(typeof n=="object"?n:void 0)),o};function Xc(e){let t=Km(),{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=zm({trace:!1,...typeof o=="object"&&o}));let h=Tc(...f),y=Jm(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 Xm(e){return typeof e=="function"}function ge(e,t){let[r,n,o]=Zc(t),i;if(Xm(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)=>Wm(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 Zm="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",eo=(e=21)=>{let t="",r=e;for(;r--;)t+=Zm[Math.random()*64|0];return t},eg=["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}},tg=e=>{if(typeof e=="object"&&e!==null){let t={};for(let r of eg)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||tg)(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=async function(){let T;try{let E=n?.condition?.(f,{getState:h,extra:y});if(ng(E)&&(E=await 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=await 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(rg)}})}}return Object.assign(m,{pending:i,rejected:a,fulfilled:o,settled:Ye(a,o),typePrefix:t})}return e.withTypes=()=>e,e})();function rg(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function ng(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var tu=Symbol.for("rtk-slice-createasyncthunk"),tR={[tu]:ue};function og(e,t){return`${e}/${t}`}function ig({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(sg()):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:og(o,T),createNotation:typeof n.reducers=="function"};ug(w)?dg(E,w,c,t):cg(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]=ag(_,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 ag(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=ig();function sg(){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 cg({type:e,reducerName:t,createNotation:r},n,o){let i,a;if("reducer"in n){if(r&&!lg(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 ug(e){return e._reducerDefinitionType==="asyncThunk"}function lg(e){return e._reducerDefinitionType==="reducerWithPrepare"}function dg({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",rR=`task-${ou}`,nR=`task-${nu}`,oR=`${ru}-${ou}`,iR=`${ru}-${nu}`;var{assign:iu}=Object;var ia="listenerMiddleware";var pg=iu(D(`${ia}/add`),{withTypes:()=>pg}),aR=D(`${ia}/removeAll`),fg=iu(D(`${ia}/remove`),{withTypes:()=>fg});var sR=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}),CR=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.23.2-pre.57bb336b29",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})})),mg={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,mg)),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)),XR=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 gg=D("history/undo"),hg=D("history/redo"),Xe=D("history/snapshot"),DE=ue("history/back",async(e,{dispatch:t})=>{t(gg()),await t(Me())}),ME=ue("history/forward",async(e,{dispatch:t})=>{t(hg()),await t(Me())}),Me=ue("history/change",async(e,{getState:t})=>t().history.present);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 yg(){try{return typeof sessionStorage<"u"}catch{return!1}}function Eu(){return Aa()&&navigator.cookieEnabled}var Sg=[ae.click,ae.custom,ae.search,ae.view],vg=(e,t)=>Sg.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 Cg(){return la()?localStorage:Eu()?new mn:yg()?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||Cg()}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}),bg=(e,t)=>M(void 0,void 0,void 0,function*(){return e===ae.view?(yield Ag(t.contentIdValue),Object.assign({location:window.location.toString(),referrer:document.referrer,title:document.title},t)):t}),Ag=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,wg=new Uint8Array(16);function xg(){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(wg)}var Rg=/^(?:[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"&&Rg.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 Eg(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 Pg(e){e=unescape(encodeURIComponent(e));let t=[];for(let r=0;r<e.length;++r)t.push(e.charCodeAt(r));return t}var Ig="6ba7b810-9dad-11d1-80b4-00c04fd430c8",Tg="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function Fg(e,t,r){function n(o,i,a,m){var f;if(typeof o=="string"&&(o=Pg(o)),typeof i=="string"&&(i=Eg(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=Ig,n.URL=Tg,n}var kg=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),mu={randomUUID:kg};function zt(e,t,r){if(mu.randomUUID&&!t&&!e)return mu.randomUUID();e=e||{};let n=e.random||(e.rng||xg)();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 Og(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 Dg(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)+Og(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 Mg=Fg("v5",80,Dg),gu=Mg,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 qg(e){return(e&248)===Su?4:(e&Su)===yu?3:(e&yu)===Du?2:1}function Ng(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>=qg(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"},_g=Qe(ma).map(e=>ma[e]),Vg=[..._g].join("|"),Lg=new RegExp(`^(${Vg}$)`),jg={svcAction:"svc_action",svcActionData:"svc_action_data"},Ug=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]})},{}),Bg=e=>Lg.test(e),Qg=[Bg],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"},$g=["loyaltyCardId","loyaltyTier","thirdPartyPersona","companyName","favoriteStore","storeName","userIndustry","userRole","userDepartment","businessUnit"],ga={id:"quoteId",affiliation:"quoteAffiliation"},ha={id:"reviewId",rating:"reviewRating",comment:"reviewComment"},Hg={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)},zg=Qe(vu).map(e=>vu[e]),Wg=Qe(Cu).map(e=>Cu[e]),Gg=Qe(Ee).map(e=>Ee[e]),Kg=Qe(fo).map(e=>fo[e]),Yg=Qe(ha).map(e=>ha[e]),Jg=Qe(ga).map(e=>ga[e]),Xg=[...zg,"custom"].join("|"),Zg=[...Wg,"custom"].join("|"),Mu="(pr[0-9]+)",qu="(il[0-9]+pi[0-9]+)",eh=new RegExp(`^${Mu}(${Xg})$`),th=new RegExp(`^(${qu}(${Zg}))|(il[0-9]+nm)$`),rh=new RegExp(`^(${Gg.join("|")})$`),nh=new RegExp(`^(${Kg.join("|")})$`),oh=new RegExp(`^${Mu}custom$`),ih=new RegExp(`^${qu}custom$`),ah=new RegExp(`^(${[...$g,...Yg,...Jg].join("|")})$`),sh=e=>eh.test(e),ch=e=>th.test(e),uh=e=>rh.test(e),lh=e=>nh.test(e),dh=e=>ah.test(e),ph=[ch,sh,uh,lh,dh],fh=[oh,ih],mh={anonymizeIp:"aip"},gh={eventCategory:"ec",eventAction:"ea",eventLabel:"el",eventValue:"ev",page:"dp",visitorId:"cid",clientId:"cid",userId:"uid",currencyCode:"cu"},hh={hitType:"t",pageViewId:"pid",encoding:"de",location:"dl",referrer:"dr",screenColor:"sd",screenResolution:"sr",title:"dt",userAgent:"ua",language:"ul",eventId:"z",time:"tm"},yh=["contentId","contentIdKey","contentType","searchHub","tab","searchUid","permanentId","contentLocale","trackingId"],Sh=Object.assign(Object.assign(Object.assign(Object.assign({},mh),gh),hh),yh.reduce((e,t)=>Object.assign(Object.assign({},e),{[t]:t}),{})),ya=Object.assign(Object.assign({},Sh),jg),vh=e=>{let t=!!e.action&&Hg[e.action]||{};return Qe(e).reduce((r,n)=>{let o=t[n]||ya[n]||n;return Object.assign(Object.assign({},r),{[o]:e[n]})},{})},Ch=Qe(ya).map(e=>ya[e]),bh=e=>Ch.indexOf(e)!==-1,Ah=e=>e==="custom",wh=e=>[...ph,...Qg,bh,Ah].some(t=>t(e)),xh=e=>Qe(e).reduce((t,r)=>{let n=Rh(r);return n?Object.assign(Object.assign({},t),Eh(n,e[r])):Object.assign(Object.assign({},t),{[r]:e[r]})},{}),Rh=e=>{let t;return[...fh].every(r=>{var n;return t=(n=r.exec(e))===null||n===void 0?void 0:n[1],!t}),t},Eh=(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}},Ph="xx",Ih=e=>e?.startsWith(Ph)||!1,Th=`
|
|
27
|
+
`;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 kf(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 Of(e){return e===null}function X(e){return Ce(e)||Of(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||(Df(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 Df(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||(Mf(e)?null:"value is not a boolean.")}get default(){return this.value.default}get required(){return this.value.required}};function Mf(e){return Ce(e)||nc(e)}function nc(e){return typeof e=="boolean"}var qf=/^\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&&!(qf.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 Nf=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=>Nf.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 _f(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 Vf(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={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},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?Lf(e):jf(t)},Lf=e=>Bf(e)?Qf(e):Uf(e)?e.body:{message:"unknown",statusCode:0,type:"unknown"},jf=e=>{let t=JSON.parse(JSON.stringify(e,Object.getOwnPropertyNames(e)));return{...t,message:`Client side error: ${t.message||""}`,statusCode:400,type:"ClientError"}};function Uf(e){return e.body.statusCode!==void 0}function Bf(e){return e.body.exception!==void 0}var Qf=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 gm="recommendation-internal-options",BA=Symbol.for(gm);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(hm)}function hm(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"}function Ac(e){return e===429}var $e=class e{static async call(t){let r=ym(t),{logger:n}=t,o=await e.preprocessRequest(r,t);n.info(o,"Platform request");let{url:i,...a}=o,m=async()=>{let f=await b(i,a);if(Ac(f.status))throw f;return f};try{let f=await(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 async preprocessRequest(t,r){let{origin:n,preprocessRequest:o,logger:i,requestMetadata:a}=r,{signal:m,...f}=t,c=Kr(f);try{let h=await 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 ym(e){let{url:t,method:r,requestParams:n,contentType:o,accessToken:i,signal:a}=e,m=e.method==="POST"||e.method==="PUT",f=Sm(n,o);return{url:t,method:r,headers:{"Content-Type":o,Authorization:`Bearer ${i}`,...e.headers},...m&&{body:f},signal:a}}function Sm(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)}async enqueue(t,r){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 await 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=async(e,t)=>{let r=await $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=await r.arrayBuffer(),a=new TextDecoder(n).decode(o);return vm(a)?{success:a}:{error:gt({response:r,body:a})}};function vm(e){return typeof e=="string"}p();u();d();l();function Cm(e){return{statusCode:e.statusCode,type:e.name,message:e.message}}function bm(e){return{statusCode:e.code,type:e.name,message:e.message,ignored:!0}}function Ln(e,t){if(t&&e.name==="AbortError")return{error:bm(e)};if(e instanceof Lt)return{error:Cm(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})}async plan(t){let r=await $e.call({...ot(t,"POST","application/json","/plan"),requestParams:mt(t),requestMetadata:{method:"plan"},...this.options});if(r instanceof Error)return Ln(r);let n=await r.json();return wm(n)?{success:n}:{error:gt({response:r,body:n})}}async querySuggest(t){let r=await $e.call({...ot(t,"POST","application/json","/querySuggest"),requestMetadata:{method:"querySuggest"},requestParams:mt(t),...this.options});if(r instanceof Error)return Ln(r);let n=await r.json(),o={response:r,body:n};return Am(n)?{success:(await this.options.postprocessQuerySuggestResponseMiddleware(o)).body}:{error:gt(o)}}async search(t,r){let n=r?.origin??"unknown",o=await this.apiCallsQueues[n].enqueue(m=>$e.call({...ot(t,"POST","application/json",""),requestParams:mt(t),requestMetadata:{method:"search",origin:r?.origin},...this.options,signal:m??void 0}),{logger:this.options.logger,warnOnAbort:!r?.disableAbortWarning});if(o instanceof Error)return Ln(o,r?.disableAbortWarning);let i=await o.json(),a={response:o,body:i};return Ec(i)?(a.body=Pc(i),{success:(await this.options.postprocessSearchResponseMiddleware(a)).body}):{error:gt(a)}}async facetSearch(t){let r=await $e.call({...ot(t,"POST","application/json","/facet"),requestParams:mt(t),requestMetadata:{method:"facetSearch"},...this.options});if(r instanceof Error)throw r;let n=await r.json(),o={response:r,body:n};return(await this.options.postprocessFacetSearchResponseMiddleware(o)).body}async recommendations(t){let r=await $e.call({...ot(t,"POST","application/json",""),requestParams:mt(t),requestMetadata:{method:"recommendations"},...this.options});if(r instanceof Error)throw r;let n=await r.json();if(Ec(n)){let o={response:r,body:n};return o.body=Pc(n),{success:(await this.options.postprocessSearchResponseMiddleware(o)).body}}return{error:gt({response:r,body:n})}}async html(t){return Rc(t,{...this.options})}async fieldDescriptions(t){let r=await $e.call({...ot(t,"GET","application/json","/fields"),requestParams:{},requestMetadata:{method:"fieldDescriptions"},...this.options});if(r instanceof Error)throw r;let n=await r.json();return xm(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 Am(e){return e.completions!==void 0}function wm(e){return e.preprocessingOutput!==void 0}function xm(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 Rm=typeof Symbol=="function"&&Symbol.observable||"@@observable",Ic=Rm,Qi=()=>Math.random().toString(36).substring(7).split("").join("."),Em={INIT:`@@redux/INIT${Qi()}`,REPLACE:`@@redux/REPLACE${Qi()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Qi()}`},Bn=Em;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 Pm(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{Pm(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 Im=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)===Im}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 Tm(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=Fm),Object.freeze(e),t&&Object.entries(e).forEach(([r,n])=>zn(n,!0))),e}function Fm(){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 km(e,t){Ki[e]||(Ki[e]=t)}var rn;function Nc(){return rn}function Om(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(Dm),e.drafts_=null}function Ji(e){e===rn&&(rn=e.parent_)}function kc(e){return rn=Om(rn,e)}function Dm(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 Mm(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 qm(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(Tm(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 qm(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 Nm=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):Mm(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}km("Patches",{applyPatches_:c,generatePatches_:o,generateReplacementPatches_:f})}var _e=new Nm,it=_e.produce,Gn=_e.produceWithPatches.bind(_e),bx=_e.setAutoFreeze.bind(_e),Ax=_e.setUseStrictShallowCopy.bind(_e),na=_e.applyPatches.bind(_e),wx=_e.createDraft.bind(_e),xx=_e.finishDraft.bind(_e);p();u();d();l();function _m(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function Vm(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function Lm(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 jm(e){let t=Array.isArray(e[0])?e[0]:e;return Lm(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function Um(e,t){let r=[],{length:n}=e;for(let o=0;o<n;o++)r.push(e[o].apply(null,t));return r}var kx=Symbol();var Ox=Object.getPrototypeOf({});var Bm=class{constructor(e){this.value=e}deref(){return this.value}},Qm=typeof WeakRef<"u"?WeakRef:Bm,$m=0,Bc=1;function Kn(){return{s:$m,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 Qm(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()),_m(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=jm(o),w=y(function(){return i++,c.apply(null,arguments)},...I),E=!0,N=g(function(){a++;let P=Um(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),Hm=Object.assign((e,t=fe)=>{Vm(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:()=>Hm});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 zm=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)},Yx=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}},Wm=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 Gm(e){return typeof e=="boolean"}var Km=()=>function(t){let{thunk:r=!0,immutableCheck:n=!0,serializableCheck:o=!0,actionCreatorCheck:i=!0}=t??{},a=new Jc;return r&&(Gm(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)},Ym=(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}}})},Jm=e=>function(r){let{autoBatch:n=!0}=r??{},o=new Jc(e);return n&&o.push(Ym(typeof n=="object"?n:void 0)),o};function Xc(e){let t=Km(),{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=zm({trace:!1,...typeof o=="object"&&o}));let h=Tc(...f),y=Jm(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 Xm(e){return typeof e=="function"}function ge(e,t){let[r,n,o]=Zc(t),i;if(Xm(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)=>Wm(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 Zm="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",eo=(e=21)=>{let t="",r=e;for(;r--;)t+=Zm[Math.random()*64|0];return t},eg=["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}},tg=e=>{if(typeof e=="object"&&e!==null){let t={};for(let r of eg)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||tg)(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=async function(){let T;try{let E=n?.condition?.(f,{getState:h,extra:y});if(ng(E)&&(E=await 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=await 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(rg)}})}}return Object.assign(m,{pending:i,rejected:a,fulfilled:o,settled:Ye(a,o),typePrefix:t})}return e.withTypes=()=>e,e})();function rg(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function ng(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var tu=Symbol.for("rtk-slice-createasyncthunk"),tR={[tu]:ue};function og(e,t){return`${e}/${t}`}function ig({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(sg()):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:og(o,T),createNotation:typeof n.reducers=="function"};ug(w)?dg(E,w,c,t):cg(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]=ag(_,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 ag(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=ig();function sg(){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 cg({type:e,reducerName:t,createNotation:r},n,o){let i,a;if("reducer"in n){if(r&&!lg(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 ug(e){return e._reducerDefinitionType==="asyncThunk"}function lg(e){return e._reducerDefinitionType==="reducerWithPrepare"}function dg({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",rR=`task-${ou}`,nR=`task-${nu}`,oR=`${ru}-${ou}`,iR=`${ru}-${nu}`;var{assign:iu}=Object;var ia="listenerMiddleware";var pg=iu(D(`${ia}/add`),{withTypes:()=>pg}),aR=D(`${ia}/removeAll`),fg=iu(D(`${ia}/remove`),{withTypes:()=>fg});var sR=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}),CR=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.23.2-pre.d35ebef42a",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})})),mg={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,mg)),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)),XR=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 gg=D("history/undo"),hg=D("history/redo"),Xe=D("history/snapshot"),DE=ue("history/back",async(e,{dispatch:t})=>{t(gg()),await t(Me())}),ME=ue("history/forward",async(e,{dispatch:t})=>{t(hg()),await t(Me())}),Me=ue("history/change",async(e,{getState:t})=>t().history.present);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 yg(){try{return typeof sessionStorage<"u"}catch{return!1}}function Eu(){return Aa()&&navigator.cookieEnabled}var Sg=[ae.click,ae.custom,ae.search,ae.view],vg=(e,t)=>Sg.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 Cg(){return la()?localStorage:Eu()?new mn:yg()?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||Cg()}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}),bg=(e,t)=>M(void 0,void 0,void 0,function*(){return e===ae.view?(yield Ag(t.contentIdValue),Object.assign({location:window.location.toString(),referrer:document.referrer,title:document.title},t)):t}),Ag=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,wg=new Uint8Array(16);function xg(){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(wg)}var Rg=/^(?:[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"&&Rg.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 Eg(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 Pg(e){e=unescape(encodeURIComponent(e));let t=[];for(let r=0;r<e.length;++r)t.push(e.charCodeAt(r));return t}var Ig="6ba7b810-9dad-11d1-80b4-00c04fd430c8",Tg="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function Fg(e,t,r){function n(o,i,a,m){var f;if(typeof o=="string"&&(o=Pg(o)),typeof i=="string"&&(i=Eg(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=Ig,n.URL=Tg,n}var kg=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),mu={randomUUID:kg};function zt(e,t,r){if(mu.randomUUID&&!t&&!e)return mu.randomUUID();e=e||{};let n=e.random||(e.rng||xg)();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 Og(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 Dg(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)+Og(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 Mg=Fg("v5",80,Dg),gu=Mg,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 qg(e){return(e&248)===Su?4:(e&Su)===yu?3:(e&yu)===Du?2:1}function Ng(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>=qg(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"},_g=Qe(ma).map(e=>ma[e]),Vg=[..._g].join("|"),Lg=new RegExp(`^(${Vg}$)`),jg={svcAction:"svc_action",svcActionData:"svc_action_data"},Ug=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]})},{}),Bg=e=>Lg.test(e),Qg=[Bg],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"},$g=["loyaltyCardId","loyaltyTier","thirdPartyPersona","companyName","favoriteStore","storeName","userIndustry","userRole","userDepartment","businessUnit"],ga={id:"quoteId",affiliation:"quoteAffiliation"},ha={id:"reviewId",rating:"reviewRating",comment:"reviewComment"},Hg={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)},zg=Qe(vu).map(e=>vu[e]),Wg=Qe(Cu).map(e=>Cu[e]),Gg=Qe(Ee).map(e=>Ee[e]),Kg=Qe(fo).map(e=>fo[e]),Yg=Qe(ha).map(e=>ha[e]),Jg=Qe(ga).map(e=>ga[e]),Xg=[...zg,"custom"].join("|"),Zg=[...Wg,"custom"].join("|"),Mu="(pr[0-9]+)",qu="(il[0-9]+pi[0-9]+)",eh=new RegExp(`^${Mu}(${Xg})$`),th=new RegExp(`^(${qu}(${Zg}))|(il[0-9]+nm)$`),rh=new RegExp(`^(${Gg.join("|")})$`),nh=new RegExp(`^(${Kg.join("|")})$`),oh=new RegExp(`^${Mu}custom$`),ih=new RegExp(`^${qu}custom$`),ah=new RegExp(`^(${[...$g,...Yg,...Jg].join("|")})$`),sh=e=>eh.test(e),ch=e=>th.test(e),uh=e=>rh.test(e),lh=e=>nh.test(e),dh=e=>ah.test(e),ph=[ch,sh,uh,lh,dh],fh=[oh,ih],mh={anonymizeIp:"aip"},gh={eventCategory:"ec",eventAction:"ea",eventLabel:"el",eventValue:"ev",page:"dp",visitorId:"cid",clientId:"cid",userId:"uid",currencyCode:"cu"},hh={hitType:"t",pageViewId:"pid",encoding:"de",location:"dl",referrer:"dr",screenColor:"sd",screenResolution:"sr",title:"dt",userAgent:"ua",language:"ul",eventId:"z",time:"tm"},yh=["contentId","contentIdKey","contentType","searchHub","tab","searchUid","permanentId","contentLocale","trackingId"],Sh=Object.assign(Object.assign(Object.assign(Object.assign({},mh),gh),hh),yh.reduce((e,t)=>Object.assign(Object.assign({},e),{[t]:t}),{})),ya=Object.assign(Object.assign({},Sh),jg),vh=e=>{let t=!!e.action&&Hg[e.action]||{};return Qe(e).reduce((r,n)=>{let o=t[n]||ya[n]||n;return Object.assign(Object.assign({},r),{[o]:e[n]})},{})},Ch=Qe(ya).map(e=>ya[e]),bh=e=>Ch.indexOf(e)!==-1,Ah=e=>e==="custom",wh=e=>[...ph,...Qg,bh,Ah].some(t=>t(e)),xh=e=>Qe(e).reduce((t,r)=>{let n=Rh(r);return n?Object.assign(Object.assign({},t),Eh(n,e[r])):Object.assign(Object.assign({},t),{[r]:e[r]})},{}),Rh=e=>{let t;return[...fh].every(r=>{var n;return t=(n=r.exec(e))===null||n===void 0?void 0:n[1],!t}),t},Eh=(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}},Ph="xx",Ih=e=>e?.startsWith(Ph)||!1,Th=`
|
|
28
28
|
We've detected you're using React Native but have not provided the corresponding runtime,
|
|
29
29
|
for an optimal experience please use the "coveo.analytics/react-native" subpackage.
|
|
30
30
|
Follow the Readme on how to set it up: https://github.com/coveo/coveo.analytics.js#using-react-native
|
|
@@ -9013,7 +9013,7 @@ var validateObject = (engine, schema, obj, validationMessage, errorMessage) => {
|
|
|
9013
9013
|
};
|
|
9014
9014
|
|
|
9015
9015
|
// src/utils/version.ts
|
|
9016
|
-
var VERSION = "3.23.2-pre.
|
|
9016
|
+
var VERSION = "3.23.2-pre.d35ebef42a";
|
|
9017
9017
|
var COVEO_FRAMEWORK = ["@coveo/atomic", "@coveo/quantic"];
|
|
9018
9018
|
|
|
9019
9019
|
// src/features/configuration/configuration-actions.ts
|
|
@@ -4600,7 +4600,7 @@ var validateObject = (engine, schema, obj, validationMessage, errorMessage) => {
|
|
|
4600
4600
|
};
|
|
4601
4601
|
|
|
4602
4602
|
// src/utils/version.ts
|
|
4603
|
-
var VERSION = "3.23.2-pre.
|
|
4603
|
+
var VERSION = "3.23.2-pre.d35ebef42a";
|
|
4604
4604
|
var COVEO_FRAMEWORK = ["@coveo/atomic", "@coveo/quantic"];
|
|
4605
4605
|
|
|
4606
4606
|
// src/features/configuration/configuration-actions.ts
|
package/dist/ssr/headless.cjs
CHANGED
|
@@ -9845,7 +9845,7 @@ function createRelay(initialConfig) {
|
|
|
9845
9845
|
}
|
|
9846
9846
|
|
|
9847
9847
|
// src/utils/version.ts
|
|
9848
|
-
var VERSION = "3.23.2-pre.
|
|
9848
|
+
var VERSION = "3.23.2-pre.d35ebef42a";
|
|
9849
9849
|
var COVEO_FRAMEWORK = ["@coveo/atomic", "@coveo/quantic"];
|
|
9850
9850
|
|
|
9851
9851
|
// src/api/analytics/analytics-selectors.ts
|
package/dist/ssr/headless.esm.js
CHANGED
|
@@ -5343,7 +5343,7 @@ function createRelay(initialConfig) {
|
|
|
5343
5343
|
}
|
|
5344
5344
|
|
|
5345
5345
|
// src/utils/version.ts
|
|
5346
|
-
var VERSION = "3.23.2-pre.
|
|
5346
|
+
var VERSION = "3.23.2-pre.d35ebef42a";
|
|
5347
5347
|
var COVEO_FRAMEWORK = ["@coveo/atomic", "@coveo/quantic"];
|
|
5348
5348
|
|
|
5349
5349
|
// src/api/analytics/analytics-selectors.ts
|
|
@@ -8884,7 +8884,7 @@ var validateObject = (engine, schema, obj, validationMessage, errorMessage) => {
|
|
|
8884
8884
|
};
|
|
8885
8885
|
|
|
8886
8886
|
// src/utils/version.ts
|
|
8887
|
-
var VERSION = "3.23.2-pre.
|
|
8887
|
+
var VERSION = "3.23.2-pre.d35ebef42a";
|
|
8888
8888
|
var COVEO_FRAMEWORK = ["@coveo/atomic", "@coveo/quantic"];
|
|
8889
8889
|
|
|
8890
8890
|
// src/features/configuration/configuration-actions.ts
|
|
@@ -4428,7 +4428,7 @@ var validateObject = (engine, schema, obj, validationMessage, errorMessage) => {
|
|
|
4428
4428
|
};
|
|
4429
4429
|
|
|
4430
4430
|
// src/utils/version.ts
|
|
4431
|
-
var VERSION = "3.23.2-pre.
|
|
4431
|
+
var VERSION = "3.23.2-pre.d35ebef42a";
|
|
4432
4432
|
var COVEO_FRAMEWORK = ["@coveo/atomic", "@coveo/quantic"];
|
|
4433
4433
|
|
|
4434
4434
|
// src/features/configuration/configuration-actions.ts
|