@coveo/quantic 3.15.0 → 3.15.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/force-app/main/default/staticresources/coveoheadless/case-assist/headless.js +6 -6
- package/force-app/main/default/staticresources/coveoheadless/definitions/api/commerce/commerce-api-client.d.ts +2 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/api/commerce/common/request.d.ts +4 -3
- package/force-app/main/default/staticresources/coveoheadless/definitions/api/commerce/recommendations/recommendations-request.d.ts +2 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/api/commerce/search/query-suggest/query-suggest-request.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/api/commerce/search/request.d.ts +2 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/api/service/case-assist/get-document-suggestions/get-document-suggestions-request.d.ts +17 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/app/navigatorContextProvider.d.ts +6 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/analytics/search-action-cause.d.ts +4 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/commerce/common/base-commerce-api-request-builder.d.ts +5 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/commerce/common/filterable-commerce-api-request-builder.d.ts +6 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/commerce/common/paginated-commerce-api-request-builder.d.ts +6 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/commerce/facets/facet-search-set/commerce-facet-search-state.d.ts +2 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/commerce/product-listing/product-listing-actions-loader.d.ts +1 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/commerce/product-listing/product-listing-actions.d.ts +7 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/commerce/query-suggest/query-suggest-actions.d.ts +0 -3
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/commerce/query-suggest/query-suggest-request-builder.d.ts +4 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/commerce/recommendations/recommendations-actions.d.ts +2 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/commerce/search/search-actions-thunk-processor.d.ts +6 -6
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/commerce/standalone-search-box-set/plan-request-builder.d.ts +8 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/commerce/standalone-search-box-set/standalone-search-box-set-actions-loader.d.ts +3 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/commerce/standalone-search-box-set/standalone-search-box-set-actions.d.ts +2 -6
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/document-suggestion/document-suggestion-actions.d.ts +2 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/test/mock-commerce-api-request.d.ts +4 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/test/mock-product-listing.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/headless.js +8 -8
- package/force-app/main/default/staticresources/coveoheadless/insight/headless.js +7 -7
- package/force-app/main/default/staticresources/coveoheadless/recommendation/headless.js +6 -6
- package/package.json +3 -3
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/commerce/field-suggestions/headless-field-suggestions-generator.ssr.d.ts +0 -16
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/commerce/field-suggestions/headless-field-suggestions.d.ts +0 -72
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/commerce/common/actions.d.ts +0 -13
|
@@ -14,21 +14,21 @@ function asyncGeneratorStep(n,t,e,r,o,a,c){try{var i=n[a](c),u=i.value}catch(n){
|
|
|
14
14
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
15
|
* See the License for the specific language governing permissions and
|
|
16
16
|
* limitations under the License.
|
|
17
|
-
*/(function(g,f){if(typeof exports=="object"&&typeof module<"u"){module.exports=f(require)}else if("function"==typeof define&&define.amd){define("CoveoHeadlessRecommendation",["crypto"],function(_d_0){var d={"crypto":_d_0},r=function(m){if(m in d)return d[m];if(typeof require=="function")return require(m);throw new Error("Cannot find module '"+m+"'")};return f(r)})}else{var gN={"crypto":"crypto"},gReq=function(r){var mod=r in gN?g[gN[r]]:g[r];return mod};g["CoveoHeadlessRecommendation"]=f(gReq)}})(typeof globalThis<"u"?globalThis:typeof self<"u"?self:this,function(require){var exports={};var __exports=exports;var module={exports};"use strict";var
|
|
18
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var i,a=!0,m=!1;return{s:function(){r=r.call(e)},n:function(){var f=r.next();return a=f.done,f},e:function(f){m=!0,i=f},f:function(){try{a||r.return==null||r.return()}finally{if(m)throw i}}}}function wi(){return wi=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=rf(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(arguments.length<3?e:r):o.value}},wi.apply(null,arguments)}function Xt(e){return Xt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Xt(e)}function ef(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&xi(e,t)}function qs(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(qs=function(){return!!e})()}function tf(e,t){if(t&&(typeof t=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Xp(e)}function xi(e,t){return xi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},xi(e,t)}function rf(e,t){for(;!{}.hasOwnProperty.call(e,t)&&(e=Xt(e))!==null;);return e}function nf(e,t,r,n){var o=wi(Xt(1&n?e.prototype:e),t,r);return 2&n&&typeof o=="function"?function(i){return o.apply(r,i)}:o}function of(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function af(e){var t=of(e,"string");return typeof t=="symbol"?t:t+""}function sf(e,t){if(e){if(typeof e=="string")return ks(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ks(e,t):void 0}}(function(e){return{NativeAbortSignal:e.AbortSignal,NativeAbortController:e.AbortController}})(typeof self<"u"?self:global);function cf(e){var t;try{t=new Event("abort")}catch{typeof document<"u"?document.createEvent?(t=document.createEvent("Event"),t.initEvent("abort",!1,!1)):(t=document.createEventObject(),t.type="abort"):t={type:"abort",bubbles:!1,cancelable:!1}}return t.reason=e,t}function uf(e){if(e===void 0)if(typeof document>"u")e=new Error("This operation was aborted"),e.name="AbortError";else try{e=new DOMException("signal is aborted without reason"),Object.defineProperty(e,"name",{value:"AbortError"})}catch{e=new Error("This operation was aborted"),e.name="AbortError"}return e}var Ms=function(){function e(){Ri(this,e),Object.defineProperty(this,"listeners",{value:{},writable:!0,configurable:!0})}return Ei(e,[{key:"addEventListener",value:function(r,n,o){r in this.listeners||(this.listeners[r]=[]),this.listeners[r].push({callback:n,options:o})}},{key:"removeEventListener",value:function(r,n){if(r in this.listeners){for(var o=this.listeners[r],i=0,a=o.length;i<a;i++)if(o[i].callback===n){o.splice(i,1);return}}}},{key:"dispatchEvent",value:function(r){var n=this;if(r.type in this.listeners){for(var o=this.listeners[r.type],i=o.slice(),a=function(){var h=i[m];try{h.callback.call(n,r)}catch(S){Promise.resolve().then(function(){throw S})}h.options&&h.options.once&&n.removeEventListener(r.type,h.callback)},m=0,f=i.length;m<f;m++)a();return!r.defaultPrevented}}}])}(),Ii=function(e){function t(){var r;return Ri(this,t),r=Zp(this,t),r.listeners||Ms.call(r),Object.defineProperty(r,"aborted",{value:!1,writable:!0,configurable:!0}),Object.defineProperty(r,"onabort",{value:null,writable:!0,configurable:!0}),Object.defineProperty(r,"reason",{value:void 0,writable:!0,configurable:!0}),r}return ef(t,e),Ei(t,[{key:"toString",value:function(){return"[object AbortSignal]"}},{key:"dispatchEvent",value:function(n){n.type==="abort"&&(this.aborted=!0,typeof this.onabort=="function"&&this.onabort.call(this,n)),nf(t,"dispatchEvent",this,3)([n])}},{key:"throwIfAborted",value:function(){var n=this.aborted,o=this.reason,i=o===void 0?"Aborted":o;if(n)throw i}}],[{key:"timeout",value:function(n){var o=new Fn;return setTimeout(function(){return o.abort(new DOMException("This signal is timeout in ".concat(n,"ms"),"TimeoutError"))},n),o.signal}},{key:"any",value:function(n){var o=new Fn;function i(){o.abort(this.reason),a()}function a(){var h=Ds(n),S;try{for(h.s();!(S=h.n()).done;){var y=S.value;y.removeEventListener("abort",i)}}catch(g){h.e(g)}finally{h.f()}}var m=Ds(n),f;try{for(m.s();!(f=m.n()).done;){var s=f.value;if(s.aborted){o.abort(s.reason);break}else s.addEventListener("abort",i)}}catch(h){m.e(h)}finally{m.f()}return o.signal}}])}(Ms),Fn=function(){function e(){Ri(this,e),Object.defineProperty(this,"signal",{value:new Ii,writable:!0,configurable:!0})}return Ei(e,[{key:"abort",value:function(r){var n=uf(r),o=cf(n);this.signal.reason=n,this.signal.dispatchEvent(o)}},{key:"toString",value:function(){return"[object AbortController]"}}])}();typeof Symbol<"u"&&Symbol.toStringTag&&(Fn.prototype[Symbol.toStringTag]="AbortController",Ii.prototype[Symbol.toStringTag]="AbortSignal");function lf(e){return e.__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL?(console.log("__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL=true is set, will force install polyfill"),!0):typeof e.Request=="function"&&!e.Request.prototype.hasOwnProperty("signal")||!e.AbortController}function df(e){typeof e=="function"&&(e={fetch:e});var t=e,r=t.fetch,n=t.Request,o=n===void 0?r.Request:n,i=t.AbortController,a=t.__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL,m=a===void 0?!1:a;if(!lf({fetch:r,Request:o,AbortController:i,__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL:m}))return{fetch:r,Request:f};var f=o;(f&&!f.prototype.hasOwnProperty("signal")||m)&&(f=function(y,g){var v;g&&g.signal&&(v=g.signal,delete g.signal);var C=new o(y,g);return v&&Object.defineProperty(C,"signal",{writable:!1,enumerable:!1,configurable:!0,value:v}),C},f.prototype=o.prototype);var s=r,h=function(y,g){var v=f&&f.prototype.isPrototypeOf(y)?y.signal:g?g.signal:void 0;if(v){var C;try{C=new DOMException("Aborted","AbortError")}catch{C=new Error("Aborted"),C.name="AbortError"}if(v.aborted)return Promise.reject(C);var E=new Promise(function(I,b){v.addEventListener("abort",function(){return b(C)},{once:!0})});return g&&g.signal&&delete g.signal,Promise.race([E,s(y,g)])}return s(y,g)};return{fetch:h,Request:f}}Ur.AbortController=Fn;Ur.AbortSignal=Ii;Ur.abortableFetch=df});var Ns,c,w,d=jr(()=>{"use strict";Ns=Ne(Pi(),1),c=Ne(Pi(),1),{fetch:w}=(0,Ns.abortableFetch)({fetch})});function Br(e){if(bf.test(e)||e.trim()==="")throw new TypeError("Invalid character in header field name");return e.trim().toLowerCase()}function Ti(e){return e.replace(Af,"")}function Qr(e){if(typeof e!="string"||e.length===0)return!1;for(let t=0;t<e.length;t++){let r=e.charCodeAt(t);if(r>127||!wf(r))return!1}return!0}function wf(e){return![127,32,"(",")","<",">","@",",",";",":","\\","\"","/","[","]","?","=","{","}"].includes(e)}function Vs(e){if(typeof e!="string"||e.trim()!==e)return!1;for(let t=0;t<e.length;t++){let r=e.charCodeAt(t);if(r===0||r===10||r===13)return!1}return!0}var pf,Qs,ff,$s,mf,gf,hf,yf,Sf,vf,Cf,bf,_s,Af,Zt,Fi,Ls,js,Us,Bs,x,zs=jr(()=>{"use strict";p();u();d();l();pf=Object.create,Qs=Object.defineProperty,ff=Object.getOwnPropertyDescriptor,$s=Object.getOwnPropertyNames,mf=Object.getPrototypeOf,gf=Object.prototype.hasOwnProperty,hf=(e,t)=>function(){return t||(0,e[$s(e)[0]])((t={exports:{}}).exports,t),t.exports},yf=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of $s(t))!gf.call(e,o)&&o!==r&&Qs(e,o,{get:()=>t[o],enumerable:!(n=ff(t,o))||n.enumerable});return e},Sf=(e,t,r)=>(r=e!=null?pf(mf(e)):{},yf(t||!e||!e.__esModule?Qs(r,"default",{value:e,enumerable:!0}):r,e)),vf=hf({"node_modules/set-cookie-parser/lib/set-cookie.js"(e,t){"use strict";var r={decodeValues:!0,map:!1,silent:!1};function n(f){return typeof f=="string"&&!!f.trim()}function o(f,s){var h=f.split(";").filter(n),S=h.shift(),y=i(S),g=y.name,v=y.value;s=s?Object.assign({},r,s):r;try{v=s.decodeValues?decodeURIComponent(v):v}catch(E){console.error("set-cookie-parser encountered an error while decoding a cookie with value '"+v+"'. Set options.decodeValues to false to disable this feature.",E)}var C={name:g,value:v};return h.forEach(function(E){var I=E.split("="),b=I.shift().trimLeft().toLowerCase(),R=I.join("=");b==="expires"?C.expires=new Date(R):b==="max-age"?C.maxAge=parseInt(R,10):b==="secure"?C.secure=!0:b==="httponly"?C.httpOnly=!0:b==="samesite"?C.sameSite=R:C[b]=R}),C}function i(f){var s="",h="",S=f.split("=");return S.length>1?(s=S.shift(),h=S.join("=")):h=f,{name:s,value:h}}function a(f,s){if(s=s?Object.assign({},r,s):r,!f)return s.map?{}:[];if(f.headers)if(typeof f.headers.getSetCookie=="function")f=f.headers.getSetCookie();else if(f.headers["set-cookie"])f=f.headers["set-cookie"];else{var h=f.headers[Object.keys(f.headers).find(function(y){return y.toLowerCase()==="set-cookie"})];!h&&f.headers.cookie&&!s.silent&&console.warn("Warning: set-cookie-parser appears to have been called on a request object. It is designed to parse Set-Cookie headers from responses, not Cookie headers from requests. Set the option {silent: true} to suppress this warning."),f=h}if(Array.isArray(f)||(f=[f]),s=s?Object.assign({},r,s):r,s.map){var S={};return f.filter(n).reduce(function(y,g){var v=o(g,s);return y[v.name]=v,y},S)}else return f.filter(n).map(function(y){return o(y,s)})}function m(f){if(Array.isArray(f))return f;if(typeof f!="string")return[];var s=[],h=0,S,y,g,v,C;function E(){for(;h<f.length&&/\s/.test(f.charAt(h));)h+=1;return h<f.length}function I(){return y=f.charAt(h),y!=="="&&y!==";"&&y!==","}for(;h<f.length;){for(S=h,C=!1;E();)if(y=f.charAt(h),y===","){for(g=h,h+=1,E(),v=h;h<f.length&&I();)h+=1;h<f.length&&f.charAt(h)==="="?(C=!0,h=v,s.push(f.substring(S,g)),S=h):h=g+1}else h+=1;(!C||h>=f.length)&&s.push(f.substring(S,f.length))}return s}t.exports=a,t.exports.parse=a,t.exports.parseString=o,t.exports.splitCookiesString=m}}),Cf=Sf(vf()),bf=/[^a-z0-9\-#$%&'*+.^_`|~]/i;_s=[`
|
|
19
|
-
`,"\r","\t"," "],Af=new RegExp(`(^[${_s.join("")}]|$[${_s.join("")}])`,"g");Zt=Symbol("normalizedHeaders"),Fi=Symbol("rawHeaderNames"),Ls=", ",x=class Hs{constructor(t){this[js]={},this[Us]=new Map,this[Bs]="Headers",["Headers","HeadersPolyfill"].includes(t?.constructor.name)||t instanceof Hs||typeof A.Headers<"u"&&t instanceof A.Headers?t.forEach((n,o)=>{this.append(o,n)},this):Array.isArray(t)?t.forEach(([r,n])=>{this.append(r,Array.isArray(n)?n.join(Ls):n)}):t&&Object.getOwnPropertyNames(t).forEach(r=>{let n=t[r];this.append(r,Array.isArray(n)?n.join(Ls):n)})}[(js=Zt,Us=Fi,Bs=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}*keys(){for(let[t]of this.entries())yield t}*values(){for(let[,t]of this.entries())yield t}*entries(){let t=Object.keys(this[Zt]).sort((r,n)=>r.localeCompare(n));for(let r of t)if(r==="set-cookie")for(let n of this.getSetCookie())yield[r,n];else yield[r,this.get(r)]}has(t){if(!Qr(t))throw new TypeError(`Invalid header name "${t}"`);return this[Zt].hasOwnProperty(Br(t))}get(t){if(!Qr(t))throw TypeError(`Invalid header name "${t}"`);return this[Zt][Br(t)]??null}set(t,r){if(!Qr(t)||!Vs(r))return;let n=Br(t),o=Ti(r);this[Zt][n]=Ti(o),this[Fi].set(n,t)}append(t,r){if(!Qr(t)||!Vs(r))return;let n=Br(t),o=Ti(r),i=this.has(n)?`${this.get(n)}, ${o}`:o;this.set(t,i)}delete(t){if(!Qr(t)||!this.has(t))return;let r=Br(t);delete this[Zt][r],this[Fi].delete(r)}forEach(t,r){for(let[n,o]of this.entries())t.call(r,o,n,this)}getSetCookie(){let t=this.get("set-cookie");return t===null?[]:t===""?[""]:(0,Cf.splitCookiesString)(t)}}});var p=jr(()=>{"use strict";zs()});var oc=fe(zr=>{"use strict";p();u();d();l();var qn=zr&&zr.__assign||function(){return qn=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},qn.apply(this,arguments)};Object.defineProperty(zr,"__esModule",{value:!0});var _f={delayFirstAttempt:!1,jitter:"none",maxDelay:1/0,numOfAttempts:10,retry:function(){return!0},startingDelay:100,timeMultiple:2};function Vf(e){var t=qn(qn({},_f),e);return t.numOfAttempts<1&&(t.numOfAttempts=1),t}zr.getSanitizedOptions=Vf});var ic=fe(Mi=>{"use strict";p();u();d();l();Object.defineProperty(Mi,"__esModule",{value:!0});function Lf(e){var t=Math.random()*e;return Math.round(t)}Mi.fullJitter=Lf});var ac=fe(qi=>{"use strict";p();u();d();l();Object.defineProperty(qi,"__esModule",{value:!0});function jf(e){return e}qi.noJitter=jf});var sc=fe(Ni=>{"use strict";p();u();d();l();Object.defineProperty(Ni,"__esModule",{value:!0});var Uf=ic(),Bf=ac();function Qf(e){switch(e.jitter){case"full":return Uf.fullJitter;case"none":default:return Bf.noJitter}}Ni.JitterFactory=Qf});var Vi=fe(_i=>{"use strict";p();u();d();l();Object.defineProperty(_i,"__esModule",{value:!0});var $f=sc(),Hf=function(){function e(t){this.options=t,this.attempt=0}return e.prototype.apply=function(){var t=this;return new Promise(function(r){return setTimeout(r,t.jitteredDelay)})},e.prototype.setAttemptNumber=function(t){this.attempt=t},Object.defineProperty(e.prototype,"jitteredDelay",{get:function(){var t=$f.JitterFactory(this.options);return t(this.delay)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"delay",{get:function(){var t=this.options.startingDelay,r=this.options.timeMultiple,n=this.numOfDelayedAttempts,o=t*Math.pow(r,n);return Math.min(o,this.options.maxDelay)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"numOfDelayedAttempts",{get:function(){return this.attempt},enumerable:!0,configurable:!0}),e}();_i.Delay=Hf});var cc=fe(et=>{"use strict";p();u();d();l();var zf=et&&et.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)o.hasOwnProperty(i)&&(n[i]=o[i])},e(t,r)};return function(t,r){e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Wf=et&&et.__awaiter||function(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(h){try{s(n.next(h))}catch(S){a(S)}}function f(h){try{s(n.throw(h))}catch(S){a(S)}}function s(h){h.done?i(h.value):o(h.value).then(m,f)}s((n=n.apply(e,t||[])).next())})},Gf=et&&et.__generator||function(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,o,i,a;return a={next:m(0),throw:m(1),return:m(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function m(s){return function(h){return f([s,h])}}function f(s){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,o&&(i=s[0]&2?o.return:s[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,s[1])).done)return i;switch(o=0,i&&(s=[s[0]&2,i.value]),s[0]){case 0:case 1:i=s;break;case 4:return r.label++,{value:s[1],done:!1};case 5:r.label++,o=s[1],s=[0];continue;case 7:s=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){r.label=s[1];break}if(s[0]===6&&r.label<i[1]){r.label=i[1],i=s;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(s);break}i[2]&&r.ops.pop(),r.trys.pop();continue}s=t.call(e,r)}catch(h){s=[6,h],o=0}finally{n=i=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}};Object.defineProperty(et,"__esModule",{value:!0});var Kf=Vi(),Yf=function(e){zf(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.apply=function(){return Wf(this,void 0,void 0,function(){return Gf(this,function(r){return[2,this.isFirstAttempt?!0:e.prototype.apply.call(this)]})})},Object.defineProperty(t.prototype,"isFirstAttempt",{get:function(){return this.attempt===0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"numOfDelayedAttempts",{get:function(){return this.attempt-1},enumerable:!0,configurable:!0}),t}(Kf.Delay);et.SkipFirstDelay=Yf});var uc=fe(Wr=>{"use strict";p();u();d();l();var Jf=Wr&&Wr.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)o.hasOwnProperty(i)&&(n[i]=o[i])},e(t,r)};return function(t,r){e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(Wr,"__esModule",{value:!0});var Xf=Vi(),Zf=function(e){Jf(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(Xf.Delay);Wr.AlwaysDelay=Zf});var lc=fe(Li=>{"use strict";p();u();d();l();Object.defineProperty(Li,"__esModule",{value:!0});var em=cc(),tm=uc();function rm(e,t){var r=nm(e);return r.setAttemptNumber(t),r}Li.DelayFactory=rm;function nm(e){return e.delayFirstAttempt?new tm.AlwaysDelay(e):new em.SkipFirstDelay(e)}});var dc=fe(Vt=>{"use strict";p();u();d();l();var ji=Vt&&Vt.__awaiter||function(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(h){try{s(n.next(h))}catch(S){a(S)}}function f(h){try{s(n.throw(h))}catch(S){a(S)}}function s(h){h.done?i(h.value):o(h.value).then(m,f)}s((n=n.apply(e,t||[])).next())})},Ui=Vt&&Vt.__generator||function(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,o,i,a;return a={next:m(0),throw:m(1),return:m(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function m(s){return function(h){return f([s,h])}}function f(s){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,o&&(i=s[0]&2?o.return:s[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,s[1])).done)return i;switch(o=0,i&&(s=[s[0]&2,i.value]),s[0]){case 0:case 1:i=s;break;case 4:return r.label++,{value:s[1],done:!1};case 5:r.label++,o=s[1],s=[0];continue;case 7:s=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){r.label=s[1];break}if(s[0]===6&&r.label<i[1]){r.label=i[1],i=s;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(s);break}i[2]&&r.ops.pop(),r.trys.pop();continue}s=t.call(e,r)}catch(h){s=[6,h],o=0}finally{n=i=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}};Object.defineProperty(Vt,"__esModule",{value:!0});var om=oc(),im=lc();function am(e,t){return t===void 0&&(t={}),ji(this,void 0,void 0,function(){var r,n;return Ui(this,function(o){switch(o.label){case 0:return r=om.getSanitizedOptions(t),n=new sm(e,r),[4,n.execute()];case 1:return[2,o.sent()]}})})}Vt.backOff=am;var sm=function(){function e(t,r){this.request=t,this.options=r,this.attemptNumber=0}return e.prototype.execute=function(){return ji(this,void 0,void 0,function(){var t,r;return Ui(this,function(n){switch(n.label){case 0:if(this.attemptLimitReached)return[3,7];n.label=1;case 1:return n.trys.push([1,4,,6]),[4,this.applyDelay()];case 2:return n.sent(),[4,this.request()];case 3:return[2,n.sent()];case 4:return t=n.sent(),this.attemptNumber++,[4,this.options.retry(t,this.attemptNumber)];case 5:if(r=n.sent(),!r||this.attemptLimitReached)throw t;return[3,6];case 6:return[3,0];case 7:throw new Error("Something went wrong.")}})})},Object.defineProperty(e.prototype,"attemptLimitReached",{get:function(){return this.attemptNumber>=this.options.numOfAttempts},enumerable:!0,configurable:!0}),e.prototype.applyDelay=function(){return ji(this,void 0,void 0,function(){var t;return Ui(this,function(r){switch(r.label){case 0:return t=im.DelayFactory(this.options,this.attemptNumber),[4,t.apply()];case 1:return r.sent(),[2]}})})},e}()});var ko=fe((Va,La)=>{"use strict";p();u();d();l();(function(e,t){typeof Va=="object"&&typeof La<"u"?La.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof A<"u"?A:e||self).dayjs=t()})(Va,function(){"use strict";var e=1e3,t=6e4,r=36e5,n="millisecond",o="second",i="minute",a="hour",m="day",f="week",s="month",h="quarter",S="year",y="date",g="Invalid Date",v=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,C=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,E={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(j){var L=["th","st","nd","rd"],q=j%100;return"["+j+(L[(q-20)%10]||L[q]||L[0])+"]"}},I=function(j,L,q){var $=String(j);return!$||$.length>=L?j:""+Array(L+1-$.length).join(q)+j},b={s:I,z:function(j){var L=-j.utcOffset(),q=Math.abs(L),$=Math.floor(q/60),Q=q%60;return(L<=0?"+":"-")+I($,2,"0")+":"+I(Q,2,"0")},m:function j(L,q){if(L.date()<q.date())return-j(q,L);var $=12*(q.year()-L.year())+(q.month()-L.month()),Q=L.clone().add($,s),W=q-Q<0,z=L.clone().add($+(W?-1:1),s);return+(-($+(q-Q)/(W?Q-z:z-Q))||0)},a:function(j){return j<0?Math.ceil(j)||0:Math.floor(j)},p:function(j){return{M:s,y:S,w:f,d:m,D:y,h:a,m:i,s:o,ms:n,Q:h}[j]||String(j||"").toLowerCase().replace(/s$/,"")},u:function(j){return j===void 0}},R="en",T={};T[R]=E;var _="$isDayjsObject",F=function(j){return j instanceof V||!(!j||!j[_])},P=function j(L,q,$){var Q;if(!L)return R;if(typeof L=="string"){var W=L.toLowerCase();T[W]&&(Q=W),q&&(T[W]=q,Q=W);var z=L.split("-");if(!Q&&z.length>1)return j(z[0])}else{var X=L.name;T[X]=L,Q=X}return!$&&Q&&(R=Q),Q||!$&&R},N=function(j,L){if(F(j))return j.clone();var q=typeof L=="object"?L:{};return q.date=j,q.args=arguments,new V(q)},M=b;M.l=P,M.i=F,M.w=function(j,L){return N(j,{locale:L.$L,utc:L.$u,x:L.$x,$offset:L.$offset})};var V=function(){function j(q){this.$L=P(q.locale,null,!0),this.parse(q),this.$x=this.$x||q.x||{},this[_]=!0}var L=j.prototype;return L.parse=function(q){this.$d=function($){var Q=$.date,W=$.utc;if(Q===null)return new Date(NaN);if(M.u(Q))return new Date;if(Q instanceof Date)return new Date(Q);if(typeof Q=="string"&&!/Z$/i.test(Q)){var z=Q.match(v);if(z){var X=z[2]-1||0,re=(z[7]||"0").substring(0,3);return W?new Date(Date.UTC(z[1],X,z[3]||1,z[4]||0,z[5]||0,z[6]||0,re)):new Date(z[1],X,z[3]||1,z[4]||0,z[5]||0,z[6]||0,re)}}return new Date(Q)}(q),this.init()},L.init=function(){var q=this.$d;this.$y=q.getFullYear(),this.$M=q.getMonth(),this.$D=q.getDate(),this.$W=q.getDay(),this.$H=q.getHours(),this.$m=q.getMinutes(),this.$s=q.getSeconds(),this.$ms=q.getMilliseconds()},L.$utils=function(){return M},L.isValid=function(){return this.$d.toString()!==g},L.isSame=function(q,$){var Q=N(q);return this.startOf($)<=Q&&Q<=this.endOf($)},L.isAfter=function(q,$){return N(q)<this.startOf($)},L.isBefore=function(q,$){return this.endOf($)<N(q)},L.$g=function(q,$,Q){return M.u(q)?this[$]:this.set(Q,q)},L.unix=function(){return Math.floor(this.valueOf()/1e3)},L.valueOf=function(){return this.$d.getTime()},L.startOf=function(q,$){var Q=this,W=!!M.u($)||$,z=M.p(q),X=function(Qe,he){var qe=M.w(Q.$u?Date.UTC(Q.$y,he,Qe):new Date(Q.$y,he,Qe),Q);return W?qe:qe.endOf(m)},re=function(Qe,he){return M.w(Q.toDate()[Qe].apply(Q.toDate("s"),(W?[0,0,0,0]:[23,59,59,999]).slice(he)),Q)},ne=this.$W,ae=this.$M,se=this.$D,le="set"+(this.$u?"UTC":"");switch(z){case S:return W?X(1,0):X(31,11);case s:return W?X(1,ae):X(0,ae+1);case f:var ge=this.$locale().weekStart||0,_t=(ne<ge?ne+7:ne)-ge;return X(W?se-_t:se+(6-_t),ae);case m:case y:return re(le+"Hours",0);case a:return re(le+"Minutes",1);case i:return re(le+"Seconds",2);case o:return re(le+"Milliseconds",3);default:return this.clone()}},L.endOf=function(q){return this.startOf(q,!1)},L.$set=function(q,$){var Q,W=M.p(q),z="set"+(this.$u?"UTC":""),X=(Q={},Q[m]=z+"Date",Q[y]=z+"Date",Q[s]=z+"Month",Q[S]=z+"FullYear",Q[a]=z+"Hours",Q[i]=z+"Minutes",Q[o]=z+"Seconds",Q[n]=z+"Milliseconds",Q)[W],re=W===m?this.$D+($-this.$W):$;if(W===s||W===S){var ne=this.clone().set(y,1);ne.$d[X](re),ne.init(),this.$d=ne.set(y,Math.min(this.$D,ne.daysInMonth())).$d}else X&&this.$d[X](re);return this.init(),this},L.set=function(q,$){return this.clone().$set(q,$)},L.get=function(q){return this[M.p(q)]()},L.add=function(q,$){var Q,W=this;q=Number(q);var z=M.p($),X=function(ae){var se=N(W);return M.w(se.date(se.date()+Math.round(ae*q)),W)};if(z===s)return this.set(s,this.$M+q);if(z===S)return this.set(S,this.$y+q);if(z===m)return X(1);if(z===f)return X(7);var re=(Q={},Q[i]=t,Q[a]=r,Q[o]=e,Q)[z]||1,ne=this.$d.getTime()+q*re;return M.w(ne,this)},L.subtract=function(q,$){return this.add(-1*q,$)},L.format=function(q){var $=this,Q=this.$locale();if(!this.isValid())return Q.invalidDate||g;var W=q||"YYYY-MM-DDTHH:mm:ssZ",z=M.z(this),X=this.$H,re=this.$m,ne=this.$M,ae=Q.weekdays,se=Q.months,le=Q.meridiem,ge=function(he,qe,Ze,ut){return he&&(he[qe]||he($,W))||Ze[qe].slice(0,ut)},_t=function(he){return M.s(X%12||12,he,"0")},Qe=le||function(he,qe,Ze){var ut=he<12?"AM":"PM";return Ze?ut.toLowerCase():ut};return W.replace(C,function(he,qe){return qe||function(Ze){switch(Ze){case"YY":return String($.$y).slice(-2);case"YYYY":return M.s($.$y,4,"0");case"M":return ne+1;case"MM":return M.s(ne+1,2,"0");case"MMM":return ge(Q.monthsShort,ne,se,3);case"MMMM":return ge(se,ne);case"D":return $.$D;case"DD":return M.s($.$D,2,"0");case"d":return String($.$W);case"dd":return ge(Q.weekdaysMin,$.$W,ae,2);case"ddd":return ge(Q.weekdaysShort,$.$W,ae,3);case"dddd":return ae[$.$W];case"H":return String(X);case"HH":return M.s(X,2,"0");case"h":return _t(1);case"hh":return _t(2);case"a":return Qe(X,re,!0);case"A":return Qe(X,re,!1);case"m":return String(re);case"mm":return M.s(re,2,"0");case"s":return String($.$s);case"ss":return M.s($.$s,2,"0");case"SSS":return M.s($.$ms,3,"0");case"Z":return z}return null}(he)||z.replace(":","")})},L.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},L.diff=function(q,$,Q){var W,z=this,X=M.p($),re=N(q),ne=(re.utcOffset()-this.utcOffset())*t,ae=this-re,se=function(){return M.m(z,re)};switch(X){case S:W=se()/12;break;case s:W=se();break;case h:W=se()/3;break;case f:W=(ae-ne)/6048e5;break;case m:W=(ae-ne)/864e5;break;case a:W=ae/r;break;case i:W=ae/t;break;case o:W=ae/e;break;default:W=ae}return Q?W:M.a(W)},L.daysInMonth=function(){return this.endOf(s).$D},L.$locale=function(){return T[this.$L]},L.locale=function(q,$){if(!q)return this.$L;var Q=this.clone(),W=P(q,$,!0);return W&&(Q.$L=W),Q},L.clone=function(){return M.w(this.$d,this)},L.toDate=function(){return new Date(this.valueOf())},L.toJSON=function(){return this.isValid()?this.toISOString():null},L.toISOString=function(){return this.$d.toISOString()},L.toString=function(){return this.$d.toUTCString()},j}(),H=V.prototype;return N.prototype=H,[["$ms",n],["$s",o],["$m",i],["$H",a],["$W",m],["$M",s],["$y",S],["$D",y]].forEach(function(j){H[j[1]]=function(L){return this.$g(L,j[0],j[1])}}),N.extend=function(j,L){return j.$i||(j(L,V,N),j.$i=!0),N},N.locale=P,N.isDayjs=F,N.unix=function(j){return N(1e3*j)},N.en=T[R],N.Ls=T,N.p={},N})});var fl=fe((ja,Ua)=>{"use strict";p();u();d();l();(function(e,t){typeof ja=="object"&&typeof Ua<"u"?Ua.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof A<"u"?A:e||self).dayjs_plugin_quarterOfYear=t()})(ja,function(){"use strict";var e="month",t="quarter";return function(r,n){var o=n.prototype;o.quarter=function(m){return this.$utils().u(m)?Math.ceil((this.month()+1)/3):this.month(this.month()%3+3*(m-1))};var i=o.add;o.add=function(m,f){return m=Number(m),this.$utils().p(f)===t?this.add(3*m,e):i.bind(this)(m,f)};var a=o.startOf;o.startOf=function(m,f){var s=this.$utils(),h=!!s.u(f)||f;if(s.p(m)===t){var S=this.quarter()-1;return h?this.month(3*S).startOf(e).startOf("day"):this.month(3*S+2).endOf(e).endOf("day")}return a.bind(this)(m,f)}}})});var ml=fe((Ba,Qa)=>{"use strict";p();u();d();l();(function(e,t){typeof Ba=="object"&&typeof Qa<"u"?Qa.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof A<"u"?A:e||self).dayjs_plugin_customParseFormat=t()})(Ba,function(){"use strict";var e={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},t=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,r=/\d/,n=/\d\d/,o=/\d\d?/,i=/\d*[^-_:/,()\s\d]+/,a={},m=function(v){return(v=+v)+(v>68?1900:2e3)},f=function(v){return function(C){this[v]=+C}},s=[/[+-]\d\d:?(\d\d)?|Z/,function(v){(this.zone||(this.zone={})).offset=function(C){if(!C||C==="Z")return 0;var E=C.match(/([+-]|\d\d)/g),I=60*E[1]+(+E[2]||0);return I===0?0:E[0]==="+"?-I:I}(v)}],h=function(v){var C=a[v];return C&&(C.indexOf?C:C.s.concat(C.f))},S=function(v,C){var E,I=a.meridiem;if(I){for(var b=1;b<=24;b+=1)if(v.indexOf(I(b,0,C))>-1){E=b>12;break}}else E=v===(C?"pm":"PM");return E},y={A:[i,function(v){this.afternoon=S(v,!1)}],a:[i,function(v){this.afternoon=S(v,!0)}],Q:[r,function(v){this.month=3*(v-1)+1}],S:[r,function(v){this.milliseconds=100*+v}],SS:[n,function(v){this.milliseconds=10*+v}],SSS:[/\d{3}/,function(v){this.milliseconds=+v}],s:[o,f("seconds")],ss:[o,f("seconds")],m:[o,f("minutes")],mm:[o,f("minutes")],H:[o,f("hours")],h:[o,f("hours")],HH:[o,f("hours")],hh:[o,f("hours")],D:[o,f("day")],DD:[n,f("day")],Do:[i,function(v){var C=a.ordinal,E=v.match(/\d+/);if(this.day=E[0],C)for(var I=1;I<=31;I+=1)C(I).replace(/\[|\]/g,"")===v&&(this.day=I)}],w:[o,f("week")],ww:[n,f("week")],M:[o,f("month")],MM:[n,f("month")],MMM:[i,function(v){var C=h("months"),E=(h("monthsShort")||C.map(function(I){return I.slice(0,3)})).indexOf(v)+1;if(E<1)throw new Error;this.month=E%12||E}],MMMM:[i,function(v){var C=h("months").indexOf(v)+1;if(C<1)throw new Error;this.month=C%12||C}],Y:[/[+-]?\d+/,f("year")],YY:[n,function(v){this.year=m(v)}],YYYY:[/\d{4}/,f("year")],Z:s,ZZ:s};function g(v){var C,E;C=v,E=a&&a.formats;for(var I=(v=C.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(N,M,V){var H=V&&V.toUpperCase();return M||E[V]||e[V]||E[H].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(j,L,q){return L||q.slice(1)})})).match(t),b=I.length,R=0;R<b;R+=1){var T=I[R],_=y[T],F=_&&_[0],P=_&&_[1];I[R]=P?{regex:F,parser:P}:T.replace(/^\[|\]$/g,"")}return function(N){for(var M={},V=0,H=0;V<b;V+=1){var j=I[V];if(typeof j=="string")H+=j.length;else{var L=j.regex,q=j.parser,$=N.slice(H),Q=L.exec($)[0];q.call(M,Q),N=N.replace(Q,"")}}return function(W){var z=W.afternoon;if(z!==void 0){var X=W.hours;z?X<12&&(W.hours+=12):X===12&&(W.hours=0),delete W.afternoon}}(M),M}}return function(v,C,E){E.p.customParseFormat=!0,v&&v.parseTwoDigitYear&&(m=v.parseTwoDigitYear);var I=C.prototype,b=I.parse;I.parse=function(R){var T=R.date,_=R.utc,F=R.args;this.$u=_;var P=F[1];if(typeof P=="string"){var N=F[2]===!0,M=F[3]===!0,V=N||M,H=F[2];M&&(H=F[2]),a=this.$locale(),!N&&H&&(a=E.Ls[H]),this.$d=function($,Q,W,z){try{if(["x","X"].indexOf(Q)>-1)return new Date((Q==="X"?1e3:1)*$);var X=g(Q)($),re=X.year,ne=X.month,ae=X.day,se=X.hours,le=X.minutes,ge=X.seconds,_t=X.milliseconds,Qe=X.zone,he=X.week,qe=new Date,Ze=ae||(re||ne?1:qe.getDate()),ut=re||qe.getFullYear(),In=0;re&&!ne||(In=ne>0?ne-1:qe.getMonth());var Pn,vi=se||0,Ci=le||0,bi=ge||0,Ai=_t||0;return Qe?new Date(Date.UTC(ut,In,Ze,vi,Ci,bi,Ai+60*Qe.offset*1e3)):W?new Date(Date.UTC(ut,In,Ze,vi,Ci,bi,Ai)):(Pn=new Date(ut,In,Ze,vi,Ci,bi,Ai),he&&(Pn=z(Pn).week(he).toDate()),Pn)}catch{return new Date("")}}(T,P,_,E),this.init(),H&&H!==!0&&(this.$L=this.locale(H).$L),V&&T!=this.format(P)&&(this.$d=new Date("")),a={}}else if(P instanceof Array)for(var j=P.length,L=1;L<=j;L+=1){F[1]=P[L-1];var q=E.apply(this,F);if(q.isValid()){this.$d=q.$d,this.$L=q.$L,this.init();break}L===j&&(this.$d=new Date(""))}else b.call(this,R)}}})});var ld=fe((zM,ud)=>{"use strict";p();u();d();l();var US=/(^|; )Coveo-Pendragon=([^;]*)/;ud.exports=()=>US.exec(document.cookie)?.pop()||null});var dd=fe((is,as)=>{"use strict";p();u();d();l();(function(e,t){typeof is=="object"&&typeof as<"u"?as.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof A<"u"?A:e||self).dayjs_plugin_timezone=t()})(is,function(){"use strict";var e={year:0,month:1,day:2,hour:3,minute:4,second:5},t={};return function(r,n,o){var i,a=function(h,S,y){y===void 0&&(y={});var g=new Date(h),v=function(C,E){E===void 0&&(E={});var I=E.timeZoneName||"short",b=C+"|"+I,R=t[b];return R||(R=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:C,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:I}),t[b]=R),R}(S,y);return v.formatToParts(g)},m=function(h,S){for(var y=a(h,S),g=[],v=0;v<y.length;v+=1){var C=y[v],E=C.type,I=C.value,b=e[E];b>=0&&(g[b]=parseInt(I,10))}var R=g[3],T=R===24?0:R,_=g[0]+"-"+g[1]+"-"+g[2]+" "+T+":"+g[4]+":"+g[5]+":000",F=+h;return(o.utc(_).valueOf()-(F-=F%1e3))/6e4},f=n.prototype;f.tz=function(h,S){h===void 0&&(h=i);var y,g=this.utcOffset(),v=this.toDate(),C=v.toLocaleString("en-US",{timeZone:h}),E=Math.round((v-new Date(C))/1e3/60),I=15*-Math.round(v.getTimezoneOffset()/15)-E;if(!Number(I))y=this.utcOffset(0,S);else if(y=o(C,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(I,!0),S){var b=y.utcOffset();y=y.add(g-b,"minute")}return y.$x.$timezone=h,y},f.offsetName=function(h){var S=this.$x.$timezone||o.tz.guess(),y=a(this.valueOf(),S,{timeZoneName:h}).find(function(g){return g.type.toLowerCase()==="timezonename"});return y&&y.value};var s=f.startOf;f.startOf=function(h,S){if(!this.$x||!this.$x.$timezone)return s.call(this,h,S);var y=o(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return s.call(y,h,S).tz(this.$x.$timezone,!0)},o.tz=function(h,S,y){var g=y&&S,v=y||S||i,C=m(+o(),v);if(typeof h!="string")return o(h).tz(v);var E=function(T,_,F){var P=T-60*_*1e3,N=m(P,F);if(_===N)return[P,_];var M=m(P-=60*(N-_)*1e3,F);return N===M?[P,N]:[T-60*Math.min(N,M)*1e3,Math.max(N,M)]}(o.utc(h,g).valueOf(),C,v),I=E[0],b=E[1],R=o(I).utcOffset(b);return R.$x.$timezone=v,R},o.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},o.tz.setDefault=function(h){i=h}}})});var pd=fe((ss,cs)=>{"use strict";p();u();d();l();(function(e,t){typeof ss=="object"&&typeof cs<"u"?cs.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof A<"u"?A:e||self).dayjs_plugin_utc=t()})(ss,function(){"use strict";var e="minute",t=/[+-]\d\d(?::?\d\d)?/g,r=/([+-]|\d\d)/g;return function(n,o,i){var a=o.prototype;i.utc=function(g){var v={date:g,utc:!0,args:arguments};return new o(v)},a.utc=function(g){var v=i(this.toDate(),{locale:this.$L,utc:!0});return g?v.add(this.utcOffset(),e):v},a.local=function(){return i(this.toDate(),{locale:this.$L,utc:!1})};var m=a.parse;a.parse=function(g){g.utc&&(this.$u=!0),this.$utils().u(g.$offset)||(this.$offset=g.$offset),m.call(this,g)};var f=a.init;a.init=function(){if(this.$u){var g=this.$d;this.$y=g.getUTCFullYear(),this.$M=g.getUTCMonth(),this.$D=g.getUTCDate(),this.$W=g.getUTCDay(),this.$H=g.getUTCHours(),this.$m=g.getUTCMinutes(),this.$s=g.getUTCSeconds(),this.$ms=g.getUTCMilliseconds()}else f.call(this)};var s=a.utcOffset;a.utcOffset=function(g,v){var C=this.$utils().u;if(C(g))return this.$u?0:C(this.$offset)?s.call(this):this.$offset;if(typeof g=="string"&&(g=function(R){R===void 0&&(R="");var T=R.match(t);if(!T)return null;var _=(""+T[0]).match(r)||["-",0,0],F=_[0],P=60*+_[1]+ +_[2];return P===0?0:F==="+"?P:-P}(g),g===null))return this;var E=Math.abs(g)<=16?60*g:g,I=this;if(v)return I.$offset=E,I.$u=g===0,I;if(g!==0){var b=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(I=this.local().add(E+b,e)).$offset=E,I.$x.$localOffset=b}else I=this.utc();return I};var h=a.format;a.format=function(g){var v=g||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return h.call(this,v)},a.valueOf=function(){var g=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*g},a.isUTC=function(){return!!this.$u},a.toISOString=function(){return this.toDate().toISOString()},a.toString=function(){return this.toDate().toUTCString()};var S=a.toDate;a.toDate=function(g){return g==="s"&&this.$offset?i(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():S.call(this)};var y=a.diff;a.diff=function(g,v,C){if(g&&this.$u===g.$u)return y.call(this,g,v,C);var E=this.local(),I=i(g).local();return y.call(E,I,v,C)}}})});var Ed=fe((s_,Rd)=>{"use strict";p();u();d();l();function XS(e){try{return JSON.stringify(e)}catch{return"\"[Circular]\""}}Rd.exports=ZS;function ZS(e,t,r){var n=r&&r.stringify||XS,o=1;if(typeof e=="object"&&e!==null){var i=t.length+o;if(i===1)return e;var a=new Array(i);a[0]=n(e);for(var m=1;m<i;m++)a[m]=n(t[m]);return a.join(" ")}if(typeof e!="string")return e;var f=t.length;if(f===0)return e;for(var s="",h=1-o,S=-1,y=e&&e.length||0,g=0;g<y;){if(e.charCodeAt(g)===37&&g+1<y){switch(S=S>-1?S:0,e.charCodeAt(g+1)){case 100:case 102:if(h>=f||t[h]==null)break;S<g&&(s+=e.slice(S,g)),s+=Number(t[h]),S=g+2,g++;break;case 105:if(h>=f||t[h]==null)break;S<g&&(s+=e.slice(S,g)),s+=Math.floor(Number(t[h])),S=g+2,g++;break;case 79:case 111:case 106:if(h>=f||t[h]===void 0)break;S<g&&(s+=e.slice(S,g));var v=typeof t[h];if(v==="string"){s+="'"+t[h]+"'",S=g+2,g++;break}if(v==="function"){s+=t[h].name||"<anonymous>",S=g+2,g++;break}s+=n(t[h]),S=g+2,g++;break;case 115:if(h>=f)break;S<g&&(s+=e.slice(S,g)),s+=String(t[h]),S=g+2,g++;break;case 37:S<g&&(s+=e.slice(S,g)),s+="%",S=g+2,g++,h--;break}++h}++g}return S===-1?e:(S<y&&(s+=e.slice(S)),s)}});var Od=fe((p_,Qo)=>{"use strict";p();u();d();l();var Id=Ed();Qo.exports=ct;var bn=mv().console||{},ev={mapHttpRequest:Bo,mapHttpResponse:Bo,wrapRequestSerializer:ps,wrapResponseSerializer:ps,wrapErrorSerializer:ps,req:Bo,res:Bo,err:Td,errWithCause:Td};function Rt(e,t){return e==="silent"?1/0:t.levels.values[e]}var gs=Symbol("pino.logFuncs"),fs=Symbol("pino.hierarchy"),tv={error:"log",fatal:"error",warn:"error",info:"log",debug:"log",trace:"log"};function Pd(e,t){let r={logger:t,parent:e[fs]};t[fs]=r}function rv(e,t,r){let n={};t.forEach(o=>{n[o]=r[o]?r[o]:bn[o]||bn[tv[o]||"log"]||kr}),e[gs]=n}function nv(e,t){return Array.isArray(e)?e.filter(function(n){return n!=="!stdSerializers.err"}):e===!0?Object.keys(t):!1}function ct(e){e=e||{},e.browser=e.browser||{};let t=e.browser.transmit;if(t&&typeof t.send!="function")throw Error("pino: transmit option must have a send function");let r=e.browser.write||bn;e.browser.write&&(e.browser.asObject=!0);let n=e.serializers||{},o=nv(e.browser.serialize,n),i=e.browser.serialize;Array.isArray(e.browser.serialize)&&e.browser.serialize.indexOf("!stdSerializers.err")>-1&&(i=!1);let a=Object.keys(e.customLevels||{}),m=["error","fatal","warn","info","debug","trace"].concat(a);typeof r=="function"&&m.forEach(function(C){r[C]=r}),(e.enabled===!1||e.browser.disabled)&&(e.level="silent");let f=e.level||"info",s=Object.create(r);s.log||(s.log=kr),rv(s,m,r),Pd({},s),Object.defineProperty(s,"levelVal",{get:S}),Object.defineProperty(s,"level",{get:y,set:g});let h={transmit:t,serialize:o,asObject:e.browser.asObject,formatters:e.browser.formatters,levels:m,timestamp:dv(e),messageKey:e.messageKey||"msg",onChild:e.onChild||kr};s.levels=ov(e),s.level=f,s.setMaxListeners=s.getMaxListeners=s.emit=s.addListener=s.on=s.prependListener=s.once=s.prependOnceListener=s.removeListener=s.removeAllListeners=s.listeners=s.listenerCount=s.eventNames=s.write=s.flush=kr,s.serializers=n,s._serialize=o,s._stdErrSerialize=i,s.child=function(...C){return v.call(this,h,...C)},t&&(s._logEvent=ms());function S(){return Rt(this.level,this)}function y(){return this._level}function g(C){if(C!=="silent"&&!this.levels.values[C])throw Error("unknown level "+C);this._level=C,Gt(this,h,s,"error"),Gt(this,h,s,"fatal"),Gt(this,h,s,"warn"),Gt(this,h,s,"info"),Gt(this,h,s,"debug"),Gt(this,h,s,"trace"),a.forEach(E=>{Gt(this,h,s,E)})}function v(C,E,I){if(!E)throw new Error("missing bindings for child Pino");I=I||{},o&&E.serializers&&(I.serializers=E.serializers);let b=I.serializers;if(o&&b){var R=Object.assign({},n,b),T=e.browser.serialize===!0?Object.keys(R):o;delete E.serializers,hs([E],T,R,this._stdErrSerialize)}function _(P){this._childLevel=(P._childLevel|0)+1,this.bindings=E,R&&(this.serializers=R,this._serialize=T),t&&(this._logEvent=ms([].concat(P._logEvent.bindings,E)))}_.prototype=this;let F=new _(this);return Pd(this,F),F.child=function(...P){return v.call(this,C,...P)},F.level=I.level||this.level,C.onChild(F),F}return s}function ov(e){let t=e.customLevels||{},r=Object.assign({},ct.levels.values,t),n=Object.assign({},ct.levels.labels,iv(t));return{values:r,labels:n}}function iv(e){let t={};return Object.keys(e).forEach(function(r){t[e[r]]=r}),t}ct.levels={values:{fatal:60,error:50,warn:40,info:30,debug:20,trace:10},labels:{10:"trace",20:"debug",30:"info",40:"warn",50:"error",60:"fatal"}};ct.stdSerializers=ev;ct.stdTimeFunctions=Object.assign({},{nullTime:Fd,epochTime:kd,unixTime:pv,isoTime:fv});function av(e){let t=[];e.bindings&&t.push(e.bindings);let r=e[fs];for(;r.parent;)r=r.parent,r.logger.bindings&&t.push(r.logger.bindings);return t.reverse()}function Gt(e,t,r,n){if(Object.defineProperty(e,n,{value:Rt(e.level,r)>Rt(n,r)?kr:r[gs][n],writable:!0,enumerable:!0,configurable:!0}),e[n]===kr){if(!t.transmit)return;let i=t.transmit.level||e.level,a=Rt(i,r);if(Rt(n,r)<a)return}e[n]=cv(e,t,r,n);let o=av(e);o.length!==0&&(e[n]=sv(o,e[n]))}function sv(e,t){return function(){return t.apply(this,[...e,...arguments])}}function cv(e,t,r,n){return function(o){return function(){let a=t.timestamp(),m=new Array(arguments.length),f=Object.getPrototypeOf&&Object.getPrototypeOf(this)===bn?bn:this;for(var s=0;s<m.length;s++)m[s]=arguments[s];var h=!1;if(t.serialize&&(hs(m,this._serialize,this.serializers,this._stdErrSerialize),h=!0),t.asObject||t.formatters?o.call(f,uv(this,n,m,a,t)):o.apply(f,m),t.transmit){let S=t.transmit.level||e._level,y=Rt(S,r),g=Rt(n,r);if(g<y)return;lv(this,{ts:a,methodLevel:n,methodValue:g,transmitLevel:S,transmitValue:r.levels.values[t.transmit.level||e._level],send:t.transmit.send,val:Rt(e._level,r)},m,h)}}}(e[gs][n])}function uv(e,t,r,n,o){let{level:i,log:a=y=>y}=o.formatters||{},m=r.slice(),f=m[0],s={};if(n&&(s.time=n),i){let y=i(t,e.levels.values[t]);Object.assign(s,y)}else s.level=e.levels.values[t];let h=(e._childLevel|0)+1;if(h<1&&(h=1),f!==null&&typeof f=="object"){for(;h--&&typeof m[0]=="object";)Object.assign(s,m.shift());f=m.length?Id(m.shift(),m):void 0}else typeof f=="string"&&(f=Id(m.shift(),m));return f!==void 0&&(s[o.messageKey]=f),a(s)}function hs(e,t,r,n){for(let o in e)if(n&&e[o]instanceof Error)e[o]=ct.stdSerializers.err(e[o]);else if(typeof e[o]=="object"&&!Array.isArray(e[o])&&t)for(let i in e[o])t.indexOf(i)>-1&&i in r&&(e[o][i]=r[i](e[o][i]))}function lv(e,t,r,n=!1){let o=t.send,i=t.ts,a=t.methodLevel,m=t.methodValue,f=t.val,s=e._logEvent.bindings;n||hs(r,e._serialize||Object.keys(e.serializers),e.serializers,e._stdErrSerialize===void 0?!0:e._stdErrSerialize),e._logEvent.ts=i,e._logEvent.messages=r.filter(function(h){return s.indexOf(h)===-1}),e._logEvent.level.label=a,e._logEvent.level.value=m,o(a,e._logEvent,f),e._logEvent=ms(s)}function ms(e){return{ts:0,messages:[],bindings:e||[],level:{label:"",value:0}}}function Td(e){let t={type:e.constructor.name,msg:e.message,stack:e.stack};for(let r in e)t[r]===void 0&&(t[r]=e[r]);return t}function dv(e){return typeof e.timestamp=="function"?e.timestamp:e.timestamp===!1?Fd:kd}function Bo(){return{}}function ps(e){return e}function kr(){}function Fd(){return!1}function kd(){return Date.now()}function pv(){return Math.round(Date.now()/1e3)}function fv(){return new Date(Date.now()).toISOString()}function mv(){function e(t){return typeof t<"u"&&t}try{return typeof A<"u"?A:(Object.defineProperty(Object.prototype,"globalThis",{get:function(){return delete Object.prototype.globalThis,this.globalThis=this},configurable:!0}),A)}catch{return e(self)||e(window)||e(this)||{}}}Qo.exports.default=ct;Qo.exports.pino=ct});var VC={};Ts(VC,{DefaultFieldsToInclude:()=>Ss,EcommerceDefaultFieldsToInclude:()=>Hd,HighlightUtils:()=>Di,MinimumFieldsToInclude:()=>Zo,ResultTemplatesHelpers:()=>jp,buildContext:()=>qp,buildController:()=>Nt,buildDictionaryFieldContext:()=>Np,buildInteractiveResult:()=>Dp,buildRecommendationEngine:()=>Ld,buildRecommendationList:()=>kp,buildResultTemplatesManager:()=>Vp,getAnalyticsNextApiBaseUrl:()=>Nn,getOrganizationEndpoint:()=>Re,getSampleRecommendationEngineConfiguration:()=>ys,loadAdvancedSearchQueryActions:()=>Av,loadClickAnalyticsActions:()=>Dv,loadConfigurationActions:()=>Cv,loadContextActions:()=>xv,loadDebugActions:()=>kv,loadDictionaryFieldContextActions:()=>Rv,loadFieldActions:()=>Pv,loadPaginationActions:()=>Is,loadPipelineActions:()=>Tv,loadRecommendationActions:()=>Ov,loadSearchConfigurationActions:()=>bv,loadSearchHubActions:()=>Fv});module.exports=Wp(VC);p();u();d();l();var Di={};Ts(Di,{escape:()=>er,getHighlightedSuggestion:()=>kf,highlightString:()=>Ff});p();u();d();l();p();u();d();l();function xf(e,t){let r=`
|
|
17
|
+
*/(function(g,f){if(typeof exports=="object"&&typeof module<"u"){module.exports=f(require)}else if("function"==typeof define&&define.amd){define("CoveoHeadlessRecommendation",["crypto"],function(_d_0){var d={"crypto":_d_0},r=function(m){if(m in d)return d[m];if(typeof require=="function")return require(m);throw new Error("Cannot find module '"+m+"'")};return f(r)})}else{var gN={"crypto":"crypto"},gReq=function(r){var mod=r in gN?g[gN[r]]:g[r];return mod};g["CoveoHeadlessRecommendation"]=f(gReq)}})(typeof globalThis<"u"?globalThis:typeof self<"u"?self:this,function(require){var exports={};var __exports=exports;var module={exports};"use strict";var Hp=Object.create;var Br=Object.defineProperty;var zp=Object.getOwnPropertyDescriptor;var Wp=Object.getOwnPropertyNames;var Gp=Object.getPrototypeOf,Kp=Object.prototype.hasOwnProperty;var Yp=(e,t,r)=>t in e?Br(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Qr=(e,t)=>()=>(e&&(t=e(e=0)),t);var Se=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Ds=(e,t)=>{for(var r in t)Br(e,r,{get:t[r],enumerable:!0})},Ms=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Wp(t))!Kp.call(e,o)&&o!==r&&Br(e,o,{get:()=>t[o],enumerable:!(n=zp(t,o))||n.enumerable});return e};var je=(e,t,r)=>(r=e!=null?Hp(Gp(e)):{},Ms(t||!e||!e.__esModule?Br(r,"default",{value:e,enumerable:!0}):r,e)),Jp=e=>Ms(Br({},"__esModule",{value:!0}),e);var de=(e,t,r)=>Yp(e,typeof t!="symbol"?t+"":t,r);var C,u=Qr(()=>{"use strict";C=typeof globalThis<"u"?globalThis:window});function kn(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?kn=function(t){return typeof t}:kn=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},kn(e)}function ef(){"navigator"in this||(this.navigator={}),typeof this.navigator.sendBeacon!="function"&&(this.navigator.sendBeacon=tf.bind(this))}function tf(e,t){var r=this.event&&this.event.type,n=r==="unload"||r==="beforeunload",o="XMLHttpRequest"in this?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP");o.open("POST",e,!n),o.withCredentials=!0,o.setRequestHeader("Accept","*/*"),Xp(t)?(o.setRequestHeader("Content-Type","text/plain;charset=UTF-8"),o.responseType="text"):Zp(t)&&t.type&&o.setRequestHeader("Content-Type",t.type);try{o.send(t)}catch{return!1}return!0}var Xp,Zp,l=Qr(()=>{"use strict";Xp=function(t){return typeof t=="string"},Zp=function(t){return t instanceof Blob};ef.call((typeof window>"u"?"undefined":kn(window))==="object"?window:{})});var Ti=Se($r=>{"use strict";p();u();d();l();Object.defineProperty($r,"__esModule",{value:!0});function qs(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function rf(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function nf(e,t,r){return t=er(t),af(e,Ls()?Reflect.construct(t,r||[],er(e).constructor):t.apply(e,r))}function Ei(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ns(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,lf(n.key),n)}}function Pi(e,t,r){return t&&Ns(e.prototype,t),r&&Ns(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function _s(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=df(e))||t&&e&&typeof e.length=="number"){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(f){throw f},f:o}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
18
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var i,a=!0,m=!1;return{s:function(){r=r.call(e)},n:function(){var f=r.next();return a=f.done,f},e:function(f){m=!0,i=f},f:function(){try{a||r.return==null||r.return()}finally{if(m)throw i}}}}function xi(){return xi=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=sf(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(arguments.length<3?e:r):o.value}},xi.apply(null,arguments)}function er(e){return er=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},er(e)}function of(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ri(e,t)}function Ls(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Ls=function(){return!!e})()}function af(e,t){if(t&&(typeof t=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return rf(e)}function Ri(e,t){return Ri=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},Ri(e,t)}function sf(e,t){for(;!{}.hasOwnProperty.call(e,t)&&(e=er(e))!==null;);return e}function cf(e,t,r,n){var o=xi(er(1&n?e.prototype:e),t,r);return 2&n&&typeof o=="function"?function(i){return o.apply(r,i)}:o}function uf(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function lf(e){var t=uf(e,"string");return typeof t=="symbol"?t:t+""}function df(e,t){if(e){if(typeof e=="string")return qs(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?qs(e,t):void 0}}(function(e){return{NativeAbortSignal:e.AbortSignal,NativeAbortController:e.AbortController}})(typeof self<"u"?self:global);function pf(e){var t;try{t=new Event("abort")}catch{typeof document<"u"?document.createEvent?(t=document.createEvent("Event"),t.initEvent("abort",!1,!1)):(t=document.createEventObject(),t.type="abort"):t={type:"abort",bubbles:!1,cancelable:!1}}return t.reason=e,t}function ff(e){if(e===void 0)if(typeof document>"u")e=new Error("This operation was aborted"),e.name="AbortError";else try{e=new DOMException("signal is aborted without reason"),Object.defineProperty(e,"name",{value:"AbortError"})}catch{e=new Error("This operation was aborted"),e.name="AbortError"}return e}var Vs=function(){function e(){Ei(this,e),Object.defineProperty(this,"listeners",{value:{},writable:!0,configurable:!0})}return Pi(e,[{key:"addEventListener",value:function(r,n,o){r in this.listeners||(this.listeners[r]=[]),this.listeners[r].push({callback:n,options:o})}},{key:"removeEventListener",value:function(r,n){if(r in this.listeners){for(var o=this.listeners[r],i=0,a=o.length;i<a;i++)if(o[i].callback===n){o.splice(i,1);return}}}},{key:"dispatchEvent",value:function(r){var n=this;if(r.type in this.listeners){for(var o=this.listeners[r.type],i=o.slice(),a=function(){var h=i[m];try{h.callback.call(n,r)}catch(y){Promise.resolve().then(function(){throw y})}h.options&&h.options.once&&n.removeEventListener(r.type,h.callback)},m=0,f=i.length;m<f;m++)a();return!r.defaultPrevented}}}])}(),Ii=function(e){function t(){var r;return Ei(this,t),r=nf(this,t),r.listeners||Vs.call(r),Object.defineProperty(r,"aborted",{value:!1,writable:!0,configurable:!0}),Object.defineProperty(r,"onabort",{value:null,writable:!0,configurable:!0}),Object.defineProperty(r,"reason",{value:void 0,writable:!0,configurable:!0}),r}return of(t,e),Pi(t,[{key:"toString",value:function(){return"[object AbortSignal]"}},{key:"dispatchEvent",value:function(n){n.type==="abort"&&(this.aborted=!0,typeof this.onabort=="function"&&this.onabort.call(this,n)),cf(t,"dispatchEvent",this,3)([n])}},{key:"throwIfAborted",value:function(){var n=this.aborted,o=this.reason,i=o===void 0?"Aborted":o;if(n)throw i}}],[{key:"timeout",value:function(n){var o=new On;return setTimeout(function(){return o.abort(new DOMException("This signal is timeout in ".concat(n,"ms"),"TimeoutError"))},n),o.signal}},{key:"any",value:function(n){var o=new On;function i(){o.abort(this.reason),a()}function a(){var h=_s(n),y;try{for(h.s();!(y=h.n()).done;){var S=y.value;S.removeEventListener("abort",i)}}catch(g){h.e(g)}finally{h.f()}}var m=_s(n),f;try{for(m.s();!(f=m.n()).done;){var s=f.value;if(s.aborted){o.abort(s.reason);break}else s.addEventListener("abort",i)}}catch(h){m.e(h)}finally{m.f()}return o.signal}}])}(Vs),On=function(){function e(){Ei(this,e),Object.defineProperty(this,"signal",{value:new Ii,writable:!0,configurable:!0})}return Pi(e,[{key:"abort",value:function(r){var n=ff(r),o=pf(n);this.signal.reason=n,this.signal.dispatchEvent(o)}},{key:"toString",value:function(){return"[object AbortController]"}}])}();typeof Symbol<"u"&&Symbol.toStringTag&&(On.prototype[Symbol.toStringTag]="AbortController",Ii.prototype[Symbol.toStringTag]="AbortSignal");function mf(e){return e.__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL?(console.log("__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL=true is set, will force install polyfill"),!0):typeof e.Request=="function"&&!e.Request.prototype.hasOwnProperty("signal")||!e.AbortController}function gf(e){typeof e=="function"&&(e={fetch:e});var t=e,r=t.fetch,n=t.Request,o=n===void 0?r.Request:n,i=t.AbortController,a=t.__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL,m=a===void 0?!1:a;if(!mf({fetch:r,Request:o,AbortController:i,__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL:m}))return{fetch:r,Request:f};var f=o;(f&&!f.prototype.hasOwnProperty("signal")||m)&&(f=function(S,g){var v;g&&g.signal&&(v=g.signal,delete g.signal);var R=new o(S,g);return v&&Object.defineProperty(R,"signal",{writable:!1,enumerable:!1,configurable:!0,value:v}),R},f.prototype=o.prototype);var s=r,h=function(S,g){var v=f&&f.prototype.isPrototypeOf(S)?S.signal:g?g.signal:void 0;if(v){var R;try{R=new DOMException("Aborted","AbortError")}catch{R=new Error("Aborted"),R.name="AbortError"}if(v.aborted)return Promise.reject(R);var I=new Promise(function(x,T){v.addEventListener("abort",function(){return T(R)},{once:!0})});return g&&g.signal&&delete g.signal,Promise.race([I,s(S,g)])}return s(S,g)};return{fetch:h,Request:f}}$r.AbortController=On;$r.AbortSignal=Ii;$r.abortableFetch=gf});var js,c,b,d=Qr(()=>{"use strict";js=je(Ti(),1),c=je(Ti(),1),{fetch:b}=(0,js.abortableFetch)({fetch})});function Hr(e){if(Rf.test(e)||e.trim()==="")throw new TypeError("Invalid character in header field name");return e.trim().toLowerCase()}function Fi(e){return e.replace(Ef,"")}function zr(e){if(typeof e!="string"||e.length===0)return!1;for(let t=0;t<e.length;t++){let r=e.charCodeAt(t);if(r>127||!Pf(r))return!1}return!0}function Pf(e){return![127,32,"(",")","<",">","@",",",";",":","\\","\"","/","[","]","?","=","{","}"].includes(e)}function Bs(e){if(typeof e!="string"||e.trim()!==e)return!1;for(let t=0;t<e.length;t++){let r=e.charCodeAt(t);if(r===0||r===10||r===13)return!1}return!0}var hf,Ws,yf,Gs,Sf,vf,Cf,bf,Af,wf,xf,Rf,Us,Ef,tr,ki,Qs,$s,Hs,zs,w,Ys=Qr(()=>{"use strict";p();u();d();l();hf=Object.create,Ws=Object.defineProperty,yf=Object.getOwnPropertyDescriptor,Gs=Object.getOwnPropertyNames,Sf=Object.getPrototypeOf,vf=Object.prototype.hasOwnProperty,Cf=(e,t)=>function(){return t||(0,e[Gs(e)[0]])((t={exports:{}}).exports,t),t.exports},bf=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Gs(t))!vf.call(e,o)&&o!==r&&Ws(e,o,{get:()=>t[o],enumerable:!(n=yf(t,o))||n.enumerable});return e},Af=(e,t,r)=>(r=e!=null?hf(Sf(e)):{},bf(t||!e||!e.__esModule?Ws(r,"default",{value:e,enumerable:!0}):r,e)),wf=Cf({"node_modules/set-cookie-parser/lib/set-cookie.js"(e,t){"use strict";var r={decodeValues:!0,map:!1,silent:!1};function n(f){return typeof f=="string"&&!!f.trim()}function o(f,s){var h=f.split(";").filter(n),y=h.shift(),S=i(y),g=S.name,v=S.value;s=s?Object.assign({},r,s):r;try{v=s.decodeValues?decodeURIComponent(v):v}catch(I){console.error("set-cookie-parser encountered an error while decoding a cookie with value '"+v+"'. Set options.decodeValues to false to disable this feature.",I)}var R={name:g,value:v};return h.forEach(function(I){var x=I.split("="),T=x.shift().trimLeft().toLowerCase(),A=x.join("=");T==="expires"?R.expires=new Date(A):T==="max-age"?R.maxAge=parseInt(A,10):T==="secure"?R.secure=!0:T==="httponly"?R.httpOnly=!0:T==="samesite"?R.sameSite=A:R[T]=A}),R}function i(f){var s="",h="",y=f.split("=");return y.length>1?(s=y.shift(),h=y.join("=")):h=f,{name:s,value:h}}function a(f,s){if(s=s?Object.assign({},r,s):r,!f)return s.map?{}:[];if(f.headers)if(typeof f.headers.getSetCookie=="function")f=f.headers.getSetCookie();else if(f.headers["set-cookie"])f=f.headers["set-cookie"];else{var h=f.headers[Object.keys(f.headers).find(function(S){return S.toLowerCase()==="set-cookie"})];!h&&f.headers.cookie&&!s.silent&&console.warn("Warning: set-cookie-parser appears to have been called on a request object. It is designed to parse Set-Cookie headers from responses, not Cookie headers from requests. Set the option {silent: true} to suppress this warning."),f=h}if(Array.isArray(f)||(f=[f]),s=s?Object.assign({},r,s):r,s.map){var y={};return f.filter(n).reduce(function(S,g){var v=o(g,s);return S[v.name]=v,S},y)}else return f.filter(n).map(function(S){return o(S,s)})}function m(f){if(Array.isArray(f))return f;if(typeof f!="string")return[];var s=[],h=0,y,S,g,v,R;function I(){for(;h<f.length&&/\s/.test(f.charAt(h));)h+=1;return h<f.length}function x(){return S=f.charAt(h),S!=="="&&S!==";"&&S!==","}for(;h<f.length;){for(y=h,R=!1;I();)if(S=f.charAt(h),S===","){for(g=h,h+=1,I(),v=h;h<f.length&&x();)h+=1;h<f.length&&f.charAt(h)==="="?(R=!0,h=v,s.push(f.substring(y,g)),y=h):h=g+1}else h+=1;(!R||h>=f.length)&&s.push(f.substring(y,f.length))}return s}t.exports=a,t.exports.parse=a,t.exports.parseString=o,t.exports.splitCookiesString=m}}),xf=Af(wf()),Rf=/[^a-z0-9\-#$%&'*+.^_`|~]/i;Us=[`
|
|
19
|
+
`,"\r","\t"," "],Ef=new RegExp(`(^[${Us.join("")}]|$[${Us.join("")}])`,"g");tr=Symbol("normalizedHeaders"),ki=Symbol("rawHeaderNames"),Qs=", ",w=class Ks{constructor(t){this[$s]={},this[Hs]=new Map,this[zs]="Headers",["Headers","HeadersPolyfill"].includes(t?.constructor.name)||t instanceof Ks||typeof C.Headers<"u"&&t instanceof C.Headers?t.forEach((n,o)=>{this.append(o,n)},this):Array.isArray(t)?t.forEach(([r,n])=>{this.append(r,Array.isArray(n)?n.join(Qs):n)}):t&&Object.getOwnPropertyNames(t).forEach(r=>{let n=t[r];this.append(r,Array.isArray(n)?n.join(Qs):n)})}[($s=tr,Hs=ki,zs=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}*keys(){for(let[t]of this.entries())yield t}*values(){for(let[,t]of this.entries())yield t}*entries(){let t=Object.keys(this[tr]).sort((r,n)=>r.localeCompare(n));for(let r of t)if(r==="set-cookie")for(let n of this.getSetCookie())yield[r,n];else yield[r,this.get(r)]}has(t){if(!zr(t))throw new TypeError(`Invalid header name "${t}"`);return this[tr].hasOwnProperty(Hr(t))}get(t){if(!zr(t))throw TypeError(`Invalid header name "${t}"`);return this[tr][Hr(t)]??null}set(t,r){if(!zr(t)||!Bs(r))return;let n=Hr(t),o=Fi(r);this[tr][n]=Fi(o),this[ki].set(n,t)}append(t,r){if(!zr(t)||!Bs(r))return;let n=Hr(t),o=Fi(r),i=this.has(n)?`${this.get(n)}, ${o}`:o;this.set(t,i)}delete(t){if(!zr(t)||!this.has(t))return;let r=Hr(t);delete this[tr][r],this[ki].delete(r)}forEach(t,r){for(let[n,o]of this.entries())t.call(r,o,n,this)}getSetCookie(){let t=this.get("set-cookie");return t===null?[]:t===""?[""]:(0,xf.splitCookiesString)(t)}}});var p=Qr(()=>{"use strict";Ys()});var cc=Se(Kr=>{"use strict";p();u();d();l();var _n=Kr&&Kr.__assign||function(){return _n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},_n.apply(this,arguments)};Object.defineProperty(Kr,"__esModule",{value:!0});var Uf={delayFirstAttempt:!1,jitter:"none",maxDelay:1/0,numOfAttempts:10,retry:function(){return!0},startingDelay:100,timeMultiple:2};function Bf(e){var t=_n(_n({},Uf),e);return t.numOfAttempts<1&&(t.numOfAttempts=1),t}Kr.getSanitizedOptions=Bf});var uc=Se(qi=>{"use strict";p();u();d();l();Object.defineProperty(qi,"__esModule",{value:!0});function Qf(e){var t=Math.random()*e;return Math.round(t)}qi.fullJitter=Qf});var lc=Se(Ni=>{"use strict";p();u();d();l();Object.defineProperty(Ni,"__esModule",{value:!0});function $f(e){return e}Ni.noJitter=$f});var dc=Se(_i=>{"use strict";p();u();d();l();Object.defineProperty(_i,"__esModule",{value:!0});var Hf=uc(),zf=lc();function Wf(e){switch(e.jitter){case"full":return Hf.fullJitter;case"none":default:return zf.noJitter}}_i.JitterFactory=Wf});var Li=Se(Vi=>{"use strict";p();u();d();l();Object.defineProperty(Vi,"__esModule",{value:!0});var Gf=dc(),Kf=function(){function e(t){this.options=t,this.attempt=0}return e.prototype.apply=function(){var t=this;return new Promise(function(r){return setTimeout(r,t.jitteredDelay)})},e.prototype.setAttemptNumber=function(t){this.attempt=t},Object.defineProperty(e.prototype,"jitteredDelay",{get:function(){var t=Gf.JitterFactory(this.options);return t(this.delay)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"delay",{get:function(){var t=this.options.startingDelay,r=this.options.timeMultiple,n=this.numOfDelayedAttempts,o=t*Math.pow(r,n);return Math.min(o,this.options.maxDelay)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"numOfDelayedAttempts",{get:function(){return this.attempt},enumerable:!0,configurable:!0}),e}();Vi.Delay=Kf});var pc=Se(rt=>{"use strict";p();u();d();l();var Yf=rt&&rt.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)o.hasOwnProperty(i)&&(n[i]=o[i])},e(t,r)};return function(t,r){e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Jf=rt&&rt.__awaiter||function(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(h){try{s(n.next(h))}catch(y){a(y)}}function f(h){try{s(n.throw(h))}catch(y){a(y)}}function s(h){h.done?i(h.value):o(h.value).then(m,f)}s((n=n.apply(e,t||[])).next())})},Xf=rt&&rt.__generator||function(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,o,i,a;return a={next:m(0),throw:m(1),return:m(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function m(s){return function(h){return f([s,h])}}function f(s){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,o&&(i=s[0]&2?o.return:s[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,s[1])).done)return i;switch(o=0,i&&(s=[s[0]&2,i.value]),s[0]){case 0:case 1:i=s;break;case 4:return r.label++,{value:s[1],done:!1};case 5:r.label++,o=s[1],s=[0];continue;case 7:s=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){r.label=s[1];break}if(s[0]===6&&r.label<i[1]){r.label=i[1],i=s;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(s);break}i[2]&&r.ops.pop(),r.trys.pop();continue}s=t.call(e,r)}catch(h){s=[6,h],o=0}finally{n=i=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}};Object.defineProperty(rt,"__esModule",{value:!0});var Zf=Li(),em=function(e){Yf(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.apply=function(){return Jf(this,void 0,void 0,function(){return Xf(this,function(r){return[2,this.isFirstAttempt?!0:e.prototype.apply.call(this)]})})},Object.defineProperty(t.prototype,"isFirstAttempt",{get:function(){return this.attempt===0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"numOfDelayedAttempts",{get:function(){return this.attempt-1},enumerable:!0,configurable:!0}),t}(Zf.Delay);rt.SkipFirstDelay=em});var fc=Se(Yr=>{"use strict";p();u();d();l();var tm=Yr&&Yr.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)o.hasOwnProperty(i)&&(n[i]=o[i])},e(t,r)};return function(t,r){e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(Yr,"__esModule",{value:!0});var rm=Li(),nm=function(e){tm(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(rm.Delay);Yr.AlwaysDelay=nm});var mc=Se(ji=>{"use strict";p();u();d();l();Object.defineProperty(ji,"__esModule",{value:!0});var om=pc(),im=fc();function am(e,t){var r=sm(e);return r.setAttemptNumber(t),r}ji.DelayFactory=am;function sm(e){return e.delayFirstAttempt?new im.AlwaysDelay(e):new om.SkipFirstDelay(e)}});var gc=Se(Vt=>{"use strict";p();u();d();l();var Ui=Vt&&Vt.__awaiter||function(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(h){try{s(n.next(h))}catch(y){a(y)}}function f(h){try{s(n.throw(h))}catch(y){a(y)}}function s(h){h.done?i(h.value):o(h.value).then(m,f)}s((n=n.apply(e,t||[])).next())})},Bi=Vt&&Vt.__generator||function(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,o,i,a;return a={next:m(0),throw:m(1),return:m(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function m(s){return function(h){return f([s,h])}}function f(s){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,o&&(i=s[0]&2?o.return:s[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,s[1])).done)return i;switch(o=0,i&&(s=[s[0]&2,i.value]),s[0]){case 0:case 1:i=s;break;case 4:return r.label++,{value:s[1],done:!1};case 5:r.label++,o=s[1],s=[0];continue;case 7:s=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){r.label=s[1];break}if(s[0]===6&&r.label<i[1]){r.label=i[1],i=s;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(s);break}i[2]&&r.ops.pop(),r.trys.pop();continue}s=t.call(e,r)}catch(h){s=[6,h],o=0}finally{n=i=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}};Object.defineProperty(Vt,"__esModule",{value:!0});var cm=cc(),um=mc();function lm(e,t){return t===void 0&&(t={}),Ui(this,void 0,void 0,function(){var r,n;return Bi(this,function(o){switch(o.label){case 0:return r=cm.getSanitizedOptions(t),n=new dm(e,r),[4,n.execute()];case 1:return[2,o.sent()]}})})}Vt.backOff=lm;var dm=function(){function e(t,r){this.request=t,this.options=r,this.attemptNumber=0}return e.prototype.execute=function(){return Ui(this,void 0,void 0,function(){var t,r;return Bi(this,function(n){switch(n.label){case 0:if(this.attemptLimitReached)return[3,7];n.label=1;case 1:return n.trys.push([1,4,,6]),[4,this.applyDelay()];case 2:return n.sent(),[4,this.request()];case 3:return[2,n.sent()];case 4:return t=n.sent(),this.attemptNumber++,[4,this.options.retry(t,this.attemptNumber)];case 5:if(r=n.sent(),!r||this.attemptLimitReached)throw t;return[3,6];case 6:return[3,0];case 7:throw new Error("Something went wrong.")}})})},Object.defineProperty(e.prototype,"attemptLimitReached",{get:function(){return this.attemptNumber>=this.options.numOfAttempts},enumerable:!0,configurable:!0}),e.prototype.applyDelay=function(){return Ui(this,void 0,void 0,function(){var t;return Bi(this,function(r){switch(r.label){case 0:return t=um.DelayFactory(this.options,this.attemptNumber),[4,t.apply()];case 1:return r.sent(),[2]}})})},e}()});var Do=Se((La,ja)=>{"use strict";p();u();d();l();(function(e,t){typeof La=="object"&&typeof ja<"u"?ja.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof C<"u"?C:e||self).dayjs=t()})(La,function(){"use strict";var e=1e3,t=6e4,r=36e5,n="millisecond",o="second",i="minute",a="hour",m="day",f="week",s="month",h="quarter",y="year",S="date",g="Invalid Date",v=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,R=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,I={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(U){var L=["th","st","nd","rd"],V=U%100;return"["+U+(L[(V-20)%10]||L[V]||L[0])+"]"}},x=function(U,L,V){var Q=String(U);return!Q||Q.length>=L?U:""+Array(L+1-Q.length).join(V)+U},T={s:x,z:function(U){var L=-U.utcOffset(),V=Math.abs(L),Q=Math.floor(V/60),j=V%60;return(L<=0?"+":"-")+x(Q,2,"0")+":"+x(j,2,"0")},m:function U(L,V){if(L.date()<V.date())return-U(V,L);var Q=12*(V.year()-L.year())+(V.month()-L.month()),j=L.clone().add(Q,s),z=V-j<0,W=L.clone().add(Q+(z?-1:1),s);return+(-(Q+(V-j)/(z?j-W:W-j))||0)},a:function(U){return U<0?Math.ceil(U)||0:Math.floor(U)},p:function(U){return{M:s,y,w:f,d:m,D:S,h:a,m:i,s:o,ms:n,Q:h}[U]||String(U||"").toLowerCase().replace(/s$/,"")},u:function(U){return U===void 0}},A="en",E={};E[A]=I;var N="$isDayjsObject",k=function(U){return U instanceof _||!(!U||!U[N])},P=function U(L,V,Q){var j;if(!L)return A;if(typeof L=="string"){var z=L.toLowerCase();E[z]&&(j=z),V&&(E[z]=V,j=z);var W=L.split("-");if(!j&&W.length>1)return U(W[0])}else{var Y=L.name;E[Y]=L,j=Y}return!Q&&j&&(A=j),j||!Q&&A},F=function(U,L){if(k(U))return U.clone();var V=typeof L=="object"?L:{};return V.date=U,V.args=arguments,new _(V)},O=T;O.l=P,O.i=k,O.w=function(U,L){return F(U,{locale:L.$L,utc:L.$u,x:L.$x,$offset:L.$offset})};var _=function(){function U(V){this.$L=P(V.locale,null,!0),this.parse(V),this.$x=this.$x||V.x||{},this[N]=!0}var L=U.prototype;return L.parse=function(V){this.$d=function(Q){var j=Q.date,z=Q.utc;if(j===null)return new Date(NaN);if(O.u(j))return new Date;if(j instanceof Date)return new Date(j);if(typeof j=="string"&&!/Z$/i.test(j)){var W=j.match(v);if(W){var Y=W[2]-1||0,re=(W[7]||"0").substring(0,3);return z?new Date(Date.UTC(W[1],Y,W[3]||1,W[4]||0,W[5]||0,W[6]||0,re)):new Date(W[1],Y,W[3]||1,W[4]||0,W[5]||0,W[6]||0,re)}}return new Date(j)}(V),this.init()},L.init=function(){var V=this.$d;this.$y=V.getFullYear(),this.$M=V.getMonth(),this.$D=V.getDate(),this.$W=V.getDay(),this.$H=V.getHours(),this.$m=V.getMinutes(),this.$s=V.getSeconds(),this.$ms=V.getMilliseconds()},L.$utils=function(){return O},L.isValid=function(){return this.$d.toString()!==g},L.isSame=function(V,Q){var j=F(V);return this.startOf(Q)<=j&&j<=this.endOf(Q)},L.isAfter=function(V,Q){return F(V)<this.startOf(Q)},L.isBefore=function(V,Q){return this.endOf(Q)<F(V)},L.$g=function(V,Q,j){return O.u(V)?this[Q]:this.set(j,V)},L.unix=function(){return Math.floor(this.valueOf()/1e3)},L.valueOf=function(){return this.$d.getTime()},L.startOf=function(V,Q){var j=this,z=!!O.u(Q)||Q,W=O.p(V),Y=function(ce,fe){var he=O.w(j.$u?Date.UTC(j.$y,fe,ce):new Date(j.$y,fe,ce),j);return z?he:he.endOf(m)},re=function(ce,fe){return O.w(j.toDate()[ce].apply(j.toDate("s"),(z?[0,0,0,0]:[23,59,59,999]).slice(fe)),j)},se=this.$W,ee=this.$M,ne=this.$D,Z="set"+(this.$u?"UTC":"");switch(W){case y:return z?Y(1,0):Y(31,11);case s:return z?Y(1,ee):Y(0,ee+1);case f:var oe=this.$locale().weekStart||0,ge=(se<oe?se+7:se)-oe;return Y(z?ne-ge:ne+(6-ge),ee);case m:case S:return re(Z+"Hours",0);case a:return re(Z+"Minutes",1);case i:return re(Z+"Seconds",2);case o:return re(Z+"Milliseconds",3);default:return this.clone()}},L.endOf=function(V){return this.startOf(V,!1)},L.$set=function(V,Q){var j,z=O.p(V),W="set"+(this.$u?"UTC":""),Y=(j={},j[m]=W+"Date",j[S]=W+"Date",j[s]=W+"Month",j[y]=W+"FullYear",j[a]=W+"Hours",j[i]=W+"Minutes",j[o]=W+"Seconds",j[n]=W+"Milliseconds",j)[z],re=z===m?this.$D+(Q-this.$W):Q;if(z===s||z===y){var se=this.clone().set(S,1);se.$d[Y](re),se.init(),this.$d=se.set(S,Math.min(this.$D,se.daysInMonth())).$d}else Y&&this.$d[Y](re);return this.init(),this},L.set=function(V,Q){return this.clone().$set(V,Q)},L.get=function(V){return this[O.p(V)]()},L.add=function(V,Q){var j,z=this;V=Number(V);var W=O.p(Q),Y=function(ee){var ne=F(z);return O.w(ne.date(ne.date()+Math.round(ee*V)),z)};if(W===s)return this.set(s,this.$M+V);if(W===y)return this.set(y,this.$y+V);if(W===m)return Y(1);if(W===f)return Y(7);var re=(j={},j[i]=t,j[a]=r,j[o]=e,j)[W]||1,se=this.$d.getTime()+V*re;return O.w(se,this)},L.subtract=function(V,Q){return this.add(-1*V,Q)},L.format=function(V){var Q=this,j=this.$locale();if(!this.isValid())return j.invalidDate||g;var z=V||"YYYY-MM-DDTHH:mm:ssZ",W=O.z(this),Y=this.$H,re=this.$m,se=this.$M,ee=j.weekdays,ne=j.months,Z=j.meridiem,oe=function(fe,he,Te,Le){return fe&&(fe[he]||fe(Q,z))||Te[he].slice(0,Le)},ge=function(fe){return O.s(Y%12||12,fe,"0")},ce=Z||function(fe,he,Te){var Le=fe<12?"AM":"PM";return Te?Le.toLowerCase():Le};return z.replace(R,function(fe,he){return he||function(Te){switch(Te){case"YY":return String(Q.$y).slice(-2);case"YYYY":return O.s(Q.$y,4,"0");case"M":return se+1;case"MM":return O.s(se+1,2,"0");case"MMM":return oe(j.monthsShort,se,ne,3);case"MMMM":return oe(ne,se);case"D":return Q.$D;case"DD":return O.s(Q.$D,2,"0");case"d":return String(Q.$W);case"dd":return oe(j.weekdaysMin,Q.$W,ee,2);case"ddd":return oe(j.weekdaysShort,Q.$W,ee,3);case"dddd":return ee[Q.$W];case"H":return String(Y);case"HH":return O.s(Y,2,"0");case"h":return ge(1);case"hh":return ge(2);case"a":return ce(Y,re,!0);case"A":return ce(Y,re,!1);case"m":return String(re);case"mm":return O.s(re,2,"0");case"s":return String(Q.$s);case"ss":return O.s(Q.$s,2,"0");case"SSS":return O.s(Q.$ms,3,"0");case"Z":return W}return null}(fe)||W.replace(":","")})},L.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},L.diff=function(V,Q,j){var z,W=this,Y=O.p(Q),re=F(V),se=(re.utcOffset()-this.utcOffset())*t,ee=this-re,ne=function(){return O.m(W,re)};switch(Y){case y:z=ne()/12;break;case s:z=ne();break;case h:z=ne()/3;break;case f:z=(ee-se)/6048e5;break;case m:z=(ee-se)/864e5;break;case a:z=ee/r;break;case i:z=ee/t;break;case o:z=ee/e;break;default:z=ee}return j?z:O.a(z)},L.daysInMonth=function(){return this.endOf(s).$D},L.$locale=function(){return E[this.$L]},L.locale=function(V,Q){if(!V)return this.$L;var j=this.clone(),z=P(V,Q,!0);return z&&(j.$L=z),j},L.clone=function(){return O.w(this.$d,this)},L.toDate=function(){return new Date(this.valueOf())},L.toJSON=function(){return this.isValid()?this.toISOString():null},L.toISOString=function(){return this.$d.toISOString()},L.toString=function(){return this.$d.toUTCString()},U}(),$=_.prototype;return F.prototype=$,[["$ms",n],["$s",o],["$m",i],["$H",a],["$W",m],["$M",s],["$y",y],["$D",S]].forEach(function(U){$[U[1]]=function(L){return this.$g(L,U[0],U[1])}}),F.extend=function(U,L){return U.$i||(U(L,_,F),U.$i=!0),F},F.locale=P,F.isDayjs=k,F.unix=function(U){return F(1e3*U)},F.en=E[A],F.Ls=E,F.p={},F})});var yl=Se((Ua,Ba)=>{"use strict";p();u();d();l();(function(e,t){typeof Ua=="object"&&typeof Ba<"u"?Ba.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof C<"u"?C:e||self).dayjs_plugin_quarterOfYear=t()})(Ua,function(){"use strict";var e="month",t="quarter";return function(r,n){var o=n.prototype;o.quarter=function(m){return this.$utils().u(m)?Math.ceil((this.month()+1)/3):this.month(this.month()%3+3*(m-1))};var i=o.add;o.add=function(m,f){return m=Number(m),this.$utils().p(f)===t?this.add(3*m,e):i.bind(this)(m,f)};var a=o.startOf;o.startOf=function(m,f){var s=this.$utils(),h=!!s.u(f)||f;if(s.p(m)===t){var y=this.quarter()-1;return h?this.month(3*y).startOf(e).startOf("day"):this.month(3*y+2).endOf(e).endOf("day")}return a.bind(this)(m,f)}}})});var Sl=Se((Qa,$a)=>{"use strict";p();u();d();l();(function(e,t){typeof Qa=="object"&&typeof $a<"u"?$a.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof C<"u"?C:e||self).dayjs_plugin_customParseFormat=t()})(Qa,function(){"use strict";var e={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},t=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,r=/\d/,n=/\d\d/,o=/\d\d?/,i=/\d*[^-_:/,()\s\d]+/,a={},m=function(v){return(v=+v)+(v>68?1900:2e3)},f=function(v){return function(R){this[v]=+R}},s=[/[+-]\d\d:?(\d\d)?|Z/,function(v){(this.zone||(this.zone={})).offset=function(R){if(!R||R==="Z")return 0;var I=R.match(/([+-]|\d\d)/g),x=60*I[1]+(+I[2]||0);return x===0?0:I[0]==="+"?-x:x}(v)}],h=function(v){var R=a[v];return R&&(R.indexOf?R:R.s.concat(R.f))},y=function(v,R){var I,x=a.meridiem;if(x){for(var T=1;T<=24;T+=1)if(v.indexOf(x(T,0,R))>-1){I=T>12;break}}else I=v===(R?"pm":"PM");return I},S={A:[i,function(v){this.afternoon=y(v,!1)}],a:[i,function(v){this.afternoon=y(v,!0)}],Q:[r,function(v){this.month=3*(v-1)+1}],S:[r,function(v){this.milliseconds=100*+v}],SS:[n,function(v){this.milliseconds=10*+v}],SSS:[/\d{3}/,function(v){this.milliseconds=+v}],s:[o,f("seconds")],ss:[o,f("seconds")],m:[o,f("minutes")],mm:[o,f("minutes")],H:[o,f("hours")],h:[o,f("hours")],HH:[o,f("hours")],hh:[o,f("hours")],D:[o,f("day")],DD:[n,f("day")],Do:[i,function(v){var R=a.ordinal,I=v.match(/\d+/);if(this.day=I[0],R)for(var x=1;x<=31;x+=1)R(x).replace(/\[|\]/g,"")===v&&(this.day=x)}],w:[o,f("week")],ww:[n,f("week")],M:[o,f("month")],MM:[n,f("month")],MMM:[i,function(v){var R=h("months"),I=(h("monthsShort")||R.map(function(x){return x.slice(0,3)})).indexOf(v)+1;if(I<1)throw new Error;this.month=I%12||I}],MMMM:[i,function(v){var R=h("months").indexOf(v)+1;if(R<1)throw new Error;this.month=R%12||R}],Y:[/[+-]?\d+/,f("year")],YY:[n,function(v){this.year=m(v)}],YYYY:[/\d{4}/,f("year")],Z:s,ZZ:s};function g(v){var R,I;R=v,I=a&&a.formats;for(var x=(v=R.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(F,O,_){var $=_&&_.toUpperCase();return O||I[_]||e[_]||I[$].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(U,L,V){return L||V.slice(1)})})).match(t),T=x.length,A=0;A<T;A+=1){var E=x[A],N=S[E],k=N&&N[0],P=N&&N[1];x[A]=P?{regex:k,parser:P}:E.replace(/^\[|\]$/g,"")}return function(F){for(var O={},_=0,$=0;_<T;_+=1){var U=x[_];if(typeof U=="string")$+=U.length;else{var L=U.regex,V=U.parser,Q=F.slice($),j=L.exec(Q)[0];V.call(O,j),F=F.replace(j,"")}}return function(z){var W=z.afternoon;if(W!==void 0){var Y=z.hours;W?Y<12&&(z.hours+=12):Y===12&&(z.hours=0),delete z.afternoon}}(O),O}}return function(v,R,I){I.p.customParseFormat=!0,v&&v.parseTwoDigitYear&&(m=v.parseTwoDigitYear);var x=R.prototype,T=x.parse;x.parse=function(A){var E=A.date,N=A.utc,k=A.args;this.$u=N;var P=k[1];if(typeof P=="string"){var F=k[2]===!0,O=k[3]===!0,_=F||O,$=k[2];O&&($=k[2]),a=this.$locale(),!F&&$&&(a=I.Ls[$]),this.$d=function(Q,j,z,W){try{if(["x","X"].indexOf(j)>-1)return new Date((j==="X"?1e3:1)*Q);var Y=g(j)(Q),re=Y.year,se=Y.month,ee=Y.day,ne=Y.hours,Z=Y.minutes,oe=Y.seconds,ge=Y.milliseconds,ce=Y.zone,fe=Y.week,he=new Date,Te=ee||(re||se?1:he.getDate()),Le=re||he.getFullYear(),pt=0;re&&!se||(pt=se>0?se-1:he.getMonth());var Xt,Zt=ne||0,Ur=Z||0,Ai=oe||0,wi=ge||0;return ce?new Date(Date.UTC(Le,pt,Te,Zt,Ur,Ai,wi+60*ce.offset*1e3)):z?new Date(Date.UTC(Le,pt,Te,Zt,Ur,Ai,wi)):(Xt=new Date(Le,pt,Te,Zt,Ur,Ai,wi),fe&&(Xt=W(Xt).week(fe).toDate()),Xt)}catch{return new Date("")}}(E,P,N,I),this.init(),$&&$!==!0&&(this.$L=this.locale($).$L),_&&E!=this.format(P)&&(this.$d=new Date("")),a={}}else if(P instanceof Array)for(var U=P.length,L=1;L<=U;L+=1){k[1]=P[L-1];var V=I.apply(this,k);if(V.isValid()){this.$d=V.$d,this.$L=V.$L,this.init();break}L===U&&(this.$d=new Date(""))}else T.call(this,A)}}})});var md=Se((XM,fd)=>{"use strict";p();u();d();l();var HS=/(^|; )Coveo-Pendragon=([^;]*)/;fd.exports=()=>HS.exec(document.cookie)?.pop()||null});var gd=Se((us,ls)=>{"use strict";p();u();d();l();(function(e,t){typeof us=="object"&&typeof ls<"u"?ls.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof C<"u"?C:e||self).dayjs_plugin_timezone=t()})(us,function(){"use strict";var e={year:0,month:1,day:2,hour:3,minute:4,second:5},t={};return function(r,n,o){var i,a=function(h,y,S){S===void 0&&(S={});var g=new Date(h),v=function(R,I){I===void 0&&(I={});var x=I.timeZoneName||"short",T=R+"|"+x,A=t[T];return A||(A=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:R,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:x}),t[T]=A),A}(y,S);return v.formatToParts(g)},m=function(h,y){for(var S=a(h,y),g=[],v=0;v<S.length;v+=1){var R=S[v],I=R.type,x=R.value,T=e[I];T>=0&&(g[T]=parseInt(x,10))}var A=g[3],E=A===24?0:A,N=g[0]+"-"+g[1]+"-"+g[2]+" "+E+":"+g[4]+":"+g[5]+":000",k=+h;return(o.utc(N).valueOf()-(k-=k%1e3))/6e4},f=n.prototype;f.tz=function(h,y){h===void 0&&(h=i);var S,g=this.utcOffset(),v=this.toDate(),R=v.toLocaleString("en-US",{timeZone:h}),I=Math.round((v-new Date(R))/1e3/60),x=15*-Math.round(v.getTimezoneOffset()/15)-I;if(!Number(x))S=this.utcOffset(0,y);else if(S=o(R,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(x,!0),y){var T=S.utcOffset();S=S.add(g-T,"minute")}return S.$x.$timezone=h,S},f.offsetName=function(h){var y=this.$x.$timezone||o.tz.guess(),S=a(this.valueOf(),y,{timeZoneName:h}).find(function(g){return g.type.toLowerCase()==="timezonename"});return S&&S.value};var s=f.startOf;f.startOf=function(h,y){if(!this.$x||!this.$x.$timezone)return s.call(this,h,y);var S=o(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return s.call(S,h,y).tz(this.$x.$timezone,!0)},o.tz=function(h,y,S){var g=S&&y,v=S||y||i,R=m(+o(),v);if(typeof h!="string")return o(h).tz(v);var I=function(E,N,k){var P=E-60*N*1e3,F=m(P,k);if(N===F)return[P,N];var O=m(P-=60*(F-N)*1e3,k);return F===O?[P,F]:[E-60*Math.min(F,O)*1e3,Math.max(F,O)]}(o.utc(h,g).valueOf(),R,v),x=I[0],T=I[1],A=o(x).utcOffset(T);return A.$x.$timezone=v,A},o.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},o.tz.setDefault=function(h){i=h}}})});var hd=Se((ds,ps)=>{"use strict";p();u();d();l();(function(e,t){typeof ds=="object"&&typeof ps<"u"?ps.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof C<"u"?C:e||self).dayjs_plugin_utc=t()})(ds,function(){"use strict";var e="minute",t=/[+-]\d\d(?::?\d\d)?/g,r=/([+-]|\d\d)/g;return function(n,o,i){var a=o.prototype;i.utc=function(g){var v={date:g,utc:!0,args:arguments};return new o(v)},a.utc=function(g){var v=i(this.toDate(),{locale:this.$L,utc:!0});return g?v.add(this.utcOffset(),e):v},a.local=function(){return i(this.toDate(),{locale:this.$L,utc:!1})};var m=a.parse;a.parse=function(g){g.utc&&(this.$u=!0),this.$utils().u(g.$offset)||(this.$offset=g.$offset),m.call(this,g)};var f=a.init;a.init=function(){if(this.$u){var g=this.$d;this.$y=g.getUTCFullYear(),this.$M=g.getUTCMonth(),this.$D=g.getUTCDate(),this.$W=g.getUTCDay(),this.$H=g.getUTCHours(),this.$m=g.getUTCMinutes(),this.$s=g.getUTCSeconds(),this.$ms=g.getUTCMilliseconds()}else f.call(this)};var s=a.utcOffset;a.utcOffset=function(g,v){var R=this.$utils().u;if(R(g))return this.$u?0:R(this.$offset)?s.call(this):this.$offset;if(typeof g=="string"&&(g=function(A){A===void 0&&(A="");var E=A.match(t);if(!E)return null;var N=(""+E[0]).match(r)||["-",0,0],k=N[0],P=60*+N[1]+ +N[2];return P===0?0:k==="+"?P:-P}(g),g===null))return this;var I=Math.abs(g)<=16?60*g:g,x=this;if(v)return x.$offset=I,x.$u=g===0,x;if(g!==0){var T=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(x=this.local().add(I+T,e)).$offset=I,x.$x.$localOffset=T}else x=this.utc();return x};var h=a.format;a.format=function(g){var v=g||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return h.call(this,v)},a.valueOf=function(){var g=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*g},a.isUTC=function(){return!!this.$u},a.toISOString=function(){return this.toDate().toISOString()},a.toString=function(){return this.toDate().toUTCString()};var y=a.toDate;a.toDate=function(g){return g==="s"&&this.$offset?i(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():y.call(this)};var S=a.diff;a.diff=function(g,v,R){if(g&&this.$u===g.$u)return S.call(this,g,v,R);var I=this.local(),x=i(g).local();return S.call(I,x,v,R)}}})});var Fd=Se((f_,Td)=>{"use strict";p();u();d();l();function rv(e){try{return JSON.stringify(e)}catch{return"\"[Circular]\""}}Td.exports=nv;function nv(e,t,r){var n=r&&r.stringify||rv,o=1;if(typeof e=="object"&&e!==null){var i=t.length+o;if(i===1)return e;var a=new Array(i);a[0]=n(e);for(var m=1;m<i;m++)a[m]=n(t[m]);return a.join(" ")}if(typeof e!="string")return e;var f=t.length;if(f===0)return e;for(var s="",h=1-o,y=-1,S=e&&e.length||0,g=0;g<S;){if(e.charCodeAt(g)===37&&g+1<S){switch(y=y>-1?y:0,e.charCodeAt(g+1)){case 100:case 102:if(h>=f||t[h]==null)break;y<g&&(s+=e.slice(y,g)),s+=Number(t[h]),y=g+2,g++;break;case 105:if(h>=f||t[h]==null)break;y<g&&(s+=e.slice(y,g)),s+=Math.floor(Number(t[h])),y=g+2,g++;break;case 79:case 111:case 106:if(h>=f||t[h]===void 0)break;y<g&&(s+=e.slice(y,g));var v=typeof t[h];if(v==="string"){s+="'"+t[h]+"'",y=g+2,g++;break}if(v==="function"){s+=t[h].name||"<anonymous>",y=g+2,g++;break}s+=n(t[h]),y=g+2,g++;break;case 115:if(h>=f)break;y<g&&(s+=e.slice(y,g)),s+=String(t[h]),y=g+2,g++;break;case 37:y<g&&(s+=e.slice(y,g)),s+="%",y=g+2,g++,h--;break}++h}++g}return y===-1?e:(y<S&&(s+=e.slice(y)),s)}});var Nd=Se((S_,zo)=>{"use strict";p();u();d();l();var kd=Fd();zo.exports=dt;var Rn=Sv().console||{},ov={mapHttpRequest:Ho,mapHttpResponse:Ho,wrapRequestSerializer:hs,wrapResponseSerializer:hs,wrapErrorSerializer:hs,req:Ho,res:Ho,err:Dd,errWithCause:Dd};function Et(e,t){return e==="silent"?1/0:t.levels.values[e]}var vs=Symbol("pino.logFuncs"),ys=Symbol("pino.hierarchy"),iv={error:"log",fatal:"error",warn:"error",info:"log",debug:"log",trace:"log"};function Od(e,t){let r={logger:t,parent:e[ys]};t[ys]=r}function av(e,t,r){let n={};t.forEach(o=>{n[o]=r[o]?r[o]:Rn[o]||Rn[iv[o]||"log"]||Dr}),e[vs]=n}function sv(e,t){return Array.isArray(e)?e.filter(function(n){return n!=="!stdSerializers.err"}):e===!0?Object.keys(t):!1}function dt(e){e=e||{},e.browser=e.browser||{};let t=e.browser.transmit;if(t&&typeof t.send!="function")throw Error("pino: transmit option must have a send function");let r=e.browser.write||Rn;e.browser.write&&(e.browser.asObject=!0);let n=e.serializers||{},o=sv(e.browser.serialize,n),i=e.browser.serialize;Array.isArray(e.browser.serialize)&&e.browser.serialize.indexOf("!stdSerializers.err")>-1&&(i=!1);let a=Object.keys(e.customLevels||{}),m=["error","fatal","warn","info","debug","trace"].concat(a);typeof r=="function"&&m.forEach(function(R){r[R]=r}),(e.enabled===!1||e.browser.disabled)&&(e.level="silent");let f=e.level||"info",s=Object.create(r);s.log||(s.log=Dr),av(s,m,r),Od({},s),Object.defineProperty(s,"levelVal",{get:y}),Object.defineProperty(s,"level",{get:S,set:g});let h={transmit:t,serialize:o,asObject:e.browser.asObject,formatters:e.browser.formatters,levels:m,timestamp:gv(e),messageKey:e.messageKey||"msg",onChild:e.onChild||Dr};s.levels=cv(e),s.level=f,s.setMaxListeners=s.getMaxListeners=s.emit=s.addListener=s.on=s.prependListener=s.once=s.prependOnceListener=s.removeListener=s.removeAllListeners=s.listeners=s.listenerCount=s.eventNames=s.write=s.flush=Dr,s.serializers=n,s._serialize=o,s._stdErrSerialize=i,s.child=function(...R){return v.call(this,h,...R)},t&&(s._logEvent=Ss());function y(){return Et(this.level,this)}function S(){return this._level}function g(R){if(R!=="silent"&&!this.levels.values[R])throw Error("unknown level "+R);this._level=R,Gt(this,h,s,"error"),Gt(this,h,s,"fatal"),Gt(this,h,s,"warn"),Gt(this,h,s,"info"),Gt(this,h,s,"debug"),Gt(this,h,s,"trace"),a.forEach(I=>{Gt(this,h,s,I)})}function v(R,I,x){if(!I)throw new Error("missing bindings for child Pino");x=x||{},o&&I.serializers&&(x.serializers=I.serializers);let T=x.serializers;if(o&&T){var A=Object.assign({},n,T),E=e.browser.serialize===!0?Object.keys(A):o;delete I.serializers,Cs([I],E,A,this._stdErrSerialize)}function N(P){this._childLevel=(P._childLevel|0)+1,this.bindings=I,A&&(this.serializers=A,this._serialize=E),t&&(this._logEvent=Ss([].concat(P._logEvent.bindings,I)))}N.prototype=this;let k=new N(this);return Od(this,k),k.child=function(...P){return v.call(this,R,...P)},k.level=x.level||this.level,R.onChild(k),k}return s}function cv(e){let t=e.customLevels||{},r=Object.assign({},dt.levels.values,t),n=Object.assign({},dt.levels.labels,uv(t));return{values:r,labels:n}}function uv(e){let t={};return Object.keys(e).forEach(function(r){t[e[r]]=r}),t}dt.levels={values:{fatal:60,error:50,warn:40,info:30,debug:20,trace:10},labels:{10:"trace",20:"debug",30:"info",40:"warn",50:"error",60:"fatal"}};dt.stdSerializers=ov;dt.stdTimeFunctions=Object.assign({},{nullTime:Md,epochTime:qd,unixTime:hv,isoTime:yv});function lv(e){let t=[];e.bindings&&t.push(e.bindings);let r=e[ys];for(;r.parent;)r=r.parent,r.logger.bindings&&t.push(r.logger.bindings);return t.reverse()}function Gt(e,t,r,n){if(Object.defineProperty(e,n,{value:Et(e.level,r)>Et(n,r)?Dr:r[vs][n],writable:!0,enumerable:!0,configurable:!0}),e[n]===Dr){if(!t.transmit)return;let i=t.transmit.level||e.level,a=Et(i,r);if(Et(n,r)<a)return}e[n]=pv(e,t,r,n);let o=lv(e);o.length!==0&&(e[n]=dv(o,e[n]))}function dv(e,t){return function(){return t.apply(this,[...e,...arguments])}}function pv(e,t,r,n){return function(o){return function(){let a=t.timestamp(),m=new Array(arguments.length),f=Object.getPrototypeOf&&Object.getPrototypeOf(this)===Rn?Rn:this;for(var s=0;s<m.length;s++)m[s]=arguments[s];var h=!1;if(t.serialize&&(Cs(m,this._serialize,this.serializers,this._stdErrSerialize),h=!0),t.asObject||t.formatters?o.call(f,fv(this,n,m,a,t)):o.apply(f,m),t.transmit){let y=t.transmit.level||e._level,S=Et(y,r),g=Et(n,r);if(g<S)return;mv(this,{ts:a,methodLevel:n,methodValue:g,transmitLevel:y,transmitValue:r.levels.values[t.transmit.level||e._level],send:t.transmit.send,val:Et(e._level,r)},m,h)}}}(e[vs][n])}function fv(e,t,r,n,o){let{level:i,log:a=S=>S}=o.formatters||{},m=r.slice(),f=m[0],s={};if(n&&(s.time=n),i){let S=i(t,e.levels.values[t]);Object.assign(s,S)}else s.level=e.levels.values[t];let h=(e._childLevel|0)+1;if(h<1&&(h=1),f!==null&&typeof f=="object"){for(;h--&&typeof m[0]=="object";)Object.assign(s,m.shift());f=m.length?kd(m.shift(),m):void 0}else typeof f=="string"&&(f=kd(m.shift(),m));return f!==void 0&&(s[o.messageKey]=f),a(s)}function Cs(e,t,r,n){for(let o in e)if(n&&e[o]instanceof Error)e[o]=dt.stdSerializers.err(e[o]);else if(typeof e[o]=="object"&&!Array.isArray(e[o])&&t)for(let i in e[o])t.indexOf(i)>-1&&i in r&&(e[o][i]=r[i](e[o][i]))}function mv(e,t,r,n=!1){let o=t.send,i=t.ts,a=t.methodLevel,m=t.methodValue,f=t.val,s=e._logEvent.bindings;n||Cs(r,e._serialize||Object.keys(e.serializers),e.serializers,e._stdErrSerialize===void 0?!0:e._stdErrSerialize),e._logEvent.ts=i,e._logEvent.messages=r.filter(function(h){return s.indexOf(h)===-1}),e._logEvent.level.label=a,e._logEvent.level.value=m,o(a,e._logEvent,f),e._logEvent=Ss(s)}function Ss(e){return{ts:0,messages:[],bindings:e||[],level:{label:"",value:0}}}function Dd(e){let t={type:e.constructor.name,msg:e.message,stack:e.stack};for(let r in e)t[r]===void 0&&(t[r]=e[r]);return t}function gv(e){return typeof e.timestamp=="function"?e.timestamp:e.timestamp===!1?Md:qd}function Ho(){return{}}function hs(e){return e}function Dr(){}function Md(){return!1}function qd(){return Date.now()}function hv(){return Math.round(Date.now()/1e3)}function yv(){return new Date(Date.now()).toISOString()}function Sv(){function e(t){return typeof t<"u"&&t}try{return typeof C<"u"?C:(Object.defineProperty(Object.prototype,"globalThis",{get:function(){return delete Object.prototype.globalThis,this.globalThis=this},configurable:!0}),C)}catch{return e(self)||e(window)||e(this)||{}}}zo.exports.default=dt;zo.exports.pino=dt});var BC={};Ds(BC,{DefaultFieldsToInclude:()=>As,EcommerceDefaultFieldsToInclude:()=>Kd,HighlightUtils:()=>Mi,MinimumFieldsToInclude:()=>ri,ResultTemplatesHelpers:()=>$p,buildContext:()=>Lp,buildController:()=>_t,buildDictionaryFieldContext:()=>jp,buildInteractiveResult:()=>_p,buildRecommendationEngine:()=>Qd,buildRecommendationList:()=>qp,buildResultTemplatesManager:()=>Bp,getAnalyticsNextApiBaseUrl:()=>Vn,getOrganizationEndpoint:()=>Ie,getSampleRecommendationEngineConfiguration:()=>bs,loadAdvancedSearchQueryActions:()=>Ev,loadClickAnalyticsActions:()=>_v,loadConfigurationActions:()=>xv,loadContextActions:()=>Iv,loadDebugActions:()=>qv,loadDictionaryFieldContextActions:()=>Tv,loadFieldActions:()=>Ov,loadPaginationActions:()=>ks,loadPipelineActions:()=>Dv,loadRecommendationActions:()=>Nv,loadSearchConfigurationActions:()=>Rv,loadSearchHubActions:()=>Mv});module.exports=Jp(BC);p();u();d();l();var Mi={};Ds(Mi,{escape:()=>rr,getHighlightedSuggestion:()=>qf,highlightString:()=>Mf});p();u();d();l();p();u();d();l();function If(e,t){let r=`
|
|
20
20
|
The following properties are invalid:
|
|
21
21
|
|
|
22
22
|
${e.join(`
|
|
23
23
|
`)}
|
|
24
24
|
|
|
25
25
|
${t}
|
|
26
|
-
`;return new $r(r)}var $r=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 xf(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 Rf(e){return e===null}function J(e){return ye(e)||Rf(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||(Ef(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 Ef(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||(If(e)?null:"value is not a boolean.")}get default(){return this.value.default}get required(){return this.value.required}};function If(e){return ye(e)||Gs(e)}function Gs(e){return typeof e=="boolean"}var Pf=/^\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&&!(Pf.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 ki=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 Tf=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=>Tf.has(r))}function ec(e){let t={};for(let[r,n]of e)t[r]=n;return t}function Hr(e){if(typeof e!="object"||!e)return e;try{return JSON.parse(JSON.stringify(e))}catch{return e}}function Ff(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 kf(e,t){return e=er(e),e.replace(/\[(.*?)\]|\{(.*?)\}|\((.*?)\)/g,(r,n,o,i)=>n?Oi(n,t.notMatchDelimiters):o?Oi(o,t.exactMatchDelimiters):i?Oi(i,t.correctionDelimiters):r)}function Oi(e,t){return t?t.open+e+t.close:e}function er(e){let t={"&":"&","<":"<",">":">","\"":""","'":"'","`":"`"},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?Of(e):Df(t)},Of=e=>qf(e)?Nf(e):Mf(e)?e.body:{message:"unknown",statusCode:0,type:"unknown"},Df=e=>{let t=JSON.parse(JSON.stringify(e,Object.getOwnPropertyNames(e)));return{...t,message:`Client side error: ${t.message||""}`,statusCode:400,type:"ClientError"}};function Mf(e){return e.body.statusCode!==void 0}function qf(e){return e.body.exception!==void 0}var Nf=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 cm="recommendation-internal-options",VA=Symbol.for(cm);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 Lt=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(um)}function um(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"}function mc(e){return e===429}var Le=class e{static call(t){return _asyncToGenerator(function*(){let r=lm(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 h=s&&mc(s.status);return h&&n.info("Platform retrying request"),h}});switch(f.status){case 419:case 401:throw n.info("Platform renewing token"),new tr;case 404:throw new Lt(i,f.status);default:return n.info({response:f,requestInfo:o},"Platform response"),f}}catch(f){return f.message==="Failed to fetch"?new Lt(i):f}})()}static preprocessRequest(t,r){return _asyncToGenerator(function*(){let{origin:n,preprocessRequest:o,logger:i,requestMetadata:a}=r,{signal:m,...f}=t,s=Hr(f);try{let h=yield o(t,n,a);return{...t,...h}}catch(h){i.error(h,"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 lm(e){let{url:t,method:r,requestParams:n,contentType:o,accessToken:i,signal:a}=e,m=e.method==="POST"||e.method==="PUT",f=dm(n,o);return{url:t,method:r,headers:{"Content-Type":o,Authorization:`Bearer ${i}`,...e.headers},...(m&&{body:f}),signal:a}}function dm(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 Gr=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 Gr(`${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 Le.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 pm(a)?{success:a}:{error:dt({response:r,body:a})}});return function yc(_x,_x2){return _ref2.apply(this,arguments)}}();function pm(e){return typeof e=="string"}p();u();d();l();function fm(e){return{statusCode:e.statusCode,type:e.name,message:e.message}}function mm(e){return{statusCode:e.code,type:e.name,message:e.message,ignored:!0}}function _n(e,t){if(t&&e.name==="AbortError")return{error:mm(e)};if(e instanceof Lt)return{error:fm(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 Le.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 hm(n)?{success:n}:{error:dt({response:r,body:n})}})()}querySuggest(t){var _this3=this;return _asyncToGenerator(function*(){let r=yield Le.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 gm(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=>Le.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 Le.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 Le.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 Le.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 ym(n)?{success:n}:{error:dt({response:r,body:n})}})()}},Ln=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 gm(e){return e.completions!==void 0}function hm(e){return e.preprocessingOutput!==void 0}function ym(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 Sm=typeof Symbol=="function"&&Symbol.observable||"@@observable",Cc=Sm,Bi=()=>Math.random().toString(36).substring(7).split("").join("."),vm={INIT:`@@redux/INIT${Bi()}`,REPLACE:`@@redux/REPLACE${Bi()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Bi()}`},jn=vm;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 Qi(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(Qi)(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((E,I)=>{a.set(I,E)}))}function h(){if(f)throw new Error(Se(3));return o}function S(E){if(typeof E!="function")throw new Error(Se(4));if(f)throw new Error(Se(5));let I=!0;s();let b=m++;return a.set(b,E),function(){if(I){if(f)throw new Error(Se(6));I=!1,s(),a.delete(b),i=null}}}function y(E){if(!ze(E))throw new Error(Se(7));if(typeof E.type>"u")throw new Error(Se(8));if(typeof E.type!="string")throw new Error(Se(17));if(f)throw new Error(Se(9));try{f=!0,o=n(o,E)}finally{f=!1}return(i=a).forEach(b=>{b()}),E}function g(E){if(typeof E!="function")throw new Error(Se(10));n=E,y({type:jn.REPLACE})}function v(){let E=S;return{subscribe(I){if(typeof I!="object"||I===null)throw new Error(Se(11));function b(){let T=I;T.next&&T.next(h())}return b(),{unsubscribe:E(b)}},[Cc](){return this}}}return y({type:jn.INIT}),{dispatch:y,subscribe:S,getState:h,replaceReducer:g,[Cc]:v}}function Cm(e){Object.keys(e).forEach(t=>{let r=e[t];if(typeof r(void 0,{type:jn.INIT})>"u")throw new Error(Se(12));if(typeof r(void 0,{type:jn.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{Cm(r)}catch(a){i=a}return function(m={},f){if(i)throw i;let s=!1,h={};for(let S=0;S<n.length;S++){let y=n[S],g=r[y],v=m[y],C=g(v,f);if(typeof C>"u"){let E=f&&f.type;throw new Error(Se(14))}h[y]=C,s=s||C!==v}return s=s||n.length!==Object.keys(m).length,s?h: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 Zi=Symbol.for("immer-nothing"),Kr=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[Kr]||!!e.constructor?.[Kr]||en(e)||tn(e):!1}var bm=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)===bm}function ea(e){return Oe(e)||ve(15,e),e[Pe].base_}function Yr(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:en(e)?2:tn(e)?3:0}function Jr(e,t){return Bt(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function $i(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 Am(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function en(e){return e instanceof Map}function tn(e){return e instanceof Set}function jt(e){return e.copy_||e.base_}function Wi(e,t){if(en(e))return new Map(e);if(tn(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=wm),Object.freeze(e),t&&Object.entries(e).forEach(([r,n])=>$n(n,!0))),e}function wm(){ve(2)}function Hn(e){return Object.isFrozen(e)}var Gi={};function Qt(e){let t=Gi[e];return t||ve(0,e),t}function xm(e,t){Gi[e]||(Gi[e]=t)}var Xr;function Pc(){return Xr}function Rm(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 Ki(e){Yi(e),e.drafts_.forEach(Em),e.drafts_=null}function Yi(e){e===Xr&&(Xr=e.parent_)}function wc(e){return Xr=Rm(Xr,e)}function Em(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_&&(Ki(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,[]),Ki(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Zi?e:void 0}function Bn(e,t,r){if(Hn(t))return t;let n=t[Pe];if(!n)return Yr(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),Yr(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&&!Jr(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 Im(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=ta;r&&(o=[n],i=Zr);let{revoke:a,proxy:m}=Proxy.revocable(o,i);return n.draft_=m,n.revoke_=a,m}var ta={get(e,t){if(t===Pe)return e;let r=jt(e);if(!Jr(r,t))return Pm(e,r,t);let n=r[t];return e.finalized_||!Te(n)?n:n===Hi(e.base_,t)?(zi(e),e.copy_[t]=Xi(n,e)):n},has(e,t){return t in jt(e)},ownKeys(e){return Reflect.ownKeys(jt(e))},set(e,t,r){let n=Tc(jt(e),t);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){let o=Hi(jt(e),t),i=o?.[Pe];if(i&&i.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(Am(r,o)&&(r!==void 0||Jr(e.base_,t)))return!0;zi(e),Ji(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 Hi(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,zi(e),Ji(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let r=jt(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)}},Zr={};Yr(ta,(e,t)=>{Zr[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});Zr.deleteProperty=function(e,t){return Zr.set.call(this,e,t,void 0)};Zr.set=function(e,t,r){return ta.set.call(this,e[0],t,r,e[0])};function Hi(e,t){let r=e[Pe];return(r?jt(r):e)[t]}function Pm(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 Ji(e){e.modified_||(e.modified_=!0,e.parent_&&Ji(e.parent_))}function zi(e){e.copy_||(e.copy_=Wi(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Tm=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,h=>r.call(this,h,...s))}}typeof r!="function"&&ve(6),n!==void 0&&typeof n!="function"&&ve(7);let o;if(Te(t)){let i=wc(this),a=Xi(t,void 0),m=!0;try{o=r(a),m=!1}finally{m?Ki(i):Yi(i)}return Ac(i,n),xc(o,i)}else if(!t||typeof t!="object"){if(o=r(t),o===void 0&&(o=t),o===Zi&&(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=Xi(e,void 0);return r[Pe].isManual_=!0,Yi(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 Xi(e,t){let r=en(e)?Qt("MapSet").proxyMap_(e,t):tn(e)?Qt("MapSet").proxySet_(e,t):Im(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=Wi(e,t.scope_.immer_.useStrictShallowCopy_)}else r=Wi(e,!0);return Yr(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,g,v,C){switch(y.type_){case 0:case 2:return a(y,g,v,C);case 1:return i(y,g,v,C);case 3:return m(y,g,v,C)}}function i(y,g,v,C){let{base_:E,assigned_:I}=y,b=y.copy_;b.length<E.length&&([E,b]=[b,E],[v,C]=[C,v]);for(let R=0;R<E.length;R++)if(I[R]&&b[R]!==E[R]){let T=g.concat([R]);v.push({op:t,path:T,value:S(b[R])}),C.push({op:t,path:T,value:S(E[R])})}for(let R=E.length;R<b.length;R++){let T=g.concat([R]);v.push({op:r,path:T,value:S(b[R])})}for(let R=b.length-1;E.length<=R;--R){let T=g.concat([R]);C.push({op:n,path:T})}}function a(y,g,v,C){let{base_:E,copy_:I}=y;Yr(y.assigned_,(b,R)=>{let T=$i(E,b),_=$i(I,b),F=R?Jr(E,b)?t:r:n;if(T===_&&F===t)return;let P=g.concat(b);v.push(F===n?{op:F,path:P}:{op:F,path:P,value:_}),C.push(F===r?{op:n,path:P}:F===n?{op:r,path:P,value:S(T)}:{op:t,path:P,value:S(T)})})}function m(y,g,v,C){let{base_:E,copy_:I}=y,b=0;E.forEach(R=>{if(!I.has(R)){let T=g.concat([b]);v.push({op:n,path:T,value:R}),C.unshift({op:r,path:T,value:R})}b++}),b=0,I.forEach(R=>{if(!E.has(R)){let T=g.concat([b]);v.push({op:r,path:T,value:R}),C.unshift({op:n,path:T,value:R})}b++})}function f(y,g,v,C){v.push({op:t,path:[],value:g===Zi?void 0:g}),C.push({op:t,path:[],value:y})}function s(y,g){return g.forEach(v=>{let{path:C,op:E}=v,I=y;for(let _=0;_<C.length-1;_++){let F=Bt(I),P=C[_];typeof P!="string"&&typeof P!="number"&&(P=""+P),(F===0||F===1)&&(P==="__proto__"||P==="constructor")&&ve(19),typeof I=="function"&&P==="prototype"&&ve(19),I=$i(I,P),typeof I!="object"&&ve(18,C.join("/"))}let b=Bt(I),R=h(v.value),T=C[C.length-1];switch(E){case t:switch(b){case 2:return I.set(T,R);case 3:ve(16);default:return I[T]=R}case r:switch(b){case 1:return T==="-"?I.push(R):I.splice(T,0,R);case 2:return I.set(T,R);case 3:return I.add(R);default:return I[T]=R}case n:switch(b){case 1:return I.splice(T,1);case 2:return I.delete(T);case 3:return I.delete(v.value);default:return delete I[T]}default:ve(17,E)}}),y}function h(y){if(!Te(y))return y;if(Array.isArray(y))return y.map(h);if(en(y))return new Map(Array.from(y.entries()).map(([v,C])=>[v,h(C)]));if(tn(y))return new Set(Array.from(y).map(h));let g=Object.create(Ut(y));for(let v in y)g[v]=h(y[v]);return Jr(y,Kr)&&(g[Kr]=y[Kr]),g}function S(y){return Oe(y)?h(y):y}xm("Patches",{applyPatches_:s,generatePatches_:o,generateReplacementPatches_:f})}var De=new Tm,rt=De.produce,zn=De.produceWithPatches.bind(De),yx=De.setAutoFreeze.bind(De),Sx=De.setUseStrictShallowCopy.bind(De),ra=De.applyPatches.bind(De),vx=De.createDraft.bind(De),Cx=De.finishDraft.bind(De);p();u();d();l();function Fm(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function km(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function Om(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 Dm(e){let t=Array.isArray(e[0])?e[0]:e;return Om(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function Mm(e,t){let r=[],{length:n}=e;for(let o=0;o<n;o++)r.push(e[o].apply(null,t));return r}var Ix=Symbol();var Px=Object.getPrototypeOf({});var qm=class{constructor(e){this.value=e}deref(){return this.value}},Nm=typeof WeakRef<"u"?WeakRef:qm,_m=0,Mc=1;function Wn(){return{s:_m,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 g=arguments[S];if(typeof g=="function"||typeof g=="object"&&g!==null){let v=m.o;v===null&&(m.o=v=new WeakMap);let C=v.get(g);C===void 0?(m=Wn(),v.set(g,m)):m=C}else{let v=m.p;v===null&&(m.p=v=new Map);let C=v.get(g);C===void 0?(m=Wn(),v.set(g,m)):m=C}}let s=m,h;if(m.s===Mc)h=m.v;else if(h=e.apply(null,arguments),i++,n){let S=o?.deref?.()??o;S!=null&&n(S,h)&&(h=S,i!==0&&i--),o=typeof h=="object"&&h!==null||typeof h=="function"?new Nm(h):h}return s.s=Mc,s.v=h,h}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()),Fm(s,`createSelector expects an output function after the inputs, but received: [${typeof s}]`);let h={...r,...f},{memoize:S,memoizeOptions:y=[],argsMemoize:g=or,argsMemoizeOptions:v=[],devModeChecks:C={}}=h,E=Dc(y),I=Dc(v),b=Dm(o),R=S(function(){return i++,s.apply(null,arguments)},...E),T=!0,_=g(function(){a++;let P=Mm(b,arguments);return m=R.apply(null,P),m},...I);return Object.assign(_,{resultFunc:s,memoizedResultFunc:R,dependencies:b,dependencyRecomputations:()=>a,resetDependencyRecomputations:()=>{a=0},lastResult:()=>m,recomputations:()=>i,resetRecomputations:()=>{i=0},memoize:S,argsMemoize:g})};return Object.assign(n,{withTypes:()=>n}),n}var pe=qc(or),Vm=Object.assign((e,t=pe)=>{km(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:()=>Vm});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 Lm=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)},zx=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 k(e,t){function r(...n){if(t){let o=t(...n);if(!o)throw new Error(je(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 rn extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,rn.prototype)}static get[Symbol.species](){return rn}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new rn(...t[0].concat(this)):new rn(...t.concat(this))}};function Lc(e){return Te(e)?rt(e,()=>{}):e}function jc(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function Um(e){return typeof e=="boolean"}var Bm=()=>function(t){let{thunk:r=!0,immutableCheck:n=!0,serializableCheck:o=!0,actionCreatorCheck:i=!0}=t??{},a=new Qc;return r&&(Um(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)},Qm=(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(h=>h()))};return Object.assign({},n,{subscribe(h){let S=()=>o&&h(),y=n.subscribe(S);return m.add(h),()=>{y(),m.delete(h)}},dispatch(h){try{return o=!h?.meta?.[mt],i=!o,i&&(a||(a=!0,f(s))),n.dispatch(h)}finally{o=!0}}})},$m=e=>function(r){let{autoBatch:n=!0}=r??{},o=new Qc(e);return n&&o.push(Qm(typeof n=="object"?n:void 0)),o};function $c(e){let t=Bm(),{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(je(1));let f;typeof n=="function"?f=n(t):f=t();let s=nr;o&&(s=Lm({trace:!1,...(typeof o=="object"&&o)}));let h=bc(...f),S=$m(h),y=typeof a=="function"?a(S):S(),g=s(...y);return Qi(m,i,g)}function Hc(e){let t={},r=[],n,o={addCase(i,a){let m=typeof i=="string"?i:i.type;if(!m)throw new Error(je(28));if(m in t)throw new Error(je(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 Hm(e){return typeof e=="function"}function de(e,t){let[r,n,o]=Hc(t),i;if(Hm(e))i=()=>Lc(e());else{let m=Lc(e);i=()=>m}function a(m=i(),f){let s=[r[f.type],...n.filter(({matcher:h})=>h(f)).map(({reducer:h})=>h)];return s.filter(h=>!!h).length===0&&(s=[o]),s.reduce((h,S)=>{if(S)if(Oe(h)){let g=S(h,f);return g===void 0?h:g}else{if(Te(h))return rt(h,y=>S(y,f));{let y=S(h,f);if(y===void 0){if(h===null)return h;throw Error("A case reducer on a non-draftable value must not return undefined")}return y}}return h},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 nn(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"]):nn(e)?We(...e.map(t=>t.pending)):Yn()(e[0])}function $t(...e){return e.length===0?t=>Kn(t,["rejected"]):nn(e)?We(...e.map(t=>t.rejected)):$t()(e[0])}function on(...e){let t=r=>r&&r.meta&&r.meta.rejectedWithValue;return e.length===0?ir($t(...e),t):nn(e)?ir($t(...e),t):on()(e[0])}function nt(...e){return e.length===0?t=>Kn(t,["fulfilled"]):nn(e)?We(...e.map(t=>t.fulfilled)):nt()(e[0])}function Jn(...e){return e.length===0?t=>Kn(t,["pending","fulfilled","rejected"]):nn(e)?We(...e.flatMap(t=>[t.pending,t.rejected,t.fulfilled])):Jn()(e[0])}var zm="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Xn=(e=21)=>{let t="",r=e;for(;r--;)t+=zm[Math.random()*64|0];return t},Wm=["name","message","stack","code"],na=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}},Gm=e=>{if(typeof e=="object"&&e!==null){let t={};for(let r of Wm)typeof e[r]=="string"&&(t[r]=e[r]);return t}return{message:String(e)}},oe=(()=>{function e(t,r,n){let o=k(t+"/fulfilled",(f,s,h,S)=>({payload:f,meta:{...(S||{}),arg:h,requestId:s,requestStatus:"fulfilled"}})),i=k(t+"/pending",(f,s,h)=>({payload:void 0,meta:{...(h||{}),arg:s,requestId:f,requestStatus:"pending"}})),a=k(t+"/rejected",(f,s,h,S,y)=>({payload:S,error:(n&&n.serializeError||Gm)(f||"Rejected"),meta:{...(y||{}),arg:h,requestId:s,rejectedWithValue:!!S,requestStatus:"rejected",aborted:f?.name==="AbortError",condition:f?.name==="ConditionError"}}));function m(f){return(s,h,S)=>{let y=n?.idGenerator?n.idGenerator(f):Xn(),g=new c.AbortController,v,C;function E(b){C=b,g.abort()}let I=_asyncToGenerator(function*(){let b;try{let T=n?.condition?.(f,{getState:h,extra:S});if(Ym(T)&&(T=yield T),T===!1||g.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let _=new Promise((F,P)=>{v=()=>{P({name:"AbortError",message:C||"Aborted"})},g.signal.addEventListener("abort",v)});s(i(y,f,n?.getPendingMeta?.({requestId:y,arg:f},{getState:h,extra:S}))),b=yield Promise.race([_,Promise.resolve(r(f,{dispatch:s,getState:h,extra:S,requestId:y,signal:g.signal,abort:E,rejectWithValue:(F,P)=>new na(F,P),fulfillWithValue:(F,P)=>new Bc(F,P)})).then(F=>{if(F instanceof na)throw F;return F instanceof Bc?o(F.payload,y,f,F.meta):o(F,y,f)})])}catch(T){b=T instanceof na?a(null,y,f,T.payload,T.meta):a(T,y,f)}finally{v&&g.signal.removeEventListener("abort",v)}return n&&!n.dispatchConditionRejection&&a.match(b)&&b.meta.condition||s(b),b})();return Object.assign(I,{abort:E,requestId:y,arg:f,unwrap(){return I.then(Km)}})}}return Object.assign(m,{pending:i,rejected:a,fulfilled:o,settled:We(a,o),typePrefix:t})}return e.withTypes=()=>e,e})();function Km(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function Ym(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var Wc=Symbol.for("rtk-slice-createasyncthunk"),Jx={[Wc]:oe};function Jm(e,t){return`${e}/${t}`}function Xm({creators:e}={}){let t=e?.asyncThunk?.[Wc];return function(n){let{name:o,reducerPath:i=o}=n;if(!o)throw new Error(je(11));typeof process<"u";let a=(typeof n.reducers=="function"?n.reducers(eg()):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(je(12));if(T in f.sliceCaseReducersByType)throw new Error(je(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:Jm(o,b),createNotation:typeof n.reducers=="function"};rg(R)?og(T,R,s,t):tg(T,R,s)});function h(){let[b={},R=[],T=void 0]=typeof n.extraReducers=="function"?Hc(n.extraReducers):[n.extraReducers],_={...b,...f.sliceCaseReducersByType};return de(n.initialState,F=>{for(let P in _)F.addCase(P,_[P]);for(let P of f.sliceMatchers)F.addMatcher(P.matcher,P.reducer);for(let P of R)F.addMatcher(P.matcher,P.reducer);T&&F.addDefaultCase(T)})}let S=b=>b,y=new Map,g;function v(b,R){return g||(g=h()),g(b,R)}function C(){return g||(g=h()),g.getInitialState()}function E(b,R=!1){function T(F){let P=F[b];return typeof P>"u"&&R&&(P=C()),P}function _(F=S){let P=jc(y,R,()=>new WeakMap);return jc(P,F,()=>{let N={};for(let[M,V]of Object.entries(n.selectors??{}))N[M]=Zm(V,F,C,R);return N})}return{reducerPath:b,getSelectors:_,get selectors(){return _(T)},selectSlice:T}}let I={name:o,reducer:v,actions:f.actionCreators,caseReducers:f.sliceCaseReducersByName,getInitialState:C,...E(i),injectInto(b,{reducerPath:R,...T}={}){let _=R??i;return b.inject({reducerPath:_,reducer:v},T),{...I,...E(_,!0)}}};return I}}function Zm(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=Xm();function eg(){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 tg({type:e,reducerName:t,createNotation:r},n,o){let i,a;if("reducer"in n){if(r&&!ng(n))throw new Error(je(17));i=n.reducer,a=n.prepare}else i=n;o.addCase(e,i).exposeCaseReducer(t,i).exposeAction(t,a?k(e,a):k(e))}function rg(e){return e._reducerDefinitionType==="asyncThunk"}function ng(e){return e._reducerDefinitionType==="reducerWithPrepare"}function og({type:e,reducerName:t},r,n,o){if(!o)throw new Error(je(18));let{payloadCreator:i,fulfilled:a,pending:m,rejected:f,settled:s,options:h}=r,S=o(e,i,h);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",Xx=`task-${Yc}`,Zx=`task-${Kc}`,eR=`${Gc}-${Yc}`,tR=`${Gc}-${Kc}`;var{assign:Jc}=Object;var oa="listenerMiddleware";var ig=Jc(k(`${oa}/add`),{withTypes:()=>ig}),rR=k(`${oa}/removeAll`),ag=Jc(k(`${oa}/remove`),{withTypes:()=>ag});var nR=Symbol.for("rtk-state-proxy-original");function je(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}),hR=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 $r(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.18.0",ru=["@coveo/atomic","@coveo/quantic"];var ia=()=>me,nu=()=>K,gt=k("configuration/updateBasicConfiguration",e=>U(e,{accessToken:me,environment:new B({required:!1,constrainTo:["prod","hipaa","stg","dev"]}),organizationId:me})),Ge=k("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})})),sg={enabled:new Z({default:!0}),originContext:ia(),originLevel2:ia(),originLevel3:ia(),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=k("configuration/updateAnalyticsConfiguration",e=>U(e,sg)),ur=k("configuration/analytics/disable"),lr=k("configuration/analytics/enable"),eo=k("configuration/analytics/originlevel2",e=>U(e,{originLevel2:nu()})),to=k("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=k("searchParameters/restore",e=>U(e,ou));p();u();d();l();var ro=k("debug/enable"),no=k("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=k("pipeline/set",e=>U(e,new B({required:!0,emptyAllowed:!0})));p();u();d();l();p();u();d();l();var cg=k("history/undo"),ug=k("history/redo"),Ke=k("history/snapshot"),PE=oe("history/back",/*#__PURE__*/function(){var _ref4=_asyncToGenerator(function*(e,{dispatch:t}){t(cg()),yield t(Fe())});return function(_x3,_x4){return _ref4.apply(this,arguments)}}()),TE=oe("history/forward",/*#__PURE__*/function(){var _ref5=_asyncToGenerator(function*(e,{dispatch:t}){t(ug()),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(h){try{s(n.next(h))}catch(S){a(S)}}function f(h){try{s(n.throw(h))}catch(S){a(S)}}function s(h){h.done?i(h.value):o(h.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 ca(){return typeof window<"u"}function ba(){return typeof navigator<"u"}function mr(){return typeof document<"u"}function ua(){try{return typeof localStorage<"u"}catch{return!1}}function lg(){try{return typeof sessionStorage<"u"}catch{return!1}}function Su(){return ba()&&navigator.cookieEnabled}var dg=[te.click,te.custom,te.search,te.view],pg=(e,t)=>dg.indexOf(e)!==-1?Object.assign({language:mr()?document.documentElement.lang:"unknown",userAgent:ba()?navigator.userAgent:"unknown"},t):t,cn=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 fg(){return ua()?localStorage:Su()?new un:lg()?sessionStorage:new hr}var un=class e{getItem(t){return cn.get(`${e.prefix}${t}`)}removeItem(t){cn.erase(`${e.prefix}${t}`)}setItem(t,r,n){cn.set(`${e.prefix}${t}`,r,n)}};un.prefix="coveo_";var la=class{constructor(){this.cookieStorage=new un}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){}},an="__coveo.analytics.history",vu=20,Cu=1e3*60,bu=75,yr=class{constructor(t){this.store=t||fg()}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(an);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(an);return t?JSON.parse(t):[]}catch{return[]}})}setHistory(t){try{this.store.setItem(an,JSON.stringify(t.slice(0,vu)))}catch{}}clear(){try{this.store.removeItem(an)}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:an,default:yr}),mg=(e,t)=>O(void 0,void 0,void 0,function*(){return e===te.view?(yield gg(t.contentIdValue),Object.assign({location:window.location.toString(),referrer:document.referrer,title:document.title},t)):t}),gg=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,hg=new Uint8Array(16);function yg(){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(hg)}var Sg=/^(?:[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"&&Sg.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 vg(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 Cg(e){e=unescape(encodeURIComponent(e));let t=[];for(let r=0;r<e.length;++r)t.push(e.charCodeAt(r));return t}var bg="6ba7b810-9dad-11d1-80b4-00c04fd430c8",Ag="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function wg(e,t,r){function n(o,i,a,m){var f;if(typeof o=="string"&&(o=Cg(o)),typeof i=="string"&&(i=vg(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 h=0;h<16;++h)a[m+h]=s[h];return a}return wu(s)}try{n.name=e}catch{}return n.DNS=bg,n.URL=Ag,n}var xg=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),au={randomUUID:xg};function zt(e,t,r){if(au.randomUUID&&!t&&!e)return au.randomUUID();e=e||{};let n=e.random||(e.rng||yg)();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 Rg(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 aa(e,t){return e<<t|e>>>32-t}function Eg(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 g=0;g<16;++g)m[g]=i[a][g];for(let g=16;g<80;++g)m[g]=aa(m[g-3]^m[g-8]^m[g-14]^m[g-16],1);let f=r[0],s=r[1],h=r[2],S=r[3],y=r[4];for(let g=0;g<80;++g){let v=Math.floor(g/20),C=aa(f,5)+Rg(v,s,h,S)+y+t[v]+m[g]>>>0;y=S,S=h,h=aa(s,30)>>>0,s=f,f=C}r[0]=r[0]+f>>>0,r[1]=r[1]+s>>>0,r[2]=r[2]+h>>>0,r[3]=r[3]+S>>>0,r[4]=r[4]+y>>>0}return[r[0]>>24&255,r[0]>>16&255,r[0]>>8&255,r[0]&255,r[1]>>24&255,r[1]>>16&255,r[1]>>8&255,r[1]&255,r[2]>>24&255,r[2]>>16&255,r[2]>>8&255,r[2]&255,r[3]>>24&255,r[3]>>16&255,r[3]>>8&255,r[3]&255,r[4]>>24&255,r[4]>>16&255,r[4]>>8&255,r[4]&255]}var Ig=wg("v5",80,Eg),su=Ig,xu="2.30.43",cu=e=>`${e.protocol}//${e.hostname}${e.pathname.indexOf("/")===0?e.pathname:`/${e.pathname}`}${e.search}`,sn={pageview:"pageview",event:"event"},uo=class{constructor({client:t,uuidGenerator:r=zt}){this.client=t,this.uuidGenerator=r}},da=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===sn.pageview&&(this.nextPageViewId=this.uuidGenerator(),this.hasSentFirstPageView=!0)}getNextValues(t,r){return{pageViewId:t===sn.pageview?this.nextPageViewId:this.pageViewId,referrer:t===sn.pageview&&this.hasSentFirstPageView?this.currentLocation:this.lastReferrer,location:t===sn.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 pa=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)}};pa.Id="link";var Ve=Object.keys;function so(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}var sa=128,Ru=192,uu=224,lu=240;function Pg(e){return(e&248)===lu?4:(e&lu)===uu?3:(e&uu)===Ru?2:1}function Tg(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&sa)!=sa)break;if(r-=3,(n&Ru)!=sa){t-r>=Pg(n)*3&&(r=t);break}}return e.substring(0,r)}var fa={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"},Fg=Ve(fa).map(e=>fa[e]),kg=[...Fg].join("|"),Og=new RegExp(`^(${kg}$)`),Dg={svcAction:"svc_action",svcActionData:"svc_action_data"},Mg=e=>Ve(e).filter(t=>e[t]!==void 0).reduce((t,r)=>{let n=fa[r]||r;return Object.assign(Object.assign({},t),{[n]:e[r]})},{}),qg=e=>Og.test(e),Ng=[qg],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"},_g=["loyaltyCardId","loyaltyTier","thirdPartyPersona","companyName","favoriteStore","storeName","userIndustry","userRole","userDepartment","businessUnit"],ma={id:"quoteId",affiliation:"quoteAffiliation"},ga={id:"reviewId",rating:"reviewRating",comment:"reviewComment"},Vg={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),ma),review:Object.assign(Object.assign({},we),ga)},Lg=Ve(du).map(e=>du[e]),jg=Ve(pu).map(e=>pu[e]),Ug=Ve(we).map(e=>we[e]),Bg=Ve(lo).map(e=>lo[e]),Qg=Ve(ga).map(e=>ga[e]),$g=Ve(ma).map(e=>ma[e]),Hg=[...Lg,"custom"].join("|"),zg=[...jg,"custom"].join("|"),Eu="(pr[0-9]+)",Iu="(il[0-9]+pi[0-9]+)",Wg=new RegExp(`^${Eu}(${Hg})$`),Gg=new RegExp(`^(${Iu}(${zg}))|(il[0-9]+nm)$`),Kg=new RegExp(`^(${Ug.join("|")})$`),Yg=new RegExp(`^(${Bg.join("|")})$`),Jg=new RegExp(`^${Eu}custom$`),Xg=new RegExp(`^${Iu}custom$`),Zg=new RegExp(`^(${[..._g,...Qg,...$g].join("|")})$`),eh=e=>Wg.test(e),th=e=>Gg.test(e),rh=e=>Kg.test(e),nh=e=>Yg.test(e),oh=e=>Zg.test(e),ih=[th,eh,rh,nh,oh],ah=[Jg,Xg],sh={anonymizeIp:"aip"},ch={eventCategory:"ec",eventAction:"ea",eventLabel:"el",eventValue:"ev",page:"dp",visitorId:"cid",clientId:"cid",userId:"uid",currencyCode:"cu"},uh={hitType:"t",pageViewId:"pid",encoding:"de",location:"dl",referrer:"dr",screenColor:"sd",screenResolution:"sr",title:"dt",userAgent:"ua",language:"ul",eventId:"z",time:"tm"},lh=["contentId","contentIdKey","contentType","searchHub","tab","searchUid","permanentId","contentLocale","trackingId"],dh=Object.assign(Object.assign(Object.assign(Object.assign({},sh),ch),uh),lh.reduce((e,t)=>Object.assign(Object.assign({},e),{[t]:t}),{})),ha=Object.assign(Object.assign({},dh),Dg),ph=e=>{let t=!!e.action&&Vg[e.action]||{};return Ve(e).reduce((r,n)=>{let o=t[n]||ha[n]||n;return Object.assign(Object.assign({},r),{[o]:e[n]})},{})},fh=Ve(ha).map(e=>ha[e]),mh=e=>fh.indexOf(e)!==-1,gh=e=>e==="custom",hh=e=>[...ih,...Ng,mh,gh].some(t=>t(e)),yh=e=>Ve(e).reduce((t,r)=>{let n=Sh(r);return n?Object.assign(Object.assign({},t),vh(n,e[r])):Object.assign(Object.assign({},t),{[r]:e[r]})},{}),Sh=e=>{let t;return[...ah].every(r=>{var n;return t=(n=r.exec(e))===null||n===void 0?void 0:n[1],!t}),t},vh=(e,t)=>Ve(t).reduce((r,n)=>Object.assign(Object.assign({},r),{[`${e}${n}`]:t[n]}),{}),ya=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}},Sa=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,h=it(f,["url"]),S;try{S=yield fu(s,h)}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"})}},va=class{constructor(t,r){ua()&&Su()?this.storage=new la:ua()?this.storage=localStorage:(console.warn("BrowserRuntime detected no valid storage available.",this),this.storage=new hr),this.client=new po(t),this.beaconClient=new ya(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}},Ca=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 Sa}getClientDependingOnEventType(t){return this.client}},Ch="xx",bh=e=>e?.startsWith(Ch)||!1,Ah=`
|
|
26
|
+
`;return new Wr(r)}var Wr=class extends Error{constructor(e){super(e),this.name="SchemaValidationError"}},Fe=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 If(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}},pe=class{constructor(e={}){this.baseConfig=e}validate(e){return this.baseConfig.required&&X(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 Ce(e){return e===void 0}function Tf(e){return e===null}function X(e){return Ce(e)||Tf(e)}var J=class{constructor(e={}){de(this,"value");this.config=e,this.value=new pe(e)}validate(e){let t=this.value.validate(e);return t||(Ff(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 Ff(e){return Ce(e)||Js(e)}function Js(e){return typeof e=="number"&&!isNaN(e)}var te=class{constructor(e={}){de(this,"value");this.value=new pe(e)}validate(e){let t=this.value.validate(e);return t||(kf(e)?null:"value is not a boolean.")}get default(){return this.value.default}get required(){return this.value.required}};function kf(e){return Ce(e)||Xs(e)}function Xs(e){return typeof e=="boolean"}var Of=/^\d{4}(-\d\d(-\d\d(T\d\d:\d\d(:\d\d)?(\.\d+)?(([+-]\d\d:\d\d)|Z)?)?)?)?$/i,H=class{constructor(e={}){de(this,"value");de(this,"config");this.config={emptyAllowed:!0,url:!1,...e},this.value=new pe(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(Ce(e))return null;if(!Dn(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&&!(Of.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 Dn(e){return Object.prototype.toString.call(e)==="[object String]"}var G=class{constructor(e={}){de(this,"config");this.config={options:{required:!1},values:{},...e}}validate(e){if(Ce(e))return this.config.options.required?"value is required and is currently undefined":null;if(!Zs(e))return"value is not an object";for(let[r,n]of Object.entries(this.config.values))if(n.required&&X(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 Zs(e){return e!==void 0&&typeof e=="object"}var ie=class{constructor(e={}){de(this,"value");this.config=e,this.value=new pe(this.config)}validate(e){if(!X(e)&&!Array.isArray(e))return"value is not an array";let t=this.value.validate(e);if(t!==null)return t;if(X(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&&X(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 Xs(e)||Dn(e)||Js(e)||Zs(e)?t.validate(e):"value is not a primitive value"}get default(){}get required(){return this.value.required}};function ec(e){return Array.isArray(e)}var Oi=class{constructor(e){de(this,"value");this.config=e,this.value=new pe(e)}validate(e){let t=this.value.validate(e);return t!==null?t:Ce(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 tc(e){return Array.isArray(e)}function Mn(e){return e.trim()===""}function rc(e,t){return[...e.reduce((r,n)=>{let o=t(n);return r.has(o)||r.set(o,n),r},new Map).values()]}var Df=new Set(["1",1,"yes",!0]);function nc(){if(typeof navigator>"u"||typeof window>"u")return!1;let e=navigator,t=window;return[e.globalPrivacyControl,e.doNotTrack,e.msDoNotTrack,t.doNotTrack].some(r=>Df.has(r))}function oc(e){let t={};for(let[r,n]of e)t[r]=n;return t}function Gr(e){if(typeof e!="object"||!e)return e;try{return JSON.parse(JSON.stringify(e))}catch{return e}}function Mf(e){if(Mn(e.openingDelimiter)||Mn(e.closingDelimiter))throw Error("delimiters should be a non-empty string");if(X(e.content)||Mn(e.content))return e.content;if(e.highlights.length===0)return rr(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+=rr(e.content.slice(n,a)),r+=e.openingDelimiter,r+=rr(e.content.slice(a,m)),r+=e.closingDelimiter,n=m}return n!==t&&(r+=rr(e.content.slice(n))),r}function qf(e,t){return e=rr(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 rr(e){let t={"&":"&","<":"<",">":">","\"":""","'":"'","`":"`"},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 qn=e=>e;p();u();d();l();var ic=e=>e,ac=e=>e,sc=e=>e;p();u();d();l();p();u();d();l();function Nn(){return{answerSnippet:"",documentId:{contentIdKey:"",contentIdValue:""},question:"",relatedQuestions:[],score:0}}function We(){return{response:{results:[],searchUid:"",totalCountFiltered:0,facets:[],generateAutomaticFacets:{facets:[]},queryCorrections:[],triggers:[],questionAnswer:Nn(),pipeline:"",splitTestRun:"",termsToHighlight:{},phrasesToHighlight:{},extendedResults:{}},duration:0,queryExecuted:"",error:null,automaticallyCorrected:!1,isLoading:!1,results:[],searchResponseId:"",requestId:"",questionAnswer:Nn(),extendedResults:{}}}p();u();d();l();function ft(e){let{url:t,accessToken:r,organizationId:n,authentication:o,...i}=e;return i}var mt=e=>{let{response:t}=e;return t.body?Nf(e):_f(t)},Nf=e=>Lf(e)?jf(e):Vf(e)?e.body:{message:"unknown",statusCode:0,type:"unknown"},_f=e=>{let t=JSON.parse(JSON.stringify(e,Object.getOwnPropertyNames(e)));return{...t,message:`Client side error: ${t.message||""}`,statusCode:400,type:"ClientError"}};function Vf(e){return e.body.statusCode!==void 0}function Lf(e){return e.body.exception!==void 0}var jf=e=>({message:e.body.exception.code,statusCode:e.response.status,type:e.body.exception.code});p();u();d();l();var vc=je(gc(),1);p();u();d();l();p();u();d();l();var pm="recommendation-internal-options",BA=Symbol.for(pm);var Ge=new Error("Failed to load reducers."),nr=class extends Error{constructor(){super(),this.name="ExpiredToken",this.message="The token being used to perform the request is expired."}};var Lt=class extends Error{constructor(r,n){super();de(this,"statusCode");this.name="Disconnected",this.message=`Client could not connect to the following URL: ${r}`,this.statusCode=n??0}};p();u();d();l();function hc(e){let t=[];for(let r in e){let n=encodeURIComponent(r),o=encodeURIComponent(e[r]);t.push(`${n}=${o}`)}return t.join("&")}function yc(e){return typeof e!="object"||!e?!1:Object.values(e).every(fm)}function fm(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"}function Sc(e){return e===429}var Qe=class e{static call(t){return _asyncToGenerator(function*(){let r=mm(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 b(i,a);if(Sc(f.status))throw f;return f});return function m(){return _ref.apply(this,arguments)}}();try{let f=yield(0,vc.backOff)(m,{retry:s=>{let h=s&&Sc(s.status);return h&&n.info("Platform retrying request"),h}});switch(f.status){case 419:case 401:throw n.info("Platform renewing token"),new nr;case 404:throw new Lt(i,f.status);default:return n.info({response:f,requestInfo:o},"Platform response"),f}}catch(f){return f.message==="Failed to fetch"?new Lt(i):f}})()}static preprocessRequest(t,r){return _asyncToGenerator(function*(){let{origin:n,preprocessRequest:o,logger:i,requestMetadata:a}=r,{signal:m,...f}=t,s=Gr(f);try{let h=yield o(t,n,a);return{...t,...h}}catch(h){i.error(h,"Platform request preprocessing failed. Returning default request options.")}return s})()}};function Ie(e,t="prod",r="platform"){let n=t==="prod"?"":t,o=r==="platform"?"":`.${r}`;return`https://${e}${o}.org${n}.coveo.com`}function gt(e,t="prod"){return`${Ie(e,t)}/rest/search/v2`}function Vn(e,t="prod"){return`${Ie(e,t,"analytics")}/rest/organizations/${e}/events/v1`}function mm(e){let{url:t,method:r,requestParams:n,contentType:o,accessToken:i,signal:a}=e,m=e.method==="POST"||e.method==="PUT",f=gm(n,o);return{url:t,method:r,headers:{"Content-Type":o,Authorization:`Bearer ${i}`,...e.headers},...(m&&{body:f}),signal:a}}function gm(e,t){return t==="application/x-www-form-urlencoded"?yc(e)?hc(e):"":JSON.stringify(e)}p();u();d();l();var ht=class{constructor(){de(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 Jr=class{constructor(t){de(this,"_basePath");de(this,"_params",{});this._basePath=t}addParam(t,r){this._params={...this.params,[t]:r}}get basePath(){return this._basePath}get params(){return this._params}get hasParams(){return Object.entries(this._params).length}get href(){return this.hasParams?`${this.basePath}?${Object.entries(this.params).map(([t,r])=>`${t}=${encodeURIComponent(r)}`).join("&")}`:this.basePath}};p();u();d();l();function Cc(e){return((e.headers.get("content-type")||"").split(";").find(n=>n.indexOf("charset=")!==-1)||"").split("=")[1]||"UTF-8"}p();u();d();l();var nt=(e,t,r,n)=>{let o=new Jr(`${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 bc=/*#__PURE__*/function(){var _ref2=_asyncToGenerator(function*(e,t){let r=yield Qe.call({...nt(e,"POST","application/x-www-form-urlencoded","/html"),requestParams:ft(e),requestMetadata:{method:"html"},...t});if(r instanceof Error)throw r;let n=Cc(r),o=yield r.arrayBuffer(),a=new TextDecoder(n).decode(o);return hm(a)?{success:a}:{error:mt({response:r,body:a})}});return function bc(_x,_x2){return _ref2.apply(this,arguments)}}();function hm(e){return typeof e=="string"}p();u();d();l();function ym(e){return{statusCode:e.statusCode,type:e.name,message:e.message}}function Sm(e){return{statusCode:e.code,type:e.name,message:e.message,ignored:!0}}function Ln(e,t){if(t&&e.name==="AbortError")return{error:Sm(e)};if(e instanceof Lt)return{error:ym(e)};throw e}var jn=class{constructor(t){this.options=t;de(this,"apiCallsQueues",{unknown:new ht,mainSearch:new ht,facetValues:new ht,foldingCollection:new ht,instantResults:new ht})}plan(t){var _this2=this;return _asyncToGenerator(function*(){let r=yield Qe.call({...nt(t,"POST","application/json","/plan"),requestParams:ft(t),requestMetadata:{method:"plan"},..._this2.options});if(r instanceof Error)return Ln(r);let n=yield r.json();return Cm(n)?{success:n}:{error:mt({response:r,body:n})}})()}querySuggest(t){var _this3=this;return _asyncToGenerator(function*(){let r=yield Qe.call({...nt(t,"POST","application/json","/querySuggest"),requestMetadata:{method:"querySuggest"},requestParams:ft(t),..._this3.options});if(r instanceof Error)return Ln(r);let n=yield r.json(),o={response:r,body:n};return vm(n)?{success:(yield _this3.options.postprocessQuerySuggestResponseMiddleware(o)).body}:{error:mt(o)}})()}search(t,r){var _this4=this;return _asyncToGenerator(function*(){let n=r?.origin??"unknown",o=yield _this4.apiCallsQueues[n].enqueue(m=>Qe.call({...nt(t,"POST","application/json",""),requestParams:ft(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 Ln(o,r?.disableAbortWarning);let i=yield o.json(),a={response:o,body:i};return Ac(i)?(a.body=wc(i),{success:(yield _this4.options.postprocessSearchResponseMiddleware(a)).body}):{error:mt(a)}})()}facetSearch(t){var _this5=this;return _asyncToGenerator(function*(){let r=yield Qe.call({...nt(t,"POST","application/json","/facet"),requestParams:ft(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 Qe.call({...nt(t,"POST","application/json",""),requestParams:ft(t),requestMetadata:{method:"recommendations"},..._this6.options});if(r instanceof Error)throw r;let n=yield r.json();if(Ac(n)){let o={response:r,body:n};return o.body=wc(n),{success:(yield _this6.options.postprocessSearchResponseMiddleware(o)).body}}return{error:mt({response:r,body:n})}})()}html(t){var _this7=this;return _asyncToGenerator(function*(){return bc(t,{..._this7.options})})()}fieldDescriptions(t){var _this8=this;return _asyncToGenerator(function*(){let r=yield Qe.call({...nt(t,"GET","application/json","/fields"),requestParams:{},requestMetadata:{method:"fieldDescriptions"},..._this8.options});if(r instanceof Error)throw r;let n=yield r.json();return bm(n)?{success:n}:{error:mt({response:r,body:n})}})()}},Un=e=>e.success!==void 0,ke=e=>e.error!==void 0;function Ac(e){return e.results!==void 0}function wc(e){let t=Nn();return X(e.questionAnswer)?(e.questionAnswer=t,e):(e.questionAnswer={...t,...e.questionAnswer},e)}function vm(e){return e.completions!==void 0}function Cm(e){return e.preprocessingOutput!==void 0}function bm(e){return e.fields!==void 0}p();u();d();l();p();u();d();l();p();u();d();l();function be(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 Am=typeof Symbol=="function"&&Symbol.observable||"@@observable",xc=Am,Qi=()=>Math.random().toString(36).substring(7).split("").join("."),wm={INIT:`@@redux/INIT${Qi()}`,REPLACE:`@@redux/REPLACE${Qi()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Qi()}`},Bn=wm;function Ke(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(be(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(be(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(be(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,x)=>{a.set(x,I)}))}function h(){if(f)throw new Error(be(3));return o}function y(I){if(typeof I!="function")throw new Error(be(4));if(f)throw new Error(be(5));let x=!0;s();let T=m++;return a.set(T,I),function(){if(x){if(f)throw new Error(be(6));x=!1,s(),a.delete(T),i=null}}}function S(I){if(!Ke(I))throw new Error(be(7));if(typeof I.type>"u")throw new Error(be(8));if(typeof I.type!="string")throw new Error(be(17));if(f)throw new Error(be(9));try{f=!0,o=n(o,I)}finally{f=!1}return(i=a).forEach(T=>{T()}),I}function g(I){if(typeof I!="function")throw new Error(be(10));n=I,S({type:Bn.REPLACE})}function v(){let I=y;return{subscribe(x){if(typeof x!="object"||x===null)throw new Error(be(11));function T(){let E=x;E.next&&E.next(h())}return T(),{unsubscribe:I(T)}},[xc](){return this}}}return S({type:Bn.INIT}),{dispatch:S,subscribe:y,getState:h,replaceReducer:g,[xc]:v}}function xm(e){Object.keys(e).forEach(t=>{let r=e[t];if(typeof r(void 0,{type:Bn.INIT})>"u")throw new Error(be(12));if(typeof r(void 0,{type:Bn.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(be(13))})}function or(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{xm(r)}catch(a){i=a}return function(m={},f){if(i)throw i;let s=!1,h={};for(let y=0;y<n.length;y++){let S=n[y],g=r[S],v=m[S],R=g(v,f);if(typeof R>"u"){let I=f&&f.type;throw new Error(be(14))}h[S]=R,s=s||R!==v}return s=s||n.length!==Object.keys(m).length,s?h:m}}function ir(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function Rc(...e){return t=>(r,n)=>{let o=t(r,n),i=()=>{throw new Error(be(15))},a={getState:o.getState,dispatch:(f,...s)=>i(f,...s)},m=e.map(f=>f(a));return i=ir(...m)(o.dispatch),{...o,dispatch:i}}}function Qn(e){return Ke(e)&&"type"in e&&typeof e.type=="string"}p();u();d();l();var ea=Symbol.for("immer-nothing"),Xr=Symbol.for("immer-draftable"),Oe=Symbol.for("immer-state");function Ae(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Ut=Object.getPrototypeOf;function Ne(e){return!!e&&!!e[Oe]}function De(e){return e?Fc(e)||Array.isArray(e)||!!e[Xr]||!!e.constructor?.[Xr]||nn(e)||on(e):!1}var Rm=Object.prototype.constructor.toString();function Fc(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)===Rm}function ta(e){return Ne(e)||Ae(15,e),e[Oe].base_}function Zr(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[Oe];return t?t.type_:Array.isArray(e)?1:nn(e)?2:on(e)?3:0}function en(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 kc(e,t,r){let n=Bt(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function Em(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function nn(e){return e instanceof Map}function on(e){return e instanceof Set}function jt(e){return e.copy_||e.base_}function Gi(e,t){if(nn(e))return new Map(e);if(on(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);let r=Fc(e);if(t===!0||t==="class_only"&&!r){let n=Object.getOwnPropertyDescriptors(e);delete n[Oe];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 zn(e,t=!1){return Wn(e)||Ne(e)||!De(e)||(Bt(e)>1&&(e.set=e.add=e.clear=e.delete=Pm),Object.freeze(e),t&&Object.entries(e).forEach(([r,n])=>zn(n,!0))),e}function Pm(){Ae(2)}function Wn(e){return Object.isFrozen(e)}var Ki={};function Qt(e){let t=Ki[e];return t||Ae(0,e),t}function Im(e,t){Ki[e]||(Ki[e]=t)}var tn;function Oc(){return tn}function Tm(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Ec(e,t){t&&(Qt("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Yi(e){Ji(e),e.drafts_.forEach(Fm),e.drafts_=null}function Ji(e){e===tn&&(tn=e.parent_)}function Pc(e){return tn=Tm(tn,e)}function Fm(e){let t=e[Oe];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Ic(e,t){t.unfinalizedDrafts_=t.drafts_.length;let r=t.drafts_[0];return e!==void 0&&e!==r?(r[Oe].modified_&&(Yi(t),Ae(4)),De(e)&&(e=$n(t,e),t.parent_||Hn(t,e)),t.patches_&&Qt("Patches").generateReplacementPatches_(r[Oe].base_,e,t.patches_,t.inversePatches_)):e=$n(t,r,[]),Yi(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==ea?e:void 0}function $n(e,t,r){if(Wn(t))return t;let n=t[Oe];if(!n)return Zr(t,(o,i)=>Tc(e,n,t,o,i,r)),t;if(n.scope_!==e)return t;if(!n.modified_)return Hn(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),Zr(i,(m,f)=>Tc(e,n,o,m,f,r,a)),Hn(e,o,!1),r&&e.patches_&&Qt("Patches").generatePatches_(n,r,e.patches_,e.inversePatches_)}return n.copy_}function Tc(e,t,r,n,o,i,a){if(Ne(o)){let m=i&&t&&t.type_!==3&&!en(t.assigned_,n)?i.concat(n):void 0,f=$n(e,o,m);if(kc(r,n,f),Ne(f))e.canAutoFreeze_=!1;else return}else a&&r.add(o);if(De(o)&&!Wn(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;$n(e,o),(!t||!t.scope_.parent_)&&typeof n!="symbol"&&Object.prototype.propertyIsEnumerable.call(r,n)&&Hn(e,o)}}function Hn(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&zn(t,r)}function km(e,t){let r=Array.isArray(e),n={type_:r?1:0,scope_:t?t.scope_:Oc(),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=rn);let{revoke:a,proxy:m}=Proxy.revocable(o,i);return n.draft_=m,n.revoke_=a,m}var ra={get(e,t){if(t===Oe)return e;let r=jt(e);if(!en(r,t))return Om(e,r,t);let n=r[t];return e.finalized_||!De(n)?n:n===zi(e.base_,t)?(Wi(e),e.copy_[t]=Zi(n,e)):n},has(e,t){return t in jt(e)},ownKeys(e){return Reflect.ownKeys(jt(e))},set(e,t,r){let n=Dc(jt(e),t);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){let o=zi(jt(e),t),i=o?.[Oe];if(i&&i.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(Em(r,o)&&(r!==void 0||en(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=jt(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty(){Ae(11)},getPrototypeOf(e){return Ut(e.base_)},setPrototypeOf(){Ae(12)}},rn={};Zr(ra,(e,t)=>{rn[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});rn.deleteProperty=function(e,t){return rn.set.call(this,e,t,void 0)};rn.set=function(e,t,r){return ra.set.call(this,e[0],t,r,e[0])};function zi(e,t){let r=e[Oe];return(r?jt(r):e)[t]}function Om(e,t,r){let n=Dc(t,r);return n?"value"in n?n.value:n.get?.call(e.draft_):void 0}function Dc(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 Dm=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,h=>r.call(this,h,...s))}}typeof r!="function"&&Ae(6),n!==void 0&&typeof n!="function"&&Ae(7);let o;if(De(t)){let i=Pc(this),a=Zi(t,void 0),m=!0;try{o=r(a),m=!1}finally{m?Yi(i):Ji(i)}return Ec(i,n),Ic(o,i)}else if(!t||typeof t!="object"){if(o=r(t),o===void 0&&(o=t),o===ea&&(o=void 0),this.autoFreeze_&&zn(o,!0),n){let i=[],a=[];Qt("Patches").generateReplacementPatches_(t,o,i,a),n(i,a)}return o}else Ae(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){De(e)||Ae(8),Ne(e)&&(e=Mc(e));let t=Pc(this),r=Zi(e,void 0);return r[Oe].isManual_=!0,Ji(t),r}finishDraft(e,t){let r=e&&e[Oe];(!r||!r.isManual_)&&Ae(9);let{scope_:n}=r;return Ec(n,t),Ic(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 Ne(e)?n(e,t):this.produce(e,o=>n(o,t))}};function Zi(e,t){let r=nn(e)?Qt("MapSet").proxyMap_(e,t):on(e)?Qt("MapSet").proxySet_(e,t):km(e,t);return(t?t.scope_:Oc()).drafts_.push(r),r}function Mc(e){return Ne(e)||Ae(10,e),qc(e)}function qc(e){if(!De(e)||Wn(e))return e;let t=e[Oe],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 Zr(r,(n,o)=>{kc(r,n,qc(o))}),t&&(t.finalized_=!1),r}function Nc(){let t="replace",r="add",n="remove";function o(S,g,v,R){switch(S.type_){case 0:case 2:return a(S,g,v,R);case 1:return i(S,g,v,R);case 3:return m(S,g,v,R)}}function i(S,g,v,R){let{base_:I,assigned_:x}=S,T=S.copy_;T.length<I.length&&([I,T]=[T,I],[v,R]=[R,v]);for(let A=0;A<I.length;A++)if(x[A]&&T[A]!==I[A]){let E=g.concat([A]);v.push({op:t,path:E,value:y(T[A])}),R.push({op:t,path:E,value:y(I[A])})}for(let A=I.length;A<T.length;A++){let E=g.concat([A]);v.push({op:r,path:E,value:y(T[A])})}for(let A=T.length-1;I.length<=A;--A){let E=g.concat([A]);R.push({op:n,path:E})}}function a(S,g,v,R){let{base_:I,copy_:x}=S;Zr(S.assigned_,(T,A)=>{let E=Hi(I,T),N=Hi(x,T),k=A?en(I,T)?t:r:n;if(E===N&&k===t)return;let P=g.concat(T);v.push(k===n?{op:k,path:P}:{op:k,path:P,value:N}),R.push(k===r?{op:n,path:P}:k===n?{op:r,path:P,value:y(E)}:{op:t,path:P,value:y(E)})})}function m(S,g,v,R){let{base_:I,copy_:x}=S,T=0;I.forEach(A=>{if(!x.has(A)){let E=g.concat([T]);v.push({op:n,path:E,value:A}),R.unshift({op:r,path:E,value:A})}T++}),T=0,x.forEach(A=>{if(!I.has(A)){let E=g.concat([T]);v.push({op:r,path:E,value:A}),R.unshift({op:n,path:E,value:A})}T++})}function f(S,g,v,R){v.push({op:t,path:[],value:g===ea?void 0:g}),R.push({op:t,path:[],value:S})}function s(S,g){return g.forEach(v=>{let{path:R,op:I}=v,x=S;for(let N=0;N<R.length-1;N++){let k=Bt(x),P=R[N];typeof P!="string"&&typeof P!="number"&&(P=""+P),(k===0||k===1)&&(P==="__proto__"||P==="constructor")&&Ae(19),typeof x=="function"&&P==="prototype"&&Ae(19),x=Hi(x,P),typeof x!="object"&&Ae(18,R.join("/"))}let T=Bt(x),A=h(v.value),E=R[R.length-1];switch(I){case t:switch(T){case 2:return x.set(E,A);case 3:Ae(16);default:return x[E]=A}case r:switch(T){case 1:return E==="-"?x.push(A):x.splice(E,0,A);case 2:return x.set(E,A);case 3:return x.add(A);default:return x[E]=A}case n:switch(T){case 1:return x.splice(E,1);case 2:return x.delete(E);case 3:return x.delete(v.value);default:return delete x[E]}default:Ae(17,I)}}),S}function h(S){if(!De(S))return S;if(Array.isArray(S))return S.map(h);if(nn(S))return new Map(Array.from(S.entries()).map(([v,R])=>[v,h(R)]));if(on(S))return new Set(Array.from(S).map(h));let g=Object.create(Ut(S));for(let v in S)g[v]=h(S[v]);return en(S,Xr)&&(g[Xr]=S[Xr]),g}function y(S){return Ne(S)?h(S):S}Im("Patches",{applyPatches_:s,generatePatches_:o,generateReplacementPatches_:f})}var _e=new Dm,ot=_e.produce,Gn=_e.produceWithPatches.bind(_e),bx=_e.setAutoFreeze.bind(_e),Ax=_e.setUseStrictShallowCopy.bind(_e),na=_e.applyPatches.bind(_e),wx=_e.createDraft.bind(_e),xx=_e.finishDraft.bind(_e);p();u();d();l();function Mm(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function qm(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function Nm(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 _c=e=>Array.isArray(e)?e:[e];function _m(e){let t=Array.isArray(e[0])?e[0]:e;return Nm(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function Vm(e,t){let r=[],{length:n}=e;for(let o=0;o<n;o++)r.push(e[o].apply(null,t));return r}var kx=Symbol();var Ox=Object.getPrototypeOf({});var Lm=class{constructor(e){this.value=e}deref(){return this.value}},jm=typeof WeakRef<"u"?WeakRef:Lm,Um=0,Vc=1;function Kn(){return{s:Um,v:void 0,o:null,p:null}}function ar(e,t={}){let r=Kn(),{resultEqualityCheck:n}=t,o,i=0;function a(){let m=r,{length:f}=arguments;for(let y=0,S=f;y<S;y++){let g=arguments[y];if(typeof g=="function"||typeof g=="object"&&g!==null){let v=m.o;v===null&&(m.o=v=new WeakMap);let R=v.get(g);R===void 0?(m=Kn(),v.set(g,m)):m=R}else{let v=m.p;v===null&&(m.p=v=new Map);let R=v.get(g);R===void 0?(m=Kn(),v.set(g,m)):m=R}}let s=m,h;if(m.s===Vc)h=m.v;else if(h=e.apply(null,arguments),i++,n){let y=o?.deref?.()??o;y!=null&&n(y,h)&&(h=y,i!==0&&i--),o=typeof h=="object"&&h!==null||typeof h=="function"?new jm(h):h}return s.s=Vc,s.v=h,h}return a.clearCache=()=>{r=Kn(),a.resetResultsCount()},a.resultsCount=()=>i,a.resetResultsCount=()=>{i=0},a}function Lc(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()),Mm(s,`createSelector expects an output function after the inputs, but received: [${typeof s}]`);let h={...r,...f},{memoize:y,memoizeOptions:S=[],argsMemoize:g=ar,argsMemoizeOptions:v=[],devModeChecks:R={}}=h,I=_c(S),x=_c(v),T=_m(o),A=y(function(){return i++,s.apply(null,arguments)},...I),E=!0,N=g(function(){a++;let P=Vm(T,arguments);return m=A.apply(null,P),m},...x);return Object.assign(N,{resultFunc:s,memoizedResultFunc:A,dependencies:T,dependencyRecomputations:()=>a,resetDependencyRecomputations:()=>{a=0},lastResult:()=>m,recomputations:()=>i,resetRecomputations:()=>{i=0},memoize:y,argsMemoize:g})};return Object.assign(n,{withTypes:()=>n}),n}var ye=Lc(ar),Bm=Object.assign((e,t=ye)=>{qm(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:()=>Bm});p();u();d();l();function jc(e){return({dispatch:r,getState:n})=>o=>i=>typeof i=="function"?i(r,n,e):o(i)}var Uc=jc(),Bc=jc;var Qm=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?ir:ir.apply(null,arguments)},Yx=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}},$m=e=>e&&typeof e.match=="function";function D(e,t){function r(...n){if(t){let o=t(...n);if(!o)throw new Error($e(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=>Qn(n)&&n.type===e,r}var Wc=class an extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,an.prototype)}static get[Symbol.species](){return an}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new an(...t[0].concat(this)):new an(...t.concat(this))}};function Qc(e){return De(e)?ot(e,()=>{}):e}function $c(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function Hm(e){return typeof e=="boolean"}var zm=()=>function(t){let{thunk:r=!0,immutableCheck:n=!0,serializableCheck:o=!0,actionCreatorCheck:i=!0}=t??{},a=new Wc;return r&&(Hm(r)?a.push(Uc):a.push(Bc(r.extraArgument))),a},sn="RTK_autoBatch",cr=()=>e=>({payload:e,meta:{[sn]:!0}}),Hc=e=>t=>{setTimeout(t,e)},Wm=(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:Hc(10):e.type==="callback"?e.queueNotification:Hc(e.timeout),s=()=>{a=!1,i&&(i=!1,m.forEach(h=>h()))};return Object.assign({},n,{subscribe(h){let y=()=>o&&h(),S=n.subscribe(y);return m.add(h),()=>{S(),m.delete(h)}},dispatch(h){try{return o=!h?.meta?.[sn],i=!o,i&&(a||(a=!0,f(s))),n.dispatch(h)}finally{o=!0}}})},Gm=e=>function(r){let{autoBatch:n=!0}=r??{},o=new Wc(e);return n&&o.push(Wm(typeof n=="object"?n:void 0)),o};function Gc(e){let t=zm(),{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(Ke(r))m=or(r);else throw new Error($e(1));let f;typeof n=="function"?f=n(t):f=t();let s=ir;o&&(s=Qm({trace:!1,...(typeof o=="object"&&o)}));let h=Rc(...f),y=Gm(h),S=typeof a=="function"?a(y):y(),g=s(...S);return $i(m,i,g)}function Kc(e){let t={},r=[],n,o={addCase(i,a){let m=typeof i=="string"?i:i.type;if(!m)throw new Error($e(28));if(m in t)throw new Error($e(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 Km(e){return typeof e=="function"}function me(e,t){let[r,n,o]=Kc(t),i;if(Km(e))i=()=>Qc(e());else{let m=Qc(e);i=()=>m}function a(m=i(),f){let s=[r[f.type],...n.filter(({matcher:h})=>h(f)).map(({reducer:h})=>h)];return s.filter(h=>!!h).length===0&&(s=[o]),s.reduce((h,y)=>{if(y)if(Ne(h)){let g=y(h,f);return g===void 0?h:g}else{if(De(h))return ot(h,S=>y(S,f));{let S=y(h,f);if(S===void 0){if(h===null)return h;throw Error("A case reducer on a non-draftable value must not return undefined")}return S}}return h},m)}return a.getInitialState=i,a}var Yc=(e,t)=>$m(e)?e.match(t):e(t);function Ye(...e){return t=>e.some(r=>Yc(r,t))}function sr(...e){return t=>e.every(r=>Yc(r,t))}function Jn(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 cn(e){return typeof e[0]=="function"&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function Xn(...e){return e.length===0?t=>Jn(t,["pending"]):cn(e)?Ye(...e.map(t=>t.pending)):Xn()(e[0])}function $t(...e){return e.length===0?t=>Jn(t,["rejected"]):cn(e)?Ye(...e.map(t=>t.rejected)):$t()(e[0])}function un(...e){let t=r=>r&&r.meta&&r.meta.rejectedWithValue;return e.length===0?sr($t(...e),t):cn(e)?sr($t(...e),t):un()(e[0])}function it(...e){return e.length===0?t=>Jn(t,["fulfilled"]):cn(e)?Ye(...e.map(t=>t.fulfilled)):it()(e[0])}function Zn(...e){return e.length===0?t=>Jn(t,["pending","fulfilled","rejected"]):cn(e)?Ye(...e.flatMap(t=>[t.pending,t.rejected,t.fulfilled])):Zn()(e[0])}var Ym="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",eo=(e=21)=>{let t="",r=e;for(;r--;)t+=Ym[Math.random()*64|0];return t},Jm=["name","message","stack","code"],oa=class{constructor(e,t){de(this,"_type");this.payload=e,this.meta=t}},zc=class{constructor(e,t){de(this,"_type");this.payload=e,this.meta=t}},Xm=e=>{if(typeof e=="object"&&e!==null){let t={};for(let r of Jm)typeof e[r]=="string"&&(t[r]=e[r]);return t}return{message:String(e)}},ue=(()=>{function e(t,r,n){let o=D(t+"/fulfilled",(f,s,h,y)=>({payload:f,meta:{...(y||{}),arg:h,requestId:s,requestStatus:"fulfilled"}})),i=D(t+"/pending",(f,s,h)=>({payload:void 0,meta:{...(h||{}),arg:s,requestId:f,requestStatus:"pending"}})),a=D(t+"/rejected",(f,s,h,y,S)=>({payload:y,error:(n&&n.serializeError||Xm)(f||"Rejected"),meta:{...(S||{}),arg:h,requestId:s,rejectedWithValue:!!y,requestStatus:"rejected",aborted:f?.name==="AbortError",condition:f?.name==="ConditionError"}}));function m(f){return(s,h,y)=>{let S=n?.idGenerator?n.idGenerator(f):eo(),g=new c.AbortController,v,R;function I(T){R=T,g.abort()}let x=_asyncToGenerator(function*(){let T;try{let E=n?.condition?.(f,{getState:h,extra:y});if(eg(E)&&(E=yield E),E===!1||g.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let N=new Promise((k,P)=>{v=()=>{P({name:"AbortError",message:R||"Aborted"})},g.signal.addEventListener("abort",v)});s(i(S,f,n?.getPendingMeta?.({requestId:S,arg:f},{getState:h,extra:y}))),T=yield Promise.race([N,Promise.resolve(r(f,{dispatch:s,getState:h,extra:y,requestId:S,signal:g.signal,abort:I,rejectWithValue:(k,P)=>new oa(k,P),fulfillWithValue:(k,P)=>new zc(k,P)})).then(k=>{if(k instanceof oa)throw k;return k instanceof zc?o(k.payload,S,f,k.meta):o(k,S,f)})])}catch(E){T=E instanceof oa?a(null,S,f,E.payload,E.meta):a(E,S,f)}finally{v&&g.signal.removeEventListener("abort",v)}return n&&!n.dispatchConditionRejection&&a.match(T)&&T.meta.condition||s(T),T})();return Object.assign(x,{abort:I,requestId:S,arg:f,unwrap(){return x.then(Zm)}})}}return Object.assign(m,{pending:i,rejected:a,fulfilled:o,settled:Ye(a,o),typePrefix:t})}return e.withTypes=()=>e,e})();function Zm(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function eg(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var Jc=Symbol.for("rtk-slice-createasyncthunk"),tR={[Jc]:ue};function tg(e,t){return`${e}/${t}`}function rg({creators:e}={}){let t=e?.asyncThunk?.[Jc];return function(n){let{name:o,reducerPath:i=o}=n;if(!o)throw new Error($e(11));typeof process<"u";let a=(typeof n.reducers=="function"?n.reducers(og()):n.reducers)||{},m=Object.keys(a),f={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},s={addCase(T,A){let E=typeof T=="string"?T:T.type;if(!E)throw new Error($e(12));if(E in f.sliceCaseReducersByType)throw new Error($e(13));return f.sliceCaseReducersByType[E]=A,s},addMatcher(T,A){return f.sliceMatchers.push({matcher:T,reducer:A}),s},exposeAction(T,A){return f.actionCreators[T]=A,s},exposeCaseReducer(T,A){return f.sliceCaseReducersByName[T]=A,s}};m.forEach(T=>{let A=a[T],E={reducerName:T,type:tg(o,T),createNotation:typeof n.reducers=="function"};ag(A)?cg(E,A,s,t):ig(E,A,s)});function h(){let[T={},A=[],E=void 0]=typeof n.extraReducers=="function"?Kc(n.extraReducers):[n.extraReducers],N={...T,...f.sliceCaseReducersByType};return me(n.initialState,k=>{for(let P in N)k.addCase(P,N[P]);for(let P of f.sliceMatchers)k.addMatcher(P.matcher,P.reducer);for(let P of A)k.addMatcher(P.matcher,P.reducer);E&&k.addDefaultCase(E)})}let y=T=>T,S=new Map,g;function v(T,A){return g||(g=h()),g(T,A)}function R(){return g||(g=h()),g.getInitialState()}function I(T,A=!1){function E(k){let P=k[T];return typeof P>"u"&&A&&(P=R()),P}function N(k=y){let P=$c(S,A,()=>new WeakMap);return $c(P,k,()=>{let F={};for(let[O,_]of Object.entries(n.selectors??{}))F[O]=ng(_,k,R,A);return F})}return{reducerPath:T,getSelectors:N,get selectors(){return N(E)},selectSlice:E}}let x={name:o,reducer:v,actions:f.actionCreators,caseReducers:f.sliceCaseReducersByName,getInitialState:R,...I(i),injectInto(T,{reducerPath:A,...E}={}){let N=A??i;return T.inject({reducerPath:N,reducer:v},E),{...x,...I(N,!0)}}};return x}}function ng(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=rg();function og(){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 ig({type:e,reducerName:t,createNotation:r},n,o){let i,a;if("reducer"in n){if(r&&!sg(n))throw new Error($e(17));i=n.reducer,a=n.prepare}else i=n;o.addCase(e,i).exposeCaseReducer(t,i).exposeAction(t,a?D(e,a):D(e))}function ag(e){return e._reducerDefinitionType==="asyncThunk"}function sg(e){return e._reducerDefinitionType==="reducerWithPrepare"}function cg({type:e,reducerName:t},r,n,o){if(!o)throw new Error($e(18));let{payloadCreator:i,fulfilled:a,pending:m,rejected:f,settled:s,options:h}=r,y=o(e,i,h);n.exposeAction(t,y),a&&n.addCase(y.fulfilled,a),m&&n.addCase(y.pending,m),f&&n.addCase(y.rejected,f),s&&n.addMatcher(y.settled,s),n.exposeCaseReducer(t,{fulfilled:a||Yn,pending:m||Yn,rejected:f||Yn,settled:s||Yn})}function Yn(){}var Xc="listener",Zc="completed",eu="cancelled",rR=`task-${eu}`,nR=`task-${Zc}`,oR=`${Xc}-${eu}`,iR=`${Xc}-${Zc}`;var{assign:tu}=Object;var ia="listenerMiddleware";var ug=tu(D(`${ia}/add`),{withTypes:()=>ug}),aR=D(`${ia}/removeAll`),lg=tu(D(`${ia}/remove`),{withTypes:()=>lg});var sR=Symbol.for("rtk-state-proxy-original");function $e(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 H({required:!0,emptyAllowed:!1}),ve=new H({required:!1,emptyAllowed:!1}),we=new H({required:!0,emptyAllowed:!0}),CR=new H({required:!1,emptyAllowed:!0}),to=new ie({each:K,required:!0}),ru=new H({required:!1,emptyAllowed:!1,regex:/^\d+\.\d+\.\d+$/}),at=({message:e,name:t,stack:r})=>({message:e,name:t,stack:r}),Ue=(e,t)=>{if("required"in t)return{payload:new Fe({value:t}).validate({value:e}).value};let o=new G({options:{required:!0},values:t}).validate(e);if(o)throw new Wr(o);return{payload:e}},B=(e,t)=>{try{return Ue(e,t)}catch(r){return{payload:e,error:at(r)}}},nu=(e,t,r,n)=>{let o=`Check the initialState of ${n}`;return iu(e,t,r,o,"Controller initialization error")},ou=(e,t,r,n)=>{let o=`Check the options of ${n}`;return iu(e,t,r,o,"Controller initialization error")},iu=(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 ur="3.19.1",au=["@coveo/atomic","@coveo/quantic"];var aa=()=>ve,su=()=>K,yt=D("configuration/updateBasicConfiguration",e=>B(e,{accessToken:ve,environment:new H({required:!1,constrainTo:["prod","hipaa","stg","dev"]}),organizationId:ve})),Je=D("configuration/updateSearchConfiguration",e=>B(e,{proxyBaseUrl:new H({required:!1,url:!0}),pipeline:new H({required:!1,emptyAllowed:!0}),searchHub:ve,timezone:ve,locale:ve,authenticationProviders:new ie({required:!1,each:K})})),dg={enabled:new te({default:!0}),originContext:aa(),originLevel2:aa(),originLevel3:aa(),proxyBaseUrl:new H({required:!1,url:!0}),runtimeEnvironment:new pe,anonymous:new te({default:!1}),deviceId:ve,userDisplayName:ve,documentLocation:ve,trackingId:ve,analyticsMode:new H({constrainTo:["legacy","next"],required:!1,default:"next"}),source:new G({options:{required:!1},values:au.reduce((e,t)=>(e[t]=ru,e),{})})},lr=D("configuration/updateAnalyticsConfiguration",e=>B(e,dg)),dr=D("configuration/analytics/disable"),pr=D("configuration/analytics/enable"),ro=D("configuration/analytics/originlevel2",e=>B(e,{originLevel2:su()})),no=D("configuration/analytics/originlevel3",e=>B(e,{originLevel3:su()}));p();u();d();l();p();u();d();l();p();u();d();l();var cu={q:new H,enableQuerySyntax:new te,aq:new H,cq:new H,firstResult:new J({min:0}),numberOfResults:new J({min:0}),sortCriteria:new H,f:new G,fExcluded:new G,cf:new G,nf:new G,mnf:new G,df:new G,debug:new te,sf:new G,tab:new H,af:new G};var St=D("searchParameters/restore",e=>B(e,cu));p();u();d();l();var oo=D("debug/enable"),io=D("debug/disable");p();u();d();l();var ao=()=>!1;var so=me(ao(),e=>{e.addCase(oo,()=>!0).addCase(io,()=>!1).addCase(St,(t,r)=>r.payload.debug??t)});p();u();d();l();var fr=D("pipeline/set",e=>B(e,new H({required:!0,emptyAllowed:!0})));p();u();d();l();p();u();d();l();var pg=D("history/undo"),fg=D("history/redo"),Xe=D("history/snapshot"),OE=ue("history/back",/*#__PURE__*/function(){var _ref4=_asyncToGenerator(function*(e,{dispatch:t}){t(pg()),yield t(Me())});return function(_x3,_x4){return _ref4.apply(this,arguments)}}()),DE=ue("history/forward",/*#__PURE__*/function(){var _ref5=_asyncToGenerator(function*(e,{dispatch:t}){t(fg()),yield t(Me())});return function(_x5,_x6){return _ref5.apply(this,arguments)}}()),Me=ue("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 mr=()=>"";var gr=me(mr(),e=>{e.addCase(fr,(t,r)=>r.payload).addCase(Me.fulfilled,(t,r)=>r.payload?.pipeline??t).addCase(Je,(t,r)=>r.payload.pipeline||t)});p();u();d();l();p();u();d();l();p();u();d();l();p();u();d();l();function st(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 M(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(h){try{s(n.next(h))}catch(y){a(y)}}function f(h){try{s(n.throw(h))}catch(y){a(y)}}function s(h){h.done?i(h.value):o(h.value).then(m,f)}s((n=n.apply(e,t||[])).next())})}var ae;(function(e){e.search="search",e.click="click",e.custom="custom",e.view="view",e.collect="collect"})(ae||(ae={}));function ua(){return typeof window<"u"}function Aa(){return typeof navigator<"u"}function hr(){return typeof document<"u"}function la(){try{return typeof localStorage<"u"}catch{return!1}}function mg(){try{return typeof sessionStorage<"u"}catch{return!1}}function Au(){return Aa()&&navigator.cookieEnabled}var gg=[ae.click,ae.custom,ae.search,ae.view],hg=(e,t)=>gg.indexOf(e)!==-1?Object.assign({language:hr()?document.documentElement.lang:"unknown",userAgent:Aa()?navigator.userAgent:"unknown"},t):t,pn=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?uu(t,r,i):(a=m.split("."),o=a[a.length-2]+"."+a[a.length-1],uu(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 uu(e,t,r,n){document.cookie=`${e}=${t}`+(r?`;expires=${r.toUTCString()}`:"")+(n?`;domain=${n}`:"")+";path=/;SameSite=Lax"}function yg(){return la()?localStorage:Au()?new fn:mg()?sessionStorage:new Sr}var fn=class e{getItem(t){return pn.get(`${e.prefix}${t}`)}removeItem(t){pn.erase(`${e.prefix}${t}`)}setItem(t,r,n){pn.set(`${e.prefix}${t}`,r,n)}};fn.prefix="coveo_";var da=class{constructor(){this.cookieStorage=new fn}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)}},Sr=class{getItem(t){return null}removeItem(t){}setItem(t,r){}},ln="__coveo.analytics.history",wu=20,xu=1e3*60,Ru=75,vr=class{constructor(t){this.store=t||yg()}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 M(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 M(this,void 0,void 0,function*(){let t=yield this.getHistoryWithInternalTimeAsync();return this.stripEmptyQueries(this.stripInternalTime(t))})}getHistoryWithInternalTime(){try{let t=this.store.getItem(ln);return t&&typeof t=="string"?JSON.parse(t):[]}catch{return[]}}getHistoryWithInternalTimeAsync(){return M(this,void 0,void 0,function*(){try{let t=yield this.store.getItem(ln);return t?JSON.parse(t):[]}catch{return[]}})}setHistory(t){try{this.store.setItem(ln,JSON.stringify(t.slice(0,wu)))}catch{}}clear(){try{this.store.removeItem(ln)}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,Ru)),t}isValidEntry(t){let r=this.getMostRecentElement();return r&&r.value==t.value?(t.internalTime||0)-(r.internalTime||0)>xu:!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))}},Eu=Object.freeze({__proto__:null,HistoryStore:vr,MAX_NUMBER_OF_HISTORY_ELEMENTS:wu,MAX_VALUE_SIZE:Ru,MIN_THRESHOLD_FOR_DUPLICATE_VALUE:xu,STORE_KEY:ln,default:vr}),Sg=(e,t)=>M(void 0,void 0,void 0,function*(){return e===ae.view?(yield vg(t.contentIdValue),Object.assign({location:window.location.toString(),referrer:document.referrer,title:document.title},t)):t}),vg=e=>M(void 0,void 0,void 0,function*(){let t=new vr,r={name:"PageView",value:e,time:new Date().toISOString()};yield t.addElementAsync(r)}),co,Cg=new Uint8Array(16);function bg(){if(!co&&(co=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!co))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return co(Cg)}var Ag=/^(?:[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 lo(e){return typeof e=="string"&&Ag.test(e)}var xe=[];for(let e=0;e<256;++e)xe.push((e+256).toString(16).slice(1));function Pu(e,t=0){return(xe[e[t+0]]+xe[e[t+1]]+xe[e[t+2]]+xe[e[t+3]]+"-"+xe[e[t+4]]+xe[e[t+5]]+"-"+xe[e[t+6]]+xe[e[t+7]]+"-"+xe[e[t+8]]+xe[e[t+9]]+"-"+xe[e[t+10]]+xe[e[t+11]]+xe[e[t+12]]+xe[e[t+13]]+xe[e[t+14]]+xe[e[t+15]]).toLowerCase()}function wg(e){if(!lo(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 xg(e){e=unescape(encodeURIComponent(e));let t=[];for(let r=0;r<e.length;++r)t.push(e.charCodeAt(r));return t}var Rg="6ba7b810-9dad-11d1-80b4-00c04fd430c8",Eg="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function Pg(e,t,r){function n(o,i,a,m){var f;if(typeof o=="string"&&(o=xg(o)),typeof i=="string"&&(i=wg(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 h=0;h<16;++h)a[m+h]=s[h];return a}return Pu(s)}try{n.name=e}catch{}return n.DNS=Rg,n.URL=Eg,n}var Ig=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),lu={randomUUID:Ig};function zt(e,t,r){if(lu.randomUUID&&!t&&!e)return lu.randomUUID();e=e||{};let n=e.random||(e.rng||bg)();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 Pu(n)}function Tg(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 Fg(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 g=0;g<16;++g)m[g]=i[a][g];for(let g=16;g<80;++g)m[g]=sa(m[g-3]^m[g-8]^m[g-14]^m[g-16],1);let f=r[0],s=r[1],h=r[2],y=r[3],S=r[4];for(let g=0;g<80;++g){let v=Math.floor(g/20),R=sa(f,5)+Tg(v,s,h,y)+S+t[v]+m[g]>>>0;S=y,y=h,h=sa(s,30)>>>0,s=f,f=R}r[0]=r[0]+f>>>0,r[1]=r[1]+s>>>0,r[2]=r[2]+h>>>0,r[3]=r[3]+y>>>0,r[4]=r[4]+S>>>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 kg=Pg("v5",80,Fg),du=kg,Iu="2.30.44",pu=e=>`${e.protocol}//${e.hostname}${e.pathname.indexOf("/")===0?e.pathname:`/${e.pathname}`}${e.search}`,dn={pageview:"pageview",event:"event"},po=class{constructor({client:t,uuidGenerator:r=zt}){this.client=t,this.uuidGenerator=r}},pa=class extends po{constructor({client:t,uuidGenerator:r=zt}){super({client:t,uuidGenerator:r}),this.actionData={},this.pageViewId=r(),this.nextPageViewId=this.pageViewId,this.currentLocation=pu(window.location),this.lastReferrer=hr()?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:hr()?document.title:"",encoding:hr()?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===dn.pageview&&(this.nextPageViewId=this.uuidGenerator(),this.hasSentFirstPageView=!0)}getNextValues(t,r){return{pageViewId:t===dn.pageview?this.nextPageViewId:this.pageViewId,referrer:t===dn.pageview&&this.hasSentFirstPageView?this.currentLocation:this.lastReferrer,location:t===dn.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 pu(window.location)}},vt=class e{constructor(t,r){if(!lo(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 lo(i)?new e(i,Number.parseInt(o)*1e3):null}};vt.cvo_cid="cvo_cid";vt.expirationTime=120;var fa=class extends po{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 M(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(vt.cvo_cid,new vt(n,Date.now()).toString()),r.toString()}catch{throw new Error("Invalid URL provided")}})}acceptFrom(t){this.client.setAcceptedLinkReferrers(t)}};fa.Id="link";var Be=Object.keys;function uo(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}var ca=128,Tu=192,fu=224,mu=240;function Og(e){return(e&248)===mu?4:(e&mu)===fu?3:(e&fu)===Tu?2:1}function Dg(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&Tu)!=ca){t-r>=Og(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"},Mg=Be(ma).map(e=>ma[e]),qg=[...Mg].join("|"),Ng=new RegExp(`^(${qg}$)`),_g={svcAction:"svc_action",svcActionData:"svc_action_data"},Vg=e=>Be(e).filter(t=>e[t]!==void 0).reduce((t,r)=>{let n=ma[r]||r;return Object.assign(Object.assign({},t),{[n]:e[r]})},{}),Lg=e=>Ng.test(e),jg=[Lg],gu={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",price:"pr",quantity:"qt",coupon:"cc",position:"ps",group:"group"},hu={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",position:"ps",price:"pr",group:"group"},Ee={action:"pa",list:"pal",listSource:"pls"},fo={id:"ti",revenue:"tr",tax:"tt",shipping:"ts",coupon:"tcc",affiliation:"ta",step:"cos",option:"col"},Ug=["loyaltyCardId","loyaltyTier","thirdPartyPersona","companyName","favoriteStore","storeName","userIndustry","userRole","userDepartment","businessUnit"],ga={id:"quoteId",affiliation:"quoteAffiliation"},ha={id:"reviewId",rating:"reviewRating",comment:"reviewComment"},Bg={add:Ee,bookmark_add:Ee,bookmark_remove:Ee,click:Ee,checkout:Ee,checkout_option:Ee,detail:Ee,impression:Ee,remove:Ee,refund:Object.assign(Object.assign({},Ee),fo),purchase:Object.assign(Object.assign({},Ee),fo),quickview:Ee,quote:Object.assign(Object.assign({},Ee),ga),review:Object.assign(Object.assign({},Ee),ha)},Qg=Be(gu).map(e=>gu[e]),$g=Be(hu).map(e=>hu[e]),Hg=Be(Ee).map(e=>Ee[e]),zg=Be(fo).map(e=>fo[e]),Wg=Be(ha).map(e=>ha[e]),Gg=Be(ga).map(e=>ga[e]),Kg=[...Qg,"custom"].join("|"),Yg=[...$g,"custom"].join("|"),Fu="(pr[0-9]+)",ku="(il[0-9]+pi[0-9]+)",Jg=new RegExp(`^${Fu}(${Kg})$`),Xg=new RegExp(`^(${ku}(${Yg}))|(il[0-9]+nm)$`),Zg=new RegExp(`^(${Hg.join("|")})$`),eh=new RegExp(`^(${zg.join("|")})$`),th=new RegExp(`^${Fu}custom$`),rh=new RegExp(`^${ku}custom$`),nh=new RegExp(`^(${[...Ug,...Wg,...Gg].join("|")})$`),oh=e=>Jg.test(e),ih=e=>Xg.test(e),ah=e=>Zg.test(e),sh=e=>eh.test(e),ch=e=>nh.test(e),uh=[ih,oh,ah,sh,ch],lh=[th,rh],dh={anonymizeIp:"aip"},ph={eventCategory:"ec",eventAction:"ea",eventLabel:"el",eventValue:"ev",page:"dp",visitorId:"cid",clientId:"cid",userId:"uid",currencyCode:"cu"},fh={hitType:"t",pageViewId:"pid",encoding:"de",location:"dl",referrer:"dr",screenColor:"sd",screenResolution:"sr",title:"dt",userAgent:"ua",language:"ul",eventId:"z",time:"tm"},mh=["contentId","contentIdKey","contentType","searchHub","tab","searchUid","permanentId","contentLocale","trackingId"],gh=Object.assign(Object.assign(Object.assign(Object.assign({},dh),ph),fh),mh.reduce((e,t)=>Object.assign(Object.assign({},e),{[t]:t}),{})),ya=Object.assign(Object.assign({},gh),_g),hh=e=>{let t=!!e.action&&Bg[e.action]||{};return Be(e).reduce((r,n)=>{let o=t[n]||ya[n]||n;return Object.assign(Object.assign({},r),{[o]:e[n]})},{})},yh=Be(ya).map(e=>ya[e]),Sh=e=>yh.indexOf(e)!==-1,vh=e=>e==="custom",Ch=e=>[...uh,...jg,Sh,vh].some(t=>t(e)),bh=e=>Be(e).reduce((t,r)=>{let n=Ah(r);return n?Object.assign(Object.assign({},t),wh(n,e[r])):Object.assign(Object.assign({},t),{[r]:e[r]})},{}),Ah=e=>{let t;return[...lh].every(r=>{var n;return t=(n=r.exec(e))===null||n===void 0?void 0:n[1],!t}),t},wh=(e,t)=>Be(t).reduce((r,n)=>Object.assign(Object.assign({},r),{[`${e}${n}`]:t[n]}),{}),Sa=class{constructor(t){this.opts=t}sendEvent(t,r){return M(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 M(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 M(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[ae.click,ae.custom,ae.search,ae.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 M(this,void 0,void 0,function*(){return Promise.resolve()})}deleteHttpCookieVisitorId(){return M(this,void 0,void 0,function*(){return Promise.resolve()})}},yu=C.fetch,mo=class{constructor(t){this.opts=t}sendEvent(t,r){return M(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,h=st(f,["url"]),y;try{y=yield yu(s,h)}catch(S){console.error("An error has occured when sending the event.",S);return}if(y.ok){let S=yield y.json();return S.visitorId&&o.setCurrentVisitorId(S.visitorId),S}else{try{y.json()}catch{}throw console.error(`An error has occured when sending the "${t}" event.`,y,r),new Error(`An error has occurred when sending the "${t}" event. Check the console logs for more details.`)}})}deleteHttpCookieVisitorId(){return M(this,void 0,void 0,function*(){let{baseUrl:t}=this.opts,r=`${t}/analytics/visit`;yield yu(r,{headers:this.getHeaders(),method:"DELETE"})})}shouldAppendVisitorId(t){return[ae.click,ae.custom,ae.search,ae.view].indexOf(t)!==-1}getVisitorIdParam(){return M(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()&&Au()?this.storage=new da:la()?this.storage=localStorage:(console.warn("BrowserRuntime detected no valid storage available.",this),this.storage=new Sr),this.client=new mo(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 Sr,this.client=new mo(t)}getClientDependingOnEventType(t){return this.client}},go=class{constructor(){this.storage=new Sr,this.client=new va}getClientDependingOnEventType(t){return this.client}},xh="xx",Rh=e=>e?.startsWith(xh)||!1,Eh=`
|
|
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
|
|
30
|
-
`;function wh(){return typeof navigator<"u"&&navigator.product=="ReactNative"}var xh=["1",1,"yes",!0];function mo(){let e=[];return ca()&&e.push(window.doNotTrack),ba()&&e.push(navigator.doNotTrack,navigator.msDoNotTrack,navigator.globalPrivacyControl),e.some(t=>xh.indexOf(t)!==-1)}var Pu="v15",Tu={default:"https://analytics.cloud.coveo.com/rest/ua",production:"https://analytics.cloud.coveo.com/rest/ua",hipaa:"https://analyticshipaa.cloud.coveo.com/rest/ua"};function Rh(e=Tu.default,t=Pu,r=!1){if(e=e.replace(/\/$/,""),r)return`${e}/${t}`;let n=e.endsWith("/rest")||e.endsWith("/rest/ua");return`${e}${n?"":"/rest"}/${t}`}var Eh="38824e1f-37f5-42d3-8372-a4b8fa9df946",st=class{get defaultOptions(){return{endpoint:Tu.default,isCustomEndpoint:!1,token:"",version:Pu,beforeSendHooks:[],afterSendHooks:[]}}get version(){return xu}constructor(t){if(this.acceptedLinkReferrers=[],!t)throw new Error("You have to pass options to this constructor");this.options=Object.assign(Object.assign({},this.defaultOptions),t),this.visitorId="",this.bufferedRequests=[],this.beforeSendHooks=[mg,pg].concat(this.options.beforeSendHooks),this.afterSendHooks=this.options.afterSendHooks,this.eventTypeMapping={};let r={baseUrl:this.baseUrl,token:this.options.token,visitorIdProvider:this,preprocessRequest:this.options.preprocessRequest};mo()?this.runtime=new fo:this.runtime=this.options.runtimeEnvironment||this.initRuntime(r),this.addEventTypeMapping(te.view,{newEventType:te.view,addClientIdParameter:!0}),this.addEventTypeMapping(te.click,{newEventType:te.click,addClientIdParameter:!0}),this.addEventTypeMapping(te.custom,{newEventType:te.custom,addClientIdParameter:!0}),this.addEventTypeMapping(te.search,{newEventType:te.search,addClientIdParameter:!0})}initRuntime(t){return ca()&&mr()?new va(t,()=>{let r=[...this.bufferedRequests];return this.bufferedRequests=[],r}):(wh()&&console.warn(Ah),new Ca(t))}get storage(){return this.runtime.storage}determineVisitorId(){return O(this,void 0,void 0,function*(){try{return ca()&&this.extractClientIdFromLink(window.location.href)||(yield this.storage.getItem("visitorId"))||zt()}catch(t){return console.log("Could not get visitor ID from the current runtime environment storage. Using a random ID instead.",t),zt()}})}getCurrentVisitorId(){return O(this,void 0,void 0,function*(){if(!this.visitorId){let t=yield this.determineVisitorId();yield this.setCurrentVisitorId(t)}return this.visitorId})}setCurrentVisitorId(t){return O(this,void 0,void 0,function*(){this.visitorId=t,yield this.storage.setItem("visitorId",t)})}setClientId(t,r){return O(this,void 0,void 0,function*(){if(co(t))this.setCurrentVisitorId(t.toLowerCase());else{if(!r)throw Error("Cannot generate uuid client id without a specific namespace string.");this.setCurrentVisitorId(su(t,su(r,Eh)))}})}getParameters(t,...r){return O(this,void 0,void 0,function*(){return yield this.resolveParameters(t,...r)})}getPayload(t,...r){return O(this,void 0,void 0,function*(){let n=yield this.resolveParameters(t,...r);return yield this.resolvePayloadForParameters(t,n)})}get currentVisitorId(){return typeof(this.visitorId||this.storage.getItem("visitorId"))!="string"&&this.setCurrentVisitorId(zt()),this.visitorId}set currentVisitorId(t){this.visitorId=t,this.storage.setItem("visitorId",t)}extractClientIdFromLink(t){if(mo())return null;try{let r=new URL(t).searchParams.get(yt.cvo_cid);if(r==null)return null;let n=yt.fromString(r);return!n||!mr()||!n.validate(document.referrer,this.acceptedLinkReferrers)?null:n.clientId}catch{}return null}resolveParameters(t,...r){return O(this,void 0,void 0,function*(){let{variableLengthArgumentsNames:n=[],addVisitorIdParameter:o=!1,usesMeasurementProtocol:i=!1,addClientIdParameter:a=!1}=this.eventTypeMapping[t]||{};return yield[g=>n.length>0?this.parseVariableArgumentsPayload(n,g):g[0],g=>O(this,void 0,void 0,function*(){return Object.assign(Object.assign({},g),{visitorId:o?yield this.getCurrentVisitorId():""})}),g=>O(this,void 0,void 0,function*(){return a?Object.assign(Object.assign({},g),{clientId:yield this.getCurrentVisitorId()}):g}),g=>i?this.ensureAnonymousUserWhenUsingApiKey(g):g,g=>this.beforeSendHooks.reduce((v,C)=>O(this,void 0,void 0,function*(){let E=yield v;return yield C(t,E)}),g)].reduce((g,v)=>O(this,void 0,void 0,function*(){let C=yield g;return yield v(C)}),Promise.resolve(r))})}resolvePayloadForParameters(t,r){return O(this,void 0,void 0,function*(){let{usesMeasurementProtocol:n=!1}=this.eventTypeMapping[t]||{};return yield[S=>this.setTrackingIdIfTrackingIdNotPresent(S),S=>this.removeEmptyPayloadValues(S,t),S=>this.validateParams(S,t),S=>n?ph(S):S,S=>n?this.removeUnknownParameters(S):S,S=>n?this.processCustomParameters(S):this.mapCustomParametersToCustomData(S)].reduce((S,y)=>O(this,void 0,void 0,function*(){let g=yield S;return yield y(g)}),Promise.resolve(r))})}makeEvent(t,...r){return O(this,void 0,void 0,function*(){let{newEventType:n=t}=this.eventTypeMapping[t]||{},o=yield this.resolveParameters(t,...r),i=yield this.resolvePayloadForParameters(t,o);return{eventType:n,payload:i,log:a=>O(this,void 0,void 0,function*(){return this.bufferedRequests.push({eventType:n,payload:Object.assign(Object.assign({},i),a)}),yield Promise.all(this.afterSendHooks.map(m=>m(t,Object.assign(Object.assign({},o),a)))),yield this.deferExecution(),yield this.sendFromBuffer()})}})}sendEvent(t,...r){return O(this,void 0,void 0,function*(){return(yield this.makeEvent(t,...r)).log({})})}deferExecution(){return new Promise(t=>setTimeout(t,0))}sendFromBuffer(){return O(this,void 0,void 0,function*(){let t=this.bufferedRequests.shift();if(t){let{eventType:r,payload:n}=t;return this.runtime.getClientDependingOnEventType(r).sendEvent(r,n)}})}clear(){this.storage.removeItem("visitorId"),new yr().clear()}deleteHttpOnlyVisitorId(){this.runtime.client.deleteHttpCookieVisitorId()}makeSearchEvent(t){return O(this,void 0,void 0,function*(){return this.makeEvent(te.search,t)})}sendSearchEvent(t){var{searchQueryUid:r}=t,n=it(t,["searchQueryUid"]);return O(this,void 0,void 0,function*(){return(yield this.makeSearchEvent(n)).log({searchQueryUid:r})})}makeClickEvent(t){return O(this,void 0,void 0,function*(){return this.makeEvent(te.click,t)})}sendClickEvent(t){var{searchQueryUid:r}=t,n=it(t,["searchQueryUid"]);return O(this,void 0,void 0,function*(){return(yield this.makeClickEvent(n)).log({searchQueryUid:r})})}makeCustomEvent(t){return O(this,void 0,void 0,function*(){return this.makeEvent(te.custom,t)})}sendCustomEvent(t){var{lastSearchQueryUid:r}=t,n=it(t,["lastSearchQueryUid"]);return O(this,void 0,void 0,function*(){return(yield this.makeCustomEvent(n)).log({lastSearchQueryUid:r})})}makeViewEvent(t){return O(this,void 0,void 0,function*(){return this.makeEvent(te.view,t)})}sendViewEvent(t){return O(this,void 0,void 0,function*(){return(yield this.makeViewEvent(t)).log({})})}getVisit(){return O(this,void 0,void 0,function*(){let r=yield(yield w(`${this.baseUrl}/analytics/visit`)).json();return this.visitorId=r.visitorId,r})}getHealth(){return O(this,void 0,void 0,function*(){return yield(yield w(`${this.baseUrl}/analytics/monitoring/health`)).json()})}registerBeforeSendEventHook(t){this.beforeSendHooks.push(t)}registerAfterSendEventHook(t){this.afterSendHooks.push(t)}addEventTypeMapping(t,r){this.eventTypeMapping[t]=r}setAcceptedLinkReferrers(t){if(Array.isArray(t)&&t.every(r=>typeof r=="string"))this.acceptedLinkReferrers=t;else throw Error("Parameter should be an array of domain strings")}parseVariableArgumentsPayload(t,r){let n={};for(let o=0,i=r.length;o<i;o++){let a=r[o];if(typeof a=="string")n[t[o]]=a;else if(typeof a=="object")return Object.assign(Object.assign({},n),a)}return n}isKeyAllowedEmpty(t,r){return({[te.search]:["queryText"]}[t]||[]).indexOf(r)!==-1}removeEmptyPayloadValues(t,r){let n=o=>typeof o<"u"&&o!==null&&o!=="";return Object.keys(t).filter(o=>this.isKeyAllowedEmpty(r,o)||n(t[o])).reduce((o,i)=>Object.assign(Object.assign({},o),{[i]:t[i]}),{})}removeUnknownParameters(t){return Object.keys(t).filter(n=>{if(hh(n))return!0;console.log(n,"is not processed by coveoua")}).reduce((n,o)=>Object.assign(Object.assign({},n),{[o]:t[o]}),{})}processCustomParameters(t){let{custom:r}=t,n=it(t,["custom"]),o={};r&&so(r)&&(o=this.lowercaseKeys(r));let i=yh(n);return Object.assign(Object.assign({},o),i)}mapCustomParametersToCustomData(t){let{custom:r}=t,n=it(t,["custom"]);if(r&&so(r)){let o=this.lowercaseKeys(r);return Object.assign(Object.assign({},n),{customData:Object.assign(Object.assign({},o),t.customData)})}else return t}lowercaseKeys(t){let r=Object.keys(t),n={};return r.forEach(o=>{n[o.toLowerCase()]=t[o]}),n}validateParams(t,r){let{anonymizeIp:n}=t,o=it(t,["anonymizeIp"]);return n!==void 0&&["0","false","undefined","null","{}","[]",""].indexOf(`${n}`.toLowerCase())==-1&&(o.anonymizeIp=1),(r==te.view||r==te.click||r==te.search||r==te.custom)&&(o.originLevel3=this.limit(o.originLevel3,1024)),r==te.view&&(o.location=this.limit(o.location,1024)),(r=="pageview"||r=="event")&&(o.referrer=this.limit(o.referrer,2048),o.location=this.limit(o.location,2048),o.page=this.limit(o.page,2048)),o}ensureAnonymousUserWhenUsingApiKey(t){let{userId:r}=t,n=it(t,["userId"]);return bh(this.options.token)&&!r?(n.userId="anonymous",n):t}setTrackingIdIfTrackingIdNotPresent(t){let{trackingId:r}=t,n=it(t,["trackingId"]);return r?t:(n.hasOwnProperty("custom")&&so(n.custom)&&(n.custom.hasOwnProperty("context_website")||n.custom.hasOwnProperty("siteName"))&&(n.trackingId=n.custom.context_website||n.custom.siteName),n.hasOwnProperty("customData")&&so(n.customData)&&(n.customData.hasOwnProperty("context_website")||n.customData.hasOwnProperty("siteName"))&&(n.trackingId=n.customData.context_website||n.customData.siteName),n)}limit(t,r){return typeof t=="string"?Tg(t,r):t}get baseUrl(){return Rh(this.options.endpoint,this.options.version,this.options.isCustomEndpoint)}},at;(function(e){e.contextChanged="contextChanged",e.expandToFullUI="expandToFullUI",e.openUserActions="openUserActions",e.showPrecedingSessions="showPrecedingSessions",e.showFollowingSessions="showFollowingSessions",e.clickViewedDocument="clickViewedDocument",e.clickPageView="clickPageView",e.createArticle="createArticle"})(at||(at={}));var D;(function(e){e.interfaceLoad="interfaceLoad",e.interfaceChange="interfaceChange",e.didyoumeanAutomatic="didyoumeanAutomatic",e.didyoumeanClick="didyoumeanClick",e.resultsSort="resultsSort",e.searchboxSubmit="searchboxSubmit",e.searchboxClear="searchboxClear",e.searchboxAsYouType="searchboxAsYouType",e.breadcrumbFacet="breadcrumbFacet",e.breadcrumbResetAll="breadcrumbResetAll",e.documentQuickview="documentQuickview",e.documentOpen="documentOpen",e.omniboxAnalytics="omniboxAnalytics",e.omniboxFromLink="omniboxFromLink",e.searchFromLink="searchFromLink",e.triggerNotify="notify",e.triggerExecute="execute",e.triggerQuery="query",e.undoTriggerQuery="undoQuery",e.triggerRedirect="redirect",e.pagerResize="pagerResize",e.pagerNumber="pagerNumber",e.pagerNext="pagerNext",e.pagerPrevious="pagerPrevious",e.pagerScrolling="pagerScrolling",e.staticFilterClearAll="staticFilterClearAll",e.staticFilterSelect="staticFilterSelect",e.staticFilterDeselect="staticFilterDeselect",e.facetClearAll="facetClearAll",e.facetSearch="facetSearch",e.facetSelect="facetSelect",e.facetSelectAll="facetSelectAll",e.facetDeselect="facetDeselect",e.facetExclude="facetExclude",e.facetUnexclude="facetUnexclude",e.facetUpdateSort="facetUpdateSort",e.facetShowMore="showMoreFacetResults",e.facetShowLess="showLessFacetResults",e.queryError="query",e.queryErrorBack="errorBack",e.queryErrorClear="errorClearQuery",e.queryErrorRetry="errorRetry",e.recommendation="recommendation",e.recommendationInterfaceLoad="recommendationInterfaceLoad",e.recommendationOpen="recommendationOpen",e.likeSmartSnippet="likeSmartSnippet",e.dislikeSmartSnippet="dislikeSmartSnippet",e.expandSmartSnippet="expandSmartSnippet",e.collapseSmartSnippet="collapseSmartSnippet",e.openSmartSnippetFeedbackModal="openSmartSnippetFeedbackModal",e.closeSmartSnippetFeedbackModal="closeSmartSnippetFeedbackModal",e.sendSmartSnippetReason="sendSmartSnippetReason",e.expandSmartSnippetSuggestion="expandSmartSnippetSuggestion",e.collapseSmartSnippetSuggestion="collapseSmartSnippetSuggestion",e.showMoreSmartSnippetSuggestion="showMoreSmartSnippetSuggestion",e.showLessSmartSnippetSuggestion="showLessSmartSnippetSuggestion",e.openSmartSnippetSource="openSmartSnippetSource",e.openSmartSnippetSuggestionSource="openSmartSnippetSuggestionSource",e.openSmartSnippetInlineLink="openSmartSnippetInlineLink",e.openSmartSnippetSuggestionInlineLink="openSmartSnippetSuggestionInlineLink",e.recentQueryClick="recentQueriesClick",e.clearRecentQueries="clearRecentQueries",e.recentResultClick="recentResultClick",e.clearRecentResults="clearRecentResults",e.noResultsBack="noResultsBack",e.showMoreFoldedResults="showMoreFoldedResults",e.showLessFoldedResults="showLessFoldedResults",e.copyToClipboard="copyToClipboard",e.caseSendEmail="Case.SendEmail",e.feedItemTextPost="FeedItem.TextPost",e.caseAttach="caseAttach",e.caseDetach="caseDetach",e.retryGeneratedAnswer="retryGeneratedAnswer",e.likeGeneratedAnswer="likeGeneratedAnswer",e.dislikeGeneratedAnswer="dislikeGeneratedAnswer",e.openGeneratedAnswerSource="openGeneratedAnswerSource",e.generatedAnswerStreamEnd="generatedAnswerStreamEnd",e.generatedAnswerSourceHover="generatedAnswerSourceHover",e.generatedAnswerCopyToClipboard="generatedAnswerCopyToClipboard",e.generatedAnswerHideAnswers="generatedAnswerHideAnswers",e.generatedAnswerShowAnswers="generatedAnswerShowAnswers",e.generatedAnswerExpand="generatedAnswerExpand",e.generatedAnswerCollapse="generatedAnswerCollapse",e.generatedAnswerFeedbackSubmit="generatedAnswerFeedbackSubmit",e.rephraseGeneratedAnswer="rephraseGeneratedAnswer",e.generatedAnswerFeedbackSubmitV2="generatedAnswerFeedbackSubmitV2",e.generatedAnswerCitationClick="generatedAnswerCitationClick"})(D||(D={}));var mu={[D.triggerNotify]:"queryPipelineTriggers",[D.triggerExecute]:"queryPipelineTriggers",[D.triggerQuery]:"queryPipelineTriggers",[D.triggerRedirect]:"queryPipelineTriggers",[D.queryError]:"errors",[D.queryErrorBack]:"errors",[D.queryErrorClear]:"errors",[D.queryErrorRetry]:"errors",[D.pagerNext]:"getMoreResults",[D.pagerPrevious]:"getMoreResults",[D.pagerNumber]:"getMoreResults",[D.pagerResize]:"getMoreResults",[D.pagerScrolling]:"getMoreResults",[D.facetSearch]:"facet",[D.facetShowLess]:"facet",[D.facetShowMore]:"facet",[D.recommendation]:"recommendation",[D.likeSmartSnippet]:"smartSnippet",[D.dislikeSmartSnippet]:"smartSnippet",[D.expandSmartSnippet]:"smartSnippet",[D.collapseSmartSnippet]:"smartSnippet",[D.openSmartSnippetFeedbackModal]:"smartSnippet",[D.closeSmartSnippetFeedbackModal]:"smartSnippet",[D.sendSmartSnippetReason]:"smartSnippet",[D.expandSmartSnippetSuggestion]:"smartSnippetSuggestions",[D.collapseSmartSnippetSuggestion]:"smartSnippetSuggestions",[D.showMoreSmartSnippetSuggestion]:"smartSnippetSuggestions",[D.showLessSmartSnippetSuggestion]:"smartSnippetSuggestions",[D.clearRecentQueries]:"recentQueries",[D.recentResultClick]:"recentlyClickedDocuments",[D.clearRecentResults]:"recentlyClickedDocuments",[D.showLessFoldedResults]:"folding",[D.caseDetach]:"case",[D.likeGeneratedAnswer]:"generatedAnswer",[D.dislikeGeneratedAnswer]:"generatedAnswer",[D.openGeneratedAnswerSource]:"generatedAnswer",[D.generatedAnswerStreamEnd]:"generatedAnswer",[D.generatedAnswerSourceHover]:"generatedAnswer",[D.generatedAnswerCopyToClipboard]:"generatedAnswer",[D.generatedAnswerHideAnswers]:"generatedAnswer",[D.generatedAnswerShowAnswers]:"generatedAnswer",[D.generatedAnswerExpand]:"generatedAnswer",[D.generatedAnswerCollapse]:"generatedAnswer",[D.generatedAnswerFeedbackSubmit]:"generatedAnswer",[D.generatedAnswerFeedbackSubmitV2]:"generatedAnswer",[at.expandToFullUI]:"interface",[at.openUserActions]:"User Actions",[at.showPrecedingSessions]:"User Actions",[at.showFollowingSessions]:"User Actions",[at.clickViewedDocument]:"User Actions",[at.clickPageView]:"User Actions",[at.createArticle]:"createArticle"},Sr=class{constructor(){this.runtime=new fo,this.currentVisitorId=""}getPayload(){return Promise.resolve()}getParameters(){return Promise.resolve()}makeEvent(t){return Promise.resolve({eventType:t,payload:null,log:()=>Promise.resolve()})}sendEvent(){return Promise.resolve()}makeSearchEvent(){return this.makeEvent(te.search)}sendSearchEvent(){return Promise.resolve()}makeClickEvent(){return this.makeEvent(te.click)}sendClickEvent(){return Promise.resolve()}makeCustomEvent(){return this.makeEvent(te.custom)}sendCustomEvent(){return Promise.resolve()}makeViewEvent(){return this.makeEvent(te.view)}sendViewEvent(){return Promise.resolve()}getVisit(){return Promise.resolve({id:"",visitorId:""})}getHealth(){return Promise.resolve({status:""})}registerBeforeSendEventHook(){}registerAfterSendEventHook(){}addEventTypeMapping(){}get version(){return xu}};function Ih(e){let t="";return e.filter(r=>{let n=r!==t;return t=r,n})}function Ph(e){return e.map(t=>t.replace(/;/g,""))}function Fu(e){let r=e.join(";");return r.length<=256?r:Fu(e.slice(1))}var gu=e=>{let t=Ph(e),r=Ih(t);return Fu(r)};function hu(e){let t=typeof e.partialQueries=="string"?e.partialQueries:gu(e.partialQueries),r=typeof e.suggestions=="string"?e.suggestions:gu(e.suggestions);return Object.assign(Object.assign({},e),{partialQueries:t,suggestions:r})}var go=class{constructor(t,r){this.opts=t,this.provider=r;let n=t.enableAnalytics===!1||mo();this.coveoAnalyticsClient=n?new Sr:new st(t)}disable(){this.coveoAnalyticsClient=new Sr}enable(){this.coveoAnalyticsClient=new st(this.opts)}makeInterfaceLoad(){return this.makeSearchEvent(D.interfaceLoad)}logInterfaceLoad(){return O(this,void 0,void 0,function*(){return(yield this.makeInterfaceLoad()).log({searchUID:this.provider.getSearchUID()})})}makeRecommendationInterfaceLoad(){return this.makeSearchEvent(D.recommendationInterfaceLoad)}logRecommendationInterfaceLoad(){return O(this,void 0,void 0,function*(){return(yield this.makeRecommendationInterfaceLoad()).log({searchUID:this.provider.getSearchUID()})})}makeRecommendation(){return this.makeCustomEvent(D.recommendation)}logRecommendation(){return O(this,void 0,void 0,function*(){return(yield this.makeRecommendation()).log({searchUID:this.provider.getSearchUID()})})}makeRecommendationOpen(t,r){return this.makeClickEvent(D.recommendationOpen,t,r)}logRecommendationOpen(t,r){return O(this,void 0,void 0,function*(){return(yield this.makeRecommendationOpen(t,r)).log({searchUID:this.provider.getSearchUID()})})}makeStaticFilterClearAll(t){return this.makeSearchEvent(D.staticFilterClearAll,t)}logStaticFilterClearAll(t){return O(this,void 0,void 0,function*(){return(yield this.makeStaticFilterClearAll(t)).log({searchUID:this.provider.getSearchUID()})})}makeStaticFilterSelect(t){return this.makeSearchEvent(D.staticFilterSelect,t)}logStaticFilterSelect(t){return O(this,void 0,void 0,function*(){return(yield this.makeStaticFilterSelect(t)).log({searchUID:this.provider.getSearchUID()})})}makeStaticFilterDeselect(t){return this.makeSearchEvent(D.staticFilterDeselect,t)}logStaticFilterDeselect(t){return O(this,void 0,void 0,function*(){return(yield this.makeStaticFilterDeselect(t)).log({searchUID:this.provider.getSearchUID()})})}makeFetchMoreResults(){return this.makeCustomEvent(D.pagerScrolling,{type:"getMoreResults"})}logFetchMoreResults(){return O(this,void 0,void 0,function*(){return(yield this.makeFetchMoreResults()).log({searchUID:this.provider.getSearchUID()})})}makeInterfaceChange(t){return this.makeSearchEvent(D.interfaceChange,t)}logInterfaceChange(t){return O(this,void 0,void 0,function*(){return(yield this.makeInterfaceChange(t)).log({searchUID:this.provider.getSearchUID()})})}makeDidYouMeanAutomatic(){return this.makeSearchEvent(D.didyoumeanAutomatic)}logDidYouMeanAutomatic(){return O(this,void 0,void 0,function*(){return(yield this.makeDidYouMeanAutomatic()).log({searchUID:this.provider.getSearchUID()})})}makeDidYouMeanClick(){return this.makeSearchEvent(D.didyoumeanClick)}logDidYouMeanClick(){return O(this,void 0,void 0,function*(){return(yield this.makeDidYouMeanClick()).log({searchUID:this.provider.getSearchUID()})})}makeResultsSort(t){return this.makeSearchEvent(D.resultsSort,t)}logResultsSort(t){return O(this,void 0,void 0,function*(){return(yield this.makeResultsSort(t)).log({searchUID:this.provider.getSearchUID()})})}makeSearchboxSubmit(){return this.makeSearchEvent(D.searchboxSubmit)}logSearchboxSubmit(){return O(this,void 0,void 0,function*(){return(yield this.makeSearchboxSubmit()).log({searchUID:this.provider.getSearchUID()})})}makeSearchboxClear(){return this.makeSearchEvent(D.searchboxClear)}logSearchboxClear(){return O(this,void 0,void 0,function*(){return(yield this.makeSearchboxClear()).log({searchUID:this.provider.getSearchUID()})})}makeSearchboxAsYouType(){return this.makeSearchEvent(D.searchboxAsYouType)}logSearchboxAsYouType(){return O(this,void 0,void 0,function*(){return(yield this.makeSearchboxAsYouType()).log({searchUID:this.provider.getSearchUID()})})}makeBreadcrumbFacet(t){return this.makeSearchEvent(D.breadcrumbFacet,t)}logBreadcrumbFacet(t){return O(this,void 0,void 0,function*(){return(yield this.makeBreadcrumbFacet(t)).log({searchUID:this.provider.getSearchUID()})})}makeBreadcrumbResetAll(){return this.makeSearchEvent(D.breadcrumbResetAll)}logBreadcrumbResetAll(){return O(this,void 0,void 0,function*(){return(yield this.makeBreadcrumbResetAll()).log({searchUID:this.provider.getSearchUID()})})}makeDocumentQuickview(t,r){return this.makeClickEvent(D.documentQuickview,t,r)}logDocumentQuickview(t,r){return O(this,void 0,void 0,function*(){return(yield this.makeDocumentQuickview(t,r)).log({searchUID:this.provider.getSearchUID()})})}makeDocumentOpen(t,r){return this.makeClickEvent(D.documentOpen,t,r)}logDocumentOpen(t,r){return O(this,void 0,void 0,function*(){return(yield this.makeDocumentOpen(t,r)).log({searchUID:this.provider.getSearchUID()})})}makeOmniboxAnalytics(t){return this.makeSearchEvent(D.omniboxAnalytics,hu(t))}logOmniboxAnalytics(t){return O(this,void 0,void 0,function*(){return(yield this.makeOmniboxAnalytics(t)).log({searchUID:this.provider.getSearchUID()})})}makeOmniboxFromLink(t){return this.makeSearchEvent(D.omniboxFromLink,hu(t))}logOmniboxFromLink(t){return O(this,void 0,void 0,function*(){return(yield this.makeOmniboxFromLink(t)).log({searchUID:this.provider.getSearchUID()})})}makeSearchFromLink(){return this.makeSearchEvent(D.searchFromLink)}logSearchFromLink(){return O(this,void 0,void 0,function*(){return(yield this.makeSearchFromLink()).log({searchUID:this.provider.getSearchUID()})})}makeTriggerNotify(t){return this.makeCustomEvent(D.triggerNotify,t)}logTriggerNotify(t){return O(this,void 0,void 0,function*(){return(yield this.makeTriggerNotify(t)).log({searchUID:this.provider.getSearchUID()})})}makeTriggerExecute(t){return this.makeCustomEvent(D.triggerExecute,t)}logTriggerExecute(t){return O(this,void 0,void 0,function*(){return(yield this.makeTriggerExecute(t)).log({searchUID:this.provider.getSearchUID()})})}makeTriggerQuery(){return this.makeCustomEvent(D.triggerQuery,{query:this.provider.getSearchEventRequestPayload().queryText},"queryPipelineTriggers")}logTriggerQuery(){return O(this,void 0,void 0,function*(){return(yield this.makeTriggerQuery()).log({searchUID:this.provider.getSearchUID()})})}makeUndoTriggerQuery(t){return this.makeSearchEvent(D.undoTriggerQuery,t)}logUndoTriggerQuery(t){return O(this,void 0,void 0,function*(){return(yield this.makeUndoTriggerQuery(t)).log({searchUID:this.provider.getSearchUID()})})}makeTriggerRedirect(t){return this.makeCustomEvent(D.triggerRedirect,Object.assign(Object.assign({},t),{query:this.provider.getSearchEventRequestPayload().queryText}))}logTriggerRedirect(t){return O(this,void 0,void 0,function*(){return(yield this.makeTriggerRedirect(t)).log({searchUID:this.provider.getSearchUID()})})}makePagerResize(t){return this.makeCustomEvent(D.pagerResize,t)}logPagerResize(t){return O(this,void 0,void 0,function*(){return(yield this.makePagerResize(t)).log({searchUID:this.provider.getSearchUID()})})}makePagerNumber(t){return this.makeCustomEvent(D.pagerNumber,t)}logPagerNumber(t){return O(this,void 0,void 0,function*(){return(yield this.makePagerNumber(t)).log({searchUID:this.provider.getSearchUID()})})}makePagerNext(t){return this.makeCustomEvent(D.pagerNext,t)}logPagerNext(t){return O(this,void 0,void 0,function*(){return(yield this.makePagerNext(t)).log({searchUID:this.provider.getSearchUID()})})}makePagerPrevious(t){return this.makeCustomEvent(D.pagerPrevious,t)}logPagerPrevious(t){return O(this,void 0,void 0,function*(){return(yield this.makePagerPrevious(t)).log({searchUID:this.provider.getSearchUID()})})}makePagerScrolling(){return this.makeCustomEvent(D.pagerScrolling)}logPagerScrolling(){return O(this,void 0,void 0,function*(){return(yield this.makePagerScrolling()).log({searchUID:this.provider.getSearchUID()})})}makeFacetClearAll(t){return this.makeSearchEvent(D.facetClearAll,t)}logFacetClearAll(t){return O(this,void 0,void 0,function*(){return(yield this.makeFacetClearAll(t)).log({searchUID:this.provider.getSearchUID()})})}makeFacetSearch(t){return this.makeSearchEvent(D.facetSearch,t)}logFacetSearch(t){return O(this,void 0,void 0,function*(){return(yield this.makeFacetSearch(t)).log({searchUID:this.provider.getSearchUID()})})}makeFacetSelect(t){return this.makeSearchEvent(D.facetSelect,t)}logFacetSelect(t){return O(this,void 0,void 0,function*(){return(yield this.makeFacetSelect(t)).log({searchUID:this.provider.getSearchUID()})})}makeFacetDeselect(t){return this.makeSearchEvent(D.facetDeselect,t)}logFacetDeselect(t){return O(this,void 0,void 0,function*(){return(yield this.makeFacetDeselect(t)).log({searchUID:this.provider.getSearchUID()})})}makeFacetExclude(t){return this.makeSearchEvent(D.facetExclude,t)}logFacetExclude(t){return O(this,void 0,void 0,function*(){return(yield this.makeFacetExclude(t)).log({searchUID:this.provider.getSearchUID()})})}makeFacetUnexclude(t){return this.makeSearchEvent(D.facetUnexclude,t)}logFacetUnexclude(t){return O(this,void 0,void 0,function*(){return(yield this.makeFacetUnexclude(t)).log({searchUID:this.provider.getSearchUID()})})}makeFacetSelectAll(t){return this.makeSearchEvent(D.facetSelectAll,t)}logFacetSelectAll(t){return O(this,void 0,void 0,function*(){return(yield this.makeFacetSelectAll(t)).log({searchUID:this.provider.getSearchUID()})})}makeFacetUpdateSort(t){return this.makeSearchEvent(D.facetUpdateSort,t)}logFacetUpdateSort(t){return O(this,void 0,void 0,function*(){return(yield this.makeFacetUpdateSort(t)).log({searchUID:this.provider.getSearchUID()})})}makeFacetShowMore(t){return this.makeCustomEvent(D.facetShowMore,t)}logFacetShowMore(t){return O(this,void 0,void 0,function*(){return(yield this.makeFacetShowMore(t)).log({searchUID:this.provider.getSearchUID()})})}makeFacetShowLess(t){return this.makeCustomEvent(D.facetShowLess,t)}logFacetShowLess(t){return O(this,void 0,void 0,function*(){return(yield this.makeFacetShowLess(t)).log({searchUID:this.provider.getSearchUID()})})}makeQueryError(t){return this.makeCustomEvent(D.queryError,t)}logQueryError(t){return O(this,void 0,void 0,function*(){return(yield this.makeQueryError(t)).log({searchUID:this.provider.getSearchUID()})})}makeQueryErrorBack(){return O(this,void 0,void 0,function*(){let t=yield this.makeCustomEvent(D.queryErrorBack);return{description:t.description,log:()=>O(this,void 0,void 0,function*(){return yield t.log({searchUID:this.provider.getSearchUID()}),this.logSearchEvent(D.queryErrorBack)})}})}logQueryErrorBack(){return O(this,void 0,void 0,function*(){return(yield this.makeQueryErrorBack()).log({searchUID:this.provider.getSearchUID()})})}makeQueryErrorRetry(){return O(this,void 0,void 0,function*(){let t=yield this.makeCustomEvent(D.queryErrorRetry);return{description:t.description,log:()=>O(this,void 0,void 0,function*(){return yield t.log({searchUID:this.provider.getSearchUID()}),this.logSearchEvent(D.queryErrorRetry)})}})}logQueryErrorRetry(){return O(this,void 0,void 0,function*(){return(yield this.makeQueryErrorRetry()).log({searchUID:this.provider.getSearchUID()})})}makeQueryErrorClear(){return O(this,void 0,void 0,function*(){let t=yield this.makeCustomEvent(D.queryErrorClear);return{description:t.description,log:()=>O(this,void 0,void 0,function*(){return yield t.log({searchUID:this.provider.getSearchUID()}),this.logSearchEvent(D.queryErrorClear)})}})}logQueryErrorClear(){return O(this,void 0,void 0,function*(){return(yield this.makeQueryErrorClear()).log({searchUID:this.provider.getSearchUID()})})}makeLikeSmartSnippet(){return this.makeCustomEvent(D.likeSmartSnippet)}logLikeSmartSnippet(){return O(this,void 0,void 0,function*(){return(yield this.makeLikeSmartSnippet()).log({searchUID:this.provider.getSearchUID()})})}makeDislikeSmartSnippet(){return this.makeCustomEvent(D.dislikeSmartSnippet)}logDislikeSmartSnippet(){return O(this,void 0,void 0,function*(){return(yield this.makeDislikeSmartSnippet()).log({searchUID:this.provider.getSearchUID()})})}makeExpandSmartSnippet(){return this.makeCustomEvent(D.expandSmartSnippet)}logExpandSmartSnippet(){return O(this,void 0,void 0,function*(){return(yield this.makeExpandSmartSnippet()).log({searchUID:this.provider.getSearchUID()})})}makeCollapseSmartSnippet(){return this.makeCustomEvent(D.collapseSmartSnippet)}logCollapseSmartSnippet(){return O(this,void 0,void 0,function*(){return(yield this.makeCollapseSmartSnippet()).log({searchUID:this.provider.getSearchUID()})})}makeOpenSmartSnippetFeedbackModal(){return this.makeCustomEvent(D.openSmartSnippetFeedbackModal)}logOpenSmartSnippetFeedbackModal(){return O(this,void 0,void 0,function*(){return(yield this.makeOpenSmartSnippetFeedbackModal()).log({searchUID:this.provider.getSearchUID()})})}makeCloseSmartSnippetFeedbackModal(){return this.makeCustomEvent(D.closeSmartSnippetFeedbackModal)}logCloseSmartSnippetFeedbackModal(){return O(this,void 0,void 0,function*(){return(yield this.makeCloseSmartSnippetFeedbackModal()).log({searchUID:this.provider.getSearchUID()})})}makeSmartSnippetFeedbackReason(t,r){return this.makeCustomEvent(D.sendSmartSnippetReason,{reason:t,details:r})}logSmartSnippetFeedbackReason(t,r){return O(this,void 0,void 0,function*(){return(yield this.makeSmartSnippetFeedbackReason(t,r)).log({searchUID:this.provider.getSearchUID()})})}makeExpandSmartSnippetSuggestion(t){return this.makeCustomEvent(D.expandSmartSnippetSuggestion,"documentId"in t?t:{documentId:t})}logExpandSmartSnippetSuggestion(t){return O(this,void 0,void 0,function*(){return(yield this.makeExpandSmartSnippetSuggestion(t)).log({searchUID:this.provider.getSearchUID()})})}makeCollapseSmartSnippetSuggestion(t){return this.makeCustomEvent(D.collapseSmartSnippetSuggestion,"documentId"in t?t:{documentId:t})}logCollapseSmartSnippetSuggestion(t){return O(this,void 0,void 0,function*(){return(yield this.makeCollapseSmartSnippetSuggestion(t)).log({searchUID:this.provider.getSearchUID()})})}makeShowMoreSmartSnippetSuggestion(t){return this.makeCustomEvent(D.showMoreSmartSnippetSuggestion,t)}logShowMoreSmartSnippetSuggestion(t){return O(this,void 0,void 0,function*(){return(yield this.makeShowMoreSmartSnippetSuggestion(t)).log({searchUID:this.provider.getSearchUID()})})}makeShowLessSmartSnippetSuggestion(t){return this.makeCustomEvent(D.showLessSmartSnippetSuggestion,t)}logShowLessSmartSnippetSuggestion(t){return O(this,void 0,void 0,function*(){return(yield this.makeShowLessSmartSnippetSuggestion(t)).log({searchUID:this.provider.getSearchUID()})})}makeOpenSmartSnippetSource(t,r){return this.makeClickEvent(D.openSmartSnippetSource,t,r)}logOpenSmartSnippetSource(t,r){return O(this,void 0,void 0,function*(){return(yield this.makeOpenSmartSnippetSource(t,r)).log({searchUID:this.provider.getSearchUID()})})}makeOpenSmartSnippetSuggestionSource(t,r){return this.makeClickEvent(D.openSmartSnippetSuggestionSource,t,{contentIDKey:r.documentId.contentIdKey,contentIDValue:r.documentId.contentIdValue},r)}makeCopyToClipboard(t,r){return this.makeClickEvent(D.copyToClipboard,t,r)}logCopyToClipboard(t,r){return O(this,void 0,void 0,function*(){return(yield this.makeCopyToClipboard(t,r)).log({searchUID:this.provider.getSearchUID()})})}logOpenSmartSnippetSuggestionSource(t,r){return O(this,void 0,void 0,function*(){return(yield this.makeOpenSmartSnippetSuggestionSource(t,r)).log({searchUID:this.provider.getSearchUID()})})}makeOpenSmartSnippetInlineLink(t,r){return this.makeClickEvent(D.openSmartSnippetInlineLink,t,{contentIDKey:r.contentIDKey,contentIDValue:r.contentIDValue},r)}logOpenSmartSnippetInlineLink(t,r){return O(this,void 0,void 0,function*(){return(yield this.makeOpenSmartSnippetInlineLink(t,r)).log({searchUID:this.provider.getSearchUID()})})}makeOpenSmartSnippetSuggestionInlineLink(t,r){return this.makeClickEvent(D.openSmartSnippetSuggestionInlineLink,t,{contentIDKey:r.documentId.contentIdKey,contentIDValue:r.documentId.contentIdValue},r)}logOpenSmartSnippetSuggestionInlineLink(t,r){return O(this,void 0,void 0,function*(){return(yield this.makeOpenSmartSnippetSuggestionInlineLink(t,r)).log({searchUID:this.provider.getSearchUID()})})}makeRecentQueryClick(){return this.makeSearchEvent(D.recentQueryClick)}logRecentQueryClick(){return O(this,void 0,void 0,function*(){return(yield this.makeRecentQueryClick()).log({searchUID:this.provider.getSearchUID()})})}makeClearRecentQueries(){return this.makeCustomEvent(D.clearRecentQueries)}logClearRecentQueries(){return O(this,void 0,void 0,function*(){return(yield this.makeClearRecentQueries()).log({searchUID:this.provider.getSearchUID()})})}makeRecentResultClick(t,r){return this.makeCustomEvent(D.recentResultClick,{info:t,identifier:r})}logRecentResultClick(t,r){return O(this,void 0,void 0,function*(){return(yield this.makeRecentResultClick(t,r)).log({searchUID:this.provider.getSearchUID()})})}makeClearRecentResults(){return this.makeCustomEvent(D.clearRecentResults)}logClearRecentResults(){return O(this,void 0,void 0,function*(){return(yield this.makeClearRecentResults()).log({searchUID:this.provider.getSearchUID()})})}makeNoResultsBack(){return this.makeSearchEvent(D.noResultsBack)}logNoResultsBack(){return O(this,void 0,void 0,function*(){return(yield this.makeNoResultsBack()).log({searchUID:this.provider.getSearchUID()})})}makeShowMoreFoldedResults(t,r){return this.makeClickEvent(D.showMoreFoldedResults,t,r)}logShowMoreFoldedResults(t,r){return O(this,void 0,void 0,function*(){return(yield this.makeShowMoreFoldedResults(t,r)).log({searchUID:this.provider.getSearchUID()})})}makeShowLessFoldedResults(){return this.makeCustomEvent(D.showLessFoldedResults)}logShowLessFoldedResults(){return O(this,void 0,void 0,function*(){return(yield this.makeShowLessFoldedResults()).log({searchUID:this.provider.getSearchUID()})})}makeEventDescription(t,r){var n;return{actionCause:r,customData:(n=t.payload)===null||n===void 0?void 0:n.customData}}makeCustomEvent(t,r,n=mu[t]){return O(this,void 0,void 0,function*(){this.coveoAnalyticsClient.getParameters;let o=Object.assign(Object.assign({},this.provider.getBaseMetadata()),r),i=Object.assign(Object.assign({},yield this.getBaseEventRequest(o)),{eventType:n,eventValue:t}),a=yield this.coveoAnalyticsClient.makeCustomEvent(i);return{description:this.makeEventDescription(a,t),log:({searchUID:m})=>a.log({lastSearchQueryUid:m})}})}logCustomEvent(t,r,n=mu[t]){return O(this,void 0,void 0,function*(){return(yield this.makeCustomEvent(t,r,n)).log({searchUID:this.provider.getSearchUID()})})}makeCustomEventWithType(t,r,n){return O(this,void 0,void 0,function*(){let o=Object.assign(Object.assign({},this.provider.getBaseMetadata()),n),i=Object.assign(Object.assign({},yield this.getBaseEventRequest(o)),{eventType:r,eventValue:t}),a=yield this.coveoAnalyticsClient.makeCustomEvent(i);return{description:this.makeEventDescription(a,t),log:({searchUID:m})=>a.log({lastSearchQueryUid:m})}})}logCustomEventWithType(t,r,n){return O(this,void 0,void 0,function*(){return(yield this.makeCustomEventWithType(t,r,n)).log({searchUID:this.provider.getSearchUID()})})}logSearchEvent(t,r){return O(this,void 0,void 0,function*(){return(yield this.makeSearchEvent(t,r)).log({searchUID:this.provider.getSearchUID()})})}makeSearchEvent(t,r){return O(this,void 0,void 0,function*(){let n=yield this.getBaseSearchEventRequest(t,r),o=yield this.coveoAnalyticsClient.makeSearchEvent(n);return{description:this.makeEventDescription(o,t),log:({searchUID:i})=>o.log({searchQueryUid:i})}})}makeClickEvent(t,r,n,o){return O(this,void 0,void 0,function*(){let i=Object.assign(Object.assign(Object.assign({},r),yield this.getBaseEventRequest(Object.assign(Object.assign({},n),o))),{queryPipeline:this.provider.getPipeline(),actionCause:t}),a=yield this.coveoAnalyticsClient.makeClickEvent(i);return{description:this.makeEventDescription(a,t),log:({searchUID:m})=>a.log({searchQueryUid:m})}})}logClickEvent(t,r,n,o){return O(this,void 0,void 0,function*(){return(yield this.makeClickEvent(t,r,n,o)).log({searchUID:this.provider.getSearchUID()})})}getBaseSearchEventRequest(t,r){var n,o;return O(this,void 0,void 0,function*(){return Object.assign(Object.assign(Object.assign({},yield this.getBaseEventRequest(Object.assign(Object.assign({},r),(o=(n=this.provider).getGeneratedAnswerMetadata)===null||o===void 0?void 0:o.call(n)))),this.provider.getSearchEventRequestPayload()),{queryPipeline:this.provider.getPipeline(),actionCause:t})})}getBaseEventRequest(t){return O(this,void 0,void 0,function*(){let r=Object.assign(Object.assign({},this.provider.getBaseMetadata()),t);return Object.assign(Object.assign(Object.assign({},this.getOrigins()),this.getSplitTestRun()),{customData:r,language:this.provider.getLanguage(),facetState:this.provider.getFacetState?this.provider.getFacetState():[],anonymous:this.provider.getIsAnonymous(),clientId:yield this.getClientId()})})}getOrigins(){var t,r;return{originContext:(r=(t=this.provider).getOriginContext)===null||r===void 0?void 0:r.call(t),originLevel1:this.provider.getOriginLevel1(),originLevel2:this.provider.getOriginLevel2(),originLevel3:this.provider.getOriginLevel3()}}getClientId(){return this.coveoAnalyticsClient instanceof st?this.coveoAnalyticsClient.getCurrentVisitorId():void 0}getSplitTestRun(){let t=this.provider.getSplitTestRunName?this.provider.getSplitTestRunName():"",r=this.provider.getSplitTestRunVersion?this.provider.getSplitTestRunVersion():"";return Object.assign(Object.assign({},t&&{splitTestRunName:t}),r&&{splitTestRunVersion:r})}makeLikeGeneratedAnswer(t){return this.makeCustomEvent(D.likeGeneratedAnswer,t)}logLikeGeneratedAnswer(t){return O(this,void 0,void 0,function*(){return(yield this.makeLikeGeneratedAnswer(t)).log({searchUID:this.provider.getSearchUID()})})}makeDislikeGeneratedAnswer(t){return this.makeCustomEvent(D.dislikeGeneratedAnswer,t)}logDislikeGeneratedAnswer(t){return O(this,void 0,void 0,function*(){return(yield this.makeDislikeGeneratedAnswer(t)).log({searchUID:this.provider.getSearchUID()})})}makeOpenGeneratedAnswerSource(t){return this.makeCustomEvent(D.openGeneratedAnswerSource,t)}logOpenGeneratedAnswerSource(t){return O(this,void 0,void 0,function*(){return(yield this.makeOpenGeneratedAnswerSource(t)).log({searchUID:this.provider.getSearchUID()})})}makeGeneratedAnswerCitationClick(t,r){return this.makeClickEvent(D.generatedAnswerCitationClick,Object.assign(Object.assign({},t),{documentPosition:1}),{contentIDKey:r.documentId.contentIdKey,contentIDValue:r.documentId.contentIdValue},r)}logGeneratedAnswerCitationClick(t,r){return O(this,void 0,void 0,function*(){return(yield this.makeGeneratedAnswerCitationClick(t,r)).log({searchUID:this.provider.getSearchUID()})})}makeGeneratedAnswerSourceHover(t){return this.makeCustomEvent(D.generatedAnswerSourceHover,t)}logGeneratedAnswerSourceHover(t){return O(this,void 0,void 0,function*(){return(yield this.makeGeneratedAnswerSourceHover(t)).log({searchUID:this.provider.getSearchUID()})})}makeGeneratedAnswerCopyToClipboard(t){return this.makeCustomEvent(D.generatedAnswerCopyToClipboard,t)}logGeneratedAnswerCopyToClipboard(t){return O(this,void 0,void 0,function*(){return(yield this.makeGeneratedAnswerCopyToClipboard(t)).log({searchUID:this.provider.getSearchUID()})})}makeGeneratedAnswerHideAnswers(t){return this.makeCustomEvent(D.generatedAnswerHideAnswers,t)}logGeneratedAnswerHideAnswers(t){return O(this,void 0,void 0,function*(){return(yield this.makeGeneratedAnswerHideAnswers(t)).log({searchUID:this.provider.getSearchUID()})})}makeGeneratedAnswerShowAnswers(t){return this.makeCustomEvent(D.generatedAnswerShowAnswers,t)}logGeneratedAnswerShowAnswers(t){return O(this,void 0,void 0,function*(){return(yield this.makeGeneratedAnswerShowAnswers(t)).log({searchUID:this.provider.getSearchUID()})})}makeGeneratedAnswerExpand(t){return this.makeCustomEvent(D.generatedAnswerExpand,t)}logGeneratedAnswerExpand(t){return O(this,void 0,void 0,function*(){return(yield this.makeGeneratedAnswerExpand(t)).log({searchUID:this.provider.getSearchUID()})})}makeGeneratedAnswerCollapse(t){return this.makeCustomEvent(D.generatedAnswerCollapse,t)}logGeneratedAnswerCollapse(t){return O(this,void 0,void 0,function*(){return(yield this.makeGeneratedAnswerCollapse(t)).log({searchUID:this.provider.getSearchUID()})})}makeGeneratedAnswerFeedbackSubmit(t){return this.makeCustomEvent(D.generatedAnswerFeedbackSubmit,t)}logGeneratedAnswerFeedbackSubmit(t){return O(this,void 0,void 0,function*(){return(yield this.makeGeneratedAnswerFeedbackSubmit(t)).log({searchUID:this.provider.getSearchUID()})})}makeGeneratedAnswerFeedbackSubmitV2(t){return this.makeCustomEvent(D.generatedAnswerFeedbackSubmitV2,t)}logGeneratedAnswerFeedbackSubmitV2(t){return O(this,void 0,void 0,function*(){return(yield this.makeGeneratedAnswerFeedbackSubmitV2(t)).log({searchUID:this.provider.getSearchUID()})})}makeRephraseGeneratedAnswer(t){return this.makeSearchEvent(D.rephraseGeneratedAnswer,t)}logRephraseGeneratedAnswer(t){return O(this,void 0,void 0,function*(){return(yield this.makeRephraseGeneratedAnswer(t)).log({searchUID:this.provider.getSearchUID()})})}makeRetryGeneratedAnswer(){return this.makeSearchEvent(D.retryGeneratedAnswer)}logRetryGeneratedAnswer(){return O(this,void 0,void 0,function*(){return(yield this.makeRetryGeneratedAnswer()).log({searchUID:this.provider.getSearchUID()})})}makeGeneratedAnswerStreamEnd(t){return this.makeCustomEvent(D.generatedAnswerStreamEnd,t)}logGeneratedAnswerStreamEnd(t){return O(this,void 0,void 0,function*(){return(yield this.makeGeneratedAnswerStreamEnd(t)).log({searchUID:this.provider.getSearchUID()})})}},ho=Object.assign({},sn),yu=Object.keys(ho).map(e=>ho[e]),gr=class extends da{constructor({client:t,uuidGenerator:r=zt}){super({client:t,uuidGenerator:r}),this.ticket={}}getApi(t){let r=super.getApi(t);if(r!==null)return r;switch(t){case"setTicket":return this.setTicket;default:return null}}addHooks(){this.addHooksForEvent(),this.addHooksForPageView(),this.addHooksForSVCEvents()}setTicket(t){this.ticket=t}clearPluginData(){this.ticket={}}addHooksForSVCEvents(){this.client.registerBeforeSendEventHook((t,...[r])=>yu.indexOf(t)!==-1?this.addSVCDataToPayload(t,r):r),this.client.registerAfterSendEventHook((t,...[r])=>(yu.indexOf(t)!==-1&&this.updateLocationInformation(t,r),r))}addHooksForPageView(){this.client.addEventTypeMapping(ho.pageview,{newEventType:te.collect,variableLengthArgumentsNames:["page"],addVisitorIdParameter:!0,usesMeasurementProtocol:!0})}addHooksForEvent(){this.client.addEventTypeMapping(ho.event,{newEventType:te.collect,variableLengthArgumentsNames:["eventCategory","eventAction","eventLabel","eventValue"],addVisitorIdParameter:!0,usesMeasurementProtocol:!0})}addSVCDataToPayload(t,r){var n;let o=Object.assign(Object.assign(Object.assign(Object.assign({},this.getLocationInformation(t,r)),this.getDefaultContextInformation(t)),this.action?{svcAction:this.action}:{}),Object.keys((n=this.actionData)!==null&&n!==void 0?n:{}).length>0?{svcActionData:this.actionData}:{}),i=this.getTicketPayload();return this.clearData(),Object.assign(Object.assign(Object.assign({},i),o),r)}getTicketPayload(){return Mg(this.ticket)}};gr.Id="svc";var yo;(function(e){e.click="click",e.flowStart="flowStart"})(yo||(yo={}));var Ue;(function(e){e.enterInterface="ticket_create_start",e.fieldUpdate="ticket_field_update",e.fieldSuggestionClick="ticket_classification_click",e.suggestionClick="suggestion_click",e.suggestionRate="suggestion_rate",e.nextCaseStep="ticket_next_stage",e.caseCancelled="ticket_cancel",e.caseSolved="ticket_cancel",e.caseCreated="ticket_create"})(Ue||(Ue={}));var So;(function(e){e.quit="Quit",e.solved="Solved"})(So||(So={}));var vo=class{constructor(t,r){var n;this.options=t,this.provider=r;let o=((n=t.enableAnalytics)!==null&&n!==void 0?n:!0)&&!mo();this.coveoAnalyticsClient=o?new st(t):new Sr,this.svc=new gr({client:this.coveoAnalyticsClient})}disable(){this.coveoAnalyticsClient=new Sr,this.svc=new gr({client:this.coveoAnalyticsClient})}enable(){this.coveoAnalyticsClient=new st(this.options),this.svc=new gr({client:this.coveoAnalyticsClient})}logEnterInterface(t){return this.svc.setAction(Ue.enterInterface),this.svc.setTicket(t.ticket),this.sendFlowStartEvent()}logUpdateCaseField(t){return this.svc.setAction(Ue.fieldUpdate,{fieldName:t.fieldName}),this.svc.setTicket(t.ticket),this.sendClickEvent()}logSelectFieldSuggestion(t){return this.svc.setAction(Ue.fieldSuggestionClick,t.suggestion),this.svc.setTicket(t.ticket),this.sendClickEvent()}logSelectDocumentSuggestion(t){return this.svc.setAction(Ue.suggestionClick,t.suggestion),this.svc.setTicket(t.ticket),this.sendClickEvent()}logRateDocumentSuggestion(t){return this.svc.setAction(Ue.suggestionRate,Object.assign({rate:t.rating},t.suggestion)),this.svc.setTicket(t.ticket),this.sendClickEvent()}logMoveToNextCaseStep(t){return this.svc.setAction(Ue.nextCaseStep,{stage:t?.stage}),this.svc.setTicket(t.ticket),this.sendClickEvent()}logCaseCancelled(t){return this.svc.setAction(Ue.caseCancelled,{reason:So.quit}),this.svc.setTicket(t.ticket),this.sendClickEvent()}logCaseSolved(t){return this.svc.setAction(Ue.caseSolved,{reason:So.solved}),this.svc.setTicket(t.ticket),this.sendClickEvent()}logCaseCreated(t){return this.svc.setAction(Ue.caseCreated),this.svc.setTicket(t.ticket),this.sendClickEvent()}sendFlowStartEvent(){return this.coveoAnalyticsClient.sendEvent("event","svc",yo.flowStart,this.provider?{searchHub:this.provider.getOriginLevel1()}:null)}sendClickEvent(){return this.coveoAnalyticsClient.sendEvent("event","svc",yo.click,this.provider?{searchHub:this.provider.getOriginLevel1()}:null)}};var ku=e=>new st(e).getCurrentVisitorId(),Ye=new Au.HistoryStore,ln=(e,t)=>typeof t=="function"?(...r)=>{let n=Hr(r[0]);try{return t.apply(t,r)}catch(o){return e.error(o,"Error in analytics preprocessRequest. Returning original request."),n}}:void 0,dn=(e,t)=>(...r)=>{let n=Hr(r[1]);try{return t.apply(t,r)}catch(o){return e.error(o,"Error in analytics hook. Returning original request."),n}};p();u();d();l();p();u();d();l();var vr=pe(e=>e.source,e=>Object.entries(e).map(([t,r])=>`${t}@${r}`).concat(`@coveo/headless@${sr}`));p();u();d();l();p();u();d();l();p();u();d();l();p();u();d();l();function Co(){return{desiredCount:5,numberOfValues:8,set:{}}}p();u();d();l();p();u();d();l();p();u();d();l();function Ou(e){let{activeValue:t,ancestryMap:r}=Th(e);return t?Fh(t,r):[]}function Th(e){let t=[...e],r=new Map;for(;t.length>0;){let n=t.shift();if(n.state==="selected")return{activeValue:n,ancestryMap:r};if(r)for(let o of n.children)r.set(o,n);t.unshift(...n.children)}return{}}function Fh(e,t){let r=[];if(!e)return[];let n=e;do r.unshift(n),n=t.get(n);while(n);return r}var kh=(e,t)=>e.categoryFacetSet[t]?.request;var xa=(e,t)=>{let r=kh(e,t);return Ou(r?.currentValues??[])};p();u();d();l();function bo(){return{}}p();u();d();l();function Ao(){return{}}p();u();d();l();function wo(){return{}}p();u();d();l();function xo(){return{}}function Ra(e){return{facetSet:e.facetSet??xo(),categoryFacetSet:e.categoryFacetSet??bo(),dateFacetSet:e.dateFacetSet??Ao(),numericFacetSet:e.numericFacetSet??wo(),automaticFacetSet:e.automaticFacetSet??Co()}}var Ea=e=>{let t=[];return Mh(e).forEach((r,n)=>{let o=Bh(e,r.facetId),i=jh(r,n+1);if(Dh(r)){if(!!!xa(e,r.facetId).length)return;t.push({...i,...Vh(e,r.facetId),facetType:o,state:"selected"});return}r.currentValues.forEach((a,m)=>{if(a.state==="idle")return;let f=Du(a,m+1,o),s=Oh(r)?Mu(a):Nh(a);t.push({...i,...f,...s})})}),qh(e).forEach((r,n)=>{let o=Lh(r,n+1);r.values.forEach((i,a)=>{if(i.state==="idle")return;let m=Du(i,a+1,"specific"),f=Mu(i);t.push({...o,...m,...f})})}),t},Oh=e=>e.type==="specific",Dh=e=>e.type==="hierarchical",Mh=e=>[...Object.values(e.facetSet),...Object.values(e.categoryFacetSet),...Object.values(e.dateFacetSet),...Object.values(e.numericFacetSet)].map(t=>t.request),qh=e=>[...Object.values(e.automaticFacetSet.set)].map(t=>t.response),Du=(e,t,r)=>({state:e.state,valuePosition:t,facetType:r}),Nh=e=>({displayValue:`${e.start}..${e.end}`,value:`${e.start}..${e.end}`,start:e.start,end:e.end,endInclusive:e.endInclusive}),Mu=e=>({displayValue:e.value,value:e.value}),_h=(e,t)=>xa(e,t).map(n=>n.value).join(";"),Vh=(e,t)=>{let n=_h(e,t);return{value:n,valuePosition:1,displayValue:n}},Lh=(e,t)=>({title:qu(e.field,e.field),field:e.field,id:e.field,facetPosition:t}),jh=(e,t)=>({title:qu(e.field,e.facetId),field:e.field,id:e.facetId,facetPosition:t}),qu=(e,t)=>`${e}_${t}`,Uh=(e,t)=>e.facetSet[t]?.request||e.categoryFacetSet[t]?.request||e.dateFacetSet[t]?.request||e.numericFacetSet[t]?.request||e.automaticFacetSet.set[t]?.response,Bh=(e,t)=>{let r=Uh(e,t);return r?r.type:"specific"};p();u();d();l();var Me=()=>({q:"",enableQuerySyntax:!1});p();u();d();l();p();u();d();l();var Nu=(r=>(r.Ascending="ascending",r.Descending="descending",r))(Nu||{}),_u=(i=>(i.Relevancy="relevancy",i.QRE="qre",i.Date="date",i.Field="field",i.NoSort="nosort",i))(_u||{}),Ia=e=>{if(Ys(e))return e.map(t=>Ia(t)).join(",");switch(e.by){case"relevancy":case"qre":case"nosort":return e.by;case"date":return`date ${e.order}`;case"field":return`@${e.field} ${e.order}`;default:return""}},Vu=()=>({by:"relevancy"});var TP=new G({values:{by:new ki({enum:_u,required:!0}),order:new ki({enum:Nu}),field:new B}});function Ro(){return Ia(Vu())}p();u();d();l();p();u();d();l();var St=()=>"default";var Qh=e=>{let t=e.configuration.search.locale.split("-")[0];return!t||t.length!==2?"en":t},Wt=class{constructor(t){this.getState=t;ce(this,"state");this.state=t()}getLanguage(){return Qh(this.state)}getBaseMetadata(){let{context:t,configuration:r}=this.state,n=t?.contextValues||{},o={};for(let[i,a]of Object.entries(n)){let m=`context_${i}`;o[m]=a}return r.analytics.analyticsMode==="legacy"&&(o.coveoHeadlessVersion=sr),o}getOriginContext(){return this.state.configuration.analytics.originContext}getOriginLevel1(){return this.state.searchHub||St()}getOriginLevel2(){return this.state.configuration.analytics.originLevel2}getOriginLevel3(){return this.state.configuration.analytics.originLevel3}getIsAnonymous(){return this.state.configuration.analytics.anonymous}};var pn=class pn extends Wt{constructor(){super(...arguments);ce(this,"getFacetRequest",r=>this.state.facetSet?.[r]?.request||this.state.categoryFacetSet?.[r]?.request||this.state.dateFacetSet?.[r]?.request||this.state.numericFacetSet?.[r]?.request||this.state.automaticFacetSet?.set[r]?.response)}getFacetState(){return Ea(Ra(this.getState()))}getPipeline(){return this.state.pipeline||this.state.search?.response.pipeline||pn.fallbackPipelineName}getSearchEventRequestPayload(){return{queryText:this.queryText,responseTime:this.responseTime,results:this.resultURIs,numberOfResults:this.numberOfResults}}getSearchUID(){let r=this.getState();return r.search?.searchResponseId||r.search?.response.searchUid||$e().response.searchUid}getSplitTestRunName(){return this.state.search?.response.splitTestRun}getSplitTestRunVersion(){let r=!!this.getSplitTestRunName(),n=this.state.search?.response.pipeline||this.state.pipeline||pn.fallbackPipelineName;return r?n:void 0}getBaseMetadata(){let r=this.getState(),n=super.getBaseMetadata(),o=r.search?.response?.extendedResults?.generativeQuestionAnsweringId;return o&&(n.generativeQuestionAnsweringId=o),n}getFacetMetadata(r,n){let i=this.getFacetRequest(r)?.field??"";return{...this.getBaseMetadata(),facetId:r,facetField:i,facetValue:n,facetTitle:`${i}_${r}`}}getFacetClearAllMetadata(r){let o=this.getFacetRequest(r)?.field??"";return{...this.getBaseMetadata(),facetId:r,facetField:o,facetTitle:`${o}_${r}`}}getFacetUpdateSortMetadata(r,n){let i=this.getFacetRequest(r)?.field??"";return{...this.getBaseMetadata(),facetId:r,facetField:i,criteria:n,facetTitle:`${i}_${r}`}}getRangeBreadcrumbFacetMetadata(r,n){let i=this.getFacetRequest(r)?.field??"";return{...this.getBaseMetadata(),facetId:r,facetField:i,facetRangeEnd:n.end,facetRangeEndInclusive:n.endInclusive,facetRangeStart:n.start,facetTitle:`${i}_${r}`}}getResultSortMetadata(){return{...this.getBaseMetadata(),resultsSortBy:this.state.sortCriteria??Ro()}}getStaticFilterToggleMetadata(r,n){return{...this.getBaseMetadata(),staticFilterId:r,staticFilterValue:n}}getStaticFilterClearAllMetadata(r){return{...this.getBaseMetadata(),staticFilterId:r}}getUndoTriggerQueryMetadata(r){return{...this.getBaseMetadata(),undoneQuery:r}}getCategoryBreadcrumbFacetMetadata(r,n){let i=this.getFacetRequest(r)?.field??"";return{...this.getBaseMetadata(),categoryFacetId:r,categoryFacetField:i,categoryFacetPath:n,categoryFacetTitle:`${i}_${r}`}}getOmniboxAnalyticsMetadata(r,n){let o=this.state.querySuggest&&this.state.querySuggest[r],i=o.completions.map(s=>s.expression),a=o.partialQueries.length-1,m=o.partialQueries[a]||"",f=o.responseId;return{...this.getBaseMetadata(),suggestionRanking:i.indexOf(n),partialQuery:m,partialQueries:o.partialQueries.length>0?o.partialQueries:"",suggestions:i.length>0?i:"",querySuggestResponseId:f}}getInterfaceChangeMetadata(){return{...this.getBaseMetadata(),interfaceChangeTo:this.state.configuration.analytics.originLevel2}}getOmniboxFromLinkMetadata(r){return{...this.getBaseMetadata(),...r}}getGeneratedAnswerMetadata(){let r=this.getState(),n={};return r.generatedAnswer?.isVisible!==void 0&&(n.showGeneratedAnswer=r.generatedAnswer.isVisible),n}get resultURIs(){return this.results?.map(r=>({documentUri:r.uri,documentUriHash:r.raw.urihash}))}get results(){return this.state.search?.response.results}get queryText(){return this.state.query?.q||Me().q}get responseTime(){return this.state.search?.duration||$e().duration}get numberOfResults(){return this.state.search?.response.totalCountFiltered||$e().response.totalCountFiltered}};ce(pn,"fallbackPipelineName","default");var vt=pn,Lu=({logger:e,getState:t,analyticsClientMiddleware:r=(i,a)=>a,preprocessRequest:n,provider:o=new vt(t)})=>{let i=t(),a=i.configuration.accessToken,m=i.configuration.analytics.apiBaseUrl??Re(i.configuration.organizationId,i.configuration.environment,"analytics"),f=i.configuration.analytics.runtimeEnvironment,s=i.configuration.analytics.enabled,h=new go({token:a,endpoint:m,runtimeEnvironment:f,preprocessRequest:ln(e,n),beforeSendHooks:[dn(e,r),(S,y)=>(e.info({...y,type:S,endpoint:m,token:a},"Analytics request"),y)]},o);return s||h.disable(),h},Pa=()=>{let t=Ye.getHistory().reverse().find(r=>r.name==="PageView"&&r.value);return t?t.value:""};var Eo=/*#__PURE__*/function(){var _ref7=_asyncToGenerator(function*(e,t){let r=e.analyticsMode==="next";return{analytics:{clientId:yield ku(e),clientTimestamp:new Date().toISOString(),documentReferrer:e.originLevel3,originContext:e.originContext,...(t&&{actionCause:t.actionCause,customData:t.customData}),...(t&&!r&&{customData:t.customData}),...(e.userDisplayName&&{userDisplayName:e.userDisplayName}),...(e.documentLocation&&{documentLocation:e.documentLocation}),...(e.deviceId&&{deviceId:e.deviceId}),...(Pa()&&{pageId:Pa()}),...(r&&e.trackingId&&{trackingId:e.trackingId}),capture:r,...(r&&{source:vr(e)})}}});return function Eo(_x9,_x10){return _ref7.apply(this,arguments)}}();p();u();d();l();p();u();d();l();p();u();d();l();var Cr=()=>({duration:0,error:null,isLoading:!1,id:"Recommendation",recommendations:[],searchUid:"",splitTestRun:"",pipeline:""});var fn=class extends Wt{getPipeline(){return this.state.pipeline||this.state.recommendation?.pipeline||"default"}getSearchEventRequestPayload(){return{queryText:Me().q,responseTime:this.responseTime,results:this.mapResultsToAnalyticsDocument(),numberOfResults:this.numberOfResults}}getSearchUID(){return this.getState().recommendation?.searchUid||Cr().searchUid}getSplitTestRunName(){return this.state.recommendation?.splitTestRun}getSplitTestRunVersion(){let t=!!this.getSplitTestRunName(),r=this.state.recommendation?.pipeline||this.state.pipeline||"default";return t?r:void 0}get responseTime(){return this.state.recommendation?.duration||Cr().duration}mapResultsToAnalyticsDocument(){return this.state.recommendation?.recommendations.map(t=>({documentUri:t.uri,documentUriHash:t.raw.urihash}))}get numberOfResults(){return this.state.recommendation?.recommendations.length||Cr().recommendations.length}};p();u();d();l();p();u();d();l();p();u();d();l();function $h({config:e,environment:t,event:r,listenerManager:n}){let{url:o,token:i,mode:a}=e;a!=="disabled"&&(n.call(r),t.send(o,i,r))}var Hh=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i;function zh(e){return typeof e=="string"&&Hh.test(e)}var Ae=[];for(let e=0;e<256;++e)Ae.push((e+256).toString(16).slice(1));function Wh(e,t=0){return(Ae[e[t+0]]+Ae[e[t+1]]+Ae[e[t+2]]+Ae[e[t+3]]+"-"+Ae[e[t+4]]+Ae[e[t+5]]+"-"+Ae[e[t+6]]+Ae[e[t+7]]+"-"+Ae[e[t+8]]+Ae[e[t+9]]+"-"+Ae[e[t+10]]+Ae[e[t+11]]+Ae[e[t+12]]+Ae[e[t+13]]+Ae[e[t+14]]+Ae[e[t+15]]).toLowerCase()}var Ta,Gh=new Uint8Array(16);function Kh(){if(!Ta){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Ta=crypto.getRandomValues.bind(crypto)}return Ta(Gh)}var Yh=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),ju={randomUUID:Yh};function Jh(e,t,r){if(ju.randomUUID&&!e)return ju.randomUUID();e=e||{};let n=e.random??e.rng?.()??Kh();if(n.length<16)throw new Error("Random bytes length must be >= 16");return n[6]=n[6]&15|64,n[8]=n[8]&63|128,Wh(n)}function Xh(e){return{getClientId:()=>{let t="visitorId",r=e.get(),n=r.storage,o=n.getItem(t),i=o&&zh(o)?o:r.generateUUID();return n.setItem(t,i),i}}}var Bu="1.0.0";function Zh(e){let{trackingId:t}=e;return{trackingId:t}}function ey(e){return(e.source||[]).concat([`relay@${Bu}`])}function Qu(e,t,r,n){let{getReferrer:o,getLocation:i,getUserAgent:a}=r,m=Zh(t),f=n.getClientId();return Object.freeze({type:e,config:m,ts:Date.now(),source:ey(t),clientId:f,userAgent:a(),referrer:o(),location:i()})}function ty(e,t,r,n,o){return{...t,meta:Qu(e,r,n,o)}}var ry="*";function ny(){let e=[];function t({type:f,callback:s}){return e.findIndex(h=>h.type===f&&h.callback===s)}function r(f,s){return f.type==="*"||s===f.type}function n(f){return t(f)<0&&e.push(f),()=>m(f.type,f.callback)}function o(f){e.forEach(s=>{if(r(s,f.meta.type))try{s.callback(f)}catch(h){console.error(h)}})}function i(f){if(f===ry)e.length=0;else for(let s=e.length-1;s>=0;s--)e[s].type===f&&e.splice(s,1)}function a(f){let s=t(f);s>=0&&e.splice(s,1)}function m(f,s){s?a({type:f,callback:s}):i(f)}return{add:n,call:o,remove:m}}function Uu({url:e,token:t,trackingId:r,...n}){return Object.freeze({url:e,token:t,trackingId:r,...(!!n.mode&&{mode:n.mode}),...(!!n.source&&{source:n.source})})}function oy(e){let t=Uu(e);return{get:()=>t,update:r=>{t=Uu({...t,...r})}}}function iy(){let e=typeof window<"u";return{sendMessage(t){e&&window.postMessage(t,"*")}}}var Fa=ay();function ay(){let e="coveo_",t=r=>{let n=r.split(".").slice(-2);return n.length==2?n.join("."):""};return{getItem(r){let n=`${e}${r}=`,o=document.cookie.split(";");for(let i of o){let a=i.replace(/^\s+/,"");if(a.lastIndexOf(n,0)===0)return a.substring(n.length,a.length)}return null},setItem(r,n,o){let i=t(window.location.hostname),a=`;expires=${new Date(new Date().getTime()+o).toUTCString()}`,m=i?`;domain=${i}`:"";document.cookie=`${e}${r}=${n}${a}${m};path=/;SameSite=Lax`},removeItem(r){this.setItem(r,"",-1)}}}function sy(){return{getItem(e){return Fa.getItem(e)||localStorage.getItem(e)},removeItem(e){Fa.removeItem(e),localStorage.removeItem(e)},setItem(e,t){localStorage.setItem(e,t),Fa.setItem(e,t,31556952e3)}}}function cy(){let e=document.referrer;return e===""?null:e}function uy(){return{runtime:"browser",send:(e,t,r)=>{let n=navigator.sendBeacon(`${e}?access_token=${t}`,new Blob([JSON.stringify([r])],{type:"application/json"}));if(iy().sendMessage({kind:"EVENT_PROTOCOL",event:r,url:e,token:t}),!n)throw new Error("Failed to send the event(s) because the payload size exceeded the maximum allowed size (32 KB). Please contact support if the problem persists.")},getReferrer:()=>cy(),getLocation:()=>window.location.href,getUserAgent:()=>navigator.userAgent,generateUUID:()=>Jh(),storage:sy()}}function ly(){try{let e="__storage_test__";return localStorage.setItem(e,e),localStorage.removeItem(e),!0}catch(e){return e instanceof DOMException&&e.name==="QuotaExceededError"&&localStorage&&localStorage.length!==0}}function dy(){return{getItem(){return null},removeItem(){},setItem(){}}}function py(){return{runtime:"null",send:()=>{},getReferrer:()=>null,getLocation:()=>null,getUserAgent:()=>null,generateUUID:()=>"",storage:dy()}}function fy(e){return e.get().mode!=="disabled"&&my()&&ly()?uy():py()}function my(){try{return typeof window=="object"}catch{return!1}}function gy(e){return{get:()=>Object.freeze(fy(e))}}function $u(e){let t=oy(e),r=ny(),n=gy(t),o=Xh(n);return{emit:(i,a)=>{let m=t.get(),f=n.get(),s=ty(i,a,m,f,o);return $h({config:m,environment:f,event:s,listenerManager:r})},getMeta:i=>Qu(i,t.get(),n.get(),o),on:(i,a)=>r.add({type:i,callback:a}),off:(i,a)=>r.remove(i,a),updateConfig:i=>t.update(i),version:Bu}}var br=pe(e=>e.configuration.organizationId,e=>e.configuration.environment,e=>e.configuration.accessToken,e=>e.configuration.analytics,e=>vr(e.configuration.analytics),(e,t,r,{trackingId:n,apiBaseUrl:o,enabled:i},a)=>$u({mode:i?"emit":"disabled",url:o??Nn(e,t),token:r,trackingId:n,source:a}));p();u();d();l();var mn=class{constructor(t){ce(this,"state");this.state=t()}getSearchUID(){return null}getOriginLevel1(){return this.state.searchHub||St()}},Hu=({logger:e,getState:t,analyticsClientMiddleware:r=(i,a)=>a,preprocessRequest:n,provider:o=new mn(t)})=>{let i=t(),a=i.configuration.accessToken,m=i.configuration.analytics.apiBaseUrl??Re(i.configuration.organizationId,i.configuration.environment,"analytics"),f=i.configuration.analytics.runtimeEnvironment,s=i.configuration.analytics.enabled,h=new vo({enableAnalytics:s,token:a,endpoint:m,runtimeEnvironment:f,preprocessRequest:ln(e,n),beforeSendHooks:[dn(e,r),(S,y)=>(e.info({...y,type:S,endpoint:m,token:a},"Analytics request"),y)]},o);return s||h.disable(),h};p();u();d();l();p();u();d();l();function zu(e){let t=Wu(e),r=[e,...t].filter(o=>o.parentResult).map(o=>o.parentResult);return Xs([e,...t,...r],o=>o.uniqueId)}function Wu(e){return e.childResults?e.childResults.flatMap(t=>[t,...Wu(t)]):[]}function Gu(e,t){return{...new vt(t).getBaseMetadata(),actionCause:e,type:e}}function hy(e){return Object.assign(e,{instantlyCallable:!0})}function yy(e,t){let r=i=>hy(oe(e,i)),n=r(/*#__PURE__*/function(){var _ref8=_asyncToGenerator(function*(i,{getState:a,extra:m}){let{analyticsClientMiddleware:f,preprocessRequest:s,logger:h}=m;return yield(yield t({getState:a,analyticsClientMiddleware:f,preprocessRequest:s,logger:h})).log({state:a(),extra:m})});return function(_x11,_x12){return _ref8.apply(this,arguments)}}());return Object.assign(n,{prepare:function(){var _ref9=_asyncToGenerator(function*({getState:i,analyticsClientMiddleware:a,preprocessRequest:m,logger:f}){let{description:s,log:h}=yield t({getState:i,analyticsClientMiddleware:a,preprocessRequest:m,logger:f});return{description:s,action:r(/*#__PURE__*/function(){var _ref10=_asyncToGenerator(function*(S,{getState:y,extra:g}){return yield h({state:y(),extra:g})});return function(_x14,_x15){return _ref10.apply(this,arguments)}}())}});return function prepare(_x13){return _ref9.apply(this,arguments)}}()}),n}var Ku=(e,t,r)=>{function n(...o){let i=o.length===1?{...o[0],__legacy__getBuilder:t(o[0].__legacy__getBuilder),analyticsConfigurator:e,providerClass:r}:{prefix:o[0],__legacy__getBuilder:t(o[1]),__legacy__provider:o[2],analyticsConfigurator:e,providerClass:r};return Cy(i)}return n},Sy=e=>e.configuration.analytics.analyticsMode==="legacy",vy=e=>e.configuration.analytics.analyticsMode==="next",Cy=({prefix:e,__legacy__getBuilder:t,__legacy__provider:r,analyticsPayloadBuilder:n,analyticsType:o,analyticsConfigurator:i,providerClass:a})=>(r??(r=m=>new a(m)),yy(e,/*#__PURE__*/function(){var _ref11=_asyncToGenerator(function*({getState:m,analyticsClientMiddleware:f,preprocessRequest:s,logger:h}){let S=[],y={log:function(){var _ref12=_asyncToGenerator(function*({state:I}){for(let b of S)yield b(I)});return function log(_x17){return _ref12.apply(this,arguments)}}()},g=m(),v=i({getState:m,logger:h,analyticsClientMiddleware:f,preprocessRequest:s,provider:r(m)}),C=yield t(v,m());y.description=C?.description,S.push(/*#__PURE__*/function(){var _ref13=_asyncToGenerator(function*(I){Sy(I)&&(yield by(C,r,I,h,v.coveoAnalyticsClient))});return function(_x18){return _ref13.apply(this,arguments)}}());let{emit:E}=br(g);return S.push(/*#__PURE__*/function(){var _ref14=_asyncToGenerator(function*(I){if(vy(I)&&o&&n){let b=n(I);yield Py(E,o,b)}});return function(_x19){return _ref14.apply(this,arguments)}}()),y});return function(_x16){return _ref11.apply(this,arguments)}}()));function by(_x20,_x21,_x22,_x23,_x24){return _by.apply(this,arguments)}function _by(){_by=_asyncToGenerator(function*(e,t,r,n,o){t(()=>r);let i=yield e?.log({searchUID:t(()=>r).getSearchUID()});n.info({client:o,response:i},"Analytics response")});return _by.apply(this,arguments)}var Ay=e=>r=>(n,o)=>Promise.resolve({description:{actionCause:e},log:function(){var _ref15=_asyncToGenerator(function*(i){r(n,o)});return function log(_x25){return _ref15.apply(this,arguments)}}()}),ke=Ku(Lu,e=>e,vt),WF=Ku(Hu,Ay("caseAssist"),mn);var ka=(e,t)=>{let r=i=>i+(t.pagination?.firstResult??0),n=-1,o=t.search?.results;return n=el(e,o),n<0&&(n=Iy(e,o)),n<0&&(n=0),Ju(e,r(n),t)},Yu=(e,t)=>{let r=t.recommendation?.recommendations.findIndex(({uniqueId:n})=>e.uniqueId===n)||0;return Ju(e,r,t)};function Ju(e,t,r){let n=e.raw.collection;return{collectionName:typeof n=="string"?n:"default",documentAuthor:Ry(e),documentPosition:t+1,documentTitle:e.title,documentUri:e.uri,documentUriHash:e.raw.urihash,documentUrl:e.clickUri,rankingModifier:e.rankingModifier||"",sourceName:Ey(e),queryPipeline:r.pipeline||pr()}}var Io=e=>(e.raw.permanentid||console.warn("Missing field permanentid on result. This might cause many issues with your Coveo deployment. See https://docs.coveo.com/en/1913 and https://docs.coveo.com/en/1640 for more information.",e),{contentIDKey:"permanentid",contentIDValue:e.raw.permanentid||""}),Xu={urihash:new B,sourcetype:new B,permanentid:new B},Zu={uniqueId:K,raw:new G({values:Xu}),title:K,uri:K,clickUri:K,rankingModifier:new B({required:!1,emptyAllowed:!0})};function wy(e){return Object.assign({},...Object.keys(Xu).map(t=>({[t]:e[t]})))}function xy(e){return Object.assign({},...Object.keys(Zu).map(t=>({[t]:e[t]})),{raw:wy(e.raw)})}function Ry(e){let t=e.raw.author;return J(t)?"unknown":Array.isArray(t)?t.join(";"):`${t}`}function Ey(e){let t=e.raw.source;return J(t)?"unknown":t}var Oa=e=>new Ee(Zu).validate(xy(e));function Iy(e,t){for(let[r,n]of t.entries()){let o=zu(n);if(el(e,o)!==-1)return r}return-1}function el(e,t=[]){return t.findIndex(({uniqueId:r})=>r===e.uniqueId)}function Py(_x26,_x27,_x28){return _Py.apply(this,arguments)}function _Py(){_Py=_asyncToGenerator(function*(e,t,r){yield e(t,r)});return _Py.apply(this,arguments)}p();u();d();l();var tl=()=>ke("analytics/recommendation/update",e=>e.makeRecommendationInterfaceLoad(),e=>new fn(e)),rl=()=>({actionCause:"recommendationInterfaceLoad"}),To=e=>ke({prefix:"analytics/recommendation/open",__legacy__getBuilder:(t,r)=>(Oa(e),t.makeRecommendationOpen(Yu(e,r),Io(e))),__legacy__provider:t=>new fn(t),analyticsType:"itemClick",analyticsPayloadBuilder:t=>{let r=ka(e,t),n=Io(e);return{searchUid:e.searchUid??"",position:r.documentPosition,itemMetadata:{uniqueFieldName:n.contentIDKey,uniqueFieldValue:n.contentIDValue,title:r.documentTitle,author:r.documentAuthor,url:r.documentUrl}}}});var Ar=k("recommendation/set",e=>U(e,{id:K})),Ct=oe("recommendation/get",/*#__PURE__*/function(){var _ref16=_asyncToGenerator(function*(e,{getState:t,rejectWithValue:r,extra:{apiClient:n}}){let o=t(),i=new Date().getTime(),a=yield Ty(o),m=yield n.recommendations(a),f=new Date().getTime()-i;return Ie(m)?r(m.error):{recommendations:m.success.results,analyticsAction:tl(),duration:f,searchUid:m.success.searchUid,splitTestRun:m.success.splitTestRun,pipeline:m.success.pipeline}});return function(_x29,_x30){return _ref16.apply(this,arguments)}}()),Ty=/*#__PURE__*/function(){var _ref17=_asyncToGenerator(function*(e){return{accessToken:e.configuration.accessToken,organizationId:e.configuration.organizationId,url:e.configuration.search.apiBaseUrl??pt(e.configuration.organizationId,e.configuration.environment),recommendation:e.recommendation.id,tab:e.configuration.analytics.originLevel2,referrer:e.configuration.analytics.originLevel3,timezone:e.configuration.search.timezone,locale:e.configuration.search.locale,actionsHistory:e.configuration.analytics.enabled?Ye.getHistory():[],...(e.advancedSearchQueries&&{aq:e.advancedSearchQueries.aq,cq:e.advancedSearchQueries.cq}),...(e.pipeline&&{pipeline:e.pipeline}),...(e.searchHub&&{searchHub:e.searchHub}),...(e.context&&{context:e.context.contextValues}),...(e.dictionaryFieldContext&&{dictionaryFieldContext:e.dictionaryFieldContext.contextValues}),...(e.fields&&{fieldsToInclude:e.fields.fieldsToInclude}),...(e.configuration.analytics.enabled&&(yield Fy(e,rl()))),...(e.configuration.search.authenticationProviders.length&&{authentication:e.configuration.search.authenticationProviders.join(",")}),...(e.pagination&&{numberOfResults:e.pagination.numberOfResults})}});return function Ty(_x31){return _ref17.apply(this,arguments)}}(),Fy=/*#__PURE__*/function(){var _ref18=_asyncToGenerator(function*(e,t){let r=e.configuration.analytics.analyticsMode==="legacy"?void 0:{actionCause:t.actionCause,type:t.actionCause};return yield Eo(e.configuration.analytics,r)});return function Fy(_x32,_x33){return _ref18.apply(this,arguments)}}();var wr=de(Cr(),e=>{e.addCase(Ar,(t,r)=>{t.id=r.payload.id}).addCase(Ct.rejected,(t,r)=>{t.error=r.payload?r.payload:null,t.isLoading=!1}).addCase(Ct.fulfilled,(t,r)=>{t.error=null,t.recommendations=r.payload.recommendations.map(n=>({...n,searchUid:r.payload.searchUid})),t.duration=r.payload.duration,t.isLoading=!1,t.searchUid=r.payload.searchUid,t.splitTestRun=r.payload.splitTestRun,t.pipeline=r.payload.pipeline}).addCase(Ct.pending,t=>{t.isLoading=!0})});p();u();d();l();var xr=k("searchHub/set",e=>U(e,new B({required:!0,emptyAllowed:!0})));p();u();d();l();var Rr=de(St(),e=>{e.addCase(xr,(t,r)=>r.payload).addCase(Fe.fulfilled,(t,r)=>r.payload?.searchHub??t).addCase(Ge,(t,r)=>r.payload.searchHub||t)});p();u();d();l();p();u();d();l();p();u();d();l();p();u();d();l();p();u();d();l();p();u();d();l();var gn=pe(e=>e.query,e=>e);var nl=e=>Oy(e)?{answerAPIEnabled:!0,id:il(e).data?.answerId}:ky(e)?{answerAPIEnabled:!1,id:e.search.response.extendedResults.generativeQuestionAnsweringId}:{answerAPIEnabled:!1,id:void 0},ky=e=>"search"in e,Oy=e=>"answer"in e&&"generatedAnswer"in e&&!J(e.generatedAnswer?.answerConfigurationId),ol=e=>e.generatedAnswer?.fieldsToIncludeInCitations,Dy=pe(e=>e.generatedAnswer?.citations,(e,t)=>t,(e,t)=>e?.find(r=>r.id===t)),lO=pe(e=>gn(e)?.q,e=>e.search.requestId,(e,t)=>({q:e,requestId:t}));var Fo=e=>ke({prefix:"analytics/generatedAnswer/streamEnd",__legacy__getBuilder:(t,r)=>{let{id:n,answerAPIEnabled:o}=nl(r),i=e?!r.generatedAnswer?.answer||!r.generatedAnswer?.answer.length:void 0;return n?t.makeGeneratedAnswerStreamEnd({...(o?{answerAPIStreamId:n}:{generativeQuestionAnsweringId:n}),answerGenerated:e,answerTextIsEmpty:i}):null},analyticsType:"Rga.StreamEnd",analyticsPayloadBuilder:t=>({responseId:t.search?.response.searchUid||"",answerGenerated:!0})});p();u();d();l();var al=/*#__PURE__*/function(){var _ref19=_asyncToGenerator(function*(e){return{accessToken:e.configuration.accessToken,organizationId:e.configuration.organizationId,url:Re(e.configuration.organizationId,e.configuration.environment),streamId:e.search.extendedResults?.generativeQuestionAnsweringId}});return function al(_x34){return _ref19.apply(this,arguments)}}();p();u();d();l();var sl=["text/plain","text/markdown"];var Er=new B({required:!0}),ul=new B,Ir=new Z({required:!0}),My={id:Er,title:Er,uri:Er,permanentid:Er,clickUri:ul},ll=new B({required:!0,constrainTo:sl}),WO=k("generatedAnswer/setIsVisible",e=>U(e,Ir)),GO=k("generatedAnswer/setIsEnabled",e=>U(e,Ir)),Ma=k("generatedAnswer/updateMessage",e=>U(e,{textDelta:Er})),qa=k("generatedAnswer/updateCitations",e=>U(e,{citations:new ee({required:!0,each:new G({values:My})})})),qy=k("generatedAnswer/updateError",e=>U(e,{message:ul,code:new Y({min:0})})),Ny=k("generatedAnswer/resetAnswer"),KO=k("generatedAnswer/like"),YO=k("generatedAnswer/dislike"),JO=k("generatedAnswer/feedbackModal/open"),XO=k("generatedAnswer/expand"),ZO=k("generatedAnswer/collapse"),eD=k("generatedAnswer/setId",e=>U(e,{id:new B({required:!0})})),tD=k("generatedAnswer/feedbackModal/close"),rD=k("generatedAnswer/sendFeedback"),Da=k("generatedAnswer/setIsLoading",e=>U(e,Ir)),cl=k("generatedAnswer/setIsStreaming",e=>U(e,Ir)),Na=k("generatedAnswer/setAnswerContentFormat",e=>U(e,ll)),nD=k("generatedAnswer/updateResponseFormat",e=>U(e,{contentFormat:new ee({each:ll,default:["text/plain"]})})),oD=k("knowledge/updateAnswerConfigurationId",e=>U(e,Er)),iD=k("generatedAnswer/registerFieldsToIncludeInCitations",e=>U(e,Zn)),_y=k("generatedAnswer/setIsAnswerGenerated",e=>U(e,Ir)),_a=k("generatedAnswer/setCannotAnswer",e=>U(e,Ir)),aD=oe("generatedAnswer/streamAnswer",/*#__PURE__*/function(){var _ref20=_asyncToGenerator(function*(e,t){let r=t.getState(),{dispatch:n,extra:o,getState:i}=t,{search:a}=i(),{queryExecuted:m}=a,{setAbortControllerRef:f}=e,s=yield al(r),h=(g,v)=>{switch(g){case"genqa.headerMessageType":{let C=JSON.parse(v);n(Na(C.contentFormat));break}case"genqa.messageType":n(Ma(JSON.parse(v)));break;case"genqa.citationsType":n(qa(JSON.parse(v)));break;case"genqa.endOfStreamType":{let C=JSON.parse(v).answerGenerated,E=m.length!==0&&!C;n(_a(E)),n(cl(!1)),n(_y(C)),n(Fo(C));break}default:r.debug&&o.logger.warn(`Unknown payloadType: "${g}"`)}};n(Da(!0));let S=g=>g.streamId===t.getState().search.extendedResults.generativeQuestionAnsweringId,y=o.streamingClient?.streamGeneratedAnswer(s,{write:g=>{S(s)&&(n(Da(!1)),g.payload&&g.payloadType&&h(g.payloadType,g.payload))},abort:g=>{S(s)&&n(qy(g))},close:()=>{S(s)&&n(cl(!1))},resetAnswer:()=>{S(s)&&n(Ny())}});y?f(y):n(Da(!1))});return function(_x35,_x36){return _ref20.apply(this,arguments)}}());p();u();d();l();p();u();d();l();var dl=pe(e=>e.pipeline,e=>e);p();u();d();l();var pl=pe(e=>e.searchHub,e=>e);p();u();d();l();p();u();d();l();var hn=Ne(ko(),1),Sl=Ne(fl(),1);p();u();d();l();var Oo=Ne(ko(),1),gl=Ne(ml(),1);Oo.default.extend(gl.default);var hl="YYYY/MM/DD@HH:mm:ss",Vy="1401-01-01";function Pr(e,t){let r=(0,Oo.default)(e,t);return!r.isValid()&&!t?(0,Oo.default)(e,hl):r}function Do(e){return e.format(hl)}function yl(e,t){let r=Pr(e,t);if(!r.isValid()){let n=". Please provide a date format string in the configuration options. See https://day.js.org/docs/en/parse/string-format for more information.",o=` with the format "${t}"`;throw new Error(`Could not parse the provided date "${e}"${t?o:n}`)}$a(r)}function $a(e){if(e.isBefore(Vy))throw new Error(`Date is before year 1401, which is unsupported by the API: ${e}`)}hn.default.extend(Sl.default);var vl=["past","now","next"],Cl=["minute","hour","day","week","month","quarter","year"],Ly=e=>{let t=e==="now";return{amount:new Y({required:!t,min:1}),unit:new B({required:!t,constrainTo:Cl}),period:new B({required:!0,constrainTo:vl})}};function Ha(e){if(typeof e=="string"&&!bt(e))throw new Error(`The value "${e}" is not respecting the relative date format "period-amount-unit"`);let t=typeof e=="string"?Rl(e):e;new Ee(Ly(t.period)).validate(t);let r=Al(t),n=JSON.stringify(t);if(!r.isValid())throw new Error(`Date is invalid: ${n}`);$a(r)}function bl(e){let{period:t,amount:r,unit:n}=e;switch(t){case"past":case"next":return`${t}-${r}-${n}`;case"now":return t}}function Al(e){let{period:t,amount:r,unit:n}=e;switch(t){case"past":return(0,hn.default)().subtract(r,n);case"next":return(0,hn.default)().add(r,n);case"now":return(0,hn.default)()}}function yn(e){return Do(Al(Rl(e)))}function wl(e){return e.toLocaleLowerCase().split("-")}function bt(e){let[t,r,n]=wl(e);if(t==="now")return!0;if(!vl.includes(t)||!Cl.includes(n))return!1;let o=parseInt(r);return!(isNaN(o)||o<=0)}function xl(e){return!!e&&typeof e=="object"&&"period"in e}function Rl(e){let[t,r,n]=wl(e);return t==="now"?{period:"now"}:{period:t,amount:r?parseInt(r):void 0,unit:n||void 0}}p();u();d();l();function El(e){return e.type==="dateRange"}function Il(e){return`start${e}`}function Pl(e){return`end${e}`}var za=()=>({dateFacetValueMap:{}});function jy(e,t,r){let n=e.start,o=e.end;return bt(n)&&(n=yn(n),r.dateFacetValueMap[t][Il(n)]=e.start),bt(o)&&(o=yn(o),r.dateFacetValueMap[t][Pl(o)]=e.end),{...e,start:n,end:o}}function Wa(e,t){if(El(e)){let{facetId:r,currentValues:n}=e;return t.dateFacetValueMap[r]={},{...e,currentValues:n.map(o=>jy(o,r,t))}}return e}function At(e){let t=za();return{request:{...e,facets:e.facets?.map(n=>Wa(n,t))},mappings:t}}function Uy(e,t,r){return{...e,start:r.dateFacetValueMap[t][Il(e.start)]||e.start,end:r.dateFacetValueMap[t][Pl(e.end)]||e.end}}function By(e,t){return e.facetId in t.dateFacetValueMap}function Qy(e,t){return By(e,t)?{...e,values:e.values.map(r=>Uy(r,e.facetId,t))}:e}function Mo(e,t){return"success"in e?{success:{...e.success,facets:e.success.facets?.map(n=>Qy(n,t))}}:e}p();u();d();l();p();u();d();l();function wt(e){return Object.values(e).map(t=>t.request)}function Ga(e,t){let r={};e.forEach(i=>r[i.facetId]=i);let n=[];t.forEach(i=>{i in r&&(n.push(r[i]),delete r[i])});let o=Object.values(r);return[...n,...o]}function Tl(e){return wt(e).map(t=>{let n=t.currentValues.some(({state:o})=>o!=="idle");return t.generateAutomaticRanges&&!n?{...t,currentValues:[]}:t})}var Ka={alphanumericDescending:{type:"alphanumeric",order:"descending"},alphanumericNaturalDescending:{type:"alphanumericNatural",order:"descending"}};function $y(e){return wt(e).map(t=>{let r=Ka[t.sortCriteria];return r?{...t,sortCriteria:r}:t})}function Hy(e){return[...$y(e.facetSet??{}),...Tl(e.numericFacetSet??{}),...Tl(e.dateFacetSet??{}),...wt(e.categoryFacetSet??{})]}function zy(e){return Hy(e).filter(({facetId:t})=>e.facetOptions?.facets[t]?.enabled??!0)}function qo(e){return Ga(zy(e),e.facetOrder??[])}p();u();d();l();p();u();d();l();function kl(_x37,_x38){return _kl.apply(this,arguments)}function _kl(){_kl=_asyncToGenerator(function*(e,t){let r=e.getReader(),n;for(;!(n=yield r.read()).done;)t(n.value)});return _kl.apply(this,arguments)}function Ol(e){let t,r,n,o=!1;return function(a){t===void 0?(t=a,r=0,n=-1):t=Gy(t,a);let m=t.length,f=0;for(;r<m;){o&&(t[r]===10&&(f=++r),o=!1);let s=-1;for(;r<m&&s===-1;++r)switch(t[r]){case 58:n===-1&&(n=r-f);break;case 13:o=!0,s=r;break;case 10:s=r;break}if(s===-1)break;e(t.subarray(f,s),n),f=r,n=-1}f===m?t=void 0:f!==0&&(t=t.subarray(f),r-=f)}}function Dl(e,t,r){let n=Fl(),o=new TextDecoder;return function(a,m){if(a.length===0)r?.(n),n=Fl();else if(m>0){let f=o.decode(a.subarray(0,m)),s=m+(a[m+1]===32?2:1),h=o.decode(a.subarray(s));switch(f){case"data":n.data=n.data?n.data+`
|
|
31
|
-
`+h:h;break;case"event":n.event=h;break;case"id":e(n.id=h);break;case"retry":Wy(h,n,t);break}}}}function Wy(e,t,r){let n=parseInt(e,10);isNaN(n)||r(t.retry=n)}function Gy(e,t){let r=new Uint8Array(e.length+t.length);return r.set(e),r.set(t,e.length),r}function Fl(){return{data:"",event:"",id:"",retry:void 0}}var Ya="text/event-stream",Ky=1e3,Ml="last-event-id";function ql(){return typeof window<"u"}function Nl(e,{signal:t,headers:r,onopen:n,onmessage:o,onclose:i,onerror:a,openWhenHidden:m,fetch:f,...s}){return new Promise((h,S)=>{let y={...r};y.accept||(y.accept=Ya);let g;function v(){g?.abort(),document.hidden||T()}!m&&ql()&&document.addEventListener("visibilitychange",v);let C=Ky,E;function I(){ql()&&document.removeEventListener("visibilitychange",v),clearTimeout(E),g?.abort()}t?.addEventListener("abort",()=>{I(),h()});let b=f??w,R=n??Yy;function T(){return _T.apply(this,arguments)}function _T(){_T=_asyncToGenerator(function*(){g=c.AbortController?new c.AbortController:null;try{let _=yield b(e,{...s,headers:y,signal:g?.signal});yield R(_),yield kl(_.body,Ol(Dl(F=>{F?y[Ml]=F:delete y[Ml]},F=>{C=F},o))),i?.(),I(),h()}catch(_){if(!g?.signal?.aborted)try{let F=a?.(_)??C;clearTimeout(E),E=setTimeout(T,F)}catch(F){I(),S(F)}}});return _T.apply(this,arguments)}T()})}function Yy(e){let t=e.headers.get("content-type");if(!t?.startsWith(Ya))throw new Error(`Expected content-type to be ${Ya}, Actual: ${t}`)}p();u();d();l();p();u();d();l();function Jy(e){return{status:e,isUninitialized:e==="uninitialized",isLoading:e==="pending",isSuccess:e==="fulfilled",isError:e==="rejected"}}var _l=ze;function Yl(e,t){if(e===t||!(_l(e)&&_l(t)||Array.isArray(e)&&Array.isArray(t)))return t;let r=Object.keys(t),n=Object.keys(e),o=r.length===n.length,i=Array.isArray(t)?[]:{};for(let a of r)i[a]=Yl(e[a],t[a]),o&&(o=e[a]===i[a]);return o?e:i}function Tr(e){let t=0;for(let r in e)t++;return t}var Vl=e=>[].concat(...e);function Xy(e){return new RegExp("(^|:)//").test(e)}function Zy(){return typeof document>"u"?!0:document.visibilityState!=="hidden"}function _o(e){return e!=null}function eS(){return typeof navigator>"u"||navigator.onLine===void 0?!0:navigator.onLine}var tS=e=>e.replace(/\/$/,""),rS=e=>e.replace(/^\//,"");function nS(e,t){if(!e)return t;if(!t)return e;if(Xy(t))return t;let r=e.endsWith("/")||!t.startsWith("?")?"/":"";return e=tS(e),t=rS(t),`${e}${r}${t}`}function oS(e,t,r){return e.has(t)?e.get(t):e.set(t,r).get(t)}var Ll=(...e)=>w(...e),iS=e=>e.status>=200&&e.status<=299,aS=e=>/ion\/(vnd\.api\+)?json/.test(e.get("content-type")||"");function jl(e){if(!ze(e))return e;let t={...e};for(let[r,n]of Object.entries(t))n===void 0&&delete t[r];return t}function Jl({baseUrl:e,prepareHeaders:t=S=>S,fetchFn:r=Ll,paramsSerializer:n,isJsonContentType:o=aS,jsonContentType:i="application/json",jsonReplacer:a,timeout:m,responseHandler:f,validateStatus:s,...h}={}){return typeof w>"u"&&r===Ll&&console.warn("Warning: `fetch` is not available. Please supply a custom `fetchFn` property to use `fetchBaseQuery` on SSR environments."),(/*#__PURE__*/function(){var _ref21=_asyncToGenerator(function*(y,g,v){let{getState:C,extra:E,endpoint:I,forced:b,type:R}=g,T,{url:_,headers:F=new x(h.headers),params:P=void 0,responseHandler:N=f??"json",validateStatus:M=s??iS,timeout:V=m,...H}=typeof y=="string"?{url:y}:y,j,L=g.signal;V&&(j=new c.AbortController,g.signal.addEventListener("abort",j.abort),L=j.signal);let q={...h,signal:L,...H};F=new x(jl(F)),q.headers=(yield t(F,{getState:C,arg:y,extra:E,endpoint:I,forced:b,type:R,extraOptions:v}))||F;let $=le=>typeof le=="object"&&(ze(le)||Array.isArray(le)||typeof le.toJSON=="function");if(!q.headers.has("content-type")&&$(q.body)&&q.headers.set("content-type",i),$(q.body)&&o(q.headers)&&(q.body=JSON.stringify(q.body,a)),P){let le=~_.indexOf("?")?"&":"?",ge=n?n(P):new URLSearchParams(jl(P));_+=le+ge}_=nS(e,_);let Q=new Request(_,q);T={request:new Request(_,q)};let z,X=!1,re=j&&setTimeout(()=>{X=!0,j.abort()},V);try{z=yield r(Q)}catch(le){return{error:{status:X?"TIMEOUT_ERROR":"FETCH_ERROR",error:String(le)},meta:T}}finally{re&&clearTimeout(re),j?.signal.removeEventListener("abort",j.abort)}let ne=z.clone();T.response=ne;let ae,se="";try{let le;if(yield Promise.all([S(z,N).then(ge=>ae=ge,ge=>le=ge),ne.text().then(ge=>se=ge,()=>{})]),le)throw le}catch(le){return{error:{status:"PARSING_ERROR",originalStatus:z.status,data:se,error:String(le)},meta:T}}return M(z,ae)?{data:ae,meta:T}:{error:{status:z.status,data:ae},meta:T}});return function(_x39,_x40,_x41){return _ref21.apply(this,arguments)}}());function S(_x42,_x43){return _S2.apply(this,arguments)}function _S2(){_S2=_asyncToGenerator(function*(y,g){if(typeof g=="function")return g(y);if(g==="content-type"&&(g=o(y.headers)?"json":"text"),g==="json"){let v=yield y.text();return v.length?JSON.parse(v):null}return y.text()});return _S2.apply(this,arguments)}}var Fr=class{constructor(e,t=void 0){this.value=e,this.meta=t}};function sS(){return _sS.apply(this,arguments)}function _sS(){_sS=_asyncToGenerator(function*(e=0,t=5){let r=Math.min(e,t),n=~~((Math.random()+.4)*(300<<r));yield new Promise(o=>setTimeout(i=>o(i),n))});return _sS.apply(this,arguments)}function cS(e,t){throw Object.assign(new Fr({error:e,meta:t}),{throwImmediately:!0})}var Ul={},uS=(e,t)=>(/*#__PURE__*/function(){var _ref22=_asyncToGenerator(function*(r,n,o){let i=[5,(t||Ul).maxRetries,(o||Ul).maxRetries].filter(h=>h!==void 0),[a]=i.slice(-1),f={maxRetries:a,backoff:sS,retryCondition:(h,S,{attempt:y})=>y<=a,...t,...o},s=0;for(;;)try{let h=yield e(r,n,o);if(h.error)throw new Fr(h);return h}catch(h){if(s++,h.throwImmediately){if(h instanceof Fr)return h.value;throw h}if(h instanceof Fr&&!f.retryCondition(h.value.error,r,{attempt:s,baseQueryApi:n,extraOptions:o}))return h.value;yield f.backoff(s,f.maxRetries)}});return function(_x44,_x45,_x46){return _ref22.apply(this,arguments)}}()),Xl=Object.assign(uS,{fail:cS}),es=k("__rtkq/focused"),Zl=k("__rtkq/unfocused"),ts=k("__rtkq/online"),ed=k("__rtkq/offline");function td(e){return e.type==="query"}function lS(e){return e.type==="mutation"}function rs(e,t,r,n,o,i){return dS(e)?e(t,r,n,o).filter(_o).map(Xa).map(i):Array.isArray(e)?e.map(Xa).map(i):[]}function dS(e){return typeof e=="function"}function Xa(e){return typeof e=="string"?{type:e}:e}function pS(e,t){return e.catch(t)}var vn=Symbol("forceQueryFn"),Za=e=>typeof e[vn]=="function";function fS({serializeQueryArgs:e,queryThunk:t,mutationThunk:r,api:n,context:o}){let i=new Map,a=new Map,{unsubscribeQueryResult:m,removeMutationResult:f,updateSubscriptionOptions:s}=n.internalActions;return{buildInitiateQuery:C,buildInitiateMutation:E,getRunningQueryThunk:h,getRunningMutationThunk:S,getRunningQueriesThunk:y,getRunningMutationsThunk:g};function h(I,b){return R=>{let T=o.endpointDefinitions[I],_=e({queryArgs:b,endpointDefinition:T,endpointName:I});return i.get(R)?.[_]}}function S(I,b){return R=>a.get(R)?.[b]}function y(){return I=>Object.values(i.get(I)||{}).filter(_o)}function g(){return I=>Object.values(a.get(I)||{}).filter(_o)}function v(I){}function C(I,b){let R=(T,{subscribe:_=!0,forceRefetch:F,subscriptionOptions:P,[vn]:N,...M}={})=>(V,H)=>{let j=e({queryArgs:T,endpointDefinition:b,endpointName:I}),L=t({...M,type:"query",subscribe:_,forceRefetch:F,subscriptionOptions:P,endpointName:I,originalArgs:T,queryCacheKey:j,[vn]:N}),q=n.endpoints[I].select(T),$=V(L),Q=q(H());let{requestId:W,abort:z}=$,X=Q.requestId!==W,re=i.get(V)?.[j],ne=()=>q(H()),ae=Object.assign(N?$.then(ne):X&&!re?Promise.resolve(Q):Promise.all([re,$]).then(ne),{arg:T,requestId:W,subscriptionOptions:P,queryCacheKey:j,abort:z,unwrap(){return _asyncToGenerator(function*(){let se=yield ae;if(se.isError)throw se.error;return se.data})()},refetch:()=>V(R(T,{subscribe:!1,forceRefetch:!0})),unsubscribe(){_&&V(m({queryCacheKey:j,requestId:W}))},updateSubscriptionOptions(se){ae.subscriptionOptions=se,V(s({endpointName:I,requestId:W,queryCacheKey:j,options:se}))}});if(!re&&!X&&!N){let se=oS(i,V,{});se[j]=ae,ae.then(()=>{delete se[j],Tr(se)||i.delete(V)})}return ae};return R}function E(I){return(b,{track:R=!0,fixedCacheKey:T}={})=>(_,F)=>{let P=r({type:"mutation",endpointName:I,originalArgs:b,track:R,fixedCacheKey:T}),N=_(P);let{requestId:M,abort:V,unwrap:H}=N,j=pS(N.unwrap().then(Q=>({data:Q})),Q=>({error:Q})),L=()=>{_(f({requestId:M,fixedCacheKey:T}))},q=Object.assign(j,{arg:N.arg,requestId:M,abort:V,unwrap:H,reset:L}),$=a.get(_)||{};return a.set(_,$),$[M]=q,q.then(()=>{delete $[M],Tr($)||a.delete(_)}),T&&($[T]=q,q.then(()=>{$[T]===q&&(delete $[T],Tr($)||a.delete(_))})),q}}}function Bl(e){return e}function mS({reducerPath:e,baseQuery:t,context:{endpointDefinitions:r},serializeQueryArgs:n,api:o,assertTagType:i}){let a=(b,R,T,_)=>(F,P)=>{let N=r[b],M=n({queryArgs:R,endpointDefinition:N,endpointName:b});if(F(o.internalActions.queryResultPatched({queryCacheKey:M,patches:T})),!_)return;let V=o.endpoints[b].select(R)(P()),H=rs(N.providesTags,V.data,void 0,R,{},i);F(o.internalActions.updateProvidedBy({queryCacheKey:M,providedTags:H}))},m=(b,R,T,_=!0)=>(F,P)=>{let M=o.endpoints[b].select(R)(P()),V={patches:[],inversePatches:[],undo:()=>F(o.util.patchQueryData(b,R,V.inversePatches,_))};if(M.status==="uninitialized")return V;let H;if("data"in M)if(Te(M.data)){let[j,L,q]=zn(M.data,T);V.patches.push(...L),V.inversePatches.push(...q),H=j}else H=T(M.data),V.patches.push({op:"replace",path:[],value:H}),V.inversePatches.push({op:"replace",path:[],value:M.data});return V.patches.length===0||F(o.util.patchQueryData(b,R,V.patches,_)),V},f=(b,R,T)=>_=>_(o.endpoints[b].initiate(R,{subscribe:!1,forceRefetch:!0,[vn]:()=>({data:T})})),s=/*#__PURE__*/function(){var _ref23=_asyncToGenerator(function*(b,{signal:R,abort:T,rejectWithValue:_,fulfillWithValue:F,dispatch:P,getState:N,extra:M}){let V=r[b.endpointName];try{let H=Bl,j,L={signal:R,abort:T,dispatch:P,getState:N,extra:M,endpoint:b.endpointName,type:b.type,forced:b.type==="query"?h(b,N()):void 0,queryCacheKey:b.type==="query"?b.queryCacheKey:void 0},q=b.type==="query"?b[vn]:void 0;if(q?j=q():V.query?(j=yield t(V.query(b.originalArgs),L,V.extraOptions),V.transformResponse&&(H=V.transformResponse)):j=yield V.queryFn(b.originalArgs,L,V.extraOptions,$=>t($,L,V.extraOptions)),typeof process<"u",j.error)throw new Fr(j.error,j.meta);return F(yield H(j.data,j.meta,b.originalArgs),{fulfilledTimeStamp:Date.now(),baseQueryMeta:j.meta,[mt]:!0})}catch(H){let j=H;if(j instanceof Fr){let L=Bl;V.query&&V.transformErrorResponse&&(L=V.transformErrorResponse);try{return _(yield L(j.value,j.meta,b.originalArgs),{baseQueryMeta:j.meta,[mt]:!0})}catch(q){j=q}}throw typeof process<"u",console.error(j),j}});return function s(_x47,_x48){return _ref23.apply(this,arguments)}}();function h(b,R){let T=R[e]?.queries?.[b.queryCacheKey],_=R[e]?.config.refetchOnMountOrArgChange,F=T?.fulfilledTimeStamp,P=b.forceRefetch??(b.subscribe&&_);return P?P===!0||(Number(new Date)-Number(F))/1e3>=P:!1}let S=oe(`${e}/executeQuery`,s,{getPendingMeta(){return{startedTimeStamp:Date.now(),[mt]:!0}},condition(b,{getState:R}){let T=R(),_=T[e]?.queries?.[b.queryCacheKey],F=_?.fulfilledTimeStamp,P=b.originalArgs,N=_?.originalArgs,M=r[b.endpointName];return Za(b)?!0:_?.status==="pending"?!1:h(b,T)||td(M)&&M?.forceRefetch?.({currentArg:P,previousArg:N,endpointState:_,state:T})?!0:!F},dispatchConditionRejection:!0}),y=oe(`${e}/executeMutation`,s,{getPendingMeta(){return{startedTimeStamp:Date.now(),[mt]:!0}}}),g=b=>"force"in b,v=b=>"ifOlderThan"in b,C=(b,R,T)=>(_,F)=>{let P=g(T)&&T.force,N=v(T)&&T.ifOlderThan,M=(H=!0)=>{let j={forceRefetch:H,isPrefetch:!0};return o.endpoints[b].initiate(R,j)},V=o.endpoints[b].select(R)(F());if(P)_(M());else if(N){let H=V?.fulfilledTimeStamp;if(!H){_(M());return}(Number(new Date)-Number(new Date(H)))/1e3>=N&&_(M())}else _(M(!1))};function E(b){return R=>R?.meta?.arg?.endpointName===b}function I(b,R){return{matchPending:ir(Yn(b),E(R)),matchFulfilled:ir(nt(b),E(R)),matchRejected:ir($t(b),E(R))}}return{queryThunk:S,mutationThunk:y,prefetch:C,updateQueryData:m,upsertQueryData:f,patchQueryData:a,buildMatchThunkActions:I}}function rd(e,t,r,n){return rs(r[e.meta.arg.endpointName][t],nt(e)?e.payload:void 0,on(e)?e.payload:void 0,e.meta.arg.originalArgs,"baseQueryMeta"in e.meta?e.meta.baseQueryMeta:void 0,n)}function No(e,t,r){let n=e[t];n&&r(n)}function Cn(e){return("arg"in e?e.arg.fixedCacheKey:e.fixedCacheKey)??e.requestId}function Ql(e,t,r){let n=e[Cn(t)];n&&r(n)}var Sn={};function gS({reducerPath:e,queryThunk:t,mutationThunk:r,serializeQueryArgs:n,context:{endpointDefinitions:o,apiUid:i,extractRehydrationInfo:a,hasRehydrationInfo:m},assertTagType:f,config:s}){let h=k(`${e}/resetApiState`);function S(F,P,N,M){var V;F[V=P.queryCacheKey]??(F[V]={status:"uninitialized",endpointName:P.endpointName}),No(F,P.queryCacheKey,H=>{H.status="pending",H.requestId=N&&H.requestId?H.requestId:M.requestId,P.originalArgs!==void 0&&(H.originalArgs=P.originalArgs),H.startedTimeStamp=M.startedTimeStamp})}function y(F,P,N,M){No(F,P.arg.queryCacheKey,V=>{if(V.requestId!==P.requestId&&!M)return;let{merge:H}=o[P.arg.endpointName];if(V.status="fulfilled",H){if(V.data!==void 0){let{fulfilledTimeStamp:j,arg:L,baseQueryMeta:q,requestId:$}=P,Q=rt(V.data,W=>H(W,N,{arg:L.originalArgs,baseQueryMeta:q,fulfilledTimeStamp:j,requestId:$}));V.data=Q}else V.data=N;}else V.data=o[P.arg.endpointName].structuralSharing??!0?Yl(Oe(V.data)?ea(V.data):V.data,N):N;delete V.error,V.fulfilledTimeStamp=P.fulfilledTimeStamp})}let g=Ht({name:`${e}/queries`,initialState:Sn,reducers:{removeQueryResult:{reducer(F,{payload:{queryCacheKey:P}}){delete F[P]},prepare:ar()},cacheEntriesUpserted:{reducer(F,P){for(let N of P.payload){let{queryDescription:M,value:V}=N;S(F,M,!0,{arg:M,requestId:P.meta.requestId,startedTimeStamp:P.meta.timestamp}),y(F,{arg:M,requestId:P.meta.requestId,fulfilledTimeStamp:P.meta.timestamp,baseQueryMeta:{}},V,!0)}},prepare:F=>({payload:F.map(M=>{let{endpointName:V,arg:H,value:j}=M,L=o[V];return{queryDescription:{type:"query",endpointName:V,originalArgs:M.arg,queryCacheKey:n({queryArgs:H,endpointDefinition:L,endpointName:V})},value:j}}),meta:{[mt]:!0,requestId:Xn(),timestamp:Date.now()}})},queryResultPatched:{reducer(F,{payload:{queryCacheKey:P,patches:N}}){No(F,P,M=>{M.data=ra(M.data,N.concat())})},prepare:ar()}},extraReducers(F){F.addCase(t.pending,(P,{meta:N,meta:{arg:M}})=>{let V=Za(M);S(P,M,V,N)}).addCase(t.fulfilled,(P,{meta:N,payload:M})=>{let V=Za(N.arg);y(P,N,M,V)}).addCase(t.rejected,(P,{meta:{condition:N,arg:M,requestId:V},error:H,payload:j})=>{No(P,M.queryCacheKey,L=>{if(!N){if(L.requestId!==V)return;L.status="rejected",L.error=j??H}})}).addMatcher(m,(P,N)=>{let{queries:M}=a(N);for(let[V,H]of Object.entries(M))(H?.status==="fulfilled"||H?.status==="rejected")&&(P[V]=H)})}}),v=Ht({name:`${e}/mutations`,initialState:Sn,reducers:{removeMutationResult:{reducer(F,{payload:P}){let N=Cn(P);N in F&&delete F[N]},prepare:ar()}},extraReducers(F){F.addCase(r.pending,(P,{meta:N,meta:{requestId:M,arg:V,startedTimeStamp:H}})=>{V.track&&(P[Cn(N)]={requestId:M,status:"pending",endpointName:V.endpointName,startedTimeStamp:H})}).addCase(r.fulfilled,(P,{payload:N,meta:M})=>{M.arg.track&&Ql(P,M,V=>{V.requestId===M.requestId&&(V.status="fulfilled",V.data=N,V.fulfilledTimeStamp=M.fulfilledTimeStamp)})}).addCase(r.rejected,(P,{payload:N,error:M,meta:V})=>{V.arg.track&&Ql(P,V,H=>{H.requestId===V.requestId&&(H.status="rejected",H.error=N??M)})}).addMatcher(m,(P,N)=>{let{mutations:M}=a(N);for(let[V,H]of Object.entries(M))(H?.status==="fulfilled"||H?.status==="rejected")&&V!==H?.requestId&&(P[V]=H)})}}),C=Ht({name:`${e}/invalidation`,initialState:Sn,reducers:{updateProvidedBy:{reducer(F,P){var V,H;let{queryCacheKey:N,providedTags:M}=P.payload;for(let j of Object.values(F))for(let L of Object.values(j)){let q=L.indexOf(N);q!==-1&&L.splice(q,1)}for(let{type:j,id:L}of M){let q=(V=F[j]??(F[j]={}))[H=L||"__internal_without_id"]??(V[H]=[]);q.includes(N)||q.push(N)}},prepare:ar()}},extraReducers(F){F.addCase(g.actions.removeQueryResult,(P,{payload:{queryCacheKey:N}})=>{for(let M of Object.values(P))for(let V of Object.values(M)){let H=V.indexOf(N);H!==-1&&V.splice(H,1)}}).addMatcher(m,(P,N)=>{var V,H;let{provided:M}=a(N);for(let[j,L]of Object.entries(M))for(let[q,$]of Object.entries(L)){let Q=(V=P[j]??(P[j]={}))[H=q||"__internal_without_id"]??(V[H]=[]);for(let W of $)Q.includes(W)||Q.push(W)}}).addMatcher(We(nt(t),on(t)),(P,N)=>{let M=rd(N,"providesTags",o,f),{queryCacheKey:V}=N.meta.arg;C.caseReducers.updateProvidedBy(P,C.actions.updateProvidedBy({queryCacheKey:V,providedTags:M}))})}}),E=Ht({name:`${e}/subscriptions`,initialState:Sn,reducers:{updateSubscriptionOptions(F,P){},unsubscribeQueryResult(F,P){},internal_getRTKQSubscriptions(){}}}),I=Ht({name:`${e}/internalSubscriptions`,initialState:Sn,reducers:{subscriptionsUpdated:{reducer(F,P){return ra(F,P.payload)},prepare:ar()}}}),b=Ht({name:`${e}/config`,initialState:{online:eS(),focused:Zy(),middlewareRegistered:!1,...s},reducers:{middlewareRegistered(F,{payload:P}){F.middlewareRegistered=F.middlewareRegistered==="conflict"||i!==P?"conflict":!0}},extraReducers:F=>{F.addCase(ts,P=>{P.online=!0}).addCase(ed,P=>{P.online=!1}).addCase(es,P=>{P.focused=!0}).addCase(Zl,P=>{P.focused=!1}).addMatcher(m,P=>({...P}))}}),R=rr({queries:g.reducer,mutations:v.reducer,provided:C.reducer,subscriptions:I.reducer,config:b.reducer}),T=(F,P)=>R(h.match(P)?void 0:F,P),_={...b.actions,...g.actions,...E.actions,...I.actions,...v.actions,...C.actions,resetApiState:h};return{reducer:T,actions:_}}var Ja=Symbol.for("RTKQ/skipToken"),nd={status:"uninitialized"},$l=rt(nd,()=>{}),Hl=rt(nd,()=>{});function hS({serializeQueryArgs:e,reducerPath:t,createSelector:r}){let n=S=>$l,o=S=>Hl;return{buildQuerySelector:m,buildMutationSelector:f,selectInvalidatedBy:s,selectCachedArgsForQuery:h};function i(S){return{...S,...Jy(S.status)}}function a(S){return S[t]}function m(S,y){return g=>{if(g===Ja)return r(n,i);let v=e({queryArgs:g,endpointDefinition:y,endpointName:S});return r(E=>a(E)?.queries?.[v]??$l,i)}}function f(){return S=>{let y;return typeof S=="object"?y=Cn(S)??Ja:y=S,r(y===Ja?o:C=>a(C)?.mutations?.[y]??Hl,i)}}function s(S,y){let g=S[t],v=new Set;for(let C of y.filter(_o).map(Xa)){let E=g.provided[C.type];if(!E)continue;let I=(C.id!==void 0?E[C.id]:Vl(Object.values(E)))??[];for(let b of I)v.add(b)}return Vl(Array.from(v.values()).map(C=>{let E=g.queries[C];return E?[{queryCacheKey:C,endpointName:E.endpointName,originalArgs:E.originalArgs}]:[]}))}function h(S,y){return Object.values(S[t].queries).filter(g=>g?.endpointName===y&&g.status!=="uninitialized").map(g=>g.originalArgs)}}var zl=WeakMap?new WeakMap:void 0,Wl=({endpointName:e,queryArgs:t})=>{let r="",n=zl?.get(t);if(typeof n=="string")r=n;else{let o=JSON.stringify(t,(i,a)=>(a=typeof a=="bigint"?{$bigint:a.toString()}:a,a=ze(a)?Object.keys(a).sort().reduce((m,f)=>(m[f]=a[f],m),{}):a,a));ze(t)&&zl?.set(t,o),r=o}return`${e}(${r})`};function yS(...e){return function(r){let n=or(s=>r.extractRehydrationInfo?.(s,{reducerPath:r.reducerPath??"api"})),o={reducerPath:"api",keepUnusedDataFor:60,refetchOnMountOrArgChange:!1,refetchOnFocus:!1,refetchOnReconnect:!1,invalidationBehavior:"delayed",...r,extractRehydrationInfo:n,serializeQueryArgs(s){let h=Wl;if("serializeQueryArgs"in s.endpointDefinition){let S=s.endpointDefinition.serializeQueryArgs;h=y=>{let g=S(y);return typeof g=="string"?g:Wl({...y,queryArgs:g})}}else r.serializeQueryArgs&&(h=r.serializeQueryArgs);return h(s)},tagTypes:[...(r.tagTypes||[])]},i={endpointDefinitions:{},batch(s){s()},apiUid:Xn(),extractRehydrationInfo:n,hasRehydrationInfo:or(s=>n(s)!=null)},a={injectEndpoints:f,enhanceEndpoints({addTagTypes:s,endpoints:h}){if(s)for(let S of s)o.tagTypes.includes(S)||o.tagTypes.push(S);if(h)for(let[S,y]of Object.entries(h))typeof y=="function"?y(i.endpointDefinitions[S]):Object.assign(i.endpointDefinitions[S]||{},y);return a}},m=e.map(s=>s.init(a,o,i));function f(s){let h=s.endpoints({query:S=>({...S,type:"query"}),mutation:S=>({...S,type:"mutation"})});for(let[S,y]of Object.entries(h)){if(s.overrideExisting!==!0&&S in i.endpointDefinitions){if(s.overrideExisting==="throw")throw new Error(je(39));typeof process<"u";continue}i.endpointDefinitions[S]=y;for(let g of m)g.injectEndpoint(S,y)}return a}return a.injectEndpoints({endpoints:r.endpoints})}}function xt(e,...t){return Object.assign(e,...t)}var SS=({api:e,queryThunk:t,internalState:r})=>{let n=`${e.reducerPath}/subscriptions`,o=null,i=null,{updateSubscriptionOptions:a,unsubscribeQueryResult:m}=e.internalActions,f=(g,v)=>{var E,I;if(a.match(v)){let{queryCacheKey:b,requestId:R,options:T}=v.payload;return g?.[b]?.[R]&&(g[b][R]=T),!0}if(m.match(v)){let{queryCacheKey:b,requestId:R}=v.payload;return g[b]&&delete g[b][R],!0}if(e.internalActions.removeQueryResult.match(v))return delete g[v.payload.queryCacheKey],!0;if(t.pending.match(v)){let{meta:{arg:b,requestId:R}}=v,T=g[E=b.queryCacheKey]??(g[E]={});return T[`${R}_running`]={},b.subscribe&&(T[R]=b.subscriptionOptions??T[R]??{}),!0}let C=!1;if(t.fulfilled.match(v)||t.rejected.match(v)){let b=g[v.meta.arg.queryCacheKey]||{},R=`${v.meta.requestId}_running`;C||(C=!!b[R]),delete b[R]}if(t.rejected.match(v)){let{meta:{condition:b,arg:R,requestId:T}}=v;if(b&&R.subscribe){let _=g[I=R.queryCacheKey]??(g[I]={});_[T]=R.subscriptionOptions??_[T]??{},C=!0}}return C},s=()=>r.currentSubscriptions,y={getSubscriptions:s,getSubscriptionCount:g=>{let C=s()[g]??{};return Tr(C)},isRequestSubscribed:(g,v)=>!!s()?.[g]?.[v]};return(g,v)=>{if(o||(o=JSON.parse(JSON.stringify(r.currentSubscriptions))),e.util.resetApiState.match(g))return o=r.currentSubscriptions={},i=null,[!0,!1];if(e.internalActions.internal_getRTKQSubscriptions.match(g))return[!1,y];let C=f(r.currentSubscriptions,g),E=!0;if(C){i||(i=setTimeout(()=>{let R=JSON.parse(JSON.stringify(r.currentSubscriptions)),[,T]=zn(o,()=>R);v.next(e.internalActions.subscriptionsUpdated(T)),o=R,i=null},500));let I=typeof g.type=="string"&&!!g.type.startsWith(n),b=t.rejected.match(g)&&g.meta.condition&&!!g.meta.arg.subscribe;E=!I&&!b}return[E,!1]}};function vS(e){for(let t in e)return!1;return!0}var CS=2147483647/1e3-1,bS=({reducerPath:e,api:t,queryThunk:r,context:n,internalState:o})=>{let{removeQueryResult:i,unsubscribeQueryResult:a,cacheEntriesUpserted:m}=t.internalActions,f=We(a.match,r.fulfilled,r.rejected,m.match);function s(g){let v=o.currentSubscriptions[g];return!!v&&!vS(v)}let h={},S=(g,v,C)=>{if(f(g)){let E=v.getState()[e],I;if(m.match(g))I=g.payload.map(b=>b.queryDescription.queryCacheKey);else{let{queryCacheKey:b}=a.match(g)?g.payload:g.meta.arg;I=[b]}for(let b of I)y(b,E.queries[b]?.endpointName,v,E.config)}if(t.util.resetApiState.match(g))for(let[E,I]of Object.entries(h))I&&clearTimeout(I),delete h[E];if(n.hasRehydrationInfo(g)){let E=v.getState()[e],{queries:I}=n.extractRehydrationInfo(g);for(let[b,R]of Object.entries(I))y(b,R?.endpointName,v,E.config)}};function y(g,v,C,E){let b=n.endpointDefinitions[v]?.keepUnusedDataFor??E.keepUnusedDataFor;if(b===1/0)return;let R=Math.max(0,Math.min(b,CS));if(!s(g)){let T=h[g];T&&clearTimeout(T),h[g]=setTimeout(()=>{s(g)||C.dispatch(i({queryCacheKey:g})),delete h[g]},R*1e3)}}return S},Gl=new Error("Promise never resolved before cacheEntryRemoved."),AS=({api:e,reducerPath:t,context:r,queryThunk:n,mutationThunk:o,internalState:i})=>{let a=Jn(n),m=Jn(o),f=nt(n,o),s={};function h(C,E,I){let b=s[C];b?.valueResolved&&(b.valueResolved({data:E,meta:I}),delete b.valueResolved)}function S(C){let E=s[C];E&&(delete s[C],E.cacheEntryRemoved())}let y=(C,E,I)=>{let b=g(C);function R(T,_,F,P){let N=I[t].queries[_],M=E.getState()[t].queries[_];!N&&M&&v(T,P,_,E,F)}if(n.pending.match(C))R(C.meta.arg.endpointName,b,C.meta.requestId,C.meta.arg.originalArgs);else if(e.internalActions.cacheEntriesUpserted.match(C))for(let{queryDescription:T,value:_}of C.payload){let{endpointName:F,originalArgs:P,queryCacheKey:N}=T;R(F,N,C.meta.requestId,P),h(N,_,{})}else if(o.pending.match(C))E.getState()[t].mutations[b]&&v(C.meta.arg.endpointName,C.meta.arg.originalArgs,b,E,C.meta.requestId);else if(f(C))h(b,C.payload,C.meta.baseQueryMeta);else if(e.internalActions.removeQueryResult.match(C)||e.internalActions.removeMutationResult.match(C))S(b);else if(e.util.resetApiState.match(C))for(let T of Object.keys(s))S(T)};function g(C){return a(C)?C.meta.arg.queryCacheKey:m(C)?C.meta.arg.fixedCacheKey??C.meta.requestId:e.internalActions.removeQueryResult.match(C)?C.payload.queryCacheKey:e.internalActions.removeMutationResult.match(C)?Cn(C.payload):""}function v(C,E,I,b,R){let T=r.endpointDefinitions[C],_=T?.onCacheEntryAdded;if(!_)return;let F={},P=new Promise(L=>{F.cacheEntryRemoved=L}),N=Promise.race([new Promise(L=>{F.valueResolved=L}),P.then(()=>{throw Gl})]);N.catch(()=>{}),s[I]=F;let M=e.endpoints[C].select(T.type==="query"?E:I),V=b.dispatch((L,q,$)=>$),H={...b,getCacheEntry:()=>M(b.getState()),requestId:R,extra:V,updateCachedData:T.type==="query"?L=>b.dispatch(e.util.updateQueryData(C,E,L)):void 0,cacheDataLoaded:N,cacheEntryRemoved:P},j=_(E,H);Promise.resolve(j).catch(L=>{if(L!==Gl)throw L})}return y},wS=({api:e,context:{apiUid:t},reducerPath:r})=>(n,o)=>{e.util.resetApiState.match(n)&&o.dispatch(e.internalActions.middlewareRegistered(t)),typeof process<"u"},xS=({reducerPath:e,context:t,context:{endpointDefinitions:r},mutationThunk:n,queryThunk:o,api:i,assertTagType:a,refetchQuery:m,internalState:f})=>{let{removeQueryResult:s}=i.internalActions,h=We(nt(n),on(n)),S=We(nt(n,o),$t(n,o)),y=[],g=(E,I)=>{h(E)?C(rd(E,"invalidatesTags",r,a),I):S(E)?C([],I):i.util.invalidateTags.match(E)&&C(rs(E.payload,void 0,void 0,void 0,void 0,a),I)};function v(E){for(let I in E.queries)if(E.queries[I]?.status==="pending")return!0;for(let I in E.mutations)if(E.mutations[I]?.status==="pending")return!0;return!1}function C(E,I){let b=I.getState(),R=b[e];if(y.push(...E),R.config.invalidationBehavior==="delayed"&&v(R))return;let T=y;if(y=[],T.length===0)return;let _=i.util.selectInvalidatedBy(b,T);t.batch(()=>{let F=Array.from(_.values());for(let{queryCacheKey:P}of F){let N=R.queries[P],M=f.currentSubscriptions[P]??{};N&&(Tr(M)===0?I.dispatch(s({queryCacheKey:P})):N.status!=="uninitialized"&&I.dispatch(m(N)))}})}return g},RS=({reducerPath:e,queryThunk:t,api:r,refetchQuery:n,internalState:o})=>{let i={},a=(y,g)=>{(r.internalActions.updateSubscriptionOptions.match(y)||r.internalActions.unsubscribeQueryResult.match(y))&&f(y.payload,g),(t.pending.match(y)||t.rejected.match(y)&&y.meta.condition)&&f(y.meta.arg,g),(t.fulfilled.match(y)||t.rejected.match(y)&&!y.meta.condition)&&m(y.meta.arg,g),r.util.resetApiState.match(y)&&h()};function m({queryCacheKey:y},g){let v=g.getState()[e],C=v.queries[y],E=o.currentSubscriptions[y];if(!C||C.status==="uninitialized")return;let{lowestPollingInterval:I,skipPollingIfUnfocused:b}=S(E);if(!Number.isFinite(I))return;let R=i[y];R?.timeout&&(clearTimeout(R.timeout),R.timeout=void 0);let T=Date.now()+I;i[y]={nextPollTimestamp:T,pollingInterval:I,timeout:setTimeout(()=>{(v.config.focused||!b)&&g.dispatch(n(C)),m({queryCacheKey:y},g)},I)}}function f({queryCacheKey:y},g){let C=g.getState()[e].queries[y],E=o.currentSubscriptions[y];if(!C||C.status==="uninitialized")return;let{lowestPollingInterval:I}=S(E);if(!Number.isFinite(I)){s(y);return}let b=i[y],R=Date.now()+I;(!b||R<b.nextPollTimestamp)&&m({queryCacheKey:y},g)}function s(y){let g=i[y];g?.timeout&&clearTimeout(g.timeout),delete i[y]}function h(){for(let y of Object.keys(i))s(y)}function S(y={}){let g=!1,v=Number.POSITIVE_INFINITY;for(let C in y)y[C].pollingInterval&&(v=Math.min(y[C].pollingInterval,v),g=y[C].skipPollingIfUnfocused||g);return{lowestPollingInterval:v,skipPollingIfUnfocused:g}}return a},ES=({api:e,context:t,queryThunk:r,mutationThunk:n})=>{let o=Yn(r,n),i=$t(r,n),a=nt(r,n),m={};return(s,h)=>{if(o(s)){let{requestId:S,arg:{endpointName:y,originalArgs:g}}=s.meta,v=t.endpointDefinitions[y],C=v?.onQueryStarted;if(C){let E={},I=new Promise((_,F)=>{E.resolve=_,E.reject=F});I.catch(()=>{}),m[S]=E;let b=e.endpoints[y].select(v.type==="query"?g:S),R=h.dispatch((_,F,P)=>P),T={...h,getCacheEntry:()=>b(h.getState()),requestId:S,extra:R,updateCachedData:v.type==="query"?_=>h.dispatch(e.util.updateQueryData(y,g,_)):void 0,queryFulfilled:I};C(g,T)}}else if(a(s)){let{requestId:S,baseQueryMeta:y}=s.meta;m[S]?.resolve({data:s.payload,meta:y}),delete m[S]}else if(i(s)){let{requestId:S,rejectedWithValue:y,baseQueryMeta:g}=s.meta;m[S]?.reject({error:s.payload??s.error,isUnhandledError:!y,meta:g}),delete m[S]}}},IS=({reducerPath:e,context:t,api:r,refetchQuery:n,internalState:o})=>{let{removeQueryResult:i}=r.internalActions,a=(f,s)=>{es.match(f)&&m(s,"refetchOnFocus"),ts.match(f)&&m(s,"refetchOnReconnect")};function m(f,s){let h=f.getState()[e],S=h.queries,y=o.currentSubscriptions;t.batch(()=>{for(let g of Object.keys(y)){let v=S[g],C=y[g];if(!C||!v)continue;(Object.values(C).some(I=>I[s]===!0)||Object.values(C).every(I=>I[s]===void 0)&&h.config[s])&&(Tr(C)===0?f.dispatch(i({queryCacheKey:g})):v.status!=="uninitialized"&&f.dispatch(n(v)))}})}return a};function PS(e){let{reducerPath:t,queryThunk:r,api:n,context:o}=e,{apiUid:i}=o,a={invalidateTags:k(`${t}/invalidateTags`)},m=S=>S.type.startsWith(`${t}/`),f=[wS,bS,xS,RS,AS,ES];return{middleware:S=>{let y=!1,v={...e,internalState:{currentSubscriptions:{}},refetchQuery:h,isThisApiSliceAction:m},C=f.map(b=>b(v)),E=SS(v),I=IS(v);return b=>R=>{if(!Un(R))return b(R);y||(y=!0,S.dispatch(n.internalActions.middlewareRegistered(i)));let T={...S,next:b},_=S.getState(),[F,P]=E(R,T,_),N;if(F?N=b(R):N=P,S.getState()[t]&&(I(R,T,_),m(R)||o.hasRehydrationInfo(R)))for(let M of C)M(R,T,_);return N}},actions:a};function h(S){return e.api.endpoints[S.endpointName].initiate(S.originalArgs,{subscribe:!1,forceRefetch:!0})}}var Kl=Symbol(),TS=({createSelector:e=pe}={})=>({name:Kl,init(t,{baseQuery:r,tagTypes:n,reducerPath:o,serializeQueryArgs:i,keepUnusedDataFor:a,refetchOnMountOrArgChange:m,refetchOnFocus:f,refetchOnReconnect:s,invalidationBehavior:h},S){Oc();let y=z=>(typeof process<"u",z);Object.assign(t,{reducerPath:o,endpoints:{},internalActions:{onOnline:ts,onOffline:ed,onFocus:es,onFocusLost:Zl},util:{}});let{queryThunk:g,mutationThunk:v,patchQueryData:C,updateQueryData:E,upsertQueryData:I,prefetch:b,buildMatchThunkActions:R}=mS({baseQuery:r,reducerPath:o,context:S,api:t,serializeQueryArgs:i,assertTagType:y}),{reducer:T,actions:_}=gS({context:S,queryThunk:g,mutationThunk:v,serializeQueryArgs:i,reducerPath:o,assertTagType:y,config:{refetchOnFocus:f,refetchOnReconnect:s,refetchOnMountOrArgChange:m,keepUnusedDataFor:a,reducerPath:o,invalidationBehavior:h}});xt(t.util,{patchQueryData:C,updateQueryData:E,upsertQueryData:I,prefetch:b,resetApiState:_.resetApiState,upsertQueryEntries:_.cacheEntriesUpserted}),xt(t.internalActions,_);let{middleware:F,actions:P}=PS({reducerPath:o,context:S,queryThunk:g,mutationThunk:v,api:t,assertTagType:y});xt(t.util,P),xt(t,{reducer:T,middleware:F});let{buildQuerySelector:N,buildMutationSelector:M,selectInvalidatedBy:V,selectCachedArgsForQuery:H}=hS({serializeQueryArgs:i,reducerPath:o,createSelector:e});xt(t.util,{selectInvalidatedBy:V,selectCachedArgsForQuery:H});let{buildInitiateQuery:j,buildInitiateMutation:L,getRunningMutationThunk:q,getRunningMutationsThunk:$,getRunningQueriesThunk:Q,getRunningQueryThunk:W}=fS({queryThunk:g,mutationThunk:v,api:t,serializeQueryArgs:i,context:S});return xt(t.util,{getRunningMutationThunk:q,getRunningMutationsThunk:$,getRunningQueryThunk:W,getRunningQueriesThunk:Q}),{name:Kl,injectEndpoint(z,X){var ne;let re=t;(ne=re.endpoints)[z]??(ne[z]={}),td(X)?xt(re.endpoints[z],{name:z,select:N(z,X),initiate:j(z,X)},R(g,z)):lS(X)&&xt(re.endpoints[z],{name:z,select:M(),initiate:L(z)},R(v,z))}}}}),od=yS(TS());var FS=/*#__PURE__*/function(){var _ref24=_asyncToGenerator(function*(e,t,r){let n=t.getState(),{accessToken:o,environment:i,organizationId:a}=n.configuration,m=n.generatedAnswer.answerConfigurationId,f={...e,headers:{...(e?.headers||{}),Authorization:`Bearer ${o}`}};try{let s=Re(a,i);return{data:Jl({baseUrl:`${s}/rest/organizations/${a}/answer/v1/configs/${m}`,fetchFn:S=>{if(S instanceof String)throw new Error("The provided 'request' must be a Request object.");let y=S.url,g={};return["method","headers","body","mode","credentials","cache","redirect","referrer","referrerPolicy","integrity","keepalive","signal"].forEach(v=>{g[v]=S[v]}),g.duplex="half",w(y,g)}})(f,{...t,signal:null},r)}}catch(s){return{error:s}}});return function FS(_x49,_x50,_x51){return _ref24.apply(this,arguments)}}(),id=od({reducerPath:"answer",baseQuery:Xl(FS,{maxRetries:3}),endpoints:()=>({})});var kS=(e,t)=>{let{contentFormat:r}=t;e.contentFormat=r,e.isStreaming=!0,e.isLoading=!1},OS=(e,t)=>{e.answer===void 0?e.answer=t.textDelta:typeof t.textDelta=="string"&&(e.answer=e.answer.concat(t.textDelta))},DS=(e,t)=>{e.citations=t.citations},MS=(e,t)=>{e.generated=t.answerGenerated,e.isStreaming=!1},qS=(e,t)=>{e.error={message:t.errorMessage,code:t.code},e.isStreaming=!1,e.isLoading=!1,console.error(`${t.errorMessage} - code ${t.code}`)},NS=(e,t,r)=>{let n=JSON.parse(e.data);n.finishReason==="ERROR"&&n.errorMessage&&qS(t,n);let o=n.payload.length?JSON.parse(n.payload):{};switch(n.payloadType){case"genqa.headerMessageType":o.contentFormat&&(kS(t,o),r(Na(o.contentFormat)));break;case"genqa.messageType":o.textDelta&&(OS(t,o),r(Ma({textDelta:o.textDelta})));break;case"genqa.citationsType":o.citations&&(DS(t,o),r(qa({citations:o.citations})));break;case"genqa.endOfStreamType":MS(t,o),r(Fo(o.answerGenerated??!1));break}},ns=id.injectEndpoints({overrideExisting:!0,endpoints:e=>({getAnswer:e.query({queryFn:()=>({data:{contentFormat:void 0,answer:void 0,citations:void 0,error:void 0,generated:!1,isStreaming:!0,isLoading:!0}}),onCacheEntryAdded(t,{getState:r,cacheDataLoaded:n,updateCachedData:o,dispatch:i}){return _asyncToGenerator(function*(){yield n;let{configuration:a,generatedAnswer:m,insightConfiguration:f}=r(),{organizationId:s,environment:h,accessToken:S}=a,y=Re(s,h),g=`${y}/rest/organizations/${s}/insight/v1/configs/${f?.insightId}/answer/${m.answerConfigurationId}/generate`,v=`${y}/rest/organizations/${s}/answer/v1/configs/${m.answerConfigurationId}/generate`;yield Nl(f?g:v,{method:"POST",body:JSON.stringify(t),headers:{Authorization:`Bearer ${S}`,Accept:"application/json","Content-Type":"application/json","Accept-Encoding":"*"},fetch:w,onopen:function(){var _ref25=_asyncToGenerator(function*(C){let E=C.headers.get("x-answer-id");E&&o(I=>{I.answerId=E})});return function onopen(_x52){return _ref25.apply(this,arguments)}}(),onmessage:C=>{o(E=>{NS(C,E,i)})},onerror:C=>{throw C},onclose:()=>{o(C=>{i(_a(!C.generated))})}})})()}})})}),AM=pe(e=>gn(e)?.q,e=>e.search.requestId,(e,t)=>({q:e,requestId:t})),Vo={},_S=(e,t)=>({...Vo,[e]:qo(t)?.map(r=>Wa(r,za())).sort((r,n)=>r.facetId>n.facetId?1:n.facetId>r.facetId?-1:0)}),VS=e=>e.pagination?e.pagination.firstResult+e.pagination.numberOfResults>5e3?5e3-e.pagination.firstResult:e.pagination.numberOfResults:void 0,LS=(e,t)=>{let r=gn(e)?.q,n=pl(e),o=dl(e),i=ol(e)??[];return r&&t==="fetch"&&(Vo=_S(r,e)),{q:r,pipelineRuleParameters:{mlGenerativeQuestionAnswering:{responseFormat:e.generatedAnswer.responseFormat,citationsFieldToInclude:i}},...(n?.length&&{searchHub:n}),...(o?.length&&{pipeline:o}),...(Vo[r]?.length&&{facets:Vo[r]}),...(e.fields&&{fieldsToInclude:e.fields.fieldsToInclude}),...(e.didYouMean&&{queryCorrection:{enabled:e.didYouMean.enableDidYouMean&&e.didYouMean.queryCorrectionMode==="next",options:{automaticallyCorrect:e.didYouMean.automaticallyCorrectQuery?"whenNoResults":"never"}},enableDidYouMean:e.didYouMean.enableDidYouMean&&e.didYouMean.queryCorrectionMode==="legacy"}),...(e.pagination&&{numberOfResults:VS(e),firstResult:e.pagination.firstResult}),tab:e.configuration.analytics.originLevel2}};var il=e=>ns.endpoints.getAnswer.select(LS(e,"select"))(e);p();u();d();l();var ad=de(sr,e=>e);p();u();d();l();function os(){return typeof window<"u"&&typeof document<"u"}p();u();d();l();function jS(e){let t=e.payload?.analyticsAction;return sd(e)&&!J(t)}function sd(e){return"type"in e}var cd=e=>t=>r=>{let n;jS(r)&&(n=r.payload.analyticsAction,delete r.payload.analyticsAction);let o=t(r);return sd(r)&&(r.type==="search/executeSearch/fullfilled"&&n===void 0&&console.error("No analytics action associated with search:",r),r.type==="recommendation/get/fullfilled"&&n===void 0&&console.error("No analytics action associated with recommendation:",r),r.type==="productRecommendations/get/fullfilled"&&n===void 0&&console.error("No analytics action associated with product recommendation:",r)),n!==void 0&&e.dispatch(n),o};p();u();d();l();p();u();d();l();var hd=Ne(ld(),1);p();u();d();l();var eq=k("tab/register",e=>{let t=new G({values:{id:K,expression:Ce}});return U(e,t)}),Lo=k("tab/updateActiveTab",e=>U(e,K));p();u();d();l();var jo=Ne(ko(),1),fd=Ne(dd(),1),md=Ne(pd(),1);jo.default.extend(md.default);jo.default.extend(fd.default);var gd=()=>({organizationId:"",accessToken:"",search:{locale:"en-US",timezone:jo.default.tz.guess(),authenticationProviders:[]},analytics:{enabled:!0,originContext:"Search",originLevel2:"default",originLevel3:"default",anonymous:!1,deviceId:"",userDisplayName:"",documentLocation:"",trackingId:"",analyticsMode:"next",source:{}},knowledge:{answerConfigurationId:""},environment:"prod"});var yd=de(gd(),e=>e.addCase(gt,(t,r)=>{BS(t,r.payload)}).addCase(Ge,(t,r)=>{QS(t,r.payload)}).addCase(cr,(t,r)=>{$S(t,r.payload)}).addCase(ur,t=>{t.analytics.enabled=!1}).addCase(lr,t=>{t.analytics.enabled=!0}).addCase(eo,(t,r)=>{t.analytics.originLevel2=r.payload.originLevel2}).addCase(to,(t,r)=>{t.analytics.originLevel3=r.payload.originLevel3}).addCase(Lo,(t,r)=>{t.analytics.originLevel2=r.payload}).addCase(ht,(t,r)=>{t.analytics.originLevel2=r.payload.tab||t.analytics.originLevel2}));function BS(e,t){J(t.accessToken)||(e.accessToken=t.accessToken),e.environment=t.environment??"prod",J(t.organizationId)||(e.organizationId=t.organizationId)}function QS(e,t){J(t.proxyBaseUrl)||(e.search.apiBaseUrl=t.proxyBaseUrl),J(t.locale)||(e.search.locale=t.locale),J(t.timezone)||(e.search.timezone=t.timezone),J(t.authenticationProviders)||(e.search.authenticationProviders=t.authenticationProviders)}function $S(e,t){J(t.enabled)||(e.analytics.enabled=t.enabled),J(t.originContext)||(e.analytics.originContext=t.originContext),J(t.originLevel2)||(e.analytics.originLevel2=t.originLevel2),J(t.originLevel3)||(e.analytics.originLevel3=t.originLevel3),J(t.proxyBaseUrl)||(e.analytics.apiBaseUrl=t.proxyBaseUrl),J(t.trackingId)||(e.analytics.trackingId=t.trackingId),J(t.analyticsMode)||(e.analytics.analyticsMode=t.analyticsMode),J(t.source)||(e.analytics.source=t.source);let r=(0,hd.default)();r&&(e.analytics.analyticsMode="next",e.analytics.trackingId=r),J(t.runtimeEnvironment)||(e.analytics.runtimeEnvironment=t.runtimeEnvironment),J(t.anonymous)||(e.analytics.anonymous=t.anonymous),J(t.deviceId)||(e.analytics.deviceId=t.deviceId),J(t.userDisplayName)||(e.analytics.userDisplayName=t.userDisplayName),J(t.documentLocation)||(e.analytics.documentLocation=t.documentLocation)}var Be=yd;p();u();d();l();function HS(e){return e.instantlyCallable}var Sd=()=>e=>t=>e(HS(t)?t():t);p();u();d();l();var vd=e=>()=>t=>r=>{let n=r;if(!n.error)return t(r);let o=n.error,i=[n.payload?.errorCode,n.payload?.message].filter(Boolean).join(" - ");if(n.payload?.ignored||e.error(i||o.stack||o.message||o.name||"Error",`Action dispatch error ${n.type}`,r),n.error.name!=="SchemaValidationError")return t(r)},Cd=e=>t=>r=>n=>(e.debug({action:n,nextState:t.getState()},`Action dispatched: ${n.type}`),r(n));p();u();d();l();var us=e=>({referrer:document.referrer,userAgent:navigator.userAgent,location:window.location.href,clientId:e}),ls=()=>({referrer:null,userAgent:null,location:null,clientId:""});p();u();d();l();function bd(e,t){let r={...e},n,o=i=>(a,m)=>{let f=i(a,m);return n?n(f,m):f};return{get combinedReducer(){let i=ec(Object.entries(t).filter(([a])=>!(a in r)).map(([a,m])=>[a,()=>m]));return o(rr({...i,...r}))},containsAll(i){return Object.keys(i).every(m=>m in r)},add(i){Object.keys(i).filter(a=>!(a in r)).forEach(a=>r[a]=i[a])},addCrossReducer(i){n=i}}}p();u();d();l();p();u();d();l();function Uo(e,t,r){var n,o,i;t===void 0&&(t=50),r===void 0&&(r={});var a=(n=r.isImmediate)!=null&&n,m=(o=r.callback)!=null&&o,f=r.maxWait,s=Date.now(),h=[];function S(){if(f!==void 0){var g=Date.now()-s;if(g+t>=f)return f-g}return t}var y=function(){var g=[].slice.call(arguments),v=this;return new Promise(function(C,E){var I=a&&i===void 0;if(i!==void 0&&clearTimeout(i),i=setTimeout(function(){if(i=void 0,s=Date.now(),!a){var R=e.apply(v,g);m&&m(R),h.forEach(function(T){return(0,T.resolve)(R)}),h=[]}},S()),I){var b=e.apply(v,g);return m&&m(b),C(b)}h.push({resolve:C,reject:E})})};return y.cancel=function(g){i!==void 0&&clearTimeout(i),h.forEach(function(v){return(0,v.reject)(g)}),h=[]},y}function Ad(e,t){let r=0,n=Uo(()=>r=0,500);return o=>i=>(/*#__PURE__*/function(){var _ref26=_asyncToGenerator(function*(a){if(!(typeof a=="function"))return i(a);let f=yield i(a);if(!zS(f))return f;if(typeof t!="function")return e.warn("Unable to renew the expired token because a renew function was not provided. Please specify the #renewAccessToken option when initializing the engine."),f;if(r>=5)return e.warn("Attempted to renew the token but was not successful. Please check the #renewAccessToken function."),f;r++,n();let s=yield WS(t);o.dispatch(gt({accessToken:s})),o.dispatch(a)});return function(_x53){return _ref26.apply(this,arguments)}}())}function zS(e){return e?.error?.name===new tr().name}function WS(_x54){return _WS.apply(this,arguments)}function _WS(){_WS=_asyncToGenerator(function*(e){try{return yield e()}catch{return""}});return _WS.apply(this,arguments)}p();u();d();l();function wd({reducer:e,preloadedState:t,middlewares:r=[],thunkExtraArguments:n,name:o}){return $c({reducer:e,preloadedState:t,devTools:{stateSanitizer:i=>i.history?{...i,history:"<<OMIT>>"}:i,name:o,shouldHotReload:!1},middleware:i=>i({thunk:{extraArgument:n}}).prepend(...r).concat(Cd(n.logger))})}function GS(e,t){let{analytics:r}=e,{analyticsClientMiddleware:n,...o}=r??{},i={...o,...(r?.proxyBaseUrl&&{apiBaseUrl:r.proxyBaseUrl,nexApiBaseUrl:r.proxyBaseUrl})};if(i.analyticsMode!=="next"&&Zs())return t.info("Analytics disabled since doNotTrack is active."),{...i,enabled:!1};if(i.analyticsMode==="next"&&!o.trackingId)throw new ds("analytics.trackingId is required when analytics.analyticsMode=\"next\"");return i}function xd(e,t){let r={...e.reducers,configuration:Be,version:ad},n=KS({...e,reducers:r},t,Be),{accessToken:o,environment:i,organizationId:a}=e.configuration;n.dispatch(gt({accessToken:o,environment:i,organizationId:a}));let m=GS(e.configuration,n.logger);return m&&n.dispatch(cr(m)),n}function KS(e,t,r){let{reducers:n}=e,o=bd({...n,configurationReducer:r},e.preloadedState??{});e.crossReducer&&o.addCrossReducer(e.crossReducer);let i=t.logger,a=()=>{let h="";try{h=br(s.state).getMeta("").clientId}catch(S){i.warn("Error while obtaining clientID from relay",S)}return h},m={...t,get relay(){return br(s.state)},get navigatorContext(){return e.navigatorContextProvider?e.navigatorContextProvider():os()?us(a()):ls()}},f=YS(e,m,o),s={addReducers(h){o.containsAll(h)||(o.add(h),f.replaceReducer(o.combinedReducer))},dispatch:f.dispatch,subscribe:f.subscribe,enableAnalytics(){f.dispatch(lr())},disableAnalytics(){f.dispatch(ur())},get state(){return f.getState()},get relay(){return br(this.state)},get navigatorContext(){return e.navigatorContextProvider?e.navigatorContextProvider():os()?us(a()):ls()},logger:i,store:f};return s}function YS(e,t,r){let{preloadedState:n,configuration:o}=e,i=o.name||"coveo-headless",a=JS(e,t.logger);return wd({preloadedState:n,reducer:r.combinedReducer,middlewares:a,thunkExtraArguments:t,name:i})}function JS(e,t){let{renewAccessToken:r}=e.configuration,n=Ad(t,r);return[Sd,n,vd(t),cd].concat(ns.middleware,e.middlewares||[])}var ds=class extends Error{constructor(t){super(t),this.name="InvalidEngineConfiguration"}};p();u();d();l();var Dd=Ne(Od(),1);function Md(e){return(0,Dd.pino)({name:"@coveo/headless",level:e?.level||"warn",formatters:{log:e?.logFormatter}})}p();u();d();l();function qd(e,t){let r=gv(e),n=_e,o=hv(e);return{analyticsClientMiddleware:r,validatePayload:n,preprocessRequest:o,logger:t}}function gv(e){let{analytics:t}=e,r=(n,o)=>o;return t?.analyticsClientMiddleware||r}function hv(e){return e.preprocessRequest||Dn}p();u();d();l();p();u();d();l();var Nd={organizationId:K,accessToken:K,name:new B({required:!1,emptyAllowed:!1}),analytics:new G({options:{required:!1},values:{enabled:new Z({required:!1}),originContext:new B({required:!1}),originLevel2:new B({required:!1}),originLevel3:new B({required:!1}),analyticsMode:new B({constrainTo:["legacy","next"],required:!1,default:"next"}),proxyBaseUrl:new B({required:!1,url:!0}),trackingId:new B({required:!1,emptyAllowed:!1,regex:/^[a-zA-Z0-9_\-.]{1,100}$/})}}),environment:new B({required:!1,default:"prod",constrainTo:["prod","hipaa","stg","dev"]})};function _d(){return{organizationId:"searchuisamples",accessToken:"xx564559b1-0045-48e1-953c-3addd1ee4457"}}var Vd=new Ee({...Nd,pipeline:new B({required:!1,emptyAllowed:!0}),searchHub:me,locale:me,timezone:me});function ys(){return{..._d(),searchHub:"default"}}var yv={debug:io,pipeline:fr,searchHub:Rr,recommendation:wr};function Ld(e){let t=Md(e.loggerOptions);Sv(e.configuration,t);let r=vv(e.configuration,t),n={...qd(e.configuration,t),apiClient:r},o={...e,reducers:yv},i=xd(o,n),{pipeline:a,searchHub:m,timezone:f,locale:s,proxyBaseUrl:h}=e.configuration;return i.dispatch(Ge({timezone:f,locale:s,proxyBaseUrl:h})),J(a)||i.dispatch(dr(a)),J(m)||i.dispatch(xr(m)),{...i,get state(){return i.state}}}function Sv(e,t){try{Vd.validate(e)}catch(r){throw t.error(r,"Recommendation engine configuration error"),r}}function vv(e,t){return new Vn({logger:t,preprocessRequest:e.preprocessRequest||Dn,postprocessSearchResponseMiddleware:e.preprocessSearchResponseMiddleware||tc,postprocessFacetSearchResponseMiddleware:rc,postprocessQuerySuggestResponseMiddleware:nc})}p();u();d();l();function Cv(e){return e.addReducers({configuration:Be}),{disableAnalytics:ur,enableAnalytics:lr,setOriginLevel2:eo,setOriginLevel3:to,updateAnalyticsConfiguration:cr,updateBasicConfiguration:gt}}p();u();d();l();function bv(e){return e.addReducers({configuration:Be,pipeline:fr,searchHub:Rr}),{updateSearchConfiguration:Ge}}p();u();d();l();p();u();d();l();p();u();d();l();var Et=()=>new B({required:!1,emptyAllowed:!0}),$o=k("advancedSearchQueries/update",e=>U(e,{aq:Et(),cq:Et(),lq:Et(),dq:Et()})),Ho=k("advancedSearchQueries/register",e=>U(e,{aq:Et(),cq:Et(),lq:Et(),dq:Et()}));p();u();d();l();var It=()=>({cq:"",cqWasSet:!1,aq:"",aqWasSet:!1,lq:"",lqWasSet:!1,dq:"",dqWasSet:!1,defaultFilters:{cq:"",aq:"",lq:"",dq:""}});var jd=de(It(),e=>{e.addCase($o,(t,r)=>{let{aq:n,cq:o,lq:i,dq:a}=r.payload;ye(n)||(t.aq=n,t.aqWasSet=!0),ye(o)||(t.cq=o,t.cqWasSet=!0),ye(i)||(t.lq=i,t.lqWasSet=!0),ye(a)||(t.dq=a,t.dqWasSet=!0)}).addCase(Ho,(t,r)=>{let{aq:n,cq:o,lq:i,dq:a}=r.payload;ye(n)||(t.defaultFilters.aq=n,t.aqWasSet||(t.aq=n)),ye(o)||(t.defaultFilters.cq=o,t.cqWasSet||(t.cq=o)),ye(i)||(t.defaultFilters.lq=i,t.lqWasSet||(t.lq=i)),ye(a)||(t.defaultFilters.dq=a,t.dqWasSet||(t.dq=a))}).addCase(Fe.fulfilled,(t,r)=>r.payload?.advancedSearchQueries??t).addCase(ht,(t,r)=>{let{aq:n,cq:o}=r.payload;ye(n)||(t.aq=n,t.aqWasSet=!0),ye(o)||(t.cq=o,t.cqWasSet=!0)})});function Av(e){return e.addReducers({advancedSearchQueries:jd}),{updateAdvancedSearchQueries:$o,registerAdvancedSearchQueries:Ho}}p();u();d();l();p();u();d();l();p();u();d();l();var wv=new ee({each:K,required:!0}),Ud=(e,t)=>(U(e,K),kn(t)?U(t,K):U(t,wv),{payload:{contextKey:e,contextValue:t}}),Kt=k("context/set",e=>{for(let[t,r]of Object.entries(e))Ud(t,r);return{payload:e}}),Yt=k("context/add",e=>Ud(e.contextKey,e.contextValue)),Jt=k("context/remove",e=>U(e,K));p();u();d();l();function zo(){return{contextValues:{}}}var Wo=de(zo(),e=>{e.addCase(Kt,(t,r)=>{t.contextValues=r.payload}).addCase(Yt,(t,r)=>{t.contextValues[r.payload.contextKey]=r.payload.contextValue}).addCase(Jt,(t,r)=>{delete t.contextValues[r.payload]}).addCase(Fe.fulfilled,(t,r)=>{r.payload&&(t.contextValues=r.payload.context.contextValues)})});function xv(e){return e.addReducers({context:Wo}),{addContext:Yt,removeContext:Jt,setContext:Kt}}p();u();d();l();p();u();d();l();p();u();d();l();var Or=k("dictionaryFieldContext/set",e=>{let t=new G({options:{required:!0}}),r=U(e,t).error;if(r)return{payload:e,error:r};let n=Object.values(e),o=new ee({each:Ce}),i=U(n,o).error;return i?{payload:e,error:i}:{payload:e}}),Dr=k("dictionaryFieldContext/add",e=>{let t=new G({options:{required:!0},values:{field:Ce,key:Ce}});return U(e,t)}),Mr=k("dictionaryFieldContext/remove",e=>U(e,Ce));p();u();d();l();function Go(){return{contextValues:{}}}var Ko=de(Go(),e=>{e.addCase(Or,(t,r)=>{t.contextValues=r.payload}).addCase(Dr,(t,r)=>{let{field:n,key:o}=r.payload;t.contextValues[n]=o}).addCase(Mr,(t,r)=>{delete t.contextValues[r.payload]}).addCase(Fe.fulfilled,(t,r)=>{r.payload&&(t.contextValues=r.payload.dictionaryFieldContext.contextValues)})});function Rv(e){return e.addReducers({dictionaryFieldContext:Ko}),{addContext:Dr,removeContext:Mr,setContext:Or}}p();u();d();l();p();u();d();l();p();u();d();l();p();u();d();l();var Pt=/*#__PURE__*/function(){var _ref27=_asyncToGenerator(function*(e,t){return{accessToken:e.configuration.accessToken,organizationId:e.configuration.organizationId,url:e.configuration.search.apiBaseUrl??pt(e.configuration.organizationId,e.configuration.environment),locale:e.configuration.search.locale,debug:e.debug,tab:e.configuration.analytics.originLevel2,referrer:e.configuration.analytics.originLevel3,timezone:e.configuration.search.timezone,...(e.configuration.analytics.enabled&&{actionsHistory:Ye.getHistory()}),...(e.advancedSearchQueries?.aq&&{aq:e.advancedSearchQueries.aq}),...(e.advancedSearchQueries?.cq&&{cq:e.advancedSearchQueries.cq}),...(e.advancedSearchQueries?.lq&&{lq:e.advancedSearchQueries.lq}),...(e.advancedSearchQueries?.dq&&{dq:e.advancedSearchQueries.dq}),...(e.context&&{context:e.context.contextValues}),...(e.fields&&!e.fields.fetchAllFields&&{fieldsToInclude:e.fields.fieldsToInclude}),...(e.dictionaryFieldContext&&{dictionaryFieldContext:e.dictionaryFieldContext.contextValues}),...(e.pipeline&&{pipeline:e.pipeline}),...(e.query&&{q:e.query.q,enableQuerySyntax:e.query.enableQuerySyntax}),...(e.searchHub&&{searchHub:e.searchHub}),...(e.sortCriteria&&{sortCriteria:e.sortCriteria}),...(e.configuration.analytics.enabled&&(yield Eo(e.configuration.analytics,t))),...(e.excerptLength&&!J(e.excerptLength.length)&&{excerptLength:e.excerptLength.length}),...(e.configuration.search.authenticationProviders.length&&{authentication:e.configuration.search.authenticationProviders.join(",")})}});return function Pt(_x55,_x56){return _ref27.apply(this,arguments)}}();p();u();d();l();p();u();d();l();var Bd=(e,t,r)=>({analytics:{clientId:t.clientId,clientTimestamp:new Date().toISOString(),documentReferrer:t.referrer,documentLocation:t.location,originContext:e.originContext,...(r&&{actionCause:r.actionCause}),...(r&&{customData:r.customData}),...(e.userDisplayName&&{userDisplayName:e.userDisplayName}),...(e.deviceId&&{deviceId:e.deviceId}),...(e.trackingId&&{trackingId:e.trackingId}),capture:!0,source:vr(e)}});var qr=(e,t,r)=>({accessToken:e.configuration.accessToken,organizationId:e.configuration.organizationId,url:e.configuration.search.apiBaseUrl??pt(e.configuration.organizationId,e.configuration.environment),locale:e.configuration.search.locale,debug:e.debug,tab:e.configuration.analytics.originLevel2,referrer:t.referrer,timezone:e.configuration.search.timezone,...(e.advancedSearchQueries?.aq&&{aq:e.advancedSearchQueries.aq}),...(e.advancedSearchQueries?.cq&&{cq:e.advancedSearchQueries.cq}),...(e.advancedSearchQueries?.lq&&{lq:e.advancedSearchQueries.lq}),...(e.advancedSearchQueries?.dq&&{dq:e.advancedSearchQueries.dq}),...(e.context&&{context:e.context.contextValues}),...(e.fields&&!e.fields.fetchAllFields&&{fieldsToInclude:e.fields.fieldsToInclude}),...(e.dictionaryFieldContext&&{dictionaryFieldContext:e.dictionaryFieldContext.contextValues}),...(e.pipeline&&{pipeline:e.pipeline}),...(e.query&&{q:e.query.q,enableQuerySyntax:e.query.enableQuerySyntax}),...(e.searchHub&&{searchHub:e.searchHub}),...(e.sortCriteria&&{sortCriteria:e.sortCriteria}),...(e.configuration.analytics.enabled&&Bd(e.configuration.analytics,t,r)),...(e.excerptLength&&!J(e.excerptLength.length)&&{excerptLength:e.excerptLength.length}),...(e.configuration.search.authenticationProviders.length&&{authentication:e.configuration.search.authenticationProviders.join(",")})});var Ev={collectionField:new B({emptyAllowed:!1,required:!1}),parentField:new B({emptyAllowed:!1,required:!1}),childField:new B({emptyAllowed:!1,required:!1}),numberOfFoldedResults:new Y({min:0,required:!1})},Qd=k("folding/register",e=>U(e,Ev)),eU=oe("folding/loadCollection",/*#__PURE__*/function(){var _ref28=_asyncToGenerator(function*(e,{getState:t,rejectWithValue:r,extra:{apiClient:n,navigatorContext:o}}){let i=t(),a=i.configuration.analytics.analyticsMode==="legacy"?yield Pt(i):qr(i,o),m=yield n.search({...a,q:Iv(i),enableQuerySyntax:!0,cq:`@${i.folding.fields.collection}="${e}"`,filterField:i.folding.fields.collection,childField:i.folding.fields.parent,parentField:i.folding.fields.child,filterFieldRange:100},{origin:"foldingCollection"});return Ie(m)?r(m.error):{collectionId:e,results:m.success.results,searchUid:m.success.searchUid,rootResult:i.folding.collections[e].result}});return function(_x57,_x58){return _ref28.apply(this,arguments)}}());function Iv(e){return e.query.q===""?"":e.query.enableQuerySyntax?`${e.query.q} OR @uri`:`( <@- ${e.query.q} -@> ) OR @uri`}p();u();d();l();var $d=()=>({enabled:!1,fields:{collection:"foldingcollection",parent:"foldingparent",child:"foldingchild"},filterFieldRange:2,collections:{}});p();u();d();l();var Nr=k("fields/registerFieldsToInclude",e=>U(e,Zn)),Yo=k("fields/fetchall/enable"),Jo=k("fields/fetchall/disable"),Xo=oe("fields/fetchDescription",/*#__PURE__*/function(){var _ref29=_asyncToGenerator(function*(e,{extra:t,getState:r,rejectWithValue:n}){let o=r(),{accessToken:i,environment:a,organizationId:m}=o.configuration,{apiBaseUrl:f}=o.configuration.search,s=yield t.apiClient.fieldDescriptions({accessToken:i,organizationId:m,url:f??pt(m,a)});return Ie(s)?n(s.error):s.success.fields});return function(_x59,_x60){return _ref29.apply(this,arguments)}}());p();u();d();l();var Zo=["author","language","urihash","objecttype","collection","source","permanentid"],Ss=[...Zo,"date","filetype","parents"],Hd=[...Ss,"ec_price","ec_name","ec_description","ec_brand","ec_category","ec_item_group_id","ec_shortdesc","ec_thumbnails","ec_images","ec_promo_price","ec_in_stock","ec_rating"],zd=()=>({fieldsToInclude:Zo,fetchAllFields:!1,fieldsDescription:[]});var ei=de(zd(),e=>e.addCase(Nr,(t,r)=>{t.fieldsToInclude=[...new Set(t.fieldsToInclude.concat(r.payload))]}).addCase(Yo,t=>{t.fetchAllFields=!0}).addCase(Jo,t=>{t.fetchAllFields=!1}).addCase(Xo.fulfilled,(t,{payload:r})=>{t.fieldsDescription=r}).addCase(Qd,(t,{payload:r})=>{let n=$d().fields;t.fieldsToInclude.push(r.collectionField??n.collection,r.parentField??n.parent,r.childField??n.child)}));function Pv(e){return e.addReducers({fields:ei}),{registerFieldsToInclude:Nr,enableFetchAllFields:Yo,disableFetchAllFields:Jo,fetchFieldsDescription:Xo}}p();u();d();l();function Tv(e){return e.addReducers({pipeline:fr}),{setPipeline:dr}}p();u();d();l();function Fv(e){return e.addReducers({searchHub:Rr}),{setSearchHub:xr}}p();u();d();l();function kv(e){return e.addReducers({debug:io}),{disableDebug:no,enableDebug:ro}}p();u();d();l();function Ov(e){return e.addReducers({recommendation:wr}),{getRecommendations:Ct,setRecommendationId:Ar}}p();u();d();l();function Dv(e){return e.addReducers({}),{logRecommendationOpen:To}}p();u();d();l();p();u();d();l();p();u();d();l();var _r=k("breadcrumb/deselectAll"),ti=k("breadcrumb/deselectAllNonBreadcrumbs");p();u();d();l();p();u();d();l();var An={value:K,numberOfResults:new Y({min:0}),state:K};p();u();d();l();var ie=K;var _v=new Y({min:1,default:8,required:!1}),Vv=new Y({min:1,max:20,default:5,required:!1}),Lv={desiredCount:Vv,numberOfValues:_v},JB=k("automaticFacet/setOptions",e=>U(e,Lv)),XB=k("automaticFacet/deselectAll",e=>U(e,ie)),jv=K,Wd=k("automaticFacet/toggleSelectValue",e=>U(e,{field:jv,selection:new G({values:An})}));p();u();d();l();p();u();d();l();var Uv={state:new ue({required:!0}),numberOfResults:new Y({required:!0,min:0}),value:new B({required:!0,emptyAllowed:!0}),path:new ee({required:!0,each:K}),moreValuesAvailable:new Z({required:!1})};function vs(e){e.children.forEach(t=>{vs(t)}),_e({state:e.state,numberOfResults:e.numberOfResults,value:e.value,path:e.path,moreValuesAvailable:e.moreValuesAvailable},Uv)}var Vr={facetId:ie,field:K,tabs:new G({options:{required:!1},values:{included:new ee({each:new B}),excluded:new ee({each:new B})}}),activeTab:new B({required:!1}),delimitingCharacter:new B({required:!1,emptyAllowed:!0}),filterFacetCount:new Z({required:!1}),injectionDepth:new Y({required:!1,min:0}),numberOfValues:new Y({required:!1,min:1}),sortCriteria:new ue({required:!1}),basePath:new ee({required:!1,each:K}),filterByBasePath:new Z({required:!1})};var h1=k("categoryFacet/register",e=>U(e,Vr)),Gd=k("categoryFacet/toggleSelectValue",e=>{try{return _e(e.facetId,K),vs(e.selection),{payload:e,error:null}}catch(t){return{payload:e,error:ot(t)}}}),Kd=k("categoryFacet/deselectAll",e=>U(e,Vr.facetId)),y1=k("categoryFacet/updateNumberOfValues",e=>U(e,{facetId:Vr.facetId,numberOfValues:Vr.numberOfValues})),S1=k("categoryFacet/updateSortCriterion",e=>U(e,{facetId:Vr.facetId,criterion:new ue})),v1=k("categoryFacet/updateBasePath",e=>U(e,{facetId:Vr.facetId,basePath:new ee({each:K})}));p();u();d();l();p();u();d();l();var wn={facetId:ie,captions:new G({options:{required:!1}}),numberOfValues:new Y({required:!1,min:1}),query:new B({required:!1,emptyAllowed:!0})};var Bv={path:new ee({required:!0,each:K}),displayValue:Ce,rawValue:Ce,count:new Y({required:!0,min:0})},Yd=k("categoryFacet/selectSearchResult",e=>U(e,{facetId:ie,value:new G({values:Bv})})),_1=k("categoryFacetSearch/register",e=>U(e,wn));p();u();d();l();var Jd={facetId:ie,value:new G({values:{displayValue:Ce,rawValue:Ce,count:new Y({required:!0,min:0})}})},G1=k("facetSearch/register",e=>U(e,wn)),K1=k("facetSearch/update",e=>U(e,wn)),Xd=k("facetSearch/toggleSelectValue",e=>U(e,Jd)),Zd=k("facetSearch/toggleExcludeValue",e=>U(e,Jd));p();u();d();l();p();u();d();l();function tp(e){let t=ep(e.start,e),r=ep(e.end,e),n=e.endInclusive??!1,o=e.state??"idle";return{start:t,end:r,endInclusive:n,state:o}}function ep(e,t){let{dateFormat:r}=t;return xl(e)?(Ha(e),bl(e)):typeof e=="string"&&bt(e)?(Ha(e),e):(yl(e,r),Do(Pr(e,r)))}p();u();d();l();p();u();d();l();var pQ=new B({regex:/^[a-zA-Z0-9-_]+$/}),fQ=new B({required:!0}),mQ=new ee({each:new B}),gQ=new B,hQ=new Z,yQ=new Z,SQ=new Y({min:0}),Qv=new Y({min:1}),vQ=new Z({required:!0}),$v=new G,Hv=new B,zv={captions:$v,numberOfValues:Qv,query:Hv},CQ=new G({values:zv}),rp=new G({options:{required:!1},values:{type:new B({constrainTo:["simple"],emptyAllowed:!1,required:!0}),values:new ee({required:!0,max:25,each:new B({emptyAllowed:!1,required:!0})})}}),bQ=new Z,np=new ee({min:1,max:25,required:!1,each:new B({emptyAllowed:!1,required:!0})});var Wv={facetId:ie,field:new B({required:!0,emptyAllowed:!0}),tabs:new G({options:{required:!1},values:{included:new ee({each:new B}),excluded:new ee({each:new B})}}),activeTab:new B({required:!1}),filterFacetCount:new Z({required:!1}),injectionDepth:new Y({required:!1,min:0}),numberOfValues:new Y({required:!1,min:1}),sortCriteria:new ue({required:!1}),resultsMustMatch:new ue({required:!1}),allowedValues:rp,customSort:np},DQ=k("facet/register",e=>U(e,Wv)),op=k("facet/toggleSelectValue",e=>U(e,{facetId:ie,selection:new G({values:An})})),ip=k("facet/toggleExcludeValue",e=>U(e,{facetId:ie,selection:new G({values:An})})),ri=k("facet/deselectAll",e=>U(e,ie)),MQ=k("facet/updateSortCriterion",e=>U(e,{facetId:ie,criterion:new ue({required:!0})})),qQ=k("facet/updateNumberOfValues",e=>U(e,{facetId:ie,numberOfValues:new Y({required:!0,min:1})})),NQ=k("facet/updateIsFieldExpanded",e=>U(e,{facetId:ie,isFieldExpanded:new Z({required:!0})})),_Q=k("facet/updateFreezeCurrentValues",e=>U(e,{facetId:ie,freezeCurrentValues:new Z({required:!0})}));p();u();d();l();var ap=k("rangeFacet/updateSortCriterion",e=>U(e,{facetId:ie,criterion:new ue({required:!0})}));p();u();d();l();var ni={state:K,start:new Y({required:!0}),end:new Y({required:!0}),endInclusive:new Z({required:!0}),numberOfResults:new Y({required:!0,min:0})},oi={start:K,end:K,endInclusive:new Z({required:!0}),state:K,numberOfResults:new Y({required:!0,min:0})};var Gv={start:K,end:K,endInclusive:new Z({required:!0}),state:K},Kv={facetId:ie,field:K,tabs:new G({options:{required:!1},values:{included:new ee({each:new B}),excluded:new ee({each:new B})}}),activeTab:new B({required:!1}),currentValues:new ee({required:!1,each:new G({values:Gv})}),generateAutomaticRanges:new Z({required:!0}),filterFacetCount:new Z({required:!1}),injectionDepth:new Y({required:!1,min:0}),numberOfValues:new Y({required:!1,min:1}),sortCriteria:new ue({required:!1}),rangeAlgorithm:new ue({required:!1})};function sp(e){return bt(e)?yn(e):e}function cp(e){e.currentValues&&e.currentValues.forEach(t=>{let{start:r,end:n}=tp(t);if(Pr(sp(r)).isAfter(Pr(sp(n))))throw new Error(`The start value is greater than the end value for the date range ${t.start} to ${t.end}`)})}var h$=k("dateFacet/register",e=>{try{return _e(e,Kv),cp(e),{payload:e,error:null}}catch(t){return{payload:e,error:ot(t)}}}),up=k("dateFacet/toggleSelectValue",e=>U(e,{facetId:ie,selection:new G({values:oi})})),lp=k("dateFacet/toggleExcludeValue",e=>U(e,{facetId:ie,selection:new G({values:oi})})),dp=k("dateFacet/updateFacetValues",e=>{try{return _e(e,{facetId:ie,values:new ee({each:new G({values:oi})})}),cp({currentValues:e.values}),{payload:e,error:null}}catch(t){return{payload:e,error:ot(t)}}});p();u();d();l();var Yv={state:K,start:new Y({required:!0}),end:new Y({required:!0}),endInclusive:new Z({required:!0})},Jv={facetId:ie,field:K,tabs:new G({options:{required:!1},values:{included:new ee({each:new B}),excluded:new ee({each:new B})}}),activeTab:new B({required:!1}),currentValues:new ee({required:!1,each:new G({values:Yv})}),generateAutomaticRanges:new Z({required:!0}),filterFacetCount:new Z({required:!1}),injectionDepth:new Y({required:!1,min:0}),numberOfValues:new Y({required:!1,min:1}),sortCriteria:new ue({required:!1}),rangeAlgorithm:new ue({required:!1})};function pp(e){e.currentValues&&e.currentValues.forEach(({start:t,end:r})=>{if(t>r)throw new Error(`The start value is greater than the end value for the numeric range ${t} to ${r}`)})}var T$=k("numericFacet/register",e=>{try{return U(e,Jv),pp(e),{payload:e,error:null}}catch(t){return{payload:e,error:ot(t)}}}),fp=k("numericFacet/toggleSelectValue",e=>U(e,{facetId:ie,selection:new G({values:ni})})),mp=k("numericFacet/toggleExcludeValue",e=>U(e,{facetId:ie,selection:new G({values:ni})})),gp=k("numericFacet/updateFacetValues",e=>{try{return _e(e,{facetId:ie,values:new ee({each:new G({values:ni})})}),pp({currentValues:e.values}),{payload:e,error:null}}catch(t){return{payload:e,error:ot(t)}}});p();u();d();l();p();u();d();l();var ii=k("facet/updateFacetAutoSelection",e=>U(e,{allow:new Z({required:!0})}));p();u();d();l();p();u();d();l();var ai=class extends vt{constructor(r){super(r);this.getState=r}get activeInstantResultQuery(){let r=this.getState().instantResults;for(let n in r)for(let o in r[n].cache)if(r[n].cache[o].isActive)return r[n].q;return null}get activeInstantResultCache(){let r=this.getState().instantResults;for(let n in r)for(let o in r[n].cache)if(r[n].cache[o].isActive)return r[n].cache[o];return null}get results(){return this.activeInstantResultCache?.results}get queryText(){return this.activeInstantResultQuery??Me().q}get responseTime(){return this.activeInstantResultCache?.duration??$e().duration}get numberOfResults(){return this.activeInstantResultCache?.totalCountFiltered??$e().response.totalCountFiltered}getSearchUID(){return this.activeInstantResultCache?.searchUid||super.getSearchUID()}};var hp=()=>ke("analytics/instantResult/searchboxAsYouType",e=>e.makeSearchboxAsYouType(),e=>new ai(e)),yp=()=>({actionCause:"searchboxAsYouType"});p();u();d();l();var Cs={id:K},Xv={...Cs,q:Ce},dH=k("instantResults/register",e=>U(e,Cs)),si=k("instantResults/updateQuery",e=>U(e,Xv)),pH=k("instantResults/clearExpired",e=>U(e,Cs));p();u();d();l();var ci=new Y({required:!0,min:0}),ui=k("pagination/registerNumberOfResults",e=>U(e,ci)),li=k("pagination/updateNumberOfResults",e=>U(e,ci)),di=k("pagination/registerPage",e=>U(e,ci)),Tt=k("pagination/updatePage",e=>U(e,ci)),pi=k("pagination/nextPage"),fi=k("pagination/previousPage");p();u();d();l();var Ft=k("query/updateQuery",e=>U(e,{q:new B,enableQuerySyntax:new Z}));p();u();d();l();p();u();d();l();var bs=()=>ke("search/logFetchMoreResults",e=>e.makeFetchMoreResults()),kt=e=>ke("search/queryError",(t,r)=>t.makeQueryError({query:r.query?.q||Me().q,aq:r.advancedSearchQueries?.aq||It().aq,cq:r.advancedSearchQueries?.cq||It().cq,dq:r.advancedSearchQueries?.dq||It().dq,errorType:e.type,errorMessage:e.message}));p();u();d();l();p();u();d();l();var zH=k("didYouMean/enable"),WH=k("didYouMean/disable"),GH=k("didYouMean/automaticCorrections/disable"),KH=k("didYouMean/automaticCorrections/enable"),mi=k("didYouMean/correction",e=>U(e,K)),YH=k("didYouMean/automaticCorrections/mode",e=>U(e,new B({constrainTo:["next","legacy"],emptyAllowed:!1,required:!0})));p();u();d();l();var As=()=>ke("analytics/didyoumean/automatic",e=>e.makeDidYouMeanAutomatic());var Sp=()=>({actionCause:"didYouMeanAutomatic"});p();u();d();l();p();u();d();l();function vp(){return{freezeFacetOrder:!1,facets:{}}}p();u();d();l();function Cp(){return[]}p();u();d();l();function xn(){return{firstResult:0,defaultNumberOfResults:10,numberOfResults:10,totalCountFiltered:0}}p();u();d();l();function bp(){return{}}p();u();d();l();function Ap(){return{}}p();u();d();l();function wp(){return{}}function Xe(e){return{context:e.context||zo(),dictionaryFieldContext:e.dictionaryFieldContext||Go(),facetSet:e.facetSet||xo(),numericFacetSet:e.numericFacetSet||wo(),dateFacetSet:e.dateFacetSet||Ao(),categoryFacetSet:e.categoryFacetSet||bo(),automaticFacetSet:e.automaticFacetSet??Co(),pagination:e.pagination||xn(),query:e.query||Me(),tabSet:e.tabSet||wp(),advancedSearchQueries:e.advancedSearchQueries||It(),staticFilterSet:e.staticFilterSet||Ap(),querySet:e.querySet||bp(),sortCriteria:e.sortCriteria||Ro(),pipeline:e.pipeline||pr(),searchHub:e.searchHub||St(),facetOptions:e.facetOptions||vp(),facetOrder:e.facetOrder??Cp(),debug:e.debug??oo()}}p();u();d();l();var mW=new G({values:{undoneQuery:Ce},options:{required:!0}}),xp=()=>ke("analytics/trigger/query",(e,t)=>t.triggers?.queryModification.newQuery?e.makeTriggerQuery():null);p();u();d();l();var gi=k("trigger/query/ignore",e=>U(e,new B({emptyAllowed:!0,required:!0}))),hi=k("trigger/query/modification",e=>U(e,new G({values:{originalQuery:me,modification:me}})));p();u();d();l();var Ot=/*#__PURE__*/function(){var _ref30=_asyncToGenerator(function*(e,t){let r=tC(e),n=qo(e),o=Zv(e),i=yield Pt(e,t),a=()=>e.pagination?e.pagination.firstResult+e.pagination.numberOfResults>5e3?5e3-e.pagination.firstResult:e.pagination.numberOfResults:void 0;return At({...i,...(e.didYouMean&&{queryCorrection:{enabled:e.didYouMean.enableDidYouMean&&e.didYouMean.queryCorrectionMode==="next",options:{automaticallyCorrect:e.didYouMean.automaticallyCorrectQuery?"whenNoResults":"never"}},enableDidYouMean:e.didYouMean.enableDidYouMean&&e.didYouMean.queryCorrectionMode==="legacy"}),...(r&&{cq:r}),...(n.length&&{facets:n}),...(e.pagination&&{numberOfResults:a(),firstResult:e.pagination.firstResult}),...(e.facetOptions&&{facetOptions:{freezeFacetOrder:e.facetOptions.freezeFacetOrder}}),...(e.folding?.enabled&&{filterField:e.folding.fields.collection,childField:e.folding.fields.parent,parentField:e.folding.fields.child,filterFieldRange:e.folding.filterFieldRange}),...(e.automaticFacetSet&&{generateAutomaticFacets:{desiredCount:e.automaticFacetSet.desiredCount,numberOfValues:e.automaticFacetSet.numberOfValues,currentFacets:o}}),...(e.generatedAnswer&&{pipelineRuleParameters:{mlGenerativeQuestionAnswering:{responseFormat:e.generatedAnswer.responseFormat,citationsFieldToInclude:e.generatedAnswer.fieldsToIncludeInCitations}}})})});return function Ot(_x61,_x62){return _ref30.apply(this,arguments)}}();function Zv(e){let t=e.automaticFacetSet?.set;return t?Object.values(t).map(r=>r.response).map(eC).filter(r=>r.currentValues.length>0):void 0}function eC(e){let{field:t,label:r,values:n}=e,o=n.filter(i=>i.state==="selected");return{field:t,label:r,currentValues:o}}function tC(e){let t=e.advancedSearchQueries?.cq.trim()||"",n=Object.values(e.tabSet||{}).find(i=>i.isActive)?.expression.trim()||"",o=rC(e);return[t,n,...o].filter(i=>!!i).join(" AND ")}function rC(e){return Object.values(e.staticFilterSet||{}).map(r=>{let n=r.values.filter(i=>i.state==="selected"&&!!i.expression.trim()),o=n.map(i=>i.expression).join(" OR ");return n.length>1?`(${o})`:o})}var Dt=class{constructor(t,r=n=>{this.dispatch(Ft({q:n}))}){this.config=t;this.onUpdateQueryForCorrection=r}fetchFromAPI({mappings:t,request:r},n){var _this9=this;return _asyncToGenerator(function*(){let o=new Date().getTime(),i=Mo(yield _this9.extra.apiClient.search(r,n),t),a=new Date().getTime()-o,m=_this9.getState().query?.q||"";return{response:i,duration:a,queryExecuted:m,requestExecuted:r}})()}process(t){var _this10=this;return _asyncToGenerator(function*(){return _this10.processQueryErrorOrContinue(t)??(yield _this10.processQueryCorrectionsOrContinue(t))??(yield _this10.processQueryTriggersOrContinue(t))??_this10.processSuccessResponse(t)})()}processQueryErrorOrContinue(t){return Ie(t.response)?(this.dispatch(kt(t.response.error)),this.rejectWithValue(t.response.error)):null}processQueryCorrectionsOrContinue(t){var _this11=this;return _asyncToGenerator(function*(){let r=_this11.getState(),n=_this11.getSuccessResponse(t);if(!n||!r.didYouMean)return null;let{enableDidYouMean:o,automaticallyCorrectQuery:i}=r.didYouMean,{results:a,queryCorrections:m,queryCorrection:f}=n;if(!o||!i)return null;let s=a.length===0&&m&&m.length!==0,h=!J(f)&&!J(f.correctedQuery);if(!s&&!h)return null;let y=s?yield _this11.processLegacyDidYouMeanAutoCorrection(t):_this11.processModernDidYouMeanAutoCorrection(t);return _this11.dispatch(Ke(Xe(_this11.getState()))),y})()}processLegacyDidYouMeanAutoCorrection(t){var _this12=this;return _asyncToGenerator(function*(){let r=_this12.getCurrentQuery(),n=_this12.getSuccessResponse(t);if(!n.queryCorrections)return null;let{correctedQuery:o}=n.queryCorrections[0],i=yield _this12.automaticallyRetryQueryWithCorrection(o);return Ie(i.response)?(_this12.dispatch(kt(i.response.error)),_this12.rejectWithValue(i.response.error)):(_this12.logOriginalAnalyticsQueryBeforeAutoCorrection(t),_this12.dispatch(Ke(Xe(_this12.getState()))),{...i,response:{...i.response.success,queryCorrections:n.queryCorrections},automaticallyCorrected:!0,originalQuery:r,analyticsAction:As()})})()}processModernDidYouMeanAutoCorrection(t){let r=this.getSuccessResponse(t),{correctedQuery:n,originalQuery:o}=r.queryCorrection;return this.onUpdateQueryForCorrection(n),{...t,response:{...r},queryExecuted:n,automaticallyCorrected:!0,originalQuery:o,analyticsAction:As()}}logOriginalAnalyticsQueryBeforeAutoCorrection(t){let r=this.getState(),n=this.getSuccessResponse(t);this.analyticsAction&&this.analyticsAction()(this.dispatch,()=>this.getStateAfterResponse(t.queryExecuted,t.duration,r,n),this.extra)}processQueryTriggersOrContinue(t){var _this13=this;return _asyncToGenerator(function*(){let r=_this13.getSuccessResponse(t);if(!r)return null;let n=r.triggers.find(m=>m.type==="query")?.content||"";if(!n)return null;if(_this13.getState().triggers?.queryModification.queryToIgnore===n)return _this13.dispatch(gi("")),null;_this13.analyticsAction&&(yield _this13.dispatch(_this13.analyticsAction));let i=_this13.getCurrentQuery(),a=yield _this13.automaticallyRetryQueryWithTriggerModification(n);return Ie(a.response)?(_this13.dispatch(kt(a.response.error)),_this13.rejectWithValue(a.response.error)):(_this13.dispatch(Ke(Xe(_this13.getState()))),{...a,response:{...a.response.success},automaticallyCorrected:!1,originalQuery:i,analyticsAction:xp()})})()}getStateAfterResponse(t,r,n,o){return{...n,query:{q:t,enableQuerySyntax:n.query?.enableQuerySyntax??Me().enableQuerySyntax},search:{...$e(),duration:r,response:o,results:o.results}}}processSuccessResponse(t){return this.dispatch(Ke(Xe(this.getState()))),{...t,response:this.getSuccessResponse(t),automaticallyCorrected:!1,originalQuery:this.getCurrentQuery(),analyticsAction:this.analyticsAction}}getSuccessResponse(t){return Ln(t.response)?t.response.success:null}automaticallyRetryQueryWithCorrection(t){var _this14=this;return _asyncToGenerator(function*(){_this14.onUpdateQueryForCorrection(t);let r=yield _this14.fetchFromAPI(yield Ot(_this14.getState()),{origin:"mainSearch"});return _this14.dispatch(mi(t)),r})()}automaticallyRetryQueryWithTriggerModification(t){var _this15=this;return _asyncToGenerator(function*(){return _this15.dispatch(hi({newQuery:t,originalQuery:_this15.getCurrentQuery()})),_this15.onUpdateQueryForCorrection(t),yield _this15.fetchFromAPI(yield Ot(_this15.getState()),{origin:"mainSearch"})})()}getCurrentQuery(){let t=this.getState();return t.query?.q!==void 0?t.query.q:""}get extra(){return this.config.extra}getState(){return this.config.getState()}get dispatch(){return this.config.dispatch}get analyticsAction(){return this.config.analyticsAction}get rejectWithValue(){return this.config.rejectWithValue}};var E2=oe("search/prepareForSearchWithQuery",(e,t)=>{let{dispatch:r}=t;U(e,{q:new B,enableQuerySyntax:new Z,clearFilters:new Z}),e.clearFilters&&(r(_r()),r(ti())),r(ii({allow:!0})),r(Ft({q:e.q,enableQuerySyntax:e.enableQuerySyntax})),r(Tt(1))}),I2=oe("search/executeSearch",/*#__PURE__*/function(){var _ref31=_asyncToGenerator(function*(e,t){let r=t.getState();return yield yi(r,t,e)});return function(_x63,_x64){return _ref31.apply(this,arguments)}}()),P2=oe("search/fetchPage",/*#__PURE__*/function(){var _ref32=_asyncToGenerator(function*(e,t){let r=t.getState();return yield xs(r,t,e)});return function(_x65,_x66){return _ref32.apply(this,arguments)}}()),T2=oe("search/fetchMoreResults",/*#__PURE__*/function(){var _ref33=_asyncToGenerator(function*(e,t){let r=t.getState();return yield Rs(t,r)});return function(_x67,_x68){return _ref33.apply(this,arguments)}}()),F2=oe("search/fetchFacetValues",/*#__PURE__*/function(){var _ref34=_asyncToGenerator(function*(e,t){let r=t.getState();return yield aC(t,e,r)});return function(_x69,_x70){return _ref34.apply(this,arguments)}}()),k2=oe("search/fetchInstantResults",/*#__PURE__*/function(){var _ref35=_asyncToGenerator(function*(e,t){return ws(e,t)});return function(_x71,_x72){return _ref35.apply(this,arguments)}}()),nC=/*#__PURE__*/function(){var _ref36=_asyncToGenerator(function*(e,t){let r=yield Ot(e,t);return r.request={...r.request,firstResult:(e.pagination?.firstResult??0)+(e.search?.results.length??0)},r});return function nC(_x73,_x74){return _ref36.apply(this,arguments)}}(),oC=/*#__PURE__*/function(){var _ref37=_asyncToGenerator(function*(e,t,r){let n=yield Pt(e);return At({...n,...(e.didYouMean&&{enableDidYouMean:e.didYouMean.enableDidYouMean}),numberOfResults:r,q:t})});return function oC(_x75,_x76,_x77){return _ref37.apply(this,arguments)}}(),iC=/*#__PURE__*/function(){var _ref38=_asyncToGenerator(function*(e,t){let r=yield Ot(e,t);return r.request.numberOfResults=0,r});return function iC(_x78,_x79){return _ref38.apply(this,arguments)}}(),Rp=e=>{e.configuration.analytics.enabled&&Ye.addElement({name:"Query",...(e.query?.q&&{value:e.query.q}),time:JSON.stringify(new Date)})};function ws(_x80,_x81){return _ws.apply(this,arguments)}function _ws(){_ws=_asyncToGenerator(function*(e,t){U(e,{id:K,q:K,maxResultsPerQuery:new Y({required:!0,min:1}),cacheTimeout:new Y});let{q:r,maxResultsPerQuery:n}=e,o=t.getState(),i=new Dt({...t,analyticsAction:hp()},s=>{t.dispatch(si({q:s,id:e.id}))}),a=yield oC(o,r,n),m=yield i.fetchFromAPI(a,{origin:"instantResults",disableAbortWarning:!0}),f=yield i.process(m);return"response"in f?{results:f.response.results,searchUid:f.response.searchUid,analyticsAction:f.analyticsAction,totalCountFiltered:f.response.totalCountFiltered,duration:f.duration}:f});return _ws.apply(this,arguments)}function xs(_x82,_x83,_x84){return _xs.apply(this,arguments)}function _xs(){_xs=_asyncToGenerator(function*(e,t,r){Rp(e);let{analyticsClientMiddleware:n,preprocessRequest:o,logger:i}=t.extra,{description:a}=yield r.prepare({getState:()=>t.getState(),analyticsClientMiddleware:n,preprocessRequest:o,logger:i}),m=new Dt({...t,analyticsAction:r}),f=yield Ot(e,a),s=yield m.fetchFromAPI(f,{origin:"mainSearch"});return yield m.process(s)});return _xs.apply(this,arguments)}function Rs(_x85,_x86){return _Rs.apply(this,arguments)}function _Rs(){_Rs=_asyncToGenerator(function*(e,t){let{analyticsClientMiddleware:r,preprocessRequest:n,logger:o}=e.extra,{description:i}=yield bs().prepare({getState:()=>e.getState(),analyticsClientMiddleware:r,preprocessRequest:n,logger:o}),a=new Dt({...e,analyticsAction:bs()}),m=yield nC(t,i),f=yield a.fetchFromAPI(m,{origin:"mainSearch"});return yield a.process(f)});return _Rs.apply(this,arguments)}function aC(_x87,_x88,_x89){return _aC.apply(this,arguments)}function _aC(){_aC=_asyncToGenerator(function*(e,t,r){let{analyticsClientMiddleware:n,preprocessRequest:o,logger:i}=e.extra,{description:a}=yield t.prepare({getState:()=>e.getState(),analyticsClientMiddleware:n,preprocessRequest:o,logger:i}),m=new Dt({...e,analyticsAction:t}),f=yield iC(r,a),s=yield m.fetchFromAPI(f,{origin:"facetValues"});return yield m.process(s)});return _aC.apply(this,arguments)}function yi(_x90,_x91,_x92){return _yi.apply(this,arguments)}function _yi(){_yi=_asyncToGenerator(function*(e,t,r){Rp(e);let{analyticsClientMiddleware:n,preprocessRequest:o,logger:i}=t.extra,{description:a}=yield r.prepare({getState:()=>t.getState(),analyticsClientMiddleware:n,preprocessRequest:o,logger:i}),m=yield Ot(e,a),f=new Dt({...t,analyticsAction:r}),s=yield f.fetchFromAPI(m,{origin:"mainSearch"});return yield f.process(s)});return _yi.apply(this,arguments)}p();u();d();l();p();u();d();l();var Mt=/*#__PURE__*/function(){var _ref39=_asyncToGenerator(function*(e,t,r){let n=fC(e),o=sC(e),i=cC(e),a=e.configuration.analytics.analyticsMode==="legacy"?yield Pt(e,r):qr(e,t,r),m=()=>e.pagination?e.pagination.firstResult+e.pagination.numberOfResults>5e3?5e3-e.pagination.firstResult:e.pagination.numberOfResults:void 0;return At({...a,...(e.didYouMean&&{queryCorrection:{enabled:e.didYouMean.enableDidYouMean&&e.didYouMean.queryCorrectionMode==="next",options:{automaticallyCorrect:e.didYouMean.automaticallyCorrectQuery?"whenNoResults":"never"}},enableDidYouMean:e.didYouMean.enableDidYouMean&&e.didYouMean.queryCorrectionMode==="legacy"}),...(n&&{cq:n}),...(o.length&&{facets:o}),...(e.pagination&&{numberOfResults:m(),firstResult:e.pagination.firstResult}),...(e.facetOptions&&{facetOptions:{freezeFacetOrder:e.facetOptions.freezeFacetOrder}}),...(e.folding?.enabled&&{filterField:e.folding.fields.collection,childField:e.folding.fields.parent,parentField:e.folding.fields.child,filterFieldRange:e.folding.filterFieldRange}),...(e.automaticFacetSet&&{generateAutomaticFacets:{desiredCount:e.automaticFacetSet.desiredCount,numberOfValues:e.automaticFacetSet.numberOfValues,currentFacets:i}}),...(e.generatedAnswer&&{pipelineRuleParameters:{mlGenerativeQuestionAnswering:{responseFormat:e.generatedAnswer.responseFormat,citationsFieldToInclude:e.generatedAnswer.fieldsToIncludeInCitations}}})})});return function Mt(_x93,_x94,_x95){return _ref39.apply(this,arguments)}}();function sC(e){return Ga(lC(e),e.facetOrder??[])}function cC(e){let t=e.automaticFacetSet?.set;return t?Object.values(t).map(r=>r.response).map(uC).filter(r=>r.currentValues.length>0):void 0}function uC(e){let{field:t,label:r,values:n}=e,o=n.filter(i=>i.state==="selected");return{field:t,label:r,currentValues:o}}function lC(e){return dC(e).filter(({facetId:t})=>e.facetOptions?.facets[t]?.enabled??!0)}function dC(e){return[...pC(e.facetSet??{}),...Ep(e.numericFacetSet??{}),...Ep(e.dateFacetSet??{}),...wt(e.categoryFacetSet??{})]}function pC(e){return wt(e).map(t=>{let r=Ka[t.sortCriteria];return r?{...t,sortCriteria:r}:t})}function Ep(e){return wt(e).map(t=>{let n=t.currentValues.some(({state:o})=>o!=="idle");return t.generateAutomaticRanges&&!n?{...t,currentValues:[]}:t})}function fC(e){let t=e.advancedSearchQueries?.cq.trim()||"",n=Object.values(e.tabSet||{}).find(i=>i.isActive)?.expression.trim()||"",o=mC(e);return[t,n,...o].filter(i=>!!i).join(" AND ")}function mC(e){return Object.values(e.staticFilterSet||{}).map(r=>{let n=r.values.filter(i=>i.state==="selected"&&!!i.expression.trim()),o=n.map(i=>i.expression).join(" OR ");return n.length>1?`(${o})`:o})}var qt=class{constructor(t,r=n=>{this.dispatch(Ft({q:n}))}){this.config=t;this.onUpdateQueryForCorrection=r}fetchFromAPI({mappings:t,request:r},n){var _this16=this;return _asyncToGenerator(function*(){let o=new Date().getTime(),i=Mo(yield _this16.extra.apiClient.search(r,n),t),a=new Date().getTime()-o,m=_this16.getState().query?.q||"";return{response:i,duration:a,queryExecuted:m,requestExecuted:r}})()}process(t){var _this17=this;return _asyncToGenerator(function*(){return _this17.processQueryErrorOrContinue(t)??(yield _this17.processQueryCorrectionsOrContinue(t))??(yield _this17.processQueryTriggersOrContinue(t))??_this17.processSuccessResponse(t)})()}processQueryErrorOrContinue(t){return Ie(t.response)?(this.dispatch(kt(t.response.error)),this.rejectWithValue(t.response.error)):null}processQueryCorrectionsOrContinue(t){var _this18=this;return _asyncToGenerator(function*(){let r=_this18.getState(),n=_this18.getSuccessResponse(t);if(!n||!r.didYouMean)return null;let{enableDidYouMean:o,automaticallyCorrectQuery:i}=r.didYouMean,{results:a,queryCorrections:m,queryCorrection:f}=n;if(!o||!i)return null;let s=a.length===0&&m&&m.length!==0,h=!J(f)&&!J(f.correctedQuery);if(!s&&!h)return null;let y=s?yield _this18.processLegacyDidYouMeanAutoCorrection(t):_this18.processModernDidYouMeanAutoCorrection(t);return _this18.dispatch(Ke(Xe(_this18.getState()))),y})()}processLegacyDidYouMeanAutoCorrection(t){var _this19=this;return _asyncToGenerator(function*(){let r=_this19.getCurrentQuery(),n=_this19.getSuccessResponse(t);if(!n.queryCorrections)return null;let{correctedQuery:o}=n.queryCorrections[0],i=yield _this19.automaticallyRetryQueryWithCorrection(o);return Ie(i.response)?(_this19.dispatch(kt(i.response.error)),_this19.rejectWithValue(i.response.error)):(_this19.dispatch(Ke(Xe(_this19.getState()))),{...i,response:{...i.response.success,queryCorrections:n.queryCorrections},automaticallyCorrected:!0,originalQuery:r})})()}processModernDidYouMeanAutoCorrection(t){let r=this.getSuccessResponse(t),{correctedQuery:n,originalQuery:o}=r.queryCorrection;return this.onUpdateQueryForCorrection(n),{...t,response:{...r},queryExecuted:n,automaticallyCorrected:!0,originalQuery:o}}processQueryTriggersOrContinue(t){var _this20=this;return _asyncToGenerator(function*(){let r=_this20.getSuccessResponse(t);if(!r)return null;let n=r.triggers.find(m=>m.type==="query")?.content||"";if(!n)return null;if(_this20.getState().triggers?.queryModification.queryToIgnore===n)return _this20.dispatch(gi("")),null;let i=_this20.getCurrentQuery(),a=yield _this20.automaticallyRetryQueryWithTriggerModification(n);return Ie(a.response)?(_this20.dispatch(kt(a.response.error)),_this20.rejectWithValue(a.response.error)):(_this20.dispatch(Ke(Xe(_this20.getState()))),{...a,response:{...a.response.success},automaticallyCorrected:!1,originalQuery:i})})()}processSuccessResponse(t){return this.dispatch(Ke(Xe(this.getState()))),{...t,response:this.getSuccessResponse(t),automaticallyCorrected:!1,originalQuery:this.getCurrentQuery()}}getSuccessResponse(t){return Ln(t.response)?t.response.success:null}automaticallyRetryQueryWithCorrection(t){var _this21=this;return _asyncToGenerator(function*(){_this21.onUpdateQueryForCorrection(t);let r=_this21.getState(),{actionCause:n}=Sp(),o=yield _this21.fetchFromAPI(yield Mt(r,_this21.extra.navigatorContext,{actionCause:n}),{origin:"mainSearch"});return _this21.dispatch(mi(t)),o})()}automaticallyRetryQueryWithTriggerModification(t){var _this22=this;return _asyncToGenerator(function*(){return _this22.dispatch(hi({newQuery:t,originalQuery:_this22.getCurrentQuery()})),_this22.onUpdateQueryForCorrection(t),yield _this22.fetchFromAPI(yield Mt(_this22.getState(),_this22.extra.navigatorContext),{origin:"mainSearch"})})()}getCurrentQuery(){let t=this.getState();return t.query?.q!==void 0?t.query.q:""}get extra(){return this.config.extra}getState(){return this.config.getState()}get dispatch(){return this.config.dispatch}get rejectWithValue(){return this.config.rejectWithValue}};var _G=oe("search/prepareForSearchWithQuery",(e,t)=>{let{dispatch:r}=t;U(e,{q:new B,enableQuerySyntax:new Z,clearFilters:new Z}),e.clearFilters&&(r(_r()),r(ti())),r(ii({allow:!0})),r(Ft({q:e.q,enableQuerySyntax:e.enableQuerySyntax})),r(Tt(1))}),Ip=oe("search/executeSearch",/*#__PURE__*/function(){var _ref40=_asyncToGenerator(function*(e,t){let r=t.getState();if(r.configuration.analytics.analyticsMode==="legacy")return yi(r,t,e.legacy);Pp(r);let n=e.next?Tp(e.next):void 0,o=yield Mt(r,t.extra.navigatorContext,n),i=new qt({...t,analyticsAction:n??{}}),a=yield i.fetchFromAPI(o,{origin:"mainSearch"});return yield i.process(a)});return function(_x96,_x97){return _ref40.apply(this,arguments)}}()),VG=oe("search/fetchPage",/*#__PURE__*/function(){var _ref41=_asyncToGenerator(function*(e,t){let r=t.getState();if(Pp(r),r.configuration.analytics.analyticsMode==="legacy"||!e.next)return xs(r,t,e.legacy);let n=new qt({...t,analyticsAction:e.next}),o=yield Mt(r,t.extra.navigatorContext,e.next),i=yield n.fetchFromAPI(o,{origin:"mainSearch"});return yield n.process(i)});return function(_x98,_x99){return _ref41.apply(this,arguments)}}()),LG=oe("search/fetchMoreResults",/*#__PURE__*/function(){var _ref42=_asyncToGenerator(function*(e,t){let r=t.getState();if(r.configuration.analytics.analyticsMode==="legacy")return Rs(t,r);let n=Gu("browseResults",t.getState),o=new qt({...t,analyticsAction:n}),i=yield gC(r,t.extra.navigatorContext,n),a=yield o.fetchFromAPI(i,{origin:"mainSearch"});return yield o.process(a)});return function(_x100,_x101){return _ref42.apply(this,arguments)}}()),jG=oe("search/fetchFacetValues",/*#__PURE__*/function(){var _ref43=_asyncToGenerator(function*(e,t){let r=t.getState();if(r.configuration.analytics.analyticsMode==="legacy")return yi(r,t,e.legacy);let n=new qt({...t,analyticsAction:{}}),o=yield yC(r,t.extra.navigatorContext),i=yield n.fetchFromAPI(o,{origin:"facetValues"});return yield n.process(i)});return function(_x102,_x103){return _ref43.apply(this,arguments)}}()),UG=oe("search/fetchInstantResults",/*#__PURE__*/function(){var _ref44=_asyncToGenerator(function*(e,t){let r=t.getState();if(r.configuration.analytics.analyticsMode==="legacy")return ws(e,t);U(e,{id:K,q:K,maxResultsPerQuery:new Y({required:!0,min:1}),cacheTimeout:new Y});let{q:n,maxResultsPerQuery:o}=e,i=Tp(yp()),a=yield hC(r,t.extra.navigatorContext,n,o,i),m=new qt({...t,analyticsAction:i},h=>{t.dispatch(si({q:h,id:e.id}))}),f=yield m.fetchFromAPI(a,{origin:"instantResults",disableAbortWarning:!0}),s=yield m.process(f);return"response"in s?{results:s.response.results,searchUid:s.response.searchUid,totalCountFiltered:s.response.totalCountFiltered,duration:s.duration}:s});return function(_x104,_x105){return _ref44.apply(this,arguments)}}()),gC=/*#__PURE__*/function(){var _ref45=_asyncToGenerator(function*(e,t,r){let n=yield Mt(e,t,r);return n.request={...n.request,firstResult:(e.pagination?.firstResult??0)+(e.search?.results.length??0)},n});return function gC(_x106,_x107,_x108){return _ref45.apply(this,arguments)}}(),hC=/*#__PURE__*/function(){var _ref46=_asyncToGenerator(function*(e,t,r,n,o){let i=qr(e,t,o);return At({...i,...(e.didYouMean&&{enableDidYouMean:e.didYouMean.enableDidYouMean}),numberOfResults:n,q:r})});return function hC(_x109,_x110,_x111,_x112,_x113){return _ref46.apply(this,arguments)}}(),yC=/*#__PURE__*/function(){var _ref47=_asyncToGenerator(function*(e,t,r){let n=yield Mt(e,t,r);return n.request.numberOfResults=0,n});return function yC(_x114,_x115,_x116){return _ref47.apply(this,arguments)}}(),Pp=e=>{e.configuration.analytics.enabled&&Ye.addElement({name:"Query",...(e.query?.q&&{value:e.query.q}),time:JSON.stringify(new Date)})},Tp=e=>({actionCause:e.actionCause,type:e.actionCause});var Fp=de(xn(),e=>{e.addCase(ui,(t,r)=>{let n=Es(t),o=r.payload;t.defaultNumberOfResults=t.numberOfResults=o,t.firstResult=Rn(n,o)}).addCase(li,(t,r)=>{t.numberOfResults=r.payload,t.firstResult=0}).addCase(Lo,t=>{t.firstResult=0}).addCase(di,(t,r)=>{let n=r.payload;t.firstResult=Rn(n,t.numberOfResults)}).addCase(Tt,(t,r)=>{let n=r.payload;t.firstResult=Rn(n,t.numberOfResults)}).addCase(fi,t=>{let r=Es(t),n=Math.max(r-1,1);t.firstResult=Rn(n,t.numberOfResults)}).addCase(pi,t=>{let r=Es(t),n=vC(t),o=Math.min(r+1,n);t.firstResult=Rn(o,t.numberOfResults)}).addCase(Fe.fulfilled,(t,r)=>{r.payload&&(t.numberOfResults=r.payload.pagination.numberOfResults,t.firstResult=r.payload.pagination.firstResult)}).addCase(ht,(t,r)=>{t.firstResult=r.payload.firstResult??t.firstResult,t.numberOfResults=r.payload.numberOfResults??t.defaultNumberOfResults}).addCase(Ip.fulfilled,(t,r)=>{let{response:n}=r.payload;t.totalCountFiltered=n.totalCountFiltered}).addCase(ri,t=>{xe(t)}).addCase(lp,t=>{xe(t)}).addCase(ip,t=>{xe(t)}).addCase(mp,t=>{xe(t)}).addCase(Zd,t=>{xe(t)}).addCase(op,t=>{xe(t)}).addCase(Kd,t=>{xe(t)}).addCase(Gd,t=>{xe(t)}).addCase(Yd,t=>{xe(t)}).addCase(up,t=>{xe(t)}).addCase(fp,t=>{xe(t)}).addCase(_r,t=>{xe(t)}).addCase(dp,t=>{xe(t)}).addCase(gp,t=>{xe(t)}).addCase(Xd,t=>{xe(t)}).addCase(Wd,t=>{xe(t)})});function xe(e){e.firstResult=xn().firstResult}function Es(e){let{firstResult:t,numberOfResults:r}=e;return CC(t,r)}function vC(e){let{totalCountFiltered:t,numberOfResults:r}=e;return bC(t,r)}function Rn(e,t){return(e-1)*t}function CC(e,t){return Math.round(e/t)+1}function bC(e,t){let r=Math.min(e,5e3);return Math.ceil(r/t)}function Is(e){return e.addReducers({pagination:Fp}),{nextPage:pi,previousPage:fi,registerNumberOfResults:ui,registerPage:di,updateNumberOfResults:li,updatePage:Tt}}p();u();d();l();function Nt(e){let t,r=new Map,n=()=>r.size===0,o=i=>{try{let a=JSON.stringify(i),m=t!==a;return t=a,m}catch(a){return console.warn("Could not detect if state has changed, check the controller \"get state method\"",a),!0}};return{subscribe(i){i();let a=Symbol(),m;return n()&&(t=JSON.stringify(this.state),m=e.subscribe(()=>{o(this.state)&&r.forEach(f=>f())})),r.set(a,i),()=>{r.delete(a),n()&&m&&m()}},get state(){return{}}}}p();u();d();l();var AC=new Ee({id:new B({emptyAllowed:!0,required:!1,default:""}),numberOfRecommendations:new Y({min:0})});function kp(e,t={}){if(!wC(e))throw He;let r=Nt(e),{dispatch:n}=e,o=()=>e.state,i=eu(e,AC,t.options,"buildRecommendationList");return i.id!==""&&n(Ar({id:i.id})),i.numberOfRecommendations&&n(Is(e).updateNumberOfResults(i.numberOfRecommendations)),{...r,refresh(){n(Ct())},get state(){let a=o();return{recommendations:a.recommendation.recommendations,error:a.recommendation.error,isLoading:a.recommendation.isLoading,searchResponseId:a.recommendation.searchUid}}}}function wC(e){return e.addReducers({recommendation:wr,configuration:Be}),!0}p();u();d();l();p();u();d();l();function Op(e,t,r){if(!xC(e))throw He;let n=1e3,o={selectionDelay:n,debounceWait:n,...t.options},i;return{select:Uo(r,o.debounceWait,{isImmediate:!0}),beginDelayedSelect(){i=setTimeout(r,o.selectionDelay)},cancelPendingSelect(){i&&clearTimeout(i)}}}function xC(e){return e.addReducers({configuration:Be}),!0}function Dp(e,t){let r=!1,n=()=>{r||(r=!0,e.dispatch(To(t.options.result)))};return Op(e,t,()=>{n()})}p();u();d();l();p();u();d();l();p();u();d();l();var RC=["caseId","caseNumber"],EC={caseId:"caseContext",caseNumber:"caseContext"},En=class extends Error{constructor(t){super(`The key "${t}" is reserved for internal use. Use ${EC[t]} to set this value.}`)}};function Ps(e){return RC.includes(e)}var IC=new Ee({values:new G({options:{required:!1}})});function Mp(e,t={}){if(!FC(e))throw He;let r=Nt(e),{dispatch:n}=e,o=()=>e.state,i=Zc(e,IC,t.initialState,"buildContext");return i.values&&n(Kt(i.values)),{...r,get state(){return{values:o().context.contextValues}},set(a){n(Kt(a))},...(o().configuration.analytics.analyticsMode==="legacy"?PC(n):TC(n))}}var PC=e=>({add(t,r){e(Yt({contextKey:t,contextValue:r}))},remove(t){e(Jt(t))}}),TC=e=>({add(t,r){if(Ps(t))throw new En(t);e(Yt({contextKey:t,contextValue:r}))},remove(t){if(Ps(t))throw new En(t);e(Jt(t))}});function FC(e){return e.addReducers({context:Wo}),!0}function qp(e,t){return Mp(e,t)}p();u();d();l();function Np(e){if(!kC(e))throw He;let t=Nt(e),{dispatch:r}=e,n=()=>e.state;return{...t,get state(){return{values:n().dictionaryFieldContext.contextValues}},set(o){r(Or(o))},add(o,i){r(Dr({field:o,key:i}))},remove(o){r(Mr(o))}}}function kC(e){return e.addReducers({dictionaryFieldContext:Ko}),!0}p();u();d();l();p();u();d();l();var OC=new Ee({content:new ue({required:!0}),conditions:new ue({required:!0}),priority:new Y({required:!1,default:0,min:0}),fields:new ee({required:!1,each:K})});function _p(){let e=[],t=r=>{let n=OC.validate(r);if(!r.conditions.every(i=>i instanceof Function))throw new $r("Each template condition should be a function that takes a Result or Product as an argument and returns a boolean");return n};return{registerTemplates(...r){r.forEach(n=>{let o={...t(n),fields:n.fields||[]};e.push(o)}),e.sort((n,o)=>o.priority-n.priority)},selectTemplate(r){let n=e.find(o=>o.conditions.every(i=>i(r)));return n?n.content:null},selectLinkTemplate(r){let n=e.find(o=>o.conditions.every(i=>i(r)));return n?n.linkContent:null}}}function Vp(e){if(!DC(e))throw He;let{registerTemplates:t,selectTemplate:r,selectLinkTemplate:n}=_p();return{registerTemplates:(...o)=>{t(...o);let i=[];o.forEach(a=>{a.fields&&i.push(...a.fields)}),e.dispatch(Nr(i))},selectTemplate:r,selectLinkTemplate:n}}function DC(e){return e.addReducers({fields:ei}),!0}p();u();d();l();var Si=(e,t)=>{let r=e;return J(r[t])?J(e.raw[t])?null:e.raw[t]:r[t]},MC=e=>t=>e.every(r=>!J(Si(t,r))),qC=e=>t=>e.every(r=>J(Si(t,r))),NC=(e,t)=>r=>{let n=Lp(e,r);return t.some(o=>n.some(i=>`${i}`.toLowerCase()===o.toLowerCase()))},_C=(e,t)=>r=>{let n=Lp(e,r);return t.every(o=>n.every(i=>`${i}`.toLowerCase()!==o.toLowerCase()))},Lp=(e,t)=>{let r=Si(t,e);return Js(r)?r:[r]},jp={getResultProperty:Si,fieldsMustBeDefined:MC,fieldsMustNotBeDefined:qC,fieldMustMatch:NC,fieldMustNotMatch:_C};/**
|
|
30
|
+
`;function Ph(){return typeof navigator<"u"&&navigator.product=="ReactNative"}var Ih=["1",1,"yes",!0];function ho(){let e=[];return ua()&&e.push(window.doNotTrack),Aa()&&e.push(navigator.doNotTrack,navigator.msDoNotTrack,navigator.globalPrivacyControl),e.some(t=>Ih.indexOf(t)!==-1)}var Ou="v15",Du={default:"https://analytics.cloud.coveo.com/rest/ua",production:"https://analytics.cloud.coveo.com/rest/ua",hipaa:"https://analyticshipaa.cloud.coveo.com/rest/ua"};function Th(e=Du.default,t=Ou,r=!1){if(e=e.replace(/\/$/,""),r)return`${e}/${t}`;let n=e.endsWith("/rest")||e.endsWith("/rest/ua");return`${e}${n?"":"/rest"}/${t}`}var Fh="38824e1f-37f5-42d3-8372-a4b8fa9df946",ut=class{get defaultOptions(){return{endpoint:Du.default,isCustomEndpoint:!1,token:"",version:Ou,beforeSendHooks:[],afterSendHooks:[]}}get version(){return Iu}constructor(t){if(this.acceptedLinkReferrers=[],!t)throw new Error("You have to pass options to this constructor");this.options=Object.assign(Object.assign({},this.defaultOptions),t),this.visitorId="",this.bufferedRequests=[],this.beforeSendHooks=[Sg,hg].concat(this.options.beforeSendHooks),this.afterSendHooks=this.options.afterSendHooks,this.eventTypeMapping={};let r={baseUrl:this.baseUrl,token:this.options.token,visitorIdProvider:this,preprocessRequest:this.options.preprocessRequest};ho()?this.runtime=new go:this.runtime=this.options.runtimeEnvironment||this.initRuntime(r),this.addEventTypeMapping(ae.view,{newEventType:ae.view,addClientIdParameter:!0}),this.addEventTypeMapping(ae.click,{newEventType:ae.click,addClientIdParameter:!0}),this.addEventTypeMapping(ae.custom,{newEventType:ae.custom,addClientIdParameter:!0}),this.addEventTypeMapping(ae.search,{newEventType:ae.search,addClientIdParameter:!0})}initRuntime(t){return ua()&&hr()?new Ca(t,()=>{let r=[...this.bufferedRequests];return this.bufferedRequests=[],r}):(Ph()&&console.warn(Eh),new ba(t))}get storage(){return this.runtime.storage}determineVisitorId(){return M(this,void 0,void 0,function*(){try{return ua()&&this.extractClientIdFromLink(window.location.href)||(yield this.storage.getItem("visitorId"))||zt()}catch(t){return console.log("Could not get visitor ID from the current runtime environment storage. Using a random ID instead.",t),zt()}})}getCurrentVisitorId(){return M(this,void 0,void 0,function*(){if(!this.visitorId){let t=yield this.determineVisitorId();yield this.setCurrentVisitorId(t)}return this.visitorId})}setCurrentVisitorId(t){return M(this,void 0,void 0,function*(){this.visitorId=t,yield this.storage.setItem("visitorId",t)})}setClientId(t,r){return M(this,void 0,void 0,function*(){if(lo(t))this.setCurrentVisitorId(t.toLowerCase());else{if(!r)throw Error("Cannot generate uuid client id without a specific namespace string.");this.setCurrentVisitorId(du(t,du(r,Fh)))}})}getParameters(t,...r){return M(this,void 0,void 0,function*(){return yield this.resolveParameters(t,...r)})}getPayload(t,...r){return M(this,void 0,void 0,function*(){let n=yield this.resolveParameters(t,...r);return yield this.resolvePayloadForParameters(t,n)})}get currentVisitorId(){return typeof(this.visitorId||this.storage.getItem("visitorId"))!="string"&&this.setCurrentVisitorId(zt()),this.visitorId}set currentVisitorId(t){this.visitorId=t,this.storage.setItem("visitorId",t)}extractClientIdFromLink(t){if(ho())return null;try{let r=new URL(t).searchParams.get(vt.cvo_cid);if(r==null)return null;let n=vt.fromString(r);return!n||!hr()||!n.validate(document.referrer,this.acceptedLinkReferrers)?null:n.clientId}catch{}return null}resolveParameters(t,...r){return M(this,void 0,void 0,function*(){let{variableLengthArgumentsNames:n=[],addVisitorIdParameter:o=!1,usesMeasurementProtocol:i=!1,addClientIdParameter:a=!1}=this.eventTypeMapping[t]||{};return yield[g=>n.length>0?this.parseVariableArgumentsPayload(n,g):g[0],g=>M(this,void 0,void 0,function*(){return Object.assign(Object.assign({},g),{visitorId:o?yield this.getCurrentVisitorId():""})}),g=>M(this,void 0,void 0,function*(){return a?Object.assign(Object.assign({},g),{clientId:yield this.getCurrentVisitorId()}):g}),g=>i?this.ensureAnonymousUserWhenUsingApiKey(g):g,g=>this.beforeSendHooks.reduce((v,R)=>M(this,void 0,void 0,function*(){let I=yield v;return yield R(t,I)}),g)].reduce((g,v)=>M(this,void 0,void 0,function*(){let R=yield g;return yield v(R)}),Promise.resolve(r))})}resolvePayloadForParameters(t,r){return M(this,void 0,void 0,function*(){let{usesMeasurementProtocol:n=!1}=this.eventTypeMapping[t]||{};return yield[y=>this.setTrackingIdIfTrackingIdNotPresent(y),y=>this.removeEmptyPayloadValues(y,t),y=>this.validateParams(y,t),y=>n?hh(y):y,y=>n?this.removeUnknownParameters(y):y,y=>n?this.processCustomParameters(y):this.mapCustomParametersToCustomData(y)].reduce((y,S)=>M(this,void 0,void 0,function*(){let g=yield y;return yield S(g)}),Promise.resolve(r))})}makeEvent(t,...r){return M(this,void 0,void 0,function*(){let{newEventType:n=t}=this.eventTypeMapping[t]||{},o=yield this.resolveParameters(t,...r),i=yield this.resolvePayloadForParameters(t,o);return{eventType:n,payload:i,log:a=>M(this,void 0,void 0,function*(){return this.bufferedRequests.push({eventType:n,payload:Object.assign(Object.assign({},i),a)}),yield Promise.all(this.afterSendHooks.map(m=>m(t,Object.assign(Object.assign({},o),a)))),yield this.deferExecution(),yield this.sendFromBuffer()})}})}sendEvent(t,...r){return M(this,void 0,void 0,function*(){return(yield this.makeEvent(t,...r)).log({})})}deferExecution(){return new Promise(t=>setTimeout(t,0))}sendFromBuffer(){return M(this,void 0,void 0,function*(){let t=this.bufferedRequests.shift();if(t){let{eventType:r,payload:n}=t;return this.runtime.getClientDependingOnEventType(r).sendEvent(r,n)}})}clear(){this.storage.removeItem("visitorId"),new vr().clear()}deleteHttpOnlyVisitorId(){this.runtime.client.deleteHttpCookieVisitorId()}makeSearchEvent(t){return M(this,void 0,void 0,function*(){return this.makeEvent(ae.search,t)})}sendSearchEvent(t){var{searchQueryUid:r}=t,n=st(t,["searchQueryUid"]);return M(this,void 0,void 0,function*(){return(yield this.makeSearchEvent(n)).log({searchQueryUid:r})})}makeClickEvent(t){return M(this,void 0,void 0,function*(){return this.makeEvent(ae.click,t)})}sendClickEvent(t){var{searchQueryUid:r}=t,n=st(t,["searchQueryUid"]);return M(this,void 0,void 0,function*(){return(yield this.makeClickEvent(n)).log({searchQueryUid:r})})}makeCustomEvent(t){return M(this,void 0,void 0,function*(){return this.makeEvent(ae.custom,t)})}sendCustomEvent(t){var{lastSearchQueryUid:r}=t,n=st(t,["lastSearchQueryUid"]);return M(this,void 0,void 0,function*(){return(yield this.makeCustomEvent(n)).log({lastSearchQueryUid:r})})}makeViewEvent(t){return M(this,void 0,void 0,function*(){return this.makeEvent(ae.view,t)})}sendViewEvent(t){return M(this,void 0,void 0,function*(){return(yield this.makeViewEvent(t)).log({})})}getVisit(){return M(this,void 0,void 0,function*(){let r=yield(yield b(`${this.baseUrl}/analytics/visit`)).json();return this.visitorId=r.visitorId,r})}getHealth(){return M(this,void 0,void 0,function*(){return yield(yield b(`${this.baseUrl}/analytics/monitoring/health`)).json()})}registerBeforeSendEventHook(t){this.beforeSendHooks.push(t)}registerAfterSendEventHook(t){this.afterSendHooks.push(t)}addEventTypeMapping(t,r){this.eventTypeMapping[t]=r}setAcceptedLinkReferrers(t){if(Array.isArray(t)&&t.every(r=>typeof r=="string"))this.acceptedLinkReferrers=t;else throw Error("Parameter should be an array of domain strings")}parseVariableArgumentsPayload(t,r){let n={};for(let o=0,i=r.length;o<i;o++){let a=r[o];if(typeof a=="string")n[t[o]]=a;else if(typeof a=="object")return Object.assign(Object.assign({},n),a)}return n}isKeyAllowedEmpty(t,r){return({[ae.search]:["queryText"]}[t]||[]).indexOf(r)!==-1}removeEmptyPayloadValues(t,r){let n=o=>typeof o<"u"&&o!==null&&o!=="";return Object.keys(t).filter(o=>this.isKeyAllowedEmpty(r,o)||n(t[o])).reduce((o,i)=>Object.assign(Object.assign({},o),{[i]:t[i]}),{})}removeUnknownParameters(t){return Object.keys(t).filter(n=>{if(Ch(n))return!0;console.log(n,"is not processed by coveoua")}).reduce((n,o)=>Object.assign(Object.assign({},n),{[o]:t[o]}),{})}processCustomParameters(t){let{custom:r}=t,n=st(t,["custom"]),o={};r&&uo(r)&&(o=this.lowercaseKeys(r));let i=bh(n);return Object.assign(Object.assign({},o),i)}mapCustomParametersToCustomData(t){let{custom:r}=t,n=st(t,["custom"]);if(r&&uo(r)){let o=this.lowercaseKeys(r);return Object.assign(Object.assign({},n),{customData:Object.assign(Object.assign({},o),t.customData)})}else return t}lowercaseKeys(t){let r=Object.keys(t),n={};return r.forEach(o=>{n[o.toLowerCase()]=t[o]}),n}validateParams(t,r){let{anonymizeIp:n}=t,o=st(t,["anonymizeIp"]);return n!==void 0&&["0","false","undefined","null","{}","[]",""].indexOf(`${n}`.toLowerCase())==-1&&(o.anonymizeIp=1),(r==ae.view||r==ae.click||r==ae.search||r==ae.custom)&&(o.originLevel3=this.limit(o.originLevel3,1024)),r==ae.view&&(o.location=this.limit(o.location,1024)),(r=="pageview"||r=="event")&&(o.referrer=this.limit(o.referrer,2048),o.location=this.limit(o.location,2048),o.page=this.limit(o.page,2048)),o}ensureAnonymousUserWhenUsingApiKey(t){let{userId:r}=t,n=st(t,["userId"]);return Rh(this.options.token)&&!r?(n.userId="anonymous",n):t}setTrackingIdIfTrackingIdNotPresent(t){let{trackingId:r}=t,n=st(t,["trackingId"]);return r?t:(n.hasOwnProperty("custom")&&uo(n.custom)&&(n.custom.hasOwnProperty("context_website")||n.custom.hasOwnProperty("siteName"))&&(n.trackingId=n.custom.context_website||n.custom.siteName),n.hasOwnProperty("customData")&&uo(n.customData)&&(n.customData.hasOwnProperty("context_website")||n.customData.hasOwnProperty("siteName"))&&(n.trackingId=n.customData.context_website||n.customData.siteName),n)}limit(t,r){return typeof t=="string"?Dg(t,r):t}get baseUrl(){return Th(this.options.endpoint,this.options.version,this.options.isCustomEndpoint)}},ct;(function(e){e.contextChanged="contextChanged",e.expandToFullUI="expandToFullUI",e.openUserActions="openUserActions",e.showPrecedingSessions="showPrecedingSessions",e.showFollowingSessions="showFollowingSessions",e.clickViewedDocument="clickViewedDocument",e.clickPageView="clickPageView",e.createArticle="createArticle"})(ct||(ct={}));var q;(function(e){e.interfaceLoad="interfaceLoad",e.interfaceChange="interfaceChange",e.didyoumeanAutomatic="didyoumeanAutomatic",e.didyoumeanClick="didyoumeanClick",e.resultsSort="resultsSort",e.searchboxSubmit="searchboxSubmit",e.searchboxClear="searchboxClear",e.searchboxAsYouType="searchboxAsYouType",e.breadcrumbFacet="breadcrumbFacet",e.breadcrumbResetAll="breadcrumbResetAll",e.documentQuickview="documentQuickview",e.documentOpen="documentOpen",e.omniboxAnalytics="omniboxAnalytics",e.omniboxFromLink="omniboxFromLink",e.searchFromLink="searchFromLink",e.triggerNotify="notify",e.triggerExecute="execute",e.triggerQuery="query",e.undoTriggerQuery="undoQuery",e.triggerRedirect="redirect",e.pagerResize="pagerResize",e.pagerNumber="pagerNumber",e.pagerNext="pagerNext",e.pagerPrevious="pagerPrevious",e.pagerScrolling="pagerScrolling",e.staticFilterClearAll="staticFilterClearAll",e.staticFilterSelect="staticFilterSelect",e.staticFilterDeselect="staticFilterDeselect",e.facetClearAll="facetClearAll",e.facetSearch="facetSearch",e.facetSelect="facetSelect",e.facetSelectAll="facetSelectAll",e.facetDeselect="facetDeselect",e.facetExclude="facetExclude",e.facetUnexclude="facetUnexclude",e.facetUpdateSort="facetUpdateSort",e.facetShowMore="showMoreFacetResults",e.facetShowLess="showLessFacetResults",e.queryError="query",e.queryErrorBack="errorBack",e.queryErrorClear="errorClearQuery",e.queryErrorRetry="errorRetry",e.recommendation="recommendation",e.recommendationInterfaceLoad="recommendationInterfaceLoad",e.recommendationOpen="recommendationOpen",e.likeSmartSnippet="likeSmartSnippet",e.dislikeSmartSnippet="dislikeSmartSnippet",e.expandSmartSnippet="expandSmartSnippet",e.collapseSmartSnippet="collapseSmartSnippet",e.openSmartSnippetFeedbackModal="openSmartSnippetFeedbackModal",e.closeSmartSnippetFeedbackModal="closeSmartSnippetFeedbackModal",e.sendSmartSnippetReason="sendSmartSnippetReason",e.expandSmartSnippetSuggestion="expandSmartSnippetSuggestion",e.collapseSmartSnippetSuggestion="collapseSmartSnippetSuggestion",e.showMoreSmartSnippetSuggestion="showMoreSmartSnippetSuggestion",e.showLessSmartSnippetSuggestion="showLessSmartSnippetSuggestion",e.openSmartSnippetSource="openSmartSnippetSource",e.openSmartSnippetSuggestionSource="openSmartSnippetSuggestionSource",e.openSmartSnippetInlineLink="openSmartSnippetInlineLink",e.openSmartSnippetSuggestionInlineLink="openSmartSnippetSuggestionInlineLink",e.recentQueryClick="recentQueriesClick",e.clearRecentQueries="clearRecentQueries",e.recentResultClick="recentResultClick",e.clearRecentResults="clearRecentResults",e.noResultsBack="noResultsBack",e.showMoreFoldedResults="showMoreFoldedResults",e.showLessFoldedResults="showLessFoldedResults",e.copyToClipboard="copyToClipboard",e.caseSendEmail="Case.SendEmail",e.feedItemTextPost="FeedItem.TextPost",e.caseAttach="caseAttach",e.caseDetach="caseDetach",e.retryGeneratedAnswer="retryGeneratedAnswer",e.likeGeneratedAnswer="likeGeneratedAnswer",e.dislikeGeneratedAnswer="dislikeGeneratedAnswer",e.openGeneratedAnswerSource="openGeneratedAnswerSource",e.generatedAnswerStreamEnd="generatedAnswerStreamEnd",e.generatedAnswerSourceHover="generatedAnswerSourceHover",e.generatedAnswerCopyToClipboard="generatedAnswerCopyToClipboard",e.generatedAnswerHideAnswers="generatedAnswerHideAnswers",e.generatedAnswerShowAnswers="generatedAnswerShowAnswers",e.generatedAnswerExpand="generatedAnswerExpand",e.generatedAnswerCollapse="generatedAnswerCollapse",e.generatedAnswerFeedbackSubmit="generatedAnswerFeedbackSubmit",e.rephraseGeneratedAnswer="rephraseGeneratedAnswer",e.generatedAnswerFeedbackSubmitV2="generatedAnswerFeedbackSubmitV2",e.generatedAnswerCitationClick="generatedAnswerCitationClick"})(q||(q={}));var Su={[q.triggerNotify]:"queryPipelineTriggers",[q.triggerExecute]:"queryPipelineTriggers",[q.triggerQuery]:"queryPipelineTriggers",[q.triggerRedirect]:"queryPipelineTriggers",[q.queryError]:"errors",[q.queryErrorBack]:"errors",[q.queryErrorClear]:"errors",[q.queryErrorRetry]:"errors",[q.pagerNext]:"getMoreResults",[q.pagerPrevious]:"getMoreResults",[q.pagerNumber]:"getMoreResults",[q.pagerResize]:"getMoreResults",[q.pagerScrolling]:"getMoreResults",[q.facetSearch]:"facet",[q.facetShowLess]:"facet",[q.facetShowMore]:"facet",[q.recommendation]:"recommendation",[q.likeSmartSnippet]:"smartSnippet",[q.dislikeSmartSnippet]:"smartSnippet",[q.expandSmartSnippet]:"smartSnippet",[q.collapseSmartSnippet]:"smartSnippet",[q.openSmartSnippetFeedbackModal]:"smartSnippet",[q.closeSmartSnippetFeedbackModal]:"smartSnippet",[q.sendSmartSnippetReason]:"smartSnippet",[q.expandSmartSnippetSuggestion]:"smartSnippetSuggestions",[q.collapseSmartSnippetSuggestion]:"smartSnippetSuggestions",[q.showMoreSmartSnippetSuggestion]:"smartSnippetSuggestions",[q.showLessSmartSnippetSuggestion]:"smartSnippetSuggestions",[q.clearRecentQueries]:"recentQueries",[q.recentResultClick]:"recentlyClickedDocuments",[q.clearRecentResults]:"recentlyClickedDocuments",[q.showLessFoldedResults]:"folding",[q.caseDetach]:"case",[q.likeGeneratedAnswer]:"generatedAnswer",[q.dislikeGeneratedAnswer]:"generatedAnswer",[q.openGeneratedAnswerSource]:"generatedAnswer",[q.generatedAnswerStreamEnd]:"generatedAnswer",[q.generatedAnswerSourceHover]:"generatedAnswer",[q.generatedAnswerCopyToClipboard]:"generatedAnswer",[q.generatedAnswerHideAnswers]:"generatedAnswer",[q.generatedAnswerShowAnswers]:"generatedAnswer",[q.generatedAnswerExpand]:"generatedAnswer",[q.generatedAnswerCollapse]:"generatedAnswer",[q.generatedAnswerFeedbackSubmit]:"generatedAnswer",[q.generatedAnswerFeedbackSubmitV2]:"generatedAnswer",[ct.expandToFullUI]:"interface",[ct.openUserActions]:"User Actions",[ct.showPrecedingSessions]:"User Actions",[ct.showFollowingSessions]:"User Actions",[ct.clickViewedDocument]:"User Actions",[ct.clickPageView]:"User Actions",[ct.createArticle]:"createArticle"},Cr=class{constructor(){this.runtime=new go,this.currentVisitorId=""}getPayload(){return Promise.resolve()}getParameters(){return Promise.resolve()}makeEvent(t){return Promise.resolve({eventType:t,payload:null,log:()=>Promise.resolve()})}sendEvent(){return Promise.resolve()}makeSearchEvent(){return this.makeEvent(ae.search)}sendSearchEvent(){return Promise.resolve()}makeClickEvent(){return this.makeEvent(ae.click)}sendClickEvent(){return Promise.resolve()}makeCustomEvent(){return this.makeEvent(ae.custom)}sendCustomEvent(){return Promise.resolve()}makeViewEvent(){return this.makeEvent(ae.view)}sendViewEvent(){return Promise.resolve()}getVisit(){return Promise.resolve({id:"",visitorId:""})}getHealth(){return Promise.resolve({status:""})}registerBeforeSendEventHook(){}registerAfterSendEventHook(){}addEventTypeMapping(){}get version(){return Iu}};function kh(e){let t="";return e.filter(r=>{let n=r!==t;return t=r,n})}function Oh(e){return e.map(t=>t.replace(/;/g,""))}function Mu(e){let r=e.join(";");return r.length<=256?r:Mu(e.slice(1))}var vu=e=>{let t=Oh(e),r=kh(t);return Mu(r)};function Cu(e){let t=typeof e.partialQueries=="string"?e.partialQueries:vu(e.partialQueries),r=typeof e.suggestions=="string"?e.suggestions:vu(e.suggestions);return Object.assign(Object.assign({},e),{partialQueries:t,suggestions:r})}var yo=class{constructor(t,r){this.opts=t,this.provider=r;let n=t.enableAnalytics===!1||ho();this.coveoAnalyticsClient=n?new Cr:new ut(t)}disable(){this.coveoAnalyticsClient=new Cr}enable(){this.coveoAnalyticsClient=new ut(this.opts)}makeInterfaceLoad(){return this.makeSearchEvent(q.interfaceLoad)}logInterfaceLoad(){return M(this,void 0,void 0,function*(){return(yield this.makeInterfaceLoad()).log({searchUID:this.provider.getSearchUID()})})}makeRecommendationInterfaceLoad(){return this.makeSearchEvent(q.recommendationInterfaceLoad)}logRecommendationInterfaceLoad(){return M(this,void 0,void 0,function*(){return(yield this.makeRecommendationInterfaceLoad()).log({searchUID:this.provider.getSearchUID()})})}makeRecommendation(){return this.makeCustomEvent(q.recommendation)}logRecommendation(){return M(this,void 0,void 0,function*(){return(yield this.makeRecommendation()).log({searchUID:this.provider.getSearchUID()})})}makeRecommendationOpen(t,r){return this.makeClickEvent(q.recommendationOpen,t,r)}logRecommendationOpen(t,r){return M(this,void 0,void 0,function*(){return(yield this.makeRecommendationOpen(t,r)).log({searchUID:this.provider.getSearchUID()})})}makeStaticFilterClearAll(t){return this.makeSearchEvent(q.staticFilterClearAll,t)}logStaticFilterClearAll(t){return M(this,void 0,void 0,function*(){return(yield this.makeStaticFilterClearAll(t)).log({searchUID:this.provider.getSearchUID()})})}makeStaticFilterSelect(t){return this.makeSearchEvent(q.staticFilterSelect,t)}logStaticFilterSelect(t){return M(this,void 0,void 0,function*(){return(yield this.makeStaticFilterSelect(t)).log({searchUID:this.provider.getSearchUID()})})}makeStaticFilterDeselect(t){return this.makeSearchEvent(q.staticFilterDeselect,t)}logStaticFilterDeselect(t){return M(this,void 0,void 0,function*(){return(yield this.makeStaticFilterDeselect(t)).log({searchUID:this.provider.getSearchUID()})})}makeFetchMoreResults(){return this.makeCustomEvent(q.pagerScrolling,{type:"getMoreResults"})}logFetchMoreResults(){return M(this,void 0,void 0,function*(){return(yield this.makeFetchMoreResults()).log({searchUID:this.provider.getSearchUID()})})}makeInterfaceChange(t){return this.makeSearchEvent(q.interfaceChange,t)}logInterfaceChange(t){return M(this,void 0,void 0,function*(){return(yield this.makeInterfaceChange(t)).log({searchUID:this.provider.getSearchUID()})})}makeDidYouMeanAutomatic(){return this.makeSearchEvent(q.didyoumeanAutomatic)}logDidYouMeanAutomatic(){return M(this,void 0,void 0,function*(){return(yield this.makeDidYouMeanAutomatic()).log({searchUID:this.provider.getSearchUID()})})}makeDidYouMeanClick(){return this.makeSearchEvent(q.didyoumeanClick)}logDidYouMeanClick(){return M(this,void 0,void 0,function*(){return(yield this.makeDidYouMeanClick()).log({searchUID:this.provider.getSearchUID()})})}makeResultsSort(t){return this.makeSearchEvent(q.resultsSort,t)}logResultsSort(t){return M(this,void 0,void 0,function*(){return(yield this.makeResultsSort(t)).log({searchUID:this.provider.getSearchUID()})})}makeSearchboxSubmit(){return this.makeSearchEvent(q.searchboxSubmit)}logSearchboxSubmit(){return M(this,void 0,void 0,function*(){return(yield this.makeSearchboxSubmit()).log({searchUID:this.provider.getSearchUID()})})}makeSearchboxClear(){return this.makeSearchEvent(q.searchboxClear)}logSearchboxClear(){return M(this,void 0,void 0,function*(){return(yield this.makeSearchboxClear()).log({searchUID:this.provider.getSearchUID()})})}makeSearchboxAsYouType(){return this.makeSearchEvent(q.searchboxAsYouType)}logSearchboxAsYouType(){return M(this,void 0,void 0,function*(){return(yield this.makeSearchboxAsYouType()).log({searchUID:this.provider.getSearchUID()})})}makeBreadcrumbFacet(t){return this.makeSearchEvent(q.breadcrumbFacet,t)}logBreadcrumbFacet(t){return M(this,void 0,void 0,function*(){return(yield this.makeBreadcrumbFacet(t)).log({searchUID:this.provider.getSearchUID()})})}makeBreadcrumbResetAll(){return this.makeSearchEvent(q.breadcrumbResetAll)}logBreadcrumbResetAll(){return M(this,void 0,void 0,function*(){return(yield this.makeBreadcrumbResetAll()).log({searchUID:this.provider.getSearchUID()})})}makeDocumentQuickview(t,r){return this.makeClickEvent(q.documentQuickview,t,r)}logDocumentQuickview(t,r){return M(this,void 0,void 0,function*(){return(yield this.makeDocumentQuickview(t,r)).log({searchUID:this.provider.getSearchUID()})})}makeDocumentOpen(t,r){return this.makeClickEvent(q.documentOpen,t,r)}logDocumentOpen(t,r){return M(this,void 0,void 0,function*(){return(yield this.makeDocumentOpen(t,r)).log({searchUID:this.provider.getSearchUID()})})}makeOmniboxAnalytics(t){return this.makeSearchEvent(q.omniboxAnalytics,Cu(t))}logOmniboxAnalytics(t){return M(this,void 0,void 0,function*(){return(yield this.makeOmniboxAnalytics(t)).log({searchUID:this.provider.getSearchUID()})})}makeOmniboxFromLink(t){return this.makeSearchEvent(q.omniboxFromLink,Cu(t))}logOmniboxFromLink(t){return M(this,void 0,void 0,function*(){return(yield this.makeOmniboxFromLink(t)).log({searchUID:this.provider.getSearchUID()})})}makeSearchFromLink(){return this.makeSearchEvent(q.searchFromLink)}logSearchFromLink(){return M(this,void 0,void 0,function*(){return(yield this.makeSearchFromLink()).log({searchUID:this.provider.getSearchUID()})})}makeTriggerNotify(t){return this.makeCustomEvent(q.triggerNotify,t)}logTriggerNotify(t){return M(this,void 0,void 0,function*(){return(yield this.makeTriggerNotify(t)).log({searchUID:this.provider.getSearchUID()})})}makeTriggerExecute(t){return this.makeCustomEvent(q.triggerExecute,t)}logTriggerExecute(t){return M(this,void 0,void 0,function*(){return(yield this.makeTriggerExecute(t)).log({searchUID:this.provider.getSearchUID()})})}makeTriggerQuery(){return this.makeCustomEvent(q.triggerQuery,{query:this.provider.getSearchEventRequestPayload().queryText},"queryPipelineTriggers")}logTriggerQuery(){return M(this,void 0,void 0,function*(){return(yield this.makeTriggerQuery()).log({searchUID:this.provider.getSearchUID()})})}makeUndoTriggerQuery(t){return this.makeSearchEvent(q.undoTriggerQuery,t)}logUndoTriggerQuery(t){return M(this,void 0,void 0,function*(){return(yield this.makeUndoTriggerQuery(t)).log({searchUID:this.provider.getSearchUID()})})}makeTriggerRedirect(t){return this.makeCustomEvent(q.triggerRedirect,Object.assign(Object.assign({},t),{query:this.provider.getSearchEventRequestPayload().queryText}))}logTriggerRedirect(t){return M(this,void 0,void 0,function*(){return(yield this.makeTriggerRedirect(t)).log({searchUID:this.provider.getSearchUID()})})}makePagerResize(t){return this.makeCustomEvent(q.pagerResize,t)}logPagerResize(t){return M(this,void 0,void 0,function*(){return(yield this.makePagerResize(t)).log({searchUID:this.provider.getSearchUID()})})}makePagerNumber(t){return this.makeCustomEvent(q.pagerNumber,t)}logPagerNumber(t){return M(this,void 0,void 0,function*(){return(yield this.makePagerNumber(t)).log({searchUID:this.provider.getSearchUID()})})}makePagerNext(t){return this.makeCustomEvent(q.pagerNext,t)}logPagerNext(t){return M(this,void 0,void 0,function*(){return(yield this.makePagerNext(t)).log({searchUID:this.provider.getSearchUID()})})}makePagerPrevious(t){return this.makeCustomEvent(q.pagerPrevious,t)}logPagerPrevious(t){return M(this,void 0,void 0,function*(){return(yield this.makePagerPrevious(t)).log({searchUID:this.provider.getSearchUID()})})}makePagerScrolling(){return this.makeCustomEvent(q.pagerScrolling)}logPagerScrolling(){return M(this,void 0,void 0,function*(){return(yield this.makePagerScrolling()).log({searchUID:this.provider.getSearchUID()})})}makeFacetClearAll(t){return this.makeSearchEvent(q.facetClearAll,t)}logFacetClearAll(t){return M(this,void 0,void 0,function*(){return(yield this.makeFacetClearAll(t)).log({searchUID:this.provider.getSearchUID()})})}makeFacetSearch(t){return this.makeSearchEvent(q.facetSearch,t)}logFacetSearch(t){return M(this,void 0,void 0,function*(){return(yield this.makeFacetSearch(t)).log({searchUID:this.provider.getSearchUID()})})}makeFacetSelect(t){return this.makeSearchEvent(q.facetSelect,t)}logFacetSelect(t){return M(this,void 0,void 0,function*(){return(yield this.makeFacetSelect(t)).log({searchUID:this.provider.getSearchUID()})})}makeFacetDeselect(t){return this.makeSearchEvent(q.facetDeselect,t)}logFacetDeselect(t){return M(this,void 0,void 0,function*(){return(yield this.makeFacetDeselect(t)).log({searchUID:this.provider.getSearchUID()})})}makeFacetExclude(t){return this.makeSearchEvent(q.facetExclude,t)}logFacetExclude(t){return M(this,void 0,void 0,function*(){return(yield this.makeFacetExclude(t)).log({searchUID:this.provider.getSearchUID()})})}makeFacetUnexclude(t){return this.makeSearchEvent(q.facetUnexclude,t)}logFacetUnexclude(t){return M(this,void 0,void 0,function*(){return(yield this.makeFacetUnexclude(t)).log({searchUID:this.provider.getSearchUID()})})}makeFacetSelectAll(t){return this.makeSearchEvent(q.facetSelectAll,t)}logFacetSelectAll(t){return M(this,void 0,void 0,function*(){return(yield this.makeFacetSelectAll(t)).log({searchUID:this.provider.getSearchUID()})})}makeFacetUpdateSort(t){return this.makeSearchEvent(q.facetUpdateSort,t)}logFacetUpdateSort(t){return M(this,void 0,void 0,function*(){return(yield this.makeFacetUpdateSort(t)).log({searchUID:this.provider.getSearchUID()})})}makeFacetShowMore(t){return this.makeCustomEvent(q.facetShowMore,t)}logFacetShowMore(t){return M(this,void 0,void 0,function*(){return(yield this.makeFacetShowMore(t)).log({searchUID:this.provider.getSearchUID()})})}makeFacetShowLess(t){return this.makeCustomEvent(q.facetShowLess,t)}logFacetShowLess(t){return M(this,void 0,void 0,function*(){return(yield this.makeFacetShowLess(t)).log({searchUID:this.provider.getSearchUID()})})}makeQueryError(t){return this.makeCustomEvent(q.queryError,t)}logQueryError(t){return M(this,void 0,void 0,function*(){return(yield this.makeQueryError(t)).log({searchUID:this.provider.getSearchUID()})})}makeQueryErrorBack(){return M(this,void 0,void 0,function*(){let t=yield this.makeCustomEvent(q.queryErrorBack);return{description:t.description,log:()=>M(this,void 0,void 0,function*(){return yield t.log({searchUID:this.provider.getSearchUID()}),this.logSearchEvent(q.queryErrorBack)})}})}logQueryErrorBack(){return M(this,void 0,void 0,function*(){return(yield this.makeQueryErrorBack()).log({searchUID:this.provider.getSearchUID()})})}makeQueryErrorRetry(){return M(this,void 0,void 0,function*(){let t=yield this.makeCustomEvent(q.queryErrorRetry);return{description:t.description,log:()=>M(this,void 0,void 0,function*(){return yield t.log({searchUID:this.provider.getSearchUID()}),this.logSearchEvent(q.queryErrorRetry)})}})}logQueryErrorRetry(){return M(this,void 0,void 0,function*(){return(yield this.makeQueryErrorRetry()).log({searchUID:this.provider.getSearchUID()})})}makeQueryErrorClear(){return M(this,void 0,void 0,function*(){let t=yield this.makeCustomEvent(q.queryErrorClear);return{description:t.description,log:()=>M(this,void 0,void 0,function*(){return yield t.log({searchUID:this.provider.getSearchUID()}),this.logSearchEvent(q.queryErrorClear)})}})}logQueryErrorClear(){return M(this,void 0,void 0,function*(){return(yield this.makeQueryErrorClear()).log({searchUID:this.provider.getSearchUID()})})}makeLikeSmartSnippet(){return this.makeCustomEvent(q.likeSmartSnippet)}logLikeSmartSnippet(){return M(this,void 0,void 0,function*(){return(yield this.makeLikeSmartSnippet()).log({searchUID:this.provider.getSearchUID()})})}makeDislikeSmartSnippet(){return this.makeCustomEvent(q.dislikeSmartSnippet)}logDislikeSmartSnippet(){return M(this,void 0,void 0,function*(){return(yield this.makeDislikeSmartSnippet()).log({searchUID:this.provider.getSearchUID()})})}makeExpandSmartSnippet(){return this.makeCustomEvent(q.expandSmartSnippet)}logExpandSmartSnippet(){return M(this,void 0,void 0,function*(){return(yield this.makeExpandSmartSnippet()).log({searchUID:this.provider.getSearchUID()})})}makeCollapseSmartSnippet(){return this.makeCustomEvent(q.collapseSmartSnippet)}logCollapseSmartSnippet(){return M(this,void 0,void 0,function*(){return(yield this.makeCollapseSmartSnippet()).log({searchUID:this.provider.getSearchUID()})})}makeOpenSmartSnippetFeedbackModal(){return this.makeCustomEvent(q.openSmartSnippetFeedbackModal)}logOpenSmartSnippetFeedbackModal(){return M(this,void 0,void 0,function*(){return(yield this.makeOpenSmartSnippetFeedbackModal()).log({searchUID:this.provider.getSearchUID()})})}makeCloseSmartSnippetFeedbackModal(){return this.makeCustomEvent(q.closeSmartSnippetFeedbackModal)}logCloseSmartSnippetFeedbackModal(){return M(this,void 0,void 0,function*(){return(yield this.makeCloseSmartSnippetFeedbackModal()).log({searchUID:this.provider.getSearchUID()})})}makeSmartSnippetFeedbackReason(t,r){return this.makeCustomEvent(q.sendSmartSnippetReason,{reason:t,details:r})}logSmartSnippetFeedbackReason(t,r){return M(this,void 0,void 0,function*(){return(yield this.makeSmartSnippetFeedbackReason(t,r)).log({searchUID:this.provider.getSearchUID()})})}makeExpandSmartSnippetSuggestion(t){return this.makeCustomEvent(q.expandSmartSnippetSuggestion,"documentId"in t?t:{documentId:t})}logExpandSmartSnippetSuggestion(t){return M(this,void 0,void 0,function*(){return(yield this.makeExpandSmartSnippetSuggestion(t)).log({searchUID:this.provider.getSearchUID()})})}makeCollapseSmartSnippetSuggestion(t){return this.makeCustomEvent(q.collapseSmartSnippetSuggestion,"documentId"in t?t:{documentId:t})}logCollapseSmartSnippetSuggestion(t){return M(this,void 0,void 0,function*(){return(yield this.makeCollapseSmartSnippetSuggestion(t)).log({searchUID:this.provider.getSearchUID()})})}makeShowMoreSmartSnippetSuggestion(t){return this.makeCustomEvent(q.showMoreSmartSnippetSuggestion,t)}logShowMoreSmartSnippetSuggestion(t){return M(this,void 0,void 0,function*(){return(yield this.makeShowMoreSmartSnippetSuggestion(t)).log({searchUID:this.provider.getSearchUID()})})}makeShowLessSmartSnippetSuggestion(t){return this.makeCustomEvent(q.showLessSmartSnippetSuggestion,t)}logShowLessSmartSnippetSuggestion(t){return M(this,void 0,void 0,function*(){return(yield this.makeShowLessSmartSnippetSuggestion(t)).log({searchUID:this.provider.getSearchUID()})})}makeOpenSmartSnippetSource(t,r){return this.makeClickEvent(q.openSmartSnippetSource,t,r)}logOpenSmartSnippetSource(t,r){return M(this,void 0,void 0,function*(){return(yield this.makeOpenSmartSnippetSource(t,r)).log({searchUID:this.provider.getSearchUID()})})}makeOpenSmartSnippetSuggestionSource(t,r){return this.makeClickEvent(q.openSmartSnippetSuggestionSource,t,{contentIDKey:r.documentId.contentIdKey,contentIDValue:r.documentId.contentIdValue},r)}makeCopyToClipboard(t,r){return this.makeClickEvent(q.copyToClipboard,t,r)}logCopyToClipboard(t,r){return M(this,void 0,void 0,function*(){return(yield this.makeCopyToClipboard(t,r)).log({searchUID:this.provider.getSearchUID()})})}logOpenSmartSnippetSuggestionSource(t,r){return M(this,void 0,void 0,function*(){return(yield this.makeOpenSmartSnippetSuggestionSource(t,r)).log({searchUID:this.provider.getSearchUID()})})}makeOpenSmartSnippetInlineLink(t,r){return this.makeClickEvent(q.openSmartSnippetInlineLink,t,{contentIDKey:r.contentIDKey,contentIDValue:r.contentIDValue},r)}logOpenSmartSnippetInlineLink(t,r){return M(this,void 0,void 0,function*(){return(yield this.makeOpenSmartSnippetInlineLink(t,r)).log({searchUID:this.provider.getSearchUID()})})}makeOpenSmartSnippetSuggestionInlineLink(t,r){return this.makeClickEvent(q.openSmartSnippetSuggestionInlineLink,t,{contentIDKey:r.documentId.contentIdKey,contentIDValue:r.documentId.contentIdValue},r)}logOpenSmartSnippetSuggestionInlineLink(t,r){return M(this,void 0,void 0,function*(){return(yield this.makeOpenSmartSnippetSuggestionInlineLink(t,r)).log({searchUID:this.provider.getSearchUID()})})}makeRecentQueryClick(){return this.makeSearchEvent(q.recentQueryClick)}logRecentQueryClick(){return M(this,void 0,void 0,function*(){return(yield this.makeRecentQueryClick()).log({searchUID:this.provider.getSearchUID()})})}makeClearRecentQueries(){return this.makeCustomEvent(q.clearRecentQueries)}logClearRecentQueries(){return M(this,void 0,void 0,function*(){return(yield this.makeClearRecentQueries()).log({searchUID:this.provider.getSearchUID()})})}makeRecentResultClick(t,r){return this.makeCustomEvent(q.recentResultClick,{info:t,identifier:r})}logRecentResultClick(t,r){return M(this,void 0,void 0,function*(){return(yield this.makeRecentResultClick(t,r)).log({searchUID:this.provider.getSearchUID()})})}makeClearRecentResults(){return this.makeCustomEvent(q.clearRecentResults)}logClearRecentResults(){return M(this,void 0,void 0,function*(){return(yield this.makeClearRecentResults()).log({searchUID:this.provider.getSearchUID()})})}makeNoResultsBack(){return this.makeSearchEvent(q.noResultsBack)}logNoResultsBack(){return M(this,void 0,void 0,function*(){return(yield this.makeNoResultsBack()).log({searchUID:this.provider.getSearchUID()})})}makeShowMoreFoldedResults(t,r){return this.makeClickEvent(q.showMoreFoldedResults,t,r)}logShowMoreFoldedResults(t,r){return M(this,void 0,void 0,function*(){return(yield this.makeShowMoreFoldedResults(t,r)).log({searchUID:this.provider.getSearchUID()})})}makeShowLessFoldedResults(){return this.makeCustomEvent(q.showLessFoldedResults)}logShowLessFoldedResults(){return M(this,void 0,void 0,function*(){return(yield this.makeShowLessFoldedResults()).log({searchUID:this.provider.getSearchUID()})})}makeEventDescription(t,r){var n;return{actionCause:r,customData:(n=t.payload)===null||n===void 0?void 0:n.customData}}makeCustomEvent(t,r,n=Su[t]){return M(this,void 0,void 0,function*(){this.coveoAnalyticsClient.getParameters;let o=Object.assign(Object.assign({},this.provider.getBaseMetadata()),r),i=Object.assign(Object.assign({},yield this.getBaseEventRequest(o)),{eventType:n,eventValue:t}),a=yield this.coveoAnalyticsClient.makeCustomEvent(i);return{description:this.makeEventDescription(a,t),log:({searchUID:m})=>a.log({lastSearchQueryUid:m})}})}logCustomEvent(t,r,n=Su[t]){return M(this,void 0,void 0,function*(){return(yield this.makeCustomEvent(t,r,n)).log({searchUID:this.provider.getSearchUID()})})}makeCustomEventWithType(t,r,n){return M(this,void 0,void 0,function*(){let o=Object.assign(Object.assign({},this.provider.getBaseMetadata()),n),i=Object.assign(Object.assign({},yield this.getBaseEventRequest(o)),{eventType:r,eventValue:t}),a=yield this.coveoAnalyticsClient.makeCustomEvent(i);return{description:this.makeEventDescription(a,t),log:({searchUID:m})=>a.log({lastSearchQueryUid:m})}})}logCustomEventWithType(t,r,n){return M(this,void 0,void 0,function*(){return(yield this.makeCustomEventWithType(t,r,n)).log({searchUID:this.provider.getSearchUID()})})}logSearchEvent(t,r){return M(this,void 0,void 0,function*(){return(yield this.makeSearchEvent(t,r)).log({searchUID:this.provider.getSearchUID()})})}makeSearchEvent(t,r){return M(this,void 0,void 0,function*(){let n=yield this.getBaseSearchEventRequest(t,r),o=yield this.coveoAnalyticsClient.makeSearchEvent(n);return{description:this.makeEventDescription(o,t),log:({searchUID:i})=>o.log({searchQueryUid:i})}})}makeClickEvent(t,r,n,o){return M(this,void 0,void 0,function*(){let i=Object.assign(Object.assign(Object.assign({},r),yield this.getBaseEventRequest(Object.assign(Object.assign({},n),o))),{queryPipeline:this.provider.getPipeline(),actionCause:t}),a=yield this.coveoAnalyticsClient.makeClickEvent(i);return{description:this.makeEventDescription(a,t),log:({searchUID:m})=>a.log({searchQueryUid:m})}})}logClickEvent(t,r,n,o){return M(this,void 0,void 0,function*(){return(yield this.makeClickEvent(t,r,n,o)).log({searchUID:this.provider.getSearchUID()})})}getBaseSearchEventRequest(t,r){var n,o;return M(this,void 0,void 0,function*(){return Object.assign(Object.assign(Object.assign({},yield this.getBaseEventRequest(Object.assign(Object.assign({},r),(o=(n=this.provider).getGeneratedAnswerMetadata)===null||o===void 0?void 0:o.call(n)))),this.provider.getSearchEventRequestPayload()),{queryPipeline:this.provider.getPipeline(),actionCause:t})})}getBaseEventRequest(t){return M(this,void 0,void 0,function*(){let r=Object.assign(Object.assign({},this.provider.getBaseMetadata()),t);return Object.assign(Object.assign(Object.assign({},this.getOrigins()),this.getSplitTestRun()),{customData:r,language:this.provider.getLanguage(),facetState:this.provider.getFacetState?this.provider.getFacetState():[],anonymous:this.provider.getIsAnonymous(),clientId:yield this.getClientId()})})}getOrigins(){var t,r;return{originContext:(r=(t=this.provider).getOriginContext)===null||r===void 0?void 0:r.call(t),originLevel1:this.provider.getOriginLevel1(),originLevel2:this.provider.getOriginLevel2(),originLevel3:this.provider.getOriginLevel3()}}getClientId(){return this.coveoAnalyticsClient instanceof ut?this.coveoAnalyticsClient.getCurrentVisitorId():void 0}getSplitTestRun(){let t=this.provider.getSplitTestRunName?this.provider.getSplitTestRunName():"",r=this.provider.getSplitTestRunVersion?this.provider.getSplitTestRunVersion():"";return Object.assign(Object.assign({},t&&{splitTestRunName:t}),r&&{splitTestRunVersion:r})}makeLikeGeneratedAnswer(t){return this.makeCustomEvent(q.likeGeneratedAnswer,t)}logLikeGeneratedAnswer(t){return M(this,void 0,void 0,function*(){return(yield this.makeLikeGeneratedAnswer(t)).log({searchUID:this.provider.getSearchUID()})})}makeDislikeGeneratedAnswer(t){return this.makeCustomEvent(q.dislikeGeneratedAnswer,t)}logDislikeGeneratedAnswer(t){return M(this,void 0,void 0,function*(){return(yield this.makeDislikeGeneratedAnswer(t)).log({searchUID:this.provider.getSearchUID()})})}makeOpenGeneratedAnswerSource(t){return this.makeCustomEvent(q.openGeneratedAnswerSource,t)}logOpenGeneratedAnswerSource(t){return M(this,void 0,void 0,function*(){return(yield this.makeOpenGeneratedAnswerSource(t)).log({searchUID:this.provider.getSearchUID()})})}makeGeneratedAnswerCitationClick(t,r){return this.makeClickEvent(q.generatedAnswerCitationClick,Object.assign(Object.assign({},t),{documentPosition:1}),{contentIDKey:r.documentId.contentIdKey,contentIDValue:r.documentId.contentIdValue},r)}logGeneratedAnswerCitationClick(t,r){return M(this,void 0,void 0,function*(){return(yield this.makeGeneratedAnswerCitationClick(t,r)).log({searchUID:this.provider.getSearchUID()})})}makeGeneratedAnswerSourceHover(t){return this.makeCustomEvent(q.generatedAnswerSourceHover,t)}logGeneratedAnswerSourceHover(t){return M(this,void 0,void 0,function*(){return(yield this.makeGeneratedAnswerSourceHover(t)).log({searchUID:this.provider.getSearchUID()})})}makeGeneratedAnswerCopyToClipboard(t){return this.makeCustomEvent(q.generatedAnswerCopyToClipboard,t)}logGeneratedAnswerCopyToClipboard(t){return M(this,void 0,void 0,function*(){return(yield this.makeGeneratedAnswerCopyToClipboard(t)).log({searchUID:this.provider.getSearchUID()})})}makeGeneratedAnswerHideAnswers(t){return this.makeCustomEvent(q.generatedAnswerHideAnswers,t)}logGeneratedAnswerHideAnswers(t){return M(this,void 0,void 0,function*(){return(yield this.makeGeneratedAnswerHideAnswers(t)).log({searchUID:this.provider.getSearchUID()})})}makeGeneratedAnswerShowAnswers(t){return this.makeCustomEvent(q.generatedAnswerShowAnswers,t)}logGeneratedAnswerShowAnswers(t){return M(this,void 0,void 0,function*(){return(yield this.makeGeneratedAnswerShowAnswers(t)).log({searchUID:this.provider.getSearchUID()})})}makeGeneratedAnswerExpand(t){return this.makeCustomEvent(q.generatedAnswerExpand,t)}logGeneratedAnswerExpand(t){return M(this,void 0,void 0,function*(){return(yield this.makeGeneratedAnswerExpand(t)).log({searchUID:this.provider.getSearchUID()})})}makeGeneratedAnswerCollapse(t){return this.makeCustomEvent(q.generatedAnswerCollapse,t)}logGeneratedAnswerCollapse(t){return M(this,void 0,void 0,function*(){return(yield this.makeGeneratedAnswerCollapse(t)).log({searchUID:this.provider.getSearchUID()})})}makeGeneratedAnswerFeedbackSubmit(t){return this.makeCustomEvent(q.generatedAnswerFeedbackSubmit,t)}logGeneratedAnswerFeedbackSubmit(t){return M(this,void 0,void 0,function*(){return(yield this.makeGeneratedAnswerFeedbackSubmit(t)).log({searchUID:this.provider.getSearchUID()})})}makeGeneratedAnswerFeedbackSubmitV2(t){return this.makeCustomEvent(q.generatedAnswerFeedbackSubmitV2,t)}logGeneratedAnswerFeedbackSubmitV2(t){return M(this,void 0,void 0,function*(){return(yield this.makeGeneratedAnswerFeedbackSubmitV2(t)).log({searchUID:this.provider.getSearchUID()})})}makeRephraseGeneratedAnswer(t){return this.makeSearchEvent(q.rephraseGeneratedAnswer,t)}logRephraseGeneratedAnswer(t){return M(this,void 0,void 0,function*(){return(yield this.makeRephraseGeneratedAnswer(t)).log({searchUID:this.provider.getSearchUID()})})}makeRetryGeneratedAnswer(){return this.makeSearchEvent(q.retryGeneratedAnswer)}logRetryGeneratedAnswer(){return M(this,void 0,void 0,function*(){return(yield this.makeRetryGeneratedAnswer()).log({searchUID:this.provider.getSearchUID()})})}makeGeneratedAnswerStreamEnd(t){return this.makeCustomEvent(q.generatedAnswerStreamEnd,t)}logGeneratedAnswerStreamEnd(t){return M(this,void 0,void 0,function*(){return(yield this.makeGeneratedAnswerStreamEnd(t)).log({searchUID:this.provider.getSearchUID()})})}},So=Object.assign({},dn),bu=Object.keys(So).map(e=>So[e]),yr=class extends pa{constructor({client:t,uuidGenerator:r=zt}){super({client:t,uuidGenerator:r}),this.ticket={}}getApi(t){let r=super.getApi(t);if(r!==null)return r;switch(t){case"setTicket":return this.setTicket;default:return null}}addHooks(){this.addHooksForEvent(),this.addHooksForPageView(),this.addHooksForSVCEvents()}setTicket(t){this.ticket=t}clearPluginData(){this.ticket={}}addHooksForSVCEvents(){this.client.registerBeforeSendEventHook((t,...[r])=>bu.indexOf(t)!==-1?this.addSVCDataToPayload(t,r):r),this.client.registerAfterSendEventHook((t,...[r])=>(bu.indexOf(t)!==-1&&this.updateLocationInformation(t,r),r))}addHooksForPageView(){this.client.addEventTypeMapping(So.pageview,{newEventType:ae.collect,variableLengthArgumentsNames:["page"],addVisitorIdParameter:!0,usesMeasurementProtocol:!0})}addHooksForEvent(){this.client.addEventTypeMapping(So.event,{newEventType:ae.collect,variableLengthArgumentsNames:["eventCategory","eventAction","eventLabel","eventValue"],addVisitorIdParameter:!0,usesMeasurementProtocol:!0})}addSVCDataToPayload(t,r){var n;let o=Object.assign(Object.assign(Object.assign(Object.assign({},this.getLocationInformation(t,r)),this.getDefaultContextInformation(t)),this.action?{svcAction:this.action}:{}),Object.keys((n=this.actionData)!==null&&n!==void 0?n:{}).length>0?{svcActionData:this.actionData}:{}),i=this.getTicketPayload();return this.clearData(),Object.assign(Object.assign(Object.assign({},i),o),r)}getTicketPayload(){return Vg(this.ticket)}};yr.Id="svc";var vo;(function(e){e.click="click",e.flowStart="flowStart"})(vo||(vo={}));var He;(function(e){e.enterInterface="ticket_create_start",e.fieldUpdate="ticket_field_update",e.fieldSuggestionClick="ticket_classification_click",e.suggestionClick="suggestion_click",e.suggestionRate="suggestion_rate",e.nextCaseStep="ticket_next_stage",e.caseCancelled="ticket_cancel",e.caseSolved="ticket_cancel",e.caseCreated="ticket_create"})(He||(He={}));var Co;(function(e){e.quit="Quit",e.solved="Solved"})(Co||(Co={}));var bo=class{constructor(t,r){var n;this.options=t,this.provider=r;let o=((n=t.enableAnalytics)!==null&&n!==void 0?n:!0)&&!ho();this.coveoAnalyticsClient=o?new ut(t):new Cr,this.svc=new yr({client:this.coveoAnalyticsClient})}disable(){this.coveoAnalyticsClient=new Cr,this.svc=new yr({client:this.coveoAnalyticsClient})}enable(){this.coveoAnalyticsClient=new ut(this.options),this.svc=new yr({client:this.coveoAnalyticsClient})}logEnterInterface(t){return this.svc.setAction(He.enterInterface),this.svc.setTicket(t.ticket),this.sendFlowStartEvent()}logUpdateCaseField(t){return this.svc.setAction(He.fieldUpdate,{fieldName:t.fieldName}),this.svc.setTicket(t.ticket),this.sendClickEvent()}logSelectFieldSuggestion(t){return this.svc.setAction(He.fieldSuggestionClick,t.suggestion),this.svc.setTicket(t.ticket),this.sendClickEvent()}logSelectDocumentSuggestion(t){return this.svc.setAction(He.suggestionClick,t.suggestion),this.svc.setTicket(t.ticket),this.sendClickEvent()}logRateDocumentSuggestion(t){return this.svc.setAction(He.suggestionRate,Object.assign({rate:t.rating},t.suggestion)),this.svc.setTicket(t.ticket),this.sendClickEvent()}logMoveToNextCaseStep(t){return this.svc.setAction(He.nextCaseStep,{stage:t?.stage}),this.svc.setTicket(t.ticket),this.sendClickEvent()}logCaseCancelled(t){return this.svc.setAction(He.caseCancelled,{reason:Co.quit}),this.svc.setTicket(t.ticket),this.sendClickEvent()}logCaseSolved(t){return this.svc.setAction(He.caseSolved,{reason:Co.solved}),this.svc.setTicket(t.ticket),this.sendClickEvent()}logCaseCreated(t){return this.svc.setAction(He.caseCreated),this.svc.setTicket(t.ticket),this.sendClickEvent()}sendFlowStartEvent(){return this.coveoAnalyticsClient.sendEvent("event","svc",vo.flowStart,this.provider?{searchHub:this.provider.getOriginLevel1()}:null)}sendClickEvent(){return this.coveoAnalyticsClient.sendEvent("event","svc",vo.click,this.provider?{searchHub:this.provider.getOriginLevel1()}:null)}};var qu=e=>new ut(e).getCurrentVisitorId(),Ze=new Eu.HistoryStore,mn=(e,t)=>typeof t=="function"?(...r)=>{let n=Gr(r[0]);try{return t.apply(t,r)}catch(o){return e.error(o,"Error in analytics preprocessRequest. Returning original request."),n}}:void 0,gn=(e,t)=>(...r)=>{let n=Gr(r[1]);try{return t.apply(t,r)}catch(o){return e.error(o,"Error in analytics hook. Returning original request."),n}};p();u();d();l();p();u();d();l();var br=ye(e=>e.source,e=>Object.entries(e).map(([t,r])=>`${t}@${r}`).concat(`@coveo/headless@${ur}`));p();u();d();l();p();u();d();l();p();u();d();l();p();u();d();l();function Ao(){return{desiredCount:5,numberOfValues:8,set:{}}}p();u();d();l();p();u();d();l();p();u();d();l();function Nu(e){let{activeValue:t,ancestryMap:r}=Dh(e);return t?Mh(t,r):[]}function Dh(e){let t=[...e],r=new Map;for(;t.length>0;){let n=t.shift();if(n.state==="selected")return{activeValue:n,ancestryMap:r};if(r)for(let o of n.children)r.set(o,n);t.unshift(...n.children)}return{}}function Mh(e,t){let r=[];if(!e)return[];let n=e;do r.unshift(n),n=t.get(n);while(n);return r}var qh=(e,t)=>e.categoryFacetSet[t]?.request;var Ra=(e,t)=>{let r=qh(e,t);return Nu(r?.currentValues??[])};p();u();d();l();function wo(){return{}}p();u();d();l();function xo(){return{}}p();u();d();l();function Ro(){return{}}p();u();d();l();function Eo(){return{}}function Ea(e){return{facetSet:e.facetSet??Eo(),categoryFacetSet:e.categoryFacetSet??wo(),dateFacetSet:e.dateFacetSet??xo(),numericFacetSet:e.numericFacetSet??Ro(),automaticFacetSet:e.automaticFacetSet??Ao()}}var Pa=e=>{let t=[];return Vh(e).forEach((r,n)=>{let o=zh(e,r.facetId),i=$h(r,n+1);if(_h(r)){if(!!!Ra(e,r.facetId).length)return;t.push({...i,...Bh(e,r.facetId),facetType:o,state:"selected"});return}r.currentValues.forEach((a,m)=>{if(a.state==="idle")return;let f=_u(a,m+1,o),s=Nh(r)?Vu(a):jh(a);t.push({...i,...f,...s})})}),Lh(e).forEach((r,n)=>{let o=Qh(r,n+1);r.values.forEach((i,a)=>{if(i.state==="idle")return;let m=_u(i,a+1,"specific"),f=Vu(i);t.push({...o,...m,...f})})}),t},Nh=e=>e.type==="specific",_h=e=>e.type==="hierarchical",Vh=e=>[...Object.values(e.facetSet),...Object.values(e.categoryFacetSet),...Object.values(e.dateFacetSet),...Object.values(e.numericFacetSet)].map(t=>t.request),Lh=e=>[...Object.values(e.automaticFacetSet.set)].map(t=>t.response),_u=(e,t,r)=>({state:e.state,valuePosition:t,facetType:r}),jh=e=>({displayValue:`${e.start}..${e.end}`,value:`${e.start}..${e.end}`,start:e.start,end:e.end,endInclusive:e.endInclusive}),Vu=e=>({displayValue:e.value,value:e.value}),Uh=(e,t)=>Ra(e,t).map(n=>n.value).join(";"),Bh=(e,t)=>{let n=Uh(e,t);return{value:n,valuePosition:1,displayValue:n}},Qh=(e,t)=>({title:Lu(e.field,e.field),field:e.field,id:e.field,facetPosition:t}),$h=(e,t)=>({title:Lu(e.field,e.facetId),field:e.field,id:e.facetId,facetPosition:t}),Lu=(e,t)=>`${e}_${t}`,Hh=(e,t)=>e.facetSet[t]?.request||e.categoryFacetSet[t]?.request||e.dateFacetSet[t]?.request||e.numericFacetSet[t]?.request||e.automaticFacetSet.set[t]?.response,zh=(e,t)=>{let r=Hh(e,t);return r?r.type:"specific"};p();u();d();l();var Ve=()=>({q:"",enableQuerySyntax:!1});p();u();d();l();p();u();d();l();var ju=(r=>(r.Ascending="ascending",r.Descending="descending",r))(ju||{}),Uu=(i=>(i.Relevancy="relevancy",i.QRE="qre",i.Date="date",i.Field="field",i.NoSort="nosort",i))(Uu||{}),Ia=e=>{if(ec(e))return e.map(t=>Ia(t)).join(",");switch(e.by){case"relevancy":case"qre":case"nosort":return e.by;case"date":return`date ${e.order}`;case"field":return`@${e.field} ${e.order}`;default:return""}},Bu=()=>({by:"relevancy"});var DI=new G({values:{by:new Oi({enum:Uu,required:!0}),order:new Oi({enum:ju}),field:new H}});function Po(){return Ia(Bu())}p();u();d();l();p();u();d();l();var Ct=()=>"default";var Wh=e=>{let t=e.configuration.search.locale.split("-")[0];return!t||t.length!==2?"en":t},Wt=class{constructor(t){this.getState=t;de(this,"state");this.state=t()}getLanguage(){return Wh(this.state)}getBaseMetadata(){let{context:t,configuration:r}=this.state,n=t?.contextValues||{},o={};for(let[i,a]of Object.entries(n)){let m=`context_${i}`;o[m]=a}return r.analytics.analyticsMode==="legacy"&&(o.coveoHeadlessVersion=ur),o}getOriginContext(){return this.state.configuration.analytics.originContext}getOriginLevel1(){return this.state.searchHub||Ct()}getOriginLevel2(){return this.state.configuration.analytics.originLevel2}getOriginLevel3(){return this.state.configuration.analytics.originLevel3}getIsAnonymous(){return this.state.configuration.analytics.anonymous}};var hn=class hn extends Wt{constructor(){super(...arguments);de(this,"getFacetRequest",r=>this.state.facetSet?.[r]?.request||this.state.categoryFacetSet?.[r]?.request||this.state.dateFacetSet?.[r]?.request||this.state.numericFacetSet?.[r]?.request||this.state.automaticFacetSet?.set[r]?.response)}getFacetState(){return Pa(Ea(this.getState()))}getPipeline(){return this.state.pipeline||this.state.search?.response.pipeline||hn.fallbackPipelineName}getSearchEventRequestPayload(){return{queryText:this.queryText,responseTime:this.responseTime,results:this.resultURIs,numberOfResults:this.numberOfResults}}getSearchUID(){let r=this.getState();return r.search?.searchResponseId||r.search?.response.searchUid||We().response.searchUid}getSplitTestRunName(){return this.state.search?.response.splitTestRun}getSplitTestRunVersion(){let r=!!this.getSplitTestRunName(),n=this.state.search?.response.pipeline||this.state.pipeline||hn.fallbackPipelineName;return r?n:void 0}getBaseMetadata(){let r=this.getState(),n=super.getBaseMetadata(),o=r.search?.response?.extendedResults?.generativeQuestionAnsweringId;return o&&(n.generativeQuestionAnsweringId=o),n}getFacetMetadata(r,n){let i=this.getFacetRequest(r)?.field??"";return{...this.getBaseMetadata(),facetId:r,facetField:i,facetValue:n,facetTitle:`${i}_${r}`}}getFacetClearAllMetadata(r){let o=this.getFacetRequest(r)?.field??"";return{...this.getBaseMetadata(),facetId:r,facetField:o,facetTitle:`${o}_${r}`}}getFacetUpdateSortMetadata(r,n){let i=this.getFacetRequest(r)?.field??"";return{...this.getBaseMetadata(),facetId:r,facetField:i,criteria:n,facetTitle:`${i}_${r}`}}getRangeBreadcrumbFacetMetadata(r,n){let i=this.getFacetRequest(r)?.field??"";return{...this.getBaseMetadata(),facetId:r,facetField:i,facetRangeEnd:n.end,facetRangeEndInclusive:n.endInclusive,facetRangeStart:n.start,facetTitle:`${i}_${r}`}}getResultSortMetadata(){return{...this.getBaseMetadata(),resultsSortBy:this.state.sortCriteria??Po()}}getStaticFilterToggleMetadata(r,n){return{...this.getBaseMetadata(),staticFilterId:r,staticFilterValue:n}}getStaticFilterClearAllMetadata(r){return{...this.getBaseMetadata(),staticFilterId:r}}getUndoTriggerQueryMetadata(r){return{...this.getBaseMetadata(),undoneQuery:r}}getCategoryBreadcrumbFacetMetadata(r,n){let i=this.getFacetRequest(r)?.field??"";return{...this.getBaseMetadata(),categoryFacetId:r,categoryFacetField:i,categoryFacetPath:n,categoryFacetTitle:`${i}_${r}`}}getOmniboxAnalyticsMetadata(r,n){let o=this.state.querySuggest&&this.state.querySuggest[r],i=o.completions.map(s=>s.expression),a=o.partialQueries.length-1,m=o.partialQueries[a]||"",f=o.responseId;return{...this.getBaseMetadata(),suggestionRanking:i.indexOf(n),partialQuery:m,partialQueries:o.partialQueries.length>0?o.partialQueries:"",suggestions:i.length>0?i:"",querySuggestResponseId:f}}getInterfaceChangeMetadata(){return{...this.getBaseMetadata(),interfaceChangeTo:this.state.configuration.analytics.originLevel2}}getOmniboxFromLinkMetadata(r){return{...this.getBaseMetadata(),...r}}getGeneratedAnswerMetadata(){let r=this.getState(),n={};return r.generatedAnswer?.isVisible!==void 0&&(n.showGeneratedAnswer=r.generatedAnswer.isVisible),n}get resultURIs(){return this.results?.map(r=>({documentUri:r.uri,documentUriHash:r.raw.urihash}))}get results(){return this.state.search?.response.results}get queryText(){return this.state.query?.q||Ve().q}get responseTime(){return this.state.search?.duration||We().duration}get numberOfResults(){return this.state.search?.response.totalCountFiltered||We().response.totalCountFiltered}};de(hn,"fallbackPipelineName","default");var bt=hn,Qu=({logger:e,getState:t,analyticsClientMiddleware:r=(i,a)=>a,preprocessRequest:n,provider:o=new bt(t)})=>{let i=t(),a=i.configuration.accessToken,m=i.configuration.analytics.apiBaseUrl??Ie(i.configuration.organizationId,i.configuration.environment,"analytics"),f=i.configuration.analytics.runtimeEnvironment,s=i.configuration.analytics.enabled,h=new yo({token:a,endpoint:m,runtimeEnvironment:f,preprocessRequest:mn(e,n),beforeSendHooks:[gn(e,r),(y,S)=>(e.info({...S,type:y,endpoint:m,token:a},"Analytics request"),S)]},o);return s||h.disable(),h},Ta=()=>{let t=Ze.getHistory().reverse().find(r=>r.name==="PageView"&&r.value);return t?t.value:""};var Io=/*#__PURE__*/function(){var _ref7=_asyncToGenerator(function*(e,t){let r=e.analyticsMode==="next";return{analytics:{clientId:yield qu(e),clientTimestamp:new Date().toISOString(),documentReferrer:e.originLevel3,originContext:e.originContext,...(t&&{actionCause:t.actionCause,customData:t.customData}),...(t&&!r&&{customData:t.customData}),...(e.userDisplayName&&{userDisplayName:e.userDisplayName}),...(e.documentLocation&&{documentLocation:e.documentLocation}),...(e.deviceId&&{deviceId:e.deviceId}),...(Ta()&&{pageId:Ta()}),...(r&&e.trackingId&&{trackingId:e.trackingId}),capture:r,...(r&&{source:br(e)})}}});return function Io(_x9,_x10){return _ref7.apply(this,arguments)}}();p();u();d();l();p();u();d();l();p();u();d();l();var Ar=()=>({duration:0,error:null,isLoading:!1,id:"Recommendation",recommendations:[],searchUid:"",splitTestRun:"",pipeline:""});var yn=class extends Wt{getPipeline(){return this.state.pipeline||this.state.recommendation?.pipeline||"default"}getSearchEventRequestPayload(){return{queryText:Ve().q,responseTime:this.responseTime,results:this.mapResultsToAnalyticsDocument(),numberOfResults:this.numberOfResults}}getSearchUID(){return this.getState().recommendation?.searchUid||Ar().searchUid}getSplitTestRunName(){return this.state.recommendation?.splitTestRun}getSplitTestRunVersion(){let t=!!this.getSplitTestRunName(),r=this.state.recommendation?.pipeline||this.state.pipeline||"default";return t?r:void 0}get responseTime(){return this.state.recommendation?.duration||Ar().duration}mapResultsToAnalyticsDocument(){return this.state.recommendation?.recommendations.map(t=>({documentUri:t.uri,documentUriHash:t.raw.urihash}))}get numberOfResults(){return this.state.recommendation?.recommendations.length||Ar().recommendations.length}};p();u();d();l();p();u();d();l();p();u();d();l();function Gh({config:e,environment:t,event:r,listenerManager:n}){let{url:o,token:i,mode:a}=e;a!=="disabled"&&(n.call(r),t.send(o,i,r))}var Kh=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i;function Yh(e){return typeof e=="string"&&Kh.test(e)}var Re=[];for(let e=0;e<256;++e)Re.push((e+256).toString(16).slice(1));function Jh(e,t=0){return(Re[e[t+0]]+Re[e[t+1]]+Re[e[t+2]]+Re[e[t+3]]+"-"+Re[e[t+4]]+Re[e[t+5]]+"-"+Re[e[t+6]]+Re[e[t+7]]+"-"+Re[e[t+8]]+Re[e[t+9]]+"-"+Re[e[t+10]]+Re[e[t+11]]+Re[e[t+12]]+Re[e[t+13]]+Re[e[t+14]]+Re[e[t+15]]).toLowerCase()}var Fa,Xh=new Uint8Array(16);function Zh(){if(!Fa){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Fa=crypto.getRandomValues.bind(crypto)}return Fa(Xh)}var ey=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),$u={randomUUID:ey};function ty(e,t,r){if($u.randomUUID&&!e)return $u.randomUUID();e=e||{};let n=e.random??e.rng?.()??Zh();if(n.length<16)throw new Error("Random bytes length must be >= 16");return n[6]=n[6]&15|64,n[8]=n[8]&63|128,Jh(n)}function ry(e){return{getClientId:()=>{let t="visitorId",r=e.get(),n=r.storage,o=n.getItem(t),i=o&&Yh(o)?o:r.generateUUID();return n.setItem(t,i),i}}}var zu="1.0.0";function ny(e){let{trackingId:t}=e;return{trackingId:t}}function oy(e){return(e.source||[]).concat([`relay@${zu}`])}function Wu(e,t,r,n){let{getReferrer:o,getLocation:i,getUserAgent:a}=r,m=ny(t),f=n.getClientId();return Object.freeze({type:e,config:m,ts:Date.now(),source:oy(t),clientId:f,userAgent:a(),referrer:o(),location:i()})}function iy(e,t,r,n,o){return{...t,meta:Wu(e,r,n,o)}}var ay="*";function sy(){let e=[];function t({type:f,callback:s}){return e.findIndex(h=>h.type===f&&h.callback===s)}function r(f,s){return f.type==="*"||s===f.type}function n(f){return t(f)<0&&e.push(f),()=>m(f.type,f.callback)}function o(f){e.forEach(s=>{if(r(s,f.meta.type))try{s.callback(f)}catch(h){console.error(h)}})}function i(f){if(f===ay)e.length=0;else for(let s=e.length-1;s>=0;s--)e[s].type===f&&e.splice(s,1)}function a(f){let s=t(f);s>=0&&e.splice(s,1)}function m(f,s){s?a({type:f,callback:s}):i(f)}return{add:n,call:o,remove:m}}function Hu({url:e,token:t,trackingId:r,...n}){return Object.freeze({url:e,token:t,trackingId:r,...(!!n.mode&&{mode:n.mode}),...(!!n.source&&{source:n.source})})}function cy(e){let t=Hu(e);return{get:()=>t,update:r=>{t=Hu({...t,...r})}}}function uy(){let e=typeof window<"u";return{sendMessage(t){e&&window.postMessage(t,"*")}}}var ka=ly();function ly(){let e="coveo_",t=r=>{let n=r.split(".").slice(-2);return n.length==2?n.join("."):""};return{getItem(r){let n=`${e}${r}=`,o=document.cookie.split(";");for(let i of o){let a=i.replace(/^\s+/,"");if(a.lastIndexOf(n,0)===0)return a.substring(n.length,a.length)}return null},setItem(r,n,o){let i=t(window.location.hostname),a=`;expires=${new Date(new Date().getTime()+o).toUTCString()}`,m=i?`;domain=${i}`:"";document.cookie=`${e}${r}=${n}${a}${m};path=/;SameSite=Lax`},removeItem(r){this.setItem(r,"",-1)}}}function dy(){return{getItem(e){return ka.getItem(e)||localStorage.getItem(e)},removeItem(e){ka.removeItem(e),localStorage.removeItem(e)},setItem(e,t){localStorage.setItem(e,t),ka.setItem(e,t,31556952e3)}}}function py(){let e=document.referrer;return e===""?null:e}function fy(){return{runtime:"browser",send:(e,t,r)=>{let n=navigator.sendBeacon(`${e}?access_token=${t}`,new Blob([JSON.stringify([r])],{type:"application/json"}));if(uy().sendMessage({kind:"EVENT_PROTOCOL",event:r,url:e,token:t}),!n)throw new Error("Failed to send the event(s) because the payload size exceeded the maximum allowed size (32 KB). Please contact support if the problem persists.")},getReferrer:()=>py(),getLocation:()=>window.location.href,getUserAgent:()=>navigator.userAgent,generateUUID:()=>ty(),storage:dy()}}function my(){try{let e="__storage_test__";return localStorage.setItem(e,e),localStorage.removeItem(e),!0}catch(e){return e instanceof DOMException&&e.name==="QuotaExceededError"&&localStorage&&localStorage.length!==0}}function gy(){return{getItem(){return null},removeItem(){},setItem(){}}}function hy(){return{runtime:"null",send:()=>{},getReferrer:()=>null,getLocation:()=>null,getUserAgent:()=>null,generateUUID:()=>"",storage:gy()}}function yy(e){return e.get().mode!=="disabled"&&Sy()&&my()?fy():hy()}function Sy(){try{return typeof window=="object"}catch{return!1}}function vy(e){return{get:()=>Object.freeze(yy(e))}}function Gu(e){let t=cy(e),r=sy(),n=vy(t),o=ry(n);return{emit:(i,a)=>{let m=t.get(),f=n.get(),s=iy(i,a,m,f,o);return Gh({config:m,environment:f,event:s,listenerManager:r})},getMeta:i=>Wu(i,t.get(),n.get(),o),on:(i,a)=>r.add({type:i,callback:a}),off:(i,a)=>r.remove(i,a),updateConfig:i=>t.update(i),version:zu}}var wr=ye(e=>e.configuration.organizationId,e=>e.configuration.environment,e=>e.configuration.accessToken,e=>e.configuration.analytics,e=>br(e.configuration.analytics),(e,t,r,{trackingId:n,apiBaseUrl:o,enabled:i},a)=>Gu({mode:i?"emit":"disabled",url:o??Vn(e,t),token:r,trackingId:n,source:a}));p();u();d();l();var Sn=class{constructor(t){de(this,"state");this.state=t()}getSearchUID(){return null}getOriginLevel1(){return this.state.searchHub||Ct()}},Ku=({logger:e,getState:t,analyticsClientMiddleware:r=(i,a)=>a,preprocessRequest:n,provider:o=new Sn(t)})=>{let i=t(),a=i.configuration.accessToken,m=i.configuration.analytics.apiBaseUrl??Ie(i.configuration.organizationId,i.configuration.environment,"analytics"),f=i.configuration.analytics.runtimeEnvironment,s=i.configuration.analytics.enabled,h=new bo({enableAnalytics:s,token:a,endpoint:m,runtimeEnvironment:f,preprocessRequest:mn(e,n),beforeSendHooks:[gn(e,r),(y,S)=>(e.info({...S,type:y,endpoint:m,token:a},"Analytics request"),S)]},o);return s||h.disable(),h};p();u();d();l();p();u();d();l();function Yu(e){let t=Ju(e),r=[e,...t].filter(o=>o.parentResult).map(o=>o.parentResult);return rc([e,...t,...r],o=>o.uniqueId)}function Ju(e){return e.childResults?e.childResults.flatMap(t=>[t,...Ju(t)]):[]}function Xu(e,t){return{...new bt(t).getBaseMetadata(),actionCause:e,type:e}}function Cy(e){return Object.assign(e,{instantlyCallable:!0})}function by(e,t){let r=i=>Cy(ue(e,i)),n=r(/*#__PURE__*/function(){var _ref8=_asyncToGenerator(function*(i,{getState:a,extra:m}){let{analyticsClientMiddleware:f,preprocessRequest:s,logger:h}=m;return yield(yield t({getState:a,analyticsClientMiddleware:f,preprocessRequest:s,logger:h})).log({state:a(),extra:m})});return function(_x11,_x12){return _ref8.apply(this,arguments)}}());return Object.assign(n,{prepare:function(){var _ref9=_asyncToGenerator(function*({getState:i,analyticsClientMiddleware:a,preprocessRequest:m,logger:f}){let{description:s,log:h}=yield t({getState:i,analyticsClientMiddleware:a,preprocessRequest:m,logger:f});return{description:s,action:r(/*#__PURE__*/function(){var _ref10=_asyncToGenerator(function*(y,{getState:S,extra:g}){return yield h({state:S(),extra:g})});return function(_x14,_x15){return _ref10.apply(this,arguments)}}())}});return function prepare(_x13){return _ref9.apply(this,arguments)}}()}),n}var Zu=(e,t,r)=>{function n(...o){let i=o.length===1?{...o[0],__legacy__getBuilder:t(o[0].__legacy__getBuilder),analyticsConfigurator:e,providerClass:r}:{prefix:o[0],__legacy__getBuilder:t(o[1]),__legacy__provider:o[2],analyticsConfigurator:e,providerClass:r};return xy(i)}return n},Ay=e=>e.configuration.analytics.analyticsMode==="legacy",wy=e=>e.configuration.analytics.analyticsMode==="next",xy=({prefix:e,__legacy__getBuilder:t,__legacy__provider:r,analyticsPayloadBuilder:n,analyticsType:o,analyticsConfigurator:i,providerClass:a})=>(r??(r=m=>new a(m)),by(e,/*#__PURE__*/function(){var _ref11=_asyncToGenerator(function*({getState:m,analyticsClientMiddleware:f,preprocessRequest:s,logger:h}){let y=[],S={log:function(){var _ref12=_asyncToGenerator(function*({state:x}){for(let T of y)yield T(x)});return function log(_x17){return _ref12.apply(this,arguments)}}()},g=m(),v=i({getState:m,logger:h,analyticsClientMiddleware:f,preprocessRequest:s,provider:r(m)}),R=yield t(v,m());S.description=R?.description,y.push(/*#__PURE__*/function(){var _ref13=_asyncToGenerator(function*(x){Ay(x)&&(yield Ry(R,r,x,h,v.coveoAnalyticsClient))});return function(_x18){return _ref13.apply(this,arguments)}}());let{emit:I}=wr(g);return y.push(/*#__PURE__*/function(){var _ref14=_asyncToGenerator(function*(x){if(wy(x)&&o&&n){let T=n(x);yield Oy(I,o,T)}});return function(_x19){return _ref14.apply(this,arguments)}}()),S});return function(_x16){return _ref11.apply(this,arguments)}}()));function Ry(_x20,_x21,_x22,_x23,_x24){return _Ry.apply(this,arguments)}function _Ry(){_Ry=_asyncToGenerator(function*(e,t,r,n,o){t(()=>r);let i=yield e?.log({searchUID:t(()=>r).getSearchUID()});n.info({client:o,response:i},"Analytics response")});return _Ry.apply(this,arguments)}var Ey=e=>r=>(n,o)=>Promise.resolve({description:{actionCause:e},log:function(){var _ref15=_asyncToGenerator(function*(i){r(n,o)});return function log(_x25){return _ref15.apply(this,arguments)}}()}),qe=Zu(Qu,e=>e,bt),JF=Zu(Ku,Ey("caseAssist"),Sn);var Oa=(e,t)=>{let r=i=>i+(t.pagination?.firstResult??0),n=-1,o=t.search?.results;return n=ol(e,o),n<0&&(n=ky(e,o)),n<0&&(n=0),tl(e,r(n),t)},el=(e,t)=>{let r=t.recommendation?.recommendations.findIndex(({uniqueId:n})=>e.uniqueId===n)||0;return tl(e,r,t)};function tl(e,t,r){let n=e.raw.collection;return{collectionName:typeof n=="string"?n:"default",documentAuthor:Ty(e),documentPosition:t+1,documentTitle:e.title,documentUri:e.uri,documentUriHash:e.raw.urihash,documentUrl:e.clickUri,rankingModifier:e.rankingModifier||"",sourceName:Fy(e),queryPipeline:r.pipeline||mr()}}var To=e=>(e.raw.permanentid||console.warn("Missing field permanentid on result. This might cause many issues with your Coveo deployment. See https://docs.coveo.com/en/1913 and https://docs.coveo.com/en/1640 for more information.",e),{contentIDKey:"permanentid",contentIDValue:e.raw.permanentid||""}),rl={urihash:new H,sourcetype:new H,permanentid:new H},nl={uniqueId:K,raw:new G({values:rl}),title:K,uri:K,clickUri:K,rankingModifier:new H({required:!1,emptyAllowed:!0})};function Py(e){return Object.assign({},...Object.keys(rl).map(t=>({[t]:e[t]})))}function Iy(e){return Object.assign({},...Object.keys(nl).map(t=>({[t]:e[t]})),{raw:Py(e.raw)})}function Ty(e){let t=e.raw.author;return X(t)?"unknown":Array.isArray(t)?t.join(";"):`${t}`}function Fy(e){let t=e.raw.source;return X(t)?"unknown":t}var Da=e=>new Fe(nl).validate(Iy(e));function ky(e,t){for(let[r,n]of t.entries()){let o=Yu(n);if(ol(e,o)!==-1)return r}return-1}function ol(e,t=[]){return t.findIndex(({uniqueId:r})=>r===e.uniqueId)}function Oy(_x26,_x27,_x28){return _Oy.apply(this,arguments)}function _Oy(){_Oy=_asyncToGenerator(function*(e,t,r){yield e(t,r)});return _Oy.apply(this,arguments)}p();u();d();l();var il=()=>qe("analytics/recommendation/update",e=>e.makeRecommendationInterfaceLoad(),e=>new yn(e)),al=()=>({actionCause:"recommendationInterfaceLoad"}),ko=e=>qe({prefix:"analytics/recommendation/open",__legacy__getBuilder:(t,r)=>(Da(e),t.makeRecommendationOpen(el(e,r),To(e))),__legacy__provider:t=>new yn(t),analyticsType:"itemClick",analyticsPayloadBuilder:t=>{let r=Oa(e,t),n=To(e);return{searchUid:e.searchUid??"",position:r.documentPosition,itemMetadata:{uniqueFieldName:n.contentIDKey,uniqueFieldValue:n.contentIDValue,title:r.documentTitle,author:r.documentAuthor,url:r.documentUrl}}}});var xr=D("recommendation/set",e=>B(e,{id:K})),At=ue("recommendation/get",/*#__PURE__*/function(){var _ref16=_asyncToGenerator(function*(e,{getState:t,rejectWithValue:r,extra:{apiClient:n}}){let o=t(),i=new Date().getTime(),a=yield Dy(o),m=yield n.recommendations(a),f=new Date().getTime()-i;return ke(m)?r(m.error):{recommendations:m.success.results,analyticsAction:il(),duration:f,searchUid:m.success.searchUid,splitTestRun:m.success.splitTestRun,pipeline:m.success.pipeline}});return function(_x29,_x30){return _ref16.apply(this,arguments)}}()),Dy=/*#__PURE__*/function(){var _ref17=_asyncToGenerator(function*(e){return{accessToken:e.configuration.accessToken,organizationId:e.configuration.organizationId,url:e.configuration.search.apiBaseUrl??gt(e.configuration.organizationId,e.configuration.environment),recommendation:e.recommendation.id,tab:e.configuration.analytics.originLevel2,referrer:e.configuration.analytics.originLevel3,timezone:e.configuration.search.timezone,locale:e.configuration.search.locale,actionsHistory:e.configuration.analytics.enabled?Ze.getHistory():[],...(e.advancedSearchQueries&&{aq:e.advancedSearchQueries.aq,cq:e.advancedSearchQueries.cq}),...(e.pipeline&&{pipeline:e.pipeline}),...(e.searchHub&&{searchHub:e.searchHub}),...(e.context&&{context:e.context.contextValues}),...(e.dictionaryFieldContext&&{dictionaryFieldContext:e.dictionaryFieldContext.contextValues}),...(e.fields&&{fieldsToInclude:e.fields.fieldsToInclude}),...(e.configuration.analytics.enabled&&(yield My(e,al()))),...(e.configuration.search.authenticationProviders.length&&{authentication:e.configuration.search.authenticationProviders.join(",")}),...(e.pagination&&{numberOfResults:e.pagination.numberOfResults})}});return function Dy(_x31){return _ref17.apply(this,arguments)}}(),My=/*#__PURE__*/function(){var _ref18=_asyncToGenerator(function*(e,t){let r=e.configuration.analytics.analyticsMode==="legacy"?void 0:{actionCause:t.actionCause,type:t.actionCause};return yield Io(e.configuration.analytics,r)});return function My(_x32,_x33){return _ref18.apply(this,arguments)}}();var Rr=me(Ar(),e=>{e.addCase(xr,(t,r)=>{t.id=r.payload.id}).addCase(At.rejected,(t,r)=>{t.error=r.payload?r.payload:null,t.isLoading=!1}).addCase(At.fulfilled,(t,r)=>{t.error=null,t.recommendations=r.payload.recommendations.map(n=>({...n,searchUid:r.payload.searchUid})),t.duration=r.payload.duration,t.isLoading=!1,t.searchUid=r.payload.searchUid,t.splitTestRun=r.payload.splitTestRun,t.pipeline=r.payload.pipeline}).addCase(At.pending,t=>{t.isLoading=!0})});p();u();d();l();var Er=D("searchHub/set",e=>B(e,new H({required:!0,emptyAllowed:!0})));p();u();d();l();var Pr=me(Ct(),e=>{e.addCase(Er,(t,r)=>r.payload).addCase(Me.fulfilled,(t,r)=>r.payload?.searchHub??t).addCase(Je,(t,r)=>r.payload.searchHub||t)});p();u();d();l();p();u();d();l();p();u();d();l();p();u();d();l();p();u();d();l();p();u();d();l();var vn=ye(e=>e.query,e=>e);var sl=e=>Ny(e)?{answerAPIEnabled:!0,id:ul(e).data?.answerId}:qy(e)?{answerAPIEnabled:!1,id:e.search.response.extendedResults.generativeQuestionAnsweringId}:{answerAPIEnabled:!1,id:void 0},qy=e=>"search"in e,Ny=e=>"answer"in e&&"generatedAnswer"in e&&!X(e.generatedAnswer?.answerConfigurationId),cl=e=>e.generatedAnswer?.fieldsToIncludeInCitations,_y=ye(e=>e.generatedAnswer?.citations,(e,t)=>t,(e,t)=>e?.find(r=>r.id===t)),mO=ye(e=>vn(e)?.q,e=>e.search.requestId,(e,t)=>({q:e,requestId:t}));var Oo=e=>qe({prefix:"analytics/generatedAnswer/streamEnd",__legacy__getBuilder:(t,r)=>{let{id:n,answerAPIEnabled:o}=sl(r),i=e?!r.generatedAnswer?.answer||!r.generatedAnswer?.answer.length:void 0;return n?t.makeGeneratedAnswerStreamEnd({...(o?{answerAPIStreamId:n}:{generativeQuestionAnsweringId:n}),answerGenerated:e,answerTextIsEmpty:i}):null},analyticsType:"Rga.StreamEnd",analyticsPayloadBuilder:t=>({responseId:t.search?.response.searchUid||"",answerGenerated:!0})});p();u();d();l();var ll=/*#__PURE__*/function(){var _ref19=_asyncToGenerator(function*(e){return{accessToken:e.configuration.accessToken,organizationId:e.configuration.organizationId,url:Ie(e.configuration.organizationId,e.configuration.environment),streamId:e.search.extendedResults?.generativeQuestionAnsweringId}});return function ll(_x34){return _ref19.apply(this,arguments)}}();p();u();d();l();var dl=["text/plain","text/markdown"];var Ir=new H({required:!0}),fl=new H,Tr=new te({required:!0}),Vy={id:Ir,title:Ir,uri:Ir,permanentid:Ir,clickUri:fl},ml=new H({required:!0,constrainTo:dl}),JO=D("generatedAnswer/setIsVisible",e=>B(e,Tr)),XO=D("generatedAnswer/setIsEnabled",e=>B(e,Tr)),qa=D("generatedAnswer/updateMessage",e=>B(e,{textDelta:Ir})),Na=D("generatedAnswer/updateCitations",e=>B(e,{citations:new ie({required:!0,each:new G({values:Vy})})})),Ly=D("generatedAnswer/updateError",e=>B(e,{message:fl,code:new J({min:0})})),jy=D("generatedAnswer/resetAnswer"),ZO=D("generatedAnswer/like"),eD=D("generatedAnswer/dislike"),tD=D("generatedAnswer/feedbackModal/open"),rD=D("generatedAnswer/expand"),nD=D("generatedAnswer/collapse"),oD=D("generatedAnswer/setId",e=>B(e,{id:new H({required:!0})})),iD=D("generatedAnswer/feedbackModal/close"),aD=D("generatedAnswer/sendFeedback"),Ma=D("generatedAnswer/setIsLoading",e=>B(e,Tr)),pl=D("generatedAnswer/setIsStreaming",e=>B(e,Tr)),_a=D("generatedAnswer/setAnswerContentFormat",e=>B(e,ml)),sD=D("generatedAnswer/updateResponseFormat",e=>B(e,{contentFormat:new ie({each:ml,default:["text/plain"]})})),cD=D("knowledge/updateAnswerConfigurationId",e=>B(e,Ir)),uD=D("generatedAnswer/registerFieldsToIncludeInCitations",e=>B(e,to)),Uy=D("generatedAnswer/setIsAnswerGenerated",e=>B(e,Tr)),Va=D("generatedAnswer/setCannotAnswer",e=>B(e,Tr)),lD=ue("generatedAnswer/streamAnswer",/*#__PURE__*/function(){var _ref20=_asyncToGenerator(function*(e,t){let r=t.getState(),{dispatch:n,extra:o,getState:i}=t,{search:a}=i(),{queryExecuted:m}=a,{setAbortControllerRef:f}=e,s=yield ll(r),h=(g,v)=>{switch(g){case"genqa.headerMessageType":{let R=JSON.parse(v);n(_a(R.contentFormat));break}case"genqa.messageType":n(qa(JSON.parse(v)));break;case"genqa.citationsType":n(Na(JSON.parse(v)));break;case"genqa.endOfStreamType":{let R=JSON.parse(v).answerGenerated,I=m.length!==0&&!R;n(Va(I)),n(pl(!1)),n(Uy(R)),n(Oo(R));break}default:r.debug&&o.logger.warn(`Unknown payloadType: "${g}"`)}};n(Ma(!0));let y=g=>g.streamId===t.getState().search.extendedResults.generativeQuestionAnsweringId,S=o.streamingClient?.streamGeneratedAnswer(s,{write:g=>{y(s)&&(n(Ma(!1)),g.payload&&g.payloadType&&h(g.payloadType,g.payload))},abort:g=>{y(s)&&n(Ly(g))},close:()=>{y(s)&&n(pl(!1))},resetAnswer:()=>{y(s)&&n(jy())}});S?f(S):n(Ma(!1))});return function(_x35,_x36){return _ref20.apply(this,arguments)}}());p();u();d();l();p();u();d();l();var gl=ye(e=>e.pipeline,e=>e);p();u();d();l();var hl=ye(e=>e.searchHub,e=>e);p();u();d();l();p();u();d();l();var Cn=je(Do(),1),Al=je(yl(),1);p();u();d();l();var Mo=je(Do(),1),vl=je(Sl(),1);Mo.default.extend(vl.default);var Cl="YYYY/MM/DD@HH:mm:ss",By="1401-01-01";function Fr(e,t){let r=(0,Mo.default)(e,t);return!r.isValid()&&!t?(0,Mo.default)(e,Cl):r}function qo(e){return e.format(Cl)}function bl(e,t){let r=Fr(e,t);if(!r.isValid()){let n=". Please provide a date format string in the configuration options. See https://day.js.org/docs/en/parse/string-format for more information.",o=` with the format "${t}"`;throw new Error(`Could not parse the provided date "${e}"${t?o:n}`)}Ha(r)}function Ha(e){if(e.isBefore(By))throw new Error(`Date is before year 1401, which is unsupported by the API: ${e}`)}Cn.default.extend(Al.default);var wl=["past","now","next"],xl=["minute","hour","day","week","month","quarter","year"],Qy=e=>{let t=e==="now";return{amount:new J({required:!t,min:1}),unit:new H({required:!t,constrainTo:xl}),period:new H({required:!0,constrainTo:wl})}};function za(e){if(typeof e=="string"&&!wt(e))throw new Error(`The value "${e}" is not respecting the relative date format "period-amount-unit"`);let t=typeof e=="string"?Tl(e):e;new Fe(Qy(t.period)).validate(t);let r=El(t),n=JSON.stringify(t);if(!r.isValid())throw new Error(`Date is invalid: ${n}`);Ha(r)}function Rl(e){let{period:t,amount:r,unit:n}=e;switch(t){case"past":case"next":return`${t}-${r}-${n}`;case"now":return t}}function El(e){let{period:t,amount:r,unit:n}=e;switch(t){case"past":return(0,Cn.default)().subtract(r,n);case"next":return(0,Cn.default)().add(r,n);case"now":return(0,Cn.default)()}}function bn(e){return qo(El(Tl(e)))}function Pl(e){return e.toLocaleLowerCase().split("-")}function wt(e){let[t,r,n]=Pl(e);if(t==="now")return!0;if(!wl.includes(t)||!xl.includes(n))return!1;let o=parseInt(r);return!(isNaN(o)||o<=0)}function Il(e){return!!e&&typeof e=="object"&&"period"in e}function Tl(e){let[t,r,n]=Pl(e);return t==="now"?{period:"now"}:{period:t,amount:r?parseInt(r):void 0,unit:n||void 0}}p();u();d();l();function Fl(e){return e.type==="dateRange"}function kl(e){return`start${e}`}function Ol(e){return`end${e}`}var Wa=()=>({dateFacetValueMap:{}});function $y(e,t,r){let n=e.start,o=e.end;return wt(n)&&(n=bn(n),r.dateFacetValueMap[t][kl(n)]=e.start),wt(o)&&(o=bn(o),r.dateFacetValueMap[t][Ol(o)]=e.end),{...e,start:n,end:o}}function Ga(e,t){if(Fl(e)){let{facetId:r,currentValues:n}=e;return t.dateFacetValueMap[r]={},{...e,currentValues:n.map(o=>$y(o,r,t))}}return e}function xt(e){let t=Wa();return{request:{...e,facets:e.facets?.map(n=>Ga(n,t))},mappings:t}}function Hy(e,t,r){return{...e,start:r.dateFacetValueMap[t][kl(e.start)]||e.start,end:r.dateFacetValueMap[t][Ol(e.end)]||e.end}}function zy(e,t){return e.facetId in t.dateFacetValueMap}function Wy(e,t){return zy(e,t)?{...e,values:e.values.map(r=>Hy(r,e.facetId,t))}:e}function No(e,t){return"success"in e?{success:{...e.success,facets:e.success.facets?.map(n=>Wy(n,t))}}:e}p();u();d();l();p();u();d();l();function Rt(e){return Object.values(e).map(t=>t.request)}function Ka(e,t){let r={};e.forEach(i=>r[i.facetId]=i);let n=[];t.forEach(i=>{i in r&&(n.push(r[i]),delete r[i])});let o=Object.values(r);return[...n,...o]}function Dl(e){return Rt(e).map(t=>{let n=t.currentValues.some(({state:o})=>o!=="idle");return t.generateAutomaticRanges&&!n?{...t,currentValues:[]}:t})}var Ya={alphanumericDescending:{type:"alphanumeric",order:"descending"},alphanumericNaturalDescending:{type:"alphanumericNatural",order:"descending"}};function Gy(e){return Rt(e).map(t=>{let r=Ya[t.sortCriteria];return r?{...t,sortCriteria:r}:t})}function Ky(e){return[...Gy(e.facetSet??{}),...Dl(e.numericFacetSet??{}),...Dl(e.dateFacetSet??{}),...Rt(e.categoryFacetSet??{})]}function Yy(e){return Ky(e).filter(({facetId:t})=>e.facetOptions?.facets[t]?.enabled??!0)}function _o(e){return Ka(Yy(e),e.facetOrder??[])}p();u();d();l();p();u();d();l();function ql(_x37,_x38){return _ql.apply(this,arguments)}function _ql(){_ql=_asyncToGenerator(function*(e,t){let r=e.getReader(),n;for(;!(n=yield r.read()).done;)t(n.value)});return _ql.apply(this,arguments)}function Nl(e){let t,r,n,o=!1;return function(a){t===void 0?(t=a,r=0,n=-1):t=Xy(t,a);let m=t.length,f=0;for(;r<m;){o&&(t[r]===10&&(f=++r),o=!1);let s=-1;for(;r<m&&s===-1;++r)switch(t[r]){case 58:n===-1&&(n=r-f);break;case 13:o=!0,s=r;break;case 10:s=r;break}if(s===-1)break;e(t.subarray(f,s),n),f=r,n=-1}f===m?t=void 0:f!==0&&(t=t.subarray(f),r-=f)}}function _l(e,t,r){let n=Ml(),o=new TextDecoder;return function(a,m){if(a.length===0)r?.(n),n=Ml();else if(m>0){let f=o.decode(a.subarray(0,m)),s=m+(a[m+1]===32?2:1),h=o.decode(a.subarray(s));switch(f){case"data":n.data=n.data?n.data+`
|
|
31
|
+
`+h:h;break;case"event":n.event=h;break;case"id":e(n.id=h);break;case"retry":Jy(h,n,t);break}}}}function Jy(e,t,r){let n=parseInt(e,10);isNaN(n)||r(t.retry=n)}function Xy(e,t){let r=new Uint8Array(e.length+t.length);return r.set(e),r.set(t,e.length),r}function Ml(){return{data:"",event:"",id:"",retry:void 0}}var Ja="text/event-stream",Zy=1e3,Vl="last-event-id";function Ll(){return typeof window<"u"}function jl(e,{signal:t,headers:r,onopen:n,onmessage:o,onclose:i,onerror:a,openWhenHidden:m,fetch:f,...s}){return new Promise((h,y)=>{let S={...r};S.accept||(S.accept=Ja);let g;function v(){g?.abort(),document.hidden||E()}!m&&Ll()&&document.addEventListener("visibilitychange",v);let R=Zy,I;function x(){Ll()&&document.removeEventListener("visibilitychange",v),clearTimeout(I),g?.abort()}t?.addEventListener("abort",()=>{x(),h()});let T=f??b,A=n??eS;function E(){return _E.apply(this,arguments)}function _E(){_E=_asyncToGenerator(function*(){g=c.AbortController?new c.AbortController:null;try{let N=yield T(e,{...s,headers:S,signal:g?.signal});yield A(N),yield ql(N.body,Nl(_l(k=>{k?S[Vl]=k:delete S[Vl]},k=>{R=k},o))),i?.(),x(),h()}catch(N){if(!g?.signal?.aborted)try{let k=a?.(N)??R;clearTimeout(I),I=setTimeout(E,k)}catch(k){x(),y(k)}}});return _E.apply(this,arguments)}E()})}function eS(e){let t=e.headers.get("content-type");if(!t?.startsWith(Ja))throw new Error(`Expected content-type to be ${Ja}, Actual: ${t}`)}p();u();d();l();p();u();d();l();function Ul(e){return{status:e,isUninitialized:e==="uninitialized",isLoading:e==="pending",isSuccess:e==="fulfilled",isError:e==="rejected"}}var Bl=Ke;function ed(e,t){if(e===t||!(Bl(e)&&Bl(t)||Array.isArray(e)&&Array.isArray(t)))return t;let r=Object.keys(t),n=Object.keys(e),o=r.length===n.length,i=Array.isArray(t)?[]:{};for(let a of r)i[a]=ed(e[a],t[a]),o&&(o=e[a]===i[a]);return o?e:i}function kr(e){let t=0;for(let r in e)t++;return t}var Ql=e=>[].concat(...e);function tS(e){return new RegExp("(^|:)//").test(e)}function rS(){return typeof document>"u"?!0:document.visibilityState!=="hidden"}function jo(e){return e!=null}function nS(){return typeof navigator>"u"||navigator.onLine===void 0?!0:navigator.onLine}var oS=e=>e.replace(/\/$/,""),iS=e=>e.replace(/^\//,"");function aS(e,t){if(!e)return t;if(!t)return e;if(tS(t))return t;let r=e.endsWith("/")||!t.startsWith("?")?"/":"";return e=oS(e),t=iS(t),`${e}${r}${t}`}function sS(e,t,r){return e.has(t)?e.get(t):e.set(t,r).get(t)}var $l=(...e)=>b(...e),cS=e=>e.status>=200&&e.status<=299,uS=e=>/ion\/(vnd\.api\+)?json/.test(e.get("content-type")||"");function Hl(e){if(!Ke(e))return e;let t={...e};for(let[r,n]of Object.entries(t))n===void 0&&delete t[r];return t}function td({baseUrl:e,prepareHeaders:t=y=>y,fetchFn:r=$l,paramsSerializer:n,isJsonContentType:o=uS,jsonContentType:i="application/json",jsonReplacer:a,timeout:m,responseHandler:f,validateStatus:s,...h}={}){return typeof b>"u"&&r===$l&&console.warn("Warning: `fetch` is not available. Please supply a custom `fetchFn` property to use `fetchBaseQuery` on SSR environments."),(/*#__PURE__*/function(){var _ref21=_asyncToGenerator(function*(S,g,v){let{getState:R,extra:I,endpoint:x,forced:T,type:A}=g,E,{url:N,headers:k=new w(h.headers),params:P=void 0,responseHandler:F=f??"json",validateStatus:O=s??cS,timeout:_=m,...$}=typeof S=="string"?{url:S}:S,U,L=g.signal;_&&(U=new c.AbortController,g.signal.addEventListener("abort",U.abort),L=U.signal);let V={...h,signal:L,...$};k=new w(Hl(k)),V.headers=(yield t(k,{getState:R,arg:S,extra:I,endpoint:x,forced:T,type:A,extraOptions:v}))||k;let Q=Z=>typeof Z=="object"&&(Ke(Z)||Array.isArray(Z)||typeof Z.toJSON=="function");if(!V.headers.has("content-type")&&Q(V.body)&&V.headers.set("content-type",i),Q(V.body)&&o(V.headers)&&(V.body=JSON.stringify(V.body,a)),P){let Z=~N.indexOf("?")?"&":"?",oe=n?n(P):new URLSearchParams(Hl(P));N+=Z+oe}N=aS(e,N);let j=new Request(N,V);E={request:new Request(N,V)};let W,Y=!1,re=U&&setTimeout(()=>{Y=!0,U.abort()},_);try{W=yield r(j)}catch(Z){return{error:{status:Y?"TIMEOUT_ERROR":"FETCH_ERROR",error:String(Z)},meta:E}}finally{re&&clearTimeout(re),U?.signal.removeEventListener("abort",U.abort)}let se=W.clone();E.response=se;let ee,ne="";try{let Z;if(yield Promise.all([y(W,F).then(oe=>ee=oe,oe=>Z=oe),se.text().then(oe=>ne=oe,()=>{})]),Z)throw Z}catch(Z){return{error:{status:"PARSING_ERROR",originalStatus:W.status,data:ne,error:String(Z)},meta:E}}return O(W,ee)?{data:ee,meta:E}:{error:{status:W.status,data:ee},meta:E}});return function(_x39,_x40,_x41){return _ref21.apply(this,arguments)}}());function y(_x42,_x43){return _y2.apply(this,arguments)}function _y2(){_y2=_asyncToGenerator(function*(S,g){if(typeof g=="function")return g(S);if(g==="content-type"&&(g=o(S.headers)?"json":"text"),g==="json"){let v=yield S.text();return v.length?JSON.parse(v):null}return S.text()});return _y2.apply(this,arguments)}}var Or=class{constructor(e,t=void 0){this.value=e,this.meta=t}};function lS(){return _lS.apply(this,arguments)}function _lS(){_lS=_asyncToGenerator(function*(e=0,t=5){let r=Math.min(e,t),n=~~((Math.random()+.4)*(300<<r));yield new Promise(o=>setTimeout(i=>o(i),n))});return _lS.apply(this,arguments)}function dS(e,t){throw Object.assign(new Or({error:e,meta:t}),{throwImmediately:!0})}var zl={},pS=(e,t)=>(/*#__PURE__*/function(){var _ref22=_asyncToGenerator(function*(r,n,o){let i=[5,(t||zl).maxRetries,(o||zl).maxRetries].filter(h=>h!==void 0),[a]=i.slice(-1),f={maxRetries:a,backoff:lS,retryCondition:(h,y,{attempt:S})=>S<=a,...t,...o},s=0;for(;;)try{let h=yield e(r,n,o);if(h.error)throw new Or(h);return h}catch(h){if(s++,h.throwImmediately){if(h instanceof Or)return h.value;throw h}if(h instanceof Or&&!f.retryCondition(h.value.error,r,{attempt:s,baseQueryApi:n,extraOptions:o}))return h.value;yield f.backoff(s,f.maxRetries)}});return function(_x44,_x45,_x46){return _ref22.apply(this,arguments)}}()),rd=Object.assign(pS,{fail:dS}),rs=D("__rtkq/focused"),nd=D("__rtkq/unfocused"),ns=D("__rtkq/online"),od=D("__rtkq/offline");function os(e){return e.type==="query"}function fS(e){return e.type==="mutation"}function is(e){return e.type==="infinitequery"}function as(e,t,r,n,o,i){return mS(e)?e(t,r,n,o).filter(jo).map(Za).map(i):Array.isArray(e)?e.map(Za).map(i):[]}function mS(e){return typeof e=="function"}function Za(e){return typeof e=="string"?{type:e}:e}function gS(e,t){return e.catch(t)}var wn=Symbol("forceQueryFn"),es=e=>typeof e[wn]=="function";function hS({serializeQueryArgs:e,queryThunk:t,infiniteQueryThunk:r,mutationThunk:n,api:o,context:i}){let a=new Map,m=new Map,{unsubscribeQueryResult:f,removeMutationResult:s,updateSubscriptionOptions:h}=o.internalActions;return{buildInitiateQuery:x,buildInitiateInfiniteQuery:T,buildInitiateMutation:A,getRunningQueryThunk:y,getRunningMutationThunk:S,getRunningQueriesThunk:g,getRunningMutationsThunk:v};function y(E,N){return k=>{let P=i.endpointDefinitions[E],F=e({queryArgs:N,endpointDefinition:P,endpointName:E});return a.get(k)?.[F]}}function S(E,N){return k=>m.get(k)?.[N]}function g(){return E=>Object.values(a.get(E)||{}).filter(jo)}function v(){return E=>Object.values(m.get(E)||{}).filter(jo)}function R(E){}function I(E,N){let k=(P,{subscribe:F=!0,forceRefetch:O,subscriptionOptions:_,[wn]:$,...U}={})=>(L,V)=>{let Q=e({queryArgs:P,endpointDefinition:N,endpointName:E}),j,z={...U,type:"query",subscribe:F,forceRefetch:O,subscriptionOptions:_,endpointName:E,originalArgs:P,queryCacheKey:Q,[wn]:$};if(os(N))j=t(z);else{let{direction:ce,initialPageParam:fe}=U;j=r({...z,direction:ce,initialPageParam:fe})}let W=o.endpoints[E].select(P),Y=L(j),re=W(V());let{requestId:se,abort:ee}=Y,ne=re.requestId!==se,Z=a.get(L)?.[Q],oe=()=>W(V()),ge=Object.assign($?Y.then(oe):ne&&!Z?Promise.resolve(re):Promise.all([Z,Y]).then(oe),{arg:P,requestId:se,subscriptionOptions:_,queryCacheKey:Q,abort:ee,unwrap(){return _asyncToGenerator(function*(){let ce=yield ge;if(ce.isError)throw ce.error;return ce.data})()},refetch:()=>L(k(P,{subscribe:!1,forceRefetch:!0})),unsubscribe(){F&&L(f({queryCacheKey:Q,requestId:se}))},updateSubscriptionOptions(ce){ge.subscriptionOptions=ce,L(h({endpointName:E,requestId:se,queryCacheKey:Q,options:ce}))}});if(!Z&&!ne&&!$){let ce=sS(a,L,{});ce[Q]=ge,ge.then(()=>{delete ce[Q],kr(ce)||a.delete(L)})}return ge};return k}function x(E,N){return I(E,N)}function T(E,N){return I(E,N)}function A(E){return(N,{track:k=!0,fixedCacheKey:P}={})=>(F,O)=>{let _=n({type:"mutation",endpointName:E,originalArgs:N,track:k,fixedCacheKey:P}),$=F(_);let{requestId:U,abort:L,unwrap:V}=$,Q=gS($.unwrap().then(Y=>({data:Y})),Y=>({error:Y})),j=()=>{F(s({requestId:U,fixedCacheKey:P}))},z=Object.assign(Q,{arg:$.arg,requestId:U,abort:L,unwrap:V,reset:j}),W=m.get(F)||{};return m.set(F,W),W[U]=z,z.then(()=>{delete W[U],kr(W)||m.delete(F)}),P&&(W[P]=z,z.then(()=>{W[P]===z&&(delete W[P],kr(W)||m.delete(F))})),z}}}function yS(e){return e}var Vo=(e={})=>({...e,[sn]:!0});function SS({reducerPath:e,baseQuery:t,context:{endpointDefinitions:r},serializeQueryArgs:n,api:o,assertTagType:i,selectors:a}){let m=(F,O,_,$)=>(U,L)=>{let V=r[F],Q=n({queryArgs:O,endpointDefinition:V,endpointName:F});if(U(o.internalActions.queryResultPatched({queryCacheKey:Q,patches:_})),!$)return;let j=o.endpoints[F].select(O)(L()),z=as(V.providesTags,j.data,void 0,O,{},i);U(o.internalActions.updateProvidedBy({queryCacheKey:Q,providedTags:z}))};function f(F,O,_=0){let $=[O,...F];return _&&$.length>_?$.slice(0,-1):$}function s(F,O,_=0){let $=[...F,O];return _&&$.length>_?$.slice(1):$}let h=(F,O,_,$=!0)=>(U,L)=>{let Q=o.endpoints[F].select(O)(L()),j={patches:[],inversePatches:[],undo:()=>U(o.util.patchQueryData(F,O,j.inversePatches,$))};if(Q.status==="uninitialized")return j;let z;if("data"in Q)if(De(Q.data)){let[W,Y,re]=Gn(Q.data,_);j.patches.push(...Y),j.inversePatches.push(...re),z=W}else z=_(Q.data),j.patches.push({op:"replace",path:[],value:z}),j.inversePatches.push({op:"replace",path:[],value:Q.data});return j.patches.length===0||U(o.util.patchQueryData(F,O,j.patches,$)),j},y=(F,O,_)=>$=>$(o.endpoints[F].initiate(O,{subscribe:!1,forceRefetch:!0,[wn]:()=>({data:_})})),S=(F,O)=>F.query&&F[O]?F[O]:yS,g=/*#__PURE__*/function(){var _ref23=_asyncToGenerator(function*(F,{signal:O,abort:_,rejectWithValue:$,fulfillWithValue:U,dispatch:L,getState:V,extra:Q}){let j=r[F.endpointName];try{let z=S(j,"transformResponse"),W={signal:O,abort:_,dispatch:L,getState:V,extra:Q,endpoint:F.endpointName,type:F.type,forced:F.type==="query"?v(F,V()):void 0,queryCacheKey:F.type==="query"?F.queryCacheKey:void 0},Y=F.type==="query"?F[wn]:void 0,re,se=/*#__PURE__*/function(){var _ref24=_asyncToGenerator(function*(ne,Z,oe,ge){if(Z==null&&ne.pages.length)return Promise.resolve({data:ne});let ce={queryArg:F.originalArgs,pageParam:Z},fe=yield ee(ce),he=ge?f:s;return{data:{pages:he(ne.pages,fe.data,oe),pageParams:he(ne.pageParams,Z,oe)}}});return function se(_x49,_x50,_x51,_x52){return _ref24.apply(this,arguments)}}();function ee(_x53){return _ee.apply(this,arguments)}function _ee(){_ee=_asyncToGenerator(function*(ne){let Z,{extraOptions:oe}=j;if(Y?Z=Y():j.query?Z=yield t(j.query(ne),W,oe):Z=yield j.queryFn(ne,W,oe,ce=>t(ce,W,oe)),typeof process<"u",Z.error)throw new Or(Z.error,Z.meta);let ge=yield z(Z.data,Z.meta,ne);return{...Z,data:ge}});return _ee.apply(this,arguments)}if(F.type==="query"&&"infiniteQueryOptions"in j){let{infiniteQueryOptions:ne}=j,{maxPages:Z=1/0}=ne,oe,ge={pages:[],pageParams:[]},ce=a.selectQueryEntry(V(),F.queryCacheKey)?.data,he=v(F,V())&&!F.direction||!ce?ge:ce;if("direction"in F&&F.direction&&he.pages.length){let Te=F.direction==="backward",pt=(Te?id:ts)(ne,he);oe=yield se(he,pt,Z,Te)}else{let{initialPageParam:Te=ne.initialPageParam}=F,Le=ce?.pageParams??[],pt=Le[0]??Te,Xt=Le.length;oe=yield se(he,pt,Z),Y&&(oe={data:oe.data.pages[0]});for(let Zt=1;Zt<Xt;Zt++){let Ur=ts(ne,oe.data);oe=yield se(oe.data,Ur,Z)}}re=oe}else re=yield ee(F.originalArgs);return U(re.data,Vo({fulfilledTimeStamp:Date.now(),baseQueryMeta:re.meta}))}catch(z){let W=z;if(W instanceof Or){let Y=S(j,"transformErrorResponse");try{return $(yield Y(W.value,W.meta,F.originalArgs),Vo({baseQueryMeta:W.meta}))}catch(re){W=re}}throw typeof process<"u",console.error(W),W}});return function g(_x47,_x48){return _ref23.apply(this,arguments)}}();function v(F,O){let _=a.selectQueryEntry(O,F.queryCacheKey),$=a.selectConfig(O).refetchOnMountOrArgChange,U=_?.fulfilledTimeStamp,L=F.forceRefetch??(F.subscribe&&$);return L?L===!0||(Number(new Date)-Number(U))/1e3>=L:!1}let R=()=>ue(`${e}/executeQuery`,g,{getPendingMeta({arg:O}){let _=r[O.endpointName];return Vo({startedTimeStamp:Date.now(),...(is(_)?{direction:O.direction}:{})})},condition(O,{getState:_}){let $=_(),U=a.selectQueryEntry($,O.queryCacheKey),L=U?.fulfilledTimeStamp,V=O.originalArgs,Q=U?.originalArgs,j=r[O.endpointName],z=O.direction;return es(O)?!0:U?.status==="pending"?!1:v(O,$)||os(j)&&j?.forceRefetch?.({currentArg:V,previousArg:Q,endpointState:U,state:$})?!0:!(L&&!z)},dispatchConditionRejection:!0}),I=R(),x=R(),T=ue(`${e}/executeMutation`,g,{getPendingMeta(){return Vo({startedTimeStamp:Date.now()})}}),A=F=>"force"in F,E=F=>"ifOlderThan"in F,N=(F,O,_)=>($,U)=>{let L=A(_)&&_.force,V=E(_)&&_.ifOlderThan,Q=(z=!0)=>{let W={forceRefetch:z,isPrefetch:!0};return o.endpoints[F].initiate(O,W)},j=o.endpoints[F].select(O)(U());if(L)$(Q());else if(V){let z=j?.fulfilledTimeStamp;if(!z){$(Q());return}(Number(new Date)-Number(new Date(z)))/1e3>=V&&$(Q())}else $(Q(!1))};function k(F){return O=>O?.meta?.arg?.endpointName===F}function P(F,O){return{matchPending:sr(Xn(F),k(O)),matchFulfilled:sr(it(F),k(O)),matchRejected:sr($t(F),k(O))}}return{queryThunk:I,mutationThunk:T,infiniteQueryThunk:x,prefetch:N,updateQueryData:h,upsertQueryData:y,patchQueryData:m,buildMatchThunkActions:P}}function ts(e,{pages:t,pageParams:r}){let n=t.length-1;return e.getNextPageParam(t[n],t,r[n],r)}function id(e,{pages:t,pageParams:r}){return e.getPreviousPageParam?.(t[0],t,r[0],r)}function ad(e,t,r,n){return as(r[e.meta.arg.endpointName][t],it(e)?e.payload:void 0,un(e)?e.payload:void 0,e.meta.arg.originalArgs,"baseQueryMeta"in e.meta?e.meta.baseQueryMeta:void 0,n)}function Lo(e,t,r){let n=e[t];n&&r(n)}function xn(e){return("arg"in e?e.arg.fixedCacheKey:e.fixedCacheKey)??e.requestId}function Wl(e,t,r){let n=e[xn(t)];n&&r(n)}var An={};function vS({reducerPath:e,queryThunk:t,mutationThunk:r,serializeQueryArgs:n,context:{endpointDefinitions:o,apiUid:i,extractRehydrationInfo:a,hasRehydrationInfo:m},assertTagType:f,config:s}){let h=D(`${e}/resetApiState`);function y(k,P,F,O){var _;k[_=P.queryCacheKey]??(k[_]={status:"uninitialized",endpointName:P.endpointName}),Lo(k,P.queryCacheKey,$=>{$.status="pending",$.requestId=F&&$.requestId?$.requestId:O.requestId,P.originalArgs!==void 0&&($.originalArgs=P.originalArgs),$.startedTimeStamp=O.startedTimeStamp;let U=o[O.arg.endpointName];is(U)&&"direction"in P&&($.direction=P.direction)})}function S(k,P,F,O){Lo(k,P.arg.queryCacheKey,_=>{if(_.requestId!==P.requestId&&!O)return;let{merge:$}=o[P.arg.endpointName];if(_.status="fulfilled",$){if(_.data!==void 0){let{fulfilledTimeStamp:U,arg:L,baseQueryMeta:V,requestId:Q}=P,j=ot(_.data,z=>$(z,F,{arg:L.originalArgs,baseQueryMeta:V,fulfilledTimeStamp:U,requestId:Q}));_.data=j}else _.data=F;}else _.data=o[P.arg.endpointName].structuralSharing??!0?ed(Ne(_.data)?ta(_.data):_.data,F):F;delete _.error,_.fulfilledTimeStamp=P.fulfilledTimeStamp})}let g=Ht({name:`${e}/queries`,initialState:An,reducers:{removeQueryResult:{reducer(k,{payload:{queryCacheKey:P}}){delete k[P]},prepare:cr()},cacheEntriesUpserted:{reducer(k,P){for(let F of P.payload){let{queryDescription:O,value:_}=F;y(k,O,!0,{arg:O,requestId:P.meta.requestId,startedTimeStamp:P.meta.timestamp}),S(k,{arg:O,requestId:P.meta.requestId,fulfilledTimeStamp:P.meta.timestamp,baseQueryMeta:{}},_,!0)}},prepare:k=>({payload:k.map(O=>{let{endpointName:_,arg:$,value:U}=O,L=o[_];return{queryDescription:{type:"query",endpointName:_,originalArgs:O.arg,queryCacheKey:n({queryArgs:$,endpointDefinition:L,endpointName:_})},value:U}}),meta:{[sn]:!0,requestId:eo(),timestamp:Date.now()}})},queryResultPatched:{reducer(k,{payload:{queryCacheKey:P,patches:F}}){Lo(k,P,O=>{O.data=na(O.data,F.concat())})},prepare:cr()}},extraReducers(k){k.addCase(t.pending,(P,{meta:F,meta:{arg:O}})=>{let _=es(O);y(P,O,_,F)}).addCase(t.fulfilled,(P,{meta:F,payload:O})=>{let _=es(F.arg);S(P,F,O,_)}).addCase(t.rejected,(P,{meta:{condition:F,arg:O,requestId:_},error:$,payload:U})=>{Lo(P,O.queryCacheKey,L=>{if(!F){if(L.requestId!==_)return;L.status="rejected",L.error=U??$}})}).addMatcher(m,(P,F)=>{let{queries:O}=a(F);for(let[_,$]of Object.entries(O))($?.status==="fulfilled"||$?.status==="rejected")&&(P[_]=$)})}}),v=Ht({name:`${e}/mutations`,initialState:An,reducers:{removeMutationResult:{reducer(k,{payload:P}){let F=xn(P);F in k&&delete k[F]},prepare:cr()}},extraReducers(k){k.addCase(r.pending,(P,{meta:F,meta:{requestId:O,arg:_,startedTimeStamp:$}})=>{_.track&&(P[xn(F)]={requestId:O,status:"pending",endpointName:_.endpointName,startedTimeStamp:$})}).addCase(r.fulfilled,(P,{payload:F,meta:O})=>{O.arg.track&&Wl(P,O,_=>{_.requestId===O.requestId&&(_.status="fulfilled",_.data=F,_.fulfilledTimeStamp=O.fulfilledTimeStamp)})}).addCase(r.rejected,(P,{payload:F,error:O,meta:_})=>{_.arg.track&&Wl(P,_,$=>{$.requestId===_.requestId&&($.status="rejected",$.error=F??O)})}).addMatcher(m,(P,F)=>{let{mutations:O}=a(F);for(let[_,$]of Object.entries(O))($?.status==="fulfilled"||$?.status==="rejected")&&_!==$?.requestId&&(P[_]=$)})}}),R=Ht({name:`${e}/invalidation`,initialState:An,reducers:{updateProvidedBy:{reducer(k,P){var _,$;let{queryCacheKey:F,providedTags:O}=P.payload;for(let U of Object.values(k))for(let L of Object.values(U)){let V=L.indexOf(F);V!==-1&&L.splice(V,1)}for(let{type:U,id:L}of O){let V=(_=k[U]??(k[U]={}))[$=L||"__internal_without_id"]??(_[$]=[]);V.includes(F)||V.push(F)}},prepare:cr()}},extraReducers(k){k.addCase(g.actions.removeQueryResult,(P,{payload:{queryCacheKey:F}})=>{for(let O of Object.values(P))for(let _ of Object.values(O)){let $=_.indexOf(F);$!==-1&&_.splice($,1)}}).addMatcher(m,(P,F)=>{var _,$;let{provided:O}=a(F);for(let[U,L]of Object.entries(O))for(let[V,Q]of Object.entries(L)){let j=(_=P[U]??(P[U]={}))[$=V||"__internal_without_id"]??(_[$]=[]);for(let z of Q)j.includes(z)||j.push(z)}}).addMatcher(Ye(it(t),un(t)),(P,F)=>{let O=ad(F,"providesTags",o,f),{queryCacheKey:_}=F.meta.arg;R.caseReducers.updateProvidedBy(P,R.actions.updateProvidedBy({queryCacheKey:_,providedTags:O}))})}}),I=Ht({name:`${e}/subscriptions`,initialState:An,reducers:{updateSubscriptionOptions(k,P){},unsubscribeQueryResult(k,P){},internal_getRTKQSubscriptions(){}}}),x=Ht({name:`${e}/internalSubscriptions`,initialState:An,reducers:{subscriptionsUpdated:{reducer(k,P){return na(k,P.payload)},prepare:cr()}}}),T=Ht({name:`${e}/config`,initialState:{online:nS(),focused:rS(),middlewareRegistered:!1,...s},reducers:{middlewareRegistered(k,{payload:P}){k.middlewareRegistered=k.middlewareRegistered==="conflict"||i!==P?"conflict":!0}},extraReducers:k=>{k.addCase(ns,P=>{P.online=!0}).addCase(od,P=>{P.online=!1}).addCase(rs,P=>{P.focused=!0}).addCase(nd,P=>{P.focused=!1}).addMatcher(m,P=>({...P}))}}),A=or({queries:g.reducer,mutations:v.reducer,provided:R.reducer,subscriptions:x.reducer,config:T.reducer}),E=(k,P)=>A(h.match(P)?void 0:k,P),N={...T.actions,...g.actions,...I.actions,...x.actions,...v.actions,...R.actions,resetApiState:h};return{reducer:E,actions:N}}var Xa=Symbol.for("RTKQ/skipToken"),sd={status:"uninitialized"},Gl=ot(sd,()=>{}),Kl=ot(sd,()=>{});function CS({serializeQueryArgs:e,reducerPath:t,createSelector:r}){let n=A=>Gl,o=A=>Kl;return{buildQuerySelector:S,buildInfiniteQuerySelector:g,buildMutationSelector:v,selectInvalidatedBy:R,selectCachedArgsForQuery:I,selectApiState:a,selectQueries:m,selectMutations:s,selectQueryEntry:f,selectConfig:h};function i(A){return{...A,...Ul(A.status)}}function a(A){return A[t]}function m(A){return a(A)?.queries}function f(A,E){return m(A)?.[E]}function s(A){return a(A)?.mutations}function h(A){return a(A)?.config}function y(A,E,N){return k=>{if(k===Xa)return r(n,N);let P=e({queryArgs:k,endpointDefinition:E,endpointName:A});return r(O=>f(O,P)??Gl,N)}}function S(A,E){return y(A,E,i)}function g(A,E){let{infiniteQueryOptions:N}=E;function k(P){let F={...P,...Ul(P.status)},{isLoading:O,isError:_,direction:$}=F,U=$==="forward",L=$==="backward";return{...F,hasNextPage:x(N,F.data),hasPreviousPage:T(N,F.data),isFetchingNextPage:O&&U,isFetchingPreviousPage:O&&L,isFetchNextPageError:_&&U,isFetchPreviousPageError:_&&L}}return y(A,E,k)}function v(){return A=>{let E;return typeof A=="object"?E=xn(A)??Xa:E=A,r(E===Xa?o:P=>a(P)?.mutations?.[E]??Kl,i)}}function R(A,E){let N=A[t],k=new Set;for(let P of E.filter(jo).map(Za)){let F=N.provided[P.type];if(!F)continue;let O=(P.id!==void 0?F[P.id]:Ql(Object.values(F)))??[];for(let _ of O)k.add(_)}return Ql(Array.from(k.values()).map(P=>{let F=N.queries[P];return F?[{queryCacheKey:P,endpointName:F.endpointName,originalArgs:F.originalArgs}]:[]}))}function I(A,E){return Object.values(m(A)).filter(N=>N?.endpointName===E&&N.status!=="uninitialized").map(N=>N.originalArgs)}function x(A,E){return E?ts(A,E)!=null:!1}function T(A,E){return!E||!A.getPreviousPageParam?!1:id(A,E)!=null}}var Yl=WeakMap?new WeakMap:void 0,Jl=({endpointName:e,queryArgs:t})=>{let r="",n=Yl?.get(t);if(typeof n=="string")r=n;else{let o=JSON.stringify(t,(i,a)=>(a=typeof a=="bigint"?{$bigint:a.toString()}:a,a=Ke(a)?Object.keys(a).sort().reduce((m,f)=>(m[f]=a[f],m),{}):a,a));Ke(t)&&Yl?.set(t,o),r=o}return`${e}(${r})`};function bS(...e){return function(r){let n=ar(s=>r.extractRehydrationInfo?.(s,{reducerPath:r.reducerPath??"api"})),o={reducerPath:"api",keepUnusedDataFor:60,refetchOnMountOrArgChange:!1,refetchOnFocus:!1,refetchOnReconnect:!1,invalidationBehavior:"delayed",...r,extractRehydrationInfo:n,serializeQueryArgs(s){let h=Jl;if("serializeQueryArgs"in s.endpointDefinition){let y=s.endpointDefinition.serializeQueryArgs;h=S=>{let g=y(S);return typeof g=="string"?g:Jl({...S,queryArgs:g})}}else r.serializeQueryArgs&&(h=r.serializeQueryArgs);return h(s)},tagTypes:[...(r.tagTypes||[])]},i={endpointDefinitions:{},batch(s){s()},apiUid:eo(),extractRehydrationInfo:n,hasRehydrationInfo:ar(s=>n(s)!=null)},a={injectEndpoints:f,enhanceEndpoints({addTagTypes:s,endpoints:h}){if(s)for(let y of s)o.tagTypes.includes(y)||o.tagTypes.push(y);if(h)for(let[y,S]of Object.entries(h))typeof S=="function"?S(i.endpointDefinitions[y]):Object.assign(i.endpointDefinitions[y]||{},S);return a}},m=e.map(s=>s.init(a,o,i));function f(s){let h=s.endpoints({query:y=>({...y,type:"query"}),mutation:y=>({...y,type:"mutation"}),infiniteQuery:y=>({...y,type:"infinitequery"})});for(let[y,S]of Object.entries(h)){if(s.overrideExisting!==!0&&y in i.endpointDefinitions){if(s.overrideExisting==="throw")throw new Error($e(39));typeof process<"u";continue}typeof process<"u",i.endpointDefinitions[y]=S;for(let g of m)g.injectEndpoint(y,S)}return a}return a.injectEndpoints({endpoints:r.endpoints})}}function lt(e,...t){return Object.assign(e,...t)}var AS=({api:e,queryThunk:t,internalState:r})=>{let n=`${e.reducerPath}/subscriptions`,o=null,i=null,{updateSubscriptionOptions:a,unsubscribeQueryResult:m}=e.internalActions,f=(g,v)=>{var I,x;if(a.match(v)){let{queryCacheKey:T,requestId:A,options:E}=v.payload;return g?.[T]?.[A]&&(g[T][A]=E),!0}if(m.match(v)){let{queryCacheKey:T,requestId:A}=v.payload;return g[T]&&delete g[T][A],!0}if(e.internalActions.removeQueryResult.match(v))return delete g[v.payload.queryCacheKey],!0;if(t.pending.match(v)){let{meta:{arg:T,requestId:A}}=v,E=g[I=T.queryCacheKey]??(g[I]={});return E[`${A}_running`]={},T.subscribe&&(E[A]=T.subscriptionOptions??E[A]??{}),!0}let R=!1;if(t.fulfilled.match(v)||t.rejected.match(v)){let T=g[v.meta.arg.queryCacheKey]||{},A=`${v.meta.requestId}_running`;R||(R=!!T[A]),delete T[A]}if(t.rejected.match(v)){let{meta:{condition:T,arg:A,requestId:E}}=v;if(T&&A.subscribe){let N=g[x=A.queryCacheKey]??(g[x]={});N[E]=A.subscriptionOptions??N[E]??{},R=!0}}return R},s=()=>r.currentSubscriptions,S={getSubscriptions:s,getSubscriptionCount:g=>{let R=s()[g]??{};return kr(R)},isRequestSubscribed:(g,v)=>!!s()?.[g]?.[v]};return(g,v)=>{if(o||(o=JSON.parse(JSON.stringify(r.currentSubscriptions))),e.util.resetApiState.match(g))return o=r.currentSubscriptions={},i=null,[!0,!1];if(e.internalActions.internal_getRTKQSubscriptions.match(g))return[!1,S];let R=f(r.currentSubscriptions,g),I=!0;if(R){i||(i=setTimeout(()=>{let A=JSON.parse(JSON.stringify(r.currentSubscriptions)),[,E]=Gn(o,()=>A);v.next(e.internalActions.subscriptionsUpdated(E)),o=A,i=null},500));let x=typeof g.type=="string"&&!!g.type.startsWith(n),T=t.rejected.match(g)&&g.meta.condition&&!!g.meta.arg.subscribe;I=!x&&!T}return[I,!1]}};function wS(e){for(let t in e)return!1;return!0}var xS=2147483647/1e3-1,RS=({reducerPath:e,api:t,queryThunk:r,context:n,internalState:o,selectors:{selectQueryEntry:i,selectConfig:a}})=>{let{removeQueryResult:m,unsubscribeQueryResult:f,cacheEntriesUpserted:s}=t.internalActions,h=Ye(f.match,r.fulfilled,r.rejected,s.match);function y(I){let x=o.currentSubscriptions[I];return!!x&&!wS(x)}let S={},g=(I,x,T)=>{let A=x.getState(),E=a(A);if(h(I)){let N;if(s.match(I))N=I.payload.map(k=>k.queryDescription.queryCacheKey);else{let{queryCacheKey:k}=f.match(I)?I.payload:I.meta.arg;N=[k]}v(N,x,E)}if(t.util.resetApiState.match(I))for(let[N,k]of Object.entries(S))k&&clearTimeout(k),delete S[N];if(n.hasRehydrationInfo(I)){let{queries:N}=n.extractRehydrationInfo(I);v(Object.keys(N),x,E)}};function v(I,x,T){let A=x.getState();for(let E of I){let N=i(A,E);R(E,N?.endpointName,x,T)}}function R(I,x,T,A){let N=n.endpointDefinitions[x]?.keepUnusedDataFor??A.keepUnusedDataFor;if(N===1/0)return;let k=Math.max(0,Math.min(N,xS));if(!y(I)){let P=S[I];P&&clearTimeout(P),S[I]=setTimeout(()=>{y(I)||T.dispatch(m({queryCacheKey:I})),delete S[I]},k*1e3)}}return g},Xl=new Error("Promise never resolved before cacheEntryRemoved."),ES=({api:e,reducerPath:t,context:r,queryThunk:n,mutationThunk:o,internalState:i,selectors:{selectQueryEntry:a,selectApiState:m}})=>{let f=Zn(n),s=Zn(o),h=it(n,o),y={};function S(x,T,A){let E=y[x];E?.valueResolved&&(E.valueResolved({data:T,meta:A}),delete E.valueResolved)}function g(x){let T=y[x];T&&(delete y[x],T.cacheEntryRemoved())}let v=(x,T,A)=>{let E=R(x);function N(k,P,F,O){let _=a(A,P),$=a(T.getState(),P);!_&&$&&I(k,O,P,T,F)}if(n.pending.match(x))N(x.meta.arg.endpointName,E,x.meta.requestId,x.meta.arg.originalArgs);else if(e.internalActions.cacheEntriesUpserted.match(x))for(let{queryDescription:k,value:P}of x.payload){let{endpointName:F,originalArgs:O,queryCacheKey:_}=k;N(F,_,x.meta.requestId,O),S(_,P,{})}else if(o.pending.match(x))T.getState()[t].mutations[E]&&I(x.meta.arg.endpointName,x.meta.arg.originalArgs,E,T,x.meta.requestId);else if(h(x))S(E,x.payload,x.meta.baseQueryMeta);else if(e.internalActions.removeQueryResult.match(x)||e.internalActions.removeMutationResult.match(x))g(E);else if(e.util.resetApiState.match(x))for(let k of Object.keys(y))g(k)};function R(x){return f(x)?x.meta.arg.queryCacheKey:s(x)?x.meta.arg.fixedCacheKey??x.meta.requestId:e.internalActions.removeQueryResult.match(x)?x.payload.queryCacheKey:e.internalActions.removeMutationResult.match(x)?xn(x.payload):""}function I(x,T,A,E,N){let k=r.endpointDefinitions[x],P=k?.onCacheEntryAdded;if(!P)return;let F={},O=new Promise(Q=>{F.cacheEntryRemoved=Q}),_=Promise.race([new Promise(Q=>{F.valueResolved=Q}),O.then(()=>{throw Xl})]);_.catch(()=>{}),y[A]=F;let $=e.endpoints[x].select(k.type==="query"?T:A),U=E.dispatch((Q,j,z)=>z),L={...E,getCacheEntry:()=>$(E.getState()),requestId:N,extra:U,updateCachedData:k.type==="query"?Q=>E.dispatch(e.util.updateQueryData(x,T,Q)):void 0,cacheDataLoaded:_,cacheEntryRemoved:O},V=P(T,L);Promise.resolve(V).catch(Q=>{if(Q!==Xl)throw Q})}return v},PS=({api:e,context:{apiUid:t},reducerPath:r})=>(n,o)=>{e.util.resetApiState.match(n)&&o.dispatch(e.internalActions.middlewareRegistered(t)),typeof process<"u"},IS=({reducerPath:e,context:t,context:{endpointDefinitions:r},mutationThunk:n,queryThunk:o,api:i,assertTagType:a,refetchQuery:m,internalState:f})=>{let{removeQueryResult:s}=i.internalActions,h=Ye(it(n),un(n)),y=Ye(it(n,o),$t(n,o)),S=[],g=(I,x)=>{h(I)?R(ad(I,"invalidatesTags",r,a),x):y(I)?R([],x):i.util.invalidateTags.match(I)&&R(as(I.payload,void 0,void 0,void 0,void 0,a),x)};function v(I){let{queries:x,mutations:T}=I;for(let A of[x,T])for(let E in A)if(A[E]?.status==="pending")return!0;return!1}function R(I,x){let T=x.getState(),A=T[e];if(S.push(...I),A.config.invalidationBehavior==="delayed"&&v(A))return;let E=S;if(S=[],E.length===0)return;let N=i.util.selectInvalidatedBy(T,E);t.batch(()=>{let k=Array.from(N.values());for(let{queryCacheKey:P}of k){let F=A.queries[P],O=f.currentSubscriptions[P]??{};F&&(kr(O)===0?x.dispatch(s({queryCacheKey:P})):F.status!=="uninitialized"&&x.dispatch(m(F)))}})}return g},TS=({reducerPath:e,queryThunk:t,api:r,refetchQuery:n,internalState:o})=>{let i={},a=(g,v)=>{(r.internalActions.updateSubscriptionOptions.match(g)||r.internalActions.unsubscribeQueryResult.match(g))&&s(g.payload,v),(t.pending.match(g)||t.rejected.match(g)&&g.meta.condition)&&s(g.meta.arg,v),(t.fulfilled.match(g)||t.rejected.match(g)&&!g.meta.condition)&&f(g.meta.arg,v),r.util.resetApiState.match(g)&&y()};function m(g,v){let I=v.getState()[e].queries[g],x=o.currentSubscriptions[g];if(!(!I||I.status==="uninitialized"))return x}function f({queryCacheKey:g},v){let R=v.getState()[e],I=R.queries[g],x=o.currentSubscriptions[g];if(!I||I.status==="uninitialized")return;let{lowestPollingInterval:T,skipPollingIfUnfocused:A}=S(x);if(!Number.isFinite(T))return;let E=i[g];E?.timeout&&(clearTimeout(E.timeout),E.timeout=void 0);let N=Date.now()+T;i[g]={nextPollTimestamp:N,pollingInterval:T,timeout:setTimeout(()=>{(R.config.focused||!A)&&v.dispatch(n(I)),f({queryCacheKey:g},v)},T)}}function s({queryCacheKey:g},v){let I=v.getState()[e].queries[g],x=o.currentSubscriptions[g];if(!I||I.status==="uninitialized")return;let{lowestPollingInterval:T}=S(x);if(!Number.isFinite(T)){h(g);return}let A=i[g],E=Date.now()+T;(!A||E<A.nextPollTimestamp)&&f({queryCacheKey:g},v)}function h(g){let v=i[g];v?.timeout&&clearTimeout(v.timeout),delete i[g]}function y(){for(let g of Object.keys(i))h(g)}function S(g={}){let v=!1,R=Number.POSITIVE_INFINITY;for(let I in g)g[I].pollingInterval&&(R=Math.min(g[I].pollingInterval,R),v=g[I].skipPollingIfUnfocused||v);return{lowestPollingInterval:R,skipPollingIfUnfocused:v}}return a},FS=({api:e,context:t,queryThunk:r,mutationThunk:n})=>{let o=Xn(r,n),i=$t(r,n),a=it(r,n),m={};return(s,h)=>{if(o(s)){let{requestId:y,arg:{endpointName:S,originalArgs:g}}=s.meta,v=t.endpointDefinitions[S],R=v?.onQueryStarted;if(R){let I={},x=new Promise((N,k)=>{I.resolve=N,I.reject=k});x.catch(()=>{}),m[y]=I;let T=e.endpoints[S].select(v.type==="query"?g:y),A=h.dispatch((N,k,P)=>P),E={...h,getCacheEntry:()=>T(h.getState()),requestId:y,extra:A,updateCachedData:v.type==="query"?N=>h.dispatch(e.util.updateQueryData(S,g,N)):void 0,queryFulfilled:x};R(g,E)}}else if(a(s)){let{requestId:y,baseQueryMeta:S}=s.meta;m[y]?.resolve({data:s.payload,meta:S}),delete m[y]}else if(i(s)){let{requestId:y,rejectedWithValue:S,baseQueryMeta:g}=s.meta;m[y]?.reject({error:s.payload??s.error,isUnhandledError:!S,meta:g}),delete m[y]}}},kS=({reducerPath:e,context:t,api:r,refetchQuery:n,internalState:o})=>{let{removeQueryResult:i}=r.internalActions,a=(f,s)=>{rs.match(f)&&m(s,"refetchOnFocus"),ns.match(f)&&m(s,"refetchOnReconnect")};function m(f,s){let h=f.getState()[e],y=h.queries,S=o.currentSubscriptions;t.batch(()=>{for(let g of Object.keys(S)){let v=y[g],R=S[g];if(!R||!v)continue;(Object.values(R).some(x=>x[s]===!0)||Object.values(R).every(x=>x[s]===void 0)&&h.config[s])&&(kr(R)===0?f.dispatch(i({queryCacheKey:g})):v.status!=="uninitialized"&&f.dispatch(n(v)))}})}return a};function OS(e){let{reducerPath:t,queryThunk:r,api:n,context:o}=e,{apiUid:i}=o,a={invalidateTags:D(`${t}/invalidateTags`)},m=y=>y.type.startsWith(`${t}/`),f=[PS,RS,IS,TS,ES,FS];return{middleware:y=>{let S=!1,v={...e,internalState:{currentSubscriptions:{}},refetchQuery:h,isThisApiSliceAction:m},R=f.map(T=>T(v)),I=AS(v),x=kS(v);return T=>A=>{if(!Qn(A))return T(A);S||(S=!0,y.dispatch(n.internalActions.middlewareRegistered(i)));let E={...y,next:T},N=y.getState(),[k,P]=I(A,E,N),F;if(k?F=T(A):F=P,y.getState()[t]&&(x(A,E,N),m(A)||o.hasRehydrationInfo(A)))for(let O of R)O(A,E,N);return F}},actions:a};function h(y){return e.api.endpoints[y.endpointName].initiate(y.originalArgs,{subscribe:!1,forceRefetch:!0})}}var Zl=Symbol(),DS=({createSelector:e=ye}={})=>({name:Zl,init(t,{baseQuery:r,tagTypes:n,reducerPath:o,serializeQueryArgs:i,keepUnusedDataFor:a,refetchOnMountOrArgChange:m,refetchOnFocus:f,refetchOnReconnect:s,invalidationBehavior:h},y){Nc();let S=ee=>(typeof process<"u",ee);Object.assign(t,{reducerPath:o,endpoints:{},internalActions:{onOnline:ns,onOffline:od,onFocus:rs,onFocusLost:nd},util:{}});let g=CS({serializeQueryArgs:i,reducerPath:o,createSelector:e}),{selectInvalidatedBy:v,selectCachedArgsForQuery:R,buildQuerySelector:I,buildInfiniteQuerySelector:x,buildMutationSelector:T}=g;lt(t.util,{selectInvalidatedBy:v,selectCachedArgsForQuery:R});let{queryThunk:A,infiniteQueryThunk:E,mutationThunk:N,patchQueryData:k,updateQueryData:P,upsertQueryData:F,prefetch:O,buildMatchThunkActions:_}=SS({baseQuery:r,reducerPath:o,context:y,api:t,serializeQueryArgs:i,assertTagType:S,selectors:g}),{reducer:$,actions:U}=vS({context:y,queryThunk:A,infiniteQueryThunk:E,mutationThunk:N,serializeQueryArgs:i,reducerPath:o,assertTagType:S,config:{refetchOnFocus:f,refetchOnReconnect:s,refetchOnMountOrArgChange:m,keepUnusedDataFor:a,reducerPath:o,invalidationBehavior:h}});lt(t.util,{patchQueryData:k,updateQueryData:P,upsertQueryData:F,prefetch:O,resetApiState:U.resetApiState,upsertQueryEntries:U.cacheEntriesUpserted}),lt(t.internalActions,U);let{middleware:L,actions:V}=OS({reducerPath:o,context:y,queryThunk:A,mutationThunk:N,infiniteQueryThunk:E,api:t,assertTagType:S,selectors:g});lt(t.util,V),lt(t,{reducer:$,middleware:L});let{buildInitiateQuery:Q,buildInitiateInfiniteQuery:j,buildInitiateMutation:z,getRunningMutationThunk:W,getRunningMutationsThunk:Y,getRunningQueriesThunk:re,getRunningQueryThunk:se}=hS({queryThunk:A,mutationThunk:N,infiniteQueryThunk:E,api:t,serializeQueryArgs:i,context:y});return lt(t.util,{getRunningMutationThunk:W,getRunningMutationsThunk:Y,getRunningQueryThunk:se,getRunningQueriesThunk:re}),{name:Zl,injectEndpoint(ee,ne){var ge;let oe=(ge=t.endpoints)[ee]??(ge[ee]={});os(ne)&<(oe,{name:ee,select:I(ee,ne),initiate:Q(ee,ne)},_(A,ee)),fS(ne)&<(oe,{name:ee,select:T(),initiate:z(ee)},_(N,ee)),is(ne)&<(oe,{name:ee,select:x(ee,ne),initiate:j(ee,ne)},_(A,ee))}}}}),cd=bS(DS());var MS=/*#__PURE__*/function(){var _ref25=_asyncToGenerator(function*(e,t,r){let n=t.getState(),{accessToken:o,environment:i,organizationId:a}=n.configuration,m=n.generatedAnswer.answerConfigurationId,f={...e,headers:{...(e?.headers||{}),Authorization:`Bearer ${o}`}};try{let s=Ie(a,i);return{data:td({baseUrl:`${s}/rest/organizations/${a}/answer/v1/configs/${m}`,fetchFn:y=>{if(y instanceof String)throw new Error("The provided 'request' must be a Request object.");let S=y.url,g={};return["method","headers","body","mode","credentials","cache","redirect","referrer","referrerPolicy","integrity","keepalive","signal"].forEach(v=>{g[v]=y[v]}),g.duplex="half",b(S,g)}})(f,{...t,signal:null},r)}}catch(s){return{error:s}}});return function MS(_x54,_x55,_x56){return _ref25.apply(this,arguments)}}(),ud=cd({reducerPath:"answer",baseQuery:rd(MS,{maxRetries:3}),endpoints:()=>({})});var qS=(e,t)=>{let{contentFormat:r}=t;e.contentFormat=r,e.isStreaming=!0,e.isLoading=!1},NS=(e,t)=>{e.answer===void 0?e.answer=t.textDelta:typeof t.textDelta=="string"&&(e.answer=e.answer.concat(t.textDelta))},_S=(e,t)=>{e.citations=t.citations},VS=(e,t)=>{e.generated=t.answerGenerated,e.isStreaming=!1},LS=(e,t)=>{e.error={message:t.errorMessage,code:t.code},e.isStreaming=!1,e.isLoading=!1,console.error(`${t.errorMessage} - code ${t.code}`)},jS=(e,t,r)=>{let n=JSON.parse(e.data);n.finishReason==="ERROR"&&n.errorMessage&&LS(t,n);let o=n.payload.length?JSON.parse(n.payload):{};switch(n.payloadType){case"genqa.headerMessageType":o.contentFormat&&(qS(t,o),r(_a(o.contentFormat)));break;case"genqa.messageType":o.textDelta&&(NS(t,o),r(qa({textDelta:o.textDelta})));break;case"genqa.citationsType":o.citations&&(_S(t,o),r(Na({citations:o.citations})));break;case"genqa.endOfStreamType":VS(t,o),r(Oo(o.answerGenerated??!1));break}},ss=ud.injectEndpoints({overrideExisting:!0,endpoints:e=>({getAnswer:e.query({queryFn:()=>({data:{contentFormat:void 0,answer:void 0,citations:void 0,error:void 0,generated:!1,isStreaming:!0,isLoading:!0}}),onCacheEntryAdded(t,{getState:r,cacheDataLoaded:n,updateCachedData:o,dispatch:i}){return _asyncToGenerator(function*(){yield n;let{configuration:a,generatedAnswer:m,insightConfiguration:f}=r(),{organizationId:s,environment:h,accessToken:y}=a,S=Ie(s,h),g=`${S}/rest/organizations/${s}/insight/v1/configs/${f?.insightId}/answer/${m.answerConfigurationId}/generate`,v=`${S}/rest/organizations/${s}/answer/v1/configs/${m.answerConfigurationId}/generate`;yield jl(f?g:v,{method:"POST",body:JSON.stringify(t),headers:{Authorization:`Bearer ${y}`,Accept:"application/json","Content-Type":"application/json","Accept-Encoding":"*"},fetch:b,onopen:function(){var _ref26=_asyncToGenerator(function*(R){let I=R.headers.get("x-answer-id");I&&o(x=>{x.answerId=I})});return function onopen(_x57){return _ref26.apply(this,arguments)}}(),onmessage:R=>{o(I=>{jS(R,I,i)})},onerror:R=>{throw R},onclose:()=>{o(R=>{i(Va(!R.generated))})}})})()}})})}),IM=ye(e=>vn(e)?.q,e=>e.search.requestId,(e,t)=>({q:e,requestId:t})),Uo={},US=(e,t)=>({...Uo,[e]:_o(t)?.map(r=>Ga(r,Wa())).sort((r,n)=>r.facetId>n.facetId?1:n.facetId>r.facetId?-1:0)}),BS=e=>e.pagination?e.pagination.firstResult+e.pagination.numberOfResults>5e3?5e3-e.pagination.firstResult:e.pagination.numberOfResults:void 0,QS=(e,t)=>{let r=vn(e)?.q,n=hl(e),o=gl(e),i=cl(e)??[];return r&&t==="fetch"&&(Uo=US(r,e)),{q:r,pipelineRuleParameters:{mlGenerativeQuestionAnswering:{responseFormat:e.generatedAnswer.responseFormat,citationsFieldToInclude:i}},...(n?.length&&{searchHub:n}),...(o?.length&&{pipeline:o}),...(Uo[r]?.length&&{facets:Uo[r]}),...(e.fields&&{fieldsToInclude:e.fields.fieldsToInclude}),...(e.didYouMean&&{queryCorrection:{enabled:e.didYouMean.enableDidYouMean&&e.didYouMean.queryCorrectionMode==="next",options:{automaticallyCorrect:e.didYouMean.automaticallyCorrectQuery?"whenNoResults":"never"}},enableDidYouMean:e.didYouMean.enableDidYouMean&&e.didYouMean.queryCorrectionMode==="legacy"}),...(e.pagination&&{numberOfResults:BS(e),firstResult:e.pagination.firstResult}),tab:e.configuration.analytics.originLevel2}};var ul=e=>ss.endpoints.getAnswer.select(QS(e,"select"))(e);p();u();d();l();var ld=me(ur,e=>e);p();u();d();l();function cs(){return typeof window<"u"&&typeof document<"u"}p();u();d();l();function $S(e){let t=e.payload?.analyticsAction;return dd(e)&&!X(t)}function dd(e){return"type"in e}var pd=e=>t=>r=>{let n;$S(r)&&(n=r.payload.analyticsAction,delete r.payload.analyticsAction);let o=t(r);return dd(r)&&(r.type==="search/executeSearch/fullfilled"&&n===void 0&&console.error("No analytics action associated with search:",r),r.type==="recommendation/get/fullfilled"&&n===void 0&&console.error("No analytics action associated with recommendation:",r),r.type==="productRecommendations/get/fullfilled"&&n===void 0&&console.error("No analytics action associated with product recommendation:",r)),n!==void 0&&e.dispatch(n),o};p();u();d();l();p();u();d();l();var Cd=je(md(),1);p();u();d();l();var aq=D("tab/register",e=>{let t=new G({values:{id:K,expression:we}});return B(e,t)}),Bo=D("tab/updateActiveTab",e=>B(e,K));p();u();d();l();var Qo=je(Do(),1),yd=je(gd(),1),Sd=je(hd(),1);Qo.default.extend(Sd.default);Qo.default.extend(yd.default);var vd=()=>({organizationId:"",accessToken:"",search:{locale:"en-US",timezone:Qo.default.tz.guess(),authenticationProviders:[]},analytics:{enabled:!0,originContext:"Search",originLevel2:"default",originLevel3:"default",anonymous:!1,deviceId:"",userDisplayName:"",documentLocation:"",trackingId:"",analyticsMode:"next",source:{}},knowledge:{answerConfigurationId:""},environment:"prod"});var bd=me(vd(),e=>e.addCase(yt,(t,r)=>{zS(t,r.payload)}).addCase(Je,(t,r)=>{WS(t,r.payload)}).addCase(lr,(t,r)=>{GS(t,r.payload)}).addCase(dr,t=>{t.analytics.enabled=!1}).addCase(pr,t=>{t.analytics.enabled=!0}).addCase(ro,(t,r)=>{t.analytics.originLevel2=r.payload.originLevel2}).addCase(no,(t,r)=>{t.analytics.originLevel3=r.payload.originLevel3}).addCase(Bo,(t,r)=>{t.analytics.originLevel2=r.payload}).addCase(St,(t,r)=>{t.analytics.originLevel2=r.payload.tab||t.analytics.originLevel2}));function zS(e,t){X(t.accessToken)||(e.accessToken=t.accessToken),e.environment=t.environment??"prod",X(t.organizationId)||(e.organizationId=t.organizationId)}function WS(e,t){X(t.proxyBaseUrl)||(e.search.apiBaseUrl=t.proxyBaseUrl),X(t.locale)||(e.search.locale=t.locale),X(t.timezone)||(e.search.timezone=t.timezone),X(t.authenticationProviders)||(e.search.authenticationProviders=t.authenticationProviders)}function GS(e,t){X(t.enabled)||(e.analytics.enabled=t.enabled),X(t.originContext)||(e.analytics.originContext=t.originContext),X(t.originLevel2)||(e.analytics.originLevel2=t.originLevel2),X(t.originLevel3)||(e.analytics.originLevel3=t.originLevel3),X(t.proxyBaseUrl)||(e.analytics.apiBaseUrl=t.proxyBaseUrl),X(t.trackingId)||(e.analytics.trackingId=t.trackingId),X(t.analyticsMode)||(e.analytics.analyticsMode=t.analyticsMode),X(t.source)||(e.analytics.source=t.source);let r=(0,Cd.default)();r&&(e.analytics.analyticsMode="next",e.analytics.trackingId=r),X(t.runtimeEnvironment)||(e.analytics.runtimeEnvironment=t.runtimeEnvironment),X(t.anonymous)||(e.analytics.anonymous=t.anonymous),X(t.deviceId)||(e.analytics.deviceId=t.deviceId),X(t.userDisplayName)||(e.analytics.userDisplayName=t.userDisplayName),X(t.documentLocation)||(e.analytics.documentLocation=t.documentLocation)}var ze=bd;p();u();d();l();function KS(e){return e.instantlyCallable}var Ad=()=>e=>t=>e(KS(t)?t():t);p();u();d();l();var wd=e=>()=>t=>r=>{let n=r;if(!n.error)return t(r);let o=n.error,i=[n.payload?.errorCode,n.payload?.message].filter(Boolean).join(" - ");if(n.payload?.ignored||e.error(i||o.stack||o.message||o.name||"Error",`Action dispatch error ${n.type}`,r),n.error.name!=="SchemaValidationError")return t(r)},xd=e=>t=>r=>n=>(e.debug({action:n,nextState:t.getState()},`Action dispatched: ${n.type}`),r(n));p();u();d();l();var fs=e=>({referrer:document.referrer,userAgent:navigator.userAgent,location:window.location.href,clientId:e}),ms=()=>({referrer:null,userAgent:null,location:null,clientId:""});p();u();d();l();function Rd(e,t){let r={...e},n,o=i=>(a,m)=>{let f=i(a,m);return n?n(f,m):f};return{get combinedReducer(){let i=oc(Object.entries(t).filter(([a])=>!(a in r)).map(([a,m])=>[a,()=>m]));return o(or({...i,...r}))},containsAll(i){return Object.keys(i).every(m=>m in r)},add(i){Object.keys(i).filter(a=>!(a in r)).forEach(a=>r[a]=i[a])},addCrossReducer(i){n=i}}}p();u();d();l();p();u();d();l();function $o(e,t,r){var n,o,i;t===void 0&&(t=50),r===void 0&&(r={});var a=(n=r.isImmediate)!=null&&n,m=(o=r.callback)!=null&&o,f=r.maxWait,s=Date.now(),h=[];function y(){if(f!==void 0){var g=Date.now()-s;if(g+t>=f)return f-g}return t}var S=function(){var g=[].slice.call(arguments),v=this;return new Promise(function(R,I){var x=a&&i===void 0;if(i!==void 0&&clearTimeout(i),i=setTimeout(function(){if(i=void 0,s=Date.now(),!a){var A=e.apply(v,g);m&&m(A),h.forEach(function(E){return(0,E.resolve)(A)}),h=[]}},y()),x){var T=e.apply(v,g);return m&&m(T),R(T)}h.push({resolve:R,reject:I})})};return S.cancel=function(g){i!==void 0&&clearTimeout(i),h.forEach(function(v){return(0,v.reject)(g)}),h=[]},S}function Ed(e,t){let r=0,n=$o(()=>r=0,500);return o=>i=>(/*#__PURE__*/function(){var _ref27=_asyncToGenerator(function*(a){if(!(typeof a=="function"))return i(a);let f=yield i(a);if(!YS(f))return f;if(typeof t!="function")return e.warn("Unable to renew the expired token because a renew function was not provided. Please specify the #renewAccessToken option when initializing the engine."),f;if(r>=5)return e.warn("Attempted to renew the token but was not successful. Please check the #renewAccessToken function."),f;r++,n();let s=yield JS(t);o.dispatch(yt({accessToken:s})),o.dispatch(a)});return function(_x58){return _ref27.apply(this,arguments)}}())}function YS(e){return e?.error?.name===new nr().name}function JS(_x59){return _JS.apply(this,arguments)}function _JS(){_JS=_asyncToGenerator(function*(e){try{return yield e()}catch{return""}});return _JS.apply(this,arguments)}p();u();d();l();function Pd({reducer:e,preloadedState:t,middlewares:r=[],thunkExtraArguments:n,name:o}){return Gc({reducer:e,preloadedState:t,devTools:{stateSanitizer:i=>i.history?{...i,history:"<<OMIT>>"}:i,name:o,shouldHotReload:!1},middleware:i=>i({thunk:{extraArgument:n}}).prepend(...r).concat(xd(n.logger))})}function XS(e,t){let{analytics:r}=e,{analyticsClientMiddleware:n,...o}=r??{},i={...o,...(r?.proxyBaseUrl&&{apiBaseUrl:r.proxyBaseUrl,nexApiBaseUrl:r.proxyBaseUrl})};if(i.analyticsMode!=="next"&&nc())return t.info("Analytics disabled since doNotTrack is active."),{...i,enabled:!1};if(i.analyticsMode==="next"&&!o.trackingId)throw new gs("analytics.trackingId is required when analytics.analyticsMode=\"next\"");return i}function Id(e,t){let r={...e.reducers,configuration:ze,version:ld},n=ZS({...e,reducers:r},t,ze),{accessToken:o,environment:i,organizationId:a}=e.configuration;n.dispatch(yt({accessToken:o,environment:i,organizationId:a}));let m=XS(e.configuration,n.logger);return m&&n.dispatch(lr(m)),n}function ZS(e,t,r){let{reducers:n}=e,o=Rd({...n,configurationReducer:r},e.preloadedState??{});e.crossReducer&&o.addCrossReducer(e.crossReducer);let i=t.logger,a=()=>{let h="";try{h=wr(s.state).getMeta("").clientId}catch(y){i.warn("Error while obtaining clientID from relay",y)}return h},m={...t,get relay(){return wr(s.state)},get navigatorContext(){return e.navigatorContextProvider?e.navigatorContextProvider():cs()?fs(a()):ms()}},f=ev(e,m,o),s={addReducers(h){o.containsAll(h)||(o.add(h),f.replaceReducer(o.combinedReducer))},dispatch:f.dispatch,subscribe:f.subscribe,enableAnalytics(){f.dispatch(pr())},disableAnalytics(){f.dispatch(dr())},get state(){return f.getState()},get relay(){return wr(this.state)},get navigatorContext(){return e.navigatorContextProvider?e.navigatorContextProvider():cs()?fs(a()):ms()},logger:i,store:f};return s}function ev(e,t,r){let{preloadedState:n,configuration:o}=e,i=o.name||"coveo-headless",a=tv(e,t.logger);return Pd({preloadedState:n,reducer:r.combinedReducer,middlewares:a,thunkExtraArguments:t,name:i})}function tv(e,t){let{renewAccessToken:r}=e.configuration,n=Ed(t,r);return[Ad,n,wd(t),pd].concat(ss.middleware,e.middlewares||[])}var gs=class extends Error{constructor(t){super(t),this.name="InvalidEngineConfiguration"}};p();u();d();l();var _d=je(Nd(),1);function Vd(e){return(0,_d.pino)({name:"@coveo/headless",level:e?.level||"warn",formatters:{log:e?.logFormatter}})}p();u();d();l();function Ld(e,t){let r=vv(e),n=Ue,o=Cv(e);return{analyticsClientMiddleware:r,validatePayload:n,preprocessRequest:o,logger:t}}function vv(e){let{analytics:t}=e,r=(n,o)=>o;return t?.analyticsClientMiddleware||r}function Cv(e){return e.preprocessRequest||qn}p();u();d();l();p();u();d();l();var jd={organizationId:K,accessToken:K,name:new H({required:!1,emptyAllowed:!1}),analytics:new G({options:{required:!1},values:{enabled:new te({required:!1}),originContext:new H({required:!1}),originLevel2:new H({required:!1}),originLevel3:new H({required:!1}),analyticsMode:new H({constrainTo:["legacy","next"],required:!1,default:"next"}),proxyBaseUrl:new H({required:!1,url:!0}),trackingId:new H({required:!1,emptyAllowed:!1,regex:/^[a-zA-Z0-9_\-.]{1,100}$/})}}),environment:new H({required:!1,default:"prod",constrainTo:["prod","hipaa","stg","dev"]})};function Ud(){return{organizationId:"searchuisamples",accessToken:"xx564559b1-0045-48e1-953c-3addd1ee4457"}}var Bd=new Fe({...jd,pipeline:new H({required:!1,emptyAllowed:!0}),searchHub:ve,locale:ve,timezone:ve});function bs(){return{...Ud(),searchHub:"default"}}var bv={debug:so,pipeline:gr,searchHub:Pr,recommendation:Rr};function Qd(e){let t=Vd(e.loggerOptions);Av(e.configuration,t);let r=wv(e.configuration,t),n={...Ld(e.configuration,t),apiClient:r},o={...e,reducers:bv},i=Id(o,n),{pipeline:a,searchHub:m,timezone:f,locale:s,proxyBaseUrl:h}=e.configuration;return i.dispatch(Je({timezone:f,locale:s,proxyBaseUrl:h})),X(a)||i.dispatch(fr(a)),X(m)||i.dispatch(Er(m)),{...i,get state(){return i.state}}}function Av(e,t){try{Bd.validate(e)}catch(r){throw t.error(r,"Recommendation engine configuration error"),r}}function wv(e,t){return new jn({logger:t,preprocessRequest:e.preprocessRequest||qn,postprocessSearchResponseMiddleware:e.preprocessSearchResponseMiddleware||ic,postprocessFacetSearchResponseMiddleware:ac,postprocessQuerySuggestResponseMiddleware:sc})}p();u();d();l();function xv(e){return e.addReducers({configuration:ze}),{disableAnalytics:dr,enableAnalytics:pr,setOriginLevel2:ro,setOriginLevel3:no,updateAnalyticsConfiguration:lr,updateBasicConfiguration:yt}}p();u();d();l();function Rv(e){return e.addReducers({configuration:ze,pipeline:gr,searchHub:Pr}),{updateSearchConfiguration:Je}}p();u();d();l();p();u();d();l();p();u();d();l();var Pt=()=>new H({required:!1,emptyAllowed:!0}),Wo=D("advancedSearchQueries/update",e=>B(e,{aq:Pt(),cq:Pt(),lq:Pt(),dq:Pt()})),Go=D("advancedSearchQueries/register",e=>B(e,{aq:Pt(),cq:Pt(),lq:Pt(),dq:Pt()}));p();u();d();l();var It=()=>({cq:"",cqWasSet:!1,aq:"",aqWasSet:!1,lq:"",lqWasSet:!1,dq:"",dqWasSet:!1,defaultFilters:{cq:"",aq:"",lq:"",dq:""}});var $d=me(It(),e=>{e.addCase(Wo,(t,r)=>{let{aq:n,cq:o,lq:i,dq:a}=r.payload;Ce(n)||(t.aq=n,t.aqWasSet=!0),Ce(o)||(t.cq=o,t.cqWasSet=!0),Ce(i)||(t.lq=i,t.lqWasSet=!0),Ce(a)||(t.dq=a,t.dqWasSet=!0)}).addCase(Go,(t,r)=>{let{aq:n,cq:o,lq:i,dq:a}=r.payload;Ce(n)||(t.defaultFilters.aq=n,t.aqWasSet||(t.aq=n)),Ce(o)||(t.defaultFilters.cq=o,t.cqWasSet||(t.cq=o)),Ce(i)||(t.defaultFilters.lq=i,t.lqWasSet||(t.lq=i)),Ce(a)||(t.defaultFilters.dq=a,t.dqWasSet||(t.dq=a))}).addCase(Me.fulfilled,(t,r)=>r.payload?.advancedSearchQueries??t).addCase(St,(t,r)=>{let{aq:n,cq:o}=r.payload;Ce(n)||(t.aq=n,t.aqWasSet=!0),Ce(o)||(t.cq=o,t.cqWasSet=!0)})});function Ev(e){return e.addReducers({advancedSearchQueries:$d}),{updateAdvancedSearchQueries:Wo,registerAdvancedSearchQueries:Go}}p();u();d();l();p();u();d();l();p();u();d();l();var Pv=new ie({each:K,required:!0}),Hd=(e,t)=>(B(e,K),Dn(t)?B(t,K):B(t,Pv),{payload:{contextKey:e,contextValue:t}}),Kt=D("context/set",e=>{for(let[t,r]of Object.entries(e))Hd(t,r);return{payload:e}}),Yt=D("context/add",e=>Hd(e.contextKey,e.contextValue)),Jt=D("context/remove",e=>B(e,K));p();u();d();l();function Ko(){return{contextValues:{}}}var Yo=me(Ko(),e=>{e.addCase(Kt,(t,r)=>{t.contextValues=r.payload}).addCase(Yt,(t,r)=>{t.contextValues[r.payload.contextKey]=r.payload.contextValue}).addCase(Jt,(t,r)=>{delete t.contextValues[r.payload]}).addCase(Me.fulfilled,(t,r)=>{r.payload&&(t.contextValues=r.payload.context.contextValues)})});function Iv(e){return e.addReducers({context:Yo}),{addContext:Yt,removeContext:Jt,setContext:Kt}}p();u();d();l();p();u();d();l();p();u();d();l();var Mr=D("dictionaryFieldContext/set",e=>{let t=new G({options:{required:!0}}),r=B(e,t).error;if(r)return{payload:e,error:r};let n=Object.values(e),o=new ie({each:we}),i=B(n,o).error;return i?{payload:e,error:i}:{payload:e}}),qr=D("dictionaryFieldContext/add",e=>{let t=new G({options:{required:!0},values:{field:we,key:we}});return B(e,t)}),Nr=D("dictionaryFieldContext/remove",e=>B(e,we));p();u();d();l();function Jo(){return{contextValues:{}}}var Xo=me(Jo(),e=>{e.addCase(Mr,(t,r)=>{t.contextValues=r.payload}).addCase(qr,(t,r)=>{let{field:n,key:o}=r.payload;t.contextValues[n]=o}).addCase(Nr,(t,r)=>{delete t.contextValues[r.payload]}).addCase(Me.fulfilled,(t,r)=>{r.payload&&(t.contextValues=r.payload.dictionaryFieldContext.contextValues)})});function Tv(e){return e.addReducers({dictionaryFieldContext:Xo}),{addContext:qr,removeContext:Nr,setContext:Mr}}p();u();d();l();p();u();d();l();p();u();d();l();p();u();d();l();var Tt=/*#__PURE__*/function(){var _ref28=_asyncToGenerator(function*(e,t){return{accessToken:e.configuration.accessToken,organizationId:e.configuration.organizationId,url:e.configuration.search.apiBaseUrl??gt(e.configuration.organizationId,e.configuration.environment),locale:e.configuration.search.locale,debug:e.debug,tab:e.configuration.analytics.originLevel2,referrer:e.configuration.analytics.originLevel3,timezone:e.configuration.search.timezone,...(e.configuration.analytics.enabled&&{actionsHistory:Ze.getHistory()}),...(e.advancedSearchQueries?.aq&&{aq:e.advancedSearchQueries.aq}),...(e.advancedSearchQueries?.cq&&{cq:e.advancedSearchQueries.cq}),...(e.advancedSearchQueries?.lq&&{lq:e.advancedSearchQueries.lq}),...(e.advancedSearchQueries?.dq&&{dq:e.advancedSearchQueries.dq}),...(e.context&&{context:e.context.contextValues}),...(e.fields&&!e.fields.fetchAllFields&&{fieldsToInclude:e.fields.fieldsToInclude}),...(e.dictionaryFieldContext&&{dictionaryFieldContext:e.dictionaryFieldContext.contextValues}),...(e.pipeline&&{pipeline:e.pipeline}),...(e.query&&{q:e.query.q,enableQuerySyntax:e.query.enableQuerySyntax}),...(e.searchHub&&{searchHub:e.searchHub}),...(e.sortCriteria&&{sortCriteria:e.sortCriteria}),...(e.configuration.analytics.enabled&&(yield Io(e.configuration.analytics,t))),...(e.excerptLength&&!X(e.excerptLength.length)&&{excerptLength:e.excerptLength.length}),...(e.configuration.search.authenticationProviders.length&&{authentication:e.configuration.search.authenticationProviders.join(",")})}});return function Tt(_x60,_x61){return _ref28.apply(this,arguments)}}();p();u();d();l();p();u();d();l();var zd=(e,t,r)=>({analytics:{clientId:t.clientId,clientTimestamp:new Date().toISOString(),documentReferrer:t.referrer,documentLocation:t.location,originContext:e.originContext,...(r&&{actionCause:r.actionCause}),...(r&&{customData:r.customData}),...(e.userDisplayName&&{userDisplayName:e.userDisplayName}),...(e.deviceId&&{deviceId:e.deviceId}),...(e.trackingId&&{trackingId:e.trackingId}),capture:t.capture??t.clientId!=="",source:br(e)}});var _r=(e,t,r)=>({accessToken:e.configuration.accessToken,organizationId:e.configuration.organizationId,url:e.configuration.search.apiBaseUrl??gt(e.configuration.organizationId,e.configuration.environment),locale:e.configuration.search.locale,debug:e.debug,tab:e.configuration.analytics.originLevel2,referrer:t.referrer,timezone:e.configuration.search.timezone,...(e.advancedSearchQueries?.aq&&{aq:e.advancedSearchQueries.aq}),...(e.advancedSearchQueries?.cq&&{cq:e.advancedSearchQueries.cq}),...(e.advancedSearchQueries?.lq&&{lq:e.advancedSearchQueries.lq}),...(e.advancedSearchQueries?.dq&&{dq:e.advancedSearchQueries.dq}),...(e.context&&{context:e.context.contextValues}),...(e.fields&&!e.fields.fetchAllFields&&{fieldsToInclude:e.fields.fieldsToInclude}),...(e.dictionaryFieldContext&&{dictionaryFieldContext:e.dictionaryFieldContext.contextValues}),...(e.pipeline&&{pipeline:e.pipeline}),...(e.query&&{q:e.query.q,enableQuerySyntax:e.query.enableQuerySyntax}),...(e.searchHub&&{searchHub:e.searchHub}),...(e.sortCriteria&&{sortCriteria:e.sortCriteria}),...(e.configuration.analytics.enabled&&zd(e.configuration.analytics,t,r)),...(e.excerptLength&&!X(e.excerptLength.length)&&{excerptLength:e.excerptLength.length}),...(e.configuration.search.authenticationProviders.length&&{authentication:e.configuration.search.authenticationProviders.join(",")})});var Fv={collectionField:new H({emptyAllowed:!1,required:!1}),parentField:new H({emptyAllowed:!1,required:!1}),childField:new H({emptyAllowed:!1,required:!1}),numberOfFoldedResults:new J({min:0,required:!1})},Wd=D("folding/register",e=>B(e,Fv)),aU=ue("folding/loadCollection",/*#__PURE__*/function(){var _ref29=_asyncToGenerator(function*(e,{getState:t,rejectWithValue:r,extra:{apiClient:n,navigatorContext:o}}){let i=t(),a=i.configuration.analytics.analyticsMode==="legacy"?yield Tt(i):_r(i,o),m=yield n.search({...a,q:kv(i),enableQuerySyntax:!0,cq:`@${i.folding.fields.collection}="${e}"`,filterField:i.folding.fields.collection,childField:i.folding.fields.parent,parentField:i.folding.fields.child,filterFieldRange:100},{origin:"foldingCollection"});return ke(m)?r(m.error):{collectionId:e,results:m.success.results,searchUid:m.success.searchUid,rootResult:i.folding.collections[e].result}});return function(_x62,_x63){return _ref29.apply(this,arguments)}}());function kv(e){return e.query.q===""?"":e.query.enableQuerySyntax?`${e.query.q} OR @uri`:`( <@- ${e.query.q} -@> ) OR @uri`}p();u();d();l();var Gd=()=>({enabled:!1,fields:{collection:"foldingcollection",parent:"foldingparent",child:"foldingchild"},filterFieldRange:2,collections:{}});p();u();d();l();var Vr=D("fields/registerFieldsToInclude",e=>B(e,to)),Zo=D("fields/fetchall/enable"),ei=D("fields/fetchall/disable"),ti=ue("fields/fetchDescription",/*#__PURE__*/function(){var _ref30=_asyncToGenerator(function*(e,{extra:t,getState:r,rejectWithValue:n}){let o=r(),{accessToken:i,environment:a,organizationId:m}=o.configuration,{apiBaseUrl:f}=o.configuration.search,s=yield t.apiClient.fieldDescriptions({accessToken:i,organizationId:m,url:f??gt(m,a)});return ke(s)?n(s.error):s.success.fields});return function(_x64,_x65){return _ref30.apply(this,arguments)}}());p();u();d();l();var ri=["author","language","urihash","objecttype","collection","source","permanentid"],As=[...ri,"date","filetype","parents"],Kd=[...As,"ec_price","ec_name","ec_description","ec_brand","ec_category","ec_item_group_id","ec_shortdesc","ec_thumbnails","ec_images","ec_promo_price","ec_in_stock","ec_rating"],Yd=()=>({fieldsToInclude:ri,fetchAllFields:!1,fieldsDescription:[]});var ni=me(Yd(),e=>e.addCase(Vr,(t,r)=>{t.fieldsToInclude=[...new Set(t.fieldsToInclude.concat(r.payload))]}).addCase(Zo,t=>{t.fetchAllFields=!0}).addCase(ei,t=>{t.fetchAllFields=!1}).addCase(ti.fulfilled,(t,{payload:r})=>{t.fieldsDescription=r}).addCase(Wd,(t,{payload:r})=>{let n=Gd().fields;t.fieldsToInclude.push(r.collectionField??n.collection,r.parentField??n.parent,r.childField??n.child)}));function Ov(e){return e.addReducers({fields:ni}),{registerFieldsToInclude:Vr,enableFetchAllFields:Zo,disableFetchAllFields:ei,fetchFieldsDescription:ti}}p();u();d();l();function Dv(e){return e.addReducers({pipeline:gr}),{setPipeline:fr}}p();u();d();l();function Mv(e){return e.addReducers({searchHub:Pr}),{setSearchHub:Er}}p();u();d();l();function qv(e){return e.addReducers({debug:so}),{disableDebug:io,enableDebug:oo}}p();u();d();l();function Nv(e){return e.addReducers({recommendation:Rr}),{getRecommendations:At,setRecommendationId:xr}}p();u();d();l();function _v(e){return e.addReducers({}),{logRecommendationOpen:ko}}p();u();d();l();p();u();d();l();p();u();d();l();var Lr=D("breadcrumb/deselectAll"),oi=D("breadcrumb/deselectAllNonBreadcrumbs");p();u();d();l();p();u();d();l();var En={value:K,numberOfResults:new J({min:0}),state:K};p();u();d();l();var le=K;var Uv=new J({min:1,default:8,required:!1}),Bv=new J({min:1,max:20,default:5,required:!1}),Qv={desiredCount:Bv,numberOfValues:Uv},nQ=D("automaticFacet/setOptions",e=>B(e,Qv)),oQ=D("automaticFacet/deselectAll",e=>B(e,le)),$v=K,Jd=D("automaticFacet/toggleSelectValue",e=>B(e,{field:$v,selection:new G({values:En})}));p();u();d();l();p();u();d();l();var Hv={state:new pe({required:!0}),numberOfResults:new J({required:!0,min:0}),value:new H({required:!0,emptyAllowed:!0}),path:new ie({required:!0,each:K}),moreValuesAvailable:new te({required:!1})};function ws(e){e.children.forEach(t=>{ws(t)}),Ue({state:e.state,numberOfResults:e.numberOfResults,value:e.value,path:e.path,moreValuesAvailable:e.moreValuesAvailable},Hv)}var jr={facetId:le,field:K,tabs:new G({options:{required:!1},values:{included:new ie({each:new H}),excluded:new ie({each:new H})}}),activeTab:new H({required:!1}),delimitingCharacter:new H({required:!1,emptyAllowed:!0}),filterFacetCount:new te({required:!1}),injectionDepth:new J({required:!1,min:0}),numberOfValues:new J({required:!1,min:1}),sortCriteria:new pe({required:!1}),basePath:new ie({required:!1,each:K}),filterByBasePath:new te({required:!1})};var AQ=D("categoryFacet/register",e=>B(e,jr)),Xd=D("categoryFacet/toggleSelectValue",e=>{try{return Ue(e.facetId,K),ws(e.selection),{payload:e,error:null}}catch(t){return{payload:e,error:at(t)}}}),Zd=D("categoryFacet/deselectAll",e=>B(e,jr.facetId)),wQ=D("categoryFacet/updateNumberOfValues",e=>B(e,{facetId:jr.facetId,numberOfValues:jr.numberOfValues})),xQ=D("categoryFacet/updateSortCriterion",e=>B(e,{facetId:jr.facetId,criterion:new pe})),RQ=D("categoryFacet/updateBasePath",e=>B(e,{facetId:jr.facetId,basePath:new ie({each:K})}));p();u();d();l();p();u();d();l();var Pn={facetId:le,captions:new G({options:{required:!1}}),numberOfValues:new J({required:!1,min:1}),query:new H({required:!1,emptyAllowed:!0})};var zv={path:new ie({required:!0,each:K}),displayValue:we,rawValue:we,count:new J({required:!0,min:0})},ep=D("categoryFacet/selectSearchResult",e=>B(e,{facetId:le,value:new G({values:zv})})),QQ=D("categoryFacetSearch/register",e=>B(e,Pn));p();u();d();l();var tp={facetId:le,value:new G({values:{displayValue:we,rawValue:we,count:new J({required:!0,min:0})}})},e1=D("facetSearch/register",e=>B(e,Pn)),t1=D("facetSearch/update",e=>B(e,Pn)),rp=D("facetSearch/toggleSelectValue",e=>B(e,tp)),np=D("facetSearch/toggleExcludeValue",e=>B(e,tp));p();u();d();l();p();u();d();l();function ip(e){let t=op(e.start,e),r=op(e.end,e),n=e.endInclusive??!1,o=e.state??"idle";return{start:t,end:r,endInclusive:n,state:o}}function op(e,t){let{dateFormat:r}=t;return Il(e)?(za(e),Rl(e)):typeof e=="string"&&wt(e)?(za(e),e):(bl(e,r),qo(Fr(e,r)))}p();u();d();l();p();u();d();l();var S1=new H({regex:/^[a-zA-Z0-9-_]+$/}),v1=new H({required:!0}),C1=new ie({each:new H}),b1=new H,A1=new te,w1=new te,x1=new J({min:0}),Wv=new J({min:1}),R1=new te({required:!0}),Gv=new G,Kv=new H,Yv={captions:Gv,numberOfValues:Wv,query:Kv},E1=new G({values:Yv}),ap=new G({options:{required:!1},values:{type:new H({constrainTo:["simple"],emptyAllowed:!1,required:!0}),values:new ie({required:!0,max:25,each:new H({emptyAllowed:!1,required:!0})})}}),P1=new te,sp=new ie({min:1,max:25,required:!1,each:new H({emptyAllowed:!1,required:!0})});var Jv={facetId:le,field:new H({required:!0,emptyAllowed:!0}),tabs:new G({options:{required:!1},values:{included:new ie({each:new H}),excluded:new ie({each:new H})}}),activeTab:new H({required:!1}),filterFacetCount:new te({required:!1}),injectionDepth:new J({required:!1,min:0}),numberOfValues:new J({required:!1,min:1}),sortCriteria:new pe({required:!1}),resultsMustMatch:new pe({required:!1}),allowedValues:ap,customSort:sp},L1=D("facet/register",e=>B(e,Jv)),cp=D("facet/toggleSelectValue",e=>B(e,{facetId:le,selection:new G({values:En})})),up=D("facet/toggleExcludeValue",e=>B(e,{facetId:le,selection:new G({values:En})})),ii=D("facet/deselectAll",e=>B(e,le)),j1=D("facet/updateSortCriterion",e=>B(e,{facetId:le,criterion:new pe({required:!0})})),U1=D("facet/updateNumberOfValues",e=>B(e,{facetId:le,numberOfValues:new J({required:!0,min:1})})),B1=D("facet/updateIsFieldExpanded",e=>B(e,{facetId:le,isFieldExpanded:new te({required:!0})})),Q1=D("facet/updateFreezeCurrentValues",e=>B(e,{facetId:le,freezeCurrentValues:new te({required:!0})}));p();u();d();l();var lp=D("rangeFacet/updateSortCriterion",e=>B(e,{facetId:le,criterion:new pe({required:!0})}));p();u();d();l();var ai={state:K,start:new J({required:!0}),end:new J({required:!0}),endInclusive:new te({required:!0}),numberOfResults:new J({required:!0,min:0})},si={start:K,end:K,endInclusive:new te({required:!0}),state:K,numberOfResults:new J({required:!0,min:0})};var Xv={start:K,end:K,endInclusive:new te({required:!0}),state:K},Zv={facetId:le,field:K,tabs:new G({options:{required:!1},values:{included:new ie({each:new H}),excluded:new ie({each:new H})}}),activeTab:new H({required:!1}),currentValues:new ie({required:!1,each:new G({values:Xv})}),generateAutomaticRanges:new te({required:!0}),filterFacetCount:new te({required:!1}),injectionDepth:new J({required:!1,min:0}),numberOfValues:new J({required:!1,min:1}),sortCriteria:new pe({required:!1}),rangeAlgorithm:new pe({required:!1})};function dp(e){return wt(e)?bn(e):e}function pp(e){e.currentValues&&e.currentValues.forEach(t=>{let{start:r,end:n}=ip(t);if(Fr(dp(r)).isAfter(Fr(dp(n))))throw new Error(`The start value is greater than the end value for the date range ${t.start} to ${t.end}`)})}var A$=D("dateFacet/register",e=>{try{return Ue(e,Zv),pp(e),{payload:e,error:null}}catch(t){return{payload:e,error:at(t)}}}),fp=D("dateFacet/toggleSelectValue",e=>B(e,{facetId:le,selection:new G({values:si})})),mp=D("dateFacet/toggleExcludeValue",e=>B(e,{facetId:le,selection:new G({values:si})})),gp=D("dateFacet/updateFacetValues",e=>{try{return Ue(e,{facetId:le,values:new ie({each:new G({values:si})})}),pp({currentValues:e.values}),{payload:e,error:null}}catch(t){return{payload:e,error:at(t)}}});p();u();d();l();var eC={state:K,start:new J({required:!0}),end:new J({required:!0}),endInclusive:new te({required:!0})},tC={facetId:le,field:K,tabs:new G({options:{required:!1},values:{included:new ie({each:new H}),excluded:new ie({each:new H})}}),activeTab:new H({required:!1}),currentValues:new ie({required:!1,each:new G({values:eC})}),generateAutomaticRanges:new te({required:!0}),filterFacetCount:new te({required:!1}),injectionDepth:new J({required:!1,min:0}),numberOfValues:new J({required:!1,min:1}),sortCriteria:new pe({required:!1}),rangeAlgorithm:new pe({required:!1})};function hp(e){e.currentValues&&e.currentValues.forEach(({start:t,end:r})=>{if(t>r)throw new Error(`The start value is greater than the end value for the numeric range ${t} to ${r}`)})}var q$=D("numericFacet/register",e=>{try{return B(e,tC),hp(e),{payload:e,error:null}}catch(t){return{payload:e,error:at(t)}}}),yp=D("numericFacet/toggleSelectValue",e=>B(e,{facetId:le,selection:new G({values:ai})})),Sp=D("numericFacet/toggleExcludeValue",e=>B(e,{facetId:le,selection:new G({values:ai})})),vp=D("numericFacet/updateFacetValues",e=>{try{return Ue(e,{facetId:le,values:new ie({each:new G({values:ai})})}),hp({currentValues:e.values}),{payload:e,error:null}}catch(t){return{payload:e,error:at(t)}}});p();u();d();l();p();u();d();l();var ci=D("facet/updateFacetAutoSelection",e=>B(e,{allow:new te({required:!0})}));p();u();d();l();p();u();d();l();var ui=class extends bt{constructor(r){super(r);this.getState=r}get activeInstantResultQuery(){let r=this.getState().instantResults;for(let n in r)for(let o in r[n].cache)if(r[n].cache[o].isActive)return r[n].q;return null}get activeInstantResultCache(){let r=this.getState().instantResults;for(let n in r)for(let o in r[n].cache)if(r[n].cache[o].isActive)return r[n].cache[o];return null}get results(){return this.activeInstantResultCache?.results}get queryText(){return this.activeInstantResultQuery??Ve().q}get responseTime(){return this.activeInstantResultCache?.duration??We().duration}get numberOfResults(){return this.activeInstantResultCache?.totalCountFiltered??We().response.totalCountFiltered}getSearchUID(){return this.activeInstantResultCache?.searchUid||super.getSearchUID()}};var Cp=()=>qe("analytics/instantResult/searchboxAsYouType",e=>e.makeSearchboxAsYouType(),e=>new ui(e)),bp=()=>({actionCause:"searchboxAsYouType"});p();u();d();l();var xs={id:K},rC={...xs,q:we},yH=D("instantResults/register",e=>B(e,xs)),li=D("instantResults/updateQuery",e=>B(e,rC)),SH=D("instantResults/clearExpired",e=>B(e,xs));p();u();d();l();var di=new J({required:!0,min:0}),pi=D("pagination/registerNumberOfResults",e=>B(e,di)),fi=D("pagination/updateNumberOfResults",e=>B(e,di)),mi=D("pagination/registerPage",e=>B(e,di)),Ft=D("pagination/updatePage",e=>B(e,di)),gi=D("pagination/nextPage"),hi=D("pagination/previousPage");p();u();d();l();var kt=D("query/updateQuery",e=>B(e,{q:new H,enableQuerySyntax:new te}));p();u();d();l();p();u();d();l();var Rs=()=>qe("search/logFetchMoreResults",e=>e.makeFetchMoreResults()),Ot=e=>qe("search/queryError",(t,r)=>t.makeQueryError({query:r.query?.q||Ve().q,aq:r.advancedSearchQueries?.aq||It().aq,cq:r.advancedSearchQueries?.cq||It().cq,dq:r.advancedSearchQueries?.dq||It().dq,errorType:e.type,errorMessage:e.message}));p();u();d();l();p();u();d();l();var XH=D("didYouMean/enable"),ZH=D("didYouMean/disable"),ez=D("didYouMean/automaticCorrections/disable"),tz=D("didYouMean/automaticCorrections/enable"),yi=D("didYouMean/correction",e=>B(e,K)),rz=D("didYouMean/automaticCorrections/mode",e=>B(e,new H({constrainTo:["next","legacy"],emptyAllowed:!1,required:!0})));p();u();d();l();var Es=()=>qe("analytics/didyoumean/automatic",e=>e.makeDidYouMeanAutomatic());var Ap=()=>({actionCause:"didYouMeanAutomatic"});p();u();d();l();p();u();d();l();function wp(){return{freezeFacetOrder:!1,facets:{}}}p();u();d();l();function xp(){return[]}p();u();d();l();function In(){return{firstResult:0,defaultNumberOfResults:10,numberOfResults:10,totalCountFiltered:0}}p();u();d();l();function Rp(){return{}}p();u();d();l();function Ep(){return{}}p();u();d();l();function Pp(){return{}}function tt(e){return{context:e.context||Ko(),dictionaryFieldContext:e.dictionaryFieldContext||Jo(),facetSet:e.facetSet||Eo(),numericFacetSet:e.numericFacetSet||Ro(),dateFacetSet:e.dateFacetSet||xo(),categoryFacetSet:e.categoryFacetSet||wo(),automaticFacetSet:e.automaticFacetSet??Ao(),pagination:e.pagination||In(),query:e.query||Ve(),tabSet:e.tabSet||Pp(),advancedSearchQueries:e.advancedSearchQueries||It(),staticFilterSet:e.staticFilterSet||Ep(),querySet:e.querySet||Rp(),sortCriteria:e.sortCriteria||Po(),pipeline:e.pipeline||mr(),searchHub:e.searchHub||Ct(),facetOptions:e.facetOptions||wp(),facetOrder:e.facetOrder??xp(),debug:e.debug??ao()}}p();u();d();l();var CW=new G({values:{undoneQuery:we},options:{required:!0}}),Ip=()=>qe("analytics/trigger/query",(e,t)=>t.triggers?.queryModification.newQuery?e.makeTriggerQuery():null);p();u();d();l();var Si=D("trigger/query/ignore",e=>B(e,new H({emptyAllowed:!0,required:!0}))),vi=D("trigger/query/modification",e=>B(e,new G({values:{originalQuery:ve,modification:ve}})));p();u();d();l();var Dt=/*#__PURE__*/function(){var _ref31=_asyncToGenerator(function*(e,t){let r=iC(e),n=_o(e),o=nC(e),i=yield Tt(e,t),a=()=>e.pagination?e.pagination.firstResult+e.pagination.numberOfResults>5e3?5e3-e.pagination.firstResult:e.pagination.numberOfResults:void 0;return xt({...i,...(e.didYouMean&&{queryCorrection:{enabled:e.didYouMean.enableDidYouMean&&e.didYouMean.queryCorrectionMode==="next",options:{automaticallyCorrect:e.didYouMean.automaticallyCorrectQuery?"whenNoResults":"never"}},enableDidYouMean:e.didYouMean.enableDidYouMean&&e.didYouMean.queryCorrectionMode==="legacy"}),...(r&&{cq:r}),...(n.length&&{facets:n}),...(e.pagination&&{numberOfResults:a(),firstResult:e.pagination.firstResult}),...(e.facetOptions&&{facetOptions:{freezeFacetOrder:e.facetOptions.freezeFacetOrder}}),...(e.folding?.enabled&&{filterField:e.folding.fields.collection,childField:e.folding.fields.parent,parentField:e.folding.fields.child,filterFieldRange:e.folding.filterFieldRange}),...(e.automaticFacetSet&&{generateAutomaticFacets:{desiredCount:e.automaticFacetSet.desiredCount,numberOfValues:e.automaticFacetSet.numberOfValues,currentFacets:o}}),...(e.generatedAnswer&&{pipelineRuleParameters:{mlGenerativeQuestionAnswering:{responseFormat:e.generatedAnswer.responseFormat,citationsFieldToInclude:e.generatedAnswer.fieldsToIncludeInCitations}}})})});return function Dt(_x66,_x67){return _ref31.apply(this,arguments)}}();function nC(e){let t=e.automaticFacetSet?.set;return t?Object.values(t).map(r=>r.response).map(oC).filter(r=>r.currentValues.length>0):void 0}function oC(e){let{field:t,label:r,values:n}=e,o=n.filter(i=>i.state==="selected");return{field:t,label:r,currentValues:o}}function iC(e){let t=e.advancedSearchQueries?.cq.trim()||"",n=Object.values(e.tabSet||{}).find(i=>i.isActive)?.expression.trim()||"",o=aC(e);return[t,n,...o].filter(i=>!!i).join(" AND ")}function aC(e){return Object.values(e.staticFilterSet||{}).map(r=>{let n=r.values.filter(i=>i.state==="selected"&&!!i.expression.trim()),o=n.map(i=>i.expression).join(" OR ");return n.length>1?`(${o})`:o})}var Mt=class{constructor(t,r=n=>{this.dispatch(kt({q:n}))}){this.config=t;this.onUpdateQueryForCorrection=r}fetchFromAPI({mappings:t,request:r},n){var _this9=this;return _asyncToGenerator(function*(){let o=new Date().getTime(),i=No(yield _this9.extra.apiClient.search(r,n),t),a=new Date().getTime()-o,m=_this9.getState().query?.q||"";return{response:i,duration:a,queryExecuted:m,requestExecuted:r}})()}process(t){var _this10=this;return _asyncToGenerator(function*(){return _this10.processQueryErrorOrContinue(t)??(yield _this10.processQueryCorrectionsOrContinue(t))??(yield _this10.processQueryTriggersOrContinue(t))??_this10.processSuccessResponse(t)})()}processQueryErrorOrContinue(t){return ke(t.response)?(this.dispatch(Ot(t.response.error)),this.rejectWithValue(t.response.error)):null}processQueryCorrectionsOrContinue(t){var _this11=this;return _asyncToGenerator(function*(){let r=_this11.getState(),n=_this11.getSuccessResponse(t);if(!n||!r.didYouMean)return null;let{enableDidYouMean:o,automaticallyCorrectQuery:i}=r.didYouMean,{results:a,queryCorrections:m,queryCorrection:f}=n;if(!o||!i)return null;let s=a.length===0&&m&&m.length!==0,h=!X(f)&&!X(f.correctedQuery);if(!s&&!h)return null;let S=s?yield _this11.processLegacyDidYouMeanAutoCorrection(t):_this11.processModernDidYouMeanAutoCorrection(t);return _this11.dispatch(Xe(tt(_this11.getState()))),S})()}processLegacyDidYouMeanAutoCorrection(t){var _this12=this;return _asyncToGenerator(function*(){let r=_this12.getCurrentQuery(),n=_this12.getSuccessResponse(t);if(!n.queryCorrections)return null;let{correctedQuery:o}=n.queryCorrections[0],i=yield _this12.automaticallyRetryQueryWithCorrection(o);return ke(i.response)?(_this12.dispatch(Ot(i.response.error)),_this12.rejectWithValue(i.response.error)):(_this12.logOriginalAnalyticsQueryBeforeAutoCorrection(t),_this12.dispatch(Xe(tt(_this12.getState()))),{...i,response:{...i.response.success,queryCorrections:n.queryCorrections},automaticallyCorrected:!0,originalQuery:r,analyticsAction:Es()})})()}processModernDidYouMeanAutoCorrection(t){let r=this.getSuccessResponse(t),{correctedQuery:n,originalQuery:o}=r.queryCorrection;return this.onUpdateQueryForCorrection(n),{...t,response:{...r},queryExecuted:n,automaticallyCorrected:!0,originalQuery:o,analyticsAction:Es()}}logOriginalAnalyticsQueryBeforeAutoCorrection(t){let r=this.getState(),n=this.getSuccessResponse(t);this.analyticsAction&&this.analyticsAction()(this.dispatch,()=>this.getStateAfterResponse(t.queryExecuted,t.duration,r,n),this.extra)}processQueryTriggersOrContinue(t){var _this13=this;return _asyncToGenerator(function*(){let r=_this13.getSuccessResponse(t);if(!r)return null;let n=r.triggers.find(m=>m.type==="query")?.content||"";if(!n)return null;if(_this13.getState().triggers?.queryModification.queryToIgnore===n)return _this13.dispatch(Si("")),null;_this13.analyticsAction&&(yield _this13.dispatch(_this13.analyticsAction));let i=_this13.getCurrentQuery(),a=yield _this13.automaticallyRetryQueryWithTriggerModification(n);return ke(a.response)?(_this13.dispatch(Ot(a.response.error)),_this13.rejectWithValue(a.response.error)):(_this13.dispatch(Xe(tt(_this13.getState()))),{...a,response:{...a.response.success},automaticallyCorrected:!1,originalQuery:i,analyticsAction:Ip()})})()}getStateAfterResponse(t,r,n,o){return{...n,query:{q:t,enableQuerySyntax:n.query?.enableQuerySyntax??Ve().enableQuerySyntax},search:{...We(),duration:r,response:o,results:o.results}}}processSuccessResponse(t){return this.dispatch(Xe(tt(this.getState()))),{...t,response:this.getSuccessResponse(t),automaticallyCorrected:!1,originalQuery:this.getCurrentQuery(),analyticsAction:this.analyticsAction}}getSuccessResponse(t){return Un(t.response)?t.response.success:null}automaticallyRetryQueryWithCorrection(t){var _this14=this;return _asyncToGenerator(function*(){_this14.onUpdateQueryForCorrection(t);let r=yield _this14.fetchFromAPI(yield Dt(_this14.getState()),{origin:"mainSearch"});return _this14.dispatch(yi(t)),r})()}automaticallyRetryQueryWithTriggerModification(t){var _this15=this;return _asyncToGenerator(function*(){return _this15.dispatch(vi({newQuery:t,originalQuery:_this15.getCurrentQuery()})),_this15.onUpdateQueryForCorrection(t),yield _this15.fetchFromAPI(yield Dt(_this15.getState()),{origin:"mainSearch"})})()}getCurrentQuery(){let t=this.getState();return t.query?.q!==void 0?t.query.q:""}get extra(){return this.config.extra}getState(){return this.config.getState()}get dispatch(){return this.config.dispatch}get analyticsAction(){return this.config.analyticsAction}get rejectWithValue(){return this.config.rejectWithValue}};var O2=ue("search/prepareForSearchWithQuery",(e,t)=>{let{dispatch:r}=t;B(e,{q:new H,enableQuerySyntax:new te,clearFilters:new te}),e.clearFilters&&(r(Lr()),r(oi())),r(ci({allow:!0})),r(kt({q:e.q,enableQuerySyntax:e.enableQuerySyntax})),r(Ft(1))}),D2=ue("search/executeSearch",/*#__PURE__*/function(){var _ref32=_asyncToGenerator(function*(e,t){let r=t.getState();return yield Ci(r,t,e)});return function(_x68,_x69){return _ref32.apply(this,arguments)}}()),M2=ue("search/fetchPage",/*#__PURE__*/function(){var _ref33=_asyncToGenerator(function*(e,t){let r=t.getState();return yield Is(r,t,e)});return function(_x70,_x71){return _ref33.apply(this,arguments)}}()),q2=ue("search/fetchMoreResults",/*#__PURE__*/function(){var _ref34=_asyncToGenerator(function*(e,t){let r=t.getState();return yield Ts(t,r)});return function(_x72,_x73){return _ref34.apply(this,arguments)}}()),N2=ue("search/fetchFacetValues",/*#__PURE__*/function(){var _ref35=_asyncToGenerator(function*(e,t){let r=t.getState();return yield lC(t,e,r)});return function(_x74,_x75){return _ref35.apply(this,arguments)}}()),_2=ue("search/fetchInstantResults",/*#__PURE__*/function(){var _ref36=_asyncToGenerator(function*(e,t){return Ps(e,t)});return function(_x76,_x77){return _ref36.apply(this,arguments)}}()),sC=/*#__PURE__*/function(){var _ref37=_asyncToGenerator(function*(e,t){let r=yield Dt(e,t);return r.request={...r.request,firstResult:(e.pagination?.firstResult??0)+(e.search?.results.length??0)},r});return function sC(_x78,_x79){return _ref37.apply(this,arguments)}}(),cC=/*#__PURE__*/function(){var _ref38=_asyncToGenerator(function*(e,t,r){let n=yield Tt(e);return xt({...n,...(e.didYouMean&&{enableDidYouMean:e.didYouMean.enableDidYouMean}),numberOfResults:r,q:t})});return function cC(_x80,_x81,_x82){return _ref38.apply(this,arguments)}}(),uC=/*#__PURE__*/function(){var _ref39=_asyncToGenerator(function*(e,t){let r=yield Dt(e,t);return r.request.numberOfResults=0,r});return function uC(_x83,_x84){return _ref39.apply(this,arguments)}}(),Tp=e=>{e.configuration.analytics.enabled&&Ze.addElement({name:"Query",...(e.query?.q&&{value:e.query.q}),time:JSON.stringify(new Date)})};function Ps(_x85,_x86){return _Ps.apply(this,arguments)}function _Ps(){_Ps=_asyncToGenerator(function*(e,t){B(e,{id:K,q:K,maxResultsPerQuery:new J({required:!0,min:1}),cacheTimeout:new J});let{q:r,maxResultsPerQuery:n}=e,o=t.getState(),i=new Mt({...t,analyticsAction:Cp()},s=>{t.dispatch(li({q:s,id:e.id}))}),a=yield cC(o,r,n),m=yield i.fetchFromAPI(a,{origin:"instantResults",disableAbortWarning:!0}),f=yield i.process(m);return"response"in f?{results:f.response.results,searchUid:f.response.searchUid,analyticsAction:f.analyticsAction,totalCountFiltered:f.response.totalCountFiltered,duration:f.duration}:f});return _Ps.apply(this,arguments)}function Is(_x87,_x88,_x89){return _Is.apply(this,arguments)}function _Is(){_Is=_asyncToGenerator(function*(e,t,r){Tp(e);let{analyticsClientMiddleware:n,preprocessRequest:o,logger:i}=t.extra,{description:a}=yield r.prepare({getState:()=>t.getState(),analyticsClientMiddleware:n,preprocessRequest:o,logger:i}),m=new Mt({...t,analyticsAction:r}),f=yield Dt(e,a),s=yield m.fetchFromAPI(f,{origin:"mainSearch"});return yield m.process(s)});return _Is.apply(this,arguments)}function Ts(_x90,_x91){return _Ts.apply(this,arguments)}function _Ts(){_Ts=_asyncToGenerator(function*(e,t){let{analyticsClientMiddleware:r,preprocessRequest:n,logger:o}=e.extra,{description:i}=yield Rs().prepare({getState:()=>e.getState(),analyticsClientMiddleware:r,preprocessRequest:n,logger:o}),a=new Mt({...e,analyticsAction:Rs()}),m=yield sC(t,i),f=yield a.fetchFromAPI(m,{origin:"mainSearch"});return yield a.process(f)});return _Ts.apply(this,arguments)}function lC(_x92,_x93,_x94){return _lC.apply(this,arguments)}function _lC(){_lC=_asyncToGenerator(function*(e,t,r){let{analyticsClientMiddleware:n,preprocessRequest:o,logger:i}=e.extra,{description:a}=yield t.prepare({getState:()=>e.getState(),analyticsClientMiddleware:n,preprocessRequest:o,logger:i}),m=new Mt({...e,analyticsAction:t}),f=yield uC(r,a),s=yield m.fetchFromAPI(f,{origin:"facetValues"});return yield m.process(s)});return _lC.apply(this,arguments)}function Ci(_x95,_x96,_x97){return _Ci.apply(this,arguments)}function _Ci(){_Ci=_asyncToGenerator(function*(e,t,r){Tp(e);let{analyticsClientMiddleware:n,preprocessRequest:o,logger:i}=t.extra,{description:a}=yield r.prepare({getState:()=>t.getState(),analyticsClientMiddleware:n,preprocessRequest:o,logger:i}),m=yield Dt(e,a),f=new Mt({...t,analyticsAction:r}),s=yield f.fetchFromAPI(m,{origin:"mainSearch"});return yield f.process(s)});return _Ci.apply(this,arguments)}p();u();d();l();p();u();d();l();var qt=/*#__PURE__*/function(){var _ref40=_asyncToGenerator(function*(e,t,r){let n=yC(e),o=dC(e),i=pC(e),a=e.configuration.analytics.analyticsMode==="legacy"?yield Tt(e,r):_r(e,t,r),m=()=>e.pagination?e.pagination.firstResult+e.pagination.numberOfResults>5e3?5e3-e.pagination.firstResult:e.pagination.numberOfResults:void 0;return xt({...a,...(e.didYouMean&&{queryCorrection:{enabled:e.didYouMean.enableDidYouMean&&e.didYouMean.queryCorrectionMode==="next",options:{automaticallyCorrect:e.didYouMean.automaticallyCorrectQuery?"whenNoResults":"never"}},enableDidYouMean:e.didYouMean.enableDidYouMean&&e.didYouMean.queryCorrectionMode==="legacy"}),...(n&&{cq:n}),...(o.length&&{facets:o}),...(e.pagination&&{numberOfResults:m(),firstResult:e.pagination.firstResult}),...(e.facetOptions&&{facetOptions:{freezeFacetOrder:e.facetOptions.freezeFacetOrder}}),...(e.folding?.enabled&&{filterField:e.folding.fields.collection,childField:e.folding.fields.parent,parentField:e.folding.fields.child,filterFieldRange:e.folding.filterFieldRange}),...(e.automaticFacetSet&&{generateAutomaticFacets:{desiredCount:e.automaticFacetSet.desiredCount,numberOfValues:e.automaticFacetSet.numberOfValues,currentFacets:i}}),...(e.generatedAnswer&&{pipelineRuleParameters:{mlGenerativeQuestionAnswering:{responseFormat:e.generatedAnswer.responseFormat,citationsFieldToInclude:e.generatedAnswer.fieldsToIncludeInCitations}}})})});return function qt(_x98,_x99,_x100){return _ref40.apply(this,arguments)}}();function dC(e){return Ka(mC(e),e.facetOrder??[])}function pC(e){let t=e.automaticFacetSet?.set;return t?Object.values(t).map(r=>r.response).map(fC).filter(r=>r.currentValues.length>0):void 0}function fC(e){let{field:t,label:r,values:n}=e,o=n.filter(i=>i.state==="selected");return{field:t,label:r,currentValues:o}}function mC(e){return gC(e).filter(({facetId:t})=>e.facetOptions?.facets[t]?.enabled??!0)}function gC(e){return[...hC(e.facetSet??{}),...Fp(e.numericFacetSet??{}),...Fp(e.dateFacetSet??{}),...Rt(e.categoryFacetSet??{})]}function hC(e){return Rt(e).map(t=>{let r=Ya[t.sortCriteria];return r?{...t,sortCriteria:r}:t})}function Fp(e){return Rt(e).map(t=>{let n=t.currentValues.some(({state:o})=>o!=="idle");return t.generateAutomaticRanges&&!n?{...t,currentValues:[]}:t})}function yC(e){let t=e.advancedSearchQueries?.cq.trim()||"",n=Object.values(e.tabSet||{}).find(i=>i.isActive)?.expression.trim()||"",o=SC(e);return[t,n,...o].filter(i=>!!i).join(" AND ")}function SC(e){return Object.values(e.staticFilterSet||{}).map(r=>{let n=r.values.filter(i=>i.state==="selected"&&!!i.expression.trim()),o=n.map(i=>i.expression).join(" OR ");return n.length>1?`(${o})`:o})}var Nt=class{constructor(t,r=n=>{this.dispatch(kt({q:n}))}){this.config=t;this.onUpdateQueryForCorrection=r}fetchFromAPI({mappings:t,request:r},n){var _this16=this;return _asyncToGenerator(function*(){let o=new Date().getTime(),i=No(yield _this16.extra.apiClient.search(r,n),t),a=new Date().getTime()-o,m=_this16.getState().query?.q||"";return{response:i,duration:a,queryExecuted:m,requestExecuted:r}})()}process(t){var _this17=this;return _asyncToGenerator(function*(){return _this17.processQueryErrorOrContinue(t)??(yield _this17.processQueryCorrectionsOrContinue(t))??(yield _this17.processQueryTriggersOrContinue(t))??_this17.processSuccessResponse(t)})()}processQueryErrorOrContinue(t){return ke(t.response)?(this.dispatch(Ot(t.response.error)),this.rejectWithValue(t.response.error)):null}processQueryCorrectionsOrContinue(t){var _this18=this;return _asyncToGenerator(function*(){let r=_this18.getState(),n=_this18.getSuccessResponse(t);if(!n||!r.didYouMean)return null;let{enableDidYouMean:o,automaticallyCorrectQuery:i}=r.didYouMean,{results:a,queryCorrections:m,queryCorrection:f}=n;if(!o||!i)return null;let s=a.length===0&&m&&m.length!==0,h=!X(f)&&!X(f.correctedQuery);if(!s&&!h)return null;let S=s?yield _this18.processLegacyDidYouMeanAutoCorrection(t):_this18.processModernDidYouMeanAutoCorrection(t);return _this18.dispatch(Xe(tt(_this18.getState()))),S})()}processLegacyDidYouMeanAutoCorrection(t){var _this19=this;return _asyncToGenerator(function*(){let r=_this19.getCurrentQuery(),n=_this19.getSuccessResponse(t);if(!n.queryCorrections)return null;let{correctedQuery:o}=n.queryCorrections[0],i=yield _this19.automaticallyRetryQueryWithCorrection(o);return ke(i.response)?(_this19.dispatch(Ot(i.response.error)),_this19.rejectWithValue(i.response.error)):(_this19.dispatch(Xe(tt(_this19.getState()))),{...i,response:{...i.response.success,queryCorrections:n.queryCorrections},automaticallyCorrected:!0,originalQuery:r})})()}processModernDidYouMeanAutoCorrection(t){let r=this.getSuccessResponse(t),{correctedQuery:n,originalQuery:o}=r.queryCorrection;return this.onUpdateQueryForCorrection(n),{...t,response:{...r},queryExecuted:n,automaticallyCorrected:!0,originalQuery:o}}processQueryTriggersOrContinue(t){var _this20=this;return _asyncToGenerator(function*(){let r=_this20.getSuccessResponse(t);if(!r)return null;let n=r.triggers.find(m=>m.type==="query")?.content||"";if(!n)return null;if(_this20.getState().triggers?.queryModification.queryToIgnore===n)return _this20.dispatch(Si("")),null;let i=_this20.getCurrentQuery(),a=yield _this20.automaticallyRetryQueryWithTriggerModification(n);return ke(a.response)?(_this20.dispatch(Ot(a.response.error)),_this20.rejectWithValue(a.response.error)):(_this20.dispatch(Xe(tt(_this20.getState()))),{...a,response:{...a.response.success},automaticallyCorrected:!1,originalQuery:i})})()}processSuccessResponse(t){return this.dispatch(Xe(tt(this.getState()))),{...t,response:this.getSuccessResponse(t),automaticallyCorrected:!1,originalQuery:this.getCurrentQuery()}}getSuccessResponse(t){return Un(t.response)?t.response.success:null}automaticallyRetryQueryWithCorrection(t){var _this21=this;return _asyncToGenerator(function*(){_this21.onUpdateQueryForCorrection(t);let r=_this21.getState(),{actionCause:n}=Ap(),o=yield _this21.fetchFromAPI(yield qt(r,_this21.extra.navigatorContext,{actionCause:n}),{origin:"mainSearch"});return _this21.dispatch(yi(t)),o})()}automaticallyRetryQueryWithTriggerModification(t){var _this22=this;return _asyncToGenerator(function*(){return _this22.dispatch(vi({newQuery:t,originalQuery:_this22.getCurrentQuery()})),_this22.onUpdateQueryForCorrection(t),yield _this22.fetchFromAPI(yield qt(_this22.getState(),_this22.extra.navigatorContext),{origin:"mainSearch"})})()}getCurrentQuery(){let t=this.getState();return t.query?.q!==void 0?t.query.q:""}get extra(){return this.config.extra}getState(){return this.config.getState()}get dispatch(){return this.config.dispatch}get rejectWithValue(){return this.config.rejectWithValue}};var QG=ue("search/prepareForSearchWithQuery",(e,t)=>{let{dispatch:r}=t;B(e,{q:new H,enableQuerySyntax:new te,clearFilters:new te}),e.clearFilters&&(r(Lr()),r(oi())),r(ci({allow:!0})),r(kt({q:e.q,enableQuerySyntax:e.enableQuerySyntax})),r(Ft(1))}),kp=ue("search/executeSearch",/*#__PURE__*/function(){var _ref41=_asyncToGenerator(function*(e,t){let r=t.getState();if(r.configuration.analytics.analyticsMode==="legacy")return Ci(r,t,e.legacy);Op(r);let n=e.next?Dp(e.next):void 0,o=yield qt(r,t.extra.navigatorContext,n),i=new Nt({...t,analyticsAction:n??{}}),a=yield i.fetchFromAPI(o,{origin:"mainSearch"});return yield i.process(a)});return function(_x101,_x102){return _ref41.apply(this,arguments)}}()),$G=ue("search/fetchPage",/*#__PURE__*/function(){var _ref42=_asyncToGenerator(function*(e,t){let r=t.getState();if(Op(r),r.configuration.analytics.analyticsMode==="legacy"||!e.next)return Is(r,t,e.legacy);let n=new Nt({...t,analyticsAction:e.next}),o=yield qt(r,t.extra.navigatorContext,e.next),i=yield n.fetchFromAPI(o,{origin:"mainSearch"});return yield n.process(i)});return function(_x103,_x104){return _ref42.apply(this,arguments)}}()),HG=ue("search/fetchMoreResults",/*#__PURE__*/function(){var _ref43=_asyncToGenerator(function*(e,t){let r=t.getState();if(r.configuration.analytics.analyticsMode==="legacy")return Ts(t,r);let n=Xu("browseResults",t.getState),o=new Nt({...t,analyticsAction:n}),i=yield vC(r,t.extra.navigatorContext,n),a=yield o.fetchFromAPI(i,{origin:"mainSearch"});return yield o.process(a)});return function(_x105,_x106){return _ref43.apply(this,arguments)}}()),zG=ue("search/fetchFacetValues",/*#__PURE__*/function(){var _ref44=_asyncToGenerator(function*(e,t){let r=t.getState();if(r.configuration.analytics.analyticsMode==="legacy")return Ci(r,t,e.legacy);let n=new Nt({...t,analyticsAction:{}}),o=yield bC(r,t.extra.navigatorContext),i=yield n.fetchFromAPI(o,{origin:"facetValues"});return yield n.process(i)});return function(_x107,_x108){return _ref44.apply(this,arguments)}}()),WG=ue("search/fetchInstantResults",/*#__PURE__*/function(){var _ref45=_asyncToGenerator(function*(e,t){let r=t.getState();if(r.configuration.analytics.analyticsMode==="legacy")return Ps(e,t);B(e,{id:K,q:K,maxResultsPerQuery:new J({required:!0,min:1}),cacheTimeout:new J});let{q:n,maxResultsPerQuery:o}=e,i=Dp(bp()),a=yield CC(r,t.extra.navigatorContext,n,o,i),m=new Nt({...t,analyticsAction:i},h=>{t.dispatch(li({q:h,id:e.id}))}),f=yield m.fetchFromAPI(a,{origin:"instantResults",disableAbortWarning:!0}),s=yield m.process(f);return"response"in s?{results:s.response.results,searchUid:s.response.searchUid,totalCountFiltered:s.response.totalCountFiltered,duration:s.duration}:s});return function(_x109,_x110){return _ref45.apply(this,arguments)}}()),vC=/*#__PURE__*/function(){var _ref46=_asyncToGenerator(function*(e,t,r){let n=yield qt(e,t,r);return n.request={...n.request,firstResult:(e.pagination?.firstResult??0)+(e.search?.results.length??0)},n});return function vC(_x111,_x112,_x113){return _ref46.apply(this,arguments)}}(),CC=/*#__PURE__*/function(){var _ref47=_asyncToGenerator(function*(e,t,r,n,o){let i=_r(e,t,o);return xt({...i,...(e.didYouMean&&{enableDidYouMean:e.didYouMean.enableDidYouMean}),numberOfResults:n,q:r})});return function CC(_x114,_x115,_x116,_x117,_x118){return _ref47.apply(this,arguments)}}(),bC=/*#__PURE__*/function(){var _ref48=_asyncToGenerator(function*(e,t,r){let n=yield qt(e,t,r);return n.request.numberOfResults=0,n});return function bC(_x119,_x120,_x121){return _ref48.apply(this,arguments)}}(),Op=e=>{e.configuration.analytics.enabled&&Ze.addElement({name:"Query",...(e.query?.q&&{value:e.query.q}),time:JSON.stringify(new Date)})},Dp=e=>({actionCause:e.actionCause,type:e.actionCause});var Mp=me(In(),e=>{e.addCase(pi,(t,r)=>{let n=Fs(t),o=r.payload;t.defaultNumberOfResults=t.numberOfResults=o,t.firstResult=Tn(n,o)}).addCase(fi,(t,r)=>{t.numberOfResults=r.payload,t.firstResult=0}).addCase(Bo,t=>{t.firstResult=0}).addCase(mi,(t,r)=>{let n=r.payload;t.firstResult=Tn(n,t.numberOfResults)}).addCase(Ft,(t,r)=>{let n=r.payload;t.firstResult=Tn(n,t.numberOfResults)}).addCase(hi,t=>{let r=Fs(t),n=Math.max(r-1,1);t.firstResult=Tn(n,t.numberOfResults)}).addCase(gi,t=>{let r=Fs(t),n=wC(t),o=Math.min(r+1,n);t.firstResult=Tn(o,t.numberOfResults)}).addCase(Me.fulfilled,(t,r)=>{r.payload&&(t.numberOfResults=r.payload.pagination.numberOfResults,t.firstResult=r.payload.pagination.firstResult)}).addCase(St,(t,r)=>{t.firstResult=r.payload.firstResult??t.firstResult,t.numberOfResults=r.payload.numberOfResults??t.defaultNumberOfResults}).addCase(kp.fulfilled,(t,r)=>{let{response:n}=r.payload;t.totalCountFiltered=n.totalCountFiltered}).addCase(ii,t=>{Pe(t)}).addCase(mp,t=>{Pe(t)}).addCase(up,t=>{Pe(t)}).addCase(Sp,t=>{Pe(t)}).addCase(np,t=>{Pe(t)}).addCase(cp,t=>{Pe(t)}).addCase(Zd,t=>{Pe(t)}).addCase(Xd,t=>{Pe(t)}).addCase(ep,t=>{Pe(t)}).addCase(fp,t=>{Pe(t)}).addCase(yp,t=>{Pe(t)}).addCase(Lr,t=>{Pe(t)}).addCase(gp,t=>{Pe(t)}).addCase(vp,t=>{Pe(t)}).addCase(rp,t=>{Pe(t)}).addCase(Jd,t=>{Pe(t)})});function Pe(e){e.firstResult=In().firstResult}function Fs(e){let{firstResult:t,numberOfResults:r}=e;return xC(t,r)}function wC(e){let{totalCountFiltered:t,numberOfResults:r}=e;return RC(t,r)}function Tn(e,t){return(e-1)*t}function xC(e,t){return Math.round(e/t)+1}function RC(e,t){let r=Math.min(e,5e3);return Math.ceil(r/t)}function ks(e){return e.addReducers({pagination:Mp}),{nextPage:gi,previousPage:hi,registerNumberOfResults:pi,registerPage:mi,updateNumberOfResults:fi,updatePage:Ft}}p();u();d();l();function _t(e){let t,r=new Map,n=()=>r.size===0,o=i=>{try{let a=JSON.stringify(i),m=t!==a;return t=a,m}catch(a){return console.warn("Could not detect if state has changed, check the controller \"get state method\"",a),!0}};return{subscribe(i){i();let a=Symbol(),m;return n()&&(t=JSON.stringify(this.state),m=e.subscribe(()=>{o(this.state)&&r.forEach(f=>f())})),r.set(a,i),()=>{r.delete(a),n()&&m&&m()}},get state(){return{}}}}p();u();d();l();var EC=new Fe({id:new H({emptyAllowed:!0,required:!1,default:""}),numberOfRecommendations:new J({min:0})});function qp(e,t={}){if(!PC(e))throw Ge;let r=_t(e),{dispatch:n}=e,o=()=>e.state,i=ou(e,EC,t.options,"buildRecommendationList");return i.id!==""&&n(xr({id:i.id})),i.numberOfRecommendations&&n(ks(e).updateNumberOfResults(i.numberOfRecommendations)),{...r,refresh(){n(At())},get state(){let a=o();return{recommendations:a.recommendation.recommendations,error:a.recommendation.error,isLoading:a.recommendation.isLoading,searchResponseId:a.recommendation.searchUid}}}}function PC(e){return e.addReducers({recommendation:Rr,configuration:ze}),!0}p();u();d();l();p();u();d();l();function Np(e,t,r){if(!IC(e))throw Ge;let n=1e3,o={selectionDelay:n,debounceWait:n,...t.options},i;return{select:$o(r,o.debounceWait,{isImmediate:!0}),beginDelayedSelect(){i=setTimeout(r,o.selectionDelay)},cancelPendingSelect(){i&&clearTimeout(i)}}}function IC(e){return e.addReducers({configuration:ze}),!0}function _p(e,t){let r=!1,n=()=>{r||(r=!0,e.dispatch(ko(t.options.result)))};return Np(e,t,()=>{n()})}p();u();d();l();p();u();d();l();p();u();d();l();var TC=["caseId","caseNumber"],FC={caseId:"caseContext",caseNumber:"caseContext"},Fn=class extends Error{constructor(t){super(`The key "${t}" is reserved for internal use. Use ${FC[t]} to set this value.}`)}};function Os(e){return TC.includes(e)}var kC=new Fe({values:new G({options:{required:!1}})});function Vp(e,t={}){if(!MC(e))throw Ge;let r=_t(e),{dispatch:n}=e,o=()=>e.state,i=nu(e,kC,t.initialState,"buildContext");return i.values&&n(Kt(i.values)),{...r,get state(){return{values:o().context.contextValues}},set(a){n(Kt(a))},...(o().configuration.analytics.analyticsMode==="legacy"?OC(n):DC(n))}}var OC=e=>({add(t,r){e(Yt({contextKey:t,contextValue:r}))},remove(t){e(Jt(t))}}),DC=e=>({add(t,r){if(Os(t))throw new Fn(t);e(Yt({contextKey:t,contextValue:r}))},remove(t){if(Os(t))throw new Fn(t);e(Jt(t))}});function MC(e){return e.addReducers({context:Yo}),!0}function Lp(e,t){return Vp(e,t)}p();u();d();l();function jp(e){if(!qC(e))throw Ge;let t=_t(e),{dispatch:r}=e,n=()=>e.state;return{...t,get state(){return{values:n().dictionaryFieldContext.contextValues}},set(o){r(Mr(o))},add(o,i){r(qr({field:o,key:i}))},remove(o){r(Nr(o))}}}function qC(e){return e.addReducers({dictionaryFieldContext:Xo}),!0}p();u();d();l();p();u();d();l();var NC=new Fe({content:new pe({required:!0}),conditions:new pe({required:!0}),priority:new J({required:!1,default:0,min:0}),fields:new ie({required:!1,each:K})});function Up(){let e=[],t=r=>{let n=NC.validate(r);if(!r.conditions.every(i=>i instanceof Function))throw new Wr("Each template condition should be a function that takes a Result or Product as an argument and returns a boolean");return n};return{registerTemplates(...r){r.forEach(n=>{let o={...t(n),fields:n.fields||[]};e.push(o)}),e.sort((n,o)=>o.priority-n.priority)},selectTemplate(r){let n=e.find(o=>o.conditions.every(i=>i(r)));return n?n.content:null},selectLinkTemplate(r){let n=e.find(o=>o.conditions.every(i=>i(r)));return n?n.linkContent:null}}}function Bp(e){if(!_C(e))throw Ge;let{registerTemplates:t,selectTemplate:r,selectLinkTemplate:n}=Up();return{registerTemplates:(...o)=>{t(...o);let i=[];o.forEach(a=>{a.fields&&i.push(...a.fields)}),e.dispatch(Vr(i))},selectTemplate:r,selectLinkTemplate:n}}function _C(e){return e.addReducers({fields:ni}),!0}p();u();d();l();var bi=(e,t)=>{let r=e;return X(r[t])?X(e.raw[t])?null:e.raw[t]:r[t]},VC=e=>t=>e.every(r=>!X(bi(t,r))),LC=e=>t=>e.every(r=>X(bi(t,r))),jC=(e,t)=>r=>{let n=Qp(e,r);return t.some(o=>n.some(i=>`${i}`.toLowerCase()===o.toLowerCase()))},UC=(e,t)=>r=>{let n=Qp(e,r);return t.every(o=>n.every(i=>`${i}`.toLowerCase()!==o.toLowerCase()))},Qp=(e,t)=>{let r=bi(t,e);return tc(r)?r:[r]},$p={getResultProperty:bi,fieldsMustBeDefined:VC,fieldsMustNotBeDefined:LC,fieldMustMatch:jC,fieldMustNotMatch:UC};/**
|
|
32
32
|
* @license
|
|
33
33
|
*
|
|
34
34
|
* Copyright 2025 Coveo Solutions Inc.
|