coveo.analytics 2.22.2 → 2.22.3
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/dist/coveoua.browser.js +1 -1
- package/dist/coveoua.browser.js.map +1 -1
- package/dist/coveoua.js +1 -1
- package/dist/coveoua.js.map +1 -1
- package/dist/library.es.js +1 -1
- package/dist/library.js +1 -1
- package/dist/react-native.es.js +1 -1
- package/package.json +1 -1
- package/src/cookieutils.ts +1 -1
package/dist/coveoua.browser.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var coveoua=function(){"use strict";var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};function t(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}var n,r=function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},r.apply(this,arguments)};function o(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function i(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{u(r.next(e))}catch(e){i(e)}}function a(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))}function s(e,t){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}}function a(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],s=0,a=i.length;s<a;s++,o++)r[o]=i[s];return r}function u(){return"undefined"!=typeof navigator}function c(){return"undefined"!=typeof document}function p(){try{return"undefined"!=typeof localStorage}catch(e){return!1}}function l(){return u()&&navigator.cookieEnabled}function d(){return"undefined"!=typeof crypto&&void 0!==crypto.getRandomValues}!function(e){e.search="search",e.click="click",e.custom="custom",e.view="view",e.collect="collect"}(n||(n={}));var h=[n.click,n.custom,n.search,n.view],f=function(e,t){return-1!==h.indexOf(e)?r({language:c()?document.documentElement.lang:"unknown",userAgent:u()?navigator.userAgent:"unknown"},t):t},g=function(){function e(){}return e.set=function(t,n,r){var o,i,s,a;r?((i=new Date).setTime(i.getTime()+r),s="; expires="+i.toGMTString()):s="",-1===(a=location.hostname).indexOf(".")?document.cookie=t+"="+n+s+"; path=/":((o=a.split(".")).shift(),v({name:t,value:n,expires:s,domain:"."+o.join(".")}),null!=e.get(t)&&e.get(t)==n||v({name:t,value:n,expires:s,domain:"."+a}))},e.get=function(e){for(var t=e+"=",n=document.cookie.split(";"),r=0;r<n.length;r++){var o=n[r];if(0==(o=o.replace(/^\s+/,"")).indexOf(t))return o.substring(t.length,o.length)}return null},e.erase=function(t){e.set(t,"",-1)},e}();function v(e){var t=e.name,n=e.value,r=e.expires,o=e.domain;document.cookie=t+"="+n+r+"; path=/; domain="+o+"; SameSite=Lax"}function m(){return p()?localStorage:l()?new y:function(){try{return"undefined"!=typeof sessionStorage}catch(e){return!1}}()?sessionStorage:new k}var y=function(){function e(){}return e.prototype.getItem=function(t){return g.get(""+e.prefix+t)},e.prototype.removeItem=function(t){g.erase(""+e.prefix+t)},e.prototype.setItem=function(t,n){g.set(""+e.prefix+t,n)},e.prefix="coveo_",e}(),S=function(){function e(){this.cookieStorage=new y}return e.prototype.getItem=function(e){return localStorage.getItem(e)||this.cookieStorage.getItem(e)},e.prototype.removeItem=function(e){this.cookieStorage.removeItem(e),localStorage.removeItem(e)},e.prototype.setItem=function(e,t){localStorage.setItem(e,t),this.cookieStorage.setItem(e,t)},e}(),k=function(){function e(){}return e.prototype.getItem=function(e){return null},e.prototype.removeItem=function(e){},e.prototype.setItem=function(e,t){},e}(),E=Object.freeze({__proto__:null,preferredStorage:null,getAvailableStorage:m,CookieStorage:y,CookieAndLocalStorage:S,NullStorage:k}),C="__coveo.analytics.history",w=function(){function e(e){this.store=e||m()}return e.prototype.addElement=function(e){e.internalTime=(new Date).getTime(),e=this.cropQueryElement(this.stripEmptyQuery(e));var t=this.getHistoryWithInternalTime();null!=t?this.isValidEntry(e)&&this.setHistory([e].concat(t)):this.setHistory([e])},e.prototype.addElementAsync=function(e){return i(this,void 0,void 0,(function(){var t;return s(this,(function(n){switch(n.label){case 0:return e.internalTime=(new Date).getTime(),e=this.cropQueryElement(this.stripEmptyQuery(e)),[4,this.getHistoryWithInternalTimeAsync()];case 1:return null!=(t=n.sent())?this.isValidEntry(e)&&this.setHistory([e].concat(t)):this.setHistory([e]),[2]}}))}))},e.prototype.getHistory=function(){var e=this.getHistoryWithInternalTime();return this.stripEmptyQueries(this.stripInternalTime(e))},e.prototype.getHistoryAsync=function(){return i(this,void 0,void 0,(function(){var e;return s(this,(function(t){switch(t.label){case 0:return[4,this.getHistoryWithInternalTimeAsync()];case 1:return e=t.sent(),[2,this.stripEmptyQueries(this.stripInternalTime(e))]}}))}))},e.prototype.getHistoryWithInternalTime=function(){try{var e=this.store.getItem(C);return e&&"string"==typeof e?JSON.parse(e):[]}catch(e){return[]}},e.prototype.getHistoryWithInternalTimeAsync=function(){return i(this,void 0,void 0,(function(){var e;return s(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,this.store.getItem(C)];case 1:return(e=t.sent())?[2,JSON.parse(e)]:[2,[]];case 2:return t.sent(),[2,[]];case 3:return[2]}}))}))},e.prototype.setHistory=function(e){try{this.store.setItem(C,JSON.stringify(e.slice(0,20)))}catch(e){}},e.prototype.clear=function(){try{this.store.removeItem(C)}catch(e){}},e.prototype.getMostRecentElement=function(){var e=this.getHistoryWithInternalTime();return null!=e?e.sort((function(e,t){return(t.internalTime||0)-(e.internalTime||0)}))[0]:null},e.prototype.cropQueryElement=function(e){return e.name&&e.value&&"query"===e.name.toLowerCase()&&(e.value=e.value.slice(0,75)),e},e.prototype.isValidEntry=function(e){var t=this.getMostRecentElement();return!t||t.value!=e.value||(e.internalTime||0)-(t.internalTime||0)>6e4},e.prototype.stripInternalTime=function(e){return e.map((function(e){return{name:e.name,time:e.time,value:e.value}}))},e.prototype.stripEmptyQuery=function(e){var t=e.name,n=e.time,r=e.value;return t&&"string"==typeof r&&"query"===t.toLowerCase()&&""===r.trim()?{name:t,time:n}:e},e.prototype.stripEmptyQueries=function(e){var t=this;return e.map((function(e){return t.stripEmptyQuery(e)}))},e}(),b=Object.freeze({__proto__:null,STORE_KEY:C,MAX_NUMBER_OF_HISTORY_ELEMENTS:20,MIN_THRESHOLD_FOR_DUPLICATE_VALUE:6e4,MAX_VALUE_SIZE:75,HistoryStore:w,default:w}),I=function(e,t){return i(void 0,void 0,void 0,(function(){return s(this,(function(o){switch(o.label){case 0:return e!==n.view?[3,2]:[4,R(t.contentIdValue)];case 1:return o.sent(),[2,r({location:window.location.toString(),referrer:document.referrer,title:document.title},t)];case 2:return[2,t]}}))}))},R=function(e){return i(void 0,void 0,void 0,(function(){var t,n;return s(this,(function(r){switch(r.label){case 0:return t=new w,n={name:"PageView",value:e,time:JSON.stringify(new Date)},[4,t.addElementAsync(n)];case 1:return r.sent(),[2]}}))}))},P=function(e){return e?(Number(e)^x(new Uint8Array(1))[0]%16>>Number(e)/4).toString(16):"10000000-1000-4000-8000-100000000000".replace(/[018]/g,P)},x=function(e){if(d())return crypto.getRandomValues(e);for(var t=0,n=0;t<e.length;t++)0==(3&t)&&(n=4294967296*Math.random()),e[t]=n>>>((3&t)<<3)&255;return e},F=Object.keys,A={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"},T=a(F(A).map((function(e){return A[e]}))).join("|"),L=new RegExp("^("+T+"$)"),O=[function(e){return L.test(e)}],D={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",price:"pr",quantity:"qt",coupon:"cc",position:"ps",group:"group"},V={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",position:"ps",price:"pr",group:"group"},M={action:"pa",list:"pal",listSource:"pls"},q={id:"ti",revenue:"tr",tax:"tt",shipping:"ts",coupon:"tcc",affiliation:"ta",step:"cos",option:"col"},_={id:"quoteId",affiliation:"quoteAffiliation"},N={id:"reviewId",rating:"reviewRating",comment:"reviewComment"},Q={add:M,bookmark_add:M,bookmark_remove:M,click:M,checkout:M,checkout_option:M,detail:M,impression:M,remove:M,refund:r(r({},M),q),purchase:r(r({},M),q),quickview:M,quote:r(r({},M),_),review:r(r({},M),N)},B=function(e,t,n,o){return F(e).reduce((function(i,s){var a,u="il"+(t+1)+o+(n+1)+(V[s]||s);return r(r({},i),((a={})[u]=e[s],a))}),{})},U=F(D).map((function(e){return D[e]})),H=F(V).map((function(e){return V[e]})),j=F(M).map((function(e){return M[e]})),Y=F(q).map((function(e){return q[e]})),z=F(N).map((function(e){return N[e]})),K=F(_).map((function(e){return _[e]})),W=a(U,["custom"]).join("|"),$=a(H,["custom"]).join("|"),G=new RegExp("^(pr[0-9]+)("+W+")$"),J=new RegExp("^((il[0-9]+pi[0-9]+)("+$+"))|(il[0-9]+nm)$"),X=new RegExp("^("+j.join("|")+")$"),Z=new RegExp("^("+Y.join("|")+")$"),ee=new RegExp("^(pr[0-9]+)custom$"),te=new RegExp("^(il[0-9]+pi[0-9]+)custom$"),ne=new RegExp("^("+a(["loyaltyCardId","loyaltyTier","thirdPartyPersona","companyName","favoriteStore","storeName","userIndustry","userRole","userDepartment","businessUnit"],z,K).join("|")+")$"),re=[function(e){return J.test(e)},function(e){return G.test(e)},function(e){return X.test(e)},function(e){return Z.test(e)},function(e){return ne.test(e)}],oe=[ee,te],ie=r(r(r(r({},{anonymizeIp:"aip"}),{eventCategory:"ec",eventAction:"ea",eventLabel:"el",eventValue:"ev",page:"dp",visitorId:"cid",clientId:"cid",userId:"uid",currencyCode:"cu"}),{hitType:"t",pageViewId:"pid",encoding:"de",location:"dl",referrer:"dr",screenColor:"sd",screenResolution:"sr",title:"dt",userAgent:"ua",language:"ul",eventId:"z",time:"tm"}),["contentId","contentIdKey","contentType","searchHub","tab","searchUid","permanentId","contentLocale"].reduce((function(e,t){var n;return r(r({},e),((n={})[t]=t,n))}),{})),se=r(r({},ie),{svcAction:"svc_action",svcActionData:"svc_action_data"}),ae=F(se).map((function(e){return se[e]})),ue=function(e){return-1!==ae.indexOf(e)},ce=function(e){return"custom"===e},pe=function(e){var t=void 0;return a(oe).every((function(n){var r;return t=null===(r=n.exec(e))||void 0===r?void 0:r[1],!Boolean(t)})),t},le=function(e,t){return F(t).reduce((function(n,o){var i;return r(r({},n),((i={})[""+e+o]=t[o],i))}),{})},de=function(){function e(e){this.opts=e}return e.prototype.sendEvent=function(e,t){return i(this,void 0,void 0,(function(){var n,o,i,a,u,c,p,l,d,h,f;return s(this,(function(s){switch(s.label){case 0:if(!navigator.sendBeacon)throw new Error('navigator.sendBeacon is not supported in this browser. Consider adding a polyfill like "sendbeacon-polyfill".');return n=this.opts,o=n.baseUrl,i=n.preprocessRequest,a=this.encodeForEventType(e,t),[4,this.getQueryParamsForEventType(e)];case 1:return u=s.sent(),c={url:o+"/analytics/"+e+"?"+u,body:new Blob([a],{type:"application/x-www-form-urlencoded"})},h=[r({},c)],i?[4,i(c,"analyticsBeacon")]:[3,3];case 2:return f=s.sent(),[3,4];case 3:f={},s.label=4;case 4:return p=r.apply(void 0,h.concat([f])),l=p.url,d=p.body,console.log('Sending beacon for "'+e+'" with: ',JSON.stringify(t)),navigator.sendBeacon(l,d),[2]}}))}))},e.prototype.deleteHttpCookieVisitorId=function(){return Promise.resolve()},e.prototype.encodeForEventType=function(e,t){return this.isEventTypeLegacy(e)?this.encodeForLegacyType(e,t):this.encodeForFormUrlEncoded(r({access_token:this.opts.token},t))},e.prototype.getQueryParamsForEventType=function(e){return i(this,void 0,void 0,(function(){var t,n,r;return s(this,(function(o){switch(o.label){case 0:return t=this.opts,n=t.token,[4,t.visitorIdProvider.getCurrentVisitorId()];case 1:return r=o.sent(),[2,[n&&this.isEventTypeLegacy(e)?"access_token="+n:"",r?"visitorId="+r:"","discardVisitInfo=true"].filter((function(e){return!!e})).join("&")]}}))}))},e.prototype.isEventTypeLegacy=function(e){return-1!==[n.click,n.custom,n.search,n.view].indexOf(e)},e.prototype.encodeForLegacyType=function(e,t){return e+"Event="+encodeURIComponent(JSON.stringify(t))},e.prototype.encodeForFormUrlEncoded=function(e){var t=this;return Object.keys(e).filter((function(t){return!!e[t]})).map((function(n){return encodeURIComponent(n)+"="+encodeURIComponent(t.encodeValue(e[n]))})).join("&")},e.prototype.encodeValue=function(e){return"number"==typeof e||"string"==typeof e||"boolean"==typeof e?e:JSON.stringify(e)},e}(),he=function(){function e(){}return e.prototype.sendEvent=function(e,t){return i(this,void 0,void 0,(function(){return s(this,(function(e){return[2,Promise.resolve()]}))}))},e.prototype.deleteHttpCookieVisitorId=function(){return i(this,void 0,void 0,(function(){return s(this,(function(e){return[2,Promise.resolve()]}))}))},e}(),fe=window.fetch,ge=function(){function e(e){this.opts=e}return e.prototype.sendEvent=function(e,t){return i(this,void 0,void 0,(function(){var n,i,a,u,c,p,l,d,h,f,g,v,m;return s(this,(function(s){switch(s.label){case 0:return n=this.opts,i=n.baseUrl,a=n.visitorIdProvider,u=n.preprocessRequest,this.shouldAppendVisitorId(e)?[4,this.getVisitorIdParam()]:[3,2];case 1:return c=s.sent(),[3,3];case 2:c="",s.label=3;case 3:return p={url:i+"/analytics/"+e+c,credentials:"include",mode:"cors",headers:this.getHeaders(),method:"POST",body:JSON.stringify(t)},f=[r({},p)],u?[4,u(p,"analyticsFetch")]:[3,5];case 4:return g=s.sent(),[3,6];case 5:g={},s.label=6;case 6:return l=r.apply(void 0,f.concat([g])),d=l.url,h=o(l,["url"]),[4,fe(d,h)];case 7:return(v=s.sent()).ok?[4,v.json()]:[3,9];case 8:return(m=s.sent()).visitorId&&a.setCurrentVisitorId(m.visitorId),[2,m];case 9:try{v.json()}catch(e){}throw console.error('An error has occured when sending the "'+e+'" event.',v,t),new Error('An error has occurred when sending the "'+e+'" event. Check the console logs for more details.')}}))}))},e.prototype.deleteHttpCookieVisitorId=function(){return i(this,void 0,void 0,(function(){var e;return s(this,(function(t){switch(t.label){case 0:return e=this.opts.baseUrl,[4,fe(e+"/analytics/visit",{headers:this.getHeaders(),method:"DELETE"})];case 1:return t.sent(),[2]}}))}))},e.prototype.shouldAppendVisitorId=function(e){return-1!==[n.click,n.custom,n.search,n.view].indexOf(e)},e.prototype.getVisitorIdParam=function(){return i(this,void 0,void 0,(function(){var e;return s(this,(function(t){switch(t.label){case 0:return[4,this.opts.visitorIdProvider.getCurrentVisitorId()];case 1:return[2,(e=t.sent())?"?visitor="+e:""]}}))}))},e.prototype.getHeaders=function(){var e=this.opts.token;return r(r({},e?{Authorization:"Bearer "+e}:{}),{"Content-Type":"application/json"})},e}(),ve=function(e,t){var n=this;p()&&l()?this.storage=new S:p()?this.storage=localStorage:(console.warn("BrowserRuntime detected no valid storage available.",this),this.storage=new k),this.client=new ge(e),this.beaconClient=new de(e),window.addEventListener("beforeunload",(function(){for(var e=0,r=t();e<r.length;e++){var o=r[e],i=o.eventType,s=o.payload;n.beaconClient.sendEvent(i,s)}}))},me=function(e,t){this.storage=t||new k,this.client=new ge(e)},ye=function(){this.storage=new k,this.client=new he};var Se=["1",1,"yes",!0];function ke(){return u()&&[navigator.globalPrivacyControl,navigator.doNotTrack,navigator.msDoNotTrack,window.doNotTrack].some((function(e){return-1!==Se.indexOf(e)}))}var Ee=Object.freeze({__proto__:null,doNotTrack:ke,default:ke}),Ce="v15",we={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 be(e,t){void 0===e&&(e=we.default),void 0===t&&(t=Ce);var n=-1!==e.indexOf(".cloud.coveo.com");return e+(n?"":"/rest")+"/"+t}var Ie,Re,Pe,xe=function(){function e(e){if(!e)throw new Error("You have to pass options to this constructor");this.options=r(r({},this.defaultOptions),e),this.visitorId="",this.bufferedRequests=[],this.beforeSendHooks=[I,f].concat(this.options.beforeSendHooks),this.afterSendHooks=this.options.afterSendHooks,this.eventTypeMapping={};var t={baseUrl:this.baseUrl,token:this.options.token,visitorIdProvider:this,preprocessRequest:this.options.preprocessRequest};this.runtime=this.options.runtimeEnvironment||this.initRuntime(t),ke()&&(this.clear(),this.runtime.storage=new k)}return Object.defineProperty(e.prototype,"defaultOptions",{get:function(){return{endpoint:we.default,token:"",version:Ce,beforeSendHooks:[],afterSendHooks:[]}},enumerable:!1,configurable:!0}),e.prototype.initRuntime=function(e){var t=this;return"undefined"!=typeof window&&c()?new ve(e,(function(){var e=a(t.bufferedRequests);return t.bufferedRequests=[],e})):("undefined"!=typeof navigator&&"ReactNative"==navigator.product&&console.warn("\n We've detected you're using React Native but have not provided the corresponding runtime, \n for an optimal experience please use the \"coveo.analytics/react-native\" subpackage.\n Follow the Readme on how to set it up: https://github.com/coveo/coveo.analytics.js#using-react-native\n "),new me(e))},Object.defineProperty(e.prototype,"storage",{get:function(){return this.runtime.storage},enumerable:!1,configurable:!0}),e.prototype.determineVisitorId=function(){return i(this,void 0,void 0,(function(){var e;return s(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,this.storage.getItem("visitorId")];case 1:return[2,t.sent()||P()];case 2:return e=t.sent(),console.log("Could not get visitor ID from the current runtime environment storage. Using a random ID instead.",e),[2,P()];case 3:return[2]}}))}))},e.prototype.getCurrentVisitorId=function(){return i(this,void 0,void 0,(function(){var e;return s(this,(function(t){switch(t.label){case 0:return this.visitorId?[3,3]:[4,this.determineVisitorId()];case 1:return e=t.sent(),[4,this.setCurrentVisitorId(e)];case 2:t.sent(),t.label=3;case 3:return[2,this.visitorId]}}))}))},e.prototype.setCurrentVisitorId=function(e){return i(this,void 0,void 0,(function(){return s(this,(function(t){switch(t.label){case 0:return this.visitorId=e,[4,this.storage.setItem("visitorId",e)];case 1:return t.sent(),[2]}}))}))},e.prototype.getParameters=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return i(this,void 0,void 0,(function(){return s(this,(function(n){switch(n.label){case 0:return[4,this.resolveParameters.apply(this,a([e],t))];case 1:return[2,n.sent()]}}))}))},e.prototype.getPayload=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return i(this,void 0,void 0,(function(){var n;return s(this,(function(r){switch(r.label){case 0:return[4,this.resolveParameters.apply(this,a([e],t))];case 1:return n=r.sent(),[4,this.resolvePayloadForParameters(e,n)];case 2:return[2,r.sent()]}}))}))},Object.defineProperty(e.prototype,"currentVisitorId",{get:function(){return"string"!=typeof(this.visitorId||this.storage.getItem("visitorId"))&&this.setCurrentVisitorId(P()),this.visitorId},set:function(e){this.visitorId=e,this.storage.setItem("visitorId",e)},enumerable:!1,configurable:!0}),e.prototype.resolveParameters=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return i(this,void 0,void 0,(function(){var n,o,a,u,c,p,l,d,h,f,g,v,m=this;return s(this,(function(y){switch(y.label){case 0:return n=this.eventTypeMapping[e]||{},o=n.variableLengthArgumentsNames,a=void 0===o?[]:o,u=n.addVisitorIdParameter,c=void 0!==u&&u,p=n.usesMeasurementProtocol,l=void 0!==p&&p,d=n.addClientIdParameter,h=void 0!==d&&d,f=function(e){return i(m,void 0,void 0,(function(){var t,n,o;return s(this,(function(i){switch(i.label){case 0:return t=[r({},e)],n={},c?[4,this.getCurrentVisitorId()]:[3,2];case 1:return o=i.sent(),[3,3];case 2:o="",i.label=3;case 3:return[2,r.apply(void 0,t.concat([(n.visitorId=o,n)]))]}}))}))},g=function(e){return i(m,void 0,void 0,(function(){var t,n;return s(this,(function(o){switch(o.label){case 0:return h?(t=[r({},e)],n={},[4,this.getCurrentVisitorId()]):[3,2];case 1:return[2,r.apply(void 0,t.concat([(n.clientId=o.sent(),n)]))];case 2:return[2,e]}}))}))},v=function(t){return m.beforeSendHooks.reduce((function(t,n){return i(m,void 0,void 0,(function(){var r;return s(this,(function(o){switch(o.label){case 0:return[4,t];case 1:return r=o.sent(),[4,n(e,r)];case 2:return[2,o.sent()]}}))}))}),t)},[4,[function(e){return a.length>0?m.parseVariableArgumentsPayload(a,e):e[0]},f,g,function(e){return l?m.ensureAnonymousUserWhenUsingApiKey(e):e},v].reduce((function(e,t){return i(m,void 0,void 0,(function(){var n;return s(this,(function(r){switch(r.label){case 0:return[4,e];case 1:return n=r.sent(),[4,t(n)];case 2:return[2,r.sent()]}}))}))}),Promise.resolve(t))];case 1:return[2,y.sent()]}}))}))},e.prototype.resolvePayloadForParameters=function(e,t){return i(this,void 0,void 0,(function(){var n,o,a,u=this;return s(this,(function(c){switch(c.label){case 0:return n=(this.eventTypeMapping[e]||{}).usesMeasurementProtocol,o=void 0!==n&&n,a=function(e){return o?(n=!!(t=e).action&&Q[t.action]||{},F(t).reduce((function(e,o){var i,s=n[o]||se[o]||o;return r(r({},e),((i={})[s]=t[o],i))}),{})):e;var t,n},[4,[function(t){return u.removeEmptyPayloadValues(t,e)},function(e){return u.validateParams(e)},a,function(e){return o?u.removeUnknownParameters(e):e},function(e){return o?u.processCustomParameters(e):e}].reduce((function(e,t){return i(u,void 0,void 0,(function(){var n;return s(this,(function(r){switch(r.label){case 0:return[4,e];case 1:return n=r.sent(),[4,t(n)];case 2:return[2,r.sent()]}}))}))}),Promise.resolve(t))];case 1:return[2,c.sent()]}}))}))},e.prototype.sendEvent=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return i(this,void 0,void 0,(function(){var n,r,o,i;return s(this,(function(s){switch(s.label){case 0:return n=(this.eventTypeMapping[e]||{}).newEventType,r=void 0===n?e:n,[4,this.resolveParameters.apply(this,a([e],t))];case 1:return o=s.sent(),[4,this.resolvePayloadForParameters(e,o)];case 2:return i=s.sent(),this.bufferedRequests.push({eventType:r,payload:i}),[4,Promise.all(this.afterSendHooks.map((function(t){return t(e,o)})))];case 3:return s.sent(),[4,this.deferExecution()];case 4:return s.sent(),[4,this.sendFromBufferWithFetch()];case 5:return[2,s.sent()]}}))}))},e.prototype.deferExecution=function(){return new Promise((function(e){return setTimeout(e,0)}))},e.prototype.sendFromBufferWithFetch=function(){return i(this,void 0,void 0,(function(){var e,t,n;return s(this,(function(r){return(e=this.bufferedRequests.shift())?(t=e.eventType,n=e.payload,[2,this.runtime.client.sendEvent(t,n)]):[2]}))}))},e.prototype.clear=function(){this.storage.removeItem("visitorId"),(new w).clear()},e.prototype.deleteHttpOnlyVisitorId=function(){this.runtime.client.deleteHttpCookieVisitorId()},e.prototype.sendSearchEvent=function(e){return i(this,void 0,void 0,(function(){return s(this,(function(t){return[2,this.sendEvent(n.search,e)]}))}))},e.prototype.sendClickEvent=function(e){return i(this,void 0,void 0,(function(){return s(this,(function(t){return[2,this.sendEvent(n.click,e)]}))}))},e.prototype.sendCustomEvent=function(e){return i(this,void 0,void 0,(function(){return s(this,(function(t){return[2,this.sendEvent(n.custom,e)]}))}))},e.prototype.sendViewEvent=function(e){return i(this,void 0,void 0,(function(){return s(this,(function(t){return[2,this.sendEvent(n.view,e)]}))}))},e.prototype.getVisit=function(){return i(this,void 0,void 0,(function(){var e;return s(this,(function(t){switch(t.label){case 0:return[4,fetch(this.baseUrl+"/analytics/visit")];case 1:return[4,t.sent().json()];case 2:return e=t.sent(),this.visitorId=e.visitorId,[2,e]}}))}))},e.prototype.getHealth=function(){return i(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,fetch(this.baseUrl+"/analytics/monitoring/health")];case 1:return[4,e.sent().json()];case 2:return[2,e.sent()]}}))}))},e.prototype.registerBeforeSendEventHook=function(e){this.beforeSendHooks.push(e)},e.prototype.registerAfterSendEventHook=function(e){this.afterSendHooks.push(e)},e.prototype.addEventTypeMapping=function(e,t){this.eventTypeMapping[e]=t},e.prototype.parseVariableArgumentsPayload=function(e,t){for(var n={},o=0,i=t.length;o<i;o++){var s=t[o];if("string"==typeof s)n[e[o]]=s;else if("object"==typeof s)return r(r({},n),s)}return n},e.prototype.isKeyAllowedEmpty=function(e,t){var r;return-1!==(((r={})[n.search]=["queryText"],r)[e]||[]).indexOf(t)},e.prototype.removeEmptyPayloadValues=function(e,t){var n=this;return Object.keys(e).filter((function(r){return n.isKeyAllowedEmpty(t,r)||null!=(o=e[r])&&""!==o;var o})).reduce((function(t,n){var o;return r(r({},t),((o={})[n]=e[n],o))}),{})},e.prototype.removeUnknownParameters=function(e){var t=Object.keys(e).filter((function(e){if(function(e){return a(re,O,[ue,ce]).some((function(t){return t(e)}))}(e))return!0;console.log(e,"is not processed by coveoua")})).reduce((function(t,n){var o;return r(r({},t),((o={})[n]=e[n],o))}),{});return t},e.prototype.processCustomParameters=function(e){var t,n=e.custom,i=o(e,["custom"]),s=this.lowercaseKeys(n),a=F(t=i).reduce((function(e,n){var o,i=pe(n);return r(r({},e),i?le(i,t[n]):((o={})[n]=t[n],o))}),{});return r(r({},s),a)},e.prototype.lowercaseKeys=function(e){return Object.keys(e||{}).reduce((function(t,n){var o;return r(r({},t),((o={})[n.toLowerCase()]=e[n],o))}),{})},e.prototype.validateParams=function(e){var t=e.anonymizeIp,n=o(e,["anonymizeIp"]);return void 0!==t&&-1==["0","false","undefined","null","{}","[]",""].indexOf((""+t).toLowerCase())&&(n.anonymizeIp=1),n},e.prototype.ensureAnonymousUserWhenUsingApiKey=function(e){var t,n=e.userId,r=o(e,["userId"]);return(null==(t=this.options.token)?void 0:t.startsWith("xx"))&&!n?(r.userId="anonymous",r):e},Object.defineProperty(e.prototype,"baseUrl",{get:function(){return be(this.options.endpoint,this.options.version)},enumerable:!1,configurable:!0}),e}(),Fe=Object.freeze({__proto__:null,Version:Ce,Endpoints:we,buildBaseUrl:be,CoveoAnalyticsClient:xe,default:xe}),Ae=function(e){return e.protocol+"//"+e.hostname+(0===e.pathname.indexOf("/")?e.pathname:"/"+e.pathname)+e.search},Te={pageview:"pageview",event:"event"},Le=function(){function e(e){var t=e.client,n=e.uuidGenerator,r=void 0===n?P:n;this.actionData={},this.client=t,this.uuidGenerator=r,this.pageViewId=r(),this.nextPageViewId=this.pageViewId,this.currentLocation=Ae(window.location),this.lastReferrer=document.referrer,this.addHooks()}return e.prototype.setAction=function(e,t){this.action=e,this.actionData=t},e.prototype.clearData=function(){this.clearPluginData(),this.action=void 0,this.actionData={}},e.prototype.getLocationInformation=function(e,t){return r({hitType:e},this.getNextValues(e,t))},e.prototype.updateLocationInformation=function(e,t){this.updateLocationForNextPageView(e,t)},e.prototype.getDefaultContextInformation=function(e){var t={title:document.title,encoding:document.characterSet},n={screenResolution:screen.width+"x"+screen.height,screenColor:screen.colorDepth+"-bit"},o={language:navigator.language,userAgent:navigator.userAgent},i={time:Date.now().toString(),eventId:this.uuidGenerator()};return r(r(r(r({},i),n),o),t)},e.prototype.updateLocationForNextPageView=function(e,t){var n=this.getNextValues(e,t),r=n.pageViewId,o=n.referrer,i=n.location;this.lastReferrer=o,this.pageViewId=r,this.currentLocation=i,e===Te.pageview&&(this.nextPageViewId=this.uuidGenerator(),this.hasSentFirstPageView=!0)},e.prototype.getNextValues=function(e,t){return{pageViewId:e===Te.pageview?this.nextPageViewId:this.pageViewId,referrer:e===Te.pageview&&this.hasSentFirstPageView?this.currentLocation:this.lastReferrer,location:e===Te.pageview?this.getCurrentLocationFromPayload(t):this.currentLocation}},e.prototype.getCurrentLocationFromPayload=function(e){if(e.page){return""+function(e){return e.split("/").slice(0,3).join("/")}(this.currentLocation)+e.page.replace(/^\/?(.*)$/,"/$1")}return Ae(window.location)},e}(),Oe=r({},Te),De=Object.keys(Oe).map((function(e){return Oe[e]})),Ve=function(e){function i(t){var n=t.client,r=t.uuidGenerator,o=void 0===r?P:r,i=e.call(this,{client:n,uuidGenerator:o})||this;return i.products=[],i.impressions=[],i}return t(i,e),i.prototype.addHooks=function(){this.addHooksForPageView(),this.addHooksForEvent(),this.addHooksForECEvents()},i.prototype.addProduct=function(e){this.products.push(e)},i.prototype.addImpression=function(e){this.impressions.push(e)},i.prototype.clearPluginData=function(){this.products=[],this.impressions=[]},i.prototype.addHooksForECEvents=function(){var e=this;this.client.registerBeforeSendEventHook((function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var o=n[0];return-1!==De.indexOf(t)?e.addECDataToPayload(t,o):o})),this.client.registerAfterSendEventHook((function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var o=n[0];return-1!==De.indexOf(t)&&e.updateLocationInformation(t,o),o}))},i.prototype.addHooksForPageView=function(){this.client.addEventTypeMapping(Oe.pageview,{newEventType:n.collect,variableLengthArgumentsNames:["page"],addVisitorIdParameter:!0,usesMeasurementProtocol:!0})},i.prototype.addHooksForEvent=function(){this.client.addEventTypeMapping(Oe.event,{newEventType:n.collect,variableLengthArgumentsNames:["eventCategory","eventAction","eventLabel","eventValue"],addVisitorIdParameter:!0,usesMeasurementProtocol:!0})},i.prototype.addECDataToPayload=function(e,t){var n=r(r(r(r({},this.getLocationInformation(e,t)),this.getDefaultContextInformation(e)),this.action?{action:this.action}:{}),this.actionData||{}),o=this.getProductPayload(),i=this.getImpressionPayload();return this.clearData(),r(r(r(r({},i),o),n),t)},i.prototype.getProductPayload=function(){var e=this;return this.products.map((function(t){return e.assureProductValidity(t)})).reduce((function(e,t,n){return r(r({},e),function(e,t){return F(e).reduce((function(n,o){var i,s="pr"+(t+1)+(D[o]||o);return r(r({},n),((i={})[s]=e[o],i))}),{})}(t,n))}),{})},i.prototype.getImpressionPayload=function(){var e=this;return this.getImpressionsByList().map((function(t){var n=t.impressions,i=o(t,["impressions"]);return r(r({},i),{impressions:n.map((function(t){return e.assureBaseImpressionValidity(t)}))})})).reduce((function(e,t,n){return r(r({},e),function(e,t,n){var o=e.impressions.reduce((function(e,o,i){return r(r({},e),B(o,t,i,n))}),{});return e.listName&&(o["il"+(t+1)+"nm"]=e.listName),o}(t,n,"pi"))}),{})},i.prototype.assureProductValidity=function(e){var t=e.position,n=o(e,["position"]);return void 0!==t&&t<1?(console.warn("The position for product '"+(e.name||e.id)+"' must be greater than 0 when provided."),n):e},i.prototype.assureBaseImpressionValidity=function(e){var t=e.position,n=o(e,["position"]);return void 0!==t&&t<1?(console.warn("The position for impression '"+(e.name||e.id)+"' must be greater than 0 when provided."),n):e},i.prototype.getImpressionsByList=function(){return this.impressions.reduce((function(e,t){var n=t.list,r=o(t,["list"]),i=e.find((function(e){return e.listName===n}));return i?i.impressions.push(r):e.push({listName:n,impressions:[r]}),e}),[])},i.Id="ec",i}(Le),Me=Ve,qe=r({},Te),_e=Object.keys(qe).map((function(e){return qe[e]})),Ne=function(e){function o(t){var n=t.client,r=t.uuidGenerator,o=void 0===r?P:r,i=e.call(this,{client:n,uuidGenerator:o})||this;return i.ticket={},i}return t(o,e),o.prototype.addHooks=function(){this.addHooksForEvent(),this.addHooksForPageView(),this.addHooksForSVCEvents()},o.prototype.setTicket=function(e){this.ticket=e},o.prototype.clearPluginData=function(){this.ticket={}},o.prototype.addHooksForSVCEvents=function(){var e=this;this.client.registerBeforeSendEventHook((function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var o=n[0];return-1!==_e.indexOf(t)?e.addSVCDataToPayload(t,o):o})),this.client.registerAfterSendEventHook((function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var o=n[0];return-1!==_e.indexOf(t)&&e.updateLocationInformation(t,o),o}))},o.prototype.addHooksForPageView=function(){this.client.addEventTypeMapping(qe.pageview,{newEventType:n.collect,variableLengthArgumentsNames:["page"],addVisitorIdParameter:!0,usesMeasurementProtocol:!0})},o.prototype.addHooksForEvent=function(){this.client.addEventTypeMapping(qe.event,{newEventType:n.collect,variableLengthArgumentsNames:["eventCategory","eventAction","eventLabel","eventValue"],addVisitorIdParameter:!0,usesMeasurementProtocol:!0})},o.prototype.addSVCDataToPayload=function(e,t){var n,o=r(r(r(r({},this.getLocationInformation(e,t)),this.getDefaultContextInformation(e)),this.action?{svcAction:this.action}:{}),Object.keys(null!==(n=this.actionData)&&void 0!==n?n:{}).length>0?{svcActionData:this.actionData}:{}),i=this.getTicketPayload();return this.clearData(),r(r(r({},i),o),t)},o.prototype.getTicketPayload=function(){return e=this.ticket,F(e).filter((function(t){return void 0!==e[t]})).reduce((function(t,n){var o,i=A[n]||n;return r(r({},t),((o={})[i]=e[n],o))}),{});var e},o.Id="svc",o}(Le),Qe=Ne,Be=function(){function e(){var e;this.registeredPluginsMap=((e={})[Me.Id]=Me,e[Qe.Id]=Qe,e),this.requiredPlugins={}}return e.prototype.require=function(e,t){var n=this.registeredPluginsMap[e];if(!n)throw new Error('No plugin named "'+e+"\" is currently registered. If you use a custom plugin, use 'provide' first.");this.requiredPlugins[e]=new n(t)},e.prototype.provide=function(e,t){this.registeredPluginsMap[e]=t},e.prototype.clearRequired=function(){this.requiredPlugins={}},e.prototype.execute=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var o=this.requiredPlugins[e];if(!o)throw new Error('The plugin "'+e+'" is not required. Check that you required it on initialization.');var i=o[t];if(!i)throw new Error('The function "'+t+'" does not exists on the plugin "'+e+'".');if("function"!=typeof i)throw new Error('"'+t+'" of the plugin "'+e+'" is not a function.');return i.apply(o,n)},e.DefaultPlugins=[Me.Id,Qe.Id],e}(),Ue=function(){function e(){this.plugins=new Be,this.params={}}return e.prototype.init=function(e,t){var o=this;if(!e)throw new Error("You must pass your token when you call 'init'");if("string"==typeof e?this.client=new xe({token:e,endpoint:this.getEndpoint(t)}):this.isAnalyticsClient(e)&&(this.client=e),!this.client)throw new Error("You must pass either your token or a valid object when you call 'init'");var i={client:this.client};this.plugins.clearRequired(),this.getPluginKeys(t).forEach((function(e){return o.plugins.require(e,i)})),this.client.registerBeforeSendEventHook((function(e,t){return r(r({},t),o.params)})),this.client.addEventTypeMapping(n.view,{newEventType:n.view,addClientIdParameter:!0})},e.prototype.isAnalyticsClient=function(e){return"object"==typeof e&&void 0!==e.sendEvent},e.prototype.getPluginKeys=function(e){return"string"==typeof e?Be.DefaultPlugins:Array.isArray(null==e?void 0:e.plugins)?e.plugins:Be.DefaultPlugins},e.prototype.getEndpoint=function(e){return"string"==typeof e?e||we.default:(null==e?void 0:e.endpoint)?e.endpoint:we.default},e.prototype.initForProxy=function(e){if(!e)throw new Error("You must pass your endpoint when you call 'initForProxy'");if("string"!=typeof e)throw new Error("You must pass a string as the endpoint parameter when you call 'initForProxy'");this.client=new xe({endpoint:e})},e.prototype.set=function(e,t){var n=this;"string"==typeof e?this.params[e]=t:Object.keys(e).map((function(t){n.params[t]=e[t]}))},e.prototype.send=function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=t[0],o=t.slice(1);if(void 0===this.client)throw new Error("You must call init before sending an event");if(!r)throw new Error('You must provide an event type when calling "send".');return(e=this.client).sendEvent.apply(e,a([r.toLowerCase()],o))},e.prototype.onLoad=function(e){if(void 0===e)throw new Error("You must pass a function when you call 'onLoad'");e()},e.prototype.provide=function(e,t){this.plugins.provide(e,t)},e.prototype.require=function(e,t){if(!this.client)throw new Error("You must call init before requiring a plugin");this.plugins.require(e,r(r({},t),{client:this.client}))},e.prototype.callPlugin=function(e,t){for(var n,r=[],o=2;o<arguments.length;o++)r[o-2]=arguments[o];(n=this.plugins).execute.apply(n,a([e,t],r))},e.prototype.reset=function(){this.client=void 0,this.plugins=new Be,this.params={}},e}(),He=new Ue,je=function(){return He.client},Ye=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=/^(?:(\w+)\.)?(?:(\w+):)?(\w+)$/.exec(e);r[1];var o=r[2],i=r[3],s=He[i];if(o&&i)return He.callPlugin.apply(He,a([o,i],t));if(s)return s.apply(He,t);var u=["init","set","send","onLoad","callPlugin","reset","require","provide"];throw new Error('The action "'+e+'" does not exist. Available actions: '+u.join(", ")+".")},ze=Object.freeze({__proto__:null,CoveoUA:Ue,coveoua:He,getCurrentClient:je,handleOneAnalyticsEvent:Ye,default:Ye});!function(e){e.contextChanged="contextChanged",e.expandToFullUI="expandToFullUI"}(Ie||(Ie={})),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"}(Pe||(Pe={}));var Ke=((Re={})[Pe.triggerNotify]="queryPipelineTriggers",Re[Pe.triggerExecute]="queryPipelineTriggers",Re[Pe.triggerQuery]="queryPipelineTriggers",Re[Pe.triggerRedirect]="queryPipelineTriggers",Re[Pe.queryError]="errors",Re[Pe.queryErrorBack]="errors",Re[Pe.queryErrorClear]="errors",Re[Pe.queryErrorRetry]="errors",Re[Pe.pagerNext]="getMoreResults",Re[Pe.pagerPrevious]="getMoreResults",Re[Pe.pagerNumber]="getMoreResults",Re[Pe.pagerResize]="getMoreResults",Re[Pe.pagerScrolling]="getMoreResults",Re[Pe.facetSearch]="facet",Re[Pe.facetShowLess]="facet",Re[Pe.facetShowMore]="facet",Re[Pe.recommendation]="recommendation",Re[Pe.likeSmartSnippet]="smartSnippet",Re[Pe.dislikeSmartSnippet]="smartSnippet",Re[Pe.expandSmartSnippet]="smartSnippet",Re[Pe.collapseSmartSnippet]="smartSnippet",Re[Pe.openSmartSnippetFeedbackModal]="smartSnippet",Re[Pe.closeSmartSnippetFeedbackModal]="smartSnippet",Re[Pe.sendSmartSnippetReason]="smartSnippet",Re[Pe.expandSmartSnippetSuggestion]="smartSnippetSuggestions",Re[Pe.collapseSmartSnippetSuggestion]="smartSnippetSuggestions",Re[Pe.showMoreSmartSnippetSuggestion]="smartSnippetSuggestions",Re[Pe.showLessSmartSnippetSuggestion]="smartSnippetSuggestions",Re[Pe.clearRecentQueries]="recentQueries",Re[Pe.recentResultClick]="recentlyClickedDocuments",Re[Pe.clearRecentResults]="recentlyClickedDocuments",Re[Pe.showLessFoldedResults]="folding",Re[Ie.expandToFullUI]="interface",Re),We=function(){function e(){this.runtime=new ye,this.currentVisitorId=""}return e.prototype.getPayload=function(){return Promise.resolve()},e.prototype.getParameters=function(){return Promise.resolve()},e.prototype.sendEvent=function(){return Promise.resolve()},e.prototype.sendSearchEvent=function(){return Promise.resolve()},e.prototype.sendClickEvent=function(){return Promise.resolve()},e.prototype.sendCustomEvent=function(){return Promise.resolve()},e.prototype.sendViewEvent=function(){return Promise.resolve()},e.prototype.getVisit=function(){return Promise.resolve({id:"",visitorId:""})},e.prototype.getHealth=function(){return Promise.resolve({status:""})},e.prototype.registerBeforeSendEventHook=function(){},e.prototype.registerAfterSendEventHook=function(){},e.prototype.addEventTypeMapping=function(){},e}();function $e(e){var t=e.join(";");return t.length<=256?t:$e(e.slice(1))}var Ge=function(e){var t=function(e){return e.map((function(e){return e.replace(/;/g,"")}))}(e),n=function(e){var t="";return e.filter((function(e){var n=e!==t;return t=e,n}))}(t);return $e(n)};function Je(e){var t="string"==typeof e.partialQueries?e.partialQueries:Ge(e.partialQueries),n="string"==typeof e.suggestions?e.suggestions:Ge(e.suggestions);return r(r({},e),{partialQueries:t,suggestions:n})}var Xe,Ze,et,tt=function(){function e(e,t){this.opts=e,this.provider=t;var n=!1===e.enableAnalytics||ke();this.coveoAnalyticsClient=n?new We:new xe(e)}return e.prototype.disable=function(){this.coveoAnalyticsClient instanceof xe&&this.coveoAnalyticsClient.clear(),this.coveoAnalyticsClient=new We},e.prototype.enable=function(){this.coveoAnalyticsClient=new xe(this.opts)},e.prototype.makeInterfaceLoad=function(){return this.makeSearchEvent(Pe.interfaceLoad)},e.prototype.logInterfaceLoad=function(){return this.makeInterfaceLoad().log()},e.prototype.makeRecommendationInterfaceLoad=function(){return this.makeSearchEvent(Pe.recommendationInterfaceLoad)},e.prototype.logRecommendationInterfaceLoad=function(){return this.makeRecommendationInterfaceLoad().log()},e.prototype.makeRecommendation=function(){return this.makeCustomEvent(Pe.recommendation)},e.prototype.logRecommendation=function(){return this.makeRecommendation().log()},e.prototype.makeRecommendationOpen=function(e,t){return this.makeClickEvent(Pe.recommendationOpen,e,t)},e.prototype.logRecommendationOpen=function(e,t){return this.makeRecommendationOpen(e,t).log()},e.prototype.makeStaticFilterClearAll=function(e){return this.makeSearchEvent(Pe.staticFilterClearAll,e)},e.prototype.logStaticFilterClearAll=function(e){return this.makeStaticFilterClearAll(e).log()},e.prototype.makeStaticFilterSelect=function(e){return this.makeSearchEvent(Pe.staticFilterSelect,e)},e.prototype.logStaticFilterSelect=function(e){return this.makeStaticFilterSelect(e).log()},e.prototype.makeStaticFilterDeselect=function(e){return this.makeSearchEvent(Pe.staticFilterDeselect,e)},e.prototype.logStaticFilterDeselect=function(e){return this.makeStaticFilterDeselect(e).log()},e.prototype.makeFetchMoreResults=function(){return this.makeCustomEvent(Pe.pagerScrolling,{type:"getMoreResults"})},e.prototype.logFetchMoreResults=function(){return this.makeFetchMoreResults().log()},e.prototype.makeInterfaceChange=function(e){return this.makeSearchEvent(Pe.interfaceChange,e)},e.prototype.logInterfaceChange=function(e){return this.makeInterfaceChange(e).log()},e.prototype.makeDidYouMeanAutomatic=function(){return this.makeSearchEvent(Pe.didyoumeanAutomatic)},e.prototype.logDidYouMeanAutomatic=function(){return this.makeDidYouMeanAutomatic().log()},e.prototype.makeDidYouMeanClick=function(){return this.makeSearchEvent(Pe.didyoumeanClick)},e.prototype.logDidYouMeanClick=function(){return this.makeDidYouMeanClick().log()},e.prototype.makeResultsSort=function(e){return this.makeSearchEvent(Pe.resultsSort,e)},e.prototype.logResultsSort=function(e){return this.makeResultsSort(e).log()},e.prototype.makeSearchboxSubmit=function(){return this.makeSearchEvent(Pe.searchboxSubmit)},e.prototype.logSearchboxSubmit=function(){return this.makeSearchboxSubmit().log()},e.prototype.makeSearchboxClear=function(){return this.makeSearchEvent(Pe.searchboxClear)},e.prototype.logSearchboxClear=function(){return this.makeSearchboxClear().log()},e.prototype.makeSearchboxAsYouType=function(){return this.makeSearchEvent(Pe.searchboxAsYouType)},e.prototype.logSearchboxAsYouType=function(){return this.makeSearchboxAsYouType().log()},e.prototype.makeBreadcrumbFacet=function(e){return this.makeSearchEvent(Pe.breadcrumbFacet,e)},e.prototype.logBreadcrumbFacet=function(e){return this.makeBreadcrumbFacet(e).log()},e.prototype.makeBreadcrumbResetAll=function(){return this.makeSearchEvent(Pe.breadcrumbResetAll)},e.prototype.logBreadcrumbResetAll=function(){return this.makeBreadcrumbResetAll().log()},e.prototype.makeDocumentQuickview=function(e,t){return this.makeClickEvent(Pe.documentQuickview,e,t)},e.prototype.logDocumentQuickview=function(e,t){return this.makeDocumentQuickview(e,t).log()},e.prototype.makeDocumentOpen=function(e,t){return this.makeClickEvent(Pe.documentOpen,e,t)},e.prototype.logDocumentOpen=function(e,t){return this.makeDocumentOpen(e,t).log()},e.prototype.makeOmniboxAnalytics=function(e){return this.makeSearchEvent(Pe.omniboxAnalytics,Je(e))},e.prototype.logOmniboxAnalytics=function(e){return this.makeOmniboxAnalytics(e).log()},e.prototype.makeOmniboxFromLink=function(e){return this.makeSearchEvent(Pe.omniboxFromLink,Je(e))},e.prototype.logOmniboxFromLink=function(e){return this.makeOmniboxFromLink(e).log()},e.prototype.makeSearchFromLink=function(){return this.makeSearchEvent(Pe.searchFromLink)},e.prototype.logSearchFromLink=function(){return this.makeSearchFromLink().log()},e.prototype.makeTriggerNotify=function(e){return this.makeCustomEvent(Pe.triggerNotify,e)},e.prototype.logTriggerNotify=function(e){return this.makeTriggerNotify(e).log()},e.prototype.makeTriggerExecute=function(e){return this.makeCustomEvent(Pe.triggerExecute,e)},e.prototype.logTriggerExecute=function(e){return this.makeTriggerExecute(e).log()},e.prototype.makeTriggerQuery=function(){return this.makeCustomEvent(Pe.triggerQuery,{query:this.provider.getSearchEventRequestPayload().queryText},"queryPipelineTriggers")},e.prototype.logTriggerQuery=function(){return this.makeTriggerQuery().log()},e.prototype.makeUndoTriggerQuery=function(e){return this.makeSearchEvent(Pe.undoTriggerQuery,e)},e.prototype.logUndoTriggerQuery=function(e){return this.makeUndoTriggerQuery(e).log()},e.prototype.makeTriggerRedirect=function(e){return this.makeCustomEvent(Pe.triggerRedirect,r(r({},e),{query:this.provider.getSearchEventRequestPayload().queryText}))},e.prototype.logTriggerRedirect=function(e){return this.makeTriggerRedirect(e).log()},e.prototype.makePagerResize=function(e){return this.makeCustomEvent(Pe.pagerResize,e)},e.prototype.logPagerResize=function(e){return this.makePagerResize(e).log()},e.prototype.makePagerNumber=function(e){return this.makeCustomEvent(Pe.pagerNumber,e)},e.prototype.logPagerNumber=function(e){return this.makePagerNumber(e).log()},e.prototype.makePagerNext=function(e){return this.makeCustomEvent(Pe.pagerNext,e)},e.prototype.logPagerNext=function(e){return this.makePagerNext(e).log()},e.prototype.makePagerPrevious=function(e){return this.makeCustomEvent(Pe.pagerPrevious,e)},e.prototype.logPagerPrevious=function(e){return this.makePagerPrevious(e).log()},e.prototype.makePagerScrolling=function(){return this.makeCustomEvent(Pe.pagerScrolling)},e.prototype.logPagerScrolling=function(){return this.makePagerScrolling().log()},e.prototype.makeFacetClearAll=function(e){return this.makeSearchEvent(Pe.facetClearAll,e)},e.prototype.logFacetClearAll=function(e){return this.makeFacetClearAll(e).log()},e.prototype.makeFacetSearch=function(e){return this.makeSearchEvent(Pe.facetSearch,e)},e.prototype.logFacetSearch=function(e){return this.makeFacetSearch(e).log()},e.prototype.makeFacetSelect=function(e){return this.makeSearchEvent(Pe.facetSelect,e)},e.prototype.logFacetSelect=function(e){return this.makeFacetSelect(e).log()},e.prototype.makeFacetDeselect=function(e){return this.makeSearchEvent(Pe.facetDeselect,e)},e.prototype.logFacetDeselect=function(e){return this.makeFacetDeselect(e).log()},e.prototype.makeFacetExclude=function(e){return this.makeSearchEvent(Pe.facetExclude,e)},e.prototype.logFacetExclude=function(e){return this.makeFacetExclude(e).log()},e.prototype.makeFacetUnexclude=function(e){return this.makeSearchEvent(Pe.facetUnexclude,e)},e.prototype.logFacetUnexclude=function(e){return this.makeFacetUnexclude(e).log()},e.prototype.makeFacetSelectAll=function(e){return this.makeSearchEvent(Pe.facetSelectAll,e)},e.prototype.logFacetSelectAll=function(e){return this.makeFacetSelectAll(e).log()},e.prototype.makeFacetUpdateSort=function(e){return this.makeSearchEvent(Pe.facetUpdateSort,e)},e.prototype.logFacetUpdateSort=function(e){return this.makeFacetUpdateSort(e).log()},e.prototype.makeFacetShowMore=function(e){return this.makeCustomEvent(Pe.facetShowMore,e)},e.prototype.logFacetShowMore=function(e){return this.makeFacetShowMore(e).log()},e.prototype.makeFacetShowLess=function(e){return this.makeCustomEvent(Pe.facetShowLess,e)},e.prototype.logFacetShowLess=function(e){return this.makeFacetShowLess(e).log()},e.prototype.makeQueryError=function(e){return this.makeCustomEvent(Pe.queryError,e)},e.prototype.logQueryError=function(e){return this.makeQueryError(e).log()},e.prototype.makeQueryErrorBack=function(){var e=this;return{description:this.makeDescription(Pe.queryErrorBack),log:function(){return i(e,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.logCustomEvent(Pe.queryErrorBack)];case 1:return e.sent(),[2,this.logSearchEvent(Pe.queryErrorBack)]}}))}))}}},e.prototype.logQueryErrorBack=function(){return this.makeQueryErrorBack().log()},e.prototype.makeQueryErrorRetry=function(){var e=this;return{description:this.makeDescription(Pe.queryErrorRetry),log:function(){return i(e,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.logCustomEvent(Pe.queryErrorRetry)];case 1:return e.sent(),[2,this.logSearchEvent(Pe.queryErrorRetry)]}}))}))}}},e.prototype.logQueryErrorRetry=function(){return this.makeQueryErrorRetry().log()},e.prototype.makeQueryErrorClear=function(){var e=this;return{description:this.makeDescription(Pe.queryErrorClear),log:function(){return i(e,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.logCustomEvent(Pe.queryErrorClear)];case 1:return e.sent(),[2,this.logSearchEvent(Pe.queryErrorClear)]}}))}))}}},e.prototype.logQueryErrorClear=function(){return this.makeQueryErrorClear().log()},e.prototype.makeLikeSmartSnippet=function(){return this.makeCustomEvent(Pe.likeSmartSnippet)},e.prototype.logLikeSmartSnippet=function(){return this.makeLikeSmartSnippet().log()},e.prototype.makeDislikeSmartSnippet=function(){return this.makeCustomEvent(Pe.dislikeSmartSnippet)},e.prototype.logDislikeSmartSnippet=function(){return this.makeDislikeSmartSnippet().log()},e.prototype.makeExpandSmartSnippet=function(){return this.makeCustomEvent(Pe.expandSmartSnippet)},e.prototype.logExpandSmartSnippet=function(){return this.makeExpandSmartSnippet().log()},e.prototype.makeCollapseSmartSnippet=function(){return this.makeCustomEvent(Pe.collapseSmartSnippet)},e.prototype.logCollapseSmartSnippet=function(){return this.makeCollapseSmartSnippet().log()},e.prototype.makeOpenSmartSnippetFeedbackModal=function(){return this.makeCustomEvent(Pe.openSmartSnippetFeedbackModal)},e.prototype.logOpenSmartSnippetFeedbackModal=function(){return this.makeOpenSmartSnippetFeedbackModal().log()},e.prototype.makeCloseSmartSnippetFeedbackModal=function(){return this.makeCustomEvent(Pe.closeSmartSnippetFeedbackModal)},e.prototype.logCloseSmartSnippetFeedbackModal=function(){return this.makeCloseSmartSnippetFeedbackModal().log()},e.prototype.makeSmartSnippetFeedbackReason=function(e,t){return this.makeCustomEvent(Pe.sendSmartSnippetReason,{reason:e,details:t})},e.prototype.logSmartSnippetFeedbackReason=function(e,t){return this.makeSmartSnippetFeedbackReason(e,t).log()},e.prototype.makeExpandSmartSnippetSuggestion=function(e){return this.makeCustomEvent(Pe.expandSmartSnippetSuggestion,"documentId"in e?e:{documentId:e})},e.prototype.logExpandSmartSnippetSuggestion=function(e){return this.makeExpandSmartSnippetSuggestion(e).log()},e.prototype.makeCollapseSmartSnippetSuggestion=function(e){return this.makeCustomEvent(Pe.collapseSmartSnippetSuggestion,"documentId"in e?e:{documentId:e})},e.prototype.logCollapseSmartSnippetSuggestion=function(e){return this.makeCollapseSmartSnippetSuggestion(e).log()},e.prototype.makeShowMoreSmartSnippetSuggestion=function(e){return this.makeCustomEvent(Pe.showMoreSmartSnippetSuggestion,e)},e.prototype.logShowMoreSmartSnippetSuggestion=function(e){return this.makeShowMoreSmartSnippetSuggestion(e).log()},e.prototype.makeShowLessSmartSnippetSuggestion=function(e){return this.makeCustomEvent(Pe.showLessSmartSnippetSuggestion,e)},e.prototype.logShowLessSmartSnippetSuggestion=function(e){return this.makeShowLessSmartSnippetSuggestion(e).log()},e.prototype.makeOpenSmartSnippetSource=function(e,t){return this.makeClickEvent(Pe.openSmartSnippetSource,e,t)},e.prototype.logOpenSmartSnippetSource=function(e,t){return this.makeOpenSmartSnippetSource(e,t).log()},e.prototype.makeOpenSmartSnippetSuggestionSource=function(e,t){return this.makeClickEvent(Pe.openSmartSnippetSuggestionSource,e,{contentIDKey:t.documentId.contentIdKey,contentIDValue:t.documentId.contentIdValue},t)},e.prototype.logOpenSmartSnippetSuggestionSource=function(e,t){return this.makeOpenSmartSnippetSuggestionSource(e,t).log()},e.prototype.makeOpenSmartSnippetInlineLink=function(e,t){return this.makeClickEvent(Pe.openSmartSnippetInlineLink,e,{contentIDKey:t.contentIDKey,contentIDValue:t.contentIDValue},t)},e.prototype.logOpenSmartSnippetInlineLink=function(e,t){return this.makeOpenSmartSnippetInlineLink(e,t).log()},e.prototype.makeOpenSmartSnippetSuggestionInlineLink=function(e,t){return this.makeClickEvent(Pe.openSmartSnippetSuggestionInlineLink,e,{contentIDKey:t.documentId.contentIdKey,contentIDValue:t.documentId.contentIdValue},t)},e.prototype.logOpenSmartSnippetSuggestionInlineLink=function(e,t){return this.makeOpenSmartSnippetSuggestionInlineLink(e,t).log()},e.prototype.makeRecentQueryClick=function(){return this.makeSearchEvent(Pe.recentQueryClick)},e.prototype.logRecentQueryClick=function(){return this.makeRecentQueryClick().log()},e.prototype.makeClearRecentQueries=function(){return this.makeCustomEvent(Pe.clearRecentQueries)},e.prototype.logClearRecentQueries=function(){return this.makeClearRecentQueries().log()},e.prototype.makeRecentResultClick=function(e,t){return this.makeCustomEvent(Pe.recentResultClick,{info:e,identifier:t})},e.prototype.logRecentResultClick=function(e,t){return this.makeRecentResultClick(e,t).log()},e.prototype.makeClearRecentResults=function(){return this.makeCustomEvent(Pe.clearRecentResults)},e.prototype.logClearRecentResults=function(){return this.makeClearRecentResults().log()},e.prototype.makeNoResultsBack=function(){return this.makeSearchEvent(Pe.noResultsBack)},e.prototype.logNoResultsBack=function(){return this.makeNoResultsBack().log()},e.prototype.makeShowMoreFoldedResults=function(e,t){return this.makeClickEvent(Pe.showMoreFoldedResults,e,t)},e.prototype.logShowMoreFoldedResults=function(e,t){return this.makeShowMoreFoldedResults(e,t).log()},e.prototype.makeShowLessFoldedResults=function(){return this.makeCustomEvent(Pe.showLessFoldedResults)},e.prototype.logShowLessFoldedResults=function(){return this.makeShowLessFoldedResults().log()},e.prototype.makeCustomEvent=function(e,t,n){var o=this;void 0===n&&(n=Ke[e]);var a=r(r({},this.provider.getBaseMetadata()),t);return{description:this.makeDescription(e,t),log:function(){return i(o,void 0,void 0,(function(){var t,o;return s(this,(function(i){switch(i.label){case 0:return o=[{}],[4,this.getBaseCustomEventRequest(a)];case 1:return t=r.apply(void 0,[r.apply(void 0,o.concat([i.sent()])),{eventType:n,eventValue:e}]),[2,this.coveoAnalyticsClient.sendCustomEvent(t)]}}))}))}}},e.prototype.logCustomEvent=function(e,t,n){return void 0===n&&(n=Ke[e]),this.makeCustomEvent(e,t,n).log()},e.prototype.makeCustomEventWithType=function(e,t,n){var o=this,a=r(r({},this.provider.getBaseMetadata()),n);return{description:{actionCause:e,customData:a},log:function(){return i(o,void 0,void 0,(function(){var n,o;return s(this,(function(i){switch(i.label){case 0:return o=[{}],[4,this.getBaseCustomEventRequest(a)];case 1:return n=r.apply(void 0,[r.apply(void 0,o.concat([i.sent()])),{eventType:t,eventValue:e}]),[2,this.coveoAnalyticsClient.sendCustomEvent(n)]}}))}))}}},e.prototype.logCustomEventWithType=function(e,t,n){return this.makeCustomEventWithType(e,t,n).log()},e.prototype.logSearchEvent=function(e,t){return i(this,void 0,void 0,(function(){var n,r;return s(this,(function(o){switch(o.label){case 0:return r=(n=this.coveoAnalyticsClient).sendSearchEvent,[4,this.getBaseSearchEventRequest(e,t)];case 1:return[2,r.apply(n,[o.sent()])]}}))}))},e.prototype.makeDescription=function(e,t){return{actionCause:e,customData:r(r({},this.provider.getBaseMetadata()),t)}},e.prototype.makeSearchEvent=function(e,t){var n=this;return{description:this.makeDescription(e,t),log:function(){return n.logSearchEvent(e,t)}}},e.prototype.logClickEvent=function(e,t,n,o){return i(this,void 0,void 0,(function(){var i,a;return s(this,(function(s){switch(s.label){case 0:return a=[r({},t)],[4,this.getBaseEventRequest(r(r({},n),o))];case 1:return i=r.apply(void 0,[r.apply(void 0,a.concat([s.sent()])),{searchQueryUid:this.provider.getSearchUID(),queryPipeline:this.provider.getPipeline(),actionCause:e}]),[2,this.coveoAnalyticsClient.sendClickEvent(i)]}}))}))},e.prototype.makeClickEvent=function(e,t,n,o){var i=this;return{description:this.makeDescription(e,r(r({},n),o)),log:function(){return i.logClickEvent(e,t,n,o)}}},e.prototype.getBaseSearchEventRequest=function(e,t){return i(this,void 0,void 0,(function(){var n;return s(this,(function(o){switch(o.label){case 0:return n=[{}],[4,this.getBaseEventRequest(t)];case 1:return[2,r.apply(void 0,[r.apply(void 0,[r.apply(void 0,n.concat([o.sent()])),this.provider.getSearchEventRequestPayload()]),{searchQueryUid:this.provider.getSearchUID(),queryPipeline:this.provider.getPipeline(),actionCause:e}])]}}))}))},e.prototype.getBaseCustomEventRequest=function(e){return i(this,void 0,void 0,(function(){var t;return s(this,(function(n){switch(n.label){case 0:return t=[{}],[4,this.getBaseEventRequest(e)];case 1:return[2,r.apply(void 0,[r.apply(void 0,t.concat([n.sent()])),{lastSearchQueryUid:this.provider.getSearchUID()}])]}}))}))},e.prototype.getBaseEventRequest=function(e){return i(this,void 0,void 0,(function(){var t,n,o;return s(this,(function(i){switch(i.label){case 0:return t=r(r({},this.provider.getBaseMetadata()),e),n=[r(r({},this.getOrigins()),this.getSplitTestRun())],o={customData:t,language:this.provider.getLanguage(),facetState:this.provider.getFacetState?this.provider.getFacetState():[],anonymous:this.provider.getIsAnonymous()},[4,this.getClientId()];case 1:return[2,r.apply(void 0,n.concat([(o.clientId=i.sent(),o)]))]}}))}))},e.prototype.getOrigins=function(){var e,t;return{originContext:null===(t=(e=this.provider).getOriginContext)||void 0===t?void 0:t.call(e),originLevel1:this.provider.getOriginLevel1(),originLevel2:this.provider.getOriginLevel2(),originLevel3:this.provider.getOriginLevel3()}},e.prototype.getClientId=function(){return this.coveoAnalyticsClient instanceof xe?this.coveoAnalyticsClient.getCurrentVisitorId():void 0},e.prototype.getSplitTestRun=function(){var e=this.provider.getSplitTestRunName?this.provider.getSplitTestRunName():"",t=this.provider.getSplitTestRunVersion?this.provider.getSplitTestRunVersion():"";return r(r({},e&&{splitTestRunName:e}),t&&{splitTestRunVersion:t})},e}();!function(e){e.click="click",e.flowStart="flowStart"}(Xe||(Xe={})),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"}(Ze||(Ze={})),function(e){e.quit="Quit",e.solved="Solved"}(et||(et={}));var nt=function(){function e(e,t){var n;this.options=e,this.provider=t;var r=(null===(n=e.enableAnalytics)||void 0===n||n)&&!ke();this.coveoAnalyticsClient=r?new xe(e):new We,this.svc=new Ne({client:this.coveoAnalyticsClient})}return e.prototype.disable=function(){this.coveoAnalyticsClient instanceof xe&&this.coveoAnalyticsClient.clear(),this.coveoAnalyticsClient=new We,this.svc=new Ne({client:this.coveoAnalyticsClient})},e.prototype.enable=function(){this.coveoAnalyticsClient=new xe(this.options),this.svc=new Ne({client:this.coveoAnalyticsClient})},e.prototype.logEnterInterface=function(e){return this.svc.setAction(Ze.enterInterface),this.svc.setTicket(e.ticket),this.sendFlowStartEvent()},e.prototype.logUpdateCaseField=function(e){return this.svc.setAction(Ze.fieldUpdate,{fieldName:e.fieldName}),this.svc.setTicket(e.ticket),this.sendClickEvent()},e.prototype.logSelectFieldSuggestion=function(e){return this.svc.setAction(Ze.fieldSuggestionClick,e.suggestion),this.svc.setTicket(e.ticket),this.sendClickEvent()},e.prototype.logSelectDocumentSuggestion=function(e){return this.svc.setAction(Ze.suggestionClick,e.suggestion),this.svc.setTicket(e.ticket),this.sendClickEvent()},e.prototype.logRateDocumentSuggestion=function(e){return this.svc.setAction(Ze.suggestionRate,r({rate:e.rating},e.suggestion)),this.svc.setTicket(e.ticket),this.sendClickEvent()},e.prototype.logMoveToNextCaseStep=function(e){return this.svc.setAction(Ze.nextCaseStep,{stage:null==e?void 0:e.stage}),this.svc.setTicket(e.ticket),this.sendClickEvent()},e.prototype.logCaseCancelled=function(e){return this.svc.setAction(Ze.caseCancelled,{reason:et.quit}),this.svc.setTicket(e.ticket),this.sendClickEvent()},e.prototype.logCaseSolved=function(e){return this.svc.setAction(Ze.caseSolved,{reason:et.solved}),this.svc.setTicket(e.ticket),this.sendClickEvent()},e.prototype.logCaseCreated=function(e){return this.svc.setAction(Ze.caseCreated),this.svc.setTicket(e.ticket),this.sendClickEvent()},e.prototype.sendFlowStartEvent=function(){return this.coveoAnalyticsClient.sendEvent("event","svc",Xe.flowStart,this.provider?{searchHub:this.provider.getOriginLevel1()}:null)},e.prototype.sendClickEvent=function(){return this.coveoAnalyticsClient.sendEvent("event","svc",Xe.click,this.provider?{searchHub:this.provider.getOriginLevel1()}:null)},e}(),rt=function(e,t){void 0===t&&(t=!0),e.caseContext;var n=e.caseId,i=e.caseNumber,s=o(e,["caseContext","caseId","caseNumber"]),a=function(e){var t={};return e.caseContext&&Object.keys(e.caseContext).forEach((function(n){var r,o=null===(r=e.caseContext)||void 0===r?void 0:r[n];o&&(t["context_"+n]=o)})),t}(e);return r(r(r({CaseId:n,CaseNumber:i},s),!!a.context_Case_Subject&&{CaseSubject:a.context_Case_Subject}),t&&a)},ot=function(){function e(e,t){this.opts=e,this.provider=t;var n=!1===e.enableAnalytics||ke();this.coveoAnalyticsClient=n?new We:new xe(e)}return e.prototype.disable=function(){this.coveoAnalyticsClient instanceof xe&&this.coveoAnalyticsClient.clear(),this.coveoAnalyticsClient=new We},e.prototype.enable=function(){this.coveoAnalyticsClient=new xe(this.opts)},e.prototype.logInterfaceLoad=function(e){if(e){var t=rt(e);return this.logSearchEvent(Pe.interfaceLoad,t)}return this.logSearchEvent(Pe.interfaceLoad)},e.prototype.logInterfaceChange=function(e){var t=rt(e);return this.logSearchEvent(Pe.interfaceChange,t)},e.prototype.logStaticFilterDeselect=function(e){var t=rt(e);return this.logSearchEvent(Pe.staticFilterDeselect,t)},e.prototype.logFetchMoreResults=function(e){if(e){var t=rt(e);return this.logCustomEvent(Pe.pagerScrolling,r(r({},t),{type:"getMoreResults"}))}return this.logCustomEvent(Pe.pagerScrolling,{type:"getMoreResults"})},e.prototype.logBreadcrumbFacet=function(e){var t=rt(e);return this.logSearchEvent(Pe.breadcrumbFacet,t)},e.prototype.logBreadcrumbResetAll=function(e){if(e){var t=rt(e);return this.logSearchEvent(Pe.breadcrumbResetAll,t)}return this.logSearchEvent(Pe.breadcrumbResetAll)},e.prototype.logFacetSelect=function(e){var t=rt(e);return this.logSearchEvent(Pe.facetSelect,t)},e.prototype.logFacetDeselect=function(e){var t=rt(e);return this.logSearchEvent(Pe.facetDeselect,t)},e.prototype.logFacetUpdateSort=function(e){var t=rt(e);return this.logSearchEvent(Pe.facetUpdateSort,t)},e.prototype.logFacetClearAll=function(e){var t=rt(e);return this.logSearchEvent(Pe.facetClearAll,t)},e.prototype.logFacetShowMore=function(e){var t=rt(e,!1);return this.logCustomEvent(Pe.facetShowMore,t)},e.prototype.logFacetShowLess=function(e){var t=rt(e,!1);return this.logCustomEvent(Pe.facetShowLess,t)},e.prototype.logQueryError=function(e){var t=rt(e,!1);return this.logCustomEvent(Pe.queryError,t)},e.prototype.logPagerNumber=function(e){var t=rt(e,!1);return this.logCustomEvent(Pe.pagerNumber,t)},e.prototype.logPagerNext=function(e){var t=rt(e,!1);return this.logCustomEvent(Pe.pagerNext,t)},e.prototype.logPagerPrevious=function(e){var t=rt(e,!1);return this.logCustomEvent(Pe.pagerPrevious,t)},e.prototype.logDidYouMeanAutomatic=function(e){if(e){var t=rt(e);return this.logSearchEvent(Pe.didyoumeanAutomatic,t)}return this.logSearchEvent(Pe.didyoumeanAutomatic)},e.prototype.logDidYouMeanClick=function(e){if(e){var t=rt(e);return this.logSearchEvent(Pe.didyoumeanClick,t)}return this.logSearchEvent(Pe.didyoumeanClick)},e.prototype.logResultsSort=function(e){var t=rt(e);return this.logSearchEvent(Pe.resultsSort,t)},e.prototype.logSearchboxSubmit=function(e){if(e){var t=rt(e);return this.logSearchEvent(Pe.searchboxSubmit,t)}return this.logSearchEvent(Pe.searchboxSubmit)},e.prototype.logContextChanged=function(e){var t=rt(e);return this.logSearchEvent(Ie.contextChanged,t)},e.prototype.logExpandToFullUI=function(e){var t=rt(e);return this.logCustomEvent(Ie.expandToFullUI,t)},e.prototype.logDocumentOpen=function(e,t,n){return this.logClickEvent(Pe.documentOpen,e,t,n?rt(n,!1):void 0)},e.prototype.logCustomEvent=function(e,t){return i(this,void 0,void 0,(function(){var n,o,i;return s(this,(function(s){switch(s.label){case 0:return n=r(r({},this.provider.getBaseMetadata()),t),i=[{}],[4,this.getBaseCustomEventRequest(n)];case 1:return o=r.apply(void 0,[r.apply(void 0,i.concat([s.sent()])),{eventType:Ke[e],eventValue:e}]),[2,this.coveoAnalyticsClient.sendCustomEvent(o)]}}))}))},e.prototype.logSearchEvent=function(e,t){return i(this,void 0,void 0,(function(){var n,r;return s(this,(function(o){switch(o.label){case 0:return r=(n=this.coveoAnalyticsClient).sendSearchEvent,[4,this.getBaseSearchEventRequest(e,t)];case 1:return[2,r.apply(n,[o.sent()])]}}))}))},e.prototype.logClickEvent=function(e,t,n,o){return i(this,void 0,void 0,(function(){var i,a;return s(this,(function(s){switch(s.label){case 0:return a=[r({},t)],[4,this.getBaseEventRequest(r(r({},n),o))];case 1:return i=r.apply(void 0,[r.apply(void 0,a.concat([s.sent()])),{searchQueryUid:this.provider.getSearchUID(),queryPipeline:this.provider.getPipeline(),actionCause:e}]),[2,this.coveoAnalyticsClient.sendClickEvent(i)]}}))}))},e.prototype.getBaseCustomEventRequest=function(e){return i(this,void 0,void 0,(function(){var t;return s(this,(function(n){switch(n.label){case 0:return t=[{}],[4,this.getBaseEventRequest(e)];case 1:return[2,r.apply(void 0,[r.apply(void 0,t.concat([n.sent()])),{lastSearchQueryUid:this.provider.getSearchUID()}])]}}))}))},e.prototype.getBaseSearchEventRequest=function(e,t){return i(this,void 0,void 0,(function(){var n;return s(this,(function(o){switch(o.label){case 0:return n=[{}],[4,this.getBaseEventRequest(t)];case 1:return[2,r.apply(void 0,[r.apply(void 0,[r.apply(void 0,n.concat([o.sent()])),this.provider.getSearchEventRequestPayload()]),{searchQueryUid:this.provider.getSearchUID(),queryPipeline:this.provider.getPipeline(),actionCause:e}])]}}))}))},e.prototype.getBaseEventRequest=function(e){return i(this,void 0,void 0,(function(){var t,n,o;return s(this,(function(i){switch(i.label){case 0:return t=r(r({},this.provider.getBaseMetadata()),e),n=[r({},this.getOrigins())],o={customData:t,language:this.provider.getLanguage(),facetState:this.provider.getFacetState?this.provider.getFacetState():[],anonymous:this.provider.getIsAnonymous()},[4,this.getClientId()];case 1:return[2,r.apply(void 0,n.concat([(o.clientId=i.sent(),o)]))]}}))}))},e.prototype.getOrigins=function(){var e,t;return{originContext:null===(t=(e=this.provider).getOriginContext)||void 0===t?void 0:t.call(e),originLevel1:this.provider.getOriginLevel1(),originLevel2:this.provider.getOriginLevel2(),originLevel3:this.provider.getOriginLevel3()}},e.prototype.getClientId=function(){return this.coveoAnalyticsClient instanceof xe?this.coveoAnalyticsClient.getCurrentVisitorId():void 0},e}(),it=Object.freeze({__proto__:null,analytics:Fe,donottrack:Ee,history:b,SimpleAnalytics:ze,storage:E,CoveoAnalyticsClient:xe,CoveoUA:Ue,getCurrentClient:je,handleOneAnalyticsEvent:Ye,CoveoSearchPageClient:tt,CaseAssistClient:nt,CoveoInsightClient:ot});window.Promise instanceof Function||console.error('This script uses window.Promise which is not supported in your browser. Consider adding a polyfill like "es6-promise".'),window.fetch instanceof Function||console.error('This script uses window.fetch which is not supported in your browser. Consider adding a polyfill like "fetch".');var st=self.coveoua||Ye;(self.coveoua=Ye,self.coveoanalytics=it,st.q)&&a(st.q.filter((function(e){return"init"===e[0]})),st.q.filter((function(e){return"init"!==e[0]}))).forEach((function(e){return Ye.apply(void 0,e)}));return self.coveoua}();
|
|
1
|
+
var coveoua=function(){"use strict";var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};function t(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}var n,r=function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},r.apply(this,arguments)};function o(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function i(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{u(r.next(e))}catch(e){i(e)}}function a(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))}function s(e,t){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}}function a(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],s=0,a=i.length;s<a;s++,o++)r[o]=i[s];return r}function u(){return"undefined"!=typeof navigator}function c(){return"undefined"!=typeof document}function p(){try{return"undefined"!=typeof localStorage}catch(e){return!1}}function l(){return u()&&navigator.cookieEnabled}function d(){return"undefined"!=typeof crypto&&void 0!==crypto.getRandomValues}!function(e){e.search="search",e.click="click",e.custom="custom",e.view="view",e.collect="collect"}(n||(n={}));var h=[n.click,n.custom,n.search,n.view],f=function(e,t){return-1!==h.indexOf(e)?r({language:c()?document.documentElement.lang:"unknown",userAgent:u()?navigator.userAgent:"unknown"},t):t},g=function(){function e(){}return e.set=function(t,n,r){var o,i,s,a;r?((i=new Date).setTime(i.getTime()+r),s="; expires="+i.toGMTString()):s="",-1===(a=window.location.hostname).indexOf(".")?document.cookie=t+"="+n+s+"; path=/":((o=a.split(".")).shift(),v({name:t,value:n,expires:s,domain:"."+o.join(".")}),null!=e.get(t)&&e.get(t)==n||v({name:t,value:n,expires:s,domain:"."+a}))},e.get=function(e){for(var t=e+"=",n=document.cookie.split(";"),r=0;r<n.length;r++){var o=n[r];if(0==(o=o.replace(/^\s+/,"")).indexOf(t))return o.substring(t.length,o.length)}return null},e.erase=function(t){e.set(t,"",-1)},e}();function v(e){var t=e.name,n=e.value,r=e.expires,o=e.domain;document.cookie=t+"="+n+r+"; path=/; domain="+o+"; SameSite=Lax"}function m(){return p()?localStorage:l()?new y:function(){try{return"undefined"!=typeof sessionStorage}catch(e){return!1}}()?sessionStorage:new k}var y=function(){function e(){}return e.prototype.getItem=function(t){return g.get(""+e.prefix+t)},e.prototype.removeItem=function(t){g.erase(""+e.prefix+t)},e.prototype.setItem=function(t,n){g.set(""+e.prefix+t,n)},e.prefix="coveo_",e}(),S=function(){function e(){this.cookieStorage=new y}return e.prototype.getItem=function(e){return localStorage.getItem(e)||this.cookieStorage.getItem(e)},e.prototype.removeItem=function(e){this.cookieStorage.removeItem(e),localStorage.removeItem(e)},e.prototype.setItem=function(e,t){localStorage.setItem(e,t),this.cookieStorage.setItem(e,t)},e}(),k=function(){function e(){}return e.prototype.getItem=function(e){return null},e.prototype.removeItem=function(e){},e.prototype.setItem=function(e,t){},e}(),E=Object.freeze({__proto__:null,preferredStorage:null,getAvailableStorage:m,CookieStorage:y,CookieAndLocalStorage:S,NullStorage:k}),C="__coveo.analytics.history",w=function(){function e(e){this.store=e||m()}return e.prototype.addElement=function(e){e.internalTime=(new Date).getTime(),e=this.cropQueryElement(this.stripEmptyQuery(e));var t=this.getHistoryWithInternalTime();null!=t?this.isValidEntry(e)&&this.setHistory([e].concat(t)):this.setHistory([e])},e.prototype.addElementAsync=function(e){return i(this,void 0,void 0,(function(){var t;return s(this,(function(n){switch(n.label){case 0:return e.internalTime=(new Date).getTime(),e=this.cropQueryElement(this.stripEmptyQuery(e)),[4,this.getHistoryWithInternalTimeAsync()];case 1:return null!=(t=n.sent())?this.isValidEntry(e)&&this.setHistory([e].concat(t)):this.setHistory([e]),[2]}}))}))},e.prototype.getHistory=function(){var e=this.getHistoryWithInternalTime();return this.stripEmptyQueries(this.stripInternalTime(e))},e.prototype.getHistoryAsync=function(){return i(this,void 0,void 0,(function(){var e;return s(this,(function(t){switch(t.label){case 0:return[4,this.getHistoryWithInternalTimeAsync()];case 1:return e=t.sent(),[2,this.stripEmptyQueries(this.stripInternalTime(e))]}}))}))},e.prototype.getHistoryWithInternalTime=function(){try{var e=this.store.getItem(C);return e&&"string"==typeof e?JSON.parse(e):[]}catch(e){return[]}},e.prototype.getHistoryWithInternalTimeAsync=function(){return i(this,void 0,void 0,(function(){var e;return s(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,this.store.getItem(C)];case 1:return(e=t.sent())?[2,JSON.parse(e)]:[2,[]];case 2:return t.sent(),[2,[]];case 3:return[2]}}))}))},e.prototype.setHistory=function(e){try{this.store.setItem(C,JSON.stringify(e.slice(0,20)))}catch(e){}},e.prototype.clear=function(){try{this.store.removeItem(C)}catch(e){}},e.prototype.getMostRecentElement=function(){var e=this.getHistoryWithInternalTime();return null!=e?e.sort((function(e,t){return(t.internalTime||0)-(e.internalTime||0)}))[0]:null},e.prototype.cropQueryElement=function(e){return e.name&&e.value&&"query"===e.name.toLowerCase()&&(e.value=e.value.slice(0,75)),e},e.prototype.isValidEntry=function(e){var t=this.getMostRecentElement();return!t||t.value!=e.value||(e.internalTime||0)-(t.internalTime||0)>6e4},e.prototype.stripInternalTime=function(e){return e.map((function(e){return{name:e.name,time:e.time,value:e.value}}))},e.prototype.stripEmptyQuery=function(e){var t=e.name,n=e.time,r=e.value;return t&&"string"==typeof r&&"query"===t.toLowerCase()&&""===r.trim()?{name:t,time:n}:e},e.prototype.stripEmptyQueries=function(e){var t=this;return e.map((function(e){return t.stripEmptyQuery(e)}))},e}(),b=Object.freeze({__proto__:null,STORE_KEY:C,MAX_NUMBER_OF_HISTORY_ELEMENTS:20,MIN_THRESHOLD_FOR_DUPLICATE_VALUE:6e4,MAX_VALUE_SIZE:75,HistoryStore:w,default:w}),I=function(e,t){return i(void 0,void 0,void 0,(function(){return s(this,(function(o){switch(o.label){case 0:return e!==n.view?[3,2]:[4,R(t.contentIdValue)];case 1:return o.sent(),[2,r({location:window.location.toString(),referrer:document.referrer,title:document.title},t)];case 2:return[2,t]}}))}))},R=function(e){return i(void 0,void 0,void 0,(function(){var t,n;return s(this,(function(r){switch(r.label){case 0:return t=new w,n={name:"PageView",value:e,time:JSON.stringify(new Date)},[4,t.addElementAsync(n)];case 1:return r.sent(),[2]}}))}))},P=function(e){return e?(Number(e)^x(new Uint8Array(1))[0]%16>>Number(e)/4).toString(16):"10000000-1000-4000-8000-100000000000".replace(/[018]/g,P)},x=function(e){if(d())return crypto.getRandomValues(e);for(var t=0,n=0;t<e.length;t++)0==(3&t)&&(n=4294967296*Math.random()),e[t]=n>>>((3&t)<<3)&255;return e},F=Object.keys,A={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"},T=a(F(A).map((function(e){return A[e]}))).join("|"),L=new RegExp("^("+T+"$)"),O=[function(e){return L.test(e)}],D={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",price:"pr",quantity:"qt",coupon:"cc",position:"ps",group:"group"},V={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",position:"ps",price:"pr",group:"group"},M={action:"pa",list:"pal",listSource:"pls"},q={id:"ti",revenue:"tr",tax:"tt",shipping:"ts",coupon:"tcc",affiliation:"ta",step:"cos",option:"col"},_={id:"quoteId",affiliation:"quoteAffiliation"},N={id:"reviewId",rating:"reviewRating",comment:"reviewComment"},Q={add:M,bookmark_add:M,bookmark_remove:M,click:M,checkout:M,checkout_option:M,detail:M,impression:M,remove:M,refund:r(r({},M),q),purchase:r(r({},M),q),quickview:M,quote:r(r({},M),_),review:r(r({},M),N)},B=function(e,t,n,o){return F(e).reduce((function(i,s){var a,u="il"+(t+1)+o+(n+1)+(V[s]||s);return r(r({},i),((a={})[u]=e[s],a))}),{})},U=F(D).map((function(e){return D[e]})),H=F(V).map((function(e){return V[e]})),j=F(M).map((function(e){return M[e]})),Y=F(q).map((function(e){return q[e]})),z=F(N).map((function(e){return N[e]})),K=F(_).map((function(e){return _[e]})),W=a(U,["custom"]).join("|"),$=a(H,["custom"]).join("|"),G=new RegExp("^(pr[0-9]+)("+W+")$"),J=new RegExp("^((il[0-9]+pi[0-9]+)("+$+"))|(il[0-9]+nm)$"),X=new RegExp("^("+j.join("|")+")$"),Z=new RegExp("^("+Y.join("|")+")$"),ee=new RegExp("^(pr[0-9]+)custom$"),te=new RegExp("^(il[0-9]+pi[0-9]+)custom$"),ne=new RegExp("^("+a(["loyaltyCardId","loyaltyTier","thirdPartyPersona","companyName","favoriteStore","storeName","userIndustry","userRole","userDepartment","businessUnit"],z,K).join("|")+")$"),re=[function(e){return J.test(e)},function(e){return G.test(e)},function(e){return X.test(e)},function(e){return Z.test(e)},function(e){return ne.test(e)}],oe=[ee,te],ie=r(r(r(r({},{anonymizeIp:"aip"}),{eventCategory:"ec",eventAction:"ea",eventLabel:"el",eventValue:"ev",page:"dp",visitorId:"cid",clientId:"cid",userId:"uid",currencyCode:"cu"}),{hitType:"t",pageViewId:"pid",encoding:"de",location:"dl",referrer:"dr",screenColor:"sd",screenResolution:"sr",title:"dt",userAgent:"ua",language:"ul",eventId:"z",time:"tm"}),["contentId","contentIdKey","contentType","searchHub","tab","searchUid","permanentId","contentLocale"].reduce((function(e,t){var n;return r(r({},e),((n={})[t]=t,n))}),{})),se=r(r({},ie),{svcAction:"svc_action",svcActionData:"svc_action_data"}),ae=F(se).map((function(e){return se[e]})),ue=function(e){return-1!==ae.indexOf(e)},ce=function(e){return"custom"===e},pe=function(e){var t=void 0;return a(oe).every((function(n){var r;return t=null===(r=n.exec(e))||void 0===r?void 0:r[1],!Boolean(t)})),t},le=function(e,t){return F(t).reduce((function(n,o){var i;return r(r({},n),((i={})[""+e+o]=t[o],i))}),{})},de=function(){function e(e){this.opts=e}return e.prototype.sendEvent=function(e,t){return i(this,void 0,void 0,(function(){var n,o,i,a,u,c,p,l,d,h,f;return s(this,(function(s){switch(s.label){case 0:if(!navigator.sendBeacon)throw new Error('navigator.sendBeacon is not supported in this browser. Consider adding a polyfill like "sendbeacon-polyfill".');return n=this.opts,o=n.baseUrl,i=n.preprocessRequest,a=this.encodeForEventType(e,t),[4,this.getQueryParamsForEventType(e)];case 1:return u=s.sent(),c={url:o+"/analytics/"+e+"?"+u,body:new Blob([a],{type:"application/x-www-form-urlencoded"})},h=[r({},c)],i?[4,i(c,"analyticsBeacon")]:[3,3];case 2:return f=s.sent(),[3,4];case 3:f={},s.label=4;case 4:return p=r.apply(void 0,h.concat([f])),l=p.url,d=p.body,console.log('Sending beacon for "'+e+'" with: ',JSON.stringify(t)),navigator.sendBeacon(l,d),[2]}}))}))},e.prototype.deleteHttpCookieVisitorId=function(){return Promise.resolve()},e.prototype.encodeForEventType=function(e,t){return this.isEventTypeLegacy(e)?this.encodeForLegacyType(e,t):this.encodeForFormUrlEncoded(r({access_token:this.opts.token},t))},e.prototype.getQueryParamsForEventType=function(e){return i(this,void 0,void 0,(function(){var t,n,r;return s(this,(function(o){switch(o.label){case 0:return t=this.opts,n=t.token,[4,t.visitorIdProvider.getCurrentVisitorId()];case 1:return r=o.sent(),[2,[n&&this.isEventTypeLegacy(e)?"access_token="+n:"",r?"visitorId="+r:"","discardVisitInfo=true"].filter((function(e){return!!e})).join("&")]}}))}))},e.prototype.isEventTypeLegacy=function(e){return-1!==[n.click,n.custom,n.search,n.view].indexOf(e)},e.prototype.encodeForLegacyType=function(e,t){return e+"Event="+encodeURIComponent(JSON.stringify(t))},e.prototype.encodeForFormUrlEncoded=function(e){var t=this;return Object.keys(e).filter((function(t){return!!e[t]})).map((function(n){return encodeURIComponent(n)+"="+encodeURIComponent(t.encodeValue(e[n]))})).join("&")},e.prototype.encodeValue=function(e){return"number"==typeof e||"string"==typeof e||"boolean"==typeof e?e:JSON.stringify(e)},e}(),he=function(){function e(){}return e.prototype.sendEvent=function(e,t){return i(this,void 0,void 0,(function(){return s(this,(function(e){return[2,Promise.resolve()]}))}))},e.prototype.deleteHttpCookieVisitorId=function(){return i(this,void 0,void 0,(function(){return s(this,(function(e){return[2,Promise.resolve()]}))}))},e}(),fe=window.fetch,ge=function(){function e(e){this.opts=e}return e.prototype.sendEvent=function(e,t){return i(this,void 0,void 0,(function(){var n,i,a,u,c,p,l,d,h,f,g,v,m;return s(this,(function(s){switch(s.label){case 0:return n=this.opts,i=n.baseUrl,a=n.visitorIdProvider,u=n.preprocessRequest,this.shouldAppendVisitorId(e)?[4,this.getVisitorIdParam()]:[3,2];case 1:return c=s.sent(),[3,3];case 2:c="",s.label=3;case 3:return p={url:i+"/analytics/"+e+c,credentials:"include",mode:"cors",headers:this.getHeaders(),method:"POST",body:JSON.stringify(t)},f=[r({},p)],u?[4,u(p,"analyticsFetch")]:[3,5];case 4:return g=s.sent(),[3,6];case 5:g={},s.label=6;case 6:return l=r.apply(void 0,f.concat([g])),d=l.url,h=o(l,["url"]),[4,fe(d,h)];case 7:return(v=s.sent()).ok?[4,v.json()]:[3,9];case 8:return(m=s.sent()).visitorId&&a.setCurrentVisitorId(m.visitorId),[2,m];case 9:try{v.json()}catch(e){}throw console.error('An error has occured when sending the "'+e+'" event.',v,t),new Error('An error has occurred when sending the "'+e+'" event. Check the console logs for more details.')}}))}))},e.prototype.deleteHttpCookieVisitorId=function(){return i(this,void 0,void 0,(function(){var e;return s(this,(function(t){switch(t.label){case 0:return e=this.opts.baseUrl,[4,fe(e+"/analytics/visit",{headers:this.getHeaders(),method:"DELETE"})];case 1:return t.sent(),[2]}}))}))},e.prototype.shouldAppendVisitorId=function(e){return-1!==[n.click,n.custom,n.search,n.view].indexOf(e)},e.prototype.getVisitorIdParam=function(){return i(this,void 0,void 0,(function(){var e;return s(this,(function(t){switch(t.label){case 0:return[4,this.opts.visitorIdProvider.getCurrentVisitorId()];case 1:return[2,(e=t.sent())?"?visitor="+e:""]}}))}))},e.prototype.getHeaders=function(){var e=this.opts.token;return r(r({},e?{Authorization:"Bearer "+e}:{}),{"Content-Type":"application/json"})},e}(),ve=function(e,t){var n=this;p()&&l()?this.storage=new S:p()?this.storage=localStorage:(console.warn("BrowserRuntime detected no valid storage available.",this),this.storage=new k),this.client=new ge(e),this.beaconClient=new de(e),window.addEventListener("beforeunload",(function(){for(var e=0,r=t();e<r.length;e++){var o=r[e],i=o.eventType,s=o.payload;n.beaconClient.sendEvent(i,s)}}))},me=function(e,t){this.storage=t||new k,this.client=new ge(e)},ye=function(){this.storage=new k,this.client=new he};var Se=["1",1,"yes",!0];function ke(){return u()&&[navigator.globalPrivacyControl,navigator.doNotTrack,navigator.msDoNotTrack,window.doNotTrack].some((function(e){return-1!==Se.indexOf(e)}))}var Ee=Object.freeze({__proto__:null,doNotTrack:ke,default:ke}),Ce="v15",we={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 be(e,t){void 0===e&&(e=we.default),void 0===t&&(t=Ce);var n=-1!==e.indexOf(".cloud.coveo.com");return e+(n?"":"/rest")+"/"+t}var Ie,Re,Pe,xe=function(){function e(e){if(!e)throw new Error("You have to pass options to this constructor");this.options=r(r({},this.defaultOptions),e),this.visitorId="",this.bufferedRequests=[],this.beforeSendHooks=[I,f].concat(this.options.beforeSendHooks),this.afterSendHooks=this.options.afterSendHooks,this.eventTypeMapping={};var t={baseUrl:this.baseUrl,token:this.options.token,visitorIdProvider:this,preprocessRequest:this.options.preprocessRequest};this.runtime=this.options.runtimeEnvironment||this.initRuntime(t),ke()&&(this.clear(),this.runtime.storage=new k)}return Object.defineProperty(e.prototype,"defaultOptions",{get:function(){return{endpoint:we.default,token:"",version:Ce,beforeSendHooks:[],afterSendHooks:[]}},enumerable:!1,configurable:!0}),e.prototype.initRuntime=function(e){var t=this;return"undefined"!=typeof window&&c()?new ve(e,(function(){var e=a(t.bufferedRequests);return t.bufferedRequests=[],e})):("undefined"!=typeof navigator&&"ReactNative"==navigator.product&&console.warn("\n We've detected you're using React Native but have not provided the corresponding runtime, \n for an optimal experience please use the \"coveo.analytics/react-native\" subpackage.\n Follow the Readme on how to set it up: https://github.com/coveo/coveo.analytics.js#using-react-native\n "),new me(e))},Object.defineProperty(e.prototype,"storage",{get:function(){return this.runtime.storage},enumerable:!1,configurable:!0}),e.prototype.determineVisitorId=function(){return i(this,void 0,void 0,(function(){var e;return s(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,this.storage.getItem("visitorId")];case 1:return[2,t.sent()||P()];case 2:return e=t.sent(),console.log("Could not get visitor ID from the current runtime environment storage. Using a random ID instead.",e),[2,P()];case 3:return[2]}}))}))},e.prototype.getCurrentVisitorId=function(){return i(this,void 0,void 0,(function(){var e;return s(this,(function(t){switch(t.label){case 0:return this.visitorId?[3,3]:[4,this.determineVisitorId()];case 1:return e=t.sent(),[4,this.setCurrentVisitorId(e)];case 2:t.sent(),t.label=3;case 3:return[2,this.visitorId]}}))}))},e.prototype.setCurrentVisitorId=function(e){return i(this,void 0,void 0,(function(){return s(this,(function(t){switch(t.label){case 0:return this.visitorId=e,[4,this.storage.setItem("visitorId",e)];case 1:return t.sent(),[2]}}))}))},e.prototype.getParameters=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return i(this,void 0,void 0,(function(){return s(this,(function(n){switch(n.label){case 0:return[4,this.resolveParameters.apply(this,a([e],t))];case 1:return[2,n.sent()]}}))}))},e.prototype.getPayload=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return i(this,void 0,void 0,(function(){var n;return s(this,(function(r){switch(r.label){case 0:return[4,this.resolveParameters.apply(this,a([e],t))];case 1:return n=r.sent(),[4,this.resolvePayloadForParameters(e,n)];case 2:return[2,r.sent()]}}))}))},Object.defineProperty(e.prototype,"currentVisitorId",{get:function(){return"string"!=typeof(this.visitorId||this.storage.getItem("visitorId"))&&this.setCurrentVisitorId(P()),this.visitorId},set:function(e){this.visitorId=e,this.storage.setItem("visitorId",e)},enumerable:!1,configurable:!0}),e.prototype.resolveParameters=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return i(this,void 0,void 0,(function(){var n,o,a,u,c,p,l,d,h,f,g,v,m=this;return s(this,(function(y){switch(y.label){case 0:return n=this.eventTypeMapping[e]||{},o=n.variableLengthArgumentsNames,a=void 0===o?[]:o,u=n.addVisitorIdParameter,c=void 0!==u&&u,p=n.usesMeasurementProtocol,l=void 0!==p&&p,d=n.addClientIdParameter,h=void 0!==d&&d,f=function(e){return i(m,void 0,void 0,(function(){var t,n,o;return s(this,(function(i){switch(i.label){case 0:return t=[r({},e)],n={},c?[4,this.getCurrentVisitorId()]:[3,2];case 1:return o=i.sent(),[3,3];case 2:o="",i.label=3;case 3:return[2,r.apply(void 0,t.concat([(n.visitorId=o,n)]))]}}))}))},g=function(e){return i(m,void 0,void 0,(function(){var t,n;return s(this,(function(o){switch(o.label){case 0:return h?(t=[r({},e)],n={},[4,this.getCurrentVisitorId()]):[3,2];case 1:return[2,r.apply(void 0,t.concat([(n.clientId=o.sent(),n)]))];case 2:return[2,e]}}))}))},v=function(t){return m.beforeSendHooks.reduce((function(t,n){return i(m,void 0,void 0,(function(){var r;return s(this,(function(o){switch(o.label){case 0:return[4,t];case 1:return r=o.sent(),[4,n(e,r)];case 2:return[2,o.sent()]}}))}))}),t)},[4,[function(e){return a.length>0?m.parseVariableArgumentsPayload(a,e):e[0]},f,g,function(e){return l?m.ensureAnonymousUserWhenUsingApiKey(e):e},v].reduce((function(e,t){return i(m,void 0,void 0,(function(){var n;return s(this,(function(r){switch(r.label){case 0:return[4,e];case 1:return n=r.sent(),[4,t(n)];case 2:return[2,r.sent()]}}))}))}),Promise.resolve(t))];case 1:return[2,y.sent()]}}))}))},e.prototype.resolvePayloadForParameters=function(e,t){return i(this,void 0,void 0,(function(){var n,o,a,u=this;return s(this,(function(c){switch(c.label){case 0:return n=(this.eventTypeMapping[e]||{}).usesMeasurementProtocol,o=void 0!==n&&n,a=function(e){return o?(n=!!(t=e).action&&Q[t.action]||{},F(t).reduce((function(e,o){var i,s=n[o]||se[o]||o;return r(r({},e),((i={})[s]=t[o],i))}),{})):e;var t,n},[4,[function(t){return u.removeEmptyPayloadValues(t,e)},function(e){return u.validateParams(e)},a,function(e){return o?u.removeUnknownParameters(e):e},function(e){return o?u.processCustomParameters(e):e}].reduce((function(e,t){return i(u,void 0,void 0,(function(){var n;return s(this,(function(r){switch(r.label){case 0:return[4,e];case 1:return n=r.sent(),[4,t(n)];case 2:return[2,r.sent()]}}))}))}),Promise.resolve(t))];case 1:return[2,c.sent()]}}))}))},e.prototype.sendEvent=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return i(this,void 0,void 0,(function(){var n,r,o,i;return s(this,(function(s){switch(s.label){case 0:return n=(this.eventTypeMapping[e]||{}).newEventType,r=void 0===n?e:n,[4,this.resolveParameters.apply(this,a([e],t))];case 1:return o=s.sent(),[4,this.resolvePayloadForParameters(e,o)];case 2:return i=s.sent(),this.bufferedRequests.push({eventType:r,payload:i}),[4,Promise.all(this.afterSendHooks.map((function(t){return t(e,o)})))];case 3:return s.sent(),[4,this.deferExecution()];case 4:return s.sent(),[4,this.sendFromBufferWithFetch()];case 5:return[2,s.sent()]}}))}))},e.prototype.deferExecution=function(){return new Promise((function(e){return setTimeout(e,0)}))},e.prototype.sendFromBufferWithFetch=function(){return i(this,void 0,void 0,(function(){var e,t,n;return s(this,(function(r){return(e=this.bufferedRequests.shift())?(t=e.eventType,n=e.payload,[2,this.runtime.client.sendEvent(t,n)]):[2]}))}))},e.prototype.clear=function(){this.storage.removeItem("visitorId"),(new w).clear()},e.prototype.deleteHttpOnlyVisitorId=function(){this.runtime.client.deleteHttpCookieVisitorId()},e.prototype.sendSearchEvent=function(e){return i(this,void 0,void 0,(function(){return s(this,(function(t){return[2,this.sendEvent(n.search,e)]}))}))},e.prototype.sendClickEvent=function(e){return i(this,void 0,void 0,(function(){return s(this,(function(t){return[2,this.sendEvent(n.click,e)]}))}))},e.prototype.sendCustomEvent=function(e){return i(this,void 0,void 0,(function(){return s(this,(function(t){return[2,this.sendEvent(n.custom,e)]}))}))},e.prototype.sendViewEvent=function(e){return i(this,void 0,void 0,(function(){return s(this,(function(t){return[2,this.sendEvent(n.view,e)]}))}))},e.prototype.getVisit=function(){return i(this,void 0,void 0,(function(){var e;return s(this,(function(t){switch(t.label){case 0:return[4,fetch(this.baseUrl+"/analytics/visit")];case 1:return[4,t.sent().json()];case 2:return e=t.sent(),this.visitorId=e.visitorId,[2,e]}}))}))},e.prototype.getHealth=function(){return i(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,fetch(this.baseUrl+"/analytics/monitoring/health")];case 1:return[4,e.sent().json()];case 2:return[2,e.sent()]}}))}))},e.prototype.registerBeforeSendEventHook=function(e){this.beforeSendHooks.push(e)},e.prototype.registerAfterSendEventHook=function(e){this.afterSendHooks.push(e)},e.prototype.addEventTypeMapping=function(e,t){this.eventTypeMapping[e]=t},e.prototype.parseVariableArgumentsPayload=function(e,t){for(var n={},o=0,i=t.length;o<i;o++){var s=t[o];if("string"==typeof s)n[e[o]]=s;else if("object"==typeof s)return r(r({},n),s)}return n},e.prototype.isKeyAllowedEmpty=function(e,t){var r;return-1!==(((r={})[n.search]=["queryText"],r)[e]||[]).indexOf(t)},e.prototype.removeEmptyPayloadValues=function(e,t){var n=this;return Object.keys(e).filter((function(r){return n.isKeyAllowedEmpty(t,r)||null!=(o=e[r])&&""!==o;var o})).reduce((function(t,n){var o;return r(r({},t),((o={})[n]=e[n],o))}),{})},e.prototype.removeUnknownParameters=function(e){var t=Object.keys(e).filter((function(e){if(function(e){return a(re,O,[ue,ce]).some((function(t){return t(e)}))}(e))return!0;console.log(e,"is not processed by coveoua")})).reduce((function(t,n){var o;return r(r({},t),((o={})[n]=e[n],o))}),{});return t},e.prototype.processCustomParameters=function(e){var t,n=e.custom,i=o(e,["custom"]),s=this.lowercaseKeys(n),a=F(t=i).reduce((function(e,n){var o,i=pe(n);return r(r({},e),i?le(i,t[n]):((o={})[n]=t[n],o))}),{});return r(r({},s),a)},e.prototype.lowercaseKeys=function(e){return Object.keys(e||{}).reduce((function(t,n){var o;return r(r({},t),((o={})[n.toLowerCase()]=e[n],o))}),{})},e.prototype.validateParams=function(e){var t=e.anonymizeIp,n=o(e,["anonymizeIp"]);return void 0!==t&&-1==["0","false","undefined","null","{}","[]",""].indexOf((""+t).toLowerCase())&&(n.anonymizeIp=1),n},e.prototype.ensureAnonymousUserWhenUsingApiKey=function(e){var t,n=e.userId,r=o(e,["userId"]);return(null==(t=this.options.token)?void 0:t.startsWith("xx"))&&!n?(r.userId="anonymous",r):e},Object.defineProperty(e.prototype,"baseUrl",{get:function(){return be(this.options.endpoint,this.options.version)},enumerable:!1,configurable:!0}),e}(),Fe=Object.freeze({__proto__:null,Version:Ce,Endpoints:we,buildBaseUrl:be,CoveoAnalyticsClient:xe,default:xe}),Ae=function(e){return e.protocol+"//"+e.hostname+(0===e.pathname.indexOf("/")?e.pathname:"/"+e.pathname)+e.search},Te={pageview:"pageview",event:"event"},Le=function(){function e(e){var t=e.client,n=e.uuidGenerator,r=void 0===n?P:n;this.actionData={},this.client=t,this.uuidGenerator=r,this.pageViewId=r(),this.nextPageViewId=this.pageViewId,this.currentLocation=Ae(window.location),this.lastReferrer=document.referrer,this.addHooks()}return e.prototype.setAction=function(e,t){this.action=e,this.actionData=t},e.prototype.clearData=function(){this.clearPluginData(),this.action=void 0,this.actionData={}},e.prototype.getLocationInformation=function(e,t){return r({hitType:e},this.getNextValues(e,t))},e.prototype.updateLocationInformation=function(e,t){this.updateLocationForNextPageView(e,t)},e.prototype.getDefaultContextInformation=function(e){var t={title:document.title,encoding:document.characterSet},n={screenResolution:screen.width+"x"+screen.height,screenColor:screen.colorDepth+"-bit"},o={language:navigator.language,userAgent:navigator.userAgent},i={time:Date.now().toString(),eventId:this.uuidGenerator()};return r(r(r(r({},i),n),o),t)},e.prototype.updateLocationForNextPageView=function(e,t){var n=this.getNextValues(e,t),r=n.pageViewId,o=n.referrer,i=n.location;this.lastReferrer=o,this.pageViewId=r,this.currentLocation=i,e===Te.pageview&&(this.nextPageViewId=this.uuidGenerator(),this.hasSentFirstPageView=!0)},e.prototype.getNextValues=function(e,t){return{pageViewId:e===Te.pageview?this.nextPageViewId:this.pageViewId,referrer:e===Te.pageview&&this.hasSentFirstPageView?this.currentLocation:this.lastReferrer,location:e===Te.pageview?this.getCurrentLocationFromPayload(t):this.currentLocation}},e.prototype.getCurrentLocationFromPayload=function(e){if(e.page){return""+this.currentLocation.split("/").slice(0,3).join("/")+e.page.replace(/^\/?(.*)$/,"/$1")}return Ae(window.location)},e}(),Oe=r({},Te),De=Object.keys(Oe).map((function(e){return Oe[e]})),Ve=function(e){function i(t){var n=t.client,r=t.uuidGenerator,o=void 0===r?P:r,i=e.call(this,{client:n,uuidGenerator:o})||this;return i.products=[],i.impressions=[],i}return t(i,e),i.prototype.addHooks=function(){this.addHooksForPageView(),this.addHooksForEvent(),this.addHooksForECEvents()},i.prototype.addProduct=function(e){this.products.push(e)},i.prototype.addImpression=function(e){this.impressions.push(e)},i.prototype.clearPluginData=function(){this.products=[],this.impressions=[]},i.prototype.addHooksForECEvents=function(){var e=this;this.client.registerBeforeSendEventHook((function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var o=n[0];return-1!==De.indexOf(t)?e.addECDataToPayload(t,o):o})),this.client.registerAfterSendEventHook((function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var o=n[0];return-1!==De.indexOf(t)&&e.updateLocationInformation(t,o),o}))},i.prototype.addHooksForPageView=function(){this.client.addEventTypeMapping(Oe.pageview,{newEventType:n.collect,variableLengthArgumentsNames:["page"],addVisitorIdParameter:!0,usesMeasurementProtocol:!0})},i.prototype.addHooksForEvent=function(){this.client.addEventTypeMapping(Oe.event,{newEventType:n.collect,variableLengthArgumentsNames:["eventCategory","eventAction","eventLabel","eventValue"],addVisitorIdParameter:!0,usesMeasurementProtocol:!0})},i.prototype.addECDataToPayload=function(e,t){var n=r(r(r(r({},this.getLocationInformation(e,t)),this.getDefaultContextInformation(e)),this.action?{action:this.action}:{}),this.actionData||{}),o=this.getProductPayload(),i=this.getImpressionPayload();return this.clearData(),r(r(r(r({},i),o),n),t)},i.prototype.getProductPayload=function(){var e=this;return this.products.map((function(t){return e.assureProductValidity(t)})).reduce((function(e,t,n){return r(r({},e),function(e,t){return F(e).reduce((function(n,o){var i,s="pr"+(t+1)+(D[o]||o);return r(r({},n),((i={})[s]=e[o],i))}),{})}(t,n))}),{})},i.prototype.getImpressionPayload=function(){var e=this;return this.getImpressionsByList().map((function(t){var n=t.impressions,i=o(t,["impressions"]);return r(r({},i),{impressions:n.map((function(t){return e.assureBaseImpressionValidity(t)}))})})).reduce((function(e,t,n){return r(r({},e),function(e,t,n){var o=e.impressions.reduce((function(e,o,i){return r(r({},e),B(o,t,i,n))}),{});return e.listName&&(o["il"+(t+1)+"nm"]=e.listName),o}(t,n,"pi"))}),{})},i.prototype.assureProductValidity=function(e){var t=e.position,n=o(e,["position"]);return void 0!==t&&t<1?(console.warn("The position for product '"+(e.name||e.id)+"' must be greater than 0 when provided."),n):e},i.prototype.assureBaseImpressionValidity=function(e){var t=e.position,n=o(e,["position"]);return void 0!==t&&t<1?(console.warn("The position for impression '"+(e.name||e.id)+"' must be greater than 0 when provided."),n):e},i.prototype.getImpressionsByList=function(){return this.impressions.reduce((function(e,t){var n=t.list,r=o(t,["list"]),i=e.find((function(e){return e.listName===n}));return i?i.impressions.push(r):e.push({listName:n,impressions:[r]}),e}),[])},i.Id="ec",i}(Le),Me=Ve,qe=r({},Te),_e=Object.keys(qe).map((function(e){return qe[e]})),Ne=function(e){function o(t){var n=t.client,r=t.uuidGenerator,o=void 0===r?P:r,i=e.call(this,{client:n,uuidGenerator:o})||this;return i.ticket={},i}return t(o,e),o.prototype.addHooks=function(){this.addHooksForEvent(),this.addHooksForPageView(),this.addHooksForSVCEvents()},o.prototype.setTicket=function(e){this.ticket=e},o.prototype.clearPluginData=function(){this.ticket={}},o.prototype.addHooksForSVCEvents=function(){var e=this;this.client.registerBeforeSendEventHook((function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var o=n[0];return-1!==_e.indexOf(t)?e.addSVCDataToPayload(t,o):o})),this.client.registerAfterSendEventHook((function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var o=n[0];return-1!==_e.indexOf(t)&&e.updateLocationInformation(t,o),o}))},o.prototype.addHooksForPageView=function(){this.client.addEventTypeMapping(qe.pageview,{newEventType:n.collect,variableLengthArgumentsNames:["page"],addVisitorIdParameter:!0,usesMeasurementProtocol:!0})},o.prototype.addHooksForEvent=function(){this.client.addEventTypeMapping(qe.event,{newEventType:n.collect,variableLengthArgumentsNames:["eventCategory","eventAction","eventLabel","eventValue"],addVisitorIdParameter:!0,usesMeasurementProtocol:!0})},o.prototype.addSVCDataToPayload=function(e,t){var n,o=r(r(r(r({},this.getLocationInformation(e,t)),this.getDefaultContextInformation(e)),this.action?{svcAction:this.action}:{}),Object.keys(null!==(n=this.actionData)&&void 0!==n?n:{}).length>0?{svcActionData:this.actionData}:{}),i=this.getTicketPayload();return this.clearData(),r(r(r({},i),o),t)},o.prototype.getTicketPayload=function(){return e=this.ticket,F(e).filter((function(t){return void 0!==e[t]})).reduce((function(t,n){var o,i=A[n]||n;return r(r({},t),((o={})[i]=e[n],o))}),{});var e},o.Id="svc",o}(Le),Qe=Ne,Be=function(){function e(){var e;this.registeredPluginsMap=((e={})[Me.Id]=Me,e[Qe.Id]=Qe,e),this.requiredPlugins={}}return e.prototype.require=function(e,t){var n=this.registeredPluginsMap[e];if(!n)throw new Error('No plugin named "'+e+"\" is currently registered. If you use a custom plugin, use 'provide' first.");this.requiredPlugins[e]=new n(t)},e.prototype.provide=function(e,t){this.registeredPluginsMap[e]=t},e.prototype.clearRequired=function(){this.requiredPlugins={}},e.prototype.execute=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var o=this.requiredPlugins[e];if(!o)throw new Error('The plugin "'+e+'" is not required. Check that you required it on initialization.');var i=o[t];if(!i)throw new Error('The function "'+t+'" does not exists on the plugin "'+e+'".');if("function"!=typeof i)throw new Error('"'+t+'" of the plugin "'+e+'" is not a function.');return i.apply(o,n)},e.DefaultPlugins=[Me.Id,Qe.Id],e}(),Ue=function(){function e(){this.plugins=new Be,this.params={}}return e.prototype.init=function(e,t){var o=this;if(!e)throw new Error("You must pass your token when you call 'init'");if("string"==typeof e?this.client=new xe({token:e,endpoint:this.getEndpoint(t)}):this.isAnalyticsClient(e)&&(this.client=e),!this.client)throw new Error("You must pass either your token or a valid object when you call 'init'");var i={client:this.client};this.plugins.clearRequired(),this.getPluginKeys(t).forEach((function(e){return o.plugins.require(e,i)})),this.client.registerBeforeSendEventHook((function(e,t){return r(r({},t),o.params)})),this.client.addEventTypeMapping(n.view,{newEventType:n.view,addClientIdParameter:!0})},e.prototype.isAnalyticsClient=function(e){return"object"==typeof e&&void 0!==e.sendEvent},e.prototype.getPluginKeys=function(e){return"string"==typeof e?Be.DefaultPlugins:Array.isArray(null==e?void 0:e.plugins)?e.plugins:Be.DefaultPlugins},e.prototype.getEndpoint=function(e){return"string"==typeof e?e||we.default:(null==e?void 0:e.endpoint)?e.endpoint:we.default},e.prototype.initForProxy=function(e){if(!e)throw new Error("You must pass your endpoint when you call 'initForProxy'");if("string"!=typeof e)throw new Error("You must pass a string as the endpoint parameter when you call 'initForProxy'");this.client=new xe({endpoint:e})},e.prototype.set=function(e,t){var n=this;"string"==typeof e?this.params[e]=t:Object.keys(e).map((function(t){n.params[t]=e[t]}))},e.prototype.send=function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=t[0],o=t.slice(1);if(void 0===this.client)throw new Error("You must call init before sending an event");if(!r)throw new Error('You must provide an event type when calling "send".');return(e=this.client).sendEvent.apply(e,a([r.toLowerCase()],o))},e.prototype.onLoad=function(e){if(void 0===e)throw new Error("You must pass a function when you call 'onLoad'");e()},e.prototype.provide=function(e,t){this.plugins.provide(e,t)},e.prototype.require=function(e,t){if(!this.client)throw new Error("You must call init before requiring a plugin");this.plugins.require(e,r(r({},t),{client:this.client}))},e.prototype.callPlugin=function(e,t){for(var n,r=[],o=2;o<arguments.length;o++)r[o-2]=arguments[o];(n=this.plugins).execute.apply(n,a([e,t],r))},e.prototype.reset=function(){this.client=void 0,this.plugins=new Be,this.params={}},e}(),He=new Ue,je=function(){return He.client},Ye=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=/^(?:(\w+)\.)?(?:(\w+):)?(\w+)$/.exec(e);r[1];var o=r[2],i=r[3],s=He[i];if(o&&i)return He.callPlugin.apply(He,a([o,i],t));if(s)return s.apply(He,t);var u=["init","set","send","onLoad","callPlugin","reset","require","provide"];throw new Error('The action "'+e+'" does not exist. Available actions: '+u.join(", ")+".")},ze=Object.freeze({__proto__:null,CoveoUA:Ue,coveoua:He,getCurrentClient:je,handleOneAnalyticsEvent:Ye,default:Ye});!function(e){e.contextChanged="contextChanged",e.expandToFullUI="expandToFullUI"}(Ie||(Ie={})),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"}(Pe||(Pe={}));var Ke=((Re={})[Pe.triggerNotify]="queryPipelineTriggers",Re[Pe.triggerExecute]="queryPipelineTriggers",Re[Pe.triggerQuery]="queryPipelineTriggers",Re[Pe.triggerRedirect]="queryPipelineTriggers",Re[Pe.queryError]="errors",Re[Pe.queryErrorBack]="errors",Re[Pe.queryErrorClear]="errors",Re[Pe.queryErrorRetry]="errors",Re[Pe.pagerNext]="getMoreResults",Re[Pe.pagerPrevious]="getMoreResults",Re[Pe.pagerNumber]="getMoreResults",Re[Pe.pagerResize]="getMoreResults",Re[Pe.pagerScrolling]="getMoreResults",Re[Pe.facetSearch]="facet",Re[Pe.facetShowLess]="facet",Re[Pe.facetShowMore]="facet",Re[Pe.recommendation]="recommendation",Re[Pe.likeSmartSnippet]="smartSnippet",Re[Pe.dislikeSmartSnippet]="smartSnippet",Re[Pe.expandSmartSnippet]="smartSnippet",Re[Pe.collapseSmartSnippet]="smartSnippet",Re[Pe.openSmartSnippetFeedbackModal]="smartSnippet",Re[Pe.closeSmartSnippetFeedbackModal]="smartSnippet",Re[Pe.sendSmartSnippetReason]="smartSnippet",Re[Pe.expandSmartSnippetSuggestion]="smartSnippetSuggestions",Re[Pe.collapseSmartSnippetSuggestion]="smartSnippetSuggestions",Re[Pe.showMoreSmartSnippetSuggestion]="smartSnippetSuggestions",Re[Pe.showLessSmartSnippetSuggestion]="smartSnippetSuggestions",Re[Pe.clearRecentQueries]="recentQueries",Re[Pe.recentResultClick]="recentlyClickedDocuments",Re[Pe.clearRecentResults]="recentlyClickedDocuments",Re[Pe.showLessFoldedResults]="folding",Re[Ie.expandToFullUI]="interface",Re),We=function(){function e(){this.runtime=new ye,this.currentVisitorId=""}return e.prototype.getPayload=function(){return Promise.resolve()},e.prototype.getParameters=function(){return Promise.resolve()},e.prototype.sendEvent=function(){return Promise.resolve()},e.prototype.sendSearchEvent=function(){return Promise.resolve()},e.prototype.sendClickEvent=function(){return Promise.resolve()},e.prototype.sendCustomEvent=function(){return Promise.resolve()},e.prototype.sendViewEvent=function(){return Promise.resolve()},e.prototype.getVisit=function(){return Promise.resolve({id:"",visitorId:""})},e.prototype.getHealth=function(){return Promise.resolve({status:""})},e.prototype.registerBeforeSendEventHook=function(){},e.prototype.registerAfterSendEventHook=function(){},e.prototype.addEventTypeMapping=function(){},e}();function $e(e){var t=e.join(";");return t.length<=256?t:$e(e.slice(1))}var Ge=function(e){var t=function(e){return e.map((function(e){return e.replace(/;/g,"")}))}(e),n=function(e){var t="";return e.filter((function(e){var n=e!==t;return t=e,n}))}(t);return $e(n)};function Je(e){var t="string"==typeof e.partialQueries?e.partialQueries:Ge(e.partialQueries),n="string"==typeof e.suggestions?e.suggestions:Ge(e.suggestions);return r(r({},e),{partialQueries:t,suggestions:n})}var Xe,Ze,et,tt=function(){function e(e,t){this.opts=e,this.provider=t;var n=!1===e.enableAnalytics||ke();this.coveoAnalyticsClient=n?new We:new xe(e)}return e.prototype.disable=function(){this.coveoAnalyticsClient instanceof xe&&this.coveoAnalyticsClient.clear(),this.coveoAnalyticsClient=new We},e.prototype.enable=function(){this.coveoAnalyticsClient=new xe(this.opts)},e.prototype.makeInterfaceLoad=function(){return this.makeSearchEvent(Pe.interfaceLoad)},e.prototype.logInterfaceLoad=function(){return this.makeInterfaceLoad().log()},e.prototype.makeRecommendationInterfaceLoad=function(){return this.makeSearchEvent(Pe.recommendationInterfaceLoad)},e.prototype.logRecommendationInterfaceLoad=function(){return this.makeRecommendationInterfaceLoad().log()},e.prototype.makeRecommendation=function(){return this.makeCustomEvent(Pe.recommendation)},e.prototype.logRecommendation=function(){return this.makeRecommendation().log()},e.prototype.makeRecommendationOpen=function(e,t){return this.makeClickEvent(Pe.recommendationOpen,e,t)},e.prototype.logRecommendationOpen=function(e,t){return this.makeRecommendationOpen(e,t).log()},e.prototype.makeStaticFilterClearAll=function(e){return this.makeSearchEvent(Pe.staticFilterClearAll,e)},e.prototype.logStaticFilterClearAll=function(e){return this.makeStaticFilterClearAll(e).log()},e.prototype.makeStaticFilterSelect=function(e){return this.makeSearchEvent(Pe.staticFilterSelect,e)},e.prototype.logStaticFilterSelect=function(e){return this.makeStaticFilterSelect(e).log()},e.prototype.makeStaticFilterDeselect=function(e){return this.makeSearchEvent(Pe.staticFilterDeselect,e)},e.prototype.logStaticFilterDeselect=function(e){return this.makeStaticFilterDeselect(e).log()},e.prototype.makeFetchMoreResults=function(){return this.makeCustomEvent(Pe.pagerScrolling,{type:"getMoreResults"})},e.prototype.logFetchMoreResults=function(){return this.makeFetchMoreResults().log()},e.prototype.makeInterfaceChange=function(e){return this.makeSearchEvent(Pe.interfaceChange,e)},e.prototype.logInterfaceChange=function(e){return this.makeInterfaceChange(e).log()},e.prototype.makeDidYouMeanAutomatic=function(){return this.makeSearchEvent(Pe.didyoumeanAutomatic)},e.prototype.logDidYouMeanAutomatic=function(){return this.makeDidYouMeanAutomatic().log()},e.prototype.makeDidYouMeanClick=function(){return this.makeSearchEvent(Pe.didyoumeanClick)},e.prototype.logDidYouMeanClick=function(){return this.makeDidYouMeanClick().log()},e.prototype.makeResultsSort=function(e){return this.makeSearchEvent(Pe.resultsSort,e)},e.prototype.logResultsSort=function(e){return this.makeResultsSort(e).log()},e.prototype.makeSearchboxSubmit=function(){return this.makeSearchEvent(Pe.searchboxSubmit)},e.prototype.logSearchboxSubmit=function(){return this.makeSearchboxSubmit().log()},e.prototype.makeSearchboxClear=function(){return this.makeSearchEvent(Pe.searchboxClear)},e.prototype.logSearchboxClear=function(){return this.makeSearchboxClear().log()},e.prototype.makeSearchboxAsYouType=function(){return this.makeSearchEvent(Pe.searchboxAsYouType)},e.prototype.logSearchboxAsYouType=function(){return this.makeSearchboxAsYouType().log()},e.prototype.makeBreadcrumbFacet=function(e){return this.makeSearchEvent(Pe.breadcrumbFacet,e)},e.prototype.logBreadcrumbFacet=function(e){return this.makeBreadcrumbFacet(e).log()},e.prototype.makeBreadcrumbResetAll=function(){return this.makeSearchEvent(Pe.breadcrumbResetAll)},e.prototype.logBreadcrumbResetAll=function(){return this.makeBreadcrumbResetAll().log()},e.prototype.makeDocumentQuickview=function(e,t){return this.makeClickEvent(Pe.documentQuickview,e,t)},e.prototype.logDocumentQuickview=function(e,t){return this.makeDocumentQuickview(e,t).log()},e.prototype.makeDocumentOpen=function(e,t){return this.makeClickEvent(Pe.documentOpen,e,t)},e.prototype.logDocumentOpen=function(e,t){return this.makeDocumentOpen(e,t).log()},e.prototype.makeOmniboxAnalytics=function(e){return this.makeSearchEvent(Pe.omniboxAnalytics,Je(e))},e.prototype.logOmniboxAnalytics=function(e){return this.makeOmniboxAnalytics(e).log()},e.prototype.makeOmniboxFromLink=function(e){return this.makeSearchEvent(Pe.omniboxFromLink,Je(e))},e.prototype.logOmniboxFromLink=function(e){return this.makeOmniboxFromLink(e).log()},e.prototype.makeSearchFromLink=function(){return this.makeSearchEvent(Pe.searchFromLink)},e.prototype.logSearchFromLink=function(){return this.makeSearchFromLink().log()},e.prototype.makeTriggerNotify=function(e){return this.makeCustomEvent(Pe.triggerNotify,e)},e.prototype.logTriggerNotify=function(e){return this.makeTriggerNotify(e).log()},e.prototype.makeTriggerExecute=function(e){return this.makeCustomEvent(Pe.triggerExecute,e)},e.prototype.logTriggerExecute=function(e){return this.makeTriggerExecute(e).log()},e.prototype.makeTriggerQuery=function(){return this.makeCustomEvent(Pe.triggerQuery,{query:this.provider.getSearchEventRequestPayload().queryText},"queryPipelineTriggers")},e.prototype.logTriggerQuery=function(){return this.makeTriggerQuery().log()},e.prototype.makeUndoTriggerQuery=function(e){return this.makeSearchEvent(Pe.undoTriggerQuery,e)},e.prototype.logUndoTriggerQuery=function(e){return this.makeUndoTriggerQuery(e).log()},e.prototype.makeTriggerRedirect=function(e){return this.makeCustomEvent(Pe.triggerRedirect,r(r({},e),{query:this.provider.getSearchEventRequestPayload().queryText}))},e.prototype.logTriggerRedirect=function(e){return this.makeTriggerRedirect(e).log()},e.prototype.makePagerResize=function(e){return this.makeCustomEvent(Pe.pagerResize,e)},e.prototype.logPagerResize=function(e){return this.makePagerResize(e).log()},e.prototype.makePagerNumber=function(e){return this.makeCustomEvent(Pe.pagerNumber,e)},e.prototype.logPagerNumber=function(e){return this.makePagerNumber(e).log()},e.prototype.makePagerNext=function(e){return this.makeCustomEvent(Pe.pagerNext,e)},e.prototype.logPagerNext=function(e){return this.makePagerNext(e).log()},e.prototype.makePagerPrevious=function(e){return this.makeCustomEvent(Pe.pagerPrevious,e)},e.prototype.logPagerPrevious=function(e){return this.makePagerPrevious(e).log()},e.prototype.makePagerScrolling=function(){return this.makeCustomEvent(Pe.pagerScrolling)},e.prototype.logPagerScrolling=function(){return this.makePagerScrolling().log()},e.prototype.makeFacetClearAll=function(e){return this.makeSearchEvent(Pe.facetClearAll,e)},e.prototype.logFacetClearAll=function(e){return this.makeFacetClearAll(e).log()},e.prototype.makeFacetSearch=function(e){return this.makeSearchEvent(Pe.facetSearch,e)},e.prototype.logFacetSearch=function(e){return this.makeFacetSearch(e).log()},e.prototype.makeFacetSelect=function(e){return this.makeSearchEvent(Pe.facetSelect,e)},e.prototype.logFacetSelect=function(e){return this.makeFacetSelect(e).log()},e.prototype.makeFacetDeselect=function(e){return this.makeSearchEvent(Pe.facetDeselect,e)},e.prototype.logFacetDeselect=function(e){return this.makeFacetDeselect(e).log()},e.prototype.makeFacetExclude=function(e){return this.makeSearchEvent(Pe.facetExclude,e)},e.prototype.logFacetExclude=function(e){return this.makeFacetExclude(e).log()},e.prototype.makeFacetUnexclude=function(e){return this.makeSearchEvent(Pe.facetUnexclude,e)},e.prototype.logFacetUnexclude=function(e){return this.makeFacetUnexclude(e).log()},e.prototype.makeFacetSelectAll=function(e){return this.makeSearchEvent(Pe.facetSelectAll,e)},e.prototype.logFacetSelectAll=function(e){return this.makeFacetSelectAll(e).log()},e.prototype.makeFacetUpdateSort=function(e){return this.makeSearchEvent(Pe.facetUpdateSort,e)},e.prototype.logFacetUpdateSort=function(e){return this.makeFacetUpdateSort(e).log()},e.prototype.makeFacetShowMore=function(e){return this.makeCustomEvent(Pe.facetShowMore,e)},e.prototype.logFacetShowMore=function(e){return this.makeFacetShowMore(e).log()},e.prototype.makeFacetShowLess=function(e){return this.makeCustomEvent(Pe.facetShowLess,e)},e.prototype.logFacetShowLess=function(e){return this.makeFacetShowLess(e).log()},e.prototype.makeQueryError=function(e){return this.makeCustomEvent(Pe.queryError,e)},e.prototype.logQueryError=function(e){return this.makeQueryError(e).log()},e.prototype.makeQueryErrorBack=function(){var e=this;return{description:this.makeDescription(Pe.queryErrorBack),log:function(){return i(e,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.logCustomEvent(Pe.queryErrorBack)];case 1:return e.sent(),[2,this.logSearchEvent(Pe.queryErrorBack)]}}))}))}}},e.prototype.logQueryErrorBack=function(){return this.makeQueryErrorBack().log()},e.prototype.makeQueryErrorRetry=function(){var e=this;return{description:this.makeDescription(Pe.queryErrorRetry),log:function(){return i(e,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.logCustomEvent(Pe.queryErrorRetry)];case 1:return e.sent(),[2,this.logSearchEvent(Pe.queryErrorRetry)]}}))}))}}},e.prototype.logQueryErrorRetry=function(){return this.makeQueryErrorRetry().log()},e.prototype.makeQueryErrorClear=function(){var e=this;return{description:this.makeDescription(Pe.queryErrorClear),log:function(){return i(e,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.logCustomEvent(Pe.queryErrorClear)];case 1:return e.sent(),[2,this.logSearchEvent(Pe.queryErrorClear)]}}))}))}}},e.prototype.logQueryErrorClear=function(){return this.makeQueryErrorClear().log()},e.prototype.makeLikeSmartSnippet=function(){return this.makeCustomEvent(Pe.likeSmartSnippet)},e.prototype.logLikeSmartSnippet=function(){return this.makeLikeSmartSnippet().log()},e.prototype.makeDislikeSmartSnippet=function(){return this.makeCustomEvent(Pe.dislikeSmartSnippet)},e.prototype.logDislikeSmartSnippet=function(){return this.makeDislikeSmartSnippet().log()},e.prototype.makeExpandSmartSnippet=function(){return this.makeCustomEvent(Pe.expandSmartSnippet)},e.prototype.logExpandSmartSnippet=function(){return this.makeExpandSmartSnippet().log()},e.prototype.makeCollapseSmartSnippet=function(){return this.makeCustomEvent(Pe.collapseSmartSnippet)},e.prototype.logCollapseSmartSnippet=function(){return this.makeCollapseSmartSnippet().log()},e.prototype.makeOpenSmartSnippetFeedbackModal=function(){return this.makeCustomEvent(Pe.openSmartSnippetFeedbackModal)},e.prototype.logOpenSmartSnippetFeedbackModal=function(){return this.makeOpenSmartSnippetFeedbackModal().log()},e.prototype.makeCloseSmartSnippetFeedbackModal=function(){return this.makeCustomEvent(Pe.closeSmartSnippetFeedbackModal)},e.prototype.logCloseSmartSnippetFeedbackModal=function(){return this.makeCloseSmartSnippetFeedbackModal().log()},e.prototype.makeSmartSnippetFeedbackReason=function(e,t){return this.makeCustomEvent(Pe.sendSmartSnippetReason,{reason:e,details:t})},e.prototype.logSmartSnippetFeedbackReason=function(e,t){return this.makeSmartSnippetFeedbackReason(e,t).log()},e.prototype.makeExpandSmartSnippetSuggestion=function(e){return this.makeCustomEvent(Pe.expandSmartSnippetSuggestion,"documentId"in e?e:{documentId:e})},e.prototype.logExpandSmartSnippetSuggestion=function(e){return this.makeExpandSmartSnippetSuggestion(e).log()},e.prototype.makeCollapseSmartSnippetSuggestion=function(e){return this.makeCustomEvent(Pe.collapseSmartSnippetSuggestion,"documentId"in e?e:{documentId:e})},e.prototype.logCollapseSmartSnippetSuggestion=function(e){return this.makeCollapseSmartSnippetSuggestion(e).log()},e.prototype.makeShowMoreSmartSnippetSuggestion=function(e){return this.makeCustomEvent(Pe.showMoreSmartSnippetSuggestion,e)},e.prototype.logShowMoreSmartSnippetSuggestion=function(e){return this.makeShowMoreSmartSnippetSuggestion(e).log()},e.prototype.makeShowLessSmartSnippetSuggestion=function(e){return this.makeCustomEvent(Pe.showLessSmartSnippetSuggestion,e)},e.prototype.logShowLessSmartSnippetSuggestion=function(e){return this.makeShowLessSmartSnippetSuggestion(e).log()},e.prototype.makeOpenSmartSnippetSource=function(e,t){return this.makeClickEvent(Pe.openSmartSnippetSource,e,t)},e.prototype.logOpenSmartSnippetSource=function(e,t){return this.makeOpenSmartSnippetSource(e,t).log()},e.prototype.makeOpenSmartSnippetSuggestionSource=function(e,t){return this.makeClickEvent(Pe.openSmartSnippetSuggestionSource,e,{contentIDKey:t.documentId.contentIdKey,contentIDValue:t.documentId.contentIdValue},t)},e.prototype.logOpenSmartSnippetSuggestionSource=function(e,t){return this.makeOpenSmartSnippetSuggestionSource(e,t).log()},e.prototype.makeOpenSmartSnippetInlineLink=function(e,t){return this.makeClickEvent(Pe.openSmartSnippetInlineLink,e,{contentIDKey:t.contentIDKey,contentIDValue:t.contentIDValue},t)},e.prototype.logOpenSmartSnippetInlineLink=function(e,t){return this.makeOpenSmartSnippetInlineLink(e,t).log()},e.prototype.makeOpenSmartSnippetSuggestionInlineLink=function(e,t){return this.makeClickEvent(Pe.openSmartSnippetSuggestionInlineLink,e,{contentIDKey:t.documentId.contentIdKey,contentIDValue:t.documentId.contentIdValue},t)},e.prototype.logOpenSmartSnippetSuggestionInlineLink=function(e,t){return this.makeOpenSmartSnippetSuggestionInlineLink(e,t).log()},e.prototype.makeRecentQueryClick=function(){return this.makeSearchEvent(Pe.recentQueryClick)},e.prototype.logRecentQueryClick=function(){return this.makeRecentQueryClick().log()},e.prototype.makeClearRecentQueries=function(){return this.makeCustomEvent(Pe.clearRecentQueries)},e.prototype.logClearRecentQueries=function(){return this.makeClearRecentQueries().log()},e.prototype.makeRecentResultClick=function(e,t){return this.makeCustomEvent(Pe.recentResultClick,{info:e,identifier:t})},e.prototype.logRecentResultClick=function(e,t){return this.makeRecentResultClick(e,t).log()},e.prototype.makeClearRecentResults=function(){return this.makeCustomEvent(Pe.clearRecentResults)},e.prototype.logClearRecentResults=function(){return this.makeClearRecentResults().log()},e.prototype.makeNoResultsBack=function(){return this.makeSearchEvent(Pe.noResultsBack)},e.prototype.logNoResultsBack=function(){return this.makeNoResultsBack().log()},e.prototype.makeShowMoreFoldedResults=function(e,t){return this.makeClickEvent(Pe.showMoreFoldedResults,e,t)},e.prototype.logShowMoreFoldedResults=function(e,t){return this.makeShowMoreFoldedResults(e,t).log()},e.prototype.makeShowLessFoldedResults=function(){return this.makeCustomEvent(Pe.showLessFoldedResults)},e.prototype.logShowLessFoldedResults=function(){return this.makeShowLessFoldedResults().log()},e.prototype.makeCustomEvent=function(e,t,n){var o=this;void 0===n&&(n=Ke[e]);var a=r(r({},this.provider.getBaseMetadata()),t);return{description:this.makeDescription(e,t),log:function(){return i(o,void 0,void 0,(function(){var t,o;return s(this,(function(i){switch(i.label){case 0:return o=[{}],[4,this.getBaseCustomEventRequest(a)];case 1:return t=r.apply(void 0,[r.apply(void 0,o.concat([i.sent()])),{eventType:n,eventValue:e}]),[2,this.coveoAnalyticsClient.sendCustomEvent(t)]}}))}))}}},e.prototype.logCustomEvent=function(e,t,n){return void 0===n&&(n=Ke[e]),this.makeCustomEvent(e,t,n).log()},e.prototype.makeCustomEventWithType=function(e,t,n){var o=this,a=r(r({},this.provider.getBaseMetadata()),n);return{description:{actionCause:e,customData:a},log:function(){return i(o,void 0,void 0,(function(){var n,o;return s(this,(function(i){switch(i.label){case 0:return o=[{}],[4,this.getBaseCustomEventRequest(a)];case 1:return n=r.apply(void 0,[r.apply(void 0,o.concat([i.sent()])),{eventType:t,eventValue:e}]),[2,this.coveoAnalyticsClient.sendCustomEvent(n)]}}))}))}}},e.prototype.logCustomEventWithType=function(e,t,n){return this.makeCustomEventWithType(e,t,n).log()},e.prototype.logSearchEvent=function(e,t){return i(this,void 0,void 0,(function(){var n,r;return s(this,(function(o){switch(o.label){case 0:return r=(n=this.coveoAnalyticsClient).sendSearchEvent,[4,this.getBaseSearchEventRequest(e,t)];case 1:return[2,r.apply(n,[o.sent()])]}}))}))},e.prototype.makeDescription=function(e,t){return{actionCause:e,customData:r(r({},this.provider.getBaseMetadata()),t)}},e.prototype.makeSearchEvent=function(e,t){var n=this;return{description:this.makeDescription(e,t),log:function(){return n.logSearchEvent(e,t)}}},e.prototype.logClickEvent=function(e,t,n,o){return i(this,void 0,void 0,(function(){var i,a;return s(this,(function(s){switch(s.label){case 0:return a=[r({},t)],[4,this.getBaseEventRequest(r(r({},n),o))];case 1:return i=r.apply(void 0,[r.apply(void 0,a.concat([s.sent()])),{searchQueryUid:this.provider.getSearchUID(),queryPipeline:this.provider.getPipeline(),actionCause:e}]),[2,this.coveoAnalyticsClient.sendClickEvent(i)]}}))}))},e.prototype.makeClickEvent=function(e,t,n,o){var i=this;return{description:this.makeDescription(e,r(r({},n),o)),log:function(){return i.logClickEvent(e,t,n,o)}}},e.prototype.getBaseSearchEventRequest=function(e,t){return i(this,void 0,void 0,(function(){var n;return s(this,(function(o){switch(o.label){case 0:return n=[{}],[4,this.getBaseEventRequest(t)];case 1:return[2,r.apply(void 0,[r.apply(void 0,[r.apply(void 0,n.concat([o.sent()])),this.provider.getSearchEventRequestPayload()]),{searchQueryUid:this.provider.getSearchUID(),queryPipeline:this.provider.getPipeline(),actionCause:e}])]}}))}))},e.prototype.getBaseCustomEventRequest=function(e){return i(this,void 0,void 0,(function(){var t;return s(this,(function(n){switch(n.label){case 0:return t=[{}],[4,this.getBaseEventRequest(e)];case 1:return[2,r.apply(void 0,[r.apply(void 0,t.concat([n.sent()])),{lastSearchQueryUid:this.provider.getSearchUID()}])]}}))}))},e.prototype.getBaseEventRequest=function(e){return i(this,void 0,void 0,(function(){var t,n,o;return s(this,(function(i){switch(i.label){case 0:return t=r(r({},this.provider.getBaseMetadata()),e),n=[r(r({},this.getOrigins()),this.getSplitTestRun())],o={customData:t,language:this.provider.getLanguage(),facetState:this.provider.getFacetState?this.provider.getFacetState():[],anonymous:this.provider.getIsAnonymous()},[4,this.getClientId()];case 1:return[2,r.apply(void 0,n.concat([(o.clientId=i.sent(),o)]))]}}))}))},e.prototype.getOrigins=function(){var e,t;return{originContext:null===(t=(e=this.provider).getOriginContext)||void 0===t?void 0:t.call(e),originLevel1:this.provider.getOriginLevel1(),originLevel2:this.provider.getOriginLevel2(),originLevel3:this.provider.getOriginLevel3()}},e.prototype.getClientId=function(){return this.coveoAnalyticsClient instanceof xe?this.coveoAnalyticsClient.getCurrentVisitorId():void 0},e.prototype.getSplitTestRun=function(){var e=this.provider.getSplitTestRunName?this.provider.getSplitTestRunName():"",t=this.provider.getSplitTestRunVersion?this.provider.getSplitTestRunVersion():"";return r(r({},e&&{splitTestRunName:e}),t&&{splitTestRunVersion:t})},e}();!function(e){e.click="click",e.flowStart="flowStart"}(Xe||(Xe={})),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"}(Ze||(Ze={})),function(e){e.quit="Quit",e.solved="Solved"}(et||(et={}));var nt=function(){function e(e,t){var n;this.options=e,this.provider=t;var r=(null===(n=e.enableAnalytics)||void 0===n||n)&&!ke();this.coveoAnalyticsClient=r?new xe(e):new We,this.svc=new Ne({client:this.coveoAnalyticsClient})}return e.prototype.disable=function(){this.coveoAnalyticsClient instanceof xe&&this.coveoAnalyticsClient.clear(),this.coveoAnalyticsClient=new We,this.svc=new Ne({client:this.coveoAnalyticsClient})},e.prototype.enable=function(){this.coveoAnalyticsClient=new xe(this.options),this.svc=new Ne({client:this.coveoAnalyticsClient})},e.prototype.logEnterInterface=function(e){return this.svc.setAction(Ze.enterInterface),this.svc.setTicket(e.ticket),this.sendFlowStartEvent()},e.prototype.logUpdateCaseField=function(e){return this.svc.setAction(Ze.fieldUpdate,{fieldName:e.fieldName}),this.svc.setTicket(e.ticket),this.sendClickEvent()},e.prototype.logSelectFieldSuggestion=function(e){return this.svc.setAction(Ze.fieldSuggestionClick,e.suggestion),this.svc.setTicket(e.ticket),this.sendClickEvent()},e.prototype.logSelectDocumentSuggestion=function(e){return this.svc.setAction(Ze.suggestionClick,e.suggestion),this.svc.setTicket(e.ticket),this.sendClickEvent()},e.prototype.logRateDocumentSuggestion=function(e){return this.svc.setAction(Ze.suggestionRate,r({rate:e.rating},e.suggestion)),this.svc.setTicket(e.ticket),this.sendClickEvent()},e.prototype.logMoveToNextCaseStep=function(e){return this.svc.setAction(Ze.nextCaseStep,{stage:null==e?void 0:e.stage}),this.svc.setTicket(e.ticket),this.sendClickEvent()},e.prototype.logCaseCancelled=function(e){return this.svc.setAction(Ze.caseCancelled,{reason:et.quit}),this.svc.setTicket(e.ticket),this.sendClickEvent()},e.prototype.logCaseSolved=function(e){return this.svc.setAction(Ze.caseSolved,{reason:et.solved}),this.svc.setTicket(e.ticket),this.sendClickEvent()},e.prototype.logCaseCreated=function(e){return this.svc.setAction(Ze.caseCreated),this.svc.setTicket(e.ticket),this.sendClickEvent()},e.prototype.sendFlowStartEvent=function(){return this.coveoAnalyticsClient.sendEvent("event","svc",Xe.flowStart,this.provider?{searchHub:this.provider.getOriginLevel1()}:null)},e.prototype.sendClickEvent=function(){return this.coveoAnalyticsClient.sendEvent("event","svc",Xe.click,this.provider?{searchHub:this.provider.getOriginLevel1()}:null)},e}(),rt=function(e,t){void 0===t&&(t=!0),e.caseContext;var n=e.caseId,i=e.caseNumber,s=o(e,["caseContext","caseId","caseNumber"]),a=function(e){var t={};return e.caseContext&&Object.keys(e.caseContext).forEach((function(n){var r,o=null===(r=e.caseContext)||void 0===r?void 0:r[n];o&&(t["context_"+n]=o)})),t}(e);return r(r(r({CaseId:n,CaseNumber:i},s),!!a.context_Case_Subject&&{CaseSubject:a.context_Case_Subject}),t&&a)},ot=function(){function e(e,t){this.opts=e,this.provider=t;var n=!1===e.enableAnalytics||ke();this.coveoAnalyticsClient=n?new We:new xe(e)}return e.prototype.disable=function(){this.coveoAnalyticsClient instanceof xe&&this.coveoAnalyticsClient.clear(),this.coveoAnalyticsClient=new We},e.prototype.enable=function(){this.coveoAnalyticsClient=new xe(this.opts)},e.prototype.logInterfaceLoad=function(e){if(e){var t=rt(e);return this.logSearchEvent(Pe.interfaceLoad,t)}return this.logSearchEvent(Pe.interfaceLoad)},e.prototype.logInterfaceChange=function(e){var t=rt(e);return this.logSearchEvent(Pe.interfaceChange,t)},e.prototype.logStaticFilterDeselect=function(e){var t=rt(e);return this.logSearchEvent(Pe.staticFilterDeselect,t)},e.prototype.logFetchMoreResults=function(e){if(e){var t=rt(e);return this.logCustomEvent(Pe.pagerScrolling,r(r({},t),{type:"getMoreResults"}))}return this.logCustomEvent(Pe.pagerScrolling,{type:"getMoreResults"})},e.prototype.logBreadcrumbFacet=function(e){var t=rt(e);return this.logSearchEvent(Pe.breadcrumbFacet,t)},e.prototype.logBreadcrumbResetAll=function(e){if(e){var t=rt(e);return this.logSearchEvent(Pe.breadcrumbResetAll,t)}return this.logSearchEvent(Pe.breadcrumbResetAll)},e.prototype.logFacetSelect=function(e){var t=rt(e);return this.logSearchEvent(Pe.facetSelect,t)},e.prototype.logFacetDeselect=function(e){var t=rt(e);return this.logSearchEvent(Pe.facetDeselect,t)},e.prototype.logFacetUpdateSort=function(e){var t=rt(e);return this.logSearchEvent(Pe.facetUpdateSort,t)},e.prototype.logFacetClearAll=function(e){var t=rt(e);return this.logSearchEvent(Pe.facetClearAll,t)},e.prototype.logFacetShowMore=function(e){var t=rt(e,!1);return this.logCustomEvent(Pe.facetShowMore,t)},e.prototype.logFacetShowLess=function(e){var t=rt(e,!1);return this.logCustomEvent(Pe.facetShowLess,t)},e.prototype.logQueryError=function(e){var t=rt(e,!1);return this.logCustomEvent(Pe.queryError,t)},e.prototype.logPagerNumber=function(e){var t=rt(e,!1);return this.logCustomEvent(Pe.pagerNumber,t)},e.prototype.logPagerNext=function(e){var t=rt(e,!1);return this.logCustomEvent(Pe.pagerNext,t)},e.prototype.logPagerPrevious=function(e){var t=rt(e,!1);return this.logCustomEvent(Pe.pagerPrevious,t)},e.prototype.logDidYouMeanAutomatic=function(e){if(e){var t=rt(e);return this.logSearchEvent(Pe.didyoumeanAutomatic,t)}return this.logSearchEvent(Pe.didyoumeanAutomatic)},e.prototype.logDidYouMeanClick=function(e){if(e){var t=rt(e);return this.logSearchEvent(Pe.didyoumeanClick,t)}return this.logSearchEvent(Pe.didyoumeanClick)},e.prototype.logResultsSort=function(e){var t=rt(e);return this.logSearchEvent(Pe.resultsSort,t)},e.prototype.logSearchboxSubmit=function(e){if(e){var t=rt(e);return this.logSearchEvent(Pe.searchboxSubmit,t)}return this.logSearchEvent(Pe.searchboxSubmit)},e.prototype.logContextChanged=function(e){var t=rt(e);return this.logSearchEvent(Ie.contextChanged,t)},e.prototype.logExpandToFullUI=function(e){var t=rt(e);return this.logCustomEvent(Ie.expandToFullUI,t)},e.prototype.logDocumentOpen=function(e,t,n){return this.logClickEvent(Pe.documentOpen,e,t,n?rt(n,!1):void 0)},e.prototype.logCustomEvent=function(e,t){return i(this,void 0,void 0,(function(){var n,o,i;return s(this,(function(s){switch(s.label){case 0:return n=r(r({},this.provider.getBaseMetadata()),t),i=[{}],[4,this.getBaseCustomEventRequest(n)];case 1:return o=r.apply(void 0,[r.apply(void 0,i.concat([s.sent()])),{eventType:Ke[e],eventValue:e}]),[2,this.coveoAnalyticsClient.sendCustomEvent(o)]}}))}))},e.prototype.logSearchEvent=function(e,t){return i(this,void 0,void 0,(function(){var n,r;return s(this,(function(o){switch(o.label){case 0:return r=(n=this.coveoAnalyticsClient).sendSearchEvent,[4,this.getBaseSearchEventRequest(e,t)];case 1:return[2,r.apply(n,[o.sent()])]}}))}))},e.prototype.logClickEvent=function(e,t,n,o){return i(this,void 0,void 0,(function(){var i,a;return s(this,(function(s){switch(s.label){case 0:return a=[r({},t)],[4,this.getBaseEventRequest(r(r({},n),o))];case 1:return i=r.apply(void 0,[r.apply(void 0,a.concat([s.sent()])),{searchQueryUid:this.provider.getSearchUID(),queryPipeline:this.provider.getPipeline(),actionCause:e}]),[2,this.coveoAnalyticsClient.sendClickEvent(i)]}}))}))},e.prototype.getBaseCustomEventRequest=function(e){return i(this,void 0,void 0,(function(){var t;return s(this,(function(n){switch(n.label){case 0:return t=[{}],[4,this.getBaseEventRequest(e)];case 1:return[2,r.apply(void 0,[r.apply(void 0,t.concat([n.sent()])),{lastSearchQueryUid:this.provider.getSearchUID()}])]}}))}))},e.prototype.getBaseSearchEventRequest=function(e,t){return i(this,void 0,void 0,(function(){var n;return s(this,(function(o){switch(o.label){case 0:return n=[{}],[4,this.getBaseEventRequest(t)];case 1:return[2,r.apply(void 0,[r.apply(void 0,[r.apply(void 0,n.concat([o.sent()])),this.provider.getSearchEventRequestPayload()]),{searchQueryUid:this.provider.getSearchUID(),queryPipeline:this.provider.getPipeline(),actionCause:e}])]}}))}))},e.prototype.getBaseEventRequest=function(e){return i(this,void 0,void 0,(function(){var t,n,o;return s(this,(function(i){switch(i.label){case 0:return t=r(r({},this.provider.getBaseMetadata()),e),n=[r({},this.getOrigins())],o={customData:t,language:this.provider.getLanguage(),facetState:this.provider.getFacetState?this.provider.getFacetState():[],anonymous:this.provider.getIsAnonymous()},[4,this.getClientId()];case 1:return[2,r.apply(void 0,n.concat([(o.clientId=i.sent(),o)]))]}}))}))},e.prototype.getOrigins=function(){var e,t;return{originContext:null===(t=(e=this.provider).getOriginContext)||void 0===t?void 0:t.call(e),originLevel1:this.provider.getOriginLevel1(),originLevel2:this.provider.getOriginLevel2(),originLevel3:this.provider.getOriginLevel3()}},e.prototype.getClientId=function(){return this.coveoAnalyticsClient instanceof xe?this.coveoAnalyticsClient.getCurrentVisitorId():void 0},e}(),it=Object.freeze({__proto__:null,analytics:Fe,donottrack:Ee,history:b,SimpleAnalytics:ze,storage:E,CoveoAnalyticsClient:xe,CoveoUA:Ue,getCurrentClient:je,handleOneAnalyticsEvent:Ye,CoveoSearchPageClient:tt,CaseAssistClient:nt,CoveoInsightClient:ot});window.Promise instanceof Function||console.error('This script uses window.Promise which is not supported in your browser. Consider adding a polyfill like "es6-promise".'),window.fetch instanceof Function||console.error('This script uses window.fetch which is not supported in your browser. Consider adding a polyfill like "fetch".');var st=self.coveoua||Ye;(self.coveoua=Ye,self.coveoanalytics=it,st.q)&&a(st.q.filter((function(e){return"init"===e[0]})),st.q.filter((function(e){return"init"!==e[0]}))).forEach((function(e){return Ye.apply(void 0,e)}));return self.coveoua}();
|
|
2
2
|
//# sourceMappingURL=coveoua.browser.js.map
|