@coveo/quantic 3.13.0 → 3.13.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/force-app/main/default/staticresources/coveoheadless/case-assist/headless.js +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/api/service/insight/get-interface/get-interface-config-response.d.ts +1 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/commerce/product-list/headless-product-list.ssr.d.ts +2 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/commerce/search-box/headless-search-box.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/commerce/search-box/headless-search-box.ssr.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-commerce.index.d.ts +4 -3
- package/force-app/main/default/staticresources/coveoheadless/headless.js +1 -1
- package/force-app/main/default/staticresources/coveoheadless/insight/headless.js +1 -1
- package/force-app/main/default/staticresources/coveoheadless/recommendation/headless.js +1 -1
- package/package.json +2 -2
|
@@ -23,7 +23,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
23
23
|
`)}
|
|
24
24
|
|
|
25
25
|
${t}
|
|
26
|
-
`;return new zo(r)}var zo=class extends Error{constructor(e){super(e),this.name="SchemaValidationError"}},Me=class{constructor(e){this.definition=e}validate(e={},t=""){let r={...this.default,...e},n=[];for(let o in this.definition){let i=this.definition[o].validate(r[o]);i&&n.push(`${o}: ${i}`)}if(n.length)throw xp(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}},Et=class{constructor(e={}){this.baseConfig=e}validate(e){return this.baseConfig.required&&K(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 Ut(e){return e===void 0}function Rp(e){return e===null}function K(e){return Ut(e)||Rp(e)}var Ce=class{constructor(e={}){oe(this,"value");this.config=e,this.value=new Et(e)}validate(e){let t=this.value.validate(e);return t||(Ep(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 Ep(e){return Ut(e)||ua(e)}function ua(e){return typeof e=="number"&&!isNaN(e)}var se=class{constructor(e={}){oe(this,"value");this.value=new Et(e)}validate(e){let t=this.value.validate(e);return t||(Ip(e)?null:"value is not a boolean.")}get default(){return this.value.default}get required(){return this.value.required}};function Ip(e){return Ut(e)||la(e)}function la(e){return typeof e=="boolean"}var kp=/^\d{4}(-\d\d(-\d\d(T\d\d:\d\d(:\d\d)?(\.\d+)?(([+-]\d\d:\d\d)|Z)?)?)?)?$/i,G=class{constructor(e={}){oe(this,"value");oe(this,"config");this.config={emptyAllowed:!0,url:!1,...e},this.value=new Et(this.config)}validate(e){let{emptyAllowed:t,url:r,regex:n,constrainTo:o,ISODate:i}=this.config,s=this.value.validate(e);if(s)return s;if(Ut(e))return null;if(!da(e))return"value is not a string.";if(!t&&!e.length)return"value is an empty string.";if(r)try{new URL(e)}catch{return"value is not a valid URL."}return n&&!n.test(e)?`value did not match provided regex ${n}`:o&&!o.includes(e)?`value should be one of: ${o.join(", ")}.`:i&&!(kp.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 da(e){return Object.prototype.toString.call(e)==="[object String]"}var ne=class{constructor(e={}){oe(this,"config");this.config={options:{required:!1},values:{},...e}}validate(e){if(Ut(e))return this.config.options.required?"value is required and is currently undefined":null;if(!pa(e))return"value is not an object";for(let[r,n]of Object.entries(this.config.values))if(n.required&&K(e[r]))return`value does not contain ${r}`;let t="";for(let[r,n]of Object.entries(this.config.values)){let o=e[r],i=n.validate(o);i!==null&&(t+=" "+i)}return t===""?null:t}get default(){}get required(){return!!this.config.options.required}};function pa(e){return e!==void 0&&typeof e=="object"}var Ke=class{constructor(e={}){oe(this,"value");this.config=e,this.value=new Et(this.config)}validate(e){if(!K(e)&&!Array.isArray(e))return"value is not an array";let t=this.value.validate(e);if(t!==null)return t;if(K(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&&K(n)&&(r=`value is null or undefined: ${e.join(",")}`);let o=this.validatePrimitiveValue(n,this.config.each);o!==null&&(r+=" "+o)}),r===""?null:r}return null}validatePrimitiveValue(e,t){return la(e)||da(e)||ua(e)||pa(e)?t.validate(e):"value is not a primitive value"}get default(){}get required(){return this.value.required}};function fa(e){return Array.isArray(e)}var Go=class{constructor(e){oe(this,"value");this.config=e,this.value=new Et(e)}validate(e){let t=this.value.validate(e);return t!==null?t:Ut(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}};m();d();f();p();var Zr=e=>e;m();d();f();p();m();d();f();p();var Pa=Te(Aa(),1);m();d();f();p();m();d();f();p();var ef="recommendation-internal-options",QC=Symbol.for(ef);var Oe=new Error("Failed to load reducers."),Vt=class extends Error{constructor(){super(),this.name="ExpiredToken",this.message="The token being used to perform the request is expired."}};var kt=class extends Error{constructor(r,n){super();oe(this,"statusCode");this.name="Disconnected",this.message=`Client could not connect to the following URL: ${r}`,this.statusCode=n??0}};m();d();f();p();function ba(e){return Array.isArray(e)}function wa(e,t){return[...e.reduce((r,n)=>{let o=t(n);return r.has(o)||r.set(o,n),r},new Map).values()]}var tf=new Set(["1",1,"yes",!0]);function xa(){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=>tf.has(r))}function Ra(e){let t={};for(let[r,n]of e)t[r]=n;return t}function Ar(e){if(typeof e!="object"||!e)return e;try{return JSON.parse(JSON.stringify(e))}catch{return e}}m();d();f();p();function Ea(e){let t=[];for(let r in e){let n=encodeURIComponent(r),o=encodeURIComponent(e[r]);t.push(`${n}=${o}`)}return t.join("&")}function Ia(e){return typeof e!="object"||!e?!1:Object.values(e).every(rf)}function rf(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"}function ka(e){return e===429}var it=class e{static call(t){return _asyncToGenerator(function*(){let r=nf(t),{logger:n}=t,o=yield e.preprocessRequest(r,t);n.info(o,"Platform request");let{url:i,...s}=o,u=/*#__PURE__*/function(){var _ref=_asyncToGenerator(function*(){let c=yield R(i,s);if(ka(c.status))throw c;return c});return function u(){return _ref.apply(this,arguments)}}();try{let c=yield(0,Pa.backOff)(u,{retry:a=>{let g=a&&ka(a.status);return g&&n.info("Platform retrying request"),g}});switch(c.status){case 419:case 401:throw n.info("Platform renewing token"),new Vt;case 404:throw new kt(i,c.status);default:return n.info({response:c,requestInfo:o},"Platform response"),c}}catch(c){return c.message==="Failed to fetch"?new kt(i):c}})()}static preprocessRequest(t,r){return _asyncToGenerator(function*(){let{origin:n,preprocessRequest:o,logger:i,requestMetadata:s}=r,{signal:u,...c}=t,a=Ar(c);try{let g=yield o(t,n,s);return{...t,...g}}catch(g){i.error(g,"Platform request preprocessing failed. Returning default request options.")}return a})()}};function ce(e,t="prod",r="platform"){let n=t==="prod"?"":t,o=r==="platform"?"":`.${r}`;return`https://${e}${o}.org${n}.coveo.com`}function Bt(e,t="prod"){return`${ce(e,t)}/rest/search/v2`}function tn(e,t="prod"){return`${ce(e,t,"analytics")}/rest/organizations/${e}/events/v1`}function nf(e){let{url:t,method:r,requestParams:n,contentType:o,accessToken:i,signal:s}=e,u=e.method==="POST"||e.method==="PUT",c=of(n,o);return{url:t,method:r,headers:{"Content-Type":o,Authorization:`Bearer ${i}`,...e.headers},...(u&&{body:c}),signal:s}}function of(e,t){return t==="application/x-www-form-urlencoded"?Ia(e)?Ea(e):"":JSON.stringify(e)}m();d();f();p();m();d();f();p();var Qt=class{constructor(t){oe(this,"_basePath");oe(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}};m();d();f();p();function ri(e){let{url:t,accessToken:r,organizationId:n,authentication:o,...i}=e;return i}var ni=e=>{let{response:t}=e;return t.body?sf(e):af(t)},sf=e=>uf(e)?lf(e):cf(e)?e.body:{message:"unknown",statusCode:0,type:"unknown"},af=e=>{let t=JSON.parse(JSON.stringify(e,Object.getOwnPropertyNames(e)));return{...t,message:`Client side error: ${t.message||""}`,statusCode:400,type:"ClientError"}};function cf(e){return e.body.statusCode!==void 0}function uf(e){return e.body.exception!==void 0}var lf=e=>({message:e.body.exception.code,statusCode:e.response.status,type:e.body.exception.code});m();d();f();p();function Ta(e){return((e.headers.get("content-type")||"").split(";").find(n=>n.indexOf("charset=")!==-1)||"").split("=")[1]||"UTF-8"}m();d();f();p();var oi=(e,t,r,n)=>{let o=new Qt(`${e.url}${n}`);return o.addParam("organizationId",e.organizationId),e.authentication&&o.addParam("authentication",e.authentication),{accessToken:e.accessToken,method:t,contentType:r,url:o.href,origin:"searchApiFetch"}};var Oa=(e,t)=>{let r=new Qt(`${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},ii=/*#__PURE__*/function(){var _ref2=_asyncToGenerator(function*(e,t){let r=yield it.call({...oi(e,"POST","application/x-www-form-urlencoded","/html"),requestParams:ri(e),requestMetadata:{method:"html"},...t});if(r instanceof Error)throw r;let n=Ta(r),o=yield r.arrayBuffer(),s=new TextDecoder(n).decode(o);return df(s)?{success:s}:{error:ni({response:r,body:s})}});return function ii(_x,_x2){return _ref2.apply(this,arguments)}}();function df(e){return typeof e=="string"}m();d();f();p();function pf(e){return{statusCode:e.statusCode,type:e.name,message:e.message}}function ff(e){return{statusCode:e.code,type:e.name,message:e.message,ignored:!0}}function rn(e,t){if(t&&e.name==="AbortError")return{error:ff(e)};if(e instanceof kt)return{error:pf(e)};throw e}m();d();f();p();m();d();f();p();var nn=(e,t,r,n,o={})=>{mf(e);let i=`${e.url}/rest/organizations/${e.organizationId}/caseassists/${e.caseAssistId}${n}`,s=gf(o),u=s?`${i}?${s}`:i;return{accessToken:e.accessToken,method:t,contentType:r,url:u,origin:"caseAssistApiFetch"}},on=e=>Object.keys(e).filter(t=>e[t].value!=="").reduce((t,r)=>({...t,[r]:e[r]}),{}),sn=e=>Object.keys(e).filter(t=>e[t].value!=="").reduce((t,r)=>({...t,[r]:e[r].value}),{}),mf=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.")},gf=e=>Object.keys(e).map(t=>`${t}=${encodeURIComponent(e[t])}`).join("&");var Fa=e=>{let t=e.debug?{debug:"1"}:{};return{...nn(e,"POST","application/json","/classify",t),requestParams:hf(e)}},hf=e=>({clientId:e.clientId,locale:e.locale,fields:on(e.fields)});m();d();f();p();var Da=e=>{let t={};return e.debug&&(t.debug="1"),e.numberOfResults&&(t.numberOfResults=e.numberOfResults.toString()),{...nn(e,"POST","application/json","/documents/suggest",t),requestParams:yf(e)}},yf=e=>({clientId:e.clientId,locale:e.locale,fields:on(e.fields),context:e.context});var an=class{constructor(t){this.options=t}getCaseClassifications(t){var _this=this;return _asyncToGenerator(function*(){let r=yield it.call({...Fa(t),..._this.options});if(r instanceof Error)return rn(r);let n=yield r.json();return r.ok?{success:n}:{error:n}})()}getDocumentSuggestions(t){var _this2=this;return _asyncToGenerator(function*(){let r=yield it.call({...Da(t),..._this2.options});if(r instanceof Error)return rn(r);let n=yield r.json();return r.ok?{success:n}:{error:n}})()}html(t){var _this3=this;return _asyncToGenerator(function*(){return ii(t,_this3.options)})()}};m();d();f();p();m();d();f();p();m();d();f();p();function me(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 Sf=typeof Symbol=="function"&&Symbol.observable||"@@observable",Ma=Sf,si=()=>Math.random().toString(36).substring(7).split("").join("."),vf={INIT:`@@redux/INIT${si()}`,REPLACE:`@@redux/REPLACE${si()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${si()}`},cn=vf;function Ue(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 ai(e,t,r){if(typeof e!="function")throw new Error(me(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(me(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(me(1));return r(ai)(e,t)}let n=e,o=t,i=new Map,s=i,u=0,c=!1;function a(){s===i&&(s=new Map,i.forEach((E,x)=>{s.set(x,E)}))}function g(){if(c)throw new Error(me(3));return o}function S(E){if(typeof E!="function")throw new Error(me(4));if(c)throw new Error(me(5));let x=!0;a();let A=u++;return s.set(A,E),function(){if(x){if(c)throw new Error(me(6));x=!1,a(),s.delete(A),i=null}}}function y(E){if(!Ue(E))throw new Error(me(7));if(typeof E.type>"u")throw new Error(me(8));if(typeof E.type!="string")throw new Error(me(17));if(c)throw new Error(me(9));try{c=!0,o=n(o,E)}finally{c=!1}return(i=s).forEach(A=>{A()}),E}function h(E){if(typeof E!="function")throw new Error(me(10));n=E,y({type:cn.REPLACE})}function v(){let E=S;return{subscribe(x){if(typeof x!="object"||x===null)throw new Error(me(11));function A(){let P=x;P.next&&P.next(g())}return A(),{unsubscribe:E(A)}},[Ma](){return this}}}return y({type:cn.INIT}),{dispatch:y,subscribe:S,getState:g,replaceReducer:h,[Ma]:v}}function Cf(e){Object.keys(e).forEach(t=>{let r=e[t];if(typeof r(void 0,{type:cn.INIT})>"u")throw new Error(me(12));if(typeof r(void 0,{type:cn.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(me(13))})}function $t(e){let t=Object.keys(e),r={};for(let s=0;s<t.length;s++){let u=t[s];typeof e[u]=="function"&&(r[u]=e[u])}let n=Object.keys(r),o,i;try{Cf(r)}catch(s){i=s}return function(u={},c){if(i)throw i;let a=!1,g={};for(let S=0;S<n.length;S++){let y=n[S],h=r[y],v=u[y],C=h(v,c);if(typeof C>"u"){let E=c&&c.type;throw new Error(me(14))}g[y]=C,a=a||C!==v}return a=a||n.length!==Object.keys(u).length,a?g:u}}function Ht(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function qa(...e){return t=>(r,n)=>{let o=t(r,n),i=()=>{throw new Error(me(15))},s={getState:o.getState,dispatch:(c,...a)=>i(c,...a)},u=e.map(c=>c(s));return i=Ht(...u)(o.dispatch),{...o,dispatch:i}}}function un(e){return Ue(e)&&"type"in e&&typeof e.type=="string"}m();d();f();p();var yi=Symbol.for("immer-nothing"),br=Symbol.for("immer-draftable"),Ae=Symbol.for("immer-state");function ge(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Tt=Object.getPrototypeOf;function Re(e){return!!e&&!!e[Ae]}function be(e){return e?Ua(e)||Array.isArray(e)||!!e[br]||!!e.constructor?.[br]||Ir(e)||kr(e):!1}var Af=Object.prototype.constructor.toString();function Ua(e){if(!e||typeof e!="object")return!1;let t=Tt(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)===Af}function Si(e){return Re(e)||ge(15,e),e[Ae].base_}function wr(e,t){Ot(e)===0?Reflect.ownKeys(e).forEach(r=>{t(r,e[r],e)}):e.forEach((r,n)=>t(n,r,e))}function Ot(e){let t=e[Ae];return t?t.type_:Array.isArray(e)?1:Ir(e)?2:kr(e)?3:0}function xr(e,t){return Ot(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function ci(e,t){return Ot(e)===2?e.get(t):e[t]}function Va(e,t,r){let n=Ot(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function bf(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Ir(e){return e instanceof Map}function kr(e){return e instanceof Set}function Pt(e){return e.copy_||e.base_}function di(e,t){if(Ir(e))return new Map(e);if(kr(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);let r=Ua(e);if(t===!0||t==="class_only"&&!r){let n=Object.getOwnPropertyDescriptors(e);delete n[Ae];let o=Reflect.ownKeys(n);for(let i=0;i<o.length;i++){let s=o[i],u=n[s];u.writable===!1&&(u.writable=!0,u.configurable=!0),(u.get||u.set)&&(n[s]={configurable:!0,writable:!0,enumerable:u.enumerable,value:e[s]})}return Object.create(Tt(e),n)}else{let n=Tt(e);if(n!==null&&r)return{...e};let o=Object.create(n);return Object.assign(o,e)}}function pn(e,t=!1){return fn(e)||Re(e)||!be(e)||(Ot(e)>1&&(e.set=e.add=e.clear=e.delete=wf),Object.freeze(e),t&&Object.entries(e).forEach(([r,n])=>pn(n,!0))),e}function wf(){ge(2)}function fn(e){return Object.isFrozen(e)}var pi={};function Ft(e){let t=pi[e];return t||ge(0,e),t}function xf(e,t){pi[e]||(pi[e]=t)}var Rr;function Ba(){return Rr}function Rf(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Na(e,t){t&&(Ft("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function fi(e){mi(e),e.drafts_.forEach(Ef),e.drafts_=null}function mi(e){e===Rr&&(Rr=e.parent_)}function _a(e){return Rr=Rf(Rr,e)}function Ef(e){let t=e[Ae];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function La(e,t){t.unfinalizedDrafts_=t.drafts_.length;let r=t.drafts_[0];return e!==void 0&&e!==r?(r[Ae].modified_&&(fi(t),ge(4)),be(e)&&(e=ln(t,e),t.parent_||dn(t,e)),t.patches_&&Ft("Patches").generateReplacementPatches_(r[Ae].base_,e,t.patches_,t.inversePatches_)):e=ln(t,r,[]),fi(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==yi?e:void 0}function ln(e,t,r){if(fn(t))return t;let n=t[Ae];if(!n)return wr(t,(o,i)=>ja(e,n,t,o,i,r)),t;if(n.scope_!==e)return t;if(!n.modified_)return dn(e,n.base_,!0),n.base_;if(!n.finalized_){n.finalized_=!0,n.scope_.unfinalizedDrafts_--;let o=n.copy_,i=o,s=!1;n.type_===3&&(i=new Set(o),o.clear(),s=!0),wr(i,(u,c)=>ja(e,n,o,u,c,r,s)),dn(e,o,!1),r&&e.patches_&&Ft("Patches").generatePatches_(n,r,e.patches_,e.inversePatches_)}return n.copy_}function ja(e,t,r,n,o,i,s){if(Re(o)){let u=i&&t&&t.type_!==3&&!xr(t.assigned_,n)?i.concat(n):void 0,c=ln(e,o,u);if(Va(r,n,c),Re(c))e.canAutoFreeze_=!1;else return}else s&&r.add(o);if(be(o)&&!fn(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;ln(e,o),(!t||!t.scope_.parent_)&&typeof n!="symbol"&&Object.prototype.propertyIsEnumerable.call(r,n)&&dn(e,o)}}function dn(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&pn(t,r)}function If(e,t){let r=Array.isArray(e),n={type_:r?1:0,scope_:t?t.scope_:Ba(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1},o=n,i=vi;r&&(o=[n],i=Er);let{revoke:s,proxy:u}=Proxy.revocable(o,i);return n.draft_=u,n.revoke_=s,u}var vi={get(e,t){if(t===Ae)return e;let r=Pt(e);if(!xr(r,t))return kf(e,r,t);let n=r[t];return e.finalized_||!be(n)?n:n===ui(e.base_,t)?(li(e),e.copy_[t]=hi(n,e)):n},has(e,t){return t in Pt(e)},ownKeys(e){return Reflect.ownKeys(Pt(e))},set(e,t,r){let n=Qa(Pt(e),t);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){let o=ui(Pt(e),t),i=o?.[Ae];if(i&&i.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(bf(r,o)&&(r!==void 0||xr(e.base_,t)))return!0;li(e),gi(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 ui(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,li(e),gi(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let r=Pt(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty(){ge(11)},getPrototypeOf(e){return Tt(e.base_)},setPrototypeOf(){ge(12)}},Er={};wr(vi,(e,t)=>{Er[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});Er.deleteProperty=function(e,t){return Er.set.call(this,e,t,void 0)};Er.set=function(e,t,r){return vi.set.call(this,e[0],t,r,e[0])};function ui(e,t){let r=e[Ae];return(r?Pt(r):e)[t]}function kf(e,t,r){let n=Qa(t,r);return n?"value"in n?n.value:n.get?.call(e.draft_):void 0}function Qa(e,t){if(!(t in e))return;let r=Tt(e);for(;r;){let n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Tt(r)}}function gi(e){e.modified_||(e.modified_=!0,e.parent_&&gi(e.parent_))}function li(e){e.copy_||(e.copy_=di(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Pf=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,r,n)=>{if(typeof t=="function"&&typeof r!="function"){let i=r;r=t;let s=this;return function(c=i,...a){return s.produce(c,g=>r.call(this,g,...a))}}typeof r!="function"&&ge(6),n!==void 0&&typeof n!="function"&&ge(7);let o;if(be(t)){let i=_a(this),s=hi(t,void 0),u=!0;try{o=r(s),u=!1}finally{u?fi(i):mi(i)}return Na(i,n),La(o,i)}else if(!t||typeof t!="object"){if(o=r(t),o===void 0&&(o=t),o===yi&&(o=void 0),this.autoFreeze_&&pn(o,!0),n){let i=[],s=[];Ft("Patches").generateReplacementPatches_(t,o,i,s),n(i,s)}return o}else ge(1,t)},this.produceWithPatches=(t,r)=>{if(typeof t=="function")return(s,...u)=>this.produceWithPatches(s,c=>t(c,...u));let n,o;return[this.produce(t,r,(s,u)=>{n=s,o=u}),n,o]},typeof e?.autoFreeze=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof e?.useStrictShallowCopy=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){be(e)||ge(8),Re(e)&&(e=$a(e));let t=_a(this),r=hi(e,void 0);return r[Ae].isManual_=!0,mi(t),r}finishDraft(e,t){let r=e&&e[Ae];(!r||!r.isManual_)&&ge(9);let{scope_:n}=r;return Na(n,t),La(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){let o=t[r];if(o.path.length===0&&o.op==="replace"){e=o.value;break}}r>-1&&(t=t.slice(r+1));let n=Ft("Patches").applyPatches_;return Re(e)?n(e,t):this.produce(e,o=>n(o,t))}};function hi(e,t){let r=Ir(e)?Ft("MapSet").proxyMap_(e,t):kr(e)?Ft("MapSet").proxySet_(e,t):If(e,t);return(t?t.scope_:Ba()).drafts_.push(r),r}function $a(e){return Re(e)||ge(10,e),Ha(e)}function Ha(e){if(!be(e)||fn(e))return e;let t=e[Ae],r;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=di(e,t.scope_.immer_.useStrictShallowCopy_)}else r=di(e,!0);return wr(r,(n,o)=>{Va(r,n,Ha(o))}),t&&(t.finalized_=!1),r}function za(){let t="replace",r="add",n="remove";function o(y,h,v,C){switch(y.type_){case 0:case 2:return s(y,h,v,C);case 1:return i(y,h,v,C);case 3:return u(y,h,v,C)}}function i(y,h,v,C){let{base_:E,assigned_:x}=y,A=y.copy_;A.length<E.length&&([E,A]=[A,E],[v,C]=[C,v]);for(let w=0;w<E.length;w++)if(x[w]&&A[w]!==E[w]){let P=h.concat([w]);v.push({op:t,path:P,value:S(A[w])}),C.push({op:t,path:P,value:S(E[w])})}for(let w=E.length;w<A.length;w++){let P=h.concat([w]);v.push({op:r,path:P,value:S(A[w])})}for(let w=A.length-1;E.length<=w;--w){let P=h.concat([w]);C.push({op:n,path:P})}}function s(y,h,v,C){let{base_:E,copy_:x}=y;wr(y.assigned_,(A,w)=>{let P=ci(E,A),N=ci(x,A),T=w?xr(E,A)?t:r:n;if(P===N&&T===t)return;let k=h.concat(A);v.push(T===n?{op:T,path:k}:{op:T,path:k,value:N}),C.push(T===r?{op:n,path:k}:T===n?{op:r,path:k,value:S(P)}:{op:t,path:k,value:S(P)})})}function u(y,h,v,C){let{base_:E,copy_:x}=y,A=0;E.forEach(w=>{if(!x.has(w)){let P=h.concat([A]);v.push({op:n,path:P,value:w}),C.unshift({op:r,path:P,value:w})}A++}),A=0,x.forEach(w=>{if(!E.has(w)){let P=h.concat([A]);v.push({op:r,path:P,value:w}),C.unshift({op:n,path:P,value:w})}A++})}function c(y,h,v,C){v.push({op:t,path:[],value:h===yi?void 0:h}),C.push({op:t,path:[],value:y})}function a(y,h){return h.forEach(v=>{let{path:C,op:E}=v,x=y;for(let N=0;N<C.length-1;N++){let T=Ot(x),k=C[N];typeof k!="string"&&typeof k!="number"&&(k=""+k),(T===0||T===1)&&(k==="__proto__"||k==="constructor")&&ge(19),typeof x=="function"&&k==="prototype"&&ge(19),x=ci(x,k),typeof x!="object"&&ge(18,C.join("/"))}let A=Ot(x),w=g(v.value),P=C[C.length-1];switch(E){case t:switch(A){case 2:return x.set(P,w);case 3:ge(16);default:return x[P]=w}case r:switch(A){case 1:return P==="-"?x.push(w):x.splice(P,0,w);case 2:return x.set(P,w);case 3:return x.add(w);default:return x[P]=w}case n:switch(A){case 1:return x.splice(P,1);case 2:return x.delete(P);case 3:return x.delete(v.value);default:return delete x[P]}default:ge(17,E)}}),y}function g(y){if(!be(y))return y;if(Array.isArray(y))return y.map(g);if(Ir(y))return new Map(Array.from(y.entries()).map(([v,C])=>[v,g(C)]));if(kr(y))return new Set(Array.from(y).map(g));let h=Object.create(Tt(y));for(let v in y)h[v]=g(y[v]);return xr(y,br)&&(h[br]=y[br]),h}function S(y){return Re(y)?g(y):y}xf("Patches",{applyPatches_:a,generatePatches_:o,generateReplacementPatches_:c})}var Ee=new Pf,Je=Ee.produce,mn=Ee.produceWithPatches.bind(Ee),$b=Ee.setAutoFreeze.bind(Ee),Hb=Ee.setUseStrictShallowCopy.bind(Ee),Ci=Ee.applyPatches.bind(Ee),zb=Ee.createDraft.bind(Ee),Gb=Ee.finishDraft.bind(Ee);m();d();f();p();function Tf(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function Of(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function Ff(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 Ga=e=>Array.isArray(e)?e:[e];function Df(e){let t=Array.isArray(e[0])?e[0]:e;return Ff(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function Mf(e,t){let r=[],{length:n}=e;for(let o=0;o<n;o++)r.push(e[o].apply(null,t));return r}var ew=Symbol();var tw=Object.getPrototypeOf({});var qf=class{constructor(e){this.value=e}deref(){return this.value}},Nf=typeof WeakRef<"u"?WeakRef:qf,_f=0,Wa=1;function gn(){return{s:_f,v:void 0,o:null,p:null}}function zt(e,t={}){let r=gn(),{resultEqualityCheck:n}=t,o,i=0;function s(){let u=r,{length:c}=arguments;for(let S=0,y=c;S<y;S++){let h=arguments[S];if(typeof h=="function"||typeof h=="object"&&h!==null){let v=u.o;v===null&&(u.o=v=new WeakMap);let C=v.get(h);C===void 0?(u=gn(),v.set(h,u)):u=C}else{let v=u.p;v===null&&(u.p=v=new Map);let C=v.get(h);C===void 0?(u=gn(),v.set(h,u)):u=C}}let a=u,g;if(u.s===Wa)g=u.v;else if(g=e.apply(null,arguments),i++,n){let S=o?.deref?.()??o;S!=null&&n(S,g)&&(g=S,i!==0&&i--),o=typeof g=="object"&&g!==null||typeof g=="function"?new Nf(g):g}return a.s=Wa,a.v=g,g}return s.clearCache=()=>{r=gn(),s.resetResultsCount()},s.resultsCount=()=>i,s.resetResultsCount=()=>{i=0},s}function Ka(e,...t){let r=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,n=(...o)=>{let i=0,s=0,u,c={},a=o.pop();typeof a=="object"&&(c=a,a=o.pop()),Tf(a,`createSelector expects an output function after the inputs, but received: [${typeof a}]`);let g={...r,...c},{memoize:S,memoizeOptions:y=[],argsMemoize:h=zt,argsMemoizeOptions:v=[],devModeChecks:C={}}=g,E=Ga(y),x=Ga(v),A=Df(o),w=S(function(){return i++,a.apply(null,arguments)},...E),P=!0,N=h(function(){s++;let k=Mf(A,arguments);return u=w.apply(null,k),u},...x);return Object.assign(N,{resultFunc:a,memoizedResultFunc:w,dependencies:A,dependencyRecomputations:()=>s,resetDependencyRecomputations:()=>{s=0},lastResult:()=>u,recomputations:()=>i,resetRecomputations:()=>{i=0},memoize:S,argsMemoize:h})};return Object.assign(n,{withTypes:()=>n}),n}var ue=Ka(zt),Lf=Object.assign((e,t=ue)=>{Of(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);let r=Object.keys(e),n=r.map(i=>e[i]);return t(n,(...i)=>i.reduce((s,u,c)=>(s[r[c]]=u,s),{}))},{withTypes:()=>Lf});m();d();f();p();function Ya(e){return({dispatch:r,getState:n})=>o=>i=>typeof i=="function"?i(r,n,e):o(i)}var Ja=Ya(),Xa=Ya;var jf=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Ht:Ht.apply(null,arguments)},vw=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}},Uf=e=>e&&typeof e.match=="function";function U(e,t){function r(...n){if(t){let o=t(...n);if(!o)throw new Error(qe(0));return{type:e,payload:o.payload,...("meta"in o&&{meta:o.meta}),...("error"in o&&{error:o.error})}}return{type:e,payload:n[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=n=>un(n)&&n.type===e,r}var nc=class Pr extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,Pr.prototype)}static get[Symbol.species](){return Pr}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new Pr(...t[0].concat(this)):new Pr(...t.concat(this))}};function Za(e){return be(e)?Je(e,()=>{}):e}function ec(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function Vf(e){return typeof e=="boolean"}var Bf=()=>function(t){let{thunk:r=!0,immutableCheck:n=!0,serializableCheck:o=!0,actionCreatorCheck:i=!0}=t??{},s=new nc;return r&&(Vf(r)?s.push(Ja):s.push(Xa(r.extraArgument))),s},st="RTK_autoBatch",Wt=()=>e=>({payload:e,meta:{[st]:!0}}),tc=e=>t=>{setTimeout(t,e)},Qf=(e={type:"raf"})=>t=>(...r)=>{let n=t(...r),o=!0,i=!1,s=!1,u=new Set,c=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:tc(10):e.type==="callback"?e.queueNotification:tc(e.timeout),a=()=>{s=!1,i&&(i=!1,u.forEach(g=>g()))};return Object.assign({},n,{subscribe(g){let S=()=>o&&g(),y=n.subscribe(S);return u.add(g),()=>{y(),u.delete(g)}},dispatch(g){try{return o=!g?.meta?.[st],i=!o,i&&(s||(s=!0,c(a))),n.dispatch(g)}finally{o=!0}}})},$f=e=>function(r){let{autoBatch:n=!0}=r??{},o=new nc(e);return n&&o.push(Qf(typeof n=="object"?n:void 0)),o};function oc(e){let t=Bf(),{reducer:r=void 0,middleware:n,devTools:o=!0,preloadedState:i=void 0,enhancers:s=void 0}=e||{},u;if(typeof r=="function")u=r;else if(Ue(r))u=$t(r);else throw new Error(qe(1));let c;typeof n=="function"?c=n(t):c=t();let a=Ht;o&&(a=jf({trace:!1,...(typeof o=="object"&&o)}));let g=qa(...c),S=$f(g),y=typeof s=="function"?s(S):S(),h=a(...y);return ai(u,i,h)}function ic(e){let t={},r=[],n,o={addCase(i,s){let u=typeof i=="string"?i:i.type;if(!u)throw new Error(qe(28));if(u in t)throw new Error(qe(29));return t[u]=s,o},addMatcher(i,s){return r.push({matcher:i,reducer:s}),o},addDefaultCase(i){return n=i,o}};return e(o),[t,r,n]}function Hf(e){return typeof e=="function"}function le(e,t){let[r,n,o]=ic(t),i;if(Hf(e))i=()=>Za(e());else{let u=Za(e);i=()=>u}function s(u=i(),c){let a=[r[c.type],...n.filter(({matcher:g})=>g(c)).map(({reducer:g})=>g)];return a.filter(g=>!!g).length===0&&(a=[o]),a.reduce((g,S)=>{if(S)if(Re(g)){let h=S(g,c);return h===void 0?g:h}else{if(be(g))return Je(g,y=>S(y,c));{let y=S(g,c);if(y===void 0){if(g===null)return g;throw Error("A case reducer on a non-draftable value must not return undefined")}return y}}return g},u)}return s.getInitialState=i,s}var sc=(e,t)=>Uf(e)?e.match(t):e(t);function Ve(...e){return t=>e.some(r=>sc(r,t))}function Gt(...e){return t=>e.every(r=>sc(r,t))}function yn(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 Tr(e){return typeof e[0]=="function"&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function Sn(...e){return e.length===0?t=>yn(t,["pending"]):Tr(e)?Ve(...e.map(t=>t.pending)):Sn()(e[0])}function Dt(...e){return e.length===0?t=>yn(t,["rejected"]):Tr(e)?Ve(...e.map(t=>t.rejected)):Dt()(e[0])}function Or(...e){let t=r=>r&&r.meta&&r.meta.rejectedWithValue;return e.length===0?Gt(Dt(...e),t):Tr(e)?Gt(Dt(...e),t):Or()(e[0])}function Xe(...e){return e.length===0?t=>yn(t,["fulfilled"]):Tr(e)?Ve(...e.map(t=>t.fulfilled)):Xe()(e[0])}function vn(...e){return e.length===0?t=>yn(t,["pending","fulfilled","rejected"]):Tr(e)?Ve(...e.flatMap(t=>[t.pending,t.rejected,t.fulfilled])):vn()(e[0])}var zf="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Cn=(e=21)=>{let t="",r=e;for(;r--;)t+=zf[Math.random()*64|0];return t},Gf=["name","message","stack","code"],Ai=class{constructor(e,t){oe(this,"_type");this.payload=e,this.meta=t}},rc=class{constructor(e,t){oe(this,"_type");this.payload=e,this.meta=t}},Wf=e=>{if(typeof e=="object"&&e!==null){let t={};for(let r of Gf)typeof e[r]=="string"&&(t[r]=e[r]);return t}return{message:String(e)}},Z=(()=>{function e(t,r,n){let o=U(t+"/fulfilled",(c,a,g,S)=>({payload:c,meta:{...(S||{}),arg:g,requestId:a,requestStatus:"fulfilled"}})),i=U(t+"/pending",(c,a,g)=>({payload:void 0,meta:{...(g||{}),arg:a,requestId:c,requestStatus:"pending"}})),s=U(t+"/rejected",(c,a,g,S,y)=>({payload:S,error:(n&&n.serializeError||Wf)(c||"Rejected"),meta:{...(y||{}),arg:g,requestId:a,rejectedWithValue:!!S,requestStatus:"rejected",aborted:c?.name==="AbortError",condition:c?.name==="ConditionError"}}));function u(c){return(a,g,S)=>{let y=n?.idGenerator?n.idGenerator(c):Cn(),h=new l.AbortController,v,C;function E(A){C=A,h.abort()}let x=_asyncToGenerator(function*(){let A;try{let P=n?.condition?.(c,{getState:g,extra:S});if(Yf(P)&&(P=yield P),P===!1||h.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let N=new Promise((T,k)=>{v=()=>{k({name:"AbortError",message:C||"Aborted"})},h.signal.addEventListener("abort",v)});a(i(y,c,n?.getPendingMeta?.({requestId:y,arg:c},{getState:g,extra:S}))),A=yield Promise.race([N,Promise.resolve(r(c,{dispatch:a,getState:g,extra:S,requestId:y,signal:h.signal,abort:E,rejectWithValue:(T,k)=>new Ai(T,k),fulfillWithValue:(T,k)=>new rc(T,k)})).then(T=>{if(T instanceof Ai)throw T;return T instanceof rc?o(T.payload,y,c,T.meta):o(T,y,c)})])}catch(P){A=P instanceof Ai?s(null,y,c,P.payload,P.meta):s(P,y,c)}finally{v&&h.signal.removeEventListener("abort",v)}return n&&!n.dispatchConditionRejection&&s.match(A)&&A.meta.condition||a(A),A})();return Object.assign(x,{abort:E,requestId:y,arg:c,unwrap(){return x.then(Kf)}})}}return Object.assign(u,{pending:i,rejected:s,fulfilled:o,settled:Ve(s,o),typePrefix:t})}return e.withTypes=()=>e,e})();function Kf(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function Yf(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var ac=Symbol.for("rtk-slice-createasyncthunk"),xw={[ac]:Z};function Jf(e,t){return`${e}/${t}`}function Xf({creators:e}={}){let t=e?.asyncThunk?.[ac];return function(n){let{name:o,reducerPath:i=o}=n;if(!o)throw new Error(qe(11));typeof process<"u";let s=(typeof n.reducers=="function"?n.reducers(em()):n.reducers)||{},u=Object.keys(s),c={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},a={addCase(A,w){let P=typeof A=="string"?A:A.type;if(!P)throw new Error(qe(12));if(P in c.sliceCaseReducersByType)throw new Error(qe(13));return c.sliceCaseReducersByType[P]=w,a},addMatcher(A,w){return c.sliceMatchers.push({matcher:A,reducer:w}),a},exposeAction(A,w){return c.actionCreators[A]=w,a},exposeCaseReducer(A,w){return c.sliceCaseReducersByName[A]=w,a}};u.forEach(A=>{let w=s[A],P={reducerName:A,type:Jf(o,A),createNotation:typeof n.reducers=="function"};rm(w)?om(P,w,a,t):tm(P,w,a)});function g(){let[A={},w=[],P=void 0]=typeof n.extraReducers=="function"?ic(n.extraReducers):[n.extraReducers],N={...A,...c.sliceCaseReducersByType};return le(n.initialState,T=>{for(let k in N)T.addCase(k,N[k]);for(let k of c.sliceMatchers)T.addMatcher(k.matcher,k.reducer);for(let k of w)T.addMatcher(k.matcher,k.reducer);P&&T.addDefaultCase(P)})}let S=A=>A,y=new Map,h;function v(A,w){return h||(h=g()),h(A,w)}function C(){return h||(h=g()),h.getInitialState()}function E(A,w=!1){function P(T){let k=T[A];return typeof k>"u"&&w&&(k=C()),k}function N(T=S){let k=ec(y,w,()=>new WeakMap);return ec(k,T,()=>{let M={};for(let[F,j]of Object.entries(n.selectors??{}))M[F]=Zf(j,T,C,w);return M})}return{reducerPath:A,getSelectors:N,get selectors(){return N(P)},selectSlice:P}}let x={name:o,reducer:v,actions:c.actionCreators,caseReducers:c.sliceCaseReducersByName,getInitialState:C,...E(i),injectInto(A,{reducerPath:w,...P}={}){let N=w??i;return A.inject({reducerPath:N,reducer:v},P),{...x,...E(N,!0)}}};return x}}function Zf(e,t,r,n){function o(i,...s){let u=t(i);return typeof u>"u"&&n&&(u=r()),e(u,...s)}return o.unwrapped=e,o}var Mt=Xf();function em(){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 tm({type:e,reducerName:t,createNotation:r},n,o){let i,s;if("reducer"in n){if(r&&!nm(n))throw new Error(qe(17));i=n.reducer,s=n.prepare}else i=n;o.addCase(e,i).exposeCaseReducer(t,i).exposeAction(t,s?U(e,s):U(e))}function rm(e){return e._reducerDefinitionType==="asyncThunk"}function nm(e){return e._reducerDefinitionType==="reducerWithPrepare"}function om({type:e,reducerName:t},r,n,o){if(!o)throw new Error(qe(18));let{payloadCreator:i,fulfilled:s,pending:u,rejected:c,settled:a,options:g}=r,S=o(e,i,g);n.exposeAction(t,S),s&&n.addCase(S.fulfilled,s),u&&n.addCase(S.pending,u),c&&n.addCase(S.rejected,c),a&&n.addMatcher(S.settled,a),n.exposeCaseReducer(t,{fulfilled:s||hn,pending:u||hn,rejected:c||hn,settled:a||hn})}function hn(){}var cc="listener",uc="completed",lc="cancelled",Rw=`task-${lc}`,Ew=`task-${uc}`,Iw=`${cc}-${lc}`,kw=`${cc}-${uc}`;var{assign:dc}=Object;var bi="listenerMiddleware";var im=dc(U(`${bi}/add`),{withTypes:()=>im}),Pw=U(`${bi}/removeAll`),sm=dc(U(`${bi}/remove`),{withTypes:()=>sm});var Tw=Symbol.for("rtk-state-proxy-original");function qe(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. `}m();d();f();p();var Y=new G({required:!0,emptyAllowed:!1}),ae=new G({required:!1,emptyAllowed:!1}),Ne=new G({required:!0,emptyAllowed:!0}),Qw=new G({required:!1,emptyAllowed:!0}),pc=new Ke({each:Y,required:!0}),fc=new G({required:!1,emptyAllowed:!1,regex:/^\d+\.\d+\.\d+$/}),am=({message:e,name:t,stack:r})=>({message:e,name:t,stack:r}),wi=(e,t)=>{if("required"in t)return{payload:new Me({value:t}).validate({value:e}).value};let o=new ne({options:{required:!0},values:t}).validate(e);if(o)throw new zo(o);return{payload:e}},H=(e,t)=>{try{return wi(e,t)}catch(r){return{payload:e,error:am(r)}}};var An=(e,t,r,n)=>{let o=`Check the options of ${n}`;return cm(e,t,r,o,"Controller initialization error")},cm=(e,t,r,n,o)=>{try{return t.validate(r,n)}catch(i){throw e.logger.error(i,o),i}};var bn=U("caseAssistConfiguration/set",e=>H(e,{caseAssistId:Y,locale:ae,proxyBaseUrl:new G({required:!1,url:!0})}));m();d();f();p();m();d();f();p();var mc=()=>({caseAssistId:"",locale:"en-US"});var at=le(mc(),e=>{e.addCase(bn,(t,r)=>{t.caseAssistId=r.payload.caseAssistId,t.locale=r.payload.locale,t.apiBaseUrl=r.payload.proxyBaseUrl})});m();d();f();p();m();d();f();p();m();d();f();p();var gc={q:new G,enableQuerySyntax:new se,aq:new G,cq:new G,firstResult:new Ce({min:0}),numberOfResults:new Ce({min:0}),sortCriteria:new G,f:new ne,fExcluded:new ne,cf:new ne,nf:new ne,mnf:new ne,df:new ne,debug:new se,sf:new ne,tab:new G,af:new ne};var wn=U("searchParameters/restore",e=>H(e,gc));m();d();f();p();var hc=U("debug/enable"),yc=U("debug/disable");m();d();f();p();var xn=()=>!1;var Sc=le(xn(),e=>{e.addCase(hc,()=>!0).addCase(yc,()=>!1).addCase(wn,(t,r)=>r.payload.debug??t)});m();d();f();p();var Rn=U("searchHub/set",e=>H(e,new G({required:!0,emptyAllowed:!0})));m();d();f();p();m();d();f();p();m();d();f();p();var Kt="3.13.3",vc=["@coveo/atomic","@coveo/quantic"];var xi=()=>ae,Cc=()=>Y,Yt=U("configuration/updateBasicConfiguration",e=>H(e,{accessToken:ae,environment:new G({required:!1,constrainTo:["prod","hipaa","stg","dev"]}),organizationId:ae})),En=U("configuration/updateSearchConfiguration",e=>H(e,{proxyBaseUrl:new G({required:!1,url:!0}),pipeline:new G({required:!1,emptyAllowed:!0}),searchHub:ae,timezone:ae,locale:ae,authenticationProviders:new Ke({required:!1,each:Y})})),um={enabled:new se({default:!0}),originContext:xi(),originLevel2:xi(),originLevel3:xi(),proxyBaseUrl:new G({required:!1,url:!0}),runtimeEnvironment:new Et,anonymous:new se({default:!1}),deviceId:ae,userDisplayName:ae,documentLocation:ae,trackingId:ae,analyticsMode:new G({constrainTo:["legacy","next"],required:!1,default:"next"}),source:new ne({options:{required:!1},values:vc.reduce((e,t)=>(e[t]=fc,e),{})})},In=U("configuration/updateAnalyticsConfiguration",e=>H(e,um)),kn=U("configuration/analytics/disable"),Pn=U("configuration/analytics/enable"),Ac=U("configuration/analytics/originlevel2",e=>H(e,{originLevel2:Cc()})),bc=U("configuration/analytics/originlevel3",e=>H(e,{originLevel3:Cc()}));m();d();f();p();var lm=U("history/undo"),dm=U("history/redo"),Be=U("history/snapshot"),bR=Z("history/back",/*#__PURE__*/function(){var _ref4=_asyncToGenerator(function*(e,{dispatch:t}){t(lm()),yield t(Tn())});return function(_x3,_x4){return _ref4.apply(this,arguments)}}()),wR=Z("history/forward",/*#__PURE__*/function(){var _ref5=_asyncToGenerator(function*(e,{dispatch:t}){t(dm()),yield t(Tn())});return function(_x5,_x6){return _ref5.apply(this,arguments)}}()),Tn=Z("history/change",/*#__PURE__*/function(){var _ref6=_asyncToGenerator(function*(e,{getState:t}){return t().history.present});return function(_x7,_x8){return _ref6.apply(this,arguments)}}());m();d();f();p();var ct=()=>"default";var wc=le(ct(),e=>{e.addCase(Rn,(t,r)=>r.payload).addCase(Tn.fulfilled,(t,r)=>r.payload?.searchHub??t).addCase(En,(t,r)=>r.payload.searchHub||t)});m();d();f();p();m();d();f();p();m();d();f();p();function pm({config:e,environment:t,event:r,listenerManager:n}){let{url:o,token:i,mode:s}=e;s!=="disabled"&&(n.call(r),t.send(o,i,r))}var fm=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i;function mm(e){return typeof e=="string"&&fm.test(e)}var he=[];for(On=0;On<256;++On)he.push((On+256).toString(16).slice(1));var On;function gm(e,t=0){return(he[e[t+0]]+he[e[t+1]]+he[e[t+2]]+he[e[t+3]]+"-"+he[e[t+4]]+he[e[t+5]]+"-"+he[e[t+6]]+he[e[t+7]]+"-"+he[e[t+8]]+he[e[t+9]]+"-"+he[e[t+10]]+he[e[t+11]]+he[e[t+12]]+he[e[t+13]]+he[e[t+14]]+he[e[t+15]]).toLowerCase()}var Fn,hm=new Uint8Array(16);function ym(){if(!Fn&&(Fn=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Fn))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Fn(hm)}var Sm=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),xc={randomUUID:Sm};function vm(e,t,r){if(xc.randomUUID&&!t&&!e)return xc.randomUUID();e=e||{};var n=e.random||(e.rng||ym)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,t){r=r||0;for(var o=0;o<16;++o)t[r+o]=n[o];return t}return gm(n)}function Cm(e){return{getClientId:()=>{let t="visitorId",r=e.get(),n=r.storage,o=n.getItem(t),i=o&&mm(o)?o:r.generateUUID();return n.setItem(t,i),i}}}var Ec="0.8.1";function Am(e){let{trackingId:t}=e;return{trackingId:t}}function bm(e){return(e.source||[]).concat([`relay@${Ec}`])}function Ic(e,t,r,n){let{getReferrer:o,getLocation:i,getUserAgent:s}=r,u=Am(t),c=n.getClientId();return Object.freeze({type:e,config:u,ts:Date.now(),source:bm(t),clientId:c,userAgent:s(),referrer:o(),location:i()})}function wm(e,t,r,n,o){return{...t,meta:Ic(e,r,n,o)}}var xm="*";function Rm(){let e=[];function t({type:c,callback:a}){return e.findIndex(g=>g.type===c&&g.callback===a)}function r(c,a){return c.type==="*"||a===c.type}function n(c){return t(c)<0&&e.push(c),()=>u(c.type,c.callback)}function o(c){e.forEach(a=>{if(r(a,c.meta.type))try{a.callback(c)}catch(g){console.error(g)}})}function i(c){if(c===xm)e.length=0;else for(let a=e.length-1;a>=0;a--)e[a].type===c&&e.splice(a,1)}function s(c){let a=t(c);a>=0&&e.splice(a,1)}function u(c,a){a?s({type:c,callback:a}):i(c)}return{add:n,call:o,remove:u}}function Rc({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 Em(e){let t=Rc(e);return{get:()=>t,update:r=>{t=Rc({...t,...r})}}}function Im(){let e=typeof window<"u";return{sendMessage(t){e&&window.postMessage(t,"*")}}}var Ri=km();function km(){let e="coveo_",t=r=>{let n=r.split(".").slice(-2);return n.length==2?n.join("."):""};return{getItem(r){let n=`${e}${r}=`,o=document.cookie.split(";");for(let i of o){let s=i.replace(/^\s+/,"");if(s.lastIndexOf(n,0)===0)return s.substring(n.length,s.length)}return null},setItem(r,n,o){let i=t(window.location.hostname),s=`;expires=${new Date(new Date().getTime()+o).toUTCString()}`,u=i?`;domain=${i}`:"";document.cookie=`${e}${r}=${n}${s}${u};path=/;SameSite=Lax`},removeItem(r){this.setItem(r,"",-1)}}}function Pm(){return{getItem(e){return Ri.getItem(e)||localStorage.getItem(e)},removeItem(e){Ri.removeItem(e),localStorage.removeItem(e)},setItem(e,t){localStorage.setItem(e,t),Ri.setItem(e,t,31556952e3)}}}function Tm(){let e=document.referrer;return e===""?null:e}function Om(){return{runtime:"browser",send:(e,t,r)=>{let n=navigator.sendBeacon(`${e}?access_token=${t}`,new Blob([JSON.stringify([r])],{type:"application/json"}));if(Im().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:()=>Tm(),getLocation:()=>window.location.href,getUserAgent:()=>navigator.userAgent,generateUUID:()=>vm(),storage:Pm()}}function Fm(){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 Dm(){return{getItem(){return null},removeItem(){},setItem(){}}}function Mm(){return{runtime:"null",send:()=>{},getReferrer:()=>null,getLocation:()=>null,getUserAgent:()=>null,generateUUID:()=>"",storage:Dm()}}function qm(e){return e.get().mode!=="disabled"&&Nm()&&Fm()?Om():Mm()}function Nm(){try{return typeof window=="object"}catch{return!1}}function _m(e){return{get:()=>Object.freeze(qm(e))}}function kc(e){let t=Em(e),r=Rm(),n=_m(t),o=Cm(n);return{emit:(i,s)=>{let u=t.get(),c=n.get(),a=wm(i,s,u,c,o);return pm({config:u,environment:c,event:a,listenerManager:r})},getMeta:i=>Ic(i,t.get(),n.get(),o),on:(i,s)=>r.add({type:i,callback:s}),off:(i,s)=>r.remove(i,s),updateConfig:i=>t.update(i),version:Ec}}m();d();f();p();var Jt=ue(e=>e.source,e=>Object.entries(e).map(([t,r])=>`${t}@${r}`).concat(`@coveo/headless@${Kt}`));var Xt=ue(e=>e.configuration.organizationId,e=>e.configuration.environment,e=>e.configuration.accessToken,e=>e.configuration.analytics,e=>Jt(e.configuration.analytics),(e,t,r,{trackingId:n,apiBaseUrl:o,enabled:i},s)=>kc({mode:i?"emit":"disabled",url:o??tn(e,t),token:r,trackingId:n,source:s}));m();d();f();p();m();d();f();p();m();d();f();p();m();d();f();p();function Tc(_x9,_x10){return _Tc.apply(this,arguments)}function _Tc(){_Tc=_asyncToGenerator(function*(e,t){let r=e.getReader(),n;for(;!(n=yield r.read()).done;)t(n.value)});return _Tc.apply(this,arguments)}function Oc(e){let t,r,n,o=!1;return function(s){t===void 0?(t=s,r=0,n=-1):t=Lm(t,s);let u=t.length,c=0;for(;r<u;){o&&(t[r]===10&&(c=++r),o=!1);let a=-1;for(;r<u&&a===-1;++r)switch(t[r]){case 58:n===-1&&(n=r-c);break;case 13:o=!0;case 10:a=r;break}if(a===-1)break;e(t.subarray(c,a),n),c=r,n=-1}c===u?t=void 0:c!==0&&(t=t.subarray(c),r-=c)}}function Fc(e,t,r){let n=Pc(),o=new TextDecoder;return function(s,u){if(s.length===0)r?.(n),n=Pc();else if(u>0){let c=o.decode(s.subarray(0,u)),a=u+(s[u+1]===32?2:1),g=o.decode(s.subarray(a));switch(c){case"data":n.data=n.data?n.data+`
|
|
26
|
+
`;return new zo(r)}var zo=class extends Error{constructor(e){super(e),this.name="SchemaValidationError"}},Me=class{constructor(e){this.definition=e}validate(e={},t=""){let r={...this.default,...e},n=[];for(let o in this.definition){let i=this.definition[o].validate(r[o]);i&&n.push(`${o}: ${i}`)}if(n.length)throw xp(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}},Et=class{constructor(e={}){this.baseConfig=e}validate(e){return this.baseConfig.required&&K(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 Ut(e){return e===void 0}function Rp(e){return e===null}function K(e){return Ut(e)||Rp(e)}var Ce=class{constructor(e={}){oe(this,"value");this.config=e,this.value=new Et(e)}validate(e){let t=this.value.validate(e);return t||(Ep(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 Ep(e){return Ut(e)||ua(e)}function ua(e){return typeof e=="number"&&!isNaN(e)}var se=class{constructor(e={}){oe(this,"value");this.value=new Et(e)}validate(e){let t=this.value.validate(e);return t||(Ip(e)?null:"value is not a boolean.")}get default(){return this.value.default}get required(){return this.value.required}};function Ip(e){return Ut(e)||la(e)}function la(e){return typeof e=="boolean"}var kp=/^\d{4}(-\d\d(-\d\d(T\d\d:\d\d(:\d\d)?(\.\d+)?(([+-]\d\d:\d\d)|Z)?)?)?)?$/i,G=class{constructor(e={}){oe(this,"value");oe(this,"config");this.config={emptyAllowed:!0,url:!1,...e},this.value=new Et(this.config)}validate(e){let{emptyAllowed:t,url:r,regex:n,constrainTo:o,ISODate:i}=this.config,s=this.value.validate(e);if(s)return s;if(Ut(e))return null;if(!da(e))return"value is not a string.";if(!t&&!e.length)return"value is an empty string.";if(r)try{new URL(e)}catch{return"value is not a valid URL."}return n&&!n.test(e)?`value did not match provided regex ${n}`:o&&!o.includes(e)?`value should be one of: ${o.join(", ")}.`:i&&!(kp.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 da(e){return Object.prototype.toString.call(e)==="[object String]"}var ne=class{constructor(e={}){oe(this,"config");this.config={options:{required:!1},values:{},...e}}validate(e){if(Ut(e))return this.config.options.required?"value is required and is currently undefined":null;if(!pa(e))return"value is not an object";for(let[r,n]of Object.entries(this.config.values))if(n.required&&K(e[r]))return`value does not contain ${r}`;let t="";for(let[r,n]of Object.entries(this.config.values)){let o=e[r],i=n.validate(o);i!==null&&(t+=" "+i)}return t===""?null:t}get default(){}get required(){return!!this.config.options.required}};function pa(e){return e!==void 0&&typeof e=="object"}var Ke=class{constructor(e={}){oe(this,"value");this.config=e,this.value=new Et(this.config)}validate(e){if(!K(e)&&!Array.isArray(e))return"value is not an array";let t=this.value.validate(e);if(t!==null)return t;if(K(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&&K(n)&&(r=`value is null or undefined: ${e.join(",")}`);let o=this.validatePrimitiveValue(n,this.config.each);o!==null&&(r+=" "+o)}),r===""?null:r}return null}validatePrimitiveValue(e,t){return la(e)||da(e)||ua(e)||pa(e)?t.validate(e):"value is not a primitive value"}get default(){}get required(){return this.value.required}};function fa(e){return Array.isArray(e)}var Go=class{constructor(e){oe(this,"value");this.config=e,this.value=new Et(e)}validate(e){let t=this.value.validate(e);return t!==null?t:Ut(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}};m();d();f();p();var Zr=e=>e;m();d();f();p();m();d();f();p();var Pa=Te(Aa(),1);m();d();f();p();m();d();f();p();var ef="recommendation-internal-options",QC=Symbol.for(ef);var Oe=new Error("Failed to load reducers."),Vt=class extends Error{constructor(){super(),this.name="ExpiredToken",this.message="The token being used to perform the request is expired."}};var kt=class extends Error{constructor(r,n){super();oe(this,"statusCode");this.name="Disconnected",this.message=`Client could not connect to the following URL: ${r}`,this.statusCode=n??0}};m();d();f();p();function ba(e){return Array.isArray(e)}function wa(e,t){return[...e.reduce((r,n)=>{let o=t(n);return r.has(o)||r.set(o,n),r},new Map).values()]}var tf=new Set(["1",1,"yes",!0]);function xa(){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=>tf.has(r))}function Ra(e){let t={};for(let[r,n]of e)t[r]=n;return t}function Ar(e){if(typeof e!="object"||!e)return e;try{return JSON.parse(JSON.stringify(e))}catch{return e}}m();d();f();p();function Ea(e){let t=[];for(let r in e){let n=encodeURIComponent(r),o=encodeURIComponent(e[r]);t.push(`${n}=${o}`)}return t.join("&")}function Ia(e){return typeof e!="object"||!e?!1:Object.values(e).every(rf)}function rf(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"}function ka(e){return e===429}var it=class e{static call(t){return _asyncToGenerator(function*(){let r=nf(t),{logger:n}=t,o=yield e.preprocessRequest(r,t);n.info(o,"Platform request");let{url:i,...s}=o,u=/*#__PURE__*/function(){var _ref=_asyncToGenerator(function*(){let c=yield R(i,s);if(ka(c.status))throw c;return c});return function u(){return _ref.apply(this,arguments)}}();try{let c=yield(0,Pa.backOff)(u,{retry:a=>{let g=a&&ka(a.status);return g&&n.info("Platform retrying request"),g}});switch(c.status){case 419:case 401:throw n.info("Platform renewing token"),new Vt;case 404:throw new kt(i,c.status);default:return n.info({response:c,requestInfo:o},"Platform response"),c}}catch(c){return c.message==="Failed to fetch"?new kt(i):c}})()}static preprocessRequest(t,r){return _asyncToGenerator(function*(){let{origin:n,preprocessRequest:o,logger:i,requestMetadata:s}=r,{signal:u,...c}=t,a=Ar(c);try{let g=yield o(t,n,s);return{...t,...g}}catch(g){i.error(g,"Platform request preprocessing failed. Returning default request options.")}return a})()}};function ce(e,t="prod",r="platform"){let n=t==="prod"?"":t,o=r==="platform"?"":`.${r}`;return`https://${e}${o}.org${n}.coveo.com`}function Bt(e,t="prod"){return`${ce(e,t)}/rest/search/v2`}function tn(e,t="prod"){return`${ce(e,t,"analytics")}/rest/organizations/${e}/events/v1`}function nf(e){let{url:t,method:r,requestParams:n,contentType:o,accessToken:i,signal:s}=e,u=e.method==="POST"||e.method==="PUT",c=of(n,o);return{url:t,method:r,headers:{"Content-Type":o,Authorization:`Bearer ${i}`,...e.headers},...(u&&{body:c}),signal:s}}function of(e,t){return t==="application/x-www-form-urlencoded"?Ia(e)?Ea(e):"":JSON.stringify(e)}m();d();f();p();m();d();f();p();var Qt=class{constructor(t){oe(this,"_basePath");oe(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}};m();d();f();p();function ri(e){let{url:t,accessToken:r,organizationId:n,authentication:o,...i}=e;return i}var ni=e=>{let{response:t}=e;return t.body?sf(e):af(t)},sf=e=>uf(e)?lf(e):cf(e)?e.body:{message:"unknown",statusCode:0,type:"unknown"},af=e=>{let t=JSON.parse(JSON.stringify(e,Object.getOwnPropertyNames(e)));return{...t,message:`Client side error: ${t.message||""}`,statusCode:400,type:"ClientError"}};function cf(e){return e.body.statusCode!==void 0}function uf(e){return e.body.exception!==void 0}var lf=e=>({message:e.body.exception.code,statusCode:e.response.status,type:e.body.exception.code});m();d();f();p();function Ta(e){return((e.headers.get("content-type")||"").split(";").find(n=>n.indexOf("charset=")!==-1)||"").split("=")[1]||"UTF-8"}m();d();f();p();var oi=(e,t,r,n)=>{let o=new Qt(`${e.url}${n}`);return o.addParam("organizationId",e.organizationId),e.authentication&&o.addParam("authentication",e.authentication),{accessToken:e.accessToken,method:t,contentType:r,url:o.href,origin:"searchApiFetch"}};var Oa=(e,t)=>{let r=new Qt(`${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},ii=/*#__PURE__*/function(){var _ref2=_asyncToGenerator(function*(e,t){let r=yield it.call({...oi(e,"POST","application/x-www-form-urlencoded","/html"),requestParams:ri(e),requestMetadata:{method:"html"},...t});if(r instanceof Error)throw r;let n=Ta(r),o=yield r.arrayBuffer(),s=new TextDecoder(n).decode(o);return df(s)?{success:s}:{error:ni({response:r,body:s})}});return function ii(_x,_x2){return _ref2.apply(this,arguments)}}();function df(e){return typeof e=="string"}m();d();f();p();function pf(e){return{statusCode:e.statusCode,type:e.name,message:e.message}}function ff(e){return{statusCode:e.code,type:e.name,message:e.message,ignored:!0}}function rn(e,t){if(t&&e.name==="AbortError")return{error:ff(e)};if(e instanceof kt)return{error:pf(e)};throw e}m();d();f();p();m();d();f();p();var nn=(e,t,r,n,o={})=>{mf(e);let i=`${e.url}/rest/organizations/${e.organizationId}/caseassists/${e.caseAssistId}${n}`,s=gf(o),u=s?`${i}?${s}`:i;return{accessToken:e.accessToken,method:t,contentType:r,url:u,origin:"caseAssistApiFetch"}},on=e=>Object.keys(e).filter(t=>e[t].value!=="").reduce((t,r)=>({...t,[r]:e[r]}),{}),sn=e=>Object.keys(e).filter(t=>e[t].value!=="").reduce((t,r)=>({...t,[r]:e[r].value}),{}),mf=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.")},gf=e=>Object.keys(e).map(t=>`${t}=${encodeURIComponent(e[t])}`).join("&");var Fa=e=>{let t=e.debug?{debug:"1"}:{};return{...nn(e,"POST","application/json","/classify",t),requestParams:hf(e)}},hf=e=>({clientId:e.clientId,locale:e.locale,fields:on(e.fields)});m();d();f();p();var Da=e=>{let t={};return e.debug&&(t.debug="1"),e.numberOfResults&&(t.numberOfResults=e.numberOfResults.toString()),{...nn(e,"POST","application/json","/documents/suggest",t),requestParams:yf(e)}},yf=e=>({clientId:e.clientId,locale:e.locale,fields:on(e.fields),context:e.context});var an=class{constructor(t){this.options=t}getCaseClassifications(t){var _this=this;return _asyncToGenerator(function*(){let r=yield it.call({...Fa(t),..._this.options});if(r instanceof Error)return rn(r);let n=yield r.json();return r.ok?{success:n}:{error:n}})()}getDocumentSuggestions(t){var _this2=this;return _asyncToGenerator(function*(){let r=yield it.call({...Da(t),..._this2.options});if(r instanceof Error)return rn(r);let n=yield r.json();return r.ok?{success:n}:{error:n}})()}html(t){var _this3=this;return _asyncToGenerator(function*(){return ii(t,_this3.options)})()}};m();d();f();p();m();d();f();p();m();d();f();p();function me(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 Sf=typeof Symbol=="function"&&Symbol.observable||"@@observable",Ma=Sf,si=()=>Math.random().toString(36).substring(7).split("").join("."),vf={INIT:`@@redux/INIT${si()}`,REPLACE:`@@redux/REPLACE${si()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${si()}`},cn=vf;function Ue(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 ai(e,t,r){if(typeof e!="function")throw new Error(me(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(me(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(me(1));return r(ai)(e,t)}let n=e,o=t,i=new Map,s=i,u=0,c=!1;function a(){s===i&&(s=new Map,i.forEach((E,x)=>{s.set(x,E)}))}function g(){if(c)throw new Error(me(3));return o}function S(E){if(typeof E!="function")throw new Error(me(4));if(c)throw new Error(me(5));let x=!0;a();let A=u++;return s.set(A,E),function(){if(x){if(c)throw new Error(me(6));x=!1,a(),s.delete(A),i=null}}}function y(E){if(!Ue(E))throw new Error(me(7));if(typeof E.type>"u")throw new Error(me(8));if(typeof E.type!="string")throw new Error(me(17));if(c)throw new Error(me(9));try{c=!0,o=n(o,E)}finally{c=!1}return(i=s).forEach(A=>{A()}),E}function h(E){if(typeof E!="function")throw new Error(me(10));n=E,y({type:cn.REPLACE})}function v(){let E=S;return{subscribe(x){if(typeof x!="object"||x===null)throw new Error(me(11));function A(){let P=x;P.next&&P.next(g())}return A(),{unsubscribe:E(A)}},[Ma](){return this}}}return y({type:cn.INIT}),{dispatch:y,subscribe:S,getState:g,replaceReducer:h,[Ma]:v}}function Cf(e){Object.keys(e).forEach(t=>{let r=e[t];if(typeof r(void 0,{type:cn.INIT})>"u")throw new Error(me(12));if(typeof r(void 0,{type:cn.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(me(13))})}function $t(e){let t=Object.keys(e),r={};for(let s=0;s<t.length;s++){let u=t[s];typeof e[u]=="function"&&(r[u]=e[u])}let n=Object.keys(r),o,i;try{Cf(r)}catch(s){i=s}return function(u={},c){if(i)throw i;let a=!1,g={};for(let S=0;S<n.length;S++){let y=n[S],h=r[y],v=u[y],C=h(v,c);if(typeof C>"u"){let E=c&&c.type;throw new Error(me(14))}g[y]=C,a=a||C!==v}return a=a||n.length!==Object.keys(u).length,a?g:u}}function Ht(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function qa(...e){return t=>(r,n)=>{let o=t(r,n),i=()=>{throw new Error(me(15))},s={getState:o.getState,dispatch:(c,...a)=>i(c,...a)},u=e.map(c=>c(s));return i=Ht(...u)(o.dispatch),{...o,dispatch:i}}}function un(e){return Ue(e)&&"type"in e&&typeof e.type=="string"}m();d();f();p();var yi=Symbol.for("immer-nothing"),br=Symbol.for("immer-draftable"),Ae=Symbol.for("immer-state");function ge(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Tt=Object.getPrototypeOf;function Re(e){return!!e&&!!e[Ae]}function be(e){return e?Ua(e)||Array.isArray(e)||!!e[br]||!!e.constructor?.[br]||Ir(e)||kr(e):!1}var Af=Object.prototype.constructor.toString();function Ua(e){if(!e||typeof e!="object")return!1;let t=Tt(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)===Af}function Si(e){return Re(e)||ge(15,e),e[Ae].base_}function wr(e,t){Ot(e)===0?Reflect.ownKeys(e).forEach(r=>{t(r,e[r],e)}):e.forEach((r,n)=>t(n,r,e))}function Ot(e){let t=e[Ae];return t?t.type_:Array.isArray(e)?1:Ir(e)?2:kr(e)?3:0}function xr(e,t){return Ot(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function ci(e,t){return Ot(e)===2?e.get(t):e[t]}function Va(e,t,r){let n=Ot(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function bf(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Ir(e){return e instanceof Map}function kr(e){return e instanceof Set}function Pt(e){return e.copy_||e.base_}function di(e,t){if(Ir(e))return new Map(e);if(kr(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);let r=Ua(e);if(t===!0||t==="class_only"&&!r){let n=Object.getOwnPropertyDescriptors(e);delete n[Ae];let o=Reflect.ownKeys(n);for(let i=0;i<o.length;i++){let s=o[i],u=n[s];u.writable===!1&&(u.writable=!0,u.configurable=!0),(u.get||u.set)&&(n[s]={configurable:!0,writable:!0,enumerable:u.enumerable,value:e[s]})}return Object.create(Tt(e),n)}else{let n=Tt(e);if(n!==null&&r)return{...e};let o=Object.create(n);return Object.assign(o,e)}}function pn(e,t=!1){return fn(e)||Re(e)||!be(e)||(Ot(e)>1&&(e.set=e.add=e.clear=e.delete=wf),Object.freeze(e),t&&Object.entries(e).forEach(([r,n])=>pn(n,!0))),e}function wf(){ge(2)}function fn(e){return Object.isFrozen(e)}var pi={};function Ft(e){let t=pi[e];return t||ge(0,e),t}function xf(e,t){pi[e]||(pi[e]=t)}var Rr;function Ba(){return Rr}function Rf(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Na(e,t){t&&(Ft("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function fi(e){mi(e),e.drafts_.forEach(Ef),e.drafts_=null}function mi(e){e===Rr&&(Rr=e.parent_)}function _a(e){return Rr=Rf(Rr,e)}function Ef(e){let t=e[Ae];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function La(e,t){t.unfinalizedDrafts_=t.drafts_.length;let r=t.drafts_[0];return e!==void 0&&e!==r?(r[Ae].modified_&&(fi(t),ge(4)),be(e)&&(e=ln(t,e),t.parent_||dn(t,e)),t.patches_&&Ft("Patches").generateReplacementPatches_(r[Ae].base_,e,t.patches_,t.inversePatches_)):e=ln(t,r,[]),fi(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==yi?e:void 0}function ln(e,t,r){if(fn(t))return t;let n=t[Ae];if(!n)return wr(t,(o,i)=>ja(e,n,t,o,i,r)),t;if(n.scope_!==e)return t;if(!n.modified_)return dn(e,n.base_,!0),n.base_;if(!n.finalized_){n.finalized_=!0,n.scope_.unfinalizedDrafts_--;let o=n.copy_,i=o,s=!1;n.type_===3&&(i=new Set(o),o.clear(),s=!0),wr(i,(u,c)=>ja(e,n,o,u,c,r,s)),dn(e,o,!1),r&&e.patches_&&Ft("Patches").generatePatches_(n,r,e.patches_,e.inversePatches_)}return n.copy_}function ja(e,t,r,n,o,i,s){if(Re(o)){let u=i&&t&&t.type_!==3&&!xr(t.assigned_,n)?i.concat(n):void 0,c=ln(e,o,u);if(Va(r,n,c),Re(c))e.canAutoFreeze_=!1;else return}else s&&r.add(o);if(be(o)&&!fn(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;ln(e,o),(!t||!t.scope_.parent_)&&typeof n!="symbol"&&Object.prototype.propertyIsEnumerable.call(r,n)&&dn(e,o)}}function dn(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&pn(t,r)}function If(e,t){let r=Array.isArray(e),n={type_:r?1:0,scope_:t?t.scope_:Ba(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1},o=n,i=vi;r&&(o=[n],i=Er);let{revoke:s,proxy:u}=Proxy.revocable(o,i);return n.draft_=u,n.revoke_=s,u}var vi={get(e,t){if(t===Ae)return e;let r=Pt(e);if(!xr(r,t))return kf(e,r,t);let n=r[t];return e.finalized_||!be(n)?n:n===ui(e.base_,t)?(li(e),e.copy_[t]=hi(n,e)):n},has(e,t){return t in Pt(e)},ownKeys(e){return Reflect.ownKeys(Pt(e))},set(e,t,r){let n=Qa(Pt(e),t);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){let o=ui(Pt(e),t),i=o?.[Ae];if(i&&i.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(bf(r,o)&&(r!==void 0||xr(e.base_,t)))return!0;li(e),gi(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 ui(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,li(e),gi(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let r=Pt(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty(){ge(11)},getPrototypeOf(e){return Tt(e.base_)},setPrototypeOf(){ge(12)}},Er={};wr(vi,(e,t)=>{Er[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});Er.deleteProperty=function(e,t){return Er.set.call(this,e,t,void 0)};Er.set=function(e,t,r){return vi.set.call(this,e[0],t,r,e[0])};function ui(e,t){let r=e[Ae];return(r?Pt(r):e)[t]}function kf(e,t,r){let n=Qa(t,r);return n?"value"in n?n.value:n.get?.call(e.draft_):void 0}function Qa(e,t){if(!(t in e))return;let r=Tt(e);for(;r;){let n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Tt(r)}}function gi(e){e.modified_||(e.modified_=!0,e.parent_&&gi(e.parent_))}function li(e){e.copy_||(e.copy_=di(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Pf=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,r,n)=>{if(typeof t=="function"&&typeof r!="function"){let i=r;r=t;let s=this;return function(c=i,...a){return s.produce(c,g=>r.call(this,g,...a))}}typeof r!="function"&&ge(6),n!==void 0&&typeof n!="function"&&ge(7);let o;if(be(t)){let i=_a(this),s=hi(t,void 0),u=!0;try{o=r(s),u=!1}finally{u?fi(i):mi(i)}return Na(i,n),La(o,i)}else if(!t||typeof t!="object"){if(o=r(t),o===void 0&&(o=t),o===yi&&(o=void 0),this.autoFreeze_&&pn(o,!0),n){let i=[],s=[];Ft("Patches").generateReplacementPatches_(t,o,i,s),n(i,s)}return o}else ge(1,t)},this.produceWithPatches=(t,r)=>{if(typeof t=="function")return(s,...u)=>this.produceWithPatches(s,c=>t(c,...u));let n,o;return[this.produce(t,r,(s,u)=>{n=s,o=u}),n,o]},typeof e?.autoFreeze=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof e?.useStrictShallowCopy=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){be(e)||ge(8),Re(e)&&(e=$a(e));let t=_a(this),r=hi(e,void 0);return r[Ae].isManual_=!0,mi(t),r}finishDraft(e,t){let r=e&&e[Ae];(!r||!r.isManual_)&&ge(9);let{scope_:n}=r;return Na(n,t),La(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){let o=t[r];if(o.path.length===0&&o.op==="replace"){e=o.value;break}}r>-1&&(t=t.slice(r+1));let n=Ft("Patches").applyPatches_;return Re(e)?n(e,t):this.produce(e,o=>n(o,t))}};function hi(e,t){let r=Ir(e)?Ft("MapSet").proxyMap_(e,t):kr(e)?Ft("MapSet").proxySet_(e,t):If(e,t);return(t?t.scope_:Ba()).drafts_.push(r),r}function $a(e){return Re(e)||ge(10,e),Ha(e)}function Ha(e){if(!be(e)||fn(e))return e;let t=e[Ae],r;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=di(e,t.scope_.immer_.useStrictShallowCopy_)}else r=di(e,!0);return wr(r,(n,o)=>{Va(r,n,Ha(o))}),t&&(t.finalized_=!1),r}function za(){let t="replace",r="add",n="remove";function o(y,h,v,C){switch(y.type_){case 0:case 2:return s(y,h,v,C);case 1:return i(y,h,v,C);case 3:return u(y,h,v,C)}}function i(y,h,v,C){let{base_:E,assigned_:x}=y,A=y.copy_;A.length<E.length&&([E,A]=[A,E],[v,C]=[C,v]);for(let w=0;w<E.length;w++)if(x[w]&&A[w]!==E[w]){let P=h.concat([w]);v.push({op:t,path:P,value:S(A[w])}),C.push({op:t,path:P,value:S(E[w])})}for(let w=E.length;w<A.length;w++){let P=h.concat([w]);v.push({op:r,path:P,value:S(A[w])})}for(let w=A.length-1;E.length<=w;--w){let P=h.concat([w]);C.push({op:n,path:P})}}function s(y,h,v,C){let{base_:E,copy_:x}=y;wr(y.assigned_,(A,w)=>{let P=ci(E,A),N=ci(x,A),T=w?xr(E,A)?t:r:n;if(P===N&&T===t)return;let k=h.concat(A);v.push(T===n?{op:T,path:k}:{op:T,path:k,value:N}),C.push(T===r?{op:n,path:k}:T===n?{op:r,path:k,value:S(P)}:{op:t,path:k,value:S(P)})})}function u(y,h,v,C){let{base_:E,copy_:x}=y,A=0;E.forEach(w=>{if(!x.has(w)){let P=h.concat([A]);v.push({op:n,path:P,value:w}),C.unshift({op:r,path:P,value:w})}A++}),A=0,x.forEach(w=>{if(!E.has(w)){let P=h.concat([A]);v.push({op:r,path:P,value:w}),C.unshift({op:n,path:P,value:w})}A++})}function c(y,h,v,C){v.push({op:t,path:[],value:h===yi?void 0:h}),C.push({op:t,path:[],value:y})}function a(y,h){return h.forEach(v=>{let{path:C,op:E}=v,x=y;for(let N=0;N<C.length-1;N++){let T=Ot(x),k=C[N];typeof k!="string"&&typeof k!="number"&&(k=""+k),(T===0||T===1)&&(k==="__proto__"||k==="constructor")&&ge(19),typeof x=="function"&&k==="prototype"&&ge(19),x=ci(x,k),typeof x!="object"&&ge(18,C.join("/"))}let A=Ot(x),w=g(v.value),P=C[C.length-1];switch(E){case t:switch(A){case 2:return x.set(P,w);case 3:ge(16);default:return x[P]=w}case r:switch(A){case 1:return P==="-"?x.push(w):x.splice(P,0,w);case 2:return x.set(P,w);case 3:return x.add(w);default:return x[P]=w}case n:switch(A){case 1:return x.splice(P,1);case 2:return x.delete(P);case 3:return x.delete(v.value);default:return delete x[P]}default:ge(17,E)}}),y}function g(y){if(!be(y))return y;if(Array.isArray(y))return y.map(g);if(Ir(y))return new Map(Array.from(y.entries()).map(([v,C])=>[v,g(C)]));if(kr(y))return new Set(Array.from(y).map(g));let h=Object.create(Tt(y));for(let v in y)h[v]=g(y[v]);return xr(y,br)&&(h[br]=y[br]),h}function S(y){return Re(y)?g(y):y}xf("Patches",{applyPatches_:a,generatePatches_:o,generateReplacementPatches_:c})}var Ee=new Pf,Je=Ee.produce,mn=Ee.produceWithPatches.bind(Ee),$b=Ee.setAutoFreeze.bind(Ee),Hb=Ee.setUseStrictShallowCopy.bind(Ee),Ci=Ee.applyPatches.bind(Ee),zb=Ee.createDraft.bind(Ee),Gb=Ee.finishDraft.bind(Ee);m();d();f();p();function Tf(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function Of(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function Ff(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 Ga=e=>Array.isArray(e)?e:[e];function Df(e){let t=Array.isArray(e[0])?e[0]:e;return Ff(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function Mf(e,t){let r=[],{length:n}=e;for(let o=0;o<n;o++)r.push(e[o].apply(null,t));return r}var ew=Symbol();var tw=Object.getPrototypeOf({});var qf=class{constructor(e){this.value=e}deref(){return this.value}},Nf=typeof WeakRef<"u"?WeakRef:qf,_f=0,Wa=1;function gn(){return{s:_f,v:void 0,o:null,p:null}}function zt(e,t={}){let r=gn(),{resultEqualityCheck:n}=t,o,i=0;function s(){let u=r,{length:c}=arguments;for(let S=0,y=c;S<y;S++){let h=arguments[S];if(typeof h=="function"||typeof h=="object"&&h!==null){let v=u.o;v===null&&(u.o=v=new WeakMap);let C=v.get(h);C===void 0?(u=gn(),v.set(h,u)):u=C}else{let v=u.p;v===null&&(u.p=v=new Map);let C=v.get(h);C===void 0?(u=gn(),v.set(h,u)):u=C}}let a=u,g;if(u.s===Wa)g=u.v;else if(g=e.apply(null,arguments),i++,n){let S=o?.deref?.()??o;S!=null&&n(S,g)&&(g=S,i!==0&&i--),o=typeof g=="object"&&g!==null||typeof g=="function"?new Nf(g):g}return a.s=Wa,a.v=g,g}return s.clearCache=()=>{r=gn(),s.resetResultsCount()},s.resultsCount=()=>i,s.resetResultsCount=()=>{i=0},s}function Ka(e,...t){let r=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,n=(...o)=>{let i=0,s=0,u,c={},a=o.pop();typeof a=="object"&&(c=a,a=o.pop()),Tf(a,`createSelector expects an output function after the inputs, but received: [${typeof a}]`);let g={...r,...c},{memoize:S,memoizeOptions:y=[],argsMemoize:h=zt,argsMemoizeOptions:v=[],devModeChecks:C={}}=g,E=Ga(y),x=Ga(v),A=Df(o),w=S(function(){return i++,a.apply(null,arguments)},...E),P=!0,N=h(function(){s++;let k=Mf(A,arguments);return u=w.apply(null,k),u},...x);return Object.assign(N,{resultFunc:a,memoizedResultFunc:w,dependencies:A,dependencyRecomputations:()=>s,resetDependencyRecomputations:()=>{s=0},lastResult:()=>u,recomputations:()=>i,resetRecomputations:()=>{i=0},memoize:S,argsMemoize:h})};return Object.assign(n,{withTypes:()=>n}),n}var ue=Ka(zt),Lf=Object.assign((e,t=ue)=>{Of(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);let r=Object.keys(e),n=r.map(i=>e[i]);return t(n,(...i)=>i.reduce((s,u,c)=>(s[r[c]]=u,s),{}))},{withTypes:()=>Lf});m();d();f();p();function Ya(e){return({dispatch:r,getState:n})=>o=>i=>typeof i=="function"?i(r,n,e):o(i)}var Ja=Ya(),Xa=Ya;var jf=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Ht:Ht.apply(null,arguments)},vw=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}},Uf=e=>e&&typeof e.match=="function";function U(e,t){function r(...n){if(t){let o=t(...n);if(!o)throw new Error(qe(0));return{type:e,payload:o.payload,...("meta"in o&&{meta:o.meta}),...("error"in o&&{error:o.error})}}return{type:e,payload:n[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=n=>un(n)&&n.type===e,r}var nc=class Pr extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,Pr.prototype)}static get[Symbol.species](){return Pr}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new Pr(...t[0].concat(this)):new Pr(...t.concat(this))}};function Za(e){return be(e)?Je(e,()=>{}):e}function ec(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function Vf(e){return typeof e=="boolean"}var Bf=()=>function(t){let{thunk:r=!0,immutableCheck:n=!0,serializableCheck:o=!0,actionCreatorCheck:i=!0}=t??{},s=new nc;return r&&(Vf(r)?s.push(Ja):s.push(Xa(r.extraArgument))),s},st="RTK_autoBatch",Wt=()=>e=>({payload:e,meta:{[st]:!0}}),tc=e=>t=>{setTimeout(t,e)},Qf=(e={type:"raf"})=>t=>(...r)=>{let n=t(...r),o=!0,i=!1,s=!1,u=new Set,c=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:tc(10):e.type==="callback"?e.queueNotification:tc(e.timeout),a=()=>{s=!1,i&&(i=!1,u.forEach(g=>g()))};return Object.assign({},n,{subscribe(g){let S=()=>o&&g(),y=n.subscribe(S);return u.add(g),()=>{y(),u.delete(g)}},dispatch(g){try{return o=!g?.meta?.[st],i=!o,i&&(s||(s=!0,c(a))),n.dispatch(g)}finally{o=!0}}})},$f=e=>function(r){let{autoBatch:n=!0}=r??{},o=new nc(e);return n&&o.push(Qf(typeof n=="object"?n:void 0)),o};function oc(e){let t=Bf(),{reducer:r=void 0,middleware:n,devTools:o=!0,preloadedState:i=void 0,enhancers:s=void 0}=e||{},u;if(typeof r=="function")u=r;else if(Ue(r))u=$t(r);else throw new Error(qe(1));let c;typeof n=="function"?c=n(t):c=t();let a=Ht;o&&(a=jf({trace:!1,...(typeof o=="object"&&o)}));let g=qa(...c),S=$f(g),y=typeof s=="function"?s(S):S(),h=a(...y);return ai(u,i,h)}function ic(e){let t={},r=[],n,o={addCase(i,s){let u=typeof i=="string"?i:i.type;if(!u)throw new Error(qe(28));if(u in t)throw new Error(qe(29));return t[u]=s,o},addMatcher(i,s){return r.push({matcher:i,reducer:s}),o},addDefaultCase(i){return n=i,o}};return e(o),[t,r,n]}function Hf(e){return typeof e=="function"}function le(e,t){let[r,n,o]=ic(t),i;if(Hf(e))i=()=>Za(e());else{let u=Za(e);i=()=>u}function s(u=i(),c){let a=[r[c.type],...n.filter(({matcher:g})=>g(c)).map(({reducer:g})=>g)];return a.filter(g=>!!g).length===0&&(a=[o]),a.reduce((g,S)=>{if(S)if(Re(g)){let h=S(g,c);return h===void 0?g:h}else{if(be(g))return Je(g,y=>S(y,c));{let y=S(g,c);if(y===void 0){if(g===null)return g;throw Error("A case reducer on a non-draftable value must not return undefined")}return y}}return g},u)}return s.getInitialState=i,s}var sc=(e,t)=>Uf(e)?e.match(t):e(t);function Ve(...e){return t=>e.some(r=>sc(r,t))}function Gt(...e){return t=>e.every(r=>sc(r,t))}function yn(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 Tr(e){return typeof e[0]=="function"&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function Sn(...e){return e.length===0?t=>yn(t,["pending"]):Tr(e)?Ve(...e.map(t=>t.pending)):Sn()(e[0])}function Dt(...e){return e.length===0?t=>yn(t,["rejected"]):Tr(e)?Ve(...e.map(t=>t.rejected)):Dt()(e[0])}function Or(...e){let t=r=>r&&r.meta&&r.meta.rejectedWithValue;return e.length===0?Gt(Dt(...e),t):Tr(e)?Gt(Dt(...e),t):Or()(e[0])}function Xe(...e){return e.length===0?t=>yn(t,["fulfilled"]):Tr(e)?Ve(...e.map(t=>t.fulfilled)):Xe()(e[0])}function vn(...e){return e.length===0?t=>yn(t,["pending","fulfilled","rejected"]):Tr(e)?Ve(...e.flatMap(t=>[t.pending,t.rejected,t.fulfilled])):vn()(e[0])}var zf="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Cn=(e=21)=>{let t="",r=e;for(;r--;)t+=zf[Math.random()*64|0];return t},Gf=["name","message","stack","code"],Ai=class{constructor(e,t){oe(this,"_type");this.payload=e,this.meta=t}},rc=class{constructor(e,t){oe(this,"_type");this.payload=e,this.meta=t}},Wf=e=>{if(typeof e=="object"&&e!==null){let t={};for(let r of Gf)typeof e[r]=="string"&&(t[r]=e[r]);return t}return{message:String(e)}},Z=(()=>{function e(t,r,n){let o=U(t+"/fulfilled",(c,a,g,S)=>({payload:c,meta:{...(S||{}),arg:g,requestId:a,requestStatus:"fulfilled"}})),i=U(t+"/pending",(c,a,g)=>({payload:void 0,meta:{...(g||{}),arg:a,requestId:c,requestStatus:"pending"}})),s=U(t+"/rejected",(c,a,g,S,y)=>({payload:S,error:(n&&n.serializeError||Wf)(c||"Rejected"),meta:{...(y||{}),arg:g,requestId:a,rejectedWithValue:!!S,requestStatus:"rejected",aborted:c?.name==="AbortError",condition:c?.name==="ConditionError"}}));function u(c){return(a,g,S)=>{let y=n?.idGenerator?n.idGenerator(c):Cn(),h=new l.AbortController,v,C;function E(A){C=A,h.abort()}let x=_asyncToGenerator(function*(){let A;try{let P=n?.condition?.(c,{getState:g,extra:S});if(Yf(P)&&(P=yield P),P===!1||h.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let N=new Promise((T,k)=>{v=()=>{k({name:"AbortError",message:C||"Aborted"})},h.signal.addEventListener("abort",v)});a(i(y,c,n?.getPendingMeta?.({requestId:y,arg:c},{getState:g,extra:S}))),A=yield Promise.race([N,Promise.resolve(r(c,{dispatch:a,getState:g,extra:S,requestId:y,signal:h.signal,abort:E,rejectWithValue:(T,k)=>new Ai(T,k),fulfillWithValue:(T,k)=>new rc(T,k)})).then(T=>{if(T instanceof Ai)throw T;return T instanceof rc?o(T.payload,y,c,T.meta):o(T,y,c)})])}catch(P){A=P instanceof Ai?s(null,y,c,P.payload,P.meta):s(P,y,c)}finally{v&&h.signal.removeEventListener("abort",v)}return n&&!n.dispatchConditionRejection&&s.match(A)&&A.meta.condition||a(A),A})();return Object.assign(x,{abort:E,requestId:y,arg:c,unwrap(){return x.then(Kf)}})}}return Object.assign(u,{pending:i,rejected:s,fulfilled:o,settled:Ve(s,o),typePrefix:t})}return e.withTypes=()=>e,e})();function Kf(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function Yf(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var ac=Symbol.for("rtk-slice-createasyncthunk"),xw={[ac]:Z};function Jf(e,t){return`${e}/${t}`}function Xf({creators:e}={}){let t=e?.asyncThunk?.[ac];return function(n){let{name:o,reducerPath:i=o}=n;if(!o)throw new Error(qe(11));typeof process<"u";let s=(typeof n.reducers=="function"?n.reducers(em()):n.reducers)||{},u=Object.keys(s),c={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},a={addCase(A,w){let P=typeof A=="string"?A:A.type;if(!P)throw new Error(qe(12));if(P in c.sliceCaseReducersByType)throw new Error(qe(13));return c.sliceCaseReducersByType[P]=w,a},addMatcher(A,w){return c.sliceMatchers.push({matcher:A,reducer:w}),a},exposeAction(A,w){return c.actionCreators[A]=w,a},exposeCaseReducer(A,w){return c.sliceCaseReducersByName[A]=w,a}};u.forEach(A=>{let w=s[A],P={reducerName:A,type:Jf(o,A),createNotation:typeof n.reducers=="function"};rm(w)?om(P,w,a,t):tm(P,w,a)});function g(){let[A={},w=[],P=void 0]=typeof n.extraReducers=="function"?ic(n.extraReducers):[n.extraReducers],N={...A,...c.sliceCaseReducersByType};return le(n.initialState,T=>{for(let k in N)T.addCase(k,N[k]);for(let k of c.sliceMatchers)T.addMatcher(k.matcher,k.reducer);for(let k of w)T.addMatcher(k.matcher,k.reducer);P&&T.addDefaultCase(P)})}let S=A=>A,y=new Map,h;function v(A,w){return h||(h=g()),h(A,w)}function C(){return h||(h=g()),h.getInitialState()}function E(A,w=!1){function P(T){let k=T[A];return typeof k>"u"&&w&&(k=C()),k}function N(T=S){let k=ec(y,w,()=>new WeakMap);return ec(k,T,()=>{let M={};for(let[F,j]of Object.entries(n.selectors??{}))M[F]=Zf(j,T,C,w);return M})}return{reducerPath:A,getSelectors:N,get selectors(){return N(P)},selectSlice:P}}let x={name:o,reducer:v,actions:c.actionCreators,caseReducers:c.sliceCaseReducersByName,getInitialState:C,...E(i),injectInto(A,{reducerPath:w,...P}={}){let N=w??i;return A.inject({reducerPath:N,reducer:v},P),{...x,...E(N,!0)}}};return x}}function Zf(e,t,r,n){function o(i,...s){let u=t(i);return typeof u>"u"&&n&&(u=r()),e(u,...s)}return o.unwrapped=e,o}var Mt=Xf();function em(){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 tm({type:e,reducerName:t,createNotation:r},n,o){let i,s;if("reducer"in n){if(r&&!nm(n))throw new Error(qe(17));i=n.reducer,s=n.prepare}else i=n;o.addCase(e,i).exposeCaseReducer(t,i).exposeAction(t,s?U(e,s):U(e))}function rm(e){return e._reducerDefinitionType==="asyncThunk"}function nm(e){return e._reducerDefinitionType==="reducerWithPrepare"}function om({type:e,reducerName:t},r,n,o){if(!o)throw new Error(qe(18));let{payloadCreator:i,fulfilled:s,pending:u,rejected:c,settled:a,options:g}=r,S=o(e,i,g);n.exposeAction(t,S),s&&n.addCase(S.fulfilled,s),u&&n.addCase(S.pending,u),c&&n.addCase(S.rejected,c),a&&n.addMatcher(S.settled,a),n.exposeCaseReducer(t,{fulfilled:s||hn,pending:u||hn,rejected:c||hn,settled:a||hn})}function hn(){}var cc="listener",uc="completed",lc="cancelled",Rw=`task-${lc}`,Ew=`task-${uc}`,Iw=`${cc}-${lc}`,kw=`${cc}-${uc}`;var{assign:dc}=Object;var bi="listenerMiddleware";var im=dc(U(`${bi}/add`),{withTypes:()=>im}),Pw=U(`${bi}/removeAll`),sm=dc(U(`${bi}/remove`),{withTypes:()=>sm});var Tw=Symbol.for("rtk-state-proxy-original");function qe(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. `}m();d();f();p();var Y=new G({required:!0,emptyAllowed:!1}),ae=new G({required:!1,emptyAllowed:!1}),Ne=new G({required:!0,emptyAllowed:!0}),Qw=new G({required:!1,emptyAllowed:!0}),pc=new Ke({each:Y,required:!0}),fc=new G({required:!1,emptyAllowed:!1,regex:/^\d+\.\d+\.\d+$/}),am=({message:e,name:t,stack:r})=>({message:e,name:t,stack:r}),wi=(e,t)=>{if("required"in t)return{payload:new Me({value:t}).validate({value:e}).value};let o=new ne({options:{required:!0},values:t}).validate(e);if(o)throw new zo(o);return{payload:e}},H=(e,t)=>{try{return wi(e,t)}catch(r){return{payload:e,error:am(r)}}};var An=(e,t,r,n)=>{let o=`Check the options of ${n}`;return cm(e,t,r,o,"Controller initialization error")},cm=(e,t,r,n,o)=>{try{return t.validate(r,n)}catch(i){throw e.logger.error(i,o),i}};var bn=U("caseAssistConfiguration/set",e=>H(e,{caseAssistId:Y,locale:ae,proxyBaseUrl:new G({required:!1,url:!0})}));m();d();f();p();m();d();f();p();var mc=()=>({caseAssistId:"",locale:"en-US"});var at=le(mc(),e=>{e.addCase(bn,(t,r)=>{t.caseAssistId=r.payload.caseAssistId,t.locale=r.payload.locale,t.apiBaseUrl=r.payload.proxyBaseUrl})});m();d();f();p();m();d();f();p();m();d();f();p();var gc={q:new G,enableQuerySyntax:new se,aq:new G,cq:new G,firstResult:new Ce({min:0}),numberOfResults:new Ce({min:0}),sortCriteria:new G,f:new ne,fExcluded:new ne,cf:new ne,nf:new ne,mnf:new ne,df:new ne,debug:new se,sf:new ne,tab:new G,af:new ne};var wn=U("searchParameters/restore",e=>H(e,gc));m();d();f();p();var hc=U("debug/enable"),yc=U("debug/disable");m();d();f();p();var xn=()=>!1;var Sc=le(xn(),e=>{e.addCase(hc,()=>!0).addCase(yc,()=>!1).addCase(wn,(t,r)=>r.payload.debug??t)});m();d();f();p();var Rn=U("searchHub/set",e=>H(e,new G({required:!0,emptyAllowed:!0})));m();d();f();p();m();d();f();p();m();d();f();p();var Kt="3.14.0",vc=["@coveo/atomic","@coveo/quantic"];var xi=()=>ae,Cc=()=>Y,Yt=U("configuration/updateBasicConfiguration",e=>H(e,{accessToken:ae,environment:new G({required:!1,constrainTo:["prod","hipaa","stg","dev"]}),organizationId:ae})),En=U("configuration/updateSearchConfiguration",e=>H(e,{proxyBaseUrl:new G({required:!1,url:!0}),pipeline:new G({required:!1,emptyAllowed:!0}),searchHub:ae,timezone:ae,locale:ae,authenticationProviders:new Ke({required:!1,each:Y})})),um={enabled:new se({default:!0}),originContext:xi(),originLevel2:xi(),originLevel3:xi(),proxyBaseUrl:new G({required:!1,url:!0}),runtimeEnvironment:new Et,anonymous:new se({default:!1}),deviceId:ae,userDisplayName:ae,documentLocation:ae,trackingId:ae,analyticsMode:new G({constrainTo:["legacy","next"],required:!1,default:"next"}),source:new ne({options:{required:!1},values:vc.reduce((e,t)=>(e[t]=fc,e),{})})},In=U("configuration/updateAnalyticsConfiguration",e=>H(e,um)),kn=U("configuration/analytics/disable"),Pn=U("configuration/analytics/enable"),Ac=U("configuration/analytics/originlevel2",e=>H(e,{originLevel2:Cc()})),bc=U("configuration/analytics/originlevel3",e=>H(e,{originLevel3:Cc()}));m();d();f();p();var lm=U("history/undo"),dm=U("history/redo"),Be=U("history/snapshot"),bR=Z("history/back",/*#__PURE__*/function(){var _ref4=_asyncToGenerator(function*(e,{dispatch:t}){t(lm()),yield t(Tn())});return function(_x3,_x4){return _ref4.apply(this,arguments)}}()),wR=Z("history/forward",/*#__PURE__*/function(){var _ref5=_asyncToGenerator(function*(e,{dispatch:t}){t(dm()),yield t(Tn())});return function(_x5,_x6){return _ref5.apply(this,arguments)}}()),Tn=Z("history/change",/*#__PURE__*/function(){var _ref6=_asyncToGenerator(function*(e,{getState:t}){return t().history.present});return function(_x7,_x8){return _ref6.apply(this,arguments)}}());m();d();f();p();var ct=()=>"default";var wc=le(ct(),e=>{e.addCase(Rn,(t,r)=>r.payload).addCase(Tn.fulfilled,(t,r)=>r.payload?.searchHub??t).addCase(En,(t,r)=>r.payload.searchHub||t)});m();d();f();p();m();d();f();p();m();d();f();p();function pm({config:e,environment:t,event:r,listenerManager:n}){let{url:o,token:i,mode:s}=e;s!=="disabled"&&(n.call(r),t.send(o,i,r))}var fm=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i;function mm(e){return typeof e=="string"&&fm.test(e)}var he=[];for(On=0;On<256;++On)he.push((On+256).toString(16).slice(1));var On;function gm(e,t=0){return(he[e[t+0]]+he[e[t+1]]+he[e[t+2]]+he[e[t+3]]+"-"+he[e[t+4]]+he[e[t+5]]+"-"+he[e[t+6]]+he[e[t+7]]+"-"+he[e[t+8]]+he[e[t+9]]+"-"+he[e[t+10]]+he[e[t+11]]+he[e[t+12]]+he[e[t+13]]+he[e[t+14]]+he[e[t+15]]).toLowerCase()}var Fn,hm=new Uint8Array(16);function ym(){if(!Fn&&(Fn=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Fn))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Fn(hm)}var Sm=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),xc={randomUUID:Sm};function vm(e,t,r){if(xc.randomUUID&&!t&&!e)return xc.randomUUID();e=e||{};var n=e.random||(e.rng||ym)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,t){r=r||0;for(var o=0;o<16;++o)t[r+o]=n[o];return t}return gm(n)}function Cm(e){return{getClientId:()=>{let t="visitorId",r=e.get(),n=r.storage,o=n.getItem(t),i=o&&mm(o)?o:r.generateUUID();return n.setItem(t,i),i}}}var Ec="0.8.1";function Am(e){let{trackingId:t}=e;return{trackingId:t}}function bm(e){return(e.source||[]).concat([`relay@${Ec}`])}function Ic(e,t,r,n){let{getReferrer:o,getLocation:i,getUserAgent:s}=r,u=Am(t),c=n.getClientId();return Object.freeze({type:e,config:u,ts:Date.now(),source:bm(t),clientId:c,userAgent:s(),referrer:o(),location:i()})}function wm(e,t,r,n,o){return{...t,meta:Ic(e,r,n,o)}}var xm="*";function Rm(){let e=[];function t({type:c,callback:a}){return e.findIndex(g=>g.type===c&&g.callback===a)}function r(c,a){return c.type==="*"||a===c.type}function n(c){return t(c)<0&&e.push(c),()=>u(c.type,c.callback)}function o(c){e.forEach(a=>{if(r(a,c.meta.type))try{a.callback(c)}catch(g){console.error(g)}})}function i(c){if(c===xm)e.length=0;else for(let a=e.length-1;a>=0;a--)e[a].type===c&&e.splice(a,1)}function s(c){let a=t(c);a>=0&&e.splice(a,1)}function u(c,a){a?s({type:c,callback:a}):i(c)}return{add:n,call:o,remove:u}}function Rc({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 Em(e){let t=Rc(e);return{get:()=>t,update:r=>{t=Rc({...t,...r})}}}function Im(){let e=typeof window<"u";return{sendMessage(t){e&&window.postMessage(t,"*")}}}var Ri=km();function km(){let e="coveo_",t=r=>{let n=r.split(".").slice(-2);return n.length==2?n.join("."):""};return{getItem(r){let n=`${e}${r}=`,o=document.cookie.split(";");for(let i of o){let s=i.replace(/^\s+/,"");if(s.lastIndexOf(n,0)===0)return s.substring(n.length,s.length)}return null},setItem(r,n,o){let i=t(window.location.hostname),s=`;expires=${new Date(new Date().getTime()+o).toUTCString()}`,u=i?`;domain=${i}`:"";document.cookie=`${e}${r}=${n}${s}${u};path=/;SameSite=Lax`},removeItem(r){this.setItem(r,"",-1)}}}function Pm(){return{getItem(e){return Ri.getItem(e)||localStorage.getItem(e)},removeItem(e){Ri.removeItem(e),localStorage.removeItem(e)},setItem(e,t){localStorage.setItem(e,t),Ri.setItem(e,t,31556952e3)}}}function Tm(){let e=document.referrer;return e===""?null:e}function Om(){return{runtime:"browser",send:(e,t,r)=>{let n=navigator.sendBeacon(`${e}?access_token=${t}`,new Blob([JSON.stringify([r])],{type:"application/json"}));if(Im().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:()=>Tm(),getLocation:()=>window.location.href,getUserAgent:()=>navigator.userAgent,generateUUID:()=>vm(),storage:Pm()}}function Fm(){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 Dm(){return{getItem(){return null},removeItem(){},setItem(){}}}function Mm(){return{runtime:"null",send:()=>{},getReferrer:()=>null,getLocation:()=>null,getUserAgent:()=>null,generateUUID:()=>"",storage:Dm()}}function qm(e){return e.get().mode!=="disabled"&&Nm()&&Fm()?Om():Mm()}function Nm(){try{return typeof window=="object"}catch{return!1}}function _m(e){return{get:()=>Object.freeze(qm(e))}}function kc(e){let t=Em(e),r=Rm(),n=_m(t),o=Cm(n);return{emit:(i,s)=>{let u=t.get(),c=n.get(),a=wm(i,s,u,c,o);return pm({config:u,environment:c,event:a,listenerManager:r})},getMeta:i=>Ic(i,t.get(),n.get(),o),on:(i,s)=>r.add({type:i,callback:s}),off:(i,s)=>r.remove(i,s),updateConfig:i=>t.update(i),version:Ec}}m();d();f();p();var Jt=ue(e=>e.source,e=>Object.entries(e).map(([t,r])=>`${t}@${r}`).concat(`@coveo/headless@${Kt}`));var Xt=ue(e=>e.configuration.organizationId,e=>e.configuration.environment,e=>e.configuration.accessToken,e=>e.configuration.analytics,e=>Jt(e.configuration.analytics),(e,t,r,{trackingId:n,apiBaseUrl:o,enabled:i},s)=>kc({mode:i?"emit":"disabled",url:o??tn(e,t),token:r,trackingId:n,source:s}));m();d();f();p();m();d();f();p();m();d();f();p();m();d();f();p();function Tc(_x9,_x10){return _Tc.apply(this,arguments)}function _Tc(){_Tc=_asyncToGenerator(function*(e,t){let r=e.getReader(),n;for(;!(n=yield r.read()).done;)t(n.value)});return _Tc.apply(this,arguments)}function Oc(e){let t,r,n,o=!1;return function(s){t===void 0?(t=s,r=0,n=-1):t=Lm(t,s);let u=t.length,c=0;for(;r<u;){o&&(t[r]===10&&(c=++r),o=!1);let a=-1;for(;r<u&&a===-1;++r)switch(t[r]){case 58:n===-1&&(n=r-c);break;case 13:o=!0;case 10:a=r;break}if(a===-1)break;e(t.subarray(c,a),n),c=r,n=-1}c===u?t=void 0:c!==0&&(t=t.subarray(c),r-=c)}}function Fc(e,t,r){let n=Pc(),o=new TextDecoder;return function(s,u){if(s.length===0)r?.(n),n=Pc();else if(u>0){let c=o.decode(s.subarray(0,u)),a=u+(s[u+1]===32?2:1),g=o.decode(s.subarray(a));switch(c){case"data":n.data=n.data?n.data+`
|
|
27
27
|
`+g:g;break;case"event":n.event=g;break;case"id":e(n.id=g);break;case"retry":let S=parseInt(g,10);isNaN(S)||t(n.retry=S);break}}}}function Lm(e,t){let r=new Uint8Array(e.length+t.length);return r.set(e),r.set(t,e.length),r}function Pc(){return{data:"",event:"",id:"",retry:void 0}}var jm=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r},Dn="text/event-stream",Um=1e3,Dc="last-event-id";function Mc(){typeof window<"u"}function Ei(e,t){var{signal:r,headers:n,onopen:o,onmessage:i,onclose:s,onerror:u,openWhenHidden:c,fetch:a}=t,g=jm(t,["signal","headers","onopen","onmessage","onclose","onerror","openWhenHidden","fetch"]);return new Promise((S,y)=>{let h=Object.assign({},n);h.accept||(h.accept=Dn);let v;function C(){v?.abort(),document.hidden||N()}!c&&Mc()&&document.addEventListener("visibilitychange",C);let E=Um,x=0;function A(){Mc()&&document.removeEventListener("visibilitychange",C),clearTimeout(x),v?.abort()}r?.addEventListener("abort",()=>{A(),S()});let w=a??w,P=o??Vm;function N(){return _N.apply(this,arguments)}function _N(){_N=_asyncToGenerator(function*(){var T;v=typeof l.AbortController>"u"?null:new l.AbortController;try{let k=yield w(e,Object.assign(Object.assign({},g),{headers:h,signal:v?.signal}));yield P(k),yield Tc(k.body,Oc(Fc(M=>{M?h[Dc]=M:delete h[Dc]},M=>{E=M},i))),s?.(),A(),S()}catch(k){if(!v?.signal.aborted)try{let M=(T=u?.(k))!==null&&T!==void 0?T:E;clearTimeout(x),x=setTimeout(N,M)}catch(M){A(),y(M)}}});return _N.apply(this,arguments)}N()})}function Vm(e){let t=e.headers.get("content-type");if(!t?.startsWith(Dn))throw new Error(`Expected content-type to be ${Dn}, Actual: ${t}`)}m();d();f();p();m();d();f();p();m();d();f();p();m();d();f();p();m();d();f();p();function Ze(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function O(e,t,r,n){function o(i){return i instanceof r?i:new r(function(s){s(i)})}return new(r||(r=Promise))(function(i,s){function u(g){try{a(n.next(g))}catch(S){s(S)}}function c(g){try{a(n.throw(g))}catch(S){s(S)}}function a(g){g.done?i(g.value):o(g.value).then(u,c)}a((n=n.apply(e,t||[])).next())})}var J;(function(e){e.search="search",e.click="click",e.custom="custom",e.view="view",e.collect="collect"})(J||(J={}));function Pi(){return typeof window<"u"}function Bi(){return typeof navigator<"u"}function Zt(){return typeof document<"u"}function Ti(){try{return typeof localStorage<"u"}catch{return!1}}function Bm(){try{return typeof sessionStorage<"u"}catch{return!1}}function Wc(){return Bi()&&navigator.cookieEnabled}var Qm=[J.click,J.custom,J.search,J.view],$m=(e,t)=>Qm.indexOf(e)!==-1?Object.assign({language:Zt()?document.documentElement.lang:"unknown",userAgent:Bi()?navigator.userAgent:"unknown"},t):t,Mr=class e{static set(t,r,n){var o,i,s,u;n&&(i=new Date,i.setTime(i.getTime()+n)),u=window.location.hostname,u.indexOf(".")===-1?qc(t,r,i):(s=u.split("."),o=s[s.length-2]+"."+s[s.length-1],qc(t,r,i,o))}static get(t){for(var r=t+"=",n=document.cookie.split(";"),o=0;o<n.length;o++){var i=n[o];if(i=i.replace(/^\s+/,""),i.lastIndexOf(r,0)===0)return i.substring(r.length,i.length)}return null}static erase(t){e.set(t,"",-1)}};function qc(e,t,r,n){document.cookie=`${e}=${t}`+(r?`;expires=${r.toUTCString()}`:"")+(n?`;domain=${n}`:"")+";path=/;SameSite=Lax"}function Hm(){return Ti()?localStorage:Wc()?new qr:Bm()?sessionStorage:new tr}var qr=class e{getItem(t){return Mr.get(`${e.prefix}${t}`)}removeItem(t){Mr.erase(`${e.prefix}${t}`)}setItem(t,r,n){Mr.set(`${e.prefix}${t}`,r,n)}};qr.prefix="coveo_";var Oi=class{constructor(){this.cookieStorage=new qr}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)}},tr=class{getItem(t){return null}removeItem(t){}setItem(t,r){}},Fr="__coveo.analytics.history",Kc=20,Yc=1e3*60,Jc=75,rr=class{constructor(t){this.store=t||Hm()}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 O(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 O(this,void 0,void 0,function*(){let t=yield this.getHistoryWithInternalTimeAsync();return this.stripEmptyQueries(this.stripInternalTime(t))})}getHistoryWithInternalTime(){try{let t=this.store.getItem(Fr);return t&&typeof t=="string"?JSON.parse(t):[]}catch{return[]}}getHistoryWithInternalTimeAsync(){return O(this,void 0,void 0,function*(){try{let t=yield this.store.getItem(Fr);return t?JSON.parse(t):[]}catch{return[]}})}setHistory(t){try{this.store.setItem(Fr,JSON.stringify(t.slice(0,Kc)))}catch{}}clear(){try{this.store.removeItem(Fr)}catch{}}getMostRecentElement(){let t=this.getHistoryWithInternalTime();return Array.isArray(t)?t.sort((n,o)=>(o.internalTime||0)-(n.internalTime||0))[0]:null}cropQueryElement(t){return t.name&&t.value&&t.name.toLowerCase()==="query"&&(t.value=t.value.slice(0,Jc)),t}isValidEntry(t){let r=this.getMostRecentElement();return r&&r.value==t.value?(t.internalTime||0)-(r.internalTime||0)>Yc:!0}stripInternalTime(t){return Array.isArray(t)?t.map(r=>{let{name:n,time:o,value:i}=r;return{name:n,time:o,value:i}}):[]}stripEmptyQuery(t){let{name:r,time:n,value:o}=t;return r&&typeof o=="string"&&r.toLowerCase()==="query"&&o.trim()===""?{name:r,time:n}:t}stripEmptyQueries(t){return t.map(r=>this.stripEmptyQuery(r))}},Xc=Object.freeze({__proto__:null,HistoryStore:rr,MAX_NUMBER_OF_HISTORY_ELEMENTS:Kc,MAX_VALUE_SIZE:Jc,MIN_THRESHOLD_FOR_DUPLICATE_VALUE:Yc,STORE_KEY:Fr,default:rr}),zm=(e,t)=>O(void 0,void 0,void 0,function*(){return e===J.view?(yield Gm(t.contentIdValue),Object.assign({location:window.location.toString(),referrer:document.referrer,title:document.title},t)):t}),Gm=e=>O(void 0,void 0,void 0,function*(){let t=new rr,r={name:"PageView",value:e,time:new Date().toISOString()};yield t.addElementAsync(r)}),Mn,Wm=new Uint8Array(16);function Km(){if(!Mn&&(Mn=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Mn))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Mn(Wm)}var Ym=/^(?:[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 Nn(e){return typeof e=="string"&&Ym.test(e)}var ye=[];for(let e=0;e<256;++e)ye.push((e+256).toString(16).slice(1));function Zc(e,t=0){return(ye[e[t+0]]+ye[e[t+1]]+ye[e[t+2]]+ye[e[t+3]]+"-"+ye[e[t+4]]+ye[e[t+5]]+"-"+ye[e[t+6]]+ye[e[t+7]]+"-"+ye[e[t+8]]+ye[e[t+9]]+"-"+ye[e[t+10]]+ye[e[t+11]]+ye[e[t+12]]+ye[e[t+13]]+ye[e[t+14]]+ye[e[t+15]]).toLowerCase()}function Jm(e){if(!Nn(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 Xm(e){e=unescape(encodeURIComponent(e));let t=[];for(let r=0;r<e.length;++r)t.push(e.charCodeAt(r));return t}var Zm="6ba7b810-9dad-11d1-80b4-00c04fd430c8",eg="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function tg(e,t,r){function n(o,i,s,u){var c;if(typeof o=="string"&&(o=Xm(o)),typeof i=="string"&&(i=Jm(i)),((c=i)===null||c===void 0?void 0:c.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let a=new Uint8Array(16+o.length);if(a.set(i),a.set(o,i.length),a=r(a),a[6]=a[6]&15|t,a[8]=a[8]&63|128,s){u=u||0;for(let g=0;g<16;++g)s[u+g]=a[g];return s}return Zc(a)}try{n.name=e}catch{}return n.DNS=Zm,n.URL=eg,n}var rg=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Nc={randomUUID:rg};function qt(e,t,r){if(Nc.randomUUID&&!t&&!e)return Nc.randomUUID();e=e||{};let n=e.random||(e.rng||Km)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,t){r=r||0;for(let o=0;o<16;++o)t[r+o]=n[o];return t}return Zc(n)}function ng(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 Ii(e,t){return e<<t|e>>>32-t}function og(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 u=0;u<s.length;++u)e.push(s.charCodeAt(u))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);let n=e.length/4+2,o=Math.ceil(n/16),i=new Array(o);for(let s=0;s<o;++s){let u=new Uint32Array(16);for(let c=0;c<16;++c)u[c]=e[s*64+c*4]<<24|e[s*64+c*4+1]<<16|e[s*64+c*4+2]<<8|e[s*64+c*4+3];i[s]=u}i[o-1][14]=(e.length-1)*8/Math.pow(2,32),i[o-1][14]=Math.floor(i[o-1][14]),i[o-1][15]=(e.length-1)*8&4294967295;for(let s=0;s<o;++s){let u=new Uint32Array(80);for(let h=0;h<16;++h)u[h]=i[s][h];for(let h=16;h<80;++h)u[h]=Ii(u[h-3]^u[h-8]^u[h-14]^u[h-16],1);let c=r[0],a=r[1],g=r[2],S=r[3],y=r[4];for(let h=0;h<80;++h){let v=Math.floor(h/20),C=Ii(c,5)+ng(v,a,g,S)+y+t[v]+u[h]>>>0;y=S,S=g,g=Ii(a,30)>>>0,a=c,c=C}r[0]=r[0]+c>>>0,r[1]=r[1]+a>>>0,r[2]=r[2]+g>>>0,r[3]=r[3]+S>>>0,r[4]=r[4]+y>>>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 ig=tg("v5",80,og),_c=ig,eu="2.30.43",Lc=e=>`${e.protocol}//${e.hostname}${e.pathname.indexOf("/")===0?e.pathname:`/${e.pathname}`}${e.search}`,Dr={pageview:"pageview",event:"event"},_n=class{constructor({client:t,uuidGenerator:r=qt}){this.client=t,this.uuidGenerator=r}},Fi=class extends _n{constructor({client:t,uuidGenerator:r=qt}){super({client:t,uuidGenerator:r}),this.actionData={},this.pageViewId=r(),this.nextPageViewId=this.pageViewId,this.currentLocation=Lc(window.location),this.lastReferrer=Zt()?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:Zt()?document.title:"",encoding:Zt()?document.characterSet:"UTF-8"},n={screenResolution:`${screen.width}x${screen.height}`,screenColor:`${screen.colorDepth}-bit`},o={language:navigator.language,userAgent:navigator.userAgent},i={time:Date.now(),eventId:this.uuidGenerator()};return Object.assign(Object.assign(Object.assign(Object.assign({},i),n),o),r)}updateLocationForNextPageView(t,r){let{pageViewId:n,referrer:o,location:i}=this.getNextValues(t,r);this.lastReferrer=o,this.pageViewId=n,this.currentLocation=i,t===Dr.pageview&&(this.nextPageViewId=this.uuidGenerator(),this.hasSentFirstPageView=!0)}getNextValues(t,r){return{pageViewId:t===Dr.pageview?this.nextPageViewId:this.pageViewId,referrer:t===Dr.pageview&&this.hasSentFirstPageView?this.currentLocation:this.lastReferrer,location:t===Dr.pageview?this.getCurrentLocationFromPayload(r):this.currentLocation}}getCurrentLocationFromPayload(t){if(t.page){let r=o=>o.replace(/^\/?(.*)$/,"/$1");return`${(o=>o.split("/").slice(0,3).join("/"))(this.currentLocation)}${r(t.page)}`}else return Lc(window.location)}},ut=class e{constructor(t,r){if(!Nn(t))throw Error("Not a valid uuid");this.clientId=t,this.creationDate=Math.floor(r/1e3)}toString(){return this.clientId.replace(/-/g,"")+"."+this.creationDate.toString()}get expired(){let t=Math.floor(Date.now()/1e3)-this.creationDate;return t<0||t>e.expirationTime}validate(t,r){return!this.expired&&this.matchReferrer(t,r)}matchReferrer(t,r){try{let n=new URL(t);return r.some(o=>new RegExp(o.replace(/\\/g,"\\\\").replace(/\./g,"\\.").replace(/\*/g,".*")+"$").test(n.host))}catch{return!1}}static fromString(t){let r=t.split(".");if(r.length!==2)return null;let[n,o]=r;if(n.length!==32||isNaN(parseInt(o)))return null;let i=n.substring(0,8)+"-"+n.substring(8,12)+"-"+n.substring(12,16)+"-"+n.substring(16,20)+"-"+n.substring(20,32);return Nn(i)?new e(i,Number.parseInt(o)*1e3):null}};ut.cvo_cid="cvo_cid";ut.expirationTime=120;var Di=class extends _n{constructor({client:t,uuidGenerator:r=qt}){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 O(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(ut.cvo_cid,new ut(n,Date.now()).toString()),r.toString()}catch{throw new Error("Invalid URL provided")}})}acceptFrom(t){this.client.setAcceptedLinkReferrers(t)}};Di.Id="link";var Fe=Object.keys;function qn(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}var ki=128,tu=192,jc=224,Uc=240;function sg(e){return(e&248)===Uc?4:(e&Uc)===jc?3:(e&jc)===tu?2:1}function ag(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&ki)!=ki)break;if(r-=3,(n&tu)!=ki){t-r>=sg(n)*3&&(r=t);break}}return e.substring(0,r)}var Mi={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"},cg=Fe(Mi).map(e=>Mi[e]),ug=[...cg].join("|"),lg=new RegExp(`^(${ug}$)`),dg={svcAction:"svc_action",svcActionData:"svc_action_data"},pg=e=>Fe(e).filter(t=>e[t]!==void 0).reduce((t,r)=>{let n=Mi[r]||r;return Object.assign(Object.assign({},t),{[n]:e[r]})},{}),fg=e=>lg.test(e),mg=[fg],Vc={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",price:"pr",quantity:"qt",coupon:"cc",position:"ps",group:"group"},Bc={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",position:"ps",price:"pr",group:"group"},Se={action:"pa",list:"pal",listSource:"pls"},Ln={id:"ti",revenue:"tr",tax:"tt",shipping:"ts",coupon:"tcc",affiliation:"ta",step:"cos",option:"col"},gg=["loyaltyCardId","loyaltyTier","thirdPartyPersona","companyName","favoriteStore","storeName","userIndustry","userRole","userDepartment","businessUnit"],qi={id:"quoteId",affiliation:"quoteAffiliation"},Ni={id:"reviewId",rating:"reviewRating",comment:"reviewComment"},hg={add:Se,bookmark_add:Se,bookmark_remove:Se,click:Se,checkout:Se,checkout_option:Se,detail:Se,impression:Se,remove:Se,refund:Object.assign(Object.assign({},Se),Ln),purchase:Object.assign(Object.assign({},Se),Ln),quickview:Se,quote:Object.assign(Object.assign({},Se),qi),review:Object.assign(Object.assign({},Se),Ni)},yg=Fe(Vc).map(e=>Vc[e]),Sg=Fe(Bc).map(e=>Bc[e]),vg=Fe(Se).map(e=>Se[e]),Cg=Fe(Ln).map(e=>Ln[e]),Ag=Fe(Ni).map(e=>Ni[e]),bg=Fe(qi).map(e=>qi[e]),wg=[...yg,"custom"].join("|"),xg=[...Sg,"custom"].join("|"),ru="(pr[0-9]+)",nu="(il[0-9]+pi[0-9]+)",Rg=new RegExp(`^${ru}(${wg})$`),Eg=new RegExp(`^(${nu}(${xg}))|(il[0-9]+nm)$`),Ig=new RegExp(`^(${vg.join("|")})$`),kg=new RegExp(`^(${Cg.join("|")})$`),Pg=new RegExp(`^${ru}custom$`),Tg=new RegExp(`^${nu}custom$`),Og=new RegExp(`^(${[...gg,...Ag,...bg].join("|")})$`),Fg=e=>Rg.test(e),Dg=e=>Eg.test(e),Mg=e=>Ig.test(e),qg=e=>kg.test(e),Ng=e=>Og.test(e),_g=[Dg,Fg,Mg,qg,Ng],Lg=[Pg,Tg],jg={anonymizeIp:"aip"},Ug={eventCategory:"ec",eventAction:"ea",eventLabel:"el",eventValue:"ev",page:"dp",visitorId:"cid",clientId:"cid",userId:"uid",currencyCode:"cu"},Vg={hitType:"t",pageViewId:"pid",encoding:"de",location:"dl",referrer:"dr",screenColor:"sd",screenResolution:"sr",title:"dt",userAgent:"ua",language:"ul",eventId:"z",time:"tm"},Bg=["contentId","contentIdKey","contentType","searchHub","tab","searchUid","permanentId","contentLocale","trackingId"],Qg=Object.assign(Object.assign(Object.assign(Object.assign({},jg),Ug),Vg),Bg.reduce((e,t)=>Object.assign(Object.assign({},e),{[t]:t}),{})),_i=Object.assign(Object.assign({},Qg),dg),$g=e=>{let t=!!e.action&&hg[e.action]||{};return Fe(e).reduce((r,n)=>{let o=t[n]||_i[n]||n;return Object.assign(Object.assign({},r),{[o]:e[n]})},{})},Hg=Fe(_i).map(e=>_i[e]),zg=e=>Hg.indexOf(e)!==-1,Gg=e=>e==="custom",Wg=e=>[..._g,...mg,zg,Gg].some(t=>t(e)),Kg=e=>Fe(e).reduce((t,r)=>{let n=Yg(r);return n?Object.assign(Object.assign({},t),Jg(n,e[r])):Object.assign(Object.assign({},t),{[r]:e[r]})},{}),Yg=e=>{let t;return[...Lg].every(r=>{var n;return t=(n=r.exec(e))===null||n===void 0?void 0:n[1],!t}),t},Jg=(e,t)=>Fe(t).reduce((r,n)=>Object.assign(Object.assign({},r),{[`${e}${n}`]:t[n]}),{}),Li=class{constructor(t){this.opts=t}sendEvent(t,r){return O(this,void 0,void 0,function*(){if(!this.isAvailable())throw new Error("navigator.sendBeacon is not supported in this browser. Consider adding a polyfill like \"sendbeacon-polyfill\".");let{baseUrl:n,preprocessRequest:o}=this.opts,i=yield this.getQueryParamsForEventType(t),{url:s,payload:u}=yield this.preProcessRequestAsPotentialJSONString(`${n}/analytics/${t}?${i}`,r,o),c=this.encodeForEventType(t,u),a=new Blob([c],{type:"application/x-www-form-urlencoded"});navigator.sendBeacon(s,a)})}isAvailable(){return"sendBeacon"in navigator}deleteHttpCookieVisitorId(){return Promise.resolve()}preProcessRequestAsPotentialJSONString(t,r,n){return O(this,void 0,void 0,function*(){let o=t,i=r;if(n){let s=yield n({url:t,body:JSON.stringify(r)},"analyticsBeacon"),{url:u,body:c}=s;o=u||t;try{i=JSON.parse(c)}catch(a){console.error("Unable to process the request body as a JSON string",a)}}return{payload:i,url:o}})}encodeForEventType(t,r){return this.isEventTypeLegacy(t)?this.encodeEventToJson(t,r):this.encodeEventToJson(t,r,this.opts.token)}getQueryParamsForEventType(t){return O(this,void 0,void 0,function*(){let{token:r,visitorIdProvider:n}=this.opts,o=yield n.getCurrentVisitorId();return[r&&this.isEventTypeLegacy(t)?`access_token=${r}`:"",o?`visitorId=${o}`:"","discardVisitInfo=true"].filter(i=>!!i).join("&")})}isEventTypeLegacy(t){return[J.click,J.custom,J.search,J.view].indexOf(t)!==-1}encodeEventToJson(t,r,n){let o=`${t}Event=${encodeURIComponent(JSON.stringify(r))}`;return n&&(o=`access_token=${encodeURIComponent(n)}&${o}`),o}},ji=class{sendEvent(t,r){return O(this,void 0,void 0,function*(){return Promise.resolve()})}deleteHttpCookieVisitorId(){return O(this,void 0,void 0,function*(){return Promise.resolve()})}},Qc=b.fetch,jn=class{constructor(t){this.opts=t}sendEvent(t,r){return O(this,void 0,void 0,function*(){let{baseUrl:n,visitorIdProvider:o,preprocessRequest:i}=this.opts,s=this.shouldAppendVisitorId(t)?yield this.getVisitorIdParam():"",u={url:`${n}/analytics/${t}${s}`,credentials:"include",mode:"cors",headers:this.getHeaders(),method:"POST",body:JSON.stringify(r)},c=Object.assign(Object.assign({},u),i?yield i(u,"analyticsFetch"):{}),{url:a}=c,g=Ze(c,["url"]),S;try{S=yield Qc(a,g)}catch(y){console.error("An error has occured when sending the event.",y);return}if(S.ok){let y=yield S.json();return y.visitorId&&o.setCurrentVisitorId(y.visitorId),y}else{try{S.json()}catch{}throw console.error(`An error has occured when sending the "${t}" event.`,S,r),new Error(`An error has occurred when sending the "${t}" event. Check the console logs for more details.`)}})}deleteHttpCookieVisitorId(){return O(this,void 0,void 0,function*(){let{baseUrl:t}=this.opts,r=`${t}/analytics/visit`;yield Qc(r,{headers:this.getHeaders(),method:"DELETE"})})}shouldAppendVisitorId(t){return[J.click,J.custom,J.search,J.view].indexOf(t)!==-1}getVisitorIdParam(){return O(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"})}},Ui=class{constructor(t,r){Ti()&&Wc()?this.storage=new Oi:Ti()?this.storage=localStorage:(console.warn("BrowserRuntime detected no valid storage available.",this),this.storage=new tr),this.client=new jn(t),this.beaconClient=new Li(t),window.addEventListener("beforeunload",()=>{let n=r();for(let{eventType:o,payload:i}of n)this.beaconClient.sendEvent(o,i)})}getClientDependingOnEventType(t){return t==="click"&&this.beaconClient.isAvailable()?this.beaconClient:this.client}},Vi=class{constructor(t,r){this.storage=r||new tr,this.client=new jn(t)}getClientDependingOnEventType(t){return this.client}},Un=class{constructor(){this.storage=new tr,this.client=new ji}getClientDependingOnEventType(t){return this.client}},Xg="xx",Zg=e=>e?.startsWith(Xg)||!1,eh=`
|
|
28
28
|
We've detected you're using React Native but have not provided the corresponding runtime,
|
|
29
29
|
for an optimal experience please use the "coveo.analytics/react-native" subpackage.
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { ControllerDefinitionOption, SubControllerDefinitionWithoutProps } from '../../../app/commerce-ssr-engine/types/common.js';
|
|
2
2
|
import { ProductListing } from '../product-listing/headless-product-listing.js';
|
|
3
3
|
import { Search } from '../search/headless-search.js';
|
|
4
|
-
export type { ProductListingState as ProductListState } from '../product-listing/headless-product-listing.js';
|
|
4
|
+
export type { ProductListing, ProductListingState as ProductListState, } from '../product-listing/headless-product-listing.js';
|
|
5
|
+
export type { Search } from '../search/headless-search.js';
|
|
5
6
|
export type ProductList = Pick<ProductListing | Search, 'state' | 'subscribe' | 'interactiveProduct' | 'promoteChildToParent'>;
|
|
6
7
|
/**
|
|
7
8
|
* Defines a `ProductList` controller instance.
|
|
@@ -2,7 +2,7 @@ import { CommerceEngine } from '../../../app/commerce-engine/commerce-engine.js'
|
|
|
2
2
|
import { Delimiters, SuggestionHighlightingOptions } from '../../../utils/highlight.js';
|
|
3
3
|
import { SearchBoxState, SearchBox as CoreSearchBox, Suggestion } from '../../core/search-box/headless-core-search-box.js';
|
|
4
4
|
import { SearchBoxOptions } from './headless-search-box-options.js';
|
|
5
|
-
export type { SearchBoxOptions, SearchBoxState, SuggestionHighlightingOptions, Suggestion, Delimiters, };
|
|
5
|
+
export type { SearchBoxOptions, SearchBoxState, SuggestionHighlightingOptions, Suggestion, Delimiters, CoreSearchBox, };
|
|
6
6
|
export interface SearchBoxProps {
|
|
7
7
|
/**
|
|
8
8
|
* The `SearchBox` controller options.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SearchOnlyControllerDefinitionWithoutProps } from '../../../app/commerce-ssr-engine/types/common.js';
|
|
2
2
|
import { SearchBox, SearchBoxProps, SearchBoxOptions, Suggestion } from './headless-search-box.js';
|
|
3
|
-
export type { SearchBoxState, SearchBox, SearchBoxProps, } from './headless-search-box.js';
|
|
3
|
+
export type { SearchBoxState, SearchBox, SearchBoxProps, CoreSearchBox, } from './headless-search-box.js';
|
|
4
4
|
export type { SearchBoxOptions, Suggestion };
|
|
5
5
|
export interface SearchBoxDefinition extends SearchOnlyControllerDefinitionWithoutProps<SearchBox> {
|
|
6
6
|
}
|
package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-commerce.index.d.ts
CHANGED
|
@@ -93,17 +93,17 @@ export type { Pagination, PaginationProps, PaginationState, } from './controller
|
|
|
93
93
|
export { definePagination } from './controllers/commerce/core/pagination/headless-core-commerce-pagination.ssr.js';
|
|
94
94
|
export type { ParameterManager, ParameterManagerProps, SSRParameterManagerProps, ParameterManagerState, Parameters, ProductListingParameters, CommerceSearchParameters, } from './controllers/commerce/core/parameter-manager/headless-core-parameter-manager.ssr.js';
|
|
95
95
|
export { defineParameterManager } from './controllers/commerce/core/parameter-manager/headless-core-parameter-manager.ssr.js';
|
|
96
|
-
export type { ProductList, ProductListState, } from './controllers/commerce/product-list/headless-product-list.ssr.js';
|
|
96
|
+
export type { ProductList, ProductListState, ProductListing, Search, } from './controllers/commerce/product-list/headless-product-list.ssr.js';
|
|
97
97
|
export { defineProductList } from './controllers/commerce/product-list/headless-product-list.ssr.js';
|
|
98
98
|
export type { ProductView } from './controllers/commerce/product-view/headless-product-view.ssr.js';
|
|
99
99
|
export { defineProductView } from './controllers/commerce/product-view/headless-product-view.ssr.js';
|
|
100
|
-
export type { RecommendationsState, Recommendations, } from './controllers/commerce/recommendations/headless-recommendations.ssr.js';
|
|
100
|
+
export type { RecommendationsState, Recommendations, RecommendationsDefinition, } from './controllers/commerce/recommendations/headless-recommendations.ssr.js';
|
|
101
101
|
export { defineRecommendations } from './controllers/commerce/recommendations/headless-recommendations.ssr.js';
|
|
102
102
|
export type { Cart, CartInitialState, CartItem, CartProps, CartState, CartBuildProps, CartDefinition, } from './controllers/commerce/context/cart/headless-cart.ssr.js';
|
|
103
103
|
export { defineCart } from './controllers/commerce/context/cart/headless-cart.ssr.js';
|
|
104
104
|
export type { Context, ContextOptions, ContextProps, ContextState, View, UserLocation, ContextDefinition, } from './controllers/commerce/context/headless-context.ssr.js';
|
|
105
105
|
export { defineContext } from './controllers/commerce/context/headless-context.ssr.js';
|
|
106
|
-
export type { SearchBox, SearchBoxOptions, SearchBoxProps, SearchBoxState, Suggestion, SearchBoxDefinition, } from './controllers/commerce/search-box/headless-search-box.ssr.js';
|
|
106
|
+
export type { SearchBox, SearchBoxOptions, SearchBoxProps, SearchBoxState, Suggestion, SearchBoxDefinition, CoreSearchBox, } from './controllers/commerce/search-box/headless-search-box.ssr.js';
|
|
107
107
|
export { defineSearchBox } from './controllers/commerce/search-box/headless-search-box.ssr.js';
|
|
108
108
|
export type { Sort, SortProps, SortState, } from './controllers/commerce/core/sort/headless-core-commerce-sort.ssr.js';
|
|
109
109
|
export { defineSort } from './controllers/commerce/core/sort/headless-core-commerce-sort.ssr.js';
|
|
@@ -125,6 +125,7 @@ export type { StandaloneSearchBox, StandaloneSearchBoxProps, StandaloneSearchBox
|
|
|
125
125
|
export { defineStandaloneSearchBox } from './controllers/commerce/standalone-search-box/headless-standalone-search-box.ssr.js';
|
|
126
126
|
export type { InstantProducts, InstantProductsOptions, InstantProductsState, InstantProductsProps, InstantProductsDefinition, } from './controllers/commerce/instant-products/headless-instant-products.ssr.js';
|
|
127
127
|
export { defineInstantProducts } from './controllers/commerce/instant-products/headless-instant-products.ssr.js';
|
|
128
|
+
export type { InteractiveProduct, InteractiveProductOptions, InteractiveProductProps, } from './controllers/commerce/core/interactive-product/headless-core-interactive-product.js';
|
|
128
129
|
export * from './features/commerce/context/context-actions-loader.js';
|
|
129
130
|
export * from './features/commerce/search/search-actions-loader.js';
|
|
130
131
|
export * from './features/commerce/product-listing/product-listing-actions-loader.js';
|