@coveo/quantic 3.33.5 → 3.33.6
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 +2 -2
- package/force-app/main/default/staticresources/coveoheadless/headless.js +2 -2
- package/force-app/main/default/staticresources/coveoheadless/insight/headless.js +2 -2
- package/force-app/main/default/staticresources/coveoheadless/recommendation/headless.js +2 -2
- package/package.json +3 -3
|
@@ -24,7 +24,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
24
24
|
|
|
25
25
|
${t}
|
|
26
26
|
`;return new Dn(r)}var Dn=class extends Error{constructor(e){super(e),this.name="SchemaValidationError"}},ce=class{constructor(e){this.definition=e}validate(e={},t=""){let r={...this.default,...e},n=[];for(let o in this.definition){let a=this.definition[o].validate(r[o]);a&&n.push(`${o}: ${a}`)}if(n.length)throw Pb(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}},ve=class{constructor(e={}){this.baseConfig=e}validate(e){return this.baseConfig.required&&U(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 po(e){return e===void 0}function Eb(e){return e===null}function U(e){return po(e)||Eb(e)}var X=class{constructor(e={}){ye(this,"value");this.value=new ve(e)}validate(e){let t=this.value.validate(e);return t||(qb(e)?null:"value is not a boolean.")}get default(){return this.value.default}get required(){return this.value.required}};function qb(e){return po(e)||Fs(e)}function Fs(e){return typeof e=="boolean"}var B=class{constructor(e={}){ye(this,"value");this.config=e,this.value=new ve(e)}validate(e){let t=this.value.validate(e);return t||(Tb(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 Tb(e){return po(e)||mg(e)}function mg(e){return typeof e=="number"&&!Number.isNaN(e)}var kb=/^\d{4}(-\d\d(-\d\d(T\d\d:\d\d(:\d\d)?(\.\d+)?(([+-]\d\d:\d\d)|Z)?)?)?)?$/i,V=class{constructor(e={}){ye(this,"value");ye(this,"config");this.config={emptyAllowed:!0,url:!1,...e},this.value=new ve(this.config)}validate(e){let{emptyAllowed:t,url:r,regex:n,constrainTo:o,ISODate:a}=this.config,d=this.value.validate(e);if(d)return d;if(po(e))return null;if(!mo(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(", ")}.`:a&&!(kb.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 mo(e){return Object.prototype.toString.call(e)==="[object String]"}var M=class{constructor(e={}){ye(this,"config");this.config={options:{required:!1},values:{},...e}}validate(e){if(po(e))return this.config.options.required?"value is required and is currently undefined":null;if(!fg(e))return"value is not an object";for(let[r,n]of Object.entries(this.config.values))if(n.required&&U(e[r]))return`value does not contain ${r}`;let t="";for(let[r,n]of Object.entries(this.config.values)){let o=e[r],a=n.validate(o);a!==null&&(t+=` ${a}`)}return t===""?null:t}get default(){}get required(){return!!this.config.options.required}};function fg(e){return e!==void 0&&typeof e=="object"}var z=class{constructor(e={}){ye(this,"value");this.config=e,this.value=new ve(this.config)}validate(e){if(!U(e)&&!Array.isArray(e))return"value is not an array";let t=this.value.validate(e);if(t!==null)return t;if(U(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&&U(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 Fs(e)||mo(e)||mg(e)||fg(e)?t.validate(e):"value is not a primitive value"}get default(){}get required(){return this.value.required}};function fo(e){return Array.isArray(e)}var Nr=class{constructor(e){ye(this,"value");this.config=e,this.value=new ve(e)}validate(e){let t=this.value.validate(e);return t!==null?t:po(e)||Object.values(this.config.enum).find(n=>n===e)?null:"value is not in enum."}get default(){return this.value.default}get required(){return this.value.required}};l();s();u();c();var bs=(e,t=5)=>e+Math.random().toString(36).substring(2,2+t);function Is(e){return Array.isArray(e)}function ws(e){return e.trim()===""}function gg(e,t){return[...e.reduce((r,n)=>{let o=t(n);return r.has(o)||r.set(o,n),r},new Map).values()]}function Ob(e){return btoa(encodeURI(e))}function Ps(e,t){let{[e]:r,...n}=t;return n}function go(e){return Ob(JSON.stringify(e))}var Db=new Set(["1",1,"yes",!0]);function yg(){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=>Db.has(r))}function hg(e){let t={};for(let[r,n]of e)t[r]=n;return t}function Sg(e,t,r){return clearTimeout(t),setTimeout(e,r)}function ri(e){if(typeof e!="object"||!e)return e;try{return JSON.parse(JSON.stringify(e))}catch{return e}}function Es(e,t,r={}){let n;return(...o)=>{let a=r.isImmediate&&!n;if(clearTimeout(n),n=setTimeout(()=>{n=void 0,r.isImmediate||e.apply(void 0,o)},t),a)return e.apply(void 0,o)}}function jb(e){if(ws(e.openingDelimiter)||ws(e.closingDelimiter))throw Error("delimiters should be a non-empty string");if(U(e.content)||ws(e.content))return e.content;if(e.highlights.length===0)return yo(e.content);let t=e.content.length,r="",n=0;for(let o=0;o<e.highlights.length;o++){let a=e.highlights[o],d=a.offset,p=d+a.length;if(p>t)break;r+=yo(e.content.slice(n,d)),r+=e.openingDelimiter,r+=yo(e.content.slice(d,p)),r+=e.closingDelimiter,n=p}return n!==t&&(r+=yo(e.content.slice(n))),r}function Hd(e,t){return e=yo(e),e.replace(/\[(.*?)\]|\{(.*?)\}|\((.*?)\)/g,(r,n,o,a)=>n?$d(n,t.notMatchDelimiters):o?$d(o,t.exactMatchDelimiters):a?$d(a,t.correctionDelimiters):r)}function $d(e,t){return t?t.open+e+t.close:e}function yo(e){let t={"&":"&","<":"<",">":">","\"":""","'":"'","`":"`"},r=`(?:${Object.keys(t).join("|")})`,n=RegExp(r),o=RegExp(r,"g");return n.test(e)?e.replace(o,a=>t[a]):e}l();s();u();c();l();s();u();c();l();s();u();c();l();s();u();c();function Ag(_x2,_x3){return _Ag.apply(this,arguments)}function _Ag(){_Ag=_asyncToGenerator(function*(e,t){let r=e.getReader(),n;for(;!(n=yield r.read()).done;)t(n.value)});return _Ag.apply(this,arguments)}function vg(e){let t,r,n,o=!1;return function(d){t===void 0?(t=d,r=0,n=-1):t=Nb(t,d);let p=t.length,m=0;for(;r<p;){o&&(t[r]===10&&(m=++r),o=!1);let f=-1;for(;r<p&&f===-1;++r)switch(t[r]){case 58:n===-1&&(n=r-m);break;case 13:o=!0,f=r;break;case 10:f=r;break}if(f===-1)break;e(t.subarray(m,f),n),m=r,n=-1}m===p?t=void 0:m!==0&&(t=t.subarray(m),r-=m)}}function Rg(e,t,r){let n=Cg(),o=new TextDecoder;return function(d,p){if(d.length===0)r?.(n),n=Cg();else if(p>0){let m=o.decode(d.subarray(0,p)),f=p+(d[p+1]===32?2:1),g=o.decode(d.subarray(f));switch(m){case"data":n.data=n.data?`${n.data}
|
|
27
|
-
${g}`:g;break;case"event":n.event=g;break;case"id":e(n.id=g);break;case"retry":Vb(g,n,t);break}}}}function Vb(e,t,r){let n=parseInt(e,10);Number.isNaN(n)||r(t.retry=n)}function Nb(e,t){let r=new Uint8Array(e.length+t.length);return r.set(e),r.set(t,e.length),r}function Cg(){return{data:"",event:"",id:"",retry:void 0}}var zd="text/event-stream",Mb=1e3,xg="last-event-id";function Fg(){return typeof window<"u"}function qs(e,{signal:t,headers:r,onopen:n,onmessage:o,onclose:a,onerror:d,openWhenHidden:p,fetch:m,...f}){return new Promise((g,C)=>{let v={...r};v.accept||(v.accept=zd);let A;function R(){A?.abort(),document.hidden||T()}!p&&Fg()&&document.addEventListener("visibilitychange",R);let F=Mb,x;function w(){Fg()&&document.removeEventListener("visibilitychange",R),clearTimeout(x),A?.abort()}t?.addEventListener("abort",()=>{w(),g()});let P=m??y,b=n??Qb;function T(){return _T2.apply(this,arguments)}function _T2(){_T2=_asyncToGenerator(function*(){A=i.AbortController?new i.AbortController:null;try{let N=yield P(e,{...f,headers:v,signal:A?.signal});yield b(N),yield Ag(N.body,vg(Rg(O=>{O?v[xg]=O:delete v[xg]},O=>{F=O},o))),a?.(),w(),g()}catch(N){if(!A?.signal?.aborted)try{let O=d?.(N)??F;clearTimeout(x),x=setTimeout(T,O)}catch(O){w(),C(O)}}});return _T2.apply(this,arguments)}T()})}function Qb(e){let t=e.headers.get("content-type");if(!t?.startsWith(zd))throw new Error(`Expected content-type to be ${zd}, Actual: ${t}`)}l();s();u();c();var Mr=class{constructor(t){ye(this,"_basePath");ye(this,"_params",{});this._basePath=t}addParam(t,r){this._params={...this.params,[t]:r}}get basePath(){return this._basePath}get params(){return this._params}get hasParams(){return Object.entries(this._params).length}get href(){return this.hasParams?`${this.basePath}?${Object.entries(this.params).map(([t,r])=>`${t}=${encodeURIComponent(r)}`).join("&")}`:this.basePath}};var Lb=(e,t,r)=>new Mr(`${e}/rest/organizations/${t}/machinelearning/streaming/${r}`).href,bg=3,_b=5e3,Ub="text/event-stream",Kd=1,Wd=class extends Error{},ni=class extends Error{constructor(r){super(r.message);this.payload=r}},Yd=class{constructor(){ye(this,"timeouts",new Set)}add(t){this.timeouts.add(t)}remove(t){clearTimeout(t),this.timeouts.delete(t)}isActive(t){return this.timeouts.has(t)}},Ts=class{constructor(t){ye(this,"logger");this.logger=t.logger}streamGeneratedAnswer(t,r){let{url:n,organizationId:o,streamId:a,accessToken:d}=t,{write:p,abort:m,close:f,resetAnswer:g}=r,C=new Yd;if(!a){this.logger.error("No stream ID found");return}let v=0,A,R=()=>{A&&!C.isActive(A)&&(x?.abort(),g(),w())},F=()=>{C.remove(A),A=Sg(R,A,_b),C.add(A)},x=new i.AbortController,w=()=>qs(Lb(n,o,a),{method:"GET",fetch:y,headers:{Authorization:`Bearer ${d}`,accept:"*/*"},openWhenHidden:!0,signal:x?.signal,onopen(P){return _asyncToGenerator(function*(){if(P.ok&&P.headers.get("content-type")===Ub)return;throw P.status>=400&&P.status<500&&P.status!==429?new ni({message:"Error opening stream",code:P.status}):new Wd})()},onmessage:P=>{if(x?.signal.aborted)return;let b=JSON.parse(P.data);if(b.finishReason==="ERROR"){C.remove(A),x?.abort(),m({message:b.errorMessage,code:b.statusCode});return}p(b),v=0,b.finishReason==="COMPLETED"?(C.remove(A),f()):F()},onerror:P=>{if(!x?.signal.aborted){if(C.remove(A),P instanceof ni)throw x?.abort(),m(P),P;if(++v>bg){this.logger.info("Maximum retry exceeded.");let b={message:"Failed to complete stream.",code:Kd};throw x?.abort(),m(b),new ni(b)}this.logger.info(`Retrying...(${v}/${bg})`),g()}}});return w(),x}};l();s();u();c();var ks=e=>e;l();s();u();c();l();s();u();c();var Ng=vs(Og(),1);l();s();u();c();var W=new Error("Failed to load reducers."),ho=class extends Error{constructor(){super(),this.name="UnauthorizedTokenError",this.message="The token being used to perform the request is unauthorized. It may be expired or invalid."}},Vn=class extends Error{constructor(r,n){super();ye(this,"statusCode");this.name="Disconnected",this.message=`Client could not connect to the following URL: ${r}`,this.statusCode=n??0}};l();s();u();c();function Dg(e){let t=[];for(let r in e){let n=encodeURIComponent(r),o=encodeURIComponent(e[r]);t.push(`${n}=${o}`)}return t.join("&")}function jg(e){return typeof e!="object"||!e?!1:Object.values(e).every(fI)}function fI(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"}function Vg(e){return e===429}var Vt=class e{static call(t){return _asyncToGenerator(function*(){let r=gI(t),{logger:n}=t,o=yield e.preprocessRequest(r,t);n.info(o,"Platform request");let{url:a,...d}=o,p=/*#__PURE__*/function(){var _ref=_asyncToGenerator(function*(){let m=yield y(a,d);if(Vg(m.status))throw m;return m});return function p(){return _ref.apply(this,arguments)}}();try{let m=yield(0,Ng.backOff)(p,{startingDelay:100,timeMultiple:2,maxDelay:800,numOfAttempts:4,jitter:"full",retry:function(){var _ref2=_asyncToGenerator(function*(f){let g=f&&Vg(f.status);return g&&(n.info("Platform retrying request"),yield new Promise(C=>setTimeout(C,1e3))),g});return function retry(_x4){return _ref2.apply(this,arguments)}}()});switch(m.status){case 419:case 401:throw n.info("Platform renewing token"),new ho;case 404:throw new Vn(a,m.status);default:return n.info({response:m,requestInfo:o},"Platform response"),m}}catch(m){return m.message==="Failed to fetch"?new Vn(a):m}})()}static preprocessRequest(t,r){return _asyncToGenerator(function*(){let{origin:n,preprocessRequest:o,logger:a,requestMetadata:d}=r,{signal:p,...m}=t,f=ri(m);try{let g=yield o(t,n,d);return{...t,...g}}catch(g){a.error(g,"Platform request preprocessing failed. Returning default request options.")}return f})()}};function be(e,t="prod",r="platform"){let n=t==="prod"?"":t,o=r==="platform"?"":`.${r}`;return`https://${e}${o}.org${n}.coveo.com`}function ut(e,t="prod"){return`${be(e,t)}/rest/search/v2`}function Ds(e,t="prod"){return`${be(e,t,"analytics")}/rest/organizations/${e}/events/v1`}function gI(e){let{url:t,method:r,requestParams:n,contentType:o,accessToken:a,signal:d}=e,p=e.method==="POST"||e.method==="PUT",m=yI(n,o);return{url:t,method:r,headers:{"Content-Type":o,Authorization:`Bearer ${a}`,...e.headers},...(p&&{body:m}),signal:d}}function yI(e,t){return t==="application/x-www-form-urlencoded"?jg(e)?Dg(e):"":JSON.stringify(e)}l();s();u();c();l();s();u();c();function ii(e){let{url:t,accessToken:r,organizationId:n,authentication:o,...a}=e;return a}var ap=e=>{let{response:t}=e;return t.body?hI(e):SI(t)},hI=e=>AI(e)?vI(e):CI(e)?e.body:{message:"unknown",statusCode:0,type:"unknown"},SI=e=>{let t=JSON.parse(JSON.stringify(e,Object.getOwnPropertyNames(e)));return{...t,message:`Client side error: ${t.message||""}`,statusCode:400,type:"ClientError"}};function CI(e){return e.body.statusCode!==void 0}function AI(e){return e.body.exception!==void 0}var vI=e=>({message:e.body.exception.code,statusCode:e.response.status,type:e.body.exception.code});l();s();u();c();function Mg(e){return((e.headers.get("content-type")||"").split(";").find(n=>n.indexOf("charset=")!==-1)||"").split("=")[1]||"UTF-8"}l();s();u();c();var ip=(e,t,r,n)=>{let o=new Mr(`${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 Qg=(e,t)=>{let r=new Mr(`${e.url}${t}`);return r.addParam("access_token",e.accessToken),r.addParam("organizationId",e.organizationId),r.addParam("uniqueId",e.uniqueId),e.authentication&&r.addParam("authentication",e.authentication),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},sp=/*#__PURE__*/function(){var _ref3=_asyncToGenerator(function*(e,t){let r=yield Vt.call({...ip(e,"POST","application/x-www-form-urlencoded","/html"),requestParams:ii(e),requestMetadata:{method:"html"},...t});if(r instanceof Error)throw r;let n=Mg(r),o=yield r.arrayBuffer(),d=new TextDecoder(n).decode(o);return RI(d)?{success:d}:{error:ap({response:r,body:d})}});return function sp(_x5,_x6){return _ref3.apply(this,arguments)}}();function RI(e){return typeof e=="string"}l();s();u();c();l();s();u();c();function So(){return{answerSnippet:"",documentId:{contentIdKey:"",contentIdValue:""},question:"",relatedQuestions:[],score:0}}function _e(){return{response:{results:[],searchUid:"",totalCountFiltered:0,facets:[],generateAutomaticFacets:{facets:[]},queryCorrections:[],triggers:[],questionAnswer:So(),pipeline:"",splitTestRun:"",termsToHighlight:{},phrasesToHighlight:{},extendedResults:{}},duration:0,queryExecuted:"",error:null,automaticallyCorrected:!1,isLoading:!1,results:[],searchResponseId:"",requestId:"",questionAnswer:So(),extendedResults:{},searchAction:void 0}}l();s();u();c();l();s();u();c();function xI(e){return{statusCode:e.statusCode,type:e.name,message:e.message}}function FI(e){return{statusCode:e.code,type:e.name,message:e.message,ignored:!0}}function Nn(e,t){if(t&&e.name==="AbortError")return{error:FI(e)};if(e instanceof Vn)return{error:xI(e)};throw e}var Qr=e=>e.success!==void 0,Re=e=>e.error!==void 0;function Lg(e){return e.results!==void 0}function _g(e){let t=So();return U(e.questionAnswer)?(e.questionAnswer=t,e):(e.questionAnswer={...t,...e.questionAnswer},e)}l();s();u();c();l();s();u();c();var cp=(e,t)=>`${e.url}/rest/organizations/${e.organizationId}/insight/v1/configs/${e.insightId}${t??""}`,bI=e=>`${e.url}/rest/organizations/${e.organizationId}/machinelearning/user/actions`,si=(e,t,r,n)=>{II(e);let o=cp(e,n);return{accessToken:e.accessToken,method:t,contentType:r,url:o,origin:"insightApiFetch"}},Ug=(e,t,r)=>{wI(e);let n=bI(e);return{accessToken:e.accessToken,method:t,contentType:r,url:n,origin:"insightApiFetch"}},up=e=>{let{insightId:t,...r}=ii(e);return r},Bg=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.")},II=e=>{if(Bg(e),!e.insightId)throw new Error("The 'insightId' attribute must contain a valid Insight Panel configuration ID.")},wI=e=>{if(Bg(e),!e.userId)throw new Error("The 'userId' attribute must contain a valid user ID.")};var $g=e=>({...si(e,"GET","application/json","/interface"),requestParams:{}});l();s();u();c();var Hg=e=>({...si(e,"POST","application/json","/search"),requestParams:up(e)}),Gg=e=>({...si(e,"POST","application/json","/querysuggest"),requestParams:up(e)});l();s();u();c();var zg=e=>({...Ug(e,"POST","application/json"),requestParams:{objectId:e.userId}});var js=class{constructor(t){this.options=t}getInterface(t){var _this=this;return _asyncToGenerator(function*(){let r=yield Vt.call({...$g(t),..._this.options});if(r instanceof Error)return Nn(r);let n=yield r.json();return r.ok?{success:n}:{error:n}})()}query(t,r){var _this2=this;return _asyncToGenerator(function*(){let n=yield Vt.call({...Hg(t),requestMetadata:{method:"search",origin:r?.origin},..._this2.options});if(n instanceof Error)return Nn(n);let o=yield n.json();return Lg(o)&&(o=_g(o)),n.ok?{success:o}:{error:o}})()}querySuggest(t){var _this3=this;return _asyncToGenerator(function*(){let r=yield Vt.call({...Gg(t),..._this3.options});if(r instanceof Error)return Nn(r);let n=yield r.json();return n.completions?{success:n}:{error:n}})()}userActions(t){var _this4=this;return _asyncToGenerator(function*(){let r=yield Vt.call({...zg(t),..._this4.options});if(r instanceof Error)return Nn(r);let n=yield r.json();return r.ok?{success:n}:{error:n}})()}html(t){var _this5=this;return _asyncToGenerator(function*(){return sp(t,{..._this5.options})})()}};l();s();u();c();l();s();u();c();var Q=new V({required:!0,emptyAllowed:!1}),he=new V({required:!1,emptyAllowed:!1}),xe=new V({required:!0,emptyAllowed:!0}),Wg=new V({required:!1,emptyAllowed:!0}),Vs=new z({each:Q,required:!0}),Yg=new V({required:!1,emptyAllowed:!1,regex:/^\d+\.\d+\.\d+$/}),Kg=new V({required:!1,emptyAllowed:!1,regex:/^[a-zA-Z0-9_\-.]{1,100}$/}),x0=new V({required:!0,emptyAllowed:!1,regex:/^[a-zA-Z0-9_\-.]{1,100}$/}),Nt=({message:e,name:t,stack:r})=>({message:e,name:t,stack:r}),wt=(e,t)=>{if("required"in t)return{payload:new ce({value:t}).validate({value:e}).value};let o=new M({options:{required:!0},values:t}).validate(e);if(o)throw new Dn(o);return{payload:e}},E=(e,t)=>{try{return wt(e,t)}catch(r){return{payload:e,error:Nt(r)}}},Pt=(e,t,r,n)=>{let o=`Check the initialState of ${n}`;return Jg(e,t,r,o,"Controller initialization error")},Qe=(e,t,r,n)=>{let o=`Check the options of ${n}`;return Jg(e,t,r,o,"Controller initialization error")},Jg=(e,t,r,n,o)=>{try{return t.validate(r,n)}catch(a){throw e.logger.error(a,o),a}};l();s();u();c();l();s();u();c();l();s();u();c();function He(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 PI=typeof Symbol=="function"&&Symbol.observable||"@@observable",Xg=PI,lp=()=>Math.random().toString(36).substring(7).split("").join("."),EI={INIT:`@@redux/INIT${lp()}`,REPLACE:`@@redux/REPLACE${lp()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${lp()}`},Ns=EI;function Wt(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 dp(e,t,r){if(typeof e!="function")throw new Error(He(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(He(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(He(1));return r(dp)(e,t)}let n=e,o=t,a=new Map,d=a,p=0,m=!1;function f(){d===a&&(d=new Map,a.forEach((x,w)=>{d.set(w,x)}))}function g(){if(m)throw new Error(He(3));return o}function C(x){if(typeof x!="function")throw new Error(He(4));if(m)throw new Error(He(5));let w=!0;f();let P=p++;return d.set(P,x),function(){if(w){if(m)throw new Error(He(6));w=!1,f(),d.delete(P),a=null}}}function v(x){if(!Wt(x))throw new Error(He(7));if(typeof x.type>"u")throw new Error(He(8));if(typeof x.type!="string")throw new Error(He(17));if(m)throw new Error(He(9));try{m=!0,o=n(o,x)}finally{m=!1}return(a=d).forEach(P=>{P()}),x}function A(x){if(typeof x!="function")throw new Error(He(10));n=x,v({type:Ns.REPLACE})}function R(){let x=C;return{subscribe(w){if(typeof w!="object"||w===null)throw new Error(He(11));function P(){let T=w;T.next&&T.next(g())}return P(),{unsubscribe:x(P)}},[Xg](){return this}}}return v({type:Ns.INIT}),{dispatch:v,subscribe:C,getState:g,replaceReducer:A,[Xg]:R}}function qI(e){Object.keys(e).forEach(t=>{let r=e[t];if(typeof r(void 0,{type:Ns.INIT})>"u")throw new Error(He(12));if(typeof r(void 0,{type:Ns.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(He(13))})}function Co(e){let t=Object.keys(e),r={};for(let d=0;d<t.length;d++){let p=t[d];typeof e[p]=="function"&&(r[p]=e[p])}let n=Object.keys(r),o,a;try{qI(r)}catch(d){a=d}return function(p={},m){if(a)throw a;let f=!1,g={};for(let C=0;C<n.length;C++){let v=n[C],A=r[v],R=p[v],F=A(R,m);if(typeof F>"u"){let x=m&&m.type;throw new Error(He(14))}g[v]=F,f=f||F!==R}return f=f||n.length!==Object.keys(p).length,f?g:p}}function Ao(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function Zg(...e){return t=>(r,n)=>{let o=t(r,n),a=()=>{throw new Error(He(15))},d={getState:o.getState,dispatch:(m,...f)=>a(m,...f)},p=e.map(m=>m(d));return a=Ao(...p)(o.dispatch),{...o,dispatch:a}}}function Ms(e){return Wt(e)&&"type"in e&&typeof e.type=="string"}l();s();u();c();var vp=Symbol.for("immer-nothing"),ci=Symbol.for("immer-draftable"),lt=Symbol.for("immer-state");function Ge(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var vo=Object.getPrototypeOf;function St(e){return!!e&&!!e[lt]}function dt(e){return e?ay(e)||Array.isArray(e)||!!e[ci]||!!e.constructor?.[ci]||Ro(e)||fi(e):!1}var TI=Object.prototype.constructor.toString(),ey=new WeakMap;function ay(e){if(!e||typeof e!="object")return!1;let t=Object.getPrototypeOf(e);if(t===null||t===Object.prototype)return!0;let r=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;if(r===Object)return!0;if(typeof r!="function")return!1;let n=ey.get(r);return n===void 0&&(n=Function.toString.call(r),ey.set(r,n)),n===TI}function Rp(e){return St(e)||Ge(15,e),e[lt].base_}function ui(e,t,r=!0){Qn(e)===0?(r?Reflect.ownKeys(e):Object.keys(e)).forEach(o=>{t(o,e[o],e)}):e.forEach((n,o)=>t(o,n,e))}function Qn(e){let t=e[lt];return t?t.type_:Array.isArray(e)?1:Ro(e)?2:fi(e)?3:0}function li(e,t){return Qn(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function pp(e,t){return Qn(e)===2?e.get(t):e[t]}function iy(e,t,r){let n=Qn(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function kI(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Ro(e){return e instanceof Map}function fi(e){return e instanceof Set}function Mn(e){return e.copy_||e.base_}function gp(e,t){if(Ro(e))return new Map(e);if(fi(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);let r=ay(e);if(t===!0||t==="class_only"&&!r){let n=Object.getOwnPropertyDescriptors(e);delete n[lt];let o=Reflect.ownKeys(n);for(let a=0;a<o.length;a++){let d=o[a],p=n[d];p.writable===!1&&(p.writable=!0,p.configurable=!0),(p.get||p.set)&&(n[d]={configurable:!0,writable:!0,enumerable:p.enumerable,value:e[d]})}return Object.create(vo(e),n)}else{let n=vo(e);if(n!==null&&r)return{...e};let o=Object.create(n);return Object.assign(o,e)}}function Us(e,t=!1){return Bs(e)||St(e)||!dt(e)||(Qn(e)>1&&Object.defineProperties(e,{set:Qs,add:Qs,clear:Qs,delete:Qs}),Object.freeze(e),t&&Object.values(e).forEach(r=>Us(r,!0))),e}function OI(){Ge(2)}var Qs={value:OI};function Bs(e){return e===null||typeof e!="object"?!0:Object.isFrozen(e)}var yp={};function Ln(e){let t=yp[e];return t||Ge(0,e),t}function DI(e,t){yp[e]||(yp[e]=t)}var di;function sy(){return di}function jI(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function ty(e,t){t&&(Ln("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function hp(e){Sp(e),e.drafts_.forEach(VI),e.drafts_=null}function Sp(e){e===di&&(di=e.parent_)}function ry(e){return di=jI(di,e)}function VI(e){let t=e[lt];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function ny(e,t){t.unfinalizedDrafts_=t.drafts_.length;let r=t.drafts_[0];return e!==void 0&&e!==r?(r[lt].modified_&&(hp(t),Ge(4)),dt(e)&&(e=Ls(t,e),t.parent_||_s(t,e)),t.patches_&&Ln("Patches").generateReplacementPatches_(r[lt].base_,e,t.patches_,t.inversePatches_)):e=Ls(t,r,[]),hp(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==vp?e:void 0}function Ls(e,t,r){if(Bs(t))return t;let n=e.immer_.shouldUseStrictIteration(),o=t[lt];if(!o)return ui(t,(a,d)=>oy(e,o,t,a,d,r),n),t;if(o.scope_!==e)return t;if(!o.modified_)return _s(e,o.base_,!0),o.base_;if(!o.finalized_){o.finalized_=!0,o.scope_.unfinalizedDrafts_--;let a=o.copy_,d=a,p=!1;o.type_===3&&(d=new Set(a),a.clear(),p=!0),ui(d,(m,f)=>oy(e,o,a,m,f,r,p),n),_s(e,a,!1),r&&e.patches_&&Ln("Patches").generatePatches_(o,r,e.patches_,e.inversePatches_)}return o.copy_}function oy(e,t,r,n,o,a,d){if(o==null||typeof o!="object"&&!d)return;let p=Bs(o);if(!(p&&!d)){if(St(o)){let m=a&&t&&t.type_!==3&&!li(t.assigned_,n)?a.concat(n):void 0,f=Ls(e,o,m);if(iy(r,n,f),St(f))e.canAutoFreeze_=!1;else return}else d&&r.add(o);if(dt(o)&&!p){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1||t&&t.base_&&t.base_[n]===o&&p)return;Ls(e,o),(!t||!t.scope_.parent_)&&typeof n!="symbol"&&(Ro(r)?r.has(n):Object.prototype.propertyIsEnumerable.call(r,n))&&_s(e,o)}}}function _s(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Us(t,r)}function NI(e,t){let r=Array.isArray(e),n={type_:r?1:0,scope_:t?t.scope_:sy(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1},o=n,a=xp;r&&(o=[n],a=pi);let{revoke:d,proxy:p}=Proxy.revocable(o,a);return n.draft_=p,n.revoke_=d,p}var xp={get(e,t){if(t===lt)return e;let r=Mn(e);if(!li(r,t))return MI(e,r,t);let n=r[t];return e.finalized_||!dt(n)?n:n===mp(e.base_,t)?(fp(e),e.copy_[t]=Ap(n,e)):n},has(e,t){return t in Mn(e)},ownKeys(e){return Reflect.ownKeys(Mn(e))},set(e,t,r){let n=cy(Mn(e),t);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){let o=mp(Mn(e),t),a=o?.[lt];if(a&&a.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(kI(r,o)&&(r!==void 0||li(e.base_,t)))return!0;fp(e),Cp(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 mp(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,fp(e),Cp(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let r=Mn(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 vo(e.base_)},setPrototypeOf(){Ge(12)}},pi={};ui(xp,(e,t)=>{pi[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});pi.deleteProperty=function(e,t){return pi.set.call(this,e,t,void 0)};pi.set=function(e,t,r){return xp.set.call(this,e[0],t,r,e[0])};function mp(e,t){let r=e[lt];return(r?Mn(r):e)[t]}function MI(e,t,r){let n=cy(t,r);return n?"value"in n?n.value:n.get?.call(e.draft_):void 0}function cy(e,t){if(!(t in e))return;let r=vo(e);for(;r;){let n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=vo(r)}}function Cp(e){e.modified_||(e.modified_=!0,e.parent_&&Cp(e.parent_))}function fp(e){e.copy_||(e.copy_=gp(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var QI=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!0,this.produce=(t,r,n)=>{if(typeof t=="function"&&typeof r!="function"){let a=r;r=t;let d=this;return function(m=a,...f){return d.produce(m,g=>r.call(this,g,...f))}}typeof r!="function"&&Ge(6),n!==void 0&&typeof n!="function"&&Ge(7);let o;if(dt(t)){let a=ry(this),d=Ap(t,void 0),p=!0;try{o=r(d),p=!1}finally{p?hp(a):Sp(a)}return ty(a,n),ny(o,a)}else if(!t||typeof t!="object"){if(o=r(t),o===void 0&&(o=t),o===vp&&(o=void 0),this.autoFreeze_&&Us(o,!0),n){let a=[],d=[];Ln("Patches").generateReplacementPatches_(t,o,a,d),n(a,d)}return o}else Ge(1,t)},this.produceWithPatches=(t,r)=>{if(typeof t=="function")return(d,...p)=>this.produceWithPatches(d,m=>t(m,...p));let n,o;return[this.produce(t,r,(d,p)=>{n=d,o=p}),n,o]},typeof e?.autoFreeze=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof e?.useStrictShallowCopy=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),typeof e?.useStrictIteration=="boolean"&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){dt(e)||Ge(8),St(e)&&(e=uy(e));let t=ry(this),r=Ap(e,void 0);return r[lt].isManual_=!0,Sp(t),r}finishDraft(e,t){let r=e&&e[lt];(!r||!r.isManual_)&&Ge(9);let{scope_:n}=r;return ty(n,t),ny(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}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=Ln("Patches").applyPatches_;return St(e)?n(e,t):this.produce(e,o=>n(o,t))}};function Ap(e,t){let r=Ro(e)?Ln("MapSet").proxyMap_(e,t):fi(e)?Ln("MapSet").proxySet_(e,t):NI(e,t);return(t?t.scope_:sy()).drafts_.push(r),r}function uy(e){return St(e)||Ge(10,e),ly(e)}function ly(e){if(!dt(e)||Bs(e))return e;let t=e[lt],r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=gp(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=gp(e,!0);return ui(r,(o,a)=>{iy(r,o,ly(a))},n),t&&(t.finalized_=!1),r}function dy(){let t="replace",r="add",n="remove";function o(v,A,R,F){switch(v.type_){case 0:case 2:return d(v,A,R,F);case 1:return a(v,A,R,F);case 3:return p(v,A,R,F)}}function a(v,A,R,F){let{base_:x,assigned_:w}=v,P=v.copy_;P.length<x.length&&([x,P]=[P,x],[R,F]=[F,R]);for(let b=0;b<x.length;b++)if(w[b]&&P[b]!==x[b]){let T=A.concat([b]);R.push({op:t,path:T,value:C(P[b])}),F.push({op:t,path:T,value:C(x[b])})}for(let b=x.length;b<P.length;b++){let T=A.concat([b]);R.push({op:r,path:T,value:C(P[b])})}for(let b=P.length-1;x.length<=b;--b){let T=A.concat([b]);F.push({op:n,path:T})}}function d(v,A,R,F){let{base_:x,copy_:w}=v;ui(v.assigned_,(P,b)=>{let T=pp(x,P),N=pp(w,P),O=b?li(x,P)?t:r:n;if(T===N&&O===t)return;let k=A.concat(P);R.push(O===n?{op:O,path:k}:{op:O,path:k,value:N}),F.push(O===r?{op:n,path:k}:O===n?{op:r,path:k,value:C(T)}:{op:t,path:k,value:C(T)})})}function p(v,A,R,F){let{base_:x,copy_:w}=v,P=0;x.forEach(b=>{if(!w.has(b)){let T=A.concat([P]);R.push({op:n,path:T,value:b}),F.unshift({op:r,path:T,value:b})}P++}),P=0,w.forEach(b=>{if(!x.has(b)){let T=A.concat([P]);R.push({op:r,path:T,value:b}),F.unshift({op:n,path:T,value:b})}P++})}function m(v,A,R,F){R.push({op:t,path:[],value:A===vp?void 0:A}),F.push({op:t,path:[],value:v})}function f(v,A){return A.forEach(R=>{let{path:F,op:x}=R,w=v;for(let N=0;N<F.length-1;N++){let O=Qn(w),k=F[N];typeof k!="string"&&typeof k!="number"&&(k=""+k),(O===0||O===1)&&(k==="__proto__"||k==="constructor")&&Ge(19),typeof w=="function"&&k==="prototype"&&Ge(19),w=pp(w,k),typeof w!="object"&&Ge(18,F.join("/"))}let P=Qn(w),b=g(R.value),T=F[F.length-1];switch(x){case t:switch(P){case 2:return w.set(T,b);case 3:Ge(16);default:return w[T]=b}case r:switch(P){case 1:return T==="-"?w.push(b):w.splice(T,0,b);case 2:return w.set(T,b);case 3:return w.add(b);default:return w[T]=b}case n:switch(P){case 1:return w.splice(T,1);case 2:return w.delete(T);case 3:return w.delete(R.value);default:return delete w[T]}default:Ge(17,x)}}),v}function g(v){if(!dt(v))return v;if(Array.isArray(v))return v.map(g);if(Ro(v))return new Map(Array.from(v.entries()).map(([R,F])=>[R,g(F)]));if(fi(v))return new Set(Array.from(v).map(g));let A=Object.create(vo(v));for(let R in v)A[R]=g(v[R]);return li(v,ci)&&(A[ci]=v[ci]),A}function C(v){return St(v)?g(v):v}DI("Patches",{applyPatches_:f,generatePatches_:o,generateReplacementPatches_:m})}var mi=new QI,Fr=mi.produce,$s=mi.produceWithPatches.bind(mi);var Fp=mi.applyPatches.bind(mi);l();s();u();c();function LI(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function _I(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function UI(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 py=e=>Array.isArray(e)?e:[e];function BI(e){let t=Array.isArray(e[0])?e[0]:e;return UI(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function $I(e,t){let r=[],{length:n}=e;for(let o=0;o<n;o++)r.push(e[o].apply(null,t));return r}var L0=Symbol();var _0=Object.getPrototypeOf({});var HI=class{constructor(e){this.value=e}deref(){return this.value}},GI=typeof WeakRef<"u"?WeakRef:HI,zI=0,my=1;function Hs(){return{s:zI,v:void 0,o:null,p:null}}function xo(e,t={}){let r=Hs(),{resultEqualityCheck:n}=t,o,a=0;function d(){let p=r,{length:m}=arguments;for(let C=0,v=m;C<v;C++){let A=arguments[C];if(typeof A=="function"||typeof A=="object"&&A!==null){let R=p.o;R===null&&(p.o=R=new WeakMap);let F=R.get(A);F===void 0?(p=Hs(),R.set(A,p)):p=F}else{let R=p.p;R===null&&(p.p=R=new Map);let F=R.get(A);F===void 0?(p=Hs(),R.set(A,p)):p=F}}let f=p,g;if(p.s===my)g=p.v;else if(g=e.apply(null,arguments),a++,n){let C=o?.deref?.()??o;C!=null&&n(C,g)&&(g=C,a!==0&&a--),o=typeof g=="object"&&g!==null||typeof g=="function"?new GI(g):g}return f.s=my,f.v=g,g}return d.clearCache=()=>{r=Hs(),d.resetResultsCount()},d.resultsCount=()=>a,d.resetResultsCount=()=>{a=0},d}function fy(e,...t){let r=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,n=(...o)=>{let a=0,d=0,p,m={},f=o.pop();typeof f=="object"&&(m=f,f=o.pop()),LI(f,`createSelector expects an output function after the inputs, but received: [${typeof f}]`);let g={...r,...m},{memoize:C,memoizeOptions:v=[],argsMemoize:A=xo,argsMemoizeOptions:R=[],devModeChecks:F={}}=g,x=py(v),w=py(R),P=BI(o),b=C(function(){return a++,f.apply(null,arguments)},...x),T=!0,N=A(function(){d++;let k=$I(P,arguments);return p=b.apply(null,k),p},...w);return Object.assign(N,{resultFunc:f,memoizedResultFunc:b,dependencies:P,dependencyRecomputations:()=>d,resetDependencyRecomputations:()=>{d=0},lastResult:()=>p,recomputations:()=>a,resetRecomputations:()=>{a=0},memoize:C,argsMemoize:A})};return Object.assign(n,{withTypes:()=>n}),n}var Ie=fy(xo),WI=Object.assign((e,t=Ie)=>{_I(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(a=>e[a]);return t(n,(...a)=>a.reduce((d,p,m)=>(d[r[m]]=p,d),{}))},{withTypes:()=>WI});l();s();u();c();function gy(e){return({dispatch:r,getState:n})=>o=>a=>typeof a=="function"?a(r,n,e):o(a)}var yy=gy(),hy=gy;var YI=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Ao:Ao.apply(null,arguments)},a_=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}},KI=e=>e&&typeof e.match=="function";function I(e,t){function r(...n){if(t){let o=t(...n);if(!o)throw new Error(Mt(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=>Ms(n)&&n.type===e,r}var Ry=class gi extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,gi.prototype)}static get[Symbol.species](){return gi}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new gi(...t[0].concat(this)):new gi(...t.concat(this))}};function Sy(e){return dt(e)?Fr(e,()=>{}):e}function Cy(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function JI(e){return typeof e=="boolean"}var XI=()=>function(t){let{thunk:r=!0,immutableCheck:n=!0,serializableCheck:o=!0,actionCreatorCheck:a=!0}=t??{},d=new Ry;return r&&(JI(r)?d.push(yy):d.push(hy(r.extraArgument))),d},yi="RTK_autoBatch",bo=()=>e=>({payload:e,meta:{[yi]:!0}}),Ay=e=>t=>{setTimeout(t,e)},ZI=(e={type:"raf"})=>t=>(...r)=>{let n=t(...r),o=!0,a=!1,d=!1,p=new Set,m=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Ay(10):e.type==="callback"?e.queueNotification:Ay(e.timeout),f=()=>{d=!1,a&&(a=!1,p.forEach(g=>g()))};return Object.assign({},n,{subscribe(g){let C=()=>o&&g(),v=n.subscribe(C);return p.add(g),()=>{v(),p.delete(g)}},dispatch(g){try{return o=!g?.meta?.[yi],a=!o,a&&(d||(d=!0,m(f))),n.dispatch(g)}finally{o=!0}}})},ew=e=>function(r){let{autoBatch:n=!0}=r??{},o=new Ry(e);return n&&o.push(ZI(typeof n=="object"?n:void 0)),o};function xy(e){let t=XI(),{reducer:r=void 0,middleware:n,devTools:o=!0,preloadedState:a=void 0,enhancers:d=void 0}=e||{},p;if(typeof r=="function")p=r;else if(Wt(r))p=Co(r);else throw new Error(Mt(1));let m;typeof n=="function"?m=n(t):m=t();let f=Ao;o&&(f=YI({trace:!1,...(typeof o=="object"&&o)}));let g=Zg(...m),C=ew(g),v=typeof d=="function"?d(C):C(),A=f(...v);return dp(p,a,A)}function Fy(e){let t={},r=[],n,o={addCase(a,d){let p=typeof a=="string"?a:a.type;if(!p)throw new Error(Mt(28));if(p in t)throw new Error(Mt(29));return t[p]=d,o},addMatcher(a,d){return r.push({matcher:a,reducer:d}),o},addDefaultCase(a){return n=a,o}};return e(o),[t,r,n]}function tw(e){return typeof e=="function"}function J(e,t){let[r,n,o]=Fy(t),a;if(tw(e))a=()=>Sy(e());else{let p=Sy(e);a=()=>p}function d(p=a(),m){let f=[r[m.type],...n.filter(({matcher:g})=>g(m)).map(({reducer:g})=>g)];return f.filter(g=>!!g).length===0&&(f=[o]),f.reduce((g,C)=>{if(C)if(St(g)){let A=C(g,m);return A===void 0?g:A}else{if(dt(g))return Fr(g,v=>C(v,m));{let v=C(g,m);if(v===void 0){if(g===null)return g;throw Error("A case reducer on a non-draftable value must not return undefined")}return v}}return g},p)}return d.getInitialState=a,d}var by=(e,t)=>KI(e)?e.match(t):e(t);function Yt(...e){return t=>e.some(r=>by(r,t))}function Fo(...e){return t=>e.every(r=>by(r,t))}function zs(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 hi(e){return typeof e[0]=="function"&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function Ws(...e){return e.length===0?t=>zs(t,["pending"]):hi(e)?Yt(...e.map(t=>t.pending)):Ws()(e[0])}function _n(...e){return e.length===0?t=>zs(t,["rejected"]):hi(e)?Yt(...e.map(t=>t.rejected)):_n()(e[0])}function Si(...e){let t=r=>r&&r.meta&&r.meta.rejectedWithValue;return e.length===0?Fo(_n(...e),t):hi(e)?Fo(_n(...e),t):Si()(e[0])}function br(...e){return e.length===0?t=>zs(t,["fulfilled"]):hi(e)?Yt(...e.map(t=>t.fulfilled)):br()(e[0])}function Ys(...e){return e.length===0?t=>zs(t,["pending","fulfilled","rejected"]):hi(e)?Yt(...e.flatMap(t=>[t.pending,t.rejected,t.fulfilled])):Ys()(e[0])}var rw="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Ks=(e=21)=>{let t="",r=e;for(;r--;)t+=rw[Math.random()*64|0];return t},nw=["name","message","stack","code"],bp=class{constructor(e,t){ye(this,"_type");this.payload=e,this.meta=t}},vy=class{constructor(e,t){ye(this,"_type");this.payload=e,this.meta=t}},ow=e=>{if(typeof e=="object"&&e!==null){let t={};for(let r of nw)typeof e[r]=="string"&&(t[r]=e[r]);return t}return{message:String(e)}},Y=(()=>{function e(t,r,n){let o=I(t+"/fulfilled",(m,f,g,C)=>({payload:m,meta:{...(C||{}),arg:g,requestId:f,requestStatus:"fulfilled"}})),a=I(t+"/pending",(m,f,g)=>({payload:void 0,meta:{...(g||{}),arg:f,requestId:m,requestStatus:"pending"}})),d=I(t+"/rejected",(m,f,g,C,v)=>({payload:C,error:(n&&n.serializeError||ow)(m||"Rejected"),meta:{...(v||{}),arg:g,requestId:f,rejectedWithValue:!!C,requestStatus:"rejected",aborted:m?.name==="AbortError",condition:m?.name==="ConditionError"}}));function p(m){return(f,g,C)=>{let v=n?.idGenerator?n.idGenerator(m):Ks(),A=new i.AbortController,R,F;function x(P){F=P,A.abort()}let w=_asyncToGenerator(function*(){let P;try{let T=n?.condition?.(m,{getState:g,extra:C});if(iw(T)&&(T=yield T),T===!1||A.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let N=new Promise((O,k)=>{R=()=>{k({name:"AbortError",message:F||"Aborted"})},A.signal.addEventListener("abort",R)});f(a(v,m,n?.getPendingMeta?.({requestId:v,arg:m},{getState:g,extra:C}))),P=yield Promise.race([N,Promise.resolve(r(m,{dispatch:f,getState:g,extra:C,requestId:v,signal:A.signal,abort:x,rejectWithValue:(O,k)=>new bp(O,k),fulfillWithValue:(O,k)=>new vy(O,k)})).then(O=>{if(O instanceof bp)throw O;return O instanceof vy?o(O.payload,v,m,O.meta):o(O,v,m)})])}catch(T){P=T instanceof bp?d(null,v,m,T.payload,T.meta):d(T,v,m)}finally{R&&A.signal.removeEventListener("abort",R)}return n&&!n.dispatchConditionRejection&&d.match(P)&&P.meta.condition||f(P),P})();return Object.assign(w,{abort:x,requestId:v,arg:m,unwrap(){return w.then(aw)}})}}return Object.assign(p,{pending:a,rejected:d,fulfilled:o,settled:Yt(d,o),typePrefix:t})}return e.withTypes=()=>e,e})();function aw(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function iw(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var Iy=Symbol.for("rtk-slice-createasyncthunk"),l_={[Iy]:Y};function sw(e,t){return`${e}/${t}`}function cw({creators:e}={}){let t=e?.asyncThunk?.[Iy];return function(n){let{name:o,reducerPath:a=o}=n;if(!o)throw new Error(Mt(11));typeof process<"u";let d=(typeof n.reducers=="function"?n.reducers(lw()):n.reducers)||{},p=Object.keys(d),m={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},f={addCase(P,b){let T=typeof P=="string"?P:P.type;if(!T)throw new Error(Mt(12));if(T in m.sliceCaseReducersByType)throw new Error(Mt(13));return m.sliceCaseReducersByType[T]=b,f},addMatcher(P,b){return m.sliceMatchers.push({matcher:P,reducer:b}),f},exposeAction(P,b){return m.actionCreators[P]=b,f},exposeCaseReducer(P,b){return m.sliceCaseReducersByName[P]=b,f}};p.forEach(P=>{let b=d[P],T={reducerName:P,type:sw(o,P),createNotation:typeof n.reducers=="function"};pw(b)?fw(T,b,f,t):dw(T,b,f)});function g(){let[P={},b=[],T=void 0]=typeof n.extraReducers=="function"?Fy(n.extraReducers):[n.extraReducers],N={...P,...m.sliceCaseReducersByType};return J(n.initialState,O=>{for(let k in N)O.addCase(k,N[k]);for(let k of m.sliceMatchers)O.addMatcher(k.matcher,k.reducer);for(let k of b)O.addMatcher(k.matcher,k.reducer);T&&O.addDefaultCase(T)})}let C=P=>P,v=new Map,A;function R(P,b){return A||(A=g()),A(P,b)}function F(){return A||(A=g()),A.getInitialState()}function x(P,b=!1){function T(O){let k=O[P];return typeof k>"u"&&b&&(k=F()),k}function N(O=C){let k=Cy(v,b,()=>new WeakMap);return Cy(k,O,()=>{let D={};for(let[L,_]of Object.entries(n.selectors??{}))D[L]=uw(_,O,F,b);return D})}return{reducerPath:P,getSelectors:N,get selectors(){return N(T)},selectSlice:T}}let w={name:o,reducer:R,actions:m.actionCreators,caseReducers:m.sliceCaseReducersByName,getInitialState:F,...x(a),injectInto(P,{reducerPath:b,...T}={}){let N=b??a;return P.inject({reducerPath:N,reducer:R},T),{...w,...x(N,!0)}}};return w}}function uw(e,t,r,n){function o(a,...d){let p=t(a);return typeof p>"u"&&n&&(p=r()),e(p,...d)}return o.unwrapped=e,o}var Un=cw();function lw(){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 dw({type:e,reducerName:t,createNotation:r},n,o){let a,d;if("reducer"in n){if(r&&!mw(n))throw new Error(Mt(17));a=n.reducer,d=n.prepare}else a=n;o.addCase(e,a).exposeCaseReducer(t,a).exposeAction(t,d?I(e,d):I(e))}function pw(e){return e._reducerDefinitionType==="asyncThunk"}function mw(e){return e._reducerDefinitionType==="reducerWithPrepare"}function fw({type:e,reducerName:t},r,n,o){if(!o)throw new Error(Mt(18));let{payloadCreator:a,fulfilled:d,pending:p,rejected:m,settled:f,options:g}=r,C=o(e,a,g);n.exposeAction(t,C),d&&n.addCase(C.fulfilled,d),p&&n.addCase(C.pending,p),m&&n.addCase(C.rejected,m),f&&n.addMatcher(C.settled,f),n.exposeCaseReducer(t,{fulfilled:d||Gs,pending:p||Gs,rejected:m||Gs,settled:f||Gs})}function Gs(){}var wy="listener",Py="completed",Ey="cancelled",d_=`task-${Ey}`,p_=`task-${Py}`,m_=`${wy}-${Ey}`,f_=`${wy}-${Py}`;var{assign:qy}=Object;var Ip="listenerMiddleware";var gw=qy(I(`${Ip}/add`),{withTypes:()=>gw}),g_=I(`${Ip}/removeAll`),yw=qy(I(`${Ip}/remove`),{withTypes:()=>yw});var y_=Symbol.for("rtk-state-proxy-original");function Mt(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}l();s();u();c();l();s();u();c();l();s();u();c();l();s();u();c();l();s();u();c();var Ty=/^(?:[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 hw(e){return typeof e=="string"&&Ty.test(e)}var wp=hw;l();s();u();c();var ze=[];for(let e=0;e<256;++e)ze.push((e+256).toString(16).slice(1));function ky(e,t=0){return(ze[e[t+0]]+ze[e[t+1]]+ze[e[t+2]]+ze[e[t+3]]+"-"+ze[e[t+4]]+ze[e[t+5]]+"-"+ze[e[t+6]]+ze[e[t+7]]+"-"+ze[e[t+8]]+ze[e[t+9]]+"-"+ze[e[t+10]]+ze[e[t+11]]+ze[e[t+12]]+ze[e[t+13]]+ze[e[t+14]]+ze[e[t+15]]).toLowerCase()}l();s();u();c();var Pp,Sw=new Uint8Array(16);function Ep(){if(!Pp){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Pp=crypto.getRandomValues.bind(crypto)}return Pp(Sw)}l();s();u();c();l();s();u();c();var Cw=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),qp={randomUUID:Cw};function Aw(e,t,r){if(qp.randomUUID&&!t&&!e)return qp.randomUUID();e=e||{};let n=e.random??e.rng?.()??Ep();if(n.length<16)throw new Error("Random bytes length must be >= 16");if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,t){if(r=r||0,r<0||r+16>t.length)throw new RangeError(`UUID byte range ${r}:${r+15} is out of buffer bounds`);for(let o=0;o<16;++o)t[r+o]=n[o];return t}return ky(n)}var Tp=Aw;l();s();u();c();function Oy(){let e=typeof window<"u";return{sendMessage(t){e&&window.postMessage(t,"*")}}}function vw({config:e,environment:t,event:r,listenerManager:n}){let{url:o,token:a,mode:d}=e;d!=="disabled"&&(n.call(r),t.send(o,a,r))}var Dy="visitorId";function Rw(e){return{getClientId:()=>{let t=e.get(),r=t.storage,n=r.getItem(Dy),o=n&&wp(n)?n:t.generateUUID();return r.setItem(Dy,o),o}}}var Qy="1.2.7",kp=128,Ly=192,jy=224,Vy=240,xw=248;function Fw(e){return(e&xw)===Vy?4:(e&Vy)===jy?3:(e&jy)===Ly?2:1}function bw(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&kp)!=kp)break;if(r-=3,(n&Ly)!=kp){t-r>=Fw(n)*3&&(r=t);break}}return e.substring(0,r)}function Iw(e){let{trackingId:t}=e;return{trackingId:t}}function ww(e){return(e.source||[]).concat([`relay@${Qy}`])}function _y(e,t,r,n){let{getReferrer:o,getLocation:a,getUserAgent:d}=r,p=Iw(t),m=n.getClientId();return Object.freeze({type:e,config:p,ts:Date.now(),source:ww(t),clientId:m,userAgent:d(),referrer:Ny(o()),location:Ny(a())})}function Ny(e){return e!==null?bw(e,1024):null}function Pw(e,t,r,n,o){return{...t,meta:_y(e,r,n,o)}}var Ew="*";function qw(){let e=[];function t({type:m,callback:f}){return e.findIndex(g=>g.type===m&&g.callback===f)}function r(m,f){return m.type==="*"||f===m.type}function n(m){return t(m)<0&&e.push(m),()=>p(m.type,m.callback)}function o(m){e.forEach(f=>{if(r(f,m.meta.type))try{f.callback(m)}catch(g){console.error(g)}})}function a(m){if(m===Ew)e.length=0;else for(let f=e.length-1;f>=0;f--)e[f].type===m&&e.splice(f,1)}function d(m){let f=t(m);f>=0&&e.splice(f,1)}function p(m,f){f?d({type:m,callback:f}):a(m)}return{add:n,call:o,remove:p}}function My({url:e,token:t,trackingId:r,...n}){return Object.freeze({url:e,token:t,trackingId:r,...(!!n.mode&&{mode:n.mode}),...(!!n.source&&{source:n.source}),...(!!n.environment&&{environment:n.environment})})}function Tw(e){let t=My(e);return{get:()=>t,update:r=>{t=My({...t,...r})}}}var Op=kw();function kw(){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 a of o){let d=a.replace(/^\s+/,"");if(d.lastIndexOf(n,0)===0)return d.substring(n.length,d.length)}return null},setItem(r,n,o){let a=t(window.location.hostname),d=`;expires=${new Date(new Date().getTime()+o).toUTCString()}`,p=a?`;domain=${a}`:"";document.cookie=`${e}${r}=${n}${d}${p};path=/;SameSite=Lax`},removeItem(r){this.setItem(r,"",-1)}}}function Ow(){return{getItem(e){return Op.getItem(e)||localStorage.getItem(e)},removeItem(e){Op.removeItem(e),localStorage.removeItem(e)},setItem(e,t){localStorage.setItem(e,t),Op.setItem(e,t,31556952e3)}}}function Dw(){let e=document.referrer;return e===""?null:e}function Dp(){return{runtime:"browser",send:(e,t,r)=>{let n=navigator.sendBeacon(`${e}?access_token=${t}`,new Blob([JSON.stringify([r])],{type:"application/json"}));if(Oy().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:()=>Dw(),getLocation:()=>window.location.href,getUserAgent:()=>navigator.userAgent,generateUUID:()=>Tp(),storage:Ow()}}function jw(){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 Vw(){return{getItem(){return null},removeItem(){},setItem(){}}}function Nw(){return{runtime:"null",send:()=>{},getReferrer:()=>null,getLocation:()=>null,getUserAgent:()=>null,generateUUID:()=>"",storage:Vw()}}function Mw(e){let t=e.get().mode!=="disabled",r=e.get().environment,n=Nw();return t&&r?{storage:n.storage,...r,runtime:"custom"}:t&&Qw()&&jw()?Dp():n}function Qw(){try{return typeof window=="object"}catch{return!1}}function Lw(e){return{get:()=>Object.freeze(Mw(e))}}function Uy(e){let t=Tw(e),r=qw(),n=Lw(t),o=Rw(n);return{emit:(a,d)=>{let p=t.get(),m=n.get(),f=Pw(a,d,p,m,o);return vw({config:p,environment:m,event:f,listenerManager:r})},getMeta:a=>_y(a,t.get(),n.get(),o),on:(a,d)=>r.add({type:a,callback:d}),off:(a,d)=>r.remove(a,d),updateConfig:a=>t.update(a),version:Qy}}l();s();u();c();function By(){return typeof window<"u"&&typeof document<"u"}l();s();u();c();l();s();u();c();var Io="3.35.3",$y=["@coveo/atomic","@coveo/quantic"];var Lr=Ie(e=>e.source,e=>Object.entries(e).map(([t,r])=>`${t}@${r}`).concat(`@coveo/headless@${Io}`));var Ci=Ie(e=>e.configuration.organizationId,e=>e.configuration.environment,e=>e.configuration.accessToken,e=>e.configuration.analytics,e=>Lr(e.configuration.analytics),(e,t)=>t,(e,t,r,{trackingId:n,apiBaseUrl:o,enabled:a},d,p)=>{let m=Uw(p);return Uy({mode:a?"emit":"disabled",url:o??Ds(e,t),token:r,trackingId:n??null,source:d,environment:m})}),_w={generateUUID:()=>"",getLocation:()=>null,getReferrer:()=>null,getUserAgent:()=>null,send:()=>{},storage:{getItem:()=>null,setItem:()=>{},removeItem:()=>{}}},Uw=e=>{if(!e)return;let t=e();return{...(By()?Dp():_w),generateUUID:()=>t.clientId,getLocation:()=>t.location,getReferrer:()=>t.referrer,getUserAgent:()=>t.userAgent}};l();s();u();c();l();s();u();c();function Kt(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 j(e,t,r,n){function o(a){return a instanceof r?a:new r(function(d){d(a)})}return new(r||(r=Promise))(function(a,d){function p(g){try{f(n.next(g))}catch(C){d(C)}}function m(g){try{f(n.throw(g))}catch(C){d(C)}}function f(g){g.done?a(g.value):o(g.value).then(p,m)}f((n=n.apply(e,t||[])).next())})}var le;(function(e){e.search="search",e.click="click",e.custom="custom",e.view="view",e.collect="collect"})(le||(le={}));function Np(){return typeof window<"u"}function Jp(){return typeof navigator<"u"}function wo(){return typeof document<"u"}function Mp(){try{return typeof localStorage<"u"}catch{return!1}}function Bw(){try{return typeof sessionStorage<"u"}catch{return!1}}function nh(){return Jp()&&navigator.cookieEnabled}var $w=[le.click,le.custom,le.search,le.view],Hw=(e,t)=>$w.indexOf(e)!==-1?Object.assign({language:wo()?document.documentElement.lang:"unknown",userAgent:Jp()?navigator.userAgent:"unknown"},t):t,vi=class e{static set(t,r,n){var o,a,d,p;n&&(a=new Date,a.setTime(a.getTime()+n)),p=window.location.hostname,p.indexOf(".")===-1?Hy(t,r,a):(d=p.split("."),o=d[d.length-2]+"."+d[d.length-1],Hy(t,r,a,o))}static get(t){for(var r=t+"=",n=document.cookie.split(";"),o=0;o<n.length;o++){var a=n[o];if(a=a.replace(/^\s+/,""),a.lastIndexOf(r,0)===0)return a.substring(r.length,a.length)}return null}static erase(t){e.set(t,"",-1)}};function Hy(e,t,r,n){document.cookie=`${e}=${t}`+(r?`;expires=${r.toUTCString()}`:"")+(n?`;domain=${n}`:"")+";path=/;SameSite=Lax"}function Gw(){return Mp()?localStorage:nh()?new Ri:Bw()?sessionStorage:new Eo}var Ri=class e{getItem(t){return vi.get(`${e.prefix}${t}`)}removeItem(t){vi.erase(`${e.prefix}${t}`)}setItem(t,r,n){vi.set(`${e.prefix}${t}`,r,n)}};Ri.prefix="coveo_";var Qp=class{constructor(){this.cookieStorage=new Ri}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)}},Eo=class{getItem(t){return null}removeItem(t){}setItem(t,r){}},Js="__coveo.analytics.history",zw=20,Ww=1e3*60,Yw=75,ec=class{constructor(t){this.store=t||Gw()}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 j(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 j(this,void 0,void 0,function*(){let t=yield this.getHistoryWithInternalTimeAsync();return this.stripEmptyQueries(this.stripInternalTime(t))})}getHistoryWithInternalTime(){try{let t=this.store.getItem(Js);return t&&typeof t=="string"?JSON.parse(t):[]}catch{return[]}}getHistoryWithInternalTimeAsync(){return j(this,void 0,void 0,function*(){try{let t=yield this.store.getItem(Js);return t?JSON.parse(t):[]}catch{return[]}})}setHistory(t){try{this.store.setItem(Js,JSON.stringify(t.slice(0,zw)))}catch{}}clear(){try{this.store.removeItem(Js)}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,Yw)),t}isValidEntry(t){let r=this.getMostRecentElement();return r&&r.value==t.value?(t.internalTime||0)-(r.internalTime||0)>Ww:!0}stripInternalTime(t){return Array.isArray(t)?t.map(r=>{let{name:n,time:o,value:a}=r;return{name:n,time:o,value:a}}):[]}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))}};var Kw=(e,t)=>j(void 0,void 0,void 0,function*(){return e===le.view?(yield Jw(t.contentIdValue),Object.assign({location:window.location.toString(),referrer:document.referrer,title:document.title},t)):t}),Jw=e=>j(void 0,void 0,void 0,function*(){let t=new ec,r={name:"PageView",value:e,time:new Date().toISOString()};yield t.addElementAsync(r)}),Xs,Xw=new Uint8Array(16);function Zw(){if(!Xs&&(Xs=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Xs))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Xs(Xw)}var eP=/^(?:[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 tc(e){return typeof e=="string"&&eP.test(e)}var We=[];for(let e=0;e<256;++e)We.push((e+256).toString(16).slice(1));function oh(e,t=0){return We[e[t+0]]+We[e[t+1]]+We[e[t+2]]+We[e[t+3]]+"-"+We[e[t+4]]+We[e[t+5]]+"-"+We[e[t+6]]+We[e[t+7]]+"-"+We[e[t+8]]+We[e[t+9]]+"-"+We[e[t+10]]+We[e[t+11]]+We[e[t+12]]+We[e[t+13]]+We[e[t+14]]+We[e[t+15]]}function tP(e){if(!tc(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 rP(e){e=unescape(encodeURIComponent(e));let t=[];for(let r=0;r<e.length;++r)t.push(e.charCodeAt(r));return t}var nP="6ba7b810-9dad-11d1-80b4-00c04fd430c8",oP="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function aP(e,t,r){function n(o,a,d,p){var m;if(typeof o=="string"&&(o=rP(o)),typeof a=="string"&&(a=tP(a)),((m=a)===null||m===void 0?void 0:m.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let f=new Uint8Array(16+o.length);if(f.set(a),f.set(o,a.length),f=r(f),f[6]=f[6]&15|t,f[8]=f[8]&63|128,d){p=p||0;for(let g=0;g<16;++g)d[p+g]=f[g];return d}return oh(f)}try{n.name=e}catch{}return n.DNS=nP,n.URL=oP,n}var iP=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Gy={randomUUID:iP};function Bn(e,t,r){if(Gy.randomUUID&&!t&&!e)return Gy.randomUUID();e=e||{};let n=e.random||(e.rng||Zw)();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 oh(n)}function sP(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 jp(e,t){return e<<t|e>>>32-t}function cP(e){let t=[1518500249,1859775393,2400959708,3395469782],r=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof e=="string"){let d=unescape(encodeURIComponent(e));e=[];for(let p=0;p<d.length;++p)e.push(d.charCodeAt(p))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);let n=e.length/4+2,o=Math.ceil(n/16),a=new Array(o);for(let d=0;d<o;++d){let p=new Uint32Array(16);for(let m=0;m<16;++m)p[m]=e[d*64+m*4]<<24|e[d*64+m*4+1]<<16|e[d*64+m*4+2]<<8|e[d*64+m*4+3];a[d]=p}a[o-1][14]=(e.length-1)*8/Math.pow(2,32),a[o-1][14]=Math.floor(a[o-1][14]),a[o-1][15]=(e.length-1)*8&4294967295;for(let d=0;d<o;++d){let p=new Uint32Array(80);for(let A=0;A<16;++A)p[A]=a[d][A];for(let A=16;A<80;++A)p[A]=jp(p[A-3]^p[A-8]^p[A-14]^p[A-16],1);let m=r[0],f=r[1],g=r[2],C=r[3],v=r[4];for(let A=0;A<80;++A){let R=Math.floor(A/20),F=jp(m,5)+sP(R,f,g,C)+v+t[R]+p[A]>>>0;v=C,C=g,g=jp(f,30)>>>0,f=m,m=F}r[0]=r[0]+m>>>0,r[1]=r[1]+f>>>0,r[2]=r[2]+g>>>0,r[3]=r[3]+C>>>0,r[4]=r[4]+v>>>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 uP=aP("v5",80,cP),zy=uP,ah="2.30.49",Wy=e=>`${e.protocol}//${e.hostname}${e.pathname.indexOf("/")===0?e.pathname:`/${e.pathname}`}${e.search}`,Ai={pageview:"pageview",event:"event"},rc=class{constructor({client:t,uuidGenerator:r=Bn}){this.client=t,this.uuidGenerator=r}},Lp=class extends rc{constructor({client:t,uuidGenerator:r=Bn}){super({client:t,uuidGenerator:r}),this.actionData={},this.pageViewId=r(),this.nextPageViewId=this.pageViewId,this.currentLocation=Wy(window.location),this.lastReferrer=wo()?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:wo()?document.title:"",encoding:wo()?document.characterSet:"UTF-8"},n={screenResolution:`${screen.width}x${screen.height}`,screenColor:`${screen.colorDepth}-bit`},o={language:navigator.language,userAgent:navigator.userAgent},a={time:Date.now(),eventId:this.uuidGenerator()};return Object.assign(Object.assign(Object.assign(Object.assign({},a),n),o),r)}updateLocationForNextPageView(t,r){let{pageViewId:n,referrer:o,location:a}=this.getNextValues(t,r);this.lastReferrer=o,this.pageViewId=n,this.currentLocation=a,t===Ai.pageview&&(this.nextPageViewId=this.uuidGenerator(),this.hasSentFirstPageView=!0)}getNextValues(t,r){return{pageViewId:t===Ai.pageview?this.nextPageViewId:this.pageViewId,referrer:t===Ai.pageview&&this.hasSentFirstPageView?this.currentLocation:this.lastReferrer,location:t===Ai.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 Wy(window.location)}},_r=class e{constructor(t,r){if(!tc(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 a=n.substring(0,8)+"-"+n.substring(8,12)+"-"+n.substring(12,16)+"-"+n.substring(16,20)+"-"+n.substring(20,32);return tc(a)?new e(a,Number.parseInt(o)*1e3):null}};_r.cvo_cid="cvo_cid";_r.expirationTime=120;var _p=class extends rc{constructor({client:t,uuidGenerator:r=Bn}){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 j(this,void 0,void 0,function*(){if(!this.client.getCurrentVisitorId)throw new Error("Could not retrieve current clientId");try{let r=new URL(t),n=yield this.client.getCurrentVisitorId();return r.searchParams.set(_r.cvo_cid,new _r(n,Date.now()).toString()),r.toString()}catch{throw new Error("Invalid URL provided")}})}acceptFrom(t){this.client.setAcceptedLinkReferrers(t)}};_p.Id="link";var qt=Object.keys;function Zs(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}var Vp=128,ih=192,Yy=224,Ky=240;function lP(e){return(e&248)===Ky?4:(e&Ky)===Yy?3:(e&Yy)===ih?2:1}function dP(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&Vp)!=Vp)break;if(r-=3,(n&ih)!=Vp){t-r>=lP(n)*3&&(r=t);break}}return e.substring(0,r)}var Up={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"},pP=qt(Up).map(e=>Up[e]),mP=[...pP].join("|"),fP=new RegExp(`^(${mP}$)`),gP={svcAction:"svc_action",svcActionData:"svc_action_data"},yP=e=>qt(e).filter(t=>e[t]!==void 0).reduce((t,r)=>{let n=Up[r]||r;return Object.assign(Object.assign({},t),{[n]:e[r]})},{}),hP=e=>fP.test(e),SP=[hP],Jy={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",price:"pr",quantity:"qt",coupon:"cc",position:"ps",group:"group"},Xy={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",position:"ps",price:"pr",group:"group"},Ze={action:"pa",list:"pal",listSource:"pls"},nc={id:"ti",revenue:"tr",tax:"tt",shipping:"ts",coupon:"tcc",affiliation:"ta",step:"cos",option:"col"},CP=["loyaltyCardId","loyaltyTier","thirdPartyPersona","companyName","favoriteStore","storeName","userIndustry","userRole","userDepartment","businessUnit"],Bp={id:"quoteId",affiliation:"quoteAffiliation"},$p={id:"reviewId",rating:"reviewRating",comment:"reviewComment"},AP={add:Ze,bookmark_add:Ze,bookmark_remove:Ze,click:Ze,checkout:Ze,checkout_option:Ze,detail:Ze,impression:Ze,remove:Ze,refund:Object.assign(Object.assign({},Ze),nc),purchase:Object.assign(Object.assign({},Ze),nc),quickview:Ze,quote:Object.assign(Object.assign({},Ze),Bp),review:Object.assign(Object.assign({},Ze),$p)},vP=qt(Jy).map(e=>Jy[e]),RP=qt(Xy).map(e=>Xy[e]),xP=qt(Ze).map(e=>Ze[e]),FP=qt(nc).map(e=>nc[e]),bP=qt($p).map(e=>$p[e]),IP=qt(Bp).map(e=>Bp[e]),wP=[...vP,"custom"].join("|"),PP=[...RP,"custom"].join("|"),sh="(pr[0-9]+)",ch="(il[0-9]+pi[0-9]+)",EP=new RegExp(`^${sh}(${wP})$`),qP=new RegExp(`^(${ch}(${PP}))|(il[0-9]+nm)$`),TP=new RegExp(`^(${xP.join("|")})$`),kP=new RegExp(`^(${FP.join("|")})$`),OP=new RegExp(`^${sh}custom$`),DP=new RegExp(`^${ch}custom$`),jP=new RegExp(`^(${[...CP,...bP,...IP].join("|")})$`),VP=e=>EP.test(e),NP=e=>qP.test(e),MP=e=>TP.test(e),QP=e=>kP.test(e),LP=e=>jP.test(e),_P=[NP,VP,MP,QP,LP],UP=[OP,DP],BP={anonymizeIp:"aip"},$P={eventCategory:"ec",eventAction:"ea",eventLabel:"el",eventValue:"ev",page:"dp",visitorId:"cid",clientId:"cid",userId:"uid",currencyCode:"cu"},HP={hitType:"t",pageViewId:"pid",encoding:"de",location:"dl",referrer:"dr",screenColor:"sd",screenResolution:"sr",title:"dt",userAgent:"ua",language:"ul",eventId:"z",time:"tm"},GP=["contentId","contentIdKey","contentType","searchHub","tab","searchUid","permanentId","contentLocale","trackingId"],zP=Object.assign(Object.assign(Object.assign(Object.assign({},BP),$P),HP),GP.reduce((e,t)=>Object.assign(Object.assign({},e),{[t]:t}),{})),Hp=Object.assign(Object.assign({},zP),gP),WP=e=>{let t=!!e.action&&AP[e.action]||{};return qt(e).reduce((r,n)=>{let o=t[n]||Hp[n]||n;return Object.assign(Object.assign({},r),{[o]:e[n]})},{})},YP=qt(Hp).map(e=>Hp[e]),KP=e=>YP.indexOf(e)!==-1,JP=e=>e==="custom",XP=e=>[..._P,...SP,KP,JP].some(t=>t(e)),ZP=e=>qt(e).reduce((t,r)=>{let n=eE(r);return n?Object.assign(Object.assign({},t),tE(n,e[r])):Object.assign(Object.assign({},t),{[r]:e[r]})},{}),eE=e=>{let t;return[...UP].every(r=>{var n;return t=(n=r.exec(e))===null||n===void 0?void 0:n[1],!t}),t},tE=(e,t)=>qt(t).reduce((r,n)=>Object.assign(Object.assign({},r),{[`${e}${n}`]:t[n]}),{}),Gp=class{constructor(t){this.opts=t}sendEvent(t,r){return j(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,a=yield this.getQueryParamsForEventType(t),{url:d,payload:p}=yield this.preProcessRequestAsPotentialJSONString(`${n}/analytics/${t}?${a}`,r,o),m=this.encodeForEventType(t,p),f=new Blob([m],{type:"application/x-www-form-urlencoded"});navigator.sendBeacon(d,f)})}isAvailable(){return"sendBeacon"in navigator}deleteHttpCookieVisitorId(){return Promise.resolve()}preProcessRequestAsPotentialJSONString(t,r,n){return j(this,void 0,void 0,function*(){let o=t,a=r;if(n){let d=yield n({url:t,body:JSON.stringify(r)},"analyticsBeacon"),{url:p,body:m}=d;o=p||t;try{a=JSON.parse(m)}catch(f){console.error("Unable to process the request body as a JSON string",f)}}return{payload:a,url:o}})}encodeForEventType(t,r){return this.isEventTypeLegacy(t)?this.encodeEventToJson(t,r):this.encodeEventToJson(t,r,this.opts.token)}getQueryParamsForEventType(t){return j(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(a=>!!a).join("&")})}isEventTypeLegacy(t){return[le.click,le.custom,le.search,le.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}},zp=class{sendEvent(t,r){return j(this,void 0,void 0,function*(){return Promise.resolve()})}deleteHttpCookieVisitorId(){return j(this,void 0,void 0,function*(){return Promise.resolve()})}},Zy=h.fetch,oc=class{constructor(t){this.opts=t}sendEvent(t,r){return j(this,void 0,void 0,function*(){let{baseUrl:n,visitorIdProvider:o,preprocessRequest:a}=this.opts,d=this.shouldAppendVisitorId(t)?yield this.getVisitorIdParam():"",p={url:`${n}/analytics/${t}${d}`,credentials:"include",mode:"cors",headers:this.getHeaders(),method:"POST",body:JSON.stringify(r)},m=Object.assign(Object.assign({},p),a?yield a(p,"analyticsFetch"):{}),{url:f}=m,g=Kt(m,["url"]),C;try{C=yield Zy(f,g)}catch(v){console.error("An error has occured when sending the event.",v);return}if(C.ok){let v=yield C.json();return v.visitorId&&o.setCurrentVisitorId(v.visitorId),v}else{try{C.json()}catch{}throw console.error(`An error has occured when sending the "${t}" event.`,C,r),new Error(`An error has occurred when sending the "${t}" event. Check the console logs for more details.`)}})}deleteHttpCookieVisitorId(){return j(this,void 0,void 0,function*(){let{baseUrl:t}=this.opts,r=`${t}/analytics/visit`;yield Zy(r,{headers:this.getHeaders(),method:"DELETE"})})}shouldAppendVisitorId(t){return[le.click,le.custom,le.search,le.view].indexOf(t)!==-1}getVisitorIdParam(){return j(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"})}},Wp=class{constructor(t,r){Mp()&&nh()?this.storage=new Qp:Mp()?this.storage=localStorage:(console.warn("BrowserRuntime detected no valid storage available.",this),this.storage=new Eo),this.client=new oc(t),this.beaconClient=new Gp(t),window.addEventListener("beforeunload",()=>{let n=r();for(let{eventType:o,payload:a}of n)this.beaconClient.sendEvent(o,a)})}getClientDependingOnEventType(t){return t==="click"&&this.beaconClient.isAvailable()?this.beaconClient:this.client}},Yp=class{constructor(t,r){this.storage=r||new Eo,this.client=new oc(t)}getClientDependingOnEventType(t){return this.client}},ac=class{constructor(){this.storage=new Eo,this.client=new zp}getClientDependingOnEventType(t){return this.client}},rE="xx",nE=e=>e?.startsWith(rE)||!1,oE=`
|
|
27
|
+
${g}`:g;break;case"event":n.event=g;break;case"id":e(n.id=g);break;case"retry":Vb(g,n,t);break}}}}function Vb(e,t,r){let n=parseInt(e,10);Number.isNaN(n)||r(t.retry=n)}function Nb(e,t){let r=new Uint8Array(e.length+t.length);return r.set(e),r.set(t,e.length),r}function Cg(){return{data:"",event:"",id:"",retry:void 0}}var zd="text/event-stream",Mb=1e3,xg="last-event-id";function Fg(){return typeof window<"u"}function qs(e,{signal:t,headers:r,onopen:n,onmessage:o,onclose:a,onerror:d,openWhenHidden:p,fetch:m,...f}){return new Promise((g,C)=>{let v={...r};v.accept||(v.accept=zd);let A;function R(){A?.abort(),document.hidden||T()}!p&&Fg()&&document.addEventListener("visibilitychange",R);let F=Mb,x;function w(){Fg()&&document.removeEventListener("visibilitychange",R),clearTimeout(x),A?.abort()}t?.addEventListener("abort",()=>{w(),g()});let P=m??y,b=n??Qb;function T(){return _T2.apply(this,arguments)}function _T2(){_T2=_asyncToGenerator(function*(){A=i.AbortController?new i.AbortController:null;try{let N=yield P(e,{...f,headers:v,signal:A?.signal});yield b(N),yield Ag(N.body,vg(Rg(O=>{O?v[xg]=O:delete v[xg]},O=>{F=O},o))),a?.(),w(),g()}catch(N){if(!A?.signal?.aborted)try{let O=d?.(N)??F;clearTimeout(x),x=setTimeout(T,O)}catch(O){w(),C(O)}}});return _T2.apply(this,arguments)}T()})}function Qb(e){let t=e.headers.get("content-type");if(!t?.startsWith(zd))throw new Error(`Expected content-type to be ${zd}, Actual: ${t}`)}l();s();u();c();var Mr=class{constructor(t){ye(this,"_basePath");ye(this,"_params",{});this._basePath=t}addParam(t,r){this._params={...this.params,[t]:r}}get basePath(){return this._basePath}get params(){return this._params}get hasParams(){return Object.entries(this._params).length}get href(){return this.hasParams?`${this.basePath}?${Object.entries(this.params).map(([t,r])=>`${t}=${encodeURIComponent(r)}`).join("&")}`:this.basePath}};var Lb=(e,t,r)=>new Mr(`${e}/rest/organizations/${t}/machinelearning/streaming/${r}`).href,bg=3,_b=5e3,Ub="text/event-stream",Kd=1,Wd=class extends Error{},ni=class extends Error{constructor(r){super(r.message);this.payload=r}},Yd=class{constructor(){ye(this,"timeouts",new Set)}add(t){this.timeouts.add(t)}remove(t){clearTimeout(t),this.timeouts.delete(t)}isActive(t){return this.timeouts.has(t)}},Ts=class{constructor(t){ye(this,"logger");this.logger=t.logger}streamGeneratedAnswer(t,r){let{url:n,organizationId:o,streamId:a,accessToken:d}=t,{write:p,abort:m,close:f,resetAnswer:g}=r,C=new Yd;if(!a){this.logger.error("No stream ID found");return}let v=0,A,R=()=>{A&&!C.isActive(A)&&(x?.abort(),g(),w())},F=()=>{C.remove(A),A=Sg(R,A,_b),C.add(A)},x=new i.AbortController,w=()=>qs(Lb(n,o,a),{method:"GET",fetch:y,headers:{Authorization:`Bearer ${d}`,accept:"*/*"},openWhenHidden:!0,signal:x?.signal,onopen(P){return _asyncToGenerator(function*(){if(P.ok&&P.headers.get("content-type")===Ub)return;throw P.status>=400&&P.status<500&&P.status!==429?new ni({message:"Error opening stream",code:P.status}):new Wd})()},onmessage:P=>{if(x?.signal.aborted)return;let b=JSON.parse(P.data);if(b.finishReason==="ERROR"){C.remove(A),x?.abort(),m({message:b.errorMessage,code:b.statusCode});return}p(b),v=0,b.finishReason==="COMPLETED"?(C.remove(A),f()):F()},onerror:P=>{if(!x?.signal.aborted){if(C.remove(A),P instanceof ni)throw x?.abort(),m(P),P;if(++v>bg){this.logger.info("Maximum retry exceeded.");let b={message:"Failed to complete stream.",code:Kd};throw x?.abort(),m(b),new ni(b)}this.logger.info(`Retrying...(${v}/${bg})`),g()}}});return w(),x}};l();s();u();c();var ks=e=>e;l();s();u();c();l();s();u();c();var Ng=vs(Og(),1);l();s();u();c();var W=new Error("Failed to load reducers."),ho=class extends Error{constructor(){super(),this.name="UnauthorizedTokenError",this.message="The token being used to perform the request is unauthorized. It may be expired or invalid."}},Vn=class extends Error{constructor(r,n){super();ye(this,"statusCode");this.name="Disconnected",this.message=`Client could not connect to the following URL: ${r}`,this.statusCode=n??0}};l();s();u();c();function Dg(e){let t=[];for(let r in e){let n=encodeURIComponent(r),o=encodeURIComponent(e[r]);t.push(`${n}=${o}`)}return t.join("&")}function jg(e){return typeof e!="object"||!e?!1:Object.values(e).every(fI)}function fI(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"}function Vg(e){return e===429}var Vt=class e{static call(t){return _asyncToGenerator(function*(){let r=gI(t),{logger:n}=t,o=yield e.preprocessRequest(r,t);n.info(o,"Platform request");let{url:a,...d}=o,p=/*#__PURE__*/function(){var _ref=_asyncToGenerator(function*(){let m=yield y(a,d);if(Vg(m.status))throw m;return m});return function p(){return _ref.apply(this,arguments)}}();try{let m=yield(0,Ng.backOff)(p,{startingDelay:100,timeMultiple:2,maxDelay:800,numOfAttempts:4,jitter:"full",retry:function(){var _ref2=_asyncToGenerator(function*(f){let g=f&&Vg(f.status);return g&&(n.info("Platform retrying request"),yield new Promise(C=>setTimeout(C,1e3))),g});return function retry(_x4){return _ref2.apply(this,arguments)}}()});switch(m.status){case 419:case 401:throw n.info("Platform renewing token"),new ho;case 404:throw new Vn(a,m.status);default:return n.info({response:m,requestInfo:o},"Platform response"),m}}catch(m){return m.message==="Failed to fetch"?new Vn(a):m}})()}static preprocessRequest(t,r){return _asyncToGenerator(function*(){let{origin:n,preprocessRequest:o,logger:a,requestMetadata:d}=r,{signal:p,...m}=t,f=ri(m);try{let g=yield o(t,n,d);return{...t,...g}}catch(g){a.error(g,"Platform request preprocessing failed. Returning default request options.")}return f})()}};function be(e,t="prod",r="platform"){let n=t==="prod"?"":t,o=r==="platform"?"":`.${r}`;return`https://${e}${o}.org${n}.coveo.com`}function ut(e,t="prod"){return`${be(e,t)}/rest/search/v2`}function Ds(e,t="prod"){return`${be(e,t,"analytics")}/rest/organizations/${e}/events/v1`}function gI(e){let{url:t,method:r,requestParams:n,contentType:o,accessToken:a,signal:d}=e,p=e.method==="POST"||e.method==="PUT",m=yI(n,o);return{url:t,method:r,headers:{"Content-Type":o,Authorization:`Bearer ${a}`,...e.headers},...(p&&{body:m}),signal:d}}function yI(e,t){return t==="application/x-www-form-urlencoded"?jg(e)?Dg(e):"":JSON.stringify(e)}l();s();u();c();l();s();u();c();function ii(e){let{url:t,accessToken:r,organizationId:n,authentication:o,...a}=e;return a}var ap=e=>{let{response:t}=e;return t.body?hI(e):SI(t)},hI=e=>AI(e)?vI(e):CI(e)?e.body:{message:"unknown",statusCode:0,type:"unknown"},SI=e=>{let t=JSON.parse(JSON.stringify(e,Object.getOwnPropertyNames(e)));return{...t,message:`Client side error: ${t.message||""}`,statusCode:400,type:"ClientError"}};function CI(e){return e.body.statusCode!==void 0}function AI(e){return e.body.exception!==void 0}var vI=e=>({message:e.body.exception.code,statusCode:e.response.status,type:e.body.exception.code});l();s();u();c();function Mg(e){return((e.headers.get("content-type")||"").split(";").find(n=>n.indexOf("charset=")!==-1)||"").split("=")[1]||"UTF-8"}l();s();u();c();var ip=(e,t,r,n)=>{let o=new Mr(`${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 Qg=(e,t)=>{let r=new Mr(`${e.url}${t}`);return r.addParam("access_token",e.accessToken),r.addParam("organizationId",e.organizationId),r.addParam("uniqueId",e.uniqueId),e.authentication&&r.addParam("authentication",e.authentication),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},sp=/*#__PURE__*/function(){var _ref3=_asyncToGenerator(function*(e,t){let r=yield Vt.call({...ip(e,"POST","application/x-www-form-urlencoded","/html"),requestParams:ii(e),requestMetadata:{method:"html"},...t});if(r instanceof Error)throw r;let n=Mg(r),o=yield r.arrayBuffer(),d=new TextDecoder(n).decode(o);return RI(d)?{success:d}:{error:ap({response:r,body:d})}});return function sp(_x5,_x6){return _ref3.apply(this,arguments)}}();function RI(e){return typeof e=="string"}l();s();u();c();l();s();u();c();function So(){return{answerSnippet:"",documentId:{contentIdKey:"",contentIdValue:""},question:"",relatedQuestions:[],score:0}}function _e(){return{response:{results:[],searchUid:"",totalCountFiltered:0,facets:[],generateAutomaticFacets:{facets:[]},queryCorrections:[],triggers:[],questionAnswer:So(),pipeline:"",splitTestRun:"",termsToHighlight:{},phrasesToHighlight:{},extendedResults:{}},duration:0,queryExecuted:"",error:null,automaticallyCorrected:!1,isLoading:!1,results:[],searchResponseId:"",requestId:"",questionAnswer:So(),extendedResults:{},searchAction:void 0}}l();s();u();c();l();s();u();c();function xI(e){return{statusCode:e.statusCode,type:e.name,message:e.message}}function FI(e){return{statusCode:e.code,type:e.name,message:e.message,ignored:!0}}function Nn(e,t){if(t&&e.name==="AbortError")return{error:FI(e)};if(e instanceof Vn)return{error:xI(e)};throw e}var Qr=e=>e.success!==void 0,Re=e=>e.error!==void 0;function Lg(e){return e.results!==void 0}function _g(e){let t=So();return U(e.questionAnswer)?(e.questionAnswer=t,e):(e.questionAnswer={...t,...e.questionAnswer},e)}l();s();u();c();l();s();u();c();var cp=(e,t)=>`${e.url}/rest/organizations/${e.organizationId}/insight/v1/configs/${e.insightId}${t??""}`,bI=e=>`${e.url}/rest/organizations/${e.organizationId}/machinelearning/user/actions`,si=(e,t,r,n)=>{II(e);let o=cp(e,n);return{accessToken:e.accessToken,method:t,contentType:r,url:o,origin:"insightApiFetch"}},Ug=(e,t,r)=>{wI(e);let n=bI(e);return{accessToken:e.accessToken,method:t,contentType:r,url:n,origin:"insightApiFetch"}},up=e=>{let{insightId:t,...r}=ii(e);return r},Bg=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.")},II=e=>{if(Bg(e),!e.insightId)throw new Error("The 'insightId' attribute must contain a valid Insight Panel configuration ID.")},wI=e=>{if(Bg(e),!e.userId)throw new Error("The 'userId' attribute must contain a valid user ID.")};var $g=e=>({...si(e,"GET","application/json","/interface"),requestParams:{}});l();s();u();c();var Hg=e=>({...si(e,"POST","application/json","/search"),requestParams:up(e)}),Gg=e=>({...si(e,"POST","application/json","/querysuggest"),requestParams:up(e)});l();s();u();c();var zg=e=>({...Ug(e,"POST","application/json"),requestParams:{objectId:e.userId}});var js=class{constructor(t){this.options=t}getInterface(t){var _this=this;return _asyncToGenerator(function*(){let r=yield Vt.call({...$g(t),..._this.options});if(r instanceof Error)return Nn(r);let n=yield r.json();return r.ok?{success:n}:{error:n}})()}query(t,r){var _this2=this;return _asyncToGenerator(function*(){let n=yield Vt.call({...Hg(t),requestMetadata:{method:"search",origin:r?.origin},..._this2.options});if(n instanceof Error)return Nn(n);let o=yield n.json();return Lg(o)&&(o=_g(o)),n.ok?{success:o}:{error:o}})()}querySuggest(t){var _this3=this;return _asyncToGenerator(function*(){let r=yield Vt.call({...Gg(t),..._this3.options});if(r instanceof Error)return Nn(r);let n=yield r.json();return n.completions?{success:n}:{error:n}})()}userActions(t){var _this4=this;return _asyncToGenerator(function*(){let r=yield Vt.call({...zg(t),..._this4.options});if(r instanceof Error)return Nn(r);let n=yield r.json();return r.ok?{success:n}:{error:n}})()}html(t){var _this5=this;return _asyncToGenerator(function*(){return sp(t,{..._this5.options})})()}};l();s();u();c();l();s();u();c();var Q=new V({required:!0,emptyAllowed:!1}),he=new V({required:!1,emptyAllowed:!1}),xe=new V({required:!0,emptyAllowed:!0}),Wg=new V({required:!1,emptyAllowed:!0}),Vs=new z({each:Q,required:!0}),Yg=new V({required:!1,emptyAllowed:!1,regex:/^\d+\.\d+\.\d+$/}),Kg=new V({required:!1,emptyAllowed:!1,regex:/^[a-zA-Z0-9_\-.]{1,100}$/}),x0=new V({required:!0,emptyAllowed:!1,regex:/^[a-zA-Z0-9_\-.]{1,100}$/}),Nt=({message:e,name:t,stack:r})=>({message:e,name:t,stack:r}),wt=(e,t)=>{if("required"in t)return{payload:new ce({value:t}).validate({value:e}).value};let o=new M({options:{required:!0},values:t}).validate(e);if(o)throw new Dn(o);return{payload:e}},E=(e,t)=>{try{return wt(e,t)}catch(r){return{payload:e,error:Nt(r)}}},Pt=(e,t,r,n)=>{let o=`Check the initialState of ${n}`;return Jg(e,t,r,o,"Controller initialization error")},Qe=(e,t,r,n)=>{let o=`Check the options of ${n}`;return Jg(e,t,r,o,"Controller initialization error")},Jg=(e,t,r,n,o)=>{try{return t.validate(r,n)}catch(a){throw e.logger.error(a,o),a}};l();s();u();c();l();s();u();c();l();s();u();c();function He(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 PI=typeof Symbol=="function"&&Symbol.observable||"@@observable",Xg=PI,lp=()=>Math.random().toString(36).substring(7).split("").join("."),EI={INIT:`@@redux/INIT${lp()}`,REPLACE:`@@redux/REPLACE${lp()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${lp()}`},Ns=EI;function Wt(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 dp(e,t,r){if(typeof e!="function")throw new Error(He(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(He(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(He(1));return r(dp)(e,t)}let n=e,o=t,a=new Map,d=a,p=0,m=!1;function f(){d===a&&(d=new Map,a.forEach((x,w)=>{d.set(w,x)}))}function g(){if(m)throw new Error(He(3));return o}function C(x){if(typeof x!="function")throw new Error(He(4));if(m)throw new Error(He(5));let w=!0;f();let P=p++;return d.set(P,x),function(){if(w){if(m)throw new Error(He(6));w=!1,f(),d.delete(P),a=null}}}function v(x){if(!Wt(x))throw new Error(He(7));if(typeof x.type>"u")throw new Error(He(8));if(typeof x.type!="string")throw new Error(He(17));if(m)throw new Error(He(9));try{m=!0,o=n(o,x)}finally{m=!1}return(a=d).forEach(P=>{P()}),x}function A(x){if(typeof x!="function")throw new Error(He(10));n=x,v({type:Ns.REPLACE})}function R(){let x=C;return{subscribe(w){if(typeof w!="object"||w===null)throw new Error(He(11));function P(){let T=w;T.next&&T.next(g())}return P(),{unsubscribe:x(P)}},[Xg](){return this}}}return v({type:Ns.INIT}),{dispatch:v,subscribe:C,getState:g,replaceReducer:A,[Xg]:R}}function qI(e){Object.keys(e).forEach(t=>{let r=e[t];if(typeof r(void 0,{type:Ns.INIT})>"u")throw new Error(He(12));if(typeof r(void 0,{type:Ns.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(He(13))})}function Co(e){let t=Object.keys(e),r={};for(let d=0;d<t.length;d++){let p=t[d];typeof e[p]=="function"&&(r[p]=e[p])}let n=Object.keys(r),o,a;try{qI(r)}catch(d){a=d}return function(p={},m){if(a)throw a;let f=!1,g={};for(let C=0;C<n.length;C++){let v=n[C],A=r[v],R=p[v],F=A(R,m);if(typeof F>"u"){let x=m&&m.type;throw new Error(He(14))}g[v]=F,f=f||F!==R}return f=f||n.length!==Object.keys(p).length,f?g:p}}function Ao(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function Zg(...e){return t=>(r,n)=>{let o=t(r,n),a=()=>{throw new Error(He(15))},d={getState:o.getState,dispatch:(m,...f)=>a(m,...f)},p=e.map(m=>m(d));return a=Ao(...p)(o.dispatch),{...o,dispatch:a}}}function Ms(e){return Wt(e)&&"type"in e&&typeof e.type=="string"}l();s();u();c();var vp=Symbol.for("immer-nothing"),ci=Symbol.for("immer-draftable"),lt=Symbol.for("immer-state");function Ge(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var vo=Object.getPrototypeOf;function St(e){return!!e&&!!e[lt]}function dt(e){return e?ay(e)||Array.isArray(e)||!!e[ci]||!!e.constructor?.[ci]||Ro(e)||fi(e):!1}var TI=Object.prototype.constructor.toString(),ey=new WeakMap;function ay(e){if(!e||typeof e!="object")return!1;let t=Object.getPrototypeOf(e);if(t===null||t===Object.prototype)return!0;let r=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;if(r===Object)return!0;if(typeof r!="function")return!1;let n=ey.get(r);return n===void 0&&(n=Function.toString.call(r),ey.set(r,n)),n===TI}function Rp(e){return St(e)||Ge(15,e),e[lt].base_}function ui(e,t,r=!0){Qn(e)===0?(r?Reflect.ownKeys(e):Object.keys(e)).forEach(o=>{t(o,e[o],e)}):e.forEach((n,o)=>t(o,n,e))}function Qn(e){let t=e[lt];return t?t.type_:Array.isArray(e)?1:Ro(e)?2:fi(e)?3:0}function li(e,t){return Qn(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function pp(e,t){return Qn(e)===2?e.get(t):e[t]}function iy(e,t,r){let n=Qn(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function kI(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Ro(e){return e instanceof Map}function fi(e){return e instanceof Set}function Mn(e){return e.copy_||e.base_}function gp(e,t){if(Ro(e))return new Map(e);if(fi(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);let r=ay(e);if(t===!0||t==="class_only"&&!r){let n=Object.getOwnPropertyDescriptors(e);delete n[lt];let o=Reflect.ownKeys(n);for(let a=0;a<o.length;a++){let d=o[a],p=n[d];p.writable===!1&&(p.writable=!0,p.configurable=!0),(p.get||p.set)&&(n[d]={configurable:!0,writable:!0,enumerable:p.enumerable,value:e[d]})}return Object.create(vo(e),n)}else{let n=vo(e);if(n!==null&&r)return{...e};let o=Object.create(n);return Object.assign(o,e)}}function Us(e,t=!1){return Bs(e)||St(e)||!dt(e)||(Qn(e)>1&&Object.defineProperties(e,{set:Qs,add:Qs,clear:Qs,delete:Qs}),Object.freeze(e),t&&Object.values(e).forEach(r=>Us(r,!0))),e}function OI(){Ge(2)}var Qs={value:OI};function Bs(e){return e===null||typeof e!="object"?!0:Object.isFrozen(e)}var yp={};function Ln(e){let t=yp[e];return t||Ge(0,e),t}function DI(e,t){yp[e]||(yp[e]=t)}var di;function sy(){return di}function jI(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function ty(e,t){t&&(Ln("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function hp(e){Sp(e),e.drafts_.forEach(VI),e.drafts_=null}function Sp(e){e===di&&(di=e.parent_)}function ry(e){return di=jI(di,e)}function VI(e){let t=e[lt];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function ny(e,t){t.unfinalizedDrafts_=t.drafts_.length;let r=t.drafts_[0];return e!==void 0&&e!==r?(r[lt].modified_&&(hp(t),Ge(4)),dt(e)&&(e=Ls(t,e),t.parent_||_s(t,e)),t.patches_&&Ln("Patches").generateReplacementPatches_(r[lt].base_,e,t.patches_,t.inversePatches_)):e=Ls(t,r,[]),hp(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==vp?e:void 0}function Ls(e,t,r){if(Bs(t))return t;let n=e.immer_.shouldUseStrictIteration(),o=t[lt];if(!o)return ui(t,(a,d)=>oy(e,o,t,a,d,r),n),t;if(o.scope_!==e)return t;if(!o.modified_)return _s(e,o.base_,!0),o.base_;if(!o.finalized_){o.finalized_=!0,o.scope_.unfinalizedDrafts_--;let a=o.copy_,d=a,p=!1;o.type_===3&&(d=new Set(a),a.clear(),p=!0),ui(d,(m,f)=>oy(e,o,a,m,f,r,p),n),_s(e,a,!1),r&&e.patches_&&Ln("Patches").generatePatches_(o,r,e.patches_,e.inversePatches_)}return o.copy_}function oy(e,t,r,n,o,a,d){if(o==null||typeof o!="object"&&!d)return;let p=Bs(o);if(!(p&&!d)){if(St(o)){let m=a&&t&&t.type_!==3&&!li(t.assigned_,n)?a.concat(n):void 0,f=Ls(e,o,m);if(iy(r,n,f),St(f))e.canAutoFreeze_=!1;else return}else d&&r.add(o);if(dt(o)&&!p){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1||t&&t.base_&&t.base_[n]===o&&p)return;Ls(e,o),(!t||!t.scope_.parent_)&&typeof n!="symbol"&&(Ro(r)?r.has(n):Object.prototype.propertyIsEnumerable.call(r,n))&&_s(e,o)}}}function _s(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Us(t,r)}function NI(e,t){let r=Array.isArray(e),n={type_:r?1:0,scope_:t?t.scope_:sy(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1},o=n,a=xp;r&&(o=[n],a=pi);let{revoke:d,proxy:p}=Proxy.revocable(o,a);return n.draft_=p,n.revoke_=d,p}var xp={get(e,t){if(t===lt)return e;let r=Mn(e);if(!li(r,t))return MI(e,r,t);let n=r[t];return e.finalized_||!dt(n)?n:n===mp(e.base_,t)?(fp(e),e.copy_[t]=Ap(n,e)):n},has(e,t){return t in Mn(e)},ownKeys(e){return Reflect.ownKeys(Mn(e))},set(e,t,r){let n=cy(Mn(e),t);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){let o=mp(Mn(e),t),a=o?.[lt];if(a&&a.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(kI(r,o)&&(r!==void 0||li(e.base_,t)))return!0;fp(e),Cp(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 mp(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,fp(e),Cp(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let r=Mn(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 vo(e.base_)},setPrototypeOf(){Ge(12)}},pi={};ui(xp,(e,t)=>{pi[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});pi.deleteProperty=function(e,t){return pi.set.call(this,e,t,void 0)};pi.set=function(e,t,r){return xp.set.call(this,e[0],t,r,e[0])};function mp(e,t){let r=e[lt];return(r?Mn(r):e)[t]}function MI(e,t,r){let n=cy(t,r);return n?"value"in n?n.value:n.get?.call(e.draft_):void 0}function cy(e,t){if(!(t in e))return;let r=vo(e);for(;r;){let n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=vo(r)}}function Cp(e){e.modified_||(e.modified_=!0,e.parent_&&Cp(e.parent_))}function fp(e){e.copy_||(e.copy_=gp(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var QI=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!0,this.produce=(t,r,n)=>{if(typeof t=="function"&&typeof r!="function"){let a=r;r=t;let d=this;return function(m=a,...f){return d.produce(m,g=>r.call(this,g,...f))}}typeof r!="function"&&Ge(6),n!==void 0&&typeof n!="function"&&Ge(7);let o;if(dt(t)){let a=ry(this),d=Ap(t,void 0),p=!0;try{o=r(d),p=!1}finally{p?hp(a):Sp(a)}return ty(a,n),ny(o,a)}else if(!t||typeof t!="object"){if(o=r(t),o===void 0&&(o=t),o===vp&&(o=void 0),this.autoFreeze_&&Us(o,!0),n){let a=[],d=[];Ln("Patches").generateReplacementPatches_(t,o,a,d),n(a,d)}return o}else Ge(1,t)},this.produceWithPatches=(t,r)=>{if(typeof t=="function")return(d,...p)=>this.produceWithPatches(d,m=>t(m,...p));let n,o;return[this.produce(t,r,(d,p)=>{n=d,o=p}),n,o]},typeof e?.autoFreeze=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof e?.useStrictShallowCopy=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),typeof e?.useStrictIteration=="boolean"&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){dt(e)||Ge(8),St(e)&&(e=uy(e));let t=ry(this),r=Ap(e,void 0);return r[lt].isManual_=!0,Sp(t),r}finishDraft(e,t){let r=e&&e[lt];(!r||!r.isManual_)&&Ge(9);let{scope_:n}=r;return ty(n,t),ny(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}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=Ln("Patches").applyPatches_;return St(e)?n(e,t):this.produce(e,o=>n(o,t))}};function Ap(e,t){let r=Ro(e)?Ln("MapSet").proxyMap_(e,t):fi(e)?Ln("MapSet").proxySet_(e,t):NI(e,t);return(t?t.scope_:sy()).drafts_.push(r),r}function uy(e){return St(e)||Ge(10,e),ly(e)}function ly(e){if(!dt(e)||Bs(e))return e;let t=e[lt],r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=gp(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=gp(e,!0);return ui(r,(o,a)=>{iy(r,o,ly(a))},n),t&&(t.finalized_=!1),r}function dy(){let t="replace",r="add",n="remove";function o(v,A,R,F){switch(v.type_){case 0:case 2:return d(v,A,R,F);case 1:return a(v,A,R,F);case 3:return p(v,A,R,F)}}function a(v,A,R,F){let{base_:x,assigned_:w}=v,P=v.copy_;P.length<x.length&&([x,P]=[P,x],[R,F]=[F,R]);for(let b=0;b<x.length;b++)if(w[b]&&P[b]!==x[b]){let T=A.concat([b]);R.push({op:t,path:T,value:C(P[b])}),F.push({op:t,path:T,value:C(x[b])})}for(let b=x.length;b<P.length;b++){let T=A.concat([b]);R.push({op:r,path:T,value:C(P[b])})}for(let b=P.length-1;x.length<=b;--b){let T=A.concat([b]);F.push({op:n,path:T})}}function d(v,A,R,F){let{base_:x,copy_:w}=v;ui(v.assigned_,(P,b)=>{let T=pp(x,P),N=pp(w,P),O=b?li(x,P)?t:r:n;if(T===N&&O===t)return;let k=A.concat(P);R.push(O===n?{op:O,path:k}:{op:O,path:k,value:N}),F.push(O===r?{op:n,path:k}:O===n?{op:r,path:k,value:C(T)}:{op:t,path:k,value:C(T)})})}function p(v,A,R,F){let{base_:x,copy_:w}=v,P=0;x.forEach(b=>{if(!w.has(b)){let T=A.concat([P]);R.push({op:n,path:T,value:b}),F.unshift({op:r,path:T,value:b})}P++}),P=0,w.forEach(b=>{if(!x.has(b)){let T=A.concat([P]);R.push({op:r,path:T,value:b}),F.unshift({op:n,path:T,value:b})}P++})}function m(v,A,R,F){R.push({op:t,path:[],value:A===vp?void 0:A}),F.push({op:t,path:[],value:v})}function f(v,A){return A.forEach(R=>{let{path:F,op:x}=R,w=v;for(let N=0;N<F.length-1;N++){let O=Qn(w),k=F[N];typeof k!="string"&&typeof k!="number"&&(k=""+k),(O===0||O===1)&&(k==="__proto__"||k==="constructor")&&Ge(19),typeof w=="function"&&k==="prototype"&&Ge(19),w=pp(w,k),typeof w!="object"&&Ge(18,F.join("/"))}let P=Qn(w),b=g(R.value),T=F[F.length-1];switch(x){case t:switch(P){case 2:return w.set(T,b);case 3:Ge(16);default:return w[T]=b}case r:switch(P){case 1:return T==="-"?w.push(b):w.splice(T,0,b);case 2:return w.set(T,b);case 3:return w.add(b);default:return w[T]=b}case n:switch(P){case 1:return w.splice(T,1);case 2:return w.delete(T);case 3:return w.delete(R.value);default:return delete w[T]}default:Ge(17,x)}}),v}function g(v){if(!dt(v))return v;if(Array.isArray(v))return v.map(g);if(Ro(v))return new Map(Array.from(v.entries()).map(([R,F])=>[R,g(F)]));if(fi(v))return new Set(Array.from(v).map(g));let A=Object.create(vo(v));for(let R in v)A[R]=g(v[R]);return li(v,ci)&&(A[ci]=v[ci]),A}function C(v){return St(v)?g(v):v}DI("Patches",{applyPatches_:f,generatePatches_:o,generateReplacementPatches_:m})}var mi=new QI,Fr=mi.produce,$s=mi.produceWithPatches.bind(mi);var Fp=mi.applyPatches.bind(mi);l();s();u();c();function LI(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function _I(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function UI(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 py=e=>Array.isArray(e)?e:[e];function BI(e){let t=Array.isArray(e[0])?e[0]:e;return UI(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function $I(e,t){let r=[],{length:n}=e;for(let o=0;o<n;o++)r.push(e[o].apply(null,t));return r}var L0=Symbol();var _0=Object.getPrototypeOf({});var HI=class{constructor(e){this.value=e}deref(){return this.value}},GI=typeof WeakRef<"u"?WeakRef:HI,zI=0,my=1;function Hs(){return{s:zI,v:void 0,o:null,p:null}}function xo(e,t={}){let r=Hs(),{resultEqualityCheck:n}=t,o,a=0;function d(){let p=r,{length:m}=arguments;for(let C=0,v=m;C<v;C++){let A=arguments[C];if(typeof A=="function"||typeof A=="object"&&A!==null){let R=p.o;R===null&&(p.o=R=new WeakMap);let F=R.get(A);F===void 0?(p=Hs(),R.set(A,p)):p=F}else{let R=p.p;R===null&&(p.p=R=new Map);let F=R.get(A);F===void 0?(p=Hs(),R.set(A,p)):p=F}}let f=p,g;if(p.s===my)g=p.v;else if(g=e.apply(null,arguments),a++,n){let C=o?.deref?.()??o;C!=null&&n(C,g)&&(g=C,a!==0&&a--),o=typeof g=="object"&&g!==null||typeof g=="function"?new GI(g):g}return f.s=my,f.v=g,g}return d.clearCache=()=>{r=Hs(),d.resetResultsCount()},d.resultsCount=()=>a,d.resetResultsCount=()=>{a=0},d}function fy(e,...t){let r=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,n=(...o)=>{let a=0,d=0,p,m={},f=o.pop();typeof f=="object"&&(m=f,f=o.pop()),LI(f,`createSelector expects an output function after the inputs, but received: [${typeof f}]`);let g={...r,...m},{memoize:C,memoizeOptions:v=[],argsMemoize:A=xo,argsMemoizeOptions:R=[],devModeChecks:F={}}=g,x=py(v),w=py(R),P=BI(o),b=C(function(){return a++,f.apply(null,arguments)},...x),T=!0,N=A(function(){d++;let k=$I(P,arguments);return p=b.apply(null,k),p},...w);return Object.assign(N,{resultFunc:f,memoizedResultFunc:b,dependencies:P,dependencyRecomputations:()=>d,resetDependencyRecomputations:()=>{d=0},lastResult:()=>p,recomputations:()=>a,resetRecomputations:()=>{a=0},memoize:C,argsMemoize:A})};return Object.assign(n,{withTypes:()=>n}),n}var Ie=fy(xo),WI=Object.assign((e,t=Ie)=>{_I(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(a=>e[a]);return t(n,(...a)=>a.reduce((d,p,m)=>(d[r[m]]=p,d),{}))},{withTypes:()=>WI});l();s();u();c();function gy(e){return({dispatch:r,getState:n})=>o=>a=>typeof a=="function"?a(r,n,e):o(a)}var yy=gy(),hy=gy;var YI=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Ao:Ao.apply(null,arguments)},a_=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}},KI=e=>e&&typeof e.match=="function";function I(e,t){function r(...n){if(t){let o=t(...n);if(!o)throw new Error(Mt(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=>Ms(n)&&n.type===e,r}var Ry=class gi extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,gi.prototype)}static get[Symbol.species](){return gi}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new gi(...t[0].concat(this)):new gi(...t.concat(this))}};function Sy(e){return dt(e)?Fr(e,()=>{}):e}function Cy(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function JI(e){return typeof e=="boolean"}var XI=()=>function(t){let{thunk:r=!0,immutableCheck:n=!0,serializableCheck:o=!0,actionCreatorCheck:a=!0}=t??{},d=new Ry;return r&&(JI(r)?d.push(yy):d.push(hy(r.extraArgument))),d},yi="RTK_autoBatch",bo=()=>e=>({payload:e,meta:{[yi]:!0}}),Ay=e=>t=>{setTimeout(t,e)},ZI=(e={type:"raf"})=>t=>(...r)=>{let n=t(...r),o=!0,a=!1,d=!1,p=new Set,m=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Ay(10):e.type==="callback"?e.queueNotification:Ay(e.timeout),f=()=>{d=!1,a&&(a=!1,p.forEach(g=>g()))};return Object.assign({},n,{subscribe(g){let C=()=>o&&g(),v=n.subscribe(C);return p.add(g),()=>{v(),p.delete(g)}},dispatch(g){try{return o=!g?.meta?.[yi],a=!o,a&&(d||(d=!0,m(f))),n.dispatch(g)}finally{o=!0}}})},ew=e=>function(r){let{autoBatch:n=!0}=r??{},o=new Ry(e);return n&&o.push(ZI(typeof n=="object"?n:void 0)),o};function xy(e){let t=XI(),{reducer:r=void 0,middleware:n,devTools:o=!0,preloadedState:a=void 0,enhancers:d=void 0}=e||{},p;if(typeof r=="function")p=r;else if(Wt(r))p=Co(r);else throw new Error(Mt(1));let m;typeof n=="function"?m=n(t):m=t();let f=Ao;o&&(f=YI({trace:!1,...(typeof o=="object"&&o)}));let g=Zg(...m),C=ew(g),v=typeof d=="function"?d(C):C(),A=f(...v);return dp(p,a,A)}function Fy(e){let t={},r=[],n,o={addCase(a,d){let p=typeof a=="string"?a:a.type;if(!p)throw new Error(Mt(28));if(p in t)throw new Error(Mt(29));return t[p]=d,o},addMatcher(a,d){return r.push({matcher:a,reducer:d}),o},addDefaultCase(a){return n=a,o}};return e(o),[t,r,n]}function tw(e){return typeof e=="function"}function J(e,t){let[r,n,o]=Fy(t),a;if(tw(e))a=()=>Sy(e());else{let p=Sy(e);a=()=>p}function d(p=a(),m){let f=[r[m.type],...n.filter(({matcher:g})=>g(m)).map(({reducer:g})=>g)];return f.filter(g=>!!g).length===0&&(f=[o]),f.reduce((g,C)=>{if(C)if(St(g)){let A=C(g,m);return A===void 0?g:A}else{if(dt(g))return Fr(g,v=>C(v,m));{let v=C(g,m);if(v===void 0){if(g===null)return g;throw Error("A case reducer on a non-draftable value must not return undefined")}return v}}return g},p)}return d.getInitialState=a,d}var by=(e,t)=>KI(e)?e.match(t):e(t);function Yt(...e){return t=>e.some(r=>by(r,t))}function Fo(...e){return t=>e.every(r=>by(r,t))}function zs(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 hi(e){return typeof e[0]=="function"&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function Ws(...e){return e.length===0?t=>zs(t,["pending"]):hi(e)?Yt(...e.map(t=>t.pending)):Ws()(e[0])}function _n(...e){return e.length===0?t=>zs(t,["rejected"]):hi(e)?Yt(...e.map(t=>t.rejected)):_n()(e[0])}function Si(...e){let t=r=>r&&r.meta&&r.meta.rejectedWithValue;return e.length===0?Fo(_n(...e),t):hi(e)?Fo(_n(...e),t):Si()(e[0])}function br(...e){return e.length===0?t=>zs(t,["fulfilled"]):hi(e)?Yt(...e.map(t=>t.fulfilled)):br()(e[0])}function Ys(...e){return e.length===0?t=>zs(t,["pending","fulfilled","rejected"]):hi(e)?Yt(...e.flatMap(t=>[t.pending,t.rejected,t.fulfilled])):Ys()(e[0])}var rw="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Ks=(e=21)=>{let t="",r=e;for(;r--;)t+=rw[Math.random()*64|0];return t},nw=["name","message","stack","code"],bp=class{constructor(e,t){ye(this,"_type");this.payload=e,this.meta=t}},vy=class{constructor(e,t){ye(this,"_type");this.payload=e,this.meta=t}},ow=e=>{if(typeof e=="object"&&e!==null){let t={};for(let r of nw)typeof e[r]=="string"&&(t[r]=e[r]);return t}return{message:String(e)}},Y=(()=>{function e(t,r,n){let o=I(t+"/fulfilled",(m,f,g,C)=>({payload:m,meta:{...(C||{}),arg:g,requestId:f,requestStatus:"fulfilled"}})),a=I(t+"/pending",(m,f,g)=>({payload:void 0,meta:{...(g||{}),arg:f,requestId:m,requestStatus:"pending"}})),d=I(t+"/rejected",(m,f,g,C,v)=>({payload:C,error:(n&&n.serializeError||ow)(m||"Rejected"),meta:{...(v||{}),arg:g,requestId:f,rejectedWithValue:!!C,requestStatus:"rejected",aborted:m?.name==="AbortError",condition:m?.name==="ConditionError"}}));function p(m){return(f,g,C)=>{let v=n?.idGenerator?n.idGenerator(m):Ks(),A=new i.AbortController,R,F;function x(P){F=P,A.abort()}let w=_asyncToGenerator(function*(){let P;try{let T=n?.condition?.(m,{getState:g,extra:C});if(iw(T)&&(T=yield T),T===!1||A.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let N=new Promise((O,k)=>{R=()=>{k({name:"AbortError",message:F||"Aborted"})},A.signal.addEventListener("abort",R)});f(a(v,m,n?.getPendingMeta?.({requestId:v,arg:m},{getState:g,extra:C}))),P=yield Promise.race([N,Promise.resolve(r(m,{dispatch:f,getState:g,extra:C,requestId:v,signal:A.signal,abort:x,rejectWithValue:(O,k)=>new bp(O,k),fulfillWithValue:(O,k)=>new vy(O,k)})).then(O=>{if(O instanceof bp)throw O;return O instanceof vy?o(O.payload,v,m,O.meta):o(O,v,m)})])}catch(T){P=T instanceof bp?d(null,v,m,T.payload,T.meta):d(T,v,m)}finally{R&&A.signal.removeEventListener("abort",R)}return n&&!n.dispatchConditionRejection&&d.match(P)&&P.meta.condition||f(P),P})();return Object.assign(w,{abort:x,requestId:v,arg:m,unwrap(){return w.then(aw)}})}}return Object.assign(p,{pending:a,rejected:d,fulfilled:o,settled:Yt(d,o),typePrefix:t})}return e.withTypes=()=>e,e})();function aw(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function iw(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var Iy=Symbol.for("rtk-slice-createasyncthunk"),l_={[Iy]:Y};function sw(e,t){return`${e}/${t}`}function cw({creators:e}={}){let t=e?.asyncThunk?.[Iy];return function(n){let{name:o,reducerPath:a=o}=n;if(!o)throw new Error(Mt(11));typeof process<"u";let d=(typeof n.reducers=="function"?n.reducers(lw()):n.reducers)||{},p=Object.keys(d),m={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},f={addCase(P,b){let T=typeof P=="string"?P:P.type;if(!T)throw new Error(Mt(12));if(T in m.sliceCaseReducersByType)throw new Error(Mt(13));return m.sliceCaseReducersByType[T]=b,f},addMatcher(P,b){return m.sliceMatchers.push({matcher:P,reducer:b}),f},exposeAction(P,b){return m.actionCreators[P]=b,f},exposeCaseReducer(P,b){return m.sliceCaseReducersByName[P]=b,f}};p.forEach(P=>{let b=d[P],T={reducerName:P,type:sw(o,P),createNotation:typeof n.reducers=="function"};pw(b)?fw(T,b,f,t):dw(T,b,f)});function g(){let[P={},b=[],T=void 0]=typeof n.extraReducers=="function"?Fy(n.extraReducers):[n.extraReducers],N={...P,...m.sliceCaseReducersByType};return J(n.initialState,O=>{for(let k in N)O.addCase(k,N[k]);for(let k of m.sliceMatchers)O.addMatcher(k.matcher,k.reducer);for(let k of b)O.addMatcher(k.matcher,k.reducer);T&&O.addDefaultCase(T)})}let C=P=>P,v=new Map,A;function R(P,b){return A||(A=g()),A(P,b)}function F(){return A||(A=g()),A.getInitialState()}function x(P,b=!1){function T(O){let k=O[P];return typeof k>"u"&&b&&(k=F()),k}function N(O=C){let k=Cy(v,b,()=>new WeakMap);return Cy(k,O,()=>{let D={};for(let[L,_]of Object.entries(n.selectors??{}))D[L]=uw(_,O,F,b);return D})}return{reducerPath:P,getSelectors:N,get selectors(){return N(T)},selectSlice:T}}let w={name:o,reducer:R,actions:m.actionCreators,caseReducers:m.sliceCaseReducersByName,getInitialState:F,...x(a),injectInto(P,{reducerPath:b,...T}={}){let N=b??a;return P.inject({reducerPath:N,reducer:R},T),{...w,...x(N,!0)}}};return w}}function uw(e,t,r,n){function o(a,...d){let p=t(a);return typeof p>"u"&&n&&(p=r()),e(p,...d)}return o.unwrapped=e,o}var Un=cw();function lw(){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 dw({type:e,reducerName:t,createNotation:r},n,o){let a,d;if("reducer"in n){if(r&&!mw(n))throw new Error(Mt(17));a=n.reducer,d=n.prepare}else a=n;o.addCase(e,a).exposeCaseReducer(t,a).exposeAction(t,d?I(e,d):I(e))}function pw(e){return e._reducerDefinitionType==="asyncThunk"}function mw(e){return e._reducerDefinitionType==="reducerWithPrepare"}function fw({type:e,reducerName:t},r,n,o){if(!o)throw new Error(Mt(18));let{payloadCreator:a,fulfilled:d,pending:p,rejected:m,settled:f,options:g}=r,C=o(e,a,g);n.exposeAction(t,C),d&&n.addCase(C.fulfilled,d),p&&n.addCase(C.pending,p),m&&n.addCase(C.rejected,m),f&&n.addMatcher(C.settled,f),n.exposeCaseReducer(t,{fulfilled:d||Gs,pending:p||Gs,rejected:m||Gs,settled:f||Gs})}function Gs(){}var wy="listener",Py="completed",Ey="cancelled",d_=`task-${Ey}`,p_=`task-${Py}`,m_=`${wy}-${Ey}`,f_=`${wy}-${Py}`;var{assign:qy}=Object;var Ip="listenerMiddleware";var gw=qy(I(`${Ip}/add`),{withTypes:()=>gw}),g_=I(`${Ip}/removeAll`),yw=qy(I(`${Ip}/remove`),{withTypes:()=>yw});var y_=Symbol.for("rtk-state-proxy-original");function Mt(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}l();s();u();c();l();s();u();c();l();s();u();c();l();s();u();c();l();s();u();c();var Ty=/^(?:[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 hw(e){return typeof e=="string"&&Ty.test(e)}var wp=hw;l();s();u();c();var ze=[];for(let e=0;e<256;++e)ze.push((e+256).toString(16).slice(1));function ky(e,t=0){return(ze[e[t+0]]+ze[e[t+1]]+ze[e[t+2]]+ze[e[t+3]]+"-"+ze[e[t+4]]+ze[e[t+5]]+"-"+ze[e[t+6]]+ze[e[t+7]]+"-"+ze[e[t+8]]+ze[e[t+9]]+"-"+ze[e[t+10]]+ze[e[t+11]]+ze[e[t+12]]+ze[e[t+13]]+ze[e[t+14]]+ze[e[t+15]]).toLowerCase()}l();s();u();c();var Pp,Sw=new Uint8Array(16);function Ep(){if(!Pp){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Pp=crypto.getRandomValues.bind(crypto)}return Pp(Sw)}l();s();u();c();l();s();u();c();var Cw=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),qp={randomUUID:Cw};function Aw(e,t,r){if(qp.randomUUID&&!t&&!e)return qp.randomUUID();e=e||{};let n=e.random??e.rng?.()??Ep();if(n.length<16)throw new Error("Random bytes length must be >= 16");if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,t){if(r=r||0,r<0||r+16>t.length)throw new RangeError(`UUID byte range ${r}:${r+15} is out of buffer bounds`);for(let o=0;o<16;++o)t[r+o]=n[o];return t}return ky(n)}var Tp=Aw;l();s();u();c();function Oy(){let e=typeof window<"u";return{sendMessage(t){e&&window.postMessage(t,"*")}}}function vw({config:e,environment:t,event:r,listenerManager:n}){let{url:o,token:a,mode:d}=e;d!=="disabled"&&(n.call(r),t.send(o,a,r))}var Dy="visitorId";function Rw(e){return{getClientId:()=>{let t=e.get(),r=t.storage,n=r.getItem(Dy),o=n&&wp(n)?n:t.generateUUID();return r.setItem(Dy,o),o}}}var Qy="1.2.7",kp=128,Ly=192,jy=224,Vy=240,xw=248;function Fw(e){return(e&xw)===Vy?4:(e&Vy)===jy?3:(e&jy)===Ly?2:1}function bw(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&kp)!=kp)break;if(r-=3,(n&Ly)!=kp){t-r>=Fw(n)*3&&(r=t);break}}return e.substring(0,r)}function Iw(e){let{trackingId:t}=e;return{trackingId:t}}function ww(e){return(e.source||[]).concat([`relay@${Qy}`])}function _y(e,t,r,n){let{getReferrer:o,getLocation:a,getUserAgent:d}=r,p=Iw(t),m=n.getClientId();return Object.freeze({type:e,config:p,ts:Date.now(),source:ww(t),clientId:m,userAgent:d(),referrer:Ny(o()),location:Ny(a())})}function Ny(e){return e!==null?bw(e,1024):null}function Pw(e,t,r,n,o){return{...t,meta:_y(e,r,n,o)}}var Ew="*";function qw(){let e=[];function t({type:m,callback:f}){return e.findIndex(g=>g.type===m&&g.callback===f)}function r(m,f){return m.type==="*"||f===m.type}function n(m){return t(m)<0&&e.push(m),()=>p(m.type,m.callback)}function o(m){e.forEach(f=>{if(r(f,m.meta.type))try{f.callback(m)}catch(g){console.error(g)}})}function a(m){if(m===Ew)e.length=0;else for(let f=e.length-1;f>=0;f--)e[f].type===m&&e.splice(f,1)}function d(m){let f=t(m);f>=0&&e.splice(f,1)}function p(m,f){f?d({type:m,callback:f}):a(m)}return{add:n,call:o,remove:p}}function My({url:e,token:t,trackingId:r,...n}){return Object.freeze({url:e,token:t,trackingId:r,...(!!n.mode&&{mode:n.mode}),...(!!n.source&&{source:n.source}),...(!!n.environment&&{environment:n.environment})})}function Tw(e){let t=My(e);return{get:()=>t,update:r=>{t=My({...t,...r})}}}var Op=kw();function kw(){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 a of o){let d=a.replace(/^\s+/,"");if(d.lastIndexOf(n,0)===0)return d.substring(n.length,d.length)}return null},setItem(r,n,o){let a=t(window.location.hostname),d=`;expires=${new Date(new Date().getTime()+o).toUTCString()}`,p=a?`;domain=${a}`:"";document.cookie=`${e}${r}=${n}${d}${p};path=/;SameSite=Lax`},removeItem(r){this.setItem(r,"",-1)}}}function Ow(){return{getItem(e){return Op.getItem(e)||localStorage.getItem(e)},removeItem(e){Op.removeItem(e),localStorage.removeItem(e)},setItem(e,t){localStorage.setItem(e,t),Op.setItem(e,t,31556952e3)}}}function Dw(){let e=document.referrer;return e===""?null:e}function Dp(){return{runtime:"browser",send:(e,t,r)=>{let n=navigator.sendBeacon(`${e}?access_token=${t}`,new Blob([JSON.stringify([r])],{type:"application/json"}));if(Oy().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:()=>Dw(),getLocation:()=>window.location.href,getUserAgent:()=>navigator.userAgent,generateUUID:()=>Tp(),storage:Ow()}}function jw(){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 Vw(){return{getItem(){return null},removeItem(){},setItem(){}}}function Nw(){return{runtime:"null",send:()=>{},getReferrer:()=>null,getLocation:()=>null,getUserAgent:()=>null,generateUUID:()=>"",storage:Vw()}}function Mw(e){let t=e.get().mode!=="disabled",r=e.get().environment,n=Nw();return t&&r?{storage:n.storage,...r,runtime:"custom"}:t&&Qw()&&jw()?Dp():n}function Qw(){try{return typeof window=="object"}catch{return!1}}function Lw(e){return{get:()=>Object.freeze(Mw(e))}}function Uy(e){let t=Tw(e),r=qw(),n=Lw(t),o=Rw(n);return{emit:(a,d)=>{let p=t.get(),m=n.get(),f=Pw(a,d,p,m,o);return vw({config:p,environment:m,event:f,listenerManager:r})},getMeta:a=>_y(a,t.get(),n.get(),o),on:(a,d)=>r.add({type:a,callback:d}),off:(a,d)=>r.remove(a,d),updateConfig:a=>t.update(a),version:Qy}}l();s();u();c();function By(){return typeof window<"u"&&typeof document<"u"}l();s();u();c();l();s();u();c();var Io="3.35.4",$y=["@coveo/atomic","@coveo/quantic"];var Lr=Ie(e=>e.source,e=>Object.entries(e).map(([t,r])=>`${t}@${r}`).concat(`@coveo/headless@${Io}`));var Ci=Ie(e=>e.configuration.organizationId,e=>e.configuration.environment,e=>e.configuration.accessToken,e=>e.configuration.analytics,e=>Lr(e.configuration.analytics),(e,t)=>t,(e,t,r,{trackingId:n,apiBaseUrl:o,enabled:a},d,p)=>{let m=Uw(p);return Uy({mode:a?"emit":"disabled",url:o??Ds(e,t),token:r,trackingId:n??null,source:d,environment:m})}),_w={generateUUID:()=>"",getLocation:()=>null,getReferrer:()=>null,getUserAgent:()=>null,send:()=>{},storage:{getItem:()=>null,setItem:()=>{},removeItem:()=>{}}},Uw=e=>{if(!e)return;let t=e();return{...(By()?Dp():_w),generateUUID:()=>t.clientId,getLocation:()=>t.location,getReferrer:()=>t.referrer,getUserAgent:()=>t.userAgent}};l();s();u();c();l();s();u();c();function Kt(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 j(e,t,r,n){function o(a){return a instanceof r?a:new r(function(d){d(a)})}return new(r||(r=Promise))(function(a,d){function p(g){try{f(n.next(g))}catch(C){d(C)}}function m(g){try{f(n.throw(g))}catch(C){d(C)}}function f(g){g.done?a(g.value):o(g.value).then(p,m)}f((n=n.apply(e,t||[])).next())})}var le;(function(e){e.search="search",e.click="click",e.custom="custom",e.view="view",e.collect="collect"})(le||(le={}));function Np(){return typeof window<"u"}function Jp(){return typeof navigator<"u"}function wo(){return typeof document<"u"}function Mp(){try{return typeof localStorage<"u"}catch{return!1}}function Bw(){try{return typeof sessionStorage<"u"}catch{return!1}}function nh(){return Jp()&&navigator.cookieEnabled}var $w=[le.click,le.custom,le.search,le.view],Hw=(e,t)=>$w.indexOf(e)!==-1?Object.assign({language:wo()?document.documentElement.lang:"unknown",userAgent:Jp()?navigator.userAgent:"unknown"},t):t,vi=class e{static set(t,r,n){var o,a,d,p;n&&(a=new Date,a.setTime(a.getTime()+n)),p=window.location.hostname,p.indexOf(".")===-1?Hy(t,r,a):(d=p.split("."),o=d[d.length-2]+"."+d[d.length-1],Hy(t,r,a,o))}static get(t){for(var r=t+"=",n=document.cookie.split(";"),o=0;o<n.length;o++){var a=n[o];if(a=a.replace(/^\s+/,""),a.lastIndexOf(r,0)===0)return a.substring(r.length,a.length)}return null}static erase(t){e.set(t,"",-1)}};function Hy(e,t,r,n){document.cookie=`${e}=${t}`+(r?`;expires=${r.toUTCString()}`:"")+(n?`;domain=${n}`:"")+";path=/;SameSite=Lax"}function Gw(){return Mp()?localStorage:nh()?new Ri:Bw()?sessionStorage:new Eo}var Ri=class e{getItem(t){return vi.get(`${e.prefix}${t}`)}removeItem(t){vi.erase(`${e.prefix}${t}`)}setItem(t,r,n){vi.set(`${e.prefix}${t}`,r,n)}};Ri.prefix="coveo_";var Qp=class{constructor(){this.cookieStorage=new Ri}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)}},Eo=class{getItem(t){return null}removeItem(t){}setItem(t,r){}},Js="__coveo.analytics.history",zw=20,Ww=1e3*60,Yw=75,ec=class{constructor(t){this.store=t||Gw()}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 j(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 j(this,void 0,void 0,function*(){let t=yield this.getHistoryWithInternalTimeAsync();return this.stripEmptyQueries(this.stripInternalTime(t))})}getHistoryWithInternalTime(){try{let t=this.store.getItem(Js);return t&&typeof t=="string"?JSON.parse(t):[]}catch{return[]}}getHistoryWithInternalTimeAsync(){return j(this,void 0,void 0,function*(){try{let t=yield this.store.getItem(Js);return t?JSON.parse(t):[]}catch{return[]}})}setHistory(t){try{this.store.setItem(Js,JSON.stringify(t.slice(0,zw)))}catch{}}clear(){try{this.store.removeItem(Js)}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,Yw)),t}isValidEntry(t){let r=this.getMostRecentElement();return r&&r.value==t.value?(t.internalTime||0)-(r.internalTime||0)>Ww:!0}stripInternalTime(t){return Array.isArray(t)?t.map(r=>{let{name:n,time:o,value:a}=r;return{name:n,time:o,value:a}}):[]}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))}};var Kw=(e,t)=>j(void 0,void 0,void 0,function*(){return e===le.view?(yield Jw(t.contentIdValue),Object.assign({location:window.location.toString(),referrer:document.referrer,title:document.title},t)):t}),Jw=e=>j(void 0,void 0,void 0,function*(){let t=new ec,r={name:"PageView",value:e,time:new Date().toISOString()};yield t.addElementAsync(r)}),Xs,Xw=new Uint8Array(16);function Zw(){if(!Xs&&(Xs=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Xs))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Xs(Xw)}var eP=/^(?:[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 tc(e){return typeof e=="string"&&eP.test(e)}var We=[];for(let e=0;e<256;++e)We.push((e+256).toString(16).slice(1));function oh(e,t=0){return We[e[t+0]]+We[e[t+1]]+We[e[t+2]]+We[e[t+3]]+"-"+We[e[t+4]]+We[e[t+5]]+"-"+We[e[t+6]]+We[e[t+7]]+"-"+We[e[t+8]]+We[e[t+9]]+"-"+We[e[t+10]]+We[e[t+11]]+We[e[t+12]]+We[e[t+13]]+We[e[t+14]]+We[e[t+15]]}function tP(e){if(!tc(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 rP(e){e=unescape(encodeURIComponent(e));let t=[];for(let r=0;r<e.length;++r)t.push(e.charCodeAt(r));return t}var nP="6ba7b810-9dad-11d1-80b4-00c04fd430c8",oP="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function aP(e,t,r){function n(o,a,d,p){var m;if(typeof o=="string"&&(o=rP(o)),typeof a=="string"&&(a=tP(a)),((m=a)===null||m===void 0?void 0:m.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let f=new Uint8Array(16+o.length);if(f.set(a),f.set(o,a.length),f=r(f),f[6]=f[6]&15|t,f[8]=f[8]&63|128,d){p=p||0;for(let g=0;g<16;++g)d[p+g]=f[g];return d}return oh(f)}try{n.name=e}catch{}return n.DNS=nP,n.URL=oP,n}var iP=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Gy={randomUUID:iP};function Bn(e,t,r){if(Gy.randomUUID&&!t&&!e)return Gy.randomUUID();e=e||{};let n=e.random||(e.rng||Zw)();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 oh(n)}function sP(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 jp(e,t){return e<<t|e>>>32-t}function cP(e){let t=[1518500249,1859775393,2400959708,3395469782],r=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof e=="string"){let d=unescape(encodeURIComponent(e));e=[];for(let p=0;p<d.length;++p)e.push(d.charCodeAt(p))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);let n=e.length/4+2,o=Math.ceil(n/16),a=new Array(o);for(let d=0;d<o;++d){let p=new Uint32Array(16);for(let m=0;m<16;++m)p[m]=e[d*64+m*4]<<24|e[d*64+m*4+1]<<16|e[d*64+m*4+2]<<8|e[d*64+m*4+3];a[d]=p}a[o-1][14]=(e.length-1)*8/Math.pow(2,32),a[o-1][14]=Math.floor(a[o-1][14]),a[o-1][15]=(e.length-1)*8&4294967295;for(let d=0;d<o;++d){let p=new Uint32Array(80);for(let A=0;A<16;++A)p[A]=a[d][A];for(let A=16;A<80;++A)p[A]=jp(p[A-3]^p[A-8]^p[A-14]^p[A-16],1);let m=r[0],f=r[1],g=r[2],C=r[3],v=r[4];for(let A=0;A<80;++A){let R=Math.floor(A/20),F=jp(m,5)+sP(R,f,g,C)+v+t[R]+p[A]>>>0;v=C,C=g,g=jp(f,30)>>>0,f=m,m=F}r[0]=r[0]+m>>>0,r[1]=r[1]+f>>>0,r[2]=r[2]+g>>>0,r[3]=r[3]+C>>>0,r[4]=r[4]+v>>>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 uP=aP("v5",80,cP),zy=uP,ah="2.30.49",Wy=e=>`${e.protocol}//${e.hostname}${e.pathname.indexOf("/")===0?e.pathname:`/${e.pathname}`}${e.search}`,Ai={pageview:"pageview",event:"event"},rc=class{constructor({client:t,uuidGenerator:r=Bn}){this.client=t,this.uuidGenerator=r}},Lp=class extends rc{constructor({client:t,uuidGenerator:r=Bn}){super({client:t,uuidGenerator:r}),this.actionData={},this.pageViewId=r(),this.nextPageViewId=this.pageViewId,this.currentLocation=Wy(window.location),this.lastReferrer=wo()?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:wo()?document.title:"",encoding:wo()?document.characterSet:"UTF-8"},n={screenResolution:`${screen.width}x${screen.height}`,screenColor:`${screen.colorDepth}-bit`},o={language:navigator.language,userAgent:navigator.userAgent},a={time:Date.now(),eventId:this.uuidGenerator()};return Object.assign(Object.assign(Object.assign(Object.assign({},a),n),o),r)}updateLocationForNextPageView(t,r){let{pageViewId:n,referrer:o,location:a}=this.getNextValues(t,r);this.lastReferrer=o,this.pageViewId=n,this.currentLocation=a,t===Ai.pageview&&(this.nextPageViewId=this.uuidGenerator(),this.hasSentFirstPageView=!0)}getNextValues(t,r){return{pageViewId:t===Ai.pageview?this.nextPageViewId:this.pageViewId,referrer:t===Ai.pageview&&this.hasSentFirstPageView?this.currentLocation:this.lastReferrer,location:t===Ai.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 Wy(window.location)}},_r=class e{constructor(t,r){if(!tc(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 a=n.substring(0,8)+"-"+n.substring(8,12)+"-"+n.substring(12,16)+"-"+n.substring(16,20)+"-"+n.substring(20,32);return tc(a)?new e(a,Number.parseInt(o)*1e3):null}};_r.cvo_cid="cvo_cid";_r.expirationTime=120;var _p=class extends rc{constructor({client:t,uuidGenerator:r=Bn}){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 j(this,void 0,void 0,function*(){if(!this.client.getCurrentVisitorId)throw new Error("Could not retrieve current clientId");try{let r=new URL(t),n=yield this.client.getCurrentVisitorId();return r.searchParams.set(_r.cvo_cid,new _r(n,Date.now()).toString()),r.toString()}catch{throw new Error("Invalid URL provided")}})}acceptFrom(t){this.client.setAcceptedLinkReferrers(t)}};_p.Id="link";var qt=Object.keys;function Zs(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}var Vp=128,ih=192,Yy=224,Ky=240;function lP(e){return(e&248)===Ky?4:(e&Ky)===Yy?3:(e&Yy)===ih?2:1}function dP(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&Vp)!=Vp)break;if(r-=3,(n&ih)!=Vp){t-r>=lP(n)*3&&(r=t);break}}return e.substring(0,r)}var Up={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"},pP=qt(Up).map(e=>Up[e]),mP=[...pP].join("|"),fP=new RegExp(`^(${mP}$)`),gP={svcAction:"svc_action",svcActionData:"svc_action_data"},yP=e=>qt(e).filter(t=>e[t]!==void 0).reduce((t,r)=>{let n=Up[r]||r;return Object.assign(Object.assign({},t),{[n]:e[r]})},{}),hP=e=>fP.test(e),SP=[hP],Jy={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",price:"pr",quantity:"qt",coupon:"cc",position:"ps",group:"group"},Xy={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",position:"ps",price:"pr",group:"group"},Ze={action:"pa",list:"pal",listSource:"pls"},nc={id:"ti",revenue:"tr",tax:"tt",shipping:"ts",coupon:"tcc",affiliation:"ta",step:"cos",option:"col"},CP=["loyaltyCardId","loyaltyTier","thirdPartyPersona","companyName","favoriteStore","storeName","userIndustry","userRole","userDepartment","businessUnit"],Bp={id:"quoteId",affiliation:"quoteAffiliation"},$p={id:"reviewId",rating:"reviewRating",comment:"reviewComment"},AP={add:Ze,bookmark_add:Ze,bookmark_remove:Ze,click:Ze,checkout:Ze,checkout_option:Ze,detail:Ze,impression:Ze,remove:Ze,refund:Object.assign(Object.assign({},Ze),nc),purchase:Object.assign(Object.assign({},Ze),nc),quickview:Ze,quote:Object.assign(Object.assign({},Ze),Bp),review:Object.assign(Object.assign({},Ze),$p)},vP=qt(Jy).map(e=>Jy[e]),RP=qt(Xy).map(e=>Xy[e]),xP=qt(Ze).map(e=>Ze[e]),FP=qt(nc).map(e=>nc[e]),bP=qt($p).map(e=>$p[e]),IP=qt(Bp).map(e=>Bp[e]),wP=[...vP,"custom"].join("|"),PP=[...RP,"custom"].join("|"),sh="(pr[0-9]+)",ch="(il[0-9]+pi[0-9]+)",EP=new RegExp(`^${sh}(${wP})$`),qP=new RegExp(`^(${ch}(${PP}))|(il[0-9]+nm)$`),TP=new RegExp(`^(${xP.join("|")})$`),kP=new RegExp(`^(${FP.join("|")})$`),OP=new RegExp(`^${sh}custom$`),DP=new RegExp(`^${ch}custom$`),jP=new RegExp(`^(${[...CP,...bP,...IP].join("|")})$`),VP=e=>EP.test(e),NP=e=>qP.test(e),MP=e=>TP.test(e),QP=e=>kP.test(e),LP=e=>jP.test(e),_P=[NP,VP,MP,QP,LP],UP=[OP,DP],BP={anonymizeIp:"aip"},$P={eventCategory:"ec",eventAction:"ea",eventLabel:"el",eventValue:"ev",page:"dp",visitorId:"cid",clientId:"cid",userId:"uid",currencyCode:"cu"},HP={hitType:"t",pageViewId:"pid",encoding:"de",location:"dl",referrer:"dr",screenColor:"sd",screenResolution:"sr",title:"dt",userAgent:"ua",language:"ul",eventId:"z",time:"tm"},GP=["contentId","contentIdKey","contentType","searchHub","tab","searchUid","permanentId","contentLocale","trackingId"],zP=Object.assign(Object.assign(Object.assign(Object.assign({},BP),$P),HP),GP.reduce((e,t)=>Object.assign(Object.assign({},e),{[t]:t}),{})),Hp=Object.assign(Object.assign({},zP),gP),WP=e=>{let t=!!e.action&&AP[e.action]||{};return qt(e).reduce((r,n)=>{let o=t[n]||Hp[n]||n;return Object.assign(Object.assign({},r),{[o]:e[n]})},{})},YP=qt(Hp).map(e=>Hp[e]),KP=e=>YP.indexOf(e)!==-1,JP=e=>e==="custom",XP=e=>[..._P,...SP,KP,JP].some(t=>t(e)),ZP=e=>qt(e).reduce((t,r)=>{let n=eE(r);return n?Object.assign(Object.assign({},t),tE(n,e[r])):Object.assign(Object.assign({},t),{[r]:e[r]})},{}),eE=e=>{let t;return[...UP].every(r=>{var n;return t=(n=r.exec(e))===null||n===void 0?void 0:n[1],!t}),t},tE=(e,t)=>qt(t).reduce((r,n)=>Object.assign(Object.assign({},r),{[`${e}${n}`]:t[n]}),{}),Gp=class{constructor(t){this.opts=t}sendEvent(t,r){return j(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,a=yield this.getQueryParamsForEventType(t),{url:d,payload:p}=yield this.preProcessRequestAsPotentialJSONString(`${n}/analytics/${t}?${a}`,r,o),m=this.encodeForEventType(t,p),f=new Blob([m],{type:"application/x-www-form-urlencoded"});navigator.sendBeacon(d,f)})}isAvailable(){return"sendBeacon"in navigator}deleteHttpCookieVisitorId(){return Promise.resolve()}preProcessRequestAsPotentialJSONString(t,r,n){return j(this,void 0,void 0,function*(){let o=t,a=r;if(n){let d=yield n({url:t,body:JSON.stringify(r)},"analyticsBeacon"),{url:p,body:m}=d;o=p||t;try{a=JSON.parse(m)}catch(f){console.error("Unable to process the request body as a JSON string",f)}}return{payload:a,url:o}})}encodeForEventType(t,r){return this.isEventTypeLegacy(t)?this.encodeEventToJson(t,r):this.encodeEventToJson(t,r,this.opts.token)}getQueryParamsForEventType(t){return j(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(a=>!!a).join("&")})}isEventTypeLegacy(t){return[le.click,le.custom,le.search,le.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}},zp=class{sendEvent(t,r){return j(this,void 0,void 0,function*(){return Promise.resolve()})}deleteHttpCookieVisitorId(){return j(this,void 0,void 0,function*(){return Promise.resolve()})}},Zy=h.fetch,oc=class{constructor(t){this.opts=t}sendEvent(t,r){return j(this,void 0,void 0,function*(){let{baseUrl:n,visitorIdProvider:o,preprocessRequest:a}=this.opts,d=this.shouldAppendVisitorId(t)?yield this.getVisitorIdParam():"",p={url:`${n}/analytics/${t}${d}`,credentials:"include",mode:"cors",headers:this.getHeaders(),method:"POST",body:JSON.stringify(r)},m=Object.assign(Object.assign({},p),a?yield a(p,"analyticsFetch"):{}),{url:f}=m,g=Kt(m,["url"]),C;try{C=yield Zy(f,g)}catch(v){console.error("An error has occured when sending the event.",v);return}if(C.ok){let v=yield C.json();return v.visitorId&&o.setCurrentVisitorId(v.visitorId),v}else{try{C.json()}catch{}throw console.error(`An error has occured when sending the "${t}" event.`,C,r),new Error(`An error has occurred when sending the "${t}" event. Check the console logs for more details.`)}})}deleteHttpCookieVisitorId(){return j(this,void 0,void 0,function*(){let{baseUrl:t}=this.opts,r=`${t}/analytics/visit`;yield Zy(r,{headers:this.getHeaders(),method:"DELETE"})})}shouldAppendVisitorId(t){return[le.click,le.custom,le.search,le.view].indexOf(t)!==-1}getVisitorIdParam(){return j(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"})}},Wp=class{constructor(t,r){Mp()&&nh()?this.storage=new Qp:Mp()?this.storage=localStorage:(console.warn("BrowserRuntime detected no valid storage available.",this),this.storage=new Eo),this.client=new oc(t),this.beaconClient=new Gp(t),window.addEventListener("beforeunload",()=>{let n=r();for(let{eventType:o,payload:a}of n)this.beaconClient.sendEvent(o,a)})}getClientDependingOnEventType(t){return t==="click"&&this.beaconClient.isAvailable()?this.beaconClient:this.client}},Yp=class{constructor(t,r){this.storage=r||new Eo,this.client=new oc(t)}getClientDependingOnEventType(t){return this.client}},ac=class{constructor(){this.storage=new Eo,this.client=new zp}getClientDependingOnEventType(t){return this.client}},rE="xx",nE=e=>e?.startsWith(rE)||!1,oE=`
|
|
28
28
|
We've detected you're using React Native but have not provided the corresponding runtime,
|
|
29
29
|
for an optimal experience please use the "coveo.analytics/react-native" subpackage.
|
|
30
30
|
Follow the Readme on how to set it up: https://github.com/coveo/coveo.analytics.js#using-react-native
|
|
@@ -50,4 +50,4 @@ For more information, refer to the documentation: https://docs.coveo.com/en/o3r9
|
|
|
50
50
|
* limitations under the License.
|
|
51
51
|
*/if(__exports!=exports)module.exports=exports;return module.exports});
|
|
52
52
|
|
|
53
|
-
window.coveoQuanticVersion = '3.33.
|
|
53
|
+
window.coveoQuanticVersion = '3.33.6';
|