@coveo/quantic 3.38.1 → 3.38.2
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 +2 -2
|
@@ -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 wu(r)}var wu=class extends Error{constructor(e){super(e),this.name="SchemaValidationError"}},Se=class{constructor(e){de(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 K_(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}},Qe=class{constructor(e={}){de(this,"baseConfig");this.baseConfig=e}validate(e){return this.baseConfig.required&&fe(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 Tt(e){return e===void 0}function Y_(e){return e===null}function fe(e){return Tt(e)||Y_(e)}var pe=class{constructor(e={}){de(this,"value");this.value=new Qe(e)}validate(e){let t=this.value.validate(e);return t||(X_(e)?null:"value is not a boolean.")}get default(){return this.value.default}get required(){return this.value.required}};function X_(e){return Tt(e)||dd(e)}function dd(e){return typeof e=="boolean"}var re=class{constructor(e={}){de(this,"config");de(this,"value");this.config=e,this.value=new Qe(e)}validate(e){let t=this.value.validate(e);return t||(J_(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 J_(e){return Tt(e)||eC(e)}function eC(e){return typeof e=="number"&&!Number.isNaN(e)}var Z_=/^\d{4}(-\d\d(-\d\d(T\d\d:\d\d(:\d\d)?(\.\d+)?(([+-]\d\d:\d\d)|Z)?)?)?)?$/i,U=class{constructor(e={}){de(this,"value");de(this,"config");this.config={emptyAllowed:!0,url:!1,...e},this.value=new Qe(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(Tt(e))return null;if(!_i(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&&!(Z_.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 _i(e){return Object.prototype.toString.call(e)==="[object String]"}var J=class{constructor(e={}){de(this,"config");this.config={options:{required:!1},values:{},...e}}validate(e){if(Tt(e))return this.config.options.required?"value is required and is currently undefined":null;if(!tC(e))return"value is not an object";for(let[r,n]of Object.entries(this.config.values))if(n.required&&fe(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 tC(e){return e!==void 0&&typeof e=="object"}var ie=class{constructor(e={}){de(this,"config");de(this,"value");this.config=e,this.value=new Qe(this.config)}validate(e){if(!fe(e)&&!Array.isArray(e))return"value is not an array";let t=this.value.validate(e);if(t!==null)return t;if(fe(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&&fe(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 dd(e)||_i(e)||eC(e)||tC(e)?t.validate(e):"value is not a primitive value"}get default(){}get required(){return this.value.required}};function Ni(e){return Array.isArray(e)}var Ru=class{constructor(e){de(this,"config");de(this,"value");this.config=e,this.value=new Qe(e)}validate(e){let t=this.value.validate(e);return t!==null?t:Tt(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 go=(e,t=5)=>e+Math.random().toString(36).substring(2,2+t);function pd(e){return Array.isArray(e)}function fd(e){return e.trim()===""}function rC(e,t){return[...e.reduce((r,n)=>{let o=t(n);return r.has(o)||r.set(o,n),r},new Map).values()]}function eN(e){return btoa(encodeURI(e))}function md(e,t){let{[e]:r,...n}=t;return n}function Di(e){return eN(JSON.stringify(e))}var tN=new Set(["1",1,"yes",!0]);function nC(){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=>tN.has(r))}function oC(e){let t={};for(let[r,n]of e)t[r]=n;return t}function aC(e,t,r){return clearTimeout(t),setTimeout(e,r)}function Fu(e){if(typeof e!="object"||!e)return e;try{return JSON.parse(JSON.stringify(e))}catch{return e}}function gd(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 rN(e){if(fd(e.openingDelimiter)||fd(e.closingDelimiter))throw Error("delimiters should be a non-empty string");if(fe(e.content)||fd(e.content))return e.content;if(e.highlights.length===0)return qi(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+=qi(e.content.slice(n,i)),r+=e.openingDelimiter,r+=qi(e.content.slice(i,p)),r+=e.closingDelimiter,n=p}return n!==t&&(r+=qi(e.content.slice(n))),r}function qy(e,t){return e=qi(e),e.replace(/\[(.*?)\]|\{(.*?)\}|\((.*?)\)/g,(r,n,o,a)=>n?Dy(n,t.notMatchDelimiters):o?Dy(o,t.exactMatchDelimiters):a?Dy(a,t.correctionDelimiters):r)}function Dy(e,t){return t?t.open+e+t.close:e}function qi(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();d();c();l();u();d();c();l();u();d();c();l();u();function sC(_x2,_x3){return _sC.apply(this,arguments)}function _sC(){_sC=_asyncToGenerator(function*(e,t){let r=e.getReader(),n;for(;!(n=yield r.read()).done;)t(n.value)});return _sC.apply(this,arguments)}function cC(e){let t,r,n,o=!1;return function(i){t===void 0?(t=i,r=0,n=-1):t=oN(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 uC(e,t,r){let n=iC(),o=new TextDecoder;return function(i,p){if(i.length===0)r?.(n),n=iC();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":nN(g,n,t);break}}}}function nN(e,t,r){let n=parseInt(e,10);Number.isNaN(n)||r(t.retry=n)}function oN(e,t){let r=new Uint8Array(e.length+t.length);return r.set(e),r.set(t,e.length),r}function iC(){return{data:"",event:"",id:"",retry:void 0}}var Vy="text/event-stream",aN=1e3,lC="last-event-id";function dC(){return typeof window<"u"}function hd(e,{signal:t,headers:r,onopen:n,onmessage:o,onclose:a,onerror:i,openWhenHidden:p,fetch:f,...m}){return new Promise((g,v)=>{let C={...r};C.accept||(C.accept=Vy);let h;function x(){h?.abort(),document.hidden||k()}!p&&dC()&&document.addEventListener("visibilitychange",x);let b=aN,w;function R(){dC()&&document.removeEventListener("visibilitychange",x),clearTimeout(w),h?.abort()}t?.addEventListener("abort",()=>{R(),g()});let E=f??S,I=n??iN;function k(){return _k2.apply(this,arguments)}function _k2(){_k2=_asyncToGenerator(function*(){h=s.AbortController?new s.AbortController:null;try{let T=yield E(e,{...m,headers:C,signal:h?.signal});yield I(T),yield sC(T.body,cC(uC(D=>{D?C[lC]=D:delete C[lC]},D=>{b=D},o))),a?.(),R(),g()}catch(T){if(!h?.signal?.aborted)try{let D=i?.(T)??b;clearTimeout(w),w=setTimeout(k,D)}catch(D){R(),v(D)}}});return _k2.apply(this,arguments)}k()})}function iN(e){let t=e.headers.get("content-type");if(!t?.startsWith(Vy))throw new Error(`Expected content-type to be ${Vy}, Actual: ${t}`)}d();c();l();u();var ho=class{constructor(t){de(this,"_basePath");de(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 sN=(e,t,r)=>new ho(`${e}/rest/organizations/${t}/machinelearning/streaming/${r}`).href,pC=3,cN=5e3,uN="text/event-stream",Uy=1,jy=class extends Error{},Eu=class extends Error{constructor(r){super(r.message);de(this,"payload",r)}},Ly=class{constructor(){de(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)}},yd=class{constructor(t){de(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,v=new Ly;if(!a){this.logger.error("No stream ID found");return}let C=0,h,x=()=>{h&&!v.isActive(h)&&(w?.abort(),g(),R())},b=()=>{v.remove(h),h=aC(x,h,cN),v.add(h)},w=new s.AbortController,R=()=>hd(sN(n,o,a),{method:"GET",fetch:S,headers:{Authorization:`Bearer ${i}`,accept:"*/*"},openWhenHidden:!0,signal:w?.signal,onopen(E){return _asyncToGenerator(function*(){if(E.ok&&E.headers.get("content-type")===uN)return;throw E.status>=400&&E.status<500&&E.status!==429?new Eu({message:"Error opening stream",code:E.status}):new jy})()},onmessage:E=>{if(w?.signal.aborted)return;let I=JSON.parse(E.data);if(I.finishReason==="ERROR"){v.remove(h),w?.abort(),f({message:I.errorMessage,code:I.statusCode});return}p(I),C=0,I.finishReason==="COMPLETED"?(v.remove(h),m()):b()},onerror:E=>{if(!w?.signal.aborted){if(v.remove(h),E instanceof Eu)throw w?.abort(),f(E),E;if(++C>pC){this.logger.info("Maximum retry exceeded.");let I={message:"Failed to complete stream.",code:Uy};throw w?.abort(),f(I),new Eu(I)}this.logger.info(`Retrying...(${C}/${pC})`),g()}}});return R(),w}};d();c();l();u();var Sd=e=>e;d();c();l();u();d();c();l();u();function Mi(){return{answerSnippet:"",documentId:{contentIdKey:"",contentIdValue:""},question:"",relatedQuestions:[],score:0}}function ar(){return{response:{results:[],searchUid:"",totalCountFiltered:0,facets:[],generateAutomaticFacets:{facets:[]},queryCorrections:[],triggers:[],questionAnswer:Mi(),pipeline:"",splitTestRun:"",termsToHighlight:{},phrasesToHighlight:{},extendedResults:{}},duration:0,queryExecuted:"",error:null,automaticallyCorrected:!1,isLoading:!1,results:[],searchResponseId:"",requestId:"",questionAnswer:Mi(),extendedResults:{},searchAction:void 0}}d();c();l();u();function yo(e){let{url:t,accessToken:r,organizationId:n,authentication:o,...a}=e;return a}var So=e=>{let{response:t}=e;return t.body?lN(e):dN(t)},lN=e=>fN(e)?mN(e):pN(e)?e.body:{message:"unknown",statusCode:0,type:"unknown"},dN=e=>{let t=JSON.parse(JSON.stringify(e,Object.getOwnPropertyNames(e)));return{...t,message:`Client side error: ${t.message||""}`,statusCode:400,type:"ClientError"}};function pN(e){return e.body.statusCode!==void 0}function fN(e){return e.body.exception!==void 0}var mN=e=>({message:e.body.exception.code,statusCode:e.response.status,type:e.body.exception.code});d();c();l();u();var wC=Vr(AC(),1);d();c();l();u();var K=new Error("Failed to load reducers."),Vi=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."}},da=class extends Error{constructor(r,n){super();de(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 xC(e){let t=[];for(let r in e){let n=encodeURIComponent(r),o=encodeURIComponent(e[r]);t.push(`${n}=${o}`)}return t.join("&")}function CC(e){return typeof e!="object"||!e?!1:Object.values(e).every(LN)}function LN(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"}function bC(e){return e===429}var jr=class e{static call(t){return _asyncToGenerator(function*(){let r=UN(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 S(a,i);if(bC(f.status))throw f;return f});return function p(){return _ref.apply(this,arguments)}}();try{let f=yield(0,wC.backOff)(p,{startingDelay:100,timeMultiple:2,maxDelay:800,numOfAttempts:4,jitter:"full",retry:function(){var _ref2=_asyncToGenerator(function*(m){let g=m&&bC(m.status);return g&&(n.info("Platform retrying request"),yield new Promise(v=>setTimeout(v,1e3))),g});return function retry(_x4){return _ref2.apply(this,arguments)}}()});switch(f.status){case 419:case 401:throw n.info("Platform renewing token"),new Vi;case 404:throw new da(a,f.status);default:return n.info({response:f,requestInfo:o},"Platform response"),f}}catch(f){return f.message==="Failed to fetch"?new da(a):f}})()}static preprocessRequest(t,r){return _asyncToGenerator(function*(){let{origin:n,preprocessRequest:o,logger:a,requestMetadata:i}=r,{signal:p,...f}=t,m=Fu(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 mr(e,t="prod",r="platform"){let n=t==="prod"?"":t,o=r==="platform"?"":`.${r}`;return`https://${e}${o}.org${n}.coveo.com`}function ji(e,t,r="prod"){return e??mr(t,r)}function St(e,t="prod"){return`${mr(e,t)}/rest/search/v2`}function Ad(e,t="prod"){return`${mr(e,t,"analytics")}/rest/organizations/${e}/events/v1`}function UN(e){let{url:t,method:r,requestParams:n,contentType:o,accessToken:a,signal:i}=e,p=e.method==="POST"||e.method==="PUT",f=QN(n,o);return{url:t,method:r,headers:{"Content-Type":o,Authorization:`Bearer ${a}`,...e.headers},...(p&&{body:f}),signal:i}}function QN(e,t){return t==="application/x-www-form-urlencoded"?CC(e)?xC(e):"":JSON.stringify(e)}d();c();l();u();var vo=class{constructor(){de(this,"currentAbortController",null)}enqueue(t,r){var _this=this;return _asyncToGenerator(function*(){let n=_this.currentAbortController;_this.currentAbortController=new s.AbortController;let o=_this.currentAbortController;n&&(r.warnOnAbort&&r.logger.warn("Cancelling current pending search query"),n.abort());try{return yield t(o?.signal??null)}finally{_this.currentAbortController===o&&(_this.currentAbortController=null)}})()}};d();c();l();u();d();c();l();u();function RC(e){return((e.headers.get("content-type")||"").split(";").find(n=>n.indexOf("charset=")!==-1)||"").split("=")[1]||"UTF-8"}d();c();l();u();var Qn=(e,t,r,n)=>{let o=new ho(`${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 FC=(e,t)=>{let r=new ho(`${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},EC=/*#__PURE__*/function(){var _ref3=_asyncToGenerator(function*(e,t){let r=yield jr.call({...Qn(e,"POST","application/x-www-form-urlencoded","/html"),requestParams:yo(e),requestMetadata:{method:"html"},...t});if(r instanceof Error)throw r;let n=RC(r),o=yield r.arrayBuffer(),i=new TextDecoder(n).decode(o);return BN(i)?{success:i}:{error:So({response:r,body:i})}});return function EC(_x5,_x6){return _ref3.apply(this,arguments)}}();function BN(e){return typeof e=="string"}d();c();l();u();function GN(e){return{statusCode:e.statusCode,type:e.name,message:e.message}}function $N(e){return{statusCode:e.code,type:e.name,message:e.message,ignored:!0}}function xd(e,t){if(t&&e.name==="AbortError")return{error:$N(e)};if(e instanceof da)return{error:GN(e)};throw e}var Cd=class{constructor(t){de(this,"options",t);de(this,"apiCallsQueues",{unknown:new vo,mainSearch:new vo,facetValues:new vo,foldingCollection:new vo,instantResults:new vo})}plan(t){var _this2=this;return _asyncToGenerator(function*(){let r=yield jr.call({...Qn(t,"POST","application/json","/plan"),requestParams:yo(t),requestMetadata:{method:"plan"},..._this2.options});if(r instanceof Error)return xd(r);let n=yield r.json();return zN(n)?{success:n}:{error:So({response:r,body:n})}})()}querySuggest(t){var _this3=this;return _asyncToGenerator(function*(){let r=yield jr.call({...Qn(t,"POST","application/json","/querySuggest"),requestMetadata:{method:"querySuggest"},requestParams:yo(t),..._this3.options});if(r instanceof Error)return xd(r);let n=yield r.json(),o={response:r,body:n};return HN(n)?{success:(yield _this3.options.postprocessQuerySuggestResponseMiddleware(o)).body}:{error:So(o)}})()}search(t,r){var _this4=this;return _asyncToGenerator(function*(){let n=r?.origin??"unknown",o=yield _this4.apiCallsQueues[n].enqueue(p=>jr.call({...Qn(t,"POST","application/json",""),requestParams:yo(t),requestMetadata:{method:"search",origin:r?.origin},..._this4.options,signal:p??void 0}),{logger:_this4.options.logger,warnOnAbort:!r?.disableAbortWarning});if(o instanceof Error)return xd(o,r?.disableAbortWarning);let a=yield o.json(),i={response:o,body:a};return IC(a)?(i.body=TC(a),{success:(yield _this4.options.postprocessSearchResponseMiddleware(i)).body}):{error:So(i)}})()}facetSearch(t){var _this5=this;return _asyncToGenerator(function*(){let r=yield jr.call({...Qn(t,"POST","application/json","/facet"),requestParams:yo(t),requestMetadata:{method:"facetSearch"},..._this5.options});if(r instanceof Error)throw r;let n=yield r.json(),o={response:r,body:n};return(yield _this5.options.postprocessFacetSearchResponseMiddleware(o)).body})()}recommendations(t){var _this6=this;return _asyncToGenerator(function*(){let r=yield jr.call({...Qn(t,"POST","application/json",""),requestParams:yo(t),requestMetadata:{method:"recommendations"},..._this6.options});if(r instanceof Error)throw r;let n=yield r.json();if(IC(n)){let o={response:r,body:n};return o.body=TC(n),{success:(yield _this6.options.postprocessSearchResponseMiddleware(o)).body}}return{error:So({response:r,body:n})}})()}html(t){var _this7=this;return _asyncToGenerator(function*(){return EC(t,{..._this7.options})})()}fieldDescriptions(t){var _this8=this;return _asyncToGenerator(function*(){let r=yield jr.call({...Qn(t,"GET","application/json","/fields"),requestParams:{},requestMetadata:{method:"fieldDescriptions"},..._this8.options});if(r instanceof Error)throw r;let n=yield r.json();return WN(n)?{success:n}:{error:So({response:r,body:n})}})()}},bd=e=>e.success!==void 0,vt=e=>e.error!==void 0;function IC(e){return e.results!==void 0}function TC(e){let t=Mi();return fe(e.questionAnswer)?(e.questionAnswer=t,e):(e.questionAnswer={...t,...e.questionAnswer},e)}function HN(e){return e.completions!==void 0}function zN(e){return e.preprocessingOutput!==void 0}function WN(e){return e.fields!==void 0}d();c();l();u();var PC=e=>e,kC=e=>e,OC=e=>e;d();c();l();u();d();c();l();u();var W=new U({required:!0,emptyAllowed:!1}),st=new U({required:!1,emptyAllowed:!1}),Be=new U({required:!0,emptyAllowed:!0}),lK=new U({required:!1,emptyAllowed:!0}),wd=new ie({each:W,required:!0}),_C=new U({required:!1,emptyAllowed:!1,regex:/^\d+\.\d+\.\d+$/}),NC=new U({required:!1,emptyAllowed:!1,regex:/^[a-zA-Z0-9_\-.]{1,100}$/}),dK=new U({required:!0,emptyAllowed:!1,regex:/^[a-zA-Z0-9_\-.]{1,100}$/}),Bn=({message:e,name:t,stack:r})=>({message:e,name:t,stack:r}),gr=(e,t)=>{if("required"in t)return{payload:new Se({value:t}).validate({value:e}).value};let o=new J({options:{required:!0},values:t}).validate(e);if(o)throw new wu(o);return{payload:e}},O=(e,t)=>{try{return gr(e,t)}catch(r){return{payload:e,error:Bn(r)}}},lt=(e,t,r,n)=>{let o=`Check the initialState of ${n}`;return DC(e,t,r,o,"Controller initialization error")},$e=(e,t,r,n)=>{let o=`Check the options of ${n}`;return DC(e,t,r,o,"Controller initialization error")},DC=(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 Pt(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 KN=typeof Symbol=="function"&&Symbol.observable||"@@observable",qC=KN,Yy=()=>Math.random().toString(36).substring(7).split("").join("."),YN={INIT:`@@redux/INIT${Yy()}`,REPLACE:`@@redux/REPLACE${Yy()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Yy()}`},Rd=YN;function Xr(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 Xy(e,t,r){if(typeof e!="function")throw new Error(Pt(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(Pt(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(Pt(1));return r(Xy)(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,R)=>{i.set(R,w)}))}function g(){if(f)throw new Error(Pt(3));return o}function v(w){if(typeof w!="function")throw new Error(Pt(4));if(f)throw new Error(Pt(5));let R=!0;m();let E=p++;return i.set(E,w),function(){if(R){if(f)throw new Error(Pt(6));R=!1,m(),i.delete(E),a=null}}}function C(w){if(!Xr(w))throw new Error(Pt(7));if(typeof w.type>"u")throw new Error(Pt(8));if(typeof w.type!="string")throw new Error(Pt(17));if(f)throw new Error(Pt(9));try{f=!0,o=n(o,w)}finally{f=!1}return(a=i).forEach(E=>{E()}),w}function h(w){if(typeof w!="function")throw new Error(Pt(10));n=w,C({type:Rd.REPLACE})}function x(){let w=v;return{subscribe(R){if(typeof R!="object"||R===null)throw new Error(Pt(11));function E(){let k=R;k.next&&k.next(g())}return E(),{unsubscribe:w(E)}},[qC](){return this}}}return C({type:Rd.INIT}),{dispatch:C,subscribe:v,getState:g,replaceReducer:h,[qC]:x}}function XN(e){Object.keys(e).forEach(t=>{let r=e[t];if(typeof r(void 0,{type:Rd.INIT})>"u")throw new Error(Pt(12));if(typeof r(void 0,{type:Rd.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Pt(13))})}function Li(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{XN(r)}catch(i){a=i}return function(p={},f){if(a)throw a;let m=!1,g={};for(let v=0;v<n.length;v++){let C=n[v],h=r[C],x=p[C],b=h(x,f);if(typeof b>"u"){let w=f&&f.type;throw new Error(Pt(14))}g[C]=b,m=m||b!==x}return m=m||n.length!==Object.keys(p).length,m?g:p}}function Pu(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function MC(...e){return t=>(r,n)=>{let o=t(r,n),a=()=>{throw new Error(Pt(15))},i={getState:o.getState,dispatch:(f,...m)=>a(f,...m)},p=e.map(f=>f(i));return a=Pu(...p)(o.dispatch),{...o,dispatch:a}}}function ku(e){return Xr(e)&&"type"in e&&typeof e.type=="string"}d();c();l();u();var iS=Symbol.for("immer-nothing"),Ou=Symbol.for("immer-draftable"),At=Symbol.for("immer-state");function kt(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var ir=Object,fa=ir.getPrototypeOf,Nu="constructor",ju="prototype",eS="configurable",Td="enumerable",Ed="writable",Du="value",Wt=e=>!!e&&!!e[At];function Kt(e){return e?$C(e)||Uu(e)||!!e[Ou]||!!e[Nu]?.[Ou]||Qu(e)||Bu(e):!1}var JN=ir[ju][Nu].toString(),VC=new WeakMap;function $C(e){if(!e||!Ui(e))return!1;let t=fa(e);if(t===null||t===ir[ju])return!0;let r=ir.hasOwnProperty.call(t,Nu)&&t[Nu];if(r===Object)return!0;if(!pa(r))return!1;let n=VC.get(r);return n===void 0&&(n=Function.toString.call(r),VC.set(r,n)),n===JN}function HC(e){return Wt(e)||kt(15,e),e[At].base_}function Lu(e,t,r=!0){ma(e)===0?(r?Reflect.ownKeys(e):ir.keys(e)).forEach(o=>{t(o,e[o],e)}):e.forEach((n,o)=>t(o,n,e))}function ma(e){let t=e[At];return t?t.type_:Uu(e)?1:Qu(e)?2:Bu(e)?3:0}var _u=(e,t,r=ma(e))=>r===2?e.has(t):ir[ju].hasOwnProperty.call(e,t),Gn=(e,t,r=ma(e))=>r===2?e.get(t):e[t],Pd=(e,t,r,n=ma(e))=>{n===2?e.set(t,r):n===3?e.add(r):e[t]=r};function ZN(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var Uu=Array.isArray,Qu=e=>e instanceof Map,Bu=e=>e instanceof Set,Ui=e=>typeof e=="object",pa=e=>typeof e=="function",Jy=e=>typeof e=="boolean";function e0(e){let t=+e;return Number.isInteger(t)&&String(t)===e}var t0=e=>Ui(e)?e?.[At]:null,$n=e=>e.copy_||e.base_;var sS=e=>e.modified_?e.copy_:e.base_;function tS(e,t){if(Qu(e))return new Map(e);if(Bu(e))return new Set(e);if(Uu(e))return Array[ju].slice.call(e);let r=$C(e);if(t===!0||t==="class_only"&&!r){let n=ir.getOwnPropertyDescriptors(e);delete n[At];let o=Reflect.ownKeys(n);for(let a=0;a<o.length;a++){let i=o[a],p=n[i];p[Ed]===!1&&(p[Ed]=!0,p[eS]=!0),(p.get||p.set)&&(n[i]={[eS]:!0,[Ed]:!0,[Td]:p[Td],[Du]:e[i]})}return ir.create(fa(e),n)}else{let n=fa(e);if(n!==null&&r)return{...e};let o=ir.create(n);return ir.assign(o,e)}}function cS(e,t=!1){return qd(e)||Wt(e)||!Kt(e)||(ma(e)>1&&ir.defineProperties(e,{set:Fd,add:Fd,clear:Fd,delete:Fd}),ir.freeze(e),t&&Lu(e,(r,n)=>{cS(n,!0)},!1)),e}function r0(){kt(2)}var Fd={[Du]:r0};function qd(e){return e===null||!Ui(e)?!0:ir.isFrozen(e)}var kd="MapSet",Od="Patches",jC="ArrayMethods",_d={};function ga(e){let t=_d[e];return t||kt(0,e),t}var LC=e=>!!_d[e];function n0(e,t){_d[e]||(_d[e]=t)}var qu,zC=()=>qu,o0=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:LC(kd)?ga(kd):void 0,arrayMethodsPlugin_:LC(jC)?ga(jC):void 0});function UC(e,t){t&&(e.patchPlugin_=ga(Od),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function rS(e){nS(e),e.drafts_.forEach(a0),e.drafts_=null}function nS(e){e===qu&&(qu=e.parent_)}var QC=e=>qu=o0(qu,e);function a0(e){let t=e[At];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function BC(e,t){t.unfinalizedDrafts_=t.drafts_.length;let r=t.drafts_[0];if(e!==void 0&&e!==r){r[At].modified_&&(rS(t),kt(4)),Kt(e)&&(e=GC(t,e));let{patchPlugin_:o}=t;o&&o.generateReplacementPatches_(r[At].base_,e,t)}else e=GC(t,r);return i0(t,e,!0),rS(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==iS?e:void 0}function GC(e,t){if(qd(t))return t;let r=t[At];if(!r)return Nd(t,e.handledSet_,e);if(!Md(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);YC(r,e)}return r.copy_}function i0(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&cS(t,r)}function WC(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var Md=(e,t)=>e.scope_===t,s0=[];function KC(e,t,r,n){let o=$n(e),a=e.type_;if(n!==void 0&&Gn(o,n,a)===t){Pd(o,n,r,a);return}if(!e.draftLocations_){let p=e.draftLocations_=new Map;Lu(o,(f,m)=>{if(Wt(m)){let g=p.get(m)||[];g.push(f),p.set(m,g)}})}let i=e.draftLocations_.get(t)??s0;for(let p of i)Pd(o,p,r,a)}function c0(e,t,r){e.callbacks_.push(function(o){let a=t;if(!a||!Md(a,o))return;o.mapSetPlugin_?.fixSetContents(a);let i=sS(a);KC(e,a.draft_??a,i,r),YC(a,o)})}function YC(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)}WC(e)}}function u0(e,t,r){let{scope_:n}=e;if(Wt(r)){let o=r[At];Md(o,n)&&o.callbacks_.push(function(){Id(e);let i=sS(o);KC(e,r,i,t)})}else Kt(r)&&e.callbacks_.push(function(){let a=$n(e);e.type_===3?a.has(r)&&Nd(r,n.handledSet_,n):Gn(a,t,e.type_)===r&&n.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&Nd(Gn(e.copy_,t,e.type_),n.handledSet_,n)})}function Nd(e,t,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||Wt(e)||t.has(e)||!Kt(e)||qd(e)||(t.add(e),Lu(e,(n,o)=>{if(Wt(o)){let a=o[At];if(Md(a,r)){let i=sS(a);Pd(e,n,i,e.type_),WC(a)}}else Kt(o)&&Nd(o,t,r)})),e}function l0(e,t){let r=Uu(e),n={type_:r?1:0,scope_:t?t.scope_:zC(),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=Dd;r&&(o=[n],a=Mu);let{revoke:i,proxy:p}=Proxy.revocable(o,a);return n.draft_=p,n.revoke_=i,[p,n]}var Dd={get(e,t){if(t===At)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=$n(e);if(!_u(o,t,e.type_))return d0(e,o,t);let a=o[t];if(e.finalized_||!Kt(a)||n&&e.operationMethod&&r?.isMutatingArrayMethod(e.operationMethod)&&e0(t))return a;if(a===Zy(e.base_,t)){Id(e);let i=e.type_===1?+t:t,p=aS(e.scope_,a,e,i);return e.copy_[i]=p}return a},has(e,t){return t in $n(e)},ownKeys(e){return Reflect.ownKeys($n(e))},set(e,t,r){let n=XC($n(e),t);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){let o=Zy($n(e),t),a=o?.[At];if(a&&a.base_===r)return e.copy_[t]=r,e.assigned_.set(t,!1),!0;if(ZN(r,o)&&(r!==void 0||_u(e.base_,t,e.type_)))return!0;Id(e),oS(e)}return e.copy_[t]===r&&(r!==void 0||t in e.copy_)||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_.set(t,!0),u0(e,t,r)),!0},deleteProperty(e,t){return Id(e),Zy(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),oS(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let r=$n(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{[Ed]:!0,[eS]:e.type_!==1||t!=="length",[Td]:n[Td],[Du]:r[t]}},defineProperty(){kt(11)},getPrototypeOf(e){return fa(e.base_)},setPrototypeOf(){kt(12)}},Mu={};for(let e in Dd){let t=Dd[e];Mu[e]=function(){let r=arguments;return r[0]=r[0][0],t.apply(this,r)}}Mu.deleteProperty=function(e,t){return Mu.set.call(this,e,t,void 0)};Mu.set=function(e,t,r){return Dd.set.call(this,e[0],t,r,e[0])};function Zy(e,t){let r=e[At];return(r?$n(r):e)[t]}function d0(e,t,r){let n=XC(t,r);return n?Du in n?n[Du]:n.get?.call(e.draft_):void 0}function XC(e,t){if(!(t in e))return;let r=fa(e);for(;r;){let n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=fa(r)}}function oS(e){e.modified_||(e.modified_=!0,e.parent_&&oS(e.parent_))}function Id(e){e.copy_||(e.assigned_=new Map,e.copy_=tS(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var p0=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(t,r,n)=>{if(pa(t)&&!pa(r)){let a=r;r=t;let i=this;return function(f=a,...m){return i.produce(f,g=>r.call(this,g,...m))}}pa(r)||kt(6),n!==void 0&&!pa(n)&&kt(7);let o;if(Kt(t)){let a=QC(this),i=aS(a,t,void 0),p=!0;try{o=r(i),p=!1}finally{p?rS(a):nS(a)}return UC(a,n),BC(o,a)}else if(!t||!Ui(t)){if(o=r(t),o===void 0&&(o=t),o===iS&&(o=void 0),this.autoFreeze_&&cS(o,!0),n){let a=[],i=[];ga(Od).generateReplacementPatches_(t,o,{patches_:a,inversePatches_:i}),n(a,i)}return o}else kt(1,t)},this.produceWithPatches=(t,r)=>{if(pa(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]},Jy(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),Jy(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),Jy(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){Kt(e)||kt(8),Wt(e)&&(e=Vd(e));let t=QC(this),r=aS(t,e,void 0);return r[At].isManual_=!0,nS(t),r}finishDraft(e,t){let r=e&&e[At];(!r||!r.isManual_)&&kt(9);let{scope_:n}=r;return UC(n,t),BC(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=ga(Od).applyPatches_;return Wt(e)?n(e,t):this.produce(e,o=>n(o,t))}};function aS(e,t,r,n){let[o,a]=Qu(t)?ga(kd).proxyMap_(t,r):Bu(t)?ga(kd).proxySet_(t,r):l0(t,r);return(r?.scope_??zC()).drafts_.push(o),a.callbacks_=r?.callbacks_??[],a.key_=n,r&&n!==void 0?c0(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 Vd(e){return Wt(e)||kt(10,e),JC(e)}function JC(e){if(!Kt(e)||qd(e))return e;let t=e[At],r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=tS(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=tS(e,!0);return Lu(r,(o,a)=>{Pd(r,o,JC(a))},n),t&&(t.finalized_=!1),r}function ZC(){function t(x,b=[]){if(x.key_!==void 0){let w=x.parent_.copy_??x.parent_.base_,R=t0(Gn(w,x.key_)),E=Gn(w,x.key_);if(E===void 0||E!==x.draft_&&E!==x.base_&&E!==x.copy_||R!=null&&R.base_!==x.base_)return null;let I=x.parent_.type_===3,k;if(I){let T=x.parent_;k=Array.from(T.drafts_.keys()).indexOf(x.key_)}else k=x.key_;if(!(I&&w.size>k||_u(w,k)))return null;b.push(k)}if(x.parent_)return t(x.parent_,b);b.reverse();try{r(x.copy_,b)}catch{return null}return b}function r(x,b){let w=x;for(let R=0;R<b.length-1;R++){let E=b[R];if(w=Gn(w,E),!Ui(w)||w===null)throw new Error(`Cannot resolve path at '${b.join("/")}'`)}return w}let n="replace",o="add",a="remove";function i(x,b,w){if(x.scope_.processedForPatches_.has(x))return;x.scope_.processedForPatches_.add(x);let{patches_:R,inversePatches_:E}=w;switch(x.type_){case 0:case 2:return f(x,b,R,E);case 1:return p(x,b,R,E);case 3:return m(x,b,R,E)}}function p(x,b,w,R){let{base_:E,assigned_:I}=x,k=x.copy_;k.length<E.length&&([E,k]=[k,E],[w,R]=[R,w]);let T=x.allIndicesReassigned_===!0;for(let D=0;D<E.length;D++){let G=k[D],L=E[D];if((T||I?.get(D.toString()))&&G!==L){let Q=G?.[At];if(Q&&Q.modified_)continue;let j=b.concat([D]);w.push({op:n,path:j,value:h(G)}),R.push({op:n,path:j,value:h(L)})}}for(let D=E.length;D<k.length;D++){let G=b.concat([D]);w.push({op:o,path:G,value:h(k[D])})}for(let D=k.length-1;E.length<=D;--D){let G=b.concat([D]);R.push({op:a,path:G})}}function f(x,b,w,R){let{base_:E,copy_:I,type_:k}=x;Lu(x.assigned_,(T,D)=>{let G=Gn(E,T,k),L=Gn(I,T,k),V=D?_u(E,T)?n:o:a;if(G===L&&V===n)return;let Q=b.concat(T);w.push(V===a?{op:V,path:Q}:{op:V,path:Q,value:h(L)}),R.push(V===o?{op:a,path:Q}:V===a?{op:o,path:Q,value:h(G)}:{op:n,path:Q,value:h(G)})})}function m(x,b,w,R){let{base_:E,copy_:I}=x,k=0;E.forEach(T=>{if(!I.has(T)){let D=b.concat([k]);w.push({op:a,path:D,value:T}),R.unshift({op:o,path:D,value:T})}k++}),k=0,I.forEach(T=>{if(!E.has(T)){let D=b.concat([k]);w.push({op:o,path:D,value:T}),R.unshift({op:a,path:D,value:T})}k++})}function g(x,b,w){let{patches_:R,inversePatches_:E}=w;R.push({op:n,path:[],value:b===iS?void 0:b}),E.push({op:n,path:[],value:x})}function v(x,b){return b.forEach(w=>{let{path:R,op:E}=w,I=x;for(let G=0;G<R.length-1;G++){let L=ma(I),V=R[G];typeof V!="string"&&typeof V!="number"&&(V=""+V),(L===0||L===1)&&(V==="__proto__"||V===Nu)&&kt(19),pa(I)&&V===ju&&kt(19),I=Gn(I,V),Ui(I)||kt(18,R.join("/"))}let k=ma(I),T=C(w.value),D=R[R.length-1];switch(E){case n:switch(k){case 2:return I.set(D,T);case 3:kt(16);default:return I[D]=T}case o:switch(k){case 1:return D==="-"?I.push(T):I.splice(D,0,T);case 2:return I.set(D,T);case 3:return I.add(T);default:return I[D]=T}case a:switch(k){case 1:return I.splice(D,1);case 2:return I.delete(D);case 3:return I.delete(w.value);default:return delete I[D]}default:kt(17,E)}}),x}function C(x){if(!Kt(x))return x;if(Uu(x))return x.map(C);if(Qu(x))return new Map(Array.from(x.entries()).map(([w,R])=>[w,C(R)]));if(Bu(x))return new Set(Array.from(x).map(C));let b=Object.create(fa(x));for(let w in x)b[w]=C(x[w]);return _u(x,Ou)&&(b[Ou]=x[Ou]),b}function h(x){return Wt(x)?C(x):x}n0(Od,{applyPatches_:v,generatePatches_:i,generateReplacementPatches_:g,getPath:t})}var Vu=new p0,ha=Vu.produce,uS=Vu.produceWithPatches.bind(Vu);var lS=Vu.applyPatches.bind(Vu);d();c();l();u();function f0(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function m0(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 eb=e=>Array.isArray(e)?e:[e];function g0(e){let t=Array.isArray(e[0])?e[0]:e;return m0(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function h0(e,t){let r=[],{length:n}=e;for(let o=0;o<n;o++)r.push(e[o].apply(null,t));return r}var y0=class{constructor(e){this.value=e}deref(){return this.value}},S0=()=>typeof WeakRef>"u"?y0:WeakRef,rb=S0(),v0=0,tb=1;function jd(){return{s:v0,v:void 0,o:null,p:null}}function A0(e){return e instanceof rb?e.deref():e}function Gu(e,t={}){let r=jd(),{resultEqualityCheck:n}=t,o,a=0;function i(){let p=r,{length:f}=arguments;for(let v=0,C=f;v<C;v++){let h=arguments[v];if(typeof h=="function"||typeof h=="object"&&h!==null){let x=p.o;x===null&&(p.o=x=new WeakMap);let b=x.get(h);b===void 0?(p=jd(),x.set(h,p)):p=b}else{let x=p.p;x===null&&(p.p=x=new Map);let b=x.get(h);b===void 0?(p=jd(),x.set(h,p)):p=b}}let m=p,g;if(p.s===tb)g=p.v;else if(g=e.apply(null,arguments),a++,n){let v=A0(o);v!=null&&n(v,g)&&(g=v,a!==0&&a--),o=typeof g=="object"&&g!==null||typeof g=="function"?new rb(g):g}return m.s=tb,m.v=g,g}return i.clearCache=()=>{r=jd(),i.resetResultsCount()},i.resultsCount=()=>a,i.resetResultsCount=()=>{a=0},i}function x0(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()),f0(m,`createSelector expects an output function after the inputs, but received: [${typeof m}]`);let g={...r,...f},{memoize:v,memoizeOptions:C=[],argsMemoize:h=Gu,argsMemoizeOptions:x=[]}=g,b=eb(C),w=eb(x),R=g0(o),E=v(function(){return a++,m.apply(null,arguments)},...b),I=!0,k=h(function(){i++;let D=h0(R,arguments);return p=E.apply(null,D),p},...w);return Object.assign(k,{resultFunc:m,memoizedResultFunc:E,dependencies:R,dependencyRecomputations:()=>i,resetDependencyRecomputations:()=>{i=0},lastResult:()=>p,recomputations:()=>a,resetRecomputations:()=>{a=0},memoize:v,argsMemoize:h})};return Object.assign(n,{withTypes:()=>n}),n}var et=x0(Gu);d();c();l();u();function nb(e){return({dispatch:r,getState:n})=>o=>a=>typeof a=="function"?a(r,n,e):o(a)}var ob=nb(),ab=nb;var C0=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Pu:Pu.apply(null,arguments)},$K=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}},b0=e=>e&&typeof e.match=="function";function P(e,t){function r(...n){if(t){let o=t(...n);if(!o)throw new Error(Yt(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=>ku(n)&&n.type===e,r}var fb=class $u extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,$u.prototype)}static get[Symbol.species](){return $u}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new $u(...t[0].concat(this)):new $u(...t.concat(this))}};function ib(e){return Kt(e)?ha(e,()=>{}):e}function Ld(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function w0(e){return typeof e=="boolean"}var R0=()=>function(t){let{thunk:r=!0,immutableCheck:n=!0,serializableCheck:o=!0,actionCreatorCheck:a=!0}=t??{},i=new fb;return r&&(w0(r)?i.push(ob):i.push(ab(r.extraArgument))),i},Hu="RTK_autoBatch",Gi=()=>e=>({payload:e,meta:{[Hu]:!0}}),sb=e=>t=>{setTimeout(t,e)},F0=(e,t)=>r=>{let n=!1,o=()=>{n||(n=!0,cancelAnimationFrame(a),clearTimeout(i),r())},a=e(o),i=setTimeout(o,t)},E0=(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?F0(window.requestAnimationFrame,100):sb(10):e.type==="callback"?e.queueNotification:sb(e.timeout),m=()=>{i=!1,a&&(a=!1,p.forEach(g=>g()))};return Object.assign({},n,{subscribe(g){let v=()=>o&&g(),C=n.subscribe(v);return p.add(g),()=>{C(),p.delete(g)}},dispatch(g){try{return o=!g?.meta?.[Hu],a=!o,a&&(i||(i=!0,f(m))),n.dispatch(g)}finally{o=!0}}})},I0=e=>function(r){let{autoBatch:n=!0}=r??{},o=new fb(e);return n&&o.push(E0(typeof n=="object"?n:void 0)),o};function mb(e){let t=R0(),{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(Xr(r))f=Li(r);else throw new Error(Yt(1));let m;typeof n=="function"?m=n(t):m=t();let g=Pu;o&&(g=C0({trace:!1,...(typeof o=="object"&&o)}));let v=MC(...m),C=I0(v),h=typeof p=="function"?p(C):C(),x=g(...h);return Xy(f,i,x)}function gb(e){let t={},r=[],n,o={addCase(a,i){let p=typeof a=="string"?a:a.type;if(!p)throw new Error(Yt(28));if(p in t)throw new Error(Yt(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 T0(e){return typeof e=="function"}function ae(e,t){let[r,n,o]=gb(t),a;if(T0(e))a=()=>ib(e());else{let p=ib(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,v)=>{if(v)if(Wt(g)){let h=v(g,f);return h===void 0?g:h}else{if(Kt(g))return ha(g,C=>v(C,f));{let C=v(g,f);if(C===void 0){if(g===null)return g;throw Error("A case reducer on a non-draftable value must not return undefined")}return C}}return g},p)}return i.getInitialState=a,i}var hb=(e,t)=>b0(e)?e.match(t):e(t);function Jr(...e){return t=>e.some(r=>hb(r,t))}function Bi(...e){return t=>e.every(r=>hb(r,t))}function Gd(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 zu(e){return typeof e[0]=="function"&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function $d(...e){return e.length===0?t=>Gd(t,["pending"]):zu(e)?Jr(...e.map(t=>t.pending)):$d()(e[0])}function Sa(...e){return e.length===0?t=>Gd(t,["rejected"]):zu(e)?Jr(...e.map(t=>t.rejected)):Sa()(e[0])}function Wu(...e){let t=r=>r&&r.meta&&r.meta.rejectedWithValue;return e.length===0?Bi(Sa(...e),t):zu(e)?Bi(Sa(...e),t):Wu()(e[0])}function Hn(...e){return e.length===0?t=>Gd(t,["fulfilled"]):zu(e)?Jr(...e.map(t=>t.fulfilled)):Hn()(e[0])}function Hd(...e){return e.length===0?t=>Gd(t,["pending","fulfilled","rejected"]):zu(e)?Jr(...e.flatMap(t=>[t.pending,t.rejected,t.fulfilled])):Hd()(e[0])}var P0="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Ku=(e=21)=>{let t="",r=e;for(;r--;)t+=P0[Math.random()*64|0];return t},k0=["name","message","stack","code"],dS=class{constructor(e,t){de(this,"payload");de(this,"meta");de(this,"_type");this.payload=e,this.meta=t}},cb=class{constructor(e,t){de(this,"payload");de(this,"meta");de(this,"_type");this.payload=e,this.meta=t}},O0=e=>{if(typeof e=="object"&&e!==null){let t={};for(let r of k0)typeof e[r]=="string"&&(t[r]=e[r]);return t}return{message:String(e)}},ub="External signal was aborted",xe=(()=>{function e(t,r,n){let o=P(t+"/fulfilled",(f,m,g,v)=>({payload:f,meta:{...(v||{}),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,v,C)=>({payload:v,error:(n&&n.serializeError||O0)(f||"Rejected"),meta:{...(C||{}),arg:g,requestId:m,rejectedWithValue:!!v,requestStatus:"rejected",aborted:f?.name==="AbortError",condition:f?.name==="ConditionError"}}));function p(f,{signal:m}={}){return(g,v,C)=>{let h=n?.idGenerator?n.idGenerator(f):Ku(),x=new s.AbortController,b,w;function R(I){w=I,x.abort()}m&&(m.aborted?R(ub):m.addEventListener("abort",()=>R(ub),{once:!0}));let E=_asyncToGenerator(function*(){let I;try{let T=n?.condition?.(f,{getState:v,extra:C});if(N0(T)&&(T=yield T),T===!1||x.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let D=new Promise((G,L)=>{b=()=>{L({name:"AbortError",message:w||"Aborted"})},x.signal.addEventListener("abort",b,{once:!0})});g(a(h,f,n?.getPendingMeta?.({requestId:h,arg:f},{getState:v,extra:C}))),I=yield Promise.race([D,Promise.resolve(r(f,{dispatch:g,getState:v,extra:C,requestId:h,signal:x.signal,abort:R,rejectWithValue:(G,L)=>new dS(G,L),fulfillWithValue:(G,L)=>new cb(G,L)})).then(G=>{if(G instanceof dS)throw G;return G instanceof cb?o(G.payload,h,f,G.meta):o(G,h,f)})])}catch(T){I=T instanceof dS?i(null,h,f,T.payload,T.meta):i(T,h,f)}finally{b&&x.signal.removeEventListener("abort",b)}return n&&!n.dispatchConditionRejection&&i.match(I)&&I.meta.condition||g(I),I})();return Object.assign(E,{abort:R,requestId:h,arg:f,unwrap(){return E.then(_0)}})}}return Object.assign(p,{pending:a,rejected:i,fulfilled:o,settled:Jr(i,o),typePrefix:t})}return e.withTypes=()=>e,e})();function _0(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function N0(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var yb=Symbol.for("rtk-slice-createasyncthunk"),zK={[yb]:xe};function D0(e,t){return`${e}/${t}`}function q0({creators:e}={}){let t=e?.asyncThunk?.[yb];return function(n){let{name:o,reducerPath:a=o}=n;if(!o)throw new Error(Yt(11));typeof process<"u";let i=(typeof n.reducers=="function"?n.reducers(V0()):n.reducers)||{},p=Object.keys(i),f={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},m={addCase(I,k){let T=typeof I=="string"?I:I.type;if(!T)throw new Error(Yt(12));if(T in f.sliceCaseReducersByType)throw new Error(Yt(13));return f.sliceCaseReducersByType[T]=k,m},addMatcher(I,k){return f.sliceMatchers.push({matcher:I,reducer:k}),m},exposeAction(I,k){return f.actionCreators[I]=k,m},exposeCaseReducer(I,k){return f.sliceCaseReducersByName[I]=k,m}};p.forEach(I=>{let k=i[I],T={reducerName:I,type:D0(o,I),createNotation:typeof n.reducers=="function"};L0(k)?Q0(T,k,m,t):j0(T,k,m)});function g(){let[I={},k=[],T=void 0]=typeof n.extraReducers=="function"?gb(n.extraReducers):[n.extraReducers],D={...I,...f.sliceCaseReducersByType};return ae(n.initialState,G=>{for(let L in D)G.addCase(L,D[L]);for(let L of f.sliceMatchers)G.addMatcher(L.matcher,L.reducer);for(let L of k)G.addMatcher(L.matcher,L.reducer);T&&G.addDefaultCase(T)})}let v=I=>I,C=new Map,h=new WeakMap,x;function b(I,k){return x||(x=g()),x(I,k)}function w(){return x||(x=g()),x.getInitialState()}function R(I,k=!1){function T(G){let L=G[I];return typeof L>"u"&&k&&(L=Ld(h,T,w)),L}function D(G=v){let L=Ld(C,k,()=>new WeakMap);return Ld(L,G,()=>{let V={};for(let[Q,j]of Object.entries(n.selectors??{}))V[Q]=M0(j,G,()=>Ld(h,G,w),k);return V})}return{reducerPath:I,getSelectors:D,get selectors(){return D(T)},selectSlice:T}}let E={name:o,reducer:b,actions:f.actionCreators,caseReducers:f.sliceCaseReducersByName,getInitialState:w,...R(a),injectInto(I,{reducerPath:k,...T}={}){let D=k??a;return I.inject({reducerPath:D,reducer:b},T),{...E,...R(D,!0)}}};return E}}function M0(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 va=q0();function V0(){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 j0({type:e,reducerName:t,createNotation:r},n,o){let a,i;if("reducer"in n){if(r&&!U0(n))throw new Error(Yt(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 L0(e){return e._reducerDefinitionType==="asyncThunk"}function U0(e){return e._reducerDefinitionType==="reducerWithPrepare"}function Q0({type:e,reducerName:t},r,n,o){if(!o)throw new Error(Yt(18));let{payloadCreator:a,fulfilled:i,pending:p,rejected:f,settled:m,options:g}=r,v=o(e,a,g);n.exposeAction(t,v),i&&n.addCase(v.fulfilled,i),p&&n.addCase(v.pending,p),f&&n.addCase(v.rejected,f),m&&n.addMatcher(v.settled,m),n.exposeCaseReducer(t,{fulfilled:i||Ud,pending:p||Ud,rejected:f||Ud,settled:m||Ud})}function Ud(){}var B0="task",Sb="listener",vb="completed",mS="cancelled",G0=`task-${mS}`,$0=`task-${vb}`,pS=`${Sb}-${mS}`,H0=`${Sb}-${vb}`,zd=class{constructor(e){de(this,"code");de(this,"name","TaskAbortError");de(this,"message");this.code=e,this.message=`${B0} ${mS} (reason: ${e})`}},gS=(e,t)=>{if(typeof e!="function")throw new TypeError(Yt(32))},Qd=()=>{},Ab=(e,t=Qd)=>(e.catch(t),e),xb=(e,t)=>(e.addEventListener("abort",t,{once:!0}),()=>e.removeEventListener("abort",t)),ya=e=>{if(e.aborted)throw new zd(e.reason)};function Cb(e,t){let r=Qd;return new Promise((n,o)=>{let a=()=>o(new zd(e.reason));if(e.aborted){a();return}r=xb(e,a),t.finally(()=>r()).then(n,o)}).finally(()=>{r=Qd})}var z0=/*#__PURE__*/function(){var _ref5=_asyncToGenerator(function*(e,t){try{return yield Promise.resolve(),{status:"ok",value:yield e()}}catch(r){return{status:r instanceof zd?"cancelled":"rejected",error:r}}finally{t?.()}});return function z0(_x7,_x8){return _ref5.apply(this,arguments)}}(),Bd=e=>t=>Ab(Cb(e,t).then(r=>(ya(e),r))),bb=e=>{let t=Bd(e);return r=>t(new Promise(n=>setTimeout(n,r)))},{assign:Qi}=Object,lb={},Wd="listenerMiddleware",W0=(e,t)=>{let r=n=>xb(e,()=>n.abort(e.reason));return(n,o)=>{gS(n,"taskExecutor");let a=new s.AbortController;r(a);let i=z0(/*#__PURE__*/_asyncToGenerator(function*(){ya(e),ya(a.signal);let p=yield n({pause:Bd(a.signal),delay:bb(a.signal),signal:a.signal});return ya(a.signal),p}),()=>a.abort($0));return o?.autoJoin&&t.push(i.catch(Qd)),{result:Bd(e)(i),cancel(){a.abort(G0)}}}},K0=(e,t)=>{let r=/*#__PURE__*/function(){var _ref7=_asyncToGenerator(function*(n,o){ya(t);let a=()=>{},p=[new Promise((f,m)=>{let g=e({predicate:n,effect:(v,C)=>{C.unsubscribe(),f([v,C.getState(),C.getOriginalState()])}});a=()=>{g(),m()}})];o!=null&&p.push(new Promise(f=>setTimeout(f,o,null)));try{let f=yield Cb(t,Promise.race(p));return ya(t),f}finally{a()}});return function r(_x9,_x0){return _ref7.apply(this,arguments)}}();return(n,o)=>Ab(r(n,o))},wb=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(Yt(21));return gS(a,"options.listener"),{predicate:o,type:t,effect:a}},Rb=Qi(e=>{let{type:t,predicate:r,effect:n}=wb(e);return{id:Ku(),effect:n,type:t,predicate:r,pending:new Set,unsubscribe:()=>{throw new Error(Yt(22))}}},{withTypes:()=>Rb}),db=(e,t)=>{let{type:r,effect:n,predicate:o}=wb(t);return Array.from(e.values()).find(a=>(typeof r=="string"?a.type===r:a.predicate===o)&&a.effect===n)},fS=e=>{e.pending.forEach(t=>{t.abort(pS)})},Y0=(e,t)=>()=>{for(let r of t.keys())fS(r);e.clear()},pb=(e,t,r)=>{try{e(t,r)}catch(n){setTimeout(()=>{throw n},0)}},Fb=Qi(P(`${Wd}/add`),{withTypes:()=>Fb}),X0=P(`${Wd}/removeAll`),Eb=Qi(P(`${Wd}/remove`),{withTypes:()=>Eb}),J0=(...e)=>{console.error(`${Wd}/error`,...e)},Ib=(e={})=>{let t=new Map,r=new Map,n=h=>{let x=r.get(h)??0;r.set(h,x+1)},o=h=>{let x=r.get(h)??1;x===1?r.delete(h):r.set(h,x-1)},{extra:a,onError:i=J0}=e;gS(i,"onError");let p=h=>(h.unsubscribe=()=>t.delete(h.id),t.set(h.id,h),x=>{h.unsubscribe(),x?.cancelActive&&fS(h)}),f=h=>{let x=db(t,h)??Rb(h);return p(x)};Qi(f,{withTypes:()=>f});let m=h=>{let x=db(t,h);return x&&(x.unsubscribe(),h.cancelActive&&fS(x)),!!x};Qi(m,{withTypes:()=>m});let g=/*#__PURE__*/function(){var _ref8=_asyncToGenerator(function*(h,x,b,w){let R=new s.AbortController,E=K0(f,R.signal),I=[];try{h.pending.add(R),n(h),yield Promise.resolve(h.effect(x,Qi({},b,{getOriginalState:w,condition:(k,T)=>E(k,T).then(Boolean),take:E,delay:bb(R.signal),pause:Bd(R.signal),extra:a,signal:R.signal,fork:W0(R.signal,I),unsubscribe:h.unsubscribe,subscribe:()=>{t.set(h.id,h)},cancelActiveListeners:()=>{h.pending.forEach((k,T,D)=>{k!==R&&(k.abort(pS),D.delete(k))})},cancel:()=>{R.abort(pS),h.pending.delete(R)},throwIfCancelled:()=>{ya(R.signal)}})))}catch(k){k instanceof zd||pb(i,k,{raisedBy:"effect"})}finally{yield Promise.all(I),R.abort(H0),o(h),h.pending.delete(R)}});return function g(_x1,_x10,_x11,_x12){return _ref8.apply(this,arguments)}}(),v=Y0(t,r);return{middleware:h=>x=>b=>{if(!ku(b))return x(b);if(Fb.match(b))return f(b.payload);if(X0.match(b)){v();return}if(Eb.match(b))return m(b.payload);let w=h.getState(),R=()=>{if(w===lb)throw new Error(Yt(23));return w},E;try{if(E=x(b),t.size>0){let I=h.getState(),k=Array.from(t.values());for(let T of k){let D=!1;try{D=T.predicate(b,I,w)}catch(G){D=!1,pb(i,G,{raisedBy:"predicate"})}D&&g(T,b,h,R)}}}finally{w=lb}return E},startListening:f,stopListening:m,clearListeners:v}};function Yt(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 Tb(){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 Pb=/^(?:[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 Z0(e){return typeof e=="string"&&Pb.test(e)}var hS=Z0;d();c();l();u();var Ot=[];for(let e=0;e<256;++e)Ot.push((e+256).toString(16).slice(1));function kb(e,t=0){return(Ot[e[t+0]]+Ot[e[t+1]]+Ot[e[t+2]]+Ot[e[t+3]]+"-"+Ot[e[t+4]]+Ot[e[t+5]]+"-"+Ot[e[t+6]]+Ot[e[t+7]]+"-"+Ot[e[t+8]]+Ot[e[t+9]]+"-"+Ot[e[t+10]]+Ot[e[t+11]]+Ot[e[t+12]]+Ot[e[t+13]]+Ot[e[t+14]]+Ot[e[t+15]]).toLowerCase()}d();c();l();u();var yS,eD=new Uint8Array(16);function SS(){if(!yS){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");yS=crypto.getRandomValues.bind(crypto)}return yS(eD)}d();c();l();u();d();c();l();u();var tD=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),vS={randomUUID:tD};function rD(e,t,r){e=e||{};let n=e.random??e.rng?.()??SS();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 kb(n)}function nD(e,t,r){return vS.randomUUID&&!t&&!e?vS.randomUUID():rD(e,t,r)}var AS=nD;function oD(_x13){return _oD.apply(this,arguments)}function _oD(){_oD=_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 _oD.apply(this,arguments)}var Mb="2.1.1",xS=128,Vb=192,Ob=224,_b=240,aD=248;function iD(e){return(e&aD)===_b?4:(e&_b)===Ob?3:(e&Ob)===Vb?2:1}function sD(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&xS)!=xS)break;if(r-=3,(n&Vb)!=xS){t-r>=iD(n)*3&&(r=t);break}}return e.substring(0,r)}function cD(e){let{trackingId:t}=e;return{trackingId:t}}function uD(e){return(e.source||[]).concat([`relay@${Mb}`])}function jb(e,t,r){let{getReferrer:n,getLocation:o,getUserAgent:a}=r,i=cD(t),p=r.getClientId();return Object.freeze({type:e,config:i,ts:Date.now(),source:uD(t),clientId:p,userAgent:a(),referrer:Nb(n()),location:Nb(o())})}function Nb(e){return e!==null?sD(e,1024):null}function lD(e,t,r,n){return{...t,meta:jb(e,r,n)}}var dD="*";function pD(){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===dD)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 Db({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 fD(e){let t=Db(e);return{get:()=>t,update:r=>{t=Db({...t,...r})}}}var CS=mD();function mD(){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 gD(){return{getItem(e){return CS.getItem(e)||localStorage.getItem(e)},removeItem(e){CS.removeItem(e),localStorage.removeItem(e)},setItem(e,t){localStorage.setItem(e,t),CS.setItem(e,t,31556952e3)}}}var qb="visitorId";function hD(){let e=document.referrer;return e===""?null:e}function bS(){let e=gD();return{runtime:"browser",send:function(){var _ref9=_asyncToGenerator(function*(t,r,n){let o=S(t,{method:"POST",body:JSON.stringify([n]),keepalive:!0,headers:{"Content-Type":"application/json",Authorization:`Bearer ${r}`}});Tb().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:()=>hD(),getLocation:()=>window.location.href,getUserAgent:()=>navigator.userAgent,getClientId:()=>{let t=e.getItem(qb);if(t&&hS(t))return t;let r=AS();return e.setItem(qb,r),r}}}function yD(){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 SD(){return{runtime:"null",send:()=>Promise.resolve(void 0),getReferrer:()=>null,getLocation:()=>null,getUserAgent:()=>null,getClientId:()=>""}}function vD(e){let t=e.get().mode!=="disabled",r=e.get().environment,n=SD();return t&&r?{...r,runtime:"custom"}:t&&AD()&&yD()?bS():n}function AD(){try{return typeof window=="object"}catch{return!1}}function xD(e){return{get:()=>Object.freeze(vD(e))}}function Lb(e){let t=fD(e),r=pD(),n=xD(t);return{emit:function(){var _ref0=_asyncToGenerator(function*(o,a){let i=t.get(),p=n.get(),f=lD(o,a,i,p);return oD({config:i,environment:p,event:f,listenerManager:r})});return function emit(_x17,_x18){return _ref0.apply(this,arguments)}}(),getMeta:o=>jb(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:Mb}}d();c();l();u();function Ub(){return typeof window<"u"&&typeof document<"u"}d();c();l();u();d();c();l();u();var Ao="3.51.2",Qb=["@coveo/atomic","@coveo/quantic"];var $i=et(e=>e.source,e=>Object.entries(e).map(([t,r])=>`${t}@${r}`).concat(`@coveo/headless@${Ao}`));var Yu=et(e=>e.configuration.organizationId,e=>e.configuration.environment,e=>e.configuration.accessToken,e=>e.configuration.analytics,e=>$i(e.configuration.analytics),(e,t)=>t,(e,t,r,{trackingId:n,apiBaseUrl:o,enabled:a},i,p)=>{let f=bD(p);return Lb({mode:a?"emit":"disabled",url:o??Ad(e,t),token:r,trackingId:n??null,source:i,environment:f})}),CD={getClientId:()=>"",getLocation:()=>null,getReferrer:()=>null,getUserAgent:()=>null,send:function(){var _ref1=_asyncToGenerator(function*(){});return function send(){return _ref1.apply(this,arguments)}}()},bD=e=>{if(!e)return;let t=e();return{...(Ub()?bS():CD),getClientId:()=>t.clientId,getLocation:()=>t.location,getReferrer:()=>t.referrer,getUserAgent:()=>t.userAgent}};d();c();l();u();d();c();l();u();function zn(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 B(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(v){i(v)}}function f(g){try{m(n.throw(g))}catch(v){i(v)}}function m(g){g.done?a(g.value):o(g.value).then(p,f)}m((n=n.apply(e,t||[])).next())})}var _e;(function(e){e.search="search",e.click="click",e.custom="custom",e.view="view",e.collect="collect"})(_e||(_e={}));function FS(){return typeof window<"u"}function jS(){return typeof navigator<"u"}function Hi(){return typeof document<"u"}function ES(){try{return typeof localStorage<"u"}catch{return!1}}function wD(){try{return typeof sessionStorage<"u"}catch{return!1}}function rw(){return jS()&&navigator.cookieEnabled}var RD=[_e.click,_e.custom,_e.search,_e.view],FD=(e,t)=>RD.indexOf(e)!==-1?Object.assign({language:Hi()?document.documentElement.lang:"unknown",userAgent:jS()?navigator.userAgent:"unknown"},t):t,Ju=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?Bb(t,r,a):(i=p.split("."),o=i[i.length-2]+"."+i[i.length-1],Bb(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 Bb(e,t,r,n){document.cookie=`${e}=${t}`+(r?`;expires=${r.toUTCString()}`:"")+(n?`;domain=${n}`:"")+";path=/;SameSite=Lax"}function ED(){return ES()?localStorage:rw()?new Zu:wD()?sessionStorage:new Wi}var Zu=class e{getItem(t){return Ju.get(`${e.prefix}${t}`)}removeItem(t){Ju.erase(`${e.prefix}${t}`)}setItem(t,r,n){Ju.set(`${e.prefix}${t}`,r,n)}};Zu.prefix="coveo_";var IS=class{constructor(){this.cookieStorage=new Zu}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)}},Wi=class{getItem(t){return null}removeItem(t){}setItem(t,r){}},Kd="__coveo.analytics.history",ID=20,TD=1e3*60,PD=75,Jd=class{constructor(t){this.store=t||ED()}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 B(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 B(this,void 0,void 0,function*(){let t=yield this.getHistoryWithInternalTimeAsync();return this.stripEmptyQueries(this.stripInternalTime(t))})}getHistoryWithInternalTime(){try{let t=this.store.getItem(Kd);return t&&typeof t=="string"?JSON.parse(t):[]}catch{return[]}}getHistoryWithInternalTimeAsync(){return B(this,void 0,void 0,function*(){try{let t=yield this.store.getItem(Kd);return t?JSON.parse(t):[]}catch{return[]}})}setHistory(t){try{this.store.setItem(Kd,JSON.stringify(t.slice(0,ID)))}catch{}}clear(){try{this.store.removeItem(Kd)}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,PD)),t}isValidEntry(t){let r=this.getMostRecentElement();return r&&r.value==t.value?(t.internalTime||0)-(r.internalTime||0)>TD:!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 kD=(e,t)=>B(void 0,void 0,void 0,function*(){return e===_e.view?(yield OD(t.contentIdValue),Object.assign({location:window.location.toString(),referrer:document.referrer,title:document.title},t)):t}),OD=e=>B(void 0,void 0,void 0,function*(){let t=new Jd,r={name:"PageView",value:e,time:new Date().toISOString()};yield t.addElementAsync(r)}),Yd,_D=new Uint8Array(16);function ND(){if(!Yd&&(Yd=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Yd))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Yd(_D)}var DD=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function Zd(e){return typeof e=="string"&&DD.test(e)}var _t=[];for(let e=0;e<256;++e)_t.push((e+256).toString(16).slice(1));function nw(e,t=0){return _t[e[t+0]]+_t[e[t+1]]+_t[e[t+2]]+_t[e[t+3]]+"-"+_t[e[t+4]]+_t[e[t+5]]+"-"+_t[e[t+6]]+_t[e[t+7]]+"-"+_t[e[t+8]]+_t[e[t+9]]+"-"+_t[e[t+10]]+_t[e[t+11]]+_t[e[t+12]]+_t[e[t+13]]+_t[e[t+14]]+_t[e[t+15]]}function qD(e){if(!Zd(e))throw TypeError("Invalid UUID");let t,r=new Uint8Array(16);return r[0]=(t=parseInt(e.slice(0,8),16))>>>24,r[1]=t>>>16&255,r[2]=t>>>8&255,r[3]=t&255,r[4]=(t=parseInt(e.slice(9,13),16))>>>8,r[5]=t&255,r[6]=(t=parseInt(e.slice(14,18),16))>>>8,r[7]=t&255,r[8]=(t=parseInt(e.slice(19,23),16))>>>8,r[9]=t&255,r[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,r[11]=t/4294967296&255,r[12]=t>>>24&255,r[13]=t>>>16&255,r[14]=t>>>8&255,r[15]=t&255,r}function MD(e){e=unescape(encodeURIComponent(e));let t=[];for(let r=0;r<e.length;++r)t.push(e.charCodeAt(r));return t}var VD="6ba7b810-9dad-11d1-80b4-00c04fd430c8",jD="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function LD(e,t,r){function n(o,a,i,p){var f;if(typeof o=="string"&&(o=MD(o)),typeof a=="string"&&(a=qD(a)),((f=a)===null||f===void 0?void 0:f.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let m=new Uint8Array(16+o.length);if(m.set(a),m.set(o,a.length),m=r(m),m[6]=m[6]&15|t,m[8]=m[8]&63|128,i){p=p||0;for(let g=0;g<16;++g)i[p+g]=m[g];return i}return nw(m)}try{n.name=e}catch{}return n.DNS=VD,n.URL=jD,n}var UD=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Gb={randomUUID:UD};function Aa(e,t,r){if(Gb.randomUUID&&!t&&!e)return Gb.randomUUID();e=e||{};let n=e.random||(e.rng||ND)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,t){r=r||0;for(let o=0;o<16;++o)t[r+o]=n[o];return t}return nw(n)}function QD(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 wS(e,t){return e<<t|e>>>32-t}function BD(e){let t=[1518500249,1859775393,2400959708,3395469782],r=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof e=="string"){let i=unescape(encodeURIComponent(e));e=[];for(let p=0;p<i.length;++p)e.push(i.charCodeAt(p))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);let n=e.length/4+2,o=Math.ceil(n/16),a=new Array(o);for(let i=0;i<o;++i){let p=new Uint32Array(16);for(let f=0;f<16;++f)p[f]=e[i*64+f*4]<<24|e[i*64+f*4+1]<<16|e[i*64+f*4+2]<<8|e[i*64+f*4+3];a[i]=p}a[o-1][14]=(e.length-1)*8/Math.pow(2,32),a[o-1][14]=Math.floor(a[o-1][14]),a[o-1][15]=(e.length-1)*8&4294967295;for(let i=0;i<o;++i){let p=new Uint32Array(80);for(let h=0;h<16;++h)p[h]=a[i][h];for(let h=16;h<80;++h)p[h]=wS(p[h-3]^p[h-8]^p[h-14]^p[h-16],1);let f=r[0],m=r[1],g=r[2],v=r[3],C=r[4];for(let h=0;h<80;++h){let x=Math.floor(h/20),b=wS(f,5)+QD(x,m,g,v)+C+t[x]+p[h]>>>0;C=v,v=g,g=wS(m,30)>>>0,m=f,f=b}r[0]=r[0]+f>>>0,r[1]=r[1]+m>>>0,r[2]=r[2]+g>>>0,r[3]=r[3]+v>>>0,r[4]=r[4]+C>>>0}return[r[0]>>24&255,r[0]>>16&255,r[0]>>8&255,r[0]&255,r[1]>>24&255,r[1]>>16&255,r[1]>>8&255,r[1]&255,r[2]>>24&255,r[2]>>16&255,r[2]>>8&255,r[2]&255,r[3]>>24&255,r[3]>>16&255,r[3]>>8&255,r[3]&255,r[4]>>24&255,r[4]>>16&255,r[4]>>8&255,r[4]&255]}var GD=LD("v5",80,BD),$b=GD,ow="2.30.55",Hb=e=>`${e.protocol}//${e.hostname}${e.pathname.indexOf("/")===0?e.pathname:`/${e.pathname}`}${e.search}`,Xu={pageview:"pageview",event:"event"},ep=class{constructor({client:t,uuidGenerator:r=Aa}){this.client=t,this.uuidGenerator=r}},TS=class extends ep{constructor({client:t,uuidGenerator:r=Aa}){super({client:t,uuidGenerator:r}),this.actionData={},this.pageViewId=r(),this.nextPageViewId=this.pageViewId,this.currentLocation=Hb(window.location),this.lastReferrer=Hi()?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:Hi()?document.title:"",encoding:Hi()?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===Xu.pageview&&(this.nextPageViewId=this.uuidGenerator(),this.hasSentFirstPageView=!0)}getNextValues(t,r){return{pageViewId:t===Xu.pageview?this.nextPageViewId:this.pageViewId,referrer:t===Xu.pageview&&this.hasSentFirstPageView?this.currentLocation:this.lastReferrer,location:t===Xu.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 Hb(window.location)}},xo=class e{constructor(t,r){if(!Zd(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 Zd(a)?new e(a,Number.parseInt(o)*1e3):null}};xo.cvo_cid="cvo_cid";xo.expirationTime=120;var PS=class extends ep{constructor({client:t,uuidGenerator:r=Aa}){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 B(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(xo.cvo_cid,new xo(n,Date.now()).toString()),r.toString()}catch{throw new Error("Invalid URL provided")}})}acceptFrom(t){this.client.setAcceptedLinkReferrers(t)}};PS.Id="link";var yr=Object.keys;function Xd(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}var RS=128,aw=192,zb=224,Wb=240;function $D(e){return(e&248)===Wb?4:(e&Wb)===zb?3:(e&zb)===aw?2:1}function HD(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&RS)!=RS)break;if(r-=3,(n&aw)!=RS){t-r>=$D(n)*3&&(r=t);break}}return e.substring(0,r)}var kS={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"},zD=yr(kS).map(e=>kS[e]),WD=[...zD].join("|"),KD=new RegExp(`^(${WD}$)`),YD={svcAction:"svc_action",svcActionData:"svc_action_data"},XD=e=>yr(e).filter(t=>e[t]!==void 0).reduce((t,r)=>{let n=kS[r]||r;return Object.assign(Object.assign({},t),{[n]:e[r]})},{}),JD=e=>KD.test(e),ZD=[JD],Kb={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",price:"pr",quantity:"qt",coupon:"cc",position:"ps",group:"group"},Yb={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",position:"ps",price:"pr",group:"group"},Mt={action:"pa",list:"pal",listSource:"pls"},tp={id:"ti",revenue:"tr",tax:"tt",shipping:"ts",coupon:"tcc",affiliation:"ta",step:"cos",option:"col"},eq=["loyaltyCardId","loyaltyTier","thirdPartyPersona","companyName","favoriteStore","storeName","userIndustry","userRole","userDepartment","businessUnit"],OS={id:"quoteId",affiliation:"quoteAffiliation"},_S={id:"reviewId",rating:"reviewRating",comment:"reviewComment"},tq={add:Mt,bookmark_add:Mt,bookmark_remove:Mt,click:Mt,checkout:Mt,checkout_option:Mt,detail:Mt,impression:Mt,remove:Mt,refund:Object.assign(Object.assign({},Mt),tp),purchase:Object.assign(Object.assign({},Mt),tp),quickview:Mt,quote:Object.assign(Object.assign({},Mt),OS),review:Object.assign(Object.assign({},Mt),_S)},rq=yr(Kb).map(e=>Kb[e]),nq=yr(Yb).map(e=>Yb[e]),oq=yr(Mt).map(e=>Mt[e]),aq=yr(tp).map(e=>tp[e]),iq=yr(_S).map(e=>_S[e]),sq=yr(OS).map(e=>OS[e]),cq=[...rq,"custom"].join("|"),uq=[...nq,"custom"].join("|"),iw="(pr[0-9]+)",sw="(il[0-9]+pi[0-9]+)",lq=new RegExp(`^${iw}(${cq})$`),dq=new RegExp(`^(${sw}(${uq}))|(il[0-9]+nm)$`),pq=new RegExp(`^(${oq.join("|")})$`),fq=new RegExp(`^(${aq.join("|")})$`),mq=new RegExp(`^${iw}custom$`),gq=new RegExp(`^${sw}custom$`),hq=new RegExp(`^(${[...eq,...iq,...sq].join("|")})$`),yq=e=>lq.test(e),Sq=e=>dq.test(e),vq=e=>pq.test(e),Aq=e=>fq.test(e),xq=e=>hq.test(e),Cq=[Sq,yq,vq,Aq,xq],bq=[mq,gq],wq={anonymizeIp:"aip"},Rq={eventCategory:"ec",eventAction:"ea",eventLabel:"el",eventValue:"ev",page:"dp",visitorId:"cid",clientId:"cid",userId:"uid",currencyCode:"cu"},Fq={hitType:"t",pageViewId:"pid",encoding:"de",location:"dl",referrer:"dr",screenColor:"sd",screenResolution:"sr",title:"dt",userAgent:"ua",language:"ul",eventId:"z",time:"tm"},Eq=["contentId","contentIdKey","contentType","searchHub","tab","searchUid","permanentId","contentLocale","trackingId"],Iq=Object.assign(Object.assign(Object.assign(Object.assign({},wq),Rq),Fq),Eq.reduce((e,t)=>Object.assign(Object.assign({},e),{[t]:t}),{})),NS=Object.assign(Object.assign({},Iq),YD),Tq=e=>{let t=!!e.action&&tq[e.action]||{};return yr(e).reduce((r,n)=>{let o=t[n]||NS[n]||n;return Object.assign(Object.assign({},r),{[o]:e[n]})},{})},Pq=yr(NS).map(e=>NS[e]),kq=e=>Pq.indexOf(e)!==-1,Oq=e=>e==="custom",_q=e=>[...Cq,...ZD,kq,Oq].some(t=>t(e)),Nq=e=>yr(e).reduce((t,r)=>{let n=Dq(r);return n?Object.assign(Object.assign({},t),qq(n,e[r])):Object.assign(Object.assign({},t),{[r]:e[r]})},{}),Dq=e=>{let t;return[...bq].every(r=>{var n;return t=(n=r.exec(e))===null||n===void 0?void 0:n[1],!t}),t},qq=(e,t)=>yr(t).reduce((r,n)=>Object.assign(Object.assign({},r),{[`${e}${n}`]:t[n]}),{}),DS=class{constructor(t){this.opts=t}sendEvent(t,r){return B(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 B(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 B(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[_e.click,_e.custom,_e.search,_e.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}},qS=class{sendEvent(t,r){return B(this,void 0,void 0,function*(){return Promise.resolve()})}deleteHttpCookieVisitorId(){return B(this,void 0,void 0,function*(){return Promise.resolve()})}},Xb=y.fetch,rp=class{constructor(t){this.opts=t}sendEvent(t,r){return B(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=zn(f,["url"]),v;try{v=yield Xb(m,g)}catch(C){console.error("An error has occured when sending the event.",C);return}if(v.ok){let C=yield v.json();return C.visitorId&&o.setCurrentVisitorId(C.visitorId),C}else{try{v.json()}catch{}throw console.error(`An error has occured when sending the "${t}" event.`,v,r),new Error(`An error has occurred when sending the "${t}" event. Check the console logs for more details.`)}})}deleteHttpCookieVisitorId(){return B(this,void 0,void 0,function*(){let{baseUrl:t}=this.opts,r=`${t}/analytics/visit`;yield Xb(r,{headers:this.getHeaders(),method:"DELETE"})})}shouldAppendVisitorId(t){return[_e.click,_e.custom,_e.search,_e.view].indexOf(t)!==-1}getVisitorIdParam(){return B(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"})}},MS=class{constructor(t,r){ES()&&rw()?this.storage=new IS:ES()?this.storage=localStorage:(console.warn("BrowserRuntime detected no valid storage available.",this),this.storage=new Wi),this.client=new rp(t),this.beaconClient=new DS(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}},VS=class{constructor(t,r){this.storage=r||new Wi,this.client=new rp(t)}getClientDependingOnEventType(t){return this.client}},np=class{constructor(){this.storage=new Wi,this.client=new qS}getClientDependingOnEventType(t){return this.client}},Mq="xx",Vq=e=>e?.startsWith(Mq)||!1,jq=`
|
|
28
|
+
${g}`:g;break;case"event":n.event=g;break;case"id":e(n.id=g);break;case"retry":nN(g,n,t);break}}}}function nN(e,t,r){let n=parseInt(e,10);Number.isNaN(n)||r(t.retry=n)}function oN(e,t){let r=new Uint8Array(e.length+t.length);return r.set(e),r.set(t,e.length),r}function iC(){return{data:"",event:"",id:"",retry:void 0}}var Vy="text/event-stream",aN=1e3,lC="last-event-id";function dC(){return typeof window<"u"}function hd(e,{signal:t,headers:r,onopen:n,onmessage:o,onclose:a,onerror:i,openWhenHidden:p,fetch:f,...m}){return new Promise((g,v)=>{let C={...r};C.accept||(C.accept=Vy);let h;function x(){h?.abort(),document.hidden||k()}!p&&dC()&&document.addEventListener("visibilitychange",x);let b=aN,w;function R(){dC()&&document.removeEventListener("visibilitychange",x),clearTimeout(w),h?.abort()}t?.addEventListener("abort",()=>{R(),g()});let E=f??S,I=n??iN;function k(){return _k2.apply(this,arguments)}function _k2(){_k2=_asyncToGenerator(function*(){h=s.AbortController?new s.AbortController:null;try{let T=yield E(e,{...m,headers:C,signal:h?.signal});yield I(T),yield sC(T.body,cC(uC(D=>{D?C[lC]=D:delete C[lC]},D=>{b=D},o))),a?.(),R(),g()}catch(T){if(!h?.signal?.aborted)try{let D=i?.(T)??b;clearTimeout(w),w=setTimeout(k,D)}catch(D){R(),v(D)}}});return _k2.apply(this,arguments)}k()})}function iN(e){let t=e.headers.get("content-type");if(!t?.startsWith(Vy))throw new Error(`Expected content-type to be ${Vy}, Actual: ${t}`)}d();c();l();u();var ho=class{constructor(t){de(this,"_basePath");de(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 sN=(e,t,r)=>new ho(`${e}/rest/organizations/${t}/machinelearning/streaming/${r}`).href,pC=3,cN=5e3,uN="text/event-stream",Uy=1,jy=class extends Error{},Eu=class extends Error{constructor(r){super(r.message);de(this,"payload",r)}},Ly=class{constructor(){de(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)}},yd=class{constructor(t){de(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,v=new Ly;if(!a){this.logger.error("No stream ID found");return}let C=0,h,x=()=>{h&&!v.isActive(h)&&(w?.abort(),g(),R())},b=()=>{v.remove(h),h=aC(x,h,cN),v.add(h)},w=new s.AbortController,R=()=>hd(sN(n,o,a),{method:"GET",fetch:S,headers:{Authorization:`Bearer ${i}`,accept:"*/*"},openWhenHidden:!0,signal:w?.signal,onopen(E){return _asyncToGenerator(function*(){if(E.ok&&E.headers.get("content-type")===uN)return;throw E.status>=400&&E.status<500&&E.status!==429?new Eu({message:"Error opening stream",code:E.status}):new jy})()},onmessage:E=>{if(w?.signal.aborted)return;let I=JSON.parse(E.data);if(I.finishReason==="ERROR"){v.remove(h),w?.abort(),f({message:I.errorMessage,code:I.statusCode});return}p(I),C=0,I.finishReason==="COMPLETED"?(v.remove(h),m()):b()},onerror:E=>{if(!w?.signal.aborted){if(v.remove(h),E instanceof Eu)throw w?.abort(),f(E),E;if(++C>pC){this.logger.info("Maximum retry exceeded.");let I={message:"Failed to complete stream.",code:Uy};throw w?.abort(),f(I),new Eu(I)}this.logger.info(`Retrying...(${C}/${pC})`),g()}}});return R(),w}};d();c();l();u();var Sd=e=>e;d();c();l();u();d();c();l();u();function Mi(){return{answerSnippet:"",documentId:{contentIdKey:"",contentIdValue:""},question:"",relatedQuestions:[],score:0}}function ar(){return{response:{results:[],searchUid:"",totalCountFiltered:0,facets:[],generateAutomaticFacets:{facets:[]},queryCorrections:[],triggers:[],questionAnswer:Mi(),pipeline:"",splitTestRun:"",termsToHighlight:{},phrasesToHighlight:{},extendedResults:{}},duration:0,queryExecuted:"",error:null,automaticallyCorrected:!1,isLoading:!1,results:[],searchResponseId:"",requestId:"",questionAnswer:Mi(),extendedResults:{},searchAction:void 0}}d();c();l();u();function yo(e){let{url:t,accessToken:r,organizationId:n,authentication:o,...a}=e;return a}var So=e=>{let{response:t}=e;return t.body?lN(e):dN(t)},lN=e=>fN(e)?mN(e):pN(e)?e.body:{message:"unknown",statusCode:0,type:"unknown"},dN=e=>{let t=JSON.parse(JSON.stringify(e,Object.getOwnPropertyNames(e)));return{...t,message:`Client side error: ${t.message||""}`,statusCode:400,type:"ClientError"}};function pN(e){return e.body.statusCode!==void 0}function fN(e){return e.body.exception!==void 0}var mN=e=>({message:e.body.exception.code,statusCode:e.response.status,type:e.body.exception.code});d();c();l();u();var wC=Vr(AC(),1);d();c();l();u();var K=new Error("Failed to load reducers."),Vi=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."}},da=class extends Error{constructor(r,n){super();de(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 xC(e){let t=[];for(let r in e){let n=encodeURIComponent(r),o=encodeURIComponent(e[r]);t.push(`${n}=${o}`)}return t.join("&")}function CC(e){return typeof e!="object"||!e?!1:Object.values(e).every(LN)}function LN(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"}function bC(e){return e===429}var jr=class e{static call(t){return _asyncToGenerator(function*(){let r=UN(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 S(a,i);if(bC(f.status))throw f;return f});return function p(){return _ref.apply(this,arguments)}}();try{let f=yield(0,wC.backOff)(p,{startingDelay:100,timeMultiple:2,maxDelay:800,numOfAttempts:4,jitter:"full",retry:function(){var _ref2=_asyncToGenerator(function*(m){let g=m&&bC(m.status);return g&&(n.info("Platform retrying request"),yield new Promise(v=>setTimeout(v,1e3))),g});return function retry(_x4){return _ref2.apply(this,arguments)}}()});switch(f.status){case 419:case 401:throw n.info("Platform renewing token"),new Vi;case 404:throw new da(a,f.status);default:return n.info({response:f,requestInfo:o},"Platform response"),f}}catch(f){return f.message==="Failed to fetch"?new da(a):f}})()}static preprocessRequest(t,r){return _asyncToGenerator(function*(){let{origin:n,preprocessRequest:o,logger:a,requestMetadata:i}=r,{signal:p,...f}=t,m=Fu(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 mr(e,t="prod",r="platform"){let n=t==="prod"?"":t,o=r==="platform"?"":`.${r}`;return`https://${e}${o}.org${n}.coveo.com`}function ji(e,t,r="prod"){return e??mr(t,r)}function St(e,t="prod"){return`${mr(e,t)}/rest/search/v2`}function Ad(e,t="prod"){return`${mr(e,t,"analytics")}/rest/organizations/${e}/events/v1`}function UN(e){let{url:t,method:r,requestParams:n,contentType:o,accessToken:a,signal:i}=e,p=e.method==="POST"||e.method==="PUT",f=QN(n,o);return{url:t,method:r,headers:{"Content-Type":o,Authorization:`Bearer ${a}`,...e.headers},...(p&&{body:f}),signal:i}}function QN(e,t){return t==="application/x-www-form-urlencoded"?CC(e)?xC(e):"":JSON.stringify(e)}d();c();l();u();var vo=class{constructor(){de(this,"currentAbortController",null)}enqueue(t,r){var _this=this;return _asyncToGenerator(function*(){let n=_this.currentAbortController;_this.currentAbortController=new s.AbortController;let o=_this.currentAbortController;n&&(r.warnOnAbort&&r.logger.warn("Cancelling current pending search query"),n.abort());try{return yield t(o?.signal??null)}finally{_this.currentAbortController===o&&(_this.currentAbortController=null)}})()}};d();c();l();u();d();c();l();u();function RC(e){return((e.headers.get("content-type")||"").split(";").find(n=>n.indexOf("charset=")!==-1)||"").split("=")[1]||"UTF-8"}d();c();l();u();var Qn=(e,t,r,n)=>{let o=new ho(`${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 FC=(e,t)=>{let r=new ho(`${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},EC=/*#__PURE__*/function(){var _ref3=_asyncToGenerator(function*(e,t){let r=yield jr.call({...Qn(e,"POST","application/x-www-form-urlencoded","/html"),requestParams:yo(e),requestMetadata:{method:"html"},...t});if(r instanceof Error)throw r;let n=RC(r),o=yield r.arrayBuffer(),i=new TextDecoder(n).decode(o);return BN(i)?{success:i}:{error:So({response:r,body:i})}});return function EC(_x5,_x6){return _ref3.apply(this,arguments)}}();function BN(e){return typeof e=="string"}d();c();l();u();function GN(e){return{statusCode:e.statusCode,type:e.name,message:e.message}}function $N(e){return{statusCode:e.code,type:e.name,message:e.message,ignored:!0}}function xd(e,t){if(t&&e.name==="AbortError")return{error:$N(e)};if(e instanceof da)return{error:GN(e)};throw e}var Cd=class{constructor(t){de(this,"options",t);de(this,"apiCallsQueues",{unknown:new vo,mainSearch:new vo,facetValues:new vo,foldingCollection:new vo,instantResults:new vo})}plan(t){var _this2=this;return _asyncToGenerator(function*(){let r=yield jr.call({...Qn(t,"POST","application/json","/plan"),requestParams:yo(t),requestMetadata:{method:"plan"},..._this2.options});if(r instanceof Error)return xd(r);let n=yield r.json();return zN(n)?{success:n}:{error:So({response:r,body:n})}})()}querySuggest(t){var _this3=this;return _asyncToGenerator(function*(){let r=yield jr.call({...Qn(t,"POST","application/json","/querySuggest"),requestMetadata:{method:"querySuggest"},requestParams:yo(t),..._this3.options});if(r instanceof Error)return xd(r);let n=yield r.json(),o={response:r,body:n};return HN(n)?{success:(yield _this3.options.postprocessQuerySuggestResponseMiddleware(o)).body}:{error:So(o)}})()}search(t,r){var _this4=this;return _asyncToGenerator(function*(){let n=r?.origin??"unknown",o=yield _this4.apiCallsQueues[n].enqueue(p=>jr.call({...Qn(t,"POST","application/json",""),requestParams:yo(t),requestMetadata:{method:"search",origin:r?.origin},..._this4.options,signal:p??void 0}),{logger:_this4.options.logger,warnOnAbort:!r?.disableAbortWarning});if(o instanceof Error)return xd(o,r?.disableAbortWarning);let a=yield o.json(),i={response:o,body:a};return IC(a)?(i.body=TC(a),{success:(yield _this4.options.postprocessSearchResponseMiddleware(i)).body}):{error:So(i)}})()}facetSearch(t){var _this5=this;return _asyncToGenerator(function*(){let r=yield jr.call({...Qn(t,"POST","application/json","/facet"),requestParams:yo(t),requestMetadata:{method:"facetSearch"},..._this5.options});if(r instanceof Error)throw r;let n=yield r.json(),o={response:r,body:n};return(yield _this5.options.postprocessFacetSearchResponseMiddleware(o)).body})()}recommendations(t){var _this6=this;return _asyncToGenerator(function*(){let r=yield jr.call({...Qn(t,"POST","application/json",""),requestParams:yo(t),requestMetadata:{method:"recommendations"},..._this6.options});if(r instanceof Error)throw r;let n=yield r.json();if(IC(n)){let o={response:r,body:n};return o.body=TC(n),{success:(yield _this6.options.postprocessSearchResponseMiddleware(o)).body}}return{error:So({response:r,body:n})}})()}html(t){var _this7=this;return _asyncToGenerator(function*(){return EC(t,{..._this7.options})})()}fieldDescriptions(t){var _this8=this;return _asyncToGenerator(function*(){let r=yield jr.call({...Qn(t,"GET","application/json","/fields"),requestParams:{},requestMetadata:{method:"fieldDescriptions"},..._this8.options});if(r instanceof Error)throw r;let n=yield r.json();return WN(n)?{success:n}:{error:So({response:r,body:n})}})()}},bd=e=>e.success!==void 0,vt=e=>e.error!==void 0;function IC(e){return e.results!==void 0}function TC(e){let t=Mi();return fe(e.questionAnswer)?(e.questionAnswer=t,e):(e.questionAnswer={...t,...e.questionAnswer},e)}function HN(e){return e.completions!==void 0}function zN(e){return e.preprocessingOutput!==void 0}function WN(e){return e.fields!==void 0}d();c();l();u();var PC=e=>e,kC=e=>e,OC=e=>e;d();c();l();u();d();c();l();u();var W=new U({required:!0,emptyAllowed:!1}),st=new U({required:!1,emptyAllowed:!1}),Be=new U({required:!0,emptyAllowed:!0}),lK=new U({required:!1,emptyAllowed:!0}),wd=new ie({each:W,required:!0}),_C=new U({required:!1,emptyAllowed:!1,regex:/^\d+\.\d+\.\d+$/}),NC=new U({required:!1,emptyAllowed:!1,regex:/^[a-zA-Z0-9_\-.]{1,100}$/}),dK=new U({required:!0,emptyAllowed:!1,regex:/^[a-zA-Z0-9_\-.]{1,100}$/}),Bn=({message:e,name:t,stack:r})=>({message:e,name:t,stack:r}),gr=(e,t)=>{if("required"in t)return{payload:new Se({value:t}).validate({value:e}).value};let o=new J({options:{required:!0},values:t}).validate(e);if(o)throw new wu(o);return{payload:e}},O=(e,t)=>{try{return gr(e,t)}catch(r){return{payload:e,error:Bn(r)}}},lt=(e,t,r,n)=>{let o=`Check the initialState of ${n}`;return DC(e,t,r,o,"Controller initialization error")},$e=(e,t,r,n)=>{let o=`Check the options of ${n}`;return DC(e,t,r,o,"Controller initialization error")},DC=(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 Pt(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 KN=typeof Symbol=="function"&&Symbol.observable||"@@observable",qC=KN,Yy=()=>Math.random().toString(36).substring(7).split("").join("."),YN={INIT:`@@redux/INIT${Yy()}`,REPLACE:`@@redux/REPLACE${Yy()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Yy()}`},Rd=YN;function Xr(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 Xy(e,t,r){if(typeof e!="function")throw new Error(Pt(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(Pt(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(Pt(1));return r(Xy)(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,R)=>{i.set(R,w)}))}function g(){if(f)throw new Error(Pt(3));return o}function v(w){if(typeof w!="function")throw new Error(Pt(4));if(f)throw new Error(Pt(5));let R=!0;m();let E=p++;return i.set(E,w),function(){if(R){if(f)throw new Error(Pt(6));R=!1,m(),i.delete(E),a=null}}}function C(w){if(!Xr(w))throw new Error(Pt(7));if(typeof w.type>"u")throw new Error(Pt(8));if(typeof w.type!="string")throw new Error(Pt(17));if(f)throw new Error(Pt(9));try{f=!0,o=n(o,w)}finally{f=!1}return(a=i).forEach(E=>{E()}),w}function h(w){if(typeof w!="function")throw new Error(Pt(10));n=w,C({type:Rd.REPLACE})}function x(){let w=v;return{subscribe(R){if(typeof R!="object"||R===null)throw new Error(Pt(11));function E(){let k=R;k.next&&k.next(g())}return E(),{unsubscribe:w(E)}},[qC](){return this}}}return C({type:Rd.INIT}),{dispatch:C,subscribe:v,getState:g,replaceReducer:h,[qC]:x}}function XN(e){Object.keys(e).forEach(t=>{let r=e[t];if(typeof r(void 0,{type:Rd.INIT})>"u")throw new Error(Pt(12));if(typeof r(void 0,{type:Rd.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Pt(13))})}function Li(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{XN(r)}catch(i){a=i}return function(p={},f){if(a)throw a;let m=!1,g={};for(let v=0;v<n.length;v++){let C=n[v],h=r[C],x=p[C],b=h(x,f);if(typeof b>"u"){let w=f&&f.type;throw new Error(Pt(14))}g[C]=b,m=m||b!==x}return m=m||n.length!==Object.keys(p).length,m?g:p}}function Pu(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function MC(...e){return t=>(r,n)=>{let o=t(r,n),a=()=>{throw new Error(Pt(15))},i={getState:o.getState,dispatch:(f,...m)=>a(f,...m)},p=e.map(f=>f(i));return a=Pu(...p)(o.dispatch),{...o,dispatch:a}}}function ku(e){return Xr(e)&&"type"in e&&typeof e.type=="string"}d();c();l();u();var iS=Symbol.for("immer-nothing"),Ou=Symbol.for("immer-draftable"),At=Symbol.for("immer-state");function kt(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var ir=Object,fa=ir.getPrototypeOf,Nu="constructor",ju="prototype",eS="configurable",Td="enumerable",Ed="writable",Du="value",Wt=e=>!!e&&!!e[At];function Kt(e){return e?$C(e)||Uu(e)||!!e[Ou]||!!e[Nu]?.[Ou]||Qu(e)||Bu(e):!1}var JN=ir[ju][Nu].toString(),VC=new WeakMap;function $C(e){if(!e||!Ui(e))return!1;let t=fa(e);if(t===null||t===ir[ju])return!0;let r=ir.hasOwnProperty.call(t,Nu)&&t[Nu];if(r===Object)return!0;if(!pa(r))return!1;let n=VC.get(r);return n===void 0&&(n=Function.toString.call(r),VC.set(r,n)),n===JN}function HC(e){return Wt(e)||kt(15,e),e[At].base_}function Lu(e,t,r=!0){ma(e)===0?(r?Reflect.ownKeys(e):ir.keys(e)).forEach(o=>{t(o,e[o],e)}):e.forEach((n,o)=>t(o,n,e))}function ma(e){let t=e[At];return t?t.type_:Uu(e)?1:Qu(e)?2:Bu(e)?3:0}var _u=(e,t,r=ma(e))=>r===2?e.has(t):ir[ju].hasOwnProperty.call(e,t),Gn=(e,t,r=ma(e))=>r===2?e.get(t):e[t],Pd=(e,t,r,n=ma(e))=>{n===2?e.set(t,r):n===3?e.add(r):e[t]=r};function ZN(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var Uu=Array.isArray,Qu=e=>e instanceof Map,Bu=e=>e instanceof Set,Ui=e=>typeof e=="object",pa=e=>typeof e=="function",Jy=e=>typeof e=="boolean";function e0(e){let t=+e;return Number.isInteger(t)&&String(t)===e}var t0=e=>Ui(e)?e?.[At]:null,$n=e=>e.copy_||e.base_;var sS=e=>e.modified_?e.copy_:e.base_;function tS(e,t){if(Qu(e))return new Map(e);if(Bu(e))return new Set(e);if(Uu(e))return Array[ju].slice.call(e);let r=$C(e);if(t===!0||t==="class_only"&&!r){let n=ir.getOwnPropertyDescriptors(e);delete n[At];let o=Reflect.ownKeys(n);for(let a=0;a<o.length;a++){let i=o[a],p=n[i];p[Ed]===!1&&(p[Ed]=!0,p[eS]=!0),(p.get||p.set)&&(n[i]={[eS]:!0,[Ed]:!0,[Td]:p[Td],[Du]:e[i]})}return ir.create(fa(e),n)}else{let n=fa(e);if(n!==null&&r)return{...e};let o=ir.create(n);return ir.assign(o,e)}}function cS(e,t=!1){return qd(e)||Wt(e)||!Kt(e)||(ma(e)>1&&ir.defineProperties(e,{set:Fd,add:Fd,clear:Fd,delete:Fd}),ir.freeze(e),t&&Lu(e,(r,n)=>{cS(n,!0)},!1)),e}function r0(){kt(2)}var Fd={[Du]:r0};function qd(e){return e===null||!Ui(e)?!0:ir.isFrozen(e)}var kd="MapSet",Od="Patches",jC="ArrayMethods",_d={};function ga(e){let t=_d[e];return t||kt(0,e),t}var LC=e=>!!_d[e];function n0(e,t){_d[e]||(_d[e]=t)}var qu,zC=()=>qu,o0=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:LC(kd)?ga(kd):void 0,arrayMethodsPlugin_:LC(jC)?ga(jC):void 0});function UC(e,t){t&&(e.patchPlugin_=ga(Od),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function rS(e){nS(e),e.drafts_.forEach(a0),e.drafts_=null}function nS(e){e===qu&&(qu=e.parent_)}var QC=e=>qu=o0(qu,e);function a0(e){let t=e[At];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function BC(e,t){t.unfinalizedDrafts_=t.drafts_.length;let r=t.drafts_[0];if(e!==void 0&&e!==r){r[At].modified_&&(rS(t),kt(4)),Kt(e)&&(e=GC(t,e));let{patchPlugin_:o}=t;o&&o.generateReplacementPatches_(r[At].base_,e,t)}else e=GC(t,r);return i0(t,e,!0),rS(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==iS?e:void 0}function GC(e,t){if(qd(t))return t;let r=t[At];if(!r)return Nd(t,e.handledSet_,e);if(!Md(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);YC(r,e)}return r.copy_}function i0(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&cS(t,r)}function WC(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var Md=(e,t)=>e.scope_===t,s0=[];function KC(e,t,r,n){let o=$n(e),a=e.type_;if(n!==void 0&&Gn(o,n,a)===t){Pd(o,n,r,a);return}if(!e.draftLocations_){let p=e.draftLocations_=new Map;Lu(o,(f,m)=>{if(Wt(m)){let g=p.get(m)||[];g.push(f),p.set(m,g)}})}let i=e.draftLocations_.get(t)??s0;for(let p of i)Pd(o,p,r,a)}function c0(e,t,r){e.callbacks_.push(function(o){let a=t;if(!a||!Md(a,o))return;o.mapSetPlugin_?.fixSetContents(a);let i=sS(a);KC(e,a.draft_??a,i,r),YC(a,o)})}function YC(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)}WC(e)}}function u0(e,t,r){let{scope_:n}=e;if(Wt(r)){let o=r[At];Md(o,n)&&o.callbacks_.push(function(){Id(e);let i=sS(o);KC(e,r,i,t)})}else Kt(r)&&e.callbacks_.push(function(){let a=$n(e);e.type_===3?a.has(r)&&Nd(r,n.handledSet_,n):Gn(a,t,e.type_)===r&&n.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&Nd(Gn(e.copy_,t,e.type_),n.handledSet_,n)})}function Nd(e,t,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||Wt(e)||t.has(e)||!Kt(e)||qd(e)||(t.add(e),Lu(e,(n,o)=>{if(Wt(o)){let a=o[At];if(Md(a,r)){let i=sS(a);Pd(e,n,i,e.type_),WC(a)}}else Kt(o)&&Nd(o,t,r)})),e}function l0(e,t){let r=Uu(e),n={type_:r?1:0,scope_:t?t.scope_:zC(),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=Dd;r&&(o=[n],a=Mu);let{revoke:i,proxy:p}=Proxy.revocable(o,a);return n.draft_=p,n.revoke_=i,[p,n]}var Dd={get(e,t){if(t===At)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=$n(e);if(!_u(o,t,e.type_))return d0(e,o,t);let a=o[t];if(e.finalized_||!Kt(a)||n&&e.operationMethod&&r?.isMutatingArrayMethod(e.operationMethod)&&e0(t))return a;if(a===Zy(e.base_,t)){Id(e);let i=e.type_===1?+t:t,p=aS(e.scope_,a,e,i);return e.copy_[i]=p}return a},has(e,t){return t in $n(e)},ownKeys(e){return Reflect.ownKeys($n(e))},set(e,t,r){let n=XC($n(e),t);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){let o=Zy($n(e),t),a=o?.[At];if(a&&a.base_===r)return e.copy_[t]=r,e.assigned_.set(t,!1),!0;if(ZN(r,o)&&(r!==void 0||_u(e.base_,t,e.type_)))return!0;Id(e),oS(e)}return e.copy_[t]===r&&(r!==void 0||t in e.copy_)||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_.set(t,!0),u0(e,t,r)),!0},deleteProperty(e,t){return Id(e),Zy(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),oS(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let r=$n(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{[Ed]:!0,[eS]:e.type_!==1||t!=="length",[Td]:n[Td],[Du]:r[t]}},defineProperty(){kt(11)},getPrototypeOf(e){return fa(e.base_)},setPrototypeOf(){kt(12)}},Mu={};for(let e in Dd){let t=Dd[e];Mu[e]=function(){let r=arguments;return r[0]=r[0][0],t.apply(this,r)}}Mu.deleteProperty=function(e,t){return Mu.set.call(this,e,t,void 0)};Mu.set=function(e,t,r){return Dd.set.call(this,e[0],t,r,e[0])};function Zy(e,t){let r=e[At];return(r?$n(r):e)[t]}function d0(e,t,r){let n=XC(t,r);return n?Du in n?n[Du]:n.get?.call(e.draft_):void 0}function XC(e,t){if(!(t in e))return;let r=fa(e);for(;r;){let n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=fa(r)}}function oS(e){e.modified_||(e.modified_=!0,e.parent_&&oS(e.parent_))}function Id(e){e.copy_||(e.assigned_=new Map,e.copy_=tS(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var p0=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(t,r,n)=>{if(pa(t)&&!pa(r)){let a=r;r=t;let i=this;return function(f=a,...m){return i.produce(f,g=>r.call(this,g,...m))}}pa(r)||kt(6),n!==void 0&&!pa(n)&&kt(7);let o;if(Kt(t)){let a=QC(this),i=aS(a,t,void 0),p=!0;try{o=r(i),p=!1}finally{p?rS(a):nS(a)}return UC(a,n),BC(o,a)}else if(!t||!Ui(t)){if(o=r(t),o===void 0&&(o=t),o===iS&&(o=void 0),this.autoFreeze_&&cS(o,!0),n){let a=[],i=[];ga(Od).generateReplacementPatches_(t,o,{patches_:a,inversePatches_:i}),n(a,i)}return o}else kt(1,t)},this.produceWithPatches=(t,r)=>{if(pa(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]},Jy(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),Jy(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),Jy(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){Kt(e)||kt(8),Wt(e)&&(e=Vd(e));let t=QC(this),r=aS(t,e,void 0);return r[At].isManual_=!0,nS(t),r}finishDraft(e,t){let r=e&&e[At];(!r||!r.isManual_)&&kt(9);let{scope_:n}=r;return UC(n,t),BC(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=ga(Od).applyPatches_;return Wt(e)?n(e,t):this.produce(e,o=>n(o,t))}};function aS(e,t,r,n){let[o,a]=Qu(t)?ga(kd).proxyMap_(t,r):Bu(t)?ga(kd).proxySet_(t,r):l0(t,r);return(r?.scope_??zC()).drafts_.push(o),a.callbacks_=r?.callbacks_??[],a.key_=n,r&&n!==void 0?c0(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 Vd(e){return Wt(e)||kt(10,e),JC(e)}function JC(e){if(!Kt(e)||qd(e))return e;let t=e[At],r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=tS(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=tS(e,!0);return Lu(r,(o,a)=>{Pd(r,o,JC(a))},n),t&&(t.finalized_=!1),r}function ZC(){function t(x,b=[]){if(x.key_!==void 0){let w=x.parent_.copy_??x.parent_.base_,R=t0(Gn(w,x.key_)),E=Gn(w,x.key_);if(E===void 0||E!==x.draft_&&E!==x.base_&&E!==x.copy_||R!=null&&R.base_!==x.base_)return null;let I=x.parent_.type_===3,k;if(I){let T=x.parent_;k=Array.from(T.drafts_.keys()).indexOf(x.key_)}else k=x.key_;if(!(I&&w.size>k||_u(w,k)))return null;b.push(k)}if(x.parent_)return t(x.parent_,b);b.reverse();try{r(x.copy_,b)}catch{return null}return b}function r(x,b){let w=x;for(let R=0;R<b.length-1;R++){let E=b[R];if(w=Gn(w,E),!Ui(w)||w===null)throw new Error(`Cannot resolve path at '${b.join("/")}'`)}return w}let n="replace",o="add",a="remove";function i(x,b,w){if(x.scope_.processedForPatches_.has(x))return;x.scope_.processedForPatches_.add(x);let{patches_:R,inversePatches_:E}=w;switch(x.type_){case 0:case 2:return f(x,b,R,E);case 1:return p(x,b,R,E);case 3:return m(x,b,R,E)}}function p(x,b,w,R){let{base_:E,assigned_:I}=x,k=x.copy_;k.length<E.length&&([E,k]=[k,E],[w,R]=[R,w]);let T=x.allIndicesReassigned_===!0;for(let D=0;D<E.length;D++){let G=k[D],L=E[D];if((T||I?.get(D.toString()))&&G!==L){let Q=G?.[At];if(Q&&Q.modified_)continue;let j=b.concat([D]);w.push({op:n,path:j,value:h(G)}),R.push({op:n,path:j,value:h(L)})}}for(let D=E.length;D<k.length;D++){let G=b.concat([D]);w.push({op:o,path:G,value:h(k[D])})}for(let D=k.length-1;E.length<=D;--D){let G=b.concat([D]);R.push({op:a,path:G})}}function f(x,b,w,R){let{base_:E,copy_:I,type_:k}=x;Lu(x.assigned_,(T,D)=>{let G=Gn(E,T,k),L=Gn(I,T,k),V=D?_u(E,T)?n:o:a;if(G===L&&V===n)return;let Q=b.concat(T);w.push(V===a?{op:V,path:Q}:{op:V,path:Q,value:h(L)}),R.push(V===o?{op:a,path:Q}:V===a?{op:o,path:Q,value:h(G)}:{op:n,path:Q,value:h(G)})})}function m(x,b,w,R){let{base_:E,copy_:I}=x,k=0;E.forEach(T=>{if(!I.has(T)){let D=b.concat([k]);w.push({op:a,path:D,value:T}),R.unshift({op:o,path:D,value:T})}k++}),k=0,I.forEach(T=>{if(!E.has(T)){let D=b.concat([k]);w.push({op:o,path:D,value:T}),R.unshift({op:a,path:D,value:T})}k++})}function g(x,b,w){let{patches_:R,inversePatches_:E}=w;R.push({op:n,path:[],value:b===iS?void 0:b}),E.push({op:n,path:[],value:x})}function v(x,b){return b.forEach(w=>{let{path:R,op:E}=w,I=x;for(let G=0;G<R.length-1;G++){let L=ma(I),V=R[G];typeof V!="string"&&typeof V!="number"&&(V=""+V),(L===0||L===1)&&(V==="__proto__"||V===Nu)&&kt(19),pa(I)&&V===ju&&kt(19),I=Gn(I,V),Ui(I)||kt(18,R.join("/"))}let k=ma(I),T=C(w.value),D=R[R.length-1];switch(E){case n:switch(k){case 2:return I.set(D,T);case 3:kt(16);default:return I[D]=T}case o:switch(k){case 1:return D==="-"?I.push(T):I.splice(D,0,T);case 2:return I.set(D,T);case 3:return I.add(T);default:return I[D]=T}case a:switch(k){case 1:return I.splice(D,1);case 2:return I.delete(D);case 3:return I.delete(w.value);default:return delete I[D]}default:kt(17,E)}}),x}function C(x){if(!Kt(x))return x;if(Uu(x))return x.map(C);if(Qu(x))return new Map(Array.from(x.entries()).map(([w,R])=>[w,C(R)]));if(Bu(x))return new Set(Array.from(x).map(C));let b=Object.create(fa(x));for(let w in x)b[w]=C(x[w]);return _u(x,Ou)&&(b[Ou]=x[Ou]),b}function h(x){return Wt(x)?C(x):x}n0(Od,{applyPatches_:v,generatePatches_:i,generateReplacementPatches_:g,getPath:t})}var Vu=new p0,ha=Vu.produce,uS=Vu.produceWithPatches.bind(Vu);var lS=Vu.applyPatches.bind(Vu);d();c();l();u();function f0(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function m0(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 eb=e=>Array.isArray(e)?e:[e];function g0(e){let t=Array.isArray(e[0])?e[0]:e;return m0(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function h0(e,t){let r=[],{length:n}=e;for(let o=0;o<n;o++)r.push(e[o].apply(null,t));return r}var y0=class{constructor(e){this.value=e}deref(){return this.value}},S0=()=>typeof WeakRef>"u"?y0:WeakRef,rb=S0(),v0=0,tb=1;function jd(){return{s:v0,v:void 0,o:null,p:null}}function A0(e){return e instanceof rb?e.deref():e}function Gu(e,t={}){let r=jd(),{resultEqualityCheck:n}=t,o,a=0;function i(){let p=r,{length:f}=arguments;for(let v=0,C=f;v<C;v++){let h=arguments[v];if(typeof h=="function"||typeof h=="object"&&h!==null){let x=p.o;x===null&&(p.o=x=new WeakMap);let b=x.get(h);b===void 0?(p=jd(),x.set(h,p)):p=b}else{let x=p.p;x===null&&(p.p=x=new Map);let b=x.get(h);b===void 0?(p=jd(),x.set(h,p)):p=b}}let m=p,g;if(p.s===tb)g=p.v;else if(g=e.apply(null,arguments),a++,n){let v=A0(o);v!=null&&n(v,g)&&(g=v,a!==0&&a--),o=typeof g=="object"&&g!==null||typeof g=="function"?new rb(g):g}return m.s=tb,m.v=g,g}return i.clearCache=()=>{r=jd(),i.resetResultsCount()},i.resultsCount=()=>a,i.resetResultsCount=()=>{a=0},i}function x0(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()),f0(m,`createSelector expects an output function after the inputs, but received: [${typeof m}]`);let g={...r,...f},{memoize:v,memoizeOptions:C=[],argsMemoize:h=Gu,argsMemoizeOptions:x=[]}=g,b=eb(C),w=eb(x),R=g0(o),E=v(function(){return a++,m.apply(null,arguments)},...b),I=!0,k=h(function(){i++;let D=h0(R,arguments);return p=E.apply(null,D),p},...w);return Object.assign(k,{resultFunc:m,memoizedResultFunc:E,dependencies:R,dependencyRecomputations:()=>i,resetDependencyRecomputations:()=>{i=0},lastResult:()=>p,recomputations:()=>a,resetRecomputations:()=>{a=0},memoize:v,argsMemoize:h})};return Object.assign(n,{withTypes:()=>n}),n}var et=x0(Gu);d();c();l();u();function nb(e){return({dispatch:r,getState:n})=>o=>a=>typeof a=="function"?a(r,n,e):o(a)}var ob=nb(),ab=nb;var C0=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Pu:Pu.apply(null,arguments)},$K=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}},b0=e=>e&&typeof e.match=="function";function P(e,t){function r(...n){if(t){let o=t(...n);if(!o)throw new Error(Yt(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=>ku(n)&&n.type===e,r}var fb=class $u extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,$u.prototype)}static get[Symbol.species](){return $u}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new $u(...t[0].concat(this)):new $u(...t.concat(this))}};function ib(e){return Kt(e)?ha(e,()=>{}):e}function Ld(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function w0(e){return typeof e=="boolean"}var R0=()=>function(t){let{thunk:r=!0,immutableCheck:n=!0,serializableCheck:o=!0,actionCreatorCheck:a=!0}=t??{},i=new fb;return r&&(w0(r)?i.push(ob):i.push(ab(r.extraArgument))),i},Hu="RTK_autoBatch",Gi=()=>e=>({payload:e,meta:{[Hu]:!0}}),sb=e=>t=>{setTimeout(t,e)},F0=(e,t)=>r=>{let n=!1,o=()=>{n||(n=!0,cancelAnimationFrame(a),clearTimeout(i),r())},a=e(o),i=setTimeout(o,t)},E0=(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?F0(window.requestAnimationFrame,100):sb(10):e.type==="callback"?e.queueNotification:sb(e.timeout),m=()=>{i=!1,a&&(a=!1,p.forEach(g=>g()))};return Object.assign({},n,{subscribe(g){let v=()=>o&&g(),C=n.subscribe(v);return p.add(g),()=>{C(),p.delete(g)}},dispatch(g){try{return o=!g?.meta?.[Hu],a=!o,a&&(i||(i=!0,f(m))),n.dispatch(g)}finally{o=!0}}})},I0=e=>function(r){let{autoBatch:n=!0}=r??{},o=new fb(e);return n&&o.push(E0(typeof n=="object"?n:void 0)),o};function mb(e){let t=R0(),{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(Xr(r))f=Li(r);else throw new Error(Yt(1));let m;typeof n=="function"?m=n(t):m=t();let g=Pu;o&&(g=C0({trace:!1,...(typeof o=="object"&&o)}));let v=MC(...m),C=I0(v),h=typeof p=="function"?p(C):C(),x=g(...h);return Xy(f,i,x)}function gb(e){let t={},r=[],n,o={addCase(a,i){let p=typeof a=="string"?a:a.type;if(!p)throw new Error(Yt(28));if(p in t)throw new Error(Yt(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 T0(e){return typeof e=="function"}function ae(e,t){let[r,n,o]=gb(t),a;if(T0(e))a=()=>ib(e());else{let p=ib(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,v)=>{if(v)if(Wt(g)){let h=v(g,f);return h===void 0?g:h}else{if(Kt(g))return ha(g,C=>v(C,f));{let C=v(g,f);if(C===void 0){if(g===null)return g;throw Error("A case reducer on a non-draftable value must not return undefined")}return C}}return g},p)}return i.getInitialState=a,i}var hb=(e,t)=>b0(e)?e.match(t):e(t);function Jr(...e){return t=>e.some(r=>hb(r,t))}function Bi(...e){return t=>e.every(r=>hb(r,t))}function Gd(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 zu(e){return typeof e[0]=="function"&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function $d(...e){return e.length===0?t=>Gd(t,["pending"]):zu(e)?Jr(...e.map(t=>t.pending)):$d()(e[0])}function Sa(...e){return e.length===0?t=>Gd(t,["rejected"]):zu(e)?Jr(...e.map(t=>t.rejected)):Sa()(e[0])}function Wu(...e){let t=r=>r&&r.meta&&r.meta.rejectedWithValue;return e.length===0?Bi(Sa(...e),t):zu(e)?Bi(Sa(...e),t):Wu()(e[0])}function Hn(...e){return e.length===0?t=>Gd(t,["fulfilled"]):zu(e)?Jr(...e.map(t=>t.fulfilled)):Hn()(e[0])}function Hd(...e){return e.length===0?t=>Gd(t,["pending","fulfilled","rejected"]):zu(e)?Jr(...e.flatMap(t=>[t.pending,t.rejected,t.fulfilled])):Hd()(e[0])}var P0="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Ku=(e=21)=>{let t="",r=e;for(;r--;)t+=P0[Math.random()*64|0];return t},k0=["name","message","stack","code"],dS=class{constructor(e,t){de(this,"payload");de(this,"meta");de(this,"_type");this.payload=e,this.meta=t}},cb=class{constructor(e,t){de(this,"payload");de(this,"meta");de(this,"_type");this.payload=e,this.meta=t}},O0=e=>{if(typeof e=="object"&&e!==null){let t={};for(let r of k0)typeof e[r]=="string"&&(t[r]=e[r]);return t}return{message:String(e)}},ub="External signal was aborted",xe=(()=>{function e(t,r,n){let o=P(t+"/fulfilled",(f,m,g,v)=>({payload:f,meta:{...(v||{}),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,v,C)=>({payload:v,error:(n&&n.serializeError||O0)(f||"Rejected"),meta:{...(C||{}),arg:g,requestId:m,rejectedWithValue:!!v,requestStatus:"rejected",aborted:f?.name==="AbortError",condition:f?.name==="ConditionError"}}));function p(f,{signal:m}={}){return(g,v,C)=>{let h=n?.idGenerator?n.idGenerator(f):Ku(),x=new s.AbortController,b,w;function R(I){w=I,x.abort()}m&&(m.aborted?R(ub):m.addEventListener("abort",()=>R(ub),{once:!0}));let E=_asyncToGenerator(function*(){let I;try{let T=n?.condition?.(f,{getState:v,extra:C});if(N0(T)&&(T=yield T),T===!1||x.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let D=new Promise((G,L)=>{b=()=>{L({name:"AbortError",message:w||"Aborted"})},x.signal.addEventListener("abort",b,{once:!0})});g(a(h,f,n?.getPendingMeta?.({requestId:h,arg:f},{getState:v,extra:C}))),I=yield Promise.race([D,Promise.resolve(r(f,{dispatch:g,getState:v,extra:C,requestId:h,signal:x.signal,abort:R,rejectWithValue:(G,L)=>new dS(G,L),fulfillWithValue:(G,L)=>new cb(G,L)})).then(G=>{if(G instanceof dS)throw G;return G instanceof cb?o(G.payload,h,f,G.meta):o(G,h,f)})])}catch(T){I=T instanceof dS?i(null,h,f,T.payload,T.meta):i(T,h,f)}finally{b&&x.signal.removeEventListener("abort",b)}return n&&!n.dispatchConditionRejection&&i.match(I)&&I.meta.condition||g(I),I})();return Object.assign(E,{abort:R,requestId:h,arg:f,unwrap(){return E.then(_0)}})}}return Object.assign(p,{pending:a,rejected:i,fulfilled:o,settled:Jr(i,o),typePrefix:t})}return e.withTypes=()=>e,e})();function _0(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function N0(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var yb=Symbol.for("rtk-slice-createasyncthunk"),zK={[yb]:xe};function D0(e,t){return`${e}/${t}`}function q0({creators:e}={}){let t=e?.asyncThunk?.[yb];return function(n){let{name:o,reducerPath:a=o}=n;if(!o)throw new Error(Yt(11));typeof process<"u";let i=(typeof n.reducers=="function"?n.reducers(V0()):n.reducers)||{},p=Object.keys(i),f={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},m={addCase(I,k){let T=typeof I=="string"?I:I.type;if(!T)throw new Error(Yt(12));if(T in f.sliceCaseReducersByType)throw new Error(Yt(13));return f.sliceCaseReducersByType[T]=k,m},addMatcher(I,k){return f.sliceMatchers.push({matcher:I,reducer:k}),m},exposeAction(I,k){return f.actionCreators[I]=k,m},exposeCaseReducer(I,k){return f.sliceCaseReducersByName[I]=k,m}};p.forEach(I=>{let k=i[I],T={reducerName:I,type:D0(o,I),createNotation:typeof n.reducers=="function"};L0(k)?Q0(T,k,m,t):j0(T,k,m)});function g(){let[I={},k=[],T=void 0]=typeof n.extraReducers=="function"?gb(n.extraReducers):[n.extraReducers],D={...I,...f.sliceCaseReducersByType};return ae(n.initialState,G=>{for(let L in D)G.addCase(L,D[L]);for(let L of f.sliceMatchers)G.addMatcher(L.matcher,L.reducer);for(let L of k)G.addMatcher(L.matcher,L.reducer);T&&G.addDefaultCase(T)})}let v=I=>I,C=new Map,h=new WeakMap,x;function b(I,k){return x||(x=g()),x(I,k)}function w(){return x||(x=g()),x.getInitialState()}function R(I,k=!1){function T(G){let L=G[I];return typeof L>"u"&&k&&(L=Ld(h,T,w)),L}function D(G=v){let L=Ld(C,k,()=>new WeakMap);return Ld(L,G,()=>{let V={};for(let[Q,j]of Object.entries(n.selectors??{}))V[Q]=M0(j,G,()=>Ld(h,G,w),k);return V})}return{reducerPath:I,getSelectors:D,get selectors(){return D(T)},selectSlice:T}}let E={name:o,reducer:b,actions:f.actionCreators,caseReducers:f.sliceCaseReducersByName,getInitialState:w,...R(a),injectInto(I,{reducerPath:k,...T}={}){let D=k??a;return I.inject({reducerPath:D,reducer:b},T),{...E,...R(D,!0)}}};return E}}function M0(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 va=q0();function V0(){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 j0({type:e,reducerName:t,createNotation:r},n,o){let a,i;if("reducer"in n){if(r&&!U0(n))throw new Error(Yt(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 L0(e){return e._reducerDefinitionType==="asyncThunk"}function U0(e){return e._reducerDefinitionType==="reducerWithPrepare"}function Q0({type:e,reducerName:t},r,n,o){if(!o)throw new Error(Yt(18));let{payloadCreator:a,fulfilled:i,pending:p,rejected:f,settled:m,options:g}=r,v=o(e,a,g);n.exposeAction(t,v),i&&n.addCase(v.fulfilled,i),p&&n.addCase(v.pending,p),f&&n.addCase(v.rejected,f),m&&n.addMatcher(v.settled,m),n.exposeCaseReducer(t,{fulfilled:i||Ud,pending:p||Ud,rejected:f||Ud,settled:m||Ud})}function Ud(){}var B0="task",Sb="listener",vb="completed",mS="cancelled",G0=`task-${mS}`,$0=`task-${vb}`,pS=`${Sb}-${mS}`,H0=`${Sb}-${vb}`,zd=class{constructor(e){de(this,"code");de(this,"name","TaskAbortError");de(this,"message");this.code=e,this.message=`${B0} ${mS} (reason: ${e})`}},gS=(e,t)=>{if(typeof e!="function")throw new TypeError(Yt(32))},Qd=()=>{},Ab=(e,t=Qd)=>(e.catch(t),e),xb=(e,t)=>(e.addEventListener("abort",t,{once:!0}),()=>e.removeEventListener("abort",t)),ya=e=>{if(e.aborted)throw new zd(e.reason)};function Cb(e,t){let r=Qd;return new Promise((n,o)=>{let a=()=>o(new zd(e.reason));if(e.aborted){a();return}r=xb(e,a),t.finally(()=>r()).then(n,o)}).finally(()=>{r=Qd})}var z0=/*#__PURE__*/function(){var _ref5=_asyncToGenerator(function*(e,t){try{return yield Promise.resolve(),{status:"ok",value:yield e()}}catch(r){return{status:r instanceof zd?"cancelled":"rejected",error:r}}finally{t?.()}});return function z0(_x7,_x8){return _ref5.apply(this,arguments)}}(),Bd=e=>t=>Ab(Cb(e,t).then(r=>(ya(e),r))),bb=e=>{let t=Bd(e);return r=>t(new Promise(n=>setTimeout(n,r)))},{assign:Qi}=Object,lb={},Wd="listenerMiddleware",W0=(e,t)=>{let r=n=>xb(e,()=>n.abort(e.reason));return(n,o)=>{gS(n,"taskExecutor");let a=new s.AbortController;r(a);let i=z0(/*#__PURE__*/_asyncToGenerator(function*(){ya(e),ya(a.signal);let p=yield n({pause:Bd(a.signal),delay:bb(a.signal),signal:a.signal});return ya(a.signal),p}),()=>a.abort($0));return o?.autoJoin&&t.push(i.catch(Qd)),{result:Bd(e)(i),cancel(){a.abort(G0)}}}},K0=(e,t)=>{let r=/*#__PURE__*/function(){var _ref7=_asyncToGenerator(function*(n,o){ya(t);let a=()=>{},p=[new Promise((f,m)=>{let g=e({predicate:n,effect:(v,C)=>{C.unsubscribe(),f([v,C.getState(),C.getOriginalState()])}});a=()=>{g(),m()}})];o!=null&&p.push(new Promise(f=>setTimeout(f,o,null)));try{let f=yield Cb(t,Promise.race(p));return ya(t),f}finally{a()}});return function r(_x9,_x0){return _ref7.apply(this,arguments)}}();return(n,o)=>Ab(r(n,o))},wb=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(Yt(21));return gS(a,"options.listener"),{predicate:o,type:t,effect:a}},Rb=Qi(e=>{let{type:t,predicate:r,effect:n}=wb(e);return{id:Ku(),effect:n,type:t,predicate:r,pending:new Set,unsubscribe:()=>{throw new Error(Yt(22))}}},{withTypes:()=>Rb}),db=(e,t)=>{let{type:r,effect:n,predicate:o}=wb(t);return Array.from(e.values()).find(a=>(typeof r=="string"?a.type===r:a.predicate===o)&&a.effect===n)},fS=e=>{e.pending.forEach(t=>{t.abort(pS)})},Y0=(e,t)=>()=>{for(let r of t.keys())fS(r);e.clear()},pb=(e,t,r)=>{try{e(t,r)}catch(n){setTimeout(()=>{throw n},0)}},Fb=Qi(P(`${Wd}/add`),{withTypes:()=>Fb}),X0=P(`${Wd}/removeAll`),Eb=Qi(P(`${Wd}/remove`),{withTypes:()=>Eb}),J0=(...e)=>{console.error(`${Wd}/error`,...e)},Ib=(e={})=>{let t=new Map,r=new Map,n=h=>{let x=r.get(h)??0;r.set(h,x+1)},o=h=>{let x=r.get(h)??1;x===1?r.delete(h):r.set(h,x-1)},{extra:a,onError:i=J0}=e;gS(i,"onError");let p=h=>(h.unsubscribe=()=>t.delete(h.id),t.set(h.id,h),x=>{h.unsubscribe(),x?.cancelActive&&fS(h)}),f=h=>{let x=db(t,h)??Rb(h);return p(x)};Qi(f,{withTypes:()=>f});let m=h=>{let x=db(t,h);return x&&(x.unsubscribe(),h.cancelActive&&fS(x)),!!x};Qi(m,{withTypes:()=>m});let g=/*#__PURE__*/function(){var _ref8=_asyncToGenerator(function*(h,x,b,w){let R=new s.AbortController,E=K0(f,R.signal),I=[];try{h.pending.add(R),n(h),yield Promise.resolve(h.effect(x,Qi({},b,{getOriginalState:w,condition:(k,T)=>E(k,T).then(Boolean),take:E,delay:bb(R.signal),pause:Bd(R.signal),extra:a,signal:R.signal,fork:W0(R.signal,I),unsubscribe:h.unsubscribe,subscribe:()=>{t.set(h.id,h)},cancelActiveListeners:()=>{h.pending.forEach((k,T,D)=>{k!==R&&(k.abort(pS),D.delete(k))})},cancel:()=>{R.abort(pS),h.pending.delete(R)},throwIfCancelled:()=>{ya(R.signal)}})))}catch(k){k instanceof zd||pb(i,k,{raisedBy:"effect"})}finally{yield Promise.all(I),R.abort(H0),o(h),h.pending.delete(R)}});return function g(_x1,_x10,_x11,_x12){return _ref8.apply(this,arguments)}}(),v=Y0(t,r);return{middleware:h=>x=>b=>{if(!ku(b))return x(b);if(Fb.match(b))return f(b.payload);if(X0.match(b)){v();return}if(Eb.match(b))return m(b.payload);let w=h.getState(),R=()=>{if(w===lb)throw new Error(Yt(23));return w},E;try{if(E=x(b),t.size>0){let I=h.getState(),k=Array.from(t.values());for(let T of k){let D=!1;try{D=T.predicate(b,I,w)}catch(G){D=!1,pb(i,G,{raisedBy:"predicate"})}D&&g(T,b,h,R)}}}finally{w=lb}return E},startListening:f,stopListening:m,clearListeners:v}};function Yt(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 Tb(){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 Pb=/^(?:[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 Z0(e){return typeof e=="string"&&Pb.test(e)}var hS=Z0;d();c();l();u();var Ot=[];for(let e=0;e<256;++e)Ot.push((e+256).toString(16).slice(1));function kb(e,t=0){return(Ot[e[t+0]]+Ot[e[t+1]]+Ot[e[t+2]]+Ot[e[t+3]]+"-"+Ot[e[t+4]]+Ot[e[t+5]]+"-"+Ot[e[t+6]]+Ot[e[t+7]]+"-"+Ot[e[t+8]]+Ot[e[t+9]]+"-"+Ot[e[t+10]]+Ot[e[t+11]]+Ot[e[t+12]]+Ot[e[t+13]]+Ot[e[t+14]]+Ot[e[t+15]]).toLowerCase()}d();c();l();u();var yS,eD=new Uint8Array(16);function SS(){if(!yS){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");yS=crypto.getRandomValues.bind(crypto)}return yS(eD)}d();c();l();u();d();c();l();u();var tD=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),vS={randomUUID:tD};function rD(e,t,r){e=e||{};let n=e.random??e.rng?.()??SS();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 kb(n)}function nD(e,t,r){return vS.randomUUID&&!t&&!e?vS.randomUUID():rD(e,t,r)}var AS=nD;function oD(_x13){return _oD.apply(this,arguments)}function _oD(){_oD=_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 _oD.apply(this,arguments)}var Mb="2.1.1",xS=128,Vb=192,Ob=224,_b=240,aD=248;function iD(e){return(e&aD)===_b?4:(e&_b)===Ob?3:(e&Ob)===Vb?2:1}function sD(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&xS)!=xS)break;if(r-=3,(n&Vb)!=xS){t-r>=iD(n)*3&&(r=t);break}}return e.substring(0,r)}function cD(e){let{trackingId:t}=e;return{trackingId:t}}function uD(e){return(e.source||[]).concat([`relay@${Mb}`])}function jb(e,t,r){let{getReferrer:n,getLocation:o,getUserAgent:a}=r,i=cD(t),p=r.getClientId();return Object.freeze({type:e,config:i,ts:Date.now(),source:uD(t),clientId:p,userAgent:a(),referrer:Nb(n()),location:Nb(o())})}function Nb(e){return e!==null?sD(e,1024):null}function lD(e,t,r,n){return{...t,meta:jb(e,r,n)}}var dD="*";function pD(){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===dD)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 Db({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 fD(e){let t=Db(e);return{get:()=>t,update:r=>{t=Db({...t,...r})}}}var CS=mD();function mD(){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 gD(){return{getItem(e){return CS.getItem(e)||localStorage.getItem(e)},removeItem(e){CS.removeItem(e),localStorage.removeItem(e)},setItem(e,t){localStorage.setItem(e,t),CS.setItem(e,t,31556952e3)}}}var qb="visitorId";function hD(){let e=document.referrer;return e===""?null:e}function bS(){let e=gD();return{runtime:"browser",send:function(){var _ref9=_asyncToGenerator(function*(t,r,n){let o=S(t,{method:"POST",body:JSON.stringify([n]),keepalive:!0,headers:{"Content-Type":"application/json",Authorization:`Bearer ${r}`}});Tb().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:()=>hD(),getLocation:()=>window.location.href,getUserAgent:()=>navigator.userAgent,getClientId:()=>{let t=e.getItem(qb);if(t&&hS(t))return t;let r=AS();return e.setItem(qb,r),r}}}function yD(){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 SD(){return{runtime:"null",send:()=>Promise.resolve(void 0),getReferrer:()=>null,getLocation:()=>null,getUserAgent:()=>null,getClientId:()=>""}}function vD(e){let t=e.get().mode!=="disabled",r=e.get().environment,n=SD();return t&&r?{...r,runtime:"custom"}:t&&AD()&&yD()?bS():n}function AD(){try{return typeof window=="object"}catch{return!1}}function xD(e){return{get:()=>Object.freeze(vD(e))}}function Lb(e){let t=fD(e),r=pD(),n=xD(t);return{emit:function(){var _ref0=_asyncToGenerator(function*(o,a){let i=t.get(),p=n.get(),f=lD(o,a,i,p);return oD({config:i,environment:p,event:f,listenerManager:r})});return function emit(_x17,_x18){return _ref0.apply(this,arguments)}}(),getMeta:o=>jb(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:Mb}}d();c();l();u();function Ub(){return typeof window<"u"&&typeof document<"u"}d();c();l();u();d();c();l();u();var Ao="3.51.3",Qb=["@coveo/atomic","@coveo/quantic"];var $i=et(e=>e.source,e=>Object.entries(e).map(([t,r])=>`${t}@${r}`).concat(`@coveo/headless@${Ao}`));var Yu=et(e=>e.configuration.organizationId,e=>e.configuration.environment,e=>e.configuration.accessToken,e=>e.configuration.analytics,e=>$i(e.configuration.analytics),(e,t)=>t,(e,t,r,{trackingId:n,apiBaseUrl:o,enabled:a},i,p)=>{let f=bD(p);return Lb({mode:a?"emit":"disabled",url:o??Ad(e,t),token:r,trackingId:n??null,source:i,environment:f})}),CD={getClientId:()=>"",getLocation:()=>null,getReferrer:()=>null,getUserAgent:()=>null,send:function(){var _ref1=_asyncToGenerator(function*(){});return function send(){return _ref1.apply(this,arguments)}}()},bD=e=>{if(!e)return;let t=e();return{...(Ub()?bS():CD),getClientId:()=>t.clientId,getLocation:()=>t.location,getReferrer:()=>t.referrer,getUserAgent:()=>t.userAgent}};d();c();l();u();d();c();l();u();function zn(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 B(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(v){i(v)}}function f(g){try{m(n.throw(g))}catch(v){i(v)}}function m(g){g.done?a(g.value):o(g.value).then(p,f)}m((n=n.apply(e,t||[])).next())})}var _e;(function(e){e.search="search",e.click="click",e.custom="custom",e.view="view",e.collect="collect"})(_e||(_e={}));function FS(){return typeof window<"u"}function jS(){return typeof navigator<"u"}function Hi(){return typeof document<"u"}function ES(){try{return typeof localStorage<"u"}catch{return!1}}function wD(){try{return typeof sessionStorage<"u"}catch{return!1}}function rw(){return jS()&&navigator.cookieEnabled}var RD=[_e.click,_e.custom,_e.search,_e.view],FD=(e,t)=>RD.indexOf(e)!==-1?Object.assign({language:Hi()?document.documentElement.lang:"unknown",userAgent:jS()?navigator.userAgent:"unknown"},t):t,Ju=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?Bb(t,r,a):(i=p.split("."),o=i[i.length-2]+"."+i[i.length-1],Bb(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 Bb(e,t,r,n){document.cookie=`${e}=${t}`+(r?`;expires=${r.toUTCString()}`:"")+(n?`;domain=${n}`:"")+";path=/;SameSite=Lax"}function ED(){return ES()?localStorage:rw()?new Zu:wD()?sessionStorage:new Wi}var Zu=class e{getItem(t){return Ju.get(`${e.prefix}${t}`)}removeItem(t){Ju.erase(`${e.prefix}${t}`)}setItem(t,r,n){Ju.set(`${e.prefix}${t}`,r,n)}};Zu.prefix="coveo_";var IS=class{constructor(){this.cookieStorage=new Zu}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)}},Wi=class{getItem(t){return null}removeItem(t){}setItem(t,r){}},Kd="__coveo.analytics.history",ID=20,TD=1e3*60,PD=75,Jd=class{constructor(t){this.store=t||ED()}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 B(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 B(this,void 0,void 0,function*(){let t=yield this.getHistoryWithInternalTimeAsync();return this.stripEmptyQueries(this.stripInternalTime(t))})}getHistoryWithInternalTime(){try{let t=this.store.getItem(Kd);return t&&typeof t=="string"?JSON.parse(t):[]}catch{return[]}}getHistoryWithInternalTimeAsync(){return B(this,void 0,void 0,function*(){try{let t=yield this.store.getItem(Kd);return t?JSON.parse(t):[]}catch{return[]}})}setHistory(t){try{this.store.setItem(Kd,JSON.stringify(t.slice(0,ID)))}catch{}}clear(){try{this.store.removeItem(Kd)}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,PD)),t}isValidEntry(t){let r=this.getMostRecentElement();return r&&r.value==t.value?(t.internalTime||0)-(r.internalTime||0)>TD:!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 kD=(e,t)=>B(void 0,void 0,void 0,function*(){return e===_e.view?(yield OD(t.contentIdValue),Object.assign({location:window.location.toString(),referrer:document.referrer,title:document.title},t)):t}),OD=e=>B(void 0,void 0,void 0,function*(){let t=new Jd,r={name:"PageView",value:e,time:new Date().toISOString()};yield t.addElementAsync(r)}),Yd,_D=new Uint8Array(16);function ND(){if(!Yd&&(Yd=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Yd))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Yd(_D)}var DD=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function Zd(e){return typeof e=="string"&&DD.test(e)}var _t=[];for(let e=0;e<256;++e)_t.push((e+256).toString(16).slice(1));function nw(e,t=0){return _t[e[t+0]]+_t[e[t+1]]+_t[e[t+2]]+_t[e[t+3]]+"-"+_t[e[t+4]]+_t[e[t+5]]+"-"+_t[e[t+6]]+_t[e[t+7]]+"-"+_t[e[t+8]]+_t[e[t+9]]+"-"+_t[e[t+10]]+_t[e[t+11]]+_t[e[t+12]]+_t[e[t+13]]+_t[e[t+14]]+_t[e[t+15]]}function qD(e){if(!Zd(e))throw TypeError("Invalid UUID");let t,r=new Uint8Array(16);return r[0]=(t=parseInt(e.slice(0,8),16))>>>24,r[1]=t>>>16&255,r[2]=t>>>8&255,r[3]=t&255,r[4]=(t=parseInt(e.slice(9,13),16))>>>8,r[5]=t&255,r[6]=(t=parseInt(e.slice(14,18),16))>>>8,r[7]=t&255,r[8]=(t=parseInt(e.slice(19,23),16))>>>8,r[9]=t&255,r[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,r[11]=t/4294967296&255,r[12]=t>>>24&255,r[13]=t>>>16&255,r[14]=t>>>8&255,r[15]=t&255,r}function MD(e){e=unescape(encodeURIComponent(e));let t=[];for(let r=0;r<e.length;++r)t.push(e.charCodeAt(r));return t}var VD="6ba7b810-9dad-11d1-80b4-00c04fd430c8",jD="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function LD(e,t,r){function n(o,a,i,p){var f;if(typeof o=="string"&&(o=MD(o)),typeof a=="string"&&(a=qD(a)),((f=a)===null||f===void 0?void 0:f.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let m=new Uint8Array(16+o.length);if(m.set(a),m.set(o,a.length),m=r(m),m[6]=m[6]&15|t,m[8]=m[8]&63|128,i){p=p||0;for(let g=0;g<16;++g)i[p+g]=m[g];return i}return nw(m)}try{n.name=e}catch{}return n.DNS=VD,n.URL=jD,n}var UD=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Gb={randomUUID:UD};function Aa(e,t,r){if(Gb.randomUUID&&!t&&!e)return Gb.randomUUID();e=e||{};let n=e.random||(e.rng||ND)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,t){r=r||0;for(let o=0;o<16;++o)t[r+o]=n[o];return t}return nw(n)}function QD(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 wS(e,t){return e<<t|e>>>32-t}function BD(e){let t=[1518500249,1859775393,2400959708,3395469782],r=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof e=="string"){let i=unescape(encodeURIComponent(e));e=[];for(let p=0;p<i.length;++p)e.push(i.charCodeAt(p))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);let n=e.length/4+2,o=Math.ceil(n/16),a=new Array(o);for(let i=0;i<o;++i){let p=new Uint32Array(16);for(let f=0;f<16;++f)p[f]=e[i*64+f*4]<<24|e[i*64+f*4+1]<<16|e[i*64+f*4+2]<<8|e[i*64+f*4+3];a[i]=p}a[o-1][14]=(e.length-1)*8/Math.pow(2,32),a[o-1][14]=Math.floor(a[o-1][14]),a[o-1][15]=(e.length-1)*8&4294967295;for(let i=0;i<o;++i){let p=new Uint32Array(80);for(let h=0;h<16;++h)p[h]=a[i][h];for(let h=16;h<80;++h)p[h]=wS(p[h-3]^p[h-8]^p[h-14]^p[h-16],1);let f=r[0],m=r[1],g=r[2],v=r[3],C=r[4];for(let h=0;h<80;++h){let x=Math.floor(h/20),b=wS(f,5)+QD(x,m,g,v)+C+t[x]+p[h]>>>0;C=v,v=g,g=wS(m,30)>>>0,m=f,f=b}r[0]=r[0]+f>>>0,r[1]=r[1]+m>>>0,r[2]=r[2]+g>>>0,r[3]=r[3]+v>>>0,r[4]=r[4]+C>>>0}return[r[0]>>24&255,r[0]>>16&255,r[0]>>8&255,r[0]&255,r[1]>>24&255,r[1]>>16&255,r[1]>>8&255,r[1]&255,r[2]>>24&255,r[2]>>16&255,r[2]>>8&255,r[2]&255,r[3]>>24&255,r[3]>>16&255,r[3]>>8&255,r[3]&255,r[4]>>24&255,r[4]>>16&255,r[4]>>8&255,r[4]&255]}var GD=LD("v5",80,BD),$b=GD,ow="2.30.55",Hb=e=>`${e.protocol}//${e.hostname}${e.pathname.indexOf("/")===0?e.pathname:`/${e.pathname}`}${e.search}`,Xu={pageview:"pageview",event:"event"},ep=class{constructor({client:t,uuidGenerator:r=Aa}){this.client=t,this.uuidGenerator=r}},TS=class extends ep{constructor({client:t,uuidGenerator:r=Aa}){super({client:t,uuidGenerator:r}),this.actionData={},this.pageViewId=r(),this.nextPageViewId=this.pageViewId,this.currentLocation=Hb(window.location),this.lastReferrer=Hi()?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:Hi()?document.title:"",encoding:Hi()?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===Xu.pageview&&(this.nextPageViewId=this.uuidGenerator(),this.hasSentFirstPageView=!0)}getNextValues(t,r){return{pageViewId:t===Xu.pageview?this.nextPageViewId:this.pageViewId,referrer:t===Xu.pageview&&this.hasSentFirstPageView?this.currentLocation:this.lastReferrer,location:t===Xu.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 Hb(window.location)}},xo=class e{constructor(t,r){if(!Zd(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 Zd(a)?new e(a,Number.parseInt(o)*1e3):null}};xo.cvo_cid="cvo_cid";xo.expirationTime=120;var PS=class extends ep{constructor({client:t,uuidGenerator:r=Aa}){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 B(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(xo.cvo_cid,new xo(n,Date.now()).toString()),r.toString()}catch{throw new Error("Invalid URL provided")}})}acceptFrom(t){this.client.setAcceptedLinkReferrers(t)}};PS.Id="link";var yr=Object.keys;function Xd(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}var RS=128,aw=192,zb=224,Wb=240;function $D(e){return(e&248)===Wb?4:(e&Wb)===zb?3:(e&zb)===aw?2:1}function HD(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&RS)!=RS)break;if(r-=3,(n&aw)!=RS){t-r>=$D(n)*3&&(r=t);break}}return e.substring(0,r)}var kS={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"},zD=yr(kS).map(e=>kS[e]),WD=[...zD].join("|"),KD=new RegExp(`^(${WD}$)`),YD={svcAction:"svc_action",svcActionData:"svc_action_data"},XD=e=>yr(e).filter(t=>e[t]!==void 0).reduce((t,r)=>{let n=kS[r]||r;return Object.assign(Object.assign({},t),{[n]:e[r]})},{}),JD=e=>KD.test(e),ZD=[JD],Kb={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",price:"pr",quantity:"qt",coupon:"cc",position:"ps",group:"group"},Yb={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",position:"ps",price:"pr",group:"group"},Mt={action:"pa",list:"pal",listSource:"pls"},tp={id:"ti",revenue:"tr",tax:"tt",shipping:"ts",coupon:"tcc",affiliation:"ta",step:"cos",option:"col"},eq=["loyaltyCardId","loyaltyTier","thirdPartyPersona","companyName","favoriteStore","storeName","userIndustry","userRole","userDepartment","businessUnit"],OS={id:"quoteId",affiliation:"quoteAffiliation"},_S={id:"reviewId",rating:"reviewRating",comment:"reviewComment"},tq={add:Mt,bookmark_add:Mt,bookmark_remove:Mt,click:Mt,checkout:Mt,checkout_option:Mt,detail:Mt,impression:Mt,remove:Mt,refund:Object.assign(Object.assign({},Mt),tp),purchase:Object.assign(Object.assign({},Mt),tp),quickview:Mt,quote:Object.assign(Object.assign({},Mt),OS),review:Object.assign(Object.assign({},Mt),_S)},rq=yr(Kb).map(e=>Kb[e]),nq=yr(Yb).map(e=>Yb[e]),oq=yr(Mt).map(e=>Mt[e]),aq=yr(tp).map(e=>tp[e]),iq=yr(_S).map(e=>_S[e]),sq=yr(OS).map(e=>OS[e]),cq=[...rq,"custom"].join("|"),uq=[...nq,"custom"].join("|"),iw="(pr[0-9]+)",sw="(il[0-9]+pi[0-9]+)",lq=new RegExp(`^${iw}(${cq})$`),dq=new RegExp(`^(${sw}(${uq}))|(il[0-9]+nm)$`),pq=new RegExp(`^(${oq.join("|")})$`),fq=new RegExp(`^(${aq.join("|")})$`),mq=new RegExp(`^${iw}custom$`),gq=new RegExp(`^${sw}custom$`),hq=new RegExp(`^(${[...eq,...iq,...sq].join("|")})$`),yq=e=>lq.test(e),Sq=e=>dq.test(e),vq=e=>pq.test(e),Aq=e=>fq.test(e),xq=e=>hq.test(e),Cq=[Sq,yq,vq,Aq,xq],bq=[mq,gq],wq={anonymizeIp:"aip"},Rq={eventCategory:"ec",eventAction:"ea",eventLabel:"el",eventValue:"ev",page:"dp",visitorId:"cid",clientId:"cid",userId:"uid",currencyCode:"cu"},Fq={hitType:"t",pageViewId:"pid",encoding:"de",location:"dl",referrer:"dr",screenColor:"sd",screenResolution:"sr",title:"dt",userAgent:"ua",language:"ul",eventId:"z",time:"tm"},Eq=["contentId","contentIdKey","contentType","searchHub","tab","searchUid","permanentId","contentLocale","trackingId"],Iq=Object.assign(Object.assign(Object.assign(Object.assign({},wq),Rq),Fq),Eq.reduce((e,t)=>Object.assign(Object.assign({},e),{[t]:t}),{})),NS=Object.assign(Object.assign({},Iq),YD),Tq=e=>{let t=!!e.action&&tq[e.action]||{};return yr(e).reduce((r,n)=>{let o=t[n]||NS[n]||n;return Object.assign(Object.assign({},r),{[o]:e[n]})},{})},Pq=yr(NS).map(e=>NS[e]),kq=e=>Pq.indexOf(e)!==-1,Oq=e=>e==="custom",_q=e=>[...Cq,...ZD,kq,Oq].some(t=>t(e)),Nq=e=>yr(e).reduce((t,r)=>{let n=Dq(r);return n?Object.assign(Object.assign({},t),qq(n,e[r])):Object.assign(Object.assign({},t),{[r]:e[r]})},{}),Dq=e=>{let t;return[...bq].every(r=>{var n;return t=(n=r.exec(e))===null||n===void 0?void 0:n[1],!t}),t},qq=(e,t)=>yr(t).reduce((r,n)=>Object.assign(Object.assign({},r),{[`${e}${n}`]:t[n]}),{}),DS=class{constructor(t){this.opts=t}sendEvent(t,r){return B(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 B(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 B(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[_e.click,_e.custom,_e.search,_e.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}},qS=class{sendEvent(t,r){return B(this,void 0,void 0,function*(){return Promise.resolve()})}deleteHttpCookieVisitorId(){return B(this,void 0,void 0,function*(){return Promise.resolve()})}},Xb=y.fetch,rp=class{constructor(t){this.opts=t}sendEvent(t,r){return B(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=zn(f,["url"]),v;try{v=yield Xb(m,g)}catch(C){console.error("An error has occured when sending the event.",C);return}if(v.ok){let C=yield v.json();return C.visitorId&&o.setCurrentVisitorId(C.visitorId),C}else{try{v.json()}catch{}throw console.error(`An error has occured when sending the "${t}" event.`,v,r),new Error(`An error has occurred when sending the "${t}" event. Check the console logs for more details.`)}})}deleteHttpCookieVisitorId(){return B(this,void 0,void 0,function*(){let{baseUrl:t}=this.opts,r=`${t}/analytics/visit`;yield Xb(r,{headers:this.getHeaders(),method:"DELETE"})})}shouldAppendVisitorId(t){return[_e.click,_e.custom,_e.search,_e.view].indexOf(t)!==-1}getVisitorIdParam(){return B(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"})}},MS=class{constructor(t,r){ES()&&rw()?this.storage=new IS:ES()?this.storage=localStorage:(console.warn("BrowserRuntime detected no valid storage available.",this),this.storage=new Wi),this.client=new rp(t),this.beaconClient=new DS(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}},VS=class{constructor(t,r){this.storage=r||new Wi,this.client=new rp(t)}getClientDependingOnEventType(t){return this.client}},np=class{constructor(){this.storage=new Wi,this.client=new qS}getClientDependingOnEventType(t){return this.client}},Mq="xx",Vq=e=>e?.startsWith(Mq)||!1,jq=`
|
|
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
|
|
@@ -79,4 +79,4 @@ fast-json-patch/module/duplex.mjs:
|
|
|
79
79
|
*)
|
|
80
80
|
*/if(__exports!=exports)module.exports=exports;return module.exports});
|
|
81
81
|
|
|
82
|
-
window.coveoQuanticVersion = '3.38.
|
|
82
|
+
window.coveoQuanticVersion = '3.38.2';
|