@coveo/quantic 3.14.0 → 3.14.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (25) hide show
  1. package/docs/out/quantic-docs.json +9 -0
  2. package/force-app/main/default/lwc/quanticFeedbackModal/success.html +1 -1
  3. package/force-app/main/default/lwc/quanticFeedbackModalQna/templates/success.html +1 -1
  4. package/force-app/main/default/lwc/quanticGeneratedAnswer/quanticGeneratedAnswer.js +1 -1
  5. package/force-app/main/default/lwc/quanticSmartSnippet/__tests__/quanticSmartSnippet.test.js +0 -16
  6. package/force-app/main/default/lwc/quanticSmartSnippet/e2e/pageObject.ts +8 -0
  7. package/force-app/main/default/lwc/quanticSmartSnippet/e2e/quanticSmartSnippet.e2e.ts +51 -1
  8. package/force-app/main/default/lwc/quanticSort/__tests__/quanticSort.test.js +218 -37
  9. package/force-app/main/default/lwc/quanticSort/e2e/fixture.ts +61 -0
  10. package/force-app/main/default/lwc/quanticSort/e2e/pageObject.ts +89 -0
  11. package/force-app/main/default/lwc/quanticSort/e2e/quanticSort.e2e.ts +91 -0
  12. package/force-app/main/default/lwc/quanticSort/quanticSort.js +7 -4
  13. package/force-app/main/default/staticresources/coveoheadless/case-assist/headless.js +1 -1
  14. package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/commerce/core/facets/generator/headless-commerce-facet-generator.ssr.d.ts +2 -2
  15. package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/commerce/core/facets/location/headless-commerce-location-facet.d.ts +11 -0
  16. package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/commerce/core/facets/regular/headless-commerce-regular-facet.d.ts +8 -0
  17. package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/commerce/core/pagination/headless-core-commerce-pagination.d.ts +3 -0
  18. package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/commerce/core/pagination/headless-core-commerce-pagination.ssr.d.ts +2 -2
  19. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-commerce.index.d.ts +2 -2
  20. package/force-app/main/default/staticresources/coveoheadless/definitions/tsdoc-metadata.json +1 -1
  21. package/force-app/main/default/staticresources/coveoheadless/headless.js +1 -1
  22. package/force-app/main/default/staticresources/coveoheadless/insight/headless.js +1 -1
  23. package/force-app/main/default/staticresources/coveoheadless/recommendation/headless.js +1 -1
  24. package/force-app/main/default/staticresources/dompurify/purify.min.js +2 -2
  25. package/package.json +8 -8
