rudder-sdk-js 2.48.13 → 2.48.14
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/CHANGELOG.md +5 -0
- package/dist/npm/content-script/index.cjs.js +1 -1
- package/dist/npm/content-script/index.es.js +1 -1
- package/dist/npm/content-script/index.js +1 -1
- package/dist/npm/index.cjs.js +1 -1
- package/dist/npm/index.es.js +1 -1
- package/dist/npm/index.js +1 -1
- package/package.json +1 -1
package/dist/npm/index.cjs.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
"use strict";function e(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t,n){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,l(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function r(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=h(e))||t){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){a=!0,o=e},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw o}}}}function i(e,t,n){return(t=l(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o.apply(null,arguments)}function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){i(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function u(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,s,a=[],u=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t);else for(;!(u=(r=o.call(n)).done)&&(a.push(r.value),a.length!==t);u=!0);}catch(e){c=!0,i=e}finally{try{if(!u&&null!=n.return&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw i}}return a}}(e,t)||h(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(t){return function(t){if(Array.isArray(t))return e(t)}(t)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||h(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}function f(e){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f(e)}function h(t,n){if(t){if("string"==typeof t)return e(t,n);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?e(t,n):void 0}}var d="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function p(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function g(e){return e&&Object.prototype.hasOwnProperty.call(e,"default")&&1===Object.keys(e).length?e.default:e}var y={exports:{}};!function(e){function t(e){if(e)return function(e){return o(e,t.prototype),e._callbacks=new Map,e}(e);this._callbacks=new Map}t.prototype.on=function(e,t){var n,r=null!==(n=this._callbacks.get(e))&&void 0!==n?n:[];return r.push(t),this._callbacks.set(e,r),this},t.prototype.once=function(e,t){var n=this,r=function r(){n.off(e,r);for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];t.apply(n,o)};return r.fn=t,this.on(e,r),this},t.prototype.off=function(e,t){if(void 0===e&&void 0===t)return this._callbacks.clear(),this;if(void 0===t)return this._callbacks.delete(e),this;var n=this._callbacks.get(e);if(n){var i,o=r(n.entries());try{for(o.s();!(i=o.n()).done;){var s=u(i.value,2),a=s[0],c=s[1];if(c===t||c.fn===t){n.splice(a,1);break}}}catch(e){o.e(e)}finally{o.f()}0===n.length?this._callbacks.delete(e):this._callbacks.set(e,n)}return this},t.prototype.emit=function(e){var t=this._callbacks.get(e);if(t){for(var n=c(t),i=arguments.length,o=new Array(i>1?i-1:0),s=1;s<i;s++)o[s-1]=arguments[s];var a,u=r(n);try{for(u.s();!(a=u.n()).done;){a.value.apply(this,o)}}catch(e){u.e(e)}finally{u.f()}}return this},t.prototype.listeners=function(e){var t;return null!==(t=this._callbacks.get(e))&&void 0!==t?t:[]},t.prototype.listenerCount=function(e){if(e)return this.listeners(e).length;var t,n=0,i=r(this._callbacks.values());try{for(i.s();!(t=i.n()).done;){n+=t.value.length}}catch(e){i.e(e)}finally{i.f()}return n},t.prototype.hasListeners=function(e){return this.listenerCount(e)>0},t.prototype.addEventListener=t.prototype.on,t.prototype.removeListener=t.prototype.off,t.prototype.removeEventListener=t.prototype.off,t.prototype.removeAllListeners=t.prototype.off,e.exports=t}(y);var v=p(y.exports);function m(e){return null!=e&&"object"===f(e)&&!0===e["@@functional/placeholder"]}function I(e){return function t(n){return 0===arguments.length||m(n)?t:e.apply(this,arguments)}}function A(e){return function t(n,r){switch(arguments.length){case 0:return t;case 1:return m(n)?t:I((function(t){return e(n,t)}));default:return m(n)&&m(r)?t:m(n)?I((function(t){return e(t,r)})):m(r)?I((function(t){return e(n,t)})):e(n,r)}}}function b(e){return function t(n,r,i){switch(arguments.length){case 0:return t;case 1:return m(n)?t:A((function(t,r){return e(n,t,r)}));case 2:return m(n)&&m(r)?t:m(n)?A((function(t,n){return e(t,r,n)})):m(r)?A((function(t,r){return e(n,t,r)})):I((function(t){return e(n,r,t)}));default:return m(n)&&m(r)&&m(i)?t:m(n)&&m(r)?A((function(t,n){return e(t,n,i)})):m(n)&&m(i)?A((function(t,n){return e(t,r,n)})):m(r)&&m(i)?A((function(t,r){return e(n,t,r)})):m(n)?I((function(t){return e(t,r,i)})):m(r)?I((function(t){return e(n,t,i)})):m(i)?I((function(t){return e(n,r,t)})):e(n,r,i)}}}function k(e,t){return Object.prototype.hasOwnProperty.call(t,e)}var E=I((function(e){return null===e?"Null":void 0===e?"Undefined":Object.prototype.toString.call(e).slice(8,-1)}));function C(e){return"[object Object]"===Object.prototype.toString.call(e)}function S(e,t,n){if(n||(n=new O),function(e){var t=f(e);return null==e||"object"!=t&&"function"!=t}(e))return e;var r,i=function(t){var r=n.get(e);if(r)return r;for(var i in n.set(e,t),e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=S(e[i],!0,n));return t};switch(E(e)){case"Object":return i(Object.create(Object.getPrototypeOf(e)));case"Array":return i(Array(e.length));case"Date":return new Date(e.valueOf());case"RegExp":return r=e,new RegExp(r.source,r.flags?r.flags:(r.global?"g":"")+(r.ignoreCase?"i":"")+(r.multiline?"m":"")+(r.sticky?"y":"")+(r.unicode?"u":"")+(r.dotAll?"s":""));case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"BigInt64Array":case"BigUint64Array":return e.slice();default:return e}}var O=function(){function e(){this.map={},this.length=0}return e.prototype.set=function(e,t){var n=this.hash(e),r=this.map[n];r||(this.map[n]=r=[]),r.push([e,t]),this.length+=1},e.prototype.hash=function(e){var t=[];for(var n in e)t.push(Object.prototype.toString.call(e[n]));return t.join()},e.prototype.get=function(e){if(this.length<=180)for(var t in this.map)for(var n=this.map[t],r=0;r<n.length;r+=1){if((o=n[r])[0]===e)return o[1]}else{var i=this.hash(e);if(n=this.map[i])for(r=0;r<n.length;r+=1){var o;if((o=n[r])[0]===e)return o[1]}}},e}(),w=I((function(e){return null!=e&&"function"==typeof e.clone?e.clone():S(e)})),T=b((function(e,t,n){var r,i={};for(r in n=n||{},t=t||{})k(r,t)&&(i[r]=k(r,n)?e(r,t[r],n[r]):t[r]);for(r in n)k(r,n)&&!k(r,i)&&(i[r]=n[r]);return i})),_=b((function e(t,n,r){return T((function(n,r,i){return C(r)&&C(i)?e(t,r,i):t(n,r,i)}),n,r)})),R=b((function(e,t,n){return _((function(t,n,r){return e(n,r)}),t,n)})),P={HS:"HubSpot",GA:"GA",HOTJAR:"Hotjar",GOOGLEADS:"GoogleAds",VWO:"VWO",GTM:"GoogleTagManager",BRAZE:"Braze",INTERCOM:"INTERCOM",KEEN:"Keen",KISSMETRICS:"Kissmetrics",CUSTOMERIO:"CustomerIO",CHARTBEAT:"Chartbeat",COMSCORE:"Comscore",FACEBOOK_PIXEL:"FacebookPixel",LOTAME:"Lotame",OPTIMIZELY:"Optimizely",BUGSNAG:"Bugsnag",FULLSTORY:"Fullstory",TVSQUARED:"TVSquared",GA4:"GA4",MOENGAGE:"MoEngage",AM:"Amplitude",PENDO:"Pendo",LYTICS:"Lytics",APPCUES:"Appcues",POSTHOG:"Posthog",KLAVIYO:"Klaviyo",CLEVERTAP:"Clevertap",BINGADS:"BingAds",PINTEREST_TAG:"PinterestTag",ADOBE_ANALYTICS:"AdobeAnalytics",LINKEDIN_INSIGHT_TAG:"LinkedInInsightTag",REDDIT_PIXEL:"RedditPixel",DRIP:"Drip",HEAP:"Heap",CRITEO:"Criteo",MP:"Mixpanel",QUALTRICS:"Qualtrics",PROFITWELL:"ProfitWell",SENTRY:"Sentry",QUANTUMMETRIC:"QuantumMetric",SNAP_PIXEL:"SnapPixel",POST_AFFILIATE_PRO:"PostAffiliatePro",GOOGLE_OPTIMIZE:"GoogleOptimize",LAUNCHDARKLY:"LaunchDarkly",GA360:"GA360",ADROLL:"Adroll",DCM_FLOODLIGHT:"DCMFloodlight",MATOMO:"Matomo",VERO:"Vero",MOUSEFLOW:"Mouseflow",ROCKERBOX:"Rockerbox",CONVERTFLOW:"ConvertFlow",SNAPENGAGE:"SnapEngage",LIVECHAT:"LiveChat",SHYNET:"Shynet",WOOPRA:"Woopra",ROLLBAR:"RollBar",QUORA_PIXEL:"QuoraPixel",JUNE:"June",ENGAGE:"Engage",ITERABLE:"Iterable",YANDEX_METRICA:"YandexMetrica",REFINER:"Refiner",QUALAROO:"Qualaroo",PODSIGHTS:"Podsights",AXEPTIO:"Axeptio",SATISMETER:"Satismeter",MICROSOFT_CLARITY:"MicrosoftClarity",SENDINBLUE:"Sendinblue",OLARK:"Olark",LEMNISK:"Lemnisk",TIKTOK_ADS:"TiktokAds",ACTIVE_CAMPAIGN:"ActiveCampaign",SPRIG:"Sprig",SPOTIFYPIXEL:"SpotifyPixel",COMMANDBAR:"CommandBar",NINETAILED:"Ninetailed"},x="ADOBE_ANALYTICS";i({},"Adobe Analytics","AdobeAnalytics");var D=i(i(i(i(i(i({"Adobe Analytics":x,ADOBEANALYTICS:x,"ADOBE ANALYTICS":x},x,x),"AdobeAnalytics",x),"adobeanalytics",x),"adobe analytics",x),"Adobe analytics",x),"adobe Analytics",x),L="AM";i({},"Amplitude","Amplitude");var M=i(i(i(i({},L,L),"AMPLITUDE",L),"Amplitude",L),"am",L),B="APPCUES";i({},"Appcues","Appcues");var N=i(i(i(i({},B,B),"Appcues",B),"App Cues",B),"appcues",B),G="BINGADS";i({},"Bing Ads","BingAds");var F=i(i(i(i(i(i(i({},G,G),"BingAds",G),"bingads",G),"Bing Ads",G),"Bing ads",G),"bing Ads",G),"bing ads",G),U="BRAZE";i({},"Braze","Braze");var j=i(i(i({},U,U),"Braze",U),"braze",U),K="BUGSNAG";i({},"Bugsnag","Bugsnag");var Q=i(i(i({},K,K),"bugsnag",K),"Bugsnag",K),z="CHARTBEAT";i({},"Chartbeat","Chartbeat");var H=i(i(i(i(i({},z,z),"Chartbeat",z),"chartbeat",z),"Chart Beat",z),"chart beat",z),q="CLEVERTAP";i({},"CleverTap","Clevertap");var V=i(i(i({},q,q),"Clevertap",q),"clevertap",q),W="COMSCORE";i({},"Comscore","Comscore");var Y=i(i(i(i(i(i({},W,W),"Comscore",W),"Com Score",W),"com Score",W),"com score",W),"Com score",W),X="CRITEO";i({},"Criteo","Criteo");var J=i(i(i({},X,X),"Criteo",X),"criteo",X),$="CUSTOMERIO";i({},"Customer IO","CustomerIO");var Z=i(i(i(i(i({},$,$),"Customerio",$),"Customer.io",$),"CUSTOMER.IO",$),"customer.io",$),ee="DRIP";i({},"Drip","Drip");var te=i(i(i({},ee,ee),"Drip",ee),"drip",ee),ne="FACEBOOK_PIXEL";i({},"Facebook Pixel","FacebookPixel");var re=i(i(i(i(i(i(i({},ne,ne),"FB Pixel",ne),"Facebook Pixel",ne),"facebook pixel",ne),"fbpixel",ne),"FBPIXEL",ne),"FB_PIXEL",ne),ie="FULLSTORY";i({},"Fullstory","Fullstory");var oe=i(i(i(i(i(i(i(i({},ie,ie),"Fullstory",ie),"FullStory",ie),"full Story",ie),"Full Story",ie),"Full story",ie),"full story",ie),"fullstory",ie),se="GA";i({},"Google Analytics","GA");var ae=i(i(i(i(i({},se,se),"Google Analytics",se),"GoogleAnalytics",se),"GOOGLE ANALYTICS",se),"google analytics",se),ue="GA4";i({},"Google Analytics 4 (GA4)","GA4");var ce=i(i(i(i(i(i(i(i(i(i({},ue,ue),"Google Analytics 4",ue),"Google analytics 4",ue),"google analytics 4",ue),"Google Analytics4",ue),"Google analytics4",ue),"google analytics4",ue),"Google Analytics 4 (GA4)",ue),"google analytics 4 (ga4)",ue),"GoogleAnalytics4",ue),le="GOOGLEADS";i({},"Google Ads","GoogleAds");var fe=i(i(i(i(i(i({},le,le),"Google Ads",le),"GoogleAds",le),"GOOGLE ADS",le),"google ads",le),"googleads",le),he="GOOGLE_OPTIMIZE";i({},"Google Optimize","GoogleOptimize");var de=i(i(i(i(i(i(i(i({},he,he),"Google Optimize",he),"GoogleOptimize",he),"Googleoptimize",he),"GOOGLEOPTIMIZE",he),"google optimize",he),"Google optimize",he),"GOOGLE OPTIMIZE",he),pe="GTM";i({},"Google Tag Manager","GoogleTagManager");var ge=i(i(i(i(i({},pe,pe),"Google Tag Manager",pe),"google tag manager",pe),"googletag manager",pe),"googletagmanager",pe),ye="HEAP";i({},"Heap.io","Heap");var ve=i(i(i(i({},ye,ye),"Heap",ye),"heap",ye),"Heap.io",ye),me="HOTJAR";i({},"Hotjar","Hotjar");var Ie=i(i(i(i(i({},me,me),"Hotjar",me),"hotjar",me),"Hot Jar",me),"hot jar",me),Ae="HS";i({},"HubSpot","HubSpot");var be=i(i(i(i(i(i({},Ae,Ae),"Hubspot",Ae),"HUBSPOT",Ae),"hub spot",Ae),"Hub Spot",Ae),"Hub spot",Ae),ke="INTERCOM";i({},"Intercom","INTERCOM");var Ee=i(i(i({},ke,ke),"Intercom",ke),"intercom",ke),Ce="KEEN";i({},"Keen","Keen");var Se=i(i(i(i(i({},Ce,Ce),"Keen",Ce),"Keen.io",Ce),"keen",Ce),"keen.io",Ce),Oe="KISSMETRICS";i({},"Kiss Metrics","Kissmetrics");var we=i(i(i({},Oe,Oe),"Kissmetrics",Oe),"kissmetrics",Oe),Te="KLAVIYO";i({},"Klaviyo","Klaviyo");var _e=i(i(i({},Te,Te),"Klaviyo",Te),"klaviyo",Te),Re="LAUNCHDARKLY";i({},"LaunchDarkly","LaunchDarkly");var Pe,xe=i(i(i(i(i(i({},Re,Re),"LaunchDarkly",Re),"Launch_Darkly",Re),"Launch Darkly",Re),"launchDarkly",Re),"launch darkly",Re),De="LINKEDIN_INSIGHT_TAG";i({},"Linkedin Insight Tag","LinkedInInsightTag");var Le=(i(i(i(i(i(i(i(i(i(i(Pe={},De,De),"LinkedIn Insight Tag",De),"LinkedIn insight tag",De),"linkedIn insight tag",De),"Linkedin_insight_tag",De),"LinkedinInsighttag",De),"LinkedinInsightTag",De),"LinkedInInsightTag",De),"Linkedininsighttag",De),"LINKEDININSIGHTTAG",De),i(Pe,"linkedininsighttag",De)),Me="LOTAME";i({},"Lotame","Lotame");var Be=i(i(i({},Me,Me),"Lotame",Me),"lotame",Me),Ne="LYTICS";i({},"Lytics","Lytics");var Ge=i(i(i({},Ne,Ne),"Lytics",Ne),"lytics",Ne),Fe="MP";i({},"Mixpanel","Mixpanel");var Ue=i(i(i(i(i(i({},Fe,Fe),"MIXPANEL",Fe),"Mixpanel",Fe),"MIX PANEL",Fe),"Mix panel",Fe),"Mix Panel",Fe),je="MOENGAGE";i({},"MoEngage","MoEngage");var Ke=i(i(i(i(i(i(i({},je,je),"MoEngage",je),"moengage",je),"Moengage",je),"Mo Engage",je),"mo engage",je),"Mo engage",je),Qe="OPTIMIZELY";i({},"Optimizely Web","Optimizely");var ze=i(i(i({},Qe,Qe),"Optimizely",Qe),"optimizely",Qe),He="PENDO";i({},"Pendo","Pendo");var qe,Ve=i(i(i({},He,He),"Pendo",He),"pendo",He),We="PINTEREST_TAG";i({},"Pinterest Tag","PinterestTag");var Ye=(i(i(i(i(i(i(i(i(i(i(qe={},We,We),"PinterestTag",We),"Pinterest_Tag",We),"PINTERESTTAG",We),"pinterest",We),"PinterestAds",We),"Pinterest_Ads",We),"Pinterest",We),"Pinterest Tag",We),"Pinterest tag",We),i(i(i(i(qe,"PINTEREST TAG",We),"pinterest tag",We),"Pinterest Ads",We),"Pinterest ads",We)),Xe="POST_AFFILIATE_PRO";i({},"Post Affiliate Pro","PostAffiliatePro");var Je=i(i(i(i(i(i(i(i({},Xe,Xe),"PostAffiliatePro",Xe),"Post_affiliate_pro",Xe),"Post Affiliate Pro",Xe),"Post affiliate pro",Xe),"post affiliate pro",Xe),"postaffiliatepro",Xe),"POSTAFFILIATEPRO",Xe),$e="POSTHOG";i({},"PostHog","Posthog");var Ze=i(i(i(i(i(i(i({},$e,$e),"PostHog",$e),"Posthog",$e),"posthog",$e),"Post Hog",$e),"Post hog",$e),"post hog",$e),et="PROFITWELL";i({},"ProfitWell","ProfitWell");var tt=i(i(i(i(i(i(i({},et,et),"ProfitWell",et),"profitwell",et),"Profitwell",et),"Profit Well",et),"profit well",et),"Profit well",et),nt="QUALTRICS";i({},"Qualtrics","Qualtrics");var rt=i(i(i({},nt,nt),"Qualtrics",nt),"qualtrics",nt),it="QUANTUMMETRIC";i({},"Quantum Metric","QuantumMetric");var ot=i(i(i(i(i(i(i(i({},it,it),"Quantum Metric",it),"quantum Metric",it),"quantum metric",it),"QuantumMetric",it),"quantumMetric",it),"quantummetric",it),"Quantum_Metric",it),st="REDDIT_PIXEL";i({},"Reddit Pixel","RedditPixel");var at=i(i(i(i(i(i(i(i({},st,st),"Reddit_Pixel",st),"RedditPixel",st),"REDDITPIXEL",st),"redditpixel",st),"Reddit Pixel",st),"REDDIT PIXEL",st),"reddit pixel",st),ut="SENTRY";i({},"Sentry","Sentry");var ct=i(i(i({},ut,ut),"sentry",ut),"Sentry",ut),lt="SNAP_PIXEL";i({},"Snap Pixel","SnapPixel");var ft=i(i(i(i(i(i(i(i({},lt,lt),"Snap_Pixel",lt),"SnapPixel",lt),"SNAPPIXEL",lt),"snappixel",lt),"Snap Pixel",lt),"SNAP PIXEL",lt),"snap pixel",lt),ht="TVSQUARED";i({},"TVSquared","TVSquared");var dt=i(i(i(i(i(i(i(i(i({},ht,ht),"TVSquared",ht),"tvsquared",ht),"tvSquared",ht),"TvSquared",ht),"Tvsquared",ht),"TV Squared",ht),"tv squared",ht),"tv Squared",ht),pt="VWO";i({},"VWO","VWO");var gt=i(i(i(i(i(i(i(i({},pt,pt),"VisualWebsiteOptimizer",pt),"Visualwebsiteoptimizer",pt),"visualwebsiteoptimizer",pt),"vwo",pt),"Visual Website Optimizer",pt),"Visual website optimizer",pt),"visual website optimizer",pt),yt="GA360";i({},"Google Analytics 360","GA360");var vt=i(i(i(i(i(i(i(i(i({},yt,yt),"Google Analytics 360",yt),"Google analytics 360",yt),"google analytics 360",yt),"Google Analytics360",yt),"Google analytics360",yt),"google analytics360",yt),"GoogleAnalytics360",yt),"GA 360",yt),mt="ADROLL";i({},"Adroll","Adroll");var It=i(i(i(i(i({},mt,mt),"Adroll",mt),"Ad roll",mt),"ad roll",mt),"adroll",mt),At="DCM_FLOODLIGHT";i({},"DCM Floodlight","DCMFloodlight");var bt=i(i(i(i(i(i(i(i(i({},At,At),"DCM Floodlight",At),"dcm floodlight",At),"Dcm Floodlight",At),"DCMFloodlight",At),"dcmfloodlight",At),"DcmFloodlight",At),"dcm_floodlight",At),"DCM_Floodlight",At),kt="MATOMO";i({},"Matomo","Matomo");var Et=i(i(i({},kt,kt),"Matomo",kt),"matomo",kt),Ct="VERO";i({},"Vero","Vero");var St=i(i(i({},Ct,Ct),"Vero",Ct),"vero",Ct),Ot="MOUSEFLOW";i({},"Mouseflow","Mouseflow");var wt=i(i(i(i(i(i(i(i(i({},Ot,Ot),"Mouseflow",Ot),"mouseflow",Ot),"mouseFlow",Ot),"MouseFlow",Ot),"Mouse flow",Ot),"mouse flow",Ot),"mouse Flow",Ot),"Mouse Flow",Ot),Tt="ROCKERBOX";i({},"Rockerbox","Rockerbox");var _t=i(i(i(i(i(i(i({},Tt,Tt),"Rockerbox",Tt),"rockerbox",Tt),"RockerBox",Tt),"Rocker box",Tt),"rocker box",Tt),"Rocker Box",Tt),Rt="CONVERTFLOW";i({},"ConvertFlow","ConvertFlow");var Pt=i(i(i(i(i(i(i(i(i(i({},Rt,Rt),"Convertflow",Rt),"convertflow",Rt),"convertFlow",Rt),"ConvertFlow",Rt),"Convert flow",Rt),"convert flow",Rt),"convert Flow",Rt),"Convert Flow",Rt),"CONVERT FLOW",Rt),xt="SNAPENGAGE";i({},"SnapEngage","SnapEngage");var Dt=i(i(i(i(i(i(i({},xt,xt),"SnapEngage",xt),"Snap_Engage",xt),"snapengage",xt),"SNAP ENGAGE",xt),"Snap Engage",xt),"snap engage",xt),Lt="LIVECHAT";i({},"LiveChat","LiveChat");var Mt=i(i(i(i(i(i(i({},Lt,Lt),"LiveChat",Lt),"Live_Chat",Lt),"livechat",Lt),"LIVE CHAT",Lt),"Live Chat",Lt),"live chat",Lt),Bt="SHYNET";i({},"Shynet","Shynet");var Nt=i(i(i(i(i(i(i(i(i({},Bt,Bt),"shynet",Bt),"ShyNet",Bt),"shyNet",Bt),"Shynet",Bt),"shy net",Bt),"Shy Net",Bt),"shy Net",Bt),"Shy net",Bt),Gt="WOOPRA";i({},"Woopra","Woopra");var Ft=i(i(i({},Gt,Gt),"Woopra",Gt),"woopra",Gt),Ut="ROLLBAR";i({},"RollBar","RollBar");var jt=i(i(i(i(i(i(i(i({},Ut,Ut),"RollBar",Ut),"Roll_Bar",Ut),"rollbar",Ut),"Rollbar",Ut),"ROLL BAR",Ut),"Roll Bar",Ut),"roll bar",Ut),Kt="QUORA_PIXEL";i({},"Quora Pixel","QuoraPixel");var Qt=i(i(i(i(i(i(i(i(i(i({},Kt,Kt),"Quora Pixel",Kt),"Quora pixel",Kt),"QUORA PIXEL",Kt),"QuoraPixel",Kt),"Quorapixel",Kt),"QUORAPIXEL",Kt),"Quora_Pixel",Kt),"quora_pixel",Kt),"Quora",Kt),zt="JUNE";i({},"June","June");var Ht=i(i(i({},zt,zt),"June",zt),"june",zt),qt="ENGAGE";i({},"Engage","Engage");var Vt=i(i(i({},qt,qt),"Engage",qt),"engage",qt),Wt="ITERABLE";i({},"Iterable","Iterable");var Yt=i(i(i({},Wt,Wt),"Iterable",Wt),"iterable",Wt),Xt="YANDEX_METRICA";i({},"Yandex.Metrica","YandexMetrica");var Jt=i(i(i(i(i({},Xt,Xt),"Yandexmetrica",Xt),"yandexmetrica",Xt),"yandexMetrica",Xt),"YandexMetrica",Xt),$t="REFINER";i({},"Refiner","Refiner");var Zt=i(i(i({},$t,$t),"Refiner",$t),"refiner",$t),en="QUALAROO";i({},"Qualaroo","Qualaroo");var tn=i(i(i({},en,en),"Qualaroo",en),"qualaroo",en),nn="PODSIGHTS";i({},"Podsights","Podsights");var rn=i(i(i(i(i(i(i(i({},nn,nn),"Podsights",nn),"PodSights",nn),"pod Sights",nn),"Pod Sights",nn),"pod sights",nn),"POD SIGHTS",nn),"Pod sights",nn),on="AXEPTIO";i({},"Axeptio","Axeptio");var sn=i(i(i({},on,on),"Axeptio",on),"axeptio",on),an="SATISMETER";i({},"Satismeter","Satismeter");var un=i(i(i({},an,an),"Satismeter",an),"SatisMeter",an),cn="MICROSOFT_CLARITY";i({},"Microsoft Clarity","MicrosoftClarity");var ln=i(i(i(i(i(i(i(i(i({},cn,cn),"Microsoft Clarity",cn),"Microsoft clarity",cn),"microsoft clarity",cn),"Microsoft_clarity",cn),"MicrosoftClarity",cn),"MICROSOFTCLARITY",cn),"microsoftclarity",cn),"microsoftClarity",cn),fn="SENDINBLUE";i({},"Sendinblue","Sendinblue");var hn=i(i(i(i({},fn,fn),"Sendinblue",fn),"sendinblue",fn),"SendinBlue",fn),dn="OLARK";i({},"Olark","Olark");var pn=i(i(i({},dn,dn),"Olark",dn),"olark",dn),gn="LEMNISK";i({},"Lemnisk","Lemnisk");var yn=i(i(i(i(i(i(i(i({},gn,gn),"LEMNISK_MARKETING_AUTOMATION",gn),"Lemnisk Marketing Automation",gn),"LemniskMarketingAutomation",gn),"lemniskmarketingautomation",gn),"lemniskMarketingAutomation",gn),"lemnisk",gn),"Lemnisk",gn),vn="TIKTOK_ADS";i({},"TikTok Ads","TiktokAds");var mn=i(i(i(i(i(i(i({},vn,vn),"TiktokAds",vn),"Tiktok ads",vn),"Tiktok Ads",vn),"Tik Tok Ads",vn),"tik tok ads",vn),"tiktokads",vn),In="ACTIVE_CAMPAIGN";i({},"Active Campaign","ActiveCampaign");var An=i(i(i(i(i(i({ActiveCampaign:In,"Active Campaign":In,"ACTIVE CAMPAIGN":In},In,In),"activecampaign",In),"active campaign",In),"Active campaign",In),"active Campaign",In),"active_campaign",In),bn="SPRIG";i({},"Sprig","Sprig");var kn=i(i(i({},bn,bn),"Sprig",bn),"sprig",bn),En="SPOTIFYPIXEL";i({},"Spotify Pixel","SpotifyPixel");var Cn=i(i(i(i({},En,En),"Spotify Pixel",En),"spotify pixel",En),"SPOTIFY_PIXEL",En),Sn="COMMANDBAR";i({},"CommandBar","CommandBar");var On=i(i(i(i(i({},Sn,Sn),"Command Bar",Sn),"Commandbar",Sn),"COMMAND_BAR",Sn),"commandbar",Sn),wn="NINETAILED";i({},"Ninetailed","Ninetailed");var Tn=i(i(i(i({},wn,wn),"Ninetailed",wn),"ninetailed",wn),"NineTailed",wn),_n=a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a({All:"All"},D),M),N),F),j),Q),On),H),V),Y),J),Z),te),re),oe),ae),ce),vt),fe),de),ge),ve),Ie),be),Ee),Se),we),_e),xe),Le),Be),Ge),Ue),Ke),Tn),ze),Ve),Ye),Je),Ze),tt),rt),ot),at),ct),ft),dt),gt),It),bt),Et),St),wt),Pt),Dt),Mt),Nt),Ft),jt),Qt),Ht),Vt),Yt),_t),Jt),Zt),tn),rn),sn),un),ln),hn),pn),yn),mn),An),kn),Cn),Rn=4,Pn={setLogLevel:function(e){switch(e.toUpperCase()){case"INFO":Rn=1;break;case"DEBUG":Rn=2;break;case"WARN":Rn=3;break;default:Rn=4}},info:function(){var e;Rn<=1&&(e=console).info.apply(e,arguments)},debug:function(){var e;Rn<=2&&(e=console).log.apply(e,arguments)},warn:function(){var e;Rn<=3&&(e=console).warn.apply(e,arguments)},error:function(){var e;Rn<=4&&(e=console).error.apply(e,arguments)}},xn=1e4,Dn=1e3,Ln="RS_JS_SDK",Mn="Request failed with status:",Bn=[Mn],Nn="errorReporting",Gn=function(e){var t=window.RudderStackGlobals&&window.RudderStackGlobals[Nn];t&&e instanceof Error&&t.notify(e)},Fn=function(e,t){try{return JSON.stringify(e,function(e){var t=[];return function(n,r){if(!e||null!=r){if("object"!==f(r)||null===r)return r;for(;t.length>0&&t[t.length-1]!==this;)t.pop();return t.includes(r)?(Pn.debug("Circular Reference detected for key: ".concat(n)),"[Circular Reference]"):(t.push(r),r)}}}(t))}catch(e){return Pn.warn("Failed to convert the value to a JSON string."),null}},Un=function(e,t,n){var r,i;try{r="string"==typeof e?e:e instanceof Error||e.message?e.message:Fn(e)}catch(e){r=""}if("object"===f(i=e)&&null!==i&&"target"in i){if(e.target&&"script"!==e.target.localName)return"";if(e.target.dataset&&(e.target.dataset.loader!==Ln||"true"!==e.target.dataset.isnonnativesdk))return"";if(r="error in script loading:: src:: ".concat(e.target.src," id:: ").concat(e.target.id),"ad-block"===e.target.id)return n.page("RudderJS-Initiated","ad-block page request",{path:"/ad-blocked",title:r},n.sendAdblockPageOptions),""}return"[handleError]::".concat(t||"",' "').concat(r,'"')},jn=function(e,t,n){var r;try{r=Un(e,t,n)}catch(t){Pn.error("[handleError] Exception:: ",t),Pn.error("[handleError] Original error:: ",Fn(e)),Gn(t)}r&&(Pn.error(r),function(e){return!e.message||!Bn.some((function(t){return e.message.includes(t)}))}(e)&&Gn(e))},Kn={exports:{}};var Qn,zn={exports:{}},Hn=g(Object.freeze({__proto__:null,default:{}}));function qn(){return Qn||(Qn=1,zn.exports=(e=e||function(e,t){var n;if("undefined"!=typeof window&&window.crypto&&(n=window.crypto),"undefined"!=typeof self&&self.crypto&&(n=self.crypto),"undefined"!=typeof globalThis&&globalThis.crypto&&(n=globalThis.crypto),!n&&"undefined"!=typeof window&&window.msCrypto&&(n=window.msCrypto),!n&&void 0!==d&&d.crypto&&(n=d.crypto),!n)try{n=Hn}catch(e){}var r=function(){if(n){if("function"==typeof n.getRandomValues)try{return n.getRandomValues(new Uint32Array(1))[0]}catch(e){}if("function"==typeof n.randomBytes)try{return n.randomBytes(4).readInt32LE()}catch(e){}}throw new Error("Native crypto module could not be used to get secure random number.")},i=Object.create||function(){function e(){}return function(t){var n;return e.prototype=t,n=new e,e.prototype=null,n}}(),o={},s=o.lib={},a=s.Base={extend:function(e){var t=i(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},u=s.WordArray=a.extend({init:function(e,n){e=this.words=e||[],this.sigBytes=n!=t?n:4*e.length},toString:function(e){return(e||l).stringify(this)},concat:function(e){var t=this.words,n=e.words,r=this.sigBytes,i=e.sigBytes;if(this.clamp(),r%4)for(var o=0;o<i;o++){var s=n[o>>>2]>>>24-o%4*8&255;t[r+o>>>2]|=s<<24-(r+o)%4*8}else for(var a=0;a<i;a+=4)t[r+a>>>2]=n[a>>>2];return this.sigBytes+=i,this},clamp:function(){var t=this.words,n=this.sigBytes;t[n>>>2]&=4294967295<<32-n%4*8,t.length=e.ceil(n/4)},clone:function(){var e=a.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],n=0;n<e;n+=4)t.push(r());return new u.init(t,e)}}),c=o.enc={},l=c.Hex={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],i=0;i<n;i++){var o=t[i>>>2]>>>24-i%4*8&255;r.push((o>>>4).toString(16)),r.push((15&o).toString(16))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r+=2)n[r>>>3]|=parseInt(e.substr(r,2),16)<<24-r%8*4;return new u.init(n,t/2)}},f=c.Latin1={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],i=0;i<n;i++){var o=t[i>>>2]>>>24-i%4*8&255;r.push(String.fromCharCode(o))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r++)n[r>>>2]|=(255&e.charCodeAt(r))<<24-r%4*8;return new u.init(n,t)}},h=c.Utf8={stringify:function(e){try{return decodeURIComponent(escape(f.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return f.parse(unescape(encodeURIComponent(e)))}},p=s.BufferedBlockAlgorithm=a.extend({reset:function(){this._data=new u.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=h.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var n,r=this._data,i=r.words,o=r.sigBytes,s=this.blockSize,a=o/(4*s),c=(a=t?e.ceil(a):e.max((0|a)-this._minBufferSize,0))*s,l=e.min(4*c,o);if(c){for(var f=0;f<c;f+=s)this._doProcessBlock(i,f);n=i.splice(0,c),r.sigBytes-=l}return new u.init(n,l)},clone:function(){var e=a.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0});s.Hasher=p.extend({cfg:a.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){p.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:16,_createHelper:function(e){return function(t,n){return new e.init(n).finalize(t)}},_createHmacHelper:function(e){return function(t,n){return new g.HMAC.init(e,n).finalize(t)}}});var g=o.algo={};return o}(Math),e)),zn.exports;var e}var Vn,Wn={exports:{}};function Yn(){return Vn||(Vn=1,Wn.exports=(e=qn(),function(){var t=e,n=t.lib.WordArray;function r(e,t,r){for(var i=[],o=0,s=0;s<t;s++)if(s%4){var a=r[e.charCodeAt(s-1)]<<s%4*2|r[e.charCodeAt(s)]>>>6-s%4*2;i[o>>>2]|=a<<24-o%4*8,o++}return n.create(i,o)}t.enc.Base64={stringify:function(e){var t=e.words,n=e.sigBytes,r=this._map;e.clamp();for(var i=[],o=0;o<n;o+=3)for(var s=(t[o>>>2]>>>24-o%4*8&255)<<16|(t[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|t[o+2>>>2]>>>24-(o+2)%4*8&255,a=0;a<4&&o+.75*a<n;a++)i.push(r.charAt(s>>>6*(3-a)&63));var u=r.charAt(64);if(u)for(;i.length%4;)i.push(u);return i.join("")},parse:function(e){var t=e.length,n=this._map,i=this._reverseMap;if(!i){i=this._reverseMap=[];for(var o=0;o<n.length;o++)i[n.charCodeAt(o)]=o}var s=n.charAt(64);if(s){var a=e.indexOf(s);-1!==a&&(t=a)}return r(e,t,i)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),e.enc.Base64)),Wn.exports;var e}var Xn,Jn={exports:{}};function $n(){return Xn||(Xn=1,Jn.exports=(e=qn(),function(t){var n=e,r=n.lib,i=r.WordArray,o=r.Hasher,s=n.algo,a=[];!function(){for(var e=0;e<64;e++)a[e]=4294967296*t.abs(t.sin(e+1))|0}();var u=s.MD5=o.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,t){for(var n=0;n<16;n++){var r=t+n,i=e[r];e[r]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var o=this._hash.words,s=e[t+0],u=e[t+1],d=e[t+2],p=e[t+3],g=e[t+4],y=e[t+5],v=e[t+6],m=e[t+7],I=e[t+8],A=e[t+9],b=e[t+10],k=e[t+11],E=e[t+12],C=e[t+13],S=e[t+14],O=e[t+15],w=o[0],T=o[1],_=o[2],R=o[3];w=c(w,T,_,R,s,7,a[0]),R=c(R,w,T,_,u,12,a[1]),_=c(_,R,w,T,d,17,a[2]),T=c(T,_,R,w,p,22,a[3]),w=c(w,T,_,R,g,7,a[4]),R=c(R,w,T,_,y,12,a[5]),_=c(_,R,w,T,v,17,a[6]),T=c(T,_,R,w,m,22,a[7]),w=c(w,T,_,R,I,7,a[8]),R=c(R,w,T,_,A,12,a[9]),_=c(_,R,w,T,b,17,a[10]),T=c(T,_,R,w,k,22,a[11]),w=c(w,T,_,R,E,7,a[12]),R=c(R,w,T,_,C,12,a[13]),_=c(_,R,w,T,S,17,a[14]),w=l(w,T=c(T,_,R,w,O,22,a[15]),_,R,u,5,a[16]),R=l(R,w,T,_,v,9,a[17]),_=l(_,R,w,T,k,14,a[18]),T=l(T,_,R,w,s,20,a[19]),w=l(w,T,_,R,y,5,a[20]),R=l(R,w,T,_,b,9,a[21]),_=l(_,R,w,T,O,14,a[22]),T=l(T,_,R,w,g,20,a[23]),w=l(w,T,_,R,A,5,a[24]),R=l(R,w,T,_,S,9,a[25]),_=l(_,R,w,T,p,14,a[26]),T=l(T,_,R,w,I,20,a[27]),w=l(w,T,_,R,C,5,a[28]),R=l(R,w,T,_,d,9,a[29]),_=l(_,R,w,T,m,14,a[30]),w=f(w,T=l(T,_,R,w,E,20,a[31]),_,R,y,4,a[32]),R=f(R,w,T,_,I,11,a[33]),_=f(_,R,w,T,k,16,a[34]),T=f(T,_,R,w,S,23,a[35]),w=f(w,T,_,R,u,4,a[36]),R=f(R,w,T,_,g,11,a[37]),_=f(_,R,w,T,m,16,a[38]),T=f(T,_,R,w,b,23,a[39]),w=f(w,T,_,R,C,4,a[40]),R=f(R,w,T,_,s,11,a[41]),_=f(_,R,w,T,p,16,a[42]),T=f(T,_,R,w,v,23,a[43]),w=f(w,T,_,R,A,4,a[44]),R=f(R,w,T,_,E,11,a[45]),_=f(_,R,w,T,O,16,a[46]),w=h(w,T=f(T,_,R,w,d,23,a[47]),_,R,s,6,a[48]),R=h(R,w,T,_,m,10,a[49]),_=h(_,R,w,T,S,15,a[50]),T=h(T,_,R,w,y,21,a[51]),w=h(w,T,_,R,E,6,a[52]),R=h(R,w,T,_,p,10,a[53]),_=h(_,R,w,T,b,15,a[54]),T=h(T,_,R,w,u,21,a[55]),w=h(w,T,_,R,I,6,a[56]),R=h(R,w,T,_,O,10,a[57]),_=h(_,R,w,T,v,15,a[58]),T=h(T,_,R,w,C,21,a[59]),w=h(w,T,_,R,g,6,a[60]),R=h(R,w,T,_,k,10,a[61]),_=h(_,R,w,T,d,15,a[62]),T=h(T,_,R,w,A,21,a[63]),o[0]=o[0]+w|0,o[1]=o[1]+T|0,o[2]=o[2]+_|0,o[3]=o[3]+R|0},_doFinalize:function(){var e=this._data,n=e.words,r=8*this._nDataBytes,i=8*e.sigBytes;n[i>>>5]|=128<<24-i%32;var o=t.floor(r/4294967296),s=r;n[15+(i+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),n[14+(i+64>>>9<<4)]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),e.sigBytes=4*(n.length+1),this._process();for(var a=this._hash,u=a.words,c=0;c<4;c++){var l=u[c];u[c]=16711935&(l<<8|l>>>24)|4278255360&(l<<24|l>>>8)}return a},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});function c(e,t,n,r,i,o,s){var a=e+(t&n|~t&r)+i+s;return(a<<o|a>>>32-o)+t}function l(e,t,n,r,i,o,s){var a=e+(t&r|n&~r)+i+s;return(a<<o|a>>>32-o)+t}function f(e,t,n,r,i,o,s){var a=e+(t^n^r)+i+s;return(a<<o|a>>>32-o)+t}function h(e,t,n,r,i,o,s){var a=e+(n^(t|~r))+i+s;return(a<<o|a>>>32-o)+t}n.MD5=o._createHelper(u),n.HmacMD5=o._createHmacHelper(u)}(Math),e.MD5)),Jn.exports;var e}var Zn,er={exports:{}},tr={exports:{}};function nr(){return Zn||(Zn=1,tr.exports=(a=qn(),t=(e=a).lib,n=t.WordArray,r=t.Hasher,i=e.algo,o=[],s=i.SHA1=r.extend({_doReset:function(){this._hash=new n.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var n=this._hash.words,r=n[0],i=n[1],s=n[2],a=n[3],u=n[4],c=0;c<80;c++){if(c<16)o[c]=0|e[t+c];else{var l=o[c-3]^o[c-8]^o[c-14]^o[c-16];o[c]=l<<1|l>>>31}var f=(r<<5|r>>>27)+u+o[c];f+=c<20?1518500249+(i&s|~i&a):c<40?1859775393+(i^s^a):c<60?(i&s|i&a|s&a)-1894007588:(i^s^a)-899497514,u=a,a=s,s=i<<30|i>>>2,i=r,r=f}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+s|0,n[3]=n[3]+a|0,n[4]=n[4]+u|0},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,r=8*e.sigBytes;return t[r>>>5]|=128<<24-r%32,t[14+(r+64>>>9<<4)]=Math.floor(n/4294967296),t[15+(r+64>>>9<<4)]=n,e.sigBytes=4*t.length,this._process(),this._hash},clone:function(){var e=r.clone.call(this);return e._hash=this._hash.clone(),e}}),e.SHA1=r._createHelper(s),e.HmacSHA1=r._createHmacHelper(s),a.SHA1)),tr.exports;var e,t,n,r,i,o,s,a}var rr,ir,or={exports:{}};function sr(){return ir||(ir=1,er.exports=function(e){return n=(t=e).lib,r=n.Base,i=n.WordArray,o=t.algo,s=o.MD5,a=o.EvpKDF=r.extend({cfg:r.extend({keySize:4,hasher:s,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var n,r=this.cfg,o=r.hasher.create(),s=i.create(),a=s.words,u=r.keySize,c=r.iterations;a.length<u;){n&&o.update(n),n=o.update(e).finalize(t),o.reset();for(var l=1;l<c;l++)n=o.finalize(n),o.reset();s.concat(n)}return s.sigBytes=4*u,s}}),t.EvpKDF=function(e,t,n){return a.create(n).compute(e,t)},e.EvpKDF;var t,n,r,i,o,s,a}(qn(),nr(),(rr||(rr=1,or.exports=(e=qn(),void function(){var t=e,n=t.lib.Base,r=t.enc.Utf8;t.algo.HMAC=n.extend({init:function(e,t){e=this._hasher=new e.init,"string"==typeof t&&(t=r.parse(t));var n=e.blockSize,i=4*n;t.sigBytes>i&&(t=e.finalize(t)),t.clamp();for(var o=this._oKey=t.clone(),s=this._iKey=t.clone(),a=o.words,u=s.words,c=0;c<n;c++)a[c]^=1549556828,u[c]^=909522486;o.sigBytes=s.sigBytes=i,this.reset()},reset:function(){var e=this._hasher;e.reset(),e.update(this._iKey)},update:function(e){return this._hasher.update(e),this},finalize:function(e){var t=this._hasher,n=t.finalize(e);return t.reset(),t.finalize(this._oKey.clone().concat(n))}})}())),or.exports))),er.exports;var e}var ar,ur,cr={exports:{}};Kn.exports=function(e){return function(){var t=e,n=t.lib.BlockCipher,r=t.algo,i=[],o=[],s=[],a=[],u=[],c=[],l=[],f=[],h=[],d=[];!function(){for(var e=[],t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;var n=0,r=0;for(t=0;t<256;t++){var p=r^r<<1^r<<2^r<<3^r<<4;p=p>>>8^255&p^99,i[n]=p,o[p]=n;var g=e[n],y=e[g],v=e[y],m=257*e[p]^16843008*p;s[n]=m<<24|m>>>8,a[n]=m<<16|m>>>16,u[n]=m<<8|m>>>24,c[n]=m,m=16843009*v^65537*y^257*g^16843008*n,l[p]=m<<24|m>>>8,f[p]=m<<16|m>>>16,h[p]=m<<8|m>>>24,d[p]=m,n?(n=g^e[e[e[v^g]]],r^=e[e[r]]):n=r=1}}();var p=[0,1,2,4,8,16,32,64,128,27,54],g=r.AES=n.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var e=this._keyPriorReset=this._key,t=e.words,n=e.sigBytes/4,r=4*((this._nRounds=n+6)+1),o=this._keySchedule=[],s=0;s<r;s++)s<n?o[s]=t[s]:(c=o[s-1],s%n?n>6&&s%n==4&&(c=i[c>>>24]<<24|i[c>>>16&255]<<16|i[c>>>8&255]<<8|i[255&c]):(c=i[(c=c<<8|c>>>24)>>>24]<<24|i[c>>>16&255]<<16|i[c>>>8&255]<<8|i[255&c],c^=p[s/n|0]<<24),o[s]=o[s-n]^c);for(var a=this._invKeySchedule=[],u=0;u<r;u++){if(s=r-u,u%4)var c=o[s];else c=o[s-4];a[u]=u<4||s<=4?c:l[i[c>>>24]]^f[i[c>>>16&255]]^h[i[c>>>8&255]]^d[i[255&c]]}}},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,s,a,u,c,i)},decryptBlock:function(e,t){var n=e[t+1];e[t+1]=e[t+3],e[t+3]=n,this._doCryptBlock(e,t,this._invKeySchedule,l,f,h,d,o),n=e[t+1],e[t+1]=e[t+3],e[t+3]=n},_doCryptBlock:function(e,t,n,r,i,o,s,a){for(var u=this._nRounds,c=e[t]^n[0],l=e[t+1]^n[1],f=e[t+2]^n[2],h=e[t+3]^n[3],d=4,p=1;p<u;p++){var g=r[c>>>24]^i[l>>>16&255]^o[f>>>8&255]^s[255&h]^n[d++],y=r[l>>>24]^i[f>>>16&255]^o[h>>>8&255]^s[255&c]^n[d++],v=r[f>>>24]^i[h>>>16&255]^o[c>>>8&255]^s[255&l]^n[d++],m=r[h>>>24]^i[c>>>16&255]^o[l>>>8&255]^s[255&f]^n[d++];c=g,l=y,f=v,h=m}g=(a[c>>>24]<<24|a[l>>>16&255]<<16|a[f>>>8&255]<<8|a[255&h])^n[d++],y=(a[l>>>24]<<24|a[f>>>16&255]<<16|a[h>>>8&255]<<8|a[255&c])^n[d++],v=(a[f>>>24]<<24|a[h>>>16&255]<<16|a[c>>>8&255]<<8|a[255&l])^n[d++],m=(a[h>>>24]<<24|a[c>>>16&255]<<16|a[l>>>8&255]<<8|a[255&f])^n[d++],e[t]=g,e[t+1]=y,e[t+2]=v,e[t+3]=m},keySize:8});t.AES=n._createHelper(g)}(),e.AES}(qn(),Yn(),$n(),sr(),ar||(ar=1,cr.exports=(ur=qn(),sr(),void(ur.lib.Cipher||function(e){var t=ur,n=t.lib,r=n.Base,i=n.WordArray,o=n.BufferedBlockAlgorithm,s=t.enc;s.Utf8;var a=s.Base64,u=t.algo.EvpKDF,c=n.Cipher=o.extend({cfg:r.extend(),createEncryptor:function(e,t){return this.create(this._ENC_XFORM_MODE,e,t)},createDecryptor:function(e,t){return this.create(this._DEC_XFORM_MODE,e,t)},init:function(e,t,n){this.cfg=this.cfg.extend(n),this._xformMode=e,this._key=t,this.reset()},reset:function(){o.reset.call(this),this._doReset()},process:function(e){return this._append(e),this._process()},finalize:function(e){return e&&this._append(e),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function e(e){return"string"==typeof e?m:y}return function(t){return{encrypt:function(n,r,i){return e(r).encrypt(t,n,r,i)},decrypt:function(n,r,i){return e(r).decrypt(t,n,r,i)}}}}()});n.StreamCipher=c.extend({_doFinalize:function(){return this._process(!0)},blockSize:1});var l=t.mode={},f=n.BlockCipherMode=r.extend({createEncryptor:function(e,t){return this.Encryptor.create(e,t)},createDecryptor:function(e,t){return this.Decryptor.create(e,t)},init:function(e,t){this._cipher=e,this._iv=t}}),h=l.CBC=function(){var t=f.extend();function n(t,n,r){var i,o=this._iv;o?(i=o,this._iv=e):i=this._prevBlock;for(var s=0;s<r;s++)t[n+s]^=i[s]}return t.Encryptor=t.extend({processBlock:function(e,t){var r=this._cipher,i=r.blockSize;n.call(this,e,t,i),r.encryptBlock(e,t),this._prevBlock=e.slice(t,t+i)}}),t.Decryptor=t.extend({processBlock:function(e,t){var r=this._cipher,i=r.blockSize,o=e.slice(t,t+i);r.decryptBlock(e,t),n.call(this,e,t,i),this._prevBlock=o}}),t}(),d=(t.pad={}).Pkcs7={pad:function(e,t){for(var n=4*t,r=n-e.sigBytes%n,o=r<<24|r<<16|r<<8|r,s=[],a=0;a<r;a+=4)s.push(o);var u=i.create(s,r);e.concat(u)},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}};n.BlockCipher=c.extend({cfg:c.cfg.extend({mode:h,padding:d}),reset:function(){var e;c.reset.call(this);var t=this.cfg,n=t.iv,r=t.mode;this._xformMode==this._ENC_XFORM_MODE?e=r.createEncryptor:(e=r.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==e?this._mode.init(this,n&&n.words):(this._mode=e.call(r,this,n&&n.words),this._mode.__creator=e)},_doProcessBlock:function(e,t){this._mode.processBlock(e,t)},_doFinalize:function(){var e,t=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(t.pad(this._data,this.blockSize),e=this._process(!0)):(e=this._process(!0),t.unpad(e)),e},blockSize:4});var p=n.CipherParams=r.extend({init:function(e){this.mixIn(e)},toString:function(e){return(e||this.formatter).stringify(this)}}),g=(t.format={}).OpenSSL={stringify:function(e){var t=e.ciphertext,n=e.salt;return(n?i.create([1398893684,1701076831]).concat(n).concat(t):t).toString(a)},parse:function(e){var t,n=a.parse(e),r=n.words;return 1398893684==r[0]&&1701076831==r[1]&&(t=i.create(r.slice(2,4)),r.splice(0,4),n.sigBytes-=16),p.create({ciphertext:n,salt:t})}},y=n.SerializableCipher=r.extend({cfg:r.extend({format:g}),encrypt:function(e,t,n,r){r=this.cfg.extend(r);var i=e.createEncryptor(n,r),o=i.finalize(t),s=i.cfg;return p.create({ciphertext:o,key:n,iv:s.iv,algorithm:e,mode:s.mode,padding:s.padding,blockSize:e.blockSize,formatter:r.format})},decrypt:function(e,t,n,r){return r=this.cfg.extend(r),t=this._parse(t,r.format),e.createDecryptor(n,r).finalize(t.ciphertext)},_parse:function(e,t){return"string"==typeof e?t.parse(e,this):e}}),v=(t.kdf={}).OpenSSL={execute:function(e,t,n,r,o){if(r||(r=i.random(8)),o)s=u.create({keySize:t+n,hasher:o}).compute(e,r);else var s=u.create({keySize:t+n}).compute(e,r);var a=i.create(s.words.slice(t),4*n);return s.sigBytes=4*t,p.create({key:s,iv:a,salt:r})}},m=n.PasswordBasedCipher=y.extend({cfg:y.cfg.extend({kdf:v}),encrypt:function(e,t,n,r){var i=(r=this.cfg.extend(r)).kdf.execute(n,e.keySize,e.ivSize,r.salt,r.hasher);r.iv=i.iv;var o=y.encrypt.call(this,e,t,i.key,r);return o.mixIn(i),o},decrypt:function(e,t,n,r){r=this.cfg.extend(r),t=this._parse(t,r.format);var i=r.kdf.execute(n,e.keySize,e.ivSize,t.salt,r.hasher);return r.iv=i.iv,y.decrypt.call(this,e,t,i.key,r)}})}()))));var lr=p(Kn.exports),fr={exports:{}};fr.exports=function(e){return e.enc.Utf8}(qn());var hr=p(fr.exports),dr=function(e){return null!=e&&"object"===f(e)&&!1===Array.isArray(e)},pr=function(e,t,n){if(dr(n)||(n={default:n}),!vr(e))return void 0!==n.default?n.default:e;"number"==typeof t&&(t=String(t));var r=Array.isArray(t),i="string"==typeof t,o=n.separator||".",s=n.joinChar||("string"==typeof o?o:".");if(!i&&!r)return e;if(i&&t in e)return yr(t,e,n)?e[t]:n.default;var a=r?t:function(e,t,n){if("function"==typeof n.split)return n.split(e);return e.split(t)}(t,o,n),u=a.length,c=0;do{var l=a[c];for("number"==typeof l&&(l=String(l));l&&"\\"===l.slice(-1);)l=gr([l.slice(0,-1),a[++c]||""],s,n);if(l in e){if(!yr(l,e,n))return n.default;e=e[l]}else{for(var f=!1,h=c+1;h<u;)if(f=(l=gr([l,a[h++]],s,n))in e){if(!yr(l,e,n))return n.default;e=e[l],c=h-1;break}if(!f)return n.default}}while(++c<u&&vr(e));return c===u?e:n.default};function gr(e,t,n){return"function"==typeof n.join?n.join(e):e[0]+t+e[1]}function yr(e,t,n){return"function"!=typeof n.isValid||n.isValid(e,t)}function vr(e){return dr(e)||Array.isArray(e)||"function"==typeof e}var mr,Ir,Ar=p(pr),br={exports:{}};function kr(){if(Ir)return mr;Ir=1;var e=1e3,t=60*e,n=60*t,r=24*n,i=7*r,o=365.25*r;function s(e,t,n,r){var i=t>=1.5*n;return Math.round(e/n)+" "+r+(i?"s":"")}return mr=function(a,u){u=u||{};var c=f(a);if("string"===c&&a.length>0)return function(s){if((s=String(s)).length>100)return;var a=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(s);if(!a)return;var u=parseFloat(a[1]);switch((a[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return u*o;case"weeks":case"week":case"w":return u*i;case"days":case"day":case"d":return u*r;case"hours":case"hour":case"hrs":case"hr":case"h":return u*n;case"minutes":case"minute":case"mins":case"min":case"m":return u*t;case"seconds":case"second":case"secs":case"sec":case"s":return u*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return u;default:return}}(a);if("number"===c&&isFinite(a))return u.long?function(i){var o=Math.abs(i);if(o>=r)return s(i,o,r,"day");if(o>=n)return s(i,o,n,"hour");if(o>=t)return s(i,o,t,"minute");if(o>=e)return s(i,o,e,"second");return i+" ms"}(a):function(i){var o=Math.abs(i);if(o>=r)return Math.round(i/r)+"d";if(o>=n)return Math.round(i/n)+"h";if(o>=t)return Math.round(i/t)+"m";if(o>=e)return Math.round(i/e)+"s";return i+"ms"}(a);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(a))},mr}var Er=function(e){function t(e){var r,i,o,s=null;function a(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];if(a.enabled){var o=a,s=Number(new Date),u=s-(r||s);o.diff=u,o.prev=r,o.curr=s,r=s,n[0]=t.coerce(n[0]),"string"!=typeof n[0]&&n.unshift("%O");var c=0;n[0]=n[0].replace(/%([a-zA-Z%])/g,(function(e,r){if("%%"===e)return"%";c++;var i=t.formatters[r];if("function"==typeof i){var s=n[c];e=i.call(o,s),n.splice(c,1),c--}return e})),t.formatArgs.call(o,n),(o.log||t.log).apply(o,n)}}return a.namespace=e,a.useColors=t.useColors(),a.color=t.selectColor(e),a.extend=n,a.destroy=t.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:function(){return null!==s?s:(i!==t.namespaces&&(i=t.namespaces,o=t.enabled(e)),o)},set:function(e){s=e}}),"function"==typeof t.init&&t.init(a),a}function n(e,n){var r=t(this.namespace+(void 0===n?":":n)+e);return r.log=this.log,r}function r(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){var e=[].concat(c(t.names.map(r)),c(t.skips.map(r).map((function(e){return"-"+e})))).join(",");return t.enable(""),e},t.enable=function(e){var n;t.save(e),t.namespaces=e,t.names=[],t.skips=[];var r=("string"==typeof e?e:"").split(/[\s,]+/),i=r.length;for(n=0;n<i;n++)r[n]&&("-"===(e=r[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.slice(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;var n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=kr(),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((function(n){t[n]=e[n]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){for(var n=0,r=0;r<e.length;r++)n=(n<<5)-n+e.charCodeAt(r),n|=0;return t.colors[Math.abs(n)%t.colors.length]},t.enable(t.load()),t};!function(e,t){var n;t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;var n="color: "+this.color;t.splice(1,0,n,"color: inherit");var r=0,i=0;t[0].replace(/%[a-zA-Z%]/g,(function(e){"%%"!==e&&(r++,"%c"===e&&(i=r))})),t.splice(i,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){var e;try{e=t.storage.getItem("debug")}catch(e){}!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG);return e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(n=!1,function(){n||(n=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||function(){},e.exports=Er(t),e.exports.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}(br,br.exports);var Cr=br.exports,Sr=Cr("cookie");function Or(){var e;try{e=document.cookie}catch(e){return"undefined"!=typeof console&&"function"==typeof console.error&&console.error(e.stack||e),{}}return function(e){var t,n={},r=e.split(/ *; */);if(""==r[0])return n;for(var i=0;i<r.length;++i)n[Tr((t=r[i].split("="))[0])]=Tr(t[1]);return n}(e)}function wr(e){try{return encodeURIComponent(e)}catch(t){Sr("error `encode(%o)` - %o",e,t)}}function Tr(e){try{return decodeURIComponent(e)}catch(t){Sr("error `decode(%o)` - %o",e,t)}}var _r=p((function(e,t,n){switch(arguments.length){case 3:case 2:return function(e,t,n){n=n||{};var r=wr(e)+"="+wr(t);null==t&&(n.maxage=-1);n.maxage&&(n.expires=new Date(+new Date+n.maxage));n.path&&(r+="; path="+n.path);n.domain&&(r+="; domain="+n.domain);n.expires&&(r+="; expires="+n.expires.toUTCString());n.samesite&&(r+="; samesite="+n.samesite);n.secure&&(r+="; secure");document.cookie=r}(e,t,n);case 1:return function(e){return Or()[e]}(e);default:return Or()}})),Rr={exports:{}},Pr=Math.max,xr=function(e,t){var n=t?t.length:0;if(!n)return[];for(var r=Pr(Number(e)||0,0),i=Pr(n-r,0),o=new Array(i),s=0;s<i;s+=1)o[s]=t[s+r];return o},Dr=Math.max,Lr=function(e){if(null==e||!e.length)return[];for(var t=new Array(Dr(e.length-2,0)),n=1;n<e.length;n+=1)t[n-1]=e[n];return t},Mr=xr,Br=Lr,Nr=Object.prototype.hasOwnProperty,Gr=Object.prototype.toString,Fr=function(e){return Boolean(e)&&"[object Object]"===Gr.call(e)},Ur=function(e,t,n,r){return Nr.call(t,r)&&void 0===e[r]&&(e[r]=n),t},jr=function(e,t,n,r){return Nr.call(t,r)&&(Fr(e[r])&&Fr(n)?e[r]=Qr(e[r],n):void 0===e[r]&&(e[r]=n)),t},Kr=function(e,t){if(n=t,!Boolean(n)||"object"!==f(n))return t;var n;e=e||Ur;for(var r=Mr(2,arguments),i=0;i<r.length;i+=1)for(var o in r[i])e(t,r[i],r[i][o],o);return t},Qr=function(e){return Kr.apply(null,[jr,e].concat(Br(arguments)))};Rr.exports=function(e){return Kr.apply(null,[null,e].concat(Br(arguments)))},Rr.exports.deep=Qr;var zr=p(Rr.exports),Hr={exports:{}},qr=Cr("cookie"),Vr=function(e,t,n){switch(arguments.length){case 3:case 2:return function(e,t,n){n=n||{};var r=Yr(e)+"="+Yr(t);null==t&&(n.maxage=-1);n.maxage&&(n.expires=new Date(+new Date+n.maxage));n.path&&(r+="; path="+n.path);n.domain&&(r+="; domain="+n.domain);n.expires&&(r+="; expires="+n.expires.toUTCString());n.secure&&(r+="; secure");document.cookie=r}(e,t,n);case 1:return function(e){return Wr()[e]}(e);default:return Wr()}};function Wr(){var e;try{e=document.cookie}catch(e){return"undefined"!=typeof console&&"function"==typeof console.error&&console.error(e.stack||e),{}}return function(e){var t,n={},r=e.split(/ *; */);if(""==r[0])return n;for(var i=0;i<r.length;++i)n[Xr((t=r[i].split("="))[0])]=Xr(t[1]);return n}(e)}function Yr(e){try{return encodeURIComponent(e)}catch(t){qr("error `encode(%o)` - %o",e,t)}}function Xr(e){try{return decodeURIComponent(e)}catch(t){qr("error `decode(%o)` - %o",e,t)}}!function(e,t){var n=Vr;function r(e){for(var n=t.cookie,r=t.levels(e),i=0;i<r.length;++i){var o="__tld__",s=r[i],a={domain:"."+s};if(n(o,1,a),n(o))return n(o,null,a),s}return""}r.levels=function(e){var t,n,r=("function"!=typeof window.URL?(t=e,(n=document.createElement("a")).href=t,n.hostname):new URL(e).hostname).split("."),i=r[r.length-1],o=[];if(4===r.length&&i===parseInt(i,10))return o;if(r.length<=1)return o;for(var s=r.length-2;s>=0;--s)o.push(r.slice(s).join("."));return o},r.cookie=n,t=e.exports=r}(Hr,Hr.exports);var Jr=p(Hr.exports),$r=new(function(){return n((function e(n){t(this,e),this.cOpts={},this.options(n),this.isSupportAvailable=this.checkSupportAvailability()}),[{key:"options",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(0===arguments.length)return this.cOpts;var t=".".concat(Jr(window.location.href));return"."===t&&(t=null),this.cOpts=zr(e,{maxage:31536e6,path:"/",domain:t,samesite:"Lax"}),e.sameDomainCookiesOnly&&delete this.cOpts.domain,this.cOpts}},{key:"set",value:function(e,t){try{return _r(e,t,w(this.cOpts)),!0}catch(e){return Pn.error(e),!1}}},{key:"get",value:function(e){return _r(e)}},{key:"remove",value:function(e){try{return _r(e,null,w(this.cOpts)),!0}catch(e){return!1}}},{key:"checkSupportAvailability",value:function(){var e="test_rudder_cookie";return this.set(e,!0),!!this.get(e)&&(this.remove(e),!0)}}])}())({}),Zr={exports:{}};Zr.exports=function(){function e(e){return e=JSON.stringify(e),!!/^\{[\s\S]*\}$/.test(e)}function t(e){return void 0===e||"function"==typeof e?e+"":JSON.stringify(e)}function n(e){if("string"==typeof e)try{return JSON.parse(e)}catch(t){return e}}function r(e){return"[object Function]"==={}.toString.call(e)}function i(e){return"[object Array]"===Object.prototype.toString.call(e)}function o(e){var t="_Is_Incognit",n="yes";try{e||(e=window.localStorage),e.setItem(t,n),e.removeItem(t)}catch(t){var r={_data:{},setItem:function(e,t){return r._data[e]=String(t)},getItem:function(e){return r._data.hasOwnProperty(e)?r._data[e]:void 0},removeItem:function(e){return delete r._data[e]},clear:function(){return r._data={}}};e=r}finally{e.getItem(t)===n&&e.removeItem(t)}return e}var s=o();function a(){if(!(this instanceof a))return new a}a.prototype={set:function(n,r){if(n&&!e(n))s.setItem(n,t(r));else if(e(n))for(var i in n)this.set(i,n[i]);return this},get:function(e){if(void 0===e){var t={};return this.forEach((function(e,n){return t[e]=n})),t}if("?"===e.charAt(0))return this.has(e.substr(1));var r=arguments;if(r.length>1){for(var i={},o=0,a=r.length;o<a;o++){var u=n(s.getItem(r[o]));this.has(r[o])&&(i[r[o]]=u)}return i}return n(s.getItem(e))},clear:function(){return s.clear(),this},remove:function(e){var t=this.get(e);return s.removeItem(e),t},has:function(e){return{}.hasOwnProperty.call(this.get(),e)},keys:function(){var e=[];return this.forEach((function(t){e.push(t)})),e},forEach:function(e){for(var t=0,n=s.length;t<n;t++){var r=s.key(t);e(r,this.get(r))}return this},search:function(e){for(var t=this.keys(),n={},r=0,i=t.length;r<i;r++)t[r].indexOf(e)>-1&&(n[t[r]]=this.get(t[r]));return n},len:function(){return s.length}};var u=null;function c(t,n){var o=arguments,s=null;if(u||(u=a()),0===o.length)return u.get();if(1===o.length){if("string"==typeof t)return u.get(t);if(e(t))return u.set(t)}if(2===o.length&&"string"==typeof t){if(!n)return u.remove(t);if(n&&"string"==typeof n)return u.set(t,n);n&&r(n)&&(s=null,s=n(t,u.get(t)),c.set(t,s))}if(2===o.length&&i(t)&&r(n))for(var l=0,f=t.length;l<f;l++)s=n(t[l],u.get(t[l])),c.set(t[l],s);return c}for(var l in a.prototype)c[l]=a.prototype[l];return c}();var ei=p(Zr.exports),ti=new(function(){return n((function e(n){t(this,e),this.sOpts={},this.enabled=this.checkSupportAvailability(),this.options(n)}),[{key:"options",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return 0===arguments.length||(zr(e,{enabled:!0}),this.enabled=e.enabled&&this.enabled,this.sOpts=e),this.sOpts}},{key:"set",value:function(e,t){return ei.set(e,t)}},{key:"get",value:function(e){return ei.get(e)}},{key:"remove",value:function(e){return ei.remove(e)}},{key:"checkSupportAvailability",value:function(){try{var e="test_rudder_ls";return this.set(e,!0),!!this.get(e)&&(this.remove(e),!0)}catch(e){return!1}}}])}())({}),ni=function(e){return(new TextDecoder).decode((t=e,n=globalThis.atob(t).split("").map((function(e){return e.charCodeAt(0)})),new Uint8Array(n)));var t,n},ri="rl_user_id",ii="rl_trait",oi="rl_anonymous_id",si="rl_group_id",ai="rl_group_trait",ui="rl_page_init_referrer",ci="rl_page_init_referring_domain",li="rl_session",fi="rl_auth_token",hi="RudderEncrypt:",di="RS_ENC_v3_",pi="Rudder",gi={segment:"ajs_anonymous_id"};function yi(e){try{return e?JSON.parse(e):null}catch(t){return Pn.error(t),e||null}}function vi(e){return e.replace(/^\s+|\s+$/gm,"")}function mi(e){return e&&"string"==typeof e&&""!==vi(e)?e.substring(0,hi.length)===hi?lr.decrypt(e.substring(hi.length),pi).toString(hr):e.substring(0,di.length)===di?ni(e.substring(di.length)):e:e}for(var Ii,Ai=function(){return n((function e(){t(this,e),$r.isSupportAvailable?this.storage=$r:(ti.enabled&&(this.storage=ti),this.storage||Pn.error("No storage is available :: initializing the SDK without storage"))}),[{key:"options",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.storage.options(e)}},{key:"setItem",value:function(e,t){var n=Fn(t);null!==n&&this.storage.set(e,function(e){return""===vi(e)?e:"".concat(hi).concat(lr.encrypt(e,pi).toString())}(n))}},{key:"setStringItem",value:function(e,t){"string"==typeof t?this.setItem(e,t):Pn.error("[Storage] ".concat(e," should be string"))}},{key:"setUserId",value:function(e){this.setStringItem(ri,e)}},{key:"setUserTraits",value:function(e){this.setItem(ii,e)}},{key:"setGroupId",value:function(e){this.setStringItem(si,e)}},{key:"setGroupTraits",value:function(e){this.setItem(ai,e)}},{key:"setAnonymousId",value:function(e){this.setStringItem(oi,e)}},{key:"setInitialReferrer",value:function(e){this.setItem(ui,e)}},{key:"setInitialReferringDomain",value:function(e){this.setItem(ci,e)}},{key:"setSessionInfo",value:function(e){this.setItem(li,e)}},{key:"setAuthToken",value:function(e){this.setItem(fi,e)}},{key:"getItem",value:function(e){return yi(mi(this.storage.get(e)))}},{key:"getUserId",value:function(){return this.getItem(ri)}},{key:"getUserTraits",value:function(){return this.getItem(ii)}},{key:"getGroupId",value:function(){return this.getItem(si)}},{key:"getGroupTraits",value:function(){return this.getItem(ai)}},{key:"fetchExternalAnonymousId",value:function(e){var t,n=e.toLowerCase();return Object.keys(gi).includes(n)&&"segment"===n?(ti.enabled&&(t=ti.get(gi[n])),!t&&$r.isSupportAvailable&&(t=$r.get(gi[n])),t):t}},{key:"getAnonymousId",value:function(e){var t=yi(mi(this.storage.get(oi)));if(t)return t;var n=Ar(e,"autoCapture.source");if(!0===Ar(e,"autoCapture.enabled")&&"string"==typeof n){var r=this.fetchExternalAnonymousId(n);if(r)return r}return t}},{key:"getInitialReferrer",value:function(){return this.getItem(ui)}},{key:"getInitialReferringDomain",value:function(){return this.getItem(ci)}},{key:"getSessionInfo",value:function(){return this.getItem(li)}},{key:"getAuthToken",value:function(){return this.getItem(fi)}},{key:"removeItem",value:function(e){return this.storage.remove(e)}},{key:"removeSessionInfo",value:function(){this.removeItem(li)}},{key:"clear",value:function(e){this.storage.remove(ri),this.storage.remove(ii),this.storage.remove(si),this.storage.remove(ai),this.storage.remove(fi),e&&this.storage.remove(oi)}}])}(),bi=new Ai,ki=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};try{if(document.getElementById(e))return;var r=document.createElement("script");r.src=t,r.async=void 0===n.async||n.async,r.type="text/javascript",r.id=e,!0!==n.skipDatasetAttributes&&(r.setAttribute("data-loader",Ln),void 0!==n.isNonNativeSDK&&r.setAttribute("data-isNonNativeSDK",n.isNonNativeSDK));var i=document.getElementsByTagName("head");if(i.length>0)i[0].insertBefore(r,i[0].firstChild);else{var o=document.getElementsByTagName("script")[0];o.parentNode.insertBefore(r,o)}}catch(o){jn(o)}},Ei=function(e){return null===e},Ci=function(e,t){if(!Array.isArray(e)||!Array.isArray(t))return w(t);var n=w(e);return t.forEach((function(e,t){n[t]=Array.isArray(e)||function(e){return!Ei(e)&&"object"===f(e)&&!Array.isArray(e)}(e)?Si(n[t],e):e})),n},Si=function(e,t){return R(Ci,e,t)},Oi=function(e){return function(e){return!Ei(e)&&"[object Object]"===Object.prototype.toString.call(e)}(e)&&Object.keys(e).length>0},wi=256,Ti=[];wi--;)Ti[wi]=(wi+256).toString(16).substring(1);for(var _i,Ri=4096,Pi=[],xi=0;xi<256;xi++)Pi[xi]=(xi+256).toString(16).substring(1);function Di(){var e;(!_i||xi+16>Ri)&&(e=Ri,_i=crypto.getRandomValues(new Uint8Array(e)),xi=0);for(var t,n=0,r="";n<16;n++)t=_i[xi+n],r+=6==n?Pi[15&t|64]:8==n?Pi[63&t|128]:Pi[t],1&n&&n>1&&n<11&&(r+="-");return xi+=16,r}var Li={All:"All",GA:"Google Analytics",GOOGLEADS:"Google Ads",BRAZE:"Braze",CHARTBEAT:"Chartbeat",COMSCORE:"Comscore",CUSTOMERIO:"Customer IO",DCM_Floodlight:"DCM Floodlight",FACEBOOK_PIXEL:"Facebook Pixel",GTM:"Google Tag Manager",HOTJAR:"Hotjar",HS:"HubSpot",INTERCOM:"Intercom",KEEN:"Keen",KISSMETRICS:"Kiss Metrics",LOTAME:"Lotame",VWO:"VWO",OPTIMIZELY:"Optimizely Web",FULLSTORY:"Fullstory",TVSQUARED:"TVSquared",GA4:"Google Analytics 4 (GA4)",MOENGAGE:"MoEngage",AM:"Amplitude",PENDO:"Pendo",LYTICS:"Lytics",APPCUES:"Appcues",POSTHOG:"PostHog",PROFITWELL:"ProfitWell",KLAVIYO:"Klaviyo",CLEVERTAP:"CleverTap",BINGADS:"Bing Ads",PINTEREST_TAG:"Pinterest Tag",SNAP_PIXEL:"Snap Pixel",LINKEDIN_INSIGHT_TAG:"Linkedin Insight Tag",REDDIT_PIXEL:"Reddit Pixel",DRIP:"Drip",HEAP:"Heap.io",CRITEO:"Criteo",MP:"Mixpanel",QUALTRICS:"Qualtrics",SENTRY:"Sentry",GOOGLE_OPTIMIZE:"Google Optimize",POST_AFFILIATE_PRO:"Post Affiliate Pro",LAUNCHDARKLY:"LaunchDarkly",GA360:"Google Analytics 360",ADROLL:"Adroll",VERO:"Vero",MATOMO:"Matomo",MOUSEFLOW:"Mouseflow",ROCKERBOX:"Rockerbox",CONVERTFLOW:"ConvertFlow",SNAPENGAGE:"SnapEngage",LIVECHAT:"LiveChat",SHYNET:"Shynet",WOOPRA:"Woopra",ROLLBAR:"RollBar",QUORA_PIXEL:"Quora Pixel",JUNE:"June",ENGAGE:"Engage",ITERABLE:"Iterable",YANDEX_METRICA:"Yandex.Metrica",REFINER:"Refiner",QUALAROO:"Qualaroo",PODSIGHTS:"Podsights",AXEPTIO:"Axeptio",SATISMETER:"Satismeter",MICROSOFT_CLARITY:"Microsoft Clarity",SENDINBLUE:"Sendinblue",OLARK:"Olark",LEMNISK:"Lemnisk",TIKTOK_ADS:"TikTok Ads",ACTIVE_CAMPAIGN:"ActiveCampaign",SPRIG:"Sprig",SPOTIFYPIXEL:"Spotify Pixel",COMMANDBAR:"CommandBar",NINETAILED:"Ninetailed"},Mi=["anonymous_id","id","sent_at","received_at","timestamp","original_timestamp","event_text","event"],Bi="https://api.rudderstack.com/sourceConfig/?p=npm&v=2.48.13",Ni="v1.1",Gi="js-integrations",Fi="".concat("https://cdn.rudderlabs.com","/").concat(Ni,"/").concat(Gi),Ui="https://polyfill-fastly.io/v3/polyfill.min.js?version=3.111.0&features=Number.isNaN%2CURL%2CArray.prototype.find%2CArray.prototype.includes%2CPromise%2CString.prototype.endsWith%2CString.prototype.includes%2CString.prototype.startsWith%2CObject.entries%2CObject.values%2CElement.prototype.dataset%2CString.prototype.replaceAll%2CTextEncoder%2Cnavigator.sendBeacon",ji=["Lax","None","Strict"],Ki=["US","EU"],Qi=["oneTrust","ketch"],zi=["library","consentManagement"],Hi=["none","default","full"],qi={All:!0};function Vi(e){return e&&e.endsWith("/")?e.replace(/\/+$/,""):e}function Wi(){return window.crypto&&"function"==typeof window.crypto.getRandomValues?Di():function(){var e,t=0,n="";if(!Ii||wi+16>256){for(Ii=Array(t=256);t--;)Ii[t]=256*Math.random()|0;t=wi=0}for(;t<16;t++)e=Ii[wi+t],n+=6==t?Ti[15&e|64]:8==t?Ti[63&e|128]:Ti[e],1&t&&t>1&&t<11&&(n+="-");return wi++,n}()}function Yi(){return(new Date).toISOString()}function Xi(e,t){Object.keys(e).forEach((function(n){e.hasOwnProperty(n)&&(t[n]&&(e[t[n]]=e[n]),"All"!==n&&void 0!==t[n]&&t[n]!==n&&delete e[n])}))}function Ji(e){Xi(e,_n)}function $i(e){Xi(e,Li)}function Zi(e,t){var n=[];if(!t||0===t.length)return n;var r=!0;void 0!==e.All&&(r=e.All);var i=[];return"string"==typeof t[0]?t.forEach((function(e){i.push({intgName:e,intObj:e})})):"object"===f(t[0])&&t.forEach((function(e){i.push({intgName:e.name,intObj:e})})),i.forEach((function(t){var i=t.intgName,o=t.intObj;if(r){var s=!0;void 0!==e[i]&&!1===Boolean(e[i])&&(s=!1),s&&n.push(o)}else void 0!==e[i]&&!0===Boolean(e[i])&&n.push(o)})),n}var eo=function(e){return"string"==typeof e||null==e?e:Fn(e)},to=function(e){return"string"==typeof e&&e.trim().length>0},no=function(e,t,n){try{var r=e.source.dataplanes||{};if(Object.keys(r).length>0){var i=function(e){var t=e?e.residencyServer:void 0;if(t)return"string"==typeof t&&Ki.includes(t.toUpperCase())?t.toUpperCase():void Pn.error("Invalid residencyServer input")}(n),o=r[i]||r.US;if(o){var s=function(e){if(Array.isArray(e)&&e.length>0){var t=e.find((function(e){return!0===e.default}));if(t&&to(t.url))return t.url}}(o);if(s)return s}}if(to(t))return t;throw Error("Unable to load the SDK due to invalid data plane url")}catch(e){throw Error(e)}};function ro(){var e;return(null===(e=document)||void 0===e?void 0:e.referrer)||"$direct"}function io(e){var t=e.split("/");return t.length>=3?t[2]:""}function oo(){for(var e=document.getElementsByTagName("link"),t=0;e[t];t+=1){var n=e[t];if("canonical"===n.getAttribute("rel"))return n.getAttribute("href")}}function so(){var e=oo(),t=window.location.pathname;if(e)try{t=new URL(e).pathname}catch(e){}var n=window.location,r=n.search,i=n.href,o=document.title,s=function(e){var t,n=oo(),r=(t=n?n.includes("?")?n:n+e:window.location.href).indexOf("#");return r>-1?t.slice(0,r):t}(r),a=i,u=ro();return{path:t,referrer:u,referring_domain:io(u),search:r,title:o,url:s,tab_url:a,initial_referrer:bi.getInitialReferrer()||"",initial_referring_domain:bi.getInitialReferringDomain()||""}}for(var ao,uo=n((function e(){t(this,e),this.name="RudderLabs JavaScript SDK",this.namespace="com.rudderlabs.javascript",this.version="2.48.13"})),co=n((function e(){t(this,e),this.name="RudderLabs JavaScript SDK",this.version="2.48.13"})),lo=n((function e(){t(this,e),this.name="",this.version=""})),fo=n((function e(){t(this,e),this.density=0,this.width=0,this.height=0,this.innerWidth=0,this.innerHeight=0})),ho=n((function e(){var n,r;t(this,e),this.app=new uo,this.traits=null,this.library=new co,this.userAgent=function(){if("undefined"==typeof navigator)return null;var e=navigator.userAgent,t=navigator.brave;if(t&&Object.getPrototypeOf(t).isBrave){var n=e.match(/(chrome)\/([\w.]+)/i);n&&(e="".concat(e," Brave/").concat(n[2]))}return e}(),this.device=null,this.network=null,this.os=new lo,this.locale="undefined"==typeof navigator?null:navigator.language||navigator.browserLanguage,this.screen=(n=new fo,"undefined"==typeof window||(n.width=window.screen.width,n.height=window.screen.height,n.density=window.devicePixelRatio,n.innerWidth=window.innerWidth,n.innerHeight=window.innerHeight),n),this.timezone=(r=(new Date).toString().match(/([A-Z]+[+-]\d+)/))&&r[1]?r[1]:"NA"})),po=function(){return n((function e(){t(this,e),this.channel="web",this.context=new ho,this.type=null,this.messageId=Wi(),this.originalTimestamp=(new Date).toISOString(),this.anonymousId=null,this.userId=null,this.event=null,this.properties={}}),[{key:"getProperty",value:function(e){return this.properties[e]}},{key:"addProperty",value:function(e,t){this.properties[e]=t}}])}(),go=function(){return n((function e(){t(this,e),this.message=new po}),[{key:"setType",value:function(e){this.message.type=e}},{key:"setProperty",value:function(e){this.message.properties=e}},{key:"setUserProperty",value:function(e){this.message.user_properties=e}},{key:"setUserId",value:function(e){this.message.userId=e}},{key:"setEventName",value:function(e){this.message.event=e}},{key:"getElementContent",value:function(){return this.message}}])}(),yo=function(){return n((function e(){t(this,e),this.rudderProperty=null,this.rudderUserProperty=null,this.event=null,this.userId=null,this.type=null}),[{key:"setType",value:function(e){return this.type=e,this}},{key:"build",value:function(){var e=new go;return e.setUserId(this.userId),e.setType(this.type),e.setEventName(this.event),e.setProperty(this.rudderProperty),e.setUserProperty(this.rudderUserProperty),e}}])}(),vo={},mo=256,Io=[];mo--;)Io[mo]=(mo+256).toString(16).substring(1);vo.v4=function(){var e,t=0,n="";if(!ao||mo+16>256){for(ao=Array(t=256);t--;)ao[t]=256*Math.random()|0;t=mo=0}for(;t<16;t++)e=ao[mo+t],n+=6==t?Io[15&e|64]:8==t?Io[63&e|128]:Io[e],1&t&&t>1&&t<11&&(n+="-");return mo++,n};var Ao={},bo=Object.prototype.hasOwnProperty,ko=String.prototype.charAt,Eo=Object.prototype.toString,Co=function(e,t){return ko.call(e,t)},So=function(e,t){return bo.call(e,t)},Oo=function(e,t){t=t||So;for(var n=[],r=0,i=e.length;r<i;r+=1)t(e,r)&&n.push(String(r));return n},wo=function(e){return null==e?[]:(t=e,"[object String]"===Eo.call(t)?Oo(e,Co):function(e){return null!=e&&"function"!=typeof e&&"number"==typeof e.length}(e)?Oo(e,So):function(e,t){t=t||So;var n=[];for(var r in e)t(e,r)&&n.push(String(r));return n}(e));var t},To=wo,_o=vo.v4,Ro={_data:{},length:0,setItem:function(e,t){return this._data[e]=t,this.length=To(this._data).length,t},getItem:function(e){return e in this._data?this._data[e]:null},removeItem:function(e){return e in this._data&&delete this._data[e],this.length=To(this._data).length,null},clear:function(){this._data={},this.length=0},key:function(e){return To(this._data)[e]}};Ao.defaultEngine=function(){try{if(!window.localStorage)return!1;var e=_o();window.localStorage.setItem(e,"test_value");var t=window.localStorage.getItem(e);return window.localStorage.removeItem(e),"test_value"===t}catch(e){return!1}}()?window.localStorage:Ro,Ao.inMemoryEngine=Ro;var Po=wo,xo=Object.prototype.toString,Do="function"==typeof Array.isArray?Array.isArray:function(e){return"[object Array]"===xo.call(e)},Lo=function(e){return null!=e&&(Do(e)||"function"!==e&&function(e){var t=f(e);return"number"===t||"object"===t&&"[object Number]"===xo.call(e)}(e.length))},Mo=function(e,t){for(var n=0;n<t.length&&!1!==e(t[n],n,t);n+=1);},Bo=function(e,t){for(var n=Po(t),r=0;r<n.length&&!1!==e(t[n[r]],n[r],t);r+=1);},No=function(e,t){return(Lo(t)?Mo:Bo).call(this,e,t)},Go=Ao.defaultEngine,Fo=Ao.inMemoryEngine,Uo=No,jo=wo,Ko=JSON;function Qo(e){try{return JSON.stringify(e,(t=[],function(e,n){if("object"!==f(n)||null===n)return n;for(;t.length>0&&t[t.length-1]!==this;)t.pop();return t.includes(n)?"[Circular Reference]":(t.push(n),n)}))}catch(e){return null}var t}function zo(e,t,n,r){this.id=t,this.name=e,this.keys=n||{},this.engine=r||Go,this.originalEngine=this.engine}zo.prototype.set=function(e,t){var n=this._createValidKey(e);if(n)try{this.engine.setItem(n,Qo(t))}catch(n){(function(e){var t=!1;if(e.code)switch(e.code){case 22:t=!0;break;case 1014:"NS_ERROR_DOM_QUOTA_REACHED"===e.name&&(t=!0)}else-2147024882===e.number&&(t=!0);return t})(n)&&(this._swapEngine(),this.set(e,t))}},zo.prototype.get=function(e){try{var t=this.engine.getItem(this._createValidKey(e));return null===t?null:Ko.parse(t)}catch(e){return null}},zo.prototype.getOriginalEngine=function(){return this.originalEngine},zo.prototype.remove=function(e){this.engine.removeItem(this._createValidKey(e))},zo.prototype._createValidKey=function(e){var t,n=this.name,r=this.id;return jo(this.keys).length?(Uo((function(i){i===e&&(t=[n,r,e].join("."))}),this.keys),t):[n,r,e].join(".")},zo.prototype._swapEngine=function(){var e=this;Uo((function(t){var n=e.get(t);Fo.setItem([e.name,e.id,t].join("."),n),e.remove(t)}),this.keys),this.engine=Fo};var Ho=zo;var qo=No,Vo={setTimeout:function(e,t){return window.setTimeout(e,t)},clearTimeout:function(e){return window.clearTimeout(e)},Date:window.Date},Wo=Vo,Yo={ASAP:1,RESCHEDULE:2,ABANDON:3};function Xo(){this.tasks={},this.nextId=1}Xo.prototype.now=function(){return+new Wo.Date},Xo.prototype.run=function(e,t,n){var r=this.nextId++;return this.tasks[r]=Wo.setTimeout(this._handle(r,e,t,n||Yo.ASAP),t),r},Xo.prototype.cancel=function(e){this.tasks[e]&&(Wo.clearTimeout(this.tasks[e]),delete this.tasks[e])},Xo.prototype.cancelAll=function(){qo(Wo.clearTimeout,this.tasks),this.tasks={}},Xo.prototype._handle=function(e,t,n,r){var i=this,o=i.now();return function(){if(delete i.tasks[e],!(r>=Yo.RESCHEDULE&&o+2*n<i.now()))return t();r===Yo.RESCHEDULE&&i.run(t,n,r)}},Xo.setClock=function(e){Wo=e},Xo.resetClock=function(){Wo=Vo},Xo.Modes=Yo;var Jo=Xo,$o={exports:{}};!function(e){function t(e){if(e)return function(e){for(var n in t.prototype)e[n]=t.prototype[n];return e}(e)}$o.exports=t,t.prototype.on=t.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},t.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},t.prototype.off=t.prototype.removeListener=t.prototype.removeAllListeners=t.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,r=this._callbacks["$"+e];if(!r)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var i=0;i<r.length;i++)if((n=r[i])===t||n.fn===t){r.splice(i,1);break}return 0===r.length&&delete this._callbacks["$"+e],this},t.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){r=0;for(var i=(n=n.slice(0)).length;r<i;++r)n[r].apply(this,t)}return this},t.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},t.prototype.hasListeners=function(e){return!!this.listeners(e).length}}();var Zo=$o.exports,es=vo.v4,ts=Ho,ns=No,rs=Jo,is=Cr("localstorage-retry");function os(e,t){return function(){return e.apply(t,arguments)}}function ss(e,t,n){"function"==typeof t&&(n=t),this.name=e,this.id=es(),this.fn=n,this.maxItems=t.maxItems||1/0,this.maxAttempts=t.maxAttempts||1/0,this.backoff={MIN_RETRY_DELAY:t.minRetryDelay||1e3,MAX_RETRY_DELAY:t.maxRetryDelay||3e4,FACTOR:t.backoffFactor||2,JITTER:t.backoffJitter||0},this.timeouts={ACK_TIMER:1e3,RECLAIM_TIMER:3e3,RECLAIM_TIMEOUT:1e4,RECLAIM_WAIT:500},this.keys={IN_PROGRESS:"inProgress",QUEUE:"queue",RECLAIM_START:"reclaimStart",RECLAIM_END:"reclaimEnd",ACK:"ack"},this._schedule=new rs,this._processId=0,this._store=new ts(this.name,this.id,this.keys),this._store.set(this.keys.IN_PROGRESS,{}),this._store.set(this.keys.QUEUE,[]),this._ack=os(this._ack,this),this._checkReclaim=os(this._checkReclaim,this),this._processHead=os(this._processHead,this),this._running=!1}Zo(ss.prototype),ss.prototype.start=function(){this._running&&this.stop(),this._running=!0,this._ack(),this._checkReclaim(),this._processHead()},ss.prototype.stop=function(){this._schedule.cancelAll(),this._running=!1},ss.prototype.shouldRetry=function(e,t){return!(t>this.maxAttempts)},ss.prototype.getDelay=function(e){var t=this.backoff.MIN_RETRY_DELAY*Math.pow(this.backoff.FACTOR,e);if(this.backoff.JITTER){var n=Math.random(),r=Math.floor(n*this.backoff.JITTER*t);Math.floor(10*n)<5?t-=r:t+=r}return Number(Math.min(t,this.backoff.MAX_RETRY_DELAY).toPrecision(1))},ss.prototype.addItem=function(e){this._enqueue({item:e,attemptNumber:0,time:this._schedule.now(),id:es()})},ss.prototype.requeue=function(e,t,n,r){this.shouldRetry(e,t,n)?this._enqueue({item:e,attemptNumber:t,time:this._schedule.now()+this.getDelay(t),id:r||es()}):this.emit("discard",e,t)},ss.prototype._enqueue=function(e){var t=this._store.get(this.keys.QUEUE)||[];(t=t.slice(-(this.maxItems-1))).push(e),t=t.sort((function(e,t){return e.time-t.time})),this._store.set(this.keys.QUEUE,t),this._running&&this._processHead()},ss.prototype._processHead=function(){var e=this,t=this._store;this._schedule.cancel(this._processId);var n=t.get(this.keys.QUEUE)||[],r=t.get(this.keys.IN_PROGRESS)||{},i=this._schedule.now(),o=[];function s(n,r){o.push({item:n.item,done:function(i,o){var s=t.get(e.keys.IN_PROGRESS)||{};delete s[r],t.set(e.keys.IN_PROGRESS,s),e.emit("processed",i,o,n.item),i&&e.requeue(n.item,n.attemptNumber+1,i,n.id)}})}for(var a=Object.keys(r).length;n.length&&n[0].time<=i&&a++<e.maxItems;){var u=n.shift(),c=es();r[c]={item:u.item,attemptNumber:u.attemptNumber,time:e._schedule.now()},s(u,c)}t.set(this.keys.QUEUE,n),t.set(this.keys.IN_PROGRESS,r),ns((function(t){try{e.fn(t.item,t.done)}catch(e){is("Process function threw error: "+e)}}),o),n=t.get(this.keys.QUEUE)||[],this._schedule.cancel(this._processId),n.length>0&&(this._processId=this._schedule.run(this._processHead,n[0].time-i,rs.Modes.ASAP))},ss.prototype._ack=function(){this._store.set(this.keys.ACK,this._schedule.now()),this._store.set(this.keys.RECLAIM_START,null),this._store.set(this.keys.RECLAIM_END,null),this._schedule.run(this._ack,this.timeouts.ACK_TIMER,rs.Modes.ASAP)},ss.prototype._checkReclaim=function(){var e=this;ns((function(t){t.id!==e.id&&(e._schedule.now()-t.get(e.keys.ACK)<e.timeouts.RECLAIM_TIMEOUT||function(t){t.set(e.keys.RECLAIM_START,e.id),t.set(e.keys.ACK,e._schedule.now()),e._schedule.run((function(){t.get(e.keys.RECLAIM_START)===e.id&&(t.set(e.keys.RECLAIM_END,e.id),e._schedule.run((function(){t.get(e.keys.RECLAIM_END)===e.id&&t.get(e.keys.RECLAIM_START)===e.id&&e._reclaim(t.id)}),e.timeouts.RECLAIM_WAIT,rs.Modes.ABANDON))}),e.timeouts.RECLAIM_WAIT,rs.Modes.ABANDON)}(t))}),function(t){for(var n=[],r=e._store.getOriginalEngine(),i=0;i<r.length;i++){var o=r.key(i);if(null!==o){var s=o.split(".");3===s.length&&s[0]===t&&"ack"===s[2]&&n.push(new ts(t,s[1],e.keys))}}return n}(this.name)),this._schedule.run(this._checkReclaim,this.timeouts.RECLAIM_TIMER,rs.Modes.RESCHEDULE)},ss.prototype._reclaim=function(e){var t=this,n=new ts(this.name,e,this.keys),r={queue:this._store.get(this.keys.QUEUE)||[]},i={inProgress:n.get(this.keys.IN_PROGRESS)||{},queue:n.get(this.keys.QUEUE)||[]},o=[],s=function(e,n){ns((function(e){var i=e.id||es();o.indexOf(i)>=0?t.emit("duplication",e.item,e.attemptNumber):(r.queue.push({item:e.item,attemptNumber:e.attemptNumber+n,time:t._schedule.now(),id:i}),o.push(i))}),e)};s(i.queue,0),s(i.inProgress,1),r.queue=r.queue.sort((function(e,t){return e.time-t.time})),this._store.set(this.keys.QUEUE,r.queue);try{this._clearOtherQueue(n,1)}catch(e){if("NS_ERROR_STORAGE_BUSY"===e.name||"NS_ERROR_STORAGE_BUSY"===e.code||2153971713===e.code)try{this._clearOtherQueue(n,40)}catch(e){console.error(e)}else console.error(e)}this._processHead()},ss.prototype._clearOtherQueue=function(e,t){var n=this;setTimeout((function(){e.remove(n.keys.IN_PROGRESS),setTimeout((function(){e.remove(n.keys.QUEUE),setTimeout((function(){e.remove(n.keys.RECLAIM_START),setTimeout((function(){e.remove(n.keys.RECLAIM_END),setTimeout((function(){e.remove(n.keys.ACK)}),t)}),t)}),t)}),t)}),t)};var as=p(ss),us={maxRetryDelay:36e4,minRetryDelay:1e3,backoffFactor:2,maxAttempts:10,maxItems:100},cs=function(){return n((function e(){t(this,e),this.url="",this.writeKey=""}),[{key:"init",value:function(e,t,n){var r=this;this.url=t,this.writeKey=e,n&&o(us,n),this.payloadQueue=new as("rudder",us,(function(e,t){e.message.sentAt=Yi(),r.processQueueElement(e.url,e.headers,e.message,3e4,(function(e,n){if(e)return t(e);t(null,n)}))})),this.payloadQueue.start()}},{key:"processQueueElement",value:function(e,t,n,r,i){try{var o=new XMLHttpRequest;for(var s in o.open("POST",e,!0),t)o.setRequestHeader(s,t[s]);o.timeout=r,o.ontimeout=i,o.onerror=i,o.onreadystatechange=function(){if(4===o.readyState)if(429===o.status||o.status>=500&&o.status<600){var t="".concat(Mn,' "').concat(o.status,'" status text: "').concat(o.statusText,'" for URL: "').concat(e,'"'),n=new Error(t);jn(n),i(n)}else i(null,o.status)};var a=Fn(n,!0);a?o.send(a):Pn.error("Invalid payload: Event dropped")}catch(e){i(e)}}},{key:"enqueue",value:function(e,t){var n={"Content-Type":"application/json",Authorization:"Basic ".concat(btoa("".concat(this.writeKey,":"))),AnonymousId:btoa(e.anonymousId)};this.payloadQueue.addItem({url:"".concat(this.url,"/v1/").concat(t),headers:n,message:e})}}])}(),ls="queue",fs=64e3,hs=function(){return n((function e(){t(this,e),this.storage=ti,this.maxItems=10,this.flushQueueTimeOut=void 0,this.timeOutActive=!1,this.flushQueueTimeOutInterval=6e5,this.url="",this.writekey="",this.queueName="".concat(ls,".").concat(Date.now())}),[{key:"sendQueueDataForBeacon",value:function(){this.sendDataFromQueueAndDestroyQueue()}},{key:"init",value:function(e,t,n){this.url=t,this.writekey=e,n.maxItems&&(this.maxItems=n.maxItems),n.flushQueueInterval&&(this.flushQueueTimeOutInterval=n.flushQueueInterval),this.sendQueueDataForBeacon=this.sendQueueDataForBeacon.bind(this),this.attachListeners()}},{key:"attachListeners",value:function(){var e=this;window.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&e.sendQueueDataForBeacon()}))}},{key:"getQueue",value:function(){return this.storage.get(this.queueName)}},{key:"setQueue",value:function(e){this.storage.set(this.queueName,e)}},{key:"enqueue",value:function(e){var t=this.getQueue()||[];(t=t.slice(-(this.maxItems-1))).push(e);var n=t.slice(0),r={batch:n,sentAt:Yi()},i=Fn(r,!0);i&&i.length>fs&&(n=t.slice(0,t.length-1),this.flushQueue(n),(t=this.getQueue()).push(e)),this.setQueue(t),this.setTimer(),t.length===this.maxItems&&this.flushQueue(n)}},{key:"sendDataFromQueueAndDestroyQueue",value:function(){this.sendDataFromQueue(),this.storage.remove(this.queueName)}},{key:"sendDataFromQueue",value:function(){var e=this.getQueue();if(e&&e.length>0){var t=e.slice(0,e.length);this.flushQueue(t)}}},{key:"flushQueue",value:function(e){if(e&&e.length>0){var t=Yi();e.forEach((function(e){e.sentAt=t}));var n=Fn({batch:e,sentAt:t},!0);if(null!==n){var r=new Blob([n],{type:"text/plain"}),i="".concat(this.url,"?writeKey=").concat(this.writekey);try{"function"!=typeof navigator.sendBeacon&&jn(new Error("Beacon API is not supported by browser")),navigator.sendBeacon(i,r)||jn(new Error("Unable to queue data to browser's beacon queue"))}catch(e){e.message="".concat(e.message," - While sending Beacon data to: ").concat(i),jn(e)}}else Pn.error("Invalid payload: Event dropped")}this.setQueue([]),this.clearTimer()}},{key:"setTimer",value:function(){this.timeOutActive||(this.flushQueueTimeOut=setTimeout(this.sendDataFromQueue.bind(this),this.flushQueueTimeOutInterval),this.timeOutActive=!0)}},{key:"clearTimer",value:function(){this.timeOutActive&&(clearTimeout(this.flushQueueTimeOut),this.timeOutActive=!1)}}])}(),ds=function(){return n((function e(){t(this,e),this.queue=void 0}),[{key:"initialize",value:function(e,t,n){var r={},i=Vi(t);n&&n.useBeacon&&navigator.sendBeacon?(n.beaconQueueOptions&&null!=n.beaconQueueOptions&&"object"===f(n.beaconQueueOptions)&&(r=n.beaconQueueOptions),i="".concat(i,"/beacon/v1/batch"),this.queue=new hs):(n&&n.useBeacon&&Pn.info("[EventRepository] sendBeacon feature not available in this browser :: fallback to XHR"),n&&n.queueOptions&&null!=n.queueOptions&&"object"===f(n.queueOptions)&&(r=n.queueOptions),this.queue=new cs),this.queue.init(e,i,r)}},{key:"enqueue",value:function(e,t){var n=e.getElementContent();n.originalTimestamp=n.originalTimestamp||Yi(),n.sentAt=Yi();var r=Fn(n,!0);r&&r.length>32e3&&Pn.error("[EventRepository] enqueue:: message length greater 32 Kb ",n),this.queue.enqueue(n,t)}}])}(),ps=new ds,gs={maxRetryDelay:36e4,minRetryDelay:1e3,backoffFactor:2,maxAttempts:1/0},ys=function(){return n((function e(){t(this,e),this.callback=void 0,this.processQueueElements=!1}),[{key:"init",value:function(e,t){var n=this;e&&o(gs,e),t&&(this.callback=t),this.payloadQueue=new as("rs_events",gs,(function(e,t){n.processQueueElement(e.type,e.rudderElement,(function(e,n){if(e)return t(e);t(null,n)}))})),this.payloadQueue.start()}},{key:"activateProcessor",value:function(){this.processQueueElements=!0}},{key:"processQueueElement",value:function(e,t,n){try{this.processQueueElements?(Object.setPrototypeOf(t,go.prototype),this.callback(e,t),n(null)):n(new Error("The queue elements are not ready to be processed yet"))}catch(e){n(e)}}},{key:"enqueue",value:function(e,t){this.payloadQueue.addItem({type:e,rudderElement:t})}}])}(),vs=function(e){for(var t=function(){for(var e,t=[],n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}(),n=~0,r=0;r<e.length;r++)n=n>>>8^t[255&(n^e.charCodeAt(r))];return~n>>>0},ms={getUserLanguage:function(){return navigator&&navigator.language},getUserAgent:function(){return navigator&&navigator.userAgent}};function Is(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e=e.endsWith("..")?e.substr(0,e.length-2):e,decodeURIComponent(atob(e).split("").map((function(e){return"%".concat("00".concat(e.charCodeAt(0).toString(16)).slice(-2))})).join(""))}var As=/^[a-zA-Z0-9\-_.]+$/,bs=1,ks=1,Es="*";function Cs(e,t,n,r){var i=function(e,t){return[e,(new Date).getTimezoneOffset(),t].join(Es)}(n,r),o=t||0,s=Math.floor(Date.now()/6e4)-o;return vs([i,s,e].join(Es)).toString(36)}function Ss(e){var t=function(e){var t=e.split(Es),n=t.length%2==0;return t.length<4||!n||Number(t.shift())!==ks?null:{checksum:t.shift(),serializedIds:t.join(Es)}}(e);if(!t)return null;var n=t.checksum,r=t.serializedIds;return function(e,t){for(var n=ms.getUserAgent(),r=ms.getUserLanguage(),i=0;i<=bs;i+=1)if(Cs(e,i,n,r)===t)return!0;return!1}(r,n)?function(e){for(var t={},n=e.split(Es),r=0;r<n.length;r+=2){var i=n[r];if(As.test(i)){var o=Is(n[r+1]);t[i]=o}}return t}(r):null}var Os=function(){return n((function e(){var n=this;if(t(this,e),i(this,"isInitialized",!1),window.OneTrust&&window.OnetrustActiveGroups){this.userSetConsentGroupIds=window.OnetrustActiveGroups.split(",").filter((function(e){return e}));var r=window.OneTrust.GetDomainData().Groups;this.userSetConsentGroupNames=[],this.userDeniedConsentGroupIds=[],r.forEach((function(e){var t=e.CustomGroupId,r=e.GroupName;n.userSetConsentGroupIds.includes(t)?n.userSetConsentGroupNames.push(r.toUpperCase().trim()):n.userDeniedConsentGroupIds.push(t)})),this.userSetConsentGroupIds=this.userSetConsentGroupIds.map((function(e){return e.toUpperCase()})),this.isInitialized=!0}else Pn.error("OneTrust resources are not accessible.")}),[{key:"isEnabled",value:function(e){var t=this;try{if(!this.isInitialized)return!0;var n=e.oneTrustCookieCategories;if(!n)return!0;var r=n.map((function(e){return e.oneTrustCookieCategory})).filter((function(e){return e}));return r.every((function(e){return t.userSetConsentGroupIds.includes(e.toUpperCase().trim())||t.userSetConsentGroupNames.includes(e.toUpperCase().trim())}))}catch(e){return Pn.error("Error during onetrust cookie consent management ".concat(e)),!0}}},{key:"getDeniedList",value:function(){return this.isInitialized?this.userDeniedConsentGroupIds:[]}}])}(),ws=function(){return n((function e(){var n=this;if(t(this,e),i(this,"updatePurposes",(function(e){e&&Object.entries(e).forEach((function(e){var t=e[0];e[1]?n.userConsentedPurposes.push(t):n.userDeniedPurposes.push(t)}))})),this.userConsentedPurposes=[],this.userDeniedPurposes=[],window.updateKetchConsent=function(e){e&&(n.userConsentedPurposes=[],n.userDeniedPurposes=[],n.updatePurposes(e))},window.getKetchUserConsentedPurposes=function(){return n.userConsentedPurposes.slice()},window.getKetchUserDeniedPurposes=function(){return n.userDeniedPurposes.slice()},window.ketchConsent)this.updatePurposes(window.ketchConsent);else{var r=this.getConsent();this.updatePurposes(r)}}),[{key:"isEnabled",value:function(e){var t=this;try{var n=e.ketchConsentPurposes;if(!n||0===n.length)return!0;var r=n.map((function(e){return e.purpose})).filter((function(e){return e}));return r.some((function(e){return t.userConsentedPurposes.includes(e.trim())}))}catch(e){return Pn.error("Error occured checking ketch consent state ".concat(e)),!0}}},{key:"getDeniedList",value:function(){return this.userDeniedPurposes}},{key:"getConsent",value:function(){var e=$r.get("_ketch_consent_v1_");if(e){var t;try{t=JSON.parse(atob(e))}catch(e){return void Pn.error("Error occurred while parsing consent cookie ".concat(e))}if(t){var n={};return Object.entries(t).forEach((function(e){var t=e[0],r=e[1];r&&r.status&&(n[t]="granted"===r.status)})),n}}}}])}(),Ts=function(e){var t,n;return null!=e&&null!==(t=e.oneTrust)&&void 0!==t&&t.enabled?new Os:null!=e&&null!==(n=e.ketch)&&void 0!==n&&n.enabled?new ws:null},_s=function(){return n((function e(){t(this,e),this.storage=bi,this.timeout=18e5,this.sessionInfo=this.storage.getSessionInfo()||{autoTrack:!0}}),[{key:"initialize",value:function(e){try{var t;if(this.sessionInfo.autoTrack=!(!1===(null==e||null===(t=e.sessions)||void 0===t?void 0:t.autoTrack)||this.sessionInfo.manualTrack),null!=e&&e.sessions&&!isNaN(e.sessions.timeout)){var n=e.sessions.timeout;0===n&&(Pn.warn("[Session]:: Provided timeout value 0 will disable the auto session tracking feature."),this.sessionInfo.autoTrack=!1),n>0&&n<1e4&&Pn.warn('[Session]:: It is not advised to set "timeout" less than 10 seconds'),this.timeout=n}this.sessionInfo.autoTrack?this.startAutoTracking():!1!==this.sessionInfo.autoTrack||this.sessionInfo.manualTrack||this.end()}catch(e){jn(e)}}},{key:"isValidSession",value:function(e){return e<=this.sessionInfo.expiresAt}},{key:"generateSessionId",value:function(){return Date.now()}},{key:"startAutoTracking",value:function(){var e=Date.now();this.isValidSession(e)||(this.sessionInfo={},this.sessionInfo.id=e,this.sessionInfo.expiresAt=e+this.timeout,this.sessionInfo.sessionStart=!0,this.sessionInfo.autoTrack=!0),this.storage.setSessionInfo(this.sessionInfo)}},{key:"validateSessionId",value:function(e){if("number"==typeof e&&e%1==0){var t;if(!(((t=e)?t.toString().length:0)<10))return e;Pn.error('[Session]:: "sessionId" should at least be "'.concat(10,'" digits long'))}else Pn.error('[Session]:: "sessionId" should only be a positive integer')}},{key:"start",value:function(e){var t=e?this.validateSessionId(e):this.generateSessionId();this.sessionInfo={id:t||this.generateSessionId(),sessionStart:!0,manualTrack:!0},this.storage.setSessionInfo(this.sessionInfo)}},{key:"getSessionId",value:function(){return this.sessionInfo.autoTrack&&this.isValidSession(Date.now())||this.sessionInfo.manualTrack?this.sessionInfo.id:null}},{key:"end",value:function(){this.sessionInfo={},this.storage.removeSessionInfo()}},{key:"getSessionInfo",value:function(){var e={};if(this.sessionInfo.autoTrack||this.sessionInfo.manualTrack){if(this.sessionInfo.autoTrack){var t=Date.now();this.isValidSession(t)?this.sessionInfo.expiresAt=t+this.timeout:this.startAutoTracking()}this.sessionInfo.sessionStart&&(e.sessionStart=!0,this.sessionInfo.sessionStart=!1),e.sessionId=this.sessionInfo.id,this.storage.setSessionInfo(this.sessionInfo)}return e}},{key:"reset",value:function(){var e=this.sessionInfo,t=e.manualTrack;e.autoTrack?(this.sessionInfo={},this.startAutoTracking()):t&&this.start()}}])}(),Rs=new _s,Ps=["integrations","anonymousId","originalTimestamp"],xs=function(e,t,n){var r="";if(n){if(!(r=Vi(n))){var i="CDN base URL for integrations is not valid";throw jn({message:"[Analytics] load:: ".concat(i)}),Error("Failed to load Rudder SDK: ".concat(i))}return r}var o=function(){for(var e,t=document.getElementsByTagName("script"),n=0;n<t.length;n+=1){var r=Vi(t[n].getAttribute("src"));if(r&&r.match(/^.*rudder-analytics?(\.min)?\.js$/)){e=r;break}}return{sdkURL:e}}(),s=o.sdkURL;return r=s?s.split("/").slice(0,-1).concat(Gi).join("/"):Fi,t&&(r=r.replace(Ni,e)),r},Ds="rs-bugsnag",Ls="bugsnag",Ms=["Bugsnag",Ls],Bs="0d96a60df267f4a13f808bbaa54e535c",Ns=["rudder-analytics.min.js","rudder-analytics.js"].concat(c(Object.keys(P).map((function(e){return"".concat(P[e],".min.js")}))),c(Object.keys(P).map((function(e){return"".concat(P[e],".js")})))),Gs=function(e){var t=e&&e._client&&e._client._notifier&&e._client._notifier.version;if(!t){var n=e({apiKey:Bs,releaseStage:"version-test",beforeSend:function(){return!1}});t=n.notifier&&n.notifier.version,n=void 0}return t&&"6"===t.charAt(0)},Fs=function(e){Ms.every((function(e){return!function(e,t){if(null==e)throw new TypeError("Cannot convert undefined or null to object");return Object.prototype.hasOwnProperty.call(Object(e),t)}(window,e)}))&&ki(e,"https://d2wy8f7a9ursnm.cloudfront.net/v6/bugsnag.min.js",{isNonNativeSDK:"true",skipDatasetAttributes:!0})},Us=function(){return n((function e(n,r,i){t(this,e),this.pluginName=Ds,this.sourceId=n,this.writeKey=r,this.onClientReady=i,this.initClientOnLibReadyInterval=void 0,this.init()}),[{key:"init",value:function(){var e=this;if(!window.RudderStackGlobals||!window.RudderStackGlobals[Nn]){if(!Bs.match(/{{.+}}/)){Fs(this.pluginName);var t=window[Ls];"function"!=typeof t?(this.initClientOnLibReadyInterval=setInterval((function(){var t=window[Ls];"function"==typeof t&&(Gs(t)&&e.initClient(),clearInterval(e.initClientOnLibReadyInterval))}),100),setTimeout((function(){clearInterval(e.initClientOnLibReadyInterval)}),xn)):Gs(t)&&this.initClient()}}}},{key:"initClient",value:function(){var e,t=window[Ls];this.client=t({apiKey:Bs,appVersion:"2.48.13",metaData:{SDK:{name:"JS",installType:"npm"}},beforeSend:this.onError(),autoTrackSessions:!1,collectUserIp:!1,enabledBreadcrumbTypes:["error","log","user"],maxEvents:100,releaseStage:(e=window.location.hostname,e&&["www.test-host.com","localhost","127.0.0.1","[::1]"].includes(e)?"development":"production"),networkBreadcrumbsEnabled:!1,user:{id:this.writeKey}}),this.onClientReady()}},{key:"onError",value:function(){var e=this.sourceId;return function(t){try{return!!function(e){var t=Ar(e,"stacktrace.0.file");if(!t||"string"!=typeof t)return!1;var n=t.substring(t.lastIndexOf("/")+1);return Ns.includes(n)}(t)&&(function(e,t){e.updateMetaData("source",{metadataSource:t});var n=e.errorMessage;e.context=n,n.includes("error in script loading")&&(e.context="Script load failures"),e.severity="error"}(t,e),!0)}catch(e){return!1}}}},{key:"notify",value:function(e){this.client&&this.client.notify(e)}},{key:"leaveBreadcrumb",value:function(e){this.client&&this.client.leaveBreadcrumb(e)}}])}(),js=Ds,Ks=[Ds],Qs=function(){return n((function e(n){t(this,e),this.isEnabled=!1,this.providerName=js,this.provider=void 0,this.logger=n,this.onClientReady=this.onClientReady.bind(this),this.exposeToGlobal=this.exposeToGlobal.bind(this)}),[{key:"init",value:function(e,t,n){e&&t?!0===function(e){return Ar(e,"statsCollection.errors.enabled")||!1}(e)?(this.enable(),this.setProviderName(function(e){return Ar(e,"statsCollection.errors.provider")}(e)),this.initProvider(e,t,n)):this.disable():this.logger.error("[Analytics] ErrorReporting :: Invalid configuration or missing source id provided.")}},{key:"enable",value:function(){this.isEnabled=!0}},{key:"disable",value:function(){this.isEnabled=!1}},{key:"setProviderName",value:function(e){e?!e||Ks.includes(e)?this.providerName=e:this.logger.error("[Analytics] ErrorReporting :: Invalid error reporting provider value. Value should be one of: ".concat(Ks.join(","))):this.providerName=js}},{key:"initProvider",value:function(e,t,n){if(this.providerName===Ds)this.provider=new Us(t,n,this.onClientReady)}},{key:"onClientReady",value:function(){this.exposeToGlobal()}},{key:"exposeToGlobal",value:function(){window.RudderStackGlobals||(window.RudderStackGlobals={}),window.RudderStackGlobals[Nn]=this}},{key:"leaveBreadcrumb",value:function(e){if(this.provider)try{this.provider.leaveBreadcrumb(e)}catch(e){this.logger.error("[Analytics] ErrorReporting :: leaveBreadcrumb method ".concat(e.toString()))}}},{key:"notify",value:function(e){if(this.provider)try{this.provider.notify(e)}catch(e){this.logger.error("[Analytics] ErrorReporting :: notify method ".concat(e.toString()))}}}])}(),zs=new(function(){return n((function e(){t(this,e),this.retryAttempt=3,this.queue=[],this.isTransformationProcessing=!1,this.authToken=null}),[{key:"init",value:function(e,t,n){this.dataPlaneUrl=Vi(t),this.writeKey=e,this.authToken=n||this.authToken,this.start()}},{key:"enqueue",value:function(e,t,n){this.queue.push({event:e,destinationIds:t,cb:n})}},{key:"sendEventForTransformation",value:function(e,t){var n=this;return new Promise((function(r,i){var o="".concat(n.dataPlaneUrl,"/transform"),s={"Content-Type":"application/json",Authorization:"Basic ".concat(btoa("".concat(n.writeKey,":")))};try{var a=new XMLHttpRequest;a.open("POST",o,!0),Object.keys(s).forEach((function(e){return a.setRequestHeader(e,s[e])})),a.timeout=1e4,a.onreadystatechange=function(){if(4===a.readyState)try{var o=a.status,s=a.response;switch(o){case 200:return s=JSON.parse(s),void r({status:o,transformedPayload:s.transformedBatch});case 400:var u=s?"".concat(s):"Invalid request payload";return void r({status:o,errorMessage:u});case 404:return void r({status:o});default:if(t>0){var c=t-1;setTimeout((function(){return n.sendEventForTransformation(e,c).then(r).catch(i)}),500*Math.pow(2,n.retryAttempt-c))}else r({status:o,errorMessage:"Retries exhausted"})}}catch(e){i(e)}};var u=Fn(e,!0);u?a.send(u):Pn.error("Invalid payload: Event dropped")}catch(e){i(e)}}))}},{key:"checkQueueLengthAndProcess",value:function(){this.queue.length>0&&this.process()}},{key:"process",value:function(){var e=this;this.isTransformationProcessing=!0;var t,n,r=this.queue.shift(),i=(t=r.event,n=r.destinationIds,{metadata:{"Custom-Authorization":this.authToken},batch:[{orderNo:Date.now(),destinationIds:n,event:t.message}]});this.sendEventForTransformation(i,this.retryAttempt).then((function(t){e.isTransformationProcessing=!1,r.cb(t),e.checkQueueLengthAndProcess()})).catch((function(t){jn("string"==typeof t?t:t.message),e.isTransformationProcessing=!1,r.cb({status:0}),e.checkQueueLengthAndProcess()}))}},{key:"start",value:function(){var e=this;setInterval((function(){e.isTransformationProcessing||e.checkQueueLengthAndProcess()}),100)}},{key:"setAuthToken",value:function(e){this.authToken=e}}])}()),Hs=function(){return n((function e(){t(this,e),this.initialized=!1,this.clientIntegrations=[],this.loadOnlyIntegrations={},this.clientIntegrationObjects=void 0,this.successfullyLoadedIntegration=[],this.failedToBeLoadedIntegration=[],this.toBeProcessedArray=[],this.toBeProcessedByIntegrationArray=[],this.storage=bi,this.eventRepository=ps,this.preProcessQueue=new ys,this.sendAdblockPage=!1,this.sendAdblockPageOptions={},this.clientSuppliedCallbacks={},this.readyCallbacks=[],this.methodToCallbackMapping={syncPixel:"syncPixelCallback"},this.loaded=!1,this.loadIntegration=!0,this.bufferDataPlaneEventsUntilReady=!1,this.dataPlaneEventsBufferTimeout=1e4,this.integrationsData={},this.dynamicallyLoadedIntegrations={},this.destSDKBaseURL=Fi,this.cookieConsentOptions={},this.logLevel=void 0,this.clientIntegrationsReady=!1,this.uSession=Rs,this.version="2.48.13",this.lockIntegrationsVersion=!1,this.errorReporting=new Qs(Pn),this.deniedConsentIds=[],this.transformationHandler=zs}),[{key:"initializeUser",value:function(e){this.userId=this.storage.getUserId()||"",this.storage.setUserId(this.userId),this.userTraits=this.storage.getUserTraits()||{},this.storage.setUserTraits(this.userTraits),this.groupId=this.storage.getGroupId()||"",this.storage.setGroupId(this.groupId),this.groupTraits=this.storage.getGroupTraits()||{},this.storage.setGroupTraits(this.groupTraits),this.anonymousId=this.getAnonymousId(e),this.storage.setAnonymousId(this.anonymousId)}},{key:"setInitialPageProperties",value:function(){if(null==this.storage.getInitialReferrer()&&null==this.storage.getInitialReferringDomain()){var e=ro();this.storage.setInitialReferrer(e),this.storage.setInitialReferringDomain(io(e))}}},{key:"allModulesInitialized",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return new Promise((function(n){e.clientIntegrations.every((function(t){return null!=e.dynamicallyLoadedIntegrations["".concat(P[t.name]).concat("_RS")]}))||t>=2e4?n(e):e.pause(Dn).then((function(){return e.allModulesInitialized(t+Dn).then(n)}))}))}},{key:"executeReadyCallback",value:function(){this.readyCallbacks.forEach((function(e){return e()}))}},{key:"integrationSDKLoaded",value:function(e,t){return window[e]&&window[e][t]&&window[e][t].prototype&&void 0!==window[e][t].prototype.constructor}},{key:"processResponse",value:function(e,t){var n=this;try{var r=t;try{if("string"==typeof t&&(r=JSON.parse(t)),!r||"object"!==f(r)||Array.isArray(r))return void Pn.error("Invalid source configuration")}catch(e){return void jn(e)}try{window.chrome&&window.chrome.runtime&&window.chrome.runtime.id||this.errorReporting.init(r.source.config,r.source.id,this.writeKey)}catch(e){jn(e)}if(this.serverUrl=no(r,this.serverUrl,this.options),this.eventRepository.initialize(this.writeKey,this.serverUrl,this.options),this.transformationHandler.init(this.writeKey,this.serverUrl,this.storage.getAuthToken()),r.source.destinations.forEach((function(e){e.enabled&&this.clientIntegrations.push({name:e.destinationDefinition.name,config:e.config,destinationInfo:{shouldApplyDeviceModeTransformation:e.shouldApplyDeviceModeTransformation||!1,propagateEventsUntransformedOnError:e.propagateEventsUntransformedOnError||!1,destinationId:e.id}})}),this),this.clientIntegrations=Zi(this.loadOnlyIntegrations,this.clientIntegrations),Object.keys(this.cookieConsentOptions).length>0)try{var i=Ts(this.cookieConsentOptions);this.deniedConsentIds=i&&i.getDeniedList(),this.clientIntegrations=this.clientIntegrations.filter((function(e){return!i||i&&i.isEnabled(e.config)}))}catch(e){jn(e)}this.loaded=!0,this.options&&"function"==typeof this.options.onLoaded&&this.options.onLoaded(this),function(e){if(e.toBeProcessedArray.length>0)for(;e.toBeProcessedArray.length>0;){var t=c(e.toBeProcessedArray[0]);e.toBeProcessedArray.shift();var n=t[0];t.shift(),e[n].apply(e,c(t))}}(this),this.clientIntegrations=this.clientIntegrations.filter((function(e){return!!P[e.name]||(Pn.error("[Analytics] Integration:: ".concat(e.name," not available for initialization")),!1)})),this.bufferDataPlaneEventsUntilReady&&setTimeout((function(){n.processBufferedCloudModeEvents()}),this.dataPlaneEventsBufferTimeout),this.errorReporting.leaveBreadcrumb("Starting device-mode initialization"),this.clientIntegrations.forEach((function(e){var t=P[e.name],r="".concat(t).concat("_RS"),i="".concat(n.destSDKBaseURL,"/").concat(t,".min.js");window.hasOwnProperty(r)||ki(r,i,{isNonNativeSDK:!0});var o=n,s=setInterval((function(){if(o.integrationSDKLoaded(r,t)){var i,a=window[r];clearInterval(s);try{var u="[Analytics] processResponse :: trying to initialize integration name:: ".concat(r);n.errorReporting.leaveBreadcrumb(u),(i=new a[t](e.config,o,e.destinationInfo)).init(),o.isInitialized(i).then((function(){o.dynamicallyLoadedIntegrations[r]=a[t]}))}catch(e){var c="[Analytics] 'integration.init()' failed :: ".concat(r," :: ").concat(e.message);jn(e,c),o.failedToBeLoadedIntegration.push(i)}}}),100);setTimeout((function(){clearInterval(s)}),xn)}));var o=this;this.allModulesInitialized().then((function(){if(!o.clientIntegrations||0===o.clientIntegrations.length)return n.clientIntegrationsReady=!0,n.executeReadyCallback(),void(n.toBeProcessedByIntegrationArray=[]);o.replayEvents(o)}))}catch(e){jn(e)}}},{key:"sendDataToDestination",value:function(e,t,n){try{if(e[n]){var r=w(t);e[n](r)}}catch(t){var i="[sendToNative]:: [Destination: ".concat(e.name,"]:: ");jn(t,i)}}},{key:"sendTransformedDataToDestination",value:function(e,t,n){var r=this;try{$i(t.message.integrations);var i=e.map((function(e){return e.destinationId}));this.transformationHandler.enqueue(t,i,(function(i){var o=i.status,s=i.transformedPayload,a=i.errorMessage;e.forEach((function(e){try{switch(o){case 200:var i=s.find((function(t){return t.id===e.destinationId})),u=[];null==i||i.payload.forEach((function(n){if("200"===n.status)u.push(n);else{var r='[DMT]:: Event transformation unsuccessful for destination "'.concat(e.name,'". Reason: '),i="Unknown";"410"===n.status&&(i="Transformation is not available");var o="Dropping the event",s=Pn.error;!0===e.propagateEventsUntransformedOnError&&(o="Sending untransformed event to the destination",s=Pn.warn,u.push({event:t.message})),s("".concat(r," ").concat(i,". ").concat(o,"."))}})),null==u||u.forEach((function(t){Oi(t.event)&&r.sendDataToDestination(e,{message:t.event},n)}));break;case 404:Pn.warn("[DMT]:: Transformation server access is denied. The configuration data seems to be out of sync. Sending untransformed event to the destination."),r.sendDataToDestination(e,t,n);break;default:!0===e.propagateEventsUntransformedOnError?(Pn.warn("[DMT]::[Destination: ".concat(e.name,"] :: Transformation request failed with status: ").concat(o," ").concat(a,". Sending untransformed event.")),r.sendDataToDestination(e,t,n)):Pn.error("[DMT]::[Destination: ".concat(e.name,"] :: Transformation request failed with status: ").concat(o," ").concat(a,". Dropping the event."))}}catch(t){t instanceof Error&&(t.message="[DMT]::[Destination:".concat(e.name,"]:: ").concat(t.message)),jn(t)}}))}))}catch(e){e instanceof Error&&(e.message="[DMT]:: ".concat(e.message)),jn(e)}}},{key:"processAndSendEventsToDeviceMode",value:function(e,t,n){var r=this,i=[],o=[];e.forEach((function(e){try{!r.IsEventBlackListed(t.message.event,e.name)&&(e.shouldApplyDeviceModeTransformation?o.push(e):i.push(e))}catch(e){jn(e)}})),i.forEach((function(e){r.sendDataToDestination(e,t,n)})),o.length>0&&this.sendTransformedDataToDestination(o,t,n)}},{key:"queueEventForDataPlane",value:function(e,t){var n=t.message.integrations||{All:!0};t.message.integrations=function(e,t){var n=w(e),r=Object.keys(t).filter((function(e){return!(!0===t[e]&&n[e])})).reduce((function(e,n){return e[n]=t[n],e}),{});return Si(n,r)}(this.integrationsData,n),this.eventRepository.enqueue(t,e)}},{key:"processBufferedCloudModeEvents",value:function(){this.bufferDataPlaneEventsUntilReady&&this.preProcessQueue.activateProcessor()}},{key:"replayEvents",value:function(e){var t,n,r,i=this;this.errorReporting.leaveBreadcrumb("Started replaying buffered events"),e.clientIntegrationObjects=[],e.clientIntegrationObjects=e.successfullyLoadedIntegration;try{e.clientIntegrationObjects.every((function(e){return!e.isReady||e.isReady()}))&&(this.integrationsData=(t=this.integrationsData,n=e.clientIntegrationObjects,r=w(t),n.forEach((function(e){if(e.getDataForIntegrationsObject)try{r=Si(r,e.getDataForIntegrationsObject())}catch(e){Pn.debug("[Analytics: prepareDataForIntegrationsObj]",e)}})),r),e.clientIntegrationsReady=!0,e.executeReadyCallback())}catch(e){jn(e,"Replay buffered cloud mode events")}this.processBufferedCloudModeEvents(),e.toBeProcessedByIntegrationArray.forEach((function(t){var n=t[0];t.shift(),Object.keys(t[0].message.integrations).length>0&&Ji(t[0].message.integrations);var r=Zi(t[0].message.integrations,e.clientIntegrationObjects);i.processAndSendEventsToDeviceMode(r,t[0],n)})),e.toBeProcessedByIntegrationArray=[]}},{key:"pause",value:function(e){return new Promise((function(t){setTimeout(t,e)}))}},{key:"isInitialized",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return new Promise((function(r){e.isLoaded()?(t.successfullyLoadedIntegration.push(e),r(t)):n>=xn?(t.failedToBeLoadedIntegration.push(e),r(t)):t.pause(Dn).then((function(){return t.isInitialized(e,n+Dn).then(r)}))}))}},{key:"page",value:function(e,t,n,r,i){if(this.errorReporting.leaveBreadcrumb("Page event"),this.loaded){"function"==typeof r&&(i=r,r=null),"function"==typeof n&&(i=n,r=n=null),"function"==typeof t&&(i=t,r=n=t=null),"function"==typeof e&&(i=e,r=n=t=e=null),"object"===f(e)&&null!=e&&null!=e&&(r=t,n=e,t=e=null),"object"===f(t)&&null!=t&&null!=t&&(r=n,n=t,t=null),"string"==typeof e&&"string"!=typeof t&&(t=e,e=null),this.sendAdblockPage&&"RudderJS-Initiated"!==e&&this.sendSampleRequest();var o=w(n),s=w(r),a=(new yo).setType("page").build();o||(o={}),t&&(a.message.name=o.name=t),e&&(a.message.category=o.category=e),a.message.properties=this.getPageProperties(o),this.processAndSendDataToDestinations("page",a,s,i)}else this.toBeProcessedArray.push(["page"].concat(Array.prototype.slice.call(arguments)))}},{key:"track",value:function(e,t,n,r){if(this.errorReporting.leaveBreadcrumb("Track event"),this.loaded){"function"==typeof n&&(r=n,n=null),"function"==typeof t&&(r=t,n=null,t=null);var i=w(t),o=w(n),s=(new yo).setType("track").build();e&&s.setEventName(e),s.setProperty(i||{}),this.processAndSendDataToDestinations("track",s,o,r)}else this.toBeProcessedArray.push(["track"].concat(Array.prototype.slice.call(arguments)))}},{key:"identify",value:function(e,t,n,r){if(this.errorReporting.leaveBreadcrumb("Identify event"),this.loaded){"function"==typeof n&&(r=n,n=null),"function"==typeof t&&(r=t,n=null,t=null),"object"===f(e)&&(n=t,t=e,e=this.userId);var i=eo(e);i&&this.userId&&i!==this.userId&&this.reset(),this.userId=i,this.storage.setUserId(this.userId);var o=w(t),s=w(n);if(o){for(var a in o)this.userTraits[a]=o[a];this.storage.setUserTraits(this.userTraits)}var u=(new yo).setType("identify").build();this.processAndSendDataToDestinations("identify",u,s,r)}else this.toBeProcessedArray.push(["identify"].concat(Array.prototype.slice.call(arguments)))}},{key:"alias",value:function(e,t,n,r){if(this.errorReporting.leaveBreadcrumb("Alias event"),this.loaded){"function"==typeof n&&(r=n,n=null),"function"==typeof t&&(r=t,n=null,t=null),"function"==typeof e&&(r=e,n=null,t=null,e=null),"object"===f(t)&&(n=t,t=null),"object"===f(e)&&(n=e,t=null,e=null);var i=(new yo).setType("alias").build();i.message.previousId=eo(t)||(this.userId?this.userId:this.getAnonymousId()),i.message.userId=eo(e);var o=w(n);this.processAndSendDataToDestinations("alias",i,o,r)}else this.toBeProcessedArray.push(["alias"].concat(Array.prototype.slice.call(arguments)))}},{key:"group",value:function(e,t,n,r){if(this.errorReporting.leaveBreadcrumb("Group event"),this.loaded){if(0!==arguments.length){"function"==typeof n&&(r=n,n=null),"function"==typeof t&&(r=t,n=null,t=null),"object"===f(e)&&(n=t,t=e,e=this.groupId),"function"==typeof e&&(r=e,n=null,t=null,e=this.groupId),this.groupId=eo(e),this.storage.setGroupId(this.groupId);var i=w(t),o=w(n),s=(new yo).setType("group").build();if(i)for(var a in i)this.groupTraits[a]=i[a];else this.groupTraits={};this.storage.setGroupTraits(this.groupTraits),this.processAndSendDataToDestinations("group",s,o,r)}}else this.toBeProcessedArray.push(["group"].concat(Array.prototype.slice.call(arguments)))}},{key:"IsEventBlackListed",value:function(e,t){if(!e||"string"!=typeof e)return!1;var n=_n[t],r=this.clientIntegrations.find((function(e){return e.name===n})).config,i=r.blacklistedEvents,o=r.whitelistedEvents,s=r.eventFilteringOption;if(!s)return!1;var a=e.trim().toUpperCase();switch(s){case"disable":default:return!1;case"blacklistedEvents":return!!Array.isArray(i)&&i.some((function(e){return e.eventName.trim().toUpperCase()===a}));case"whitelistedEvents":return!Array.isArray(o)||!o.some((function(e){return e.eventName.trim().toUpperCase()===a}))}}},{key:"shouldUseGlobalIntegrationsConfigInEvents",value:function(){return this.useGlobalIntegrationsConfigInEvents&&this.loadOnlyIntegrations&&Object.keys(this.loadOnlyIntegrations).length>0}},{key:"processAndSendDataToDestinations",value:function(e,t,n,r){try{this.anonymousId||this.setAnonymousId(),this.errorReporting.leaveBreadcrumb("Started sending data to destinations"),t.message.context.traits=a({},this.userTraits),t.message.anonymousId=this.anonymousId,t.message.userId=t.message.userId?t.message.userId:this.userId,"group"==e&&(this.groupId&&(t.message.groupId=this.groupId),this.groupTraits&&(t.message.traits=a({},this.groupTraits)));try{var i=this.uSession.getSessionInfo(),o=i.sessionId,s=i.sessionStart;t.message.context.sessionId=o,s&&(t.message.context.sessionStart=!0)}catch(e){jn(e)}f=this.cookieConsentOptions,h=!1,Object.keys(f).forEach((function(e){Qi.includes(e)&&"boolean"==typeof f[e].enabled&&!0===f[e].enabled&&(h=!0)})),h&&(t.message.context.consentManagement={deniedConsentIds:this.deniedConsentIds||[]}),this.processOptionsParam(t,n),function(e,t){var n=e.properties,r=e.traits,i=e.context;n&&Object.keys(n).forEach((function(e){Mi.indexOf(e.toLowerCase())>=0&&Pn.error("Warning! : Reserved keyword used in properties--\x3e ".concat(e," with ").concat(t," call"))})),r&&Object.keys(r).forEach((function(e){Mi.indexOf(e.toLowerCase())>=0&&Pn.error("Warning! : Reserved keyword used in traits--\x3e ".concat(e," with ").concat(t," call"))}));var o=i.traits;o&&Object.keys(o).forEach((function(e){Mi.indexOf(e.toLowerCase())>=0&&Pn.error("Warning! : Reserved keyword used in traits --\x3e ".concat(e," with ").concat(t," call"))}))}(t.message,e);var u=t.message.integrations;u?Ji(u):u=this.shouldUseGlobalIntegrationsConfigInEvents()?this.loadOnlyIntegrations:qi,t.message.integrations=u;try{t.message.context["ua-ch"]=this.uach}catch(e){jn(e)}try{if(this.clientIntegrationObjects){var c=Zi(u,this.clientIntegrationObjects);this.processAndSendEventsToDeviceMode(c,t,e)}else this.toBeProcessedByIntegrationArray.push([e,t])}catch(e){jn(e,"processAndSendEventsToDeviceMode::")}var l=w(t);$i(l.message.integrations),!this.bufferDataPlaneEventsUntilReady||this.clientIntegrationObjects?this.queueEventForDataPlane(e,l):this.preProcessQueue.enqueue(e,l),r&&"function"==typeof r&&r(l)}catch(e){jn(e)}var f,h}},{key:"utm",value:function(e){var t={};try{var n=new URL(e),r="utm_";n.searchParams.forEach((function(e,n){if(n.startsWith(r)){var i=n.substring(4);"campaign"===i&&(i="name"),t[i]=e}}))}catch(e){}return t}},{key:"addCampaignInfo",value:function(e){var t=e.message.context;t&&"object"===f(t)&&(e.message.context.campaign=this.utm(window.location.href))}},{key:"processOptionsParam",value:function(e,t){var n=e.message,r=n.type,o=n.properties;this.addCampaignInfo(e),e.message.context.page=this.getContextPageProperties("page"===r?o:void 0),function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};"object"===f(t)&&null!==t&&Object.keys(t).forEach((function(n){Ps.includes(n)&&(e[n]=t[n])}))}(e.message,t),e.message.context=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.context;return"object"!==f(t)||null===t||Object.keys(t).forEach((function(e){if(!Ps.includes(e)&&!zi.includes(e))if("context"!==e)n=Si(n,i({},e,t[e]));else if("object"===f(t[e])&&null!==t[e]){var r={};Object.keys(t[e]).forEach((function(n){zi.includes(n)||(r[n]=t[e][n])})),n=Si(n,a({},r))}else Pn.error("[Analytics: processOptionsParam] context passed in options ".concat(e," is not object."))})),n}(e.message,t)}},{key:"getPageProperties",value:function(e,t){var n=so(),r=t&&t.page||{};for(var i in n)void 0===e[i]&&(e[i]=r[i]||n[i]);return e}},{key:"getContextPageProperties",value:function(e){var t=so(),n={};for(var r in t)n[r]=e&&e[r]?e[r]:t[r];return n}},{key:"reset",value:function(e){this.errorReporting.leaveBreadcrumb("reset API :: flag: ".concat(e)),this.loaded?(e&&(this.anonymousId=""),this.userId="",this.userTraits={},this.groupId="",this.groupTraits={},this.uSession.reset(),this.storage.clear(e)):this.toBeProcessedArray.push(["reset",e])}},{key:"getAnonymousId",value:function(e){return this.anonymousId=this.storage.getAnonymousId(e),this.anonymousId||this.setAnonymousId(),this.anonymousId}},{key:"getUserId",value:function(){return this.userId}},{key:"getSessionId",value:function(){return this.uSession.getSessionId()}},{key:"getUserTraits",value:function(){return this.userTraits}},{key:"getGroupId",value:function(){return this.groupId}},{key:"getGroupTraits",value:function(){return this.groupTraits}},{key:"setAnonymousId",value:function(e,t){var n=t?Ss(t):null,r=n?n.rs_amp_id:null;this.anonymousId=e||r||Wi(),this.storage.setAnonymousId(this.anonymousId)}},{key:"isValidWriteKey",value:function(e){return e&&"string"==typeof e&&e.trim().length>0}},{key:"isValidServerUrl",value:function(e){return e&&"string"==typeof e&&e.trim().length>0}},{key:"isDatasetAvailable",value:function(){var e=document.createElement("div");return e.setAttribute("data-a-b","c"),!!e.dataset&&"c"===e.dataset.aB}},{key:"loadAfterPolyfill",value:function(e,t,n){var r=this;if("object"===f(t)&&null!==t&&(n=t,t=null),n&&n.logLevel&&(this.logLevel=n.logLevel,Pn.setLogLevel(n.logLevel)),!this.isValidWriteKey(e))throw Error("Unable to load the SDK due to invalid writeKey");if(!this.storage||0===Object.keys(this.storage).length)throw Error("Cannot proceed as no storage is available");n&&n.cookieConsentManager&&(this.cookieConsentOptions=n.cookieConsentManager),this.writeKey=e,this.serverUrl=t,this.options=n;var i={};if(n&&n.setCookieDomain&&(i=a(a({},i),{},{domain:n.setCookieDomain})),n&&"boolean"==typeof n.secureCookie&&(i=a(a({},i),{},{secure:n.secureCookie})),n&&"boolean"==typeof n.sameDomainCookiesOnly&&(i=a(a({},i),{},{sameDomainCookiesOnly:n.sameDomainCookiesOnly})),n&&-1!==ji.indexOf(n.sameSiteCookie)&&(i=a(a({},i),{},{samesite:n.sameSiteCookie})),this.storage.options(i),n&&"string"==typeof n.uaChTrackLevel&&Hi.includes(n.uaChTrackLevel)&&(this.uaChTrackLevel=n.uaChTrackLevel),navigator.userAgentData&&function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"none";"none"===t&&e(void 0),"default"===t&&e(navigator.userAgentData),"full"===t&&navigator.userAgentData.getHighEntropyValues(["architecture","bitness","brands","mobile","model","platform","platformVersion","uaFullVersion","fullVersionList","wow64"]).then((function(t){e(t)}))}((function(e){r.uach=e}),this.uaChTrackLevel),n&&n.integrations&&(o(this.loadOnlyIntegrations,n.integrations),Ji(this.loadOnlyIntegrations)),this.useGlobalIntegrationsConfigInEvents=n&&!0===n.useGlobalIntegrationsConfigInEvents,n&&n.sendAdblockPage&&(this.sendAdblockPage=!0),n&&n.sendAdblockPageOptions&&"object"===f(n.sendAdblockPageOptions)&&(this.sendAdblockPageOptions=n.sendAdblockPageOptions),this.uSession.initialize(n),n&&n.clientSuppliedCallbacks){var s={};Object.keys(this.methodToCallbackMapping).forEach((function(e){r.methodToCallbackMapping.hasOwnProperty(e)&&n.clientSuppliedCallbacks[r.methodToCallbackMapping[e]]&&(s[e]=n.clientSuppliedCallbacks[r.methodToCallbackMapping[e]])})),o(this.clientSuppliedCallbacks,s),this.registerCallbacks(!0)}if(n&&null!=n.loadIntegration&&(this.loadIntegration=!!n.loadIntegration),n&&"boolean"==typeof n.bufferDataPlaneEventsUntilReady&&(this.bufferDataPlaneEventsUntilReady=!0===n.bufferDataPlaneEventsUntilReady,this.bufferDataPlaneEventsUntilReady&&this.preProcessQueue.init(this.options,this.queueEventForDataPlane.bind(this))),n&&"number"==typeof n.dataPlaneEventsBufferTimeout&&(this.dataPlaneEventsBufferTimeout=n.dataPlaneEventsBufferTimeout),n&&void 0!==n.lockIntegrationsVersion&&(this.lockIntegrationsVersion=!0===n.lockIntegrationsVersion),this.initializeUser(n?n.anonymousIdOptions:void 0),this.setInitialPageProperties(),this.destSDKBaseURL=xs(this.version,this.lockIntegrationsVersion,n&&n.destSDKBaseURL),n&&n.getSourceConfig)if("function"!=typeof n.getSourceConfig)jn(new Error('option "getSourceConfig" must be a function'));else{var u=n.getSourceConfig();u instanceof Promise?u.then((function(e){return r.processResponse(200,e)})).catch(jn):this.processResponse(200,u)}else{var c=function(e,t){var n=Bi,r=[];return e&&r.push("writeKey=".concat(e)),t&&r.push("lockIntegrationsVersion=".concat(t)),r.length>0&&(n=(n=Bi.concat(Bi.includes("?")?"&":"?")).concat(r.join("&"))),n}(e,this.lockIntegrationsVersion);n&&n.configUrl&&(c=function(e,t){var n=e;-1===n.indexOf("sourceConfig")&&(n="".concat(Vi(n),"/sourceConfig/")),n="/"===n.slice(-1)?n:"".concat(n,"/");var r=t.split("?")[1],i=n.split("?");return i.length>1&&i[1]!==r?"".concat(i[0],"?").concat(r):"".concat(n,"?").concat(r)}(n.configUrl,c));try{!function(e,t,n,r){var i=r.bind(e),o=new XMLHttpRequest;o.open("GET",t,!0),o.setRequestHeader("Authorization","Basic ".concat(btoa("".concat(n,":")))),o.onload=function(){var e=o.status,n=o.responseText;200===e?i(200,n):(jn(new Error("".concat(Mn," ").concat(e," for url: ").concat(t))),i(e))},o.send()}(this,c,e,this.processResponse)}catch(e){jn(e)}}}},{key:"arePolyfillsRequired",value:function(e){return(!e||"boolean"!=typeof e.polyfillIfRequired||e.polyfillIfRequired)&&(!String.prototype.endsWith||!String.prototype.startsWith||!String.prototype.includes||!Array.prototype.find||!Array.prototype.includes||"function"!=typeof window.URL||"undefined"==typeof Promise||!Object.entries||!Object.values||!String.prototype.replaceAll||!this.isDatasetAvailable()||"function"!=typeof TextDecoder||"function"!=typeof TextEncoder)}},{key:"load",value:function(e,t,n){if(!this.loaded){var r=w(n);if(this.arePolyfillsRequired(r)&&Ui){var i="polyfill";ki(i,Ui,{skipDatasetAttributes:!0});var o=this,s=setInterval((function(){!window.hasOwnProperty(i)&&null===document.getElementById(i)||"undefined"==typeof Promise||(clearInterval(s),o.loadAfterPolyfill(e,t,r))}),100);setTimeout((function(){clearInterval(s)}),xn)}else this.loadAfterPolyfill(e,t,r)}}},{key:"ready",value:function(e){this.loaded?"function"!=typeof e?Pn.error("ready callback is not a function"):this.clientIntegrationsReady?e():this.readyCallbacks.push(e):this.toBeProcessedArray.push(["ready",e])}},{key:"initializeCallbacks",value:function(){var e=this;Object.keys(this.methodToCallbackMapping).forEach((function(t){e.methodToCallbackMapping.hasOwnProperty(t)&&e.on(t,(function(){}))}))}},{key:"registerCallbacks",value:function(e){var t=this;e||Object.keys(this.methodToCallbackMapping).forEach((function(e){t.methodToCallbackMapping.hasOwnProperty(e)&&window.rudderanalytics&&"function"==typeof window.rudderanalytics[t.methodToCallbackMapping[e]]&&(t.clientSuppliedCallbacks[e]=window.rudderanalytics[t.methodToCallbackMapping[e]])})),Object.keys(this.clientSuppliedCallbacks).forEach((function(e){t.clientSuppliedCallbacks.hasOwnProperty(e)&&t.on(e,t.clientSuppliedCallbacks[e])}))}},{key:"sendSampleRequest",value:function(){ki("ad-block","//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js",{isNonNativeSDK:!0})}},{key:"startSession",value:function(e){this.uSession.start(e)}},{key:"endSession",value:function(){this.uSession.end()}},{key:"setAuthToken",value:function(e){"string"==typeof e?(this.storage.setAuthToken(e),this.transformationHandler.setAuthToken(e)):Pn.error("Provided input should be in string format")}}])}(),qs=new Hs;v(qs),window.addEventListener("error",(function(e){jn(e,void 0,qs)}),!0),qs.initializeCallbacks(),qs.registerCallbacks(!1);var Vs,Ws="load",Ys=window.rudderanalytics,Xs=Array.isArray(Ys);if(Xs)for(var Js=0;Js<Ys.length;){if(Ys[Js]&&Ys[Js][0]===Ws){Vs=Ys[Js],Ys.splice(Js,1);break}Js+=1}!function(e){var t="ajs_trait_",n="ajs_prop_";function r(e,t){var n={};return Object.keys(e).forEach((function(r){r.startsWith(t)&&(n[r.substr(t.length)]=e[r])})),n}var i=function(e){var t={};try{new URL(e).searchParams.forEach((function(e,n){t[n]=e}))}catch(e){}return t}(e);i.ajs_aid&&qs.toBeProcessedArray.push(["setAnonymousId",i.ajs_aid]),i.ajs_uid&&qs.toBeProcessedArray.push(["identify",i.ajs_uid,r(i,t)]),i.ajs_event&&qs.toBeProcessedArray.push(["track",i.ajs_event,r(i,n)])}(window.location.href),Xs&&Ys.forEach((function(e){return qs.toBeProcessedArray.push(e)})),Vs&&Vs.length>0&&(Vs.shift(),qs[Ws].apply(qs,c(Vs)));var $s=qs.ready.bind(qs),Zs=qs.identify.bind(qs),ea=qs.page.bind(qs),ta=qs.track.bind(qs),na=qs.alias.bind(qs),ra=qs.group.bind(qs),ia=qs.reset.bind(qs),oa=qs.load.bind(qs),sa=qs.initialized=!0,aa=qs.getUserId.bind(qs),ua=qs.getSessionId.bind(qs),ca=qs.getUserTraits.bind(qs),la=qs.getAnonymousId.bind(qs),fa=qs.setAnonymousId.bind(qs),ha=qs.getGroupId.bind(qs),da=qs.getGroupTraits.bind(qs),pa=qs.startSession.bind(qs),ga=qs.endSession.bind(qs),ya=qs.setAuthToken.bind(qs);exports.alias=na,exports.endSession=ga,exports.getAnonymousId=la,exports.getGroupId=ha,exports.getGroupTraits=da,exports.getSessionId=ua,exports.getUserId=aa,exports.getUserTraits=ca,exports.group=ra,exports.identify=Zs,exports.initialized=sa,exports.load=oa,exports.page=ea,exports.ready=$s,exports.reset=ia,exports.setAnonymousId=fa,exports.setAuthToken=ya,exports.startSession=pa,exports.track=ta;
|
1
|
+
"use strict";function e(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t,n){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,l(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function r(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=h(e))||t){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){a=!0,o=e},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw o}}}}function i(e,t,n){return(t=l(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o.apply(null,arguments)}function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){i(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function u(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,s,a=[],u=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t);else for(;!(u=(r=o.call(n)).done)&&(a.push(r.value),a.length!==t);u=!0);}catch(e){c=!0,i=e}finally{try{if(!u&&null!=n.return&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw i}}return a}}(e,t)||h(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(t){return function(t){if(Array.isArray(t))return e(t)}(t)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||h(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}function f(e){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f(e)}function h(t,n){if(t){if("string"==typeof t)return e(t,n);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?e(t,n):void 0}}var d="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function p(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function g(e){return e&&Object.prototype.hasOwnProperty.call(e,"default")&&1===Object.keys(e).length?e.default:e}var y={exports:{}};!function(e){function t(e){if(e)return function(e){return o(e,t.prototype),e._callbacks=new Map,e}(e);this._callbacks=new Map}t.prototype.on=function(e,t){var n,r=null!==(n=this._callbacks.get(e))&&void 0!==n?n:[];return r.push(t),this._callbacks.set(e,r),this},t.prototype.once=function(e,t){var n=this,r=function r(){n.off(e,r);for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];t.apply(n,o)};return r.fn=t,this.on(e,r),this},t.prototype.off=function(e,t){if(void 0===e&&void 0===t)return this._callbacks.clear(),this;if(void 0===t)return this._callbacks.delete(e),this;var n=this._callbacks.get(e);if(n){var i,o=r(n.entries());try{for(o.s();!(i=o.n()).done;){var s=u(i.value,2),a=s[0],c=s[1];if(c===t||c.fn===t){n.splice(a,1);break}}}catch(e){o.e(e)}finally{o.f()}0===n.length?this._callbacks.delete(e):this._callbacks.set(e,n)}return this},t.prototype.emit=function(e){var t=this._callbacks.get(e);if(t){for(var n=c(t),i=arguments.length,o=new Array(i>1?i-1:0),s=1;s<i;s++)o[s-1]=arguments[s];var a,u=r(n);try{for(u.s();!(a=u.n()).done;){a.value.apply(this,o)}}catch(e){u.e(e)}finally{u.f()}}return this},t.prototype.listeners=function(e){var t;return null!==(t=this._callbacks.get(e))&&void 0!==t?t:[]},t.prototype.listenerCount=function(e){if(e)return this.listeners(e).length;var t,n=0,i=r(this._callbacks.values());try{for(i.s();!(t=i.n()).done;){n+=t.value.length}}catch(e){i.e(e)}finally{i.f()}return n},t.prototype.hasListeners=function(e){return this.listenerCount(e)>0},t.prototype.addEventListener=t.prototype.on,t.prototype.removeListener=t.prototype.off,t.prototype.removeEventListener=t.prototype.off,t.prototype.removeAllListeners=t.prototype.off,e.exports=t}(y);var v=p(y.exports);function m(e){return null!=e&&"object"===f(e)&&!0===e["@@functional/placeholder"]}function A(e){return function t(n){return 0===arguments.length||m(n)?t:e.apply(this,arguments)}}function I(e){return function t(n,r){switch(arguments.length){case 0:return t;case 1:return m(n)?t:A((function(t){return e(n,t)}));default:return m(n)&&m(r)?t:m(n)?A((function(t){return e(t,r)})):m(r)?A((function(t){return e(n,t)})):e(n,r)}}}function b(e){return function t(n,r,i){switch(arguments.length){case 0:return t;case 1:return m(n)?t:I((function(t,r){return e(n,t,r)}));case 2:return m(n)&&m(r)?t:m(n)?I((function(t,n){return e(t,r,n)})):m(r)?I((function(t,r){return e(n,t,r)})):A((function(t){return e(n,r,t)}));default:return m(n)&&m(r)&&m(i)?t:m(n)&&m(r)?I((function(t,n){return e(t,n,i)})):m(n)&&m(i)?I((function(t,n){return e(t,r,n)})):m(r)&&m(i)?I((function(t,r){return e(n,t,r)})):m(n)?A((function(t){return e(t,r,i)})):m(r)?A((function(t){return e(n,t,i)})):m(i)?A((function(t){return e(n,r,t)})):e(n,r,i)}}}function k(e,t){return Object.prototype.hasOwnProperty.call(t,e)}var E=A((function(e){return null===e?"Null":void 0===e?"Undefined":Object.prototype.toString.call(e).slice(8,-1)}));function C(e){return"[object Object]"===Object.prototype.toString.call(e)}function S(e,t,n){if(n||(n=new O),function(e){var t=f(e);return null==e||"object"!=t&&"function"!=t}(e))return e;var r,i=function(t){var r=n.get(e);if(r)return r;for(var i in n.set(e,t),e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=S(e[i],!0,n));return t};switch(E(e)){case"Object":return i(Object.create(Object.getPrototypeOf(e)));case"Array":return i(Array(e.length));case"Date":return new Date(e.valueOf());case"RegExp":return r=e,new RegExp(r.source,r.flags?r.flags:(r.global?"g":"")+(r.ignoreCase?"i":"")+(r.multiline?"m":"")+(r.sticky?"y":"")+(r.unicode?"u":"")+(r.dotAll?"s":""));case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"BigInt64Array":case"BigUint64Array":return e.slice();default:return e}}var O=function(){function e(){this.map={},this.length=0}return e.prototype.set=function(e,t){var n=this.hash(e),r=this.map[n];r||(this.map[n]=r=[]),r.push([e,t]),this.length+=1},e.prototype.hash=function(e){var t=[];for(var n in e)t.push(Object.prototype.toString.call(e[n]));return t.join()},e.prototype.get=function(e){if(this.length<=180)for(var t in this.map)for(var n=this.map[t],r=0;r<n.length;r+=1){if((o=n[r])[0]===e)return o[1]}else{var i=this.hash(e);if(n=this.map[i])for(r=0;r<n.length;r+=1){var o;if((o=n[r])[0]===e)return o[1]}}},e}(),w=A((function(e){return null!=e&&"function"==typeof e.clone?e.clone():S(e)})),T=b((function(e,t,n){var r,i={};for(r in n=n||{},t=t||{})k(r,t)&&(i[r]=k(r,n)?e(r,t[r],n[r]):t[r]);for(r in n)k(r,n)&&!k(r,i)&&(i[r]=n[r]);return i})),_=b((function e(t,n,r){return T((function(n,r,i){return C(r)&&C(i)?e(t,r,i):t(n,r,i)}),n,r)})),R=b((function(e,t,n){return _((function(t,n,r){return e(n,r)}),t,n)})),P={HS:"HubSpot",GA:"GA",HOTJAR:"Hotjar",GOOGLEADS:"GoogleAds",VWO:"VWO",GTM:"GoogleTagManager",BRAZE:"Braze",INTERCOM:"INTERCOM",KEEN:"Keen",KISSMETRICS:"Kissmetrics",CUSTOMERIO:"CustomerIO",CHARTBEAT:"Chartbeat",COMSCORE:"Comscore",FACEBOOK_PIXEL:"FacebookPixel",LOTAME:"Lotame",OPTIMIZELY:"Optimizely",BUGSNAG:"Bugsnag",FULLSTORY:"Fullstory",TVSQUARED:"TVSquared",GA4:"GA4",GA4_V2:"GA4_V2",MOENGAGE:"MoEngage",AM:"Amplitude",PENDO:"Pendo",LYTICS:"Lytics",APPCUES:"Appcues",POSTHOG:"Posthog",KLAVIYO:"Klaviyo",CLEVERTAP:"Clevertap",BINGADS:"BingAds",PINTEREST_TAG:"PinterestTag",ADOBE_ANALYTICS:"AdobeAnalytics",LINKEDIN_INSIGHT_TAG:"LinkedInInsightTag",REDDIT_PIXEL:"RedditPixel",DRIP:"Drip",HEAP:"Heap",CRITEO:"Criteo",MP:"Mixpanel",QUALTRICS:"Qualtrics",PROFITWELL:"ProfitWell",SENTRY:"Sentry",QUANTUMMETRIC:"QuantumMetric",SNAP_PIXEL:"SnapPixel",POST_AFFILIATE_PRO:"PostAffiliatePro",GOOGLE_OPTIMIZE:"GoogleOptimize",LAUNCHDARKLY:"LaunchDarkly",GA360:"GA360",ADROLL:"Adroll",DCM_FLOODLIGHT:"DCMFloodlight",MATOMO:"Matomo",VERO:"Vero",MOUSEFLOW:"Mouseflow",ROCKERBOX:"Rockerbox",CONVERTFLOW:"ConvertFlow",SNAPENGAGE:"SnapEngage",LIVECHAT:"LiveChat",SHYNET:"Shynet",WOOPRA:"Woopra",ROLLBAR:"RollBar",QUORA_PIXEL:"QuoraPixel",JUNE:"June",ENGAGE:"Engage",ITERABLE:"Iterable",YANDEX_METRICA:"YandexMetrica",REFINER:"Refiner",QUALAROO:"Qualaroo",PODSIGHTS:"Podsights",AXEPTIO:"Axeptio",SATISMETER:"Satismeter",MICROSOFT_CLARITY:"MicrosoftClarity",SENDINBLUE:"Sendinblue",OLARK:"Olark",LEMNISK:"Lemnisk",TIKTOK_ADS:"TiktokAds",ACTIVE_CAMPAIGN:"ActiveCampaign",SPRIG:"Sprig",SPOTIFYPIXEL:"SpotifyPixel",COMMANDBAR:"CommandBar",NINETAILED:"Ninetailed"},x="ADOBE_ANALYTICS";i({},"Adobe Analytics","AdobeAnalytics");var D=i(i(i(i(i(i({"Adobe Analytics":x,ADOBEANALYTICS:x,"ADOBE ANALYTICS":x},x,x),"AdobeAnalytics",x),"adobeanalytics",x),"adobe analytics",x),"Adobe analytics",x),"adobe Analytics",x),L="AM";i({},"Amplitude","Amplitude");var M=i(i(i(i({},L,L),"AMPLITUDE",L),"Amplitude",L),"am",L),B="APPCUES";i({},"Appcues","Appcues");var N=i(i(i(i({},B,B),"Appcues",B),"App Cues",B),"appcues",B),G="BINGADS";i({},"Bing Ads","BingAds");var F=i(i(i(i(i(i(i({},G,G),"BingAds",G),"bingads",G),"Bing Ads",G),"Bing ads",G),"bing Ads",G),"bing ads",G),U="BRAZE";i({},"Braze","Braze");var j=i(i(i({},U,U),"Braze",U),"braze",U),K="BUGSNAG";i({},"Bugsnag","Bugsnag");var Q=i(i(i({},K,K),"bugsnag",K),"Bugsnag",K),z="CHARTBEAT";i({},"Chartbeat","Chartbeat");var H=i(i(i(i(i({},z,z),"Chartbeat",z),"chartbeat",z),"Chart Beat",z),"chart beat",z),V="CLEVERTAP";i({},"CleverTap","Clevertap");var q=i(i(i({},V,V),"Clevertap",V),"clevertap",V),W="COMSCORE";i({},"Comscore","Comscore");var Y=i(i(i(i(i(i({},W,W),"Comscore",W),"Com Score",W),"com Score",W),"com score",W),"Com score",W),X="CRITEO";i({},"Criteo","Criteo");var J=i(i(i({},X,X),"Criteo",X),"criteo",X),$="CUSTOMERIO";i({},"Customer IO","CustomerIO");var Z=i(i(i(i(i({},$,$),"Customerio",$),"Customer.io",$),"CUSTOMER.IO",$),"customer.io",$),ee="DRIP";i({},"Drip","Drip");var te=i(i(i({},ee,ee),"Drip",ee),"drip",ee),ne="FACEBOOK_PIXEL";i({},"Facebook Pixel","FacebookPixel");var re=i(i(i(i(i(i(i({},ne,ne),"FB Pixel",ne),"Facebook Pixel",ne),"facebook pixel",ne),"fbpixel",ne),"FBPIXEL",ne),"FB_PIXEL",ne),ie="FULLSTORY";i({},"Fullstory","Fullstory");var oe=i(i(i(i(i(i(i(i({},ie,ie),"Fullstory",ie),"FullStory",ie),"full Story",ie),"Full Story",ie),"Full story",ie),"full story",ie),"fullstory",ie),se="GA";i({},"Google Analytics","GA");var ae=i(i(i(i(i({},se,se),"Google Analytics",se),"GoogleAnalytics",se),"GOOGLE ANALYTICS",se),"google analytics",se),ue="GA4";i({},"Google Analytics 4 (GA4)","GA4");var ce=i(i(i(i(i(i(i(i(i(i({},ue,ue),"Google Analytics 4",ue),"Google analytics 4",ue),"google analytics 4",ue),"Google Analytics4",ue),"Google analytics4",ue),"google analytics4",ue),"Google Analytics 4 (GA4)",ue),"google analytics 4 (ga4)",ue),"GoogleAnalytics4",ue),le="GA4_V2";i({},"Google Analytics 4 (GA4) V2","GA4_V2");var fe=i(i(i(i(i(i(i(i(i(i({},le,le),"Google Analytics 4 V2",le),"Google analytics 4 V2",le),"google analytics 4 V2",le),"Google Analytics4 V2",le),"Google analytics4 V2",le),"google analytics4 V2",le),"Google Analytics 4 (GA4) V2",le),"google analytics 4 (ga4) V2",le),"GoogleAnalytics4V2",le),he="GOOGLEADS";i({},"Google Ads","GoogleAds");var de=i(i(i(i(i(i({},he,he),"Google Ads",he),"GoogleAds",he),"GOOGLE ADS",he),"google ads",he),"googleads",he),pe="GOOGLE_OPTIMIZE";i({},"Google Optimize","GoogleOptimize");var ge=i(i(i(i(i(i(i(i({},pe,pe),"Google Optimize",pe),"GoogleOptimize",pe),"Googleoptimize",pe),"GOOGLEOPTIMIZE",pe),"google optimize",pe),"Google optimize",pe),"GOOGLE OPTIMIZE",pe),ye="GTM";i({},"Google Tag Manager","GoogleTagManager");var ve=i(i(i(i(i({},ye,ye),"Google Tag Manager",ye),"google tag manager",ye),"googletag manager",ye),"googletagmanager",ye),me="HEAP";i({},"Heap.io","Heap");var Ae=i(i(i(i({},me,me),"Heap",me),"heap",me),"Heap.io",me),Ie="HOTJAR";i({},"Hotjar","Hotjar");var be=i(i(i(i(i({},Ie,Ie),"Hotjar",Ie),"hotjar",Ie),"Hot Jar",Ie),"hot jar",Ie),ke="HS";i({},"HubSpot","HubSpot");var Ee=i(i(i(i(i(i({},ke,ke),"Hubspot",ke),"HUBSPOT",ke),"hub spot",ke),"Hub Spot",ke),"Hub spot",ke),Ce="INTERCOM";i({},"Intercom","INTERCOM");var Se=i(i(i({},Ce,Ce),"Intercom",Ce),"intercom",Ce),Oe="KEEN";i({},"Keen","Keen");var we=i(i(i(i(i({},Oe,Oe),"Keen",Oe),"Keen.io",Oe),"keen",Oe),"keen.io",Oe),Te="KISSMETRICS";i({},"Kiss Metrics","Kissmetrics");var _e=i(i(i({},Te,Te),"Kissmetrics",Te),"kissmetrics",Te),Re="KLAVIYO";i({},"Klaviyo","Klaviyo");var Pe=i(i(i({},Re,Re),"Klaviyo",Re),"klaviyo",Re),xe="LAUNCHDARKLY";i({},"LaunchDarkly","LaunchDarkly");var De,Le=i(i(i(i(i(i({},xe,xe),"LaunchDarkly",xe),"Launch_Darkly",xe),"Launch Darkly",xe),"launchDarkly",xe),"launch darkly",xe),Me="LINKEDIN_INSIGHT_TAG";i({},"Linkedin Insight Tag","LinkedInInsightTag");var Be=(i(i(i(i(i(i(i(i(i(i(De={},Me,Me),"LinkedIn Insight Tag",Me),"LinkedIn insight tag",Me),"linkedIn insight tag",Me),"Linkedin_insight_tag",Me),"LinkedinInsighttag",Me),"LinkedinInsightTag",Me),"LinkedInInsightTag",Me),"Linkedininsighttag",Me),"LINKEDININSIGHTTAG",Me),i(De,"linkedininsighttag",Me)),Ne="LOTAME";i({},"Lotame","Lotame");var Ge=i(i(i({},Ne,Ne),"Lotame",Ne),"lotame",Ne),Fe="LYTICS";i({},"Lytics","Lytics");var Ue=i(i(i({},Fe,Fe),"Lytics",Fe),"lytics",Fe),je="MP";i({},"Mixpanel","Mixpanel");var Ke=i(i(i(i(i(i({},je,je),"MIXPANEL",je),"Mixpanel",je),"MIX PANEL",je),"Mix panel",je),"Mix Panel",je),Qe="MOENGAGE";i({},"MoEngage","MoEngage");var ze=i(i(i(i(i(i(i({},Qe,Qe),"MoEngage",Qe),"moengage",Qe),"Moengage",Qe),"Mo Engage",Qe),"mo engage",Qe),"Mo engage",Qe),He="OPTIMIZELY";i({},"Optimizely Web","Optimizely");var Ve=i(i(i({},He,He),"Optimizely",He),"optimizely",He),qe="PENDO";i({},"Pendo","Pendo");var We,Ye=i(i(i({},qe,qe),"Pendo",qe),"pendo",qe),Xe="PINTEREST_TAG";i({},"Pinterest Tag","PinterestTag");var Je=(i(i(i(i(i(i(i(i(i(i(We={},Xe,Xe),"PinterestTag",Xe),"Pinterest_Tag",Xe),"PINTERESTTAG",Xe),"pinterest",Xe),"PinterestAds",Xe),"Pinterest_Ads",Xe),"Pinterest",Xe),"Pinterest Tag",Xe),"Pinterest tag",Xe),i(i(i(i(We,"PINTEREST TAG",Xe),"pinterest tag",Xe),"Pinterest Ads",Xe),"Pinterest ads",Xe)),$e="POST_AFFILIATE_PRO";i({},"Post Affiliate Pro","PostAffiliatePro");var Ze=i(i(i(i(i(i(i(i({},$e,$e),"PostAffiliatePro",$e),"Post_affiliate_pro",$e),"Post Affiliate Pro",$e),"Post affiliate pro",$e),"post affiliate pro",$e),"postaffiliatepro",$e),"POSTAFFILIATEPRO",$e),et="POSTHOG";i({},"PostHog","Posthog");var tt=i(i(i(i(i(i(i({},et,et),"PostHog",et),"Posthog",et),"posthog",et),"Post Hog",et),"Post hog",et),"post hog",et),nt="PROFITWELL";i({},"ProfitWell","ProfitWell");var rt=i(i(i(i(i(i(i({},nt,nt),"ProfitWell",nt),"profitwell",nt),"Profitwell",nt),"Profit Well",nt),"profit well",nt),"Profit well",nt),it="QUALTRICS";i({},"Qualtrics","Qualtrics");var ot=i(i(i({},it,it),"Qualtrics",it),"qualtrics",it),st="QUANTUMMETRIC";i({},"Quantum Metric","QuantumMetric");var at=i(i(i(i(i(i(i(i({},st,st),"Quantum Metric",st),"quantum Metric",st),"quantum metric",st),"QuantumMetric",st),"quantumMetric",st),"quantummetric",st),"Quantum_Metric",st),ut="REDDIT_PIXEL";i({},"Reddit Pixel","RedditPixel");var ct=i(i(i(i(i(i(i(i({},ut,ut),"Reddit_Pixel",ut),"RedditPixel",ut),"REDDITPIXEL",ut),"redditpixel",ut),"Reddit Pixel",ut),"REDDIT PIXEL",ut),"reddit pixel",ut),lt="SENTRY";i({},"Sentry","Sentry");var ft=i(i(i({},lt,lt),"sentry",lt),"Sentry",lt),ht="SNAP_PIXEL";i({},"Snap Pixel","SnapPixel");var dt=i(i(i(i(i(i(i(i({},ht,ht),"Snap_Pixel",ht),"SnapPixel",ht),"SNAPPIXEL",ht),"snappixel",ht),"Snap Pixel",ht),"SNAP PIXEL",ht),"snap pixel",ht),pt="TVSQUARED";i({},"TVSquared","TVSquared");var gt=i(i(i(i(i(i(i(i(i({},pt,pt),"TVSquared",pt),"tvsquared",pt),"tvSquared",pt),"TvSquared",pt),"Tvsquared",pt),"TV Squared",pt),"tv squared",pt),"tv Squared",pt),yt="VWO";i({},"VWO","VWO");var vt=i(i(i(i(i(i(i(i({},yt,yt),"VisualWebsiteOptimizer",yt),"Visualwebsiteoptimizer",yt),"visualwebsiteoptimizer",yt),"vwo",yt),"Visual Website Optimizer",yt),"Visual website optimizer",yt),"visual website optimizer",yt),mt="GA360";i({},"Google Analytics 360","GA360");var At=i(i(i(i(i(i(i(i(i({},mt,mt),"Google Analytics 360",mt),"Google analytics 360",mt),"google analytics 360",mt),"Google Analytics360",mt),"Google analytics360",mt),"google analytics360",mt),"GoogleAnalytics360",mt),"GA 360",mt),It="ADROLL";i({},"Adroll","Adroll");var bt=i(i(i(i(i({},It,It),"Adroll",It),"Ad roll",It),"ad roll",It),"adroll",It),kt="DCM_FLOODLIGHT";i({},"DCM Floodlight","DCMFloodlight");var Et=i(i(i(i(i(i(i(i(i({},kt,kt),"DCM Floodlight",kt),"dcm floodlight",kt),"Dcm Floodlight",kt),"DCMFloodlight",kt),"dcmfloodlight",kt),"DcmFloodlight",kt),"dcm_floodlight",kt),"DCM_Floodlight",kt),Ct="MATOMO";i({},"Matomo","Matomo");var St=i(i(i({},Ct,Ct),"Matomo",Ct),"matomo",Ct),Ot="VERO";i({},"Vero","Vero");var wt=i(i(i({},Ot,Ot),"Vero",Ot),"vero",Ot),Tt="MOUSEFLOW";i({},"Mouseflow","Mouseflow");var _t=i(i(i(i(i(i(i(i(i({},Tt,Tt),"Mouseflow",Tt),"mouseflow",Tt),"mouseFlow",Tt),"MouseFlow",Tt),"Mouse flow",Tt),"mouse flow",Tt),"mouse Flow",Tt),"Mouse Flow",Tt),Rt="ROCKERBOX";i({},"Rockerbox","Rockerbox");var Pt=i(i(i(i(i(i(i({},Rt,Rt),"Rockerbox",Rt),"rockerbox",Rt),"RockerBox",Rt),"Rocker box",Rt),"rocker box",Rt),"Rocker Box",Rt),xt="CONVERTFLOW";i({},"ConvertFlow","ConvertFlow");var Dt=i(i(i(i(i(i(i(i(i(i({},xt,xt),"Convertflow",xt),"convertflow",xt),"convertFlow",xt),"ConvertFlow",xt),"Convert flow",xt),"convert flow",xt),"convert Flow",xt),"Convert Flow",xt),"CONVERT FLOW",xt),Lt="SNAPENGAGE";i({},"SnapEngage","SnapEngage");var Mt=i(i(i(i(i(i(i({},Lt,Lt),"SnapEngage",Lt),"Snap_Engage",Lt),"snapengage",Lt),"SNAP ENGAGE",Lt),"Snap Engage",Lt),"snap engage",Lt),Bt="LIVECHAT";i({},"LiveChat","LiveChat");var Nt=i(i(i(i(i(i(i({},Bt,Bt),"LiveChat",Bt),"Live_Chat",Bt),"livechat",Bt),"LIVE CHAT",Bt),"Live Chat",Bt),"live chat",Bt),Gt="SHYNET";i({},"Shynet","Shynet");var Ft=i(i(i(i(i(i(i(i(i({},Gt,Gt),"shynet",Gt),"ShyNet",Gt),"shyNet",Gt),"Shynet",Gt),"shy net",Gt),"Shy Net",Gt),"shy Net",Gt),"Shy net",Gt),Ut="WOOPRA";i({},"Woopra","Woopra");var jt=i(i(i({},Ut,Ut),"Woopra",Ut),"woopra",Ut),Kt="ROLLBAR";i({},"RollBar","RollBar");var Qt=i(i(i(i(i(i(i(i({},Kt,Kt),"RollBar",Kt),"Roll_Bar",Kt),"rollbar",Kt),"Rollbar",Kt),"ROLL BAR",Kt),"Roll Bar",Kt),"roll bar",Kt),zt="QUORA_PIXEL";i({},"Quora Pixel","QuoraPixel");var Ht=i(i(i(i(i(i(i(i(i(i({},zt,zt),"Quora Pixel",zt),"Quora pixel",zt),"QUORA PIXEL",zt),"QuoraPixel",zt),"Quorapixel",zt),"QUORAPIXEL",zt),"Quora_Pixel",zt),"quora_pixel",zt),"Quora",zt),Vt="JUNE";i({},"June","June");var qt=i(i(i({},Vt,Vt),"June",Vt),"june",Vt),Wt="ENGAGE";i({},"Engage","Engage");var Yt=i(i(i({},Wt,Wt),"Engage",Wt),"engage",Wt),Xt="ITERABLE";i({},"Iterable","Iterable");var Jt=i(i(i({},Xt,Xt),"Iterable",Xt),"iterable",Xt),$t="YANDEX_METRICA";i({},"Yandex.Metrica","YandexMetrica");var Zt=i(i(i(i(i({},$t,$t),"Yandexmetrica",$t),"yandexmetrica",$t),"yandexMetrica",$t),"YandexMetrica",$t),en="REFINER";i({},"Refiner","Refiner");var tn=i(i(i({},en,en),"Refiner",en),"refiner",en),nn="QUALAROO";i({},"Qualaroo","Qualaroo");var rn=i(i(i({},nn,nn),"Qualaroo",nn),"qualaroo",nn),on="PODSIGHTS";i({},"Podsights","Podsights");var sn=i(i(i(i(i(i(i(i({},on,on),"Podsights",on),"PodSights",on),"pod Sights",on),"Pod Sights",on),"pod sights",on),"POD SIGHTS",on),"Pod sights",on),an="AXEPTIO";i({},"Axeptio","Axeptio");var un=i(i(i({},an,an),"Axeptio",an),"axeptio",an),cn="SATISMETER";i({},"Satismeter","Satismeter");var ln=i(i(i({},cn,cn),"Satismeter",cn),"SatisMeter",cn),fn="MICROSOFT_CLARITY";i({},"Microsoft Clarity","MicrosoftClarity");var hn=i(i(i(i(i(i(i(i(i({},fn,fn),"Microsoft Clarity",fn),"Microsoft clarity",fn),"microsoft clarity",fn),"Microsoft_clarity",fn),"MicrosoftClarity",fn),"MICROSOFTCLARITY",fn),"microsoftclarity",fn),"microsoftClarity",fn),dn="SENDINBLUE";i({},"Sendinblue","Sendinblue");var pn=i(i(i(i({},dn,dn),"Sendinblue",dn),"sendinblue",dn),"SendinBlue",dn),gn="OLARK";i({},"Olark","Olark");var yn=i(i(i({},gn,gn),"Olark",gn),"olark",gn),vn="LEMNISK";i({},"Lemnisk","Lemnisk");var mn=i(i(i(i(i(i(i(i({},vn,vn),"LEMNISK_MARKETING_AUTOMATION",vn),"Lemnisk Marketing Automation",vn),"LemniskMarketingAutomation",vn),"lemniskmarketingautomation",vn),"lemniskMarketingAutomation",vn),"lemnisk",vn),"Lemnisk",vn),An="TIKTOK_ADS";i({},"TikTok Ads","TiktokAds");var In=i(i(i(i(i(i(i({},An,An),"TiktokAds",An),"Tiktok ads",An),"Tiktok Ads",An),"Tik Tok Ads",An),"tik tok ads",An),"tiktokads",An),bn="ACTIVE_CAMPAIGN";i({},"Active Campaign","ActiveCampaign");var kn=i(i(i(i(i(i({ActiveCampaign:bn,"Active Campaign":bn,"ACTIVE CAMPAIGN":bn},bn,bn),"activecampaign",bn),"active campaign",bn),"Active campaign",bn),"active Campaign",bn),"active_campaign",bn),En="SPRIG";i({},"Sprig","Sprig");var Cn=i(i(i({},En,En),"Sprig",En),"sprig",En),Sn="SPOTIFYPIXEL";i({},"Spotify Pixel","SpotifyPixel");var On=i(i(i(i({},Sn,Sn),"Spotify Pixel",Sn),"spotify pixel",Sn),"SPOTIFY_PIXEL",Sn),wn="COMMANDBAR";i({},"CommandBar","CommandBar");var Tn=i(i(i(i(i({},wn,wn),"Command Bar",wn),"Commandbar",wn),"COMMAND_BAR",wn),"commandbar",wn),_n="NINETAILED";i({},"Ninetailed","Ninetailed");var Rn=i(i(i(i({},_n,_n),"Ninetailed",_n),"ninetailed",_n),"NineTailed",_n),Pn=a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a({All:"All"},D),M),N),F),j),Q),Tn),H),q),Y),J),Z),te),re),oe),ae),ce),fe),At),de),ge),ve),Ae),be),Ee),Se),we),_e),Pe),Le),Be),Ge),Ue),Ke),ze),Rn),Ve),Ye),Je),Ze),tt),rt),ot),at),ct),ft),dt),gt),vt),bt),Et),St),wt),_t),Dt),Mt),Nt),Ft),jt),Qt),Ht),qt),Yt),Jt),Pt),Zt),tn),rn),sn),un),ln),hn),pn),yn),mn),In),kn),Cn),On),xn=4,Dn={setLogLevel:function(e){switch(e.toUpperCase()){case"INFO":xn=1;break;case"DEBUG":xn=2;break;case"WARN":xn=3;break;default:xn=4}},info:function(){var e;xn<=1&&(e=console).info.apply(e,arguments)},debug:function(){var e;xn<=2&&(e=console).log.apply(e,arguments)},warn:function(){var e;xn<=3&&(e=console).warn.apply(e,arguments)},error:function(){var e;xn<=4&&(e=console).error.apply(e,arguments)}},Ln=1e4,Mn=1e3,Bn="RS_JS_SDK",Nn="Request failed with status:",Gn=[Nn],Fn="errorReporting",Un=function(e){var t=window.RudderStackGlobals&&window.RudderStackGlobals[Fn];t&&e instanceof Error&&t.notify(e)},jn=function(e,t){try{return JSON.stringify(e,function(e){var t=[];return function(n,r){if(!e||null!=r){if("object"!==f(r)||null===r)return r;for(;t.length>0&&t[t.length-1]!==this;)t.pop();return t.includes(r)?(Dn.debug("Circular Reference detected for key: ".concat(n)),"[Circular Reference]"):(t.push(r),r)}}}(t))}catch(e){return Dn.warn("Failed to convert the value to a JSON string."),null}},Kn=function(e,t,n){var r,i;try{r="string"==typeof e?e:e instanceof Error||e.message?e.message:jn(e)}catch(e){r=""}if("object"===f(i=e)&&null!==i&&"target"in i){if(e.target&&"script"!==e.target.localName)return"";if(e.target.dataset&&(e.target.dataset.loader!==Bn||"true"!==e.target.dataset.isnonnativesdk))return"";if(r="error in script loading:: src:: ".concat(e.target.src," id:: ").concat(e.target.id),"ad-block"===e.target.id)return n.page("RudderJS-Initiated","ad-block page request",{path:"/ad-blocked",title:r},n.sendAdblockPageOptions),""}return"[handleError]::".concat(t||"",' "').concat(r,'"')},Qn=function(e,t,n){var r;try{r=Kn(e,t,n)}catch(t){Dn.error("[handleError] Exception:: ",t),Dn.error("[handleError] Original error:: ",jn(e)),Un(t)}r&&(Dn.error(r),function(e){return!e.message||!Gn.some((function(t){return e.message.includes(t)}))}(e)&&Un(e))},zn={exports:{}};var Hn,Vn={exports:{}},qn=g(Object.freeze({__proto__:null,default:{}}));function Wn(){return Hn||(Hn=1,Vn.exports=(e=e||function(e,t){var n;if("undefined"!=typeof window&&window.crypto&&(n=window.crypto),"undefined"!=typeof self&&self.crypto&&(n=self.crypto),"undefined"!=typeof globalThis&&globalThis.crypto&&(n=globalThis.crypto),!n&&"undefined"!=typeof window&&window.msCrypto&&(n=window.msCrypto),!n&&void 0!==d&&d.crypto&&(n=d.crypto),!n)try{n=qn}catch(e){}var r=function(){if(n){if("function"==typeof n.getRandomValues)try{return n.getRandomValues(new Uint32Array(1))[0]}catch(e){}if("function"==typeof n.randomBytes)try{return n.randomBytes(4).readInt32LE()}catch(e){}}throw new Error("Native crypto module could not be used to get secure random number.")},i=Object.create||function(){function e(){}return function(t){var n;return e.prototype=t,n=new e,e.prototype=null,n}}(),o={},s=o.lib={},a=s.Base={extend:function(e){var t=i(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},u=s.WordArray=a.extend({init:function(e,n){e=this.words=e||[],this.sigBytes=n!=t?n:4*e.length},toString:function(e){return(e||l).stringify(this)},concat:function(e){var t=this.words,n=e.words,r=this.sigBytes,i=e.sigBytes;if(this.clamp(),r%4)for(var o=0;o<i;o++){var s=n[o>>>2]>>>24-o%4*8&255;t[r+o>>>2]|=s<<24-(r+o)%4*8}else for(var a=0;a<i;a+=4)t[r+a>>>2]=n[a>>>2];return this.sigBytes+=i,this},clamp:function(){var t=this.words,n=this.sigBytes;t[n>>>2]&=4294967295<<32-n%4*8,t.length=e.ceil(n/4)},clone:function(){var e=a.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],n=0;n<e;n+=4)t.push(r());return new u.init(t,e)}}),c=o.enc={},l=c.Hex={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],i=0;i<n;i++){var o=t[i>>>2]>>>24-i%4*8&255;r.push((o>>>4).toString(16)),r.push((15&o).toString(16))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r+=2)n[r>>>3]|=parseInt(e.substr(r,2),16)<<24-r%8*4;return new u.init(n,t/2)}},f=c.Latin1={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],i=0;i<n;i++){var o=t[i>>>2]>>>24-i%4*8&255;r.push(String.fromCharCode(o))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r++)n[r>>>2]|=(255&e.charCodeAt(r))<<24-r%4*8;return new u.init(n,t)}},h=c.Utf8={stringify:function(e){try{return decodeURIComponent(escape(f.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return f.parse(unescape(encodeURIComponent(e)))}},p=s.BufferedBlockAlgorithm=a.extend({reset:function(){this._data=new u.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=h.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var n,r=this._data,i=r.words,o=r.sigBytes,s=this.blockSize,a=o/(4*s),c=(a=t?e.ceil(a):e.max((0|a)-this._minBufferSize,0))*s,l=e.min(4*c,o);if(c){for(var f=0;f<c;f+=s)this._doProcessBlock(i,f);n=i.splice(0,c),r.sigBytes-=l}return new u.init(n,l)},clone:function(){var e=a.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0});s.Hasher=p.extend({cfg:a.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){p.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:16,_createHelper:function(e){return function(t,n){return new e.init(n).finalize(t)}},_createHmacHelper:function(e){return function(t,n){return new g.HMAC.init(e,n).finalize(t)}}});var g=o.algo={};return o}(Math),e)),Vn.exports;var e}var Yn,Xn={exports:{}};function Jn(){return Yn||(Yn=1,Xn.exports=(e=Wn(),function(){var t=e,n=t.lib.WordArray;function r(e,t,r){for(var i=[],o=0,s=0;s<t;s++)if(s%4){var a=r[e.charCodeAt(s-1)]<<s%4*2|r[e.charCodeAt(s)]>>>6-s%4*2;i[o>>>2]|=a<<24-o%4*8,o++}return n.create(i,o)}t.enc.Base64={stringify:function(e){var t=e.words,n=e.sigBytes,r=this._map;e.clamp();for(var i=[],o=0;o<n;o+=3)for(var s=(t[o>>>2]>>>24-o%4*8&255)<<16|(t[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|t[o+2>>>2]>>>24-(o+2)%4*8&255,a=0;a<4&&o+.75*a<n;a++)i.push(r.charAt(s>>>6*(3-a)&63));var u=r.charAt(64);if(u)for(;i.length%4;)i.push(u);return i.join("")},parse:function(e){var t=e.length,n=this._map,i=this._reverseMap;if(!i){i=this._reverseMap=[];for(var o=0;o<n.length;o++)i[n.charCodeAt(o)]=o}var s=n.charAt(64);if(s){var a=e.indexOf(s);-1!==a&&(t=a)}return r(e,t,i)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),e.enc.Base64)),Xn.exports;var e}var $n,Zn={exports:{}};function er(){return $n||($n=1,Zn.exports=(e=Wn(),function(t){var n=e,r=n.lib,i=r.WordArray,o=r.Hasher,s=n.algo,a=[];!function(){for(var e=0;e<64;e++)a[e]=4294967296*t.abs(t.sin(e+1))|0}();var u=s.MD5=o.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,t){for(var n=0;n<16;n++){var r=t+n,i=e[r];e[r]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var o=this._hash.words,s=e[t+0],u=e[t+1],d=e[t+2],p=e[t+3],g=e[t+4],y=e[t+5],v=e[t+6],m=e[t+7],A=e[t+8],I=e[t+9],b=e[t+10],k=e[t+11],E=e[t+12],C=e[t+13],S=e[t+14],O=e[t+15],w=o[0],T=o[1],_=o[2],R=o[3];w=c(w,T,_,R,s,7,a[0]),R=c(R,w,T,_,u,12,a[1]),_=c(_,R,w,T,d,17,a[2]),T=c(T,_,R,w,p,22,a[3]),w=c(w,T,_,R,g,7,a[4]),R=c(R,w,T,_,y,12,a[5]),_=c(_,R,w,T,v,17,a[6]),T=c(T,_,R,w,m,22,a[7]),w=c(w,T,_,R,A,7,a[8]),R=c(R,w,T,_,I,12,a[9]),_=c(_,R,w,T,b,17,a[10]),T=c(T,_,R,w,k,22,a[11]),w=c(w,T,_,R,E,7,a[12]),R=c(R,w,T,_,C,12,a[13]),_=c(_,R,w,T,S,17,a[14]),w=l(w,T=c(T,_,R,w,O,22,a[15]),_,R,u,5,a[16]),R=l(R,w,T,_,v,9,a[17]),_=l(_,R,w,T,k,14,a[18]),T=l(T,_,R,w,s,20,a[19]),w=l(w,T,_,R,y,5,a[20]),R=l(R,w,T,_,b,9,a[21]),_=l(_,R,w,T,O,14,a[22]),T=l(T,_,R,w,g,20,a[23]),w=l(w,T,_,R,I,5,a[24]),R=l(R,w,T,_,S,9,a[25]),_=l(_,R,w,T,p,14,a[26]),T=l(T,_,R,w,A,20,a[27]),w=l(w,T,_,R,C,5,a[28]),R=l(R,w,T,_,d,9,a[29]),_=l(_,R,w,T,m,14,a[30]),w=f(w,T=l(T,_,R,w,E,20,a[31]),_,R,y,4,a[32]),R=f(R,w,T,_,A,11,a[33]),_=f(_,R,w,T,k,16,a[34]),T=f(T,_,R,w,S,23,a[35]),w=f(w,T,_,R,u,4,a[36]),R=f(R,w,T,_,g,11,a[37]),_=f(_,R,w,T,m,16,a[38]),T=f(T,_,R,w,b,23,a[39]),w=f(w,T,_,R,C,4,a[40]),R=f(R,w,T,_,s,11,a[41]),_=f(_,R,w,T,p,16,a[42]),T=f(T,_,R,w,v,23,a[43]),w=f(w,T,_,R,I,4,a[44]),R=f(R,w,T,_,E,11,a[45]),_=f(_,R,w,T,O,16,a[46]),w=h(w,T=f(T,_,R,w,d,23,a[47]),_,R,s,6,a[48]),R=h(R,w,T,_,m,10,a[49]),_=h(_,R,w,T,S,15,a[50]),T=h(T,_,R,w,y,21,a[51]),w=h(w,T,_,R,E,6,a[52]),R=h(R,w,T,_,p,10,a[53]),_=h(_,R,w,T,b,15,a[54]),T=h(T,_,R,w,u,21,a[55]),w=h(w,T,_,R,A,6,a[56]),R=h(R,w,T,_,O,10,a[57]),_=h(_,R,w,T,v,15,a[58]),T=h(T,_,R,w,C,21,a[59]),w=h(w,T,_,R,g,6,a[60]),R=h(R,w,T,_,k,10,a[61]),_=h(_,R,w,T,d,15,a[62]),T=h(T,_,R,w,I,21,a[63]),o[0]=o[0]+w|0,o[1]=o[1]+T|0,o[2]=o[2]+_|0,o[3]=o[3]+R|0},_doFinalize:function(){var e=this._data,n=e.words,r=8*this._nDataBytes,i=8*e.sigBytes;n[i>>>5]|=128<<24-i%32;var o=t.floor(r/4294967296),s=r;n[15+(i+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),n[14+(i+64>>>9<<4)]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),e.sigBytes=4*(n.length+1),this._process();for(var a=this._hash,u=a.words,c=0;c<4;c++){var l=u[c];u[c]=16711935&(l<<8|l>>>24)|4278255360&(l<<24|l>>>8)}return a},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});function c(e,t,n,r,i,o,s){var a=e+(t&n|~t&r)+i+s;return(a<<o|a>>>32-o)+t}function l(e,t,n,r,i,o,s){var a=e+(t&r|n&~r)+i+s;return(a<<o|a>>>32-o)+t}function f(e,t,n,r,i,o,s){var a=e+(t^n^r)+i+s;return(a<<o|a>>>32-o)+t}function h(e,t,n,r,i,o,s){var a=e+(n^(t|~r))+i+s;return(a<<o|a>>>32-o)+t}n.MD5=o._createHelper(u),n.HmacMD5=o._createHmacHelper(u)}(Math),e.MD5)),Zn.exports;var e}var tr,nr={exports:{}},rr={exports:{}};function ir(){return tr||(tr=1,rr.exports=(a=Wn(),t=(e=a).lib,n=t.WordArray,r=t.Hasher,i=e.algo,o=[],s=i.SHA1=r.extend({_doReset:function(){this._hash=new n.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var n=this._hash.words,r=n[0],i=n[1],s=n[2],a=n[3],u=n[4],c=0;c<80;c++){if(c<16)o[c]=0|e[t+c];else{var l=o[c-3]^o[c-8]^o[c-14]^o[c-16];o[c]=l<<1|l>>>31}var f=(r<<5|r>>>27)+u+o[c];f+=c<20?1518500249+(i&s|~i&a):c<40?1859775393+(i^s^a):c<60?(i&s|i&a|s&a)-1894007588:(i^s^a)-899497514,u=a,a=s,s=i<<30|i>>>2,i=r,r=f}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+s|0,n[3]=n[3]+a|0,n[4]=n[4]+u|0},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,r=8*e.sigBytes;return t[r>>>5]|=128<<24-r%32,t[14+(r+64>>>9<<4)]=Math.floor(n/4294967296),t[15+(r+64>>>9<<4)]=n,e.sigBytes=4*t.length,this._process(),this._hash},clone:function(){var e=r.clone.call(this);return e._hash=this._hash.clone(),e}}),e.SHA1=r._createHelper(s),e.HmacSHA1=r._createHmacHelper(s),a.SHA1)),rr.exports;var e,t,n,r,i,o,s,a}var or,sr,ar={exports:{}};function ur(){return sr||(sr=1,nr.exports=function(e){return n=(t=e).lib,r=n.Base,i=n.WordArray,o=t.algo,s=o.MD5,a=o.EvpKDF=r.extend({cfg:r.extend({keySize:4,hasher:s,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var n,r=this.cfg,o=r.hasher.create(),s=i.create(),a=s.words,u=r.keySize,c=r.iterations;a.length<u;){n&&o.update(n),n=o.update(e).finalize(t),o.reset();for(var l=1;l<c;l++)n=o.finalize(n),o.reset();s.concat(n)}return s.sigBytes=4*u,s}}),t.EvpKDF=function(e,t,n){return a.create(n).compute(e,t)},e.EvpKDF;var t,n,r,i,o,s,a}(Wn(),ir(),(or||(or=1,ar.exports=(e=Wn(),void function(){var t=e,n=t.lib.Base,r=t.enc.Utf8;t.algo.HMAC=n.extend({init:function(e,t){e=this._hasher=new e.init,"string"==typeof t&&(t=r.parse(t));var n=e.blockSize,i=4*n;t.sigBytes>i&&(t=e.finalize(t)),t.clamp();for(var o=this._oKey=t.clone(),s=this._iKey=t.clone(),a=o.words,u=s.words,c=0;c<n;c++)a[c]^=1549556828,u[c]^=909522486;o.sigBytes=s.sigBytes=i,this.reset()},reset:function(){var e=this._hasher;e.reset(),e.update(this._iKey)},update:function(e){return this._hasher.update(e),this},finalize:function(e){var t=this._hasher,n=t.finalize(e);return t.reset(),t.finalize(this._oKey.clone().concat(n))}})}())),ar.exports))),nr.exports;var e}var cr,lr,fr={exports:{}};zn.exports=function(e){return function(){var t=e,n=t.lib.BlockCipher,r=t.algo,i=[],o=[],s=[],a=[],u=[],c=[],l=[],f=[],h=[],d=[];!function(){for(var e=[],t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;var n=0,r=0;for(t=0;t<256;t++){var p=r^r<<1^r<<2^r<<3^r<<4;p=p>>>8^255&p^99,i[n]=p,o[p]=n;var g=e[n],y=e[g],v=e[y],m=257*e[p]^16843008*p;s[n]=m<<24|m>>>8,a[n]=m<<16|m>>>16,u[n]=m<<8|m>>>24,c[n]=m,m=16843009*v^65537*y^257*g^16843008*n,l[p]=m<<24|m>>>8,f[p]=m<<16|m>>>16,h[p]=m<<8|m>>>24,d[p]=m,n?(n=g^e[e[e[v^g]]],r^=e[e[r]]):n=r=1}}();var p=[0,1,2,4,8,16,32,64,128,27,54],g=r.AES=n.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var e=this._keyPriorReset=this._key,t=e.words,n=e.sigBytes/4,r=4*((this._nRounds=n+6)+1),o=this._keySchedule=[],s=0;s<r;s++)s<n?o[s]=t[s]:(c=o[s-1],s%n?n>6&&s%n==4&&(c=i[c>>>24]<<24|i[c>>>16&255]<<16|i[c>>>8&255]<<8|i[255&c]):(c=i[(c=c<<8|c>>>24)>>>24]<<24|i[c>>>16&255]<<16|i[c>>>8&255]<<8|i[255&c],c^=p[s/n|0]<<24),o[s]=o[s-n]^c);for(var a=this._invKeySchedule=[],u=0;u<r;u++){if(s=r-u,u%4)var c=o[s];else c=o[s-4];a[u]=u<4||s<=4?c:l[i[c>>>24]]^f[i[c>>>16&255]]^h[i[c>>>8&255]]^d[i[255&c]]}}},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,s,a,u,c,i)},decryptBlock:function(e,t){var n=e[t+1];e[t+1]=e[t+3],e[t+3]=n,this._doCryptBlock(e,t,this._invKeySchedule,l,f,h,d,o),n=e[t+1],e[t+1]=e[t+3],e[t+3]=n},_doCryptBlock:function(e,t,n,r,i,o,s,a){for(var u=this._nRounds,c=e[t]^n[0],l=e[t+1]^n[1],f=e[t+2]^n[2],h=e[t+3]^n[3],d=4,p=1;p<u;p++){var g=r[c>>>24]^i[l>>>16&255]^o[f>>>8&255]^s[255&h]^n[d++],y=r[l>>>24]^i[f>>>16&255]^o[h>>>8&255]^s[255&c]^n[d++],v=r[f>>>24]^i[h>>>16&255]^o[c>>>8&255]^s[255&l]^n[d++],m=r[h>>>24]^i[c>>>16&255]^o[l>>>8&255]^s[255&f]^n[d++];c=g,l=y,f=v,h=m}g=(a[c>>>24]<<24|a[l>>>16&255]<<16|a[f>>>8&255]<<8|a[255&h])^n[d++],y=(a[l>>>24]<<24|a[f>>>16&255]<<16|a[h>>>8&255]<<8|a[255&c])^n[d++],v=(a[f>>>24]<<24|a[h>>>16&255]<<16|a[c>>>8&255]<<8|a[255&l])^n[d++],m=(a[h>>>24]<<24|a[c>>>16&255]<<16|a[l>>>8&255]<<8|a[255&f])^n[d++],e[t]=g,e[t+1]=y,e[t+2]=v,e[t+3]=m},keySize:8});t.AES=n._createHelper(g)}(),e.AES}(Wn(),Jn(),er(),ur(),cr||(cr=1,fr.exports=(lr=Wn(),ur(),void(lr.lib.Cipher||function(e){var t=lr,n=t.lib,r=n.Base,i=n.WordArray,o=n.BufferedBlockAlgorithm,s=t.enc;s.Utf8;var a=s.Base64,u=t.algo.EvpKDF,c=n.Cipher=o.extend({cfg:r.extend(),createEncryptor:function(e,t){return this.create(this._ENC_XFORM_MODE,e,t)},createDecryptor:function(e,t){return this.create(this._DEC_XFORM_MODE,e,t)},init:function(e,t,n){this.cfg=this.cfg.extend(n),this._xformMode=e,this._key=t,this.reset()},reset:function(){o.reset.call(this),this._doReset()},process:function(e){return this._append(e),this._process()},finalize:function(e){return e&&this._append(e),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function e(e){return"string"==typeof e?m:y}return function(t){return{encrypt:function(n,r,i){return e(r).encrypt(t,n,r,i)},decrypt:function(n,r,i){return e(r).decrypt(t,n,r,i)}}}}()});n.StreamCipher=c.extend({_doFinalize:function(){return this._process(!0)},blockSize:1});var l=t.mode={},f=n.BlockCipherMode=r.extend({createEncryptor:function(e,t){return this.Encryptor.create(e,t)},createDecryptor:function(e,t){return this.Decryptor.create(e,t)},init:function(e,t){this._cipher=e,this._iv=t}}),h=l.CBC=function(){var t=f.extend();function n(t,n,r){var i,o=this._iv;o?(i=o,this._iv=e):i=this._prevBlock;for(var s=0;s<r;s++)t[n+s]^=i[s]}return t.Encryptor=t.extend({processBlock:function(e,t){var r=this._cipher,i=r.blockSize;n.call(this,e,t,i),r.encryptBlock(e,t),this._prevBlock=e.slice(t,t+i)}}),t.Decryptor=t.extend({processBlock:function(e,t){var r=this._cipher,i=r.blockSize,o=e.slice(t,t+i);r.decryptBlock(e,t),n.call(this,e,t,i),this._prevBlock=o}}),t}(),d=(t.pad={}).Pkcs7={pad:function(e,t){for(var n=4*t,r=n-e.sigBytes%n,o=r<<24|r<<16|r<<8|r,s=[],a=0;a<r;a+=4)s.push(o);var u=i.create(s,r);e.concat(u)},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}};n.BlockCipher=c.extend({cfg:c.cfg.extend({mode:h,padding:d}),reset:function(){var e;c.reset.call(this);var t=this.cfg,n=t.iv,r=t.mode;this._xformMode==this._ENC_XFORM_MODE?e=r.createEncryptor:(e=r.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==e?this._mode.init(this,n&&n.words):(this._mode=e.call(r,this,n&&n.words),this._mode.__creator=e)},_doProcessBlock:function(e,t){this._mode.processBlock(e,t)},_doFinalize:function(){var e,t=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(t.pad(this._data,this.blockSize),e=this._process(!0)):(e=this._process(!0),t.unpad(e)),e},blockSize:4});var p=n.CipherParams=r.extend({init:function(e){this.mixIn(e)},toString:function(e){return(e||this.formatter).stringify(this)}}),g=(t.format={}).OpenSSL={stringify:function(e){var t=e.ciphertext,n=e.salt;return(n?i.create([1398893684,1701076831]).concat(n).concat(t):t).toString(a)},parse:function(e){var t,n=a.parse(e),r=n.words;return 1398893684==r[0]&&1701076831==r[1]&&(t=i.create(r.slice(2,4)),r.splice(0,4),n.sigBytes-=16),p.create({ciphertext:n,salt:t})}},y=n.SerializableCipher=r.extend({cfg:r.extend({format:g}),encrypt:function(e,t,n,r){r=this.cfg.extend(r);var i=e.createEncryptor(n,r),o=i.finalize(t),s=i.cfg;return p.create({ciphertext:o,key:n,iv:s.iv,algorithm:e,mode:s.mode,padding:s.padding,blockSize:e.blockSize,formatter:r.format})},decrypt:function(e,t,n,r){return r=this.cfg.extend(r),t=this._parse(t,r.format),e.createDecryptor(n,r).finalize(t.ciphertext)},_parse:function(e,t){return"string"==typeof e?t.parse(e,this):e}}),v=(t.kdf={}).OpenSSL={execute:function(e,t,n,r,o){if(r||(r=i.random(8)),o)s=u.create({keySize:t+n,hasher:o}).compute(e,r);else var s=u.create({keySize:t+n}).compute(e,r);var a=i.create(s.words.slice(t),4*n);return s.sigBytes=4*t,p.create({key:s,iv:a,salt:r})}},m=n.PasswordBasedCipher=y.extend({cfg:y.cfg.extend({kdf:v}),encrypt:function(e,t,n,r){var i=(r=this.cfg.extend(r)).kdf.execute(n,e.keySize,e.ivSize,r.salt,r.hasher);r.iv=i.iv;var o=y.encrypt.call(this,e,t,i.key,r);return o.mixIn(i),o},decrypt:function(e,t,n,r){r=this.cfg.extend(r),t=this._parse(t,r.format);var i=r.kdf.execute(n,e.keySize,e.ivSize,t.salt,r.hasher);return r.iv=i.iv,y.decrypt.call(this,e,t,i.key,r)}})}()))));var hr=p(zn.exports),dr={exports:{}};dr.exports=function(e){return e.enc.Utf8}(Wn());var pr=p(dr.exports),gr=function(e){return null!=e&&"object"===f(e)&&!1===Array.isArray(e)},yr=function(e,t,n){if(gr(n)||(n={default:n}),!Ar(e))return void 0!==n.default?n.default:e;"number"==typeof t&&(t=String(t));var r=Array.isArray(t),i="string"==typeof t,o=n.separator||".",s=n.joinChar||("string"==typeof o?o:".");if(!i&&!r)return e;if(i&&t in e)return mr(t,e,n)?e[t]:n.default;var a=r?t:function(e,t,n){if("function"==typeof n.split)return n.split(e);return e.split(t)}(t,o,n),u=a.length,c=0;do{var l=a[c];for("number"==typeof l&&(l=String(l));l&&"\\"===l.slice(-1);)l=vr([l.slice(0,-1),a[++c]||""],s,n);if(l in e){if(!mr(l,e,n))return n.default;e=e[l]}else{for(var f=!1,h=c+1;h<u;)if(f=(l=vr([l,a[h++]],s,n))in e){if(!mr(l,e,n))return n.default;e=e[l],c=h-1;break}if(!f)return n.default}}while(++c<u&&Ar(e));return c===u?e:n.default};function vr(e,t,n){return"function"==typeof n.join?n.join(e):e[0]+t+e[1]}function mr(e,t,n){return"function"!=typeof n.isValid||n.isValid(e,t)}function Ar(e){return gr(e)||Array.isArray(e)||"function"==typeof e}var Ir,br,kr=p(yr),Er={exports:{}};function Cr(){if(br)return Ir;br=1;var e=1e3,t=60*e,n=60*t,r=24*n,i=7*r,o=365.25*r;function s(e,t,n,r){var i=t>=1.5*n;return Math.round(e/n)+" "+r+(i?"s":"")}return Ir=function(a,u){u=u||{};var c=f(a);if("string"===c&&a.length>0)return function(s){if((s=String(s)).length>100)return;var a=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(s);if(!a)return;var u=parseFloat(a[1]);switch((a[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return u*o;case"weeks":case"week":case"w":return u*i;case"days":case"day":case"d":return u*r;case"hours":case"hour":case"hrs":case"hr":case"h":return u*n;case"minutes":case"minute":case"mins":case"min":case"m":return u*t;case"seconds":case"second":case"secs":case"sec":case"s":return u*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return u;default:return}}(a);if("number"===c&&isFinite(a))return u.long?function(i){var o=Math.abs(i);if(o>=r)return s(i,o,r,"day");if(o>=n)return s(i,o,n,"hour");if(o>=t)return s(i,o,t,"minute");if(o>=e)return s(i,o,e,"second");return i+" ms"}(a):function(i){var o=Math.abs(i);if(o>=r)return Math.round(i/r)+"d";if(o>=n)return Math.round(i/n)+"h";if(o>=t)return Math.round(i/t)+"m";if(o>=e)return Math.round(i/e)+"s";return i+"ms"}(a);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(a))},Ir}var Sr=function(e){function t(e){var r,i,o,s=null;function a(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];if(a.enabled){var o=a,s=Number(new Date),u=s-(r||s);o.diff=u,o.prev=r,o.curr=s,r=s,n[0]=t.coerce(n[0]),"string"!=typeof n[0]&&n.unshift("%O");var c=0;n[0]=n[0].replace(/%([a-zA-Z%])/g,(function(e,r){if("%%"===e)return"%";c++;var i=t.formatters[r];if("function"==typeof i){var s=n[c];e=i.call(o,s),n.splice(c,1),c--}return e})),t.formatArgs.call(o,n),(o.log||t.log).apply(o,n)}}return a.namespace=e,a.useColors=t.useColors(),a.color=t.selectColor(e),a.extend=n,a.destroy=t.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:function(){return null!==s?s:(i!==t.namespaces&&(i=t.namespaces,o=t.enabled(e)),o)},set:function(e){s=e}}),"function"==typeof t.init&&t.init(a),a}function n(e,n){var r=t(this.namespace+(void 0===n?":":n)+e);return r.log=this.log,r}function r(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){var e=[].concat(c(t.names.map(r)),c(t.skips.map(r).map((function(e){return"-"+e})))).join(",");return t.enable(""),e},t.enable=function(e){var n;t.save(e),t.namespaces=e,t.names=[],t.skips=[];var r=("string"==typeof e?e:"").split(/[\s,]+/),i=r.length;for(n=0;n<i;n++)r[n]&&("-"===(e=r[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.slice(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;var n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=Cr(),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((function(n){t[n]=e[n]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){for(var n=0,r=0;r<e.length;r++)n=(n<<5)-n+e.charCodeAt(r),n|=0;return t.colors[Math.abs(n)%t.colors.length]},t.enable(t.load()),t};!function(e,t){var n;t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;var n="color: "+this.color;t.splice(1,0,n,"color: inherit");var r=0,i=0;t[0].replace(/%[a-zA-Z%]/g,(function(e){"%%"!==e&&(r++,"%c"===e&&(i=r))})),t.splice(i,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){var e;try{e=t.storage.getItem("debug")}catch(e){}!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG);return e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(n=!1,function(){n||(n=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||function(){},e.exports=Sr(t),e.exports.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}(Er,Er.exports);var Or=Er.exports,wr=Or("cookie");function Tr(){var e;try{e=document.cookie}catch(e){return"undefined"!=typeof console&&"function"==typeof console.error&&console.error(e.stack||e),{}}return function(e){var t,n={},r=e.split(/ *; */);if(""==r[0])return n;for(var i=0;i<r.length;++i)n[Rr((t=r[i].split("="))[0])]=Rr(t[1]);return n}(e)}function _r(e){try{return encodeURIComponent(e)}catch(t){wr("error `encode(%o)` - %o",e,t)}}function Rr(e){try{return decodeURIComponent(e)}catch(t){wr("error `decode(%o)` - %o",e,t)}}var Pr=p((function(e,t,n){switch(arguments.length){case 3:case 2:return function(e,t,n){n=n||{};var r=_r(e)+"="+_r(t);null==t&&(n.maxage=-1);n.maxage&&(n.expires=new Date(+new Date+n.maxage));n.path&&(r+="; path="+n.path);n.domain&&(r+="; domain="+n.domain);n.expires&&(r+="; expires="+n.expires.toUTCString());n.samesite&&(r+="; samesite="+n.samesite);n.secure&&(r+="; secure");document.cookie=r}(e,t,n);case 1:return function(e){return Tr()[e]}(e);default:return Tr()}})),xr={exports:{}},Dr=Math.max,Lr=function(e,t){var n=t?t.length:0;if(!n)return[];for(var r=Dr(Number(e)||0,0),i=Dr(n-r,0),o=new Array(i),s=0;s<i;s+=1)o[s]=t[s+r];return o},Mr=Math.max,Br=function(e){if(null==e||!e.length)return[];for(var t=new Array(Mr(e.length-2,0)),n=1;n<e.length;n+=1)t[n-1]=e[n];return t},Nr=Lr,Gr=Br,Fr=Object.prototype.hasOwnProperty,Ur=Object.prototype.toString,jr=function(e){return Boolean(e)&&"[object Object]"===Ur.call(e)},Kr=function(e,t,n,r){return Fr.call(t,r)&&void 0===e[r]&&(e[r]=n),t},Qr=function(e,t,n,r){return Fr.call(t,r)&&(jr(e[r])&&jr(n)?e[r]=Hr(e[r],n):void 0===e[r]&&(e[r]=n)),t},zr=function(e,t){if(n=t,!Boolean(n)||"object"!==f(n))return t;var n;e=e||Kr;for(var r=Nr(2,arguments),i=0;i<r.length;i+=1)for(var o in r[i])e(t,r[i],r[i][o],o);return t},Hr=function(e){return zr.apply(null,[Qr,e].concat(Gr(arguments)))};xr.exports=function(e){return zr.apply(null,[null,e].concat(Gr(arguments)))},xr.exports.deep=Hr;var Vr=p(xr.exports),qr={exports:{}},Wr=Or("cookie"),Yr=function(e,t,n){switch(arguments.length){case 3:case 2:return function(e,t,n){n=n||{};var r=Jr(e)+"="+Jr(t);null==t&&(n.maxage=-1);n.maxage&&(n.expires=new Date(+new Date+n.maxage));n.path&&(r+="; path="+n.path);n.domain&&(r+="; domain="+n.domain);n.expires&&(r+="; expires="+n.expires.toUTCString());n.secure&&(r+="; secure");document.cookie=r}(e,t,n);case 1:return function(e){return Xr()[e]}(e);default:return Xr()}};function Xr(){var e;try{e=document.cookie}catch(e){return"undefined"!=typeof console&&"function"==typeof console.error&&console.error(e.stack||e),{}}return function(e){var t,n={},r=e.split(/ *; */);if(""==r[0])return n;for(var i=0;i<r.length;++i)n[$r((t=r[i].split("="))[0])]=$r(t[1]);return n}(e)}function Jr(e){try{return encodeURIComponent(e)}catch(t){Wr("error `encode(%o)` - %o",e,t)}}function $r(e){try{return decodeURIComponent(e)}catch(t){Wr("error `decode(%o)` - %o",e,t)}}!function(e,t){var n=Yr;function r(e){for(var n=t.cookie,r=t.levels(e),i=0;i<r.length;++i){var o="__tld__",s=r[i],a={domain:"."+s};if(n(o,1,a),n(o))return n(o,null,a),s}return""}r.levels=function(e){var t,n,r=("function"!=typeof window.URL?(t=e,(n=document.createElement("a")).href=t,n.hostname):new URL(e).hostname).split("."),i=r[r.length-1],o=[];if(4===r.length&&i===parseInt(i,10))return o;if(r.length<=1)return o;for(var s=r.length-2;s>=0;--s)o.push(r.slice(s).join("."));return o},r.cookie=n,t=e.exports=r}(qr,qr.exports);var Zr=p(qr.exports),ei=new(function(){return n((function e(n){t(this,e),this.cOpts={},this.options(n),this.isSupportAvailable=this.checkSupportAvailability()}),[{key:"options",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(0===arguments.length)return this.cOpts;var t=".".concat(Zr(window.location.href));return"."===t&&(t=null),this.cOpts=Vr(e,{maxage:31536e6,path:"/",domain:t,samesite:"Lax"}),e.sameDomainCookiesOnly&&delete this.cOpts.domain,this.cOpts}},{key:"set",value:function(e,t){try{return Pr(e,t,w(this.cOpts)),!0}catch(e){return Dn.error(e),!1}}},{key:"get",value:function(e){return Pr(e)}},{key:"remove",value:function(e){try{return Pr(e,null,w(this.cOpts)),!0}catch(e){return!1}}},{key:"checkSupportAvailability",value:function(){var e="test_rudder_cookie";return this.set(e,!0),!!this.get(e)&&(this.remove(e),!0)}}])}())({}),ti={exports:{}};ti.exports=function(){function e(e){return e=JSON.stringify(e),!!/^\{[\s\S]*\}$/.test(e)}function t(e){return void 0===e||"function"==typeof e?e+"":JSON.stringify(e)}function n(e){if("string"==typeof e)try{return JSON.parse(e)}catch(t){return e}}function r(e){return"[object Function]"==={}.toString.call(e)}function i(e){return"[object Array]"===Object.prototype.toString.call(e)}function o(e){var t="_Is_Incognit",n="yes";try{e||(e=window.localStorage),e.setItem(t,n),e.removeItem(t)}catch(t){var r={_data:{},setItem:function(e,t){return r._data[e]=String(t)},getItem:function(e){return r._data.hasOwnProperty(e)?r._data[e]:void 0},removeItem:function(e){return delete r._data[e]},clear:function(){return r._data={}}};e=r}finally{e.getItem(t)===n&&e.removeItem(t)}return e}var s=o();function a(){if(!(this instanceof a))return new a}a.prototype={set:function(n,r){if(n&&!e(n))s.setItem(n,t(r));else if(e(n))for(var i in n)this.set(i,n[i]);return this},get:function(e){if(void 0===e){var t={};return this.forEach((function(e,n){return t[e]=n})),t}if("?"===e.charAt(0))return this.has(e.substr(1));var r=arguments;if(r.length>1){for(var i={},o=0,a=r.length;o<a;o++){var u=n(s.getItem(r[o]));this.has(r[o])&&(i[r[o]]=u)}return i}return n(s.getItem(e))},clear:function(){return s.clear(),this},remove:function(e){var t=this.get(e);return s.removeItem(e),t},has:function(e){return{}.hasOwnProperty.call(this.get(),e)},keys:function(){var e=[];return this.forEach((function(t){e.push(t)})),e},forEach:function(e){for(var t=0,n=s.length;t<n;t++){var r=s.key(t);e(r,this.get(r))}return this},search:function(e){for(var t=this.keys(),n={},r=0,i=t.length;r<i;r++)t[r].indexOf(e)>-1&&(n[t[r]]=this.get(t[r]));return n},len:function(){return s.length}};var u=null;function c(t,n){var o=arguments,s=null;if(u||(u=a()),0===o.length)return u.get();if(1===o.length){if("string"==typeof t)return u.get(t);if(e(t))return u.set(t)}if(2===o.length&&"string"==typeof t){if(!n)return u.remove(t);if(n&&"string"==typeof n)return u.set(t,n);n&&r(n)&&(s=null,s=n(t,u.get(t)),c.set(t,s))}if(2===o.length&&i(t)&&r(n))for(var l=0,f=t.length;l<f;l++)s=n(t[l],u.get(t[l])),c.set(t[l],s);return c}for(var l in a.prototype)c[l]=a.prototype[l];return c}();var ni=p(ti.exports),ri=new(function(){return n((function e(n){t(this,e),this.sOpts={},this.enabled=this.checkSupportAvailability(),this.options(n)}),[{key:"options",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return 0===arguments.length||(Vr(e,{enabled:!0}),this.enabled=e.enabled&&this.enabled,this.sOpts=e),this.sOpts}},{key:"set",value:function(e,t){return ni.set(e,t)}},{key:"get",value:function(e){return ni.get(e)}},{key:"remove",value:function(e){return ni.remove(e)}},{key:"checkSupportAvailability",value:function(){try{var e="test_rudder_ls";return this.set(e,!0),!!this.get(e)&&(this.remove(e),!0)}catch(e){return!1}}}])}())({}),ii=function(e){return(new TextDecoder).decode((t=e,n=globalThis.atob(t).split("").map((function(e){return e.charCodeAt(0)})),new Uint8Array(n)));var t,n},oi="rl_user_id",si="rl_trait",ai="rl_anonymous_id",ui="rl_group_id",ci="rl_group_trait",li="rl_page_init_referrer",fi="rl_page_init_referring_domain",hi="rl_session",di="rl_auth_token",pi="RudderEncrypt:",gi="RS_ENC_v3_",yi="Rudder",vi={segment:"ajs_anonymous_id"};function mi(e){try{return e?JSON.parse(e):null}catch(t){return Dn.error(t),e||null}}function Ai(e){return e.replace(/^\s+|\s+$/gm,"")}function Ii(e){return e&&"string"==typeof e&&""!==Ai(e)?e.substring(0,pi.length)===pi?hr.decrypt(e.substring(pi.length),yi).toString(pr):e.substring(0,gi.length)===gi?ii(e.substring(gi.length)):e:e}for(var bi,ki=function(){return n((function e(){t(this,e),ei.isSupportAvailable?this.storage=ei:(ri.enabled&&(this.storage=ri),this.storage||Dn.error("No storage is available :: initializing the SDK without storage"))}),[{key:"options",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.storage.options(e)}},{key:"setItem",value:function(e,t){var n=jn(t);null!==n&&this.storage.set(e,function(e){return""===Ai(e)?e:"".concat(pi).concat(hr.encrypt(e,yi).toString())}(n))}},{key:"setStringItem",value:function(e,t){"string"==typeof t?this.setItem(e,t):Dn.error("[Storage] ".concat(e," should be string"))}},{key:"setUserId",value:function(e){this.setStringItem(oi,e)}},{key:"setUserTraits",value:function(e){this.setItem(si,e)}},{key:"setGroupId",value:function(e){this.setStringItem(ui,e)}},{key:"setGroupTraits",value:function(e){this.setItem(ci,e)}},{key:"setAnonymousId",value:function(e){this.setStringItem(ai,e)}},{key:"setInitialReferrer",value:function(e){this.setItem(li,e)}},{key:"setInitialReferringDomain",value:function(e){this.setItem(fi,e)}},{key:"setSessionInfo",value:function(e){this.setItem(hi,e)}},{key:"setAuthToken",value:function(e){this.setItem(di,e)}},{key:"getItem",value:function(e){return mi(Ii(this.storage.get(e)))}},{key:"getUserId",value:function(){return this.getItem(oi)}},{key:"getUserTraits",value:function(){return this.getItem(si)}},{key:"getGroupId",value:function(){return this.getItem(ui)}},{key:"getGroupTraits",value:function(){return this.getItem(ci)}},{key:"fetchExternalAnonymousId",value:function(e){var t,n=e.toLowerCase();return Object.keys(vi).includes(n)&&"segment"===n?(ri.enabled&&(t=ri.get(vi[n])),!t&&ei.isSupportAvailable&&(t=ei.get(vi[n])),t):t}},{key:"getAnonymousId",value:function(e){var t=mi(Ii(this.storage.get(ai)));if(t)return t;var n=kr(e,"autoCapture.source");if(!0===kr(e,"autoCapture.enabled")&&"string"==typeof n){var r=this.fetchExternalAnonymousId(n);if(r)return r}return t}},{key:"getInitialReferrer",value:function(){return this.getItem(li)}},{key:"getInitialReferringDomain",value:function(){return this.getItem(fi)}},{key:"getSessionInfo",value:function(){return this.getItem(hi)}},{key:"getAuthToken",value:function(){return this.getItem(di)}},{key:"removeItem",value:function(e){return this.storage.remove(e)}},{key:"removeSessionInfo",value:function(){this.removeItem(hi)}},{key:"clear",value:function(e){this.storage.remove(oi),this.storage.remove(si),this.storage.remove(ui),this.storage.remove(ci),this.storage.remove(di),e&&this.storage.remove(ai)}}])}(),Ei=new ki,Ci=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};try{if(document.getElementById(e))return;var r=document.createElement("script");r.src=t,r.async=void 0===n.async||n.async,r.type="text/javascript",r.id=e,!0!==n.skipDatasetAttributes&&(r.setAttribute("data-loader",Bn),void 0!==n.isNonNativeSDK&&r.setAttribute("data-isNonNativeSDK",n.isNonNativeSDK));var i=document.getElementsByTagName("head");if(i.length>0)i[0].insertBefore(r,i[0].firstChild);else{var o=document.getElementsByTagName("script")[0];o.parentNode.insertBefore(r,o)}}catch(o){Qn(o)}},Si=function(e){return null===e},Oi=function(e,t){if(!Array.isArray(e)||!Array.isArray(t))return w(t);var n=w(e);return t.forEach((function(e,t){n[t]=Array.isArray(e)||function(e){return!Si(e)&&"object"===f(e)&&!Array.isArray(e)}(e)?wi(n[t],e):e})),n},wi=function(e,t){return R(Oi,e,t)},Ti=function(e){return function(e){return!Si(e)&&"[object Object]"===Object.prototype.toString.call(e)}(e)&&Object.keys(e).length>0},_i=256,Ri=[];_i--;)Ri[_i]=(_i+256).toString(16).substring(1);for(var Pi,xi=4096,Di=[],Li=0;Li<256;Li++)Di[Li]=(Li+256).toString(16).substring(1);function Mi(){var e;(!Pi||Li+16>xi)&&(e=xi,Pi=crypto.getRandomValues(new Uint8Array(e)),Li=0);for(var t,n=0,r="";n<16;n++)t=Pi[Li+n],r+=6==n?Di[15&t|64]:8==n?Di[63&t|128]:Di[t],1&n&&n>1&&n<11&&(r+="-");return Li+=16,r}var Bi={All:"All",GA:"Google Analytics",GOOGLEADS:"Google Ads",BRAZE:"Braze",CHARTBEAT:"Chartbeat",COMSCORE:"Comscore",CUSTOMERIO:"Customer IO",DCM_Floodlight:"DCM Floodlight",FACEBOOK_PIXEL:"Facebook Pixel",GTM:"Google Tag Manager",HOTJAR:"Hotjar",HS:"HubSpot",INTERCOM:"Intercom",KEEN:"Keen",KISSMETRICS:"Kiss Metrics",LOTAME:"Lotame",VWO:"VWO",OPTIMIZELY:"Optimizely Web",FULLSTORY:"Fullstory",TVSQUARED:"TVSquared",GA4:"Google Analytics 4 (GA4)",GA4_V2:"Google Analytics 4 (GA4) V2",MOENGAGE:"MoEngage",AM:"Amplitude",PENDO:"Pendo",LYTICS:"Lytics",APPCUES:"Appcues",POSTHOG:"PostHog",PROFITWELL:"ProfitWell",KLAVIYO:"Klaviyo",CLEVERTAP:"CleverTap",BINGADS:"Bing Ads",PINTEREST_TAG:"Pinterest Tag",SNAP_PIXEL:"Snap Pixel",LINKEDIN_INSIGHT_TAG:"Linkedin Insight Tag",REDDIT_PIXEL:"Reddit Pixel",DRIP:"Drip",HEAP:"Heap.io",CRITEO:"Criteo",MP:"Mixpanel",QUALTRICS:"Qualtrics",SENTRY:"Sentry",GOOGLE_OPTIMIZE:"Google Optimize",POST_AFFILIATE_PRO:"Post Affiliate Pro",LAUNCHDARKLY:"LaunchDarkly",GA360:"Google Analytics 360",ADROLL:"Adroll",VERO:"Vero",MATOMO:"Matomo",MOUSEFLOW:"Mouseflow",ROCKERBOX:"Rockerbox",CONVERTFLOW:"ConvertFlow",SNAPENGAGE:"SnapEngage",LIVECHAT:"LiveChat",SHYNET:"Shynet",WOOPRA:"Woopra",ROLLBAR:"RollBar",QUORA_PIXEL:"Quora Pixel",JUNE:"June",ENGAGE:"Engage",ITERABLE:"Iterable",YANDEX_METRICA:"Yandex.Metrica",REFINER:"Refiner",QUALAROO:"Qualaroo",PODSIGHTS:"Podsights",AXEPTIO:"Axeptio",SATISMETER:"Satismeter",MICROSOFT_CLARITY:"Microsoft Clarity",SENDINBLUE:"Sendinblue",OLARK:"Olark",LEMNISK:"Lemnisk",TIKTOK_ADS:"TikTok Ads",ACTIVE_CAMPAIGN:"ActiveCampaign",SPRIG:"Sprig",SPOTIFYPIXEL:"Spotify Pixel",COMMANDBAR:"CommandBar",NINETAILED:"Ninetailed"},Ni=["anonymous_id","id","sent_at","received_at","timestamp","original_timestamp","event_text","event"],Gi="https://api.rudderstack.com/sourceConfig/?p=npm&v=2.48.14",Fi="v1.1",Ui="js-integrations",ji="".concat("https://cdn.rudderlabs.com","/").concat(Fi,"/").concat(Ui),Ki="https://polyfill-fastly.io/v3/polyfill.min.js?version=3.111.0&features=Number.isNaN%2CURL%2CArray.prototype.find%2CArray.prototype.includes%2CPromise%2CString.prototype.endsWith%2CString.prototype.includes%2CString.prototype.startsWith%2CObject.entries%2CObject.values%2CElement.prototype.dataset%2CString.prototype.replaceAll%2CTextEncoder%2Cnavigator.sendBeacon",Qi=["Lax","None","Strict"],zi=["US","EU"],Hi=["oneTrust","ketch"],Vi=["library","consentManagement"],qi=["none","default","full"],Wi={All:!0};function Yi(e){return e&&e.endsWith("/")?e.replace(/\/+$/,""):e}function Xi(){return window.crypto&&"function"==typeof window.crypto.getRandomValues?Mi():function(){var e,t=0,n="";if(!bi||_i+16>256){for(bi=Array(t=256);t--;)bi[t]=256*Math.random()|0;t=_i=0}for(;t<16;t++)e=bi[_i+t],n+=6==t?Ri[15&e|64]:8==t?Ri[63&e|128]:Ri[e],1&t&&t>1&&t<11&&(n+="-");return _i++,n}()}function Ji(){return(new Date).toISOString()}function $i(e,t){Object.keys(e).forEach((function(n){e.hasOwnProperty(n)&&(t[n]&&(e[t[n]]=e[n]),"All"!==n&&void 0!==t[n]&&t[n]!==n&&delete e[n])}))}function Zi(e){$i(e,Pn)}function eo(e){$i(e,Bi)}function to(e,t){var n=[];if(!t||0===t.length)return n;var r=!0;void 0!==e.All&&(r=e.All);var i=[];return"string"==typeof t[0]?t.forEach((function(e){i.push({intgName:e,intObj:e})})):"object"===f(t[0])&&t.forEach((function(e){i.push({intgName:e.name,intObj:e})})),i.forEach((function(t){var i=t.intgName,o=t.intObj;if(r){var s=!0;void 0!==e[i]&&!1===Boolean(e[i])&&(s=!1),s&&n.push(o)}else void 0!==e[i]&&!0===Boolean(e[i])&&n.push(o)})),n}var no=function(e){return"string"==typeof e||null==e?e:jn(e)},ro=function(e){return"string"==typeof e&&e.trim().length>0},io=function(e,t,n){try{var r=e.source.dataplanes||{};if(Object.keys(r).length>0){var i=function(e){var t=e?e.residencyServer:void 0;if(t)return"string"==typeof t&&zi.includes(t.toUpperCase())?t.toUpperCase():void Dn.error("Invalid residencyServer input")}(n),o=r[i]||r.US;if(o){var s=function(e){if(Array.isArray(e)&&e.length>0){var t=e.find((function(e){return!0===e.default}));if(t&&ro(t.url))return t.url}}(o);if(s)return s}}if(ro(t))return t;throw Error("Unable to load the SDK due to invalid data plane url")}catch(e){throw Error(e)}};function oo(){var e;return(null===(e=document)||void 0===e?void 0:e.referrer)||"$direct"}function so(e){var t=e.split("/");return t.length>=3?t[2]:""}function ao(){for(var e=document.getElementsByTagName("link"),t=0;e[t];t+=1){var n=e[t];if("canonical"===n.getAttribute("rel"))return n.getAttribute("href")}}function uo(){var e=ao(),t=window.location.pathname;if(e)try{t=new URL(e).pathname}catch(e){}var n=window.location,r=n.search,i=n.href,o=document.title,s=function(e){var t,n=ao(),r=(t=n?n.includes("?")?n:n+e:window.location.href).indexOf("#");return r>-1?t.slice(0,r):t}(r),a=i,u=oo();return{path:t,referrer:u,referring_domain:so(u),search:r,title:o,url:s,tab_url:a,initial_referrer:Ei.getInitialReferrer()||"",initial_referring_domain:Ei.getInitialReferringDomain()||""}}for(var co,lo=n((function e(){t(this,e),this.name="RudderLabs JavaScript SDK",this.namespace="com.rudderlabs.javascript",this.version="2.48.14"})),fo=n((function e(){t(this,e),this.name="RudderLabs JavaScript SDK",this.version="2.48.14"})),ho=n((function e(){t(this,e),this.name="",this.version=""})),po=n((function e(){t(this,e),this.density=0,this.width=0,this.height=0,this.innerWidth=0,this.innerHeight=0})),go=n((function e(){var n,r;t(this,e),this.app=new lo,this.traits=null,this.library=new fo,this.userAgent=function(){if("undefined"==typeof navigator)return null;var e=navigator.userAgent,t=navigator.brave;if(t&&Object.getPrototypeOf(t).isBrave){var n=e.match(/(chrome)\/([\w.]+)/i);n&&(e="".concat(e," Brave/").concat(n[2]))}return e}(),this.device=null,this.network=null,this.os=new ho,this.locale="undefined"==typeof navigator?null:navigator.language||navigator.browserLanguage,this.screen=(n=new po,"undefined"==typeof window||(n.width=window.screen.width,n.height=window.screen.height,n.density=window.devicePixelRatio,n.innerWidth=window.innerWidth,n.innerHeight=window.innerHeight),n),this.timezone=(r=(new Date).toString().match(/([A-Z]+[+-]\d+)/))&&r[1]?r[1]:"NA"})),yo=function(){return n((function e(){t(this,e),this.channel="web",this.context=new go,this.type=null,this.messageId=Xi(),this.originalTimestamp=(new Date).toISOString(),this.anonymousId=null,this.userId=null,this.event=null,this.properties={}}),[{key:"getProperty",value:function(e){return this.properties[e]}},{key:"addProperty",value:function(e,t){this.properties[e]=t}}])}(),vo=function(){return n((function e(){t(this,e),this.message=new yo}),[{key:"setType",value:function(e){this.message.type=e}},{key:"setProperty",value:function(e){this.message.properties=e}},{key:"setUserProperty",value:function(e){this.message.user_properties=e}},{key:"setUserId",value:function(e){this.message.userId=e}},{key:"setEventName",value:function(e){this.message.event=e}},{key:"getElementContent",value:function(){return this.message}}])}(),mo=function(){return n((function e(){t(this,e),this.rudderProperty=null,this.rudderUserProperty=null,this.event=null,this.userId=null,this.type=null}),[{key:"setType",value:function(e){return this.type=e,this}},{key:"build",value:function(){var e=new vo;return e.setUserId(this.userId),e.setType(this.type),e.setEventName(this.event),e.setProperty(this.rudderProperty),e.setUserProperty(this.rudderUserProperty),e}}])}(),Ao={},Io=256,bo=[];Io--;)bo[Io]=(Io+256).toString(16).substring(1);Ao.v4=function(){var e,t=0,n="";if(!co||Io+16>256){for(co=Array(t=256);t--;)co[t]=256*Math.random()|0;t=Io=0}for(;t<16;t++)e=co[Io+t],n+=6==t?bo[15&e|64]:8==t?bo[63&e|128]:bo[e],1&t&&t>1&&t<11&&(n+="-");return Io++,n};var ko={},Eo=Object.prototype.hasOwnProperty,Co=String.prototype.charAt,So=Object.prototype.toString,Oo=function(e,t){return Co.call(e,t)},wo=function(e,t){return Eo.call(e,t)},To=function(e,t){t=t||wo;for(var n=[],r=0,i=e.length;r<i;r+=1)t(e,r)&&n.push(String(r));return n},_o=function(e){return null==e?[]:(t=e,"[object String]"===So.call(t)?To(e,Oo):function(e){return null!=e&&"function"!=typeof e&&"number"==typeof e.length}(e)?To(e,wo):function(e,t){t=t||wo;var n=[];for(var r in e)t(e,r)&&n.push(String(r));return n}(e));var t},Ro=_o,Po=Ao.v4,xo={_data:{},length:0,setItem:function(e,t){return this._data[e]=t,this.length=Ro(this._data).length,t},getItem:function(e){return e in this._data?this._data[e]:null},removeItem:function(e){return e in this._data&&delete this._data[e],this.length=Ro(this._data).length,null},clear:function(){this._data={},this.length=0},key:function(e){return Ro(this._data)[e]}};ko.defaultEngine=function(){try{if(!window.localStorage)return!1;var e=Po();window.localStorage.setItem(e,"test_value");var t=window.localStorage.getItem(e);return window.localStorage.removeItem(e),"test_value"===t}catch(e){return!1}}()?window.localStorage:xo,ko.inMemoryEngine=xo;var Do=_o,Lo=Object.prototype.toString,Mo="function"==typeof Array.isArray?Array.isArray:function(e){return"[object Array]"===Lo.call(e)},Bo=function(e){return null!=e&&(Mo(e)||"function"!==e&&function(e){var t=f(e);return"number"===t||"object"===t&&"[object Number]"===Lo.call(e)}(e.length))},No=function(e,t){for(var n=0;n<t.length&&!1!==e(t[n],n,t);n+=1);},Go=function(e,t){for(var n=Do(t),r=0;r<n.length&&!1!==e(t[n[r]],n[r],t);r+=1);},Fo=function(e,t){return(Bo(t)?No:Go).call(this,e,t)},Uo=ko.defaultEngine,jo=ko.inMemoryEngine,Ko=Fo,Qo=_o,zo=JSON;function Ho(e){try{return JSON.stringify(e,(t=[],function(e,n){if("object"!==f(n)||null===n)return n;for(;t.length>0&&t[t.length-1]!==this;)t.pop();return t.includes(n)?"[Circular Reference]":(t.push(n),n)}))}catch(e){return null}var t}function Vo(e,t,n,r){this.id=t,this.name=e,this.keys=n||{},this.engine=r||Uo,this.originalEngine=this.engine}Vo.prototype.set=function(e,t){var n=this._createValidKey(e);if(n)try{this.engine.setItem(n,Ho(t))}catch(n){(function(e){var t=!1;if(e.code)switch(e.code){case 22:t=!0;break;case 1014:"NS_ERROR_DOM_QUOTA_REACHED"===e.name&&(t=!0)}else-2147024882===e.number&&(t=!0);return t})(n)&&(this._swapEngine(),this.set(e,t))}},Vo.prototype.get=function(e){try{var t=this.engine.getItem(this._createValidKey(e));return null===t?null:zo.parse(t)}catch(e){return null}},Vo.prototype.getOriginalEngine=function(){return this.originalEngine},Vo.prototype.remove=function(e){this.engine.removeItem(this._createValidKey(e))},Vo.prototype._createValidKey=function(e){var t,n=this.name,r=this.id;return Qo(this.keys).length?(Ko((function(i){i===e&&(t=[n,r,e].join("."))}),this.keys),t):[n,r,e].join(".")},Vo.prototype._swapEngine=function(){var e=this;Ko((function(t){var n=e.get(t);jo.setItem([e.name,e.id,t].join("."),n),e.remove(t)}),this.keys),this.engine=jo};var qo=Vo;var Wo=Fo,Yo={setTimeout:function(e,t){return window.setTimeout(e,t)},clearTimeout:function(e){return window.clearTimeout(e)},Date:window.Date},Xo=Yo,Jo={ASAP:1,RESCHEDULE:2,ABANDON:3};function $o(){this.tasks={},this.nextId=1}$o.prototype.now=function(){return+new Xo.Date},$o.prototype.run=function(e,t,n){var r=this.nextId++;return this.tasks[r]=Xo.setTimeout(this._handle(r,e,t,n||Jo.ASAP),t),r},$o.prototype.cancel=function(e){this.tasks[e]&&(Xo.clearTimeout(this.tasks[e]),delete this.tasks[e])},$o.prototype.cancelAll=function(){Wo(Xo.clearTimeout,this.tasks),this.tasks={}},$o.prototype._handle=function(e,t,n,r){var i=this,o=i.now();return function(){if(delete i.tasks[e],!(r>=Jo.RESCHEDULE&&o+2*n<i.now()))return t();r===Jo.RESCHEDULE&&i.run(t,n,r)}},$o.setClock=function(e){Xo=e},$o.resetClock=function(){Xo=Yo},$o.Modes=Jo;var Zo=$o,es={exports:{}};!function(e){function t(e){if(e)return function(e){for(var n in t.prototype)e[n]=t.prototype[n];return e}(e)}es.exports=t,t.prototype.on=t.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},t.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},t.prototype.off=t.prototype.removeListener=t.prototype.removeAllListeners=t.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,r=this._callbacks["$"+e];if(!r)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var i=0;i<r.length;i++)if((n=r[i])===t||n.fn===t){r.splice(i,1);break}return 0===r.length&&delete this._callbacks["$"+e],this},t.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){r=0;for(var i=(n=n.slice(0)).length;r<i;++r)n[r].apply(this,t)}return this},t.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},t.prototype.hasListeners=function(e){return!!this.listeners(e).length}}();var ts=es.exports,ns=Ao.v4,rs=qo,is=Fo,os=Zo,ss=Or("localstorage-retry");function as(e,t){return function(){return e.apply(t,arguments)}}function us(e,t,n){"function"==typeof t&&(n=t),this.name=e,this.id=ns(),this.fn=n,this.maxItems=t.maxItems||1/0,this.maxAttempts=t.maxAttempts||1/0,this.backoff={MIN_RETRY_DELAY:t.minRetryDelay||1e3,MAX_RETRY_DELAY:t.maxRetryDelay||3e4,FACTOR:t.backoffFactor||2,JITTER:t.backoffJitter||0},this.timeouts={ACK_TIMER:1e3,RECLAIM_TIMER:3e3,RECLAIM_TIMEOUT:1e4,RECLAIM_WAIT:500},this.keys={IN_PROGRESS:"inProgress",QUEUE:"queue",RECLAIM_START:"reclaimStart",RECLAIM_END:"reclaimEnd",ACK:"ack"},this._schedule=new os,this._processId=0,this._store=new rs(this.name,this.id,this.keys),this._store.set(this.keys.IN_PROGRESS,{}),this._store.set(this.keys.QUEUE,[]),this._ack=as(this._ack,this),this._checkReclaim=as(this._checkReclaim,this),this._processHead=as(this._processHead,this),this._running=!1}ts(us.prototype),us.prototype.start=function(){this._running&&this.stop(),this._running=!0,this._ack(),this._checkReclaim(),this._processHead()},us.prototype.stop=function(){this._schedule.cancelAll(),this._running=!1},us.prototype.shouldRetry=function(e,t){return!(t>this.maxAttempts)},us.prototype.getDelay=function(e){var t=this.backoff.MIN_RETRY_DELAY*Math.pow(this.backoff.FACTOR,e);if(this.backoff.JITTER){var n=Math.random(),r=Math.floor(n*this.backoff.JITTER*t);Math.floor(10*n)<5?t-=r:t+=r}return Number(Math.min(t,this.backoff.MAX_RETRY_DELAY).toPrecision(1))},us.prototype.addItem=function(e){this._enqueue({item:e,attemptNumber:0,time:this._schedule.now(),id:ns()})},us.prototype.requeue=function(e,t,n,r){this.shouldRetry(e,t,n)?this._enqueue({item:e,attemptNumber:t,time:this._schedule.now()+this.getDelay(t),id:r||ns()}):this.emit("discard",e,t)},us.prototype._enqueue=function(e){var t=this._store.get(this.keys.QUEUE)||[];(t=t.slice(-(this.maxItems-1))).push(e),t=t.sort((function(e,t){return e.time-t.time})),this._store.set(this.keys.QUEUE,t),this._running&&this._processHead()},us.prototype._processHead=function(){var e=this,t=this._store;this._schedule.cancel(this._processId);var n=t.get(this.keys.QUEUE)||[],r=t.get(this.keys.IN_PROGRESS)||{},i=this._schedule.now(),o=[];function s(n,r){o.push({item:n.item,done:function(i,o){var s=t.get(e.keys.IN_PROGRESS)||{};delete s[r],t.set(e.keys.IN_PROGRESS,s),e.emit("processed",i,o,n.item),i&&e.requeue(n.item,n.attemptNumber+1,i,n.id)}})}for(var a=Object.keys(r).length;n.length&&n[0].time<=i&&a++<e.maxItems;){var u=n.shift(),c=ns();r[c]={item:u.item,attemptNumber:u.attemptNumber,time:e._schedule.now()},s(u,c)}t.set(this.keys.QUEUE,n),t.set(this.keys.IN_PROGRESS,r),is((function(t){try{e.fn(t.item,t.done)}catch(e){ss("Process function threw error: "+e)}}),o),n=t.get(this.keys.QUEUE)||[],this._schedule.cancel(this._processId),n.length>0&&(this._processId=this._schedule.run(this._processHead,n[0].time-i,os.Modes.ASAP))},us.prototype._ack=function(){this._store.set(this.keys.ACK,this._schedule.now()),this._store.set(this.keys.RECLAIM_START,null),this._store.set(this.keys.RECLAIM_END,null),this._schedule.run(this._ack,this.timeouts.ACK_TIMER,os.Modes.ASAP)},us.prototype._checkReclaim=function(){var e=this;is((function(t){t.id!==e.id&&(e._schedule.now()-t.get(e.keys.ACK)<e.timeouts.RECLAIM_TIMEOUT||function(t){t.set(e.keys.RECLAIM_START,e.id),t.set(e.keys.ACK,e._schedule.now()),e._schedule.run((function(){t.get(e.keys.RECLAIM_START)===e.id&&(t.set(e.keys.RECLAIM_END,e.id),e._schedule.run((function(){t.get(e.keys.RECLAIM_END)===e.id&&t.get(e.keys.RECLAIM_START)===e.id&&e._reclaim(t.id)}),e.timeouts.RECLAIM_WAIT,os.Modes.ABANDON))}),e.timeouts.RECLAIM_WAIT,os.Modes.ABANDON)}(t))}),function(t){for(var n=[],r=e._store.getOriginalEngine(),i=0;i<r.length;i++){var o=r.key(i);if(null!==o){var s=o.split(".");3===s.length&&s[0]===t&&"ack"===s[2]&&n.push(new rs(t,s[1],e.keys))}}return n}(this.name)),this._schedule.run(this._checkReclaim,this.timeouts.RECLAIM_TIMER,os.Modes.RESCHEDULE)},us.prototype._reclaim=function(e){var t=this,n=new rs(this.name,e,this.keys),r={queue:this._store.get(this.keys.QUEUE)||[]},i={inProgress:n.get(this.keys.IN_PROGRESS)||{},queue:n.get(this.keys.QUEUE)||[]},o=[],s=function(e,n){is((function(e){var i=e.id||ns();o.indexOf(i)>=0?t.emit("duplication",e.item,e.attemptNumber):(r.queue.push({item:e.item,attemptNumber:e.attemptNumber+n,time:t._schedule.now(),id:i}),o.push(i))}),e)};s(i.queue,0),s(i.inProgress,1),r.queue=r.queue.sort((function(e,t){return e.time-t.time})),this._store.set(this.keys.QUEUE,r.queue);try{this._clearOtherQueue(n,1)}catch(e){if("NS_ERROR_STORAGE_BUSY"===e.name||"NS_ERROR_STORAGE_BUSY"===e.code||2153971713===e.code)try{this._clearOtherQueue(n,40)}catch(e){console.error(e)}else console.error(e)}this._processHead()},us.prototype._clearOtherQueue=function(e,t){var n=this;setTimeout((function(){e.remove(n.keys.IN_PROGRESS),setTimeout((function(){e.remove(n.keys.QUEUE),setTimeout((function(){e.remove(n.keys.RECLAIM_START),setTimeout((function(){e.remove(n.keys.RECLAIM_END),setTimeout((function(){e.remove(n.keys.ACK)}),t)}),t)}),t)}),t)}),t)};var cs=p(us),ls={maxRetryDelay:36e4,minRetryDelay:1e3,backoffFactor:2,maxAttempts:10,maxItems:100},fs=function(){return n((function e(){t(this,e),this.url="",this.writeKey=""}),[{key:"init",value:function(e,t,n){var r=this;this.url=t,this.writeKey=e,n&&o(ls,n),this.payloadQueue=new cs("rudder",ls,(function(e,t){e.message.sentAt=Ji(),r.processQueueElement(e.url,e.headers,e.message,3e4,(function(e,n){if(e)return t(e);t(null,n)}))})),this.payloadQueue.start()}},{key:"processQueueElement",value:function(e,t,n,r,i){try{var o=new XMLHttpRequest;for(var s in o.open("POST",e,!0),t)o.setRequestHeader(s,t[s]);o.timeout=r,o.ontimeout=i,o.onerror=i,o.onreadystatechange=function(){if(4===o.readyState)if(429===o.status||o.status>=500&&o.status<600){var t="".concat(Nn,' "').concat(o.status,'" status text: "').concat(o.statusText,'" for URL: "').concat(e,'"'),n=new Error(t);Qn(n),i(n)}else i(null,o.status)};var a=jn(n,!0);a?o.send(a):Dn.error("Invalid payload: Event dropped")}catch(e){i(e)}}},{key:"enqueue",value:function(e,t){var n={"Content-Type":"application/json",Authorization:"Basic ".concat(btoa("".concat(this.writeKey,":"))),AnonymousId:btoa(e.anonymousId)};this.payloadQueue.addItem({url:"".concat(this.url,"/v1/").concat(t),headers:n,message:e})}}])}(),hs="queue",ds=64e3,ps=function(){return n((function e(){t(this,e),this.storage=ri,this.maxItems=10,this.flushQueueTimeOut=void 0,this.timeOutActive=!1,this.flushQueueTimeOutInterval=6e5,this.url="",this.writekey="",this.queueName="".concat(hs,".").concat(Date.now())}),[{key:"sendQueueDataForBeacon",value:function(){this.sendDataFromQueueAndDestroyQueue()}},{key:"init",value:function(e,t,n){this.url=t,this.writekey=e,n.maxItems&&(this.maxItems=n.maxItems),n.flushQueueInterval&&(this.flushQueueTimeOutInterval=n.flushQueueInterval),this.sendQueueDataForBeacon=this.sendQueueDataForBeacon.bind(this),this.attachListeners()}},{key:"attachListeners",value:function(){var e=this;window.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&e.sendQueueDataForBeacon()}))}},{key:"getQueue",value:function(){return this.storage.get(this.queueName)}},{key:"setQueue",value:function(e){this.storage.set(this.queueName,e)}},{key:"enqueue",value:function(e){var t=this.getQueue()||[];(t=t.slice(-(this.maxItems-1))).push(e);var n=t.slice(0),r={batch:n,sentAt:Ji()},i=jn(r,!0);i&&i.length>ds&&(n=t.slice(0,t.length-1),this.flushQueue(n),(t=this.getQueue()).push(e)),this.setQueue(t),this.setTimer(),t.length===this.maxItems&&this.flushQueue(n)}},{key:"sendDataFromQueueAndDestroyQueue",value:function(){this.sendDataFromQueue(),this.storage.remove(this.queueName)}},{key:"sendDataFromQueue",value:function(){var e=this.getQueue();if(e&&e.length>0){var t=e.slice(0,e.length);this.flushQueue(t)}}},{key:"flushQueue",value:function(e){if(e&&e.length>0){var t=Ji();e.forEach((function(e){e.sentAt=t}));var n=jn({batch:e,sentAt:t},!0);if(null!==n){var r=new Blob([n],{type:"text/plain"}),i="".concat(this.url,"?writeKey=").concat(this.writekey);try{"function"!=typeof navigator.sendBeacon&&Qn(new Error("Beacon API is not supported by browser")),navigator.sendBeacon(i,r)||Qn(new Error("Unable to queue data to browser's beacon queue"))}catch(e){e.message="".concat(e.message," - While sending Beacon data to: ").concat(i),Qn(e)}}else Dn.error("Invalid payload: Event dropped")}this.setQueue([]),this.clearTimer()}},{key:"setTimer",value:function(){this.timeOutActive||(this.flushQueueTimeOut=setTimeout(this.sendDataFromQueue.bind(this),this.flushQueueTimeOutInterval),this.timeOutActive=!0)}},{key:"clearTimer",value:function(){this.timeOutActive&&(clearTimeout(this.flushQueueTimeOut),this.timeOutActive=!1)}}])}(),gs=function(){return n((function e(){t(this,e),this.queue=void 0}),[{key:"initialize",value:function(e,t,n){var r={},i=Yi(t);n&&n.useBeacon&&navigator.sendBeacon?(n.beaconQueueOptions&&null!=n.beaconQueueOptions&&"object"===f(n.beaconQueueOptions)&&(r=n.beaconQueueOptions),i="".concat(i,"/beacon/v1/batch"),this.queue=new ps):(n&&n.useBeacon&&Dn.info("[EventRepository] sendBeacon feature not available in this browser :: fallback to XHR"),n&&n.queueOptions&&null!=n.queueOptions&&"object"===f(n.queueOptions)&&(r=n.queueOptions),this.queue=new fs),this.queue.init(e,i,r)}},{key:"enqueue",value:function(e,t){var n=e.getElementContent();n.originalTimestamp=n.originalTimestamp||Ji(),n.sentAt=Ji();var r=jn(n,!0);r&&r.length>32e3&&Dn.error("[EventRepository] enqueue:: message length greater 32 Kb ",n),this.queue.enqueue(n,t)}}])}(),ys=new gs,vs={maxRetryDelay:36e4,minRetryDelay:1e3,backoffFactor:2,maxAttempts:1/0},ms=function(){return n((function e(){t(this,e),this.callback=void 0,this.processQueueElements=!1}),[{key:"init",value:function(e,t){var n=this;e&&o(vs,e),t&&(this.callback=t),this.payloadQueue=new cs("rs_events",vs,(function(e,t){n.processQueueElement(e.type,e.rudderElement,(function(e,n){if(e)return t(e);t(null,n)}))})),this.payloadQueue.start()}},{key:"activateProcessor",value:function(){this.processQueueElements=!0}},{key:"processQueueElement",value:function(e,t,n){try{this.processQueueElements?(Object.setPrototypeOf(t,vo.prototype),this.callback(e,t),n(null)):n(new Error("The queue elements are not ready to be processed yet"))}catch(e){n(e)}}},{key:"enqueue",value:function(e,t){this.payloadQueue.addItem({type:e,rudderElement:t})}}])}(),As=function(e){for(var t=function(){for(var e,t=[],n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}(),n=~0,r=0;r<e.length;r++)n=n>>>8^t[255&(n^e.charCodeAt(r))];return~n>>>0},Is={getUserLanguage:function(){return navigator&&navigator.language},getUserAgent:function(){return navigator&&navigator.userAgent}};function bs(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e=e.endsWith("..")?e.substr(0,e.length-2):e,decodeURIComponent(atob(e).split("").map((function(e){return"%".concat("00".concat(e.charCodeAt(0).toString(16)).slice(-2))})).join(""))}var ks=/^[a-zA-Z0-9\-_.]+$/,Es=1,Cs=1,Ss="*";function Os(e,t,n,r){var i=function(e,t){return[e,(new Date).getTimezoneOffset(),t].join(Ss)}(n,r),o=t||0,s=Math.floor(Date.now()/6e4)-o;return As([i,s,e].join(Ss)).toString(36)}function ws(e){var t=function(e){var t=e.split(Ss),n=t.length%2==0;return t.length<4||!n||Number(t.shift())!==Cs?null:{checksum:t.shift(),serializedIds:t.join(Ss)}}(e);if(!t)return null;var n=t.checksum,r=t.serializedIds;return function(e,t){for(var n=Is.getUserAgent(),r=Is.getUserLanguage(),i=0;i<=Es;i+=1)if(Os(e,i,n,r)===t)return!0;return!1}(r,n)?function(e){for(var t={},n=e.split(Ss),r=0;r<n.length;r+=2){var i=n[r];if(ks.test(i)){var o=bs(n[r+1]);t[i]=o}}return t}(r):null}var Ts=function(){return n((function e(){var n=this;if(t(this,e),i(this,"isInitialized",!1),window.OneTrust&&window.OnetrustActiveGroups){this.userSetConsentGroupIds=window.OnetrustActiveGroups.split(",").filter((function(e){return e}));var r=window.OneTrust.GetDomainData().Groups;this.userSetConsentGroupNames=[],this.userDeniedConsentGroupIds=[],r.forEach((function(e){var t=e.CustomGroupId,r=e.GroupName;n.userSetConsentGroupIds.includes(t)?n.userSetConsentGroupNames.push(r.toUpperCase().trim()):n.userDeniedConsentGroupIds.push(t)})),this.userSetConsentGroupIds=this.userSetConsentGroupIds.map((function(e){return e.toUpperCase()})),this.isInitialized=!0}else Dn.error("OneTrust resources are not accessible.")}),[{key:"isEnabled",value:function(e){var t=this;try{if(!this.isInitialized)return!0;var n=e.oneTrustCookieCategories;if(!n)return!0;var r=n.map((function(e){return e.oneTrustCookieCategory})).filter((function(e){return e}));return r.every((function(e){return t.userSetConsentGroupIds.includes(e.toUpperCase().trim())||t.userSetConsentGroupNames.includes(e.toUpperCase().trim())}))}catch(e){return Dn.error("Error during onetrust cookie consent management ".concat(e)),!0}}},{key:"getDeniedList",value:function(){return this.isInitialized?this.userDeniedConsentGroupIds:[]}}])}(),_s=function(){return n((function e(){var n=this;if(t(this,e),i(this,"updatePurposes",(function(e){e&&Object.entries(e).forEach((function(e){var t=e[0];e[1]?n.userConsentedPurposes.push(t):n.userDeniedPurposes.push(t)}))})),this.userConsentedPurposes=[],this.userDeniedPurposes=[],window.updateKetchConsent=function(e){e&&(n.userConsentedPurposes=[],n.userDeniedPurposes=[],n.updatePurposes(e))},window.getKetchUserConsentedPurposes=function(){return n.userConsentedPurposes.slice()},window.getKetchUserDeniedPurposes=function(){return n.userDeniedPurposes.slice()},window.ketchConsent)this.updatePurposes(window.ketchConsent);else{var r=this.getConsent();this.updatePurposes(r)}}),[{key:"isEnabled",value:function(e){var t=this;try{var n=e.ketchConsentPurposes;if(!n||0===n.length)return!0;var r=n.map((function(e){return e.purpose})).filter((function(e){return e}));return r.some((function(e){return t.userConsentedPurposes.includes(e.trim())}))}catch(e){return Dn.error("Error occured checking ketch consent state ".concat(e)),!0}}},{key:"getDeniedList",value:function(){return this.userDeniedPurposes}},{key:"getConsent",value:function(){var e=ei.get("_ketch_consent_v1_");if(e){var t;try{t=JSON.parse(atob(e))}catch(e){return void Dn.error("Error occurred while parsing consent cookie ".concat(e))}if(t){var n={};return Object.entries(t).forEach((function(e){var t=e[0],r=e[1];r&&r.status&&(n[t]="granted"===r.status)})),n}}}}])}(),Rs=function(e){var t,n;return null!=e&&null!==(t=e.oneTrust)&&void 0!==t&&t.enabled?new Ts:null!=e&&null!==(n=e.ketch)&&void 0!==n&&n.enabled?new _s:null},Ps=function(){return n((function e(){t(this,e),this.storage=Ei,this.timeout=18e5,this.sessionInfo=this.storage.getSessionInfo()||{autoTrack:!0}}),[{key:"initialize",value:function(e){try{var t;if(this.sessionInfo.autoTrack=!(!1===(null==e||null===(t=e.sessions)||void 0===t?void 0:t.autoTrack)||this.sessionInfo.manualTrack),null!=e&&e.sessions&&!isNaN(e.sessions.timeout)){var n=e.sessions.timeout;0===n&&(Dn.warn("[Session]:: Provided timeout value 0 will disable the auto session tracking feature."),this.sessionInfo.autoTrack=!1),n>0&&n<1e4&&Dn.warn('[Session]:: It is not advised to set "timeout" less than 10 seconds'),this.timeout=n}this.sessionInfo.autoTrack?this.startAutoTracking():!1!==this.sessionInfo.autoTrack||this.sessionInfo.manualTrack||this.end()}catch(e){Qn(e)}}},{key:"isValidSession",value:function(e){return e<=this.sessionInfo.expiresAt}},{key:"generateSessionId",value:function(){return Date.now()}},{key:"startAutoTracking",value:function(){var e=Date.now();this.isValidSession(e)||(this.sessionInfo={},this.sessionInfo.id=e,this.sessionInfo.expiresAt=e+this.timeout,this.sessionInfo.sessionStart=!0,this.sessionInfo.autoTrack=!0),this.storage.setSessionInfo(this.sessionInfo)}},{key:"validateSessionId",value:function(e){if("number"==typeof e&&e%1==0){var t;if(!(((t=e)?t.toString().length:0)<10))return e;Dn.error('[Session]:: "sessionId" should at least be "'.concat(10,'" digits long'))}else Dn.error('[Session]:: "sessionId" should only be a positive integer')}},{key:"start",value:function(e){var t=e?this.validateSessionId(e):this.generateSessionId();this.sessionInfo={id:t||this.generateSessionId(),sessionStart:!0,manualTrack:!0},this.storage.setSessionInfo(this.sessionInfo)}},{key:"getSessionId",value:function(){return this.sessionInfo.autoTrack&&this.isValidSession(Date.now())||this.sessionInfo.manualTrack?this.sessionInfo.id:null}},{key:"end",value:function(){this.sessionInfo={},this.storage.removeSessionInfo()}},{key:"getSessionInfo",value:function(){var e={};if(this.sessionInfo.autoTrack||this.sessionInfo.manualTrack){if(this.sessionInfo.autoTrack){var t=Date.now();this.isValidSession(t)?this.sessionInfo.expiresAt=t+this.timeout:this.startAutoTracking()}this.sessionInfo.sessionStart&&(e.sessionStart=!0,this.sessionInfo.sessionStart=!1),e.sessionId=this.sessionInfo.id,this.storage.setSessionInfo(this.sessionInfo)}return e}},{key:"reset",value:function(){var e=this.sessionInfo,t=e.manualTrack;e.autoTrack?(this.sessionInfo={},this.startAutoTracking()):t&&this.start()}}])}(),xs=new Ps,Ds=["integrations","anonymousId","originalTimestamp"],Ls=function(e,t,n){var r="";if(n){if(!(r=Yi(n))){var i="CDN base URL for integrations is not valid";throw Qn({message:"[Analytics] load:: ".concat(i)}),Error("Failed to load Rudder SDK: ".concat(i))}return r}var o=function(){for(var e,t=document.getElementsByTagName("script"),n=0;n<t.length;n+=1){var r=Yi(t[n].getAttribute("src"));if(r&&r.match(/^.*rudder-analytics?(\.min)?\.js$/)){e=r;break}}return{sdkURL:e}}(),s=o.sdkURL;return r=s?s.split("/").slice(0,-1).concat(Ui).join("/"):ji,t&&(r=r.replace(Fi,e)),r},Ms="rs-bugsnag",Bs="bugsnag",Ns=["Bugsnag",Bs],Gs="0d96a60df267f4a13f808bbaa54e535c",Fs=["rudder-analytics.min.js","rudder-analytics.js"].concat(c(Object.keys(P).map((function(e){return"".concat(P[e],".min.js")}))),c(Object.keys(P).map((function(e){return"".concat(P[e],".js")})))),Us=function(e){var t=e&&e._client&&e._client._notifier&&e._client._notifier.version;if(!t){var n=e({apiKey:Gs,releaseStage:"version-test",beforeSend:function(){return!1}});t=n.notifier&&n.notifier.version,n=void 0}return t&&"6"===t.charAt(0)},js=function(e){Ns.every((function(e){return!function(e,t){if(null==e)throw new TypeError("Cannot convert undefined or null to object");return Object.prototype.hasOwnProperty.call(Object(e),t)}(window,e)}))&&Ci(e,"https://d2wy8f7a9ursnm.cloudfront.net/v6/bugsnag.min.js",{isNonNativeSDK:"true",skipDatasetAttributes:!0})},Ks=function(){return n((function e(n,r,i){t(this,e),this.pluginName=Ms,this.sourceId=n,this.writeKey=r,this.onClientReady=i,this.initClientOnLibReadyInterval=void 0,this.init()}),[{key:"init",value:function(){var e=this;if(!window.RudderStackGlobals||!window.RudderStackGlobals[Fn]){if(!Gs.match(/{{.+}}/)){js(this.pluginName);var t=window[Bs];"function"!=typeof t?(this.initClientOnLibReadyInterval=setInterval((function(){var t=window[Bs];"function"==typeof t&&(Us(t)&&e.initClient(),clearInterval(e.initClientOnLibReadyInterval))}),100),setTimeout((function(){clearInterval(e.initClientOnLibReadyInterval)}),Ln)):Us(t)&&this.initClient()}}}},{key:"initClient",value:function(){var e,t=window[Bs];this.client=t({apiKey:Gs,appVersion:"2.48.14",metaData:{SDK:{name:"JS",installType:"npm"}},beforeSend:this.onError(),autoTrackSessions:!1,collectUserIp:!1,enabledBreadcrumbTypes:["error","log","user"],maxEvents:100,releaseStage:(e=window.location.hostname,e&&["www.test-host.com","localhost","127.0.0.1","[::1]"].includes(e)?"development":"production"),networkBreadcrumbsEnabled:!1,user:{id:this.writeKey}}),this.onClientReady()}},{key:"onError",value:function(){var e=this.sourceId;return function(t){try{return!!function(e){var t=kr(e,"stacktrace.0.file");if(!t||"string"!=typeof t)return!1;var n=t.substring(t.lastIndexOf("/")+1);return Fs.includes(n)}(t)&&(function(e,t){e.updateMetaData("source",{metadataSource:t});var n=e.errorMessage;e.context=n,n.includes("error in script loading")&&(e.context="Script load failures"),e.severity="error"}(t,e),!0)}catch(e){return!1}}}},{key:"notify",value:function(e){this.client&&this.client.notify(e)}},{key:"leaveBreadcrumb",value:function(e){this.client&&this.client.leaveBreadcrumb(e)}}])}(),Qs=Ms,zs=[Ms],Hs=function(){return n((function e(n){t(this,e),this.isEnabled=!1,this.providerName=Qs,this.provider=void 0,this.logger=n,this.onClientReady=this.onClientReady.bind(this),this.exposeToGlobal=this.exposeToGlobal.bind(this)}),[{key:"init",value:function(e,t,n){e&&t?!0===function(e){return kr(e,"statsCollection.errors.enabled")||!1}(e)?(this.enable(),this.setProviderName(function(e){return kr(e,"statsCollection.errors.provider")}(e)),this.initProvider(e,t,n)):this.disable():this.logger.error("[Analytics] ErrorReporting :: Invalid configuration or missing source id provided.")}},{key:"enable",value:function(){this.isEnabled=!0}},{key:"disable",value:function(){this.isEnabled=!1}},{key:"setProviderName",value:function(e){e?!e||zs.includes(e)?this.providerName=e:this.logger.error("[Analytics] ErrorReporting :: Invalid error reporting provider value. Value should be one of: ".concat(zs.join(","))):this.providerName=Qs}},{key:"initProvider",value:function(e,t,n){if(this.providerName===Ms)this.provider=new Ks(t,n,this.onClientReady)}},{key:"onClientReady",value:function(){this.exposeToGlobal()}},{key:"exposeToGlobal",value:function(){window.RudderStackGlobals||(window.RudderStackGlobals={}),window.RudderStackGlobals[Fn]=this}},{key:"leaveBreadcrumb",value:function(e){if(this.provider)try{this.provider.leaveBreadcrumb(e)}catch(e){this.logger.error("[Analytics] ErrorReporting :: leaveBreadcrumb method ".concat(e.toString()))}}},{key:"notify",value:function(e){if(this.provider)try{this.provider.notify(e)}catch(e){this.logger.error("[Analytics] ErrorReporting :: notify method ".concat(e.toString()))}}}])}(),Vs=new(function(){return n((function e(){t(this,e),this.retryAttempt=3,this.queue=[],this.isTransformationProcessing=!1,this.authToken=null}),[{key:"init",value:function(e,t,n){this.dataPlaneUrl=Yi(t),this.writeKey=e,this.authToken=n||this.authToken,this.start()}},{key:"enqueue",value:function(e,t,n){this.queue.push({event:e,destinationIds:t,cb:n})}},{key:"sendEventForTransformation",value:function(e,t){var n=this;return new Promise((function(r,i){var o="".concat(n.dataPlaneUrl,"/transform"),s={"Content-Type":"application/json",Authorization:"Basic ".concat(btoa("".concat(n.writeKey,":")))};try{var a=new XMLHttpRequest;a.open("POST",o,!0),Object.keys(s).forEach((function(e){return a.setRequestHeader(e,s[e])})),a.timeout=1e4,a.onreadystatechange=function(){if(4===a.readyState)try{var o=a.status,s=a.response;switch(o){case 200:return s=JSON.parse(s),void r({status:o,transformedPayload:s.transformedBatch});case 400:var u=s?"".concat(s):"Invalid request payload";return void r({status:o,errorMessage:u});case 404:return void r({status:o});default:if(t>0){var c=t-1;setTimeout((function(){return n.sendEventForTransformation(e,c).then(r).catch(i)}),500*Math.pow(2,n.retryAttempt-c))}else r({status:o,errorMessage:"Retries exhausted"})}}catch(e){i(e)}};var u=jn(e,!0);u?a.send(u):Dn.error("Invalid payload: Event dropped")}catch(e){i(e)}}))}},{key:"checkQueueLengthAndProcess",value:function(){this.queue.length>0&&this.process()}},{key:"process",value:function(){var e=this;this.isTransformationProcessing=!0;var t,n,r=this.queue.shift(),i=(t=r.event,n=r.destinationIds,{metadata:{"Custom-Authorization":this.authToken},batch:[{orderNo:Date.now(),destinationIds:n,event:t.message}]});this.sendEventForTransformation(i,this.retryAttempt).then((function(t){e.isTransformationProcessing=!1,r.cb(t),e.checkQueueLengthAndProcess()})).catch((function(t){Qn("string"==typeof t?t:t.message),e.isTransformationProcessing=!1,r.cb({status:0}),e.checkQueueLengthAndProcess()}))}},{key:"start",value:function(){var e=this;setInterval((function(){e.isTransformationProcessing||e.checkQueueLengthAndProcess()}),100)}},{key:"setAuthToken",value:function(e){this.authToken=e}}])}()),qs=function(){return n((function e(){t(this,e),this.initialized=!1,this.clientIntegrations=[],this.loadOnlyIntegrations={},this.clientIntegrationObjects=void 0,this.successfullyLoadedIntegration=[],this.failedToBeLoadedIntegration=[],this.toBeProcessedArray=[],this.toBeProcessedByIntegrationArray=[],this.storage=Ei,this.eventRepository=ys,this.preProcessQueue=new ms,this.sendAdblockPage=!1,this.sendAdblockPageOptions={},this.clientSuppliedCallbacks={},this.readyCallbacks=[],this.methodToCallbackMapping={syncPixel:"syncPixelCallback"},this.loaded=!1,this.loadIntegration=!0,this.bufferDataPlaneEventsUntilReady=!1,this.dataPlaneEventsBufferTimeout=1e4,this.integrationsData={},this.dynamicallyLoadedIntegrations={},this.destSDKBaseURL=ji,this.cookieConsentOptions={},this.logLevel=void 0,this.clientIntegrationsReady=!1,this.uSession=xs,this.version="2.48.14",this.lockIntegrationsVersion=!1,this.errorReporting=new Hs(Dn),this.deniedConsentIds=[],this.transformationHandler=Vs}),[{key:"initializeUser",value:function(e){this.userId=this.storage.getUserId()||"",this.storage.setUserId(this.userId),this.userTraits=this.storage.getUserTraits()||{},this.storage.setUserTraits(this.userTraits),this.groupId=this.storage.getGroupId()||"",this.storage.setGroupId(this.groupId),this.groupTraits=this.storage.getGroupTraits()||{},this.storage.setGroupTraits(this.groupTraits),this.anonymousId=this.getAnonymousId(e),this.storage.setAnonymousId(this.anonymousId)}},{key:"setInitialPageProperties",value:function(){if(null==this.storage.getInitialReferrer()&&null==this.storage.getInitialReferringDomain()){var e=oo();this.storage.setInitialReferrer(e),this.storage.setInitialReferringDomain(so(e))}}},{key:"allModulesInitialized",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return new Promise((function(n){e.clientIntegrations.every((function(t){return null!=e.dynamicallyLoadedIntegrations["".concat(P[t.name]).concat("_RS")]}))||t>=2e4?n(e):e.pause(Mn).then((function(){return e.allModulesInitialized(t+Mn).then(n)}))}))}},{key:"executeReadyCallback",value:function(){this.readyCallbacks.forEach((function(e){return e()}))}},{key:"integrationSDKLoaded",value:function(e,t){return window[e]&&window[e][t]&&window[e][t].prototype&&void 0!==window[e][t].prototype.constructor}},{key:"processResponse",value:function(e,t){var n=this;try{var r=t;try{if("string"==typeof t&&(r=JSON.parse(t)),!r||"object"!==f(r)||Array.isArray(r))return void Dn.error("Invalid source configuration")}catch(e){return void Qn(e)}try{window.chrome&&window.chrome.runtime&&window.chrome.runtime.id||this.errorReporting.init(r.source.config,r.source.id,this.writeKey)}catch(e){Qn(e)}if(this.serverUrl=io(r,this.serverUrl,this.options),this.eventRepository.initialize(this.writeKey,this.serverUrl,this.options),this.transformationHandler.init(this.writeKey,this.serverUrl,this.storage.getAuthToken()),r.source.destinations.forEach((function(e){e.enabled&&this.clientIntegrations.push({name:e.destinationDefinition.name,config:e.config,destinationInfo:{shouldApplyDeviceModeTransformation:e.shouldApplyDeviceModeTransformation||!1,propagateEventsUntransformedOnError:e.propagateEventsUntransformedOnError||!1,destinationId:e.id}})}),this),this.clientIntegrations=to(this.loadOnlyIntegrations,this.clientIntegrations),Object.keys(this.cookieConsentOptions).length>0)try{var i=Rs(this.cookieConsentOptions);this.deniedConsentIds=i&&i.getDeniedList(),this.clientIntegrations=this.clientIntegrations.filter((function(e){return!i||i&&i.isEnabled(e.config)}))}catch(e){Qn(e)}this.loaded=!0,this.options&&"function"==typeof this.options.onLoaded&&this.options.onLoaded(this),function(e){if(e.toBeProcessedArray.length>0)for(;e.toBeProcessedArray.length>0;){var t=c(e.toBeProcessedArray[0]);e.toBeProcessedArray.shift();var n=t[0];t.shift(),e[n].apply(e,c(t))}}(this),this.clientIntegrations=this.clientIntegrations.filter((function(e){return!!P[e.name]||(Dn.error("[Analytics] Integration:: ".concat(e.name," not available for initialization")),!1)})),this.bufferDataPlaneEventsUntilReady&&setTimeout((function(){n.processBufferedCloudModeEvents()}),this.dataPlaneEventsBufferTimeout),this.errorReporting.leaveBreadcrumb("Starting device-mode initialization"),this.clientIntegrations.forEach((function(e){var t=P[e.name],r="".concat(t).concat("_RS"),i="".concat(n.destSDKBaseURL,"/").concat(t,".min.js");window.hasOwnProperty(r)||Ci(r,i,{isNonNativeSDK:!0});var o=n,s=setInterval((function(){if(o.integrationSDKLoaded(r,t)){var i,a=window[r];clearInterval(s);try{var u="[Analytics] processResponse :: trying to initialize integration name:: ".concat(r);n.errorReporting.leaveBreadcrumb(u),(i=new a[t](e.config,o,e.destinationInfo)).init(),o.isInitialized(i).then((function(){o.dynamicallyLoadedIntegrations[r]=a[t]}))}catch(e){var c="[Analytics] 'integration.init()' failed :: ".concat(r," :: ").concat(e.message);Qn(e,c),o.failedToBeLoadedIntegration.push(i)}}}),100);setTimeout((function(){clearInterval(s)}),Ln)}));var o=this;this.allModulesInitialized().then((function(){if(!o.clientIntegrations||0===o.clientIntegrations.length)return n.clientIntegrationsReady=!0,n.executeReadyCallback(),void(n.toBeProcessedByIntegrationArray=[]);o.replayEvents(o)}))}catch(e){Qn(e)}}},{key:"sendDataToDestination",value:function(e,t,n){try{if(e[n]){var r=w(t);e[n](r)}}catch(t){var i="[sendToNative]:: [Destination: ".concat(e.name,"]:: ");Qn(t,i)}}},{key:"sendTransformedDataToDestination",value:function(e,t,n){var r=this;try{eo(t.message.integrations);var i=e.map((function(e){return e.destinationId}));this.transformationHandler.enqueue(t,i,(function(i){var o=i.status,s=i.transformedPayload,a=i.errorMessage;e.forEach((function(e){try{switch(o){case 200:var i=s.find((function(t){return t.id===e.destinationId})),u=[];null==i||i.payload.forEach((function(n){if("200"===n.status)u.push(n);else{var r='[DMT]:: Event transformation unsuccessful for destination "'.concat(e.name,'". Reason: '),i="Unknown";"410"===n.status&&(i="Transformation is not available");var o="Dropping the event",s=Dn.error;!0===e.propagateEventsUntransformedOnError&&(o="Sending untransformed event to the destination",s=Dn.warn,u.push({event:t.message})),s("".concat(r," ").concat(i,". ").concat(o,"."))}})),null==u||u.forEach((function(t){Ti(t.event)&&r.sendDataToDestination(e,{message:t.event},n)}));break;case 404:Dn.warn("[DMT]:: Transformation server access is denied. The configuration data seems to be out of sync. Sending untransformed event to the destination."),r.sendDataToDestination(e,t,n);break;default:!0===e.propagateEventsUntransformedOnError?(Dn.warn("[DMT]::[Destination: ".concat(e.name,"] :: Transformation request failed with status: ").concat(o," ").concat(a,". Sending untransformed event.")),r.sendDataToDestination(e,t,n)):Dn.error("[DMT]::[Destination: ".concat(e.name,"] :: Transformation request failed with status: ").concat(o," ").concat(a,". Dropping the event."))}}catch(t){t instanceof Error&&(t.message="[DMT]::[Destination:".concat(e.name,"]:: ").concat(t.message)),Qn(t)}}))}))}catch(e){e instanceof Error&&(e.message="[DMT]:: ".concat(e.message)),Qn(e)}}},{key:"processAndSendEventsToDeviceMode",value:function(e,t,n){var r=this,i=[],o=[];e.forEach((function(e){try{!r.IsEventBlackListed(t.message.event,e.name)&&(e.shouldApplyDeviceModeTransformation?o.push(e):i.push(e))}catch(e){Qn(e)}})),i.forEach((function(e){r.sendDataToDestination(e,t,n)})),o.length>0&&this.sendTransformedDataToDestination(o,t,n)}},{key:"queueEventForDataPlane",value:function(e,t){var n=t.message.integrations||{All:!0};t.message.integrations=function(e,t){var n=w(e),r=Object.keys(t).filter((function(e){return!(!0===t[e]&&n[e])})).reduce((function(e,n){return e[n]=t[n],e}),{});return wi(n,r)}(this.integrationsData,n),this.eventRepository.enqueue(t,e)}},{key:"processBufferedCloudModeEvents",value:function(){this.bufferDataPlaneEventsUntilReady&&this.preProcessQueue.activateProcessor()}},{key:"replayEvents",value:function(e){var t,n,r,i=this;this.errorReporting.leaveBreadcrumb("Started replaying buffered events"),e.clientIntegrationObjects=[],e.clientIntegrationObjects=e.successfullyLoadedIntegration;try{e.clientIntegrationObjects.every((function(e){return!e.isReady||e.isReady()}))&&(this.integrationsData=(t=this.integrationsData,n=e.clientIntegrationObjects,r=w(t),n.forEach((function(e){if(e.getDataForIntegrationsObject)try{r=wi(r,e.getDataForIntegrationsObject())}catch(e){Dn.debug("[Analytics: prepareDataForIntegrationsObj]",e)}})),r),e.clientIntegrationsReady=!0,e.executeReadyCallback())}catch(e){Qn(e,"Replay buffered cloud mode events")}this.processBufferedCloudModeEvents(),e.toBeProcessedByIntegrationArray.forEach((function(t){var n=t[0];t.shift(),Object.keys(t[0].message.integrations).length>0&&Zi(t[0].message.integrations);var r=to(t[0].message.integrations,e.clientIntegrationObjects);i.processAndSendEventsToDeviceMode(r,t[0],n)})),e.toBeProcessedByIntegrationArray=[]}},{key:"pause",value:function(e){return new Promise((function(t){setTimeout(t,e)}))}},{key:"isInitialized",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return new Promise((function(r){e.isLoaded()?(t.successfullyLoadedIntegration.push(e),r(t)):n>=Ln?(t.failedToBeLoadedIntegration.push(e),r(t)):t.pause(Mn).then((function(){return t.isInitialized(e,n+Mn).then(r)}))}))}},{key:"page",value:function(e,t,n,r,i){if(this.errorReporting.leaveBreadcrumb("Page event"),this.loaded){"function"==typeof r&&(i=r,r=null),"function"==typeof n&&(i=n,r=n=null),"function"==typeof t&&(i=t,r=n=t=null),"function"==typeof e&&(i=e,r=n=t=e=null),"object"===f(e)&&null!=e&&null!=e&&(r=t,n=e,t=e=null),"object"===f(t)&&null!=t&&null!=t&&(r=n,n=t,t=null),"string"==typeof e&&"string"!=typeof t&&(t=e,e=null),this.sendAdblockPage&&"RudderJS-Initiated"!==e&&this.sendSampleRequest();var o=w(n),s=w(r),a=(new mo).setType("page").build();o||(o={}),t&&(a.message.name=o.name=t),e&&(a.message.category=o.category=e),a.message.properties=this.getPageProperties(o),this.processAndSendDataToDestinations("page",a,s,i)}else this.toBeProcessedArray.push(["page"].concat(Array.prototype.slice.call(arguments)))}},{key:"track",value:function(e,t,n,r){if(this.errorReporting.leaveBreadcrumb("Track event"),this.loaded){"function"==typeof n&&(r=n,n=null),"function"==typeof t&&(r=t,n=null,t=null);var i=w(t),o=w(n),s=(new mo).setType("track").build();e&&s.setEventName(e),s.setProperty(i||{}),this.processAndSendDataToDestinations("track",s,o,r)}else this.toBeProcessedArray.push(["track"].concat(Array.prototype.slice.call(arguments)))}},{key:"identify",value:function(e,t,n,r){if(this.errorReporting.leaveBreadcrumb("Identify event"),this.loaded){"function"==typeof n&&(r=n,n=null),"function"==typeof t&&(r=t,n=null,t=null),"object"===f(e)&&(n=t,t=e,e=this.userId);var i=no(e);i&&this.userId&&i!==this.userId&&this.reset(),this.userId=i,this.storage.setUserId(this.userId);var o=w(t),s=w(n);if(o){for(var a in o)this.userTraits[a]=o[a];this.storage.setUserTraits(this.userTraits)}var u=(new mo).setType("identify").build();this.processAndSendDataToDestinations("identify",u,s,r)}else this.toBeProcessedArray.push(["identify"].concat(Array.prototype.slice.call(arguments)))}},{key:"alias",value:function(e,t,n,r){if(this.errorReporting.leaveBreadcrumb("Alias event"),this.loaded){"function"==typeof n&&(r=n,n=null),"function"==typeof t&&(r=t,n=null,t=null),"function"==typeof e&&(r=e,n=null,t=null,e=null),"object"===f(t)&&(n=t,t=null),"object"===f(e)&&(n=e,t=null,e=null);var i=(new mo).setType("alias").build();i.message.previousId=no(t)||(this.userId?this.userId:this.getAnonymousId()),i.message.userId=no(e);var o=w(n);this.processAndSendDataToDestinations("alias",i,o,r)}else this.toBeProcessedArray.push(["alias"].concat(Array.prototype.slice.call(arguments)))}},{key:"group",value:function(e,t,n,r){if(this.errorReporting.leaveBreadcrumb("Group event"),this.loaded){if(0!==arguments.length){"function"==typeof n&&(r=n,n=null),"function"==typeof t&&(r=t,n=null,t=null),"object"===f(e)&&(n=t,t=e,e=this.groupId),"function"==typeof e&&(r=e,n=null,t=null,e=this.groupId),this.groupId=no(e),this.storage.setGroupId(this.groupId);var i=w(t),o=w(n),s=(new mo).setType("group").build();if(i)for(var a in i)this.groupTraits[a]=i[a];else this.groupTraits={};this.storage.setGroupTraits(this.groupTraits),this.processAndSendDataToDestinations("group",s,o,r)}}else this.toBeProcessedArray.push(["group"].concat(Array.prototype.slice.call(arguments)))}},{key:"IsEventBlackListed",value:function(e,t){if(!e||"string"!=typeof e)return!1;var n=Pn[t],r=this.clientIntegrations.find((function(e){return e.name===n})).config,i=r.blacklistedEvents,o=r.whitelistedEvents,s=r.eventFilteringOption;if(!s)return!1;var a=e.trim().toUpperCase();switch(s){case"disable":default:return!1;case"blacklistedEvents":return!!Array.isArray(i)&&i.some((function(e){return e.eventName.trim().toUpperCase()===a}));case"whitelistedEvents":return!Array.isArray(o)||!o.some((function(e){return e.eventName.trim().toUpperCase()===a}))}}},{key:"shouldUseGlobalIntegrationsConfigInEvents",value:function(){return this.useGlobalIntegrationsConfigInEvents&&this.loadOnlyIntegrations&&Object.keys(this.loadOnlyIntegrations).length>0}},{key:"processAndSendDataToDestinations",value:function(e,t,n,r){try{this.anonymousId||this.setAnonymousId(),this.errorReporting.leaveBreadcrumb("Started sending data to destinations"),t.message.context.traits=a({},this.userTraits),t.message.anonymousId=this.anonymousId,t.message.userId=t.message.userId?t.message.userId:this.userId,"group"==e&&(this.groupId&&(t.message.groupId=this.groupId),this.groupTraits&&(t.message.traits=a({},this.groupTraits)));try{var i=this.uSession.getSessionInfo(),o=i.sessionId,s=i.sessionStart;t.message.context.sessionId=o,s&&(t.message.context.sessionStart=!0)}catch(e){Qn(e)}f=this.cookieConsentOptions,h=!1,Object.keys(f).forEach((function(e){Hi.includes(e)&&"boolean"==typeof f[e].enabled&&!0===f[e].enabled&&(h=!0)})),h&&(t.message.context.consentManagement={deniedConsentIds:this.deniedConsentIds||[]}),this.processOptionsParam(t,n),function(e,t){var n=e.properties,r=e.traits,i=e.context;n&&Object.keys(n).forEach((function(e){Ni.indexOf(e.toLowerCase())>=0&&Dn.error("Warning! : Reserved keyword used in properties--\x3e ".concat(e," with ").concat(t," call"))})),r&&Object.keys(r).forEach((function(e){Ni.indexOf(e.toLowerCase())>=0&&Dn.error("Warning! : Reserved keyword used in traits--\x3e ".concat(e," with ").concat(t," call"))}));var o=i.traits;o&&Object.keys(o).forEach((function(e){Ni.indexOf(e.toLowerCase())>=0&&Dn.error("Warning! : Reserved keyword used in traits --\x3e ".concat(e," with ").concat(t," call"))}))}(t.message,e);var u=t.message.integrations;u?Zi(u):u=this.shouldUseGlobalIntegrationsConfigInEvents()?this.loadOnlyIntegrations:Wi,t.message.integrations=u;try{t.message.context["ua-ch"]=this.uach}catch(e){Qn(e)}try{if(this.clientIntegrationObjects){var c=to(u,this.clientIntegrationObjects);this.processAndSendEventsToDeviceMode(c,t,e)}else this.toBeProcessedByIntegrationArray.push([e,t])}catch(e){Qn(e,"processAndSendEventsToDeviceMode::")}var l=w(t);eo(l.message.integrations),!this.bufferDataPlaneEventsUntilReady||this.clientIntegrationObjects?this.queueEventForDataPlane(e,l):this.preProcessQueue.enqueue(e,l),r&&"function"==typeof r&&r(l)}catch(e){Qn(e)}var f,h}},{key:"utm",value:function(e){var t={};try{var n=new URL(e),r="utm_";n.searchParams.forEach((function(e,n){if(n.startsWith(r)){var i=n.substring(4);"campaign"===i&&(i="name"),t[i]=e}}))}catch(e){}return t}},{key:"addCampaignInfo",value:function(e){var t=e.message.context;t&&"object"===f(t)&&(e.message.context.campaign=this.utm(window.location.href))}},{key:"processOptionsParam",value:function(e,t){var n=e.message,r=n.type,o=n.properties;this.addCampaignInfo(e),e.message.context.page=this.getContextPageProperties("page"===r?o:void 0),function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};"object"===f(t)&&null!==t&&Object.keys(t).forEach((function(n){Ds.includes(n)&&(e[n]=t[n])}))}(e.message,t),e.message.context=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.context;return"object"!==f(t)||null===t||Object.keys(t).forEach((function(e){if(!Ds.includes(e)&&!Vi.includes(e))if("context"!==e)n=wi(n,i({},e,t[e]));else if("object"===f(t[e])&&null!==t[e]){var r={};Object.keys(t[e]).forEach((function(n){Vi.includes(n)||(r[n]=t[e][n])})),n=wi(n,a({},r))}else Dn.error("[Analytics: processOptionsParam] context passed in options ".concat(e," is not object."))})),n}(e.message,t)}},{key:"getPageProperties",value:function(e,t){var n=uo(),r=t&&t.page||{};for(var i in n)void 0===e[i]&&(e[i]=r[i]||n[i]);return e}},{key:"getContextPageProperties",value:function(e){var t=uo(),n={};for(var r in t)n[r]=e&&e[r]?e[r]:t[r];return n}},{key:"reset",value:function(e){this.errorReporting.leaveBreadcrumb("reset API :: flag: ".concat(e)),this.loaded?(e&&(this.anonymousId=""),this.userId="",this.userTraits={},this.groupId="",this.groupTraits={},this.uSession.reset(),this.storage.clear(e)):this.toBeProcessedArray.push(["reset",e])}},{key:"getAnonymousId",value:function(e){return this.anonymousId=this.storage.getAnonymousId(e),this.anonymousId||this.setAnonymousId(),this.anonymousId}},{key:"getUserId",value:function(){return this.userId}},{key:"getSessionId",value:function(){return this.uSession.getSessionId()}},{key:"getUserTraits",value:function(){return this.userTraits}},{key:"getGroupId",value:function(){return this.groupId}},{key:"getGroupTraits",value:function(){return this.groupTraits}},{key:"setAnonymousId",value:function(e,t){var n=t?ws(t):null,r=n?n.rs_amp_id:null;this.anonymousId=e||r||Xi(),this.storage.setAnonymousId(this.anonymousId)}},{key:"isValidWriteKey",value:function(e){return e&&"string"==typeof e&&e.trim().length>0}},{key:"isValidServerUrl",value:function(e){return e&&"string"==typeof e&&e.trim().length>0}},{key:"isDatasetAvailable",value:function(){var e=document.createElement("div");return e.setAttribute("data-a-b","c"),!!e.dataset&&"c"===e.dataset.aB}},{key:"loadAfterPolyfill",value:function(e,t,n){var r=this;if("object"===f(t)&&null!==t&&(n=t,t=null),n&&n.logLevel&&(this.logLevel=n.logLevel,Dn.setLogLevel(n.logLevel)),!this.isValidWriteKey(e))throw Error("Unable to load the SDK due to invalid writeKey");if(!this.storage||0===Object.keys(this.storage).length)throw Error("Cannot proceed as no storage is available");n&&n.cookieConsentManager&&(this.cookieConsentOptions=n.cookieConsentManager),this.writeKey=e,this.serverUrl=t,this.options=n;var i={};if(n&&n.setCookieDomain&&(i=a(a({},i),{},{domain:n.setCookieDomain})),n&&"boolean"==typeof n.secureCookie&&(i=a(a({},i),{},{secure:n.secureCookie})),n&&"boolean"==typeof n.sameDomainCookiesOnly&&(i=a(a({},i),{},{sameDomainCookiesOnly:n.sameDomainCookiesOnly})),n&&-1!==Qi.indexOf(n.sameSiteCookie)&&(i=a(a({},i),{},{samesite:n.sameSiteCookie})),this.storage.options(i),n&&"string"==typeof n.uaChTrackLevel&&qi.includes(n.uaChTrackLevel)&&(this.uaChTrackLevel=n.uaChTrackLevel),navigator.userAgentData&&function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"none";"none"===t&&e(void 0),"default"===t&&e(navigator.userAgentData),"full"===t&&navigator.userAgentData.getHighEntropyValues(["architecture","bitness","brands","mobile","model","platform","platformVersion","uaFullVersion","fullVersionList","wow64"]).then((function(t){e(t)}))}((function(e){r.uach=e}),this.uaChTrackLevel),n&&n.integrations&&(o(this.loadOnlyIntegrations,n.integrations),Zi(this.loadOnlyIntegrations)),this.useGlobalIntegrationsConfigInEvents=n&&!0===n.useGlobalIntegrationsConfigInEvents,n&&n.sendAdblockPage&&(this.sendAdblockPage=!0),n&&n.sendAdblockPageOptions&&"object"===f(n.sendAdblockPageOptions)&&(this.sendAdblockPageOptions=n.sendAdblockPageOptions),this.uSession.initialize(n),n&&n.clientSuppliedCallbacks){var s={};Object.keys(this.methodToCallbackMapping).forEach((function(e){r.methodToCallbackMapping.hasOwnProperty(e)&&n.clientSuppliedCallbacks[r.methodToCallbackMapping[e]]&&(s[e]=n.clientSuppliedCallbacks[r.methodToCallbackMapping[e]])})),o(this.clientSuppliedCallbacks,s),this.registerCallbacks(!0)}if(n&&null!=n.loadIntegration&&(this.loadIntegration=!!n.loadIntegration),n&&"boolean"==typeof n.bufferDataPlaneEventsUntilReady&&(this.bufferDataPlaneEventsUntilReady=!0===n.bufferDataPlaneEventsUntilReady,this.bufferDataPlaneEventsUntilReady&&this.preProcessQueue.init(this.options,this.queueEventForDataPlane.bind(this))),n&&"number"==typeof n.dataPlaneEventsBufferTimeout&&(this.dataPlaneEventsBufferTimeout=n.dataPlaneEventsBufferTimeout),n&&void 0!==n.lockIntegrationsVersion&&(this.lockIntegrationsVersion=!0===n.lockIntegrationsVersion),this.initializeUser(n?n.anonymousIdOptions:void 0),this.setInitialPageProperties(),this.destSDKBaseURL=Ls(this.version,this.lockIntegrationsVersion,n&&n.destSDKBaseURL),n&&n.getSourceConfig)if("function"!=typeof n.getSourceConfig)Qn(new Error('option "getSourceConfig" must be a function'));else{var u=n.getSourceConfig();u instanceof Promise?u.then((function(e){return r.processResponse(200,e)})).catch(Qn):this.processResponse(200,u)}else{var c=function(e,t){var n=Gi,r=[];return e&&r.push("writeKey=".concat(e)),t&&r.push("lockIntegrationsVersion=".concat(t)),r.length>0&&(n=(n=Gi.concat(Gi.includes("?")?"&":"?")).concat(r.join("&"))),n}(e,this.lockIntegrationsVersion);n&&n.configUrl&&(c=function(e,t){var n=e;-1===n.indexOf("sourceConfig")&&(n="".concat(Yi(n),"/sourceConfig/")),n="/"===n.slice(-1)?n:"".concat(n,"/");var r=t.split("?")[1],i=n.split("?");return i.length>1&&i[1]!==r?"".concat(i[0],"?").concat(r):"".concat(n,"?").concat(r)}(n.configUrl,c));try{!function(e,t,n,r){var i=r.bind(e),o=new XMLHttpRequest;o.open("GET",t,!0),o.setRequestHeader("Authorization","Basic ".concat(btoa("".concat(n,":")))),o.onload=function(){var e=o.status,n=o.responseText;200===e?i(200,n):(Qn(new Error("".concat(Nn," ").concat(e," for url: ").concat(t))),i(e))},o.send()}(this,c,e,this.processResponse)}catch(e){Qn(e)}}}},{key:"arePolyfillsRequired",value:function(e){return(!e||"boolean"!=typeof e.polyfillIfRequired||e.polyfillIfRequired)&&(!String.prototype.endsWith||!String.prototype.startsWith||!String.prototype.includes||!Array.prototype.find||!Array.prototype.includes||"function"!=typeof window.URL||"undefined"==typeof Promise||!Object.entries||!Object.values||!String.prototype.replaceAll||!this.isDatasetAvailable()||"function"!=typeof TextDecoder||"function"!=typeof TextEncoder)}},{key:"load",value:function(e,t,n){if(!this.loaded){var r=w(n);if(this.arePolyfillsRequired(r)&&Ki){var i="polyfill";Ci(i,Ki,{skipDatasetAttributes:!0});var o=this,s=setInterval((function(){!window.hasOwnProperty(i)&&null===document.getElementById(i)||"undefined"==typeof Promise||(clearInterval(s),o.loadAfterPolyfill(e,t,r))}),100);setTimeout((function(){clearInterval(s)}),Ln)}else this.loadAfterPolyfill(e,t,r)}}},{key:"ready",value:function(e){this.loaded?"function"!=typeof e?Dn.error("ready callback is not a function"):this.clientIntegrationsReady?e():this.readyCallbacks.push(e):this.toBeProcessedArray.push(["ready",e])}},{key:"initializeCallbacks",value:function(){var e=this;Object.keys(this.methodToCallbackMapping).forEach((function(t){e.methodToCallbackMapping.hasOwnProperty(t)&&e.on(t,(function(){}))}))}},{key:"registerCallbacks",value:function(e){var t=this;e||Object.keys(this.methodToCallbackMapping).forEach((function(e){t.methodToCallbackMapping.hasOwnProperty(e)&&window.rudderanalytics&&"function"==typeof window.rudderanalytics[t.methodToCallbackMapping[e]]&&(t.clientSuppliedCallbacks[e]=window.rudderanalytics[t.methodToCallbackMapping[e]])})),Object.keys(this.clientSuppliedCallbacks).forEach((function(e){t.clientSuppliedCallbacks.hasOwnProperty(e)&&t.on(e,t.clientSuppliedCallbacks[e])}))}},{key:"sendSampleRequest",value:function(){Ci("ad-block","//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js",{isNonNativeSDK:!0})}},{key:"startSession",value:function(e){this.uSession.start(e)}},{key:"endSession",value:function(){this.uSession.end()}},{key:"setAuthToken",value:function(e){"string"==typeof e?(this.storage.setAuthToken(e),this.transformationHandler.setAuthToken(e)):Dn.error("Provided input should be in string format")}}])}(),Ws=new qs;v(Ws),window.addEventListener("error",(function(e){Qn(e,void 0,Ws)}),!0),Ws.initializeCallbacks(),Ws.registerCallbacks(!1);var Ys,Xs="load",Js=window.rudderanalytics,$s=Array.isArray(Js);if($s)for(var Zs=0;Zs<Js.length;){if(Js[Zs]&&Js[Zs][0]===Xs){Ys=Js[Zs],Js.splice(Zs,1);break}Zs+=1}!function(e){var t="ajs_trait_",n="ajs_prop_";function r(e,t){var n={};return Object.keys(e).forEach((function(r){r.startsWith(t)&&(n[r.substr(t.length)]=e[r])})),n}var i=function(e){var t={};try{new URL(e).searchParams.forEach((function(e,n){t[n]=e}))}catch(e){}return t}(e);i.ajs_aid&&Ws.toBeProcessedArray.push(["setAnonymousId",i.ajs_aid]),i.ajs_uid&&Ws.toBeProcessedArray.push(["identify",i.ajs_uid,r(i,t)]),i.ajs_event&&Ws.toBeProcessedArray.push(["track",i.ajs_event,r(i,n)])}(window.location.href),$s&&Js.forEach((function(e){return Ws.toBeProcessedArray.push(e)})),Ys&&Ys.length>0&&(Ys.shift(),Ws[Xs].apply(Ws,c(Ys)));var ea=Ws.ready.bind(Ws),ta=Ws.identify.bind(Ws),na=Ws.page.bind(Ws),ra=Ws.track.bind(Ws),ia=Ws.alias.bind(Ws),oa=Ws.group.bind(Ws),sa=Ws.reset.bind(Ws),aa=Ws.load.bind(Ws),ua=Ws.initialized=!0,ca=Ws.getUserId.bind(Ws),la=Ws.getSessionId.bind(Ws),fa=Ws.getUserTraits.bind(Ws),ha=Ws.getAnonymousId.bind(Ws),da=Ws.setAnonymousId.bind(Ws),pa=Ws.getGroupId.bind(Ws),ga=Ws.getGroupTraits.bind(Ws),ya=Ws.startSession.bind(Ws),va=Ws.endSession.bind(Ws),ma=Ws.setAuthToken.bind(Ws);exports.alias=ia,exports.endSession=va,exports.getAnonymousId=ha,exports.getGroupId=pa,exports.getGroupTraits=ga,exports.getSessionId=la,exports.getUserId=ca,exports.getUserTraits=fa,exports.group=oa,exports.identify=ta,exports.initialized=ua,exports.load=aa,exports.page=na,exports.ready=ea,exports.reset=sa,exports.setAnonymousId=da,exports.setAuthToken=ma,exports.startSession=ya,exports.track=ra;
|