(()=>{var e={1989:(e,t,r)=>{var n=r(1789),a=r(401),o=r(7667),i=r(1327),s=r(1866);function c(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t{var n=r(7040),a=r(4125),o=r(2117),i=r(7518),s=r(4705);function c(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t{var n=r(852)(r(5639),"Map");e.exports=n},3369:(e,t,r)=>{var n=r(4785),a=r(1285),o=r(6e3),i=r(9916),s=r(5265);function c(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t{var n=r(8407),a=r(7465),o=r(3779),i=r(7599),s=r(4758),c=r(4309);function u(e){var t=this.__data__=new n(e);this.size=t.size}u.prototype.clear=a,u.prototype.delete=o,u.prototype.get=i,u.prototype.has=s,u.prototype.set=c,e.exports=u},2705:(e,t,r)=>{var n=r(5639).Symbol;e.exports=n},1149:(e,t,r)=>{var n=r(5639).Uint8Array;e.exports=n},6874:e=>{e.exports=function(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}},4636:(e,t,r)=>{var n=r(2545),a=r(5694),o=r(1469),i=r(4144),s=r(5776),c=r(6719),u=Object.prototype.hasOwnProperty;e.exports=function(e,t){var r=o(e),l=!r&&a(e),d=!r&&!l&&i(e),p=!r&&!l&&!d&&c(e),v=r||l||d||p,f=v?n(e.length,String):[],y=f.length;for(var g in e)!t&&!u.call(e,g)||v&&("length"==g||d&&("offset"==g||"parent"==g)||p&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||s(g,y))||f.push(g);return f}},6556:(e,t,r)=>{var n=r(9465),a=r(7813);e.exports=function(e,t,r){(void 0!==r&&!a(e[t],r)||void 0===r&&!(t in e))&&n(e,t,r)}},4865:(e,t,r)=>{var n=r(9465),a=r(7813),o=Object.prototype.hasOwnProperty;e.exports=function(e,t,r){var i=e[t];o.call(e,t)&&a(i,r)&&(void 0!==r||t in e)||n(e,t,r)}},8470:(e,t,r)=>{var n=r(7813);e.exports=function(e,t){for(var r=e.length;r--;)if(n(e[r][0],t))return r;return-1}},9465:(e,t,r)=>{var n=r(8777);e.exports=function(e,t,r){"__proto__"==t&&n?n(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}},3118:(e,t,r)=>{var n=r(3218),a=Object.create,o=function(){function e(){}return function(t){if(!n(t))return{};if(a)return a(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();e.exports=o},8483:(e,t,r)=>{var n=r(5063)();e.exports=n},4239:(e,t,r)=>{var n=r(2705),a=r(9607),o=r(2333),i=n?n.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":i&&i in Object(e)?a(e):o(e)}},9454:(e,t,r)=>{var n=r(4239),a=r(7005);e.exports=function(e){return a(e)&&"[object Arguments]"==n(e)}},8458:(e,t,r)=>{var n=r(3560),a=r(5346),o=r(3218),i=r(346),s=/^\[object .+?Constructor\]$/,c=Function.prototype,u=Object.prototype,l=c.toString,d=u.hasOwnProperty,p=RegExp("^"+l.call(d).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!o(e)||a(e))&&(n(e)?p:s).test(i(e))}},8749:(e,t,r)=>{var n=r(4239),a=r(1780),o=r(7005),i={};i["[object Float32Array]"]=i["[object Float64Array]"]=i["[object Int8Array]"]=i["[object Int16Array]"]=i["[object Int32Array]"]=i["[object Uint8Array]"]=i["[object Uint8ClampedArray]"]=i["[object Uint16Array]"]=i["[object Uint32Array]"]=!0,i["[object Arguments]"]=i["[object Array]"]=i["[object ArrayBuffer]"]=i["[object Boolean]"]=i["[object DataView]"]=i["[object Date]"]=i["[object Error]"]=i["[object Function]"]=i["[object Map]"]=i["[object Number]"]=i["[object Object]"]=i["[object RegExp]"]=i["[object Set]"]=i["[object String]"]=i["[object WeakMap]"]=!1,e.exports=function(e){return o(e)&&a(e.length)&&!!i[n(e)]}},313:(e,t,r)=>{var n=r(3218),a=r(5726),o=r(3498),i=Object.prototype.hasOwnProperty;e.exports=function(e){if(!n(e))return o(e);var t=a(e),r=[];for(var s in e)("constructor"!=s||!t&&i.call(e,s))&&r.push(s);return r}},2980:(e,t,r)=>{var n=r(6384),a=r(6556),o=r(8483),i=r(9783),s=r(3218),c=r(1704),u=r(6390);e.exports=function e(t,r,l,d,p){t!==r&&o(r,(function(o,c){if(p||(p=new n),s(o))i(t,r,c,l,e,d,p);else{var v=d?d(u(t,c),o,c+"",t,r,p):void 0;void 0===v&&(v=o),a(t,c,v)}}),c)}},9783:(e,t,r)=>{var n=r(6556),a=r(4626),o=r(7133),i=r(278),s=r(8517),c=r(5694),u=r(1469),l=r(9246),d=r(4144),p=r(3560),v=r(3218),f=r(8630),y=r(6719),g=r(6390),b=r(9881);e.exports=function(e,t,r,h,E,k,x){var _=g(e,r),m=g(t,r),S=x.get(m);if(S)n(e,r,S);else{var w=k?k(_,m,r+"",e,t,x):void 0,j=void 0===w;if(j){var O=u(m),I=!O&&d(m),A=!O&&!I&&y(m);w=m,O||I||A?u(_)?w=_:l(_)?w=i(_):I?(j=!1,w=a(m,!0)):A?(j=!1,w=o(m,!0)):w=[]:f(m)||c(m)?(w=_,c(_)?w=b(_):v(_)&&!p(_)||(w=s(m))):j=!1}j&&(x.set(m,w),E(w,m,h,k,x),x.delete(m)),n(e,r,w)}}},5976:(e,t,r)=>{var n=r(6557),a=r(5357),o=r(61);e.exports=function(e,t){return o(a(e,t,n),e+"")}},6560:(e,t,r)=>{var n=r(5703),a=r(8777),o=r(6557),i=a?function(e,t){return a(e,"toString",{configurable:!0,enumerable:!1,value:n(t),writable:!0})}:o;e.exports=i},2545:e=>{e.exports=function(e,t){for(var r=-1,n=Array(e);++r{e.exports=function(e){return function(t){return e(t)}}},4318:(e,t,r)=>{var n=r(1149);e.exports=function(e){var t=new e.constructor(e.byteLength);return new n(t).set(new n(e)),t}},4626:(e,t,r)=>{e=r.nmd(e);var n=r(5639),a=t&&!t.nodeType&&t,o=a&&e&&!e.nodeType&&e,i=o&&o.exports===a?n.Buffer:void 0,s=i?i.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var r=e.length,n=s?s(r):new e.constructor(r);return e.copy(n),n}},7133:(e,t,r)=>{var n=r(4318);e.exports=function(e,t){var r=t?n(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}},278:e=>{e.exports=function(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r{var n=r(4865),a=r(9465);e.exports=function(e,t,r,o){var i=!r;r||(r={});for(var s=-1,c=t.length;++s{var n=r(5639)["__core-js_shared__"];e.exports=n},1463:(e,t,r)=>{var n=r(5976),a=r(6612);e.exports=function(e){return n((function(t,r){var n=-1,o=r.length,i=o>1?r[o-1]:void 0,s=o>2?r[2]:void 0;for(i=e.length>3&&"function"==typeof i?(o--,i):void 0,s&&a(r[0],r[1],s)&&(i=o<3?void 0:i,o=1),t=Object(t);++n{e.exports=function(e){return function(t,r,n){for(var a=-1,o=Object(t),i=n(t),s=i.length;s--;){var c=i[e?s:++a];if(!1===r(o[c],c,o))break}return t}}},8777:(e,t,r)=>{var n=r(852),a=function(){try{var e=n(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=a},1957:(e,t,r)=>{var n="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g;e.exports=n},5050:(e,t,r)=>{var n=r(7019);e.exports=function(e,t){var r=e.__data__;return n(t)?r["string"==typeof t?"string":"hash"]:r.map}},852:(e,t,r)=>{var n=r(8458),a=r(7801);e.exports=function(e,t){var r=a(e,t);return n(r)?r:void 0}},5924:(e,t,r)=>{var n=r(5569)(Object.getPrototypeOf,Object);e.exports=n},9607:(e,t,r)=>{var n=r(2705),a=Object.prototype,o=a.hasOwnProperty,i=a.toString,s=n?n.toStringTag:void 0;e.exports=function(e){var t=o.call(e,s),r=e[s];try{e[s]=void 0;var n=!0}catch(e){}var a=i.call(e);return n&&(t?e[s]=r:delete e[s]),a}},7801:e=>{e.exports=function(e,t){return null==e?void 0:e[t]}},1789:(e,t,r)=>{var n=r(4536);e.exports=function(){this.__data__=n?n(null):{},this.size=0}},401:e=>{e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},7667:(e,t,r)=>{var n=r(4536),a=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(n){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return a.call(t,e)?t[e]:void 0}},1327:(e,t,r)=>{var n=r(4536),a=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return n?void 0!==t[e]:a.call(t,e)}},1866:(e,t,r)=>{var n=r(4536);e.exports=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=n&&void 0===t?"__lodash_hash_undefined__":t,this}},8517:(e,t,r)=>{var n=r(3118),a=r(5924),o=r(5726);e.exports=function(e){return"function"!=typeof e.constructor||o(e)?{}:n(a(e))}},5776:e=>{var t=/^(?:0|[1-9]\d*)$/;e.exports=function(e,r){var n=typeof e;return!!(r=null==r?9007199254740991:r)&&("number"==n||"symbol"!=n&&t.test(e))&&e>-1&&e%1==0&&e{var n=r(7813),a=r(8612),o=r(5776),i=r(3218);e.exports=function(e,t,r){if(!i(r))return!1;var s=typeof t;return!!("number"==s?a(r)&&o(t,r.length):"string"==s&&t in r)&&n(r[t],e)}},7019:e=>{e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},5346:(e,t,r)=>{var n,a=r(4429),o=(n=/[^.]+$/.exec(a&&a.keys&&a.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"";e.exports=function(e){return!!o&&o in e}},5726:e=>{var t=Object.prototype;e.exports=function(e){var r=e&&e.constructor;return e===("function"==typeof r&&r.prototype||t)}},7040:e=>{e.exports=function(){this.__data__=[],this.size=0}},4125:(e,t,r)=>{var n=r(8470),a=Array.prototype.splice;e.exports=function(e){var t=this.__data__,r=n(t,e);return!(r<0)&&(r==t.length-1?t.pop():a.call(t,r,1),--this.size,!0)}},2117:(e,t,r)=>{var n=r(8470);e.exports=function(e){var t=this.__data__,r=n(t,e);return r<0?void 0:t[r][1]}},7518:(e,t,r)=>{var n=r(8470);e.exports=function(e){return n(this.__data__,e)>-1}},4705:(e,t,r)=>{var n=r(8470);e.exports=function(e,t){var r=this.__data__,a=n(r,e);return a<0?(++this.size,r.push([e,t])):r[a][1]=t,this}},4785:(e,t,r)=>{var n=r(1989),a=r(8407),o=r(7071);e.exports=function(){this.size=0,this.__data__={hash:new n,map:new(o||a),string:new n}}},1285:(e,t,r)=>{var n=r(5050);e.exports=function(e){var t=n(this,e).delete(e);return this.size-=t?1:0,t}},6e3:(e,t,r)=>{var n=r(5050);e.exports=function(e){return n(this,e).get(e)}},9916:(e,t,r)=>{var n=r(5050);e.exports=function(e){return n(this,e).has(e)}},5265:(e,t,r)=>{var n=r(5050);e.exports=function(e,t){var r=n(this,e),a=r.size;return r.set(e,t),this.size+=r.size==a?0:1,this}},4536:(e,t,r)=>{var n=r(852)(Object,"create");e.exports=n},3498:e=>{e.exports=function(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t}},1167:(e,t,r)=>{e=r.nmd(e);var n=r(1957),a=t&&!t.nodeType&&t,o=a&&e&&!e.nodeType&&e,i=o&&o.exports===a&&n.process,s=function(){try{var e=o&&o.require&&o.require("util").types;return e||i&&i.binding&&i.binding("util")}catch(e){}}();e.exports=s},2333:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},5569:e=>{e.exports=function(e,t){return function(r){return e(t(r))}}},5357:(e,t,r)=>{var n=r(6874),a=Math.max;e.exports=function(e,t,r){return t=a(void 0===t?e.length-1:t,0),function(){for(var o=arguments,i=-1,s=a(o.length-t,0),c=Array(s);++i{var n=r(1957),a="object"==typeof self&&self&&self.Object===Object&&self,o=n||a||Function("return this")();e.exports=o},6390:e=>{e.exports=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}},61:(e,t,r)=>{var n=r(6560),a=r(1275)(n);e.exports=a},1275:e=>{var t=Date.now;e.exports=function(e){var r=0,n=0;return function(){var a=t(),o=16-(a-n);if(n=a,o>0){if(++r>=800)return arguments[0]}else r=0;return e.apply(void 0,arguments)}}},7465:(e,t,r)=>{var n=r(8407);e.exports=function(){this.__data__=new n,this.size=0}},3779:e=>{e.exports=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}},7599:e=>{e.exports=function(e){return this.__data__.get(e)}},4758:e=>{e.exports=function(e){return this.__data__.has(e)}},4309:(e,t,r)=>{var n=r(8407),a=r(7071),o=r(3369);e.exports=function(e,t){var r=this.__data__;if(r instanceof n){var i=r.__data__;if(!a||i.length<199)return i.push([e,t]),this.size=++r.size,this;r=this.__data__=new o(i)}return r.set(e,t),this.size=r.size,this}},346:e=>{var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},5703:e=>{e.exports=function(e){return function(){return e}}},7813:e=>{e.exports=function(e,t){return e===t||e!=e&&t!=t}},6557:e=>{e.exports=function(e){return e}},5694:(e,t,r)=>{var n=r(9454),a=r(7005),o=Object.prototype,i=o.hasOwnProperty,s=o.propertyIsEnumerable,c=n(function(){return arguments}())?n:function(e){return a(e)&&i.call(e,"callee")&&!s.call(e,"callee")};e.exports=c},1469:e=>{var t=Array.isArray;e.exports=t},8612:(e,t,r)=>{var n=r(3560),a=r(1780);e.exports=function(e){return null!=e&&a(e.length)&&!n(e)}},9246:(e,t,r)=>{var n=r(8612),a=r(7005);e.exports=function(e){return a(e)&&n(e)}},4144:(e,t,r)=>{e=r.nmd(e);var n=r(5639),a=r(5062),o=t&&!t.nodeType&&t,i=o&&e&&!e.nodeType&&e,s=i&&i.exports===o?n.Buffer:void 0,c=(s?s.isBuffer:void 0)||a;e.exports=c},3560:(e,t,r)=>{var n=r(4239),a=r(3218);e.exports=function(e){if(!a(e))return!1;var t=n(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},1780:e=>{e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},3218:e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},7005:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},8630:(e,t,r)=>{var n=r(4239),a=r(5924),o=r(7005),i=Function.prototype,s=Object.prototype,c=i.toString,u=s.hasOwnProperty,l=c.call(Object);e.exports=function(e){if(!o(e)||"[object Object]"!=n(e))return!1;var t=a(e);if(null===t)return!0;var r=u.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&c.call(r)==l}},6719:(e,t,r)=>{var n=r(8749),a=r(1717),o=r(1167),i=o&&o.isTypedArray,s=i?a(i):n;e.exports=s},1704:(e,t,r)=>{var n=r(4636),a=r(313),o=r(8612);e.exports=function(e){return o(e)?n(e,!0):a(e)}},2492:(e,t,r)=>{var n=r(2980),a=r(1463)((function(e,t,r){n(e,t,r)}));e.exports=a},5062:e=>{e.exports=function(){return!1}},9881:(e,t,r)=>{var n=r(8363),a=r(1704);e.exports=function(e){return n(e,a(e))}}},t={};function r(n){var a=t[n];if(void 0!==a)return a.exports;var o=t[n]={id:n,loaded:!1,exports:{}};return e[n](o,o.exports,r),o.loaded=!0,o.exports}r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{function e(){return window.unifiedSDK}function t(e){return new Proxy(e,{set:()=>!0,get:(e,r)=>{const n=e[r];return"object"==typeof n&&null!==n?t(n):n}})}function n(e=null){const t={},r=new Set;let a,o=!1;return Object.defineProperty(t,"__isObservable",{value:!0,writable:!1,enumerable:!1,configurable:!1}),t.subscribe=n=>{if("function"!=typeof n)throw new Error("Invalid Argument: subscribe needs to be called with a function");return r.add(n),o||(o=!0,"function"==typeof e&&(a=e(t.next))),()=>{if(r.delete(n),0===r.size)return t.dispose()}},t.next=e=>{r.forEach((t=>{t(e)}))},t.pipe=(...e)=>{if(0===e.length)throw new Error("No pipe callback provided");let r=t;return e.forEach((e=>{if("function"!=typeof e)throw new Error("Invalid Argument: pipe can only be called with functions");const t=r;r=n((r=>t.subscribe((t=>e(t,r)))))})),r},t.dispose=async()=>{r.clear(),o=!1,a instanceof Promise&&(a=await a),"function"==typeof a&&await a()},t}function a({survey:e,surveyPage:t}){return{properties:{sdkSurveyId:[e.state.initialSurveyId],sdkSurveyType:[e.state.surveyOptions.contextNode?"embedded":"modal"],sdkSurveyRenderer:["internal"],sdkSurveyLocale:[e.state.locale]},data:{sdkSurveyPageId:t.state.pageId,sdkSurveyPageType:t.state.type,sdkSurveyDuration:Date.now()-e.state.startTime}}}function o({storyInstance:e}){return{data:{sdkStoryName:e?.state.name??null}}}function i({storyInstance:e,options:t}){return{properties:{sdkInviteType:[t?.mode??"notification"]},data:{sdkStoryName:e?.state.name??null}}}function s({storyInstance:e,...t}){return{properties:{sdkOnExitGroupId:[t.groupId],sdkOnExitProjectId:[t.projectId],sdkOnExitCampaignId:[t.campaignId],sdkOnExitMode:[t.mode]},data:{sdkStoryName:e?.state.name??null}}}function c({storyInstance:e}){return{data:{sdkStoryName:e?.state.name,sdkStoryCurrentStep:e?.state.currentStep}}}function u({storyInstance:e}){return{data:{sdkStoryName:e?.state.name}}}function l({integration:e}){return{properties:{sdkIntegrationName:[e.name]}}}function d({recordingEngine:e}){return{data:{},properties:{sdkRecordingType:[e?.state.recordingType??null],sdkRecordingToBuffer:[e?.state.conditional??null],sdkRecordingPauseReason:[e?.state.pauseReason??null],sdkRecordingStatus:[e?.state.status??null]}}}const p=[{internalEvent:"visitor:pageView",analyticEvent:"sdkPageView",callback:async function(){const{loader:t}=e(),[r]=await t.requireModules(["visitor"]),n=new URL(location.href),a=new URLSearchParams(n.search);return{properties:{sdkUtmSource:[a.get("utm_source")],sdkUtmMedium:[a.get("utm_medium")],sdkUtmCampaign:[a.get("utm_campaign")],sdkUtmTerm:[a.get("utm_term")],sdkUtmContent:[a.get("utm_content")]},data:{sdkReferrer:document.referrer,sdkPageViews:r.getSessionPageCount(),sdkGoogleAnalyticsId:r.getPropertyValue("Google Analytics Id"),sdkAdobeId:r.getPropertyValue("Adobe Id")}}}},{internalEvent:"surveyEngine:surveyStarted",analyticEvent:"sdkSurveyStarted",callback:function({survey:e,isModalSurvey:t,storyInstance:r}){return{properties:{sdkSurveyId:[e.state.initialSurveyId],sdkSurveyType:[t?"modal":"embedded"],sdkSurveyRenderer:["internal"],sdkSurveyLocale:[e.state.locale]},data:{sdkStoryName:r?.state.name??null}}}},{internalEvent:"rulesEngine:externalSurveyStarted",analyticEvent:"sdkSurveyStarted",callback:function({target:e,locale:t,surveyId:r,storyInstance:n}){return{properties:{sdkSurveyId:[r],sdkSurveyType:[e],sdkSurveyRenderer:["external"],sdkSurveyLocale:[t??"default"]},data:{sdkStoryName:n?.state.name??null}}}},{internalEvent:"surveyEngine:surveyPageRendered",analyticEvent:"sdkSurveyPageRendered",callback:a},{internalEvent:"surveyEngine:surveyNavigation",analyticEvent:"sdkSurveyNavigated",callback:function({survey:e,surveyPage:t,action:r}){const n=a({survey:e,surveyPage:t});return n.data.sdkSurveyNavigationDirection=r,n}},{internalEvent:"surveyEngine:surveyFinished",analyticEvent:"sdkSurveyCompleted",callback:a},{internalEvent:"surveyEngine:surveyClosed",analyticEvent:"sdkSurveyClosed",callback:a},{internalEvent:"surveyEngine:surveyRenderFailed",analyticEvent:"sdkSurveyError",callback:function({errorMessage:e,surveyId:t}){return{properties:{sdkSurveyId:[t],sdkSurveyRenderer:["internal"]},data:{sdkSurveyRenderError:e}}}},{internalEvent:"rulesEngine:badgeRendered",analyticEvent:"sdkBadgeShown",callback:o},{internalEvent:"rulesEngine:badgeAccepted",analyticEvent:"sdkBadgeAccepted",callback:o},{internalEvent:"rulesEngine:badgeTimeout",analyticEvent:"sdkBadgeTimeout",callback:o},{internalEvent:"rulesEngine:inviteRendered",analyticEvent:"sdkInviteShown",callback:i},{internalEvent:"rulesEngine:inviteAccepted",analyticEvent:"sdkInviteAccepted",callback:i},{internalEvent:"rulesEngine:inviteDeclined",analyticEvent:"sdkInviteDeclined",callback:i},{internalEvent:"rulesEngine:onExitModalRendered",analyticEvent:"sdkOnExitModalShown",callback:s},{internalEvent:"rulesEngine:onExitModalCompleted",analyticEvent:"sdkOnExitModalCompleted",callback:s},{internalEvent:"rulesEngine:onExitModalAborted",analyticEvent:"sdkOnExitModalAborted",callback:s},{internalEvent:"rulesEngine:onExitModalError",analyticEvent:"sdkOnExitModalError",callback:function(e){const t=s(e);return t.data.sdkOnExitError=e.error,t}},{internalEvent:"rulesEngine:storyStopped",analyticEvent:"sdkStoryStopped",callback:c},{internalEvent:"rulesEngine:storyCompleted",analyticEvent:"sdkStoryCompleted",callback:c},{internalEvent:"rulesEngine:storyError",analyticEvent:"sdkStoryError",callback:c},{internalEvent:"rulesEngine:mouseOffInitialized",analyticEvent:"sdkMouseOffInitialized",callback:u},{internalEvent:"rulesEngine:mouseOffTriggered",analyticEvent:"sdkMouseOffTriggered",callback:u},{internalEvent:"integrationManager:integrationStarted",analyticEvent:"sdkIntegrationStarted",callback:l},{internalEvent:"integrationManager:integrationFailed",analyticEvent:"sdkIntegrationFailed",callback:l},{internalEvent:"recordingEngine:recordingStarted",analyticEvent:"sdkRecordingStarted",callback:d},{internalEvent:"recordingEngine:recordingStopped",analyticEvent:"sdkRecordingStopped",callback:d},{internalEvent:"recordingEngine:recordingPaused",analyticEvent:"sdkRecordingPaused",callback:d},{internalEvent:"recordingEngine:recordingActivated",analyticEvent:"sdkRecordingActivated",callback:d},{internalEvent:"recordingEngine:recordingError",analyticEvent:"sdkRecordingError",callback:function(e){const t=d(e);return t.properties.sdkRecordingError=[e.type],t}}];var v=r(2492);function f({visitor:r}){const{logger:a,events:o,config:i,loader:s}=e(),c=i.getConfig("analyticsEngine"),u={},l=function(e,t,...r){return n((n=>{const a=e=>{try{n(e)}catch(e){}};return t.forEach((t=>e.addEventListener(t,a,...r))),()=>{t.forEach((t=>e.removeEventListener(t,a)))}}))}(document,["visibilitychange"]),d={enabled:y(),queuedEvents:[],addedDefaults:{}};let f,g;return u.state=t(d),u.start=async()=>{if(!d.enabled)return!1;if(!c.customerId||"NULL"===c.customerId)return a.warn("Analytics Engine: No customerId has been set. Please add the customerId in config."),!1;const[t]=await s.requireModules(["customcodeManager"]);if(await t.whenCustomcodeReady(),!d.enabled)return!1;f=setInterval(u.sendEvents,c.throttleTime),l.subscribe((()=>{"hidden"===document.visibilityState&&u.sendEvents()})),g=function(t){const{events:r}=e(),n=[];for(const{internalEvent:e,analyticEvent:a,callback:o}of p){const i=async e=>t(a,await o(e)),s=r.getInitialEvent(e);s&&i(s),n.push(r.listenEvent(e,i))}return()=>{n.forEach((e=>e()))}}(u.collectEvent),o.triggerEvent("analyticsEngine:ready",{analyticsEngine:u})},u.stop=()=>{d.enabled=!1,l.dispose(),g?.(),clearInterval(f)},u.getVisibilityChangeObservable=()=>l,u.addEventDefaults=(e,t)=>"string"==typeof e&&t?(Array.isArray(d.addedDefaults[e])||(d.addedDefaults[e]=[]),d.addedDefaults[e].push(t),t):null,u.getEventDefaults=e=>{const{siteKey:t,container:n,updatedAt:a}=i.getConfig("global"),o=c[e]?.samplingRate??c.defaultSamplingRate,s={properties:{sdkSiteKey:[t],sdkContainer:[n]},data:{sdkConfigDate:a,sdkPageUrl:location.href,sdkVisitorId:r.getVisitorId(),sdkPageId:r.getCurrentPageId(),sdkEventSamplingRate:o}},u=[...d.addedDefaults.global||[],...d.addedDefaults[e]||[]].reduce(((e,t)=>{const r="function"==typeof t?t():t;return v(e,r),e}),{});return v(s,u),s},u.collectEvent=(e,t={})=>{if(!d.enabled||!e)return null;const n=c.events[e]||{};if(!1===n.enabled)return a.log(`Analytics Engine: Cannot add event "${e}" because it is deactivated in config.`),null;if(!r.checkRate(n.samplingRate??c.defaultSamplingRate))return a.log(`Analytics Engine: Cannot add event "${e}" because sampling rate has not matched.`),null;const o=u.getEventDefaults(e);t.name=e,t.timestamp=(new Date).toISOString(),t.timezone=(new Date).getTimezoneOffset(),v(t,o);for(const e in t.properties)Array.isArray(t.properties[e])&&![null,void 0].includes(t.properties[e][0])||delete t.properties[e];for(const e in t.data)[null,void 0].includes(t.data[e])&&delete t.data[e];return d.queuedEvents.push(t),t},u.clearEventQueue=()=>{d.queuedEvents=[]},u.sendEvents=async()=>{if(!d.queuedEvents.length)return;const e=r.getBrowserAndVersion(),t={customerId:c.customerId,appId:"unifiedwebsdk",userId:r.getVisitorId(),deviceProfile:{sdkOperatingSystem:r.getPlatform(),sdkSdkVersion:unifiedSDK.version,sdkBrowserName:e.browser,sdkBrowserVersion:e.version,sdkDeviceType:r.getDeviceType(),sdkProductType:"unified-websdk"},events:d.queuedEvents};u.clearEventQueue();try{await fetch(u.getIngestUrl(),{method:"POST",headers:{"Content-Type":"application/json","Request-API-Version":"1.0.0"},body:JSON.stringify(t),keepalive:!0}),a.info("Analytics Engine: Analytic event(s) sent to big data endpoint.",t)}catch(e){return a.error("Analytics Engine: Failed to send analytics data.",e),null}return t},u.getIngestUrl=()=>{const e=i.getConfig("servers.bigData");return`https://${e.host}${e.ingestEndpoint}`},u.getDebugData=()=>d,u}function y(){const{logger:t,config:r}=e(),{enabled:n}=r.getConfig("analyticsEngine");return n?!!r.getConfig("servers.bigData.host")||(t.warn("Analytics Engine: Disabled because no server host has been set in config."),!1):(t.log("Analytics Engine: Disabled by config."),!1)}const{loader:g}=e();g.resolveModule("analyticsEngine",(async()=>{const[e]=await g.requireModules(["visitor"]);return f({visitor:e})}))})()})();