@coveo/quantic 3.10.0-pre.c2bede085e → 3.10.0-pre.d66d49ebbe

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.
@@ -64,6 +64,14 @@ export default class QuanticCaseAssistInterface extends LightningElement {
64
64
  ...(document.referrer && {
65
65
  originLevel3: document.referrer.substring(0, 256),
66
66
  }),
67
+ analyticsClientMiddleware: (_event, payload) => {
68
+ if (!payload.customData) {
69
+ payload.customData = {};
70
+ }
71
+ payload.customData.coveoQuanticVersion =
72
+ window.coveoQuanticVersion;
73
+ return payload;
74
+ },
67
75
  },
68
76
  ...rest,
69
77
  },
@@ -80,6 +80,14 @@ export default class QuanticInsightInterface extends LightningElement {
80
80
  ...(document.referrer && {
81
81
  originLevel3: document.referrer.substring(0, 256),
82
82
  }),
83
+ analyticsClientMiddleware: (_event, payload) => {
84
+ if (!payload.customData) {
85
+ payload.customData = {};
86
+ }
87
+ payload.customData.coveoQuanticVersion =
88
+ window.coveoQuanticVersion;
89
+ return payload;
90
+ },
83
91
  },
84
92
  ...rest,
85
93
  },
@@ -82,6 +82,14 @@ export default class QuanticRecommendationInterface extends LightningElement {
82
82
  ...(document.referrer && {
83
83
  originLevel3: document.referrer.substring(0, 256),
84
84
  }),
85
+ analyticsClientMiddleware: (_event, payload) => {
86
+ if (!payload.customData) {
87
+ payload.customData = {};
88
+ }
89
+ payload.customData.coveoQuanticVersion =
90
+ window.coveoQuanticVersion;
91
+ return payload;
92
+ },
85
93
  },
86
94
  ...rest,
87
95
  },
@@ -107,6 +107,14 @@ export default class QuanticSearchInterface extends LightningElement {
107
107
  ...(document.referrer && {
108
108
  originLevel3: document.referrer.substring(0, 256),
109
109
  }),
110
+ analyticsClientMiddleware: (_event, payload) => {
111
+ if (!payload.customData) {
112
+ payload.customData = {};
113
+ }
114
+ payload.customData.coveoQuanticVersion =
115
+ window.coveoQuanticVersion;
116
+ return payload;
117
+ },
110
118
  },
111
119
  ...rest,
112
120
  },