@@ -23,7 +23,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
23
23
  `)}
24
24
 
25
25
  ${t}
26
- `;return new Qr(r)}var Qr=class extends Error{constructor(e){super(e),this.name="SchemaValidationError"}},Ee=class{constructor(e){this.definition=e}validate(e={},t=""){let r={...this.default,...e},n=[];for(let o in this.definition){let i=this.definition[o].validate(r[o]);i&&n.push(`${o}: ${i}`)}if(n.length)throw wf(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}},ue=class{constructor(e={}){this.baseConfig=e}validate(e){return this.baseConfig.required&&J(e)?"value is required.":null}get default(){return this.baseConfig.default instanceof Function?this.baseConfig.default():this.baseConfig.default}get required(){return this.baseConfig.required===!0}};function ye(e){return e===void 0}function xf(e){return e===null}function J(e){return ye(e)||xf(e)}var Y=class{constructor(e={}){ce(this,"value");this.config=e,this.value=new ue(e)}validate(e){let t=this.value.validate(e);return t||(Rf(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 Rf(e){return ye(e)||Ws(e)}function Ws(e){return typeof e=="number"&&!isNaN(e)}var Z=class{constructor(e={}){ce(this,"value");this.value=new ue(e)}validate(e){let t=this.value.validate(e);return t||(Ef(e)?null:"value is not a boolean.")}get default(){return this.value.default}get required(){return this.value.required}};function Ef(e){return ye(e)||Gs(e)}function Gs(e){return typeof e=="boolean"}var If=/^\d{4}(-\d\d(-\d\d(T\d\d:\d\d(:\d\d)?(\.\d+)?(([+-]\d\d:\d\d)|Z)?)?)?)?$/i,B=class{constructor(e={}){ce(this,"value");ce(this,"config");this.config={emptyAllowed:!0,url:!1,...e},this.value=new ue(this.config)}validate(e){let{emptyAllowed:t,url:r,regex:n,constrainTo:o,ISODate:i}=this.config,a=this.value.validate(e);if(a)return a;if(ye(e))return null;if(!kn(e))return"value is not a string.";if(!t&&!e.length)return"value is an empty string.";if(r)try{new URL(e)}catch{return"value is not a valid URL."}return n&&!n.test(e)?`value did not match provided regex ${n}`:o&&!o.includes(e)?`value should be one of: ${o.join(", ")}.`:i&&!(If.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 kn(e){return Object.prototype.toString.call(e)==="[object String]"}var G=class{constructor(e={}){ce(this,"config");this.config={options:{required:!1},values:{},...e}}validate(e){if(ye(e))return this.config.options.required?"value is required and is currently undefined":null;if(!Ks(e))return"value is not an object";for(let[r,n]of Object.entries(this.config.values))if(n.required&&J(e[r]))return`value does not contain ${r}`;let t="";for(let[r,n]of Object.entries(this.config.values)){let o=e[r],i=n.validate(o);i!==null&&(t+=" "+i)}return t===""?null:t}get default(){}get required(){return!!this.config.options.required}};function Ks(e){return e!==void 0&&typeof e=="object"}var ee=class{constructor(e={}){ce(this,"value");this.config=e,this.value=new ue(this.config)}validate(e){if(!J(e)&&!Array.isArray(e))return"value is not an array";let t=this.value.validate(e);if(t!==null)return t;if(J(e))return null;if(this.config.max!==void 0&&e.length>this.config.max)return`value contains more than ${this.config.max}`;if(this.config.min!==void 0&&e.length<this.config.min)return`value contains less than ${this.config.min}`;if(this.config.each!==void 0){let r="";return e.forEach(n=>{this.config.each.required&&J(n)&&(r=`value is null or undefined: ${e.join(",")}`);let o=this.validatePrimitiveValue(n,this.config.each);o!==null&&(r+=" "+o)}),r===""?null:r}return null}validatePrimitiveValue(e,t){return Gs(e)||kn(e)||Ws(e)||Ks(e)?t.validate(e):"value is not a primitive value"}get default(){}get required(){return this.value.required}};function Ys(e){return Array.isArray(e)}var Oi=class{constructor(e){ce(this,"value");this.config=e,this.value=new ue(e)}validate(e){let t=this.value.validate(e);return t!==null?t:ye(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}};p();u();d();l();function Js(e){return Array.isArray(e)}function On(e){return e.trim()===""}function Xs(e,t){return[...e.reduce((r,n)=>{let o=t(n);return r.has(o)||r.set(o,n),r},new Map).values()]}var Pf=new Set(["1",1,"yes",!0]);function Zs(){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=>Pf.has(r))}function ec(e){let t={};for(let[r,n]of e)t[r]=n;return t}function $r(e){if(typeof e!="object"||!e)return e;try{return JSON.parse(JSON.stringify(e))}catch{return e}}function Tf(e){if(On(e.openingDelimiter)||On(e.closingDelimiter))throw Error("delimiters should be a non-empty string");if(J(e.content)||On(e.content))return e.content;if(e.highlights.length===0)return er(e.content);let t=e.content.length,r="",n=0;for(let o=0;o<e.highlights.length;o++){let i=e.highlights[o],a=i.offset,m=a+i.length;if(m>t)break;r+=er(e.content.slice(n,a)),r+=e.openingDelimiter,r+=er(e.content.slice(a,m)),r+=e.closingDelimiter,n=m}return n!==t&&(r+=er(e.content.slice(n))),r}function Ff(e,t){return e=er(e),e.replace(/\[(.*?)\]|\{(.*?)\}|\((.*?)\)/g,(r,n,o,i)=>n?Di(n,t.notMatchDelimiters):o?Di(o,t.exactMatchDelimiters):i?Di(i,t.correctionDelimiters):r)}function Di(e,t){return t?t.open+e+t.close:e}function er(e){let t={"&":"&amp;","<":"&lt;",">":"&gt;","\"":"&quot;","'":"&#x27;","`":"&#x60;"},r="(?:"+Object.keys(t).join("|")+")",n=RegExp(r),o=RegExp(r,"g");return n.test(e)?e.replace(o,i=>t[i]):e}p();u();d();l();p();u();d();l();var Dn=e=>e;p();u();d();l();var tc=e=>e,rc=e=>e,nc=e=>e;p();u();d();l();p();u();d();l();function Mn(){return{answerSnippet:"",documentId:{contentIdKey:"",contentIdValue:""},question:"",relatedQuestions:[],score:0}}function $e(){return{response:{results:[],searchUid:"",totalCountFiltered:0,facets:[],generateAutomaticFacets:{facets:[]},queryCorrections:[],triggers:[],questionAnswer:Mn(),pipeline:"",splitTestRun:"",termsToHighlight:{},phrasesToHighlight:{},extendedResults:{}},duration:0,queryExecuted:"",error:null,automaticallyCorrected:!1,isLoading:!1,results:[],searchResponseId:"",requestId:"",questionAnswer:Mn(),extendedResults:{}}}p();u();d();l();function lt(e){let{url:t,accessToken:r,organizationId:n,authentication:o,...i}=e;return i}var dt=e=>{let{response:t}=e;return t.body?kf(e):Of(t)},kf=e=>Mf(e)?qf(e):Df(e)?e.body:{message:"unknown",statusCode:0,type:"unknown"},Of=e=>{let t=JSON.parse(JSON.stringify(e,Object.getOwnPropertyNames(e)));return{...t,message:`Client side error: ${t.message||""}`,statusCode:400,type:"ClientError"}};function Df(e){return e.body.statusCode!==void 0}function Mf(e){return e.body.exception!==void 0}var qf=e=>({message:e.body.exception.code,statusCode:e.response.status,type:e.body.exception.code});p();u();d();l();var gc=Ne(dc(),1);p();u();d();l();p();u();d();l();var sm="recommendation-internal-options",_A=Symbol.for(sm);var He=new Error("Failed to load reducers."),tr=class extends Error{constructor(){super(),this.name="ExpiredToken",this.message="The token being used to perform the request is expired."}};var jt=class extends Error{constructor(r,n){super();ce(this,"statusCode");this.name="Disconnected",this.message=`Client could not connect to the following URL: ${r}`,this.statusCode=n??0}};p();u();d();l();function pc(e){let t=[];for(let r in e){let n=encodeURIComponent(r),o=encodeURIComponent(e[r]);t.push(`${n}=${o}`)}return t.join("&")}function fc(e){return typeof e!="object"||!e?!1:Object.values(e).every(cm)}function cm(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"}function mc(e){return e===429}var je=class e{static call(t){return _asyncToGenerator(function*(){let r=um(t),{logger:n}=t,o=yield e.preprocessRequest(r,t);n.info(o,"Platform request");let{url:i,...a}=o,m=/*#__PURE__*/function(){var _ref=_asyncToGenerator(function*(){let f=yield w(i,a);if(mc(f.status))throw f;return f});return function m(){return _ref.apply(this,arguments)}}();try{let f=yield(0,gc.backOff)(m,{retry:s=>{let g=s&&mc(s.status);return g&&n.info("Platform retrying request"),g}});switch(f.status){case 419:case 401:throw n.info("Platform renewing token"),new tr;case 404:throw new jt(i,f.status);default:return n.info({response:f,requestInfo:o},"Platform response"),f}}catch(f){return f.message==="Failed to fetch"?new jt(i):f}})()}static preprocessRequest(t,r){return _asyncToGenerator(function*(){let{origin:n,preprocessRequest:o,logger:i,requestMetadata:a}=r,{signal:m,...f}=t,s=$r(f);try{let g=yield o(t,n,a);return{...t,...g}}catch(g){i.error(g,"Platform request preprocessing failed. Returning default request options.")}return s})()}};function Re(e,t="prod",r="platform"){let n=t==="prod"?"":t,o=r==="platform"?"":`.${r}`;return`https://${e}${o}.org${n}.coveo.com`}function pt(e,t="prod"){return`${Re(e,t)}/rest/search/v2`}function Nn(e,t="prod"){return`${Re(e,t,"analytics")}/rest/organizations/${e}/events/v1`}function um(e){let{url:t,method:r,requestParams:n,contentType:o,accessToken:i,signal:a}=e,m=e.method==="POST"||e.method==="PUT",f=lm(n,o);return{url:t,method:r,headers:{"Content-Type":o,Authorization:`Bearer ${i}`,...e.headers},...(m&&{body:f}),signal:a}}function lm(e,t){return t==="application/x-www-form-urlencoded"?fc(e)?pc(e):"":JSON.stringify(e)}p();u();d();l();var ft=class{constructor(){ce(this,"currentAbortController",null)}enqueue(t,r){var _this=this;return _asyncToGenerator(function*(){let n=_this.currentAbortController,o=_this.currentAbortController=new c.AbortController;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)}})()}};p();u();d();l();p();u();d();l();var Wr=class{constructor(t){ce(this,"_basePath");ce(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}};p();u();d();l();function hc(e){return((e.headers.get("content-type")||"").split(";").find(n=>n.indexOf("charset=")!==-1)||"").split("=")[1]||"UTF-8"}p();u();d();l();var tt=(e,t,r,n)=>{let o=new Wr(`${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 yc=/*#__PURE__*/function(){var _ref2=_asyncToGenerator(function*(e,t){let r=yield je.call({...tt(e,"POST","application/x-www-form-urlencoded","/html"),requestParams:lt(e),requestMetadata:{method:"html"},...t});if(r instanceof Error)throw r;let n=hc(r),o=yield r.arrayBuffer(),a=new TextDecoder(n).decode(o);return dm(a)?{success:a}:{error:dt({response:r,body:a})}});return function yc(_x,_x2){return _ref2.apply(this,arguments)}}();function dm(e){return typeof e=="string"}p();u();d();l();function pm(e){return{statusCode:e.statusCode,type:e.name,message:e.message}}function fm(e){return{statusCode:e.code,type:e.name,message:e.message,ignored:!0}}function _n(e,t){if(t&&e.name==="AbortError")return{error:fm(e)};if(e instanceof jt)return{error:pm(e)};throw e}var Vn=class{constructor(t){this.options=t;ce(this,"apiCallsQueues",{unknown:new ft,mainSearch:new ft,facetValues:new ft,foldingCollection:new ft,instantResults:new ft})}plan(t){var _this2=this;return _asyncToGenerator(function*(){let r=yield je.call({...tt(t,"POST","application/json","/plan"),requestParams:lt(t),requestMetadata:{method:"plan"},..._this2.options});if(r instanceof Error)return _n(r);let n=yield r.json();return gm(n)?{success:n}:{error:dt({response:r,body:n})}})()}querySuggest(t){var _this3=this;return _asyncToGenerator(function*(){let r=yield je.call({...tt(t,"POST","application/json","/querySuggest"),requestMetadata:{method:"querySuggest"},requestParams:lt(t),..._this3.options});if(r instanceof Error)return _n(r);let n=yield r.json(),o={response:r,body:n};return mm(n)?{success:(yield _this3.options.postprocessQuerySuggestResponseMiddleware(o)).body}:{error:dt(o)}})()}search(t,r){var _this4=this;return _asyncToGenerator(function*(){let n=r?.origin??"unknown",o=yield _this4.apiCallsQueues[n].enqueue(m=>je.call({...tt(t,"POST","application/json",""),requestParams:lt(t),requestMetadata:{method:"search",origin:r?.origin},..._this4.options,signal:m??void 0}),{logger:_this4.options.logger,warnOnAbort:!r?.disableAbortWarning});if(o instanceof Error)return _n(o,r?.disableAbortWarning);let i=yield o.json(),a={response:o,body:i};return Sc(i)?(a.body=vc(i),{success:(yield _this4.options.postprocessSearchResponseMiddleware(a)).body}):{error:dt(a)}})()}facetSearch(t){var _this5=this;return _asyncToGenerator(function*(){let r=yield je.call({...tt(t,"POST","application/json","/facet"),requestParams:lt(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 je.call({...tt(t,"POST","application/json",""),requestParams:lt(t),requestMetadata:{method:"recommendations"},..._this6.options});if(r instanceof Error)throw r;let n=yield r.json();if(Sc(n)){let o={response:r,body:n};return o.body=vc(n),{success:(yield _this6.options.postprocessSearchResponseMiddleware(o)).body}}return{error:dt({response:r,body:n})}})()}html(t){var _this7=this;return _asyncToGenerator(function*(){return yc(t,{..._this7.options})})()}fieldDescriptions(t){var _this8=this;return _asyncToGenerator(function*(){let r=yield je.call({...tt(t,"GET","application/json","/fields"),requestParams:{},requestMetadata:{method:"fieldDescriptions"},..._this8.options});if(r instanceof Error)throw r;let n=yield r.json();return hm(n)?{success:n}:{error:dt({response:r,body:n})}})()}},jn=e=>e.success!==void 0,Ie=e=>e.error!==void 0;function Sc(e){return e.results!==void 0}function vc(e){let t=Mn();return J(e.questionAnswer)?(e.questionAnswer=t,e):(e.questionAnswer={...t,...e.questionAnswer},e)}function mm(e){return e.completions!==void 0}function gm(e){return e.preprocessingOutput!==void 0}function hm(e){return e.fields!==void 0}p();u();d();l();p();u();d();l();p();u();d();l();function Se(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 ym=typeof Symbol=="function"&&Symbol.observable||"@@observable",Cc=ym,Qi=()=>Math.random().toString(36).substring(7).split("").join("."),Sm={INIT:`@@redux/INIT${Qi()}`,REPLACE:`@@redux/REPLACE${Qi()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Qi()}`},Ln=Sm;function ze(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 $i(e,t,r){if(typeof e!="function")throw new Error(Se(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(Se(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(Se(1));return r($i)(e,t)}let n=e,o=t,i=new Map,a=i,m=0,f=!1;function s(){a===i&&(a=new Map,i.forEach((I,E)=>{a.set(E,I)}))}function g(){if(f)throw new Error(Se(3));return o}function S(I){if(typeof I!="function")throw new Error(Se(4));if(f)throw new Error(Se(5));let E=!0;s();let b=m++;return a.set(b,I),function(){if(E){if(f)throw new Error(Se(6));E=!1,s(),a.delete(b),i=null}}}function y(I){if(!ze(I))throw new Error(Se(7));if(typeof I.type>"u")throw new Error(Se(8));if(typeof I.type!="string")throw new Error(Se(17));if(f)throw new Error(Se(9));try{f=!0,o=n(o,I)}finally{f=!1}return(i=a).forEach(b=>{b()}),I}function h(I){if(typeof I!="function")throw new Error(Se(10));n=I,y({type:Ln.REPLACE})}function v(){let I=S;return{subscribe(E){if(typeof E!="object"||E===null)throw new Error(Se(11));function b(){let T=E;T.next&&T.next(g())}return b(),{unsubscribe:I(b)}},[Cc](){return this}}}return y({type:Ln.INIT}),{dispatch:y,subscribe:S,getState:g,replaceReducer:h,[Cc]:v}}function vm(e){Object.keys(e).forEach(t=>{let r=e[t];if(typeof r(void 0,{type:Ln.INIT})>"u")throw new Error(Se(12));if(typeof r(void 0,{type:Ln.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Se(13))})}function rr(e){let t=Object.keys(e),r={};for(let a=0;a<t.length;a++){let m=t[a];typeof e[m]=="function"&&(r[m]=e[m])}let n=Object.keys(r),o,i;try{vm(r)}catch(a){i=a}return function(m={},f){if(i)throw i;let s=!1,g={};for(let S=0;S<n.length;S++){let y=n[S],h=r[y],v=m[y],C=h(v,f);if(typeof C>"u"){let I=f&&f.type;throw new Error(Se(14))}g[y]=C,s=s||C!==v}return s=s||n.length!==Object.keys(m).length,s?g:m}}function nr(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function bc(...e){return t=>(r,n)=>{let o=t(r,n),i=()=>{throw new Error(Se(15))},a={getState:o.getState,dispatch:(f,...s)=>i(f,...s)},m=e.map(f=>f(a));return i=nr(...m)(o.dispatch),{...o,dispatch:i}}}function Un(e){return ze(e)&&"type"in e&&typeof e.type=="string"}p();u();d();l();var ea=Symbol.for("immer-nothing"),Gr=Symbol.for("immer-draftable"),Pe=Symbol.for("immer-state");function ve(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Ut=Object.getPrototypeOf;function Oe(e){return!!e&&!!e[Pe]}function Te(e){return e?Ec(e)||Array.isArray(e)||!!e[Gr]||!!e.constructor?.[Gr]||Zr(e)||en(e):!1}var Cm=Object.prototype.constructor.toString();function Ec(e){if(!e||typeof e!="object")return!1;let t=Ut(e);if(t===null)return!0;let r=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return r===Object?!0:typeof r=="function"&&Function.toString.call(r)===Cm}function ta(e){return Oe(e)||ve(15,e),e[Pe].base_}function Kr(e,t){Bt(e)===0?Reflect.ownKeys(e).forEach(r=>{t(r,e[r],e)}):e.forEach((r,n)=>t(n,r,e))}function Bt(e){let t=e[Pe];return t?t.type_:Array.isArray(e)?1:Zr(e)?2:en(e)?3:0}function Yr(e,t){return Bt(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Hi(e,t){return Bt(e)===2?e.get(t):e[t]}function Ic(e,t,r){let n=Bt(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function bm(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Zr(e){return e instanceof Map}function en(e){return e instanceof Set}function Lt(e){return e.copy_||e.base_}function Gi(e,t){if(Zr(e))return new Map(e);if(en(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);let r=Ec(e);if(t===!0||t==="class_only"&&!r){let n=Object.getOwnPropertyDescriptors(e);delete n[Pe];let o=Reflect.ownKeys(n);for(let i=0;i<o.length;i++){let a=o[i],m=n[a];m.writable===!1&&(m.writable=!0,m.configurable=!0),(m.get||m.set)&&(n[a]={configurable:!0,writable:!0,enumerable:m.enumerable,value:e[a]})}return Object.create(Ut(e),n)}else{let n=Ut(e);if(n!==null&&r)return{...e};let o=Object.create(n);return Object.assign(o,e)}}function $n(e,t=!1){return Hn(e)||Oe(e)||!Te(e)||(Bt(e)>1&&(e.set=e.add=e.clear=e.delete=Am),Object.freeze(e),t&&Object.entries(e).forEach(([r,n])=>$n(n,!0))),e}function Am(){ve(2)}function Hn(e){return Object.isFrozen(e)}var Ki={};function Qt(e){let t=Ki[e];return t||ve(0,e),t}function wm(e,t){Ki[e]||(Ki[e]=t)}var Jr;function Pc(){return Jr}function xm(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Ac(e,t){t&&(Qt("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Yi(e){Ji(e),e.drafts_.forEach(Rm),e.drafts_=null}function Ji(e){e===Jr&&(Jr=e.parent_)}function wc(e){return Jr=xm(Jr,e)}function Rm(e){let t=e[Pe];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function xc(e,t){t.unfinalizedDrafts_=t.drafts_.length;let r=t.drafts_[0];return e!==void 0&&e!==r?(r[Pe].modified_&&(Yi(t),ve(4)),Te(e)&&(e=Bn(t,e),t.parent_||Qn(t,e)),t.patches_&&Qt("Patches").generateReplacementPatches_(r[Pe].base_,e,t.patches_,t.inversePatches_)):e=Bn(t,r,[]),Yi(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==ea?e:void 0}function Bn(e,t,r){if(Hn(t))return t;let n=t[Pe];if(!n)return Kr(t,(o,i)=>Rc(e,n,t,o,i,r)),t;if(n.scope_!==e)return t;if(!n.modified_)return Qn(e,n.base_,!0),n.base_;if(!n.finalized_){n.finalized_=!0,n.scope_.unfinalizedDrafts_--;let o=n.copy_,i=o,a=!1;n.type_===3&&(i=new Set(o),o.clear(),a=!0),Kr(i,(m,f)=>Rc(e,n,o,m,f,r,a)),Qn(e,o,!1),r&&e.patches_&&Qt("Patches").generatePatches_(n,r,e.patches_,e.inversePatches_)}return n.copy_}function Rc(e,t,r,n,o,i,a){if(Oe(o)){let m=i&&t&&t.type_!==3&&!Yr(t.assigned_,n)?i.concat(n):void 0,f=Bn(e,o,m);if(Ic(r,n,f),Oe(f))e.canAutoFreeze_=!1;else return}else a&&r.add(o);if(Te(o)&&!Hn(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Bn(e,o),(!t||!t.scope_.parent_)&&typeof n!="symbol"&&Object.prototype.propertyIsEnumerable.call(r,n)&&Qn(e,o)}}function Qn(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&$n(t,r)}function Em(e,t){let r=Array.isArray(e),n={type_:r?1:0,scope_:t?t.scope_:Pc(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1},o=n,i=ra;r&&(o=[n],i=Xr);let{revoke:a,proxy:m}=Proxy.revocable(o,i);return n.draft_=m,n.revoke_=a,m}var ra={get(e,t){if(t===Pe)return e;let r=Lt(e);if(!Yr(r,t))return Im(e,r,t);let n=r[t];return e.finalized_||!Te(n)?n:n===zi(e.base_,t)?(Wi(e),e.copy_[t]=Zi(n,e)):n},has(e,t){return t in Lt(e)},ownKeys(e){return Reflect.ownKeys(Lt(e))},set(e,t,r){let n=Tc(Lt(e),t);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){let o=zi(Lt(e),t),i=o?.[Pe];if(i&&i.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(bm(r,o)&&(r!==void 0||Yr(e.base_,t)))return!0;Wi(e),Xi(e)}return e.copy_[t]===r&&(r!==void 0||t in e.copy_)||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_[t]=!0),!0},deleteProperty(e,t){return zi(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Wi(e),Xi(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let r=Lt(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty(){ve(11)},getPrototypeOf(e){return Ut(e.base_)},setPrototypeOf(){ve(12)}},Xr={};Kr(ra,(e,t)=>{Xr[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});Xr.deleteProperty=function(e,t){return Xr.set.call(this,e,t,void 0)};Xr.set=function(e,t,r){return ra.set.call(this,e[0],t,r,e[0])};function zi(e,t){let r=e[Pe];return(r?Lt(r):e)[t]}function Im(e,t,r){let n=Tc(t,r);return n?"value"in n?n.value:n.get?.call(e.draft_):void 0}function Tc(e,t){if(!(t in e))return;let r=Ut(e);for(;r;){let n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Ut(r)}}function Xi(e){e.modified_||(e.modified_=!0,e.parent_&&Xi(e.parent_))}function Wi(e){e.copy_||(e.copy_=Gi(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Pm=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,r,n)=>{if(typeof t=="function"&&typeof r!="function"){let i=r;r=t;let a=this;return function(f=i,...s){return a.produce(f,g=>r.call(this,g,...s))}}typeof r!="function"&&ve(6),n!==void 0&&typeof n!="function"&&ve(7);let o;if(Te(t)){let i=wc(this),a=Zi(t,void 0),m=!0;try{o=r(a),m=!1}finally{m?Yi(i):Ji(i)}return Ac(i,n),xc(o,i)}else if(!t||typeof t!="object"){if(o=r(t),o===void 0&&(o=t),o===ea&&(o=void 0),this.autoFreeze_&&$n(o,!0),n){let i=[],a=[];Qt("Patches").generateReplacementPatches_(t,o,i,a),n(i,a)}return o}else ve(1,t)},this.produceWithPatches=(t,r)=>{if(typeof t=="function")return(a,...m)=>this.produceWithPatches(a,f=>t(f,...m));let n,o;return[this.produce(t,r,(a,m)=>{n=a,o=m}),n,o]},typeof e?.autoFreeze=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof e?.useStrictShallowCopy=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){Te(e)||ve(8),Oe(e)&&(e=Fc(e));let t=wc(this),r=Zi(e,void 0);return r[Pe].isManual_=!0,Ji(t),r}finishDraft(e,t){let r=e&&e[Pe];(!r||!r.isManual_)&&ve(9);let{scope_:n}=r;return Ac(n,t),xc(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){let o=t[r];if(o.path.length===0&&o.op==="replace"){e=o.value;break}}r>-1&&(t=t.slice(r+1));let n=Qt("Patches").applyPatches_;return Oe(e)?n(e,t):this.produce(e,o=>n(o,t))}};function Zi(e,t){let r=Zr(e)?Qt("MapSet").proxyMap_(e,t):en(e)?Qt("MapSet").proxySet_(e,t):Em(e,t);return(t?t.scope_:Pc()).drafts_.push(r),r}function Fc(e){return Oe(e)||ve(10,e),kc(e)}function kc(e){if(!Te(e)||Hn(e))return e;let t=e[Pe],r;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=Gi(e,t.scope_.immer_.useStrictShallowCopy_)}else r=Gi(e,!0);return Kr(r,(n,o)=>{Ic(r,n,kc(o))}),t&&(t.finalized_=!1),r}function Oc(){let t="replace",r="add",n="remove";function o(y,h,v,C){switch(y.type_){case 0:case 2:return a(y,h,v,C);case 1:return i(y,h,v,C);case 3:return m(y,h,v,C)}}function i(y,h,v,C){let{base_:I,assigned_:E}=y,b=y.copy_;b.length<I.length&&([I,b]=[b,I],[v,C]=[C,v]);for(let R=0;R<I.length;R++)if(E[R]&&b[R]!==I[R]){let T=h.concat([R]);v.push({op:t,path:T,value:S(b[R])}),C.push({op:t,path:T,value:S(I[R])})}for(let R=I.length;R<b.length;R++){let T=h.concat([R]);v.push({op:r,path:T,value:S(b[R])})}for(let R=b.length-1;I.length<=R;--R){let T=h.concat([R]);C.push({op:n,path:T})}}function a(y,h,v,C){let{base_:I,copy_:E}=y;Kr(y.assigned_,(b,R)=>{let T=Hi(I,b),V=Hi(E,b),k=R?Yr(I,b)?t:r:n;if(T===V&&k===t)return;let P=h.concat(b);v.push(k===n?{op:k,path:P}:{op:k,path:P,value:V}),C.push(k===r?{op:n,path:P}:k===n?{op:r,path:P,value:S(T)}:{op:t,path:P,value:S(T)})})}function m(y,h,v,C){let{base_:I,copy_:E}=y,b=0;I.forEach(R=>{if(!E.has(R)){let T=h.concat([b]);v.push({op:n,path:T,value:R}),C.unshift({op:r,path:T,value:R})}b++}),b=0,E.forEach(R=>{if(!I.has(R)){let T=h.concat([b]);v.push({op:r,path:T,value:R}),C.unshift({op:n,path:T,value:R})}b++})}function f(y,h,v,C){v.push({op:t,path:[],value:h===ea?void 0:h}),C.push({op:t,path:[],value:y})}function s(y,h){return h.forEach(v=>{let{path:C,op:I}=v,E=y;for(let V=0;V<C.length-1;V++){let k=Bt(E),P=C[V];typeof P!="string"&&typeof P!="number"&&(P=""+P),(k===0||k===1)&&(P==="__proto__"||P==="constructor")&&ve(19),typeof E=="function"&&P==="prototype"&&ve(19),E=Hi(E,P),typeof E!="object"&&ve(18,C.join("/"))}let b=Bt(E),R=g(v.value),T=C[C.length-1];switch(I){case t:switch(b){case 2:return E.set(T,R);case 3:ve(16);default:return E[T]=R}case r:switch(b){case 1:return T==="-"?E.push(R):E.splice(T,0,R);case 2:return E.set(T,R);case 3:return E.add(R);default:return E[T]=R}case n:switch(b){case 1:return E.splice(T,1);case 2:return E.delete(T);case 3:return E.delete(v.value);default:return delete E[T]}default:ve(17,I)}}),y}function g(y){if(!Te(y))return y;if(Array.isArray(y))return y.map(g);if(Zr(y))return new Map(Array.from(y.entries()).map(([v,C])=>[v,g(C)]));if(en(y))return new Set(Array.from(y).map(g));let h=Object.create(Ut(y));for(let v in y)h[v]=g(y[v]);return Yr(y,Gr)&&(h[Gr]=y[Gr]),h}function S(y){return Oe(y)?g(y):y}wm("Patches",{applyPatches_:s,generatePatches_:o,generateReplacementPatches_:f})}var De=new Pm,rt=De.produce,zn=De.produceWithPatches.bind(De),hx=De.setAutoFreeze.bind(De),yx=De.setUseStrictShallowCopy.bind(De),na=De.applyPatches.bind(De),Sx=De.createDraft.bind(De),vx=De.finishDraft.bind(De);p();u();d();l();function Tm(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function Fm(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function km(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 Dc=e=>Array.isArray(e)?e:[e];function Om(e){let t=Array.isArray(e[0])?e[0]:e;return km(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function Dm(e,t){let r=[],{length:n}=e;for(let o=0;o<n;o++)r.push(e[o].apply(null,t));return r}var Ex=Symbol();var Ix=Object.getPrototypeOf({});var Mm=class{constructor(e){this.value=e}deref(){return this.value}},qm=typeof WeakRef<"u"?WeakRef:Mm,Nm=0,Mc=1;function Wn(){return{s:Nm,v:void 0,o:null,p:null}}function or(e,t={}){let r=Wn(),{resultEqualityCheck:n}=t,o,i=0;function a(){let m=r,{length:f}=arguments;for(let S=0,y=f;S<y;S++){let h=arguments[S];if(typeof h=="function"||typeof h=="object"&&h!==null){let v=m.o;v===null&&(m.o=v=new WeakMap);let C=v.get(h);C===void 0?(m=Wn(),v.set(h,m)):m=C}else{let v=m.p;v===null&&(m.p=v=new Map);let C=v.get(h);C===void 0?(m=Wn(),v.set(h,m)):m=C}}let s=m,g;if(m.s===Mc)g=m.v;else if(g=e.apply(null,arguments),i++,n){let S=o?.deref?.()??o;S!=null&&n(S,g)&&(g=S,i!==0&&i--),o=typeof g=="object"&&g!==null||typeof g=="function"?new qm(g):g}return s.s=Mc,s.v=g,g}return a.clearCache=()=>{r=Wn(),a.resetResultsCount()},a.resultsCount=()=>i,a.resetResultsCount=()=>{i=0},a}function qc(e,...t){let r=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,n=(...o)=>{let i=0,a=0,m,f={},s=o.pop();typeof s=="object"&&(f=s,s=o.pop()),Tm(s,`createSelector expects an output function after the inputs, but received: [${typeof s}]`);let g={...r,...f},{memoize:S,memoizeOptions:y=[],argsMemoize:h=or,argsMemoizeOptions:v=[],devModeChecks:C={}}=g,I=Dc(y),E=Dc(v),b=Om(o),R=S(function(){return i++,s.apply(null,arguments)},...I),T=!0,V=h(function(){a++;let P=Dm(b,arguments);return m=R.apply(null,P),m},...E);return Object.assign(V,{resultFunc:s,memoizedResultFunc:R,dependencies:b,dependencyRecomputations:()=>a,resetDependencyRecomputations:()=>{a=0},lastResult:()=>m,recomputations:()=>i,resetRecomputations:()=>{i=0},memoize:S,argsMemoize:h})};return Object.assign(n,{withTypes:()=>n}),n}var pe=qc(or),_m=Object.assign((e,t=pe)=>{Fm(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);let r=Object.keys(e),n=r.map(i=>e[i]);return t(n,(...i)=>i.reduce((a,m,f)=>(a[r[f]]=m,a),{}))},{withTypes:()=>_m});p();u();d();l();function Nc(e){return({dispatch:r,getState:n})=>o=>i=>typeof i=="function"?i(r,n,e):o(i)}var _c=Nc(),Vc=Nc;var Vm=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?nr:nr.apply(null,arguments)},Hx=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}},jm=e=>e&&typeof e.match=="function";function F(e,t){function r(...n){if(t){let o=t(...n);if(!o)throw new Error(Le(0));return{type:e,payload:o.payload,...("meta"in o&&{meta:o.meta}),...("error"in o&&{error:o.error})}}return{type:e,payload:n[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=n=>Un(n)&&n.type===e,r}var Qc=class tn extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,tn.prototype)}static get[Symbol.species](){return tn}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new tn(...t[0].concat(this)):new tn(...t.concat(this))}};function jc(e){return Te(e)?rt(e,()=>{}):e}function Lc(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function Lm(e){return typeof e=="boolean"}var Um=()=>function(t){let{thunk:r=!0,immutableCheck:n=!0,serializableCheck:o=!0,actionCreatorCheck:i=!0}=t??{},a=new Qc;return r&&(Lm(r)?a.push(_c):a.push(Vc(r.extraArgument))),a},mt="RTK_autoBatch",ar=()=>e=>({payload:e,meta:{[mt]:!0}}),Uc=e=>t=>{setTimeout(t,e)},Bm=(e={type:"raf"})=>t=>(...r)=>{let n=t(...r),o=!0,i=!1,a=!1,m=new Set,f=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Uc(10):e.type==="callback"?e.queueNotification:Uc(e.timeout),s=()=>{a=!1,i&&(i=!1,m.forEach(g=>g()))};return Object.assign({},n,{subscribe(g){let S=()=>o&&g(),y=n.subscribe(S);return m.add(g),()=>{y(),m.delete(g)}},dispatch(g){try{return o=!g?.meta?.[mt],i=!o,i&&(a||(a=!0,f(s))),n.dispatch(g)}finally{o=!0}}})},Qm=e=>function(r){let{autoBatch:n=!0}=r??{},o=new Qc(e);return n&&o.push(Bm(typeof n=="object"?n:void 0)),o};function $c(e){let t=Um(),{reducer:r=void 0,middleware:n,devTools:o=!0,preloadedState:i=void 0,enhancers:a=void 0}=e||{},m;if(typeof r=="function")m=r;else if(ze(r))m=rr(r);else throw new Error(Le(1));let f;typeof n=="function"?f=n(t):f=t();let s=nr;o&&(s=Vm({trace:!1,...(typeof o=="object"&&o)}));let g=bc(...f),S=Qm(g),y=typeof a=="function"?a(S):S(),h=s(...y);return $i(m,i,h)}function Hc(e){let t={},r=[],n,o={addCase(i,a){let m=typeof i=="string"?i:i.type;if(!m)throw new Error(Le(28));if(m in t)throw new Error(Le(29));return t[m]=a,o},addMatcher(i,a){return r.push({matcher:i,reducer:a}),o},addDefaultCase(i){return n=i,o}};return e(o),[t,r,n]}function $m(e){return typeof e=="function"}function de(e,t){let[r,n,o]=Hc(t),i;if($m(e))i=()=>jc(e());else{let m=jc(e);i=()=>m}function a(m=i(),f){let s=[r[f.type],...n.filter(({matcher:g})=>g(f)).map(({reducer:g})=>g)];return s.filter(g=>!!g).length===0&&(s=[o]),s.reduce((g,S)=>{if(S)if(Oe(g)){let h=S(g,f);return h===void 0?g:h}else{if(Te(g))return rt(g,y=>S(y,f));{let y=S(g,f);if(y===void 0){if(g===null)return g;throw Error("A case reducer on a non-draftable value must not return undefined")}return y}}return g},m)}return a.getInitialState=i,a}var zc=(e,t)=>jm(e)?e.match(t):e(t);function We(...e){return t=>e.some(r=>zc(r,t))}function ir(...e){return t=>e.every(r=>zc(r,t))}function Kn(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 rn(e){return typeof e[0]=="function"&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function Yn(...e){return e.length===0?t=>Kn(t,["pending"]):rn(e)?We(...e.map(t=>t.pending)):Yn()(e[0])}function $t(...e){return e.length===0?t=>Kn(t,["rejected"]):rn(e)?We(...e.map(t=>t.rejected)):$t()(e[0])}function nn(...e){let t=r=>r&&r.meta&&r.meta.rejectedWithValue;return e.length===0?ir($t(...e),t):rn(e)?ir($t(...e),t):nn()(e[0])}function nt(...e){return e.length===0?t=>Kn(t,["fulfilled"]):rn(e)?We(...e.map(t=>t.fulfilled)):nt()(e[0])}function Jn(...e){return e.length===0?t=>Kn(t,["pending","fulfilled","rejected"]):rn(e)?We(...e.flatMap(t=>[t.pending,t.rejected,t.fulfilled])):Jn()(e[0])}var Hm="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Xn=(e=21)=>{let t="",r=e;for(;r--;)t+=Hm[Math.random()*64|0];return t},zm=["name","message","stack","code"],oa=class{constructor(e,t){ce(this,"_type");this.payload=e,this.meta=t}},Bc=class{constructor(e,t){ce(this,"_type");this.payload=e,this.meta=t}},Wm=e=>{if(typeof e=="object"&&e!==null){let t={};for(let r of zm)typeof e[r]=="string"&&(t[r]=e[r]);return t}return{message:String(e)}},oe=(()=>{function e(t,r,n){let o=F(t+"/fulfilled",(f,s,g,S)=>({payload:f,meta:{...(S||{}),arg:g,requestId:s,requestStatus:"fulfilled"}})),i=F(t+"/pending",(f,s,g)=>({payload:void 0,meta:{...(g||{}),arg:s,requestId:f,requestStatus:"pending"}})),a=F(t+"/rejected",(f,s,g,S,y)=>({payload:S,error:(n&&n.serializeError||Wm)(f||"Rejected"),meta:{...(y||{}),arg:g,requestId:s,rejectedWithValue:!!S,requestStatus:"rejected",aborted:f?.name==="AbortError",condition:f?.name==="ConditionError"}}));function m(f){return(s,g,S)=>{let y=n?.idGenerator?n.idGenerator(f):Xn(),h=new c.AbortController,v,C;function I(b){C=b,h.abort()}let E=_asyncToGenerator(function*(){let b;try{let T=n?.condition?.(f,{getState:g,extra:S});if(Km(T)&&(T=yield T),T===!1||h.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let V=new Promise((k,P)=>{v=()=>{P({name:"AbortError",message:C||"Aborted"})},h.signal.addEventListener("abort",v)});s(i(y,f,n?.getPendingMeta?.({requestId:y,arg:f},{getState:g,extra:S}))),b=yield Promise.race([V,Promise.resolve(r(f,{dispatch:s,getState:g,extra:S,requestId:y,signal:h.signal,abort:I,rejectWithValue:(k,P)=>new oa(k,P),fulfillWithValue:(k,P)=>new Bc(k,P)})).then(k=>{if(k instanceof oa)throw k;return k instanceof Bc?o(k.payload,y,f,k.meta):o(k,y,f)})])}catch(T){b=T instanceof oa?a(null,y,f,T.payload,T.meta):a(T,y,f)}finally{v&&h.signal.removeEventListener("abort",v)}return n&&!n.dispatchConditionRejection&&a.match(b)&&b.meta.condition||s(b),b})();return Object.assign(E,{abort:I,requestId:y,arg:f,unwrap(){return E.then(Gm)}})}}return Object.assign(m,{pending:i,rejected:a,fulfilled:o,settled:We(a,o),typePrefix:t})}return e.withTypes=()=>e,e})();function Gm(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function Km(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var Wc=Symbol.for("rtk-slice-createasyncthunk"),Yx={[Wc]:oe};function Ym(e,t){return`${e}/${t}`}function Jm({creators:e}={}){let t=e?.asyncThunk?.[Wc];return function(n){let{name:o,reducerPath:i=o}=n;if(!o)throw new Error(Le(11));typeof process<"u";let a=(typeof n.reducers=="function"?n.reducers(Zm()):n.reducers)||{},m=Object.keys(a),f={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},s={addCase(b,R){let T=typeof b=="string"?b:b.type;if(!T)throw new Error(Le(12));if(T in f.sliceCaseReducersByType)throw new Error(Le(13));return f.sliceCaseReducersByType[T]=R,s},addMatcher(b,R){return f.sliceMatchers.push({matcher:b,reducer:R}),s},exposeAction(b,R){return f.actionCreators[b]=R,s},exposeCaseReducer(b,R){return f.sliceCaseReducersByName[b]=R,s}};m.forEach(b=>{let R=a[b],T={reducerName:b,type:Ym(o,b),createNotation:typeof n.reducers=="function"};tg(R)?ng(T,R,s,t):eg(T,R,s)});function g(){let[b={},R=[],T=void 0]=typeof n.extraReducers=="function"?Hc(n.extraReducers):[n.extraReducers],V={...b,...f.sliceCaseReducersByType};return de(n.initialState,k=>{for(let P in V)k.addCase(P,V[P]);for(let P of f.sliceMatchers)k.addMatcher(P.matcher,P.reducer);for(let P of R)k.addMatcher(P.matcher,P.reducer);T&&k.addDefaultCase(T)})}let S=b=>b,y=new Map,h;function v(b,R){return h||(h=g()),h(b,R)}function C(){return h||(h=g()),h.getInitialState()}function I(b,R=!1){function T(k){let P=k[b];return typeof P>"u"&&R&&(P=C()),P}function V(k=S){let P=Lc(y,R,()=>new WeakMap);return Lc(P,k,()=>{let M={};for(let[q,_]of Object.entries(n.selectors??{}))M[q]=Xm(_,k,C,R);return M})}return{reducerPath:b,getSelectors:V,get selectors(){return V(T)},selectSlice:T}}let E={name:o,reducer:v,actions:f.actionCreators,caseReducers:f.sliceCaseReducersByName,getInitialState:C,...I(i),injectInto(b,{reducerPath:R,...T}={}){let V=R??i;return b.inject({reducerPath:V,reducer:v},T),{...E,...I(V,!0)}}};return E}}function Xm(e,t,r,n){function o(i,...a){let m=t(i);return typeof m>"u"&&n&&(m=r()),e(m,...a)}return o.unwrapped=e,o}var Ht=Jm();function Zm(){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 eg({type:e,reducerName:t,createNotation:r},n,o){let i,a;if("reducer"in n){if(r&&!rg(n))throw new Error(Le(17));i=n.reducer,a=n.prepare}else i=n;o.addCase(e,i).exposeCaseReducer(t,i).exposeAction(t,a?F(e,a):F(e))}function tg(e){return e._reducerDefinitionType==="asyncThunk"}function rg(e){return e._reducerDefinitionType==="reducerWithPrepare"}function ng({type:e,reducerName:t},r,n,o){if(!o)throw new Error(Le(18));let{payloadCreator:i,fulfilled:a,pending:m,rejected:f,settled:s,options:g}=r,S=o(e,i,g);n.exposeAction(t,S),a&&n.addCase(S.fulfilled,a),m&&n.addCase(S.pending,m),f&&n.addCase(S.rejected,f),s&&n.addMatcher(S.settled,s),n.exposeCaseReducer(t,{fulfilled:a||Gn,pending:m||Gn,rejected:f||Gn,settled:s||Gn})}function Gn(){}var Gc="listener",Kc="completed",Yc="cancelled",Jx=`task-${Yc}`,Xx=`task-${Kc}`,Zx=`${Gc}-${Yc}`,eR=`${Gc}-${Kc}`;var{assign:Jc}=Object;var ia="listenerMiddleware";var og=Jc(F(`${ia}/add`),{withTypes:()=>og}),tR=F(`${ia}/removeAll`),ig=Jc(F(`${ia}/remove`),{withTypes:()=>ig});var rR=Symbol.for("rtk-state-proxy-original");function Le(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. `}p();u();d();l();var K=new B({required:!0,emptyAllowed:!1}),me=new B({required:!1,emptyAllowed:!1}),Ce=new B({required:!0,emptyAllowed:!0}),gR=new B({required:!1,emptyAllowed:!0}),Zn=new ee({each:K,required:!0}),Xc=new B({required:!1,emptyAllowed:!1,regex:/^\d+\.\d+\.\d+$/}),ot=({message:e,name:t,stack:r})=>({message:e,name:t,stack:r}),_e=(e,t)=>{if("required"in t)return{payload:new Ee({value:t}).validate({value:e}).value};let o=new G({options:{required:!0},values:t}).validate(e);if(o)throw new Qr(o);return{payload:e}},U=(e,t)=>{try{return _e(e,t)}catch(r){return{payload:e,error:ot(r)}}},Zc=(e,t,r,n)=>{let o=`Check the initialState of ${n}`;return tu(e,t,r,o,"Controller initialization error")},eu=(e,t,r,n)=>{let o=`Check the options of ${n}`;return tu(e,t,r,o,"Controller initialization error")},tu=(e,t,r,n,o)=>{try{return t.validate(r,n)}catch(i){throw e.logger.error(i,o),i}};p();u();d();l();var sr="3.15.0",ru=["@coveo/atomic","@coveo/quantic"];var aa=()=>me,nu=()=>K,gt=F("configuration/updateBasicConfiguration",e=>U(e,{accessToken:me,environment:new B({required:!1,constrainTo:["prod","hipaa","stg","dev"]}),organizationId:me})),Ge=F("configuration/updateSearchConfiguration",e=>U(e,{proxyBaseUrl:new B({required:!1,url:!0}),pipeline:new B({required:!1,emptyAllowed:!0}),searchHub:me,timezone:me,locale:me,authenticationProviders:new ee({required:!1,each:K})})),ag={enabled:new Z({default:!0}),originContext:aa(),originLevel2:aa(),originLevel3:aa(),proxyBaseUrl:new B({required:!1,url:!0}),runtimeEnvironment:new ue,anonymous:new Z({default:!1}),deviceId:me,userDisplayName:me,documentLocation:me,trackingId:me,analyticsMode:new B({constrainTo:["legacy","next"],required:!1,default:"next"}),source:new G({options:{required:!1},values:ru.reduce((e,t)=>(e[t]=Xc,e),{})})},cr=F("configuration/updateAnalyticsConfiguration",e=>U(e,ag)),ur=F("configuration/analytics/disable"),lr=F("configuration/analytics/enable"),eo=F("configuration/analytics/originlevel2",e=>U(e,{originLevel2:nu()})),to=F("configuration/analytics/originlevel3",e=>U(e,{originLevel3:nu()}));p();u();d();l();p();u();d();l();p();u();d();l();var ou={q:new B,enableQuerySyntax:new Z,aq:new B,cq:new B,firstResult:new Y({min:0}),numberOfResults:new Y({min:0}),sortCriteria:new B,f:new G,fExcluded:new G,cf:new G,nf:new G,mnf:new G,df:new G,debug:new Z,sf:new G,tab:new B,af:new G};var ht=F("searchParameters/restore",e=>U(e,ou));p();u();d();l();var ro=F("debug/enable"),no=F("debug/disable");p();u();d();l();var oo=()=>!1;var io=de(oo(),e=>{e.addCase(ro,()=>!0).addCase(no,()=>!1).addCase(ht,(t,r)=>r.payload.debug??t)});p();u();d();l();var dr=F("pipeline/set",e=>U(e,new B({required:!0,emptyAllowed:!0})));p();u();d();l();p();u();d();l();var sg=F("history/undo"),cg=F("history/redo"),Ke=F("history/snapshot"),IE=oe("history/back",/*#__PURE__*/function(){var _ref4=_asyncToGenerator(function*(e,{dispatch:t}){t(sg()),yield t(Fe())});return function(_x3,_x4){return _ref4.apply(this,arguments)}}()),PE=oe("history/forward",/*#__PURE__*/function(){var _ref5=_asyncToGenerator(function*(e,{dispatch:t}){t(cg()),yield t(Fe())});return function(_x5,_x6){return _ref5.apply(this,arguments)}}()),Fe=oe("history/change",/*#__PURE__*/function(){var _ref6=_asyncToGenerator(function*(e,{getState:t}){return t().history.present});return function(_x7,_x8){return _ref6.apply(this,arguments)}}());p();u();d();l();var pr=()=>"";var fr=de(pr(),e=>{e.addCase(dr,(t,r)=>r.payload).addCase(Fe.fulfilled,(t,r)=>r.payload?.pipeline??t).addCase(Ge,(t,r)=>r.payload.pipeline||t)});p();u();d();l();p();u();d();l();p();u();d();l();p();u();d();l();function it(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function O(e,t,r,n){function o(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function m(g){try{s(n.next(g))}catch(S){a(S)}}function f(g){try{s(n.throw(g))}catch(S){a(S)}}function s(g){g.done?i(g.value):o(g.value).then(m,f)}s((n=n.apply(e,t||[])).next())})}var te;(function(e){e.search="search",e.click="click",e.custom="custom",e.view="view",e.collect="collect"})(te||(te={}));function ua(){return typeof window<"u"}function Aa(){return typeof navigator<"u"}function mr(){return typeof document<"u"}function la(){try{return typeof localStorage<"u"}catch{return!1}}function ug(){try{return typeof sessionStorage<"u"}catch{return!1}}function Su(){return Aa()&&navigator.cookieEnabled}var lg=[te.click,te.custom,te.search,te.view],dg=(e,t)=>lg.indexOf(e)!==-1?Object.assign({language:mr()?document.documentElement.lang:"unknown",userAgent:Aa()?navigator.userAgent:"unknown"},t):t,sn=class e{static set(t,r,n){var o,i,a,m;n&&(i=new Date,i.setTime(i.getTime()+n)),m=window.location.hostname,m.indexOf(".")===-1?iu(t,r,i):(a=m.split("."),o=a[a.length-2]+"."+a[a.length-1],iu(t,r,i,o))}static get(t){for(var r=t+"=",n=document.cookie.split(";"),o=0;o<n.length;o++){var i=n[o];if(i=i.replace(/^\s+/,""),i.lastIndexOf(r,0)===0)return i.substring(r.length,i.length)}return null}static erase(t){e.set(t,"",-1)}};function iu(e,t,r,n){document.cookie=`${e}=${t}`+(r?`;expires=${r.toUTCString()}`:"")+(n?`;domain=${n}`:"")+";path=/;SameSite=Lax"}function pg(){return la()?localStorage:Su()?new cn:ug()?sessionStorage:new hr}var cn=class e{getItem(t){return sn.get(`${e.prefix}${t}`)}removeItem(t){sn.erase(`${e.prefix}${t}`)}setItem(t,r,n){sn.set(`${e.prefix}${t}`,r,n)}};cn.prefix="coveo_";var da=class{constructor(){this.cookieStorage=new cn}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)}},hr=class{getItem(t){return null}removeItem(t){}setItem(t,r){}},on="__coveo.analytics.history",vu=20,Cu=1e3*60,bu=75,yr=class{constructor(t){this.store=t||pg()}addElement(t){t.internalTime=new Date().getTime(),t=this.cropQueryElement(this.stripEmptyQuery(t));let r=this.getHistoryWithInternalTime();r!=null?this.isValidEntry(t)&&this.setHistory([t].concat(r)):this.setHistory([t])}addElementAsync(t){return O(this,void 0,void 0,function*(){t.internalTime=new Date().getTime(),t=this.cropQueryElement(this.stripEmptyQuery(t));let r=yield this.getHistoryWithInternalTimeAsync();r!=null?this.isValidEntry(t)&&this.setHistory([t].concat(r)):this.setHistory([t])})}getHistory(){let t=this.getHistoryWithInternalTime();return this.stripEmptyQueries(this.stripInternalTime(t))}getHistoryAsync(){return O(this,void 0,void 0,function*(){let t=yield this.getHistoryWithInternalTimeAsync();return this.stripEmptyQueries(this.stripInternalTime(t))})}getHistoryWithInternalTime(){try{let t=this.store.getItem(on);return t&&typeof t=="string"?JSON.parse(t):[]}catch{return[]}}getHistoryWithInternalTimeAsync(){return O(this,void 0,void 0,function*(){try{let t=yield this.store.getItem(on);return t?JSON.parse(t):[]}catch{return[]}})}setHistory(t){try{this.store.setItem(on,JSON.stringify(t.slice(0,vu)))}catch{}}clear(){try{this.store.removeItem(on)}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,bu)),t}isValidEntry(t){let r=this.getMostRecentElement();return r&&r.value==t.value?(t.internalTime||0)-(r.internalTime||0)>Cu:!0}stripInternalTime(t){return Array.isArray(t)?t.map(r=>{let{name:n,time:o,value:i}=r;return{name:n,time:o,value:i}}):[]}stripEmptyQuery(t){let{name:r,time:n,value:o}=t;return r&&typeof o=="string"&&r.toLowerCase()==="query"&&o.trim()===""?{name:r,time:n}:t}stripEmptyQueries(t){return t.map(r=>this.stripEmptyQuery(r))}},Au=Object.freeze({__proto__:null,HistoryStore:yr,MAX_NUMBER_OF_HISTORY_ELEMENTS:vu,MAX_VALUE_SIZE:bu,MIN_THRESHOLD_FOR_DUPLICATE_VALUE:Cu,STORE_KEY:on,default:yr}),fg=(e,t)=>O(void 0,void 0,void 0,function*(){return e===te.view?(yield mg(t.contentIdValue),Object.assign({location:window.location.toString(),referrer:document.referrer,title:document.title},t)):t}),mg=e=>O(void 0,void 0,void 0,function*(){let t=new yr,r={name:"PageView",value:e,time:new Date().toISOString()};yield t.addElementAsync(r)}),ao,gg=new Uint8Array(16);function hg(){if(!ao&&(ao=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!ao))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return ao(gg)}var yg=/^(?:[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 co(e){return typeof e=="string"&&yg.test(e)}var be=[];for(let e=0;e<256;++e)be.push((e+256).toString(16).slice(1));function wu(e,t=0){return(be[e[t+0]]+be[e[t+1]]+be[e[t+2]]+be[e[t+3]]+"-"+be[e[t+4]]+be[e[t+5]]+"-"+be[e[t+6]]+be[e[t+7]]+"-"+be[e[t+8]]+be[e[t+9]]+"-"+be[e[t+10]]+be[e[t+11]]+be[e[t+12]]+be[e[t+13]]+be[e[t+14]]+be[e[t+15]]).toLowerCase()}function Sg(e){if(!co(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 vg(e){e=unescape(encodeURIComponent(e));let t=[];for(let r=0;r<e.length;++r)t.push(e.charCodeAt(r));return t}var Cg="6ba7b810-9dad-11d1-80b4-00c04fd430c8",bg="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function Ag(e,t,r){function n(o,i,a,m){var f;if(typeof o=="string"&&(o=vg(o)),typeof i=="string"&&(i=Sg(i)),((f=i)===null||f===void 0?void 0:f.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let s=new Uint8Array(16+o.length);if(s.set(i),s.set(o,i.length),s=r(s),s[6]=s[6]&15|t,s[8]=s[8]&63|128,a){m=m||0;for(let g=0;g<16;++g)a[m+g]=s[g];return a}return wu(s)}try{n.name=e}catch{}return n.DNS=Cg,n.URL=bg,n}var wg=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),au={randomUUID:wg};function zt(e,t,r){if(au.randomUUID&&!t&&!e)return au.randomUUID();e=e||{};let n=e.random||(e.rng||hg)();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 wu(n)}function xg(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 sa(e,t){return e<<t|e>>>32-t}function Rg(e){let t=[1518500249,1859775393,2400959708,3395469782],r=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof e=="string"){let a=unescape(encodeURIComponent(e));e=[];for(let m=0;m<a.length;++m)e.push(a.charCodeAt(m))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);let n=e.length/4+2,o=Math.ceil(n/16),i=new Array(o);for(let a=0;a<o;++a){let m=new Uint32Array(16);for(let f=0;f<16;++f)m[f]=e[a*64+f*4]<<24|e[a*64+f*4+1]<<16|e[a*64+f*4+2]<<8|e[a*64+f*4+3];i[a]=m}i[o-1][14]=(e.length-1)*8/Math.pow(2,32),i[o-1][14]=Math.floor(i[o-1][14]),i[o-1][15]=(e.length-1)*8&4294967295;for(let a=0;a<o;++a){let m=new Uint32Array(80);for(let h=0;h<16;++h)m[h]=i[a][h];for(let h=16;h<80;++h)m[h]=sa(m[h-3]^m[h-8]^m[h-14]^m[h-16],1);let f=r[0],s=r[1],g=r[2],S=r[3],y=r[4];for(let h=0;h<80;++h){let v=Math.floor(h/20),C=sa(f,5)+xg(v,s,g,S)+y+t[v]+m[h]>>>0;y=S,S=g,g=sa(s,30)>>>0,s=f,f=C}r[0]=r[0]+f>>>0,r[1]=r[1]+s>>>0,r[2]=r[2]+g>>>0,r[3]=r[3]+S>>>0,r[4]=r[4]+y>>>0}return[r[0]>>24&255,r[0]>>16&255,r[0]>>8&255,r[0]&255,r[1]>>24&255,r[1]>>16&255,r[1]>>8&255,r[1]&255,r[2]>>24&255,r[2]>>16&255,r[2]>>8&255,r[2]&255,r[3]>>24&255,r[3]>>16&255,r[3]>>8&255,r[3]&255,r[4]>>24&255,r[4]>>16&255,r[4]>>8&255,r[4]&255]}var Eg=Ag("v5",80,Rg),su=Eg,xu="2.30.43",cu=e=>`${e.protocol}//${e.hostname}${e.pathname.indexOf("/")===0?e.pathname:`/${e.pathname}`}${e.search}`,an={pageview:"pageview",event:"event"},uo=class{constructor({client:t,uuidGenerator:r=zt}){this.client=t,this.uuidGenerator=r}},pa=class extends uo{constructor({client:t,uuidGenerator:r=zt}){super({client:t,uuidGenerator:r}),this.actionData={},this.pageViewId=r(),this.nextPageViewId=this.pageViewId,this.currentLocation=cu(window.location),this.lastReferrer=mr()?document.referrer:"",this.addHooks()}getApi(t){switch(t){case"setAction":return this.setAction;default:return null}}setAction(t,r){this.action=t,this.actionData=r}clearData(){this.clearPluginData(),this.action=void 0,this.actionData={}}getLocationInformation(t,r){return Object.assign({hitType:t},this.getNextValues(t,r))}updateLocationInformation(t,r){this.updateLocationForNextPageView(t,r)}getDefaultContextInformation(t){let r={title:mr()?document.title:"",encoding:mr()?document.characterSet:"UTF-8"},n={screenResolution:`${screen.width}x${screen.height}`,screenColor:`${screen.colorDepth}-bit`},o={language:navigator.language,userAgent:navigator.userAgent},i={time:Date.now(),eventId:this.uuidGenerator()};return Object.assign(Object.assign(Object.assign(Object.assign({},i),n),o),r)}updateLocationForNextPageView(t,r){let{pageViewId:n,referrer:o,location:i}=this.getNextValues(t,r);this.lastReferrer=o,this.pageViewId=n,this.currentLocation=i,t===an.pageview&&(this.nextPageViewId=this.uuidGenerator(),this.hasSentFirstPageView=!0)}getNextValues(t,r){return{pageViewId:t===an.pageview?this.nextPageViewId:this.pageViewId,referrer:t===an.pageview&&this.hasSentFirstPageView?this.currentLocation:this.lastReferrer,location:t===an.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 cu(window.location)}},yt=class e{constructor(t,r){if(!co(t))throw Error("Not a valid uuid");this.clientId=t,this.creationDate=Math.floor(r/1e3)}toString(){return this.clientId.replace(/-/g,"")+"."+this.creationDate.toString()}get expired(){let t=Math.floor(Date.now()/1e3)-this.creationDate;return t<0||t>e.expirationTime}validate(t,r){return!this.expired&&this.matchReferrer(t,r)}matchReferrer(t,r){try{let n=new URL(t);return r.some(o=>new RegExp(o.replace(/\\/g,"\\\\").replace(/\./g,"\\.").replace(/\*/g,".*")+"$").test(n.host))}catch{return!1}}static fromString(t){let r=t.split(".");if(r.length!==2)return null;let[n,o]=r;if(n.length!==32||isNaN(parseInt(o)))return null;let i=n.substring(0,8)+"-"+n.substring(8,12)+"-"+n.substring(12,16)+"-"+n.substring(16,20)+"-"+n.substring(20,32);return co(i)?new e(i,Number.parseInt(o)*1e3):null}};yt.cvo_cid="cvo_cid";yt.expirationTime=120;var fa=class extends uo{constructor({client:t,uuidGenerator:r=zt}){super({client:t,uuidGenerator:r})}getApi(t){switch(t){case"decorate":return this.decorate;case"acceptFrom":return this.acceptFrom;default:return null}}decorate(t){return O(this,void 0,void 0,function*(){if(!this.client.getCurrentVisitorId)throw new Error("Could not retrieve current clientId");try{let r=new URL(t),n=yield this.client.getCurrentVisitorId();return r.searchParams.set(yt.cvo_cid,new yt(n,Date.now()).toString()),r.toString()}catch{throw new Error("Invalid URL provided")}})}acceptFrom(t){this.client.setAcceptedLinkReferrers(t)}};fa.Id="link";var Ve=Object.keys;function so(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}var ca=128,Ru=192,uu=224,lu=240;function Ig(e){return(e&248)===lu?4:(e&lu)===uu?3:(e&uu)===Ru?2:1}function Pg(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&ca)!=ca)break;if(r-=3,(n&Ru)!=ca){t-r>=Ig(n)*3&&(r=t);break}}return e.substring(0,r)}var ma={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"},Tg=Ve(ma).map(e=>ma[e]),Fg=[...Tg].join("|"),kg=new RegExp(`^(${Fg}$)`),Og={svcAction:"svc_action",svcActionData:"svc_action_data"},Dg=e=>Ve(e).filter(t=>e[t]!==void 0).reduce((t,r)=>{let n=ma[r]||r;return Object.assign(Object.assign({},t),{[n]:e[r]})},{}),Mg=e=>kg.test(e),qg=[Mg],du={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",price:"pr",quantity:"qt",coupon:"cc",position:"ps",group:"group"},pu={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",position:"ps",price:"pr",group:"group"},we={action:"pa",list:"pal",listSource:"pls"},lo={id:"ti",revenue:"tr",tax:"tt",shipping:"ts",coupon:"tcc",affiliation:"ta",step:"cos",option:"col"},Ng=["loyaltyCardId","loyaltyTier","thirdPartyPersona","companyName","favoriteStore","storeName","userIndustry","userRole","userDepartment","businessUnit"],ga={id:"quoteId",affiliation:"quoteAffiliation"},ha={id:"reviewId",rating:"reviewRating",comment:"reviewComment"},_g={add:we,bookmark_add:we,bookmark_remove:we,click:we,checkout:we,checkout_option:we,detail:we,impression:we,remove:we,refund:Object.assign(Object.assign({},we),lo),purchase:Object.assign(Object.assign({},we),lo),quickview:we,quote:Object.assign(Object.assign({},we),ga),review:Object.assign(Object.assign({},we),ha)},Vg=Ve(du).map(e=>du[e]),jg=Ve(pu).map(e=>pu[e]),Lg=Ve(we).map(e=>we[e]),Ug=Ve(lo).map(e=>lo[e]),Bg=Ve(ha).map(e=>ha[e]),Qg=Ve(ga).map(e=>ga[e]),$g=[...Vg,"custom"].join("|"),Hg=[...jg,"custom"].join("|"),Eu="(pr[0-9]+)",Iu="(il[0-9]+pi[0-9]+)",zg=new RegExp(`^${Eu}(${$g})$`),Wg=new RegExp(`^(${Iu}(${Hg}))|(il[0-9]+nm)$`),Gg=new RegExp(`^(${Lg.join("|")})$`),Kg=new RegExp(`^(${Ug.join("|")})$`),Yg=new RegExp(`^${Eu}custom$`),Jg=new RegExp(`^${Iu}custom$`),Xg=new RegExp(`^(${[...Ng,...Bg,...Qg].join("|")})$`),Zg=e=>zg.test(e),eh=e=>Wg.test(e),th=e=>Gg.test(e),rh=e=>Kg.test(e),nh=e=>Xg.test(e),oh=[eh,Zg,th,rh,nh],ih=[Yg,Jg],ah={anonymizeIp:"aip"},sh={eventCategory:"ec",eventAction:"ea",eventLabel:"el",eventValue:"ev",page:"dp",visitorId:"cid",clientId:"cid",userId:"uid",currencyCode:"cu"},ch={hitType:"t",pageViewId:"pid",encoding:"de",location:"dl",referrer:"dr",screenColor:"sd",screenResolution:"sr",title:"dt",userAgent:"ua",language:"ul",eventId:"z",time:"tm"},uh=["contentId","contentIdKey","contentType","searchHub","tab","searchUid","permanentId","contentLocale","trackingId"],lh=Object.assign(Object.assign(Object.assign(Object.assign({},ah),sh),ch),uh.reduce((e,t)=>Object.assign(Object.assign({},e),{[t]:t}),{})),ya=Object.assign(Object.assign({},lh),Og),dh=e=>{let t=!!e.action&&_g[e.action]||{};return Ve(e).reduce((r,n)=>{let o=t[n]||ya[n]||n;return Object.assign(Object.assign({},r),{[o]:e[n]})},{})},ph=Ve(ya).map(e=>ya[e]),fh=e=>ph.indexOf(e)!==-1,mh=e=>e==="custom",gh=e=>[...oh,...qg,fh,mh].some(t=>t(e)),hh=e=>Ve(e).reduce((t,r)=>{let n=yh(r);return n?Object.assign(Object.assign({},t),Sh(n,e[r])):Object.assign(Object.assign({},t),{[r]:e[r]})},{}),yh=e=>{let t;return[...ih].every(r=>{var n;return t=(n=r.exec(e))===null||n===void 0?void 0:n[1],!t}),t},Sh=(e,t)=>Ve(t).reduce((r,n)=>Object.assign(Object.assign({},r),{[`${e}${n}`]:t[n]}),{}),Sa=class{constructor(t){this.opts=t}sendEvent(t,r){return O(this,void 0,void 0,function*(){if(!this.isAvailable())throw new Error("navigator.sendBeacon is not supported in this browser. Consider adding a polyfill like \"sendbeacon-polyfill\".");let{baseUrl:n,preprocessRequest:o}=this.opts,i=yield this.getQueryParamsForEventType(t),{url:a,payload:m}=yield this.preProcessRequestAsPotentialJSONString(`${n}/analytics/${t}?${i}`,r,o),f=this.encodeForEventType(t,m),s=new Blob([f],{type:"application/x-www-form-urlencoded"});navigator.sendBeacon(a,s)})}isAvailable(){return"sendBeacon"in navigator}deleteHttpCookieVisitorId(){return Promise.resolve()}preProcessRequestAsPotentialJSONString(t,r,n){return O(this,void 0,void 0,function*(){let o=t,i=r;if(n){let a=yield n({url:t,body:JSON.stringify(r)},"analyticsBeacon"),{url:m,body:f}=a;o=m||t;try{i=JSON.parse(f)}catch(s){console.error("Unable to process the request body as a JSON string",s)}}return{payload:i,url:o}})}encodeForEventType(t,r){return this.isEventTypeLegacy(t)?this.encodeEventToJson(t,r):this.encodeEventToJson(t,r,this.opts.token)}getQueryParamsForEventType(t){return O(this,void 0,void 0,function*(){let{token:r,visitorIdProvider:n}=this.opts,o=yield n.getCurrentVisitorId();return[r&&this.isEventTypeLegacy(t)?`access_token=${r}`:"",o?`visitorId=${o}`:"","discardVisitInfo=true"].filter(i=>!!i).join("&")})}isEventTypeLegacy(t){return[te.click,te.custom,te.search,te.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}},va=class{sendEvent(t,r){return O(this,void 0,void 0,function*(){return Promise.resolve()})}deleteHttpCookieVisitorId(){return O(this,void 0,void 0,function*(){return Promise.resolve()})}},fu=A.fetch,po=class{constructor(t){this.opts=t}sendEvent(t,r){return O(this,void 0,void 0,function*(){let{baseUrl:n,visitorIdProvider:o,preprocessRequest:i}=this.opts,a=this.shouldAppendVisitorId(t)?yield this.getVisitorIdParam():"",m={url:`${n}/analytics/${t}${a}`,credentials:"include",mode:"cors",headers:this.getHeaders(),method:"POST",body:JSON.stringify(r)},f=Object.assign(Object.assign({},m),i?yield i(m,"analyticsFetch"):{}),{url:s}=f,g=it(f,["url"]),S;try{S=yield fu(s,g)}catch(y){console.error("An error has occured when sending the event.",y);return}if(S.ok){let y=yield S.json();return y.visitorId&&o.setCurrentVisitorId(y.visitorId),y}else{try{S.json()}catch{}throw console.error(`An error has occured when sending the "${t}" event.`,S,r),new Error(`An error has occurred when sending the "${t}" event. Check the console logs for more details.`)}})}deleteHttpCookieVisitorId(){return O(this,void 0,void 0,function*(){let{baseUrl:t}=this.opts,r=`${t}/analytics/visit`;yield fu(r,{headers:this.getHeaders(),method:"DELETE"})})}shouldAppendVisitorId(t){return[te.click,te.custom,te.search,te.view].indexOf(t)!==-1}getVisitorIdParam(){return O(this,void 0,void 0,function*(){let{visitorIdProvider:t}=this.opts,r=yield t.getCurrentVisitorId();return r?`?visitor=${r}`:""})}getHeaders(){let{token:t}=this.opts;return Object.assign(Object.assign({},t?{Authorization:`Bearer ${t}`}:{}),{"Content-Type":"application/json"})}},Ca=class{constructor(t,r){la()&&Su()?this.storage=new da:la()?this.storage=localStorage:(console.warn("BrowserRuntime detected no valid storage available.",this),this.storage=new hr),this.client=new po(t),this.beaconClient=new Sa(t),window.addEventListener("beforeunload",()=>{let n=r();for(let{eventType:o,payload:i}of n)this.beaconClient.sendEvent(o,i)})}getClientDependingOnEventType(t){return t==="click"&&this.beaconClient.isAvailable()?this.beaconClient:this.client}},ba=class{constructor(t,r){this.storage=r||new hr,this.client=new po(t)}getClientDependingOnEventType(t){return this.client}},fo=class{constructor(){this.storage=new hr,this.client=new va}getClientDependingOnEventType(t){return this.client}},vh="xx",Ch=e=>e?.startsWith(vh)||!1,bh=`
26
+ `;return new Qr(r)}var Qr=class extends Error{constructor(e){super(e),this.name="SchemaValidationError"}},Ee=class{constructor(e){this.definition=e}validate(e={},t=""){let r={...this.default,...e},n=[];for(let o in this.definition){let i=this.definition[o].validate(r[o]);i&&n.push(`${o}: ${i}`)}if(n.length)throw wf(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}},ue=class{constructor(e={}){this.baseConfig=e}validate(e){return this.baseConfig.required&&J(e)?"value is required.":null}get default(){return this.baseConfig.default instanceof Function?this.baseConfig.default():this.baseConfig.default}get required(){return this.baseConfig.required===!0}};function ye(e){return e===void 0}function xf(e){return e===null}function J(e){return ye(e)||xf(e)}var Y=class{constructor(e={}){ce(this,"value");this.config=e,this.value=new ue(e)}validate(e){let t=this.value.validate(e);return t||(Rf(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 Rf(e){return ye(e)||Ws(e)}function Ws(e){return typeof e=="number"&&!isNaN(e)}var Z=class{constructor(e={}){ce(this,"value");this.value=new ue(e)}validate(e){let t=this.value.validate(e);return t||(Ef(e)?null:"value is not a boolean.")}get default(){return this.value.default}get required(){return this.value.required}};function Ef(e){return ye(e)||Gs(e)}function Gs(e){return typeof e=="boolean"}var If=/^\d{4}(-\d\d(-\d\d(T\d\d:\d\d(:\d\d)?(\.\d+)?(([+-]\d\d:\d\d)|Z)?)?)?)?$/i,B=class{constructor(e={}){ce(this,"value");ce(this,"config");this.config={emptyAllowed:!0,url:!1,...e},this.value=new ue(this.config)}validate(e){let{emptyAllowed:t,url:r,regex:n,constrainTo:o,ISODate:i}=this.config,a=this.value.validate(e);if(a)return a;if(ye(e))return null;if(!kn(e))return"value is not a string.";if(!t&&!e.length)return"value is an empty string.";if(r)try{new URL(e)}catch{return"value is not a valid URL."}return n&&!n.test(e)?`value did not match provided regex ${n}`:o&&!o.includes(e)?`value should be one of: ${o.join(", ")}.`:i&&!(If.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 kn(e){return Object.prototype.toString.call(e)==="[object String]"}var G=class{constructor(e={}){ce(this,"config");this.config={options:{required:!1},values:{},...e}}validate(e){if(ye(e))return this.config.options.required?"value is required and is currently undefined":null;if(!Ks(e))return"value is not an object";for(let[r,n]of Object.entries(this.config.values))if(n.required&&J(e[r]))return`value does not contain ${r}`;let t="";for(let[r,n]of Object.entries(this.config.values)){let o=e[r],i=n.validate(o);i!==null&&(t+=" "+i)}return t===""?null:t}get default(){}get required(){return!!this.config.options.required}};function Ks(e){return e!==void 0&&typeof e=="object"}var ee=class{constructor(e={}){ce(this,"value");this.config=e,this.value=new ue(this.config)}validate(e){if(!J(e)&&!Array.isArray(e))return"value is not an array";let t=this.value.validate(e);if(t!==null)return t;if(J(e))return null;if(this.config.max!==void 0&&e.length>this.config.max)return`value contains more than ${this.config.max}`;if(this.config.min!==void 0&&e.length<this.config.min)return`value contains less than ${this.config.min}`;if(this.config.each!==void 0){let r="";return e.forEach(n=>{this.config.each.required&&J(n)&&(r=`value is null or undefined: ${e.join(",")}`);let o=this.validatePrimitiveValue(n,this.config.each);o!==null&&(r+=" "+o)}),r===""?null:r}return null}validatePrimitiveValue(e,t){return Gs(e)||kn(e)||Ws(e)||Ks(e)?t.validate(e):"value is not a primitive value"}get default(){}get required(){return this.value.required}};function Ys(e){return Array.isArray(e)}var Oi=class{constructor(e){ce(this,"value");this.config=e,this.value=new ue(e)}validate(e){let t=this.value.validate(e);return t!==null?t:ye(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}};p();u();d();l();function Js(e){return Array.isArray(e)}function On(e){return e.trim()===""}function Xs(e,t){return[...e.reduce((r,n)=>{let o=t(n);return r.has(o)||r.set(o,n),r},new Map).values()]}var Pf=new Set(["1",1,"yes",!0]);function Zs(){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=>Pf.has(r))}function ec(e){let t={};for(let[r,n]of e)t[r]=n;return t}function $r(e){if(typeof e!="object"||!e)return e;try{return JSON.parse(JSON.stringify(e))}catch{return e}}function Tf(e){if(On(e.openingDelimiter)||On(e.closingDelimiter))throw Error("delimiters should be a non-empty string");if(J(e.content)||On(e.content))return e.content;if(e.highlights.length===0)return er(e.content);let t=e.content.length,r="",n=0;for(let o=0;o<e.highlights.length;o++){let i=e.highlights[o],a=i.offset,m=a+i.length;if(m>t)break;r+=er(e.content.slice(n,a)),r+=e.openingDelimiter,r+=er(e.content.slice(a,m)),r+=e.closingDelimiter,n=m}return n!==t&&(r+=er(e.content.slice(n))),r}function Ff(e,t){return e=er(e),e.replace(/\[(.*?)\]|\{(.*?)\}|\((.*?)\)/g,(r,n,o,i)=>n?Di(n,t.notMatchDelimiters):o?Di(o,t.exactMatchDelimiters):i?Di(i,t.correctionDelimiters):r)}function Di(e,t){return t?t.open+e+t.close:e}function er(e){let t={"&":"&amp;","<":"&lt;",">":"&gt;","\"":"&quot;","'":"&#x27;","`":"&#x60;"},r="(?:"+Object.keys(t).join("|")+")",n=RegExp(r),o=RegExp(r,"g");return n.test(e)?e.replace(o,i=>t[i]):e}p();u();d();l();p();u();d();l();var Dn=e=>e;p();u();d();l();var tc=e=>e,rc=e=>e,nc=e=>e;p();u();d();l();p();u();d();l();function Mn(){return{answerSnippet:"",documentId:{contentIdKey:"",contentIdValue:""},question:"",relatedQuestions:[],score:0}}function $e(){return{response:{results:[],searchUid:"",totalCountFiltered:0,facets:[],generateAutomaticFacets:{facets:[]},queryCorrections:[],triggers:[],questionAnswer:Mn(),pipeline:"",splitTestRun:"",termsToHighlight:{},phrasesToHighlight:{},extendedResults:{}},duration:0,queryExecuted:"",error:null,automaticallyCorrected:!1,isLoading:!1,results:[],searchResponseId:"",requestId:"",questionAnswer:Mn(),extendedResults:{}}}p();u();d();l();function lt(e){let{url:t,accessToken:r,organizationId:n,authentication:o,...i}=e;return i}var dt=e=>{let{response:t}=e;return t.body?kf(e):Of(t)},kf=e=>Mf(e)?qf(e):Df(e)?e.body:{message:"unknown",statusCode:0,type:"unknown"},Of=e=>{let t=JSON.parse(JSON.stringify(e,Object.getOwnPropertyNames(e)));return{...t,message:`Client side error: ${t.message||""}`,statusCode:400,type:"ClientError"}};function Df(e){return e.body.statusCode!==void 0}function Mf(e){return e.body.exception!==void 0}var qf=e=>({message:e.body.exception.code,statusCode:e.response.status,type:e.body.exception.code});p();u();d();l();var gc=Ne(dc(),1);p();u();d();l();p();u();d();l();var sm="recommendation-internal-options",_A=Symbol.for(sm);var He=new Error("Failed to load reducers."),tr=class extends Error{constructor(){super(),this.name="ExpiredToken",this.message="The token being used to perform the request is expired."}};var jt=class extends Error{constructor(r,n){super();ce(this,"statusCode");this.name="Disconnected",this.message=`Client could not connect to the following URL: ${r}`,this.statusCode=n??0}};p();u();d();l();function pc(e){let t=[];for(let r in e){let n=encodeURIComponent(r),o=encodeURIComponent(e[r]);t.push(`${n}=${o}`)}return t.join("&")}function fc(e){return typeof e!="object"||!e?!1:Object.values(e).every(cm)}function cm(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"}function mc(e){return e===429}var je=class e{static call(t){return _asyncToGenerator(function*(){let r=um(t),{logger:n}=t,o=yield e.preprocessRequest(r,t);n.info(o,"Platform request");let{url:i,...a}=o,m=/*#__PURE__*/function(){var _ref=_asyncToGenerator(function*(){let f=yield w(i,a);if(mc(f.status))throw f;return f});return function m(){return _ref.apply(this,arguments)}}();try{let f=yield(0,gc.backOff)(m,{retry:s=>{let g=s&&mc(s.status);return g&&n.info("Platform retrying request"),g}});switch(f.status){case 419:case 401:throw n.info("Platform renewing token"),new tr;case 404:throw new jt(i,f.status);default:return n.info({response:f,requestInfo:o},"Platform response"),f}}catch(f){return f.message==="Failed to fetch"?new jt(i):f}})()}static preprocessRequest(t,r){return _asyncToGenerator(function*(){let{origin:n,preprocessRequest:o,logger:i,requestMetadata:a}=r,{signal:m,...f}=t,s=$r(f);try{let g=yield o(t,n,a);return{...t,...g}}catch(g){i.error(g,"Platform request preprocessing failed. Returning default request options.")}return s})()}};function Re(e,t="prod",r="platform"){let n=t==="prod"?"":t,o=r==="platform"?"":`.${r}`;return`https://${e}${o}.org${n}.coveo.com`}function pt(e,t="prod"){return`${Re(e,t)}/rest/search/v2`}function Nn(e,t="prod"){return`${Re(e,t,"analytics")}/rest/organizations/${e}/events/v1`}function um(e){let{url:t,method:r,requestParams:n,contentType:o,accessToken:i,signal:a}=e,m=e.method==="POST"||e.method==="PUT",f=lm(n,o);return{url:t,method:r,headers:{"Content-Type":o,Authorization:`Bearer ${i}`,...e.headers},...(m&&{body:f}),signal:a}}function lm(e,t){return t==="application/x-www-form-urlencoded"?fc(e)?pc(e):"":JSON.stringify(e)}p();u();d();l();var ft=class{constructor(){ce(this,"currentAbortController",null)}enqueue(t,r){var _this=this;return _asyncToGenerator(function*(){let n=_this.currentAbortController,o=_this.currentAbortController=new c.AbortController;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)}})()}};p();u();d();l();p();u();d();l();var Wr=class{constructor(t){ce(this,"_basePath");ce(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}};p();u();d();l();function hc(e){return((e.headers.get("content-type")||"").split(";").find(n=>n.indexOf("charset=")!==-1)||"").split("=")[1]||"UTF-8"}p();u();d();l();var tt=(e,t,r,n)=>{let o=new Wr(`${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 yc=/*#__PURE__*/function(){var _ref2=_asyncToGenerator(function*(e,t){let r=yield je.call({...tt(e,"POST","application/x-www-form-urlencoded","/html"),requestParams:lt(e),requestMetadata:{method:"html"},...t});if(r instanceof Error)throw r;let n=hc(r),o=yield r.arrayBuffer(),a=new TextDecoder(n).decode(o);return dm(a)?{success:a}:{error:dt({response:r,body:a})}});return function yc(_x,_x2){return _ref2.apply(this,arguments)}}();function dm(e){return typeof e=="string"}p();u();d();l();function pm(e){return{statusCode:e.statusCode,type:e.name,message:e.message}}function fm(e){return{statusCode:e.code,type:e.name,message:e.message,ignored:!0}}function _n(e,t){if(t&&e.name==="AbortError")return{error:fm(e)};if(e instanceof jt)return{error:pm(e)};throw e}var Vn=class{constructor(t){this.options=t;ce(this,"apiCallsQueues",{unknown:new ft,mainSearch:new ft,facetValues:new ft,foldingCollection:new ft,instantResults:new ft})}plan(t){var _this2=this;return _asyncToGenerator(function*(){let r=yield je.call({...tt(t,"POST","application/json","/plan"),requestParams:lt(t),requestMetadata:{method:"plan"},..._this2.options});if(r instanceof Error)return _n(r);let n=yield r.json();return gm(n)?{success:n}:{error:dt({response:r,body:n})}})()}querySuggest(t){var _this3=this;return _asyncToGenerator(function*(){let r=yield je.call({...tt(t,"POST","application/json","/querySuggest"),requestMetadata:{method:"querySuggest"},requestParams:lt(t),..._this3.options});if(r instanceof Error)return _n(r);let n=yield r.json(),o={response:r,body:n};return mm(n)?{success:(yield _this3.options.postprocessQuerySuggestResponseMiddleware(o)).body}:{error:dt(o)}})()}search(t,r){var _this4=this;return _asyncToGenerator(function*(){let n=r?.origin??"unknown",o=yield _this4.apiCallsQueues[n].enqueue(m=>je.call({...tt(t,"POST","application/json",""),requestParams:lt(t),requestMetadata:{method:"search",origin:r?.origin},..._this4.options,signal:m??void 0}),{logger:_this4.options.logger,warnOnAbort:!r?.disableAbortWarning});if(o instanceof Error)return _n(o,r?.disableAbortWarning);let i=yield o.json(),a={response:o,body:i};return Sc(i)?(a.body=vc(i),{success:(yield _this4.options.postprocessSearchResponseMiddleware(a)).body}):{error:dt(a)}})()}facetSearch(t){var _this5=this;return _asyncToGenerator(function*(){let r=yield je.call({...tt(t,"POST","application/json","/facet"),requestParams:lt(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 je.call({...tt(t,"POST","application/json",""),requestParams:lt(t),requestMetadata:{method:"recommendations"},..._this6.options});if(r instanceof Error)throw r;let n=yield r.json();if(Sc(n)){let o={response:r,body:n};return o.body=vc(n),{success:(yield _this6.options.postprocessSearchResponseMiddleware(o)).body}}return{error:dt({response:r,body:n})}})()}html(t){var _this7=this;return _asyncToGenerator(function*(){return yc(t,{..._this7.options})})()}fieldDescriptions(t){var _this8=this;return _asyncToGenerator(function*(){let r=yield je.call({...tt(t,"GET","application/json","/fields"),requestParams:{},requestMetadata:{method:"fieldDescriptions"},..._this8.options});if(r instanceof Error)throw r;let n=yield r.json();return hm(n)?{success:n}:{error:dt({response:r,body:n})}})()}},jn=e=>e.success!==void 0,Ie=e=>e.error!==void 0;function Sc(e){return e.results!==void 0}function vc(e){let t=Mn();return J(e.questionAnswer)?(e.questionAnswer=t,e):(e.questionAnswer={...t,...e.questionAnswer},e)}function mm(e){return e.completions!==void 0}function gm(e){return e.preprocessingOutput!==void 0}function hm(e){return e.fields!==void 0}p();u();d();l();p();u();d();l();p();u();d();l();function Se(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 ym=typeof Symbol=="function"&&Symbol.observable||"@@observable",Cc=ym,Qi=()=>Math.random().toString(36).substring(7).split("").join("."),Sm={INIT:`@@redux/INIT${Qi()}`,REPLACE:`@@redux/REPLACE${Qi()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Qi()}`},Ln=Sm;function ze(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 $i(e,t,r){if(typeof e!="function")throw new Error(Se(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(Se(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(Se(1));return r($i)(e,t)}let n=e,o=t,i=new Map,a=i,m=0,f=!1;function s(){a===i&&(a=new Map,i.forEach((I,E)=>{a.set(E,I)}))}function g(){if(f)throw new Error(Se(3));return o}function S(I){if(typeof I!="function")throw new Error(Se(4));if(f)throw new Error(Se(5));let E=!0;s();let b=m++;return a.set(b,I),function(){if(E){if(f)throw new Error(Se(6));E=!1,s(),a.delete(b),i=null}}}function y(I){if(!ze(I))throw new Error(Se(7));if(typeof I.type>"u")throw new Error(Se(8));if(typeof I.type!="string")throw new Error(Se(17));if(f)throw new Error(Se(9));try{f=!0,o=n(o,I)}finally{f=!1}return(i=a).forEach(b=>{b()}),I}function h(I){if(typeof I!="function")throw new Error(Se(10));n=I,y({type:Ln.REPLACE})}function v(){let I=S;return{subscribe(E){if(typeof E!="object"||E===null)throw new Error(Se(11));function b(){let T=E;T.next&&T.next(g())}return b(),{unsubscribe:I(b)}},[Cc](){return this}}}return y({type:Ln.INIT}),{dispatch:y,subscribe:S,getState:g,replaceReducer:h,[Cc]:v}}function vm(e){Object.keys(e).forEach(t=>{let r=e[t];if(typeof r(void 0,{type:Ln.INIT})>"u")throw new Error(Se(12));if(typeof r(void 0,{type:Ln.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Se(13))})}function rr(e){let t=Object.keys(e),r={};for(let a=0;a<t.length;a++){let m=t[a];typeof e[m]=="function"&&(r[m]=e[m])}let n=Object.keys(r),o,i;try{vm(r)}catch(a){i=a}return function(m={},f){if(i)throw i;let s=!1,g={};for(let S=0;S<n.length;S++){let y=n[S],h=r[y],v=m[y],C=h(v,f);if(typeof C>"u"){let I=f&&f.type;throw new Error(Se(14))}g[y]=C,s=s||C!==v}return s=s||n.length!==Object.keys(m).length,s?g:m}}function nr(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function bc(...e){return t=>(r,n)=>{let o=t(r,n),i=()=>{throw new Error(Se(15))},a={getState:o.getState,dispatch:(f,...s)=>i(f,...s)},m=e.map(f=>f(a));return i=nr(...m)(o.dispatch),{...o,dispatch:i}}}function Un(e){return ze(e)&&"type"in e&&typeof e.type=="string"}p();u();d();l();var ea=Symbol.for("immer-nothing"),Gr=Symbol.for("immer-draftable"),Pe=Symbol.for("immer-state");function ve(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Ut=Object.getPrototypeOf;function Oe(e){return!!e&&!!e[Pe]}function Te(e){return e?Ec(e)||Array.isArray(e)||!!e[Gr]||!!e.constructor?.[Gr]||Zr(e)||en(e):!1}var Cm=Object.prototype.constructor.toString();function Ec(e){if(!e||typeof e!="object")return!1;let t=Ut(e);if(t===null)return!0;let r=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return r===Object?!0:typeof r=="function"&&Function.toString.call(r)===Cm}function ta(e){return Oe(e)||ve(15,e),e[Pe].base_}function Kr(e,t){Bt(e)===0?Reflect.ownKeys(e).forEach(r=>{t(r,e[r],e)}):e.forEach((r,n)=>t(n,r,e))}function Bt(e){let t=e[Pe];return t?t.type_:Array.isArray(e)?1:Zr(e)?2:en(e)?3:0}function Yr(e,t){return Bt(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Hi(e,t){return Bt(e)===2?e.get(t):e[t]}function Ic(e,t,r){let n=Bt(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function bm(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Zr(e){return e instanceof Map}function en(e){return e instanceof Set}function Lt(e){return e.copy_||e.base_}function Gi(e,t){if(Zr(e))return new Map(e);if(en(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);let r=Ec(e);if(t===!0||t==="class_only"&&!r){let n=Object.getOwnPropertyDescriptors(e);delete n[Pe];let o=Reflect.ownKeys(n);for(let i=0;i<o.length;i++){let a=o[i],m=n[a];m.writable===!1&&(m.writable=!0,m.configurable=!0),(m.get||m.set)&&(n[a]={configurable:!0,writable:!0,enumerable:m.enumerable,value:e[a]})}return Object.create(Ut(e),n)}else{let n=Ut(e);if(n!==null&&r)return{...e};let o=Object.create(n);return Object.assign(o,e)}}function $n(e,t=!1){return Hn(e)||Oe(e)||!Te(e)||(Bt(e)>1&&(e.set=e.add=e.clear=e.delete=Am),Object.freeze(e),t&&Object.entries(e).forEach(([r,n])=>$n(n,!0))),e}function Am(){ve(2)}function Hn(e){return Object.isFrozen(e)}var Ki={};function Qt(e){let t=Ki[e];return t||ve(0,e),t}function wm(e,t){Ki[e]||(Ki[e]=t)}var Jr;function Pc(){return Jr}function xm(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Ac(e,t){t&&(Qt("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Yi(e){Ji(e),e.drafts_.forEach(Rm),e.drafts_=null}function Ji(e){e===Jr&&(Jr=e.parent_)}function wc(e){return Jr=xm(Jr,e)}function Rm(e){let t=e[Pe];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function xc(e,t){t.unfinalizedDrafts_=t.drafts_.length;let r=t.drafts_[0];return e!==void 0&&e!==r?(r[Pe].modified_&&(Yi(t),ve(4)),Te(e)&&(e=Bn(t,e),t.parent_||Qn(t,e)),t.patches_&&Qt("Patches").generateReplacementPatches_(r[Pe].base_,e,t.patches_,t.inversePatches_)):e=Bn(t,r,[]),Yi(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==ea?e:void 0}function Bn(e,t,r){if(Hn(t))return t;let n=t[Pe];if(!n)return Kr(t,(o,i)=>Rc(e,n,t,o,i,r)),t;if(n.scope_!==e)return t;if(!n.modified_)return Qn(e,n.base_,!0),n.base_;if(!n.finalized_){n.finalized_=!0,n.scope_.unfinalizedDrafts_--;let o=n.copy_,i=o,a=!1;n.type_===3&&(i=new Set(o),o.clear(),a=!0),Kr(i,(m,f)=>Rc(e,n,o,m,f,r,a)),Qn(e,o,!1),r&&e.patches_&&Qt("Patches").generatePatches_(n,r,e.patches_,e.inversePatches_)}return n.copy_}function Rc(e,t,r,n,o,i,a){if(Oe(o)){let m=i&&t&&t.type_!==3&&!Yr(t.assigned_,n)?i.concat(n):void 0,f=Bn(e,o,m);if(Ic(r,n,f),Oe(f))e.canAutoFreeze_=!1;else return}else a&&r.add(o);if(Te(o)&&!Hn(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Bn(e,o),(!t||!t.scope_.parent_)&&typeof n!="symbol"&&Object.prototype.propertyIsEnumerable.call(r,n)&&Qn(e,o)}}function Qn(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&$n(t,r)}function Em(e,t){let r=Array.isArray(e),n={type_:r?1:0,scope_:t?t.scope_:Pc(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1},o=n,i=ra;r&&(o=[n],i=Xr);let{revoke:a,proxy:m}=Proxy.revocable(o,i);return n.draft_=m,n.revoke_=a,m}var ra={get(e,t){if(t===Pe)return e;let r=Lt(e);if(!Yr(r,t))return Im(e,r,t);let n=r[t];return e.finalized_||!Te(n)?n:n===zi(e.base_,t)?(Wi(e),e.copy_[t]=Zi(n,e)):n},has(e,t){return t in Lt(e)},ownKeys(e){return Reflect.ownKeys(Lt(e))},set(e,t,r){let n=Tc(Lt(e),t);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){let o=zi(Lt(e),t),i=o?.[Pe];if(i&&i.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(bm(r,o)&&(r!==void 0||Yr(e.base_,t)))return!0;Wi(e),Xi(e)}return e.copy_[t]===r&&(r!==void 0||t in e.copy_)||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_[t]=!0),!0},deleteProperty(e,t){return zi(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Wi(e),Xi(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let r=Lt(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty(){ve(11)},getPrototypeOf(e){return Ut(e.base_)},setPrototypeOf(){ve(12)}},Xr={};Kr(ra,(e,t)=>{Xr[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});Xr.deleteProperty=function(e,t){return Xr.set.call(this,e,t,void 0)};Xr.set=function(e,t,r){return ra.set.call(this,e[0],t,r,e[0])};function zi(e,t){let r=e[Pe];return(r?Lt(r):e)[t]}function Im(e,t,r){let n=Tc(t,r);return n?"value"in n?n.value:n.get?.call(e.draft_):void 0}function Tc(e,t){if(!(t in e))return;let r=Ut(e);for(;r;){let n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Ut(r)}}function Xi(e){e.modified_||(e.modified_=!0,e.parent_&&Xi(e.parent_))}function Wi(e){e.copy_||(e.copy_=Gi(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Pm=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,r,n)=>{if(typeof t=="function"&&typeof r!="function"){let i=r;r=t;let a=this;return function(f=i,...s){return a.produce(f,g=>r.call(this,g,...s))}}typeof r!="function"&&ve(6),n!==void 0&&typeof n!="function"&&ve(7);let o;if(Te(t)){let i=wc(this),a=Zi(t,void 0),m=!0;try{o=r(a),m=!1}finally{m?Yi(i):Ji(i)}return Ac(i,n),xc(o,i)}else if(!t||typeof t!="object"){if(o=r(t),o===void 0&&(o=t),o===ea&&(o=void 0),this.autoFreeze_&&$n(o,!0),n){let i=[],a=[];Qt("Patches").generateReplacementPatches_(t,o,i,a),n(i,a)}return o}else ve(1,t)},this.produceWithPatches=(t,r)=>{if(typeof t=="function")return(a,...m)=>this.produceWithPatches(a,f=>t(f,...m));let n,o;return[this.produce(t,r,(a,m)=>{n=a,o=m}),n,o]},typeof e?.autoFreeze=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof e?.useStrictShallowCopy=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){Te(e)||ve(8),Oe(e)&&(e=Fc(e));let t=wc(this),r=Zi(e,void 0);return r[Pe].isManual_=!0,Ji(t),r}finishDraft(e,t){let r=e&&e[Pe];(!r||!r.isManual_)&&ve(9);let{scope_:n}=r;return Ac(n,t),xc(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){let o=t[r];if(o.path.length===0&&o.op==="replace"){e=o.value;break}}r>-1&&(t=t.slice(r+1));let n=Qt("Patches").applyPatches_;return Oe(e)?n(e,t):this.produce(e,o=>n(o,t))}};function Zi(e,t){let r=Zr(e)?Qt("MapSet").proxyMap_(e,t):en(e)?Qt("MapSet").proxySet_(e,t):Em(e,t);return(t?t.scope_:Pc()).drafts_.push(r),r}function Fc(e){return Oe(e)||ve(10,e),kc(e)}function kc(e){if(!Te(e)||Hn(e))return e;let t=e[Pe],r;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=Gi(e,t.scope_.immer_.useStrictShallowCopy_)}else r=Gi(e,!0);return Kr(r,(n,o)=>{Ic(r,n,kc(o))}),t&&(t.finalized_=!1),r}function Oc(){let t="replace",r="add",n="remove";function o(y,h,v,C){switch(y.type_){case 0:case 2:return a(y,h,v,C);case 1:return i(y,h,v,C);case 3:return m(y,h,v,C)}}function i(y,h,v,C){let{base_:I,assigned_:E}=y,b=y.copy_;b.length<I.length&&([I,b]=[b,I],[v,C]=[C,v]);for(let R=0;R<I.length;R++)if(E[R]&&b[R]!==I[R]){let T=h.concat([R]);v.push({op:t,path:T,value:S(b[R])}),C.push({op:t,path:T,value:S(I[R])})}for(let R=I.length;R<b.length;R++){let T=h.concat([R]);v.push({op:r,path:T,value:S(b[R])})}for(let R=b.length-1;I.length<=R;--R){let T=h.concat([R]);C.push({op:n,path:T})}}function a(y,h,v,C){let{base_:I,copy_:E}=y;Kr(y.assigned_,(b,R)=>{let T=Hi(I,b),V=Hi(E,b),k=R?Yr(I,b)?t:r:n;if(T===V&&k===t)return;let P=h.concat(b);v.push(k===n?{op:k,path:P}:{op:k,path:P,value:V}),C.push(k===r?{op:n,path:P}:k===n?{op:r,path:P,value:S(T)}:{op:t,path:P,value:S(T)})})}function m(y,h,v,C){let{base_:I,copy_:E}=y,b=0;I.forEach(R=>{if(!E.has(R)){let T=h.concat([b]);v.push({op:n,path:T,value:R}),C.unshift({op:r,path:T,value:R})}b++}),b=0,E.forEach(R=>{if(!I.has(R)){let T=h.concat([b]);v.push({op:r,path:T,value:R}),C.unshift({op:n,path:T,value:R})}b++})}function f(y,h,v,C){v.push({op:t,path:[],value:h===ea?void 0:h}),C.push({op:t,path:[],value:y})}function s(y,h){return h.forEach(v=>{let{path:C,op:I}=v,E=y;for(let V=0;V<C.length-1;V++){let k=Bt(E),P=C[V];typeof P!="string"&&typeof P!="number"&&(P=""+P),(k===0||k===1)&&(P==="__proto__"||P==="constructor")&&ve(19),typeof E=="function"&&P==="prototype"&&ve(19),E=Hi(E,P),typeof E!="object"&&ve(18,C.join("/"))}let b=Bt(E),R=g(v.value),T=C[C.length-1];switch(I){case t:switch(b){case 2:return E.set(T,R);case 3:ve(16);default:return E[T]=R}case r:switch(b){case 1:return T==="-"?E.push(R):E.splice(T,0,R);case 2:return E.set(T,R);case 3:return E.add(R);default:return E[T]=R}case n:switch(b){case 1:return E.splice(T,1);case 2:return E.delete(T);case 3:return E.delete(v.value);default:return delete E[T]}default:ve(17,I)}}),y}function g(y){if(!Te(y))return y;if(Array.isArray(y))return y.map(g);if(Zr(y))return new Map(Array.from(y.entries()).map(([v,C])=>[v,g(C)]));if(en(y))return new Set(Array.from(y).map(g));let h=Object.create(Ut(y));for(let v in y)h[v]=g(y[v]);return Yr(y,Gr)&&(h[Gr]=y[Gr]),h}function S(y){return Oe(y)?g(y):y}wm("Patches",{applyPatches_:s,generatePatches_:o,generateReplacementPatches_:f})}var De=new Pm,rt=De.produce,zn=De.produceWithPatches.bind(De),hx=De.setAutoFreeze.bind(De),yx=De.setUseStrictShallowCopy.bind(De),na=De.applyPatches.bind(De),Sx=De.createDraft.bind(De),vx=De.finishDraft.bind(De);p();u();d();l();function Tm(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function Fm(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function km(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 Dc=e=>Array.isArray(e)?e:[e];function Om(e){let t=Array.isArray(e[0])?e[0]:e;return km(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function Dm(e,t){let r=[],{length:n}=e;for(let o=0;o<n;o++)r.push(e[o].apply(null,t));return r}var Ex=Symbol();var Ix=Object.getPrototypeOf({});var Mm=class{constructor(e){this.value=e}deref(){return this.value}},qm=typeof WeakRef<"u"?WeakRef:Mm,Nm=0,Mc=1;function Wn(){return{s:Nm,v:void 0,o:null,p:null}}function or(e,t={}){let r=Wn(),{resultEqualityCheck:n}=t,o,i=0;function a(){let m=r,{length:f}=arguments;for(let S=0,y=f;S<y;S++){let h=arguments[S];if(typeof h=="function"||typeof h=="object"&&h!==null){let v=m.o;v===null&&(m.o=v=new WeakMap);let C=v.get(h);C===void 0?(m=Wn(),v.set(h,m)):m=C}else{let v=m.p;v===null&&(m.p=v=new Map);let C=v.get(h);C===void 0?(m=Wn(),v.set(h,m)):m=C}}let s=m,g;if(m.s===Mc)g=m.v;else if(g=e.apply(null,arguments),i++,n){let S=o?.deref?.()??o;S!=null&&n(S,g)&&(g=S,i!==0&&i--),o=typeof g=="object"&&g!==null||typeof g=="function"?new qm(g):g}return s.s=Mc,s.v=g,g}return a.clearCache=()=>{r=Wn(),a.resetResultsCount()},a.resultsCount=()=>i,a.resetResultsCount=()=>{i=0},a}function qc(e,...t){let r=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,n=(...o)=>{let i=0,a=0,m,f={},s=o.pop();typeof s=="object"&&(f=s,s=o.pop()),Tm(s,`createSelector expects an output function after the inputs, but received: [${typeof s}]`);let g={...r,...f},{memoize:S,memoizeOptions:y=[],argsMemoize:h=or,argsMemoizeOptions:v=[],devModeChecks:C={}}=g,I=Dc(y),E=Dc(v),b=Om(o),R=S(function(){return i++,s.apply(null,arguments)},...I),T=!0,V=h(function(){a++;let P=Dm(b,arguments);return m=R.apply(null,P),m},...E);return Object.assign(V,{resultFunc:s,memoizedResultFunc:R,dependencies:b,dependencyRecomputations:()=>a,resetDependencyRecomputations:()=>{a=0},lastResult:()=>m,recomputations:()=>i,resetRecomputations:()=>{i=0},memoize:S,argsMemoize:h})};return Object.assign(n,{withTypes:()=>n}),n}var pe=qc(or),_m=Object.assign((e,t=pe)=>{Fm(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);let r=Object.keys(e),n=r.map(i=>e[i]);return t(n,(...i)=>i.reduce((a,m,f)=>(a[r[f]]=m,a),{}))},{withTypes:()=>_m});p();u();d();l();function Nc(e){return({dispatch:r,getState:n})=>o=>i=>typeof i=="function"?i(r,n,e):o(i)}var _c=Nc(),Vc=Nc;var Vm=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?nr:nr.apply(null,arguments)},Hx=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}},jm=e=>e&&typeof e.match=="function";function F(e,t){function r(...n){if(t){let o=t(...n);if(!o)throw new Error(Le(0));return{type:e,payload:o.payload,...("meta"in o&&{meta:o.meta}),...("error"in o&&{error:o.error})}}return{type:e,payload:n[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=n=>Un(n)&&n.type===e,r}var Qc=class tn extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,tn.prototype)}static get[Symbol.species](){return tn}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new tn(...t[0].concat(this)):new tn(...t.concat(this))}};function jc(e){return Te(e)?rt(e,()=>{}):e}function Lc(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function Lm(e){return typeof e=="boolean"}var Um=()=>function(t){let{thunk:r=!0,immutableCheck:n=!0,serializableCheck:o=!0,actionCreatorCheck:i=!0}=t??{},a=new Qc;return r&&(Lm(r)?a.push(_c):a.push(Vc(r.extraArgument))),a},mt="RTK_autoBatch",ar=()=>e=>({payload:e,meta:{[mt]:!0}}),Uc=e=>t=>{setTimeout(t,e)},Bm=(e={type:"raf"})=>t=>(...r)=>{let n=t(...r),o=!0,i=!1,a=!1,m=new Set,f=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Uc(10):e.type==="callback"?e.queueNotification:Uc(e.timeout),s=()=>{a=!1,i&&(i=!1,m.forEach(g=>g()))};return Object.assign({},n,{subscribe(g){let S=()=>o&&g(),y=n.subscribe(S);return m.add(g),()=>{y(),m.delete(g)}},dispatch(g){try{return o=!g?.meta?.[mt],i=!o,i&&(a||(a=!0,f(s))),n.dispatch(g)}finally{o=!0}}})},Qm=e=>function(r){let{autoBatch:n=!0}=r??{},o=new Qc(e);return n&&o.push(Bm(typeof n=="object"?n:void 0)),o};function $c(e){let t=Um(),{reducer:r=void 0,middleware:n,devTools:o=!0,preloadedState:i=void 0,enhancers:a=void 0}=e||{},m;if(typeof r=="function")m=r;else if(ze(r))m=rr(r);else throw new Error(Le(1));let f;typeof n=="function"?f=n(t):f=t();let s=nr;o&&(s=Vm({trace:!1,...(typeof o=="object"&&o)}));let g=bc(...f),S=Qm(g),y=typeof a=="function"?a(S):S(),h=s(...y);return $i(m,i,h)}function Hc(e){let t={},r=[],n,o={addCase(i,a){let m=typeof i=="string"?i:i.type;if(!m)throw new Error(Le(28));if(m in t)throw new Error(Le(29));return t[m]=a,o},addMatcher(i,a){return r.push({matcher:i,reducer:a}),o},addDefaultCase(i){return n=i,o}};return e(o),[t,r,n]}function $m(e){return typeof e=="function"}function de(e,t){let[r,n,o]=Hc(t),i;if($m(e))i=()=>jc(e());else{let m=jc(e);i=()=>m}function a(m=i(),f){let s=[r[f.type],...n.filter(({matcher:g})=>g(f)).map(({reducer:g})=>g)];return s.filter(g=>!!g).length===0&&(s=[o]),s.reduce((g,S)=>{if(S)if(Oe(g)){let h=S(g,f);return h===void 0?g:h}else{if(Te(g))return rt(g,y=>S(y,f));{let y=S(g,f);if(y===void 0){if(g===null)return g;throw Error("A case reducer on a non-draftable value must not return undefined")}return y}}return g},m)}return a.getInitialState=i,a}var zc=(e,t)=>jm(e)?e.match(t):e(t);function We(...e){return t=>e.some(r=>zc(r,t))}function ir(...e){return t=>e.every(r=>zc(r,t))}function Kn(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 rn(e){return typeof e[0]=="function"&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function Yn(...e){return e.length===0?t=>Kn(t,["pending"]):rn(e)?We(...e.map(t=>t.pending)):Yn()(e[0])}function $t(...e){return e.length===0?t=>Kn(t,["rejected"]):rn(e)?We(...e.map(t=>t.rejected)):$t()(e[0])}function nn(...e){let t=r=>r&&r.meta&&r.meta.rejectedWithValue;return e.length===0?ir($t(...e),t):rn(e)?ir($t(...e),t):nn()(e[0])}function nt(...e){return e.length===0?t=>Kn(t,["fulfilled"]):rn(e)?We(...e.map(t=>t.fulfilled)):nt()(e[0])}function Jn(...e){return e.length===0?t=>Kn(t,["pending","fulfilled","rejected"]):rn(e)?We(...e.flatMap(t=>[t.pending,t.rejected,t.fulfilled])):Jn()(e[0])}var Hm="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Xn=(e=21)=>{let t="",r=e;for(;r--;)t+=Hm[Math.random()*64|0];return t},zm=["name","message","stack","code"],oa=class{constructor(e,t){ce(this,"_type");this.payload=e,this.meta=t}},Bc=class{constructor(e,t){ce(this,"_type");this.payload=e,this.meta=t}},Wm=e=>{if(typeof e=="object"&&e!==null){let t={};for(let r of zm)typeof e[r]=="string"&&(t[r]=e[r]);return t}return{message:String(e)}},oe=(()=>{function e(t,r,n){let o=F(t+"/fulfilled",(f,s,g,S)=>({payload:f,meta:{...(S||{}),arg:g,requestId:s,requestStatus:"fulfilled"}})),i=F(t+"/pending",(f,s,g)=>({payload:void 0,meta:{...(g||{}),arg:s,requestId:f,requestStatus:"pending"}})),a=F(t+"/rejected",(f,s,g,S,y)=>({payload:S,error:(n&&n.serializeError||Wm)(f||"Rejected"),meta:{...(y||{}),arg:g,requestId:s,rejectedWithValue:!!S,requestStatus:"rejected",aborted:f?.name==="AbortError",condition:f?.name==="ConditionError"}}));function m(f){return(s,g,S)=>{let y=n?.idGenerator?n.idGenerator(f):Xn(),h=new c.AbortController,v,C;function I(b){C=b,h.abort()}let E=_asyncToGenerator(function*(){let b;try{let T=n?.condition?.(f,{getState:g,extra:S});if(Km(T)&&(T=yield T),T===!1||h.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let V=new Promise((k,P)=>{v=()=>{P({name:"AbortError",message:C||"Aborted"})},h.signal.addEventListener("abort",v)});s(i(y,f,n?.getPendingMeta?.({requestId:y,arg:f},{getState:g,extra:S}))),b=yield Promise.race([V,Promise.resolve(r(f,{dispatch:s,getState:g,extra:S,requestId:y,signal:h.signal,abort:I,rejectWithValue:(k,P)=>new oa(k,P),fulfillWithValue:(k,P)=>new Bc(k,P)})).then(k=>{if(k instanceof oa)throw k;return k instanceof Bc?o(k.payload,y,f,k.meta):o(k,y,f)})])}catch(T){b=T instanceof oa?a(null,y,f,T.payload,T.meta):a(T,y,f)}finally{v&&h.signal.removeEventListener("abort",v)}return n&&!n.dispatchConditionRejection&&a.match(b)&&b.meta.condition||s(b),b})();return Object.assign(E,{abort:I,requestId:y,arg:f,unwrap(){return E.then(Gm)}})}}return Object.assign(m,{pending:i,rejected:a,fulfilled:o,settled:We(a,o),typePrefix:t})}return e.withTypes=()=>e,e})();function Gm(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function Km(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var Wc=Symbol.for("rtk-slice-createasyncthunk"),Yx={[Wc]:oe};function Ym(e,t){return`${e}/${t}`}function Jm({creators:e}={}){let t=e?.asyncThunk?.[Wc];return function(n){let{name:o,reducerPath:i=o}=n;if(!o)throw new Error(Le(11));typeof process<"u";let a=(typeof n.reducers=="function"?n.reducers(Zm()):n.reducers)||{},m=Object.keys(a),f={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},s={addCase(b,R){let T=typeof b=="string"?b:b.type;if(!T)throw new Error(Le(12));if(T in f.sliceCaseReducersByType)throw new Error(Le(13));return f.sliceCaseReducersByType[T]=R,s},addMatcher(b,R){return f.sliceMatchers.push({matcher:b,reducer:R}),s},exposeAction(b,R){return f.actionCreators[b]=R,s},exposeCaseReducer(b,R){return f.sliceCaseReducersByName[b]=R,s}};m.forEach(b=>{let R=a[b],T={reducerName:b,type:Ym(o,b),createNotation:typeof n.reducers=="function"};tg(R)?ng(T,R,s,t):eg(T,R,s)});function g(){let[b={},R=[],T=void 0]=typeof n.extraReducers=="function"?Hc(n.extraReducers):[n.extraReducers],V={...b,...f.sliceCaseReducersByType};return de(n.initialState,k=>{for(let P in V)k.addCase(P,V[P]);for(let P of f.sliceMatchers)k.addMatcher(P.matcher,P.reducer);for(let P of R)k.addMatcher(P.matcher,P.reducer);T&&k.addDefaultCase(T)})}let S=b=>b,y=new Map,h;function v(b,R){return h||(h=g()),h(b,R)}function C(){return h||(h=g()),h.getInitialState()}function I(b,R=!1){function T(k){let P=k[b];return typeof P>"u"&&R&&(P=C()),P}function V(k=S){let P=Lc(y,R,()=>new WeakMap);return Lc(P,k,()=>{let M={};for(let[q,_]of Object.entries(n.selectors??{}))M[q]=Xm(_,k,C,R);return M})}return{reducerPath:b,getSelectors:V,get selectors(){return V(T)},selectSlice:T}}let E={name:o,reducer:v,actions:f.actionCreators,caseReducers:f.sliceCaseReducersByName,getInitialState:C,...I(i),injectInto(b,{reducerPath:R,...T}={}){let V=R??i;return b.inject({reducerPath:V,reducer:v},T),{...E,...I(V,!0)}}};return E}}function Xm(e,t,r,n){function o(i,...a){let m=t(i);return typeof m>"u"&&n&&(m=r()),e(m,...a)}return o.unwrapped=e,o}var Ht=Jm();function Zm(){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 eg({type:e,reducerName:t,createNotation:r},n,o){let i,a;if("reducer"in n){if(r&&!rg(n))throw new Error(Le(17));i=n.reducer,a=n.prepare}else i=n;o.addCase(e,i).exposeCaseReducer(t,i).exposeAction(t,a?F(e,a):F(e))}function tg(e){return e._reducerDefinitionType==="asyncThunk"}function rg(e){return e._reducerDefinitionType==="reducerWithPrepare"}function ng({type:e,reducerName:t},r,n,o){if(!o)throw new Error(Le(18));let{payloadCreator:i,fulfilled:a,pending:m,rejected:f,settled:s,options:g}=r,S=o(e,i,g);n.exposeAction(t,S),a&&n.addCase(S.fulfilled,a),m&&n.addCase(S.pending,m),f&&n.addCase(S.rejected,f),s&&n.addMatcher(S.settled,s),n.exposeCaseReducer(t,{fulfilled:a||Gn,pending:m||Gn,rejected:f||Gn,settled:s||Gn})}function Gn(){}var Gc="listener",Kc="completed",Yc="cancelled",Jx=`task-${Yc}`,Xx=`task-${Kc}`,Zx=`${Gc}-${Yc}`,eR=`${Gc}-${Kc}`;var{assign:Jc}=Object;var ia="listenerMiddleware";var og=Jc(F(`${ia}/add`),{withTypes:()=>og}),tR=F(`${ia}/removeAll`),ig=Jc(F(`${ia}/remove`),{withTypes:()=>ig});var rR=Symbol.for("rtk-state-proxy-original");function Le(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. `}p();u();d();l();var K=new B({required:!0,emptyAllowed:!1}),me=new B({required:!1,emptyAllowed:!1}),Ce=new B({required:!0,emptyAllowed:!0}),gR=new B({required:!1,emptyAllowed:!0}),Zn=new ee({each:K,required:!0}),Xc=new B({required:!1,emptyAllowed:!1,regex:/^\d+\.\d+\.\d+$/}),ot=({message:e,name:t,stack:r})=>({message:e,name:t,stack:r}),_e=(e,t)=>{if("required"in t)return{payload:new Ee({value:t}).validate({value:e}).value};let o=new G({options:{required:!0},values:t}).validate(e);if(o)throw new Qr(o);return{payload:e}},U=(e,t)=>{try{return _e(e,t)}catch(r){return{payload:e,error:ot(r)}}},Zc=(e,t,r,n)=>{let o=`Check the initialState of ${n}`;return tu(e,t,r,o,"Controller initialization error")},eu=(e,t,r,n)=>{let o=`Check the options of ${n}`;return tu(e,t,r,o,"Controller initialization error")},tu=(e,t,r,n,o)=>{try{return t.validate(r,n)}catch(i){throw e.logger.error(i,o),i}};p();u();d();l();var sr="3.15.1",ru=["@coveo/atomic","@coveo/quantic"];var aa=()=>me,nu=()=>K,gt=F("configuration/updateBasicConfiguration",e=>U(e,{accessToken:me,environment:new B({required:!1,constrainTo:["prod","hipaa","stg","dev"]}),organizationId:me})),Ge=F("configuration/updateSearchConfiguration",e=>U(e,{proxyBaseUrl:new B({required:!1,url:!0}),pipeline:new B({required:!1,emptyAllowed:!0}),searchHub:me,timezone:me,locale:me,authenticationProviders:new ee({required:!1,each:K})})),ag={enabled:new Z({default:!0}),originContext:aa(),originLevel2:aa(),originLevel3:aa(),proxyBaseUrl:new B({required:!1,url:!0}),runtimeEnvironment:new ue,anonymous:new Z({default:!1}),deviceId:me,userDisplayName:me,documentLocation:me,trackingId:me,analyticsMode:new B({constrainTo:["legacy","next"],required:!1,default:"next"}),source:new G({options:{required:!1},values:ru.reduce((e,t)=>(e[t]=Xc,e),{})})},cr=F("configuration/updateAnalyticsConfiguration",e=>U(e,ag)),ur=F("configuration/analytics/disable"),lr=F("configuration/analytics/enable"),eo=F("configuration/analytics/originlevel2",e=>U(e,{originLevel2:nu()})),to=F("configuration/analytics/originlevel3",e=>U(e,{originLevel3:nu()}));p();u();d();l();p();u();d();l();p();u();d();l();var ou={q:new B,enableQuerySyntax:new Z,aq:new B,cq:new B,firstResult:new Y({min:0}),numberOfResults:new Y({min:0}),sortCriteria:new B,f:new G,fExcluded:new G,cf:new G,nf:new G,mnf:new G,df:new G,debug:new Z,sf:new G,tab:new B,af:new G};var ht=F("searchParameters/restore",e=>U(e,ou));p();u();d();l();var ro=F("debug/enable"),no=F("debug/disable");p();u();d();l();var oo=()=>!1;var io=de(oo(),e=>{e.addCase(ro,()=>!0).addCase(no,()=>!1).addCase(ht,(t,r)=>r.payload.debug??t)});p();u();d();l();var dr=F("pipeline/set",e=>U(e,new B({required:!0,emptyAllowed:!0})));p();u();d();l();p();u();d();l();var sg=F("history/undo"),cg=F("history/redo"),Ke=F("history/snapshot"),IE=oe("history/back",/*#__PURE__*/function(){var _ref4=_asyncToGenerator(function*(e,{dispatch:t}){t(sg()),yield t(Fe())});return function(_x3,_x4){return _ref4.apply(this,arguments)}}()),PE=oe("history/forward",/*#__PURE__*/function(){var _ref5=_asyncToGenerator(function*(e,{dispatch:t}){t(cg()),yield t(Fe())});return function(_x5,_x6){return _ref5.apply(this,arguments)}}()),Fe=oe("history/change",/*#__PURE__*/function(){var _ref6=_asyncToGenerator(function*(e,{getState:t}){return t().history.present});return function(_x7,_x8){return _ref6.apply(this,arguments)}}());p();u();d();l();var pr=()=>"";var fr=de(pr(),e=>{e.addCase(dr,(t,r)=>r.payload).addCase(Fe.fulfilled,(t,r)=>r.payload?.pipeline??t).addCase(Ge,(t,r)=>r.payload.pipeline||t)});p();u();d();l();p();u();d();l();p();u();d();l();p();u();d();l();function it(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function O(e,t,r,n){function o(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function m(g){try{s(n.next(g))}catch(S){a(S)}}function f(g){try{s(n.throw(g))}catch(S){a(S)}}function s(g){g.done?i(g.value):o(g.value).then(m,f)}s((n=n.apply(e,t||[])).next())})}var te;(function(e){e.search="search",e.click="click",e.custom="custom",e.view="view",e.collect="collect"})(te||(te={}));function ua(){return typeof window<"u"}function Aa(){return typeof navigator<"u"}function mr(){return typeof document<"u"}function la(){try{return typeof localStorage<"u"}catch{return!1}}function ug(){try{return typeof sessionStorage<"u"}catch{return!1}}function Su(){return Aa()&&navigator.cookieEnabled}var lg=[te.click,te.custom,te.search,te.view],dg=(e,t)=>lg.indexOf(e)!==-1?Object.assign({language:mr()?document.documentElement.lang:"unknown",userAgent:Aa()?navigator.userAgent:"unknown"},t):t,sn=class e{static set(t,r,n){var o,i,a,m;n&&(i=new Date,i.setTime(i.getTime()+n)),m=window.location.hostname,m.indexOf(".")===-1?iu(t,r,i):(a=m.split("."),o=a[a.length-2]+"."+a[a.length-1],iu(t,r,i,o))}static get(t){for(var r=t+"=",n=document.cookie.split(";"),o=0;o<n.length;o++){var i=n[o];if(i=i.replace(/^\s+/,""),i.lastIndexOf(r,0)===0)return i.substring(r.length,i.length)}return null}static erase(t){e.set(t,"",-1)}};function iu(e,t,r,n){document.cookie=`${e}=${t}`+(r?`;expires=${r.toUTCString()}`:"")+(n?`;domain=${n}`:"")+";path=/;SameSite=Lax"}function pg(){return la()?localStorage:Su()?new cn:ug()?sessionStorage:new hr}var cn=class e{getItem(t){return sn.get(`${e.prefix}${t}`)}removeItem(t){sn.erase(`${e.prefix}${t}`)}setItem(t,r,n){sn.set(`${e.prefix}${t}`,r,n)}};cn.prefix="coveo_";var da=class{constructor(){this.cookieStorage=new cn}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)}},hr=class{getItem(t){return null}removeItem(t){}setItem(t,r){}},on="__coveo.analytics.history",vu=20,Cu=1e3*60,bu=75,yr=class{constructor(t){this.store=t||pg()}addElement(t){t.internalTime=new Date().getTime(),t=this.cropQueryElement(this.stripEmptyQuery(t));let r=this.getHistoryWithInternalTime();r!=null?this.isValidEntry(t)&&this.setHistory([t].concat(r)):this.setHistory([t])}addElementAsync(t){return O(this,void 0,void 0,function*(){t.internalTime=new Date().getTime(),t=this.cropQueryElement(this.stripEmptyQuery(t));let r=yield this.getHistoryWithInternalTimeAsync();r!=null?this.isValidEntry(t)&&this.setHistory([t].concat(r)):this.setHistory([t])})}getHistory(){let t=this.getHistoryWithInternalTime();return this.stripEmptyQueries(this.stripInternalTime(t))}getHistoryAsync(){return O(this,void 0,void 0,function*(){let t=yield this.getHistoryWithInternalTimeAsync();return this.stripEmptyQueries(this.stripInternalTime(t))})}getHistoryWithInternalTime(){try{let t=this.store.getItem(on);return t&&typeof t=="string"?JSON.parse(t):[]}catch{return[]}}getHistoryWithInternalTimeAsync(){return O(this,void 0,void 0,function*(){try{let t=yield this.store.getItem(on);return t?JSON.parse(t):[]}catch{return[]}})}setHistory(t){try{this.store.setItem(on,JSON.stringify(t.slice(0,vu)))}catch{}}clear(){try{this.store.removeItem(on)}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,bu)),t}isValidEntry(t){let r=this.getMostRecentElement();return r&&r.value==t.value?(t.internalTime||0)-(r.internalTime||0)>Cu:!0}stripInternalTime(t){return Array.isArray(t)?t.map(r=>{let{name:n,time:o,value:i}=r;return{name:n,time:o,value:i}}):[]}stripEmptyQuery(t){let{name:r,time:n,value:o}=t;return r&&typeof o=="string"&&r.toLowerCase()==="query"&&o.trim()===""?{name:r,time:n}:t}stripEmptyQueries(t){return t.map(r=>this.stripEmptyQuery(r))}},Au=Object.freeze({__proto__:null,HistoryStore:yr,MAX_NUMBER_OF_HISTORY_ELEMENTS:vu,MAX_VALUE_SIZE:bu,MIN_THRESHOLD_FOR_DUPLICATE_VALUE:Cu,STORE_KEY:on,default:yr}),fg=(e,t)=>O(void 0,void 0,void 0,function*(){return e===te.view?(yield mg(t.contentIdValue),Object.assign({location:window.location.toString(),referrer:document.referrer,title:document.title},t)):t}),mg=e=>O(void 0,void 0,void 0,function*(){let t=new yr,r={name:"PageView",value:e,time:new Date().toISOString()};yield t.addElementAsync(r)}),ao,gg=new Uint8Array(16);function hg(){if(!ao&&(ao=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!ao))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return ao(gg)}var yg=/^(?:[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 co(e){return typeof e=="string"&&yg.test(e)}var be=[];for(let e=0;e<256;++e)be.push((e+256).toString(16).slice(1));function wu(e,t=0){return(be[e[t+0]]+be[e[t+1]]+be[e[t+2]]+be[e[t+3]]+"-"+be[e[t+4]]+be[e[t+5]]+"-"+be[e[t+6]]+be[e[t+7]]+"-"+be[e[t+8]]+be[e[t+9]]+"-"+be[e[t+10]]+be[e[t+11]]+be[e[t+12]]+be[e[t+13]]+be[e[t+14]]+be[e[t+15]]).toLowerCase()}function Sg(e){if(!co(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 vg(e){e=unescape(encodeURIComponent(e));let t=[];for(let r=0;r<e.length;++r)t.push(e.charCodeAt(r));return t}var Cg="6ba7b810-9dad-11d1-80b4-00c04fd430c8",bg="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function Ag(e,t,r){function n(o,i,a,m){var f;if(typeof o=="string"&&(o=vg(o)),typeof i=="string"&&(i=Sg(i)),((f=i)===null||f===void 0?void 0:f.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let s=new Uint8Array(16+o.length);if(s.set(i),s.set(o,i.length),s=r(s),s[6]=s[6]&15|t,s[8]=s[8]&63|128,a){m=m||0;for(let g=0;g<16;++g)a[m+g]=s[g];return a}return wu(s)}try{n.name=e}catch{}return n.DNS=Cg,n.URL=bg,n}var wg=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),au={randomUUID:wg};function zt(e,t,r){if(au.randomUUID&&!t&&!e)return au.randomUUID();e=e||{};let n=e.random||(e.rng||hg)();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 wu(n)}function xg(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 sa(e,t){return e<<t|e>>>32-t}function Rg(e){let t=[1518500249,1859775393,2400959708,3395469782],r=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof e=="string"){let a=unescape(encodeURIComponent(e));e=[];for(let m=0;m<a.length;++m)e.push(a.charCodeAt(m))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);let n=e.length/4+2,o=Math.ceil(n/16),i=new Array(o);for(let a=0;a<o;++a){let m=new Uint32Array(16);for(let f=0;f<16;++f)m[f]=e[a*64+f*4]<<24|e[a*64+f*4+1]<<16|e[a*64+f*4+2]<<8|e[a*64+f*4+3];i[a]=m}i[o-1][14]=(e.length-1)*8/Math.pow(2,32),i[o-1][14]=Math.floor(i[o-1][14]),i[o-1][15]=(e.length-1)*8&4294967295;for(let a=0;a<o;++a){let m=new Uint32Array(80);for(let h=0;h<16;++h)m[h]=i[a][h];for(let h=16;h<80;++h)m[h]=sa(m[h-3]^m[h-8]^m[h-14]^m[h-16],1);let f=r[0],s=r[1],g=r[2],S=r[3],y=r[4];for(let h=0;h<80;++h){let v=Math.floor(h/20),C=sa(f,5)+xg(v,s,g,S)+y+t[v]+m[h]>>>0;y=S,S=g,g=sa(s,30)>>>0,s=f,f=C}r[0]=r[0]+f>>>0,r[1]=r[1]+s>>>0,r[2]=r[2]+g>>>0,r[3]=r[3]+S>>>0,r[4]=r[4]+y>>>0}return[r[0]>>24&255,r[0]>>16&255,r[0]>>8&255,r[0]&255,r[1]>>24&255,r[1]>>16&255,r[1]>>8&255,r[1]&255,r[2]>>24&255,r[2]>>16&255,r[2]>>8&255,r[2]&255,r[3]>>24&255,r[3]>>16&255,r[3]>>8&255,r[3]&255,r[4]>>24&255,r[4]>>16&255,r[4]>>8&255,r[4]&255]}var Eg=Ag("v5",80,Rg),su=Eg,xu="2.30.43",cu=e=>`${e.protocol}//${e.hostname}${e.pathname.indexOf("/")===0?e.pathname:`/${e.pathname}`}${e.search}`,an={pageview:"pageview",event:"event"},uo=class{constructor({client:t,uuidGenerator:r=zt}){this.client=t,this.uuidGenerator=r}},pa=class extends uo{constructor({client:t,uuidGenerator:r=zt}){super({client:t,uuidGenerator:r}),this.actionData={},this.pageViewId=r(),this.nextPageViewId=this.pageViewId,this.currentLocation=cu(window.location),this.lastReferrer=mr()?document.referrer:"",this.addHooks()}getApi(t){switch(t){case"setAction":return this.setAction;default:return null}}setAction(t,r){this.action=t,this.actionData=r}clearData(){this.clearPluginData(),this.action=void 0,this.actionData={}}getLocationInformation(t,r){return Object.assign({hitType:t},this.getNextValues(t,r))}updateLocationInformation(t,r){this.updateLocationForNextPageView(t,r)}getDefaultContextInformation(t){let r={title:mr()?document.title:"",encoding:mr()?document.characterSet:"UTF-8"},n={screenResolution:`${screen.width}x${screen.height}`,screenColor:`${screen.colorDepth}-bit`},o={language:navigator.language,userAgent:navigator.userAgent},i={time:Date.now(),eventId:this.uuidGenerator()};return Object.assign(Object.assign(Object.assign(Object.assign({},i),n),o),r)}updateLocationForNextPageView(t,r){let{pageViewId:n,referrer:o,location:i}=this.getNextValues(t,r);this.lastReferrer=o,this.pageViewId=n,this.currentLocation=i,t===an.pageview&&(this.nextPageViewId=this.uuidGenerator(),this.hasSentFirstPageView=!0)}getNextValues(t,r){return{pageViewId:t===an.pageview?this.nextPageViewId:this.pageViewId,referrer:t===an.pageview&&this.hasSentFirstPageView?this.currentLocation:this.lastReferrer,location:t===an.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 cu(window.location)}},yt=class e{constructor(t,r){if(!co(t))throw Error("Not a valid uuid");this.clientId=t,this.creationDate=Math.floor(r/1e3)}toString(){return this.clientId.replace(/-/g,"")+"."+this.creationDate.toString()}get expired(){let t=Math.floor(Date.now()/1e3)-this.creationDate;return t<0||t>e.expirationTime}validate(t,r){return!this.expired&&this.matchReferrer(t,r)}matchReferrer(t,r){try{let n=new URL(t);return r.some(o=>new RegExp(o.replace(/\\/g,"\\\\").replace(/\./g,"\\.").replace(/\*/g,".*")+"$").test(n.host))}catch{return!1}}static fromString(t){let r=t.split(".");if(r.length!==2)return null;let[n,o]=r;if(n.length!==32||isNaN(parseInt(o)))return null;let i=n.substring(0,8)+"-"+n.substring(8,12)+"-"+n.substring(12,16)+"-"+n.substring(16,20)+"-"+n.substring(20,32);return co(i)?new e(i,Number.parseInt(o)*1e3):null}};yt.cvo_cid="cvo_cid";yt.expirationTime=120;var fa=class extends uo{constructor({client:t,uuidGenerator:r=zt}){super({client:t,uuidGenerator:r})}getApi(t){switch(t){case"decorate":return this.decorate;case"acceptFrom":return this.acceptFrom;default:return null}}decorate(t){return O(this,void 0,void 0,function*(){if(!this.client.getCurrentVisitorId)throw new Error("Could not retrieve current clientId");try{let r=new URL(t),n=yield this.client.getCurrentVisitorId();return r.searchParams.set(yt.cvo_cid,new yt(n,Date.now()).toString()),r.toString()}catch{throw new Error("Invalid URL provided")}})}acceptFrom(t){this.client.setAcceptedLinkReferrers(t)}};fa.Id="link";var Ve=Object.keys;function so(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}var ca=128,Ru=192,uu=224,lu=240;function Ig(e){return(e&248)===lu?4:(e&lu)===uu?3:(e&uu)===Ru?2:1}function Pg(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&ca)!=ca)break;if(r-=3,(n&Ru)!=ca){t-r>=Ig(n)*3&&(r=t);break}}return e.substring(0,r)}var ma={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"},Tg=Ve(ma).map(e=>ma[e]),Fg=[...Tg].join("|"),kg=new RegExp(`^(${Fg}$)`),Og={svcAction:"svc_action",svcActionData:"svc_action_data"},Dg=e=>Ve(e).filter(t=>e[t]!==void 0).reduce((t,r)=>{let n=ma[r]||r;return Object.assign(Object.assign({},t),{[n]:e[r]})},{}),Mg=e=>kg.test(e),qg=[Mg],du={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",price:"pr",quantity:"qt",coupon:"cc",position:"ps",group:"group"},pu={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",position:"ps",price:"pr",group:"group"},we={action:"pa",list:"pal",listSource:"pls"},lo={id:"ti",revenue:"tr",tax:"tt",shipping:"ts",coupon:"tcc",affiliation:"ta",step:"cos",option:"col"},Ng=["loyaltyCardId","loyaltyTier","thirdPartyPersona","companyName","favoriteStore","storeName","userIndustry","userRole","userDepartment","businessUnit"],ga={id:"quoteId",affiliation:"quoteAffiliation"},ha={id:"reviewId",rating:"reviewRating",comment:"reviewComment"},_g={add:we,bookmark_add:we,bookmark_remove:we,click:we,checkout:we,checkout_option:we,detail:we,impression:we,remove:we,refund:Object.assign(Object.assign({},we),lo),purchase:Object.assign(Object.assign({},we),lo),quickview:we,quote:Object.assign(Object.assign({},we),ga),review:Object.assign(Object.assign({},we),ha)},Vg=Ve(du).map(e=>du[e]),jg=Ve(pu).map(e=>pu[e]),Lg=Ve(we).map(e=>we[e]),Ug=Ve(lo).map(e=>lo[e]),Bg=Ve(ha).map(e=>ha[e]),Qg=Ve(ga).map(e=>ga[e]),$g=[...Vg,"custom"].join("|"),Hg=[...jg,"custom"].join("|"),Eu="(pr[0-9]+)",Iu="(il[0-9]+pi[0-9]+)",zg=new RegExp(`^${Eu}(${$g})$`),Wg=new RegExp(`^(${Iu}(${Hg}))|(il[0-9]+nm)$`),Gg=new RegExp(`^(${Lg.join("|")})$`),Kg=new RegExp(`^(${Ug.join("|")})$`),Yg=new RegExp(`^${Eu}custom$`),Jg=new RegExp(`^${Iu}custom$`),Xg=new RegExp(`^(${[...Ng,...Bg,...Qg].join("|")})$`),Zg=e=>zg.test(e),eh=e=>Wg.test(e),th=e=>Gg.test(e),rh=e=>Kg.test(e),nh=e=>Xg.test(e),oh=[eh,Zg,th,rh,nh],ih=[Yg,Jg],ah={anonymizeIp:"aip"},sh={eventCategory:"ec",eventAction:"ea",eventLabel:"el",eventValue:"ev",page:"dp",visitorId:"cid",clientId:"cid",userId:"uid",currencyCode:"cu"},ch={hitType:"t",pageViewId:"pid",encoding:"de",location:"dl",referrer:"dr",screenColor:"sd",screenResolution:"sr",title:"dt",userAgent:"ua",language:"ul",eventId:"z",time:"tm"},uh=["contentId","contentIdKey","contentType","searchHub","tab","searchUid","permanentId","contentLocale","trackingId"],lh=Object.assign(Object.assign(Object.assign(Object.assign({},ah),sh),ch),uh.reduce((e,t)=>Object.assign(Object.assign({},e),{[t]:t}),{})),ya=Object.assign(Object.assign({},lh),Og),dh=e=>{let t=!!e.action&&_g[e.action]||{};return Ve(e).reduce((r,n)=>{let o=t[n]||ya[n]||n;return Object.assign(Object.assign({},r),{[o]:e[n]})},{})},ph=Ve(ya).map(e=>ya[e]),fh=e=>ph.indexOf(e)!==-1,mh=e=>e==="custom",gh=e=>[...oh,...qg,fh,mh].some(t=>t(e)),hh=e=>Ve(e).reduce((t,r)=>{let n=yh(r);return n?Object.assign(Object.assign({},t),Sh(n,e[r])):Object.assign(Object.assign({},t),{[r]:e[r]})},{}),yh=e=>{let t;return[...ih].every(r=>{var n;return t=(n=r.exec(e))===null||n===void 0?void 0:n[1],!t}),t},Sh=(e,t)=>Ve(t).reduce((r,n)=>Object.assign(Object.assign({},r),{[`${e}${n}`]:t[n]}),{}),Sa=class{constructor(t){this.opts=t}sendEvent(t,r){return O(this,void 0,void 0,function*(){if(!this.isAvailable())throw new Error("navigator.sendBeacon is not supported in this browser. Consider adding a polyfill like \"sendbeacon-polyfill\".");let{baseUrl:n,preprocessRequest:o}=this.opts,i=yield this.getQueryParamsForEventType(t),{url:a,payload:m}=yield this.preProcessRequestAsPotentialJSONString(`${n}/analytics/${t}?${i}`,r,o),f=this.encodeForEventType(t,m),s=new Blob([f],{type:"application/x-www-form-urlencoded"});navigator.sendBeacon(a,s)})}isAvailable(){return"sendBeacon"in navigator}deleteHttpCookieVisitorId(){return Promise.resolve()}preProcessRequestAsPotentialJSONString(t,r,n){return O(this,void 0,void 0,function*(){let o=t,i=r;if(n){let a=yield n({url:t,body:JSON.stringify(r)},"analyticsBeacon"),{url:m,body:f}=a;o=m||t;try{i=JSON.parse(f)}catch(s){console.error("Unable to process the request body as a JSON string",s)}}return{payload:i,url:o}})}encodeForEventType(t,r){return this.isEventTypeLegacy(t)?this.encodeEventToJson(t,r):this.encodeEventToJson(t,r,this.opts.token)}getQueryParamsForEventType(t){return O(this,void 0,void 0,function*(){let{token:r,visitorIdProvider:n}=this.opts,o=yield n.getCurrentVisitorId();return[r&&this.isEventTypeLegacy(t)?`access_token=${r}`:"",o?`visitorId=${o}`:"","discardVisitInfo=true"].filter(i=>!!i).join("&")})}isEventTypeLegacy(t){return[te.click,te.custom,te.search,te.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}},va=class{sendEvent(t,r){return O(this,void 0,void 0,function*(){return Promise.resolve()})}deleteHttpCookieVisitorId(){return O(this,void 0,void 0,function*(){return Promise.resolve()})}},fu=A.fetch,po=class{constructor(t){this.opts=t}sendEvent(t,r){return O(this,void 0,void 0,function*(){let{baseUrl:n,visitorIdProvider:o,preprocessRequest:i}=this.opts,a=this.shouldAppendVisitorId(t)?yield this.getVisitorIdParam():"",m={url:`${n}/analytics/${t}${a}`,credentials:"include",mode:"cors",headers:this.getHeaders(),method:"POST",body:JSON.stringify(r)},f=Object.assign(Object.assign({},m),i?yield i(m,"analyticsFetch"):{}),{url:s}=f,g=it(f,["url"]),S;try{S=yield fu(s,g)}catch(y){console.error("An error has occured when sending the event.",y);return}if(S.ok){let y=yield S.json();return y.visitorId&&o.setCurrentVisitorId(y.visitorId),y}else{try{S.json()}catch{}throw console.error(`An error has occured when sending the "${t}" event.`,S,r),new Error(`An error has occurred when sending the "${t}" event. Check the console logs for more details.`)}})}deleteHttpCookieVisitorId(){return O(this,void 0,void 0,function*(){let{baseUrl:t}=this.opts,r=`${t}/analytics/visit`;yield fu(r,{headers:this.getHeaders(),method:"DELETE"})})}shouldAppendVisitorId(t){return[te.click,te.custom,te.search,te.view].indexOf(t)!==-1}getVisitorIdParam(){return O(this,void 0,void 0,function*(){let{visitorIdProvider:t}=this.opts,r=yield t.getCurrentVisitorId();return r?`?visitor=${r}`:""})}getHeaders(){let{token:t}=this.opts;return Object.assign(Object.assign({},t?{Authorization:`Bearer ${t}`}:{}),{"Content-Type":"application/json"})}},Ca=class{constructor(t,r){la()&&Su()?this.storage=new da:la()?this.storage=localStorage:(console.warn("BrowserRuntime detected no valid storage available.",this),this.storage=new hr),this.client=new po(t),this.beaconClient=new Sa(t),window.addEventListener("beforeunload",()=>{let n=r();for(let{eventType:o,payload:i}of n)this.beaconClient.sendEvent(o,i)})}getClientDependingOnEventType(t){return t==="click"&&this.beaconClient.isAvailable()?this.beaconClient:this.client}},ba=class{constructor(t,r){this.storage=r||new hr,this.client=new po(t)}getClientDependingOnEventType(t){return this.client}},fo=class{constructor(){this.storage=new hr,this.client=new va}getClientDependingOnEventType(t){return this.client}},vh="xx",Ch=e=>e?.startsWith(vh)||!1,bh=`
27
27
  We've detected you're using React Native but have not provided the corresponding runtime,
28
28
  for an optimal experience please use the "coveo.analytics/react-native" subpackage.
29
29
  Follow the Readme on how to set it up: https://github.com/coveo/coveo.analytics.js#using-react-native
@@ -1,3 +1,3 @@
1
- /*! @license DOMPurify 3.2.3 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.3/LICENSE */
2
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).DOMPurify=t()}(this,(function(){"use strict";const{entries:e,setPrototypeOf:t,isFrozen:n,getPrototypeOf:o,getOwnPropertyDescriptor:r}=Object;let{freeze:i,seal:a,create:l}=Object,{apply:c,construct:s}="undefined"!=typeof Reflect&&Reflect;i||(i=function(e){return e}),a||(a=function(e){return e}),c||(c=function(e,t,n){return e.apply(t,n)}),s||(s=function(e,t){return new e(...t)});const u=b(Array.prototype.forEach),m=b(Array.prototype.pop),p=b(Array.prototype.push),f=b(String.prototype.toLowerCase),d=b(String.prototype.toString),h=b(String.prototype.match),g=b(String.prototype.replace),T=b(String.prototype.indexOf),y=b(String.prototype.trim),E=b(Object.prototype.hasOwnProperty),A=b(RegExp.prototype.test),_=(S=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return s(S,t)});var S;function b(e){return function(t){for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return c(e,t,o)}}function N(e,o){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:f;t&&t(e,null);let i=o.length;for(;i--;){let t=o[i];if("string"==typeof t){const e=r(t);e!==t&&(n(o)||(o[i]=e),t=e)}e[t]=!0}return e}function R(e){for(let t=0;t<e.length;t++){E(e,t)||(e[t]=null)}return e}function w(t){const n=l(null);for(const[o,r]of e(t)){E(t,o)&&(Array.isArray(r)?n[o]=R(r):r&&"object"==typeof r&&r.constructor===Object?n[o]=w(r):n[o]=r)}return n}function O(e,t){for(;null!==e;){const n=r(e,t);if(n){if(n.get)return b(n.get);if("function"==typeof n.value)return b(n.value)}e=o(e)}return function(){return null}}const D=i(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),L=i(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),v=i(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),C=i(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),x=i(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),M=i(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),k=i(["#text"]),I=i(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),U=i(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),z=i(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),P=i(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),H=a(/\{\{[\w\W]*|[\w\W]*\}\}/gm),F=a(/<%[\w\W]*|[\w\W]*%>/gm),B=a(/\$\{[\w\W]*}/gm),W=a(/^data-[\-\w.\u00B7-\uFFFF]+$/),G=a(/^aria-[\-\w]+$/),Y=a(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),j=a(/^(?:\w+script|data):/i),X=a(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),q=a(/^html$/i),$=a(/^[a-z][.\w]*(-[.\w]+)+$/i);var K=Object.freeze({__proto__:null,ARIA_ATTR:G,ATTR_WHITESPACE:X,CUSTOM_ELEMENT:$,DATA_ATTR:W,DOCTYPE_NAME:q,ERB_EXPR:F,IS_ALLOWED_URI:Y,IS_SCRIPT_OR_DATA:j,MUSTACHE_EXPR:H,TMPLIT_EXPR:B});const V=1,Z=3,J=7,Q=8,ee=9,te=function(){return"undefined"==typeof window?null:window};var ne=function t(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:te();const o=e=>t(e);if(o.version="3.2.3",o.removed=[],!n||!n.document||n.document.nodeType!==ee)return o.isSupported=!1,o;let{document:r}=n;const a=r,c=a.currentScript,{DocumentFragment:s,HTMLTemplateElement:S,Node:b,Element:R,NodeFilter:H,NamedNodeMap:F=n.NamedNodeMap||n.MozNamedAttrMap,HTMLFormElement:B,DOMParser:W,trustedTypes:G}=n,j=R.prototype,X=O(j,"cloneNode"),$=O(j,"remove"),ne=O(j,"nextSibling"),oe=O(j,"childNodes"),re=O(j,"parentNode");if("function"==typeof S){const e=r.createElement("template");e.content&&e.content.ownerDocument&&(r=e.content.ownerDocument)}let ie,ae="";const{implementation:le,createNodeIterator:ce,createDocumentFragment:se,getElementsByTagName:ue}=r,{importNode:me}=a;let pe={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};o.isSupported="function"==typeof e&&"function"==typeof re&&le&&void 0!==le.createHTMLDocument;const{MUSTACHE_EXPR:fe,ERB_EXPR:de,TMPLIT_EXPR:he,DATA_ATTR:ge,ARIA_ATTR:Te,IS_SCRIPT_OR_DATA:ye,ATTR_WHITESPACE:Ee,CUSTOM_ELEMENT:Ae}=K;let{IS_ALLOWED_URI:_e}=K,Se=null;const be=N({},[...D,...L,...v,...x,...k]);let Ne=null;const Re=N({},[...I,...U,...z,...P]);let we=Object.seal(l(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Oe=null,De=null,Le=!0,ve=!0,Ce=!1,xe=!0,Me=!1,ke=!0,Ie=!1,Ue=!1,ze=!1,Pe=!1,He=!1,Fe=!1,Be=!0,We=!1,Ge=!0,Ye=!1,je={},Xe=null;const qe=N({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let $e=null;const Ke=N({},["audio","video","img","source","image","track"]);let Ve=null;const Ze=N({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Je="http://www.w3.org/1998/Math/MathML",Qe="http://www.w3.org/2000/svg",et="http://www.w3.org/1999/xhtml";let tt=et,nt=!1,ot=null;const rt=N({},[Je,Qe,et],d);let it=N({},["mi","mo","mn","ms","mtext"]),at=N({},["annotation-xml"]);const lt=N({},["title","style","font","a","script"]);let ct=null;const st=["application/xhtml+xml","text/html"];let ut=null,mt=null;const pt=r.createElement("form"),ft=function(e){return e instanceof RegExp||e instanceof Function},dt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!mt||mt!==e){if(e&&"object"==typeof e||(e={}),e=w(e),ct=-1===st.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,ut="application/xhtml+xml"===ct?d:f,Se=E(e,"ALLOWED_TAGS")?N({},e.ALLOWED_TAGS,ut):be,Ne=E(e,"ALLOWED_ATTR")?N({},e.ALLOWED_ATTR,ut):Re,ot=E(e,"ALLOWED_NAMESPACES")?N({},e.ALLOWED_NAMESPACES,d):rt,Ve=E(e,"ADD_URI_SAFE_ATTR")?N(w(Ze),e.ADD_URI_SAFE_ATTR,ut):Ze,$e=E(e,"ADD_DATA_URI_TAGS")?N(w(Ke),e.ADD_DATA_URI_TAGS,ut):Ke,Xe=E(e,"FORBID_CONTENTS")?N({},e.FORBID_CONTENTS,ut):qe,Oe=E(e,"FORBID_TAGS")?N({},e.FORBID_TAGS,ut):{},De=E(e,"FORBID_ATTR")?N({},e.FORBID_ATTR,ut):{},je=!!E(e,"USE_PROFILES")&&e.USE_PROFILES,Le=!1!==e.ALLOW_ARIA_ATTR,ve=!1!==e.ALLOW_DATA_ATTR,Ce=e.ALLOW_UNKNOWN_PROTOCOLS||!1,xe=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Me=e.SAFE_FOR_TEMPLATES||!1,ke=!1!==e.SAFE_FOR_XML,Ie=e.WHOLE_DOCUMENT||!1,Pe=e.RETURN_DOM||!1,He=e.RETURN_DOM_FRAGMENT||!1,Fe=e.RETURN_TRUSTED_TYPE||!1,ze=e.FORCE_BODY||!1,Be=!1!==e.SANITIZE_DOM,We=e.SANITIZE_NAMED_PROPS||!1,Ge=!1!==e.KEEP_CONTENT,Ye=e.IN_PLACE||!1,_e=e.ALLOWED_URI_REGEXP||Y,tt=e.NAMESPACE||et,it=e.MATHML_TEXT_INTEGRATION_POINTS||it,at=e.HTML_INTEGRATION_POINTS||at,we=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&ft(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(we.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&ft(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(we.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(we.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Me&&(ve=!1),He&&(Pe=!0),je&&(Se=N({},k),Ne=[],!0===je.html&&(N(Se,D),N(Ne,I)),!0===je.svg&&(N(Se,L),N(Ne,U),N(Ne,P)),!0===je.svgFilters&&(N(Se,v),N(Ne,U),N(Ne,P)),!0===je.mathMl&&(N(Se,x),N(Ne,z),N(Ne,P))),e.ADD_TAGS&&(Se===be&&(Se=w(Se)),N(Se,e.ADD_TAGS,ut)),e.ADD_ATTR&&(Ne===Re&&(Ne=w(Ne)),N(Ne,e.ADD_ATTR,ut)),e.ADD_URI_SAFE_ATTR&&N(Ve,e.ADD_URI_SAFE_ATTR,ut),e.FORBID_CONTENTS&&(Xe===qe&&(Xe=w(Xe)),N(Xe,e.FORBID_CONTENTS,ut)),Ge&&(Se["#text"]=!0),Ie&&N(Se,["html","head","body"]),Se.table&&(N(Se,["tbody"]),delete Oe.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw _('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw _('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');ie=e.TRUSTED_TYPES_POLICY,ae=ie.createHTML("")}else void 0===ie&&(ie=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const o="data-tt-policy-suffix";t&&t.hasAttribute(o)&&(n=t.getAttribute(o));const r="dompurify"+(n?"#"+n:"");try{return e.createPolicy(r,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+r+" could not be created."),null}}(G,c)),null!==ie&&"string"==typeof ae&&(ae=ie.createHTML(""));i&&i(e),mt=e}},ht=N({},[...L,...v,...C]),gt=N({},[...x,...M]),Tt=function(e){p(o.removed,{element:e});try{re(e).removeChild(e)}catch(t){$(e)}},yt=function(e,t){try{p(o.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){p(o.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(Pe||He)try{Tt(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},Et=function(e){let t=null,n=null;if(ze)e="<remove></remove>"+e;else{const t=h(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===ct&&tt===et&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const o=ie?ie.createHTML(e):e;if(tt===et)try{t=(new W).parseFromString(o,ct)}catch(e){}if(!t||!t.documentElement){t=le.createDocument(tt,"template",null);try{t.documentElement.innerHTML=nt?ae:o}catch(e){}}const i=t.body||t.documentElement;return e&&n&&i.insertBefore(r.createTextNode(n),i.childNodes[0]||null),tt===et?ue.call(t,Ie?"html":"body")[0]:Ie?t.documentElement:i},At=function(e){return ce.call(e.ownerDocument||e,e,H.SHOW_ELEMENT|H.SHOW_COMMENT|H.SHOW_TEXT|H.SHOW_PROCESSING_INSTRUCTION|H.SHOW_CDATA_SECTION,null)},_t=function(e){return e instanceof B&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof F)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},St=function(e){return"function"==typeof b&&e instanceof b};function bt(e,t,n){u(e,(e=>{e.call(o,t,n,mt)}))}const Nt=function(e){let t=null;if(bt(pe.beforeSanitizeElements,e,null),_t(e))return Tt(e),!0;const n=ut(e.nodeName);if(bt(pe.uponSanitizeElement,e,{tagName:n,allowedTags:Se}),e.hasChildNodes()&&!St(e.firstElementChild)&&A(/<[/\w]/g,e.innerHTML)&&A(/<[/\w]/g,e.textContent))return Tt(e),!0;if(e.nodeType===J)return Tt(e),!0;if(ke&&e.nodeType===Q&&A(/<[/\w]/g,e.data))return Tt(e),!0;if(!Se[n]||Oe[n]){if(!Oe[n]&&wt(n)){if(we.tagNameCheck instanceof RegExp&&A(we.tagNameCheck,n))return!1;if(we.tagNameCheck instanceof Function&&we.tagNameCheck(n))return!1}if(Ge&&!Xe[n]){const t=re(e)||e.parentNode,n=oe(e)||e.childNodes;if(n&&t){for(let o=n.length-1;o>=0;--o){const r=X(n[o],!0);r.__removalCount=(e.__removalCount||0)+1,t.insertBefore(r,ne(e))}}}return Tt(e),!0}return e instanceof R&&!function(e){let t=re(e);t&&t.tagName||(t={namespaceURI:tt,tagName:"template"});const n=f(e.tagName),o=f(t.tagName);return!!ot[e.namespaceURI]&&(e.namespaceURI===Qe?t.namespaceURI===et?"svg"===n:t.namespaceURI===Je?"svg"===n&&("annotation-xml"===o||it[o]):Boolean(ht[n]):e.namespaceURI===Je?t.namespaceURI===et?"math"===n:t.namespaceURI===Qe?"math"===n&&at[o]:Boolean(gt[n]):e.namespaceURI===et?!(t.namespaceURI===Qe&&!at[o])&&!(t.namespaceURI===Je&&!it[o])&&!gt[n]&&(lt[n]||!ht[n]):!("application/xhtml+xml"!==ct||!ot[e.namespaceURI]))}(e)?(Tt(e),!0):"noscript"!==n&&"noembed"!==n&&"noframes"!==n||!A(/<\/no(script|embed|frames)/i,e.innerHTML)?(Me&&e.nodeType===Z&&(t=e.textContent,u([fe,de,he],(e=>{t=g(t,e," ")})),e.textContent!==t&&(p(o.removed,{element:e.cloneNode()}),e.textContent=t)),bt(pe.afterSanitizeElements,e,null),!1):(Tt(e),!0)},Rt=function(e,t,n){if(Be&&("id"===t||"name"===t)&&(n in r||n in pt))return!1;if(ve&&!De[t]&&A(ge,t));else if(Le&&A(Te,t));else if(!Ne[t]||De[t]){if(!(wt(e)&&(we.tagNameCheck instanceof RegExp&&A(we.tagNameCheck,e)||we.tagNameCheck instanceof Function&&we.tagNameCheck(e))&&(we.attributeNameCheck instanceof RegExp&&A(we.attributeNameCheck,t)||we.attributeNameCheck instanceof Function&&we.attributeNameCheck(t))||"is"===t&&we.allowCustomizedBuiltInElements&&(we.tagNameCheck instanceof RegExp&&A(we.tagNameCheck,n)||we.tagNameCheck instanceof Function&&we.tagNameCheck(n))))return!1}else if(Ve[t]);else if(A(_e,g(n,Ee,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==T(n,"data:")||!$e[e]){if(Ce&&!A(ye,g(n,Ee,"")));else if(n)return!1}else;return!0},wt=function(e){return"annotation-xml"!==e&&h(e,Ae)},Ot=function(e){bt(pe.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||_t(e))return;const n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Ne,forceKeepAttr:void 0};let r=t.length;for(;r--;){const i=t[r],{name:a,namespaceURI:l,value:c}=i,s=ut(a);let p="value"===a?c:y(c);if(n.attrName=s,n.attrValue=p,n.keepAttr=!0,n.forceKeepAttr=void 0,bt(pe.uponSanitizeAttribute,e,n),p=n.attrValue,!We||"id"!==s&&"name"!==s||(yt(a,e),p="user-content-"+p),ke&&A(/((--!?|])>)|<\/(style|title)/i,p)){yt(a,e);continue}if(n.forceKeepAttr)continue;if(yt(a,e),!n.keepAttr)continue;if(!xe&&A(/\/>/i,p)){yt(a,e);continue}Me&&u([fe,de,he],(e=>{p=g(p,e," ")}));const f=ut(e.nodeName);if(Rt(f,s,p)){if(ie&&"object"==typeof G&&"function"==typeof G.getAttributeType)if(l);else switch(G.getAttributeType(f,s)){case"TrustedHTML":p=ie.createHTML(p);break;case"TrustedScriptURL":p=ie.createScriptURL(p)}try{l?e.setAttributeNS(l,a,p):e.setAttribute(a,p),_t(e)?Tt(e):m(o.removed)}catch(e){}}}bt(pe.afterSanitizeAttributes,e,null)},Dt=function e(t){let n=null;const o=At(t);for(bt(pe.beforeSanitizeShadowDOM,t,null);n=o.nextNode();)bt(pe.uponSanitizeShadowNode,n,null),Nt(n),Ot(n),n.content instanceof s&&e(n.content);bt(pe.afterSanitizeShadowDOM,t,null)};return o.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null,r=null,i=null,l=null;if(nt=!e,nt&&(e="\x3c!--\x3e"),"string"!=typeof e&&!St(e)){if("function"!=typeof e.toString)throw _("toString is not a function");if("string"!=typeof(e=e.toString()))throw _("dirty is not a string, aborting")}if(!o.isSupported)return e;if(Ue||dt(t),o.removed=[],"string"==typeof e&&(Ye=!1),Ye){if(e.nodeName){const t=ut(e.nodeName);if(!Se[t]||Oe[t])throw _("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof b)n=Et("\x3c!----\x3e"),r=n.ownerDocument.importNode(e,!0),r.nodeType===V&&"BODY"===r.nodeName||"HTML"===r.nodeName?n=r:n.appendChild(r);else{if(!Pe&&!Me&&!Ie&&-1===e.indexOf("<"))return ie&&Fe?ie.createHTML(e):e;if(n=Et(e),!n)return Pe?null:Fe?ae:""}n&&ze&&Tt(n.firstChild);const c=At(Ye?e:n);for(;i=c.nextNode();)Nt(i),Ot(i),i.content instanceof s&&Dt(i.content);if(Ye)return e;if(Pe){if(He)for(l=se.call(n.ownerDocument);n.firstChild;)l.appendChild(n.firstChild);else l=n;return(Ne.shadowroot||Ne.shadowrootmode)&&(l=me.call(a,l,!0)),l}let m=Ie?n.outerHTML:n.innerHTML;return Ie&&Se["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&A(q,n.ownerDocument.doctype.name)&&(m="<!DOCTYPE "+n.ownerDocument.doctype.name+">\n"+m),Me&&u([fe,de,he],(e=>{m=g(m,e," ")})),ie&&Fe?ie.createHTML(m):m},o.setConfig=function(){dt(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Ue=!0},o.clearConfig=function(){mt=null,Ue=!1},o.isValidAttribute=function(e,t,n){mt||dt({});const o=ut(e),r=ut(t);return Rt(o,r,n)},o.addHook=function(e,t){"function"==typeof t&&p(pe[e],t)},o.removeHook=function(e){return m(pe[e])},o.removeHooks=function(e){pe[e]=[]},o.removeAllHooks=function(){pe={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},o}();return ne}));
1
+ /*! @license DOMPurify 3.2.4 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.4/LICENSE */
2
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).DOMPurify=t()}(this,(function(){"use strict";const{entries:e,setPrototypeOf:t,isFrozen:n,getPrototypeOf:o,getOwnPropertyDescriptor:r}=Object;let{freeze:i,seal:a,create:l}=Object,{apply:c,construct:s}="undefined"!=typeof Reflect&&Reflect;i||(i=function(e){return e}),a||(a=function(e){return e}),c||(c=function(e,t,n){return e.apply(t,n)}),s||(s=function(e,t){return new e(...t)});const u=R(Array.prototype.forEach),m=R(Array.prototype.lastIndexOf),p=R(Array.prototype.pop),f=R(Array.prototype.push),d=R(Array.prototype.splice),h=R(String.prototype.toLowerCase),g=R(String.prototype.toString),T=R(String.prototype.match),y=R(String.prototype.replace),E=R(String.prototype.indexOf),A=R(String.prototype.trim),_=R(Object.prototype.hasOwnProperty),S=R(RegExp.prototype.test),b=(N=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return s(N,t)});var N;function R(e){return function(t){for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return c(e,t,o)}}function w(e,o){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:h;t&&t(e,null);let i=o.length;for(;i--;){let t=o[i];if("string"==typeof t){const e=r(t);e!==t&&(n(o)||(o[i]=e),t=e)}e[t]=!0}return e}function O(e){for(let t=0;t<e.length;t++){_(e,t)||(e[t]=null)}return e}function D(t){const n=l(null);for(const[o,r]of e(t)){_(t,o)&&(Array.isArray(r)?n[o]=O(r):r&&"object"==typeof r&&r.constructor===Object?n[o]=D(r):n[o]=r)}return n}function v(e,t){for(;null!==e;){const n=r(e,t);if(n){if(n.get)return R(n.get);if("function"==typeof n.value)return R(n.value)}e=o(e)}return function(){return null}}const L=i(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),C=i(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),x=i(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),M=i(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),k=i(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),I=i(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),U=i(["#text"]),z=i(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),P=i(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),H=i(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),F=i(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),B=a(/\{\{[\w\W]*|[\w\W]*\}\}/gm),W=a(/<%[\w\W]*|[\w\W]*%>/gm),G=a(/\$\{[\w\W]*/gm),Y=a(/^data-[\-\w.\u00B7-\uFFFF]+$/),j=a(/^aria-[\-\w]+$/),X=a(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),q=a(/^(?:\w+script|data):/i),$=a(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),K=a(/^html$/i),V=a(/^[a-z][.\w]*(-[.\w]+)+$/i);var Z=Object.freeze({__proto__:null,ARIA_ATTR:j,ATTR_WHITESPACE:$,CUSTOM_ELEMENT:V,DATA_ATTR:Y,DOCTYPE_NAME:K,ERB_EXPR:W,IS_ALLOWED_URI:X,IS_SCRIPT_OR_DATA:q,MUSTACHE_EXPR:B,TMPLIT_EXPR:G});const J=1,Q=3,ee=7,te=8,ne=9,oe=function(){return"undefined"==typeof window?null:window};var re=function t(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:oe();const o=e=>t(e);if(o.version="3.2.4",o.removed=[],!n||!n.document||n.document.nodeType!==ne||!n.Element)return o.isSupported=!1,o;let{document:r}=n;const a=r,c=a.currentScript,{DocumentFragment:s,HTMLTemplateElement:N,Node:R,Element:O,NodeFilter:B,NamedNodeMap:W=n.NamedNodeMap||n.MozNamedAttrMap,HTMLFormElement:G,DOMParser:Y,trustedTypes:j}=n,q=O.prototype,$=v(q,"cloneNode"),V=v(q,"remove"),re=v(q,"nextSibling"),ie=v(q,"childNodes"),ae=v(q,"parentNode");if("function"==typeof N){const e=r.createElement("template");e.content&&e.content.ownerDocument&&(r=e.content.ownerDocument)}let le,ce="";const{implementation:se,createNodeIterator:ue,createDocumentFragment:me,getElementsByTagName:pe}=r,{importNode:fe}=a;let de={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};o.isSupported="function"==typeof e&&"function"==typeof ae&&se&&void 0!==se.createHTMLDocument;const{MUSTACHE_EXPR:he,ERB_EXPR:ge,TMPLIT_EXPR:Te,DATA_ATTR:ye,ARIA_ATTR:Ee,IS_SCRIPT_OR_DATA:Ae,ATTR_WHITESPACE:_e,CUSTOM_ELEMENT:Se}=Z;let{IS_ALLOWED_URI:be}=Z,Ne=null;const Re=w({},[...L,...C,...x,...k,...U]);let we=null;const Oe=w({},[...z,...P,...H,...F]);let De=Object.seal(l(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),ve=null,Le=null,Ce=!0,xe=!0,Me=!1,ke=!0,Ie=!1,Ue=!0,ze=!1,Pe=!1,He=!1,Fe=!1,Be=!1,We=!1,Ge=!0,Ye=!1,je=!0,Xe=!1,qe={},$e=null;const Ke=w({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Ve=null;const Ze=w({},["audio","video","img","source","image","track"]);let Je=null;const Qe=w({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),et="http://www.w3.org/1998/Math/MathML",tt="http://www.w3.org/2000/svg",nt="http://www.w3.org/1999/xhtml";let ot=nt,rt=!1,it=null;const at=w({},[et,tt,nt],g);let lt=w({},["mi","mo","mn","ms","mtext"]),ct=w({},["annotation-xml"]);const st=w({},["title","style","font","a","script"]);let ut=null;const mt=["application/xhtml+xml","text/html"];let pt=null,ft=null;const dt=r.createElement("form"),ht=function(e){return e instanceof RegExp||e instanceof Function},gt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!ft||ft!==e){if(e&&"object"==typeof e||(e={}),e=D(e),ut=-1===mt.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,pt="application/xhtml+xml"===ut?g:h,Ne=_(e,"ALLOWED_TAGS")?w({},e.ALLOWED_TAGS,pt):Re,we=_(e,"ALLOWED_ATTR")?w({},e.ALLOWED_ATTR,pt):Oe,it=_(e,"ALLOWED_NAMESPACES")?w({},e.ALLOWED_NAMESPACES,g):at,Je=_(e,"ADD_URI_SAFE_ATTR")?w(D(Qe),e.ADD_URI_SAFE_ATTR,pt):Qe,Ve=_(e,"ADD_DATA_URI_TAGS")?w(D(Ze),e.ADD_DATA_URI_TAGS,pt):Ze,$e=_(e,"FORBID_CONTENTS")?w({},e.FORBID_CONTENTS,pt):Ke,ve=_(e,"FORBID_TAGS")?w({},e.FORBID_TAGS,pt):{},Le=_(e,"FORBID_ATTR")?w({},e.FORBID_ATTR,pt):{},qe=!!_(e,"USE_PROFILES")&&e.USE_PROFILES,Ce=!1!==e.ALLOW_ARIA_ATTR,xe=!1!==e.ALLOW_DATA_ATTR,Me=e.ALLOW_UNKNOWN_PROTOCOLS||!1,ke=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Ie=e.SAFE_FOR_TEMPLATES||!1,Ue=!1!==e.SAFE_FOR_XML,ze=e.WHOLE_DOCUMENT||!1,Fe=e.RETURN_DOM||!1,Be=e.RETURN_DOM_FRAGMENT||!1,We=e.RETURN_TRUSTED_TYPE||!1,He=e.FORCE_BODY||!1,Ge=!1!==e.SANITIZE_DOM,Ye=e.SANITIZE_NAMED_PROPS||!1,je=!1!==e.KEEP_CONTENT,Xe=e.IN_PLACE||!1,be=e.ALLOWED_URI_REGEXP||X,ot=e.NAMESPACE||nt,lt=e.MATHML_TEXT_INTEGRATION_POINTS||lt,ct=e.HTML_INTEGRATION_POINTS||ct,De=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&ht(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(De.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&ht(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(De.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(De.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Ie&&(xe=!1),Be&&(Fe=!0),qe&&(Ne=w({},U),we=[],!0===qe.html&&(w(Ne,L),w(we,z)),!0===qe.svg&&(w(Ne,C),w(we,P),w(we,F)),!0===qe.svgFilters&&(w(Ne,x),w(we,P),w(we,F)),!0===qe.mathMl&&(w(Ne,k),w(we,H),w(we,F))),e.ADD_TAGS&&(Ne===Re&&(Ne=D(Ne)),w(Ne,e.ADD_TAGS,pt)),e.ADD_ATTR&&(we===Oe&&(we=D(we)),w(we,e.ADD_ATTR,pt)),e.ADD_URI_SAFE_ATTR&&w(Je,e.ADD_URI_SAFE_ATTR,pt),e.FORBID_CONTENTS&&($e===Ke&&($e=D($e)),w($e,e.FORBID_CONTENTS,pt)),je&&(Ne["#text"]=!0),ze&&w(Ne,["html","head","body"]),Ne.table&&(w(Ne,["tbody"]),delete ve.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw b('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw b('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');le=e.TRUSTED_TYPES_POLICY,ce=le.createHTML("")}else void 0===le&&(le=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const o="data-tt-policy-suffix";t&&t.hasAttribute(o)&&(n=t.getAttribute(o));const r="dompurify"+(n?"#"+n:"");try{return e.createPolicy(r,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+r+" could not be created."),null}}(j,c)),null!==le&&"string"==typeof ce&&(ce=le.createHTML(""));i&&i(e),ft=e}},Tt=w({},[...C,...x,...M]),yt=w({},[...k,...I]),Et=function(e){f(o.removed,{element:e});try{ae(e).removeChild(e)}catch(t){V(e)}},At=function(e,t){try{f(o.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){f(o.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(Fe||Be)try{Et(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},_t=function(e){let t=null,n=null;if(He)e="<remove></remove>"+e;else{const t=T(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===ut&&ot===nt&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const o=le?le.createHTML(e):e;if(ot===nt)try{t=(new Y).parseFromString(o,ut)}catch(e){}if(!t||!t.documentElement){t=se.createDocument(ot,"template",null);try{t.documentElement.innerHTML=rt?ce:o}catch(e){}}const i=t.body||t.documentElement;return e&&n&&i.insertBefore(r.createTextNode(n),i.childNodes[0]||null),ot===nt?pe.call(t,ze?"html":"body")[0]:ze?t.documentElement:i},St=function(e){return ue.call(e.ownerDocument||e,e,B.SHOW_ELEMENT|B.SHOW_COMMENT|B.SHOW_TEXT|B.SHOW_PROCESSING_INSTRUCTION|B.SHOW_CDATA_SECTION,null)},bt=function(e){return e instanceof G&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof W)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},Nt=function(e){return"function"==typeof R&&e instanceof R};function Rt(e,t,n){u(e,(e=>{e.call(o,t,n,ft)}))}const wt=function(e){let t=null;if(Rt(de.beforeSanitizeElements,e,null),bt(e))return Et(e),!0;const n=pt(e.nodeName);if(Rt(de.uponSanitizeElement,e,{tagName:n,allowedTags:Ne}),e.hasChildNodes()&&!Nt(e.firstElementChild)&&S(/<[/\w]/g,e.innerHTML)&&S(/<[/\w]/g,e.textContent))return Et(e),!0;if(e.nodeType===ee)return Et(e),!0;if(Ue&&e.nodeType===te&&S(/<[/\w]/g,e.data))return Et(e),!0;if(!Ne[n]||ve[n]){if(!ve[n]&&Dt(n)){if(De.tagNameCheck instanceof RegExp&&S(De.tagNameCheck,n))return!1;if(De.tagNameCheck instanceof Function&&De.tagNameCheck(n))return!1}if(je&&!$e[n]){const t=ae(e)||e.parentNode,n=ie(e)||e.childNodes;if(n&&t){for(let o=n.length-1;o>=0;--o){const r=$(n[o],!0);r.__removalCount=(e.__removalCount||0)+1,t.insertBefore(r,re(e))}}}return Et(e),!0}return e instanceof O&&!function(e){let t=ae(e);t&&t.tagName||(t={namespaceURI:ot,tagName:"template"});const n=h(e.tagName),o=h(t.tagName);return!!it[e.namespaceURI]&&(e.namespaceURI===tt?t.namespaceURI===nt?"svg"===n:t.namespaceURI===et?"svg"===n&&("annotation-xml"===o||lt[o]):Boolean(Tt[n]):e.namespaceURI===et?t.namespaceURI===nt?"math"===n:t.namespaceURI===tt?"math"===n&&ct[o]:Boolean(yt[n]):e.namespaceURI===nt?!(t.namespaceURI===tt&&!ct[o])&&!(t.namespaceURI===et&&!lt[o])&&!yt[n]&&(st[n]||!Tt[n]):!("application/xhtml+xml"!==ut||!it[e.namespaceURI]))}(e)?(Et(e),!0):"noscript"!==n&&"noembed"!==n&&"noframes"!==n||!S(/<\/no(script|embed|frames)/i,e.innerHTML)?(Ie&&e.nodeType===Q&&(t=e.textContent,u([he,ge,Te],(e=>{t=y(t,e," ")})),e.textContent!==t&&(f(o.removed,{element:e.cloneNode()}),e.textContent=t)),Rt(de.afterSanitizeElements,e,null),!1):(Et(e),!0)},Ot=function(e,t,n){if(Ge&&("id"===t||"name"===t)&&(n in r||n in dt))return!1;if(xe&&!Le[t]&&S(ye,t));else if(Ce&&S(Ee,t));else if(!we[t]||Le[t]){if(!(Dt(e)&&(De.tagNameCheck instanceof RegExp&&S(De.tagNameCheck,e)||De.tagNameCheck instanceof Function&&De.tagNameCheck(e))&&(De.attributeNameCheck instanceof RegExp&&S(De.attributeNameCheck,t)||De.attributeNameCheck instanceof Function&&De.attributeNameCheck(t))||"is"===t&&De.allowCustomizedBuiltInElements&&(De.tagNameCheck instanceof RegExp&&S(De.tagNameCheck,n)||De.tagNameCheck instanceof Function&&De.tagNameCheck(n))))return!1}else if(Je[t]);else if(S(be,y(n,_e,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==E(n,"data:")||!Ve[e]){if(Me&&!S(Ae,y(n,_e,"")));else if(n)return!1}else;return!0},Dt=function(e){return"annotation-xml"!==e&&T(e,Se)},vt=function(e){Rt(de.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||bt(e))return;const n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:we,forceKeepAttr:void 0};let r=t.length;for(;r--;){const i=t[r],{name:a,namespaceURI:l,value:c}=i,s=pt(a);let m="value"===a?c:A(c);if(n.attrName=s,n.attrValue=m,n.keepAttr=!0,n.forceKeepAttr=void 0,Rt(de.uponSanitizeAttribute,e,n),m=n.attrValue,!Ye||"id"!==s&&"name"!==s||(At(a,e),m="user-content-"+m),Ue&&S(/((--!?|])>)|<\/(style|title)/i,m)){At(a,e);continue}if(n.forceKeepAttr)continue;if(At(a,e),!n.keepAttr)continue;if(!ke&&S(/\/>/i,m)){At(a,e);continue}Ie&&u([he,ge,Te],(e=>{m=y(m,e," ")}));const f=pt(e.nodeName);if(Ot(f,s,m)){if(le&&"object"==typeof j&&"function"==typeof j.getAttributeType)if(l);else switch(j.getAttributeType(f,s)){case"TrustedHTML":m=le.createHTML(m);break;case"TrustedScriptURL":m=le.createScriptURL(m)}try{l?e.setAttributeNS(l,a,m):e.setAttribute(a,m),bt(e)?Et(e):p(o.removed)}catch(e){}}}Rt(de.afterSanitizeAttributes,e,null)},Lt=function e(t){let n=null;const o=St(t);for(Rt(de.beforeSanitizeShadowDOM,t,null);n=o.nextNode();)Rt(de.uponSanitizeShadowNode,n,null),wt(n),vt(n),n.content instanceof s&&e(n.content);Rt(de.afterSanitizeShadowDOM,t,null)};return o.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null,r=null,i=null,l=null;if(rt=!e,rt&&(e="\x3c!--\x3e"),"string"!=typeof e&&!Nt(e)){if("function"!=typeof e.toString)throw b("toString is not a function");if("string"!=typeof(e=e.toString()))throw b("dirty is not a string, aborting")}if(!o.isSupported)return e;if(Pe||gt(t),o.removed=[],"string"==typeof e&&(Xe=!1),Xe){if(e.nodeName){const t=pt(e.nodeName);if(!Ne[t]||ve[t])throw b("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof R)n=_t("\x3c!----\x3e"),r=n.ownerDocument.importNode(e,!0),r.nodeType===J&&"BODY"===r.nodeName||"HTML"===r.nodeName?n=r:n.appendChild(r);else{if(!Fe&&!Ie&&!ze&&-1===e.indexOf("<"))return le&&We?le.createHTML(e):e;if(n=_t(e),!n)return Fe?null:We?ce:""}n&&He&&Et(n.firstChild);const c=St(Xe?e:n);for(;i=c.nextNode();)wt(i),vt(i),i.content instanceof s&&Lt(i.content);if(Xe)return e;if(Fe){if(Be)for(l=me.call(n.ownerDocument);n.firstChild;)l.appendChild(n.firstChild);else l=n;return(we.shadowroot||we.shadowrootmode)&&(l=fe.call(a,l,!0)),l}let m=ze?n.outerHTML:n.innerHTML;return ze&&Ne["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&S(K,n.ownerDocument.doctype.name)&&(m="<!DOCTYPE "+n.ownerDocument.doctype.name+">\n"+m),Ie&&u([he,ge,Te],(e=>{m=y(m,e," ")})),le&&We?le.createHTML(m):m},o.setConfig=function(){gt(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Pe=!0},o.clearConfig=function(){ft=null,Pe=!1},o.isValidAttribute=function(e,t,n){ft||gt({});const o=pt(e),r=pt(t);return Ot(o,r,n)},o.addHook=function(e,t){"function"==typeof t&&f(de[e],t)},o.removeHook=function(e,t){if(void 0!==t){const n=m(de[e],t);return-1===n?void 0:d(de[e],n,1)[0]}return p(de[e])},o.removeHooks=function(e){de[e]=[]},o.removeAllHooks=function(){de={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},o}();return re}));
3
3
  //# sourceMappingURL=purify.min.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coveo/quantic",
3
- "version": "3.14.0",
3
+ "version": "3.14.1",
4
4
  "description": "A Salesforce Lightning Web Component (LWC) library for building modern UIs interfacing with the Coveo platform",
5
5
  "author": "coveo.com",
6
6
  "homepage": "https://coveo.com",
@@ -51,8 +51,8 @@
51
51
  },
52
52
  "dependencies": {
53
53
  "@coveo/bueno": "1.0.7",
54
- "@coveo/headless": "3.15.0",
55
- "dompurify": "3.2.3",
54
+ "@coveo/headless": "3.15.1",
55
+ "dompurify": "3.2.4",
56
56
  "fs-extra": "11.3.0",
57
57
  "marked": "12.0.2"
58
58
  },
@@ -63,14 +63,14 @@
63
63
  "@babel/cli": "7.26.4",
64
64
  "@babel/plugin-transform-async-to-generator": "7.25.9",
65
65
  "@ckeditor/jsdoc-plugins": "43.0.1",
66
- "@coveo/relay-event-types": "13.1.0",
66
+ "@coveo/relay-event-types": "13.1.3",
67
67
  "@coveo/release": "1.0.0",
68
- "@octokit/graphql": "8.1.2",
68
+ "@octokit/graphql": "8.2.0",
69
69
  "@octokit/graphql-schema": "15.25.0",
70
- "@playwright/test": "1.50.0",
70
+ "@playwright/test": "1.50.1",
71
71
  "@salesforce/eslint-config-lwc": "3.7.1",
72
72
  "@salesforce/sfdx-lwc-jest": "5.1.0",
73
- "@types/node": "22.12.0",
73
+ "@types/node": "22.13.1",
74
74
  "@types/strip-color": "0.1.2",
75
75
  "@types/wait-on": "5.3.4",
76
76
  "chalk": "4.1.2",
@@ -85,7 +85,7 @@
85
85
  "jsdoc-tsimport-plugin": "1.0.5",
86
86
  "mkdirp": "3.0.1",
87
87
  "ncp": "2.0.0",
88
- "prettier-plugin-apex": "2.2.2",
88
+ "prettier-plugin-apex": "2.2.3",
89
89
  "strip-color": "0.1.0",
90
90
  "ts-node": "10.9.2",
91
91
  "wait-on": "8.0.2",