coveo.analytics 2.18.52 → 2.18.53
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/definitions/caseAssist/caseAssistActions.d.ts +72 -0
- package/dist/definitions/caseAssist/caseAssistClient.d.ts +24 -0
- package/dist/definitions/coveoua/headless.d.ts +1 -0
- package/dist/definitions/coveoua/library.d.ts +1 -0
- package/dist/definitions/src/coveoua/headless.d.ts +1 -0
- package/dist/definitions/src/coveoua/library.d.ts +1 -0
- package/dist/library.es.js +252 -1
- package/dist/library.js +103 -0
- package/package.json +1 -1
- package/src/caseAssist/caseAssistActions.ts +86 -0
- package/src/caseAssist/caseAssistClient.spec.ts +262 -0
- package/src/caseAssist/caseAssistClient.ts +117 -0
- package/src/coveoua/headless.ts +1 -0
- package/src/coveoua/library.ts +1 -0
package/dist/coveoua.browser.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var coveoua=function(){"use strict";var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function e(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var o,t,g=function(){return(g=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}).apply(this,arguments)};function y(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 p(e,s,a,u){return new(a=a||Promise)(function(n,t){function r(e){try{i(u.next(e))}catch(e){t(e)}}function o(e){try{i(u.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?n(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(r,o)}i((u=u.apply(e,s||[])).next())})}function m(n,r){var o,i,s,e,a={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return e={next:t(0),throw:t(1),return:t(2)},"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(t){return function(e){return function(t){if(o)throw new TypeError("Generator is already executing.");for(;a;)try{if(o=1,i&&(s=2&t[0]?i.return:t[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,t[1])).done)return s;switch(i=0,s&&(t=[2&t[0],s.value]),t[0]){case 0:case 1:s=t;break;case 4:return a.label++,{value:t[1],done:!1};case 5:a.label++,i=t[1],t=[0];continue;case 7:t=a.ops.pop(),a.trys.pop();continue;default:if(!(s=0<(s=a.trys).length&&s[s.length-1])&&(6===t[0]||2===t[0])){a=0;continue}if(3===t[0]&&(!s||t[1]>s[0]&&t[1]<s[3])){a.label=t[1];break}if(6===t[0]&&a.label<s[1]){a.label=s[1],s=t;break}if(s&&a.label<s[2]){a.label=s[2],a.ops.push(t);break}s[2]&&a.ops.pop(),a.trys.pop();continue}t=r.call(n,a)}catch(e){t=[6,e],i=0}finally{o=s=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}([t,e])}}}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 n(){return"undefined"!=typeof navigator}function i(){return"undefined"!=typeof document}function u(){try{return"undefined"!=typeof localStorage}catch(e){return}}function c(){return n()&&navigator.cookieEnabled}function s(){return"undefined"!=typeof crypto&&void 0!==crypto.getRandomValues}(t=o=o||{}).search="search",t.click="click",t.custom="custom",t.view="view",t.collect="collect";var l=[o.click,o.custom,o.search,o.view],d=(f.set=function(e,t,n){var r,o,i,s;i=n?((o=new Date).setTime(o.getTime()+n),"; expires="+o.toGMTString()):"",-1===(s=location.hostname).indexOf(".")?document.cookie=e+"="+t+i+"; path=/":((r=s.split(".")).shift(),h({name:e,value:t,expires:i,domain:"."+r.join(".")}),null!=f.get(e)&&f.get(e)==t||h({name:e,value:t,expires:i,domain:"."+s}))},f.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},f.erase=function(e){f.set(e,"",-1)},f);function f(){}function h(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 v(){return u()?localStorage:c()?new S:function(){try{return"undefined"!=typeof sessionStorage}catch(e){return}}()?sessionStorage:new k}var S=(w.prototype.getItem=function(e){return d.get(""+w.prefix+e)},w.prototype.removeItem=function(e){d.erase(""+w.prefix+e)},w.prototype.setItem=function(e,t){d.set(""+w.prefix+e,t)},w.prefix="coveo_",w);function w(){}var E=(b.prototype.getItem=function(e){return localStorage.getItem(e)||this.cookieStorage.getItem(e)},b.prototype.removeItem=function(e){this.cookieStorage.removeItem(e),localStorage.removeItem(e)},b.prototype.setItem=function(e,t){localStorage.setItem(e,t),this.cookieStorage.setItem(e,t)},b);function b(){this.cookieStorage=new S}var k=(C.prototype.getItem=function(e){return null},C.prototype.removeItem=function(e){},C.prototype.setItem=function(e,t){},C);function C(){}var I=Object.freeze({__proto__:null,preferredStorage:null,getAvailableStorage:v,CookieStorage:S,CookieAndLocalStorage:E,NullStorage:k}),P="__coveo.analytics.history",R=(x.prototype.addElement=function(e){e.internalTime=(new Date).getTime(),this.cropQueryElement(e);var t=this.getHistoryWithInternalTime();null!=t?this.isValidEntry(e)&&this.setHistory([e].concat(t)):this.setHistory([e])},x.prototype.addElementAsync=function(n){return p(this,void 0,void 0,function(){var t;return m(this,function(e){switch(e.label){case 0:return n.internalTime=(new Date).getTime(),this.cropQueryElement(n),[4,this.getHistoryWithInternalTimeAsync()];case 1:return null!=(t=e.sent())?this.isValidEntry(n)&&this.setHistory([n].concat(t)):this.setHistory([n]),[2]}})})},x.prototype.getHistory=function(){var e=this.getHistoryWithInternalTime();return this.stripInternalTime(e)},x.prototype.getHistoryAsync=function(){return p(this,void 0,void 0,function(){var t;return m(this,function(e){switch(e.label){case 0:return[4,this.getHistoryWithInternalTimeAsync()];case 1:return t=e.sent(),[2,this.stripInternalTime(t)]}})})},x.prototype.getHistoryWithInternalTime=function(){try{var e=this.store.getItem(P);return e&&"string"==typeof e?JSON.parse(e):[]}catch(e){return[]}},x.prototype.getHistoryWithInternalTimeAsync=function(){return p(this,void 0,void 0,function(){var t;return m(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,this.store.getItem(P)];case 1:return(t=e.sent())?[2,JSON.parse(t)]:[2,[]];case 2:return e.sent(),[2,[]];case 3:return[2]}})})},x.prototype.setHistory=function(e){try{this.store.setItem(P,JSON.stringify(e.slice(0,20)))}catch(e){}},x.prototype.clear=function(){try{this.store.removeItem(P)}catch(e){}},x.prototype.getMostRecentElement=function(){var e=this.getHistoryWithInternalTime();return null==e?null:e.sort(function(e,t){return(t.internalTime||0)-(e.internalTime||0)})[0]},x.prototype.cropQueryElement=function(e){e.name&&"query"==e.name.toLowerCase()&&null!=e.value&&(e.value=e.value.slice(0,75))},x.prototype.isValidEntry=function(e){var t=this.getMostRecentElement();return!t||t.value!=e.value||6e4<(e.internalTime||0)-(t.internalTime||0)},x.prototype.stripInternalTime=function(e){return e.map(function(e){return{name:e.name,time:e.time,value:e.value}})},x);function x(e){this.store=e||v()}function A(e){return-1!==ve.indexOf(e)}function T(e){return"custom"===e}var F=Object.freeze({__proto__:null,STORE_KEY:P,MAX_NUMBER_OF_HISTORY_ELEMENTS:20,MIN_THRESHOLD_FOR_DUPLICATE_VALUE:6e4,MAX_VALUE_SIZE:75,HistoryStore:R,default:R}),O=function(r){return p(void 0,void 0,void 0,function(){var t,n;return m(this,function(e){switch(e.label){case 0:return t=new R,n={name:"PageView",value:r,time:JSON.stringify(new Date)},[4,t.addElementAsync(n)];case 1:return e.sent(),[2]}})})},V=function(e){return e?(Number(e)^L(new Uint8Array(1))[0]%16>>Number(e)/4).toString(16):(""+1e7+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,V)},L=function(e){if(s())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},q=Object.keys,_={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"},H=a(q(_).map(function(e){return _[e]})).join("|"),M=new RegExp("^("+H+"$)"),N=[function(e){return M.test(e)}],D={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",price:"pr",quantity:"qt",coupon:"cc",position:"ps",group:"group"},j={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",position:"ps",price:"pr",group:"group"},B={action:"pa",list:"pal",listSource:"pls"},U={id:"ti",revenue:"tr",tax:"tt",shipping:"ts",coupon:"tcc",affiliation:"ta",step:"cos",option:"col"},Q={id:"quoteId",affiliation:"quoteAffiliation"},z={id:"reviewId",rating:"reviewRating",comment:"reviewComment"},Y={add:B,bookmark_add:B,bookmark_remove:B,click:B,checkout:B,checkout_option:B,detail:B,impression:B,remove:B,refund:g(g({},B),U),purchase:g(g({},B),U),quickview:B,quote:g(g({},B),Q),review:g(g({},B),z)},W=function(o,i,s,a){return q(o).reduce(function(e,t){var n,r="il"+(i+1)+a+(s+1)+(j[t]||t);return g(g({},e),((n={})[r]=o[t],n))},{})},$=q(D).map(function(e){return D[e]}),G=q(j).map(function(e){return j[e]}),K=q(B).map(function(e){return B[e]}),J=q(U).map(function(e){return U[e]}),X=q(z).map(function(e){return z[e]}),Z=q(Q).map(function(e){return Q[e]}),ee=a($,["custom"]).join("|"),te=a(G,["custom"]).join("|"),ne="(pr[0-9]+)",re="(il[0-9]+pi[0-9]+)",oe=new RegExp("^"+ne+"("+ee+")$"),ie=new RegExp("^("+re+"("+te+"))|(il[0-9]+nm)$"),se=new RegExp("^("+K.join("|")+")$"),ae=new RegExp("^("+J.join("|")+")$"),ue=new RegExp("^"+ne+"custom$"),ce=new RegExp("^"+re+"custom$"),le=new RegExp("^("+a(["loyaltyCardId","loyaltyTier","thirdPartyPersona","companyName","favoriteStore","storeName","userIndustry","userRole","userDepartment","businessUnit"],X,Z).join("|")+")$"),pe=[function(e){return ie.test(e)},function(e){return oe.test(e)},function(e){return se.test(e)},function(e){return ae.test(e)},function(e){return le.test(e)}],de=[ue,ce],fe=g(g(g(g({},{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 g(g({},e),((n={})[t]=t,n))},{})),he=g(g({},fe),{svcAction:"svc_action",svcActionData:"svc_action_data"}),ve=q(he).map(function(e){return he[e]}),ge=function(n){var r=void 0;return a(de).every(function(e){var t;return r=null===(t=e.exec(n))||void 0===t?void 0:t[1],!Boolean(r)}),r},ye=function(r,o){return q(o).reduce(function(e,t){var n;return g(g({},e),((n={})[""+r+t]=o[t],n))},{})},me=(Se.prototype.sendEvent=function(d,f){return p(this,void 0,void 0,function(){var t,n,r,o,i,s,a,u,c,l,p;return m(this,function(e){switch(e.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 t=this.opts,n=t.baseUrl,r=t.preprocessRequest,o=this.encodeForEventType(d,f),[4,this.getQueryParamsForEventType(d)];case 1:return i=e.sent(),s={url:n+"/analytics/"+d+"?"+i,body:new Blob([o],{type:"application/x-www-form-urlencoded"})},l=[g({},s)],r?[4,r(s,"analyticsBeacon")]:[3,3];case 2:return p=e.sent(),[3,4];case 3:p={},e.label=4;case 4:return a=g.apply(void 0,l.concat([p])),u=a.url,c=a.body,console.log('Sending beacon for "'+d+'" with: ',JSON.stringify(f)),navigator.sendBeacon(u,c),[2]}})})},Se.prototype.encodeForEventType=function(e,t){return this.isEventTypeLegacy(e)?this.encodeForLegacyType(e,t):this.encodeForFormUrlEncoded(g({access_token:this.opts.token},t))},Se.prototype.getQueryParamsForEventType=function(o){return p(this,void 0,void 0,function(){var t,n,r;return m(this,function(e){switch(e.label){case 0:return t=this.opts,n=t.token,[4,t.visitorIdProvider.getCurrentVisitorId()];case 1:return r=e.sent(),[2,[n&&this.isEventTypeLegacy(o)?"access_token="+n:"",r?"visitorId="+r:"","discardVisitInfo=true"].filter(function(e){return!!e}).join("&")]}})})},Se.prototype.isEventTypeLegacy=function(e){return-1!==[o.click,o.custom,o.search,o.view].indexOf(e)},Se.prototype.encodeForLegacyType=function(e,t){return e+"Event="+encodeURIComponent(JSON.stringify(t))},Se.prototype.encodeForFormUrlEncoded=function(t){var n=this;return Object.keys(t).filter(function(e){return!!t[e]}).map(function(e){return encodeURIComponent(e)+"="+encodeURIComponent(n.encodeValue(t[e]))}).join("&")},Se.prototype.encodeValue=function(e){return"number"==typeof e||"string"==typeof e||"boolean"==typeof e?e:JSON.stringify(e)},Se);function Se(e){this.opts=e}var we=(Ee.prototype.sendEvent=function(e,t){return p(this,void 0,void 0,function(){return m(this,function(e){return[2,Promise.resolve()]})})},Ee);function Ee(){}var be=window.fetch,ke=(Ce.prototype.sendEvent=function(h,v){return p(this,void 0,void 0,function(){var t,n,r,o,i,s,a,u,c,l,p,d,f;return m(this,function(e){switch(e.label){case 0:return t=this.opts,n=t.baseUrl,r=t.visitorIdProvider,o=t.preprocessRequest,this.shouldAppendVisitorId(h)?[4,this.getVisitorIdParam()]:[3,2];case 1:return i=e.sent(),[3,3];case 2:i="",e.label=3;case 3:return s={url:n+"/analytics/"+h+i,credentials:"include",mode:"cors",headers:this.getHeaders(),method:"POST",body:JSON.stringify(v)},l=[g({},s)],o?[4,o(s,"analyticsFetch")]:[3,5];case 4:return p=e.sent(),[3,6];case 5:p={},e.label=6;case 6:return a=g.apply(void 0,l.concat([p])),u=a.url,c=y(a,["url"]),[4,be(u,c)];case 7:return(d=e.sent()).ok?[4,d.json()]:[3,9];case 8:return(f=e.sent()).visitorId&&r.setCurrentVisitorId(f.visitorId),[2,f];case 9:try{d.json()}catch(e){}throw console.error('An error has occured when sending the "'+h+'" event.',d,v),new Error('An error has occurred when sending the "'+h+'" event. Check the console logs for more details.')}})})},Ce.prototype.shouldAppendVisitorId=function(e){return-1!==[o.click,o.custom,o.search,o.view].indexOf(e)},Ce.prototype.getVisitorIdParam=function(){return p(this,void 0,void 0,function(){var t;return m(this,function(e){switch(e.label){case 0:return[4,this.opts.visitorIdProvider.getCurrentVisitorId()];case 1:return[2,(t=e.sent())?"?visitor="+t:""]}})})},Ce.prototype.getHeaders=function(){var e=this.opts.token;return g(g({},e?{Authorization:"Bearer "+e}:{}),{"Content-Type":"application/json"})},Ce);function Ce(e){this.opts=e}var Ie=function(e,i){var s=this;u()&&c()?this.storage=new E:u()?this.storage=localStorage:(console.warn("BrowserRuntime detected no valid storage available.",this),this.storage=new k),this.client=new ke(e),this.beaconClient=new me(e),window.addEventListener("beforeunload",function(){for(var e=0,t=i();e<t.length;e++){var n=t[e],r=n.eventType,o=n.payload;s.beaconClient.sendEvent(r,o)}})},Pe=function(e,t){this.storage=t||new k,this.client=new ke(e)},Re=function(){this.storage=new k,this.client=new we};function xe(){return n()&&[navigator.globalPrivacyControl,navigator.doNotTrack,navigator.msDoNotTrack,window.doNotTrack].some(function(e){return!!e})}var Ae=Object.freeze({__proto__:null,doNotTrack:xe,default:xe}),Te={default:"https://analytics.cloud.coveo.com/rest/ua",production:"https://analytics.cloud.coveo.com/rest/ua",hipaa:"https://analyticshipaa.cloud.coveo.com/rest/ua"},Fe=(Object.defineProperty(Oe.prototype,"defaultOptions",{get:function(){return{endpoint:Te.default,token:"",version:"v15",beforeSendHooks:[],afterSendHooks:[]}},enumerable:!0,configurable:!0}),Oe.prototype.initRuntime=function(e){var t=this;return"undefined"!=typeof window&&i()?new Ie(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 install @react-native-async-storage/async-storage and instantiate \n your analytics client as follows:\n \n import {ReactNativeRuntime} from 'coveo.analytics/react-native';\n \n const analytics = new CoveoAnalytics({\n ...your options,\n runtimeEnvironment: new ReactNativeRuntime();\n })\n "),new Pe(e))},Object.defineProperty(Oe.prototype,"storage",{get:function(){return this.runtime.storage},enumerable:!0,configurable:!0}),Oe.prototype.determineVisitorId=function(){return p(this,void 0,void 0,function(){var t;return m(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,this.storage.getItem("visitorId")];case 1:return[2,e.sent()||V()];case 2:return t=e.sent(),console.log("Could not get visitor ID from the current runtime environment storage. Using a random ID instead.",t),[2,V()];case 3:return[2]}})})},Oe.prototype.getCurrentVisitorId=function(){return p(this,void 0,void 0,function(){var t;return m(this,function(e){switch(e.label){case 0:return this.visitorId?[3,3]:[4,this.determineVisitorId()];case 1:return t=e.sent(),[4,this.setCurrentVisitorId(t)];case 2:e.sent(),e.label=3;case 3:return[2,this.visitorId]}})})},Oe.prototype.setCurrentVisitorId=function(t){return p(this,void 0,void 0,function(){return m(this,function(e){switch(e.label){case 0:return this.visitorId=t,[4,this.storage.setItem("visitorId",t)];case 1:return e.sent(),[2]}})})},Oe.prototype.getParameters=function(t){for(var n=[],e=1;e<arguments.length;e++)n[e-1]=arguments[e];return p(this,void 0,void 0,function(){return m(this,function(e){switch(e.label){case 0:return[4,this.resolveParameters.apply(this,a([t],n))];case 1:return[2,e.sent()]}})})},Oe.prototype.getPayload=function(n){for(var r=[],e=1;e<arguments.length;e++)r[e-1]=arguments[e];return p(this,void 0,void 0,function(){var t;return m(this,function(e){switch(e.label){case 0:return[4,this.resolveParameters.apply(this,a([n],r))];case 1:return t=e.sent(),[4,this.resolvePayloadForParameters(n,t)];case 2:return[2,e.sent()]}})})},Object.defineProperty(Oe.prototype,"currentVisitorId",{get:function(){return"string"!=typeof(this.visitorId||this.storage.getItem("visitorId"))&&this.setCurrentVisitorId(V()),this.visitorId},set:function(e){this.visitorId=e,this.storage.setItem("visitorId",e)},enumerable:!0,configurable:!0}),Oe.prototype.resolveParameters=function(c){for(var l=[],e=1;e<arguments.length;e++)l[e-1]=arguments[e];return p(this,void 0,void 0,function(){var t,n,r,o,i,s,a,u=this;return m(this,function(e){switch(e.label){case 0:return t=this.eventTypeMapping[c]||{},r=void 0===(n=t.variableLengthArgumentsNames)?[]:n,i=void 0!==(o=t.addVisitorIdParameter)&&o,a=void 0!==(s=t.usesMeasurementProtocol)&&s,[4,[function(e){return 0<r.length?u.parseVariableArgumentsPayload(r,e):e[0]},function(o){return p(u,void 0,void 0,function(){var t,n,r;return m(this,function(e){switch(e.label){case 0:return t=[g({},o)],n={},i?[4,this.getCurrentVisitorId()]:[3,2];case 1:return r=e.sent(),[3,3];case 2:r="",e.label=3;case 3:return[2,g.apply(void 0,t.concat([(n.visitorId=r,n)]))]}})})},function(e){return a?u.ensureAnonymousUserWhenUsingApiKey(e):e},function(e){return u.beforeSendHooks.reduce(function(n,r){return p(u,void 0,void 0,function(){var t;return m(this,function(e){switch(e.label){case 0:return[4,n];case 1:return t=e.sent(),[4,r(c,t)];case 2:return[2,e.sent()]}})})},e)}].reduce(function(n,r){return p(u,void 0,void 0,function(){var t;return m(this,function(e){switch(e.label){case 0:return[4,n];case 1:return t=e.sent(),[4,r(t)];case 2:return[2,e.sent()]}})})},Promise.resolve(l))];case 1:return[2,e.sent()]}})})},Oe.prototype.resolvePayloadForParameters=function(r,i){return p(this,void 0,void 0,function(){var t,n,o=this;return m(this,function(e){switch(e.label){case 0:return t=(this.eventTypeMapping[r]||{}).usesMeasurementProtocol,n=void 0!==t&&t,[4,[function(e){return o.removeEmptyPayloadValues(e,r)},function(e){return o.validateParams(e)},function(e){return n?(i=!!(o=e).action&&Y[o.action]||{},q(o).reduce(function(e,t){var n,r=i[t]||he[t]||t;return g(g({},e),((n={})[r]=o[t],n))},{})):e;var o,i},function(e){return n?o.removeUnknownParameters(e):e},function(e){return n?o.processCustomParameters(e):e}].reduce(function(n,r){return p(o,void 0,void 0,function(){var t;return m(this,function(e){switch(e.label){case 0:return[4,n];case 1:return t=e.sent(),[4,r(t)];case 2:return[2,e.sent()]}})})},Promise.resolve(i))];case 1:return[2,e.sent()]}})})},Oe.prototype.sendEvent=function(i){for(var s=[],e=1;e<arguments.length;e++)s[e-1]=arguments[e];return p(this,void 0,void 0,function(){var t,n,r,o;return m(this,function(e){switch(e.label){case 0:return t=(this.eventTypeMapping[i]||{}).newEventType,n=void 0===t?i:t,[4,this.resolveParameters.apply(this,a([i],s))];case 1:return r=e.sent(),[4,this.resolvePayloadForParameters(i,r)];case 2:return o=e.sent(),this.bufferedRequests.push({eventType:n,payload:o}),[4,Promise.all(this.afterSendHooks.map(function(e){return e(i,r)}))];case 3:return e.sent(),[4,this.deferExecution()];case 4:return e.sent(),[4,this.sendFromBufferWithFetch()];case 5:return[2,e.sent()]}})})},Oe.prototype.deferExecution=function(){return new Promise(function(e){return setTimeout(e,0)})},Oe.prototype.sendFromBufferWithFetch=function(){return p(this,void 0,void 0,function(){var t,n,r;return m(this,function(e){return(t=this.bufferedRequests.shift())?(n=t.eventType,r=t.payload,[2,this.runtime.client.sendEvent(n,r)]):[2]})})},Oe.prototype.clear=function(){this.storage.removeItem("visitorId"),(new R).clear()},Oe.prototype.sendSearchEvent=function(t){return p(this,void 0,void 0,function(){return m(this,function(e){return[2,this.sendEvent(o.search,t)]})})},Oe.prototype.sendClickEvent=function(t){return p(this,void 0,void 0,function(){return m(this,function(e){return[2,this.sendEvent(o.click,t)]})})},Oe.prototype.sendCustomEvent=function(t){return p(this,void 0,void 0,function(){return m(this,function(e){return[2,this.sendEvent(o.custom,t)]})})},Oe.prototype.sendViewEvent=function(t){return p(this,void 0,void 0,function(){return m(this,function(e){return[2,this.sendEvent(o.view,t)]})})},Oe.prototype.getVisit=function(){return p(this,void 0,void 0,function(){var t;return m(this,function(e){switch(e.label){case 0:return[4,fetch(this.baseUrl+"/analytics/visit")];case 1:return[4,e.sent().json()];case 2:return t=e.sent(),this.visitorId=t.visitorId,[2,t]}})})},Oe.prototype.getHealth=function(){return p(this,void 0,void 0,function(){return m(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()]}})})},Oe.prototype.registerBeforeSendEventHook=function(e){this.beforeSendHooks.push(e)},Oe.prototype.registerAfterSendEventHook=function(e){this.afterSendHooks.push(e)},Oe.prototype.addEventTypeMapping=function(e,t){this.eventTypeMapping[e]=t},Oe.prototype.parseVariableArgumentsPayload=function(e,t){for(var n={},r=0,o=t.length;r<o;r++){var i=t[r];if("string"==typeof i)n[e[r]]=i;else if("object"==typeof i)return g(g({},n),i)}return n},Oe.prototype.isKeyAllowedEmpty=function(e,t){var n;return-1!==((n={})[o.search]=["queryText"],(n[e]||[]).indexOf(t))},Oe.prototype.removeEmptyPayloadValues=function(r,n){var o=this;return Object.keys(r).filter(function(e){return o.isKeyAllowedEmpty(n,e)||null!=(t=r[e])&&""!==t;var t}).reduce(function(e,t){var n;return g(g({},e),((n={})[t]=r[t],n))},{})},Oe.prototype.removeUnknownParameters=function(r){return Object.keys(r).filter(function(e){if(t=e,a(pe,N,[A,T]).some(function(e){return e(t)}))return!0;var t;console.log(e,"is not processed by coveoua")}).reduce(function(e,t){var n;return g(g({},e),((n={})[t]=r[t],n))},{})},Oe.prototype.processCustomParameters=function(e){var o,t=e.custom,n=y(e,["custom"]),r=this.lowercaseKeys(t),i=q(o=n).reduce(function(e,t){var n,r=ge(t);return g(g({},e),r?ye(r,o[t]):((n={})[t]=o[t],n))},{});return g(g({},r),i)},Oe.prototype.lowercaseKeys=function(r){return Object.keys(r||{}).reduce(function(e,t){var n;return g(g({},e),((n={})[t.toLowerCase()]=r[t],n))},{})},Oe.prototype.validateParams=function(e){var t=e.anonymizeIp,n=y(e,["anonymizeIp"]);return void 0!==t&&-1==["0","false","undefined","null","{}","[]",""].indexOf((""+t).toLowerCase())&&(n.anonymizeIp=1),n},Oe.prototype.ensureAnonymousUserWhenUsingApiKey=function(e){var t,n=e.userId,r=y(e,["userId"]);return null!=(t=this.options.token)&&t.startsWith("xx")&&!n?(r.userId="anonymous",r):e},Object.defineProperty(Oe.prototype,"baseUrl",{get:function(){var e=this.options,t=e.version,n=e.endpoint,r=-1!==n.indexOf(".cloud.coveo.com");return n+(r?"":"/rest")+"/"+t},enumerable:!0,configurable:!0}),Oe);function Oe(e){if(!e)throw new Error("You have to pass options to this constructor");this.options=g(g({},this.defaultOptions),e),this.visitorId="",this.bufferedRequests=[],this.beforeSendHooks=[function(t,n){return p(void 0,void 0,void 0,function(){return m(this,function(e){switch(e.label){case 0:return t!==o.view?[3,2]:[4,O(n.contentIdValue)];case 1:return e.sent(),[2,g({location:window.location.toString(),referrer:document.referrer,title:document.title},n)];case 2:return[2,n]}})})},function(e,t){return-1!==l.indexOf(e)?g({language:i()?document.documentElement.lang:"unknown",userAgent:n()?navigator.userAgent:"unknown"},t):t}].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),xe()&&(this.clear(),this.runtime.storage=new k)}function Ve(e){return e.protocol+"//"+e.hostname+(0===e.pathname.indexOf("/")?e.pathname:"/"+e.pathname)+e.search}var Le=Object.freeze({__proto__:null,Version:"v15",Endpoints:Te,CoveoAnalyticsClient:Fe,default:Fe}),qe={pageview:"pageview",event:"event"},_e=(He.prototype.setAction=function(e,t){this.action=e,this.actionData=t},He.prototype.clearData=function(){this.clearPluginData(),this.action=void 0,this.actionData={}},He.prototype.getLocationInformation=function(e,t){return g({hitType:e},this.getNextValues(e,t))},He.prototype.updateLocationInformation=function(e,t){this.updateLocationForNextPageView(e,t)},He.prototype.getDefaultContextInformation=function(e){var t={title:document.title,encoding:document.characterSet},n={screenResolution:screen.width+"x"+screen.height,screenColor:screen.colorDepth+"-bit"},r={language:navigator.language,userAgent:navigator.userAgent},o={time:Date.now().toString(),eventId:this.uuidGenerator()};return g(g(g(g({},o),n),r),t)},He.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===qe.pageview&&(this.nextPageViewId=this.uuidGenerator(),this.hasSentFirstPageView=!0)},He.prototype.getNextValues=function(e,t){return{pageViewId:e===qe.pageview?this.nextPageViewId:this.pageViewId,referrer:e===qe.pageview&&this.hasSentFirstPageView?this.currentLocation:this.lastReferrer,location:e===qe.pageview?this.getCurrentLocationFromPayload(t):this.currentLocation}},He.prototype.getCurrentLocationFromPayload=function(e){return e.page?""+this.currentLocation.split("/").slice(0,3).join("/")+e.page.replace(/^\/?(.*)$/,"/$1"):Ve(window.location)},He);function He(e){var t=e.client,n=e.uuidGenerator,r=void 0===n?V:n;this.actionData={},this.client=t,this.uuidGenerator=r,this.pageViewId=r(),this.nextPageViewId=this.pageViewId,this.currentLocation=Ve(window.location),this.lastReferrer=document.referrer,this.addHooks()}var Me,Ne=g({},qe),De=Object.keys(Ne).map(function(e){return Ne[e]});function je(e){var t=e.client,n=e.uuidGenerator,r=void 0===n?V:n,o=Me.call(this,{client:t,uuidGenerator:r})||this;return o.products=[],o.impressions=[],o}var Be,Ue=(e(je,Me=_e),je.prototype.addHooks=function(){this.addHooksForPageView(),this.addHooksForEvent(),this.addHooksForECEvents()},je.prototype.addProduct=function(e){this.products.push(e)},je.prototype.addImpression=function(e){this.impressions.push(e)},je.prototype.clearPluginData=function(){this.products=[],this.impressions=[]},je.prototype.addHooksForECEvents=function(){var o=this;this.client.registerBeforeSendEventHook(function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=t[0];return-1!==De.indexOf(e)?o.addECDataToPayload(e,r):r}),this.client.registerAfterSendEventHook(function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=t[0];return-1!==De.indexOf(e)&&o.updateLocationInformation(e,r),r})},je.prototype.addHooksForPageView=function(){this.client.addEventTypeMapping(Ne.pageview,{newEventType:o.collect,variableLengthArgumentsNames:["page"],addVisitorIdParameter:!0,usesMeasurementProtocol:!0})},je.prototype.addHooksForEvent=function(){this.client.addEventTypeMapping(Ne.event,{newEventType:o.collect,variableLengthArgumentsNames:["eventCategory","eventAction","eventLabel","eventValue"],addVisitorIdParameter:!0,usesMeasurementProtocol:!0})},je.prototype.addECDataToPayload=function(e,t){var n=g(g(g(g({},this.getLocationInformation(e,t)),this.getDefaultContextInformation(e)),this.action?{action:this.action}:{}),this.actionData||{}),r=this.getProductPayload(),o=this.getImpressionPayload();return this.clearData(),g(g(g(g({},o),r),n),t)},je.prototype.getProductPayload=function(){var t=this;return this.products.map(function(e){return t.assureProductValidity(e)}).reduce(function(e,t,n){return g(g({},e),(i=n,q(o=t).reduce(function(e,t){var n,r="pr"+(i+1)+(D[t]||t);return g(g({},e),((n={})[r]=o[t],n))},{})));var o,i},{})},je.prototype.getImpressionPayload=function(){var r=this;return this.getImpressionsByList().map(function(e){var t=e.impressions,n=y(e,["impressions"]);return g(g({},n),{impressions:t.map(function(e){return r.assureBaseImpressionValidity(e)})})}).reduce(function(e,t,n){return g(g({},e),function(e,r,o){var t=e.impressions.reduce(function(e,t,n){return g(g({},e),W(t,r,n,o))},{});return e.listName&&(t["il"+(r+1)+"nm"]=e.listName),t}(t,n,"pi"))},{})},je.prototype.assureProductValidity=function(e){var t=e.position,n=y(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},je.prototype.assureBaseImpressionValidity=function(e){var t=e.position,n=y(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},je.prototype.getImpressionsByList=function(){return this.impressions.reduce(function(e,t){var n=t.list,r=y(t,["list"]),o=e.find(function(e){return e.listName===n});return o?o.impressions.push(r):e.push({listName:n,impressions:[r]}),e},[])},je.Id="ec",je),Qe=g({},qe),ze=Object.keys(Qe).map(function(e){return Qe[e]});function Ye(e){var t=e.client,n=e.uuidGenerator,r=void 0===n?V:n,o=Be.call(this,{client:t,uuidGenerator:r})||this;return o.ticket={},o}var We=(e(Ye,Be=_e),Ye.prototype.addHooks=function(){this.addHooksForEvent(),this.addHooksForPageView(),this.addHooksForSVCEvents()},Ye.prototype.setTicket=function(e){this.ticket=e},Ye.prototype.clearPluginData=function(){this.ticket={}},Ye.prototype.addHooksForSVCEvents=function(){var o=this;this.client.registerBeforeSendEventHook(function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=t[0];return-1!==ze.indexOf(e)?o.addSVCDataToPayload(e,r):r}),this.client.registerAfterSendEventHook(function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=t[0];return-1!==ze.indexOf(e)&&o.updateLocationInformation(e,r),r})},Ye.prototype.addHooksForPageView=function(){this.client.addEventTypeMapping(Qe.pageview,{newEventType:o.collect,variableLengthArgumentsNames:["page"],addVisitorIdParameter:!0,usesMeasurementProtocol:!0})},Ye.prototype.addHooksForEvent=function(){this.client.addEventTypeMapping(Qe.event,{newEventType:o.collect,variableLengthArgumentsNames:["eventCategory","eventAction","eventLabel","eventValue"],addVisitorIdParameter:!0,usesMeasurementProtocol:!0})},Ye.prototype.addSVCDataToPayload=function(e,t){var n,r=g(g(g(g({},this.getLocationInformation(e,t)),this.getDefaultContextInformation(e)),this.action?{svcAction:this.action}:{}),0<Object.keys(null!==(n=this.actionData)&&void 0!==n?n:{}).length?{svcActionData:this.actionData}:{}),o=this.getTicketPayload();return this.clearData(),g(g(g({},o),r),t)},Ye.prototype.getTicketPayload=function(){return o=this.ticket,q(o).filter(function(e){return void 0!==o[e]}).reduce(function(e,t){var n,r=_[t]||t;return g(g({},e),((n={})[r]=o[t],n))},{});var o},Ye.Id="svc",Ye),$e=(Ge.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)},Ge.prototype.provide=function(e,t){this.registeredPluginsMap[e]=t},Ge.prototype.clearRequired=function(){this.requiredPlugins={}},Ge.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)},Ge.DefaultPlugins=[Ue.Id,We.Id],Ge);function Ge(){var e;this.registeredPluginsMap=((e={})[Ue.Id]=Ue,e[We.Id]=We,e),this.requiredPlugins={}}var Ke=(Je.prototype.init=function(e,t){var n=this;if(!e)throw new Error("You must pass your token when you call 'init'");if("string"==typeof e?this.client=new Fe({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 r={client:this.client};this.plugins.clearRequired(),this.getPluginKeys(t).forEach(function(e){return n.plugins.require(e,r)}),this.client.registerBeforeSendEventHook(function(e,t){return g(g({},t),n.params)})},Je.prototype.isAnalyticsClient=function(e){return"object"==typeof e&&void 0!==e.sendEvent},Je.prototype.getPluginKeys=function(e){return"string"!=typeof e&&Array.isArray(null==e?void 0:e.plugins)?e.plugins:$e.DefaultPlugins},Je.prototype.getEndpoint=function(e){return"string"==typeof e?e||Te.default:null!=e&&e.endpoint?e.endpoint:Te.default},Je.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 Fe({endpoint:e})},Je.prototype.set=function(t,e){var n=this;"string"==typeof t?this.params[t]=e:Object.keys(t).map(function(e){n.params[e]=t[e]})},Je.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))},Je.prototype.onLoad=function(e){if(void 0===e)throw new Error("You must pass a function when you call 'onLoad'");e()},Je.prototype.provide=function(e,t){this.plugins.provide(e,t)},Je.prototype.require=function(e,t){if(!this.client)throw new Error("You must call init before requiring a plugin");this.plugins.require(e,g(g({},t),{client:this.client}))},Je.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))},Je.prototype.reset=function(){this.client=void 0,this.plugins=new $e,this.params={}},Je);function Je(){this.plugins=new $e,this.params={}}function Xe(){return rt.client}function Ze(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=rt[i];if(o&&i)return rt.callPlugin.apply(rt,a([o,i],t));if(s)return s.apply(rt,t);throw new Error('The action "'+e+'" does not exist. Available actions: '+["init","set","send","onLoad","callPlugin","reset","require","provide"].join(", ")+".")}var et,tt,nt,rt=new Ke,ot=Object.freeze({__proto__:null,CoveoUA:Ke,coveoua:rt,getCurrentClient:Xe,handleOneAnalyticsEvent:Ze,default:Ze});(nt=tt=tt||{}).interfaceLoad="interfaceLoad",nt.interfaceChange="interfaceChange",nt.didyoumeanAutomatic="didyoumeanAutomatic",nt.didyoumeanClick="didyoumeanClick",nt.resultsSort="resultsSort",nt.searchboxSubmit="searchboxSubmit",nt.searchboxClear="searchboxClear",nt.searchboxAsYouType="searchboxAsYouType",nt.breadcrumbFacet="breadcrumbFacet",nt.breadcrumbResetAll="breadcrumbResetAll",nt.documentQuickview="documentQuickview",nt.documentOpen="documentOpen",nt.omniboxAnalytics="omniboxAnalytics",nt.omniboxFromLink="omniboxFromLink",nt.searchFromLink="searchFromLink",nt.triggerNotify="notify",nt.triggerExecute="execute",nt.triggerQuery="query",nt.triggerRedirect="redirect",nt.pagerResize="pagerResize",nt.pagerNumber="pagerNumber",nt.pagerNext="pagerNext",nt.pagerPrevious="pagerPrevious",nt.pagerScrolling="pagerScrolling",nt.staticFilterClearAll="staticFilterClearAll",nt.staticFilterSelect="staticFilterSelect",nt.staticFilterDeselect="staticFilterDeselect",nt.facetClearAll="facetClearAll",nt.facetSearch="facetSearch",nt.facetSelect="facetSelect",nt.facetSelectAll="facetSelectAll",nt.facetDeselect="facetDeselect",nt.facetExclude="facetExclude",nt.facetUnexclude="facetUnexclude",nt.facetUpdateSort="facetUpdateSort",nt.facetShowMore="showMoreFacetResults",nt.facetShowLess="showLessFacetResults",nt.queryError="query",nt.queryErrorBack="errorBack",nt.queryErrorClear="errorClearQuery",nt.queryErrorRetry="errorRetry",nt.recommendation="recommendation",nt.recommendationInterfaceLoad="recommendationInterfaceLoad",nt.recommendationOpen="recommendationOpen",nt.likeSmartSnippet="likeSmartSnippet",nt.dislikeSmartSnippet="dislikeSmartSnippet",nt.expandSmartSnippet="expandSmartSnippet",nt.collapseSmartSnippet="collapseSmartSnippet",nt.openSmartSnippetFeedbackModal="openSmartSnippetFeedbackModal",nt.closeSmartSnippetFeedbackModal="closeSmartSnippetFeedbackModal",nt.sendSmartSnippetReason="sendSmartSnippetReason",nt.expandSmartSnippetSuggestion="expandSmartSnippetSuggestion",nt.collapseSmartSnippetSuggestion="collapseSmartSnippetSuggestion",nt.recentQueryClick="recentQueriesClick",nt.clearRecentQueries="clearRecentQueries",nt.recentResultClick="recentResultClick",nt.clearRecentResults="clearRecentResults",nt.noResultsBack="noResultsBack";var it,st,at=((et={})[tt.triggerNotify]="queryPipelineTriggers",et[tt.triggerExecute]="queryPipelineTriggers",et[tt.triggerQuery]="queryPipelineTriggers",et[tt.triggerRedirect]="queryPipelineTriggers",et[tt.queryError]="errors",et[tt.queryErrorBack]="errors",et[tt.queryErrorClear]="errors",et[tt.queryErrorRetry]="errors",et[tt.pagerNext]="getMoreResults",et[tt.pagerPrevious]="getMoreResults",et[tt.pagerNumber]="getMoreResults",et[tt.pagerResize]="getMoreResults",et[tt.pagerScrolling]="getMoreResults",et[tt.facetSearch]="facet",et[tt.facetShowLess]="facet",et[tt.facetShowMore]="facet",et[tt.recommendation]="recommendation",et[tt.likeSmartSnippet]="smartSnippet",et[tt.dislikeSmartSnippet]="smartSnippet",et[tt.expandSmartSnippet]="smartSnippet",et[tt.collapseSmartSnippet]="smartSnippet",et[tt.openSmartSnippetFeedbackModal]="smartSnippet",et[tt.closeSmartSnippetFeedbackModal]="smartSnippet",et[tt.sendSmartSnippetReason]="smartSnippet",et[tt.expandSmartSnippetSuggestion]="smartSnippetSuggestions",et[tt.collapseSmartSnippetSuggestion]="smartSnippetSuggestions",et[tt.clearRecentQueries]="recentQueries",et[tt.recentResultClick]="recentlyClickedDocuments",et[tt.clearRecentResults]="recentlyClickedDocuments",et);(st=it=it||{}).DoesNotAnswer="does_not_answer",st.PartiallyAnswers="partially_answers",st.WasNotAQuestion="was_not_a_question",st.Other="other";var ut=(ct.prototype.getPayload=function(){return Promise.resolve()},ct.prototype.getParameters=function(){return Promise.resolve()},ct.prototype.sendEvent=function(){return Promise.resolve()},ct.prototype.sendSearchEvent=function(){return Promise.resolve()},ct.prototype.sendClickEvent=function(){return Promise.resolve()},ct.prototype.sendCustomEvent=function(){return Promise.resolve()},ct.prototype.sendViewEvent=function(){return Promise.resolve()},ct.prototype.getVisit=function(){return Promise.resolve({id:"",visitorId:""})},ct.prototype.getHealth=function(){return Promise.resolve({status:""})},ct.prototype.registerBeforeSendEventHook=function(){},ct.prototype.registerAfterSendEventHook=function(){},ct.prototype.addEventTypeMapping=function(){},ct);function ct(){this.runtime=new Re,this.currentVisitorId=""}function lt(e){var n,t=e.map(function(e){return e.replace(/;/g,"")});return function e(t){var n=t.join(";");return n.length<=256?n:e(t.slice(1))}((n="",t.filter(function(e){var t=e!==n;return n=e,t})))}function pt(e){var t="string"==typeof e.partialQueries?e.partialQueries:lt(e.partialQueries),n="string"==typeof e.suggestions?e.suggestions:lt(e.suggestions);return g(g({},e),{partialQueries:t,suggestions:n})}var dt=(ft.prototype.disable=function(){this.coveoAnalyticsClient instanceof Fe&&this.coveoAnalyticsClient.clear(),this.coveoAnalyticsClient=new ut},ft.prototype.enable=function(){this.coveoAnalyticsClient=new Fe(this.opts)},ft.prototype.logInterfaceLoad=function(){return this.logSearchEvent(tt.interfaceLoad)},ft.prototype.logRecommendationInterfaceLoad=function(){return this.logSearchEvent(tt.recommendationInterfaceLoad)},ft.prototype.logRecommendation=function(){return this.logCustomEvent(tt.recommendation)},ft.prototype.logRecommendationOpen=function(e,t){return this.logClickEvent(tt.recommendationOpen,e,t)},ft.prototype.logStaticFilterClearAll=function(e){return this.logSearchEvent(tt.staticFilterClearAll,e)},ft.prototype.logStaticFilterSelect=function(e){return this.logSearchEvent(tt.staticFilterSelect,e)},ft.prototype.logStaticFilterDeselect=function(e){return this.logSearchEvent(tt.staticFilterDeselect,e)},ft.prototype.logFetchMoreResults=function(){return this.logCustomEvent(tt.pagerScrolling,{type:"getMoreResults"})},ft.prototype.logInterfaceChange=function(e){return this.logSearchEvent(tt.interfaceChange,e)},ft.prototype.logDidYouMeanAutomatic=function(){return this.logSearchEvent(tt.didyoumeanAutomatic)},ft.prototype.logDidYouMeanClick=function(){return this.logSearchEvent(tt.didyoumeanClick)},ft.prototype.logResultsSort=function(e){return this.logSearchEvent(tt.resultsSort,e)},ft.prototype.logSearchboxSubmit=function(){return this.logSearchEvent(tt.searchboxSubmit)},ft.prototype.logSearchboxClear=function(){return this.logSearchEvent(tt.searchboxClear)},ft.prototype.logSearchboxAsYouType=function(){return this.logSearchEvent(tt.searchboxAsYouType)},ft.prototype.logBreadcrumbFacet=function(e){return this.logSearchEvent(tt.breadcrumbFacet,e)},ft.prototype.logBreadcrumbResetAll=function(){return this.logSearchEvent(tt.breadcrumbResetAll)},ft.prototype.logDocumentQuickview=function(e,t){return this.logClickEvent(tt.documentQuickview,e,t)},ft.prototype.logDocumentOpen=function(e,t){return this.logClickEvent(tt.documentOpen,e,t)},ft.prototype.logOmniboxAnalytics=function(e){return this.logSearchEvent(tt.omniboxAnalytics,pt(e))},ft.prototype.logOmniboxFromLink=function(e){return this.logSearchEvent(tt.omniboxFromLink,pt(e))},ft.prototype.logSearchFromLink=function(){return this.logSearchEvent(tt.searchFromLink)},ft.prototype.logTriggerNotify=function(e){return this.logCustomEvent(tt.triggerNotify,e)},ft.prototype.logTriggerExecute=function(e){return this.logCustomEvent(tt.triggerExecute,e)},ft.prototype.logTriggerQuery=function(){var e={query:this.provider.getSearchEventRequestPayload().queryText};return this.logCustomEvent(tt.triggerQuery,e)},ft.prototype.logTriggerRedirect=function(e){var t=g(g({},e),{query:this.provider.getSearchEventRequestPayload().queryText});return this.logCustomEvent(tt.triggerRedirect,t)},ft.prototype.logPagerResize=function(e){return this.logCustomEvent(tt.pagerResize,e)},ft.prototype.logPagerNumber=function(e){return this.logCustomEvent(tt.pagerNumber,e)},ft.prototype.logPagerNext=function(e){return this.logCustomEvent(tt.pagerNext,e)},ft.prototype.logPagerPrevious=function(e){return this.logCustomEvent(tt.pagerPrevious,e)},ft.prototype.logPagerScrolling=function(){return this.logCustomEvent(tt.pagerScrolling)},ft.prototype.logFacetClearAll=function(e){return this.logSearchEvent(tt.facetClearAll,e)},ft.prototype.logFacetSearch=function(e){return this.logSearchEvent(tt.facetSearch,e)},ft.prototype.logFacetSelect=function(e){return this.logSearchEvent(tt.facetSelect,e)},ft.prototype.logFacetDeselect=function(e){return this.logSearchEvent(tt.facetDeselect,e)},ft.prototype.logFacetExclude=function(e){return this.logSearchEvent(tt.facetExclude,e)},ft.prototype.logFacetUnexclude=function(e){return this.logSearchEvent(tt.facetUnexclude,e)},ft.prototype.logFacetSelectAll=function(e){return this.logSearchEvent(tt.facetSelectAll,e)},ft.prototype.logFacetUpdateSort=function(e){return this.logSearchEvent(tt.facetUpdateSort,e)},ft.prototype.logFacetShowMore=function(e){return this.logCustomEvent(tt.facetShowMore,e)},ft.prototype.logFacetShowLess=function(e){return this.logCustomEvent(tt.facetShowLess,e)},ft.prototype.logQueryError=function(e){return this.logCustomEvent(tt.queryError,e)},ft.prototype.logQueryErrorBack=function(){return p(this,void 0,void 0,function(){return m(this,function(e){switch(e.label){case 0:return[4,this.logCustomEvent(tt.queryErrorBack)];case 1:return e.sent(),[2,this.logSearchEvent(tt.queryErrorBack)]}})})},ft.prototype.logQueryErrorRetry=function(){return p(this,void 0,void 0,function(){return m(this,function(e){switch(e.label){case 0:return[4,this.logCustomEvent(tt.queryErrorRetry)];case 1:return e.sent(),[2,this.logSearchEvent(tt.queryErrorRetry)]}})})},ft.prototype.logQueryErrorClear=function(){return p(this,void 0,void 0,function(){return m(this,function(e){switch(e.label){case 0:return[4,this.logCustomEvent(tt.queryErrorClear)];case 1:return e.sent(),[2,this.logSearchEvent(tt.queryErrorClear)]}})})},ft.prototype.logLikeSmartSnippet=function(){return this.logCustomEvent(tt.likeSmartSnippet)},ft.prototype.logDislikeSmartSnippet=function(){return this.logCustomEvent(tt.dislikeSmartSnippet)},ft.prototype.logExpandSmartSnippet=function(){return this.logCustomEvent(tt.expandSmartSnippet)},ft.prototype.logCollapseSmartSnippet=function(){return this.logCustomEvent(tt.collapseSmartSnippet)},ft.prototype.logOpenSmartSnippetFeedbackModal=function(){return this.logCustomEvent(tt.openSmartSnippetFeedbackModal)},ft.prototype.logCloseSmartSnippetFeedbackModal=function(){return this.logCustomEvent(tt.closeSmartSnippetFeedbackModal)},ft.prototype.logSmartSnippetFeedbackReason=function(e,t){return this.logCustomEvent(tt.sendSmartSnippetReason,{reason:e,details:t})},ft.prototype.logExpandSmartSnippetSuggestion=function(e){return this.logCustomEvent(tt.expandSmartSnippetSuggestion,{documentId:e})},ft.prototype.logCollapseSmartSnippetSuggestion=function(e){return this.logCustomEvent(tt.collapseSmartSnippetSuggestion,{documentId:e})},ft.prototype.logRecentQueryClick=function(){return this.logSearchEvent(tt.recentQueryClick)},ft.prototype.logClearRecentQueries=function(){return this.logCustomEvent(tt.clearRecentQueries)},ft.prototype.logRecentResultClick=function(e,t){return this.logCustomEvent(tt.recentResultClick,{info:e,identifier:t})},ft.prototype.logClearRecentResults=function(){return this.logCustomEvent(tt.clearRecentResults)},ft.prototype.logNoResultsBack=function(){return this.logSearchEvent(tt.noResultsBack)},ft.prototype.logCustomEvent=function(e,t){var n=g(g({},this.provider.getBaseMetadata()),t),r=g(g({},this.getBaseCustomEventRequest(n)),{eventType:at[e],eventValue:e});return this.coveoAnalyticsClient.sendCustomEvent(r)},ft.prototype.logCustomEventWithType=function(e,t,n){var r=g(g({},this.provider.getBaseMetadata()),n),o=g(g({},this.getBaseCustomEventRequest(r)),{eventType:t,eventValue:e});return this.coveoAnalyticsClient.sendCustomEvent(o)},ft.prototype.logSearchEvent=function(e,t){return this.coveoAnalyticsClient.sendSearchEvent(this.getBaseSearchEventRequest(e,t))},ft.prototype.logClickEvent=function(e,t,n,r){var o=g(g(g({},t),this.getBaseEventRequest(g(g({},n),r))),{searchQueryUid:this.provider.getSearchUID(),queryPipeline:this.provider.getPipeline(),actionCause:e});return this.coveoAnalyticsClient.sendClickEvent(o)},ft.prototype.getBaseSearchEventRequest=function(e,t){return g(g(g({},this.getBaseEventRequest(t)),this.provider.getSearchEventRequestPayload()),{searchQueryUid:this.provider.getSearchUID(),queryPipeline:this.provider.getPipeline(),actionCause:e})},ft.prototype.getBaseCustomEventRequest=function(e){return g(g({},this.getBaseEventRequest(e)),{lastSearchQueryUid:this.provider.getSearchUID()})},ft.prototype.getBaseEventRequest=function(e){var t=g(g({},this.provider.getBaseMetadata()),e);return g(g({},this.getOrigins()),{customData:t,language:this.provider.getLanguage(),facetState:this.provider.getFacetState?this.provider.getFacetState():[],anonymous:this.provider.getIsAnonymous()})},ft.prototype.getOrigins=function(){return{originLevel1:this.provider.getOriginLevel1(),originLevel2:this.provider.getOriginLevel2(),originLevel3:this.provider.getOriginLevel3()}},ft);function ft(e,t){this.opts=e,this.provider=t,this.coveoAnalyticsClient=!1===e.enableAnalytics?new ut:new Fe(e)}var ht=Object.freeze({__proto__:null,analytics:Le,donottrack:Ae,history:F,SimpleAnalytics:ot,storage:I,CoveoAnalyticsClient:Fe,CoveoUA:Ke,getCurrentClient:Xe,handleOneAnalyticsEvent:Ze,CoveoSearchPageClient:dt});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 vt=self.coveoua||Ze;self.coveoua=Ze,self.coveoanalytics=ht,vt.q&&a(vt.q.filter(function(e){return"init"===e[0]}),vt.q.filter(function(e){return"init"!==e[0]})).forEach(function(e){return Ze.apply(void 0,e)});return self.coveoua}();
|
|
1
|
+
var coveoua=function(){"use strict";var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function e(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var o,t,g=function(){return(g=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}).apply(this,arguments)};function y(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 p(e,s,a,c){return new(a=a||Promise)(function(n,t){function r(e){try{i(c.next(e))}catch(e){t(e)}}function o(e){try{i(c.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?n(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(r,o)}i((c=c.apply(e,s||[])).next())})}function m(n,r){var o,i,s,e,a={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return e={next:t(0),throw:t(1),return:t(2)},"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(t){return function(e){return function(t){if(o)throw new TypeError("Generator is already executing.");for(;a;)try{if(o=1,i&&(s=2&t[0]?i.return:t[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,t[1])).done)return s;switch(i=0,s&&(t=[2&t[0],s.value]),t[0]){case 0:case 1:s=t;break;case 4:return a.label++,{value:t[1],done:!1};case 5:a.label++,i=t[1],t=[0];continue;case 7:t=a.ops.pop(),a.trys.pop();continue;default:if(!(s=0<(s=a.trys).length&&s[s.length-1])&&(6===t[0]||2===t[0])){a=0;continue}if(3===t[0]&&(!s||t[1]>s[0]&&t[1]<s[3])){a.label=t[1];break}if(6===t[0]&&a.label<s[1]){a.label=s[1],s=t;break}if(s&&a.label<s[2]){a.label=s[2],a.ops.push(t);break}s[2]&&a.ops.pop(),a.trys.pop();continue}t=r.call(n,a)}catch(e){t=[6,e],i=0}finally{o=s=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}([t,e])}}}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 n(){return"undefined"!=typeof navigator}function i(){return"undefined"!=typeof document}function c(){try{return"undefined"!=typeof localStorage}catch(e){return}}function u(){return n()&&navigator.cookieEnabled}function s(){return"undefined"!=typeof crypto&&void 0!==crypto.getRandomValues}(t=o=o||{}).search="search",t.click="click",t.custom="custom",t.view="view",t.collect="collect";var l=[o.click,o.custom,o.search,o.view],d=(f.set=function(e,t,n){var r,o,i,s;i=n?((o=new Date).setTime(o.getTime()+n),"; expires="+o.toGMTString()):"",-1===(s=location.hostname).indexOf(".")?document.cookie=e+"="+t+i+"; path=/":((r=s.split(".")).shift(),h({name:e,value:t,expires:i,domain:"."+r.join(".")}),null!=f.get(e)&&f.get(e)==t||h({name:e,value:t,expires:i,domain:"."+s}))},f.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},f.erase=function(e){f.set(e,"",-1)},f);function f(){}function h(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 v(){return c()?localStorage:u()?new S:function(){try{return"undefined"!=typeof sessionStorage}catch(e){return}}()?sessionStorage:new b}var S=(w.prototype.getItem=function(e){return d.get(""+w.prefix+e)},w.prototype.removeItem=function(e){d.erase(""+w.prefix+e)},w.prototype.setItem=function(e,t){d.set(""+w.prefix+e,t)},w.prefix="coveo_",w);function w(){}var E=(k.prototype.getItem=function(e){return localStorage.getItem(e)||this.cookieStorage.getItem(e)},k.prototype.removeItem=function(e){this.cookieStorage.removeItem(e),localStorage.removeItem(e)},k.prototype.setItem=function(e,t){localStorage.setItem(e,t),this.cookieStorage.setItem(e,t)},k);function k(){this.cookieStorage=new S}var b=(C.prototype.getItem=function(e){return null},C.prototype.removeItem=function(e){},C.prototype.setItem=function(e,t){},C);function C(){}var I=Object.freeze({__proto__:null,preferredStorage:null,getAvailableStorage:v,CookieStorage:S,CookieAndLocalStorage:E,NullStorage:b}),P="__coveo.analytics.history",A=(R.prototype.addElement=function(e){e.internalTime=(new Date).getTime(),this.cropQueryElement(e);var t=this.getHistoryWithInternalTime();null!=t?this.isValidEntry(e)&&this.setHistory([e].concat(t)):this.setHistory([e])},R.prototype.addElementAsync=function(n){return p(this,void 0,void 0,function(){var t;return m(this,function(e){switch(e.label){case 0:return n.internalTime=(new Date).getTime(),this.cropQueryElement(n),[4,this.getHistoryWithInternalTimeAsync()];case 1:return null!=(t=e.sent())?this.isValidEntry(n)&&this.setHistory([n].concat(t)):this.setHistory([n]),[2]}})})},R.prototype.getHistory=function(){var e=this.getHistoryWithInternalTime();return this.stripInternalTime(e)},R.prototype.getHistoryAsync=function(){return p(this,void 0,void 0,function(){var t;return m(this,function(e){switch(e.label){case 0:return[4,this.getHistoryWithInternalTimeAsync()];case 1:return t=e.sent(),[2,this.stripInternalTime(t)]}})})},R.prototype.getHistoryWithInternalTime=function(){try{var e=this.store.getItem(P);return e&&"string"==typeof e?JSON.parse(e):[]}catch(e){return[]}},R.prototype.getHistoryWithInternalTimeAsync=function(){return p(this,void 0,void 0,function(){var t;return m(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,this.store.getItem(P)];case 1:return(t=e.sent())?[2,JSON.parse(t)]:[2,[]];case 2:return e.sent(),[2,[]];case 3:return[2]}})})},R.prototype.setHistory=function(e){try{this.store.setItem(P,JSON.stringify(e.slice(0,20)))}catch(e){}},R.prototype.clear=function(){try{this.store.removeItem(P)}catch(e){}},R.prototype.getMostRecentElement=function(){var e=this.getHistoryWithInternalTime();return null==e?null:e.sort(function(e,t){return(t.internalTime||0)-(e.internalTime||0)})[0]},R.prototype.cropQueryElement=function(e){e.name&&"query"==e.name.toLowerCase()&&null!=e.value&&(e.value=e.value.slice(0,75))},R.prototype.isValidEntry=function(e){var t=this.getMostRecentElement();return!t||t.value!=e.value||6e4<(e.internalTime||0)-(t.internalTime||0)},R.prototype.stripInternalTime=function(e){return e.map(function(e){return{name:e.name,time:e.time,value:e.value}})},R);function R(e){this.store=e||v()}function x(e){return-1!==ve.indexOf(e)}function T(e){return"custom"===e}var F=Object.freeze({__proto__:null,STORE_KEY:P,MAX_NUMBER_OF_HISTORY_ELEMENTS:20,MIN_THRESHOLD_FOR_DUPLICATE_VALUE:6e4,MAX_VALUE_SIZE:75,HistoryStore:A,default:A}),_=function(r){return p(void 0,void 0,void 0,function(){var t,n;return m(this,function(e){switch(e.label){case 0:return t=new A,n={name:"PageView",value:r,time:JSON.stringify(new Date)},[4,t.addElementAsync(n)];case 1:return e.sent(),[2]}})})},O=function(e){return e?(Number(e)^q(new Uint8Array(1))[0]%16>>Number(e)/4).toString(16):(""+1e7+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,O)},q=function(e){if(s())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},V=Object.keys,L={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"},N=a(V(L).map(function(e){return L[e]})).join("|"),D=new RegExp("^("+N+"$)"),H=[function(e){return D.test(e)}],M={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",price:"pr",quantity:"qt",coupon:"cc",position:"ps",group:"group"},j={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",position:"ps",price:"pr",group:"group"},U={action:"pa",list:"pal",listSource:"pls"},B={id:"ti",revenue:"tr",tax:"tt",shipping:"ts",coupon:"tcc",affiliation:"ta",step:"cos",option:"col"},Q={id:"quoteId",affiliation:"quoteAffiliation"},z={id:"reviewId",rating:"reviewRating",comment:"reviewComment"},Y={add:U,bookmark_add:U,bookmark_remove:U,click:U,checkout:U,checkout_option:U,detail:U,impression:U,remove:U,refund:g(g({},U),B),purchase:g(g({},U),B),quickview:U,quote:g(g({},U),Q),review:g(g({},U),z)},W=function(o,i,s,a){return V(o).reduce(function(e,t){var n,r="il"+(i+1)+a+(s+1)+(j[t]||t);return g(g({},e),((n={})[r]=o[t],n))},{})},$=V(M).map(function(e){return M[e]}),G=V(j).map(function(e){return j[e]}),K=V(U).map(function(e){return U[e]}),J=V(B).map(function(e){return B[e]}),X=V(z).map(function(e){return z[e]}),Z=V(Q).map(function(e){return Q[e]}),ee=a($,["custom"]).join("|"),te=a(G,["custom"]).join("|"),ne="(pr[0-9]+)",re="(il[0-9]+pi[0-9]+)",oe=new RegExp("^"+ne+"("+ee+")$"),ie=new RegExp("^("+re+"("+te+"))|(il[0-9]+nm)$"),se=new RegExp("^("+K.join("|")+")$"),ae=new RegExp("^("+J.join("|")+")$"),ce=new RegExp("^"+ne+"custom$"),ue=new RegExp("^"+re+"custom$"),le=new RegExp("^("+a(["loyaltyCardId","loyaltyTier","thirdPartyPersona","companyName","favoriteStore","storeName","userIndustry","userRole","userDepartment","businessUnit"],X,Z).join("|")+")$"),pe=[function(e){return ie.test(e)},function(e){return oe.test(e)},function(e){return se.test(e)},function(e){return ae.test(e)},function(e){return le.test(e)}],de=[ce,ue],fe=g(g(g(g({},{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 g(g({},e),((n={})[t]=t,n))},{})),he=g(g({},fe),{svcAction:"svc_action",svcActionData:"svc_action_data"}),ve=V(he).map(function(e){return he[e]}),ge=function(n){var r=void 0;return a(de).every(function(e){var t;return r=null===(t=e.exec(n))||void 0===t?void 0:t[1],!Boolean(r)}),r},ye=function(r,o){return V(o).reduce(function(e,t){var n;return g(g({},e),((n={})[""+r+t]=o[t],n))},{})},me=(Se.prototype.sendEvent=function(d,f){return p(this,void 0,void 0,function(){var t,n,r,o,i,s,a,c,u,l,p;return m(this,function(e){switch(e.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 t=this.opts,n=t.baseUrl,r=t.preprocessRequest,o=this.encodeForEventType(d,f),[4,this.getQueryParamsForEventType(d)];case 1:return i=e.sent(),s={url:n+"/analytics/"+d+"?"+i,body:new Blob([o],{type:"application/x-www-form-urlencoded"})},l=[g({},s)],r?[4,r(s,"analyticsBeacon")]:[3,3];case 2:return p=e.sent(),[3,4];case 3:p={},e.label=4;case 4:return a=g.apply(void 0,l.concat([p])),c=a.url,u=a.body,console.log('Sending beacon for "'+d+'" with: ',JSON.stringify(f)),navigator.sendBeacon(c,u),[2]}})})},Se.prototype.encodeForEventType=function(e,t){return this.isEventTypeLegacy(e)?this.encodeForLegacyType(e,t):this.encodeForFormUrlEncoded(g({access_token:this.opts.token},t))},Se.prototype.getQueryParamsForEventType=function(o){return p(this,void 0,void 0,function(){var t,n,r;return m(this,function(e){switch(e.label){case 0:return t=this.opts,n=t.token,[4,t.visitorIdProvider.getCurrentVisitorId()];case 1:return r=e.sent(),[2,[n&&this.isEventTypeLegacy(o)?"access_token="+n:"",r?"visitorId="+r:"","discardVisitInfo=true"].filter(function(e){return!!e}).join("&")]}})})},Se.prototype.isEventTypeLegacy=function(e){return-1!==[o.click,o.custom,o.search,o.view].indexOf(e)},Se.prototype.encodeForLegacyType=function(e,t){return e+"Event="+encodeURIComponent(JSON.stringify(t))},Se.prototype.encodeForFormUrlEncoded=function(t){var n=this;return Object.keys(t).filter(function(e){return!!t[e]}).map(function(e){return encodeURIComponent(e)+"="+encodeURIComponent(n.encodeValue(t[e]))}).join("&")},Se.prototype.encodeValue=function(e){return"number"==typeof e||"string"==typeof e||"boolean"==typeof e?e:JSON.stringify(e)},Se);function Se(e){this.opts=e}var we=(Ee.prototype.sendEvent=function(e,t){return p(this,void 0,void 0,function(){return m(this,function(e){return[2,Promise.resolve()]})})},Ee);function Ee(){}var ke=window.fetch,be=(Ce.prototype.sendEvent=function(h,v){return p(this,void 0,void 0,function(){var t,n,r,o,i,s,a,c,u,l,p,d,f;return m(this,function(e){switch(e.label){case 0:return t=this.opts,n=t.baseUrl,r=t.visitorIdProvider,o=t.preprocessRequest,this.shouldAppendVisitorId(h)?[4,this.getVisitorIdParam()]:[3,2];case 1:return i=e.sent(),[3,3];case 2:i="",e.label=3;case 3:return s={url:n+"/analytics/"+h+i,credentials:"include",mode:"cors",headers:this.getHeaders(),method:"POST",body:JSON.stringify(v)},l=[g({},s)],o?[4,o(s,"analyticsFetch")]:[3,5];case 4:return p=e.sent(),[3,6];case 5:p={},e.label=6;case 6:return a=g.apply(void 0,l.concat([p])),c=a.url,u=y(a,["url"]),[4,ke(c,u)];case 7:return(d=e.sent()).ok?[4,d.json()]:[3,9];case 8:return(f=e.sent()).visitorId&&r.setCurrentVisitorId(f.visitorId),[2,f];case 9:try{d.json()}catch(e){}throw console.error('An error has occured when sending the "'+h+'" event.',d,v),new Error('An error has occurred when sending the "'+h+'" event. Check the console logs for more details.')}})})},Ce.prototype.shouldAppendVisitorId=function(e){return-1!==[o.click,o.custom,o.search,o.view].indexOf(e)},Ce.prototype.getVisitorIdParam=function(){return p(this,void 0,void 0,function(){var t;return m(this,function(e){switch(e.label){case 0:return[4,this.opts.visitorIdProvider.getCurrentVisitorId()];case 1:return[2,(t=e.sent())?"?visitor="+t:""]}})})},Ce.prototype.getHeaders=function(){var e=this.opts.token;return g(g({},e?{Authorization:"Bearer "+e}:{}),{"Content-Type":"application/json"})},Ce);function Ce(e){this.opts=e}var Ie=function(e,i){var s=this;c()&&u()?this.storage=new E:c()?this.storage=localStorage:(console.warn("BrowserRuntime detected no valid storage available.",this),this.storage=new b),this.client=new be(e),this.beaconClient=new me(e),window.addEventListener("beforeunload",function(){for(var e=0,t=i();e<t.length;e++){var n=t[e],r=n.eventType,o=n.payload;s.beaconClient.sendEvent(r,o)}})},Pe=function(e,t){this.storage=t||new b,this.client=new be(e)},Ae=function(){this.storage=new b,this.client=new we};function Re(){return n()&&[navigator.globalPrivacyControl,navigator.doNotTrack,navigator.msDoNotTrack,window.doNotTrack].some(function(e){return!!e})}var xe=Object.freeze({__proto__:null,doNotTrack:Re,default:Re}),Te={default:"https://analytics.cloud.coveo.com/rest/ua",production:"https://analytics.cloud.coveo.com/rest/ua",hipaa:"https://analyticshipaa.cloud.coveo.com/rest/ua"},Fe=(Object.defineProperty(_e.prototype,"defaultOptions",{get:function(){return{endpoint:Te.default,token:"",version:"v15",beforeSendHooks:[],afterSendHooks:[]}},enumerable:!0,configurable:!0}),_e.prototype.initRuntime=function(e){var t=this;return"undefined"!=typeof window&&i()?new Ie(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 install @react-native-async-storage/async-storage and instantiate \n your analytics client as follows:\n \n import {ReactNativeRuntime} from 'coveo.analytics/react-native';\n \n const analytics = new CoveoAnalytics({\n ...your options,\n runtimeEnvironment: new ReactNativeRuntime();\n })\n "),new Pe(e))},Object.defineProperty(_e.prototype,"storage",{get:function(){return this.runtime.storage},enumerable:!0,configurable:!0}),_e.prototype.determineVisitorId=function(){return p(this,void 0,void 0,function(){var t;return m(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,this.storage.getItem("visitorId")];case 1:return[2,e.sent()||O()];case 2:return t=e.sent(),console.log("Could not get visitor ID from the current runtime environment storage. Using a random ID instead.",t),[2,O()];case 3:return[2]}})})},_e.prototype.getCurrentVisitorId=function(){return p(this,void 0,void 0,function(){var t;return m(this,function(e){switch(e.label){case 0:return this.visitorId?[3,3]:[4,this.determineVisitorId()];case 1:return t=e.sent(),[4,this.setCurrentVisitorId(t)];case 2:e.sent(),e.label=3;case 3:return[2,this.visitorId]}})})},_e.prototype.setCurrentVisitorId=function(t){return p(this,void 0,void 0,function(){return m(this,function(e){switch(e.label){case 0:return this.visitorId=t,[4,this.storage.setItem("visitorId",t)];case 1:return e.sent(),[2]}})})},_e.prototype.getParameters=function(t){for(var n=[],e=1;e<arguments.length;e++)n[e-1]=arguments[e];return p(this,void 0,void 0,function(){return m(this,function(e){switch(e.label){case 0:return[4,this.resolveParameters.apply(this,a([t],n))];case 1:return[2,e.sent()]}})})},_e.prototype.getPayload=function(n){for(var r=[],e=1;e<arguments.length;e++)r[e-1]=arguments[e];return p(this,void 0,void 0,function(){var t;return m(this,function(e){switch(e.label){case 0:return[4,this.resolveParameters.apply(this,a([n],r))];case 1:return t=e.sent(),[4,this.resolvePayloadForParameters(n,t)];case 2:return[2,e.sent()]}})})},Object.defineProperty(_e.prototype,"currentVisitorId",{get:function(){return"string"!=typeof(this.visitorId||this.storage.getItem("visitorId"))&&this.setCurrentVisitorId(O()),this.visitorId},set:function(e){this.visitorId=e,this.storage.setItem("visitorId",e)},enumerable:!0,configurable:!0}),_e.prototype.resolveParameters=function(u){for(var l=[],e=1;e<arguments.length;e++)l[e-1]=arguments[e];return p(this,void 0,void 0,function(){var t,n,r,o,i,s,a,c=this;return m(this,function(e){switch(e.label){case 0:return t=this.eventTypeMapping[u]||{},r=void 0===(n=t.variableLengthArgumentsNames)?[]:n,i=void 0!==(o=t.addVisitorIdParameter)&&o,a=void 0!==(s=t.usesMeasurementProtocol)&&s,[4,[function(e){return 0<r.length?c.parseVariableArgumentsPayload(r,e):e[0]},function(o){return p(c,void 0,void 0,function(){var t,n,r;return m(this,function(e){switch(e.label){case 0:return t=[g({},o)],n={},i?[4,this.getCurrentVisitorId()]:[3,2];case 1:return r=e.sent(),[3,3];case 2:r="",e.label=3;case 3:return[2,g.apply(void 0,t.concat([(n.visitorId=r,n)]))]}})})},function(e){return a?c.ensureAnonymousUserWhenUsingApiKey(e):e},function(e){return c.beforeSendHooks.reduce(function(n,r){return p(c,void 0,void 0,function(){var t;return m(this,function(e){switch(e.label){case 0:return[4,n];case 1:return t=e.sent(),[4,r(u,t)];case 2:return[2,e.sent()]}})})},e)}].reduce(function(n,r){return p(c,void 0,void 0,function(){var t;return m(this,function(e){switch(e.label){case 0:return[4,n];case 1:return t=e.sent(),[4,r(t)];case 2:return[2,e.sent()]}})})},Promise.resolve(l))];case 1:return[2,e.sent()]}})})},_e.prototype.resolvePayloadForParameters=function(r,i){return p(this,void 0,void 0,function(){var t,n,o=this;return m(this,function(e){switch(e.label){case 0:return t=(this.eventTypeMapping[r]||{}).usesMeasurementProtocol,n=void 0!==t&&t,[4,[function(e){return o.removeEmptyPayloadValues(e,r)},function(e){return o.validateParams(e)},function(e){return n?(i=!!(o=e).action&&Y[o.action]||{},V(o).reduce(function(e,t){var n,r=i[t]||he[t]||t;return g(g({},e),((n={})[r]=o[t],n))},{})):e;var o,i},function(e){return n?o.removeUnknownParameters(e):e},function(e){return n?o.processCustomParameters(e):e}].reduce(function(n,r){return p(o,void 0,void 0,function(){var t;return m(this,function(e){switch(e.label){case 0:return[4,n];case 1:return t=e.sent(),[4,r(t)];case 2:return[2,e.sent()]}})})},Promise.resolve(i))];case 1:return[2,e.sent()]}})})},_e.prototype.sendEvent=function(i){for(var s=[],e=1;e<arguments.length;e++)s[e-1]=arguments[e];return p(this,void 0,void 0,function(){var t,n,r,o;return m(this,function(e){switch(e.label){case 0:return t=(this.eventTypeMapping[i]||{}).newEventType,n=void 0===t?i:t,[4,this.resolveParameters.apply(this,a([i],s))];case 1:return r=e.sent(),[4,this.resolvePayloadForParameters(i,r)];case 2:return o=e.sent(),this.bufferedRequests.push({eventType:n,payload:o}),[4,Promise.all(this.afterSendHooks.map(function(e){return e(i,r)}))];case 3:return e.sent(),[4,this.deferExecution()];case 4:return e.sent(),[4,this.sendFromBufferWithFetch()];case 5:return[2,e.sent()]}})})},_e.prototype.deferExecution=function(){return new Promise(function(e){return setTimeout(e,0)})},_e.prototype.sendFromBufferWithFetch=function(){return p(this,void 0,void 0,function(){var t,n,r;return m(this,function(e){return(t=this.bufferedRequests.shift())?(n=t.eventType,r=t.payload,[2,this.runtime.client.sendEvent(n,r)]):[2]})})},_e.prototype.clear=function(){this.storage.removeItem("visitorId"),(new A).clear()},_e.prototype.sendSearchEvent=function(t){return p(this,void 0,void 0,function(){return m(this,function(e){return[2,this.sendEvent(o.search,t)]})})},_e.prototype.sendClickEvent=function(t){return p(this,void 0,void 0,function(){return m(this,function(e){return[2,this.sendEvent(o.click,t)]})})},_e.prototype.sendCustomEvent=function(t){return p(this,void 0,void 0,function(){return m(this,function(e){return[2,this.sendEvent(o.custom,t)]})})},_e.prototype.sendViewEvent=function(t){return p(this,void 0,void 0,function(){return m(this,function(e){return[2,this.sendEvent(o.view,t)]})})},_e.prototype.getVisit=function(){return p(this,void 0,void 0,function(){var t;return m(this,function(e){switch(e.label){case 0:return[4,fetch(this.baseUrl+"/analytics/visit")];case 1:return[4,e.sent().json()];case 2:return t=e.sent(),this.visitorId=t.visitorId,[2,t]}})})},_e.prototype.getHealth=function(){return p(this,void 0,void 0,function(){return m(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={},r=0,o=t.length;r<o;r++){var i=t[r];if("string"==typeof i)n[e[r]]=i;else if("object"==typeof i)return g(g({},n),i)}return n},_e.prototype.isKeyAllowedEmpty=function(e,t){var n;return-1!==((n={})[o.search]=["queryText"],(n[e]||[]).indexOf(t))},_e.prototype.removeEmptyPayloadValues=function(r,n){var o=this;return Object.keys(r).filter(function(e){return o.isKeyAllowedEmpty(n,e)||null!=(t=r[e])&&""!==t;var t}).reduce(function(e,t){var n;return g(g({},e),((n={})[t]=r[t],n))},{})},_e.prototype.removeUnknownParameters=function(r){return Object.keys(r).filter(function(e){if(t=e,a(pe,H,[x,T]).some(function(e){return e(t)}))return!0;var t;console.log(e,"is not processed by coveoua")}).reduce(function(e,t){var n;return g(g({},e),((n={})[t]=r[t],n))},{})},_e.prototype.processCustomParameters=function(e){var o,t=e.custom,n=y(e,["custom"]),r=this.lowercaseKeys(t),i=V(o=n).reduce(function(e,t){var n,r=ge(t);return g(g({},e),r?ye(r,o[t]):((n={})[t]=o[t],n))},{});return g(g({},r),i)},_e.prototype.lowercaseKeys=function(r){return Object.keys(r||{}).reduce(function(e,t){var n;return g(g({},e),((n={})[t.toLowerCase()]=r[t],n))},{})},_e.prototype.validateParams=function(e){var t=e.anonymizeIp,n=y(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=y(e,["userId"]);return null!=(t=this.options.token)&&t.startsWith("xx")&&!n?(r.userId="anonymous",r):e},Object.defineProperty(_e.prototype,"baseUrl",{get:function(){var e=this.options,t=e.version,n=e.endpoint,r=-1!==n.indexOf(".cloud.coveo.com");return n+(r?"":"/rest")+"/"+t},enumerable:!0,configurable:!0}),_e);function _e(e){if(!e)throw new Error("You have to pass options to this constructor");this.options=g(g({},this.defaultOptions),e),this.visitorId="",this.bufferedRequests=[],this.beforeSendHooks=[function(t,n){return p(void 0,void 0,void 0,function(){return m(this,function(e){switch(e.label){case 0:return t!==o.view?[3,2]:[4,_(n.contentIdValue)];case 1:return e.sent(),[2,g({location:window.location.toString(),referrer:document.referrer,title:document.title},n)];case 2:return[2,n]}})})},function(e,t){return-1!==l.indexOf(e)?g({language:i()?document.documentElement.lang:"unknown",userAgent:n()?navigator.userAgent:"unknown"},t):t}].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),Re()&&(this.clear(),this.runtime.storage=new b)}function Oe(e){return e.protocol+"//"+e.hostname+(0===e.pathname.indexOf("/")?e.pathname:"/"+e.pathname)+e.search}var qe=Object.freeze({__proto__:null,Version:"v15",Endpoints:Te,CoveoAnalyticsClient:Fe,default:Fe}),Ve={pageview:"pageview",event:"event"},Le=(Ne.prototype.setAction=function(e,t){this.action=e,this.actionData=t},Ne.prototype.clearData=function(){this.clearPluginData(),this.action=void 0,this.actionData={}},Ne.prototype.getLocationInformation=function(e,t){return g({hitType:e},this.getNextValues(e,t))},Ne.prototype.updateLocationInformation=function(e,t){this.updateLocationForNextPageView(e,t)},Ne.prototype.getDefaultContextInformation=function(e){var t={title:document.title,encoding:document.characterSet},n={screenResolution:screen.width+"x"+screen.height,screenColor:screen.colorDepth+"-bit"},r={language:navigator.language,userAgent:navigator.userAgent},o={time:Date.now().toString(),eventId:this.uuidGenerator()};return g(g(g(g({},o),n),r),t)},Ne.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===Ve.pageview&&(this.nextPageViewId=this.uuidGenerator(),this.hasSentFirstPageView=!0)},Ne.prototype.getNextValues=function(e,t){return{pageViewId:e===Ve.pageview?this.nextPageViewId:this.pageViewId,referrer:e===Ve.pageview&&this.hasSentFirstPageView?this.currentLocation:this.lastReferrer,location:e===Ve.pageview?this.getCurrentLocationFromPayload(t):this.currentLocation}},Ne.prototype.getCurrentLocationFromPayload=function(e){return e.page?""+this.currentLocation.split("/").slice(0,3).join("/")+e.page.replace(/^\/?(.*)$/,"/$1"):Oe(window.location)},Ne);function Ne(e){var t=e.client,n=e.uuidGenerator,r=void 0===n?O:n;this.actionData={},this.client=t,this.uuidGenerator=r,this.pageViewId=r(),this.nextPageViewId=this.pageViewId,this.currentLocation=Oe(window.location),this.lastReferrer=document.referrer,this.addHooks()}var De,He=g({},Ve),Me=Object.keys(He).map(function(e){return He[e]});function je(e){var t=e.client,n=e.uuidGenerator,r=void 0===n?O:n,o=De.call(this,{client:t,uuidGenerator:r})||this;return o.products=[],o.impressions=[],o}var Ue,Be=(e(je,De=Le),je.prototype.addHooks=function(){this.addHooksForPageView(),this.addHooksForEvent(),this.addHooksForECEvents()},je.prototype.addProduct=function(e){this.products.push(e)},je.prototype.addImpression=function(e){this.impressions.push(e)},je.prototype.clearPluginData=function(){this.products=[],this.impressions=[]},je.prototype.addHooksForECEvents=function(){var o=this;this.client.registerBeforeSendEventHook(function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=t[0];return-1!==Me.indexOf(e)?o.addECDataToPayload(e,r):r}),this.client.registerAfterSendEventHook(function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=t[0];return-1!==Me.indexOf(e)&&o.updateLocationInformation(e,r),r})},je.prototype.addHooksForPageView=function(){this.client.addEventTypeMapping(He.pageview,{newEventType:o.collect,variableLengthArgumentsNames:["page"],addVisitorIdParameter:!0,usesMeasurementProtocol:!0})},je.prototype.addHooksForEvent=function(){this.client.addEventTypeMapping(He.event,{newEventType:o.collect,variableLengthArgumentsNames:["eventCategory","eventAction","eventLabel","eventValue"],addVisitorIdParameter:!0,usesMeasurementProtocol:!0})},je.prototype.addECDataToPayload=function(e,t){var n=g(g(g(g({},this.getLocationInformation(e,t)),this.getDefaultContextInformation(e)),this.action?{action:this.action}:{}),this.actionData||{}),r=this.getProductPayload(),o=this.getImpressionPayload();return this.clearData(),g(g(g(g({},o),r),n),t)},je.prototype.getProductPayload=function(){var t=this;return this.products.map(function(e){return t.assureProductValidity(e)}).reduce(function(e,t,n){return g(g({},e),(i=n,V(o=t).reduce(function(e,t){var n,r="pr"+(i+1)+(M[t]||t);return g(g({},e),((n={})[r]=o[t],n))},{})));var o,i},{})},je.prototype.getImpressionPayload=function(){var r=this;return this.getImpressionsByList().map(function(e){var t=e.impressions,n=y(e,["impressions"]);return g(g({},n),{impressions:t.map(function(e){return r.assureBaseImpressionValidity(e)})})}).reduce(function(e,t,n){return g(g({},e),function(e,r,o){var t=e.impressions.reduce(function(e,t,n){return g(g({},e),W(t,r,n,o))},{});return e.listName&&(t["il"+(r+1)+"nm"]=e.listName),t}(t,n,"pi"))},{})},je.prototype.assureProductValidity=function(e){var t=e.position,n=y(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},je.prototype.assureBaseImpressionValidity=function(e){var t=e.position,n=y(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},je.prototype.getImpressionsByList=function(){return this.impressions.reduce(function(e,t){var n=t.list,r=y(t,["list"]),o=e.find(function(e){return e.listName===n});return o?o.impressions.push(r):e.push({listName:n,impressions:[r]}),e},[])},je.Id="ec",je),Qe=g({},Ve),ze=Object.keys(Qe).map(function(e){return Qe[e]}),Ye=(e(We,Ue=Le),We.prototype.addHooks=function(){this.addHooksForEvent(),this.addHooksForPageView(),this.addHooksForSVCEvents()},We.prototype.setTicket=function(e){this.ticket=e},We.prototype.clearPluginData=function(){this.ticket={}},We.prototype.addHooksForSVCEvents=function(){var o=this;this.client.registerBeforeSendEventHook(function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=t[0];return-1!==ze.indexOf(e)?o.addSVCDataToPayload(e,r):r}),this.client.registerAfterSendEventHook(function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=t[0];return-1!==ze.indexOf(e)&&o.updateLocationInformation(e,r),r})},We.prototype.addHooksForPageView=function(){this.client.addEventTypeMapping(Qe.pageview,{newEventType:o.collect,variableLengthArgumentsNames:["page"],addVisitorIdParameter:!0,usesMeasurementProtocol:!0})},We.prototype.addHooksForEvent=function(){this.client.addEventTypeMapping(Qe.event,{newEventType:o.collect,variableLengthArgumentsNames:["eventCategory","eventAction","eventLabel","eventValue"],addVisitorIdParameter:!0,usesMeasurementProtocol:!0})},We.prototype.addSVCDataToPayload=function(e,t){var n,r=g(g(g(g({},this.getLocationInformation(e,t)),this.getDefaultContextInformation(e)),this.action?{svcAction:this.action}:{}),0<Object.keys(null!==(n=this.actionData)&&void 0!==n?n:{}).length?{svcActionData:this.actionData}:{}),o=this.getTicketPayload();return this.clearData(),g(g(g({},o),r),t)},We.prototype.getTicketPayload=function(){return o=this.ticket,V(o).filter(function(e){return void 0!==o[e]}).reduce(function(e,t){var n,r=L[t]||t;return g(g({},e),((n={})[r]=o[t],n))},{});var o},We.Id="svc",We);function We(e){var t=e.client,n=e.uuidGenerator,r=void 0===n?O:n,o=Ue.call(this,{client:t,uuidGenerator:r})||this;return o.ticket={},o}var $e=Ye,Ge=(Ke.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)},Ke.prototype.provide=function(e,t){this.registeredPluginsMap[e]=t},Ke.prototype.clearRequired=function(){this.requiredPlugins={}},Ke.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)},Ke.DefaultPlugins=[Be.Id,$e.Id],Ke);function Ke(){var e;this.registeredPluginsMap=((e={})[Be.Id]=Be,e[$e.Id]=$e,e),this.requiredPlugins={}}var Je=(Xe.prototype.init=function(e,t){var n=this;if(!e)throw new Error("You must pass your token when you call 'init'");if("string"==typeof e?this.client=new Fe({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 r={client:this.client};this.plugins.clearRequired(),this.getPluginKeys(t).forEach(function(e){return n.plugins.require(e,r)}),this.client.registerBeforeSendEventHook(function(e,t){return g(g({},t),n.params)})},Xe.prototype.isAnalyticsClient=function(e){return"object"==typeof e&&void 0!==e.sendEvent},Xe.prototype.getPluginKeys=function(e){return"string"!=typeof e&&Array.isArray(null==e?void 0:e.plugins)?e.plugins:Ge.DefaultPlugins},Xe.prototype.getEndpoint=function(e){return"string"==typeof e?e||Te.default:null!=e&&e.endpoint?e.endpoint:Te.default},Xe.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 Fe({endpoint:e})},Xe.prototype.set=function(t,e){var n=this;"string"==typeof t?this.params[t]=e:Object.keys(t).map(function(e){n.params[e]=t[e]})},Xe.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))},Xe.prototype.onLoad=function(e){if(void 0===e)throw new Error("You must pass a function when you call 'onLoad'");e()},Xe.prototype.provide=function(e,t){this.plugins.provide(e,t)},Xe.prototype.require=function(e,t){if(!this.client)throw new Error("You must call init before requiring a plugin");this.plugins.require(e,g(g({},t),{client:this.client}))},Xe.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))},Xe.prototype.reset=function(){this.client=void 0,this.plugins=new Ge,this.params={}},Xe);function Xe(){this.plugins=new Ge,this.params={}}function Ze(){return ot.client}function et(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=ot[i];if(o&&i)return ot.callPlugin.apply(ot,a([o,i],t));if(s)return s.apply(ot,t);throw new Error('The action "'+e+'" does not exist. Available actions: '+["init","set","send","onLoad","callPlugin","reset","require","provide"].join(", ")+".")}var tt,nt,rt,ot=new Je,it=Object.freeze({__proto__:null,CoveoUA:Je,coveoua:ot,getCurrentClient:Ze,handleOneAnalyticsEvent:et,default:et});(rt=nt=nt||{}).interfaceLoad="interfaceLoad",rt.interfaceChange="interfaceChange",rt.didyoumeanAutomatic="didyoumeanAutomatic",rt.didyoumeanClick="didyoumeanClick",rt.resultsSort="resultsSort",rt.searchboxSubmit="searchboxSubmit",rt.searchboxClear="searchboxClear",rt.searchboxAsYouType="searchboxAsYouType",rt.breadcrumbFacet="breadcrumbFacet",rt.breadcrumbResetAll="breadcrumbResetAll",rt.documentQuickview="documentQuickview",rt.documentOpen="documentOpen",rt.omniboxAnalytics="omniboxAnalytics",rt.omniboxFromLink="omniboxFromLink",rt.searchFromLink="searchFromLink",rt.triggerNotify="notify",rt.triggerExecute="execute",rt.triggerQuery="query",rt.triggerRedirect="redirect",rt.pagerResize="pagerResize",rt.pagerNumber="pagerNumber",rt.pagerNext="pagerNext",rt.pagerPrevious="pagerPrevious",rt.pagerScrolling="pagerScrolling",rt.staticFilterClearAll="staticFilterClearAll",rt.staticFilterSelect="staticFilterSelect",rt.staticFilterDeselect="staticFilterDeselect",rt.facetClearAll="facetClearAll",rt.facetSearch="facetSearch",rt.facetSelect="facetSelect",rt.facetSelectAll="facetSelectAll",rt.facetDeselect="facetDeselect",rt.facetExclude="facetExclude",rt.facetUnexclude="facetUnexclude",rt.facetUpdateSort="facetUpdateSort",rt.facetShowMore="showMoreFacetResults",rt.facetShowLess="showLessFacetResults",rt.queryError="query",rt.queryErrorBack="errorBack",rt.queryErrorClear="errorClearQuery",rt.queryErrorRetry="errorRetry",rt.recommendation="recommendation",rt.recommendationInterfaceLoad="recommendationInterfaceLoad",rt.recommendationOpen="recommendationOpen",rt.likeSmartSnippet="likeSmartSnippet",rt.dislikeSmartSnippet="dislikeSmartSnippet",rt.expandSmartSnippet="expandSmartSnippet",rt.collapseSmartSnippet="collapseSmartSnippet",rt.openSmartSnippetFeedbackModal="openSmartSnippetFeedbackModal",rt.closeSmartSnippetFeedbackModal="closeSmartSnippetFeedbackModal",rt.sendSmartSnippetReason="sendSmartSnippetReason",rt.expandSmartSnippetSuggestion="expandSmartSnippetSuggestion",rt.collapseSmartSnippetSuggestion="collapseSmartSnippetSuggestion",rt.recentQueryClick="recentQueriesClick",rt.clearRecentQueries="clearRecentQueries",rt.recentResultClick="recentResultClick",rt.clearRecentResults="clearRecentResults",rt.noResultsBack="noResultsBack";var st,at,ct=((tt={})[nt.triggerNotify]="queryPipelineTriggers",tt[nt.triggerExecute]="queryPipelineTriggers",tt[nt.triggerQuery]="queryPipelineTriggers",tt[nt.triggerRedirect]="queryPipelineTriggers",tt[nt.queryError]="errors",tt[nt.queryErrorBack]="errors",tt[nt.queryErrorClear]="errors",tt[nt.queryErrorRetry]="errors",tt[nt.pagerNext]="getMoreResults",tt[nt.pagerPrevious]="getMoreResults",tt[nt.pagerNumber]="getMoreResults",tt[nt.pagerResize]="getMoreResults",tt[nt.pagerScrolling]="getMoreResults",tt[nt.facetSearch]="facet",tt[nt.facetShowLess]="facet",tt[nt.facetShowMore]="facet",tt[nt.recommendation]="recommendation",tt[nt.likeSmartSnippet]="smartSnippet",tt[nt.dislikeSmartSnippet]="smartSnippet",tt[nt.expandSmartSnippet]="smartSnippet",tt[nt.collapseSmartSnippet]="smartSnippet",tt[nt.openSmartSnippetFeedbackModal]="smartSnippet",tt[nt.closeSmartSnippetFeedbackModal]="smartSnippet",tt[nt.sendSmartSnippetReason]="smartSnippet",tt[nt.expandSmartSnippetSuggestion]="smartSnippetSuggestions",tt[nt.collapseSmartSnippetSuggestion]="smartSnippetSuggestions",tt[nt.clearRecentQueries]="recentQueries",tt[nt.recentResultClick]="recentlyClickedDocuments",tt[nt.clearRecentResults]="recentlyClickedDocuments",tt);(at=st=st||{}).DoesNotAnswer="does_not_answer",at.PartiallyAnswers="partially_answers",at.WasNotAQuestion="was_not_a_question",at.Other="other";var ut=(lt.prototype.getPayload=function(){return Promise.resolve()},lt.prototype.getParameters=function(){return Promise.resolve()},lt.prototype.sendEvent=function(){return Promise.resolve()},lt.prototype.sendSearchEvent=function(){return Promise.resolve()},lt.prototype.sendClickEvent=function(){return Promise.resolve()},lt.prototype.sendCustomEvent=function(){return Promise.resolve()},lt.prototype.sendViewEvent=function(){return Promise.resolve()},lt.prototype.getVisit=function(){return Promise.resolve({id:"",visitorId:""})},lt.prototype.getHealth=function(){return Promise.resolve({status:""})},lt.prototype.registerBeforeSendEventHook=function(){},lt.prototype.registerAfterSendEventHook=function(){},lt.prototype.addEventTypeMapping=function(){},lt);function lt(){this.runtime=new Ae,this.currentVisitorId=""}function pt(e){var n,t=e.map(function(e){return e.replace(/;/g,"")});return function e(t){var n=t.join(";");return n.length<=256?n:e(t.slice(1))}((n="",t.filter(function(e){var t=e!==n;return n=e,t})))}function dt(e){var t="string"==typeof e.partialQueries?e.partialQueries:pt(e.partialQueries),n="string"==typeof e.suggestions?e.suggestions:pt(e.suggestions);return g(g({},e),{partialQueries:t,suggestions:n})}var ft,ht,vt,gt,yt,mt,St=(wt.prototype.disable=function(){this.coveoAnalyticsClient instanceof Fe&&this.coveoAnalyticsClient.clear(),this.coveoAnalyticsClient=new ut},wt.prototype.enable=function(){this.coveoAnalyticsClient=new Fe(this.opts)},wt.prototype.logInterfaceLoad=function(){return this.logSearchEvent(nt.interfaceLoad)},wt.prototype.logRecommendationInterfaceLoad=function(){return this.logSearchEvent(nt.recommendationInterfaceLoad)},wt.prototype.logRecommendation=function(){return this.logCustomEvent(nt.recommendation)},wt.prototype.logRecommendationOpen=function(e,t){return this.logClickEvent(nt.recommendationOpen,e,t)},wt.prototype.logStaticFilterClearAll=function(e){return this.logSearchEvent(nt.staticFilterClearAll,e)},wt.prototype.logStaticFilterSelect=function(e){return this.logSearchEvent(nt.staticFilterSelect,e)},wt.prototype.logStaticFilterDeselect=function(e){return this.logSearchEvent(nt.staticFilterDeselect,e)},wt.prototype.logFetchMoreResults=function(){return this.logCustomEvent(nt.pagerScrolling,{type:"getMoreResults"})},wt.prototype.logInterfaceChange=function(e){return this.logSearchEvent(nt.interfaceChange,e)},wt.prototype.logDidYouMeanAutomatic=function(){return this.logSearchEvent(nt.didyoumeanAutomatic)},wt.prototype.logDidYouMeanClick=function(){return this.logSearchEvent(nt.didyoumeanClick)},wt.prototype.logResultsSort=function(e){return this.logSearchEvent(nt.resultsSort,e)},wt.prototype.logSearchboxSubmit=function(){return this.logSearchEvent(nt.searchboxSubmit)},wt.prototype.logSearchboxClear=function(){return this.logSearchEvent(nt.searchboxClear)},wt.prototype.logSearchboxAsYouType=function(){return this.logSearchEvent(nt.searchboxAsYouType)},wt.prototype.logBreadcrumbFacet=function(e){return this.logSearchEvent(nt.breadcrumbFacet,e)},wt.prototype.logBreadcrumbResetAll=function(){return this.logSearchEvent(nt.breadcrumbResetAll)},wt.prototype.logDocumentQuickview=function(e,t){return this.logClickEvent(nt.documentQuickview,e,t)},wt.prototype.logDocumentOpen=function(e,t){return this.logClickEvent(nt.documentOpen,e,t)},wt.prototype.logOmniboxAnalytics=function(e){return this.logSearchEvent(nt.omniboxAnalytics,dt(e))},wt.prototype.logOmniboxFromLink=function(e){return this.logSearchEvent(nt.omniboxFromLink,dt(e))},wt.prototype.logSearchFromLink=function(){return this.logSearchEvent(nt.searchFromLink)},wt.prototype.logTriggerNotify=function(e){return this.logCustomEvent(nt.triggerNotify,e)},wt.prototype.logTriggerExecute=function(e){return this.logCustomEvent(nt.triggerExecute,e)},wt.prototype.logTriggerQuery=function(){var e={query:this.provider.getSearchEventRequestPayload().queryText};return this.logCustomEvent(nt.triggerQuery,e)},wt.prototype.logTriggerRedirect=function(e){var t=g(g({},e),{query:this.provider.getSearchEventRequestPayload().queryText});return this.logCustomEvent(nt.triggerRedirect,t)},wt.prototype.logPagerResize=function(e){return this.logCustomEvent(nt.pagerResize,e)},wt.prototype.logPagerNumber=function(e){return this.logCustomEvent(nt.pagerNumber,e)},wt.prototype.logPagerNext=function(e){return this.logCustomEvent(nt.pagerNext,e)},wt.prototype.logPagerPrevious=function(e){return this.logCustomEvent(nt.pagerPrevious,e)},wt.prototype.logPagerScrolling=function(){return this.logCustomEvent(nt.pagerScrolling)},wt.prototype.logFacetClearAll=function(e){return this.logSearchEvent(nt.facetClearAll,e)},wt.prototype.logFacetSearch=function(e){return this.logSearchEvent(nt.facetSearch,e)},wt.prototype.logFacetSelect=function(e){return this.logSearchEvent(nt.facetSelect,e)},wt.prototype.logFacetDeselect=function(e){return this.logSearchEvent(nt.facetDeselect,e)},wt.prototype.logFacetExclude=function(e){return this.logSearchEvent(nt.facetExclude,e)},wt.prototype.logFacetUnexclude=function(e){return this.logSearchEvent(nt.facetUnexclude,e)},wt.prototype.logFacetSelectAll=function(e){return this.logSearchEvent(nt.facetSelectAll,e)},wt.prototype.logFacetUpdateSort=function(e){return this.logSearchEvent(nt.facetUpdateSort,e)},wt.prototype.logFacetShowMore=function(e){return this.logCustomEvent(nt.facetShowMore,e)},wt.prototype.logFacetShowLess=function(e){return this.logCustomEvent(nt.facetShowLess,e)},wt.prototype.logQueryError=function(e){return this.logCustomEvent(nt.queryError,e)},wt.prototype.logQueryErrorBack=function(){return p(this,void 0,void 0,function(){return m(this,function(e){switch(e.label){case 0:return[4,this.logCustomEvent(nt.queryErrorBack)];case 1:return e.sent(),[2,this.logSearchEvent(nt.queryErrorBack)]}})})},wt.prototype.logQueryErrorRetry=function(){return p(this,void 0,void 0,function(){return m(this,function(e){switch(e.label){case 0:return[4,this.logCustomEvent(nt.queryErrorRetry)];case 1:return e.sent(),[2,this.logSearchEvent(nt.queryErrorRetry)]}})})},wt.prototype.logQueryErrorClear=function(){return p(this,void 0,void 0,function(){return m(this,function(e){switch(e.label){case 0:return[4,this.logCustomEvent(nt.queryErrorClear)];case 1:return e.sent(),[2,this.logSearchEvent(nt.queryErrorClear)]}})})},wt.prototype.logLikeSmartSnippet=function(){return this.logCustomEvent(nt.likeSmartSnippet)},wt.prototype.logDislikeSmartSnippet=function(){return this.logCustomEvent(nt.dislikeSmartSnippet)},wt.prototype.logExpandSmartSnippet=function(){return this.logCustomEvent(nt.expandSmartSnippet)},wt.prototype.logCollapseSmartSnippet=function(){return this.logCustomEvent(nt.collapseSmartSnippet)},wt.prototype.logOpenSmartSnippetFeedbackModal=function(){return this.logCustomEvent(nt.openSmartSnippetFeedbackModal)},wt.prototype.logCloseSmartSnippetFeedbackModal=function(){return this.logCustomEvent(nt.closeSmartSnippetFeedbackModal)},wt.prototype.logSmartSnippetFeedbackReason=function(e,t){return this.logCustomEvent(nt.sendSmartSnippetReason,{reason:e,details:t})},wt.prototype.logExpandSmartSnippetSuggestion=function(e){return this.logCustomEvent(nt.expandSmartSnippetSuggestion,{documentId:e})},wt.prototype.logCollapseSmartSnippetSuggestion=function(e){return this.logCustomEvent(nt.collapseSmartSnippetSuggestion,{documentId:e})},wt.prototype.logRecentQueryClick=function(){return this.logSearchEvent(nt.recentQueryClick)},wt.prototype.logClearRecentQueries=function(){return this.logCustomEvent(nt.clearRecentQueries)},wt.prototype.logRecentResultClick=function(e,t){return this.logCustomEvent(nt.recentResultClick,{info:e,identifier:t})},wt.prototype.logClearRecentResults=function(){return this.logCustomEvent(nt.clearRecentResults)},wt.prototype.logNoResultsBack=function(){return this.logSearchEvent(nt.noResultsBack)},wt.prototype.logCustomEvent=function(e,t){var n=g(g({},this.provider.getBaseMetadata()),t),r=g(g({},this.getBaseCustomEventRequest(n)),{eventType:ct[e],eventValue:e});return this.coveoAnalyticsClient.sendCustomEvent(r)},wt.prototype.logCustomEventWithType=function(e,t,n){var r=g(g({},this.provider.getBaseMetadata()),n),o=g(g({},this.getBaseCustomEventRequest(r)),{eventType:t,eventValue:e});return this.coveoAnalyticsClient.sendCustomEvent(o)},wt.prototype.logSearchEvent=function(e,t){return this.coveoAnalyticsClient.sendSearchEvent(this.getBaseSearchEventRequest(e,t))},wt.prototype.logClickEvent=function(e,t,n,r){var o=g(g(g({},t),this.getBaseEventRequest(g(g({},n),r))),{searchQueryUid:this.provider.getSearchUID(),queryPipeline:this.provider.getPipeline(),actionCause:e});return this.coveoAnalyticsClient.sendClickEvent(o)},wt.prototype.getBaseSearchEventRequest=function(e,t){return g(g(g({},this.getBaseEventRequest(t)),this.provider.getSearchEventRequestPayload()),{searchQueryUid:this.provider.getSearchUID(),queryPipeline:this.provider.getPipeline(),actionCause:e})},wt.prototype.getBaseCustomEventRequest=function(e){return g(g({},this.getBaseEventRequest(e)),{lastSearchQueryUid:this.provider.getSearchUID()})},wt.prototype.getBaseEventRequest=function(e){var t=g(g({},this.provider.getBaseMetadata()),e);return g(g({},this.getOrigins()),{customData:t,language:this.provider.getLanguage(),facetState:this.provider.getFacetState?this.provider.getFacetState():[],anonymous:this.provider.getIsAnonymous()})},wt.prototype.getOrigins=function(){return{originLevel1:this.provider.getOriginLevel1(),originLevel2:this.provider.getOriginLevel2(),originLevel3:this.provider.getOriginLevel3()}},wt);function wt(e,t){this.opts=e,this.provider=t,this.coveoAnalyticsClient=!1===e.enableAnalytics?new ut:new Fe(e)}(ht=ft=ft||{}).click="click",ht.flowStart="flowStart",(gt=vt=vt||{}).enterInterface="ticket_create_start",gt.fieldUpdate="ticket_field_update",gt.fieldSuggestionClick="ticket_classification_click",gt.suggestionClick="suggestion_click",gt.suggestionRate="suggestion_rate",gt.nextCaseStep="ticket_next_stage",gt.caseCancelled="ticket_cancel",gt.caseSolved="ticket_cancel",gt.caseCreated="ticket_create",(mt=yt=yt||{}).quit="Quit",mt.solved="Solved";var Et=(kt.prototype.disable=function(){this.coveoAnalyticsClient instanceof Fe&&this.coveoAnalyticsClient.clear(),this.coveoAnalyticsClient=new ut,this.svc=new Ye({client:this.coveoAnalyticsClient})},kt.prototype.enable=function(){this.coveoAnalyticsClient=new Fe(this.options),this.svc=new Ye({client:this.coveoAnalyticsClient})},kt.prototype.logEnterInterface=function(e){return this.svc.setAction(vt.enterInterface),this.svc.setTicket(e.ticket),this.sendFlowStartEvent()},kt.prototype.logUpdateCaseField=function(e){return this.svc.setAction(vt.fieldUpdate,{fieldName:e.fieldName}),this.svc.setTicket(e.ticket),this.sendClickEvent()},kt.prototype.logSelectFieldSuggestion=function(e){return this.svc.setAction(vt.fieldSuggestionClick,e.suggestion),this.svc.setTicket(e.ticket),this.sendClickEvent()},kt.prototype.logSelectDocumentSuggestion=function(e){return this.svc.setAction(vt.suggestionClick,e.suggestion),this.svc.setTicket(e.ticket),this.sendClickEvent()},kt.prototype.logRateDocumentSuggestion=function(e){return this.svc.setAction(vt.suggestionRate,g({rate:e.rating},e.suggestion)),this.svc.setTicket(e.ticket),this.sendClickEvent()},kt.prototype.logMoveToNextCaseStep=function(e){return this.svc.setAction(vt.nextCaseStep),this.svc.setTicket(e.ticket),this.sendClickEvent()},kt.prototype.logCaseCancelled=function(e){return this.svc.setAction(vt.caseCancelled,{reason:yt.quit}),this.svc.setTicket(e.ticket),this.sendClickEvent()},kt.prototype.logCaseSolved=function(e){return this.svc.setAction(vt.caseSolved,{reason:yt.solved}),this.svc.setTicket(e.ticket),this.sendClickEvent()},kt.prototype.logCaseCreated=function(e){return this.svc.setAction(vt.caseCreated),this.svc.setTicket(e.ticket),this.sendClickEvent()},kt.prototype.sendFlowStartEvent=function(){return this.coveoAnalyticsClient.sendEvent("event","svc",ft.flowStart)},kt.prototype.sendClickEvent=function(){return this.coveoAnalyticsClient.sendEvent("event","svc",ft.click)},kt);function kt(e){var t,n=null===(t=(this.options=e).enableAnalytics)||void 0===t||t;this.coveoAnalyticsClient=n?new Fe(e):new ut,this.svc=new Ye({client:this.coveoAnalyticsClient})}var bt=Object.freeze({__proto__:null,analytics:qe,donottrack:xe,history:F,SimpleAnalytics:it,storage:I,CoveoAnalyticsClient:Fe,CoveoUA:Je,getCurrentClient:Ze,handleOneAnalyticsEvent:et,CoveoSearchPageClient:St,CaseAssistClient:Et});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 Ct=self.coveoua||et;self.coveoua=et,self.coveoanalytics=bt,Ct.q&&a(Ct.q.filter(function(e){return"init"===e[0]}),Ct.q.filter(function(e){return"init"!==e[0]})).forEach(function(e){return et.apply(void 0,e)});return self.coveoua}();
|
|
2
2
|
//# sourceMappingURL=coveoua.browser.js.map
|