@@ -21,7 +21,7 @@ function asyncGeneratorStep(gen,resolve,reject,_next,_throw,key,arg){try{var inf
21
21
  `)}
22
22
 
23
23
  ${t}
24
- `;return new Fi(r)}var Fi=class extends Error{constructor(e){super(e),this.name="SchemaValidationError"}},De=class{constructor(e){this.definition=e}validate(e={},t=""){let r={...this.default,...e},n=[];for(let i in this.definition){let o=this.definition[i].validate(r[i]);o&&n.push(`${i}: ${o}`)}if(n.length)throw Dd(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}},bt=class{constructor(e={}){this.baseConfig=e}validate(e){return this.baseConfig.required&&z(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 qt(e){return e===void 0}function Md(e){return e===null}function z(e){return qt(e)||Md(e)}var ye=class{constructor(e={}){re(this,"value");this.config=e,this.value=new bt(e)}validate(e){let t=this.value.validate(e);return t||(qd(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 qd(e){return qt(e)||_s(e)}function _s(e){return typeof e=="number"&&!isNaN(e)}var ie=class{constructor(e={}){re(this,"value");this.value=new bt(e)}validate(e){let t=this.value.validate(e);return t||(Nd(e)?null:"value is not a boolean.")}get default(){return this.value.default}get required(){return this.value.required}};function Nd(e){return qt(e)||Ls(e)}function Ls(e){return typeof e=="boolean"}var _d=/^\d{4}(-\d\d(-\d\d(T\d\d:\d\d(:\d\d)?(\.\d+)?(([+-]\d\d:\d\d)|Z)?)?)?)?$/i,H=class{constructor(e={}){re(this,"value");re(this,"config");this.config={emptyAllowed:!0,url:!1,...e},this.value=new bt(this.config)}validate(e){let{emptyAllowed:t,url:r,regex:n,constrainTo:i,ISODate:o}=this.config,s=this.value.validate(e);if(s)return s;if(qt(e))return null;if(!js(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}`:i&&!i.includes(e)?`value should be one of: ${i.join(", ")}.`:o&&!(_d.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 js(e){return Object.prototype.toString.call(e)==="[object String]"}var te=class{constructor(e={}){re(this,"config");this.config={options:{required:!1},values:{},...e}}validate(e){if(qt(e))return this.config.options.required?"value is required and is currently undefined":null;if(!Us(e))return"value is not an object";for(let[r,n]of Object.entries(this.config.values))if(n.required&&z(e[r]))return`value does not contain ${r}`;let t="";for(let[r,n]of Object.entries(this.config.values)){let i=e[r],o=n.validate(i);o!==null&&(t+=" "+o)}return t===""?null:t}get default(){}get required(){return!!this.config.options.required}};function Us(e){return e!==void 0&&typeof e=="object"}var Ge=class{constructor(e={}){re(this,"value");this.config=e,this.value=new bt(this.config)}validate(e){if(!z(e)&&!Array.isArray(e))return"value is not an array";let t=this.value.validate(e);if(t!==null)return t;if(z(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&&z(n)&&(r=`value is null or undefined: ${e.join(",")}`);let i=this.validatePrimitiveValue(n,this.config.each);i!==null&&(r+=" "+i)}),r===""?null:r}return null}validatePrimitiveValue(e,t){return Ls(e)||js(e)||_s(e)||Us(e)?t.validate(e):"value is not a primitive value"}get default(){}get required(){return this.value.required}};function Vs(e){return Array.isArray(e)}var Ti=class{constructor(e){re(this,"value");this.config=e,this.value=new bt(e)}validate(e){let t=this.value.validate(e);return t!==null?t:qt(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}};l();p();d();var $r=e=>e;l();p();d();l();p();d();var na=Ie(Ys(),1);l();p();d();l();p();d();var ke=new Error("Failed to load reducers."),Nt=class extends Error{constructor(){super(),this.name="ExpiredToken",this.message="The token being used to perform the request is expired."}};var Rt=class extends Error{constructor(r,n){super();re(this,"statusCode");this.name="Disconnected",this.message=`Client could not connect to the following URL: ${r}`,this.statusCode=n??0}};l();p();d();function Ks(e){return Array.isArray(e)}function Js(e,t){return[...e.reduce((r,n)=>{let i=t(n);return r.has(i)||r.set(i,n),r},new Map).values()]}var up=new Set(["1",1,"yes",!0]);function Xs(){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=>up.has(r))}function Zs(e){let t={};for(let[r,n]of e)t[r]=n;return t}function fr(e){if(typeof e!="object"||!e)return e;try{return JSON.parse(JSON.stringify(e))}catch{return e}}l();p();d();function ea(e){let t=[];for(let r in e){let n=encodeURIComponent(r),i=encodeURIComponent(e[r]);t.push(`${n}=${i}`)}return t.join("&")}function ta(e){return typeof e!="object"||!e?!1:Object.values(e).every(lp)}function lp(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"}function ra(e){return e===429}var nt=class e{static call(t){return _asyncToGenerator(function*(){let r=dp(t),{logger:n}=t,i=yield e.preprocessRequest(r,t);n.info(i,"Platform request");let{url:o,...s}=i,c=/*#__PURE__*/function(){var _ref=_asyncToGenerator(function*(){let g=yield b(o,s);if(ra(g.status))throw g;return g});return function c(){return _ref.apply(this,arguments)}}();try{let g=yield(0,na.backOff)(c,{retry:a=>{let m=a&&ra(a.status);return m&&n.info("Platform retrying request"),m}});switch(g.status){case 419:case 401:throw n.info("Platform renewing token"),new Nt;case 404:throw new Rt(o,g.status);default:return n.info({response:g,requestInfo:i},"Platform response"),g}}catch(g){return g.message==="Failed to fetch"?new Rt(o):g}})()}static preprocessRequest(t,r){return _asyncToGenerator(function*(){let{origin:n,preprocessRequest:i,logger:o,requestMetadata:s}=r,{signal:c,...g}=t,a=fr(g);try{let m=yield i(t,n,s);return{...t,...m}}catch(m){o.error(m,"Platform request preprocessing failed. Returning default request options.")}return a})()}};function se(e,t="prod",r="platform"){let n=t==="prod"?"":t,i=r==="platform"?"":`.${r}`;return`https://${e}${i}.org${n}.coveo.com`}function _t(e,t="prod"){return`${se(e,t)}/rest/search/v2`}function zr(e,t="prod"){return`${se(e,t,"analytics")}/rest/organizations/${e}/events/v1`}function dp(e){let{url:t,method:r,requestParams:n,contentType:i,accessToken:o,signal:s}=e,c=e.method==="POST"||e.method==="PUT",g=pp(n,i);return{url:t,method:r,headers:{"Content-Type":i,Authorization:`Bearer ${o}`,...e.headers},...(c&&{body:g}),signal:s}}function pp(e,t){return t==="application/x-www-form-urlencoded"?ta(e)?ea(e):"":JSON.stringify(e)}l();p();d();l();p();d();var Lt=class{constructor(t){re(this,"_basePath");re(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}};l();p();d();function Vi(e){let{url:t,accessToken:r,organizationId:n,authentication:i,...o}=e;return o}var Bi=e=>{let{response:t}=e;return t.body?fp(e):gp(t)},fp=e=>hp(e)?yp(e):mp(e)?e.body:{message:"unknown",statusCode:0,type:"unknown"},gp=e=>{let t=JSON.parse(JSON.stringify(e,Object.getOwnPropertyNames(e)));return{...t,message:`Client side error: ${t.message||""}`,statusCode:400,type:"ClientError"}};function mp(e){return e.body.statusCode!==void 0}function hp(e){return e.body.exception!==void 0}var yp=e=>({message:e.body.exception.code,statusCode:e.response.status,type:e.body.exception.code});l();p();d();function ia(e){return((e.headers.get("content-type")||"").split(";").find(n=>n.indexOf("charset=")!==-1)||"").split("=")[1]||"UTF-8"}l();p();d();var Qi=(e,t,r,n)=>{let i=new Lt(`${e.url}${n}`);return i.addParam("organizationId",e.organizationId),e.authentication&&i.addParam("authentication",e.authentication),{accessToken:e.accessToken,method:t,contentType:r,url:i.href,origin:"searchApiFetch"}};var oa=(e,t)=>{let r=new Lt(`${e.url}${t}`);return r.addParam("access_token",e.accessToken),r.addParam("organizationId",e.organizationId),r.addParam("uniqueId",e.uniqueId),e.q!==void 0&&r.addParam("q",e.q),e.enableNavigation!==void 0&&r.addParam("enableNavigation",`${e.enableNavigation}`),e.requestedOutputSize!==void 0&&r.addParam("requestedOutputSize",`${e.requestedOutputSize}`),r.href},$i=/*#__PURE__*/function(){var _ref2=_asyncToGenerator(function*(e,t){let r=yield nt.call({...Qi(e,"POST","application/x-www-form-urlencoded","/html"),requestParams:Vi(e),requestMetadata:{method:"html"},...t});if(r instanceof Error)throw r;let n=ia(r),i=yield r.arrayBuffer(),s=new TextDecoder(n).decode(i);return Sp(s)?{success:s}:{error:Bi({response:r,body:s})}});return function $i(_x,_x2){return _ref2.apply(this,arguments)}}();function Sp(e){return typeof e=="string"}l();p();d();function vp(e){return{statusCode:e.statusCode,type:e.name,message:e.message}}function Cp(e){return{statusCode:e.code,type:e.name,message:e.message,ignored:!0}}function Gr(e,t){if(t&&e.name==="AbortError")return{error:Cp(e)};if(e instanceof Rt)return{error:vp(e)};throw e}l();p();d();l();p();d();var Wr=(e,t,r,n,i={})=>{Ap(e);let o=`${e.url}/rest/organizations/${e.organizationId}/caseassists/${e.caseAssistId}${n}`,s=bp(i),c=s?`${o}?${s}`:o;return{accessToken:e.accessToken,method:t,contentType:r,url:c,origin:"caseAssistApiFetch"}},Yr=e=>Object.keys(e).filter(t=>e[t].value!=="").reduce((t,r)=>({...t,[r]:e[r]}),{}),Kr=e=>Object.keys(e).filter(t=>e[t].value!=="").reduce((t,r)=>({...t,[r]:e[r].value}),{}),Ap=e=>{if(!e.url)throw new Error("The 'url' attribute must contain a valid platform URL.");if(!e.organizationId)throw new Error("The 'organizationId' attribute must contain a valid organization ID.");if(!e.accessToken)throw new Error("The 'accessToken' attribute must contain a valid platform access token.");if(!e.caseAssistId)throw new Error("The 'caseAssistId' attribute must contain a valid Case Assist configuration ID.")},bp=e=>Object.keys(e).map(t=>`${t}=${encodeURIComponent(e[t])}`).join("&");var sa=e=>{let t=e.debug?{debug:"1"}:{};return{...Wr(e,"POST","application/json","/classify",t),requestParams:wp(e)}},wp=e=>({clientId:e.clientId,locale:e.locale,fields:Yr(e.fields)});l();p();d();var aa=e=>{let t={};return e.debug&&(t.debug="1"),e.numberOfResults&&(t.numberOfResults=e.numberOfResults.toString()),{...Wr(e,"POST","application/json","/documents/suggest",t),requestParams:Rp(e)}},Rp=e=>({clientId:e.clientId,locale:e.locale,fields:Yr(e.fields),context:e.context});var Jr=class{constructor(t){this.options=t}getCaseClassifications(t){var _this=this;return _asyncToGenerator(function*(){let r=yield nt.call({...sa(t),..._this.options});if(r instanceof Error)return Gr(r);let n=yield r.json();return r.ok?{success:n}:{error:n}})()}getDocumentSuggestions(t){var _this2=this;return _asyncToGenerator(function*(){let r=yield nt.call({...aa(t),..._this2.options});if(r instanceof Error)return Gr(r);let n=yield r.json();return r.ok?{success:n}:{error:n}})()}html(t){var _this3=this;return _asyncToGenerator(function*(){return $i(t,_this3.options)})()}};l();p();d();l();p();d();l();p();d();function pe(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 xp=typeof Symbol=="function"&&Symbol.observable||"@@observable",ca=xp,Hi=()=>Math.random().toString(36).substring(7).split("").join("."),Ep={INIT:`@@redux/INIT${Hi()}`,REPLACE:`@@redux/REPLACE${Hi()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Hi()}`},Xr=Ep;function _e(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 zi(e,t,r){if(typeof e!="function")throw new Error(pe(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(pe(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(pe(1));return r(zi)(e,t)}let n=e,i=t,o=new Map,s=o,c=0,g=!1;function a(){s===o&&(s=new Map,o.forEach((R,x)=>{s.set(x,R)}))}function m(){if(g)throw new Error(pe(3));return i}function y(R){if(typeof R!="function")throw new Error(pe(4));if(g)throw new Error(pe(5));let x=!0;a();let S=c++;return s.set(S,R),function(){if(x){if(g)throw new Error(pe(6));x=!1,a(),s.delete(S),o=null}}}function h(R){if(!_e(R))throw new Error(pe(7));if(typeof R.type>"u")throw new Error(pe(8));if(typeof R.type!="string")throw new Error(pe(17));if(g)throw new Error(pe(9));try{g=!0,i=n(i,R)}finally{g=!1}return(o=s).forEach(S=>{S()}),R}function f(R){if(typeof R!="function")throw new Error(pe(10));n=R,h({type:Xr.REPLACE})}function C(){let R=y;return{subscribe(x){if(typeof x!="object"||x===null)throw new Error(pe(11));function S(){let I=x;I.next&&I.next(m())}return S(),{unsubscribe:R(S)}},[ca](){return this}}}return h({type:Xr.INIT}),{dispatch:h,subscribe:y,getState:m,replaceReducer:f,[ca]:C}}function Ip(e){Object.keys(e).forEach(t=>{let r=e[t];if(typeof r(void 0,{type:Xr.INIT})>"u")throw new Error(pe(12));if(typeof r(void 0,{type:Xr.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(pe(13))})}function jt(e){let t=Object.keys(e),r={};for(let s=0;s<t.length;s++){let c=t[s];typeof e[c]=="function"&&(r[c]=e[c])}let n=Object.keys(r),i,o;try{Ip(r)}catch(s){o=s}return function(c={},g){if(o)throw o;let a=!1,m={};for(let y=0;y<n.length;y++){let h=n[y],f=r[h],C=c[h],v=f(C,g);if(typeof v>"u"){let R=g&&g.type;throw new Error(pe(14))}m[h]=v,a=a||v!==C}return a=a||n.length!==Object.keys(c).length,a?m:c}}function Ut(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function ua(...e){return t=>(r,n)=>{let i=t(r,n),o=()=>{throw new Error(pe(15))},s={getState:i.getState,dispatch:(g,...a)=>o(g,...a)},c=e.map(g=>g(s));return o=Ut(...c)(i.dispatch),{...i,dispatch:o}}}function Zr(e){return _e(e)&&"type"in e&&typeof e.type=="string"}l();p();d();var ro=Symbol.for("immer-nothing"),gr=Symbol.for("immer-draftable"),Se=Symbol.for("immer-state");function fe(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Et=Object.getPrototypeOf;function we(e){return!!e&&!!e[Se]}function ve(e){return e?ga(e)||Array.isArray(e)||!!e[gr]||!!e.constructor?.[gr]||vr(e)||Cr(e):!1}var kp=Object.prototype.constructor.toString();function ga(e){if(!e||typeof e!="object")return!1;let t=Et(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)===kp}function no(e){return we(e)||fe(15,e),e[Se].base_}function mr(e,t){It(e)===0?Reflect.ownKeys(e).forEach(r=>{t(r,e[r],e)}):e.forEach((r,n)=>t(n,r,e))}function It(e){let t=e[Se];return t?t.type_:Array.isArray(e)?1:vr(e)?2:Cr(e)?3:0}function hr(e,t){return It(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Gi(e,t){return It(e)===2?e.get(t):e[t]}function ma(e,t,r){let n=It(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function Pp(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function vr(e){return e instanceof Map}function Cr(e){return e instanceof Set}function xt(e){return e.copy_||e.base_}function Ki(e,t){if(vr(e))return new Map(e);if(Cr(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);let r=ga(e);if(t===!0||t==="class_only"&&!r){let n=Object.getOwnPropertyDescriptors(e);delete n[Se];let i=Reflect.ownKeys(n);for(let o=0;o<i.length;o++){let s=i[o],c=n[s];c.writable===!1&&(c.writable=!0,c.configurable=!0),(c.get||c.set)&&(n[s]={configurable:!0,writable:!0,enumerable:c.enumerable,value:e[s]})}return Object.create(Et(e),n)}else{let n=Et(e);if(n!==null&&r)return{...e};let i=Object.create(n);return Object.assign(i,e)}}function rn(e,t=!1){return nn(e)||we(e)||!ve(e)||(It(e)>1&&(e.set=e.add=e.clear=e.delete=Op),Object.freeze(e),t&&Object.entries(e).forEach(([r,n])=>rn(n,!0))),e}function Op(){fe(2)}function nn(e){return Object.isFrozen(e)}var Ji={};function kt(e){let t=Ji[e];return t||fe(0,e),t}function Fp(e,t){Ji[e]||(Ji[e]=t)}var yr;function ha(){return yr}function Tp(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function la(e,t){t&&(kt("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Xi(e){Zi(e),e.drafts_.forEach(Dp),e.drafts_=null}function Zi(e){e===yr&&(yr=e.parent_)}function da(e){return yr=Tp(yr,e)}function Dp(e){let t=e[Se];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function pa(e,t){t.unfinalizedDrafts_=t.drafts_.length;let r=t.drafts_[0];return e!==void 0&&e!==r?(r[Se].modified_&&(Xi(t),fe(4)),ve(e)&&(e=en(t,e),t.parent_||tn(t,e)),t.patches_&&kt("Patches").generateReplacementPatches_(r[Se].base_,e,t.patches_,t.inversePatches_)):e=en(t,r,[]),Xi(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==ro?e:void 0}function en(e,t,r){if(nn(t))return t;let n=t[Se];if(!n)return mr(t,(i,o)=>fa(e,n,t,i,o,r)),t;if(n.scope_!==e)return t;if(!n.modified_)return tn(e,n.base_,!0),n.base_;if(!n.finalized_){n.finalized_=!0,n.scope_.unfinalizedDrafts_--;let i=n.copy_,o=i,s=!1;n.type_===3&&(o=new Set(i),i.clear(),s=!0),mr(o,(c,g)=>fa(e,n,i,c,g,r,s)),tn(e,i,!1),r&&e.patches_&&kt("Patches").generatePatches_(n,r,e.patches_,e.inversePatches_)}return n.copy_}function fa(e,t,r,n,i,o,s){if(we(i)){let c=o&&t&&t.type_!==3&&!hr(t.assigned_,n)?o.concat(n):void 0,g=en(e,i,c);if(ma(r,n,g),we(g))e.canAutoFreeze_=!1;else return}else s&&r.add(i);if(ve(i)&&!nn(i)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;en(e,i),(!t||!t.scope_.parent_)&&typeof n!="symbol"&&Object.prototype.propertyIsEnumerable.call(r,n)&&tn(e,i)}}function tn(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&rn(t,r)}function Mp(e,t){let r=Array.isArray(e),n={type_:r?1:0,scope_:t?t.scope_:ha(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1},i=n,o=io;r&&(i=[n],o=Sr);let{revoke:s,proxy:c}=Proxy.revocable(i,o);return n.draft_=c,n.revoke_=s,c}var io={get(e,t){if(t===Se)return e;let r=xt(e);if(!hr(r,t))return qp(e,r,t);let n=r[t];return e.finalized_||!ve(n)?n:n===Wi(e.base_,t)?(Yi(e),e.copy_[t]=to(n,e)):n},has(e,t){return t in xt(e)},ownKeys(e){return Reflect.ownKeys(xt(e))},set(e,t,r){let n=ya(xt(e),t);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){let i=Wi(xt(e),t),o=i?.[Se];if(o&&o.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(Pp(r,i)&&(r!==void 0||hr(e.base_,t)))return!0;Yi(e),eo(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 Wi(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Yi(e),eo(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let r=xt(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty(){fe(11)},getPrototypeOf(e){return Et(e.base_)},setPrototypeOf(){fe(12)}},Sr={};mr(io,(e,t)=>{Sr[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});Sr.deleteProperty=function(e,t){return Sr.set.call(this,e,t,void 0)};Sr.set=function(e,t,r){return io.set.call(this,e[0],t,r,e[0])};function Wi(e,t){let r=e[Se];return(r?xt(r):e)[t]}function qp(e,t,r){let n=ya(t,r);return n?"value"in n?n.value:n.get?.call(e.draft_):void 0}function ya(e,t){if(!(t in e))return;let r=Et(e);for(;r;){let n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Et(r)}}function eo(e){e.modified_||(e.modified_=!0,e.parent_&&eo(e.parent_))}function Yi(e){e.copy_||(e.copy_=Ki(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Np=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,r,n)=>{if(typeof t=="function"&&typeof r!="function"){let o=r;r=t;let s=this;return function(g=o,...a){return s.produce(g,m=>r.call(this,m,...a))}}typeof r!="function"&&fe(6),n!==void 0&&typeof n!="function"&&fe(7);let i;if(ve(t)){let o=da(this),s=to(t,void 0),c=!0;try{i=r(s),c=!1}finally{c?Xi(o):Zi(o)}return la(o,n),pa(i,o)}else if(!t||typeof t!="object"){if(i=r(t),i===void 0&&(i=t),i===ro&&(i=void 0),this.autoFreeze_&&rn(i,!0),n){let o=[],s=[];kt("Patches").generateReplacementPatches_(t,i,o,s),n(o,s)}return i}else fe(1,t)},this.produceWithPatches=(t,r)=>{if(typeof t=="function")return(s,...c)=>this.produceWithPatches(s,g=>t(g,...c));let n,i;return[this.produce(t,r,(s,c)=>{n=s,i=c}),n,i]},typeof e?.autoFreeze=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof e?.useStrictShallowCopy=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){ve(e)||fe(8),we(e)&&(e=Sa(e));let t=da(this),r=to(e,void 0);return r[Se].isManual_=!0,Zi(t),r}finishDraft(e,t){let r=e&&e[Se];(!r||!r.isManual_)&&fe(9);let{scope_:n}=r;return la(n,t),pa(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 i=t[r];if(i.path.length===0&&i.op==="replace"){e=i.value;break}}r>-1&&(t=t.slice(r+1));let n=kt("Patches").applyPatches_;return we(e)?n(e,t):this.produce(e,i=>n(i,t))}};function to(e,t){let r=vr(e)?kt("MapSet").proxyMap_(e,t):Cr(e)?kt("MapSet").proxySet_(e,t):Mp(e,t);return(t?t.scope_:ha()).drafts_.push(r),r}function Sa(e){return we(e)||fe(10,e),va(e)}function va(e){if(!ve(e)||nn(e))return e;let t=e[Se],r;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=Ki(e,t.scope_.immer_.useStrictShallowCopy_)}else r=Ki(e,!0);return mr(r,(n,i)=>{ma(r,n,va(i))}),t&&(t.finalized_=!1),r}function Ca(){let t="replace",r="add",n="remove";function i(h,f,C,v){switch(h.type_){case 0:case 2:return s(h,f,C,v);case 1:return o(h,f,C,v);case 3:return c(h,f,C,v)}}function o(h,f,C,v){let{base_:R,assigned_:x}=h,S=h.copy_;S.length<R.length&&([R,S]=[S,R],[C,v]=[v,C]);for(let w=0;w<R.length;w++)if(x[w]&&S[w]!==R[w]){let I=f.concat([w]);C.push({op:t,path:I,value:y(S[w])}),v.push({op:t,path:I,value:y(R[w])})}for(let w=R.length;w<S.length;w++){let I=f.concat([w]);C.push({op:r,path:I,value:y(S[w])})}for(let w=S.length-1;R.length<=w;--w){let I=f.concat([w]);v.push({op:n,path:I})}}function s(h,f,C,v){let{base_:R,copy_:x}=h;mr(h.assigned_,(S,w)=>{let I=Gi(R,S),D=Gi(x,S),k=w?hr(R,S)?t:r:n;if(I===D&&k===t)return;let E=f.concat(S);C.push(k===n?{op:k,path:E}:{op:k,path:E,value:D}),v.push(k===r?{op:n,path:E}:k===n?{op:r,path:E,value:y(I)}:{op:t,path:E,value:y(I)})})}function c(h,f,C,v){let{base_:R,copy_:x}=h,S=0;R.forEach(w=>{if(!x.has(w)){let I=f.concat([S]);C.push({op:n,path:I,value:w}),v.unshift({op:r,path:I,value:w})}S++}),S=0,x.forEach(w=>{if(!R.has(w)){let I=f.concat([S]);C.push({op:r,path:I,value:w}),v.unshift({op:n,path:I,value:w})}S++})}function g(h,f,C,v){C.push({op:t,path:[],value:f===ro?void 0:f}),v.push({op:t,path:[],value:h})}function a(h,f){return f.forEach(C=>{let{path:v,op:R}=C,x=h;for(let D=0;D<v.length-1;D++){let k=It(x),E=v[D];typeof E!="string"&&typeof E!="number"&&(E=""+E),(k===0||k===1)&&(E==="__proto__"||E==="constructor")&&fe(19),typeof x=="function"&&E==="prototype"&&fe(19),x=Gi(x,E),typeof x!="object"&&fe(18,v.join("/"))}let S=It(x),w=m(C.value),I=v[v.length-1];switch(R){case t:switch(S){case 2:return x.set(I,w);case 3:fe(16);default:return x[I]=w}case r:switch(S){case 1:return I==="-"?x.push(w):x.splice(I,0,w);case 2:return x.set(I,w);case 3:return x.add(w);default:return x[I]=w}case n:switch(S){case 1:return x.splice(I,1);case 2:return x.delete(I);case 3:return x.delete(C.value);default:return delete x[I]}default:fe(17,R)}}),h}function m(h){if(!ve(h))return h;if(Array.isArray(h))return h.map(m);if(vr(h))return new Map(Array.from(h.entries()).map(([C,v])=>[C,m(v)]));if(Cr(h))return new Set(Array.from(h).map(m));let f=Object.create(Et(h));for(let C in h)f[C]=m(h[C]);return hr(h,gr)&&(f[gr]=h[gr]),f}function y(h){return we(h)?m(h):h}Fp("Patches",{applyPatches_:a,generatePatches_:i,generateReplacementPatches_:g})}var Re=new Np,Ye=Re.produce,on=Re.produceWithPatches.bind(Re),dA=Re.setAutoFreeze.bind(Re),pA=Re.setUseStrictShallowCopy.bind(Re),oo=Re.applyPatches.bind(Re),fA=Re.createDraft.bind(Re),gA=Re.finishDraft.bind(Re);l();p();d();function _p(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function Lp(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function jp(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 Aa=e=>Array.isArray(e)?e:[e];function Up(e){let t=Array.isArray(e[0])?e[0]:e;return jp(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function Vp(e,t){let r=[],{length:n}=e;for(let i=0;i<n;i++)r.push(e[i].apply(null,t));return r}var CA=Symbol();var AA=Object.getPrototypeOf({});var Bp=class{constructor(e){this.value=e}deref(){return this.value}},Qp=typeof WeakRef<"u"?WeakRef:Bp,$p=0,ba=1;function sn(){return{s:$p,v:void 0,o:null,p:null}}function Vt(e,t={}){let r=sn(),{resultEqualityCheck:n}=t,i,o=0;function s(){let c=r,{length:g}=arguments;for(let y=0,h=g;y<h;y++){let f=arguments[y];if(typeof f=="function"||typeof f=="object"&&f!==null){let C=c.o;C===null&&(c.o=C=new WeakMap);let v=C.get(f);v===void 0?(c=sn(),C.set(f,c)):c=v}else{let C=c.p;C===null&&(c.p=C=new Map);let v=C.get(f);v===void 0?(c=sn(),C.set(f,c)):c=v}}let a=c,m;if(c.s===ba)m=c.v;else if(m=e.apply(null,arguments),o++,n){let y=i?.deref?.()??i;y!=null&&n(y,m)&&(m=y,o!==0&&o--),i=typeof m=="object"&&m!==null||typeof m=="function"?new Qp(m):m}return a.s=ba,a.v=m,m}return s.clearCache=()=>{r=sn(),s.resetResultsCount()},s.resultsCount=()=>o,s.resetResultsCount=()=>{o=0},s}function wa(e,...t){let r=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,n=(...i)=>{let o=0,s=0,c,g={},a=i.pop();typeof a=="object"&&(g=a,a=i.pop()),_p(a,`createSelector expects an output function after the inputs, but received: [${typeof a}]`);let m={...r,...g},{memoize:y,memoizeOptions:h=[],argsMemoize:f=Vt,argsMemoizeOptions:C=[],devModeChecks:v={}}=m,R=Aa(h),x=Aa(C),S=Up(i),w=y(function(){return o++,a.apply(null,arguments)},...R),I=!0,D=f(function(){s++;let E=Vp(S,arguments);return c=w.apply(null,E),c},...x);return Object.assign(D,{resultFunc:a,memoizedResultFunc:w,dependencies:S,dependencyRecomputations:()=>s,resetDependencyRecomputations:()=>{s=0},lastResult:()=>c,recomputations:()=>o,resetRecomputations:()=>{o=0},memoize:y,argsMemoize:f})};return Object.assign(n,{withTypes:()=>n}),n}var ae=wa(Vt),Hp=Object.assign((e,t=ae)=>{Lp(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(o=>e[o]);return t(n,(...o)=>o.reduce((s,c,g)=>(s[r[g]]=c,s),{}))},{withTypes:()=>Hp});l();p();d();function Ra(e){return({dispatch:r,getState:n})=>i=>o=>typeof o=="function"?o(r,n,e):i(o)}var xa=Ra(),Ea=Ra;var zp=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Ut:Ut.apply(null,arguments)},_A=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}},Gp=e=>e&&typeof e.match=="function";function L(e,t){function r(...n){if(t){let i=t(...n);if(!i)throw new Error(Pe(0));return{type:e,payload:i.payload,...("meta"in i&&{meta:i.meta}),...("error"in i&&{error:i.error})}}return{type:e,payload:n[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=n=>Zr(n)&&n.type===e,r}var Oa=class Ar extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,Ar.prototype)}static get[Symbol.species](){return Ar}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new Ar(...t[0].concat(this)):new Ar(...t.concat(this))}};function Ia(e){return ve(e)?Ye(e,()=>{}):e}function ka(e,t,r){if(e.has(t)){let i=e.get(t);return r.update&&(i=r.update(i,t,e),e.set(t,i)),i}if(!r.insert)throw new Error(Pe(10));let n=r.insert(t,e);return e.set(t,n),n}function Wp(e){return typeof e=="boolean"}var Yp=()=>function(t){let{thunk:r=!0,immutableCheck:n=!0,serializableCheck:i=!0,actionCreatorCheck:o=!0}=t??{},s=new Oa;return r&&(Wp(r)?s.push(xa):s.push(Ea(r.extraArgument))),s},it="RTK_autoBatch",Qt=()=>e=>({payload:e,meta:{[it]:!0}}),Fa=e=>t=>{setTimeout(t,e)},Kp=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Fa(10),Jp=(e={type:"raf"})=>t=>(...r)=>{let n=t(...r),i=!0,o=!1,s=!1,c=new Set,g=e.type==="tick"?queueMicrotask:e.type==="raf"?Kp:e.type==="callback"?e.queueNotification:Fa(e.timeout),a=()=>{s=!1,o&&(o=!1,c.forEach(m=>m()))};return Object.assign({},n,{subscribe(m){let y=()=>i&&m(),h=n.subscribe(y);return c.add(m),()=>{h(),c.delete(m)}},dispatch(m){try{return i=!m?.meta?.[it],o=!i,o&&(s||(s=!0,g(a))),n.dispatch(m)}finally{i=!0}}})},Xp=e=>function(r){let{autoBatch:n=!0}=r??{},i=new Oa(e);return n&&i.push(Jp(typeof n=="object"?n:void 0)),i};function Ta(e){let t=Yp(),{reducer:r=void 0,middleware:n,devTools:i=!0,preloadedState:o=void 0,enhancers:s=void 0}=e||{},c;if(typeof r=="function")c=r;else if(_e(r))c=jt(r);else throw new Error(Pe(1));let g;typeof n=="function"?g=n(t):g=t();let a=Ut;i&&(a=zp({trace:!1,...(typeof i=="object"&&i)}));let m=ua(...g),y=Xp(m),h=typeof s=="function"?s(y):y(),f=a(...h);return zi(c,o,f)}function Da(e){let t={},r=[],n,i={addCase(o,s){let c=typeof o=="string"?o:o.type;if(!c)throw new Error(Pe(28));if(c in t)throw new Error(Pe(29));return t[c]=s,i},addMatcher(o,s){return r.push({matcher:o,reducer:s}),i},addDefaultCase(o){return n=o,i}};return e(i),[t,r,n]}function Zp(e){return typeof e=="function"}function ce(e,t){let[r,n,i]=Da(t),o;if(Zp(e))o=()=>Ia(e());else{let c=Ia(e);o=()=>c}function s(c=o(),g){let a=[r[g.type],...n.filter(({matcher:m})=>m(g)).map(({reducer:m})=>m)];return a.filter(m=>!!m).length===0&&(a=[i]),a.reduce((m,y)=>{if(y)if(we(m)){let f=y(m,g);return f===void 0?m:f}else{if(ve(m))return Ye(m,h=>y(h,g));{let h=y(m,g);if(h===void 0){if(m===null)return m;throw Error("A case reducer on a non-draftable value must not return undefined")}return h}}return m},c)}return s.getInitialState=o,s}var Ma=(e,t)=>Gp(e)?e.match(t):e(t);function Le(...e){return t=>e.some(r=>Ma(r,t))}function Bt(...e){return t=>e.every(r=>Ma(r,t))}function cn(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 br(e){return typeof e[0]=="function"&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function un(...e){return e.length===0?t=>cn(t,["pending"]):br(e)?Le(...e.map(t=>t.pending)):un()(e[0])}function Pt(...e){return e.length===0?t=>cn(t,["rejected"]):br(e)?Le(...e.map(t=>t.rejected)):Pt()(e[0])}function wr(...e){let t=r=>r&&r.meta&&r.meta.rejectedWithValue;return e.length===0?Bt(Pt(...e),t):br(e)?Bt(Pt(...e),t):wr()(e[0])}function Ke(...e){return e.length===0?t=>cn(t,["fulfilled"]):br(e)?Le(...e.map(t=>t.fulfilled)):Ke()(e[0])}function ln(...e){return e.length===0?t=>cn(t,["pending","fulfilled","rejected"]):br(e)?Le(...e.flatMap(t=>[t.pending,t.rejected,t.fulfilled])):ln()(e[0])}var ef="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",dn=(e=21)=>{let t="",r=e;for(;r--;)t+=ef[Math.random()*64|0];return t},tf=["name","message","stack","code"],so=class{constructor(e,t){re(this,"_type");this.payload=e,this.meta=t}},Pa=class{constructor(e,t){re(this,"_type");this.payload=e,this.meta=t}},rf=e=>{if(typeof e=="object"&&e!==null){let t={};for(let r of tf)typeof e[r]=="string"&&(t[r]=e[r]);return t}return{message:String(e)}},J=(()=>{function e(t,r,n){let i=L(t+"/fulfilled",(g,a,m,y)=>({payload:g,meta:{...(y||{}),arg:m,requestId:a,requestStatus:"fulfilled"}})),o=L(t+"/pending",(g,a,m)=>({payload:void 0,meta:{...(m||{}),arg:a,requestId:g,requestStatus:"pending"}})),s=L(t+"/rejected",(g,a,m,y,h)=>({payload:y,error:(n&&n.serializeError||rf)(g||"Rejected"),meta:{...(h||{}),arg:m,requestId:a,rejectedWithValue:!!y,requestStatus:"rejected",aborted:g?.name==="AbortError",condition:g?.name==="ConditionError"}}));function c(g){return(a,m,y)=>{let h=n?.idGenerator?n.idGenerator(g):dn(),f=new u.AbortController,C,v;function R(S){v=S,f.abort()}let x=_asyncToGenerator(function*(){let S;try{let I=n?.condition?.(g,{getState:m,extra:y});if(of(I)&&(I=yield I),I===!1||f.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let D=new Promise((k,E)=>{C=()=>{E({name:"AbortError",message:v||"Aborted"})},f.signal.addEventListener("abort",C)});a(o(h,g,n?.getPendingMeta?.({requestId:h,arg:g},{getState:m,extra:y}))),S=yield Promise.race([D,Promise.resolve(r(g,{dispatch:a,getState:m,extra:y,requestId:h,signal:f.signal,abort:R,rejectWithValue:(k,E)=>new so(k,E),fulfillWithValue:(k,E)=>new Pa(k,E)})).then(k=>{if(k instanceof so)throw k;return k instanceof Pa?i(k.payload,h,g,k.meta):i(k,h,g)})])}catch(I){S=I instanceof so?s(null,h,g,I.payload,I.meta):s(I,h,g)}finally{C&&f.signal.removeEventListener("abort",C)}return n&&!n.dispatchConditionRejection&&s.match(S)&&S.meta.condition||a(S),S})();return Object.assign(x,{abort:R,requestId:h,arg:g,unwrap(){return x.then(nf)}})}}return Object.assign(c,{pending:o,rejected:s,fulfilled:i,settled:Le(s,i),typePrefix:t})}return e.withTypes=()=>e,e})();function nf(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function of(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var qa=Symbol.for("rtk-slice-createasyncthunk"),BA={[qa]:J};function sf(e,t){return`${e}/${t}`}function af({creators:e}={}){let t=e?.asyncThunk?.[qa];return function(n){let{name:i,reducerPath:o=i}=n;if(!i)throw new Error(Pe(11));typeof process<"u";let s=(typeof n.reducers=="function"?n.reducers(uf()):n.reducers)||{},c=Object.keys(s),g={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},a={addCase(S,w){let I=typeof S=="string"?S:S.type;if(!I)throw new Error(Pe(12));if(I in g.sliceCaseReducersByType)throw new Error(Pe(13));return g.sliceCaseReducersByType[I]=w,a},addMatcher(S,w){return g.sliceMatchers.push({matcher:S,reducer:w}),a},exposeAction(S,w){return g.actionCreators[S]=w,a},exposeCaseReducer(S,w){return g.sliceCaseReducersByName[S]=w,a}};c.forEach(S=>{let w=s[S],I={reducerName:S,type:sf(i,S),createNotation:typeof n.reducers=="function"};df(w)?ff(I,w,a,t):lf(I,w,a)});function m(){let[S={},w=[],I=void 0]=typeof n.extraReducers=="function"?Da(n.extraReducers):[n.extraReducers],D={...S,...g.sliceCaseReducersByType};return ce(n.initialState,k=>{for(let E in D)k.addCase(E,D[E]);for(let E of g.sliceMatchers)k.addMatcher(E.matcher,E.reducer);for(let E of w)k.addMatcher(E.matcher,E.reducer);I&&k.addDefaultCase(I)})}let y=S=>S,h=new Map,f;function C(S,w){return f||(f=m()),f(S,w)}function v(){return f||(f=m()),f.getInitialState()}function R(S,w=!1){function I(k){let E=k[S];return typeof E>"u"&&w&&(E=v()),E}function D(k=y){let E=ka(h,w,{insert:()=>new WeakMap});return ka(E,k,{insert:()=>{let T={};for(let[O,_]of Object.entries(n.selectors??{}))T[O]=cf(_,k,v,w);return T}})}return{reducerPath:S,getSelectors:D,get selectors(){return D(I)},selectSlice:I}}let x={name:i,reducer:C,actions:g.actionCreators,caseReducers:g.sliceCaseReducersByName,getInitialState:v,...R(o),injectInto(S,{reducerPath:w,...I}={}){let D=w??o;return S.inject({reducerPath:D,reducer:C},I),{...x,...R(D,!0)}}};return x}}function cf(e,t,r,n){function i(o,...s){let c=t(o);return typeof c>"u"&&n&&(c=r()),e(c,...s)}return i.unwrapped=e,i}var Ot=af();function uf(){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 lf({type:e,reducerName:t,createNotation:r},n,i){let o,s;if("reducer"in n){if(r&&!pf(n))throw new Error(Pe(17));o=n.reducer,s=n.prepare}else o=n;i.addCase(e,o).exposeCaseReducer(t,o).exposeAction(t,s?L(e,s):L(e))}function df(e){return e._reducerDefinitionType==="asyncThunk"}function pf(e){return e._reducerDefinitionType==="reducerWithPrepare"}function ff({type:e,reducerName:t},r,n,i){if(!i)throw new Error(Pe(18));let{payloadCreator:o,fulfilled:s,pending:c,rejected:g,settled:a,options:m}=r,y=i(e,o,m);n.exposeAction(t,y),s&&n.addCase(y.fulfilled,s),c&&n.addCase(y.pending,c),g&&n.addCase(y.rejected,g),a&&n.addMatcher(y.settled,a),n.exposeCaseReducer(t,{fulfilled:s||an,pending:c||an,rejected:g||an,settled:a||an})}function an(){}var Na="listener",_a="completed",La="cancelled",QA=`task-${La}`,$A=`task-${_a}`,HA=`${Na}-${La}`,zA=`${Na}-${_a}`;var{assign:ja}=Object;var ao="listenerMiddleware";var gf=ja(L(`${ao}/add`),{withTypes:()=>gf}),GA=L(`${ao}/removeAll`),mf=ja(L(`${ao}/remove`),{withTypes:()=>mf});var WA=Symbol.for("rtk-state-proxy-original");function Pe(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. `}l();p();d();var W=new H({required:!0,emptyAllowed:!1}),oe=new H({required:!1,emptyAllowed:!1}),Me=new H({required:!0,emptyAllowed:!0}),sb=new H({required:!1,emptyAllowed:!0}),Ua=new Ge({each:W,required:!0}),Va=new H({required:!1,emptyAllowed:!1,regex:/^\d+\.\d+\.\d+$/}),hf=({message:e,name:t,stack:r})=>({message:e,name:t,stack:r}),co=(e,t)=>{if("required"in t)return{payload:new De({value:t}).validate({value:e}).value};let i=new te({options:{required:!0},values:t}).validate(e);if(i)throw new Fi(i);return{payload:e}},$=(e,t)=>{try{return co(e,t)}catch(r){return{payload:e,error:hf(r)}}};var pn=(e,t,r,n)=>{let i=`Check the options of ${n}`;return yf(e,t,r,i,"Controller initialization error")},yf=(e,t,r,n,i)=>{try{return t.validate(r,n)}catch(o){throw e.logger.error(o,i),o}};var fn=L("caseAssistConfiguration/set",e=>$(e,{caseAssistId:W,locale:oe,proxyBaseUrl:new H({required:!1,url:!0})}));l();p();d();l();p();d();var Ba=()=>({caseAssistId:"",locale:"en-US"});var ot=ce(Ba(),e=>{e.addCase(fn,(t,r)=>{t.caseAssistId=r.payload.caseAssistId,t.locale=r.payload.locale,t.apiBaseUrl=r.payload.proxyBaseUrl})});l();p();d();l();p();d();l();p();d();var Qa={q:new H,enableQuerySyntax:new ie,aq:new H,cq:new H,firstResult:new ye({min:0}),numberOfResults:new ye({min:0}),sortCriteria:new H,f:new te,fExcluded:new te,cf:new te,nf:new te,mnf:new te,df:new te,debug:new ie,sf:new te,tab:new H,af:new te};var gn=L("searchParameters/restore",e=>$(e,Qa));l();p();d();var $a=L("debug/enable"),Ha=L("debug/disable");l();p();d();var mn=()=>!1;var za=ce(mn(),e=>{e.addCase($a,()=>!0).addCase(Ha,()=>!1).addCase(gn,(t,r)=>r.payload.debug??t)});l();p();d();var hn=L("searchHub/set",e=>$(e,new H({required:!0,emptyAllowed:!0})));l();p();d();l();p();d();l();p();d();var $t="3.11.0-pre.c2bede085e",Ga=["@coveo/atomic","@coveo/quantic"];var uo=()=>oe,Wa=()=>W,Ht=L("configuration/updateBasicConfiguration",e=>$(e,{accessToken:oe,environment:new H({required:!1,constrainTo:["prod","hipaa","stg","dev"]}),organizationId:oe})),yn=L("configuration/updateSearchConfiguration",e=>$(e,{proxyBaseUrl:new H({required:!1,url:!0}),pipeline:new H({required:!1,emptyAllowed:!0}),searchHub:oe,timezone:oe,locale:oe,authenticationProviders:new Ge({required:!1,each:W})})),Sf={enabled:new ie({default:!0}),originContext:uo(),originLevel2:uo(),originLevel3:uo(),proxyBaseUrl:new H({required:!1,url:!0}),runtimeEnvironment:new bt,anonymous:new ie({default:!1}),deviceId:oe,userDisplayName:oe,documentLocation:oe,trackingId:oe,analyticsMode:new H({constrainTo:["legacy","next"],required:!1,default:"next"}),source:new te({options:{required:!1},values:Ga.reduce((e,t)=>(e[t]=Va,e),{})})},Sn=L("configuration/updateAnalyticsConfiguration",e=>$(e,Sf)),vn=L("configuration/analytics/disable"),Cn=L("configuration/analytics/enable"),Ya=L("configuration/analytics/originlevel2",e=>$(e,{originLevel2:Wa()})),Ka=L("configuration/analytics/originlevel3",e=>$(e,{originLevel3:Wa()}));l();p();d();var vf=L("history/undo"),Cf=L("history/redo"),je=L("history/snapshot"),Iw=J("history/back",/*#__PURE__*/function(){var _ref4=_asyncToGenerator(function*(e,{dispatch:t}){t(vf()),yield t(An())});return function(_x3,_x4){return _ref4.apply(this,arguments)}}()),kw=J("history/forward",/*#__PURE__*/function(){var _ref5=_asyncToGenerator(function*(e,{dispatch:t}){t(Cf()),yield t(An())});return function(_x5,_x6){return _ref5.apply(this,arguments)}}()),An=J("history/change",/*#__PURE__*/function(){var _ref6=_asyncToGenerator(function*(e,{getState:t}){return t().history.present});return function(_x7,_x8){return _ref6.apply(this,arguments)}}());l();p();d();var st=()=>"default";var Ja=ce(st(),e=>{e.addCase(hn,(t,r)=>r.payload).addCase(An.fulfilled,(t,r)=>r.payload?.searchHub??t).addCase(yn,(t,r)=>r.payload.searchHub||t)});l();p();d();l();p();d();l();p();d();function Af({config:e,environment:t,event:r,listenerManager:n}){let{url:i,token:o,mode:s}=e;s!=="disabled"&&(n.call(r),t.send(i,o,r))}var bf=/^(?:[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 wf(e){return typeof e=="string"&&bf.test(e)}function Rf(e){return{getClientId:()=>{let t="visitorId",r=e.get(),n=r.storage,i=n.getItem(t),o=i&&wf(i)?i:r.generateUUID();return n.setItem(t,o),o}}}var Za="0.7.10";function xf(e){let{trackingId:t}=e;return{trackingId:t}}function Ef(e){return(e.source||[]).concat([`relay@${Za}`])}function ec(e,t,r,n){let{getReferrer:i,getLocation:o,getUserAgent:s}=r,c=xf(t),g=n.getClientId();return Object.freeze({type:e,config:c,ts:Date.now(),source:Ef(t),clientId:g,userAgent:s(),referrer:i(),location:o()})}function If(e,t,r,n,i){return{...t,meta:ec(e,r,n,i)}}var kf="*";function Pf(){let e=[];function t({type:g,callback:a}){return e.findIndex(m=>m.type===g&&m.callback===a)}function r(g,a){return g.type==="*"||a===g.type}function n(g){return t(g)<0&&e.push(g),()=>c(g.type,g.callback)}function i(g){e.forEach(a=>{if(r(a,g.meta.type))try{a.callback(g)}catch(m){console.error(m)}})}function o(g){if(g===kf)e.length=0;else for(let a=e.length-1;a>=0;a--)e[a].type===g&&e.splice(a,1)}function s(g){let a=t(g);a>=0&&e.splice(a,1)}function c(g,a){a?s({type:g,callback:a}):o(g)}return{add:n,call:i,remove:c}}function Xa({url:e,token:t,trackingId:r,...n}){return Object.freeze({url:e,token:t,trackingId:r,...(!!n.mode&&{mode:n.mode}),...(!!n.source&&{source:n.source})})}function Of(e){let t=Xa(e);return{get:()=>t,update:r=>{t=Xa({...t,...r})}}}function Ff(){let e=typeof window<"u";return{sendMessage(t){e&&window.postMessage(t,"*")}}}var lo=Tf();function Tf(){let e="coveo_",t=r=>{let n=r.split(".").slice(-2);return n.length==2?n.join("."):""};return{getItem(r){let n=`${e}${r}=`,i=document.cookie.split(";");for(let o of i){let s=o.replace(/^\s+/,"");if(s.lastIndexOf(n,0)===0)return s.substring(n.length,s.length)}return null},setItem(r,n,i){let o=t(window.location.hostname),s=`;expires=${new Date(new Date().getTime()+i).toUTCString()}`,c=o?`;domain=${o}`:"";document.cookie=`${e}${r}=${n}${s}${c};path=/;SameSite=Lax`},removeItem(r){this.setItem(r,"",-1)}}}function Df(){return{getItem(e){return lo.getItem(e)||localStorage.getItem(e)},removeItem(e){lo.removeItem(e),localStorage.removeItem(e)},setItem(e,t){localStorage.setItem(e,t),lo.setItem(e,t,31556952e3)}}}function Mf(){let e=document.referrer;return e===""?null:e}function qf(){return{runtime:"browser",send:(e,t,r)=>{let n=navigator.sendBeacon(`${e}?access_token=${t}`,new Blob([JSON.stringify([r])],{type:"application/json"}));if(Ff().sendMessage({kind:"EVENT_PROTOCOL",event:r,url:e,token:t}),!n)throw new Error("Failed to send the event(s) because the payload size exceeded the maximum allowed size (32 KB). Please contact support if the problem persists.")},getReferrer:()=>Mf(),getLocation:()=>window.location.href,getUserAgent:()=>navigator.userAgent,generateUUID:()=>crypto.randomUUID(),storage:Df()}}function Nf(){try{let e="__storage_test__";return localStorage.setItem(e,e),localStorage.removeItem(e),!0}catch(e){return e instanceof DOMException&&e.name==="QuotaExceededError"&&localStorage&&localStorage.length!==0}}function _f(){return{getItem(){return null},removeItem(){},setItem(){}}}function Lf(){return{runtime:"null",send:()=>{},getReferrer:()=>null,getLocation:()=>null,getUserAgent:()=>null,generateUUID:()=>"",storage:_f()}}function jf(e){return e.get().mode!=="disabled"&&Uf()&&Nf()?qf():Lf()}function Uf(){try{return typeof window=="object"}catch{return!1}}function Vf(e){return{get:()=>Object.freeze(jf(e))}}function tc(e){let t=Of(e),r=Pf(),n=Vf(t),i=Rf(n);return{emit:(o,s)=>{let c=t.get(),g=n.get(),a=If(o,s,c,g,i);return Af({config:c,environment:g,event:a,listenerManager:r})},getMeta:o=>ec(o,t.get(),n.get(),i),on:(o,s)=>r.add({type:o,callback:s}),off:(o,s)=>r.remove(o,s),updateConfig:o=>t.update(o),version:Za}}l();p();d();var zt=ae(e=>e.source,e=>Object.entries(e).map(([t,r])=>`${t}@${r}`).concat(`@coveo/headless@${$t}`));var Gt=ae(e=>e.configuration.organizationId,e=>e.configuration.environment,e=>e.configuration.accessToken,e=>e.configuration.analytics,e=>zt(e.configuration.analytics),(e,t,r,{trackingId:n,apiBaseUrl:i,enabled:o},s)=>tc({mode:o?"emit":"disabled",url:i??zr(e,t),token:r,trackingId:n,source:s}));l();p();d();l();p();d();l();p();d();l();p();d();function nc(_x9,_x10){return _nc.apply(this,arguments)}function _nc(){_nc=_asyncToGenerator(function*(e,t){let r=e.getReader(),n;for(;!(n=yield r.read()).done;)t(n.value)});return _nc.apply(this,arguments)}function ic(e){let t,r,n,i=!1;return function(s){t===void 0?(t=s,r=0,n=-1):t=Bf(t,s);let c=t.length,g=0;for(;r<c;){i&&(t[r]===10&&(g=++r),i=!1);let a=-1;for(;r<c&&a===-1;++r)switch(t[r]){case 58:n===-1&&(n=r-g);break;case 13:i=!0;case 10:a=r;break}if(a===-1)break;e(t.subarray(g,a),n),g=r,n=-1}g===c?t=void 0:g!==0&&(t=t.subarray(g),r-=g)}}function oc(e,t,r){let n=rc(),i=new TextDecoder;return function(s,c){if(s.length===0)r?.(n),n=rc();else if(c>0){let g=i.decode(s.subarray(0,c)),a=c+(s[c+1]===32?2:1),m=i.decode(s.subarray(a));switch(g){case"data":n.data=n.data?n.data+`
24
+ `;return new Fi(r)}var Fi=class extends Error{constructor(e){super(e),this.name="SchemaValidationError"}},De=class{constructor(e){this.definition=e}validate(e={},t=""){let r={...this.default,...e},n=[];for(let i in this.definition){let o=this.definition[i].validate(r[i]);o&&n.push(`${i}: ${o}`)}if(n.length)throw Dd(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}},bt=class{constructor(e={}){this.baseConfig=e}validate(e){return this.baseConfig.required&&z(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 qt(e){return e===void 0}function Md(e){return e===null}function z(e){return qt(e)||Md(e)}var ye=class{constructor(e={}){re(this,"value");this.config=e,this.value=new bt(e)}validate(e){let t=this.value.validate(e);return t||(qd(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 qd(e){return qt(e)||_s(e)}function _s(e){return typeof e=="number"&&!isNaN(e)}var ie=class{constructor(e={}){re(this,"value");this.value=new bt(e)}validate(e){let t=this.value.validate(e);return t||(Nd(e)?null:"value is not a boolean.")}get default(){return this.value.default}get required(){return this.value.required}};function Nd(e){return qt(e)||Ls(e)}function Ls(e){return typeof e=="boolean"}var _d=/^\d{4}(-\d\d(-\d\d(T\d\d:\d\d(:\d\d)?(\.\d+)?(([+-]\d\d:\d\d)|Z)?)?)?)?$/i,H=class{constructor(e={}){re(this,"value");re(this,"config");this.config={emptyAllowed:!0,url:!1,...e},this.value=new bt(this.config)}validate(e){let{emptyAllowed:t,url:r,regex:n,constrainTo:i,ISODate:o}=this.config,s=this.value.validate(e);if(s)return s;if(qt(e))return null;if(!js(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}`:i&&!i.includes(e)?`value should be one of: ${i.join(", ")}.`:o&&!(_d.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 js(e){return Object.prototype.toString.call(e)==="[object String]"}var te=class{constructor(e={}){re(this,"config");this.config={options:{required:!1},values:{},...e}}validate(e){if(qt(e))return this.config.options.required?"value is required and is currently undefined":null;if(!Us(e))return"value is not an object";for(let[r,n]of Object.entries(this.config.values))if(n.required&&z(e[r]))return`value does not contain ${r}`;let t="";for(let[r,n]of Object.entries(this.config.values)){let i=e[r],o=n.validate(i);o!==null&&(t+=" "+o)}return t===""?null:t}get default(){}get required(){return!!this.config.options.required}};function Us(e){return e!==void 0&&typeof e=="object"}var Ge=class{constructor(e={}){re(this,"value");this.config=e,this.value=new bt(this.config)}validate(e){if(!z(e)&&!Array.isArray(e))return"value is not an array";let t=this.value.validate(e);if(t!==null)return t;if(z(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&&z(n)&&(r=`value is null or undefined: ${e.join(",")}`);let i=this.validatePrimitiveValue(n,this.config.each);i!==null&&(r+=" "+i)}),r===""?null:r}return null}validatePrimitiveValue(e,t){return Ls(e)||js(e)||_s(e)||Us(e)?t.validate(e):"value is not a primitive value"}get default(){}get required(){return this.value.required}};function Vs(e){return Array.isArray(e)}var Ti=class{constructor(e){re(this,"value");this.config=e,this.value=new bt(e)}validate(e){let t=this.value.validate(e);return t!==null?t:qt(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}};l();p();d();var $r=e=>e;l();p();d();l();p();d();var na=Ie(Ys(),1);l();p();d();l();p();d();var ke=new Error("Failed to load reducers."),Nt=class extends Error{constructor(){super(),this.name="ExpiredToken",this.message="The token being used to perform the request is expired."}};var Rt=class extends Error{constructor(r,n){super();re(this,"statusCode");this.name="Disconnected",this.message=`Client could not connect to the following URL: ${r}`,this.statusCode=n??0}};l();p();d();function Ks(e){return Array.isArray(e)}function Js(e,t){return[...e.reduce((r,n)=>{let i=t(n);return r.has(i)||r.set(i,n),r},new Map).values()]}var up=new Set(["1",1,"yes",!0]);function Xs(){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=>up.has(r))}function Zs(e){let t={};for(let[r,n]of e)t[r]=n;return t}function fr(e){if(typeof e!="object"||!e)return e;try{return JSON.parse(JSON.stringify(e))}catch{return e}}l();p();d();function ea(e){let t=[];for(let r in e){let n=encodeURIComponent(r),i=encodeURIComponent(e[r]);t.push(`${n}=${i}`)}return t.join("&")}function ta(e){return typeof e!="object"||!e?!1:Object.values(e).every(lp)}function lp(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"}function ra(e){return e===429}var nt=class e{static call(t){return _asyncToGenerator(function*(){let r=dp(t),{logger:n}=t,i=yield e.preprocessRequest(r,t);n.info(i,"Platform request");let{url:o,...s}=i,c=/*#__PURE__*/function(){var _ref=_asyncToGenerator(function*(){let g=yield b(o,s);if(ra(g.status))throw g;return g});return function c(){return _ref.apply(this,arguments)}}();try{let g=yield(0,na.backOff)(c,{retry:a=>{let m=a&&ra(a.status);return m&&n.info("Platform retrying request"),m}});switch(g.status){case 419:case 401:throw n.info("Platform renewing token"),new Nt;case 404:throw new Rt(o,g.status);default:return n.info({response:g,requestInfo:i},"Platform response"),g}}catch(g){return g.message==="Failed to fetch"?new Rt(o):g}})()}static preprocessRequest(t,r){return _asyncToGenerator(function*(){let{origin:n,preprocessRequest:i,logger:o,requestMetadata:s}=r,{signal:c,...g}=t,a=fr(g);try{let m=yield i(t,n,s);return{...t,...m}}catch(m){o.error(m,"Platform request preprocessing failed. Returning default request options.")}return a})()}};function se(e,t="prod",r="platform"){let n=t==="prod"?"":t,i=r==="platform"?"":`.${r}`;return`https://${e}${i}.org${n}.coveo.com`}function _t(e,t="prod"){return`${se(e,t)}/rest/search/v2`}function zr(e,t="prod"){return`${se(e,t,"analytics")}/rest/organizations/${e}/events/v1`}function dp(e){let{url:t,method:r,requestParams:n,contentType:i,accessToken:o,signal:s}=e,c=e.method==="POST"||e.method==="PUT",g=pp(n,i);return{url:t,method:r,headers:{"Content-Type":i,Authorization:`Bearer ${o}`,...e.headers},...(c&&{body:g}),signal:s}}function pp(e,t){return t==="application/x-www-form-urlencoded"?ta(e)?ea(e):"":JSON.stringify(e)}l();p();d();l();p();d();var Lt=class{constructor(t){re(this,"_basePath");re(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}};l();p();d();function Vi(e){let{url:t,accessToken:r,organizationId:n,authentication:i,...o}=e;return o}var Bi=e=>{let{response:t}=e;return t.body?fp(e):gp(t)},fp=e=>hp(e)?yp(e):mp(e)?e.body:{message:"unknown",statusCode:0,type:"unknown"},gp=e=>{let t=JSON.parse(JSON.stringify(e,Object.getOwnPropertyNames(e)));return{...t,message:`Client side error: ${t.message||""}`,statusCode:400,type:"ClientError"}};function mp(e){return e.body.statusCode!==void 0}function hp(e){return e.body.exception!==void 0}var yp=e=>({message:e.body.exception.code,statusCode:e.response.status,type:e.body.exception.code});l();p();d();function ia(e){return((e.headers.get("content-type")||"").split(";").find(n=>n.indexOf("charset=")!==-1)||"").split("=")[1]||"UTF-8"}l();p();d();var Qi=(e,t,r,n)=>{let i=new Lt(`${e.url}${n}`);return i.addParam("organizationId",e.organizationId),e.authentication&&i.addParam("authentication",e.authentication),{accessToken:e.accessToken,method:t,contentType:r,url:i.href,origin:"searchApiFetch"}};var oa=(e,t)=>{let r=new Lt(`${e.url}${t}`);return r.addParam("access_token",e.accessToken),r.addParam("organizationId",e.organizationId),r.addParam("uniqueId",e.uniqueId),e.q!==void 0&&r.addParam("q",e.q),e.enableNavigation!==void 0&&r.addParam("enableNavigation",`${e.enableNavigation}`),e.requestedOutputSize!==void 0&&r.addParam("requestedOutputSize",`${e.requestedOutputSize}`),r.href},$i=/*#__PURE__*/function(){var _ref2=_asyncToGenerator(function*(e,t){let r=yield nt.call({...Qi(e,"POST","application/x-www-form-urlencoded","/html"),requestParams:Vi(e),requestMetadata:{method:"html"},...t});if(r instanceof Error)throw r;let n=ia(r),i=yield r.arrayBuffer(),s=new TextDecoder(n).decode(i);return Sp(s)?{success:s}:{error:Bi({response:r,body:s})}});return function $i(_x,_x2){return _ref2.apply(this,arguments)}}();function Sp(e){return typeof e=="string"}l();p();d();function vp(e){return{statusCode:e.statusCode,type:e.name,message:e.message}}function Cp(e){return{statusCode:e.code,type:e.name,message:e.message,ignored:!0}}function Gr(e,t){if(t&&e.name==="AbortError")return{error:Cp(e)};if(e instanceof Rt)return{error:vp(e)};throw e}l();p();d();l();p();d();var Wr=(e,t,r,n,i={})=>{Ap(e);let o=`${e.url}/rest/organizations/${e.organizationId}/caseassists/${e.caseAssistId}${n}`,s=bp(i),c=s?`${o}?${s}`:o;return{accessToken:e.accessToken,method:t,contentType:r,url:c,origin:"caseAssistApiFetch"}},Yr=e=>Object.keys(e).filter(t=>e[t].value!=="").reduce((t,r)=>({...t,[r]:e[r]}),{}),Kr=e=>Object.keys(e).filter(t=>e[t].value!=="").reduce((t,r)=>({...t,[r]:e[r].value}),{}),Ap=e=>{if(!e.url)throw new Error("The 'url' attribute must contain a valid platform URL.");if(!e.organizationId)throw new Error("The 'organizationId' attribute must contain a valid organization ID.");if(!e.accessToken)throw new Error("The 'accessToken' attribute must contain a valid platform access token.");if(!e.caseAssistId)throw new Error("The 'caseAssistId' attribute must contain a valid Case Assist configuration ID.")},bp=e=>Object.keys(e).map(t=>`${t}=${encodeURIComponent(e[t])}`).join("&");var sa=e=>{let t=e.debug?{debug:"1"}:{};return{...Wr(e,"POST","application/json","/classify",t),requestParams:wp(e)}},wp=e=>({clientId:e.clientId,locale:e.locale,fields:Yr(e.fields)});l();p();d();var aa=e=>{let t={};return e.debug&&(t.debug="1"),e.numberOfResults&&(t.numberOfResults=e.numberOfResults.toString()),{...Wr(e,"POST","application/json","/documents/suggest",t),requestParams:Rp(e)}},Rp=e=>({clientId:e.clientId,locale:e.locale,fields:Yr(e.fields),context:e.context});var Jr=class{constructor(t){this.options=t}getCaseClassifications(t){var _this=this;return _asyncToGenerator(function*(){let r=yield nt.call({...sa(t),..._this.options});if(r instanceof Error)return Gr(r);let n=yield r.json();return r.ok?{success:n}:{error:n}})()}getDocumentSuggestions(t){var _this2=this;return _asyncToGenerator(function*(){let r=yield nt.call({...aa(t),..._this2.options});if(r instanceof Error)return Gr(r);let n=yield r.json();return r.ok?{success:n}:{error:n}})()}html(t){var _this3=this;return _asyncToGenerator(function*(){return $i(t,_this3.options)})()}};l();p();d();l();p();d();l();p();d();function pe(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 xp=typeof Symbol=="function"&&Symbol.observable||"@@observable",ca=xp,Hi=()=>Math.random().toString(36).substring(7).split("").join("."),Ep={INIT:`@@redux/INIT${Hi()}`,REPLACE:`@@redux/REPLACE${Hi()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Hi()}`},Xr=Ep;function _e(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 zi(e,t,r){if(typeof e!="function")throw new Error(pe(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(pe(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(pe(1));return r(zi)(e,t)}let n=e,i=t,o=new Map,s=o,c=0,g=!1;function a(){s===o&&(s=new Map,o.forEach((R,x)=>{s.set(x,R)}))}function m(){if(g)throw new Error(pe(3));return i}function y(R){if(typeof R!="function")throw new Error(pe(4));if(g)throw new Error(pe(5));let x=!0;a();let S=c++;return s.set(S,R),function(){if(x){if(g)throw new Error(pe(6));x=!1,a(),s.delete(S),o=null}}}function h(R){if(!_e(R))throw new Error(pe(7));if(typeof R.type>"u")throw new Error(pe(8));if(typeof R.type!="string")throw new Error(pe(17));if(g)throw new Error(pe(9));try{g=!0,i=n(i,R)}finally{g=!1}return(o=s).forEach(S=>{S()}),R}function f(R){if(typeof R!="function")throw new Error(pe(10));n=R,h({type:Xr.REPLACE})}function C(){let R=y;return{subscribe(x){if(typeof x!="object"||x===null)throw new Error(pe(11));function S(){let I=x;I.next&&I.next(m())}return S(),{unsubscribe:R(S)}},[ca](){return this}}}return h({type:Xr.INIT}),{dispatch:h,subscribe:y,getState:m,replaceReducer:f,[ca]:C}}function Ip(e){Object.keys(e).forEach(t=>{let r=e[t];if(typeof r(void 0,{type:Xr.INIT})>"u")throw new Error(pe(12));if(typeof r(void 0,{type:Xr.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(pe(13))})}function jt(e){let t=Object.keys(e),r={};for(let s=0;s<t.length;s++){let c=t[s];typeof e[c]=="function"&&(r[c]=e[c])}let n=Object.keys(r),i,o;try{Ip(r)}catch(s){o=s}return function(c={},g){if(o)throw o;let a=!1,m={};for(let y=0;y<n.length;y++){let h=n[y],f=r[h],C=c[h],v=f(C,g);if(typeof v>"u"){let R=g&&g.type;throw new Error(pe(14))}m[h]=v,a=a||v!==C}return a=a||n.length!==Object.keys(c).length,a?m:c}}function Ut(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function ua(...e){return t=>(r,n)=>{let i=t(r,n),o=()=>{throw new Error(pe(15))},s={getState:i.getState,dispatch:(g,...a)=>o(g,...a)},c=e.map(g=>g(s));return o=Ut(...c)(i.dispatch),{...i,dispatch:o}}}function Zr(e){return _e(e)&&"type"in e&&typeof e.type=="string"}l();p();d();var ro=Symbol.for("immer-nothing"),gr=Symbol.for("immer-draftable"),Se=Symbol.for("immer-state");function fe(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Et=Object.getPrototypeOf;function we(e){return!!e&&!!e[Se]}function ve(e){return e?ga(e)||Array.isArray(e)||!!e[gr]||!!e.constructor?.[gr]||vr(e)||Cr(e):!1}var kp=Object.prototype.constructor.toString();function ga(e){if(!e||typeof e!="object")return!1;let t=Et(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)===kp}function no(e){return we(e)||fe(15,e),e[Se].base_}function mr(e,t){It(e)===0?Reflect.ownKeys(e).forEach(r=>{t(r,e[r],e)}):e.forEach((r,n)=>t(n,r,e))}function It(e){let t=e[Se];return t?t.type_:Array.isArray(e)?1:vr(e)?2:Cr(e)?3:0}function hr(e,t){return It(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Gi(e,t){return It(e)===2?e.get(t):e[t]}function ma(e,t,r){let n=It(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function Pp(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function vr(e){return e instanceof Map}function Cr(e){return e instanceof Set}function xt(e){return e.copy_||e.base_}function Ki(e,t){if(vr(e))return new Map(e);if(Cr(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);let r=ga(e);if(t===!0||t==="class_only"&&!r){let n=Object.getOwnPropertyDescriptors(e);delete n[Se];let i=Reflect.ownKeys(n);for(let o=0;o<i.length;o++){let s=i[o],c=n[s];c.writable===!1&&(c.writable=!0,c.configurable=!0),(c.get||c.set)&&(n[s]={configurable:!0,writable:!0,enumerable:c.enumerable,value:e[s]})}return Object.create(Et(e),n)}else{let n=Et(e);if(n!==null&&r)return{...e};let i=Object.create(n);return Object.assign(i,e)}}function rn(e,t=!1){return nn(e)||we(e)||!ve(e)||(It(e)>1&&(e.set=e.add=e.clear=e.delete=Op),Object.freeze(e),t&&Object.entries(e).forEach(([r,n])=>rn(n,!0))),e}function Op(){fe(2)}function nn(e){return Object.isFrozen(e)}var Ji={};function kt(e){let t=Ji[e];return t||fe(0,e),t}function Fp(e,t){Ji[e]||(Ji[e]=t)}var yr;function ha(){return yr}function Tp(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function la(e,t){t&&(kt("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Xi(e){Zi(e),e.drafts_.forEach(Dp),e.drafts_=null}function Zi(e){e===yr&&(yr=e.parent_)}function da(e){return yr=Tp(yr,e)}function Dp(e){let t=e[Se];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function pa(e,t){t.unfinalizedDrafts_=t.drafts_.length;let r=t.drafts_[0];return e!==void 0&&e!==r?(r[Se].modified_&&(Xi(t),fe(4)),ve(e)&&(e=en(t,e),t.parent_||tn(t,e)),t.patches_&&kt("Patches").generateReplacementPatches_(r[Se].base_,e,t.patches_,t.inversePatches_)):e=en(t,r,[]),Xi(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==ro?e:void 0}function en(e,t,r){if(nn(t))return t;let n=t[Se];if(!n)return mr(t,(i,o)=>fa(e,n,t,i,o,r)),t;if(n.scope_!==e)return t;if(!n.modified_)return tn(e,n.base_,!0),n.base_;if(!n.finalized_){n.finalized_=!0,n.scope_.unfinalizedDrafts_--;let i=n.copy_,o=i,s=!1;n.type_===3&&(o=new Set(i),i.clear(),s=!0),mr(o,(c,g)=>fa(e,n,i,c,g,r,s)),tn(e,i,!1),r&&e.patches_&&kt("Patches").generatePatches_(n,r,e.patches_,e.inversePatches_)}return n.copy_}function fa(e,t,r,n,i,o,s){if(we(i)){let c=o&&t&&t.type_!==3&&!hr(t.assigned_,n)?o.concat(n):void 0,g=en(e,i,c);if(ma(r,n,g),we(g))e.canAutoFreeze_=!1;else return}else s&&r.add(i);if(ve(i)&&!nn(i)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;en(e,i),(!t||!t.scope_.parent_)&&typeof n!="symbol"&&Object.prototype.propertyIsEnumerable.call(r,n)&&tn(e,i)}}function tn(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&rn(t,r)}function Mp(e,t){let r=Array.isArray(e),n={type_:r?1:0,scope_:t?t.scope_:ha(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1},i=n,o=io;r&&(i=[n],o=Sr);let{revoke:s,proxy:c}=Proxy.revocable(i,o);return n.draft_=c,n.revoke_=s,c}var io={get(e,t){if(t===Se)return e;let r=xt(e);if(!hr(r,t))return qp(e,r,t);let n=r[t];return e.finalized_||!ve(n)?n:n===Wi(e.base_,t)?(Yi(e),e.copy_[t]=to(n,e)):n},has(e,t){return t in xt(e)},ownKeys(e){return Reflect.ownKeys(xt(e))},set(e,t,r){let n=ya(xt(e),t);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){let i=Wi(xt(e),t),o=i?.[Se];if(o&&o.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(Pp(r,i)&&(r!==void 0||hr(e.base_,t)))return!0;Yi(e),eo(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 Wi(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Yi(e),eo(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let r=xt(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty(){fe(11)},getPrototypeOf(e){return Et(e.base_)},setPrototypeOf(){fe(12)}},Sr={};mr(io,(e,t)=>{Sr[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});Sr.deleteProperty=function(e,t){return Sr.set.call(this,e,t,void 0)};Sr.set=function(e,t,r){return io.set.call(this,e[0],t,r,e[0])};function Wi(e,t){let r=e[Se];return(r?xt(r):e)[t]}function qp(e,t,r){let n=ya(t,r);return n?"value"in n?n.value:n.get?.call(e.draft_):void 0}function ya(e,t){if(!(t in e))return;let r=Et(e);for(;r;){let n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Et(r)}}function eo(e){e.modified_||(e.modified_=!0,e.parent_&&eo(e.parent_))}function Yi(e){e.copy_||(e.copy_=Ki(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Np=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,r,n)=>{if(typeof t=="function"&&typeof r!="function"){let o=r;r=t;let s=this;return function(g=o,...a){return s.produce(g,m=>r.call(this,m,...a))}}typeof r!="function"&&fe(6),n!==void 0&&typeof n!="function"&&fe(7);let i;if(ve(t)){let o=da(this),s=to(t,void 0),c=!0;try{i=r(s),c=!1}finally{c?Xi(o):Zi(o)}return la(o,n),pa(i,o)}else if(!t||typeof t!="object"){if(i=r(t),i===void 0&&(i=t),i===ro&&(i=void 0),this.autoFreeze_&&rn(i,!0),n){let o=[],s=[];kt("Patches").generateReplacementPatches_(t,i,o,s),n(o,s)}return i}else fe(1,t)},this.produceWithPatches=(t,r)=>{if(typeof t=="function")return(s,...c)=>this.produceWithPatches(s,g=>t(g,...c));let n,i;return[this.produce(t,r,(s,c)=>{n=s,i=c}),n,i]},typeof e?.autoFreeze=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof e?.useStrictShallowCopy=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){ve(e)||fe(8),we(e)&&(e=Sa(e));let t=da(this),r=to(e,void 0);return r[Se].isManual_=!0,Zi(t),r}finishDraft(e,t){let r=e&&e[Se];(!r||!r.isManual_)&&fe(9);let{scope_:n}=r;return la(n,t),pa(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 i=t[r];if(i.path.length===0&&i.op==="replace"){e=i.value;break}}r>-1&&(t=t.slice(r+1));let n=kt("Patches").applyPatches_;return we(e)?n(e,t):this.produce(e,i=>n(i,t))}};function to(e,t){let r=vr(e)?kt("MapSet").proxyMap_(e,t):Cr(e)?kt("MapSet").proxySet_(e,t):Mp(e,t);return(t?t.scope_:ha()).drafts_.push(r),r}function Sa(e){return we(e)||fe(10,e),va(e)}function va(e){if(!ve(e)||nn(e))return e;let t=e[Se],r;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=Ki(e,t.scope_.immer_.useStrictShallowCopy_)}else r=Ki(e,!0);return mr(r,(n,i)=>{ma(r,n,va(i))}),t&&(t.finalized_=!1),r}function Ca(){let t="replace",r="add",n="remove";function i(h,f,C,v){switch(h.type_){case 0:case 2:return s(h,f,C,v);case 1:return o(h,f,C,v);case 3:return c(h,f,C,v)}}function o(h,f,C,v){let{base_:R,assigned_:x}=h,S=h.copy_;S.length<R.length&&([R,S]=[S,R],[C,v]=[v,C]);for(let w=0;w<R.length;w++)if(x[w]&&S[w]!==R[w]){let I=f.concat([w]);C.push({op:t,path:I,value:y(S[w])}),v.push({op:t,path:I,value:y(R[w])})}for(let w=R.length;w<S.length;w++){let I=f.concat([w]);C.push({op:r,path:I,value:y(S[w])})}for(let w=S.length-1;R.length<=w;--w){let I=f.concat([w]);v.push({op:n,path:I})}}function s(h,f,C,v){let{base_:R,copy_:x}=h;mr(h.assigned_,(S,w)=>{let I=Gi(R,S),D=Gi(x,S),k=w?hr(R,S)?t:r:n;if(I===D&&k===t)return;let E=f.concat(S);C.push(k===n?{op:k,path:E}:{op:k,path:E,value:D}),v.push(k===r?{op:n,path:E}:k===n?{op:r,path:E,value:y(I)}:{op:t,path:E,value:y(I)})})}function c(h,f,C,v){let{base_:R,copy_:x}=h,S=0;R.forEach(w=>{if(!x.has(w)){let I=f.concat([S]);C.push({op:n,path:I,value:w}),v.unshift({op:r,path:I,value:w})}S++}),S=0,x.forEach(w=>{if(!R.has(w)){let I=f.concat([S]);C.push({op:r,path:I,value:w}),v.unshift({op:n,path:I,value:w})}S++})}function g(h,f,C,v){C.push({op:t,path:[],value:f===ro?void 0:f}),v.push({op:t,path:[],value:h})}function a(h,f){return f.forEach(C=>{let{path:v,op:R}=C,x=h;for(let D=0;D<v.length-1;D++){let k=It(x),E=v[D];typeof E!="string"&&typeof E!="number"&&(E=""+E),(k===0||k===1)&&(E==="__proto__"||E==="constructor")&&fe(19),typeof x=="function"&&E==="prototype"&&fe(19),x=Gi(x,E),typeof x!="object"&&fe(18,v.join("/"))}let S=It(x),w=m(C.value),I=v[v.length-1];switch(R){case t:switch(S){case 2:return x.set(I,w);case 3:fe(16);default:return x[I]=w}case r:switch(S){case 1:return I==="-"?x.push(w):x.splice(I,0,w);case 2:return x.set(I,w);case 3:return x.add(w);default:return x[I]=w}case n:switch(S){case 1:return x.splice(I,1);case 2:return x.delete(I);case 3:return x.delete(C.value);default:return delete x[I]}default:fe(17,R)}}),h}function m(h){if(!ve(h))return h;if(Array.isArray(h))return h.map(m);if(vr(h))return new Map(Array.from(h.entries()).map(([C,v])=>[C,m(v)]));if(Cr(h))return new Set(Array.from(h).map(m));let f=Object.create(Et(h));for(let C in h)f[C]=m(h[C]);return hr(h,gr)&&(f[gr]=h[gr]),f}function y(h){return we(h)?m(h):h}Fp("Patches",{applyPatches_:a,generatePatches_:i,generateReplacementPatches_:g})}var Re=new Np,Ye=Re.produce,on=Re.produceWithPatches.bind(Re),dA=Re.setAutoFreeze.bind(Re),pA=Re.setUseStrictShallowCopy.bind(Re),oo=Re.applyPatches.bind(Re),fA=Re.createDraft.bind(Re),gA=Re.finishDraft.bind(Re);l();p();d();function _p(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function Lp(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function jp(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 Aa=e=>Array.isArray(e)?e:[e];function Up(e){let t=Array.isArray(e[0])?e[0]:e;return jp(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function Vp(e,t){let r=[],{length:n}=e;for(let i=0;i<n;i++)r.push(e[i].apply(null,t));return r}var CA=Symbol();var AA=Object.getPrototypeOf({});var Bp=class{constructor(e){this.value=e}deref(){return this.value}},Qp=typeof WeakRef<"u"?WeakRef:Bp,$p=0,ba=1;function sn(){return{s:$p,v:void 0,o:null,p:null}}function Vt(e,t={}){let r=sn(),{resultEqualityCheck:n}=t,i,o=0;function s(){let c=r,{length:g}=arguments;for(let y=0,h=g;y<h;y++){let f=arguments[y];if(typeof f=="function"||typeof f=="object"&&f!==null){let C=c.o;C===null&&(c.o=C=new WeakMap);let v=C.get(f);v===void 0?(c=sn(),C.set(f,c)):c=v}else{let C=c.p;C===null&&(c.p=C=new Map);let v=C.get(f);v===void 0?(c=sn(),C.set(f,c)):c=v}}let a=c,m;if(c.s===ba)m=c.v;else if(m=e.apply(null,arguments),o++,n){let y=i?.deref?.()??i;y!=null&&n(y,m)&&(m=y,o!==0&&o--),i=typeof m=="object"&&m!==null||typeof m=="function"?new Qp(m):m}return a.s=ba,a.v=m,m}return s.clearCache=()=>{r=sn(),s.resetResultsCount()},s.resultsCount=()=>o,s.resetResultsCount=()=>{o=0},s}function wa(e,...t){let r=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,n=(...i)=>{let o=0,s=0,c,g={},a=i.pop();typeof a=="object"&&(g=a,a=i.pop()),_p(a,`createSelector expects an output function after the inputs, but received: [${typeof a}]`);let m={...r,...g},{memoize:y,memoizeOptions:h=[],argsMemoize:f=Vt,argsMemoizeOptions:C=[],devModeChecks:v={}}=m,R=Aa(h),x=Aa(C),S=Up(i),w=y(function(){return o++,a.apply(null,arguments)},...R),I=!0,D=f(function(){s++;let E=Vp(S,arguments);return c=w.apply(null,E),c},...x);return Object.assign(D,{resultFunc:a,memoizedResultFunc:w,dependencies:S,dependencyRecomputations:()=>s,resetDependencyRecomputations:()=>{s=0},lastResult:()=>c,recomputations:()=>o,resetRecomputations:()=>{o=0},memoize:y,argsMemoize:f})};return Object.assign(n,{withTypes:()=>n}),n}var ae=wa(Vt),Hp=Object.assign((e,t=ae)=>{Lp(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(o=>e[o]);return t(n,(...o)=>o.reduce((s,c,g)=>(s[r[g]]=c,s),{}))},{withTypes:()=>Hp});l();p();d();function Ra(e){return({dispatch:r,getState:n})=>i=>o=>typeof o=="function"?o(r,n,e):i(o)}var xa=Ra(),Ea=Ra;var zp=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Ut:Ut.apply(null,arguments)},_A=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}},Gp=e=>e&&typeof e.match=="function";function L(e,t){function r(...n){if(t){let i=t(...n);if(!i)throw new Error(Pe(0));return{type:e,payload:i.payload,...("meta"in i&&{meta:i.meta}),...("error"in i&&{error:i.error})}}return{type:e,payload:n[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=n=>Zr(n)&&n.type===e,r}var Oa=class Ar extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,Ar.prototype)}static get[Symbol.species](){return Ar}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new Ar(...t[0].concat(this)):new Ar(...t.concat(this))}};function Ia(e){return ve(e)?Ye(e,()=>{}):e}function ka(e,t,r){if(e.has(t)){let i=e.get(t);return r.update&&(i=r.update(i,t,e),e.set(t,i)),i}if(!r.insert)throw new Error(Pe(10));let n=r.insert(t,e);return e.set(t,n),n}function Wp(e){return typeof e=="boolean"}var Yp=()=>function(t){let{thunk:r=!0,immutableCheck:n=!0,serializableCheck:i=!0,actionCreatorCheck:o=!0}=t??{},s=new Oa;return r&&(Wp(r)?s.push(xa):s.push(Ea(r.extraArgument))),s},it="RTK_autoBatch",Qt=()=>e=>({payload:e,meta:{[it]:!0}}),Fa=e=>t=>{setTimeout(t,e)},Kp=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Fa(10),Jp=(e={type:"raf"})=>t=>(...r)=>{let n=t(...r),i=!0,o=!1,s=!1,c=new Set,g=e.type==="tick"?queueMicrotask:e.type==="raf"?Kp:e.type==="callback"?e.queueNotification:Fa(e.timeout),a=()=>{s=!1,o&&(o=!1,c.forEach(m=>m()))};return Object.assign({},n,{subscribe(m){let y=()=>i&&m(),h=n.subscribe(y);return c.add(m),()=>{h(),c.delete(m)}},dispatch(m){try{return i=!m?.meta?.[it],o=!i,o&&(s||(s=!0,g(a))),n.dispatch(m)}finally{i=!0}}})},Xp=e=>function(r){let{autoBatch:n=!0}=r??{},i=new Oa(e);return n&&i.push(Jp(typeof n=="object"?n:void 0)),i};function Ta(e){let t=Yp(),{reducer:r=void 0,middleware:n,devTools:i=!0,preloadedState:o=void 0,enhancers:s=void 0}=e||{},c;if(typeof r=="function")c=r;else if(_e(r))c=jt(r);else throw new Error(Pe(1));let g;typeof n=="function"?g=n(t):g=t();let a=Ut;i&&(a=zp({trace:!1,...(typeof i=="object"&&i)}));let m=ua(...g),y=Xp(m),h=typeof s=="function"?s(y):y(),f=a(...h);return zi(c,o,f)}function Da(e){let t={},r=[],n,i={addCase(o,s){let c=typeof o=="string"?o:o.type;if(!c)throw new Error(Pe(28));if(c in t)throw new Error(Pe(29));return t[c]=s,i},addMatcher(o,s){return r.push({matcher:o,reducer:s}),i},addDefaultCase(o){return n=o,i}};return e(i),[t,r,n]}function Zp(e){return typeof e=="function"}function ce(e,t){let[r,n,i]=Da(t),o;if(Zp(e))o=()=>Ia(e());else{let c=Ia(e);o=()=>c}function s(c=o(),g){let a=[r[g.type],...n.filter(({matcher:m})=>m(g)).map(({reducer:m})=>m)];return a.filter(m=>!!m).length===0&&(a=[i]),a.reduce((m,y)=>{if(y)if(we(m)){let f=y(m,g);return f===void 0?m:f}else{if(ve(m))return Ye(m,h=>y(h,g));{let h=y(m,g);if(h===void 0){if(m===null)return m;throw Error("A case reducer on a non-draftable value must not return undefined")}return h}}return m},c)}return s.getInitialState=o,s}var Ma=(e,t)=>Gp(e)?e.match(t):e(t);function Le(...e){return t=>e.some(r=>Ma(r,t))}function Bt(...e){return t=>e.every(r=>Ma(r,t))}function cn(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 br(e){return typeof e[0]=="function"&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function un(...e){return e.length===0?t=>cn(t,["pending"]):br(e)?Le(...e.map(t=>t.pending)):un()(e[0])}function Pt(...e){return e.length===0?t=>cn(t,["rejected"]):br(e)?Le(...e.map(t=>t.rejected)):Pt()(e[0])}function wr(...e){let t=r=>r&&r.meta&&r.meta.rejectedWithValue;return e.length===0?Bt(Pt(...e),t):br(e)?Bt(Pt(...e),t):wr()(e[0])}function Ke(...e){return e.length===0?t=>cn(t,["fulfilled"]):br(e)?Le(...e.map(t=>t.fulfilled)):Ke()(e[0])}function ln(...e){return e.length===0?t=>cn(t,["pending","fulfilled","rejected"]):br(e)?Le(...e.flatMap(t=>[t.pending,t.rejected,t.fulfilled])):ln()(e[0])}var ef="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",dn=(e=21)=>{let t="",r=e;for(;r--;)t+=ef[Math.random()*64|0];return t},tf=["name","message","stack","code"],so=class{constructor(e,t){re(this,"_type");this.payload=e,this.meta=t}},Pa=class{constructor(e,t){re(this,"_type");this.payload=e,this.meta=t}},rf=e=>{if(typeof e=="object"&&e!==null){let t={};for(let r of tf)typeof e[r]=="string"&&(t[r]=e[r]);return t}return{message:String(e)}},J=(()=>{function e(t,r,n){let i=L(t+"/fulfilled",(g,a,m,y)=>({payload:g,meta:{...(y||{}),arg:m,requestId:a,requestStatus:"fulfilled"}})),o=L(t+"/pending",(g,a,m)=>({payload:void 0,meta:{...(m||{}),arg:a,requestId:g,requestStatus:"pending"}})),s=L(t+"/rejected",(g,a,m,y,h)=>({payload:y,error:(n&&n.serializeError||rf)(g||"Rejected"),meta:{...(h||{}),arg:m,requestId:a,rejectedWithValue:!!y,requestStatus:"rejected",aborted:g?.name==="AbortError",condition:g?.name==="ConditionError"}}));function c(g){return(a,m,y)=>{let h=n?.idGenerator?n.idGenerator(g):dn(),f=new u.AbortController,C,v;function R(S){v=S,f.abort()}let x=_asyncToGenerator(function*(){let S;try{let I=n?.condition?.(g,{getState:m,extra:y});if(of(I)&&(I=yield I),I===!1||f.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let D=new Promise((k,E)=>{C=()=>{E({name:"AbortError",message:v||"Aborted"})},f.signal.addEventListener("abort",C)});a(o(h,g,n?.getPendingMeta?.({requestId:h,arg:g},{getState:m,extra:y}))),S=yield Promise.race([D,Promise.resolve(r(g,{dispatch:a,getState:m,extra:y,requestId:h,signal:f.signal,abort:R,rejectWithValue:(k,E)=>new so(k,E),fulfillWithValue:(k,E)=>new Pa(k,E)})).then(k=>{if(k instanceof so)throw k;return k instanceof Pa?i(k.payload,h,g,k.meta):i(k,h,g)})])}catch(I){S=I instanceof so?s(null,h,g,I.payload,I.meta):s(I,h,g)}finally{C&&f.signal.removeEventListener("abort",C)}return n&&!n.dispatchConditionRejection&&s.match(S)&&S.meta.condition||a(S),S})();return Object.assign(x,{abort:R,requestId:h,arg:g,unwrap(){return x.then(nf)}})}}return Object.assign(c,{pending:o,rejected:s,fulfilled:i,settled:Le(s,i),typePrefix:t})}return e.withTypes=()=>e,e})();function nf(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function of(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var qa=Symbol.for("rtk-slice-createasyncthunk"),BA={[qa]:J};function sf(e,t){return`${e}/${t}`}function af({creators:e}={}){let t=e?.asyncThunk?.[qa];return function(n){let{name:i,reducerPath:o=i}=n;if(!i)throw new Error(Pe(11));typeof process<"u";let s=(typeof n.reducers=="function"?n.reducers(uf()):n.reducers)||{},c=Object.keys(s),g={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},a={addCase(S,w){let I=typeof S=="string"?S:S.type;if(!I)throw new Error(Pe(12));if(I in g.sliceCaseReducersByType)throw new Error(Pe(13));return g.sliceCaseReducersByType[I]=w,a},addMatcher(S,w){return g.sliceMatchers.push({matcher:S,reducer:w}),a},exposeAction(S,w){return g.actionCreators[S]=w,a},exposeCaseReducer(S,w){return g.sliceCaseReducersByName[S]=w,a}};c.forEach(S=>{let w=s[S],I={reducerName:S,type:sf(i,S),createNotation:typeof n.reducers=="function"};df(w)?ff(I,w,a,t):lf(I,w,a)});function m(){let[S={},w=[],I=void 0]=typeof n.extraReducers=="function"?Da(n.extraReducers):[n.extraReducers],D={...S,...g.sliceCaseReducersByType};return ce(n.initialState,k=>{for(let E in D)k.addCase(E,D[E]);for(let E of g.sliceMatchers)k.addMatcher(E.matcher,E.reducer);for(let E of w)k.addMatcher(E.matcher,E.reducer);I&&k.addDefaultCase(I)})}let y=S=>S,h=new Map,f;function C(S,w){return f||(f=m()),f(S,w)}function v(){return f||(f=m()),f.getInitialState()}function R(S,w=!1){function I(k){let E=k[S];return typeof E>"u"&&w&&(E=v()),E}function D(k=y){let E=ka(h,w,{insert:()=>new WeakMap});return ka(E,k,{insert:()=>{let T={};for(let[O,_]of Object.entries(n.selectors??{}))T[O]=cf(_,k,v,w);return T}})}return{reducerPath:S,getSelectors:D,get selectors(){return D(I)},selectSlice:I}}let x={name:i,reducer:C,actions:g.actionCreators,caseReducers:g.sliceCaseReducersByName,getInitialState:v,...R(o),injectInto(S,{reducerPath:w,...I}={}){let D=w??o;return S.inject({reducerPath:D,reducer:C},I),{...x,...R(D,!0)}}};return x}}function cf(e,t,r,n){function i(o,...s){let c=t(o);return typeof c>"u"&&n&&(c=r()),e(c,...s)}return i.unwrapped=e,i}var Ot=af();function uf(){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 lf({type:e,reducerName:t,createNotation:r},n,i){let o,s;if("reducer"in n){if(r&&!pf(n))throw new Error(Pe(17));o=n.reducer,s=n.prepare}else o=n;i.addCase(e,o).exposeCaseReducer(t,o).exposeAction(t,s?L(e,s):L(e))}function df(e){return e._reducerDefinitionType==="asyncThunk"}function pf(e){return e._reducerDefinitionType==="reducerWithPrepare"}function ff({type:e,reducerName:t},r,n,i){if(!i)throw new Error(Pe(18));let{payloadCreator:o,fulfilled:s,pending:c,rejected:g,settled:a,options:m}=r,y=i(e,o,m);n.exposeAction(t,y),s&&n.addCase(y.fulfilled,s),c&&n.addCase(y.pending,c),g&&n.addCase(y.rejected,g),a&&n.addMatcher(y.settled,a),n.exposeCaseReducer(t,{fulfilled:s||an,pending:c||an,rejected:g||an,settled:a||an})}function an(){}var Na="listener",_a="completed",La="cancelled",QA=`task-${La}`,$A=`task-${_a}`,HA=`${Na}-${La}`,zA=`${Na}-${_a}`;var{assign:ja}=Object;var ao="listenerMiddleware";var gf=ja(L(`${ao}/add`),{withTypes:()=>gf}),GA=L(`${ao}/removeAll`),mf=ja(L(`${ao}/remove`),{withTypes:()=>mf});var WA=Symbol.for("rtk-state-proxy-original");function Pe(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. `}l();p();d();var W=new H({required:!0,emptyAllowed:!1}),oe=new H({required:!1,emptyAllowed:!1}),Me=new H({required:!0,emptyAllowed:!0}),sb=new H({required:!1,emptyAllowed:!0}),Ua=new Ge({each:W,required:!0}),Va=new H({required:!1,emptyAllowed:!1,regex:/^\d+\.\d+\.\d+$/}),hf=({message:e,name:t,stack:r})=>({message:e,name:t,stack:r}),co=(e,t)=>{if("required"in t)return{payload:new De({value:t}).validate({value:e}).value};let i=new te({options:{required:!0},values:t}).validate(e);if(i)throw new Fi(i);return{payload:e}},$=(e,t)=>{try{return co(e,t)}catch(r){return{payload:e,error:hf(r)}}};var pn=(e,t,r,n)=>{let i=`Check the options of ${n}`;return yf(e,t,r,i,"Controller initialization error")},yf=(e,t,r,n,i)=>{try{return t.validate(r,n)}catch(o){throw e.logger.error(o,i),o}};var fn=L("caseAssistConfiguration/set",e=>$(e,{caseAssistId:W,locale:oe,proxyBaseUrl:new H({required:!1,url:!0})}));l();p();d();l();p();d();var Ba=()=>({caseAssistId:"",locale:"en-US"});var ot=ce(Ba(),e=>{e.addCase(fn,(t,r)=>{t.caseAssistId=r.payload.caseAssistId,t.locale=r.payload.locale,t.apiBaseUrl=r.payload.proxyBaseUrl})});l();p();d();l();p();d();l();p();d();var Qa={q:new H,enableQuerySyntax:new ie,aq:new H,cq:new H,firstResult:new ye({min:0}),numberOfResults:new ye({min:0}),sortCriteria:new H,f:new te,fExcluded:new te,cf:new te,nf:new te,mnf:new te,df:new te,debug:new ie,sf:new te,tab:new H,af:new te};var gn=L("searchParameters/restore",e=>$(e,Qa));l();p();d();var $a=L("debug/enable"),Ha=L("debug/disable");l();p();d();var mn=()=>!1;var za=ce(mn(),e=>{e.addCase($a,()=>!0).addCase(Ha,()=>!1).addCase(gn,(t,r)=>r.payload.debug??t)});l();p();d();var hn=L("searchHub/set",e=>$(e,new H({required:!0,emptyAllowed:!0})));l();p();d();l();p();d();l();p();d();var $t="3.11.0-pre.d66d49ebbe",Ga=["@coveo/atomic","@coveo/quantic"];var uo=()=>oe,Wa=()=>W,Ht=L("configuration/updateBasicConfiguration",e=>$(e,{accessToken:oe,environment:new H({required:!1,constrainTo:["prod","hipaa","stg","dev"]}),organizationId:oe})),yn=L("configuration/updateSearchConfiguration",e=>$(e,{proxyBaseUrl:new H({required:!1,url:!0}),pipeline:new H({required:!1,emptyAllowed:!0}),searchHub:oe,timezone:oe,locale:oe,authenticationProviders:new Ge({required:!1,each:W})})),Sf={enabled:new ie({default:!0}),originContext:uo(),originLevel2:uo(),originLevel3:uo(),proxyBaseUrl:new H({required:!1,url:!0}),runtimeEnvironment:new bt,anonymous:new ie({default:!1}),deviceId:oe,userDisplayName:oe,documentLocation:oe,trackingId:oe,analyticsMode:new H({constrainTo:["legacy","next"],required:!1,default:"next"}),source:new te({options:{required:!1},values:Ga.reduce((e,t)=>(e[t]=Va,e),{})})},Sn=L("configuration/updateAnalyticsConfiguration",e=>$(e,Sf)),vn=L("configuration/analytics/disable"),Cn=L("configuration/analytics/enable"),Ya=L("configuration/analytics/originlevel2",e=>$(e,{originLevel2:Wa()})),Ka=L("configuration/analytics/originlevel3",e=>$(e,{originLevel3:Wa()}));l();p();d();var vf=L("history/undo"),Cf=L("history/redo"),je=L("history/snapshot"),Iw=J("history/back",/*#__PURE__*/function(){var _ref4=_asyncToGenerator(function*(e,{dispatch:t}){t(vf()),yield t(An())});return function(_x3,_x4){return _ref4.apply(this,arguments)}}()),kw=J("history/forward",/*#__PURE__*/function(){var _ref5=_asyncToGenerator(function*(e,{dispatch:t}){t(Cf()),yield t(An())});return function(_x5,_x6){return _ref5.apply(this,arguments)}}()),An=J("history/change",/*#__PURE__*/function(){var _ref6=_asyncToGenerator(function*(e,{getState:t}){return t().history.present});return function(_x7,_x8){return _ref6.apply(this,arguments)}}());l();p();d();var st=()=>"default";var Ja=ce(st(),e=>{e.addCase(hn,(t,r)=>r.payload).addCase(An.fulfilled,(t,r)=>r.payload?.searchHub??t).addCase(yn,(t,r)=>r.payload.searchHub||t)});l();p();d();l();p();d();l();p();d();function Af({config:e,environment:t,event:r,listenerManager:n}){let{url:i,token:o,mode:s}=e;s!=="disabled"&&(n.call(r),t.send(i,o,r))}var bf=/^(?:[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 wf(e){return typeof e=="string"&&bf.test(e)}function Rf(e){return{getClientId:()=>{let t="visitorId",r=e.get(),n=r.storage,i=n.getItem(t),o=i&&wf(i)?i:r.generateUUID();return n.setItem(t,o),o}}}var Za="0.7.10";function xf(e){let{trackingId:t}=e;return{trackingId:t}}function Ef(e){return(e.source||[]).concat([`relay@${Za}`])}function ec(e,t,r,n){let{getReferrer:i,getLocation:o,getUserAgent:s}=r,c=xf(t),g=n.getClientId();return Object.freeze({type:e,config:c,ts:Date.now(),source:Ef(t),clientId:g,userAgent:s(),referrer:i(),location:o()})}function If(e,t,r,n,i){return{...t,meta:ec(e,r,n,i)}}var kf="*";function Pf(){let e=[];function t({type:g,callback:a}){return e.findIndex(m=>m.type===g&&m.callback===a)}function r(g,a){return g.type==="*"||a===g.type}function n(g){return t(g)<0&&e.push(g),()=>c(g.type,g.callback)}function i(g){e.forEach(a=>{if(r(a,g.meta.type))try{a.callback(g)}catch(m){console.error(m)}})}function o(g){if(g===kf)e.length=0;else for(let a=e.length-1;a>=0;a--)e[a].type===g&&e.splice(a,1)}function s(g){let a=t(g);a>=0&&e.splice(a,1)}function c(g,a){a?s({type:g,callback:a}):o(g)}return{add:n,call:i,remove:c}}function Xa({url:e,token:t,trackingId:r,...n}){return Object.freeze({url:e,token:t,trackingId:r,...(!!n.mode&&{mode:n.mode}),...(!!n.source&&{source:n.source})})}function Of(e){let t=Xa(e);return{get:()=>t,update:r=>{t=Xa({...t,...r})}}}function Ff(){let e=typeof window<"u";return{sendMessage(t){e&&window.postMessage(t,"*")}}}var lo=Tf();function Tf(){let e="coveo_",t=r=>{let n=r.split(".").slice(-2);return n.length==2?n.join("."):""};return{getItem(r){let n=`${e}${r}=`,i=document.cookie.split(";");for(let o of i){let s=o.replace(/^\s+/,"");if(s.lastIndexOf(n,0)===0)return s.substring(n.length,s.length)}return null},setItem(r,n,i){let o=t(window.location.hostname),s=`;expires=${new Date(new Date().getTime()+i).toUTCString()}`,c=o?`;domain=${o}`:"";document.cookie=`${e}${r}=${n}${s}${c};path=/;SameSite=Lax`},removeItem(r){this.setItem(r,"",-1)}}}function Df(){return{getItem(e){return lo.getItem(e)||localStorage.getItem(e)},removeItem(e){lo.removeItem(e),localStorage.removeItem(e)},setItem(e,t){localStorage.setItem(e,t),lo.setItem(e,t,31556952e3)}}}function Mf(){let e=document.referrer;return e===""?null:e}function qf(){return{runtime:"browser",send:(e,t,r)=>{let n=navigator.sendBeacon(`${e}?access_token=${t}`,new Blob([JSON.stringify([r])],{type:"application/json"}));if(Ff().sendMessage({kind:"EVENT_PROTOCOL",event:r,url:e,token:t}),!n)throw new Error("Failed to send the event(s) because the payload size exceeded the maximum allowed size (32 KB). Please contact support if the problem persists.")},getReferrer:()=>Mf(),getLocation:()=>window.location.href,getUserAgent:()=>navigator.userAgent,generateUUID:()=>crypto.randomUUID(),storage:Df()}}function Nf(){try{let e="__storage_test__";return localStorage.setItem(e,e),localStorage.removeItem(e),!0}catch(e){return e instanceof DOMException&&e.name==="QuotaExceededError"&&localStorage&&localStorage.length!==0}}function _f(){return{getItem(){return null},removeItem(){},setItem(){}}}function Lf(){return{runtime:"null",send:()=>{},getReferrer:()=>null,getLocation:()=>null,getUserAgent:()=>null,generateUUID:()=>"",storage:_f()}}function jf(e){return e.get().mode!=="disabled"&&Uf()&&Nf()?qf():Lf()}function Uf(){try{return typeof window=="object"}catch{return!1}}function Vf(e){return{get:()=>Object.freeze(jf(e))}}function tc(e){let t=Of(e),r=Pf(),n=Vf(t),i=Rf(n);return{emit:(o,s)=>{let c=t.get(),g=n.get(),a=If(o,s,c,g,i);return Af({config:c,environment:g,event:a,listenerManager:r})},getMeta:o=>ec(o,t.get(),n.get(),i),on:(o,s)=>r.add({type:o,callback:s}),off:(o,s)=>r.remove(o,s),updateConfig:o=>t.update(o),version:Za}}l();p();d();var zt=ae(e=>e.source,e=>Object.entries(e).map(([t,r])=>`${t}@${r}`).concat(`@coveo/headless@${$t}`));var Gt=ae(e=>e.configuration.organizationId,e=>e.configuration.environment,e=>e.configuration.accessToken,e=>e.configuration.analytics,e=>zt(e.configuration.analytics),(e,t,r,{trackingId:n,apiBaseUrl:i,enabled:o},s)=>tc({mode:o?"emit":"disabled",url:i??zr(e,t),token:r,trackingId:n,source:s}));l();p();d();l();p();d();l();p();d();l();p();d();function nc(_x9,_x10){return _nc.apply(this,arguments)}function _nc(){_nc=_asyncToGenerator(function*(e,t){let r=e.getReader(),n;for(;!(n=yield r.read()).done;)t(n.value)});return _nc.apply(this,arguments)}function ic(e){let t,r,n,i=!1;return function(s){t===void 0?(t=s,r=0,n=-1):t=Bf(t,s);let c=t.length,g=0;for(;r<c;){i&&(t[r]===10&&(g=++r),i=!1);let a=-1;for(;r<c&&a===-1;++r)switch(t[r]){case 58:n===-1&&(n=r-g);break;case 13:i=!0;case 10:a=r;break}if(a===-1)break;e(t.subarray(g,a),n),g=r,n=-1}g===c?t=void 0:g!==0&&(t=t.subarray(g),r-=g)}}function oc(e,t,r){let n=rc(),i=new TextDecoder;return function(s,c){if(s.length===0)r?.(n),n=rc();else if(c>0){let g=i.decode(s.subarray(0,c)),a=c+(s[c+1]===32?2:1),m=i.decode(s.subarray(a));switch(g){case"data":n.data=n.data?n.data+`
25
25
  `+m:m;break;case"event":n.event=m;break;case"id":e(n.id=m);break;case"retry":let y=parseInt(m,10);isNaN(y)||t(n.retry=y);break}}}}function Bf(e,t){let r=new Uint8Array(e.length+t.length);return r.set(e),r.set(t,e.length),r}function rc(){return{data:"",event:"",id:"",retry:void 0}}var Qf=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r},bn="text/event-stream",$f=1e3,sc="last-event-id";function ac(){typeof window<"u"}function po(e,t){var{signal:r,headers:n,onopen:i,onmessage:o,onclose:s,onerror:c,openWhenHidden:g,fetch:a}=t,m=Qf(t,["signal","headers","onopen","onmessage","onclose","onerror","openWhenHidden","fetch"]);return new Promise((y,h)=>{let f=Object.assign({},n);f.accept||(f.accept=bn);let C;function v(){C?.abort(),document.hidden||D()}!g&&ac()&&document.addEventListener("visibilitychange",v);let R=$f,x=0;function S(){ac()&&document.removeEventListener("visibilitychange",v),clearTimeout(x),C?.abort()}r?.addEventListener("abort",()=>{S(),y()});let w=a??w,I=i??Hf;function D(){return _D.apply(this,arguments)}function _D(){_D=_asyncToGenerator(function*(){var k;C=typeof u.AbortController>"u"?null:new u.AbortController;try{let E=yield w(e,Object.assign(Object.assign({},m),{headers:f,signal:C?.signal}));yield I(E),yield nc(E.body,ic(oc(T=>{T?f[sc]=T:delete f[sc]},T=>{R=T},o))),s?.(),S(),y()}catch(E){if(!C?.signal.aborted)try{let T=(k=c?.(E))!==null&&k!==void 0?k:R;clearTimeout(x),x=setTimeout(D,T)}catch(T){S(),h(T)}}});return _D.apply(this,arguments)}D()})}function Hf(e){let t=e.headers.get("content-type");if(!t?.startsWith(bn))throw new Error(`Expected content-type to be ${bn}, Actual: ${t}`)}l();p();d();l();p();d();l();p();d();l();p();d();l();p();d();function Je(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 i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r}function P(e,t,r,n){function i(o){return o instanceof r?o:new r(function(s){s(o)})}return new(r||(r=Promise))(function(o,s){function c(m){try{a(n.next(m))}catch(y){s(y)}}function g(m){try{a(n.throw(m))}catch(y){s(y)}}function a(m){m.done?o(m.value):i(m.value).then(c,g)}a((n=n.apply(e,t||[])).next())})}var Y;(function(e){e.search="search",e.click="click",e.custom="custom",e.view="view",e.collect="collect"})(Y||(Y={}));function mo(){return typeof window<"u"}function ko(){return typeof navigator<"u"}function Wt(){return typeof document<"u"}function ho(){try{return typeof localStorage<"u"}catch{return!1}}function zf(){try{return typeof sessionStorage<"u"}catch{return!1}}function Ac(){return ko()&&navigator.cookieEnabled}var Gf=[Y.click,Y.custom,Y.search,Y.view],Wf=(e,t)=>Gf.indexOf(e)!==-1?Object.assign({language:Wt()?document.documentElement.lang:"unknown",userAgent:ko()?navigator.userAgent:"unknown"},t):t,Er=class e{static set(t,r,n){var i,o,s,c;n&&(o=new Date,o.setTime(o.getTime()+n)),c=window.location.hostname,c.indexOf(".")===-1?cc(t,r,o):(s=c.split("."),i=s[s.length-2]+"."+s[s.length-1],cc(t,r,o,i))}static get(t){for(var r=t+"=",n=document.cookie.split(";"),i=0;i<n.length;i++){var o=n[i];if(o=o.replace(/^\s+/,""),o.lastIndexOf(r,0)===0)return o.substring(r.length,o.length)}return null}static erase(t){e.set(t,"",-1)}};function cc(e,t,r,n){document.cookie=`${e}=${t}`+(r?`;expires=${r.toUTCString()}`:"")+(n?`;domain=${n}`:"")+";path=/;SameSite=Lax"}function Yf(){return ho()?localStorage:Ac()?new Ir:zf()?sessionStorage:new Kt}var Ir=class e{getItem(t){return Er.get(`${e.prefix}${t}`)}removeItem(t){Er.erase(`${e.prefix}${t}`)}setItem(t,r,n){Er.set(`${e.prefix}${t}`,r,n)}};Ir.prefix="coveo_";var yo=class{constructor(){this.cookieStorage=new Ir}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)}},Kt=class{getItem(t){return null}removeItem(t){}setItem(t,r){}},Rr="__coveo.analytics.history",bc=20,wc=1e3*60,Rc=75,Jt=class{constructor(t){this.store=t||Yf()}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 P(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 P(this,void 0,void 0,function*(){let t=yield this.getHistoryWithInternalTimeAsync();return this.stripEmptyQueries(this.stripInternalTime(t))})}getHistoryWithInternalTime(){try{let t=this.store.getItem(Rr);return t&&typeof t=="string"?JSON.parse(t):[]}catch{return[]}}getHistoryWithInternalTimeAsync(){return P(this,void 0,void 0,function*(){try{let t=yield this.store.getItem(Rr);return t?JSON.parse(t):[]}catch{return[]}})}setHistory(t){try{this.store.setItem(Rr,JSON.stringify(t.slice(0,bc)))}catch{}}clear(){try{this.store.removeItem(Rr)}catch{}}getMostRecentElement(){let t=this.getHistoryWithInternalTime();return Array.isArray(t)?t.sort((n,i)=>(i.internalTime||0)-(n.internalTime||0))[0]:null}cropQueryElement(t){return t.name&&t.value&&t.name.toLowerCase()==="query"&&(t.value=t.value.slice(0,Rc)),t}isValidEntry(t){let r=this.getMostRecentElement();return r&&r.value==t.value?(t.internalTime||0)-(r.internalTime||0)>wc:!0}stripInternalTime(t){return Array.isArray(t)?t.map(r=>{let{name:n,time:i,value:o}=r;return{name:n,time:i,value:o}}):[]}stripEmptyQuery(t){let{name:r,time:n,value:i}=t;return r&&typeof i=="string"&&r.toLowerCase()==="query"&&i.trim()===""?{name:r,time:n}:t}stripEmptyQueries(t){return t.map(r=>this.stripEmptyQuery(r))}},xc=Object.freeze({__proto__:null,HistoryStore:Jt,MAX_NUMBER_OF_HISTORY_ELEMENTS:bc,MAX_VALUE_SIZE:Rc,MIN_THRESHOLD_FOR_DUPLICATE_VALUE:wc,STORE_KEY:Rr,default:Jt}),Kf=(e,t)=>P(void 0,void 0,void 0,function*(){return e===Y.view?(yield Jf(t.contentIdValue),Object.assign({location:window.location.toString(),referrer:document.referrer,title:document.title},t)):t}),Jf=e=>P(void 0,void 0,void 0,function*(){let t=new Jt,r={name:"PageView",value:e,time:new Date().toISOString()};yield t.addElementAsync(r)}),wn,Xf=new Uint8Array(16);function Zf(){if(!wn&&(wn=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!wn))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return wn(Xf)}var eg=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function xn(e){return typeof e=="string"&&eg.test(e)}var ge=[];for(let e=0;e<256;++e)ge.push((e+256).toString(16).slice(1));function Ec(e,t=0){return(ge[e[t+0]]+ge[e[t+1]]+ge[e[t+2]]+ge[e[t+3]]+"-"+ge[e[t+4]]+ge[e[t+5]]+"-"+ge[e[t+6]]+ge[e[t+7]]+"-"+ge[e[t+8]]+ge[e[t+9]]+"-"+ge[e[t+10]]+ge[e[t+11]]+ge[e[t+12]]+ge[e[t+13]]+ge[e[t+14]]+ge[e[t+15]]).toLowerCase()}function tg(e){if(!xn(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 rg(e){e=unescape(encodeURIComponent(e));let t=[];for(let r=0;r<e.length;++r)t.push(e.charCodeAt(r));return t}var ng="6ba7b810-9dad-11d1-80b4-00c04fd430c8",ig="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function og(e,t,r){function n(i,o,s,c){var g;if(typeof i=="string"&&(i=rg(i)),typeof o=="string"&&(o=tg(o)),((g=o)===null||g===void 0?void 0:g.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let a=new Uint8Array(16+i.length);if(a.set(o),a.set(i,o.length),a=r(a),a[6]=a[6]&15|t,a[8]=a[8]&63|128,s){c=c||0;for(let m=0;m<16;++m)s[c+m]=a[m];return s}return Ec(a)}try{n.name=e}catch{}return n.DNS=ng,n.URL=ig,n}var sg=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),uc={randomUUID:sg};function Ft(e,t,r){if(uc.randomUUID&&!t&&!e)return uc.randomUUID();e=e||{};let n=e.random||(e.rng||Zf)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,t){r=r||0;for(let i=0;i<16;++i)t[r+i]=n[i];return t}return Ec(n)}function ag(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 fo(e,t){return e<<t|e>>>32-t}function cg(e){let t=[1518500249,1859775393,2400959708,3395469782],r=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof e=="string"){let s=unescape(encodeURIComponent(e));e=[];for(let c=0;c<s.length;++c)e.push(s.charCodeAt(c))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);let n=e.length/4+2,i=Math.ceil(n/16),o=new Array(i);for(let s=0;s<i;++s){let c=new Uint32Array(16);for(let g=0;g<16;++g)c[g]=e[s*64+g*4]<<24|e[s*64+g*4+1]<<16|e[s*64+g*4+2]<<8|e[s*64+g*4+3];o[s]=c}o[i-1][14]=(e.length-1)*8/Math.pow(2,32),o[i-1][14]=Math.floor(o[i-1][14]),o[i-1][15]=(e.length-1)*8&4294967295;for(let s=0;s<i;++s){let c=new Uint32Array(80);for(let f=0;f<16;++f)c[f]=o[s][f];for(let f=16;f<80;++f)c[f]=fo(c[f-3]^c[f-8]^c[f-14]^c[f-16],1);let g=r[0],a=r[1],m=r[2],y=r[3],h=r[4];for(let f=0;f<80;++f){let C=Math.floor(f/20),v=fo(g,5)+ag(C,a,m,y)+h+t[C]+c[f]>>>0;h=y,y=m,m=fo(a,30)>>>0,a=g,g=v}r[0]=r[0]+g>>>0,r[1]=r[1]+a>>>0,r[2]=r[2]+m>>>0,r[3]=r[3]+y>>>0,r[4]=r[4]+h>>>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 ug=og("v5",80,cg),lc=ug,Ic="2.30.42",dc=e=>`${e.protocol}//${e.hostname}${e.pathname.indexOf("/")===0?e.pathname:`/${e.pathname}`}${e.search}`,xr={pageview:"pageview",event:"event"},En=class{constructor({client:t,uuidGenerator:r=Ft}){this.client=t,this.uuidGenerator=r}},So=class extends En{constructor({client:t,uuidGenerator:r=Ft}){super({client:t,uuidGenerator:r}),this.actionData={},this.pageViewId=r(),this.nextPageViewId=this.pageViewId,this.currentLocation=dc(window.location),this.lastReferrer=Wt()?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:Wt()?document.title:"",encoding:Wt()?document.characterSet:"UTF-8"},n={screenResolution:`${screen.width}x${screen.height}`,screenColor:`${screen.colorDepth}-bit`},i={language:navigator.language,userAgent:navigator.userAgent},o={time:Date.now(),eventId:this.uuidGenerator()};return Object.assign(Object.assign(Object.assign(Object.assign({},o),n),i),r)}updateLocationForNextPageView(t,r){let{pageViewId:n,referrer:i,location:o}=this.getNextValues(t,r);this.lastReferrer=i,this.pageViewId=n,this.currentLocation=o,t===xr.pageview&&(this.nextPageViewId=this.uuidGenerator(),this.hasSentFirstPageView=!0)}getNextValues(t,r){return{pageViewId:t===xr.pageview?this.nextPageViewId:this.pageViewId,referrer:t===xr.pageview&&this.hasSentFirstPageView?this.currentLocation:this.lastReferrer,location:t===xr.pageview?this.getCurrentLocationFromPayload(r):this.currentLocation}}getCurrentLocationFromPayload(t){if(t.page){let r=i=>i.replace(/^\/?(.*)$/,"/$1");return`${(i=>i.split("/").slice(0,3).join("/"))(this.currentLocation)}${r(t.page)}`}else return dc(window.location)}},at=class e{constructor(t,r){if(!xn(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(i=>new RegExp(i.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,i]=r;if(n.length!==32||isNaN(parseInt(i)))return null;let o=n.substring(0,8)+"-"+n.substring(8,12)+"-"+n.substring(12,16)+"-"+n.substring(16,20)+"-"+n.substring(20,32);return xn(o)?new e(o,Number.parseInt(i)*1e3):null}};at.cvo_cid="cvo_cid";at.expirationTime=120;var vo=class extends En{constructor({client:t,uuidGenerator:r=Ft}){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 P(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(at.cvo_cid,new at(n,Date.now()).toString()),r.toString()}catch{throw new Error("Invalid URL provided")}})}acceptFrom(t){this.client.setAcceptedLinkReferrers(t)}};vo.Id="link";var Oe=Object.keys;function Rn(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}var go=128,kc=192,pc=224,fc=240;function lg(e){return(e&248)===fc?4:(e&fc)===pc?3:(e&pc)===kc?2:1}function dg(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&go)!=go)break;if(r-=3,(n&kc)!=go){t-r>=lg(n)*3&&(r=t);break}}return e.substring(0,r)}var Co={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"},pg=Oe(Co).map(e=>Co[e]),fg=[...pg].join("|"),gg=new RegExp(`^(${fg}$)`),mg={svcAction:"svc_action",svcActionData:"svc_action_data"},hg=e=>Oe(e).filter(t=>e[t]!==void 0).reduce((t,r)=>{let n=Co[r]||r;return Object.assign(Object.assign({},t),{[n]:e[r]})},{}),yg=e=>gg.test(e),Sg=[yg],gc={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",price:"pr",quantity:"qt",coupon:"cc",position:"ps",group:"group"},mc={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",position:"ps",price:"pr",group:"group"},me={action:"pa",list:"pal",listSource:"pls"},In={id:"ti",revenue:"tr",tax:"tt",shipping:"ts",coupon:"tcc",affiliation:"ta",step:"cos",option:"col"},vg=["loyaltyCardId","loyaltyTier","thirdPartyPersona","companyName","favoriteStore","storeName","userIndustry","userRole","userDepartment","businessUnit"],Ao={id:"quoteId",affiliation:"quoteAffiliation"},bo={id:"reviewId",rating:"reviewRating",comment:"reviewComment"},Cg={add:me,bookmark_add:me,bookmark_remove:me,click:me,checkout:me,checkout_option:me,detail:me,impression:me,remove:me,refund:Object.assign(Object.assign({},me),In),purchase:Object.assign(Object.assign({},me),In),quickview:me,quote:Object.assign(Object.assign({},me),Ao),review:Object.assign(Object.assign({},me),bo)},Ag=Oe(gc).map(e=>gc[e]),bg=Oe(mc).map(e=>mc[e]),wg=Oe(me).map(e=>me[e]),Rg=Oe(In).map(e=>In[e]),xg=Oe(bo).map(e=>bo[e]),Eg=Oe(Ao).map(e=>Ao[e]),Ig=[...Ag,"custom"].join("|"),kg=[...bg,"custom"].join("|"),Pc="(pr[0-9]+)",Oc="(il[0-9]+pi[0-9]+)",Pg=new RegExp(`^${Pc}(${Ig})$`),Og=new RegExp(`^(${Oc}(${kg}))|(il[0-9]+nm)$`),Fg=new RegExp(`^(${wg.join("|")})$`),Tg=new RegExp(`^(${Rg.join("|")})$`),Dg=new RegExp(`^${Pc}custom$`),Mg=new RegExp(`^${Oc}custom$`),qg=new RegExp(`^(${[...vg,...xg,...Eg].join("|")})$`),Ng=e=>Pg.test(e),_g=e=>Og.test(e),Lg=e=>Fg.test(e),jg=e=>Tg.test(e),Ug=e=>qg.test(e),Vg=[_g,Ng,Lg,jg,Ug],Bg=[Dg,Mg],Qg={anonymizeIp:"aip"},$g={eventCategory:"ec",eventAction:"ea",eventLabel:"el",eventValue:"ev",page:"dp",visitorId:"cid",clientId:"cid",userId:"uid",currencyCode:"cu"},Hg={hitType:"t",pageViewId:"pid",encoding:"de",location:"dl",referrer:"dr",screenColor:"sd",screenResolution:"sr",title:"dt",userAgent:"ua",language:"ul",eventId:"z",time:"tm"},zg=["contentId","contentIdKey","contentType","searchHub","tab","searchUid","permanentId","contentLocale","trackingId"],Gg=Object.assign(Object.assign(Object.assign(Object.assign({},Qg),$g),Hg),zg.reduce((e,t)=>Object.assign(Object.assign({},e),{[t]:t}),{})),wo=Object.assign(Object.assign({},Gg),mg),Wg=e=>{let t=!!e.action&&Cg[e.action]||{};return Oe(e).reduce((r,n)=>{let i=t[n]||wo[n]||n;return Object.assign(Object.assign({},r),{[i]:e[n]})},{})},Yg=Oe(wo).map(e=>wo[e]),Kg=e=>Yg.indexOf(e)!==-1,Jg=e=>e==="custom",Xg=e=>[...Vg,...Sg,Kg,Jg].some(t=>t(e)),Zg=e=>Oe(e).reduce((t,r)=>{let n=em(r);return n?Object.assign(Object.assign({},t),tm(n,e[r])):Object.assign(Object.assign({},t),{[r]:e[r]})},{}),em=e=>{let t;return[...Bg].every(r=>{var n;return t=(n=r.exec(e))===null||n===void 0?void 0:n[1],!t}),t},tm=(e,t)=>Oe(t).reduce((r,n)=>Object.assign(Object.assign({},r),{[`${e}${n}`]:t[n]}),{}),Ro=class{constructor(t){this.opts=t}sendEvent(t,r){return P(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:i}=this.opts,o=yield this.getQueryParamsForEventType(t),{url:s,payload:c}=yield this.preProcessRequestAsPotentialJSONString(`${n}/analytics/${t}?${o}`,r,i),g=this.encodeForEventType(t,c),a=new Blob([g],{type:"application/x-www-form-urlencoded"});navigator.sendBeacon(s,a)})}isAvailable(){return"sendBeacon"in navigator}deleteHttpCookieVisitorId(){return Promise.resolve()}preProcessRequestAsPotentialJSONString(t,r,n){return P(this,void 0,void 0,function*(){let i=t,o=r;if(n){let s=yield n({url:t,body:JSON.stringify(r)},"analyticsBeacon"),{url:c,body:g}=s;i=c||t;try{o=JSON.parse(g)}catch(a){console.error("Unable to process the request body as a JSON string",a)}}return{payload:o,url:i}})}encodeForEventType(t,r){return this.isEventTypeLegacy(t)?this.encodeEventToJson(t,r):this.encodeEventToJson(t,r,this.opts.token)}getQueryParamsForEventType(t){return P(this,void 0,void 0,function*(){let{token:r,visitorIdProvider:n}=this.opts,i=yield n.getCurrentVisitorId();return[r&&this.isEventTypeLegacy(t)?`access_token=${r}`:"",i?`visitorId=${i}`:"","discardVisitInfo=true"].filter(o=>!!o).join("&")})}isEventTypeLegacy(t){return[Y.click,Y.custom,Y.search,Y.view].indexOf(t)!==-1}encodeEventToJson(t,r,n){let i=`${t}Event=${encodeURIComponent(JSON.stringify(r))}`;return n&&(i=`access_token=${encodeURIComponent(n)}&${i}`),i}},xo=class{sendEvent(t,r){return P(this,void 0,void 0,function*(){return Promise.resolve()})}deleteHttpCookieVisitorId(){return P(this,void 0,void 0,function*(){return Promise.resolve()})}},hc=A.fetch,kn=class{constructor(t){this.opts=t}sendEvent(t,r){return P(this,void 0,void 0,function*(){let{baseUrl:n,visitorIdProvider:i,preprocessRequest:o}=this.opts,s=this.shouldAppendVisitorId(t)?yield this.getVisitorIdParam():"",c={url:`${n}/analytics/${t}${s}`,credentials:"include",mode:"cors",headers:this.getHeaders(),method:"POST",body:JSON.stringify(r)},g=Object.assign(Object.assign({},c),o?yield o(c,"analyticsFetch"):{}),{url:a}=g,m=Je(g,["url"]),y;try{y=yield hc(a,m)}catch(h){console.error("An error has occured when sending the event.",h);return}if(y.ok){let h=yield y.json();return h.visitorId&&i.setCurrentVisitorId(h.visitorId),h}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 P(this,void 0,void 0,function*(){let{baseUrl:t}=this.opts,r=`${t}/analytics/visit`;yield hc(r,{headers:this.getHeaders(),method:"DELETE"})})}shouldAppendVisitorId(t){return[Y.click,Y.custom,Y.search,Y.view].indexOf(t)!==-1}getVisitorIdParam(){return P(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"})}},Eo=class{constructor(t,r){ho()&&Ac()?this.storage=new yo:ho()?this.storage=localStorage:(console.warn("BrowserRuntime detected no valid storage available.",this),this.storage=new Kt),this.client=new kn(t),this.beaconClient=new Ro(t),window.addEventListener("beforeunload",()=>{let n=r();for(let{eventType:i,payload:o}of n)this.beaconClient.sendEvent(i,o)})}getClientDependingOnEventType(t){return t==="click"&&this.beaconClient.isAvailable()?this.beaconClient:this.client}},Io=class{constructor(t,r){this.storage=r||new Kt,this.client=new kn(t)}getClientDependingOnEventType(t){return this.client}},Pn=class{constructor(){this.storage=new Kt,this.client=new xo}getClientDependingOnEventType(t){return this.client}},rm="xx",nm=e=>e?.startsWith(rm)||!1,im=`
26
26
  We've detected you're using React Native but have not provided the corresponding runtime,
27
27
  for an optimal experience please use the "coveo.analytics/react-native" subpackage.
@@ -42,4 +42,6 @@ function asyncGeneratorStep(gen,resolve,reject,_next,_throw,key,arg){try{var inf
42
42
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
43
43
  * See the License for the specific language governing permissions and
44
44
  * limitations under the License.
45
- */;if(typeof module.exports=="object"&&typeof exports=="object"){var __cp=(to,from,except,desc)=>{if(from&&typeof from==="object"||typeof from==="function"){for(let key of Object.getOwnPropertyNames(from)){if(!Object.prototype.hasOwnProperty.call(to,key)&&key!==except)Object.defineProperty(to,key,{get:()=>from[key],enumerable:!(desc=Object.getOwnPropertyDescriptor(from,key))||desc.enumerable})}}return to};module.exports=__cp(module.exports,exports)}return module.exports});
45
+ */;if(typeof module.exports=="object"&&typeof exports=="object"){var __cp=(to,from,except,desc)=>{if(from&&typeof from==="object"||typeof from==="function"){for(let key of Object.getOwnPropertyNames(from)){if(!Object.prototype.hasOwnProperty.call(to,key)&&key!==except)Object.defineProperty(to,key,{get:()=>from[key],enumerable:!(desc=Object.getOwnPropertyDescriptor(from,key))||desc.enumerable})}}return to};module.exports=__cp(module.exports,exports)}return module.exports});
46
+
47
+ window.coveoQuanticVersion = '3.10.0-pre.d66d49ebbe';
@@ -12,4 +12,4 @@ export interface InstantProductsDefinition extends SearchAndListingControllerDef
12
12
  *
13
13
  * @internal
14
14
  */
15
- export declare function defineInstantProducts(props: InstantProductsProps): InstantProductsDefinition;
15
+ export declare function defineInstantProducts(props?: InstantProductsProps): InstantProductsDefinition;