@coveo/quantic 3.43.5 → 3.43.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
|
@@ -25,7 +25,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
25
25
|
|
|
26
26
|
${t}
|
|
27
27
|
`;return new Do(r)}var Do=class extends Error{constructor(e){super(e),this.name="SchemaValidationError"}},Oe=class{constructor(e){le(this,"definition");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 nO(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}},He=class{constructor(e={}){le(this,"baseConfig");this.baseConfig=e}validate(e){return this.baseConfig.required&&J(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 Ga(e){return e===void 0}function oO(e){return e===null}function J(e){return Ga(e)||oO(e)}var pe=class{constructor(e={}){le(this,"value");this.value=new He(e)}validate(e){let t=this.value.validate(e);return t||(aO(e)?null:"value is not a boolean.")}get default(){return this.value.default}get required(){return this.value.required}};function aO(e){return Ga(e)||qu(e)}function qu(e){return typeof e=="boolean"}var ne=class{constructor(e={}){le(this,"config");le(this,"value");this.config=e,this.value=new He(e)}validate(e){let t=this.value.validate(e);return t||(iO(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 iO(e){return Ga(e)||aA(e)}function aA(e){return typeof e=="number"&&!Number.isNaN(e)}var sO=/^\d{4}(-\d\d(-\d\d(T\d\d:\d\d(:\d\d)?(\.\d+)?(([+-]\d\d:\d\d)|Z)?)?)?)?$/i,$=class{constructor(e={}){le(this,"value");le(this,"config");this.config={emptyAllowed:!0,url:!1,...e},this.value=new He(this.config)}validate(e){let{emptyAllowed:t,url:r,regex:n,constrainTo:o,ISODate:a}=this.config,i=this.value.validate(e);if(i)return i;if(Ga(e))return null;if(!$a(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&&!(sO.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 $a(e){return Object.prototype.toString.call(e)==="[object String]"}var Y=class{constructor(e={}){le(this,"config");this.config={options:{required:!1},values:{},...e}}validate(e){if(Ga(e))return this.config.options.required?"value is required and is currently undefined":null;if(!iA(e))return"value is not an object";for(let[r,n]of Object.entries(this.config.values))if(n.required&&J(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 iA(e){return e!==void 0&&typeof e=="object"}var oe=class{constructor(e={}){le(this,"config");le(this,"value");this.config=e,this.value=new He(this.config)}validate(e){if(!J(e)&&!Array.isArray(e))return"value is not an array";let t=this.value.validate(e);if(t!==null)return t;if(J(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&&J(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 qu(e)||$a(e)||aA(e)||iA(e)?t.validate(e):"value is not a primitive value"}get default(){}get required(){return this.value.required}};function Ha(e){return Array.isArray(e)}var ec=class{constructor(e){le(this,"config");le(this,"value");this.config=e,this.value=new He(e)}validate(e){let t=this.value.validate(e);return t!==null?t:Ga(e)||Object.values(this.config.enum).find(n=>n===e)?null:"value is not in enum."}get default(){return this.value.default}get required(){return this.value.required}};d();c();l();u();var Mu=(e,t=5)=>e+Math.random().toString(36).substring(2,2+t);function ju(e){return Array.isArray(e)}function Vu(e){return e.trim()===""}function sA(e,t){return[...e.reduce((r,n)=>{let o=t(n);return r.has(o)||r.set(o,n),r},new Map).values()]}function cO(e){return btoa(encodeURI(e))}function Lu(e,t){let{[e]:r,...n}=t;return n}function za(e){return cO(JSON.stringify(e))}var uO=new Set(["1",1,"yes",!0]);function $g(){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=>uO.has(r))}function cA(e){let t={};for(let[r,n]of e)t[r]=n;return t}function uA(e,t,r){return clearTimeout(t),setTimeout(e,r)}function tc(e){if(typeof e!="object"||!e)return e;try{return JSON.parse(JSON.stringify(e))}catch{return e}}function Uu(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 lO(e){if(Vu(e.openingDelimiter)||Vu(e.closingDelimiter))throw Error("delimiters should be a non-empty string");if(J(e.content)||Vu(e.content))return e.content;if(e.highlights.length===0)return Wa(e.content);let t=e.content.length,r="",n=0;for(let o=0;o<e.highlights.length;o++){let a=e.highlights[o],i=a.offset,p=i+a.length;if(p>t)break;r+=Wa(e.content.slice(n,i)),r+=e.openingDelimiter,r+=Wa(e.content.slice(i,p)),r+=e.closingDelimiter,n=p}return n!==t&&(r+=Wa(e.content.slice(n))),r}function zg(e,t){return e=Wa(e),e.replace(/\[(.*?)\]|\{(.*?)\}|\((.*?)\)/g,(r,n,o,a)=>n?Hg(n,t.notMatchDelimiters):o?Hg(o,t.exactMatchDelimiters):a?Hg(a,t.correctionDelimiters):r)}function Hg(e,t){return t?t.open+e+t.close:e}function Wa(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}d();c();l();u();var CA=Fr(yA(),1);d();c();l();u();var ae=new Error("Failed to load reducers."),Ya=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."}},Mo=class extends Error{constructor(r,n){super();le(this,"statusCode");this.name="Disconnected",this.message=`Client could not connect to the following URL: ${r}`,this.statusCode=n??0}};d();c();l();u();function SA(e){let t=[];for(let r in e){let n=encodeURIComponent(r),o=encodeURIComponent(e[r]);t.push(`${n}=${o}`)}return t.join("&")}function vA(e){return typeof e!="object"||!e?!1:Object.values(e).every(qO)}function qO(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"}function AA(e){return e===429}var Lr=class e{static call(t){return _asyncToGenerator(function*(){let r=MO(t),{logger:n}=t,o=yield e.preprocessRequest(r,t);n.info(o,"Platform request");let{url:a,...i}=o,p=/*#__PURE__*/function(){var _ref=_asyncToGenerator(function*(){let f=yield v(a,i);if(AA(f.status))throw f;return f});return function p(){return _ref.apply(this,arguments)}}();try{let f=yield(0,CA.backOff)(p,{startingDelay:100,timeMultiple:2,maxDelay:800,numOfAttempts:4,jitter:"full",retry:function(){var _ref2=_asyncToGenerator(function*(m){let g=m&&AA(m.status);return g&&(n.info("Platform retrying request"),yield new Promise(A=>setTimeout(A,1e3))),g});return function retry(_x2){return _ref2.apply(this,arguments)}}()});switch(f.status){case 419:case 401:throw n.info("Platform renewing token"),new Ya;case 404:throw new Mo(a,f.status);default:return n.info({response:f,requestInfo:o},"Platform response"),f}}catch(f){return f.message==="Failed to fetch"?new Mo(a):f}})()}static preprocessRequest(t,r){return _asyncToGenerator(function*(){let{origin:n,preprocessRequest:o,logger:a,requestMetadata:i}=r,{signal:p,...f}=t,m=tc(f);try{let g=yield o(t,n,i);return{...t,...g}}catch(g){a.error(g,"Platform request preprocessing failed. Returning default request options.")}return m})()}};function mt(e,t="prod",r="platform"){let n=t==="prod"?"":t,o=r==="platform"?"":`.${r}`;return`https://${e}${o}.org${n}.coveo.com`}function Gn(e,t,r="prod"){return e??mt(t,r)}function Kt(e,t="prod"){return`${mt(e,t)}/rest/search/v2`}function Bu(e,t="prod"){return`${mt(e,t,"analytics")}/rest/organizations/${e}/events/v1`}function MO(e){let{url:t,method:r,requestParams:n,contentType:o,accessToken:a,signal:i}=e,p=e.method==="POST"||e.method==="PUT",f=jO(n,o);return{url:t,method:r,headers:{"Content-Type":o,Authorization:`Bearer ${a}`,...e.headers},...(p&&{body:f}),signal:i}}function jO(e,t){return t==="application/x-www-form-urlencoded"?vA(e)?SA(e):"":JSON.stringify(e)}d();c();l();u();var oc=Fr(Gu(),1),EA=Fr(bA(),1);d();c();l();u();var $u=Fr(Gu(),1),wA=Fr(xA(),1);$u.default.extend(wA.default);var RA="YYYY/MM/DD@HH:mm:ss",VO="1401-01-01";function Ka(e,t){let r=(0,$u.default)(e,t);return!r.isValid()&&!t?(0,$u.default)(e,RA):r}function Hu(e){return e.format(RA)}function IA(e,t){let r=Ka(e,t);if(!r.isValid()){let n=". Please provide a date format string in the configuration options. See https://day.js.org/docs/en/parse/string-format for more information.",o=` with the format "${t}"`;throw new Error(`Could not parse the provided date "${e}"${t?o:n}`)}uh(r)}function uh(e){if(e.isBefore(VO))throw new Error(`Date is before year 1401, which is unsupported by the API: ${e}`)}oc.default.extend(EA.default);var FA=["past","now","next"],TA=["minute","hour","day","week","month","quarter","year"],LO=e=>{let t=e==="now";return{amount:new ne({required:!t,min:1}),unit:new $({required:!t,constrainTo:TA}),period:new $({required:!0,constrainTo:FA})}};function zu(e){if(typeof e=="string"&&!$n(e))throw new Error(`The value "${e}" is not respecting the relative date format "period-amount-unit"`);let t=typeof e=="string"?lh(e):e;new Oe(LO(t.period)).validate(t);let r=kA(t),n=JSON.stringify(t);if(!r.isValid())throw new Error(`Date is invalid: ${n}`);uh(r)}function PA(e){let{period:t,amount:r,unit:n}=e;switch(t){case"past":case"next":return`${t}-${r}-${n}`;case"now":return t}}function kA(e){let{period:t,amount:r,unit:n}=e;switch(t){case"past":return(0,oc.default)().subtract(r,n);case"next":return(0,oc.default)().add(r,n);case"now":return(0,oc.default)()}}function ac(e){return Hu(kA(lh(e)))}function OA(e){return e.toLocaleLowerCase().split("-")}function $n(e){let[t,r,n]=OA(e);if(t==="now")return!0;if(!FA.includes(t)||!TA.includes(n))return!1;let o=parseInt(r,10);return!(Number.isNaN(o)||o<=0)}function _A(e){return!!e&&typeof e=="object"&&"period"in e}function lh(e){let[t,r,n]=OA(e);return t==="now"?{period:"now"}:{period:t,amount:r?parseInt(r,10):void 0,unit:n||void 0}}function NA(e){return zu(e),lh(e)}d();c();l();u();d();c();l();u();d();c();l();u();d();c();l();u();function qA(_x3,_x4){return _qA.apply(this,arguments)}function _qA(){_qA=_asyncToGenerator(function*(e,t){let r=e.getReader(),n;for(;!(n=yield r.read()).done;)t(n.value)});return _qA.apply(this,arguments)}function MA(e){let t,r,n,o=!1;return function(i){t===void 0?(t=i,r=0,n=-1):t=QO(t,i);let p=t.length,f=0;for(;r<p;){o&&(t[r]===10&&(f=++r),o=!1);let m=-1;for(;r<p&&m===-1;++r)switch(t[r]){case 58:n===-1&&(n=r-f);break;case 13:o=!0,m=r;break;case 10:m=r;break}if(m===-1)break;e(t.subarray(f,m),n),f=r,n=-1}f===p?t=void 0:f!==0&&(t=t.subarray(f),r-=f)}}function jA(e,t,r){let n=DA(),o=new TextDecoder;return function(i,p){if(i.length===0)r?.(n),n=DA();else if(p>0){let f=o.decode(i.subarray(0,p)),m=p+(i[p+1]===32?2:1),g=o.decode(i.subarray(m));switch(f){case"data":n.data=n.data?`${n.data}
|
|
28
|
-
${g}`:g;break;case"event":n.event=g;break;case"id":e(n.id=g);break;case"retry":UO(g,n,t);break}}}}function UO(e,t,r){let n=parseInt(e,10);Number.isNaN(n)||r(t.retry=n)}function QO(e,t){let r=new Uint8Array(e.length+t.length);return r.set(e),r.set(t,e.length),r}function DA(){return{data:"",event:"",id:"",retry:void 0}}var dh="text/event-stream",BO=1e3,VA="last-event-id";function LA(){return typeof window<"u"}function Wu(e,{signal:t,headers:r,onopen:n,onmessage:o,onclose:a,onerror:i,openWhenHidden:p,fetch:f,...m}){return new Promise((g,A)=>{let x={...r};x.accept||(x.accept=dh);let h;function y(){h?.abort(),document.hidden||k()}!p&&LA()&&document.addEventListener("visibilitychange",y);let b=BO,w;function I(){LA()&&document.removeEventListener("visibilitychange",y),clearTimeout(w),h?.abort()}t?.addEventListener("abort",()=>{I(),g()});let F=f??v,E=n??GO;function k(){return _k2.apply(this,arguments)}function _k2(){_k2=_asyncToGenerator(function*(){h=s.AbortController?new s.AbortController:null;try{let T=yield F(e,{...m,headers:x,signal:h?.signal});yield E(T),yield qA(T.body,MA(jA(q=>{q?x[VA]=q:delete x[VA]},q=>{b=q},o))),a?.(),I(),g()}catch(T){if(!h?.signal?.aborted)try{let q=i?.(T)??b;clearTimeout(w),w=setTimeout(k,q)}catch(q){I(),A(q)}}});return _k2.apply(this,arguments)}k()})}function GO(e){let t=e.headers.get("content-type");if(!t?.startsWith(dh))throw new Error(`Expected content-type to be ${dh}, Actual: ${t}`)}d();c();l();u();var Hn=class{constructor(t){le(this,"_basePath");le(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 $O=(e,t,r)=>new Hn(`${e}/rest/organizations/${t}/machinelearning/streaming/${r}`).href,UA=3,HO=5e3,zO="text/event-stream",mh=1,ph=class extends Error{},ic=class extends Error{constructor(r){super(r.message);le(this,"payload",r)}},fh=class{constructor(){le(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)}},Yu=class{constructor(t){le(this,"logger");this.logger=t.logger}streamGeneratedAnswer(t,r){let{url:n,organizationId:o,streamId:a,accessToken:i}=t,{write:p,abort:f,close:m,resetAnswer:g}=r,A=new fh;if(!a){this.logger.error("No stream ID found");return}let x=0,h,y=()=>{h&&!A.isActive(h)&&(w?.abort(),g(),I())},b=()=>{A.remove(h),h=uA(y,h,HO),A.add(h)},w=new s.AbortController,I=()=>Wu($O(n,o,a),{method:"GET",fetch:v,headers:{Authorization:`Bearer ${i}`,accept:"*/*"},openWhenHidden:!0,signal:w?.signal,onopen(F){return _asyncToGenerator(function*(){if(F.ok&&F.headers.get("content-type")===zO)return;throw F.status>=400&&F.status<500&&F.status!==429?new ic({message:"Error opening stream",code:F.status}):new ph})()},onmessage:F=>{if(w?.signal.aborted)return;let E=JSON.parse(F.data);if(E.finishReason==="ERROR"){A.remove(h),w?.abort(),f({message:E.errorMessage,code:E.statusCode});return}p(E),x=0,E.finishReason==="COMPLETED"?(A.remove(h),m()):b()},onerror:F=>{if(!w?.signal.aborted){if(A.remove(h),F instanceof ic)throw w?.abort(),f(F),F;if(++x>UA){this.logger.info("Maximum retry exceeded.");let E={message:"Failed to complete stream.",code:mh};throw w?.abort(),f(E),new ic(E)}this.logger.info(`Retrying...(${x}/${UA})`),g()}}});return I(),w}};d();c();l();u();var Ku=e=>e;d();c();l();u();d();c();l();u();d();c();l();u();function sc(e){let{url:t,accessToken:r,organizationId:n,authentication:o,...a}=e;return a}var gh=e=>{let{response:t}=e;return t.body?WO(e):YO(t)},WO=e=>XO(e)?ZO(e):KO(e)?e.body:{message:"unknown",statusCode:0,type:"unknown"},YO=e=>{let t=JSON.parse(JSON.stringify(e,Object.getOwnPropertyNames(e)));return{...t,message:`Client side error: ${t.message||""}`,statusCode:400,type:"ClientError"}};function KO(e){return e.body.statusCode!==void 0}function XO(e){return e.body.exception!==void 0}var ZO=e=>({message:e.body.exception.code,statusCode:e.response.status,type:e.body.exception.code});d();c();l();u();function QA(e){return((e.headers.get("content-type")||"").split(";").find(n=>n.indexOf("charset=")!==-1)||"").split("=")[1]||"UTF-8"}d();c();l();u();var hh=(e,t,r,n)=>{let o=new Hn(`${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 BA=(e,t)=>{let r=new Hn(`${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},yh=/*#__PURE__*/function(){var _ref3=_asyncToGenerator(function*(e,t){let r=yield Lr.call({...hh(e,"POST","application/x-www-form-urlencoded","/html"),requestParams:sc(e),requestMetadata:{method:"html"},...t});if(r instanceof Error)throw r;let n=QA(r),o=yield r.arrayBuffer(),i=new TextDecoder(n).decode(o);return JO(i)?{success:i}:{error:gh({response:r,body:i})}});return function yh(_x5,_x6){return _ref3.apply(this,arguments)}}();function JO(e){return typeof e=="string"}d();c();l();u();d();c();l();u();function Xa(){return{answerSnippet:"",documentId:{contentIdKey:"",contentIdValue:""},question:"",relatedQuestions:[],score:0}}function Ct(){return{response:{results:[],searchUid:"",totalCountFiltered:0,facets:[],generateAutomaticFacets:{facets:[]},queryCorrections:[],triggers:[],questionAnswer:Xa(),pipeline:"",splitTestRun:"",termsToHighlight:{},phrasesToHighlight:{},extendedResults:{}},duration:0,queryExecuted:"",error:null,automaticallyCorrected:!1,isLoading:!1,results:[],searchResponseId:"",requestId:"",questionAnswer:Xa(),extendedResults:{},searchAction:void 0}}d();c();l();u();d();c();l();u();function e_(e){return{statusCode:e.statusCode,type:e.name,message:e.message}}function t_(e){return{statusCode:e.code,type:e.name,message:e.message,ignored:!0}}function Za(e,t){if(t&&e.name==="AbortError")return{error:t_(e)};if(e instanceof Mo)return{error:e_(e)};throw e}var zn=e=>e.success!==void 0,ze=e=>e.error!==void 0;function GA(e){return e.results!==void 0}function $A(e){let t=Xa();return J(e.questionAnswer)?(e.questionAnswer=t,e):(e.questionAnswer={...t,...e.questionAnswer},e)}d();c();l();u();d();c();l();u();var Sh=(e,t)=>`${e.url}/rest/organizations/${e.organizationId}/insight/v1/configs/${e.insightId}${t??""}`,r_=e=>`${e.url}/rest/organizations/${e.organizationId}/machinelearning/user/actions`,cc=(e,t,r,n)=>{n_(e);let o=Sh(e,n);return{accessToken:e.accessToken,method:t,contentType:r,url:o,origin:"insightApiFetch"}},HA=(e,t,r)=>{o_(e);let n=r_(e);return{accessToken:e.accessToken,method:t,contentType:r,url:n,origin:"insightApiFetch"}},vh=e=>{let{insightId:t,...r}=sc(e);return r},zA=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.")},n_=e=>{if(zA(e),!e.insightId)throw new Error("The 'insightId' attribute must contain a valid Insight Panel configuration ID.")},o_=e=>{if(zA(e),!e.userId)throw new Error("The 'userId' attribute must contain a valid user ID.")};var WA=e=>({...cc(e,"GET","application/json","/interface"),requestParams:{}});d();c();l();u();var YA=e=>({...cc(e,"POST","application/json","/search"),requestParams:vh(e)}),KA=e=>({...cc(e,"POST","application/json","/querysuggest"),requestParams:vh(e)});d();c();l();u();var XA=e=>({...HA(e,"POST","application/json"),requestParams:{objectId:e.userId}});var Xu=class{constructor(t){le(this,"options",t)}getInterface(t){var _this=this;return _asyncToGenerator(function*(){let r=yield Lr.call({...WA(t),..._this.options});if(r instanceof Error)return Za(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 Lr.call({...YA(t),requestMetadata:{method:"search",origin:r?.origin},..._this2.options});if(n instanceof Error)return Za(n);let o=yield n.json();return GA(o)&&(o=$A(o)),n.ok?{success:o}:{error:o}})()}querySuggest(t){var _this3=this;return _asyncToGenerator(function*(){let r=yield Lr.call({...KA(t),..._this3.options});if(r instanceof Error)return Za(r);let n=yield r.json();return n.completions?{success:n}:{error:n}})()}userActions(t){var _this4=this;return _asyncToGenerator(function*(){let r=yield Lr.call({...XA(t),..._this4.options});if(r instanceof Error)return Za(r);let n=yield r.json();return r.ok?{success:n}:{error:n}})()}html(t){var _this5=this;return _asyncToGenerator(function*(){return yh(t,{..._this5.options})})()}};d();c();l();u();d();c();l();u();var H=new $({required:!0,emptyAllowed:!1}),We=new $({required:!1,emptyAllowed:!1}),Ke=new $({required:!0,emptyAllowed:!0}),lW=new $({required:!1,emptyAllowed:!0}),Zu=new oe({each:H,required:!0}),ZA=new $({required:!1,emptyAllowed:!1,regex:/^\d+\.\d+\.\d+$/}),JA=new $({required:!1,emptyAllowed:!1,regex:/^[a-zA-Z0-9_\-.]{1,100}$/}),dW=new $({required:!0,emptyAllowed:!1,regex:/^[a-zA-Z0-9_\-.]{1,100}$/}),Tr=({message:e,name:t,stack:r})=>({message:e,name:t,stack:r}),mr=(e,t)=>{if("required"in t)return{payload:new Oe({value:t}).validate({value:e}).value};let o=new Y({options:{required:!0},values:t}).validate(e);if(o)throw new Do(o);return{payload:e}},_=(e,t)=>{try{return mr(e,t)}catch(r){return{payload:e,error:Tr(r)}}},gr=(e,t,r,n)=>{let o=`Check the initialState of ${n}`;return eC(e,t,r,o,"Controller initialization error")},ht=(e,t,r,n)=>{let o=`Check the options of ${n}`;return eC(e,t,r,o,"Controller initialization error")},eC=(e,t,r,n,o)=>{try{return t.validate(r,n)}catch(a){throw e.logger.error(a,o),a}};d();c();l();u();d();c();l();u();d();c();l();u();function Et(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 a_=typeof Symbol=="function"&&Symbol.observable||"@@observable",tC=a_,Ah=()=>Math.random().toString(36).substring(7).split("").join("."),i_={INIT:`@@redux/INIT${Ah()}`,REPLACE:`@@redux/REPLACE${Ah()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Ah()}`},Ju=i_;function Ur(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 Ch(e,t,r){if(typeof e!="function")throw new Error(Et(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(Et(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(Et(1));return r(Ch)(e,t)}let n=e,o=t,a=new Map,i=a,p=0,f=!1;function m(){i===a&&(i=new Map,a.forEach((w,I)=>{i.set(I,w)}))}function g(){if(f)throw new Error(Et(3));return o}function A(w){if(typeof w!="function")throw new Error(Et(4));if(f)throw new Error(Et(5));let I=!0;m();let F=p++;return i.set(F,w),function(){if(I){if(f)throw new Error(Et(6));I=!1,m(),i.delete(F),a=null}}}function x(w){if(!Ur(w))throw new Error(Et(7));if(typeof w.type>"u")throw new Error(Et(8));if(typeof w.type!="string")throw new Error(Et(17));if(f)throw new Error(Et(9));try{f=!0,o=n(o,w)}finally{f=!1}return(a=i).forEach(F=>{F()}),w}function h(w){if(typeof w!="function")throw new Error(Et(10));n=w,x({type:Ju.REPLACE})}function y(){let w=A;return{subscribe(I){if(typeof I!="object"||I===null)throw new Error(Et(11));function F(){let k=I;k.next&&k.next(g())}return F(),{unsubscribe:w(F)}},[tC](){return this}}}return x({type:Ju.INIT}),{dispatch:x,subscribe:A,getState:g,replaceReducer:h,[tC]:y}}function s_(e){Object.keys(e).forEach(t=>{let r=e[t];if(typeof r(void 0,{type:Ju.INIT})>"u")throw new Error(Et(12));if(typeof r(void 0,{type:Ju.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Et(13))})}function Ja(e){let t=Object.keys(e),r={};for(let i=0;i<t.length;i++){let p=t[i];typeof e[p]=="function"&&(r[p]=e[p])}let n=Object.keys(r),o,a;try{s_(r)}catch(i){a=i}return function(p={},f){if(a)throw a;let m=!1,g={};for(let A=0;A<n.length;A++){let x=n[A],h=r[x],y=p[x],b=h(y,f);if(typeof b>"u"){let w=f&&f.type;throw new Error(Et(14))}g[x]=b,m=m||b!==y}return m=m||n.length!==Object.keys(p).length,m?g:p}}function uc(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function rC(...e){return t=>(r,n)=>{let o=t(r,n),a=()=>{throw new Error(Et(15))},i={getState:o.getState,dispatch:(f,...m)=>a(f,...m)},p=e.map(f=>f(i));return a=uc(...p)(o.dispatch),{...o,dispatch:a}}}function lc(e){return Ur(e)&&"type"in e&&typeof e.type=="string"}d();c();l();u();var Ph=Symbol.for("immer-nothing"),dc=Symbol.for("immer-draftable"),St=Symbol.for("immer-state");function Ft(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var sr=Object,Vo=sr.getPrototypeOf,pc="constructor",yc="prototype",wh="configurable",nl="enumerable",tl="writable",fc="value",Ht=e=>!!e&&!!e[St];function Mt(e){return e?lC(e)||vc(e)||!!e[dc]||!!e[pc]?.[dc]||Ac(e)||Cc(e):!1}var c_=sr[yc][pc].toString(),nC=new WeakMap;function lC(e){if(!e||!ti(e))return!1;let t=Vo(e);if(t===null||t===sr[yc])return!0;let r=sr.hasOwnProperty.call(t,pc)&&t[pc];if(r===Object)return!0;if(!jo(r))return!1;let n=nC.get(r);return n===void 0&&(n=Function.toString.call(r),nC.set(r,n)),n===c_}function dC(e){return Ht(e)||Ft(15,e),e[St].base_}function Sc(e,t,r=!0){Lo(e)===0?(r?Reflect.ownKeys(e):sr.keys(e)).forEach(o=>{t(o,e[o],e)}):e.forEach((n,o)=>t(o,n,e))}function Lo(e){let t=e[St];return t?t.type_:vc(e)?1:Ac(e)?2:Cc(e)?3:0}var ei=(e,t,r=Lo(e))=>r===2?e.has(t):sr[yc].hasOwnProperty.call(e,t),In=(e,t,r=Lo(e))=>r===2?e.get(t):e[t],ol=(e,t,r,n=Lo(e))=>{n===2?e.set(t,r):n===3?e.add(r):e[t]=r};function u_(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var vc=Array.isArray,Ac=e=>e instanceof Map,Cc=e=>e instanceof Set,ti=e=>typeof e=="object",jo=e=>typeof e=="function",bh=e=>typeof e=="boolean";function l_(e){let t=+e;return Number.isInteger(t)&&String(t)===e}var d_=e=>ti(e)?e?.[St]:null,En=e=>e.copy_||e.base_;var kh=e=>e.modified_?e.copy_:e.base_;function Rh(e,t){if(Ac(e))return new Map(e);if(Cc(e))return new Set(e);if(vc(e))return Array[yc].slice.call(e);let r=lC(e);if(t===!0||t==="class_only"&&!r){let n=sr.getOwnPropertyDescriptors(e);delete n[St];let o=Reflect.ownKeys(n);for(let a=0;a<o.length;a++){let i=o[a],p=n[i];p[tl]===!1&&(p[tl]=!0,p[wh]=!0),(p.get||p.set)&&(n[i]={[wh]:!0,[tl]:!0,[nl]:p[nl],[fc]:e[i]})}return sr.create(Vo(e),n)}else{let n=Vo(e);if(n!==null&&r)return{...e};let o=sr.create(n);return sr.assign(o,e)}}function Oh(e,t=!1){return ll(e)||Ht(e)||!Mt(e)||(Lo(e)>1&&sr.defineProperties(e,{set:el,add:el,clear:el,delete:el}),sr.freeze(e),t&&Sc(e,(r,n)=>{Oh(n,!0)},!1)),e}function p_(){Ft(2)}var el={[fc]:p_};function ll(e){return e===null||!ti(e)?!0:sr.isFrozen(e)}var al="MapSet",il="Patches",oC="ArrayMethods",sl={};function Uo(e){let t=sl[e];return t||Ft(0,e),t}var aC=e=>!!sl[e];function f_(e,t){sl[e]||(sl[e]=t)}var mc,pC=()=>mc,m_=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:aC(al)?Uo(al):void 0,arrayMethodsPlugin_:aC(oC)?Uo(oC):void 0});function iC(e,t){t&&(e.patchPlugin_=Uo(il),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Ih(e){Eh(e),e.drafts_.forEach(g_),e.drafts_=null}function Eh(e){e===mc&&(mc=e.parent_)}var sC=e=>mc=m_(mc,e);function g_(e){let t=e[St];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function cC(e,t){t.unfinalizedDrafts_=t.drafts_.length;let r=t.drafts_[0];if(e!==void 0&&e!==r){r[St].modified_&&(Ih(t),Ft(4)),Mt(e)&&(e=uC(t,e));let{patchPlugin_:o}=t;o&&o.generateReplacementPatches_(r[St].base_,e,t)}else e=uC(t,r);return h_(t,e,!0),Ih(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Ph?e:void 0}function uC(e,t){if(ll(t))return t;let r=t[St];if(!r)return cl(t,e.handledSet_,e);if(!dl(r,e))return t;if(!r.modified_)return r.base_;if(!r.finalized_){let{callbacks_:n}=r;if(n)for(;n.length>0;)n.pop()(e);gC(r,e)}return r.copy_}function h_(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Oh(t,r)}function fC(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var dl=(e,t)=>e.scope_===t,y_=[];function mC(e,t,r,n){let o=En(e),a=e.type_;if(n!==void 0&&In(o,n,a)===t){ol(o,n,r,a);return}if(!e.draftLocations_){let p=e.draftLocations_=new Map;Sc(o,(f,m)=>{if(Ht(m)){let g=p.get(m)||[];g.push(f),p.set(m,g)}})}let i=e.draftLocations_.get(t)??y_;for(let p of i)ol(o,p,r,a)}function S_(e,t,r){e.callbacks_.push(function(o){let a=t;if(!a||!dl(a,o))return;o.mapSetPlugin_?.fixSetContents(a);let i=kh(a);mC(e,a.draft_??a,i,r),gC(a,o)})}function gC(e,t){if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){let{patchPlugin_:n}=t;if(n){let o=n.getPath(e);o&&n.generatePatches_(e,o,t)}fC(e)}}function v_(e,t,r){let{scope_:n}=e;if(Ht(r)){let o=r[St];dl(o,n)&&o.callbacks_.push(function(){rl(e);let i=kh(o);mC(e,r,i,t)})}else Mt(r)&&e.callbacks_.push(function(){let a=En(e);e.type_===3?a.has(r)&&cl(r,n.handledSet_,n):In(a,t,e.type_)===r&&n.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&cl(In(e.copy_,t,e.type_),n.handledSet_,n)})}function cl(e,t,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||Ht(e)||t.has(e)||!Mt(e)||ll(e)||(t.add(e),Sc(e,(n,o)=>{if(Ht(o)){let a=o[St];if(dl(a,r)){let i=kh(a);ol(e,n,i,e.type_),fC(a)}}else Mt(o)&&cl(o,t,r)})),e}function A_(e,t){let r=vc(e),n={type_:r?1:0,scope_:t?t.scope_:pC(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},o=n,a=ul;r&&(o=[n],a=gc);let{revoke:i,proxy:p}=Proxy.revocable(o,a);return n.draft_=p,n.revoke_=i,[p,n]}var ul={get(e,t){if(t===St)return e;let r=e.scope_.arrayMethodsPlugin_,n=e.type_===1&&typeof t=="string";if(n&&r?.isArrayOperationMethod(t))return r.createMethodInterceptor(e,t);let o=En(e);if(!ei(o,t,e.type_))return b_(e,o,t);let a=o[t];if(e.finalized_||!Mt(a)||n&&e.operationMethod&&r?.isMutatingArrayMethod(e.operationMethod)&&l_(t))return a;if(a===xh(e.base_,t)||C_(e,t,a)){rl(e);let i=e.type_===1?+t:t,p=Th(e.scope_,a,e,i);return e.copy_[i]=p}return a},has(e,t){return t in En(e)},ownKeys(e){return Reflect.ownKeys(En(e))},set(e,t,r){let n=hC(En(e),t);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){let o=xh(En(e),t),a=o?.[St];if(a&&a.base_===r)return e.copy_[t]=r,e.assigned_.set(t,!1),!0;if(u_(r,o)&&(r!==void 0||ei(e.base_,t,e.type_)))return!0;rl(e),Fh(e)}return e.copy_[t]===r&&(r!==void 0||ei(e.copy_,t,e.type_))||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_.set(t,!0),v_(e,t,r)),!0},deleteProperty(e,t){return rl(e),xh(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),Fh(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let r=En(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{[tl]:!0,[wh]:e.type_!==1||t!=="length",[nl]:n[nl],[fc]:r[t]}},defineProperty(){Ft(11)},getPrototypeOf(e){return Vo(e.base_)},setPrototypeOf(){Ft(12)}},gc={};for(let e in ul){let t=ul[e];gc[e]=function(){let r=arguments;return r[0]=r[0][0],t.apply(this,r)}}gc.deleteProperty=function(e,t){return gc.set.call(this,e,t,void 0)};gc.set=function(e,t,r){return ul.set.call(this,e[0],t,r,e[0])};function xh(e,t){let r=e[St];return(r?En(r):e)[t]}function C_(e,t,r){return e.type_!==1||!e.allIndicesReassigned_||e.assigned_?.get(t)||!Mt(r)||r[St]?!1:e.baseRefs_.has(r)}function b_(e,t,r){let n=hC(t,r);return n?fc in n?n[fc]:n.get?.call(e.draft_):void 0}function hC(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 Fh(e){e.modified_||(e.modified_=!0,e.parent_&&Fh(e.parent_))}function rl(e){e.copy_||(e.assigned_=new Map,e.copy_=Rh(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var x_=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(t,r,n)=>{if(jo(t)&&!jo(r)){let a=r;r=t;let i=this;return function(f=a,...m){return i.produce(f,g=>r.call(this,g,...m))}}jo(r)||Ft(6),n!==void 0&&!jo(n)&&Ft(7);let o;if(Mt(t)){let a=sC(this),i=Th(a,t,void 0),p=!0;try{o=r(i),p=!1}finally{p?Ih(a):Eh(a)}return iC(a,n),cC(o,a)}else if(!t||!ti(t)){if(o=r(t),o===void 0&&(o=t),o===Ph&&(o=void 0),this.autoFreeze_&&Oh(o,!0),n){let a=[],i=[];Uo(il).generateReplacementPatches_(t,o,{patches_:a,inversePatches_:i}),n(a,i)}return o}else Ft(1,t)},this.produceWithPatches=(t,r)=>{if(jo(t))return(i,...p)=>this.produceWithPatches(i,f=>t(f,...p));let n,o;return[this.produce(t,r,(i,p)=>{n=i,o=p}),n,o]},bh(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),bh(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),bh(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){Mt(e)||Ft(8),Ht(e)&&(e=pl(e));let t=sC(this),r=Th(t,e,void 0);return r[St].isManual_=!0,Eh(t),r}finishDraft(e,t){let r=e&&e[St];(!r||!r.isManual_)&&Ft(9);let{scope_:n}=r;return iC(n,t),cC(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=Uo(il).applyPatches_;return Ht(e)?n(e,t):this.produce(e,o=>n(o,t))}};function Th(e,t,r,n){let[o,a]=Ac(t)?Uo(al).proxyMap_(t,r):Cc(t)?Uo(al).proxySet_(t,r):A_(t,r);return(r?.scope_??pC()).drafts_.push(o),a.callbacks_=r?.callbacks_??[],a.key_=n,r&&n!==void 0?S_(r,a,n):a.callbacks_.push(function(f){f.mapSetPlugin_?.fixSetContents(a);let{patchPlugin_:m}=f;a.modified_&&m&&m.generatePatches_(a,[],f)}),o}function pl(e){return Ht(e)||Ft(10,e),yC(e)}function yC(e){if(!Mt(e)||ll(e))return e;let t=e[St],r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=Rh(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=Rh(e,!0);return Sc(r,(o,a)=>{ol(r,o,yC(a))},n),t&&(t.finalized_=!1),r}function SC(){function t(y,b=[]){if(y.key_!==void 0){let w=y.parent_.copy_??y.parent_.base_,I=d_(In(w,y.key_)),F=In(w,y.key_);if(F===void 0||F!==y.draft_&&F!==y.base_&&F!==y.copy_||I!=null&&I.base_!==y.base_)return null;let E=y.parent_.type_===3,k;if(E){let T=y.parent_;k=Array.from(T.drafts_.keys()).indexOf(y.key_)}else k=y.key_;if(!(E&&w.size>k||ei(w,k)))return null;b.push(k)}if(y.parent_)return t(y.parent_,b);b.reverse();try{r(y.copy_,b)}catch{return null}return b}function r(y,b){let w=y;for(let I=0;I<b.length-1;I++){let F=b[I];if(w=In(w,F),!ti(w)||w===null)throw new Error(`Cannot resolve path at '${b.join("/")}'`)}return w}let n="replace",o="add",a="remove";function i(y,b,w){if(y.scope_.processedForPatches_.has(y))return;y.scope_.processedForPatches_.add(y);let{patches_:I,inversePatches_:F}=w;switch(y.type_){case 0:case 2:return f(y,b,I,F);case 1:return p(y,b,I,F);case 3:return m(y,b,I,F)}}function p(y,b,w,I){let{base_:F,assigned_:E}=y,k=y.copy_;k.length<F.length&&([F,k]=[k,F],[w,I]=[I,w]);let T=y.allIndicesReassigned_===!0;for(let q=0;q<F.length;q++){let G=k[q],Q=F[q];if((T||E?.get(q.toString()))&&G!==Q){let B=G?.[St];if(B&&B.modified_)continue;let L=b.concat([q]);w.push({op:n,path:L,value:h(G)}),I.push({op:n,path:L,value:h(Q)})}}for(let q=F.length;q<k.length;q++){let G=b.concat([q]);w.push({op:o,path:G,value:h(k[q])})}for(let q=k.length-1;F.length<=q;--q){let G=b.concat([q]);I.push({op:a,path:G})}}function f(y,b,w,I){let{base_:F,copy_:E,type_:k}=y;Sc(y.assigned_,(T,q)=>{let G=In(F,T,k),Q=In(E,T,k),V=q?ei(F,T)?n:o:a;if(G===Q&&V===n)return;let B=b.concat(T);w.push(V===a?{op:V,path:B}:{op:V,path:B,value:h(Q)}),I.push(V===o?{op:a,path:B}:V===a?{op:o,path:B,value:h(G)}:{op:n,path:B,value:h(G)})})}function m(y,b,w,I){let{base_:F,copy_:E}=y,k=0;F.forEach(T=>{if(!E.has(T)){let q=b.concat([k]);w.push({op:a,path:q,value:T}),I.unshift({op:o,path:q,value:T})}k++}),k=0,E.forEach(T=>{if(!F.has(T)){let q=b.concat([k]);w.push({op:o,path:q,value:T}),I.unshift({op:a,path:q,value:T})}k++})}function g(y,b,w){let{patches_:I,inversePatches_:F}=w;I.push({op:n,path:[],value:b===Ph?void 0:b}),F.push({op:n,path:[],value:y})}function A(y,b){return b.forEach(w=>{let{path:I,op:F}=w,E=y;for(let G=0;G<I.length-1;G++){let Q=Lo(E),V=I[G];typeof V!="string"&&typeof V!="number"&&(V=""+V),(Q===0||Q===1)&&(V==="__proto__"||V===pc)&&Ft(19),jo(E)&&V===yc&&Ft(19),E=In(E,V),(E===null||!ti(E))&&Ft(18,I.join("/"))}let k=Lo(E),T=x(w.value),q=I[I.length-1];switch(F){case n:switch(k){case 2:return E.set(q,T);case 3:Ft(16);default:return E[q]=T}case o:switch(k){case 1:return q==="-"?E.push(T):E.splice(q,0,T);case 2:return E.set(q,T);case 3:return E.add(T);default:return E[q]=T}case a:switch(k){case 1:return E.splice(q,1);case 2:return E.delete(q);case 3:return E.delete(w.value);default:return delete E[q]}default:Ft(17,F)}}),y}function x(y){if(!Mt(y))return y;if(vc(y))return y.map(x);if(Ac(y))return new Map(Array.from(y.entries()).map(([w,I])=>[w,x(I)]));if(Cc(y))return new Set(Array.from(y).map(x));let b=Object.create(Vo(y));for(let w in y)b[w]=x(y[w]);return ei(y,dc)&&(b[dc]=y[dc]),b}function h(y){return Ht(y)?x(y):y}f_(il,{applyPatches_:A,generatePatches_:i,generateReplacementPatches_:g,getPath:t})}var hc=new x_,Qo=hc.produce,_h=hc.produceWithPatches.bind(hc);var Nh=hc.applyPatches.bind(hc);d();c();l();u();function w_(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function R_(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 vC=e=>Array.isArray(e)?e:[e];function I_(e){let t=Array.isArray(e[0])?e[0]:e;return R_(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function E_(e,t){let r=[],{length:n}=e;for(let o=0;o<n;o++)r.push(e[o].apply(null,t));return r}var F_=class{constructor(e){this.value=e}deref(){return this.value}},T_=()=>typeof WeakRef>"u"?F_:WeakRef,CC=T_(),P_=0,AC=1;function fl(){return{s:P_,v:void 0,o:null,p:null}}function k_(e){return e instanceof CC?e.deref():e}function bc(e,t={}){let r=fl(),{resultEqualityCheck:n}=t,o,a=0;function i(){let p=r,{length:f}=arguments;for(let A=0,x=f;A<x;A++){let h=arguments[A];if(typeof h=="function"||typeof h=="object"&&h!==null){let y=p.o;y===null&&(p.o=y=new WeakMap);let b=y.get(h);b===void 0?(p=fl(),y.set(h,p)):p=b}else{let y=p.p;y===null&&(p.p=y=new Map);let b=y.get(h);b===void 0?(p=fl(),y.set(h,p)):p=b}}let m=p,g;if(p.s===AC)g=p.v;else if(g=e.apply(null,arguments),a++,n){let A=k_(o);A!=null&&n(A,g)&&(g=A,a!==0&&a--),o=typeof g=="object"&&g!==null||typeof g=="function"?new CC(g):g}return m.s=AC,m.v=g,g}return i.clearCache=()=>{r=fl(),i.resetResultsCount()},i.resultsCount=()=>a,i.resetResultsCount=()=>{a=0},i}function O_(e,...t){let r=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,n=(...o)=>{let a=0,i=0,p,f={},m=o.pop();typeof m=="object"&&(f=m,m=o.pop()),w_(m,`createSelector expects an output function after the inputs, but received: [${typeof m}]`);let g={...r,...f},{memoize:A,memoizeOptions:x=[],argsMemoize:h=bc,argsMemoizeOptions:y=[]}=g,b=vC(x),w=vC(y),I=I_(o),F=A(function(){return a++,m.apply(null,arguments)},...b),E=!0,k=h(function(){i++;let q=E_(I,arguments);return p=F.apply(null,q),p},...w);return Object.assign(k,{resultFunc:m,memoizedResultFunc:F,dependencies:I,dependencyRecomputations:()=>i,resetDependencyRecomputations:()=>{i=0},lastResult:()=>p,recomputations:()=>a,resetRecomputations:()=>{a=0},memoize:A,argsMemoize:h})};return Object.assign(n,{withTypes:()=>n}),n}var ct=O_(bc);d();c();l();u();function bC(e){return({dispatch:r,getState:n})=>o=>a=>typeof a=="function"?a(r,n,e):o(a)}var xC=bC(),wC=bC;var __=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?uc:uc.apply(null,arguments)},$W=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}},N_=e=>e&&typeof e.match=="function";function P(e,t){function r(...n){if(t){let o=t(...n);if(!o)throw new Error(zt(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=>lc(n)&&n.type===e,r}var OC=class xc extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,xc.prototype)}static get[Symbol.species](){return xc}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new xc(...t[0].concat(this)):new xc(...t.concat(this))}};function RC(e){return Mt(e)?Qo(e,()=>{}):e}function ml(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function D_(e){return typeof e=="boolean"}var q_=()=>function(t){let{thunk:r=!0,immutableCheck:n=!0,serializableCheck:o=!0,actionCreatorCheck:a=!0}=t??{},i=new OC;return r&&(D_(r)?i.push(xC):i.push(wC(r.extraArgument))),i},wc="RTK_autoBatch",oi=()=>e=>({payload:e,meta:{[wc]:!0}}),IC=e=>t=>{setTimeout(t,e)},M_=(e,t)=>r=>{let n=!1,o=()=>{n||(n=!0,cancelAnimationFrame(a),clearTimeout(i),r())},a=e(o),i=setTimeout(o,t)},j_=(e={type:"raf"})=>t=>(...r)=>{let n=t(...r),o=!0,a=!1,i=!1,p=new Set,f=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?M_(window.requestAnimationFrame,100):IC(10):e.type==="callback"?e.queueNotification:IC(e.timeout),m=()=>{i=!1,a&&(a=!1,p.forEach(g=>g()))};return Object.assign({},n,{subscribe(g){let A=()=>o&&g(),x=n.subscribe(A);return p.add(g),()=>{x(),p.delete(g)}},dispatch(g){try{return o=!g?.meta?.[wc],a=!o,a&&(i||(i=!0,f(m))),n.dispatch(g)}finally{o=!0}}})},V_=e=>function(r){let{autoBatch:n=!0}=r??{},o=new OC(e);return n&&o.push(j_(typeof n=="object"?n:void 0)),o};function _C(e){let t=q_(),{reducer:r=void 0,middleware:n,devTools:o=!0,duplicateMiddlewareCheck:a=!0,preloadedState:i=void 0,enhancers:p=void 0}=e||{},f;if(typeof r=="function")f=r;else if(Ur(r))f=Ja(r);else throw new Error(zt(1));let m;typeof n=="function"?m=n(t):m=t();let g=uc;o&&(g=__({trace:!1,...(typeof o=="object"&&o)}));let A=rC(...m),x=V_(A),h=typeof p=="function"?p(x):x(),y=g(...h);return Ch(f,i,y)}function NC(e){let t={},r=[],n,o={addCase(a,i){let p=typeof a=="string"?a:a.type;if(!p)throw new Error(zt(28));if(p in t)throw new Error(zt(29));return t[p]=i,o},addAsyncThunk(a,i){return i.pending&&(t[a.pending.type]=i.pending),i.rejected&&(t[a.rejected.type]=i.rejected),i.fulfilled&&(t[a.fulfilled.type]=i.fulfilled),i.settled&&r.push({matcher:a.settled,reducer:i.settled}),o},addMatcher(a,i){return r.push({matcher:a,reducer:i}),o},addDefaultCase(a){return n=a,o}};return e(o),[t,r,n]}function L_(e){return typeof e=="function"}function fe(e,t){let[r,n,o]=NC(t),a;if(L_(e))a=()=>RC(e());else{let p=RC(e);a=()=>p}function i(p=a(),f){let m=[r[f.type],...n.filter(({matcher:g})=>g(f)).map(({reducer:g})=>g)];return m.filter(g=>!!g).length===0&&(m=[o]),m.reduce((g,A)=>{if(A)if(Ht(g)){let h=A(g,f);return h===void 0?g:h}else{if(Mt(g))return Qo(g,x=>A(x,f));{let x=A(g,f);if(x===void 0){if(g===null)return g;throw Error("A case reducer on a non-draftable value must not return undefined")}return x}}return g},p)}return i.getInitialState=a,i}var DC=(e,t)=>N_(e)?e.match(t):e(t);function Qr(...e){return t=>e.some(r=>DC(r,t))}function ni(...e){return t=>e.every(r=>DC(r,t))}function Sl(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 Rc(e){return typeof e[0]=="function"&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function vl(...e){return e.length===0?t=>Sl(t,["pending"]):Rc(e)?Qr(...e.map(t=>t.pending)):vl()(e[0])}function Go(...e){return e.length===0?t=>Sl(t,["rejected"]):Rc(e)?Qr(...e.map(t=>t.rejected)):Go()(e[0])}function Ic(...e){let t=r=>r&&r.meta&&r.meta.rejectedWithValue;return e.length===0?ni(Go(...e),t):Rc(e)?ni(Go(...e),t):Ic()(e[0])}function Fn(...e){return e.length===0?t=>Sl(t,["fulfilled"]):Rc(e)?Qr(...e.map(t=>t.fulfilled)):Fn()(e[0])}function Al(...e){return e.length===0?t=>Sl(t,["pending","fulfilled","rejected"]):Rc(e)?Qr(...e.flatMap(t=>[t.pending,t.rejected,t.fulfilled])):Al()(e[0])}var U_="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Ec=(e=21)=>{let t="",r=e;for(;r--;)t+=U_[Math.random()*64|0];return t},Q_=["name","message","stack","code"],Dh=class{constructor(e,t){le(this,"payload");le(this,"meta");le(this,"_type");this.payload=e,this.meta=t}},EC=class{constructor(e,t){le(this,"payload");le(this,"meta");le(this,"_type");this.payload=e,this.meta=t}},B_=e=>{if(typeof e=="object"&&e!==null){let t={};for(let r of Q_)typeof e[r]=="string"&&(t[r]=e[r]);return t}return{message:String(e)}},FC="External signal was aborted",me=(()=>{function e(t,r,n){let o=P(t+"/fulfilled",(f,m,g,A)=>({payload:f,meta:{...(A||{}),arg:g,requestId:m,requestStatus:"fulfilled"}})),a=P(t+"/pending",(f,m,g)=>({payload:void 0,meta:{...(g||{}),arg:m,requestId:f,requestStatus:"pending"}})),i=P(t+"/rejected",(f,m,g,A,x)=>({payload:A,error:(n&&n.serializeError||B_)(f||"Rejected"),meta:{...(x||{}),arg:g,requestId:m,rejectedWithValue:!!A,requestStatus:"rejected",aborted:f?.name==="AbortError",condition:f?.name==="ConditionError"}}));function p(f,{signal:m}={}){return(g,A,x)=>{let h=n?.idGenerator?n.idGenerator(f):Ec(),y=new s.AbortController,b,w;function I(E){w=E,y.abort()}m&&(m.aborted?I(FC):m.addEventListener("abort",()=>I(FC),{once:!0}));let F=_asyncToGenerator(function*(){let E;try{let T=n?.condition?.(f,{getState:A,extra:x});if($_(T)&&(T=yield T),T===!1||y.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let q=new Promise((G,Q)=>{b=()=>{Q({name:"AbortError",message:w||"Aborted"})},y.signal.addEventListener("abort",b,{once:!0})});g(a(h,f,n?.getPendingMeta?.({requestId:h,arg:f},{getState:A,extra:x}))),E=yield Promise.race([q,Promise.resolve(r(f,{dispatch:g,getState:A,extra:x,requestId:h,signal:y.signal,abort:I,rejectWithValue:(G,Q)=>new Dh(G,Q),fulfillWithValue:(G,Q)=>new EC(G,Q)})).then(G=>{if(G instanceof Dh)throw G;return G instanceof EC?o(G.payload,h,f,G.meta):o(G,h,f)})])}catch(T){E=T instanceof Dh?i(null,h,f,T.payload,T.meta):i(T,h,f)}finally{b&&y.signal.removeEventListener("abort",b)}return n&&!n.dispatchConditionRejection&&i.match(E)&&E.meta.condition||g(E),E})();return Object.assign(F,{abort:I,requestId:h,arg:f,unwrap(){return F.then(G_)}})}}return Object.assign(p,{pending:a,rejected:i,fulfilled:o,settled:Qr(i,o),typePrefix:t})}return e.withTypes=()=>e,e})();function G_(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function $_(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var qC=Symbol.for("rtk-slice-createasyncthunk"),zW={[qC]:me};function H_(e,t){return`${e}/${t}`}function z_({creators:e}={}){let t=e?.asyncThunk?.[qC];return function(n){let{name:o,reducerPath:a=o}=n;if(!o)throw new Error(zt(11));typeof process<"u";let i=(typeof n.reducers=="function"?n.reducers(Y_()):n.reducers)||{},p=Object.keys(i),f={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},m={addCase(E,k){let T=typeof E=="string"?E:E.type;if(!T)throw new Error(zt(12));if(T in f.sliceCaseReducersByType)throw new Error(zt(13));return f.sliceCaseReducersByType[T]=k,m},addMatcher(E,k){return f.sliceMatchers.push({matcher:E,reducer:k}),m},exposeAction(E,k){return f.actionCreators[E]=k,m},exposeCaseReducer(E,k){return f.sliceCaseReducersByName[E]=k,m}};p.forEach(E=>{let k=i[E],T={reducerName:E,type:H_(o,E),createNotation:typeof n.reducers=="function"};X_(k)?J_(T,k,m,t):K_(T,k,m)});function g(){let[E={},k=[],T=void 0]=typeof n.extraReducers=="function"?NC(n.extraReducers):[n.extraReducers],q={...E,...f.sliceCaseReducersByType};return fe(n.initialState,G=>{for(let Q in q)G.addCase(Q,q[Q]);for(let Q of f.sliceMatchers)G.addMatcher(Q.matcher,Q.reducer);for(let Q of k)G.addMatcher(Q.matcher,Q.reducer);T&&G.addDefaultCase(T)})}let A=E=>E,x=new Map,h=new WeakMap,y;function b(E,k){return y||(y=g()),y(E,k)}function w(){return y||(y=g()),y.getInitialState()}function I(E,k=!1){function T(G){let Q=G[E];return typeof Q>"u"&&k&&(Q=ml(h,T,w)),Q}function q(G=A){let Q=ml(x,k,()=>new WeakMap);return ml(Q,G,()=>{let V={};for(let[B,L]of Object.entries(n.selectors??{}))V[B]=W_(L,G,()=>ml(h,G,w),k);return V})}return{reducerPath:E,getSelectors:q,get selectors(){return q(T)},selectSlice:T}}let F={name:o,reducer:b,actions:f.actionCreators,caseReducers:f.sliceCaseReducersByName,getInitialState:w,...I(a),injectInto(E,{reducerPath:k,...T}={}){let q=k??a;return E.inject({reducerPath:q,reducer:b},T),{...F,...I(q,!0)}}};return F}}function W_(e,t,r,n){function o(a,...i){let p=t(a);return typeof p>"u"&&n&&(p=r()),e(p,...i)}return o.unwrapped=e,o}var $o=z_();function Y_(){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 K_({type:e,reducerName:t,createNotation:r},n,o){let a,i;if("reducer"in n){if(r&&!Z_(n))throw new Error(zt(17));a=n.reducer,i=n.prepare}else a=n;o.addCase(e,a).exposeCaseReducer(t,a).exposeAction(t,i?P(e,i):P(e))}function X_(e){return e._reducerDefinitionType==="asyncThunk"}function Z_(e){return e._reducerDefinitionType==="reducerWithPrepare"}function J_({type:e,reducerName:t},r,n,o){if(!o)throw new Error(zt(18));let{payloadCreator:a,fulfilled:i,pending:p,rejected:f,settled:m,options:g}=r,A=o(e,a,g);n.exposeAction(t,A),i&&n.addCase(A.fulfilled,i),p&&n.addCase(A.pending,p),f&&n.addCase(A.rejected,f),m&&n.addMatcher(A.settled,m),n.exposeCaseReducer(t,{fulfilled:i||gl,pending:p||gl,rejected:f||gl,settled:m||gl})}function gl(){}var e0="task",MC="listener",jC="completed",jh="cancelled",t0=`task-${jh}`,r0=`task-${jC}`,qh=`${MC}-${jh}`,n0=`${MC}-${jC}`,Cl=class{constructor(e){le(this,"code");le(this,"name","TaskAbortError");le(this,"message");this.code=e,this.message=`${e0} ${jh} (reason: ${e})`}},Vh=(e,t)=>{if(typeof e!="function")throw new TypeError(zt(32))},hl=()=>{},VC=(e,t=hl)=>(e.catch(t),e),LC=(e,t)=>(e.addEventListener("abort",t,{once:!0}),()=>e.removeEventListener("abort",t)),Bo=e=>{if(e.aborted)throw new Cl(e.reason)};function UC(e,t){let r=hl;return new Promise((n,o)=>{let a=()=>o(new Cl(e.reason));if(e.aborted){a();return}r=LC(e,a),t.finally(()=>r()).then(n,o)}).finally(()=>{r=hl})}var o0=/*#__PURE__*/function(){var _ref5=_asyncToGenerator(function*(e,t){try{return yield Promise.resolve(),{status:"ok",value:yield e()}}catch(r){return{status:r instanceof Cl?"cancelled":"rejected",error:r}}finally{t?.()}});return function o0(_x7,_x8){return _ref5.apply(this,arguments)}}(),yl=e=>t=>VC(UC(e,t).then(r=>(Bo(e),r))),QC=e=>{let t=yl(e);return r=>t(new Promise(n=>setTimeout(n,r)))},{assign:ri}=Object,TC={},bl="listenerMiddleware",a0=(e,t)=>{let r=n=>LC(e,()=>n.abort(e.reason));return(n,o)=>{Vh(n,"taskExecutor");let a=new s.AbortController;r(a);let i=o0(/*#__PURE__*/_asyncToGenerator(function*(){Bo(e),Bo(a.signal);let p=yield n({pause:yl(a.signal),delay:QC(a.signal),signal:a.signal});return Bo(a.signal),p}),()=>a.abort(r0));return o?.autoJoin&&t.push(i.catch(hl)),{result:yl(e)(i),cancel(){a.abort(t0)}}}},i0=(e,t)=>{let r=/*#__PURE__*/function(){var _ref7=_asyncToGenerator(function*(n,o){Bo(t);let a=()=>{},p=[new Promise((f,m)=>{let g=e({predicate:n,effect:(A,x)=>{x.unsubscribe(),f([A,x.getState(),x.getOriginalState()])}});a=()=>{g(),m()}})];o!=null&&p.push(new Promise(f=>setTimeout(f,o,null)));try{let f=yield UC(t,Promise.race(p));return Bo(t),f}finally{a()}});return function r(_x9,_x0){return _ref7.apply(this,arguments)}}();return(n,o)=>VC(r(n,o))},BC=e=>{let{type:t,actionCreator:r,matcher:n,predicate:o,effect:a}=e;if(t)o=P(t).match;else if(r)t=r.type,o=r.match;else if(n)o=n;else if(!o)throw new Error(zt(21));return Vh(a,"options.listener"),{predicate:o,type:t,effect:a}},GC=ri(e=>{let{type:t,predicate:r,effect:n}=BC(e);return{id:Ec(),effect:n,type:t,predicate:r,pending:new Set,unsubscribe:()=>{throw new Error(zt(22))}}},{withTypes:()=>GC}),PC=(e,t)=>{let{type:r,effect:n,predicate:o}=BC(t);return Array.from(e.values()).find(a=>(typeof r=="string"?a.type===r:a.predicate===o)&&a.effect===n)},Mh=e=>{e.pending.forEach(t=>{t.abort(qh)})},s0=(e,t)=>()=>{for(let r of t.keys())Mh(r);e.clear()},kC=(e,t,r)=>{try{e(t,r)}catch(n){setTimeout(()=>{throw n},0)}},$C=ri(P(`${bl}/add`),{withTypes:()=>$C}),c0=P(`${bl}/removeAll`),HC=ri(P(`${bl}/remove`),{withTypes:()=>HC}),u0=(...e)=>{console.error(`${bl}/error`,...e)},zC=(e={})=>{let t=new Map,r=new Map,n=h=>{let y=r.get(h)??0;r.set(h,y+1)},o=h=>{let y=r.get(h)??1;y===1?r.delete(h):r.set(h,y-1)},{extra:a,onError:i=u0}=e;Vh(i,"onError");let p=h=>(h.unsubscribe=()=>t.delete(h.id),t.set(h.id,h),y=>{h.unsubscribe(),y?.cancelActive&&Mh(h)}),f=h=>{let y=PC(t,h)??GC(h);return p(y)};ri(f,{withTypes:()=>f});let m=h=>{let y=PC(t,h);return y&&(y.unsubscribe(),h.cancelActive&&Mh(y)),!!y};ri(m,{withTypes:()=>m});let g=/*#__PURE__*/function(){var _ref8=_asyncToGenerator(function*(h,y,b,w){let I=new s.AbortController,F=i0(f,I.signal),E=[];try{h.pending.add(I),n(h),yield Promise.resolve(h.effect(y,ri({},b,{getOriginalState:w,condition:(k,T)=>F(k,T).then(Boolean),take:F,delay:QC(I.signal),pause:yl(I.signal),extra:a,signal:I.signal,fork:a0(I.signal,E),unsubscribe:h.unsubscribe,subscribe:()=>{t.set(h.id,h)},cancelActiveListeners:()=>{h.pending.forEach((k,T,q)=>{k!==I&&(k.abort(qh),q.delete(k))})},cancel:()=>{I.abort(qh),h.pending.delete(I)},throwIfCancelled:()=>{Bo(I.signal)}})))}catch(k){k instanceof Cl||kC(i,k,{raisedBy:"effect"})}finally{yield Promise.all(E),I.abort(n0),o(h),h.pending.delete(I)}});return function g(_x1,_x10,_x11,_x12){return _ref8.apply(this,arguments)}}(),A=s0(t,r);return{middleware:h=>y=>b=>{if(!lc(b))return y(b);if($C.match(b))return f(b.payload);if(c0.match(b)){A();return}if(HC.match(b))return m(b.payload);let w=h.getState(),I=()=>{if(w===TC)throw new Error(zt(23));return w},F;try{if(F=y(b),t.size>0){let E=h.getState(),k=Array.from(t.values());for(let T of k){let q=!1;try{q=T.predicate(b,E,w)}catch(G){q=!1,kC(i,G,{raisedBy:"predicate"})}q&&g(T,b,h,I)}}}finally{w=TC}return F},startListening:f,stopListening:m,clearListeners:A}};function zt(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}d();c();l();u();d();c();l();u();d();c();l();u();function WC(){let e=typeof window<"u";return{sendMessage(t){e&&window.postMessage(t,"*")}}}d();c();l();u();d();c();l();u();d();c();l();u();var YC=/^(?:[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 l0(e){return typeof e=="string"&&YC.test(e)}var Lh=l0;d();c();l();u();var Tt=[];for(let e=0;e<256;++e)Tt.push((e+256).toString(16).slice(1));function KC(e,t=0){return(Tt[e[t+0]]+Tt[e[t+1]]+Tt[e[t+2]]+Tt[e[t+3]]+"-"+Tt[e[t+4]]+Tt[e[t+5]]+"-"+Tt[e[t+6]]+Tt[e[t+7]]+"-"+Tt[e[t+8]]+Tt[e[t+9]]+"-"+Tt[e[t+10]]+Tt[e[t+11]]+Tt[e[t+12]]+Tt[e[t+13]]+Tt[e[t+14]]+Tt[e[t+15]]).toLowerCase()}d();c();l();u();var d0=new Uint8Array(16);function Uh(){return crypto.getRandomValues(d0)}d();c();l();u();function p0(e,t,r){return!t&&!e&&crypto.randomUUID?crypto.randomUUID():f0(e,t,r)}function f0(e,t,r){e=e||{};let n=e.random??e.rng?.()??Uh();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 KC(n)}var Qh=p0;function m0(_x13){return _m2.apply(this,arguments)}function _m2(){_m2=_asyncToGenerator(function*({config:e,environment:t,event:r,listenerManager:n}){let{url:o,token:a,mode:i}=e;if(i!=="disabled")return n.call(r),t.send(o,a,r)});return _m2.apply(this,arguments)}var rb="2.1.3",Bh=128,nb=192,XC=224,ZC=240,g0=248;function h0(e){return(e&g0)===ZC?4:(e&ZC)===XC?3:(e&XC)===nb?2:1}function y0(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&Bh)!=Bh)break;if(r-=3,(n&nb)!=Bh){t-r>=h0(n)*3&&(r=t);break}}return e.substring(0,r)}function S0(e){let{trackingId:t}=e;return{trackingId:t}}function v0(e){return(e.source||[]).concat([`relay@${rb}`])}function ob(e,t,r){let{getReferrer:n,getLocation:o,getUserAgent:a}=r,i=S0(t),p=r.getClientId();return Object.freeze({type:e,config:i,ts:Date.now(),source:v0(t),clientId:p,userAgent:a(),referrer:JC(n()),location:JC(o())})}function JC(e){return e!==null?y0(e,1024):null}function A0(e,t,r,n){return{...t,meta:ob(e,r,n)}}var C0="*";function b0(){let e=[];function t({type:f,callback:m}){return e.findIndex(g=>g.type===f&&g.callback===m)}function r(f,m){return f.type==="*"||m===f.type}function n(f){return t(f)<0&&e.push(f),()=>p(f.type,f.callback)}function o(f){e.forEach(m=>{if(r(m,f.meta.type))try{m.callback(f)}catch(g){console.error(g)}})}function a(f){if(f===C0)e.length=0;else for(let m=e.length-1;m>=0;m--)e[m].type===f&&e.splice(m,1)}function i(f){let m=t(f);m>=0&&e.splice(m,1)}function p(f,m){m?i({type:f,callback:m}):a(f)}return{add:n,call:o,remove:p}}function eb({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 x0(e){let t=eb(e);return{get:()=>t,update:r=>{t=eb({...t,...r})}}}var Gh=w0();function w0(){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 i=a.replace(/^\s+/,"");if(i.lastIndexOf(n,0)===0)return i.substring(n.length,i.length)}return null},setItem(r,n,o){let a=t(window.location.hostname),i=`;expires=${new Date(new Date().getTime()+o).toUTCString()}`,p=a?`;domain=${a}`:"";document.cookie=`${e}${r}=${n}${i}${p};path=/;SameSite=Lax`},removeItem(r){this.setItem(r,"",-1)}}}function R0(){return{getItem(e){return Gh.getItem(e)||localStorage.getItem(e)},removeItem(e){Gh.removeItem(e),localStorage.removeItem(e)},setItem(e,t){localStorage.setItem(e,t),Gh.setItem(e,t,31556952e3)}}}var tb="visitorId";function I0(){let e=document.referrer;return e===""?null:e}function $h(){let e=R0();return{runtime:"browser",send:function(){var _ref9=_asyncToGenerator(function*(t,r,n){let o=v(t,{method:"POST",body:JSON.stringify([n]),keepalive:!0,headers:{"Content-Type":"application/json",Authorization:`Bearer ${r}`}});WC().sendMessage({kind:"EVENT_PROTOCOL",event:n,url:t,token:r});let i=yield o;if(i?.ok){let p;try{p=yield i.json()}catch{return}for(let f of p.events)if(!f.accepted)throw new Error(`Received event was rejected for processing: ${f.errorMessage}`)}else throw new Error(`Error ${i.status}: Failed to send the event(s).`)});return function send(_x14,_x15,_x16){return _ref9.apply(this,arguments)}}(),getReferrer:()=>I0(),getLocation:()=>window.location.href,getUserAgent:()=>navigator.userAgent,getClientId:()=>{let t=e.getItem(tb);if(t&&Lh(t))return t;let r=Qh();return e.setItem(tb,r),r}}}function E0(){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 F0(){return{runtime:"null",send:()=>Promise.resolve(void 0),getReferrer:()=>null,getLocation:()=>null,getUserAgent:()=>null,getClientId:()=>""}}function T0(e){let t=e.get().mode!=="disabled",r=e.get().environment,n=F0();return t&&r?{...r,runtime:"custom"}:t&&P0()&&E0()?$h():n}function P0(){try{return typeof window=="object"}catch{return!1}}function k0(e){return{get:()=>Object.freeze(T0(e))}}function ab(e){let t=x0(e),r=b0(),n=k0(t);return{emit:function(){var _ref0=_asyncToGenerator(function*(o,a){let i=t.get(),p=n.get(),f=A0(o,a,i,p);return m0({config:i,environment:p,event:f,listenerManager:r})});return function emit(_x17,_x18){return _ref0.apply(this,arguments)}}(),getMeta:o=>ob(o,t.get(),n.get()),on:(o,a)=>r.add({type:o,callback:a}),off:(o,a)=>r.remove(o,a),updateConfig:o=>t.update(o),version:rb}}d();c();l();u();function ib(){return typeof window<"u"&&typeof document<"u"}d();c();l();u();d();c();l();u();var Wn="3.55.0",sb=["@coveo/atomic","@coveo/quantic"];var ai=ct(e=>e.source,e=>Object.entries(e).map(([t,r])=>`${t}@${r}`).concat(`@coveo/headless@${Wn}`));var Fc=ct(e=>e.configuration.organizationId,e=>e.configuration.environment,e=>e.configuration.accessToken,e=>e.configuration.analytics,e=>ai(e.configuration.analytics),(e,t)=>t,(e,t,r,{trackingId:n,apiBaseUrl:o,enabled:a},i,p)=>{let f=_0(p);return ab({mode:a?"emit":"disabled",url:o??Bu(e,t),token:r,trackingId:n??null,source:i,environment:f})}),O0={getClientId:()=>"",getLocation:()=>null,getReferrer:()=>null,getUserAgent:()=>null,send:function(){var _ref1=_asyncToGenerator(function*(){});return function send(){return _ref1.apply(this,arguments)}}()},_0=e=>{if(!e)return;let t=e();return{...(ib()?$h():O0),getClientId:()=>t.clientId,getLocation:()=>t.location,getReferrer:()=>t.referrer,getUserAgent:()=>t.userAgent}};d();c();l();u();d();c();l();u();function Br(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 U(e,t,r,n){function o(a){return a instanceof r?a:new r(function(i){i(a)})}return new(r||(r=Promise))(function(a,i){function p(g){try{m(n.next(g))}catch(A){i(A)}}function f(g){try{m(n.throw(g))}catch(A){i(A)}}function m(g){g.done?a(g.value):o(g.value).then(p,f)}m((n=n.apply(e,t||[])).next())})}var Me;(function(e){e.search="search",e.click="click",e.custom="custom",e.view="view",e.collect="collect"})(Me||(Me={}));function Wh(){return typeof window<"u"}function cy(){return typeof navigator<"u"}function ii(){return typeof document<"u"}function Yh(){try{return typeof localStorage<"u"}catch{return!1}}function N0(){try{return typeof sessionStorage<"u"}catch{return!1}}function vb(){return cy()&&navigator.cookieEnabled}var D0=[Me.click,Me.custom,Me.search,Me.view],q0=(e,t)=>D0.indexOf(e)!==-1?Object.assign({language:ii()?document.documentElement.lang:"unknown",userAgent:cy()?navigator.userAgent:"unknown"},t):t,Pc=class e{static set(t,r,n){var o,a,i,p;n&&(a=new Date,a.setTime(a.getTime()+n)),p=window.location.hostname,p.indexOf(".")===-1?cb(t,r,a):(i=p.split("."),o=i[i.length-2]+"."+i[i.length-1],cb(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 cb(e,t,r,n){document.cookie=`${e}=${t}`+(r?`;expires=${r.toUTCString()}`:"")+(n?`;domain=${n}`:"")+";path=/;SameSite=Lax"+(window.location.protocol==="https:"?";Secure":"")}function M0(){return Yh()?localStorage:vb()?new kc:N0()?sessionStorage:new ci}var kc=class e{getItem(t){return Pc.get(`${e.prefix}${t}`)}removeItem(t){Pc.erase(`${e.prefix}${t}`)}setItem(t,r,n){Pc.set(`${e.prefix}${t}`,r,n)}};kc.prefix="coveo_";var Kh=class{constructor(){this.cookieStorage=new kc}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)}},ci=class{getItem(t){return null}removeItem(t){}setItem(t,r){}},xl="__coveo.analytics.history",j0=20,V0=1e3*60,L0=75,Rl=class{constructor(t){this.store=t||M0()}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 U(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 U(this,void 0,void 0,function*(){let t=yield this.getHistoryWithInternalTimeAsync();return this.stripEmptyQueries(this.stripInternalTime(t))})}getHistoryWithInternalTime(){try{let t=this.store.getItem(xl);return t&&typeof t=="string"?JSON.parse(t):[]}catch{return[]}}getHistoryWithInternalTimeAsync(){return U(this,void 0,void 0,function*(){try{let t=yield this.store.getItem(xl);return t?JSON.parse(t):[]}catch{return[]}})}setHistory(t){try{this.store.setItem(xl,JSON.stringify(t.slice(0,j0)))}catch{}}clear(){try{this.store.removeItem(xl)}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,L0)),t}isValidEntry(t){let r=this.getMostRecentElement();return r&&r.value==t.value?(t.internalTime||0)-(r.internalTime||0)>V0:!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 U0=(e,t)=>U(void 0,void 0,void 0,function*(){return e===Me.view?(yield Q0(t.contentIdValue),Object.assign({location:window.location.toString(),referrer:document.referrer,title:document.title},t)):t}),Q0=e=>U(void 0,void 0,void 0,function*(){let t=new Rl,r={name:"PageView",value:e,time:new Date().toISOString()};yield t.addElementAsync(r)}),B0=/^(?:[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 Il(e){return typeof e=="string"&&B0.test(e)}function ub(e){if(!Il(e))throw TypeError("Invalid UUID");let t;return Uint8Array.of((t=parseInt(e.slice(0,8),16))>>>24,t>>>16&255,t>>>8&255,t&255,(t=parseInt(e.slice(9,13),16))>>>8,t&255,(t=parseInt(e.slice(14,18),16))>>>8,t&255,(t=parseInt(e.slice(19,23),16))>>>8,t&255,(t=parseInt(e.slice(24,36),16))/1099511627776&255,t/4294967296&255,t>>>24&255,t>>>16&255,t>>>8&255,t&255)}var Pt=[];for(let e=0;e<256;++e)Pt.push((e+256).toString(16).slice(1));function Ab(e,t=0){return(Pt[e[t+0]]+Pt[e[t+1]]+Pt[e[t+2]]+Pt[e[t+3]]+"-"+Pt[e[t+4]]+Pt[e[t+5]]+"-"+Pt[e[t+6]]+Pt[e[t+7]]+"-"+Pt[e[t+8]]+Pt[e[t+9]]+"-"+Pt[e[t+10]]+Pt[e[t+11]]+Pt[e[t+12]]+Pt[e[t+13]]+Pt[e[t+14]]+Pt[e[t+15]]).toLowerCase()}var G0=new Uint8Array(16);function $0(){return crypto.getRandomValues(G0)}function H0(e){e=unescape(encodeURIComponent(e));let t=new Uint8Array(e.length);for(let r=0;r<e.length;++r)t[r]=e.charCodeAt(r);return t}var z0="6ba7b810-9dad-11d1-80b4-00c04fd430c8",W0="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function Y0(e,t,r,n,o,a){let i=typeof r=="string"?H0(r):r,p=typeof n=="string"?ub(n):n;if(typeof n=="string"&&(n=ub(n)),n?.length!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let f=new Uint8Array(16+i.length);return f.set(p),f.set(i,p.length),f=t(f),f[6]=f[6]&15|e,f[8]=f[8]&63|128,Ab(f)}function Ho(e,t,r){return!t&&!e&&crypto.randomUUID?crypto.randomUUID():K0(e,t,r)}function K0(e,t,r){e=e||{};let n=e.random??e.rng?.()??$0();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 Ab(n)}function X0(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 Hh(e,t){return e<<t|e>>>32-t}function Z0(e){let t=[1518500249,1859775393,2400959708,3395469782],r=[1732584193,4023233417,2562383102,271733878,3285377520],n=new Uint8Array(e.length+1);n.set(e),n[e.length]=128,e=n;let o=e.length/4+2,a=Math.ceil(o/16),i=new Array(a);for(let p=0;p<a;++p){let f=new Uint32Array(16);for(let m=0;m<16;++m)f[m]=e[p*64+m*4]<<24|e[p*64+m*4+1]<<16|e[p*64+m*4+2]<<8|e[p*64+m*4+3];i[p]=f}i[a-1][14]=(e.length-1)*8/2**32,i[a-1][14]=Math.floor(i[a-1][14]),i[a-1][15]=(e.length-1)*8&4294967295;for(let p=0;p<a;++p){let f=new Uint32Array(80);for(let y=0;y<16;++y)f[y]=i[p][y];for(let y=16;y<80;++y)f[y]=Hh(f[y-3]^f[y-8]^f[y-14]^f[y-16],1);let m=r[0],g=r[1],A=r[2],x=r[3],h=r[4];for(let y=0;y<80;++y){let b=Math.floor(y/20),w=Hh(m,5)+X0(b,g,A,x)+h+t[b]+f[y]>>>0;h=x,x=A,A=Hh(g,30)>>>0,g=m,m=w}r[0]=r[0]+m>>>0,r[1]=r[1]+g>>>0,r[2]=r[2]+A>>>0,r[3]=r[3]+x>>>0,r[4]=r[4]+h>>>0}return Uint8Array.of(r[0]>>24,r[0]>>16,r[0]>>8,r[0],r[1]>>24,r[1]>>16,r[1]>>8,r[1],r[2]>>24,r[2]>>16,r[2]>>8,r[2],r[3]>>24,r[3]>>16,r[3]>>8,r[3],r[4]>>24,r[4]>>16,r[4]>>8,r[4])}function El(e,t,r,n){return Y0(80,Z0,e,t)}El.DNS=z0;El.URL=W0;var Cb="2.32.0",lb=e=>`${e.protocol}//${e.hostname}${e.pathname.indexOf("/")===0?e.pathname:`/${e.pathname}`}${e.search}`,Tc={pageview:"pageview",event:"event"},Fl=class{constructor({client:t,uuidGenerator:r=Ho}){this.client=t,this.uuidGenerator=r}},Xh=class extends Fl{constructor({client:t,uuidGenerator:r=Ho}){super({client:t,uuidGenerator:r}),this.actionData={},this.pageViewId=r(),this.nextPageViewId=this.pageViewId,this.currentLocation=lb(window.location),this.lastReferrer=ii()?document.referrer:"",this.addHooks()}getApi(t){return t==="setAction"?this.setAction: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:ii()?document.title:"",encoding:ii()?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===Tc.pageview&&(this.nextPageViewId=this.uuidGenerator(),this.hasSentFirstPageView=!0)}getNextValues(t,r){return{pageViewId:t===Tc.pageview?this.nextPageViewId:this.pageViewId,referrer:t===Tc.pageview&&this.hasSentFirstPageView?this.currentLocation:this.lastReferrer,location:t===Tc.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 lb(window.location)}},Yn=class e{constructor(t,r){if(!Il(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 Il(a)?new e(a,Number.parseInt(o)*1e3):null}};Yn.cvo_cid="cvo_cid";Yn.expirationTime=120;var Zh=class extends Fl{constructor({client:t,uuidGenerator:r=Ho}){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 U(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(Yn.cvo_cid,new Yn(n,Date.now()).toString()),r.toString()}catch{throw new Error("Invalid URL provided")}})}acceptFrom(t){this.client.setAcceptedLinkReferrers(t)}};Zh.Id="link";var yr=Object.keys;function wl(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}var zh=128,bb=192,db=224,pb=240;function J0(e){return(e&248)===pb?4:(e&pb)===db?3:(e&db)===bb?2:1}function eN(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&zh)!=zh)break;if(r-=3,(n&bb)!=zh){t-r>=J0(n)*3&&(r=t);break}}return e.substring(0,r)}var Jh={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"},tN=yr(Jh).map(e=>Jh[e]),rN=[...tN].join("|"),nN=new RegExp(`^(${rN}$)`),oN={svcAction:"svc_action",svcActionData:"svc_action_data"},aN=e=>yr(e).filter(t=>e[t]!==void 0).reduce((t,r)=>{let n=Jh[r]||r;return Object.assign(Object.assign({},t),{[n]:e[r]})},{}),iN=e=>nN.test(e),sN=[iN],fb={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",price:"pr",quantity:"qt",coupon:"cc",position:"ps",group:"group"},mb={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",position:"ps",price:"pr",group:"group"},jt={action:"pa",list:"pal",listSource:"pls"},Tl={id:"ti",revenue:"tr",tax:"tt",shipping:"ts",coupon:"tcc",affiliation:"ta",step:"cos",option:"col"},cN=["loyaltyCardId","loyaltyTier","thirdPartyPersona","companyName","favoriteStore","storeName","userIndustry","userRole","userDepartment","businessUnit"],ey={id:"quoteId",affiliation:"quoteAffiliation"},ty={id:"reviewId",rating:"reviewRating",comment:"reviewComment"},uN={add:jt,bookmark_add:jt,bookmark_remove:jt,click:jt,checkout:jt,checkout_option:jt,detail:jt,impression:jt,remove:jt,refund:Object.assign(Object.assign({},jt),Tl),purchase:Object.assign(Object.assign({},jt),Tl),quickview:jt,quote:Object.assign(Object.assign({},jt),ey),review:Object.assign(Object.assign({},jt),ty)},lN=yr(fb).map(e=>fb[e]),dN=yr(mb).map(e=>mb[e]),pN=yr(jt).map(e=>jt[e]),fN=yr(Tl).map(e=>Tl[e]),mN=yr(ty).map(e=>ty[e]),gN=yr(ey).map(e=>ey[e]),hN=[...lN,"custom"].join("|"),yN=[...dN,"custom"].join("|"),xb="(pr[0-9]+)",wb="(il[0-9]+pi[0-9]+)",SN=new RegExp(`^${xb}(${hN})$`),vN=new RegExp(`^(${wb}(${yN}))|(il[0-9]+nm)$`),AN=new RegExp(`^(${pN.join("|")})$`),CN=new RegExp(`^(${fN.join("|")})$`),bN=new RegExp(`^${xb}custom$`),xN=new RegExp(`^${wb}custom$`),wN=new RegExp(`^(${[...cN,...mN,...gN].join("|")})$`),RN=e=>SN.test(e),IN=e=>vN.test(e),EN=e=>AN.test(e),FN=e=>CN.test(e),TN=e=>wN.test(e),PN=[IN,RN,EN,FN,TN],kN=[bN,xN],ON={anonymizeIp:"aip"},_N={eventCategory:"ec",eventAction:"ea",eventLabel:"el",eventValue:"ev",page:"dp",visitorId:"cid",clientId:"cid",userId:"uid",currencyCode:"cu"},NN={hitType:"t",pageViewId:"pid",encoding:"de",location:"dl",referrer:"dr",screenColor:"sd",screenResolution:"sr",title:"dt",userAgent:"ua",language:"ul",eventId:"z",time:"tm"},DN=["contentId","contentIdKey","contentType","searchHub","tab","searchUid","permanentId","contentLocale","trackingId"],qN=Object.assign(Object.assign(Object.assign(Object.assign({},ON),_N),NN),DN.reduce((e,t)=>Object.assign(Object.assign({},e),{[t]:t}),{})),ry=Object.assign(Object.assign({},qN),oN),MN=e=>{let t=!!e.action&&uN[e.action]||{};return yr(e).reduce((r,n)=>{let o=t[n]||ry[n]||n;return Object.assign(Object.assign({},r),{[o]:e[n]})},{})},jN=yr(ry).map(e=>ry[e]),VN=e=>jN.indexOf(e)!==-1,LN=e=>e==="custom",UN=e=>[...PN,...sN,VN,LN].some(t=>t(e)),QN=e=>yr(e).reduce((t,r)=>{let n=BN(r);return n?Object.assign(Object.assign({},t),GN(n,e[r])):Object.assign(Object.assign({},t),{[r]:e[r]})},{}),BN=e=>{let t;return[...kN].every(r=>{var n;return t=(n=r.exec(e))===null||n===void 0?void 0:n[1],!t}),t},GN=(e,t)=>yr(t).reduce((r,n)=>Object.assign(Object.assign({},r),{[`${e}${n}`]:t[n]}),{}),ny=class{constructor(t){this.opts=t}sendEvent(t,r){return U(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:i,payload:p}=yield this.preProcessRequestAsPotentialJSONString(`${n}/analytics/${t}?${a}`,r,o),f=this.encodeForEventType(t,p),m=new Blob([f],{type:"application/x-www-form-urlencoded"});navigator.sendBeacon(i,m)})}isAvailable(){return"sendBeacon"in navigator}deleteHttpCookieVisitorId(){return Promise.resolve()}preProcessRequestAsPotentialJSONString(t,r,n){return U(this,void 0,void 0,function*(){let o=t,a=r;if(n){let i=yield n({url:t,body:JSON.stringify(r)},"analyticsBeacon"),{url:p,body:f}=i;o=p||t;try{a=JSON.parse(f)}catch(m){console.error("Unable to process the request body as a JSON string",m)}}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 U(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[Me.click,Me.custom,Me.search,Me.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}},oy=class{sendEvent(t,r){return U(this,void 0,void 0,function*(){return Promise.resolve()})}deleteHttpCookieVisitorId(){return U(this,void 0,void 0,function*(){return Promise.resolve()})}},gb=S.fetch,Pl=class{constructor(t){this.opts=t}sendEvent(t,r){return U(this,void 0,void 0,function*(){let{baseUrl:n,visitorIdProvider:o,preprocessRequest:a}=this.opts,i=this.shouldAppendVisitorId(t)?yield this.getVisitorIdParam():"",p={url:`${n}/analytics/${t}${i}`,credentials:"include",mode:"cors",headers:this.getHeaders(),method:"POST",body:JSON.stringify(r)},f=Object.assign(Object.assign({},p),a?yield a(p,"analyticsFetch"):{}),{url:m}=f,g=Br(f,["url"]),A;try{A=yield gb(m,g)}catch(x){console.error("An error has occurred when sending the event.",x);return}if(A.ok){let x=yield A.json();return x.visitorId&&o.setCurrentVisitorId(x.visitorId),x}else{try{A.json()}catch{}throw console.error(`An error has occurred when sending the "${t}" event.`,A,r),new Error(`An error has occurred when sending the "${t}" event. Check the console logs for more details.`)}})}deleteHttpCookieVisitorId(){return U(this,void 0,void 0,function*(){let{baseUrl:t}=this.opts,r=`${t}/analytics/visit`;yield gb(r,{headers:this.getHeaders(),method:"DELETE"})})}shouldAppendVisitorId(t){return[Me.click,Me.custom,Me.search,Me.view].indexOf(t)!==-1}getVisitorIdParam(){return U(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"})}},ay=class{constructor(t,r){Yh()&&vb()?this.storage=new Kh:Yh()?this.storage=localStorage:(console.warn("BrowserRuntime detected no valid storage available.",this),this.storage=new ci),this.client=new Pl(t),this.beaconClient=new ny(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}},iy=class{constructor(t,r){this.storage=r||new ci,this.client=new Pl(t)}getClientDependingOnEventType(t){return this.client}},kl=class{constructor(){this.storage=new ci,this.client=new oy}getClientDependingOnEventType(t){return this.client}},$N="xx",HN=e=>e?.startsWith($N)||!1,zN=`
|
|
28
|
+
${g}`:g;break;case"event":n.event=g;break;case"id":e(n.id=g);break;case"retry":UO(g,n,t);break}}}}function UO(e,t,r){let n=parseInt(e,10);Number.isNaN(n)||r(t.retry=n)}function QO(e,t){let r=new Uint8Array(e.length+t.length);return r.set(e),r.set(t,e.length),r}function DA(){return{data:"",event:"",id:"",retry:void 0}}var dh="text/event-stream",BO=1e3,VA="last-event-id";function LA(){return typeof window<"u"}function Wu(e,{signal:t,headers:r,onopen:n,onmessage:o,onclose:a,onerror:i,openWhenHidden:p,fetch:f,...m}){return new Promise((g,A)=>{let x={...r};x.accept||(x.accept=dh);let h;function y(){h?.abort(),document.hidden||k()}!p&&LA()&&document.addEventListener("visibilitychange",y);let b=BO,w;function I(){LA()&&document.removeEventListener("visibilitychange",y),clearTimeout(w),h?.abort()}t?.addEventListener("abort",()=>{I(),g()});let F=f??v,E=n??GO;function k(){return _k2.apply(this,arguments)}function _k2(){_k2=_asyncToGenerator(function*(){h=s.AbortController?new s.AbortController:null;try{let T=yield F(e,{...m,headers:x,signal:h?.signal});yield E(T),yield qA(T.body,MA(jA(q=>{q?x[VA]=q:delete x[VA]},q=>{b=q},o))),a?.(),I(),g()}catch(T){if(!h?.signal?.aborted)try{let q=i?.(T)??b;clearTimeout(w),w=setTimeout(k,q)}catch(q){I(),A(q)}}});return _k2.apply(this,arguments)}k()})}function GO(e){let t=e.headers.get("content-type");if(!t?.startsWith(dh))throw new Error(`Expected content-type to be ${dh}, Actual: ${t}`)}d();c();l();u();var Hn=class{constructor(t){le(this,"_basePath");le(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 $O=(e,t,r)=>new Hn(`${e}/rest/organizations/${t}/machinelearning/streaming/${r}`).href,UA=3,HO=5e3,zO="text/event-stream",mh=1,ph=class extends Error{},ic=class extends Error{constructor(r){super(r.message);le(this,"payload",r)}},fh=class{constructor(){le(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)}},Yu=class{constructor(t){le(this,"logger");this.logger=t.logger}streamGeneratedAnswer(t,r){let{url:n,organizationId:o,streamId:a,accessToken:i}=t,{write:p,abort:f,close:m,resetAnswer:g}=r,A=new fh;if(!a){this.logger.error("No stream ID found");return}let x=0,h,y=()=>{h&&!A.isActive(h)&&(w?.abort(),g(),I())},b=()=>{A.remove(h),h=uA(y,h,HO),A.add(h)},w=new s.AbortController,I=()=>Wu($O(n,o,a),{method:"GET",fetch:v,headers:{Authorization:`Bearer ${i}`,accept:"*/*"},openWhenHidden:!0,signal:w?.signal,onopen(F){return _asyncToGenerator(function*(){if(F.ok&&F.headers.get("content-type")===zO)return;throw F.status>=400&&F.status<500&&F.status!==429?new ic({message:"Error opening stream",code:F.status}):new ph})()},onmessage:F=>{if(w?.signal.aborted)return;let E=JSON.parse(F.data);if(E.finishReason==="ERROR"){A.remove(h),w?.abort(),f({message:E.errorMessage,code:E.statusCode});return}p(E),x=0,E.finishReason==="COMPLETED"?(A.remove(h),m()):b()},onerror:F=>{if(!w?.signal.aborted){if(A.remove(h),F instanceof ic)throw w?.abort(),f(F),F;if(++x>UA){this.logger.info("Maximum retry exceeded.");let E={message:"Failed to complete stream.",code:mh};throw w?.abort(),f(E),new ic(E)}this.logger.info(`Retrying...(${x}/${UA})`),g()}}});return I(),w}};d();c();l();u();var Ku=e=>e;d();c();l();u();d();c();l();u();d();c();l();u();function sc(e){let{url:t,accessToken:r,organizationId:n,authentication:o,...a}=e;return a}var gh=e=>{let{response:t}=e;return t.body?WO(e):YO(t)},WO=e=>XO(e)?ZO(e):KO(e)?e.body:{message:"unknown",statusCode:0,type:"unknown"},YO=e=>{let t=JSON.parse(JSON.stringify(e,Object.getOwnPropertyNames(e)));return{...t,message:`Client side error: ${t.message||""}`,statusCode:400,type:"ClientError"}};function KO(e){return e.body.statusCode!==void 0}function XO(e){return e.body.exception!==void 0}var ZO=e=>({message:e.body.exception.code,statusCode:e.response.status,type:e.body.exception.code});d();c();l();u();function QA(e){return((e.headers.get("content-type")||"").split(";").find(n=>n.indexOf("charset=")!==-1)||"").split("=")[1]||"UTF-8"}d();c();l();u();var hh=(e,t,r,n)=>{let o=new Hn(`${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 BA=(e,t)=>{let r=new Hn(`${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},yh=/*#__PURE__*/function(){var _ref3=_asyncToGenerator(function*(e,t){let r=yield Lr.call({...hh(e,"POST","application/x-www-form-urlencoded","/html"),requestParams:sc(e),requestMetadata:{method:"html"},...t});if(r instanceof Error)throw r;let n=QA(r),o=yield r.arrayBuffer(),i=new TextDecoder(n).decode(o);return JO(i)?{success:i}:{error:gh({response:r,body:i})}});return function yh(_x5,_x6){return _ref3.apply(this,arguments)}}();function JO(e){return typeof e=="string"}d();c();l();u();d();c();l();u();function Xa(){return{answerSnippet:"",documentId:{contentIdKey:"",contentIdValue:""},question:"",relatedQuestions:[],score:0}}function Ct(){return{response:{results:[],searchUid:"",totalCountFiltered:0,facets:[],generateAutomaticFacets:{facets:[]},queryCorrections:[],triggers:[],questionAnswer:Xa(),pipeline:"",splitTestRun:"",termsToHighlight:{},phrasesToHighlight:{},extendedResults:{}},duration:0,queryExecuted:"",error:null,automaticallyCorrected:!1,isLoading:!1,results:[],searchResponseId:"",requestId:"",questionAnswer:Xa(),extendedResults:{},searchAction:void 0}}d();c();l();u();d();c();l();u();function e_(e){return{statusCode:e.statusCode,type:e.name,message:e.message}}function t_(e){return{statusCode:e.code,type:e.name,message:e.message,ignored:!0}}function Za(e,t){if(t&&e.name==="AbortError")return{error:t_(e)};if(e instanceof Mo)return{error:e_(e)};throw e}var zn=e=>e.success!==void 0,ze=e=>e.error!==void 0;function GA(e){return e.results!==void 0}function $A(e){let t=Xa();return J(e.questionAnswer)?(e.questionAnswer=t,e):(e.questionAnswer={...t,...e.questionAnswer},e)}d();c();l();u();d();c();l();u();var Sh=(e,t)=>`${e.url}/rest/organizations/${e.organizationId}/insight/v1/configs/${e.insightId}${t??""}`,r_=e=>`${e.url}/rest/organizations/${e.organizationId}/machinelearning/user/actions`,cc=(e,t,r,n)=>{n_(e);let o=Sh(e,n);return{accessToken:e.accessToken,method:t,contentType:r,url:o,origin:"insightApiFetch"}},HA=(e,t,r)=>{o_(e);let n=r_(e);return{accessToken:e.accessToken,method:t,contentType:r,url:n,origin:"insightApiFetch"}},vh=e=>{let{insightId:t,...r}=sc(e);return r},zA=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.")},n_=e=>{if(zA(e),!e.insightId)throw new Error("The 'insightId' attribute must contain a valid Insight Panel configuration ID.")},o_=e=>{if(zA(e),!e.userId)throw new Error("The 'userId' attribute must contain a valid user ID.")};var WA=e=>({...cc(e,"GET","application/json","/interface"),requestParams:{}});d();c();l();u();var YA=e=>({...cc(e,"POST","application/json","/search"),requestParams:vh(e)}),KA=e=>({...cc(e,"POST","application/json","/querysuggest"),requestParams:vh(e)});d();c();l();u();var XA=e=>({...HA(e,"POST","application/json"),requestParams:{objectId:e.userId}});var Xu=class{constructor(t){le(this,"options",t)}getInterface(t){var _this=this;return _asyncToGenerator(function*(){let r=yield Lr.call({...WA(t),..._this.options});if(r instanceof Error)return Za(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 Lr.call({...YA(t),requestMetadata:{method:"search",origin:r?.origin},..._this2.options});if(n instanceof Error)return Za(n);let o=yield n.json();return GA(o)&&(o=$A(o)),n.ok?{success:o}:{error:o}})()}querySuggest(t){var _this3=this;return _asyncToGenerator(function*(){let r=yield Lr.call({...KA(t),..._this3.options});if(r instanceof Error)return Za(r);let n=yield r.json();return n.completions?{success:n}:{error:n}})()}userActions(t){var _this4=this;return _asyncToGenerator(function*(){let r=yield Lr.call({...XA(t),..._this4.options});if(r instanceof Error)return Za(r);let n=yield r.json();return r.ok?{success:n}:{error:n}})()}html(t){var _this5=this;return _asyncToGenerator(function*(){return yh(t,{..._this5.options})})()}};d();c();l();u();d();c();l();u();var H=new $({required:!0,emptyAllowed:!1}),We=new $({required:!1,emptyAllowed:!1}),Ke=new $({required:!0,emptyAllowed:!0}),lW=new $({required:!1,emptyAllowed:!0}),Zu=new oe({each:H,required:!0}),ZA=new $({required:!1,emptyAllowed:!1,regex:/^\d+\.\d+\.\d+$/}),JA=new $({required:!1,emptyAllowed:!1,regex:/^[a-zA-Z0-9_\-.]{1,100}$/}),dW=new $({required:!0,emptyAllowed:!1,regex:/^[a-zA-Z0-9_\-.]{1,100}$/}),Tr=({message:e,name:t,stack:r})=>({message:e,name:t,stack:r}),mr=(e,t)=>{if("required"in t)return{payload:new Oe({value:t}).validate({value:e}).value};let o=new Y({options:{required:!0},values:t}).validate(e);if(o)throw new Do(o);return{payload:e}},_=(e,t)=>{try{return mr(e,t)}catch(r){return{payload:e,error:Tr(r)}}},gr=(e,t,r,n)=>{let o=`Check the initialState of ${n}`;return eC(e,t,r,o,"Controller initialization error")},ht=(e,t,r,n)=>{let o=`Check the options of ${n}`;return eC(e,t,r,o,"Controller initialization error")},eC=(e,t,r,n,o)=>{try{return t.validate(r,n)}catch(a){throw e.logger.error(a,o),a}};d();c();l();u();d();c();l();u();d();c();l();u();function Et(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 a_=typeof Symbol=="function"&&Symbol.observable||"@@observable",tC=a_,Ah=()=>Math.random().toString(36).substring(7).split("").join("."),i_={INIT:`@@redux/INIT${Ah()}`,REPLACE:`@@redux/REPLACE${Ah()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Ah()}`},Ju=i_;function Ur(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 Ch(e,t,r){if(typeof e!="function")throw new Error(Et(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(Et(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(Et(1));return r(Ch)(e,t)}let n=e,o=t,a=new Map,i=a,p=0,f=!1;function m(){i===a&&(i=new Map,a.forEach((w,I)=>{i.set(I,w)}))}function g(){if(f)throw new Error(Et(3));return o}function A(w){if(typeof w!="function")throw new Error(Et(4));if(f)throw new Error(Et(5));let I=!0;m();let F=p++;return i.set(F,w),function(){if(I){if(f)throw new Error(Et(6));I=!1,m(),i.delete(F),a=null}}}function x(w){if(!Ur(w))throw new Error(Et(7));if(typeof w.type>"u")throw new Error(Et(8));if(typeof w.type!="string")throw new Error(Et(17));if(f)throw new Error(Et(9));try{f=!0,o=n(o,w)}finally{f=!1}return(a=i).forEach(F=>{F()}),w}function h(w){if(typeof w!="function")throw new Error(Et(10));n=w,x({type:Ju.REPLACE})}function y(){let w=A;return{subscribe(I){if(typeof I!="object"||I===null)throw new Error(Et(11));function F(){let k=I;k.next&&k.next(g())}return F(),{unsubscribe:w(F)}},[tC](){return this}}}return x({type:Ju.INIT}),{dispatch:x,subscribe:A,getState:g,replaceReducer:h,[tC]:y}}function s_(e){Object.keys(e).forEach(t=>{let r=e[t];if(typeof r(void 0,{type:Ju.INIT})>"u")throw new Error(Et(12));if(typeof r(void 0,{type:Ju.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Et(13))})}function Ja(e){let t=Object.keys(e),r={};for(let i=0;i<t.length;i++){let p=t[i];typeof e[p]=="function"&&(r[p]=e[p])}let n=Object.keys(r),o,a;try{s_(r)}catch(i){a=i}return function(p={},f){if(a)throw a;let m=!1,g={};for(let A=0;A<n.length;A++){let x=n[A],h=r[x],y=p[x],b=h(y,f);if(typeof b>"u"){let w=f&&f.type;throw new Error(Et(14))}g[x]=b,m=m||b!==y}return m=m||n.length!==Object.keys(p).length,m?g:p}}function uc(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function rC(...e){return t=>(r,n)=>{let o=t(r,n),a=()=>{throw new Error(Et(15))},i={getState:o.getState,dispatch:(f,...m)=>a(f,...m)},p=e.map(f=>f(i));return a=uc(...p)(o.dispatch),{...o,dispatch:a}}}function lc(e){return Ur(e)&&"type"in e&&typeof e.type=="string"}d();c();l();u();var Ph=Symbol.for("immer-nothing"),dc=Symbol.for("immer-draftable"),St=Symbol.for("immer-state");function Ft(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var sr=Object,Vo=sr.getPrototypeOf,pc="constructor",yc="prototype",wh="configurable",nl="enumerable",tl="writable",fc="value",Ht=e=>!!e&&!!e[St];function Mt(e){return e?lC(e)||vc(e)||!!e[dc]||!!e[pc]?.[dc]||Ac(e)||Cc(e):!1}var c_=sr[yc][pc].toString(),nC=new WeakMap;function lC(e){if(!e||!ti(e))return!1;let t=Vo(e);if(t===null||t===sr[yc])return!0;let r=sr.hasOwnProperty.call(t,pc)&&t[pc];if(r===Object)return!0;if(!jo(r))return!1;let n=nC.get(r);return n===void 0&&(n=Function.toString.call(r),nC.set(r,n)),n===c_}function dC(e){return Ht(e)||Ft(15,e),e[St].base_}function Sc(e,t,r=!0){Lo(e)===0?(r?Reflect.ownKeys(e):sr.keys(e)).forEach(o=>{t(o,e[o],e)}):e.forEach((n,o)=>t(o,n,e))}function Lo(e){let t=e[St];return t?t.type_:vc(e)?1:Ac(e)?2:Cc(e)?3:0}var ei=(e,t,r=Lo(e))=>r===2?e.has(t):sr[yc].hasOwnProperty.call(e,t),In=(e,t,r=Lo(e))=>r===2?e.get(t):e[t],ol=(e,t,r,n=Lo(e))=>{n===2?e.set(t,r):n===3?e.add(r):e[t]=r};function u_(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var vc=Array.isArray,Ac=e=>e instanceof Map,Cc=e=>e instanceof Set,ti=e=>typeof e=="object",jo=e=>typeof e=="function",bh=e=>typeof e=="boolean";function l_(e){let t=+e;return Number.isInteger(t)&&String(t)===e}var d_=e=>ti(e)?e?.[St]:null,En=e=>e.copy_||e.base_;var kh=e=>e.modified_?e.copy_:e.base_;function Rh(e,t){if(Ac(e))return new Map(e);if(Cc(e))return new Set(e);if(vc(e))return Array[yc].slice.call(e);let r=lC(e);if(t===!0||t==="class_only"&&!r){let n=sr.getOwnPropertyDescriptors(e);delete n[St];let o=Reflect.ownKeys(n);for(let a=0;a<o.length;a++){let i=o[a],p=n[i];p[tl]===!1&&(p[tl]=!0,p[wh]=!0),(p.get||p.set)&&(n[i]={[wh]:!0,[tl]:!0,[nl]:p[nl],[fc]:e[i]})}return sr.create(Vo(e),n)}else{let n=Vo(e);if(n!==null&&r)return{...e};let o=sr.create(n);return sr.assign(o,e)}}function Oh(e,t=!1){return ll(e)||Ht(e)||!Mt(e)||(Lo(e)>1&&sr.defineProperties(e,{set:el,add:el,clear:el,delete:el}),sr.freeze(e),t&&Sc(e,(r,n)=>{Oh(n,!0)},!1)),e}function p_(){Ft(2)}var el={[fc]:p_};function ll(e){return e===null||!ti(e)?!0:sr.isFrozen(e)}var al="MapSet",il="Patches",oC="ArrayMethods",sl={};function Uo(e){let t=sl[e];return t||Ft(0,e),t}var aC=e=>!!sl[e];function f_(e,t){sl[e]||(sl[e]=t)}var mc,pC=()=>mc,m_=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:aC(al)?Uo(al):void 0,arrayMethodsPlugin_:aC(oC)?Uo(oC):void 0});function iC(e,t){t&&(e.patchPlugin_=Uo(il),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Ih(e){Eh(e),e.drafts_.forEach(g_),e.drafts_=null}function Eh(e){e===mc&&(mc=e.parent_)}var sC=e=>mc=m_(mc,e);function g_(e){let t=e[St];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function cC(e,t){t.unfinalizedDrafts_=t.drafts_.length;let r=t.drafts_[0];if(e!==void 0&&e!==r){r[St].modified_&&(Ih(t),Ft(4)),Mt(e)&&(e=uC(t,e));let{patchPlugin_:o}=t;o&&o.generateReplacementPatches_(r[St].base_,e,t)}else e=uC(t,r);return h_(t,e,!0),Ih(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Ph?e:void 0}function uC(e,t){if(ll(t))return t;let r=t[St];if(!r)return cl(t,e.handledSet_,e);if(!dl(r,e))return t;if(!r.modified_)return r.base_;if(!r.finalized_){let{callbacks_:n}=r;if(n)for(;n.length>0;)n.pop()(e);gC(r,e)}return r.copy_}function h_(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Oh(t,r)}function fC(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var dl=(e,t)=>e.scope_===t,y_=[];function mC(e,t,r,n){let o=En(e),a=e.type_;if(n!==void 0&&In(o,n,a)===t){ol(o,n,r,a);return}if(!e.draftLocations_){let p=e.draftLocations_=new Map;Sc(o,(f,m)=>{if(Ht(m)){let g=p.get(m)||[];g.push(f),p.set(m,g)}})}let i=e.draftLocations_.get(t)??y_;for(let p of i)ol(o,p,r,a)}function S_(e,t,r){e.callbacks_.push(function(o){let a=t;if(!a||!dl(a,o))return;o.mapSetPlugin_?.fixSetContents(a);let i=kh(a);mC(e,a.draft_??a,i,r),gC(a,o)})}function gC(e,t){if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){let{patchPlugin_:n}=t;if(n){let o=n.getPath(e);o&&n.generatePatches_(e,o,t)}fC(e)}}function v_(e,t,r){let{scope_:n}=e;if(Ht(r)){let o=r[St];dl(o,n)&&o.callbacks_.push(function(){rl(e);let i=kh(o);mC(e,r,i,t)})}else Mt(r)&&e.callbacks_.push(function(){let a=En(e);e.type_===3?a.has(r)&&cl(r,n.handledSet_,n):In(a,t,e.type_)===r&&n.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&cl(In(e.copy_,t,e.type_),n.handledSet_,n)})}function cl(e,t,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||Ht(e)||t.has(e)||!Mt(e)||ll(e)||(t.add(e),Sc(e,(n,o)=>{if(Ht(o)){let a=o[St];if(dl(a,r)){let i=kh(a);ol(e,n,i,e.type_),fC(a)}}else Mt(o)&&cl(o,t,r)})),e}function A_(e,t){let r=vc(e),n={type_:r?1:0,scope_:t?t.scope_:pC(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},o=n,a=ul;r&&(o=[n],a=gc);let{revoke:i,proxy:p}=Proxy.revocable(o,a);return n.draft_=p,n.revoke_=i,[p,n]}var ul={get(e,t){if(t===St)return e;let r=e.scope_.arrayMethodsPlugin_,n=e.type_===1&&typeof t=="string";if(n&&r?.isArrayOperationMethod(t))return r.createMethodInterceptor(e,t);let o=En(e);if(!ei(o,t,e.type_))return b_(e,o,t);let a=o[t];if(e.finalized_||!Mt(a)||n&&e.operationMethod&&r?.isMutatingArrayMethod(e.operationMethod)&&l_(t))return a;if(a===xh(e.base_,t)||C_(e,t,a)){rl(e);let i=e.type_===1?+t:t,p=Th(e.scope_,a,e,i);return e.copy_[i]=p}return a},has(e,t){return t in En(e)},ownKeys(e){return Reflect.ownKeys(En(e))},set(e,t,r){let n=hC(En(e),t);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){let o=xh(En(e),t),a=o?.[St];if(a&&a.base_===r)return e.copy_[t]=r,e.assigned_.set(t,!1),!0;if(u_(r,o)&&(r!==void 0||ei(e.base_,t,e.type_)))return!0;rl(e),Fh(e)}return e.copy_[t]===r&&(r!==void 0||ei(e.copy_,t,e.type_))||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_.set(t,!0),v_(e,t,r)),!0},deleteProperty(e,t){return rl(e),xh(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),Fh(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let r=En(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{[tl]:!0,[wh]:e.type_!==1||t!=="length",[nl]:n[nl],[fc]:r[t]}},defineProperty(){Ft(11)},getPrototypeOf(e){return Vo(e.base_)},setPrototypeOf(){Ft(12)}},gc={};for(let e in ul){let t=ul[e];gc[e]=function(){let r=arguments;return r[0]=r[0][0],t.apply(this,r)}}gc.deleteProperty=function(e,t){return gc.set.call(this,e,t,void 0)};gc.set=function(e,t,r){return ul.set.call(this,e[0],t,r,e[0])};function xh(e,t){let r=e[St];return(r?En(r):e)[t]}function C_(e,t,r){return e.type_!==1||!e.allIndicesReassigned_||e.assigned_?.get(t)||!Mt(r)||r[St]?!1:e.baseRefs_.has(r)}function b_(e,t,r){let n=hC(t,r);return n?fc in n?n[fc]:n.get?.call(e.draft_):void 0}function hC(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 Fh(e){e.modified_||(e.modified_=!0,e.parent_&&Fh(e.parent_))}function rl(e){e.copy_||(e.assigned_=new Map,e.copy_=Rh(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var x_=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(t,r,n)=>{if(jo(t)&&!jo(r)){let a=r;r=t;let i=this;return function(f=a,...m){return i.produce(f,g=>r.call(this,g,...m))}}jo(r)||Ft(6),n!==void 0&&!jo(n)&&Ft(7);let o;if(Mt(t)){let a=sC(this),i=Th(a,t,void 0),p=!0;try{o=r(i),p=!1}finally{p?Ih(a):Eh(a)}return iC(a,n),cC(o,a)}else if(!t||!ti(t)){if(o=r(t),o===void 0&&(o=t),o===Ph&&(o=void 0),this.autoFreeze_&&Oh(o,!0),n){let a=[],i=[];Uo(il).generateReplacementPatches_(t,o,{patches_:a,inversePatches_:i}),n(a,i)}return o}else Ft(1,t)},this.produceWithPatches=(t,r)=>{if(jo(t))return(i,...p)=>this.produceWithPatches(i,f=>t(f,...p));let n,o;return[this.produce(t,r,(i,p)=>{n=i,o=p}),n,o]},bh(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),bh(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),bh(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){Mt(e)||Ft(8),Ht(e)&&(e=pl(e));let t=sC(this),r=Th(t,e,void 0);return r[St].isManual_=!0,Eh(t),r}finishDraft(e,t){let r=e&&e[St];(!r||!r.isManual_)&&Ft(9);let{scope_:n}=r;return iC(n,t),cC(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=Uo(il).applyPatches_;return Ht(e)?n(e,t):this.produce(e,o=>n(o,t))}};function Th(e,t,r,n){let[o,a]=Ac(t)?Uo(al).proxyMap_(t,r):Cc(t)?Uo(al).proxySet_(t,r):A_(t,r);return(r?.scope_??pC()).drafts_.push(o),a.callbacks_=r?.callbacks_??[],a.key_=n,r&&n!==void 0?S_(r,a,n):a.callbacks_.push(function(f){f.mapSetPlugin_?.fixSetContents(a);let{patchPlugin_:m}=f;a.modified_&&m&&m.generatePatches_(a,[],f)}),o}function pl(e){return Ht(e)||Ft(10,e),yC(e)}function yC(e){if(!Mt(e)||ll(e))return e;let t=e[St],r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=Rh(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=Rh(e,!0);return Sc(r,(o,a)=>{ol(r,o,yC(a))},n),t&&(t.finalized_=!1),r}function SC(){function t(y,b=[]){if(y.key_!==void 0){let w=y.parent_.copy_??y.parent_.base_,I=d_(In(w,y.key_)),F=In(w,y.key_);if(F===void 0||F!==y.draft_&&F!==y.base_&&F!==y.copy_||I!=null&&I.base_!==y.base_)return null;let E=y.parent_.type_===3,k;if(E){let T=y.parent_;k=Array.from(T.drafts_.keys()).indexOf(y.key_)}else k=y.key_;if(!(E&&w.size>k||ei(w,k)))return null;b.push(k)}if(y.parent_)return t(y.parent_,b);b.reverse();try{r(y.copy_,b)}catch{return null}return b}function r(y,b){let w=y;for(let I=0;I<b.length-1;I++){let F=b[I];if(w=In(w,F),!ti(w)||w===null)throw new Error(`Cannot resolve path at '${b.join("/")}'`)}return w}let n="replace",o="add",a="remove";function i(y,b,w){if(y.scope_.processedForPatches_.has(y))return;y.scope_.processedForPatches_.add(y);let{patches_:I,inversePatches_:F}=w;switch(y.type_){case 0:case 2:return f(y,b,I,F);case 1:return p(y,b,I,F);case 3:return m(y,b,I,F)}}function p(y,b,w,I){let{base_:F,assigned_:E}=y,k=y.copy_;k.length<F.length&&([F,k]=[k,F],[w,I]=[I,w]);let T=y.allIndicesReassigned_===!0;for(let q=0;q<F.length;q++){let G=k[q],Q=F[q];if((T||E?.get(q.toString()))&&G!==Q){let B=G?.[St];if(B&&B.modified_)continue;let L=b.concat([q]);w.push({op:n,path:L,value:h(G)}),I.push({op:n,path:L,value:h(Q)})}}for(let q=F.length;q<k.length;q++){let G=b.concat([q]);w.push({op:o,path:G,value:h(k[q])})}for(let q=k.length-1;F.length<=q;--q){let G=b.concat([q]);I.push({op:a,path:G})}}function f(y,b,w,I){let{base_:F,copy_:E,type_:k}=y;Sc(y.assigned_,(T,q)=>{let G=In(F,T,k),Q=In(E,T,k),V=q?ei(F,T)?n:o:a;if(G===Q&&V===n)return;let B=b.concat(T);w.push(V===a?{op:V,path:B}:{op:V,path:B,value:h(Q)}),I.push(V===o?{op:a,path:B}:V===a?{op:o,path:B,value:h(G)}:{op:n,path:B,value:h(G)})})}function m(y,b,w,I){let{base_:F,copy_:E}=y,k=0;F.forEach(T=>{if(!E.has(T)){let q=b.concat([k]);w.push({op:a,path:q,value:T}),I.unshift({op:o,path:q,value:T})}k++}),k=0,E.forEach(T=>{if(!F.has(T)){let q=b.concat([k]);w.push({op:o,path:q,value:T}),I.unshift({op:a,path:q,value:T})}k++})}function g(y,b,w){let{patches_:I,inversePatches_:F}=w;I.push({op:n,path:[],value:b===Ph?void 0:b}),F.push({op:n,path:[],value:y})}function A(y,b){return b.forEach(w=>{let{path:I,op:F}=w,E=y;for(let G=0;G<I.length-1;G++){let Q=Lo(E),V=I[G];typeof V!="string"&&typeof V!="number"&&(V=""+V),(Q===0||Q===1)&&(V==="__proto__"||V===pc)&&Ft(19),jo(E)&&V===yc&&Ft(19),E=In(E,V),(E===null||!ti(E))&&Ft(18,I.join("/"))}let k=Lo(E),T=x(w.value),q=I[I.length-1];switch(F){case n:switch(k){case 2:return E.set(q,T);case 3:Ft(16);default:return E[q]=T}case o:switch(k){case 1:return q==="-"?E.push(T):E.splice(q,0,T);case 2:return E.set(q,T);case 3:return E.add(T);default:return E[q]=T}case a:switch(k){case 1:return E.splice(q,1);case 2:return E.delete(q);case 3:return E.delete(w.value);default:return delete E[q]}default:Ft(17,F)}}),y}function x(y){if(!Mt(y))return y;if(vc(y))return y.map(x);if(Ac(y))return new Map(Array.from(y.entries()).map(([w,I])=>[w,x(I)]));if(Cc(y))return new Set(Array.from(y).map(x));let b=Object.create(Vo(y));for(let w in y)b[w]=x(y[w]);return ei(y,dc)&&(b[dc]=y[dc]),b}function h(y){return Ht(y)?x(y):y}f_(il,{applyPatches_:A,generatePatches_:i,generateReplacementPatches_:g,getPath:t})}var hc=new x_,Qo=hc.produce,_h=hc.produceWithPatches.bind(hc);var Nh=hc.applyPatches.bind(hc);d();c();l();u();function w_(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function R_(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 vC=e=>Array.isArray(e)?e:[e];function I_(e){let t=Array.isArray(e[0])?e[0]:e;return R_(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function E_(e,t){let r=[],{length:n}=e;for(let o=0;o<n;o++)r.push(e[o].apply(null,t));return r}var F_=class{constructor(e){this.value=e}deref(){return this.value}},T_=()=>typeof WeakRef>"u"?F_:WeakRef,CC=T_(),P_=0,AC=1;function fl(){return{s:P_,v:void 0,o:null,p:null}}function k_(e){return e instanceof CC?e.deref():e}function bc(e,t={}){let r=fl(),{resultEqualityCheck:n}=t,o,a=0;function i(){let p=r,{length:f}=arguments;for(let A=0,x=f;A<x;A++){let h=arguments[A];if(typeof h=="function"||typeof h=="object"&&h!==null){let y=p.o;y===null&&(p.o=y=new WeakMap);let b=y.get(h);b===void 0?(p=fl(),y.set(h,p)):p=b}else{let y=p.p;y===null&&(p.p=y=new Map);let b=y.get(h);b===void 0?(p=fl(),y.set(h,p)):p=b}}let m=p,g;if(p.s===AC)g=p.v;else if(g=e.apply(null,arguments),a++,n){let A=k_(o);A!=null&&n(A,g)&&(g=A,a!==0&&a--),o=typeof g=="object"&&g!==null||typeof g=="function"?new CC(g):g}return m.s=AC,m.v=g,g}return i.clearCache=()=>{r=fl(),i.resetResultsCount()},i.resultsCount=()=>a,i.resetResultsCount=()=>{a=0},i}function O_(e,...t){let r=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,n=(...o)=>{let a=0,i=0,p,f={},m=o.pop();typeof m=="object"&&(f=m,m=o.pop()),w_(m,`createSelector expects an output function after the inputs, but received: [${typeof m}]`);let g={...r,...f},{memoize:A,memoizeOptions:x=[],argsMemoize:h=bc,argsMemoizeOptions:y=[]}=g,b=vC(x),w=vC(y),I=I_(o),F=A(function(){return a++,m.apply(null,arguments)},...b),E=!0,k=h(function(){i++;let q=E_(I,arguments);return p=F.apply(null,q),p},...w);return Object.assign(k,{resultFunc:m,memoizedResultFunc:F,dependencies:I,dependencyRecomputations:()=>i,resetDependencyRecomputations:()=>{i=0},lastResult:()=>p,recomputations:()=>a,resetRecomputations:()=>{a=0},memoize:A,argsMemoize:h})};return Object.assign(n,{withTypes:()=>n}),n}var ct=O_(bc);d();c();l();u();function bC(e){return({dispatch:r,getState:n})=>o=>a=>typeof a=="function"?a(r,n,e):o(a)}var xC=bC(),wC=bC;var __=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?uc:uc.apply(null,arguments)},$W=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}},N_=e=>e&&typeof e.match=="function";function P(e,t){function r(...n){if(t){let o=t(...n);if(!o)throw new Error(zt(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=>lc(n)&&n.type===e,r}var OC=class xc extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,xc.prototype)}static get[Symbol.species](){return xc}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new xc(...t[0].concat(this)):new xc(...t.concat(this))}};function RC(e){return Mt(e)?Qo(e,()=>{}):e}function ml(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function D_(e){return typeof e=="boolean"}var q_=()=>function(t){let{thunk:r=!0,immutableCheck:n=!0,serializableCheck:o=!0,actionCreatorCheck:a=!0}=t??{},i=new OC;return r&&(D_(r)?i.push(xC):i.push(wC(r.extraArgument))),i},wc="RTK_autoBatch",oi=()=>e=>({payload:e,meta:{[wc]:!0}}),IC=e=>t=>{setTimeout(t,e)},M_=(e,t)=>r=>{let n=!1,o=()=>{n||(n=!0,cancelAnimationFrame(a),clearTimeout(i),r())},a=e(o),i=setTimeout(o,t)},j_=(e={type:"raf"})=>t=>(...r)=>{let n=t(...r),o=!0,a=!1,i=!1,p=new Set,f=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?M_(window.requestAnimationFrame,100):IC(10):e.type==="callback"?e.queueNotification:IC(e.timeout),m=()=>{i=!1,a&&(a=!1,p.forEach(g=>g()))};return Object.assign({},n,{subscribe(g){let A=()=>o&&g(),x=n.subscribe(A);return p.add(g),()=>{x(),p.delete(g)}},dispatch(g){try{return o=!g?.meta?.[wc],a=!o,a&&(i||(i=!0,f(m))),n.dispatch(g)}finally{o=!0}}})},V_=e=>function(r){let{autoBatch:n=!0}=r??{},o=new OC(e);return n&&o.push(j_(typeof n=="object"?n:void 0)),o};function _C(e){let t=q_(),{reducer:r=void 0,middleware:n,devTools:o=!0,duplicateMiddlewareCheck:a=!0,preloadedState:i=void 0,enhancers:p=void 0}=e||{},f;if(typeof r=="function")f=r;else if(Ur(r))f=Ja(r);else throw new Error(zt(1));let m;typeof n=="function"?m=n(t):m=t();let g=uc;o&&(g=__({trace:!1,...(typeof o=="object"&&o)}));let A=rC(...m),x=V_(A),h=typeof p=="function"?p(x):x(),y=g(...h);return Ch(f,i,y)}function NC(e){let t={},r=[],n,o={addCase(a,i){let p=typeof a=="string"?a:a.type;if(!p)throw new Error(zt(28));if(p in t)throw new Error(zt(29));return t[p]=i,o},addAsyncThunk(a,i){return i.pending&&(t[a.pending.type]=i.pending),i.rejected&&(t[a.rejected.type]=i.rejected),i.fulfilled&&(t[a.fulfilled.type]=i.fulfilled),i.settled&&r.push({matcher:a.settled,reducer:i.settled}),o},addMatcher(a,i){return r.push({matcher:a,reducer:i}),o},addDefaultCase(a){return n=a,o}};return e(o),[t,r,n]}function L_(e){return typeof e=="function"}function fe(e,t){let[r,n,o]=NC(t),a;if(L_(e))a=()=>RC(e());else{let p=RC(e);a=()=>p}function i(p=a(),f){let m=[r[f.type],...n.filter(({matcher:g})=>g(f)).map(({reducer:g})=>g)];return m.filter(g=>!!g).length===0&&(m=[o]),m.reduce((g,A)=>{if(A)if(Ht(g)){let h=A(g,f);return h===void 0?g:h}else{if(Mt(g))return Qo(g,x=>A(x,f));{let x=A(g,f);if(x===void 0){if(g===null)return g;throw Error("A case reducer on a non-draftable value must not return undefined")}return x}}return g},p)}return i.getInitialState=a,i}var DC=(e,t)=>N_(e)?e.match(t):e(t);function Qr(...e){return t=>e.some(r=>DC(r,t))}function ni(...e){return t=>e.every(r=>DC(r,t))}function Sl(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 Rc(e){return typeof e[0]=="function"&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function vl(...e){return e.length===0?t=>Sl(t,["pending"]):Rc(e)?Qr(...e.map(t=>t.pending)):vl()(e[0])}function Go(...e){return e.length===0?t=>Sl(t,["rejected"]):Rc(e)?Qr(...e.map(t=>t.rejected)):Go()(e[0])}function Ic(...e){let t=r=>r&&r.meta&&r.meta.rejectedWithValue;return e.length===0?ni(Go(...e),t):Rc(e)?ni(Go(...e),t):Ic()(e[0])}function Fn(...e){return e.length===0?t=>Sl(t,["fulfilled"]):Rc(e)?Qr(...e.map(t=>t.fulfilled)):Fn()(e[0])}function Al(...e){return e.length===0?t=>Sl(t,["pending","fulfilled","rejected"]):Rc(e)?Qr(...e.flatMap(t=>[t.pending,t.rejected,t.fulfilled])):Al()(e[0])}var U_="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Ec=(e=21)=>{let t="",r=e;for(;r--;)t+=U_[Math.random()*64|0];return t},Q_=["name","message","stack","code"],Dh=class{constructor(e,t){le(this,"payload");le(this,"meta");le(this,"_type");this.payload=e,this.meta=t}},EC=class{constructor(e,t){le(this,"payload");le(this,"meta");le(this,"_type");this.payload=e,this.meta=t}},B_=e=>{if(typeof e=="object"&&e!==null){let t={};for(let r of Q_)typeof e[r]=="string"&&(t[r]=e[r]);return t}return{message:String(e)}},FC="External signal was aborted",me=(()=>{function e(t,r,n){let o=P(t+"/fulfilled",(f,m,g,A)=>({payload:f,meta:{...(A||{}),arg:g,requestId:m,requestStatus:"fulfilled"}})),a=P(t+"/pending",(f,m,g)=>({payload:void 0,meta:{...(g||{}),arg:m,requestId:f,requestStatus:"pending"}})),i=P(t+"/rejected",(f,m,g,A,x)=>({payload:A,error:(n&&n.serializeError||B_)(f||"Rejected"),meta:{...(x||{}),arg:g,requestId:m,rejectedWithValue:!!A,requestStatus:"rejected",aborted:f?.name==="AbortError",condition:f?.name==="ConditionError"}}));function p(f,{signal:m}={}){return(g,A,x)=>{let h=n?.idGenerator?n.idGenerator(f):Ec(),y=new s.AbortController,b,w;function I(E){w=E,y.abort()}m&&(m.aborted?I(FC):m.addEventListener("abort",()=>I(FC),{once:!0}));let F=_asyncToGenerator(function*(){let E;try{let T=n?.condition?.(f,{getState:A,extra:x});if($_(T)&&(T=yield T),T===!1||y.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let q=new Promise((G,Q)=>{b=()=>{Q({name:"AbortError",message:w||"Aborted"})},y.signal.addEventListener("abort",b,{once:!0})});g(a(h,f,n?.getPendingMeta?.({requestId:h,arg:f},{getState:A,extra:x}))),E=yield Promise.race([q,Promise.resolve(r(f,{dispatch:g,getState:A,extra:x,requestId:h,signal:y.signal,abort:I,rejectWithValue:(G,Q)=>new Dh(G,Q),fulfillWithValue:(G,Q)=>new EC(G,Q)})).then(G=>{if(G instanceof Dh)throw G;return G instanceof EC?o(G.payload,h,f,G.meta):o(G,h,f)})])}catch(T){E=T instanceof Dh?i(null,h,f,T.payload,T.meta):i(T,h,f)}finally{b&&y.signal.removeEventListener("abort",b)}return n&&!n.dispatchConditionRejection&&i.match(E)&&E.meta.condition||g(E),E})();return Object.assign(F,{abort:I,requestId:h,arg:f,unwrap(){return F.then(G_)}})}}return Object.assign(p,{pending:a,rejected:i,fulfilled:o,settled:Qr(i,o),typePrefix:t})}return e.withTypes=()=>e,e})();function G_(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function $_(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var qC=Symbol.for("rtk-slice-createasyncthunk"),zW={[qC]:me};function H_(e,t){return`${e}/${t}`}function z_({creators:e}={}){let t=e?.asyncThunk?.[qC];return function(n){let{name:o,reducerPath:a=o}=n;if(!o)throw new Error(zt(11));typeof process<"u";let i=(typeof n.reducers=="function"?n.reducers(Y_()):n.reducers)||{},p=Object.keys(i),f={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},m={addCase(E,k){let T=typeof E=="string"?E:E.type;if(!T)throw new Error(zt(12));if(T in f.sliceCaseReducersByType)throw new Error(zt(13));return f.sliceCaseReducersByType[T]=k,m},addMatcher(E,k){return f.sliceMatchers.push({matcher:E,reducer:k}),m},exposeAction(E,k){return f.actionCreators[E]=k,m},exposeCaseReducer(E,k){return f.sliceCaseReducersByName[E]=k,m}};p.forEach(E=>{let k=i[E],T={reducerName:E,type:H_(o,E),createNotation:typeof n.reducers=="function"};X_(k)?J_(T,k,m,t):K_(T,k,m)});function g(){let[E={},k=[],T=void 0]=typeof n.extraReducers=="function"?NC(n.extraReducers):[n.extraReducers],q={...E,...f.sliceCaseReducersByType};return fe(n.initialState,G=>{for(let Q in q)G.addCase(Q,q[Q]);for(let Q of f.sliceMatchers)G.addMatcher(Q.matcher,Q.reducer);for(let Q of k)G.addMatcher(Q.matcher,Q.reducer);T&&G.addDefaultCase(T)})}let A=E=>E,x=new Map,h=new WeakMap,y;function b(E,k){return y||(y=g()),y(E,k)}function w(){return y||(y=g()),y.getInitialState()}function I(E,k=!1){function T(G){let Q=G[E];return typeof Q>"u"&&k&&(Q=ml(h,T,w)),Q}function q(G=A){let Q=ml(x,k,()=>new WeakMap);return ml(Q,G,()=>{let V={};for(let[B,L]of Object.entries(n.selectors??{}))V[B]=W_(L,G,()=>ml(h,G,w),k);return V})}return{reducerPath:E,getSelectors:q,get selectors(){return q(T)},selectSlice:T}}let F={name:o,reducer:b,actions:f.actionCreators,caseReducers:f.sliceCaseReducersByName,getInitialState:w,...I(a),injectInto(E,{reducerPath:k,...T}={}){let q=k??a;return E.inject({reducerPath:q,reducer:b},T),{...F,...I(q,!0)}}};return F}}function W_(e,t,r,n){function o(a,...i){let p=t(a);return typeof p>"u"&&n&&(p=r()),e(p,...i)}return o.unwrapped=e,o}var $o=z_();function Y_(){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 K_({type:e,reducerName:t,createNotation:r},n,o){let a,i;if("reducer"in n){if(r&&!Z_(n))throw new Error(zt(17));a=n.reducer,i=n.prepare}else a=n;o.addCase(e,a).exposeCaseReducer(t,a).exposeAction(t,i?P(e,i):P(e))}function X_(e){return e._reducerDefinitionType==="asyncThunk"}function Z_(e){return e._reducerDefinitionType==="reducerWithPrepare"}function J_({type:e,reducerName:t},r,n,o){if(!o)throw new Error(zt(18));let{payloadCreator:a,fulfilled:i,pending:p,rejected:f,settled:m,options:g}=r,A=o(e,a,g);n.exposeAction(t,A),i&&n.addCase(A.fulfilled,i),p&&n.addCase(A.pending,p),f&&n.addCase(A.rejected,f),m&&n.addMatcher(A.settled,m),n.exposeCaseReducer(t,{fulfilled:i||gl,pending:p||gl,rejected:f||gl,settled:m||gl})}function gl(){}var e0="task",MC="listener",jC="completed",jh="cancelled",t0=`task-${jh}`,r0=`task-${jC}`,qh=`${MC}-${jh}`,n0=`${MC}-${jC}`,Cl=class{constructor(e){le(this,"code");le(this,"name","TaskAbortError");le(this,"message");this.code=e,this.message=`${e0} ${jh} (reason: ${e})`}},Vh=(e,t)=>{if(typeof e!="function")throw new TypeError(zt(32))},hl=()=>{},VC=(e,t=hl)=>(e.catch(t),e),LC=(e,t)=>(e.addEventListener("abort",t,{once:!0}),()=>e.removeEventListener("abort",t)),Bo=e=>{if(e.aborted)throw new Cl(e.reason)};function UC(e,t){let r=hl;return new Promise((n,o)=>{let a=()=>o(new Cl(e.reason));if(e.aborted){a();return}r=LC(e,a),t.finally(()=>r()).then(n,o)}).finally(()=>{r=hl})}var o0=/*#__PURE__*/function(){var _ref5=_asyncToGenerator(function*(e,t){try{return yield Promise.resolve(),{status:"ok",value:yield e()}}catch(r){return{status:r instanceof Cl?"cancelled":"rejected",error:r}}finally{t?.()}});return function o0(_x7,_x8){return _ref5.apply(this,arguments)}}(),yl=e=>t=>VC(UC(e,t).then(r=>(Bo(e),r))),QC=e=>{let t=yl(e);return r=>t(new Promise(n=>setTimeout(n,r)))},{assign:ri}=Object,TC={},bl="listenerMiddleware",a0=(e,t)=>{let r=n=>LC(e,()=>n.abort(e.reason));return(n,o)=>{Vh(n,"taskExecutor");let a=new s.AbortController;r(a);let i=o0(/*#__PURE__*/_asyncToGenerator(function*(){Bo(e),Bo(a.signal);let p=yield n({pause:yl(a.signal),delay:QC(a.signal),signal:a.signal});return Bo(a.signal),p}),()=>a.abort(r0));return o?.autoJoin&&t.push(i.catch(hl)),{result:yl(e)(i),cancel(){a.abort(t0)}}}},i0=(e,t)=>{let r=/*#__PURE__*/function(){var _ref7=_asyncToGenerator(function*(n,o){Bo(t);let a=()=>{},p=[new Promise((f,m)=>{let g=e({predicate:n,effect:(A,x)=>{x.unsubscribe(),f([A,x.getState(),x.getOriginalState()])}});a=()=>{g(),m()}})];o!=null&&p.push(new Promise(f=>setTimeout(f,o,null)));try{let f=yield UC(t,Promise.race(p));return Bo(t),f}finally{a()}});return function r(_x9,_x0){return _ref7.apply(this,arguments)}}();return(n,o)=>VC(r(n,o))},BC=e=>{let{type:t,actionCreator:r,matcher:n,predicate:o,effect:a}=e;if(t)o=P(t).match;else if(r)t=r.type,o=r.match;else if(n)o=n;else if(!o)throw new Error(zt(21));return Vh(a,"options.listener"),{predicate:o,type:t,effect:a}},GC=ri(e=>{let{type:t,predicate:r,effect:n}=BC(e);return{id:Ec(),effect:n,type:t,predicate:r,pending:new Set,unsubscribe:()=>{throw new Error(zt(22))}}},{withTypes:()=>GC}),PC=(e,t)=>{let{type:r,effect:n,predicate:o}=BC(t);return Array.from(e.values()).find(a=>(typeof r=="string"?a.type===r:a.predicate===o)&&a.effect===n)},Mh=e=>{e.pending.forEach(t=>{t.abort(qh)})},s0=(e,t)=>()=>{for(let r of t.keys())Mh(r);e.clear()},kC=(e,t,r)=>{try{e(t,r)}catch(n){setTimeout(()=>{throw n},0)}},$C=ri(P(`${bl}/add`),{withTypes:()=>$C}),c0=P(`${bl}/removeAll`),HC=ri(P(`${bl}/remove`),{withTypes:()=>HC}),u0=(...e)=>{console.error(`${bl}/error`,...e)},zC=(e={})=>{let t=new Map,r=new Map,n=h=>{let y=r.get(h)??0;r.set(h,y+1)},o=h=>{let y=r.get(h)??1;y===1?r.delete(h):r.set(h,y-1)},{extra:a,onError:i=u0}=e;Vh(i,"onError");let p=h=>(h.unsubscribe=()=>t.delete(h.id),t.set(h.id,h),y=>{h.unsubscribe(),y?.cancelActive&&Mh(h)}),f=h=>{let y=PC(t,h)??GC(h);return p(y)};ri(f,{withTypes:()=>f});let m=h=>{let y=PC(t,h);return y&&(y.unsubscribe(),h.cancelActive&&Mh(y)),!!y};ri(m,{withTypes:()=>m});let g=/*#__PURE__*/function(){var _ref8=_asyncToGenerator(function*(h,y,b,w){let I=new s.AbortController,F=i0(f,I.signal),E=[];try{h.pending.add(I),n(h),yield Promise.resolve(h.effect(y,ri({},b,{getOriginalState:w,condition:(k,T)=>F(k,T).then(Boolean),take:F,delay:QC(I.signal),pause:yl(I.signal),extra:a,signal:I.signal,fork:a0(I.signal,E),unsubscribe:h.unsubscribe,subscribe:()=>{t.set(h.id,h)},cancelActiveListeners:()=>{h.pending.forEach((k,T,q)=>{k!==I&&(k.abort(qh),q.delete(k))})},cancel:()=>{I.abort(qh),h.pending.delete(I)},throwIfCancelled:()=>{Bo(I.signal)}})))}catch(k){k instanceof Cl||kC(i,k,{raisedBy:"effect"})}finally{yield Promise.all(E),I.abort(n0),o(h),h.pending.delete(I)}});return function g(_x1,_x10,_x11,_x12){return _ref8.apply(this,arguments)}}(),A=s0(t,r);return{middleware:h=>y=>b=>{if(!lc(b))return y(b);if($C.match(b))return f(b.payload);if(c0.match(b)){A();return}if(HC.match(b))return m(b.payload);let w=h.getState(),I=()=>{if(w===TC)throw new Error(zt(23));return w},F;try{if(F=y(b),t.size>0){let E=h.getState(),k=Array.from(t.values());for(let T of k){let q=!1;try{q=T.predicate(b,E,w)}catch(G){q=!1,kC(i,G,{raisedBy:"predicate"})}q&&g(T,b,h,I)}}}finally{w=TC}return F},startListening:f,stopListening:m,clearListeners:A}};function zt(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}d();c();l();u();d();c();l();u();d();c();l();u();function WC(){let e=typeof window<"u";return{sendMessage(t){e&&window.postMessage(t,"*")}}}d();c();l();u();d();c();l();u();d();c();l();u();var YC=/^(?:[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 l0(e){return typeof e=="string"&&YC.test(e)}var Lh=l0;d();c();l();u();var Tt=[];for(let e=0;e<256;++e)Tt.push((e+256).toString(16).slice(1));function KC(e,t=0){return(Tt[e[t+0]]+Tt[e[t+1]]+Tt[e[t+2]]+Tt[e[t+3]]+"-"+Tt[e[t+4]]+Tt[e[t+5]]+"-"+Tt[e[t+6]]+Tt[e[t+7]]+"-"+Tt[e[t+8]]+Tt[e[t+9]]+"-"+Tt[e[t+10]]+Tt[e[t+11]]+Tt[e[t+12]]+Tt[e[t+13]]+Tt[e[t+14]]+Tt[e[t+15]]).toLowerCase()}d();c();l();u();var d0=new Uint8Array(16);function Uh(){return crypto.getRandomValues(d0)}d();c();l();u();function p0(e,t,r){return!t&&!e&&crypto.randomUUID?crypto.randomUUID():f0(e,t,r)}function f0(e,t,r){e=e||{};let n=e.random??e.rng?.()??Uh();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 KC(n)}var Qh=p0;function m0(_x13){return _m2.apply(this,arguments)}function _m2(){_m2=_asyncToGenerator(function*({config:e,environment:t,event:r,listenerManager:n}){let{url:o,token:a,mode:i}=e;if(i!=="disabled")return n.call(r),t.send(o,a,r)});return _m2.apply(this,arguments)}var rb="2.1.3",Bh=128,nb=192,XC=224,ZC=240,g0=248;function h0(e){return(e&g0)===ZC?4:(e&ZC)===XC?3:(e&XC)===nb?2:1}function y0(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&Bh)!=Bh)break;if(r-=3,(n&nb)!=Bh){t-r>=h0(n)*3&&(r=t);break}}return e.substring(0,r)}function S0(e){let{trackingId:t}=e;return{trackingId:t}}function v0(e){return(e.source||[]).concat([`relay@${rb}`])}function ob(e,t,r){let{getReferrer:n,getLocation:o,getUserAgent:a}=r,i=S0(t),p=r.getClientId();return Object.freeze({type:e,config:i,ts:Date.now(),source:v0(t),clientId:p,userAgent:a(),referrer:JC(n()),location:JC(o())})}function JC(e){return e!==null?y0(e,1024):null}function A0(e,t,r,n){return{...t,meta:ob(e,r,n)}}var C0="*";function b0(){let e=[];function t({type:f,callback:m}){return e.findIndex(g=>g.type===f&&g.callback===m)}function r(f,m){return f.type==="*"||m===f.type}function n(f){return t(f)<0&&e.push(f),()=>p(f.type,f.callback)}function o(f){e.forEach(m=>{if(r(m,f.meta.type))try{m.callback(f)}catch(g){console.error(g)}})}function a(f){if(f===C0)e.length=0;else for(let m=e.length-1;m>=0;m--)e[m].type===f&&e.splice(m,1)}function i(f){let m=t(f);m>=0&&e.splice(m,1)}function p(f,m){m?i({type:f,callback:m}):a(f)}return{add:n,call:o,remove:p}}function eb({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 x0(e){let t=eb(e);return{get:()=>t,update:r=>{t=eb({...t,...r})}}}var Gh=w0();function w0(){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 i=a.replace(/^\s+/,"");if(i.lastIndexOf(n,0)===0)return i.substring(n.length,i.length)}return null},setItem(r,n,o){let a=t(window.location.hostname),i=`;expires=${new Date(new Date().getTime()+o).toUTCString()}`,p=a?`;domain=${a}`:"";document.cookie=`${e}${r}=${n}${i}${p};path=/;SameSite=Lax`},removeItem(r){this.setItem(r,"",-1)}}}function R0(){return{getItem(e){return Gh.getItem(e)||localStorage.getItem(e)},removeItem(e){Gh.removeItem(e),localStorage.removeItem(e)},setItem(e,t){localStorage.setItem(e,t),Gh.setItem(e,t,31556952e3)}}}var tb="visitorId";function I0(){let e=document.referrer;return e===""?null:e}function $h(){let e=R0();return{runtime:"browser",send:function(){var _ref9=_asyncToGenerator(function*(t,r,n){let o=v(t,{method:"POST",body:JSON.stringify([n]),keepalive:!0,headers:{"Content-Type":"application/json",Authorization:`Bearer ${r}`}});WC().sendMessage({kind:"EVENT_PROTOCOL",event:n,url:t,token:r});let i=yield o;if(i?.ok){let p;try{p=yield i.json()}catch{return}for(let f of p.events)if(!f.accepted)throw new Error(`Received event was rejected for processing: ${f.errorMessage}`)}else throw new Error(`Error ${i.status}: Failed to send the event(s).`)});return function send(_x14,_x15,_x16){return _ref9.apply(this,arguments)}}(),getReferrer:()=>I0(),getLocation:()=>window.location.href,getUserAgent:()=>navigator.userAgent,getClientId:()=>{let t=e.getItem(tb);if(t&&Lh(t))return t;let r=Qh();return e.setItem(tb,r),r}}}function E0(){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 F0(){return{runtime:"null",send:()=>Promise.resolve(void 0),getReferrer:()=>null,getLocation:()=>null,getUserAgent:()=>null,getClientId:()=>""}}function T0(e){let t=e.get().mode!=="disabled",r=e.get().environment,n=F0();return t&&r?{...r,runtime:"custom"}:t&&P0()&&E0()?$h():n}function P0(){try{return typeof window=="object"}catch{return!1}}function k0(e){return{get:()=>Object.freeze(T0(e))}}function ab(e){let t=x0(e),r=b0(),n=k0(t);return{emit:function(){var _ref0=_asyncToGenerator(function*(o,a){let i=t.get(),p=n.get(),f=A0(o,a,i,p);return m0({config:i,environment:p,event:f,listenerManager:r})});return function emit(_x17,_x18){return _ref0.apply(this,arguments)}}(),getMeta:o=>ob(o,t.get(),n.get()),on:(o,a)=>r.add({type:o,callback:a}),off:(o,a)=>r.remove(o,a),updateConfig:o=>t.update(o),version:rb}}d();c();l();u();function ib(){return typeof window<"u"&&typeof document<"u"}d();c();l();u();d();c();l();u();var Wn="3.55.1",sb=["@coveo/atomic","@coveo/quantic"];var ai=ct(e=>e.source,e=>Object.entries(e).map(([t,r])=>`${t}@${r}`).concat(`@coveo/headless@${Wn}`));var Fc=ct(e=>e.configuration.organizationId,e=>e.configuration.environment,e=>e.configuration.accessToken,e=>e.configuration.analytics,e=>ai(e.configuration.analytics),(e,t)=>t,(e,t,r,{trackingId:n,apiBaseUrl:o,enabled:a},i,p)=>{let f=_0(p);return ab({mode:a?"emit":"disabled",url:o??Bu(e,t),token:r,trackingId:n??null,source:i,environment:f})}),O0={getClientId:()=>"",getLocation:()=>null,getReferrer:()=>null,getUserAgent:()=>null,send:function(){var _ref1=_asyncToGenerator(function*(){});return function send(){return _ref1.apply(this,arguments)}}()},_0=e=>{if(!e)return;let t=e();return{...(ib()?$h():O0),getClientId:()=>t.clientId,getLocation:()=>t.location,getReferrer:()=>t.referrer,getUserAgent:()=>t.userAgent}};d();c();l();u();d();c();l();u();function Br(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 U(e,t,r,n){function o(a){return a instanceof r?a:new r(function(i){i(a)})}return new(r||(r=Promise))(function(a,i){function p(g){try{m(n.next(g))}catch(A){i(A)}}function f(g){try{m(n.throw(g))}catch(A){i(A)}}function m(g){g.done?a(g.value):o(g.value).then(p,f)}m((n=n.apply(e,t||[])).next())})}var Me;(function(e){e.search="search",e.click="click",e.custom="custom",e.view="view",e.collect="collect"})(Me||(Me={}));function Wh(){return typeof window<"u"}function cy(){return typeof navigator<"u"}function ii(){return typeof document<"u"}function Yh(){try{return typeof localStorage<"u"}catch{return!1}}function N0(){try{return typeof sessionStorage<"u"}catch{return!1}}function vb(){return cy()&&navigator.cookieEnabled}var D0=[Me.click,Me.custom,Me.search,Me.view],q0=(e,t)=>D0.indexOf(e)!==-1?Object.assign({language:ii()?document.documentElement.lang:"unknown",userAgent:cy()?navigator.userAgent:"unknown"},t):t,Pc=class e{static set(t,r,n){var o,a,i,p;n&&(a=new Date,a.setTime(a.getTime()+n)),p=window.location.hostname,p.indexOf(".")===-1?cb(t,r,a):(i=p.split("."),o=i[i.length-2]+"."+i[i.length-1],cb(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 cb(e,t,r,n){document.cookie=`${e}=${t}`+(r?`;expires=${r.toUTCString()}`:"")+(n?`;domain=${n}`:"")+";path=/;SameSite=Lax"+(window.location.protocol==="https:"?";Secure":"")}function M0(){return Yh()?localStorage:vb()?new kc:N0()?sessionStorage:new ci}var kc=class e{getItem(t){return Pc.get(`${e.prefix}${t}`)}removeItem(t){Pc.erase(`${e.prefix}${t}`)}setItem(t,r,n){Pc.set(`${e.prefix}${t}`,r,n)}};kc.prefix="coveo_";var Kh=class{constructor(){this.cookieStorage=new kc}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)}},ci=class{getItem(t){return null}removeItem(t){}setItem(t,r){}},xl="__coveo.analytics.history",j0=20,V0=1e3*60,L0=75,Rl=class{constructor(t){this.store=t||M0()}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 U(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 U(this,void 0,void 0,function*(){let t=yield this.getHistoryWithInternalTimeAsync();return this.stripEmptyQueries(this.stripInternalTime(t))})}getHistoryWithInternalTime(){try{let t=this.store.getItem(xl);return t&&typeof t=="string"?JSON.parse(t):[]}catch{return[]}}getHistoryWithInternalTimeAsync(){return U(this,void 0,void 0,function*(){try{let t=yield this.store.getItem(xl);return t?JSON.parse(t):[]}catch{return[]}})}setHistory(t){try{this.store.setItem(xl,JSON.stringify(t.slice(0,j0)))}catch{}}clear(){try{this.store.removeItem(xl)}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,L0)),t}isValidEntry(t){let r=this.getMostRecentElement();return r&&r.value==t.value?(t.internalTime||0)-(r.internalTime||0)>V0:!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 U0=(e,t)=>U(void 0,void 0,void 0,function*(){return e===Me.view?(yield Q0(t.contentIdValue),Object.assign({location:window.location.toString(),referrer:document.referrer,title:document.title},t)):t}),Q0=e=>U(void 0,void 0,void 0,function*(){let t=new Rl,r={name:"PageView",value:e,time:new Date().toISOString()};yield t.addElementAsync(r)}),B0=/^(?:[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 Il(e){return typeof e=="string"&&B0.test(e)}function ub(e){if(!Il(e))throw TypeError("Invalid UUID");let t;return Uint8Array.of((t=parseInt(e.slice(0,8),16))>>>24,t>>>16&255,t>>>8&255,t&255,(t=parseInt(e.slice(9,13),16))>>>8,t&255,(t=parseInt(e.slice(14,18),16))>>>8,t&255,(t=parseInt(e.slice(19,23),16))>>>8,t&255,(t=parseInt(e.slice(24,36),16))/1099511627776&255,t/4294967296&255,t>>>24&255,t>>>16&255,t>>>8&255,t&255)}var Pt=[];for(let e=0;e<256;++e)Pt.push((e+256).toString(16).slice(1));function Ab(e,t=0){return(Pt[e[t+0]]+Pt[e[t+1]]+Pt[e[t+2]]+Pt[e[t+3]]+"-"+Pt[e[t+4]]+Pt[e[t+5]]+"-"+Pt[e[t+6]]+Pt[e[t+7]]+"-"+Pt[e[t+8]]+Pt[e[t+9]]+"-"+Pt[e[t+10]]+Pt[e[t+11]]+Pt[e[t+12]]+Pt[e[t+13]]+Pt[e[t+14]]+Pt[e[t+15]]).toLowerCase()}var G0=new Uint8Array(16);function $0(){return crypto.getRandomValues(G0)}function H0(e){e=unescape(encodeURIComponent(e));let t=new Uint8Array(e.length);for(let r=0;r<e.length;++r)t[r]=e.charCodeAt(r);return t}var z0="6ba7b810-9dad-11d1-80b4-00c04fd430c8",W0="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function Y0(e,t,r,n,o,a){let i=typeof r=="string"?H0(r):r,p=typeof n=="string"?ub(n):n;if(typeof n=="string"&&(n=ub(n)),n?.length!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let f=new Uint8Array(16+i.length);return f.set(p),f.set(i,p.length),f=t(f),f[6]=f[6]&15|e,f[8]=f[8]&63|128,Ab(f)}function Ho(e,t,r){return!t&&!e&&crypto.randomUUID?crypto.randomUUID():K0(e,t,r)}function K0(e,t,r){e=e||{};let n=e.random??e.rng?.()??$0();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 Ab(n)}function X0(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 Hh(e,t){return e<<t|e>>>32-t}function Z0(e){let t=[1518500249,1859775393,2400959708,3395469782],r=[1732584193,4023233417,2562383102,271733878,3285377520],n=new Uint8Array(e.length+1);n.set(e),n[e.length]=128,e=n;let o=e.length/4+2,a=Math.ceil(o/16),i=new Array(a);for(let p=0;p<a;++p){let f=new Uint32Array(16);for(let m=0;m<16;++m)f[m]=e[p*64+m*4]<<24|e[p*64+m*4+1]<<16|e[p*64+m*4+2]<<8|e[p*64+m*4+3];i[p]=f}i[a-1][14]=(e.length-1)*8/2**32,i[a-1][14]=Math.floor(i[a-1][14]),i[a-1][15]=(e.length-1)*8&4294967295;for(let p=0;p<a;++p){let f=new Uint32Array(80);for(let y=0;y<16;++y)f[y]=i[p][y];for(let y=16;y<80;++y)f[y]=Hh(f[y-3]^f[y-8]^f[y-14]^f[y-16],1);let m=r[0],g=r[1],A=r[2],x=r[3],h=r[4];for(let y=0;y<80;++y){let b=Math.floor(y/20),w=Hh(m,5)+X0(b,g,A,x)+h+t[b]+f[y]>>>0;h=x,x=A,A=Hh(g,30)>>>0,g=m,m=w}r[0]=r[0]+m>>>0,r[1]=r[1]+g>>>0,r[2]=r[2]+A>>>0,r[3]=r[3]+x>>>0,r[4]=r[4]+h>>>0}return Uint8Array.of(r[0]>>24,r[0]>>16,r[0]>>8,r[0],r[1]>>24,r[1]>>16,r[1]>>8,r[1],r[2]>>24,r[2]>>16,r[2]>>8,r[2],r[3]>>24,r[3]>>16,r[3]>>8,r[3],r[4]>>24,r[4]>>16,r[4]>>8,r[4])}function El(e,t,r,n){return Y0(80,Z0,e,t)}El.DNS=z0;El.URL=W0;var Cb="2.33.0",lb=e=>`${e.protocol}//${e.hostname}${e.pathname.indexOf("/")===0?e.pathname:`/${e.pathname}`}${e.search}`,Tc={pageview:"pageview",event:"event"},Fl=class{constructor({client:t,uuidGenerator:r=Ho}){this.client=t,this.uuidGenerator=r}},Xh=class extends Fl{constructor({client:t,uuidGenerator:r=Ho}){super({client:t,uuidGenerator:r}),this.actionData={},this.pageViewId=r(),this.nextPageViewId=this.pageViewId,this.currentLocation=lb(window.location),this.lastReferrer=ii()?document.referrer:"",this.addHooks()}getApi(t){return t==="setAction"?this.setAction: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:ii()?document.title:"",encoding:ii()?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===Tc.pageview&&(this.nextPageViewId=this.uuidGenerator(),this.hasSentFirstPageView=!0)}getNextValues(t,r){return{pageViewId:t===Tc.pageview?this.nextPageViewId:this.pageViewId,referrer:t===Tc.pageview&&this.hasSentFirstPageView?this.currentLocation:this.lastReferrer,location:t===Tc.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 lb(window.location)}},Yn=class e{constructor(t,r){if(!Il(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 Il(a)?new e(a,Number.parseInt(o)*1e3):null}};Yn.cvo_cid="cvo_cid";Yn.expirationTime=120;var Zh=class extends Fl{constructor({client:t,uuidGenerator:r=Ho}){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 U(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(Yn.cvo_cid,new Yn(n,Date.now()).toString()),r.toString()}catch{throw new Error("Invalid URL provided")}})}acceptFrom(t){this.client.setAcceptedLinkReferrers(t)}};Zh.Id="link";var yr=Object.keys;function wl(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}var zh=128,bb=192,db=224,pb=240;function J0(e){return(e&248)===pb?4:(e&pb)===db?3:(e&db)===bb?2:1}function eN(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&zh)!=zh)break;if(r-=3,(n&bb)!=zh){t-r>=J0(n)*3&&(r=t);break}}return e.substring(0,r)}var Jh={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"},tN=yr(Jh).map(e=>Jh[e]),rN=[...tN].join("|"),nN=new RegExp(`^(${rN}$)`),oN={svcAction:"svc_action",svcActionData:"svc_action_data"},aN=e=>yr(e).filter(t=>e[t]!==void 0).reduce((t,r)=>{let n=Jh[r]||r;return Object.assign(Object.assign({},t),{[n]:e[r]})},{}),iN=e=>nN.test(e),sN=[iN],fb={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",price:"pr",quantity:"qt",coupon:"cc",position:"ps",group:"group"},mb={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",position:"ps",price:"pr",group:"group"},jt={action:"pa",list:"pal",listSource:"pls"},Tl={id:"ti",revenue:"tr",tax:"tt",shipping:"ts",coupon:"tcc",affiliation:"ta",step:"cos",option:"col"},cN=["loyaltyCardId","loyaltyTier","thirdPartyPersona","companyName","favoriteStore","storeName","userIndustry","userRole","userDepartment","businessUnit"],ey={id:"quoteId",affiliation:"quoteAffiliation"},ty={id:"reviewId",rating:"reviewRating",comment:"reviewComment"},uN={add:jt,bookmark_add:jt,bookmark_remove:jt,click:jt,checkout:jt,checkout_option:jt,detail:jt,impression:jt,remove:jt,refund:Object.assign(Object.assign({},jt),Tl),purchase:Object.assign(Object.assign({},jt),Tl),quickview:jt,quote:Object.assign(Object.assign({},jt),ey),review:Object.assign(Object.assign({},jt),ty)},lN=yr(fb).map(e=>fb[e]),dN=yr(mb).map(e=>mb[e]),pN=yr(jt).map(e=>jt[e]),fN=yr(Tl).map(e=>Tl[e]),mN=yr(ty).map(e=>ty[e]),gN=yr(ey).map(e=>ey[e]),hN=[...lN,"custom"].join("|"),yN=[...dN,"custom"].join("|"),xb="(pr[0-9]+)",wb="(il[0-9]+pi[0-9]+)",SN=new RegExp(`^${xb}(${hN})$`),vN=new RegExp(`^(${wb}(${yN}))|(il[0-9]+nm)$`),AN=new RegExp(`^(${pN.join("|")})$`),CN=new RegExp(`^(${fN.join("|")})$`),bN=new RegExp(`^${xb}custom$`),xN=new RegExp(`^${wb}custom$`),wN=new RegExp(`^(${[...cN,...mN,...gN].join("|")})$`),RN=e=>SN.test(e),IN=e=>vN.test(e),EN=e=>AN.test(e),FN=e=>CN.test(e),TN=e=>wN.test(e),PN=[IN,RN,EN,FN,TN],kN=[bN,xN],ON={anonymizeIp:"aip"},_N={eventCategory:"ec",eventAction:"ea",eventLabel:"el",eventValue:"ev",page:"dp",visitorId:"cid",clientId:"cid",userId:"uid",currencyCode:"cu"},NN={hitType:"t",pageViewId:"pid",encoding:"de",location:"dl",referrer:"dr",screenColor:"sd",screenResolution:"sr",title:"dt",userAgent:"ua",language:"ul",eventId:"z",time:"tm"},DN=["contentId","contentIdKey","contentType","searchHub","tab","searchUid","permanentId","contentLocale","trackingId"],qN=Object.assign(Object.assign(Object.assign(Object.assign({},ON),_N),NN),DN.reduce((e,t)=>Object.assign(Object.assign({},e),{[t]:t}),{})),ry=Object.assign(Object.assign({},qN),oN),MN=e=>{let t=!!e.action&&uN[e.action]||{};return yr(e).reduce((r,n)=>{let o=t[n]||ry[n]||n;return Object.assign(Object.assign({},r),{[o]:e[n]})},{})},jN=yr(ry).map(e=>ry[e]),VN=e=>jN.indexOf(e)!==-1,LN=e=>e==="custom",UN=e=>[...PN,...sN,VN,LN].some(t=>t(e)),QN=e=>yr(e).reduce((t,r)=>{let n=BN(r);return n?Object.assign(Object.assign({},t),GN(n,e[r])):Object.assign(Object.assign({},t),{[r]:e[r]})},{}),BN=e=>{let t;return[...kN].every(r=>{var n;return t=(n=r.exec(e))===null||n===void 0?void 0:n[1],!t}),t},GN=(e,t)=>yr(t).reduce((r,n)=>Object.assign(Object.assign({},r),{[`${e}${n}`]:t[n]}),{}),ny=class{constructor(t){this.opts=t}sendEvent(t,r){return U(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:i,payload:p}=yield this.preProcessRequestAsPotentialJSONString(`${n}/analytics/${t}?${a}`,r,o),f=this.encodeForEventType(t,p),m=new Blob([f],{type:"application/x-www-form-urlencoded"});navigator.sendBeacon(i,m)})}isAvailable(){return"sendBeacon"in navigator}deleteHttpCookieVisitorId(){return Promise.resolve()}preProcessRequestAsPotentialJSONString(t,r,n){return U(this,void 0,void 0,function*(){let o=t,a=r;if(n){let i=yield n({url:t,body:JSON.stringify(r)},"analyticsBeacon"),{url:p,body:f}=i;o=p||t;try{a=JSON.parse(f)}catch(m){console.error("Unable to process the request body as a JSON string",m)}}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 U(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[Me.click,Me.custom,Me.search,Me.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}},oy=class{sendEvent(t,r){return U(this,void 0,void 0,function*(){return Promise.resolve()})}deleteHttpCookieVisitorId(){return U(this,void 0,void 0,function*(){return Promise.resolve()})}},gb=S.fetch,Pl=class{constructor(t){this.opts=t}sendEvent(t,r){return U(this,void 0,void 0,function*(){let{baseUrl:n,visitorIdProvider:o,preprocessRequest:a}=this.opts,i=this.shouldAppendVisitorId(t)?yield this.getVisitorIdParam():"",p={url:`${n}/analytics/${t}${i}`,credentials:"include",mode:"cors",headers:this.getHeaders(),method:"POST",body:JSON.stringify(r)},f=Object.assign(Object.assign({},p),a?yield a(p,"analyticsFetch"):{}),{url:m}=f,g=Br(f,["url"]),A;try{A=yield gb(m,g)}catch(x){console.error("An error has occurred when sending the event.",x);return}if(A.ok){let x=yield A.json();return x.visitorId&&o.setCurrentVisitorId(x.visitorId),x}else{try{A.json()}catch{}throw console.error(`An error has occurred when sending the "${t}" event.`,A,r),new Error(`An error has occurred when sending the "${t}" event. Check the console logs for more details.`)}})}deleteHttpCookieVisitorId(){return U(this,void 0,void 0,function*(){let{baseUrl:t}=this.opts,r=`${t}/analytics/visit`;yield gb(r,{headers:this.getHeaders(),method:"DELETE"})})}shouldAppendVisitorId(t){return[Me.click,Me.custom,Me.search,Me.view].indexOf(t)!==-1}getVisitorIdParam(){return U(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"})}},ay=class{constructor(t,r){Yh()&&vb()?this.storage=new Kh:Yh()?this.storage=localStorage:(console.warn("BrowserRuntime detected no valid storage available.",this),this.storage=new ci),this.client=new Pl(t),this.beaconClient=new ny(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}},iy=class{constructor(t,r){this.storage=r||new ci,this.client=new Pl(t)}getClientDependingOnEventType(t){return this.client}},kl=class{constructor(){this.storage=new ci,this.client=new oy}getClientDependingOnEventType(t){return this.client}},$N="xx",HN=e=>e?.startsWith($N)||!1,zN=`
|
|
29
29
|
We've detected you're using React Native but have not provided the corresponding runtime,
|
|
30
30
|
for an optimal experience please use the "coveo.analytics/react-native" subpackage.
|
|
31
31
|
Follow the Readme on how to set it up: https://github.com/coveo/coveo.analytics.js#using-react-native
|
|
@@ -76,4 +76,4 @@ fast-json-patch/module/duplex.mjs:
|
|
|
76
76
|
*)
|
|
77
77
|
*/if(__exports!=exports)module.exports=exports;return module.exports});
|
|
78
78
|
|
|
79
|
-
window.coveoQuanticVersion = '3.43.
|
|
79
|
+
window.coveoQuanticVersion = '3.43.6';
|