rudder-sdk-js 2.31.0 → 2.31.1

Sign up to get free protection for your applications and to get access to all the features.
package/index.js CHANGED
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).rudderanalytics={})}(this,(function(e){"use strict";function t(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 n(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?t(Object(r),!0).forEach((function(t){a(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):t(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function r(e){return r="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},r(e)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(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,f(r.key),r)}}function s(e,t,n){return t&&o(e.prototype,t),n&&o(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function a(e,t,n){return(t=f(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function u(){return u=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u.apply(this,arguments)}function c(e){return function(e){if(Array.isArray(e))return l(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return l(e,t)}(e)||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,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function f(e){var t=function(e,t){if("object"!=typeof e||null===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:String(t)}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function h(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var n=function e(){if(this instanceof e){var n=[null];n.push.apply(n,arguments);var r=Function.bind.apply(t,n);return new r}return t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})})),n}var d={};!function(e){function t(e){if(e)return function(e){for(var n in t.prototype)e[n]=t.prototype[n];return e}(e)}e.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}}({get exports(){return d},set exports(e){d=e}});var p=d,g={};!function(e,t){(t=e.exports=function(e){return e.trim?e.trim():t.right(t.left(e))}).left=function(e){return e.trimLeft?e.trimLeft():e.replace(/^\s\s*/,"")},t.right=function(e){if(e.trimRight)return e.trimRight();for(var t=/\s/,n=e.length;t.test(e.charAt(--n)););return e.slice(0,n+1)}}({get exports(){return g},set exports(e){g=e}},g);var y=g,v=/(\w+)\[(\d+)\]/,m=function(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(t){return e}},I=function(e){if("string"!=typeof e)return{};if(""==(e=y(e)))return{};"?"==e.charAt(0)&&(e=e.slice(1));for(var t={},n=e.split("&"),r=0;r<n.length;r++){var i,o=n[r].split("="),s=m(o[0]);(i=v.exec(s))?(t[i[1]]=t[i[1]]||[],t[i[1]][i[2]]=m(o[1])):t[o[0]]=null==o[1]?"":m(o[1])}return t};function A(e){return null!=e&&"object"===r(e)&&!0===e["@@functional/placeholder"]}function b(e){return function t(n){return 0===arguments.length||A(n)?t:e.apply(this,arguments)}}function k(e){return function t(n,r){switch(arguments.length){case 0:return t;case 1:return A(n)?t:b((function(t){return e(n,t)}));default:return A(n)&&A(r)?t:A(n)?b((function(t){return e(t,r)})):A(r)?b((function(t){return e(n,t)})):e(n,r)}}}function E(e){return function t(n,r,i){switch(arguments.length){case 0:return t;case 1:return A(n)?t:k((function(t,r){return e(n,t,r)}));case 2:return A(n)&&A(r)?t:A(n)?k((function(t,n){return e(t,r,n)})):A(r)?k((function(t,r){return e(n,t,r)})):b((function(t){return e(n,r,t)}));default:return A(n)&&A(r)&&A(i)?t:A(n)&&A(r)?k((function(t,n){return e(t,n,i)})):A(n)&&A(i)?k((function(t,n){return e(t,r,n)})):A(r)&&A(i)?k((function(t,r){return e(n,t,r)})):A(n)?b((function(t){return e(t,r,i)})):A(r)?b((function(t){return e(n,t,i)})):A(i)?b((function(t){return e(n,r,t)})):e(n,r,i)}}}function S(e,t){return Object.prototype.hasOwnProperty.call(t,e)}var C=b((function(e){return null===e?"Null":void 0===e?"Undefined":Object.prototype.toString.call(e).slice(8,-1)}));function w(e){return"[object Object]"===Object.prototype.toString.call(e)}function O(e,t,n){if(n||(n=new T),function(e){var t=r(e);return null==e||"object"!=t&&"function"!=t}(e))return e;var i=function(r){var i=n.get(e);if(i)return i;for(var o in n.set(e,r),e)Object.prototype.hasOwnProperty.call(e,o)&&(r[o]=t?O(e[o],!0,n):e[o]);return r};switch(C(e)){case"Object":return i(Object.create(Object.getPrototypeOf(e)));case"Array":return i([]);case"Date":return new Date(e.valueOf());case"RegExp":return function(e){return new RegExp(e.source,e.flags?e.flags:(e.global?"g":"")+(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.sticky?"y":"")+(e.unicode?"u":"")+(e.dotAll?"s":""))}(e);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 T=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){var i=n[r];if(i[0]===e)return i[1]}else{var o=this.hash(e),s=this.map[o];if(s)for(var a=0;a<s.length;a+=1){var u=s[a];if(u[0]===e)return u[1]}}},e}(),_=b((function(e){return null!=e&&"function"==typeof e.clone?e.clone():O(e,!0)})),R=E((function(e,t,n){var r,i={};for(r in n=n||{},t=t||{})S(r,t)&&(i[r]=S(r,n)?e(r,t[r],n[r]):t[r]);for(r in n)S(r,n)&&!S(r,i)&&(i[r]=n[r]);return i})),P=E((function e(t,n,r){return R((function(n,r,i){return w(r)&&w(i)?e(t,r,i):t(n,r,i)}),n,r)})),L=E((function(e,t,n){return P((function(t,n,r){return e(n,r)}),t,n)})),x=function(e){return null!=e&&"object"===r(e)&&!1===Array.isArray(e)},D=function(e,t,n){if(x(n)||(n={default:n}),!B(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 N(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=M([l.slice(0,-1),a[++c]||""],s,n);if(l in e){if(!N(l,e,n))return n.default;e=e[l]}else{for(var f=!1,h=c+1;h<u;)if(f=(l=M([l,a[h++]],s,n))in e){if(!N(l,e,n))return n.default;e=e[l],c=h-1;break}if(!f)return n.default}}while(++c<u&&B(e));return c===u?e:n.default};function M(e,t,n){return"function"==typeof n.join?n.join(e):e[0]+t+e[1]}function N(e,t,n){return"function"!=typeof n.isValid||n.isValid(e,t)}function B(e){return x(e)||Array.isArray(e)||"function"==typeof e}for(var j,F=256,U=[];F--;)U[F]=(F+256).toString(16).substring(1);for(var G,H=[],z=0;z<256;z++)H[z]=(z+256).toString(16).substring(1);function K(){var e;(!G||z+16>4096)&&(e=4096,G=crypto.getRandomValues(new Uint8Array(e)),z=0);for(var t,n=0,r="";n<16;n++)t=G[z+n],r+=6==n?H[15&t|64]:8==n?H[63&t|128]:H[t],1&n&&n>1&&n<11&&(r+="-");return z+=16,r}var Q,q,V,W,Y,X,J,$,Z,ee,te,ne,re,ie,oe,se,ae,ue,ce,le,fe,he,de,pe,ge,ye,ve,me,Ie,Ae,be,ke,Ee,Se,Ce,we,Oe,Te,_e,Re,Pe,Le,xe,De,Me,Ne,Be,je,Fe,Ue,Ge,He,ze,Ke,Qe,qe,Ve,We,Ye,Xe,Je,$e,Ze,et,tt,nt,rt,it,ot,st,at,ut,ct=4,lt={setLogLevel:function(e){switch(e.toUpperCase()){case"INFO":ct=1;break;case"DEBUG":ct=2;break;case"WARN":ct=3;break;default:ct=4}},info:function(){var e;ct<=1&&(e=console).info.apply(e,arguments)},debug:function(){var e;ct<=2&&(e=console).log.apply(e,arguments)},warn:function(){var e;ct<=3&&(e=console).warn.apply(e,arguments)},error:function(){var e;ct<=4&&(e=console).error.apply(e,arguments)}},ft="ADOBE_ANALYTICS",ht=(Q={"Adobe Analytics":ft,ADOBEANALYTICS:ft,"ADOBE ANALYTICS":ft},a(Q,ft,ft),a(Q,"AdobeAnalytics",ft),a(Q,"adobeanalytics",ft),a(Q,"adobe analytics",ft),a(Q,"Adobe analytics",ft),a(Q,"adobe Analytics",ft),Q),dt="AM",pt=(q={},a(q,dt,dt),a(q,"AMPLITUDE",dt),a(q,"Amplitude",dt),a(q,"am",dt),q),gt="APPCUES",yt=(V={},a(V,gt,gt),a(V,"Appcues",gt),a(V,"App Cues",gt),a(V,"appcues",gt),V),vt="BINGADS",mt=(W={},a(W,vt,vt),a(W,"BingAds",vt),a(W,"bingads",vt),a(W,"Bing Ads",vt),a(W,"Bing ads",vt),a(W,"bing Ads",vt),a(W,"bing ads",vt),W),It="BRAZE",At=(Y={},a(Y,It,It),a(Y,"Braze",It),a(Y,"braze",It),Y),bt="BUGSNAG",kt=(X={},a(X,bt,bt),a(X,"bugsnag",bt),a(X,"Bugsnag",bt),X),Et="CHARTBEAT",St=(J={},a(J,Et,Et),a(J,"Chartbeat",Et),a(J,"chartbeat",Et),a(J,"Chart Beat",Et),a(J,"chart beat",Et),J),Ct="CLEVERTAP",wt=($={},a($,Ct,Ct),a($,"Clevertap",Ct),a($,"clevertap",Ct),$),Ot="COMSCORE",Tt=(Z={},a(Z,Ot,Ot),a(Z,"Comscore",Ot),a(Z,"Com Score",Ot),a(Z,"com Score",Ot),a(Z,"com score",Ot),a(Z,"Com score",Ot),Z),_t="CRITEO",Rt=(ee={},a(ee,_t,_t),a(ee,"Criteo",_t),a(ee,"criteo",_t),ee),Pt="CUSTOMERIO",Lt=(te={},a(te,Pt,Pt),a(te,"Customerio",Pt),a(te,"Customer.io",Pt),a(te,"CUSTOMER.IO",Pt),a(te,"customer.io",Pt),te),xt="DRIP",Dt=(ne={},a(ne,xt,xt),a(ne,"Drip",xt),a(ne,"drip",xt),ne),Mt="FACEBOOK_PIXEL",Nt=(re={},a(re,Mt,Mt),a(re,"FB Pixel",Mt),a(re,"Facebook Pixel",Mt),a(re,"facebook pixel",Mt),a(re,"fbpixel",Mt),a(re,"FBPIXEL",Mt),a(re,"FB_PIXEL",Mt),re),Bt="FULLSTORY",jt=(a(ie={},Bt,Bt),a(ie,"Fullstory",Bt),a(ie,"FullStory",Bt),a(ie,"full Story",Bt),a(ie,"Full Story",Bt),a(ie,"Full story",Bt),a(ie,"full story",Bt),a(ie,"fullstory",Bt),ie),Ft="GA",Ut=(a(oe={},Ft,Ft),a(oe,"Google Analytics",Ft),a(oe,"GoogleAnalytics",Ft),a(oe,"GOOGLE ANALYTICS",Ft),a(oe,"google analytics",Ft),oe),Gt="GA4",Ht=(a(se={},Gt,Gt),a(se,"Google Analytics 4",Gt),a(se,"Google analytics 4",Gt),a(se,"google analytics 4",Gt),a(se,"Google Analytics4",Gt),a(se,"Google analytics4",Gt),a(se,"google analytics4",Gt),a(se,"GoogleAnalytics4",Gt),se),zt="GOOGLEADS",Kt=(a(ae={},zt,zt),a(ae,"Google Ads",zt),a(ae,"GoogleAds",zt),a(ae,"GOOGLE ADS",zt),a(ae,"google ads",zt),a(ae,"googleads",zt),ae),Qt="GOOGLE_OPTIMIZE",qt=(a(ue={},Qt,Qt),a(ue,"Google Optimize",Qt),a(ue,"GoogleOptimize",Qt),a(ue,"Googleoptimize",Qt),a(ue,"GOOGLEOPTIMIZE",Qt),a(ue,"google optimize",Qt),a(ue,"Google optimize",Qt),a(ue,"GOOGLE OPTIMIZE",Qt),ue),Vt="GTM",Wt=(a(ce={},Vt,Vt),a(ce,"Google Tag Manager",Vt),a(ce,"google tag manager",Vt),a(ce,"googletag manager",Vt),a(ce,"googletagmanager",Vt),ce),Yt="HEAP",Xt=(a(le={},Yt,Yt),a(le,"Heap",Yt),a(le,"heap",Yt),a(le,"Heap.io",Yt),le),Jt="HOTJAR",$t=(a(fe={},Jt,Jt),a(fe,"Hotjar",Jt),a(fe,"hotjar",Jt),a(fe,"Hot Jar",Jt),a(fe,"hot jar",Jt),fe),Zt="HS",en=(a(he={},Zt,Zt),a(he,"Hubspot",Zt),a(he,"HUBSPOT",Zt),a(he,"hub spot",Zt),a(he,"Hub Spot",Zt),a(he,"Hub spot",Zt),he),tn="INTERCOM",nn=(a(de={},tn,tn),a(de,"Intercom",tn),a(de,"intercom",tn),de),rn="KEEN",on=(a(pe={},rn,rn),a(pe,"Keen",rn),a(pe,"Keen.io",rn),a(pe,"keen",rn),a(pe,"keen.io",rn),pe),sn="KISSMETRICS",an=(a(ge={},sn,sn),a(ge,"Kissmetrics",sn),a(ge,"kissmetrics",sn),ge),un="KLAVIYO",cn=(a(ye={},un,un),a(ye,"Klaviyo",un),a(ye,"klaviyo",un),ye),ln="LAUNCHDARKLY",fn=(a(ve={},ln,ln),a(ve,"LaunchDarkly",ln),a(ve,"Launch_Darkly",ln),a(ve,"Launch Darkly",ln),a(ve,"launchDarkly",ln),a(ve,"launch darkly",ln),ve),hn="LINKEDIN_INSIGHT_TAG",dn=(a(me={},hn,hn),a(me,"LinkedIn Insight Tag",hn),a(me,"LinkedIn insight tag",hn),a(me,"linkedIn insight tag",hn),a(me,"Linkedin_insight_tag",hn),a(me,"LinkedinInsighttag",hn),a(me,"LinkedinInsightTag",hn),a(me,"LinkedInInsightTag",hn),a(me,"Linkedininsighttag",hn),a(me,"LINKEDININSIGHTTAG",hn),a(me,"linkedininsighttag",hn),me),pn="LOTAME",gn=(a(Ie={},pn,pn),a(Ie,"Lotame",pn),a(Ie,"lotame",pn),Ie),yn="LYTICS",vn=(a(Ae={},yn,yn),a(Ae,"Lytics",yn),a(Ae,"lytics",yn),Ae),mn="MP",In=(a(be={},mn,mn),a(be,"MIXPANEL",mn),a(be,"Mixpanel",mn),a(be,"MIX PANEL",mn),a(be,"Mix panel",mn),a(be,"Mix Panel",mn),be),An="MOENGAGE",bn=(a(ke={},An,An),a(ke,"MoEngage",An),a(ke,"moengage",An),a(ke,"Moengage",An),a(ke,"Mo Engage",An),a(ke,"mo engage",An),a(ke,"Mo engage",An),ke),kn="OPTIMIZELY",En=(a(Ee={},kn,kn),a(Ee,"Optimizely",kn),a(Ee,"optimizely",kn),Ee),Sn="PENDO",Cn=(a(Se={},Sn,Sn),a(Se,"Pendo",Sn),a(Se,"pendo",Sn),Se),wn="PINTEREST_TAG",On=(a(Ce={},wn,wn),a(Ce,"PinterestTag",wn),a(Ce,"Pinterest_Tag",wn),a(Ce,"PINTERESTTAG",wn),a(Ce,"pinterest",wn),a(Ce,"PinterestAds",wn),a(Ce,"Pinterest_Ads",wn),a(Ce,"Pinterest",wn),a(Ce,"Pinterest Tag",wn),a(Ce,"Pinterest tag",wn),a(Ce,"PINTEREST TAG",wn),a(Ce,"pinterest tag",wn),a(Ce,"Pinterest Ads",wn),a(Ce,"Pinterest ads",wn),Ce),Tn="POST_AFFILIATE_PRO",_n=(a(we={},Tn,Tn),a(we,"PostAffiliatePro",Tn),a(we,"Post_affiliate_pro",Tn),a(we,"Post Affiliate Pro",Tn),a(we,"Post affiliate pro",Tn),a(we,"post affiliate pro",Tn),a(we,"postaffiliatepro",Tn),a(we,"POSTAFFILIATEPRO",Tn),we),Rn="POSTHOG",Pn=(a(Oe={},Rn,Rn),a(Oe,"PostHog",Rn),a(Oe,"Posthog",Rn),a(Oe,"posthog",Rn),a(Oe,"Post Hog",Rn),a(Oe,"Post hog",Rn),a(Oe,"post hog",Rn),Oe),Ln="PROFITWELL",xn=(a(Te={},Ln,Ln),a(Te,"ProfitWell",Ln),a(Te,"profitwell",Ln),a(Te,"Profitwell",Ln),a(Te,"Profit Well",Ln),a(Te,"profit well",Ln),a(Te,"Profit well",Ln),Te),Dn="QUALTRICS",Mn=(a(_e={},Dn,Dn),a(_e,"Qualtrics",Dn),a(_e,"qualtrics",Dn),_e),Nn="QUANTUMMETRIC",Bn=(a(Re={},Nn,Nn),a(Re,"Quantum Metric",Nn),a(Re,"quantum Metric",Nn),a(Re,"quantum metric",Nn),a(Re,"QuantumMetric",Nn),a(Re,"quantumMetric",Nn),a(Re,"quantummetric",Nn),a(Re,"Quantum_Metric",Nn),Re),jn="REDDIT_PIXEL",Fn=(a(Pe={},jn,jn),a(Pe,"Reddit_Pixel",jn),a(Pe,"RedditPixel",jn),a(Pe,"REDDITPIXEL",jn),a(Pe,"redditpixel",jn),a(Pe,"Reddit Pixel",jn),a(Pe,"REDDIT PIXEL",jn),a(Pe,"reddit pixel",jn),Pe),Un="SENTRY",Gn=(a(Le={},Un,Un),a(Le,"sentry",Un),a(Le,"Sentry",Un),Le),Hn="SNAP_PIXEL",zn=(a(xe={},Hn,Hn),a(xe,"Snap_Pixel",Hn),a(xe,"SnapPixel",Hn),a(xe,"SNAPPIXEL",Hn),a(xe,"snappixel",Hn),a(xe,"Snap Pixel",Hn),a(xe,"SNAP PIXEL",Hn),a(xe,"snap pixel",Hn),xe),Kn="TVSQUARED",Qn=(a(De={},Kn,Kn),a(De,"TVSquared",Kn),a(De,"tvsquared",Kn),a(De,"tvSquared",Kn),a(De,"TvSquared",Kn),a(De,"Tvsquared",Kn),a(De,"TV Squared",Kn),a(De,"tv squared",Kn),a(De,"tv Squared",Kn),De),qn="VWO",Vn=(a(Me={},qn,qn),a(Me,"VisualWebsiteOptimizer",qn),a(Me,"Visualwebsiteoptimizer",qn),a(Me,"visualwebsiteoptimizer",qn),a(Me,"vwo",qn),a(Me,"Visual Website Optimizer",qn),a(Me,"Visual website optimizer",qn),a(Me,"visual website optimizer",qn),Me),Wn="GA360",Yn=(a(Ne={},Wn,Wn),a(Ne,"Google Analytics 360",Wn),a(Ne,"Google analytics 360",Wn),a(Ne,"google analytics 360",Wn),a(Ne,"Google Analytics360",Wn),a(Ne,"Google analytics360",Wn),a(Ne,"google analytics360",Wn),a(Ne,"GoogleAnalytics360",Wn),a(Ne,"GA 360",Wn),Ne),Xn="ADROLL",Jn=(a(Be={},Xn,Xn),a(Be,"Adroll",Xn),a(Be,"Ad roll",Xn),a(Be,"ad roll",Xn),a(Be,"adroll",Xn),Be),$n="DCM_FLOODLIGHT",Zn=(a(je={},$n,$n),a(je,"DCM Floodlight",$n),a(je,"dcm floodlight",$n),a(je,"Dcm Floodlight",$n),a(je,"DCMFloodlight",$n),a(je,"dcmfloodlight",$n),a(je,"DcmFloodlight",$n),a(je,"dcm_floodlight",$n),a(je,"DCM_Floodlight",$n),je),er="MATOMO",tr=(a(Fe={},er,er),a(Fe,"Matomo",er),a(Fe,"matomo",er),Fe),nr="VERO",rr=(a(Ue={},nr,nr),a(Ue,"Vero",nr),a(Ue,"vero",nr),Ue),ir="MOUSEFLOW",or=(a(Ge={},ir,ir),a(Ge,"Mouseflow",ir),a(Ge,"mouseflow",ir),a(Ge,"mouseFlow",ir),a(Ge,"MouseFlow",ir),a(Ge,"Mouse flow",ir),a(Ge,"mouse flow",ir),a(Ge,"mouse Flow",ir),a(Ge,"Mouse Flow",ir),Ge),sr="ROCKERBOX",ar=(a(He={},sr,sr),a(He,"Rockerbox",sr),a(He,"rockerbox",sr),a(He,"RockerBox",sr),a(He,"Rocker box",sr),a(He,"rocker box",sr),a(He,"Rocker Box",sr),He),ur="CONVERTFLOW",cr=(a(ze={},ur,ur),a(ze,"Convertflow",ur),a(ze,"convertflow",ur),a(ze,"convertFlow",ur),a(ze,"ConvertFlow",ur),a(ze,"Convert flow",ur),a(ze,"convert flow",ur),a(ze,"convert Flow",ur),a(ze,"Convert Flow",ur),a(ze,"CONVERT FLOW",ur),ze),lr="SNAPENGAGE",fr=(a(Ke={},lr,lr),a(Ke,"SnapEngage",lr),a(Ke,"Snap_Engage",lr),a(Ke,"snapengage",lr),a(Ke,"SNAP ENGAGE",lr),a(Ke,"Snap Engage",lr),a(Ke,"snap engage",lr),Ke),hr="LIVECHAT",dr=(a(Qe={},hr,hr),a(Qe,"LiveChat",hr),a(Qe,"Live_Chat",hr),a(Qe,"livechat",hr),a(Qe,"LIVE CHAT",hr),a(Qe,"Live Chat",hr),a(Qe,"live chat",hr),Qe),pr="SHYNET",gr=(a(qe={},pr,pr),a(qe,"shynet",pr),a(qe,"ShyNet",pr),a(qe,"shyNet",pr),a(qe,"Shynet",pr),a(qe,"shy net",pr),a(qe,"Shy Net",pr),a(qe,"shy Net",pr),a(qe,"Shy net",pr),qe),yr="WOOPRA",vr=(a(Ve={},yr,yr),a(Ve,"Woopra",yr),a(Ve,"woopra",yr),Ve),mr="ROLLBAR",Ir=(a(We={},mr,mr),a(We,"RollBar",mr),a(We,"Roll_Bar",mr),a(We,"rollbar",mr),a(We,"Rollbar",mr),a(We,"ROLL BAR",mr),a(We,"Roll Bar",mr),a(We,"roll bar",mr),We),Ar="QUORA_PIXEL",br=(a(Ye={},Ar,Ar),a(Ye,"Quora Pixel",Ar),a(Ye,"Quora pixel",Ar),a(Ye,"QUORA PIXEL",Ar),a(Ye,"QuoraPixel",Ar),a(Ye,"Quorapixel",Ar),a(Ye,"QUORAPIXEL",Ar),a(Ye,"Quora_Pixel",Ar),a(Ye,"quora_pixel",Ar),a(Ye,"Quora",Ar),Ye),kr="JUNE",Er=(a(Xe={},kr,kr),a(Xe,"June",kr),a(Xe,"june",kr),Xe),Sr="ENGAGE",Cr=(a(Je={},Sr,Sr),a(Je,"Engage",Sr),a(Je,"engage",Sr),Je),wr="ITERABLE",Or=(a($e={},wr,wr),a($e,"Iterable",wr),a($e,"iterable",wr),$e),Tr="YANDEX_METRICA",_r=(a(Ze={},Tr,Tr),a(Ze,"Yandexmetrica",Tr),a(Ze,"yandexmetrica",Tr),a(Ze,"yandexMetrica",Tr),a(Ze,"YandexMetrica",Tr),Ze),Rr="REFINER",Pr=(a(et={},Rr,Rr),a(et,"Refiner",Rr),a(et,"refiner",Rr),et),Lr="QUALAROO",xr=(a(tt={},Lr,Lr),a(tt,"Qualaroo",Lr),a(tt,"qualaroo",Lr),tt),Dr="PODSIGHTS",Mr=(a(nt={},Dr,Dr),a(nt,"Podsights",Dr),a(nt,"PodSights",Dr),a(nt,"pod Sights",Dr),a(nt,"Pod Sights",Dr),a(nt,"pod sights",Dr),a(nt,"POD SIGHTS",Dr),a(nt,"Pod sights",Dr),nt),Nr="AXEPTIO",Br=(a(rt={},Nr,Nr),a(rt,"Axeptio",Nr),a(rt,"axeptio",Nr),rt),jr="SATISMETER",Fr=(a(it={},jr,jr),a(it,"Satismeter",jr),a(it,"SatisMeter",jr),a(it,"SATISMETER",jr),it),Ur="MICROSOFT_CLARITY",Gr=(a(ot={},Ur,Ur),a(ot,"Microsoft Clarity",Ur),a(ot,"Microsoft clarity",Ur),a(ot,"microsoft clarity",Ur),a(ot,"Microsoft_clarity",Ur),a(ot,"MicrosoftClarity",Ur),a(ot,"MICROSOFTCLARITY",Ur),a(ot,"microsoftclarity",Ur),a(ot,"microsoftClarity",Ur),ot),Hr="SENDINBLUE",zr=(a(st={},Hr,Hr),a(st,"Sendinblue",Hr),a(st,"sendinblue",Hr),a(st,"SendinBlue",Hr),st),Kr="OLARK",Qr=(a(at={},Kr,Kr),a(at,"Olark",Kr),a(at,"olark",Kr),at),qr="LEMNISK",Vr=(a(ut={},qr,qr),a(ut,"LEMNISK_MARKETING_AUTOMATION",qr),a(ut,"Lemnisk Marketing Automation",qr),a(ut,"LemniskMarketingAutomation",qr),a(ut,"lemniskmarketingautomation",qr),a(ut,"lemniskMarketingAutomation",qr),a(ut,"lemnisk",qr),a(ut,"Lemnisk",qr),ut),Wr=n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n({All:"All"},ht),pt),yt),mt),At),kt),St),wt),Tt),Rt),Lt),Dt),Nt),jt),Ut),Ht),Yn),Kt),qt),Wt),Xt),$t),en),nn),on),an),cn),fn),dn),gn),vn),In),bn),En),Cn),On),_n),Pn),xn),Mn),Bn),Fn),Gn),zn),Qn),Vn),Jn),Zn),tr),rr),or),cr),fr),dr),gr),vr),Ir),br),Er),Cr),Or),ar),_r),Pr),xr),Mr),Br),Fr),Gr),zr),Qr),Vr),Yr={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",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"},Xr=["anonymous_id","id","sent_at","received_at","timestamp","original_timestamp","event_text","event"],Jr="https://api.rudderlabs.com/sourceConfig/?p=npm&v=2.31.0",$r="v1.1",Zr="js-integrations",ei="".concat("https://cdn.rudderlabs.com","/").concat($r,"/").concat(Zr),ti=1e4,ni=1e3,ri="_RS",ii=["Lax","None","Strict"],oi=["US","EU"],si=["oneTrust"],ai=["library","consentManagement"],ui=["none","default","full"];function ci(e){var t=window.rudderanalytics&&window.rudderanalytics.errorReporting;t&&t.notify(e)}function li(e,t,n){var r;try{r=function(e,t,n){var r;try{r="string"==typeof e?e:e instanceof Error||e.message?e.message:JSON.stringify(e)}catch(e){r=""}if(e instanceof Event){if(e.target&&"script"!==e.target.localName)return"";if(e.target.dataset&&("RS_JS_SDK"!==e.target.dataset.loader||"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,'"')}(e,t,n)}catch(t){lt.error("[handleError] Exception:: ",t),lt.error("[handleError] Original error:: ",JSON.stringify(e)),ci(t)}if(r){lt.error(r);var i=e;e instanceof Error||(i=new Error(r)),ci(i)}}function fi(e,t){if(null!=t)return t}function hi(e){return e&&e.endsWith("/")?e.replace(/\/+$/,""):e}function di(){return window.crypto&&"function"==typeof window.crypto.getRandomValues?K():function(){var e,t=0,n="";if(!j||F+16>256){for(j=Array(t=256);t--;)j[t]=256*Math.random()|0;t=F=0}for(;t<16;t++)e=j[F+t],n+=6==t?U[15&e|64]:8==t?U[63&e|128]:U[e],1&t&&t>1&&t<11&&(n+="-");return F++,n}()}function pi(){return(new Date).toISOString()}function gi(e,t){Object.keys(e).forEach((function(n){e.hasOwnProperty(n)&&(t[n]&&(e[t[n]]=e[n]),"All"!=n&&null!=t[n]&&t[n]!=n&&delete e[n])}))}function yi(e){gi(e,Wr)}function vi(e){gi(e,Yr)}function mi(e,t){var n=[];if(!t||0===t.length)return n;var i=!0;void 0!==e.All&&(i=e.All);var o=[];return"string"==typeof t[0]?t.forEach((function(e){o.push({intgName:e,intObj:e})})):"object"===r(t[0])&&t.forEach((function(e){o.push({intgName:e.name,intObj:e})})),o.forEach((function(t){var r=t.intgName,o=t.intObj;if(i){var s=!0;null!=e[r]&&0==e[r]&&(s=!1),s&&n.push(o)}else null!=e[r]&&1==e[r]&&n.push(o)})),n}var Ii=function(){for(var e,t=document.getElementsByTagName("script"),n=!1,r=0;r<t.length;r+=1){var i=hi(t[r].getAttribute("src"));if(i){var o=i.match(/^.*rudder-analytics(-staging)?(\.min)?\.js$/);if(o){e=i,n=void 0!==o[1];break}}}return{sdkURL:e,isStaging:n}},Ai=function(e){return"string"==typeof e||null==e?e:JSON.stringify(e)},bi=function(e){return!(!e||"string"!=typeof e||0===e.trim().length)},ki=function(e,t,n){try{var r=e.source.dataplanes||{};if(Object.keys(r).length){var i=function(e){var t=e?e.residencyServer:void 0;if(t)return"string"==typeof t&&oi.includes(t.toUpperCase())?t.toUpperCase():void lt.error("Invalid residencyServer input")}(n),o=r[i]||r.US;if(o){var s=function(e){if(Array.isArray(e)&&e.length){var t=e.find((function(e){return!0===e.default}));if(t&&bi(t.url))return t.url}}(o);if(s)return s}}if(bi(t))return t;throw Error("Unable to load the SDK due to invalid data plane url")}catch(e){throw Error(e)}},Ei={};!function(e){function t(e){switch(e){case"http:":return 80;case"https:":return 443;default:return location.port}}e.parse=function(e){var n=document.createElement("a");return n.href=e,{href:n.href,host:n.host||location.host,port:"0"===n.port||""===n.port?t(n.protocol):n.port,hash:n.hash,hostname:n.hostname||location.hostname,pathname:"/"!=n.pathname.charAt(0)?"/"+n.pathname:n.pathname,protocol:n.protocol&&":"!=n.protocol?n.protocol:location.protocol,search:n.search,query:n.search.slice(1)}},e.isAbsolute=function(e){return 0==e.indexOf("//")||!!~e.indexOf("://")},e.isRelative=function(t){return!e.isAbsolute(t)},e.isCrossDomain=function(t){t=e.parse(t);var n=e.parse(window.location.href);return t.hostname!==n.hostname||t.port!==n.port||t.protocol!==n.protocol}}(Ei);var Si,Ci={},wi={},Oi={get exports(){return wi},set exports(e){wi=e}};function Ti(){return Si||(Si=1,function(e,t){var n;e.exports=(n=n||function(e,t){var n=Object.create||function(){function e(){}return function(t){var n;return e.prototype=t,n=new e,e.prototype=null,n}}(),r={},i=r.lib={},o=i.Base={extend:function(e){var t=n(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)}},s=i.WordArray=o.extend({init:function(e,n){e=this.words=e||[],this.sigBytes=n!=t?n:4*e.length},toString:function(e){return(e||u).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(o=0;o<i;o+=4)t[r+o>>>2]=n[o>>>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=o.clone.call(this);return e.words=this.words.slice(0),e},random:function(t){for(var n,r=[],i=function(t){var n=987654321,r=4294967295;return function(){var i=((n=36969*(65535&n)+(n>>16)&r)<<16)+(t=18e3*(65535&t)+(t>>16)&r)&r;return i/=4294967296,(i+=.5)*(e.random()>.5?1:-1)}},o=0;o<t;o+=4){var a=i(4294967296*(n||e.random()));n=987654071*a(),r.push(4294967296*a()|0)}return new s.init(r,t)}}),a=r.enc={},u=a.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 s.init(n,t/2)}},c=a.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 s.init(n,t)}},l=a.Utf8={stringify:function(e){try{return decodeURIComponent(escape(c.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return c.parse(unescape(encodeURIComponent(e)))}},f=i.BufferedBlockAlgorithm=o.extend({reset:function(){this._data=new s.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=l.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var n=this._data,r=n.words,i=n.sigBytes,o=this.blockSize,a=i/(4*o),u=(a=t?e.ceil(a):e.max((0|a)-this._minBufferSize,0))*o,c=e.min(4*u,i);if(u){for(var l=0;l<u;l+=o)this._doProcessBlock(r,l);var f=r.splice(0,u);n.sigBytes-=c}return new s.init(f,c)},clone:function(){var e=o.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0});i.Hasher=f.extend({cfg:o.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){f.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 h.HMAC.init(e,n).finalize(t)}}});var h=r.algo={};return r}(Math),n)}(Oi)),wi}var _i,Ri={},Pi={get exports(){return Ri},set exports(e){Ri=e}};function Li(){return _i||(_i=1,function(e,t){var n;e.exports=(n=Ti(),function(){var e=n,t=e.lib.WordArray;function r(e,n,r){for(var i=[],o=0,s=0;s<n;s++)if(s%4){var a=r[e.charCodeAt(s-1)]<<s%4*2,u=r[e.charCodeAt(s)]>>>6-s%4*2;i[o>>>2]|=(a|u)<<24-o%4*8,o++}return t.create(i,o)}e.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+/="}}(),n.enc.Base64)}(Pi)),Ri}var xi,Di={},Mi={get exports(){return Di},set exports(e){Di=e}};function Ni(){return xi||(xi=1,function(e,t){var n;e.exports=(n=Ti(),function(e){var t=n,r=t.lib,i=r.WordArray,o=r.Hasher,s=t.algo,a=[];!function(){for(var t=0;t<64;t++)a[t]=4294967296*e.abs(e.sin(t+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],S=e[t+13],C=e[t+14],w=e[t+15],O=o[0],T=o[1],_=o[2],R=o[3];O=c(O,T,_,R,s,7,a[0]),R=c(R,O,T,_,u,12,a[1]),_=c(_,R,O,T,d,17,a[2]),T=c(T,_,R,O,p,22,a[3]),O=c(O,T,_,R,g,7,a[4]),R=c(R,O,T,_,y,12,a[5]),_=c(_,R,O,T,v,17,a[6]),T=c(T,_,R,O,m,22,a[7]),O=c(O,T,_,R,I,7,a[8]),R=c(R,O,T,_,A,12,a[9]),_=c(_,R,O,T,b,17,a[10]),T=c(T,_,R,O,k,22,a[11]),O=c(O,T,_,R,E,7,a[12]),R=c(R,O,T,_,S,12,a[13]),_=c(_,R,O,T,C,17,a[14]),O=l(O,T=c(T,_,R,O,w,22,a[15]),_,R,u,5,a[16]),R=l(R,O,T,_,v,9,a[17]),_=l(_,R,O,T,k,14,a[18]),T=l(T,_,R,O,s,20,a[19]),O=l(O,T,_,R,y,5,a[20]),R=l(R,O,T,_,b,9,a[21]),_=l(_,R,O,T,w,14,a[22]),T=l(T,_,R,O,g,20,a[23]),O=l(O,T,_,R,A,5,a[24]),R=l(R,O,T,_,C,9,a[25]),_=l(_,R,O,T,p,14,a[26]),T=l(T,_,R,O,I,20,a[27]),O=l(O,T,_,R,S,5,a[28]),R=l(R,O,T,_,d,9,a[29]),_=l(_,R,O,T,m,14,a[30]),O=f(O,T=l(T,_,R,O,E,20,a[31]),_,R,y,4,a[32]),R=f(R,O,T,_,I,11,a[33]),_=f(_,R,O,T,k,16,a[34]),T=f(T,_,R,O,C,23,a[35]),O=f(O,T,_,R,u,4,a[36]),R=f(R,O,T,_,g,11,a[37]),_=f(_,R,O,T,m,16,a[38]),T=f(T,_,R,O,b,23,a[39]),O=f(O,T,_,R,S,4,a[40]),R=f(R,O,T,_,s,11,a[41]),_=f(_,R,O,T,p,16,a[42]),T=f(T,_,R,O,v,23,a[43]),O=f(O,T,_,R,A,4,a[44]),R=f(R,O,T,_,E,11,a[45]),_=f(_,R,O,T,w,16,a[46]),O=h(O,T=f(T,_,R,O,d,23,a[47]),_,R,s,6,a[48]),R=h(R,O,T,_,m,10,a[49]),_=h(_,R,O,T,C,15,a[50]),T=h(T,_,R,O,y,21,a[51]),O=h(O,T,_,R,E,6,a[52]),R=h(R,O,T,_,p,10,a[53]),_=h(_,R,O,T,b,15,a[54]),T=h(T,_,R,O,u,21,a[55]),O=h(O,T,_,R,I,6,a[56]),R=h(R,O,T,_,w,10,a[57]),_=h(_,R,O,T,v,15,a[58]),T=h(T,_,R,O,S,21,a[59]),O=h(O,T,_,R,g,6,a[60]),R=h(R,O,T,_,k,10,a[61]),_=h(_,R,O,T,d,15,a[62]),T=h(T,_,R,O,A,21,a[63]),o[0]=o[0]+O|0,o[1]=o[1]+T|0,o[2]=o[2]+_|0,o[3]=o[3]+R|0},_doFinalize:function(){var t=this._data,n=t.words,r=8*this._nDataBytes,i=8*t.sigBytes;n[i>>>5]|=128<<24-i%32;var o=e.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),t.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}t.MD5=o._createHelper(u),t.HmacMD5=o._createHmacHelper(u)}(Math),n.MD5)}(Mi)),Di}var Bi,ji={},Fi={get exports(){return ji},set exports(e){ji=e}},Ui={},Gi={get exports(){return Ui},set exports(e){Ui=e}};function Hi(){return Bi||(Bi=1,function(e,t){var n,r,i,o,s,a,u,c;e.exports=(c=Ti(),r=(n=c).lib,i=r.WordArray,o=r.Hasher,s=n.algo,a=[],u=s.SHA1=o.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var n=this._hash.words,r=n[0],i=n[1],o=n[2],s=n[3],u=n[4],c=0;c<80;c++){if(c<16)a[c]=0|e[t+c];else{var l=a[c-3]^a[c-8]^a[c-14]^a[c-16];a[c]=l<<1|l>>>31}var f=(r<<5|r>>>27)+u+a[c];f+=c<20?1518500249+(i&o|~i&s):c<40?1859775393+(i^o^s):c<60?(i&o|i&s|o&s)-1894007588:(i^o^s)-899497514,u=s,s=o,o=i<<30|i>>>2,i=r,r=f}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+o|0,n[3]=n[3]+s|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=o.clone.call(this);return e._hash=this._hash.clone(),e}}),n.SHA1=o._createHelper(u),n.HmacSHA1=o._createHmacHelper(u),c.SHA1)}(Gi)),Ui}var zi,Ki,Qi={},qi={get exports(){return Qi},set exports(e){Qi=e}};function Vi(){return Ki||(Ki=1,function(e,t){var n,r,i,o,s,a,u,c;e.exports=(c=Ti(),Hi(),zi||(zi=1,function(e,t){var n;e.exports=(n=Ti(),void function(){var e=n,t=e.lib.Base,r=e.enc.Utf8;e.algo.HMAC=t.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))}})}())}(qi)),r=(n=c).lib,i=r.Base,o=r.WordArray,s=n.algo,a=s.MD5,u=s.EvpKDF=i.extend({cfg:i.extend({keySize:4,hasher:a,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var n=this.cfg,r=n.hasher.create(),i=o.create(),s=i.words,a=n.keySize,u=n.iterations;s.length<a;){c&&r.update(c);var c=r.update(e).finalize(t);r.reset();for(var l=1;l<u;l++)c=r.finalize(c),r.reset();i.concat(c)}return i.sigBytes=4*a,i}}),n.EvpKDF=function(e,t,n){return u.create(n).compute(e,t)},c.EvpKDF)}(Fi)),ji}var Wi,Yi={},Xi={get exports(){return Yi},set exports(e){Yi=e}};!function(e,t){var n;e.exports=(n=Ti(),Li(),Ni(),Vi(),Wi||(Wi=1,function(e,t){var n;e.exports=(n=Ti(),Vi(),void(n.lib.Cipher||function(e){var t=n,r=t.lib,i=r.Base,o=r.WordArray,s=r.BufferedBlockAlgorithm,a=t.enc;a.Utf8;var u=a.Base64,c=t.algo.EvpKDF,l=r.Cipher=s.extend({cfg:i.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(){s.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?I:v}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)}}}}()});r.StreamCipher=l.extend({_doFinalize:function(){return this._process(!0)},blockSize:1});var f=t.mode={},h=r.BlockCipherMode=i.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}}),d=f.CBC=function(){var t=h.extend();function n(t,n,r){var i=this._iv;if(i){var o=i;this._iv=e}else o=this._prevBlock;for(var s=0;s<r;s++)t[n+s]^=o[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}(),p=(t.pad={}).Pkcs7={pad:function(e,t){for(var n=4*t,r=n-e.sigBytes%n,i=r<<24|r<<16|r<<8|r,s=[],a=0;a<r;a+=4)s.push(i);var u=o.create(s,r);e.concat(u)},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}};r.BlockCipher=l.extend({cfg:l.cfg.extend({mode:d,padding:p}),reset:function(){l.reset.call(this);var e=this.cfg,t=e.iv,n=e.mode;if(this._xformMode==this._ENC_XFORM_MODE)var r=n.createEncryptor;else r=n.createDecryptor,this._minBufferSize=1;this._mode&&this._mode.__creator==r?this._mode.init(this,t&&t.words):(this._mode=r.call(n,this,t&&t.words),this._mode.__creator=r)},_doProcessBlock:function(e,t){this._mode.processBlock(e,t)},_doFinalize:function(){var e=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){e.pad(this._data,this.blockSize);var t=this._process(!0)}else t=this._process(!0),e.unpad(t);return t},blockSize:4});var g=r.CipherParams=i.extend({init:function(e){this.mixIn(e)},toString:function(e){return(e||this.formatter).stringify(this)}}),y=(t.format={}).OpenSSL={stringify:function(e){var t=e.ciphertext,n=e.salt;if(n)var r=o.create([1398893684,1701076831]).concat(n).concat(t);else r=t;return r.toString(u)},parse:function(e){var t=u.parse(e),n=t.words;if(1398893684==n[0]&&1701076831==n[1]){var r=o.create(n.slice(2,4));n.splice(0,4),t.sigBytes-=16}return g.create({ciphertext:t,salt:r})}},v=r.SerializableCipher=i.extend({cfg:i.extend({format:y}),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 g.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}}),m=(t.kdf={}).OpenSSL={execute:function(e,t,n,r){r||(r=o.random(8));var i=c.create({keySize:t+n}).compute(e,r),s=o.create(i.words.slice(t),4*n);return i.sigBytes=4*t,g.create({key:i,iv:s,salt:r})}},I=r.PasswordBasedCipher=v.extend({cfg:v.cfg.extend({kdf:m}),encrypt:function(e,t,n,r){var i=(r=this.cfg.extend(r)).kdf.execute(n,e.keySize,e.ivSize);r.iv=i.iv;var o=v.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);return r.iv=i.iv,v.decrypt.call(this,e,t,i.key,r)}})}()))}(Xi)),function(){var e=n,t=e.lib.BlockCipher,r=e.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=t.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++)if(s<n)o[s]=t[s];else{var a=o[s-1];s%n?n>6&&s%n==4&&(a=i[a>>>24]<<24|i[a>>>16&255]<<16|i[a>>>8&255]<<8|i[255&a]):(a=i[(a=a<<8|a>>>24)>>>24]<<24|i[a>>>16&255]<<16|i[a>>>8&255]<<8|i[255&a],a^=p[s/n|0]<<24),o[s]=o[s-n]^a}for(var u=this._invKeySchedule=[],c=0;c<r;c++)s=r-c,a=c%4?o[s]:o[s-4],u[c]=c<4||s<=4?a:l[i[a>>>24]]^f[i[a>>>16&255]]^h[i[a>>>8&255]]^d[i[255&a]]}},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});e.AES=t._createHelper(g)}(),n.AES)}({get exports(){return Ci},set exports(e){Ci=e}});var Ji=Ci,$i={};!function(e,t){e.exports=Ti().enc.Utf8}({get exports(){return $i},set exports(e){$i=e}});var Zi=$i,eo="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{};function to(){throw new Error("setTimeout has not been defined")}function no(){throw new Error("clearTimeout has not been defined")}var ro=to,io=no;function oo(e){if(ro===setTimeout)return setTimeout(e,0);if((ro===to||!ro)&&setTimeout)return ro=setTimeout,setTimeout(e,0);try{return ro(e,0)}catch(t){try{return ro.call(null,e,0)}catch(t){return ro.call(this,e,0)}}}"function"==typeof eo.setTimeout&&(ro=setTimeout),"function"==typeof eo.clearTimeout&&(io=clearTimeout);var so,ao=[],uo=!1,co=-1;function lo(){uo&&so&&(uo=!1,so.length?ao=so.concat(ao):co=-1,ao.length&&fo())}function fo(){if(!uo){var e=oo(lo);uo=!0;for(var t=ao.length;t;){for(so=ao,ao=[];++co<t;)so&&so[co].run();co=-1,t=ao.length}so=null,uo=!1,function(e){if(io===clearTimeout)return clearTimeout(e);if((io===no||!io)&&clearTimeout)return io=clearTimeout,clearTimeout(e);try{io(e)}catch(t){try{return io.call(null,e)}catch(t){return io.call(this,e)}}}(e)}}function ho(e,t){this.fun=e,this.array=t}ho.prototype.run=function(){this.fun.apply(null,this.array)};function po(){}var go=po,yo=po,vo=po,mo=po,Io=po,Ao=po,bo=po;var ko=eo.performance||{},Eo=ko.now||ko.mozNow||ko.msNow||ko.oNow||ko.webkitNow||function(){return(new Date).getTime()};var So=new Date;var Co,wo,Oo={nextTick:function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];ao.push(new ho(e,t)),1!==ao.length||uo||oo(fo)},title:"browser",browser:!0,env:{},argv:[],version:"",versions:{},on:go,addListener:yo,once:vo,off:mo,removeListener:Io,removeAllListeners:Ao,emit:bo,binding:function(e){throw new Error("process.binding is not supported")},cwd:function(){return"/"},chdir:function(e){throw new Error("process.chdir is not supported")},umask:function(){return 0},hrtime:function(e){var t=.001*Eo.call(ko),n=Math.floor(t),r=Math.floor(t%1*1e9);return e&&(n-=e[0],(r-=e[1])<0&&(n--,r+=1e9)),[n,r]},platform:"browser",release:{},config:{},uptime:function(){return(new Date-So)/1e3}},To={};function _o(){if(wo)return Co;wo=1;var e=1e3,t=60*e,n=60*t,i=24*n,o=7*i,s=365.25*i;function a(e,t,n,r){var i=t>=1.5*n;return Math.round(e/n)+" "+r+(i?"s":"")}return Co=function(u,c){c=c||{};var l=r(u);if("string"===l&&u.length>0)return function(r){if((r=String(r)).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(r);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*s;case"weeks":case"week":case"w":return u*o;case"days":case"day":case"d":return u*i;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}}(u);if("number"===l&&isFinite(u))return c.long?function(r){var o=Math.abs(r);if(o>=i)return a(r,o,i,"day");if(o>=n)return a(r,o,n,"hour");if(o>=t)return a(r,o,t,"minute");if(o>=e)return a(r,o,e,"second");return r+" ms"}(u):function(r){var o=Math.abs(r);if(o>=i)return Math.round(r/i)+"d";if(o>=n)return Math.round(r/n)+"h";if(o>=t)return Math.round(r/t)+"m";if(o>=e)return Math.round(r/e)+"s";return r+"ms"}(u);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(u))},Co}var Ro=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);var l=o.log||t.log;l.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=_o(),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&&void 0!==Oo&&"env"in Oo&&(e=Oo.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=Ro(t),e.exports.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}({get exports(){return To},set exports(e){To=e}},To);var Po=To("cookie"),Lo=function(e,t,n){switch(arguments.length){case 3:case 2:return xo(e,t,n);case 1:return Mo(e);default:return Do()}};function xo(e,t,n){n=n||{};var r=No(e)+"="+No(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}function Do(){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[Bo((t=r[i].split("="))[0])]=Bo(t[1]);return n}(e)}function Mo(e){return Do()[e]}function No(e){try{return encodeURIComponent(e)}catch(t){Po("error `encode(%o)` - %o",e,t)}}function Bo(e){try{return decodeURIComponent(e)}catch(t){Po("error `decode(%o)` - %o",e,t)}}var jo={},Fo={get exports(){return jo},set exports(e){jo=e}},Uo=Math.max,Go=function(e,t){var n=t?t.length:0;if(!n)return[];for(var r=Uo(Number(e)||0,0),i=Uo(n-r,0),o=new Array(i),s=0;s<i;s+=1)o[s]=t[s+r];return o},Ho=Math.max,zo=function(e){if(null==e||!e.length)return[];for(var t=new Array(Ho(e.length-2,0)),n=1;n<e.length;n+=1)t[n-1]=e[n];return t},Ko=Go,Qo=zo,qo=Object.prototype.hasOwnProperty,Vo=Object.prototype.toString,Wo=function(e){return Boolean(e)&&"object"===r(e)},Yo=function(e){return Boolean(e)&&"[object Object]"===Vo.call(e)},Xo=function(e,t,n,r){return qo.call(t,r)&&void 0===e[r]&&(e[r]=n),t},Jo=function(e,t,n,r){return qo.call(t,r)&&(Yo(e[r])&&Yo(n)?e[r]=Zo(e[r],n):void 0===e[r]&&(e[r]=n)),t},$o=function(e,t){if(!Wo(t))return t;e=e||Xo;for(var n=Ko(2,arguments),r=0;r<n.length;r+=1)for(var i in n[r])e(t,n[r],n[r][i],i);return t},Zo=function(e){return $o.apply(null,[Jo,e].concat(Qo(arguments)))};Fo.exports=function(e){return $o.apply(null,[null,e].concat(Qo(arguments)))},jo.deep=Zo;var es={},ts={get exports(){return es},set exports(e){es=e}},ns=To("cookie"),rs=function(e,t,n){switch(arguments.length){case 3:case 2:return is(e,t,n);case 1:return ss(e);default:return os()}};function is(e,t,n){n=n||{};var r=as(e)+"="+as(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}function os(){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[us((t=r[i].split("="))[0])]=us(t[1]);return n}(e)}function ss(e){return os()[e]}function as(e){try{return encodeURIComponent(e)}catch(t){ns("error `encode(%o)` - %o",e,t)}}function us(e){try{return decodeURIComponent(e)}catch(t){ns("error `decode(%o)` - %o",e,t)}}!function(e,t){var n=Ei.parse,r=rs;function i(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""}i.levels=function(e){var t=n(e).hostname.split("."),r=t[t.length-1],i=[];if(4===t.length&&r===parseInt(r,10))return i;if(t.length<=1)return i;for(var o=t.length-2;o>=0;--o)i.push(t.slice(o).join("."));return i},i.cookie=r,t=e.exports=i}(ts,es);var cs=es,ls=function(){function e(t){i(this,e),this.cOpts={},this.options(t),this.isSupportAvailable=this.checkSupportAvailability()}return s(e,[{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(cs(window.location.href));return"."===t&&(t=null),this.cOpts=jo(e,{maxage:31536e6,path:"/",domain:t,samesite:"Lax"}),this.cOpts}},{key:"set",value:function(e,t){try{return Lo(e,t,_(this.cOpts)),!0}catch(e){return lt.error(e),!1}}},{key:"get",value:function(e){return Lo(e)}},{key:"remove",value:function(e){try{return Lo(e,null,_(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)}}]),e}(),fs=new ls({}),hs={};!function(e,t){e.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=window.localStorage).setItem(t,n),e.removeItem(t)}catch(i){var r={_data:{},setItem:function(e,t){return this._data[e]=String(t)},getItem:function(e){return this._data.hasOwnProperty(e)?this._data[e]:void 0},removeItem:function(e){return delete this._data[e]},clear:function(){return this._data={}}};(e=r).setItem(t,n),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(!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}};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}()}({get exports(){return hs},set exports(e){hs=e}});var ds=hs,ps=function(){function e(t){i(this,e),this.sOpts={},this.enabled=this.checkSupportAvailability(),this.options(t)}return s(e,[{key:"options",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return 0===arguments.length||(jo(e,{enabled:!0}),this.enabled=e.enabled&&this.enabled,this.sOpts=e),this.sOpts}},{key:"set",value:function(e,t){return ds.set(e,t)}},{key:"get",value:function(e){return ds.get(e)}},{key:"remove",value:function(e){return ds.remove(e)}},{key:"checkSupportAvailability",value:function(){var e="test_rudder_ls";return this.set(e,!0),!!this.get(e)&&(this.remove(e),!0)}}]),e}(),gs=new ps({}),ys="rl_user_id",vs="rl_trait",ms="rl_anonymous_id",Is="rl_group_id",As="rl_group_trait",bs="rl_page_init_referrer",ks="rl_page_init_referring_domain",Es="rl_session",Ss="rl_auth_token",Cs="RudderEncrypt:",ws="Rudder",Os={segment:"ajs_anonymous_id"};function Ts(e){try{return e?JSON.parse(e):null}catch(t){return lt.error(t),e||null}}function _s(e){return e.replace(/^\s+|\s+$/gm,"")}function Rs(e){return!e||"string"==typeof e&&""===_s(e)?e:e.substring(0,Cs.length)===Cs?Ji.decrypt(e.substring(Cs.length),ws).toString(Zi):e}var Ps=function(){function e(){i(this,e),fs.isSupportAvailable?this.storage=fs:(gs.enabled&&(this.storage=gs),this.storage||lt.error("No storage is available :: initializing the SDK without storage"))}return s(e,[{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){this.storage.set(e,function(e){return""===_s(e)?e:"".concat(Cs).concat(Ji.encrypt(e,ws).toString())}(function(e){return JSON.stringify(e)}(t)))}},{key:"setStringItem",value:function(e,t){"string"==typeof t?this.setItem(e,t):lt.error("[Storage] ".concat(e," should be string"))}},{key:"setUserId",value:function(e){this.setStringItem(ys,e)}},{key:"setUserTraits",value:function(e){this.setItem(vs,e)}},{key:"setGroupId",value:function(e){this.setStringItem(Is,e)}},{key:"setGroupTraits",value:function(e){this.setItem(As,e)}},{key:"setAnonymousId",value:function(e){this.setStringItem(ms,e)}},{key:"setInitialReferrer",value:function(e){this.setItem(bs,e)}},{key:"setInitialReferringDomain",value:function(e){this.setItem(ks,e)}},{key:"setSessionInfo",value:function(e){this.setItem(Es,e)}},{key:"setAuthToken",value:function(e){this.setItem(Ss,e)}},{key:"getItem",value:function(e){return Ts(Rs(this.storage.get(e)))}},{key:"getUserId",value:function(){return this.getItem(ys)}},{key:"getUserTraits",value:function(){return this.getItem(vs)}},{key:"getGroupId",value:function(){return this.getItem(Is)}},{key:"getGroupTraits",value:function(){return this.getItem(As)}},{key:"fetchExternalAnonymousId",value:function(e){var t,n=e.toLowerCase();return Object.keys(Os).includes(n)&&"segment"===n?(gs.enabled&&(t=gs.get(Os[n])),!t&&fs.isSupportAvailable&&(t=fs.get(Os[n])),t):t}},{key:"getAnonymousId",value:function(e){var t=Ts(Rs(this.storage.get(ms)));if(t)return t;var n=D(e,"autoCapture.source");if(!0===D(e,"autoCapture.enabled")&&"string"==typeof n){var r=this.fetchExternalAnonymousId(n);if(r)return r}return t}},{key:"getInitialReferrer",value:function(){return this.getItem(bs)}},{key:"getInitialReferringDomain",value:function(){return this.getItem(ks)}},{key:"getSessionInfo",value:function(){return this.getItem(Es)}},{key:"getAuthToken",value:function(){return this.getItem(Ss)}},{key:"removeItem",value:function(e){return this.storage.remove(e)}},{key:"removeSessionInfo",value:function(){this.removeItem(Es)}},{key:"clear",value:function(e){this.storage.remove(ys),this.storage.remove(vs),this.storage.remove(Is),this.storage.remove(As),this.storage.remove(Ss),e&&this.storage.remove(ms)}}]),e}(),Ls=new Ps;function xs(){return document.referrer||"$direct"}function Ds(e){var t=e.split("/");return t.length>=3?t[2]:""}function Ms(){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 Ns(){var e=Ms(),t=e?Ei.parse(e).pathname:window.location.pathname,n=window.location,r=n.search,i=n.href,o=document.title,s=function(e){var t,n=Ms(),r=(t=n?n.includes("?")?n:n+e:window.location.href).indexOf("#");return r>-1?t.slice(0,r):t}(r),a=i,u=xs();return{path:t,referrer:u,referring_domain:Ds(u),search:r,title:o,url:s,tab_url:a,initial_referrer:Ls.getInitialReferrer(),initial_referring_domain:Ls.getInitialReferringDomain()}}for(var Bs,js=s((function e(){i(this,e),this.name="RudderLabs JavaScript SDK",this.namespace="com.rudderlabs.javascript",this.version="2.31.0"})),Fs=s((function e(){i(this,e),this.name="RudderLabs JavaScript SDK",this.version="2.31.0"})),Us=s((function e(){i(this,e),this.name="",this.version=""})),Gs=s((function e(){i(this,e),this.density=0,this.width=0,this.height=0,this.innerWidth=0,this.innerHeight=0})),Hs=s((function e(){var t;i(this,e),this.app=new js,this.traits=null,this.library=new Fs,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 Us,this.locale="undefined"==typeof navigator?null:navigator.language||navigator.browserLanguage,this.screen=(t=new Gs,"undefined"==typeof window||(t.width=window.screen.width,t.height=window.screen.height,t.density=window.devicePixelRatio,t.innerWidth=window.innerWidth,t.innerHeight=window.innerHeight),t)})),zs=function(){function e(){i(this,e),this.channel="web",this.context=new Hs,this.type=null,this.messageId=di(),this.originalTimestamp=(new Date).toISOString(),this.anonymousId=null,this.userId=null,this.event=null,this.properties={},this.integrations={},this.integrations.All=!0}return s(e,[{key:"getProperty",value:function(e){return this.properties[e]}},{key:"addProperty",value:function(e,t){this.properties[e]=t}}]),e}(),Ks=function(){function e(){i(this,e),this.message=new zs}return s(e,[{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}}]),e}(),Qs=function(){function e(){i(this,e),this.rudderProperty=null,this.rudderUserProperty=null,this.event=null,this.userId=null,this.type=null}return s(e,[{key:"setType",value:function(e){return this.type=e,this}},{key:"build",value:function(){var e=new Ks;return e.setUserId(this.userId),e.setType(this.type),e.setEventName(this.event),e.setProperty(this.rudderProperty),e.setUserProperty(this.rudderUserProperty),e}}]),e}(),qs={},Vs=256,Ws=[];Vs--;)Ws[Vs]=(Vs+256).toString(16).substring(1);qs.v4=function(){var e,t=0,n="";if(!Bs||Vs+16>256){for(Bs=Array(t=256);t--;)Bs[t]=256*Math.random()|0;t=Vs=0}for(;t<16;t++)e=Bs[Vs+t],n+=6==t?Ws[15&e|64]:8==t?Ws[63&e|128]:Ws[e],1&t&&t>1&&t<11&&(n+="-");return Vs++,n};var Ys,Xs={},Js=Object.prototype.hasOwnProperty,$s=String.prototype.charAt,Zs=Object.prototype.toString,ea=function(e,t){return $s.call(e,t)},ta=function(e,t){return Js.call(e,t)},na=function(e,t){t=t||ta;for(var n=[],r=0,i=e.length;r<i;r+=1)t(e,r)&&n.push(String(r));return n},ra=function(e){return null==e?[]:(t=e,"[object String]"===Zs.call(t)?na(e,ea):function(e){return null!=e&&"function"!=typeof e&&"number"==typeof e.length}(e)?na(e,ta):function(e,t){t=t||ta;var n=[];for(var r in e)t(e,r)&&n.push(String(r));return n}(e));var t},ia=new Uint8Array(16);function oa(){if(!Ys&&!(Ys="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Ys(ia)}var sa=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function aa(e){return"string"==typeof e&&sa.test(e)}for(var ua,ca,la=[],fa=0;fa<256;++fa)la.push((fa+256).toString(16).substr(1));function ha(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(la[e[t+0]]+la[e[t+1]]+la[e[t+2]]+la[e[t+3]]+"-"+la[e[t+4]]+la[e[t+5]]+"-"+la[e[t+6]]+la[e[t+7]]+"-"+la[e[t+8]]+la[e[t+9]]+"-"+la[e[t+10]]+la[e[t+11]]+la[e[t+12]]+la[e[t+13]]+la[e[t+14]]+la[e[t+15]]).toLowerCase();if(!aa(n))throw TypeError("Stringified UUID is invalid");return n}var da=0,pa=0;function ga(e){if(!aa(e))throw TypeError("Invalid UUID");var t,n=new Uint8Array(16);return n[0]=(t=parseInt(e.slice(0,8),16))>>>24,n[1]=t>>>16&255,n[2]=t>>>8&255,n[3]=255&t,n[4]=(t=parseInt(e.slice(9,13),16))>>>8,n[5]=255&t,n[6]=(t=parseInt(e.slice(14,18),16))>>>8,n[7]=255&t,n[8]=(t=parseInt(e.slice(19,23),16))>>>8,n[9]=255&t,n[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,n[11]=t/4294967296&255,n[12]=t>>>24&255,n[13]=t>>>16&255,n[14]=t>>>8&255,n[15]=255&t,n}function ya(e,t,n){function r(e,r,i,o){if("string"==typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));for(var t=[],n=0;n<e.length;++n)t.push(e.charCodeAt(n));return t}(e)),"string"==typeof r&&(r=ga(r)),16!==r.length)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");var s=new Uint8Array(16+e.length);if(s.set(r),s.set(e,r.length),(s=n(s))[6]=15&s[6]|t,s[8]=63&s[8]|128,i){o=o||0;for(var a=0;a<16;++a)i[o+a]=s[a];return i}return ha(s)}try{r.name=e}catch(e){}return r.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",r.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",r}function va(e){return 14+(e+64>>>9<<4)+1}function ma(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function Ia(e,t,n,r,i,o){return ma((s=ma(ma(t,e),ma(r,o)))<<(a=i)|s>>>32-a,n);var s,a}function Aa(e,t,n,r,i,o,s){return Ia(t&n|~t&r,e,t,i,o,s)}function ba(e,t,n,r,i,o,s){return Ia(t&r|n&~r,e,t,i,o,s)}function ka(e,t,n,r,i,o,s){return Ia(t^n^r,e,t,i,o,s)}function Ea(e,t,n,r,i,o,s){return Ia(n^(t|~r),e,t,i,o,s)}var Sa=ya("v3",48,(function(e){if("string"==typeof e){var t=unescape(encodeURIComponent(e));e=new Uint8Array(t.length);for(var n=0;n<t.length;++n)e[n]=t.charCodeAt(n)}return function(e){for(var t=[],n=32*e.length,r="0123456789abcdef",i=0;i<n;i+=8){var o=e[i>>5]>>>i%32&255,s=parseInt(r.charAt(o>>>4&15)+r.charAt(15&o),16);t.push(s)}return t}(function(e,t){e[t>>5]|=128<<t%32,e[va(t)-1]=t;for(var n=1732584193,r=-271733879,i=-1732584194,o=271733878,s=0;s<e.length;s+=16){var a=n,u=r,c=i,l=o;n=Aa(n,r,i,o,e[s],7,-680876936),o=Aa(o,n,r,i,e[s+1],12,-389564586),i=Aa(i,o,n,r,e[s+2],17,606105819),r=Aa(r,i,o,n,e[s+3],22,-1044525330),n=Aa(n,r,i,o,e[s+4],7,-176418897),o=Aa(o,n,r,i,e[s+5],12,1200080426),i=Aa(i,o,n,r,e[s+6],17,-1473231341),r=Aa(r,i,o,n,e[s+7],22,-45705983),n=Aa(n,r,i,o,e[s+8],7,1770035416),o=Aa(o,n,r,i,e[s+9],12,-1958414417),i=Aa(i,o,n,r,e[s+10],17,-42063),r=Aa(r,i,o,n,e[s+11],22,-1990404162),n=Aa(n,r,i,o,e[s+12],7,1804603682),o=Aa(o,n,r,i,e[s+13],12,-40341101),i=Aa(i,o,n,r,e[s+14],17,-1502002290),n=ba(n,r=Aa(r,i,o,n,e[s+15],22,1236535329),i,o,e[s+1],5,-165796510),o=ba(o,n,r,i,e[s+6],9,-1069501632),i=ba(i,o,n,r,e[s+11],14,643717713),r=ba(r,i,o,n,e[s],20,-373897302),n=ba(n,r,i,o,e[s+5],5,-701558691),o=ba(o,n,r,i,e[s+10],9,38016083),i=ba(i,o,n,r,e[s+15],14,-660478335),r=ba(r,i,o,n,e[s+4],20,-405537848),n=ba(n,r,i,o,e[s+9],5,568446438),o=ba(o,n,r,i,e[s+14],9,-1019803690),i=ba(i,o,n,r,e[s+3],14,-187363961),r=ba(r,i,o,n,e[s+8],20,1163531501),n=ba(n,r,i,o,e[s+13],5,-1444681467),o=ba(o,n,r,i,e[s+2],9,-51403784),i=ba(i,o,n,r,e[s+7],14,1735328473),n=ka(n,r=ba(r,i,o,n,e[s+12],20,-1926607734),i,o,e[s+5],4,-378558),o=ka(o,n,r,i,e[s+8],11,-2022574463),i=ka(i,o,n,r,e[s+11],16,1839030562),r=ka(r,i,o,n,e[s+14],23,-35309556),n=ka(n,r,i,o,e[s+1],4,-1530992060),o=ka(o,n,r,i,e[s+4],11,1272893353),i=ka(i,o,n,r,e[s+7],16,-155497632),r=ka(r,i,o,n,e[s+10],23,-1094730640),n=ka(n,r,i,o,e[s+13],4,681279174),o=ka(o,n,r,i,e[s],11,-358537222),i=ka(i,o,n,r,e[s+3],16,-722521979),r=ka(r,i,o,n,e[s+6],23,76029189),n=ka(n,r,i,o,e[s+9],4,-640364487),o=ka(o,n,r,i,e[s+12],11,-421815835),i=ka(i,o,n,r,e[s+15],16,530742520),n=Ea(n,r=ka(r,i,o,n,e[s+2],23,-995338651),i,o,e[s],6,-198630844),o=Ea(o,n,r,i,e[s+7],10,1126891415),i=Ea(i,o,n,r,e[s+14],15,-1416354905),r=Ea(r,i,o,n,e[s+5],21,-57434055),n=Ea(n,r,i,o,e[s+12],6,1700485571),o=Ea(o,n,r,i,e[s+3],10,-1894986606),i=Ea(i,o,n,r,e[s+10],15,-1051523),r=Ea(r,i,o,n,e[s+1],21,-2054922799),n=Ea(n,r,i,o,e[s+8],6,1873313359),o=Ea(o,n,r,i,e[s+15],10,-30611744),i=Ea(i,o,n,r,e[s+6],15,-1560198380),r=Ea(r,i,o,n,e[s+13],21,1309151649),n=Ea(n,r,i,o,e[s+4],6,-145523070),o=Ea(o,n,r,i,e[s+11],10,-1120210379),i=Ea(i,o,n,r,e[s+2],15,718787259),r=Ea(r,i,o,n,e[s+9],21,-343485551),n=ma(n,a),r=ma(r,u),i=ma(i,c),o=ma(o,l)}return[n,r,i,o]}(function(e){if(0===e.length)return[];for(var t=8*e.length,n=new Uint32Array(va(t)),r=0;r<t;r+=8)n[r>>5]|=(255&e[r/8])<<r%32;return n}(e),8*e.length))})),Ca=Sa;function wa(e,t,n,r){switch(e){case 0:return t&n^~t&r;case 1:case 3:return t^n^r;case 2:return t&n^t&r^n&r}}function Oa(e,t){return e<<t|e>>>32-t}var Ta=ya("v5",80,(function(e){var t=[1518500249,1859775393,2400959708,3395469782],n=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof e){var r=unescape(encodeURIComponent(e));e=[];for(var i=0;i<r.length;++i)e.push(r.charCodeAt(i))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);for(var o=e.length/4+2,s=Math.ceil(o/16),a=new Array(s),u=0;u<s;++u){for(var c=new Uint32Array(16),l=0;l<16;++l)c[l]=e[64*u+4*l]<<24|e[64*u+4*l+1]<<16|e[64*u+4*l+2]<<8|e[64*u+4*l+3];a[u]=c}a[s-1][14]=8*(e.length-1)/Math.pow(2,32),a[s-1][14]=Math.floor(a[s-1][14]),a[s-1][15]=8*(e.length-1)&4294967295;for(var f=0;f<s;++f){for(var h=new Uint32Array(80),d=0;d<16;++d)h[d]=a[f][d];for(var p=16;p<80;++p)h[p]=Oa(h[p-3]^h[p-8]^h[p-14]^h[p-16],1);for(var g=n[0],y=n[1],v=n[2],m=n[3],I=n[4],A=0;A<80;++A){var b=Math.floor(A/20),k=Oa(g,5)+wa(b,y,v,m)+I+t[b]+h[A]>>>0;I=m,m=v,v=Oa(y,30)>>>0,y=g,g=k}n[0]=n[0]+g>>>0,n[1]=n[1]+y>>>0,n[2]=n[2]+v>>>0,n[3]=n[3]+m>>>0,n[4]=n[4]+I>>>0}return[n[0]>>24&255,n[0]>>16&255,n[0]>>8&255,255&n[0],n[1]>>24&255,n[1]>>16&255,n[1]>>8&255,255&n[1],n[2]>>24&255,n[2]>>16&255,n[2]>>8&255,255&n[2],n[3]>>24&255,n[3]>>16&255,n[3]>>8&255,255&n[3],n[4]>>24&255,n[4]>>16&255,n[4]>>8&255,255&n[4]]})),_a=Ta;var Ra=Object.freeze({__proto__:null,v1:function(e,t,n){var r=t&&n||0,i=t||new Array(16),o=(e=e||{}).node||ua,s=void 0!==e.clockseq?e.clockseq:ca;if(null==o||null==s){var a=e.random||(e.rng||oa)();null==o&&(o=ua=[1|a[0],a[1],a[2],a[3],a[4],a[5]]),null==s&&(s=ca=16383&(a[6]<<8|a[7]))}var u=void 0!==e.msecs?e.msecs:Date.now(),c=void 0!==e.nsecs?e.nsecs:pa+1,l=u-da+(c-pa)/1e4;if(l<0&&void 0===e.clockseq&&(s=s+1&16383),(l<0||u>da)&&void 0===e.nsecs&&(c=0),c>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");da=u,pa=c,ca=s;var f=(1e4*(268435455&(u+=122192928e5))+c)%4294967296;i[r++]=f>>>24&255,i[r++]=f>>>16&255,i[r++]=f>>>8&255,i[r++]=255&f;var h=u/4294967296*1e4&268435455;i[r++]=h>>>8&255,i[r++]=255&h,i[r++]=h>>>24&15|16,i[r++]=h>>>16&255,i[r++]=s>>>8|128,i[r++]=255&s;for(var d=0;d<6;++d)i[r+d]=o[d];return t||ha(i)},v3:Ca,v4:function(e,t,n){var r=(e=e||{}).random||(e.rng||oa)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var i=0;i<16;++i)t[n+i]=r[i];return t}return ha(r)},v5:_a,NIL:"00000000-0000-0000-0000-000000000000",version:function(e){if(!aa(e))throw TypeError("Invalid UUID");return parseInt(e.substr(14,1),16)},validate:aa,stringify:ha,parse:ga}),Pa=ra,La=h(Ra).v4,xa={_data:{},length:0,setItem:function(e,t){return this._data[e]=t,this.length=Pa(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=Pa(this._data).length,null},clear:function(){this._data={},this.length=0},key:function(e){return Pa(this._data)[e]}};Xs.defaultEngine=function(){try{if(!window.localStorage)return!1;var e=La();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:xa,Xs.inMemoryEngine=xa;var Da=ra,Ma=Object.prototype.toString,Na="function"==typeof Array.isArray?Array.isArray:function(e){return"[object Array]"===Ma.call(e)},Ba=function(e){return null!=e&&(Na(e)||"function"!==e&&function(e){var t=r(e);return"number"===t||"object"===t&&"[object Number]"===Ma.call(e)}(e.length))},ja=function(e,t){for(var n=0;n<t.length&&!1!==e(t[n],n,t);n+=1);},Fa=function(e,t){for(var n=Da(t),r=0;r<n.length&&!1!==e(t[n[r]],n[r],t);r+=1);},Ua=function(e,t){return(Ba(t)?ja:Fa).call(this,e,t)},Ga=Xs.defaultEngine,Ha=Xs.inMemoryEngine,za=Ua,Ka=ra,Qa=JSON;function qa(e,t,n,r){this.id=t,this.name=e,this.keys=n||{},this.engine=r||Ga,this.originalEngine=this.engine}qa.prototype.set=function(e,t){var n=this._createValidKey(e);if(n)try{this.engine.setItem(n,Qa.stringify(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))}},qa.prototype.get=function(e){try{var t=this.engine.getItem(this._createValidKey(e));return null===t?null:Qa.parse(t)}catch(e){return null}},qa.prototype.getOriginalEngine=function(){return this.originalEngine},qa.prototype.remove=function(e){this.engine.removeItem(this._createValidKey(e))},qa.prototype._createValidKey=function(e){var t,n=this.name,r=this.id;return Ka(this.keys).length?(za((function(i){i===e&&(t=[n,r,e].join("."))}),this.keys),t):[n,r,e].join(".")},qa.prototype._swapEngine=function(){var e=this;za((function(t){var n=e.get(t);Ha.setItem([e.name,e.id,t].join("."),n),e.remove(t)}),this.keys),this.engine=Ha};var Va=qa;var Wa=Ua,Ya={setTimeout:function(e,t){return window.setTimeout(e,t)},clearTimeout:function(e){return window.clearTimeout(e)},Date:window.Date},Xa=Ya,Ja={ASAP:1,RESCHEDULE:2,ABANDON:3};function $a(){this.tasks={},this.nextId=1}$a.prototype.now=function(){return+new Xa.Date},$a.prototype.run=function(e,t,n){var r=this.nextId++;return this.tasks[r]=Xa.setTimeout(this._handle(r,e,t,n||Ja.ASAP),t),r},$a.prototype.cancel=function(e){this.tasks[e]&&(Xa.clearTimeout(this.tasks[e]),delete this.tasks[e])},$a.prototype.cancelAll=function(){Wa(Xa.clearTimeout,this.tasks),this.tasks={}},$a.prototype._handle=function(e,t,n,r){var i=this,o=i.now();return function(){if(delete i.tasks[e],!(r>=Ja.RESCHEDULE&&o+2*n<i.now()))return t();r===Ja.RESCHEDULE&&i.run(t,n,r)}},$a.setClock=function(e){Xa=e},$a.resetClock=function(){Xa=Ya},$a.Modes=Ja;var Za=$a,eu=qs.v4,tu=Va,nu=Ua,ru=Za,iu=To("localstorage-retry");function ou(e,t){return function(){return e.apply(t,arguments)}}function su(e,t,n){"function"==typeof t&&(n=t),this.name=e,this.id=eu(),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 ru,this._processId=0,this._store=new tu(this.name,this.id,this.keys),this._store.set(this.keys.IN_PROGRESS,{}),this._store.set(this.keys.QUEUE,[]),this._ack=ou(this._ack,this),this._checkReclaim=ou(this._checkReclaim,this),this._processHead=ou(this._processHead,this),this._running=!1}d(su.prototype),su.prototype.start=function(){this._running&&this.stop(),this._running=!0,this._ack(),this._checkReclaim(),this._processHead()},su.prototype.stop=function(){this._schedule.cancelAll(),this._running=!1},su.prototype.shouldRetry=function(e,t){return!(t>this.maxAttempts)},su.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))},su.prototype.addItem=function(e){this._enqueue({item:e,attemptNumber:0,time:this._schedule.now(),id:eu()})},su.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||eu()}):this.emit("discard",e,t)},su.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()},su.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=eu();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),nu((function(t){try{e.fn(t.item,t.done)}catch(e){iu("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,ru.Modes.ASAP))},su.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,ru.Modes.ASAP)},su.prototype._checkReclaim=function(){var e=this;nu((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,ru.Modes.ABANDON))}),e.timeouts.RECLAIM_WAIT,ru.Modes.ABANDON)}(t))}),function(t){for(var n=[],r=e._store.getOriginalEngine(),i=0;i<r.length;i++){var o=r.key(i).split(".");3===o.length&&(o[0]===t&&"ack"===o[2]&&n.push(new tu(t,o[1],e.keys)))}return n}(this.name)),this._schedule.run(this._checkReclaim,this.timeouts.RECLAIM_TIMER,ru.Modes.RESCHEDULE)},su.prototype._reclaim=function(e){var t=this,n=new tu(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){nu((function(e){var i=e.id||eu();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),n.remove(this.keys.IN_PROGRESS),n.remove(this.keys.QUEUE),n.remove(this.keys.RECLAIM_START),n.remove(this.keys.RECLAIM_END),n.remove(this.keys.ACK),this._processHead()};var au=su,uu={maxRetryDelay:36e4,minRetryDelay:1e3,backoffFactor:2,maxAttempts:10,maxItems:100},cu=function(){function e(){i(this,e),this.url="",this.writeKey=""}return s(e,[{key:"init",value:function(e,t,n){this.url=t,this.writeKey=e,n&&u(uu,n),this.payloadQueue=new au("rudder",uu,function(e,t){e.message.sentAt=pi(),this.processQueueElement(e.url,e.headers,e.message,1e4,(function(e,n){if(e)return t(e);t(null,n)}))}.bind(this)),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(){4===o.readyState&&(429===o.status||o.status>=500&&o.status<600?(li(new Error("request failed with status: ".concat(o.status).concat(o.statusText," for url: ").concat(e))),i(new Error("request failed with status: ".concat(o.status).concat(o.statusText," for url: ").concat(e)))):i(null,o.status))},o.send(JSON.stringify(n,fi))}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})}}]),e}(),lu="queue",fu=64e3,hu=function(){function e(){i(this,e),this.storage=gs,this.maxItems=10,this.flushQueueTimeOut=void 0,this.timeOutActive=!1,this.flushQueueTimeOutInterval=6e5,this.url="",this.writekey="",this.queueName="".concat(lu,".").concat(Date.now()),this.send=navigator.sendBeacon&&navigator.sendBeacon.bind(navigator)}return s(e,[{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);var r=this.sendQueueDataForBeacon.bind(this);window.addEventListener("unload",r)}},{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};JSON.stringify(r,fi).length>fu&&(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){e.forEach((function(e){e.sentAt=(new Date).toISOString()}));var t={batch:e},n=JSON.stringify(t,fi),r=new Blob([n],{type:"text/plain"});try{this.send("".concat(this.url,"?writeKey=").concat(this.writekey),r)||li(new Error("Unable to queue data to browser's beacon queue"))}catch(e){li(e)}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)}}]),e}(),du=function(){function e(){i(this,e),this.queue=void 0}return s(e,[{key:"initialize",value:function(e,t,n){var i={},o=hi(t);n&&n.useBeacon&&navigator.sendBeacon?(n&&n.beaconQueueOptions&&null!=n.beaconQueueOptions&&"object"===r(n.beaconQueueOptions)&&(i=n.beaconQueueOptions),o="".concat(o,"/beacon/v1/batch"),this.queue=new hu):(n&&n.useBeacon&&lt.info("[EventRepository] sendBeacon feature not available in this browser :: fallback to XHR"),n&&n.queueOptions&&null!=n.queueOptions&&"object"===r(n.queueOptions)&&(i=n.queueOptions),this.queue=new cu),this.queue.init(e,o,i)}},{key:"enqueue",value:function(e,t){var n=e.getElementContent();n.originalTimestamp=n.originalTimestamp||pi(),n.sentAt=pi(),JSON.stringify(n,fi).length>32e3&&lt.error("[EventRepository] enqueue:: message length greater 32 Kb ",n),this.queue.enqueue(n,t)}}]),e}(),pu=new du,gu="RS_JS_SDK",yu=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};try{var r=document.getElementById(e);if(r)return;var i=document.createElement("script");i.src=t,i.async=void 0===n.async||n.async,i.type="text/javascript",i.id=e,!0!==n.skipDatasetAttributes&&(i.setAttribute("data-loader",gu),void 0!==n.isNonNativeSDK&&i.setAttribute("data-isNonNativeSDK",n.isNonNativeSDK));var o=document.getElementsByTagName("head");if(o.length>0)o[0].insertBefore(i,o[0].firstChild);else{var s=document.getElementsByTagName("script")[0];s.parentNode.insertBefore(i,s)}}catch(s){li(s)}},vu=function(){return navigator&&navigator.language},mu=function(){return navigator&&navigator.userAgent};function Iu(e){return decodeURIComponent(atob(e).split("").map((function(e){return"%".concat("00".concat(e.charCodeAt(0).toString(16)).slice(-2))})).join(""))}function Au(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Iu(e=e.endsWith("..")?e.substr(0,e.length-2):e)}var bu=/^[a-zA-Z0-9\-_.]+$/,ku="*";function Eu(e,t,n,r){var i=function(e,t){return[e,(new Date).getTimezoneOffset(),t].join(ku)}(n,r),o=t||0,s=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=-1,r=0;r<e.length;r++)n=n>>>8^t[255&(n^e.charCodeAt(r))];return(-1^n)>>>0}([i,Math.floor(Date.now()/6e4)-o,e].join(ku));return s.toString(36)}function Su(e){var t=function(e){var t=e.split(ku),n=t.length%2==0;return t.length<4||!n||1!==Number(t.shift())?null:{checksum:t.shift(),serializedIds:t.join(ku)}}(e);if(!t)return null;var n=t.checksum,r=t.serializedIds;return function(e,t){for(var n=mu(),r=vu(),i=0;i<=1;i+=1)if(Eu(e,i,n,r)===t)return!0;return!1}(r,n)?function(e){for(var t={},n=e.split(ku),r=0;r<n.length;r+=2){var i=n[r];if(bu.test(i)){var o=Au(n[r+1]);t[i]=o}}return t}(r):null}var Cu={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"},wu=function(){function e(){var t=this;if(i(this,e),!window.OneTrust||!window.OnetrustActiveGroups)throw new Error("OneTrust resources are not accessible. Thus all the destinations will be loaded");this.userSetConsentGroupIds=window.OnetrustActiveGroups.split(",").filter((function(e){return e}));var n=window.OneTrust.GetDomainData().Groups;this.userSetConsentGroupNames=[],this.userDeniedConsentGroupIds=[],n.forEach((function(e){var n=e.CustomGroupId,r=e.GroupName;t.userSetConsentGroupIds.includes(n)?t.userSetConsentGroupNames.push(r.toUpperCase().trim()):t.userDeniedConsentGroupIds.push(n)})),this.userSetConsentGroupIds=this.userSetConsentGroupIds.map((function(e){return e.toUpperCase()}))}return s(e,[{key:"isEnabled",value:function(e){var t=this;try{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 lt.error("Error during onetrust cookie consent management ".concat(e)),!0}}},{key:"getDeniedList",value:function(){return this.userDeniedConsentGroupIds}}]),e}(),Ou=function(){function e(){i(this,e)}return s(e,null,[{key:"initialize",value:function(e){var t;return null!=e&&null!==(t=e.oneTrust)&&void 0!==t&&t.enabled?new wu:null}}]),e}(),Tu=function(){function e(){i(this,e),this.storage=Ls,this.timeout=18e5,this.sessionInfo=this.storage.getSessionInfo()||{autoTrack:!0}}return s(e,[{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&&(lt.warn("[Session]:: Provided timeout value 0 will disable the auto session tracking feature."),this.sessionInfo.autoTrack=!1),n>0&&n<1e4&&lt.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){li(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;lt.error('[Session]:: "sessionId" should at least be "'.concat(10,'" digits long'))}else lt.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()}}]),e}(),_u=new Tu,Ru=function(e,t){if(!Array.isArray(e)||!Array.isArray(t))return _(t);var n=_(e);return t.forEach((function(e,t){n[t]=Pu(n[t],e)})),n},Pu=function(e,t){return L(Ru,e,t)},Lu=["integrations","anonymousId","originalTimestamp"],xu="rs-bugsnag",Du="bugsnag",Mu=["Bugsnag",Du],Nu="{{{{__RS_BUGSNAG_API_KEY__}}}}",Bu=["rudder-analytics.min.js","rudder-analytics-staging.min.js","rudder-analytics.js"].concat(c(Object.keys(Cu).map((function(e){return"".concat(Cu[e],".min.js")}))),c(Object.keys(Cu).map((function(e){return"".concat(Cu[e],"-staging.min.js")}))),c(Object.keys(Cu).map((function(e){return"".concat(Cu[e],".js")})))),ju=function(e){var t=e&&e._client&&e._client._notifier&&e._client._notifier.version;if(!t){var n=e({apiKey:Nu,releaseStage:"version-test",beforeSend:function(){return!1}});t=n.notifier&&n.notifier.version,n=void 0}return t&&"6"===t.charAt(0)},Fu=function(e){Mu.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)}))&&yu(e,"https://d2wy8f7a9ursnm.cloudfront.net/v6/bugsnag.min.js",{isNonNativeSDK:"true",skipDatasetAttributes:!0})},Uu=function(){function e(t,n){i(this,e),this.pluginName=xu,this.sourceId=t,this.onClientReady=n,this.initClientOnLibReadyInterval=void 0,this.init()}return s(e,[{key:"init",value:function(){var e=this;if(!window.rudderanalytics||!window.rudderanalytics.errorReporting){if(!Nu.match(/{{.+}}/)){Fu(this.pluginName);var t=window.bugsnag;"function"!=typeof t?(this.initClientOnLibReadyInterval=setInterval((function(){var t=window.bugsnag;"function"==typeof t&&(ju(t)&&e.initClient(),clearInterval(e.initClientOnLibReadyInterval))}),100),setTimeout((function(){clearInterval(e.initClientOnLibReadyInterval)}),ti)):ju(t)&&this.initClient()}}}},{key:"initClient",value:function(){var e,t=window.bugsnag;this.client=t({apiKey:Nu,appVersion:"2.31.0",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.rs-unit-test-host.com","localhost","127.0.0.1","[::1]"].includes(e)?"development":"production")}),this.onClientReady()}},{key:"onError",value:function(){var e=this.sourceId;return function(t){try{return!!function(e){var t=D(e,"stacktrace.0.file");if(!t||"string"!=typeof t)return!1;var n=t.substring(t.lastIndexOf("/")+1);return Bu.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)}}]),e}(),Gu=xu,Hu=[xu],zu=function(){function e(t){i(this,e),this.isEnabled=!1,this.providerName=Gu,this.provider=void 0,this.logger=t,this.onClientReady=this.onClientReady.bind(this),this.exposeToGlobal=this.exposeToGlobal.bind(this)}return s(e,[{key:"init",value:function(e,t){e&&t?!0===function(e){return D(e,"statsCollection.errors.enabled")||!1}(e)?(this.enable(),this.setProviderName(function(e){return D(e,"statsCollection.errors.provider")}(e)),this.initProvider(e,t)):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||Hu.includes(e)?this.providerName=e:this.logger.error("[Analytics] ErrorReporting :: Invalid error reporting provider value. Value should be one of: ".concat(Hu.join(","))):this.providerName=Gu}},{key:"initProvider",value:function(e,t){if(this.providerName===xu)this.provider=new Uu(t,this.onClientReady)}},{key:"onClientReady",value:function(){this.exposeToGlobal()}},{key:"exposeToGlobal",value:function(){window.rudderanalytics.errorReporting=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()))}}}]),e}(),Ku=new(function(){function e(){i(this,e),this.retryAttempt=3,this.queue=[],this.isTransformationProcessing=!1,this.authToken=null}return s(e,[{key:"init",value:function(e,t,n){this.dataPlaneUrl=hi(t),this.writeKey=e,this.authToken=n||this.authToken,this.start()}},{key:"enqueue",value:function(e,t){this.queue.push({event:e,cb:t})}},{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;if(200===o){if(!s||"string"!=typeof s)return void i("[Transformation]:: Transformation failed. Invalid response from server.");s=JSON.parse(s);var u=[];return s.transformedBatch.forEach((function(e){u.push({id:e.id,payload:e.payload.filter((function(e){return"200"===e.status}))})})),void r({transformedPayload:u,transformationServerAccess:!0})}if(400===o){var c=s?"[Transformation]:: ".concat(s):"[Transformation]:: Invalid request payload";return void i(c)}if(404===o)return void r({transformedPayload:e.batch,transformationServerAccess:!1});if(!(t>0))return void i("[Transformation]:: Transformation failed with status ".concat(o));var l=t-1;setTimeout((function(){return n.sendEventForTransformation(e,l).then(r).catch(i)}),500*Math.pow(2,n.retryAttempt-l))}catch(e){i(e)}},a.send(JSON.stringify(e,fi))}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=this.queue.shift(),r=(t=n.event,{metadata:{"Custom-Authorization":this.authToken},batch:[{orderNo:Date.now(),event:t.message}]});this.sendEventForTransformation(r,this.retryAttempt).then((function(t){e.isTransformationProcessing=!1,n.cb(t),e.checkQueueLengthAndProcess()})).catch((function(t){li("string"==typeof t?t:t.message),e.isTransformationProcessing=!1,n.cb({transformedPayload:null}),e.checkQueueLengthAndProcess()}))}},{key:"start",value:function(){var e=this;setInterval((function(){e.isTransformationProcessing||e.checkQueueLengthAndProcess()}),100)}},{key:"setAuthToken",value:function(e){this.authToken=e}}]),e}()),Qu=function(){function e(){i(this,e),this.initialized=!1,this.clientIntegrations=[],this.loadOnlyIntegrations={},this.clientIntegrationObjects=void 0,this.successfullyLoadedIntegration=[],this.failedToBeLoadedIntegration=[],this.toBeProcessedArray=[],this.toBeProcessedByIntegrationArray=[],this.storage=Ls,this.eventRepository=pu,this.sendAdblockPage=!1,this.sendAdblockPageOptions={},this.clientSuppliedCallbacks={},this.readyCallbacks=[],this.methodToCallbackMapping={syncPixel:"syncPixelCallback"},this.loaded=!1,this.loadIntegration=!0,this.integrationsData={},this.dynamicallyLoadedIntegrations={},this.destSDKBaseURL=ei,this.cookieConsentOptions={},this.logLevel=void 0,this.clientIntegrationsReady=!1,this.uSession=_u,this.version="2.31.0",this.lockIntegrationsVersion=!1,this.errorReporting=new zu(lt),this.deniedConsentIds=[],this.transformationHandler=Ku}return s(e,[{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=xs();this.storage.setInitialReferrer(e),this.storage.setInitialReferringDomain(Ds(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(Cu[t.name]).concat(ri)]}))||t>=2e4?n(e):e.pause(ni).then((function(){return e.allModulesInitialized(t+ni).then(n)}))}))}},{key:"executeReadyCallback",value:function(){this.readyCallbacks.forEach((function(e){return e()}))}},{key:"integrationSDKLoaded",value:function(e,t){try{return window.hasOwnProperty(e)&&window[e][t]&&void 0!==window[e][t].prototype.constructor}catch(e){return li(e),!1}}},{key:"processResponse",value:function(e,t){var n=this;try{var i=t;try{if("string"==typeof t&&(i=JSON.parse(t)),!i||"object"!==r(i)||Array.isArray(i))throw new Error("Invalid source configuration")}catch(e){return void li(e)}try{this.errorReporting.init(i.source.config,i.source.id)}catch(e){li(e)}if(this.serverUrl=ki(i,this.serverUrl,this.options),this.eventRepository.initialize(this.writeKey,this.serverUrl,this.options),this.loaded=!0,this.transformationHandler.init(this.writeKey,this.serverUrl,this.storage.getAuthToken()),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),i.source.destinations.forEach((function(e){e.enabled&&this.clientIntegrations.push({name:e.destinationDefinition.name,config:e.config,destinationInfo:{areTransformationsConnected:e.areTransformationsConnected||!1,destinationId:e.id}})}),this),this.clientIntegrations=mi(this.loadOnlyIntegrations,this.clientIntegrations),Object.keys(this.cookieConsentOptions).length>0)try{var o=Ou.initialize(this.cookieConsentOptions);this.deniedConsentIds=o&&o.getDeniedList(),this.clientIntegrations=this.clientIntegrations.filter((function(e){return!o||o&&o.isEnabled(e.config)}))}catch(e){li(e)}var s="";Ii().isStaging&&(s="-staging"),this.errorReporting.leaveBreadcrumb("Starting device-mode initialization"),this.clientIntegrations.forEach((function(e){var t=Cu[e.name],r="".concat(t).concat(ri),i="".concat(n.destSDKBaseURL,"/").concat(t).concat(s,".min.js");window.hasOwnProperty(r)||yu(r,i,{isNonNativeSDK:!0});var o=n,a=setInterval((function(){if(o.integrationSDKLoaded(r,t)){var i,s=window[r];clearInterval(a);try{var u="[Analytics] processResponse :: trying to initialize integration name:: ".concat(r);n.errorReporting.leaveBreadcrumb(u),(i=new s[t](e.config,o,e.destinationInfo)).init(),o.isInitialized(i).then((function(){o.dynamicallyLoadedIntegrations[r]=s[t]}))}catch(e){li(e,"[Analytics] 'integration.init()' failed :: ".concat(r," :: ").concat(e.message)),o.failedToBeLoadedIntegration.push(i)}}}),100);setTimeout((function(){clearInterval(a)}),ti)}));var a=this;this.allModulesInitialized().then((function(){if(!a.clientIntegrations||0===a.clientIntegrations.length)return n.clientIntegrationsReady=!0,n.executeReadyCallback(),void(n.toBeProcessedByIntegrationArray=[]);a.replayEvents(a)}))}catch(e){li(e)}}},{key:"sendDataToDestination",value:function(e,t,n){try{if(e[n]){var r=_(t);e[n](r)}}catch(t){li(t,"[sendToNative]:: [Destination: ".concat(e.name,"]:: "))}}},{key:"sendTransformedDataToDestination",value:function(e,t,n){var r=this;try{vi(t.message.integrations),this.transformationHandler.enqueue(t,(function(t){var i=t.transformedPayload,o=t.transformationServerAccess;i&&e.forEach((function(e){try{(o?i.find((function(t){return t.id===e.destinationId})).payload:i).forEach((function(t){r.sendDataToDestination(e,{message:t.event},n)}))}catch(t){t instanceof Error&&(t.message="[DMT]::[Destination:".concat(e.name,"]:: ").concat(t.message)),li(t)}}))}))}catch(e){e instanceof Error&&(e.message="[DMT]:: ".concat(e.message)),li(e)}}},{key:"processAndSendEventsToDeviceMode",value:function(e,t,n){var r=this,i=[],o=[];e.forEach((function(e){!r.IsEventBlackListed(t.message.event,e.name)&&(e.areTransformationsConnected?o.push(e):i.push(e))})),i.forEach((function(e){r.sendDataToDestination(e,t,n)})),o.length>0&&this.sendTransformedDataToDestination(o,t,n)}},{key:"replayEvents",value:function(e){var t,n,r,i=this;this.errorReporting.leaveBreadcrumb("Started replaying buffered events"),e.clientIntegrationObjects=[],e.clientIntegrationObjects=e.successfullyLoadedIntegration,e.clientIntegrationObjects.every((function(e){return!e.isReady||e.isReady()}))&&(this.integrationsData=(t=this.integrationsData,n=e.clientIntegrationObjects,r=_(t),n.forEach((function(e){if(e.getDataForIntegrationsObject)try{r=Pu(r,e.getDataForIntegrationsObject())}catch(e){lt.debug("[Analytics: prepareDataForIntegrationsObj]",e)}})),r),e.clientIntegrationsReady=!0,e.executeReadyCallback()),e.toBeProcessedByIntegrationArray.forEach((function(t){var n=t[0];t.shift(),Object.keys(t[0].message.integrations).length>0&&yi(t[0].message.integrations);var r=mi(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>=ti?(t.failedToBeLoadedIntegration.push(e),r(t)):t.pause(ni).then((function(){return t.isInitialized(e,n+ni).then(r)}))}))}},{key:"page",value:function(e,t,n,i,o){if(this.errorReporting.leaveBreadcrumb("Page event"),this.loaded){"function"==typeof i&&(o=i,i=null),"function"==typeof n&&(o=n,i=n=null),"function"==typeof t&&(o=t,i=n=t=null),"function"==typeof e&&(o=e,i=n=t=e=null),"object"===r(e)&&null!=e&&null!=e&&(i=t,n=e,t=e=null),"object"===r(t)&&null!=t&&null!=t&&(i=n,n=t,t=null),"string"==typeof e&&"string"!=typeof t&&(t=e,e=null),this.sendAdblockPage&&"RudderJS-Initiated"!=e&&this.sendSampleRequest();var s=_(n),a=_(i),u=(new Qs).setType("page").build();s||(s={}),t&&(u.message.name=s.name=t),e&&(u.message.category=s.category=e),u.message.properties=this.getPageProperties(s),this.processAndSendDataToDestinations("page",u,a,o)}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=_(t),o=_(n),s=(new Qs).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,i){if(this.errorReporting.leaveBreadcrumb("Identify event"),this.loaded){"function"==typeof n&&(i=n,n=null),"function"==typeof t&&(i=t,n=null,t=null),"object"===r(e)&&(n=t,t=e,e=this.userId),e&&this.userId&&e!==this.userId&&this.reset(),this.userId=Ai(e),this.storage.setUserId(this.userId);var o=_(t),s=_(n);if(o){for(var a in o)this.userTraits[a]=o[a];this.storage.setUserTraits(this.userTraits)}var u=(new Qs).setType("identify").build();this.processAndSendDataToDestinations("identify",u,s,i)}else this.toBeProcessedArray.push(["identify"].concat(Array.prototype.slice.call(arguments)))}},{key:"alias",value:function(e,t,n,i){if(this.errorReporting.leaveBreadcrumb("Alias event"),this.loaded){"function"==typeof n&&(i=n,n=null),"function"==typeof t&&(i=t,n=null,t=null),"function"==typeof e&&(i=e,n=null,t=null,e=null),"object"===r(t)&&(n=t,t=null),"object"===r(e)&&(n=e,t=null,e=null);var o=(new Qs).setType("alias").build();o.message.previousId=Ai(t)||(this.userId?this.userId:this.getAnonymousId()),o.message.userId=Ai(e);var s=_(n);this.processAndSendDataToDestinations("alias",o,s,i)}else this.toBeProcessedArray.push(["alias"].concat(Array.prototype.slice.call(arguments)))}},{key:"group",value:function(e,t,n,i){if(this.errorReporting.leaveBreadcrumb("Group event"),this.loaded){if(0!==arguments.length){"function"==typeof n&&(i=n,n=null),"function"==typeof t&&(i=t,n=null,t=null),"object"===r(e)&&(n=t,t=e,e=this.groupId),"function"==typeof e&&(i=e,n=null,t=null,e=this.groupId),this.groupId=Ai(e),this.storage.setGroupId(this.groupId);var o=_(t),s=_(n),a=(new Qs).setType("group").build();if(o)for(var u in o)this.groupTraits[u]=o[u];else this.groupTraits={};this.storage.setGroupTraits(this.groupTraits),this.processAndSendDataToDestinations("group",a,s,i)}}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=Wr[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:"processAndSendDataToDestinations",value:function(e,t,r,i){try{this.anonymousId||this.setAnonymousId(),this.errorReporting.leaveBreadcrumb("Started sending data to destinations"),t.message.context.traits=n({},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=n({},this.groupTraits)));try{var o=this.uSession.getSessionInfo(),s=o.sessionId,a=o.sessionStart;t.message.context.sessionId=s,a&&(t.message.context.sessionStart=!0)}catch(e){li(e)}l=this.cookieConsentOptions,f=!1,Object.keys(l).forEach((function(e){si.includes(e)&&"boolean"==typeof l[e].enabled&&!0===l[e].enabled&&(f=!0)})),f&&(t.message.context.consentManagement={deniedConsentIds:this.deniedConsentIds}),this.processOptionsParam(t,r),function(e,t){var n=e.properties,r=e.traits;n&&Object.keys(n).forEach((function(e){Xr.indexOf(e.toLowerCase())>=0&&lt.error("Warning! : Reserved keyword used in properties--\x3e ".concat(e," with ").concat(t," call"))})),r&&Object.keys(r).forEach((function(e){Xr.indexOf(e.toLowerCase())>=0&&lt.error("Warning! : Reserved keyword used in traits--\x3e ".concat(e," with ").concat(t," call"))}));var i=e.context.traits;i&&Object.keys(i).forEach((function(e){Xr.indexOf(e.toLowerCase())>=0&&lt.error("Warning! : Reserved keyword used in traits --\x3e ".concat(e," with ").concat(t," call"))}))}(t.message,e);var u=t.message.integrations||{All:!0};yi(u),t.message.integrations=u;try{t.message.context["ua-ch"]=this.uach}catch(e){li(e)}if(this.clientIntegrationObjects){var c=mi(u,this.clientIntegrationObjects);this.processAndSendEventsToDeviceMode(c,t,e)}else this.toBeProcessedByIntegrationArray.push([e,t]);vi(t.message.integrations),t.message.integrations=function(e,t){var n=_(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 Pu(n,r)}(this.integrationsData,u),this.eventRepository.enqueue(t,e),i&&i(t)}catch(e){li(e)}var l,f}},{key:"utm",value:function(e){var t;"?"===e.charAt(0)&&(e=e.substring(1)),e=e.replace(/\?/g,"&");var n=I(e),r={};for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&"utm_"===i.substr(0,4)&&("campaign"===(t=i.substr(4))&&(t="name"),r[t]=n[i]);return r}},{key:"addCampaignInfo",value:function(e){var t=e.message.context;if(t&&"object"===r(t)){var n=Ns().search;e.message.context.campaign=this.utm(n)}}},{key:"processOptionsParam",value:function(e,t){var i=e.message,o=i.type,s=i.properties;this.addCampaignInfo(e),e.message.context.page=this.getContextPageProperties("page"===o?s:void 0),function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};"object"===r(t)&&null!==t&&Object.keys(t).forEach((function(n){Lu.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]:{},i=e.context;return"object"!==r(t)||null===t||Object.keys(t).forEach((function(e){if(!Lu.includes(e)&&!ai.includes(e))if("context"!==e)i=Pu(i,a({},e,t[e]));else if("object"===r(t[e])&&null!==t[e]){var o={};Object.keys(t[e]).forEach((function(n){ai.includes(n)||(o[n]=t[e][n])})),i=Pu(i,n({},o))}else lt.error("[Analytics: processOptionsParam] context passed in options ".concat(e," is not object."))})),i}(e.message,t)}},{key:"getPageProperties",value:function(e,t){var n=Ns(),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=Ns(),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?Su(t):null,r=n?n.rs_amp_id:null;this.anonymousId=e||r||di(),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,i){var o=this;if("object"===r(t)&&null!==t&&(i=t,t=null),i&&i.logLevel&&(this.logLevel=i.logLevel,lt.setLogLevel(i.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");i&&i.cookieConsentManager&&(this.cookieConsentOptions=i.cookieConsentManager),this.writeKey=e,this.serverUrl=t,this.options=i;var s={};if(i&&i.setCookieDomain&&(s=n(n({},s),{},{domain:i.setCookieDomain})),i&&"boolean"==typeof i.secureCookie&&(s=n(n({},s),{},{secure:i.secureCookie})),i&&ii.includes(i.sameSiteCookie)&&(s=n(n({},s),{},{samesite:i.sameSiteCookie})),this.storage.options(s),i&&"string"==typeof i.uaChTrackLevel&&ui.includes(i.uaChTrackLevel)&&(this.uaChTrackLevel=i.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){o.uach=e}),this.uaChTrackLevel),i&&i.integrations&&(u(this.loadOnlyIntegrations,i.integrations),yi(this.loadOnlyIntegrations)),i&&i.sendAdblockPage&&(this.sendAdblockPage=!0),i&&i.sendAdblockPageOptions&&"object"===r(i.sendAdblockPageOptions)&&(this.sendAdblockPageOptions=i.sendAdblockPageOptions),this.uSession.initialize(i),i&&i.clientSuppliedCallbacks){var a={};Object.keys(this.methodToCallbackMapping).forEach((function(e){o.methodToCallbackMapping.hasOwnProperty(e)&&i.clientSuppliedCallbacks[o.methodToCallbackMapping[e]]&&(a[e]=i.clientSuppliedCallbacks[o.methodToCallbackMapping[e]])})),u(this.clientSuppliedCallbacks,a),this.registerCallbacks(!0)}if(i&&null!=i.loadIntegration&&(this.loadIntegration=!!i.loadIntegration),i&&void 0!==i.lockIntegrationsVersion&&(this.lockIntegrationsVersion=!0===i.lockIntegrationsVersion),this.initializeUser(i?i.anonymousIdOptions:void 0),this.setInitialPageProperties(),this.destSDKBaseURL=function(e,t,n){var r="";if(n){if(!(r=hi(n))){var i="CDN base URL for integrations is not valid";throw li({message:"[Analytics] load:: ".concat(i)}),Error("Failed to load Rudder SDK: ".concat(i))}return r}var o=Ii().sdkURL;return r=o?o.split("/").slice(0,-1).concat(Zr).join("/"):ei,t&&(r=r.replace($r,e)),r}(this.version,this.lockIntegrationsVersion,i&&i.destSDKBaseURL),i&&i.getSourceConfig)if("function"!=typeof i.getSourceConfig)li(new Error('option "getSourceConfig" must be a function'));else{var c=i.getSourceConfig();c instanceof Promise?c.then((function(e){return o.processResponse(200,e)})).catch(li):this.processResponse(200,c)}else{var l=function(e){return Jr.concat(Jr.includes("?")?"&":"?").concat(e?"writeKey=".concat(e):"")}(e);i&&i.configUrl&&(l=function(e,t){var n=e;-1===n.indexOf("sourceConfig")&&(n="".concat(hi(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)}(i.configUrl,l));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;200==e?i(200,o.responseText):(li(new Error("request failed with status: ".concat(o.status," for url: ").concat(t))),i(e))},o.send()}(this,l,e,this.processResponse)}catch(e){li(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||!Promise||!Object.entries||!Object.values||!String.prototype.replaceAll||!this.isDatasetAvailable())}},{key:"load",value:function(e,t,n){if(!this.loaded){var r=_(n);if(this.arePolyfillsRequired(r)){var i="polyfill";yu(i,"https://polyfill.io/v3/polyfill.min.js?features=Array.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",{skipDatasetAttributes:!0});var o=this,s=setInterval((function(){(window.hasOwnProperty(i)||null!==document.getElementById(i))&&(clearInterval(s),o.loadAfterPolyfill(e,t,r))}),100);setTimeout((function(){clearInterval(s)}),ti)}else this.loadAfterPolyfill(e,t,r)}}},{key:"ready",value:function(e){this.loaded?"function"!=typeof e?lt.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(){yu("ad-block","//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js")}},{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)):lt.error("Provided input should be in string format")}}]),e}(),qu=new Qu;p(qu),window.addEventListener("error",(function(e){li(e,void 0,qu)}),!0),qu.initializeCallbacks(),qu.registerCallbacks(!1);var Vu,Wu="load",Yu=window.rudderanalytics,Xu=Array.isArray(Yu);if(Xu)for(var Ju=0;Ju<Yu.length;){if(Yu[Ju]&&Yu[Ju][0]===Wu){Vu=Yu[Ju],Yu.splice(Ju,1);break}Ju+=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=I(e);i.ajs_aid&&qu.toBeProcessedArray.push(["setAnonymousId",i.ajs_aid]),i.ajs_uid&&qu.toBeProcessedArray.push(["identify",i.ajs_uid,r(i,t)]),i.ajs_event&&qu.toBeProcessedArray.push(["track",i.ajs_event,r(i,n)])}(window.location.search),Xu&&Yu.forEach((function(e){return qu.toBeProcessedArray.push(e)})),Vu&&Vu.length>0&&(Vu.shift(),qu.load.apply(qu,c(Vu)));var $u=qu.ready.bind(qu),Zu=qu.identify.bind(qu),ec=qu.page.bind(qu),tc=qu.track.bind(qu),nc=qu.alias.bind(qu),rc=qu.group.bind(qu),ic=qu.reset.bind(qu),oc=qu.load.bind(qu),sc=qu.initialized=!0,ac=qu.getUserId.bind(qu),uc=qu.getSessionId.bind(qu),cc=qu.getUserTraits.bind(qu),lc=qu.getAnonymousId.bind(qu),fc=qu.setAnonymousId.bind(qu),hc=qu.getGroupId.bind(qu),dc=qu.getGroupTraits.bind(qu),pc=qu.startSession.bind(qu),gc=qu.endSession.bind(qu),yc=qu.setAuthToken.bind(qu);e.alias=nc,e.endSession=gc,e.getAnonymousId=lc,e.getGroupId=hc,e.getGroupTraits=dc,e.getSessionId=uc,e.getUserId=ac,e.getUserTraits=cc,e.group=rc,e.identify=Zu,e.initialized=sc,e.load=oc,e.page=ec,e.ready=$u,e.reset=ic,e.setAnonymousId=fc,e.setAuthToken=yc,e.startSession=pc,e.track=tc,Object.defineProperty(e,"__esModule",{value:!0})}));
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).rudderanalytics={})}(this,(function(e){"use strict";function t(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 n(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?t(Object(r),!0).forEach((function(t){a(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):t(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function r(e){return r="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},r(e)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(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,f(r.key),r)}}function s(e,t,n){return t&&o(e.prototype,t),n&&o(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function a(e,t,n){return(t=f(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function u(){return u=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u.apply(this,arguments)}function c(e){return function(e){if(Array.isArray(e))return l(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return l(e,t)}(e)||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,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function f(e){var t=function(e,t){if("object"!=typeof e||null===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:String(t)}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function h(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var n=function e(){if(this instanceof e){var n=[null];n.push.apply(n,arguments);var r=Function.bind.apply(t,n);return new r}return t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})})),n}var d={};!function(e){function t(e){if(e)return function(e){for(var n in t.prototype)e[n]=t.prototype[n];return e}(e)}e.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}}({get exports(){return d},set exports(e){d=e}});var p=d,g={};!function(e,t){(t=e.exports=function(e){return e.trim?e.trim():t.right(t.left(e))}).left=function(e){return e.trimLeft?e.trimLeft():e.replace(/^\s\s*/,"")},t.right=function(e){if(e.trimRight)return e.trimRight();for(var t=/\s/,n=e.length;t.test(e.charAt(--n)););return e.slice(0,n+1)}}({get exports(){return g},set exports(e){g=e}},g);var y=g,v=/(\w+)\[(\d+)\]/,m=function(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(t){return e}},I=function(e){if("string"!=typeof e)return{};if(""==(e=y(e)))return{};"?"==e.charAt(0)&&(e=e.slice(1));for(var t={},n=e.split("&"),r=0;r<n.length;r++){var i,o=n[r].split("="),s=m(o[0]);(i=v.exec(s))?(t[i[1]]=t[i[1]]||[],t[i[1]][i[2]]=m(o[1])):t[o[0]]=null==o[1]?"":m(o[1])}return t};function A(e){return null!=e&&"object"===r(e)&&!0===e["@@functional/placeholder"]}function b(e){return function t(n){return 0===arguments.length||A(n)?t:e.apply(this,arguments)}}function k(e){return function t(n,r){switch(arguments.length){case 0:return t;case 1:return A(n)?t:b((function(t){return e(n,t)}));default:return A(n)&&A(r)?t:A(n)?b((function(t){return e(t,r)})):A(r)?b((function(t){return e(n,t)})):e(n,r)}}}function E(e){return function t(n,r,i){switch(arguments.length){case 0:return t;case 1:return A(n)?t:k((function(t,r){return e(n,t,r)}));case 2:return A(n)&&A(r)?t:A(n)?k((function(t,n){return e(t,r,n)})):A(r)?k((function(t,r){return e(n,t,r)})):b((function(t){return e(n,r,t)}));default:return A(n)&&A(r)&&A(i)?t:A(n)&&A(r)?k((function(t,n){return e(t,n,i)})):A(n)&&A(i)?k((function(t,n){return e(t,r,n)})):A(r)&&A(i)?k((function(t,r){return e(n,t,r)})):A(n)?b((function(t){return e(t,r,i)})):A(r)?b((function(t){return e(n,t,i)})):A(i)?b((function(t){return e(n,r,t)})):e(n,r,i)}}}function S(e,t){return Object.prototype.hasOwnProperty.call(t,e)}var C=b((function(e){return null===e?"Null":void 0===e?"Undefined":Object.prototype.toString.call(e).slice(8,-1)}));function w(e){return"[object Object]"===Object.prototype.toString.call(e)}function O(e,t,n){if(n||(n=new T),function(e){var t=r(e);return null==e||"object"!=t&&"function"!=t}(e))return e;var i=function(r){var i=n.get(e);if(i)return i;for(var o in n.set(e,r),e)Object.prototype.hasOwnProperty.call(e,o)&&(r[o]=t?O(e[o],!0,n):e[o]);return r};switch(C(e)){case"Object":return i(Object.create(Object.getPrototypeOf(e)));case"Array":return i([]);case"Date":return new Date(e.valueOf());case"RegExp":return function(e){return new RegExp(e.source,e.flags?e.flags:(e.global?"g":"")+(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.sticky?"y":"")+(e.unicode?"u":"")+(e.dotAll?"s":""))}(e);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 T=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){var i=n[r];if(i[0]===e)return i[1]}else{var o=this.hash(e),s=this.map[o];if(s)for(var a=0;a<s.length;a+=1){var u=s[a];if(u[0]===e)return u[1]}}},e}(),_=b((function(e){return null!=e&&"function"==typeof e.clone?e.clone():O(e,!0)})),R=E((function(e,t,n){var r,i={};for(r in n=n||{},t=t||{})S(r,t)&&(i[r]=S(r,n)?e(r,t[r],n[r]):t[r]);for(r in n)S(r,n)&&!S(r,i)&&(i[r]=n[r]);return i})),P=E((function e(t,n,r){return R((function(n,r,i){return w(r)&&w(i)?e(t,r,i):t(n,r,i)}),n,r)})),L=E((function(e,t,n){return P((function(t,n,r){return e(n,r)}),t,n)})),x=function(e){return null!=e&&"object"===r(e)&&!1===Array.isArray(e)},D=function(e,t,n){if(x(n)||(n={default:n}),!B(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 N(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=M([l.slice(0,-1),a[++c]||""],s,n);if(l in e){if(!N(l,e,n))return n.default;e=e[l]}else{for(var f=!1,h=c+1;h<u;)if(f=(l=M([l,a[h++]],s,n))in e){if(!N(l,e,n))return n.default;e=e[l],c=h-1;break}if(!f)return n.default}}while(++c<u&&B(e));return c===u?e:n.default};function M(e,t,n){return"function"==typeof n.join?n.join(e):e[0]+t+e[1]}function N(e,t,n){return"function"!=typeof n.isValid||n.isValid(e,t)}function B(e){return x(e)||Array.isArray(e)||"function"==typeof e}for(var j,F=256,U=[];F--;)U[F]=(F+256).toString(16).substring(1);for(var G,H=[],z=0;z<256;z++)H[z]=(z+256).toString(16).substring(1);function K(){var e;(!G||z+16>4096)&&(e=4096,G=crypto.getRandomValues(new Uint8Array(e)),z=0);for(var t,n=0,r="";n<16;n++)t=G[z+n],r+=6==n?H[15&t|64]:8==n?H[63&t|128]:H[t],1&n&&n>1&&n<11&&(r+="-");return z+=16,r}var Q,q,V,W,Y,X,J,$,Z,ee,te,ne,re,ie,oe,se,ae,ue,ce,le,fe,he,de,pe,ge,ye,ve,me,Ie,Ae,be,ke,Ee,Se,Ce,we,Oe,Te,_e,Re,Pe,Le,xe,De,Me,Ne,Be,je,Fe,Ue,Ge,He,ze,Ke,Qe,qe,Ve,We,Ye,Xe,Je,$e,Ze,et,tt,nt,rt,it,ot,st,at,ut,ct=4,lt={setLogLevel:function(e){switch(e.toUpperCase()){case"INFO":ct=1;break;case"DEBUG":ct=2;break;case"WARN":ct=3;break;default:ct=4}},info:function(){var e;ct<=1&&(e=console).info.apply(e,arguments)},debug:function(){var e;ct<=2&&(e=console).log.apply(e,arguments)},warn:function(){var e;ct<=3&&(e=console).warn.apply(e,arguments)},error:function(){var e;ct<=4&&(e=console).error.apply(e,arguments)}},ft="ADOBE_ANALYTICS",ht=(Q={"Adobe Analytics":ft,ADOBEANALYTICS:ft,"ADOBE ANALYTICS":ft},a(Q,ft,ft),a(Q,"AdobeAnalytics",ft),a(Q,"adobeanalytics",ft),a(Q,"adobe analytics",ft),a(Q,"Adobe analytics",ft),a(Q,"adobe Analytics",ft),Q),dt="AM",pt=(q={},a(q,dt,dt),a(q,"AMPLITUDE",dt),a(q,"Amplitude",dt),a(q,"am",dt),q),gt="APPCUES",yt=(V={},a(V,gt,gt),a(V,"Appcues",gt),a(V,"App Cues",gt),a(V,"appcues",gt),V),vt="BINGADS",mt=(W={},a(W,vt,vt),a(W,"BingAds",vt),a(W,"bingads",vt),a(W,"Bing Ads",vt),a(W,"Bing ads",vt),a(W,"bing Ads",vt),a(W,"bing ads",vt),W),It="BRAZE",At=(Y={},a(Y,It,It),a(Y,"Braze",It),a(Y,"braze",It),Y),bt="BUGSNAG",kt=(X={},a(X,bt,bt),a(X,"bugsnag",bt),a(X,"Bugsnag",bt),X),Et="CHARTBEAT",St=(J={},a(J,Et,Et),a(J,"Chartbeat",Et),a(J,"chartbeat",Et),a(J,"Chart Beat",Et),a(J,"chart beat",Et),J),Ct="CLEVERTAP",wt=($={},a($,Ct,Ct),a($,"Clevertap",Ct),a($,"clevertap",Ct),$),Ot="COMSCORE",Tt=(Z={},a(Z,Ot,Ot),a(Z,"Comscore",Ot),a(Z,"Com Score",Ot),a(Z,"com Score",Ot),a(Z,"com score",Ot),a(Z,"Com score",Ot),Z),_t="CRITEO",Rt=(ee={},a(ee,_t,_t),a(ee,"Criteo",_t),a(ee,"criteo",_t),ee),Pt="CUSTOMERIO",Lt=(te={},a(te,Pt,Pt),a(te,"Customerio",Pt),a(te,"Customer.io",Pt),a(te,"CUSTOMER.IO",Pt),a(te,"customer.io",Pt),te),xt="DRIP",Dt=(ne={},a(ne,xt,xt),a(ne,"Drip",xt),a(ne,"drip",xt),ne),Mt="FACEBOOK_PIXEL",Nt=(re={},a(re,Mt,Mt),a(re,"FB Pixel",Mt),a(re,"Facebook Pixel",Mt),a(re,"facebook pixel",Mt),a(re,"fbpixel",Mt),a(re,"FBPIXEL",Mt),a(re,"FB_PIXEL",Mt),re),Bt="FULLSTORY",jt=(a(ie={},Bt,Bt),a(ie,"Fullstory",Bt),a(ie,"FullStory",Bt),a(ie,"full Story",Bt),a(ie,"Full Story",Bt),a(ie,"Full story",Bt),a(ie,"full story",Bt),a(ie,"fullstory",Bt),ie),Ft="GA",Ut=(a(oe={},Ft,Ft),a(oe,"Google Analytics",Ft),a(oe,"GoogleAnalytics",Ft),a(oe,"GOOGLE ANALYTICS",Ft),a(oe,"google analytics",Ft),oe),Gt="GA4",Ht=(a(se={},Gt,Gt),a(se,"Google Analytics 4",Gt),a(se,"Google analytics 4",Gt),a(se,"google analytics 4",Gt),a(se,"Google Analytics4",Gt),a(se,"Google analytics4",Gt),a(se,"google analytics4",Gt),a(se,"GoogleAnalytics4",Gt),se),zt="GOOGLEADS",Kt=(a(ae={},zt,zt),a(ae,"Google Ads",zt),a(ae,"GoogleAds",zt),a(ae,"GOOGLE ADS",zt),a(ae,"google ads",zt),a(ae,"googleads",zt),ae),Qt="GOOGLE_OPTIMIZE",qt=(a(ue={},Qt,Qt),a(ue,"Google Optimize",Qt),a(ue,"GoogleOptimize",Qt),a(ue,"Googleoptimize",Qt),a(ue,"GOOGLEOPTIMIZE",Qt),a(ue,"google optimize",Qt),a(ue,"Google optimize",Qt),a(ue,"GOOGLE OPTIMIZE",Qt),ue),Vt="GTM",Wt=(a(ce={},Vt,Vt),a(ce,"Google Tag Manager",Vt),a(ce,"google tag manager",Vt),a(ce,"googletag manager",Vt),a(ce,"googletagmanager",Vt),ce),Yt="HEAP",Xt=(a(le={},Yt,Yt),a(le,"Heap",Yt),a(le,"heap",Yt),a(le,"Heap.io",Yt),le),Jt="HOTJAR",$t=(a(fe={},Jt,Jt),a(fe,"Hotjar",Jt),a(fe,"hotjar",Jt),a(fe,"Hot Jar",Jt),a(fe,"hot jar",Jt),fe),Zt="HS",en=(a(he={},Zt,Zt),a(he,"Hubspot",Zt),a(he,"HUBSPOT",Zt),a(he,"hub spot",Zt),a(he,"Hub Spot",Zt),a(he,"Hub spot",Zt),he),tn="INTERCOM",nn=(a(de={},tn,tn),a(de,"Intercom",tn),a(de,"intercom",tn),de),rn="KEEN",on=(a(pe={},rn,rn),a(pe,"Keen",rn),a(pe,"Keen.io",rn),a(pe,"keen",rn),a(pe,"keen.io",rn),pe),sn="KISSMETRICS",an=(a(ge={},sn,sn),a(ge,"Kissmetrics",sn),a(ge,"kissmetrics",sn),ge),un="KLAVIYO",cn=(a(ye={},un,un),a(ye,"Klaviyo",un),a(ye,"klaviyo",un),ye),ln="LAUNCHDARKLY",fn=(a(ve={},ln,ln),a(ve,"LaunchDarkly",ln),a(ve,"Launch_Darkly",ln),a(ve,"Launch Darkly",ln),a(ve,"launchDarkly",ln),a(ve,"launch darkly",ln),ve),hn="LINKEDIN_INSIGHT_TAG",dn=(a(me={},hn,hn),a(me,"LinkedIn Insight Tag",hn),a(me,"LinkedIn insight tag",hn),a(me,"linkedIn insight tag",hn),a(me,"Linkedin_insight_tag",hn),a(me,"LinkedinInsighttag",hn),a(me,"LinkedinInsightTag",hn),a(me,"LinkedInInsightTag",hn),a(me,"Linkedininsighttag",hn),a(me,"LINKEDININSIGHTTAG",hn),a(me,"linkedininsighttag",hn),me),pn="LOTAME",gn=(a(Ie={},pn,pn),a(Ie,"Lotame",pn),a(Ie,"lotame",pn),Ie),yn="LYTICS",vn=(a(Ae={},yn,yn),a(Ae,"Lytics",yn),a(Ae,"lytics",yn),Ae),mn="MP",In=(a(be={},mn,mn),a(be,"MIXPANEL",mn),a(be,"Mixpanel",mn),a(be,"MIX PANEL",mn),a(be,"Mix panel",mn),a(be,"Mix Panel",mn),be),An="MOENGAGE",bn=(a(ke={},An,An),a(ke,"MoEngage",An),a(ke,"moengage",An),a(ke,"Moengage",An),a(ke,"Mo Engage",An),a(ke,"mo engage",An),a(ke,"Mo engage",An),ke),kn="OPTIMIZELY",En=(a(Ee={},kn,kn),a(Ee,"Optimizely",kn),a(Ee,"optimizely",kn),Ee),Sn="PENDO",Cn=(a(Se={},Sn,Sn),a(Se,"Pendo",Sn),a(Se,"pendo",Sn),Se),wn="PINTEREST_TAG",On=(a(Ce={},wn,wn),a(Ce,"PinterestTag",wn),a(Ce,"Pinterest_Tag",wn),a(Ce,"PINTERESTTAG",wn),a(Ce,"pinterest",wn),a(Ce,"PinterestAds",wn),a(Ce,"Pinterest_Ads",wn),a(Ce,"Pinterest",wn),a(Ce,"Pinterest Tag",wn),a(Ce,"Pinterest tag",wn),a(Ce,"PINTEREST TAG",wn),a(Ce,"pinterest tag",wn),a(Ce,"Pinterest Ads",wn),a(Ce,"Pinterest ads",wn),Ce),Tn="POST_AFFILIATE_PRO",_n=(a(we={},Tn,Tn),a(we,"PostAffiliatePro",Tn),a(we,"Post_affiliate_pro",Tn),a(we,"Post Affiliate Pro",Tn),a(we,"Post affiliate pro",Tn),a(we,"post affiliate pro",Tn),a(we,"postaffiliatepro",Tn),a(we,"POSTAFFILIATEPRO",Tn),we),Rn="POSTHOG",Pn=(a(Oe={},Rn,Rn),a(Oe,"PostHog",Rn),a(Oe,"Posthog",Rn),a(Oe,"posthog",Rn),a(Oe,"Post Hog",Rn),a(Oe,"Post hog",Rn),a(Oe,"post hog",Rn),Oe),Ln="PROFITWELL",xn=(a(Te={},Ln,Ln),a(Te,"ProfitWell",Ln),a(Te,"profitwell",Ln),a(Te,"Profitwell",Ln),a(Te,"Profit Well",Ln),a(Te,"profit well",Ln),a(Te,"Profit well",Ln),Te),Dn="QUALTRICS",Mn=(a(_e={},Dn,Dn),a(_e,"Qualtrics",Dn),a(_e,"qualtrics",Dn),_e),Nn="QUANTUMMETRIC",Bn=(a(Re={},Nn,Nn),a(Re,"Quantum Metric",Nn),a(Re,"quantum Metric",Nn),a(Re,"quantum metric",Nn),a(Re,"QuantumMetric",Nn),a(Re,"quantumMetric",Nn),a(Re,"quantummetric",Nn),a(Re,"Quantum_Metric",Nn),Re),jn="REDDIT_PIXEL",Fn=(a(Pe={},jn,jn),a(Pe,"Reddit_Pixel",jn),a(Pe,"RedditPixel",jn),a(Pe,"REDDITPIXEL",jn),a(Pe,"redditpixel",jn),a(Pe,"Reddit Pixel",jn),a(Pe,"REDDIT PIXEL",jn),a(Pe,"reddit pixel",jn),Pe),Un="SENTRY",Gn=(a(Le={},Un,Un),a(Le,"sentry",Un),a(Le,"Sentry",Un),Le),Hn="SNAP_PIXEL",zn=(a(xe={},Hn,Hn),a(xe,"Snap_Pixel",Hn),a(xe,"SnapPixel",Hn),a(xe,"SNAPPIXEL",Hn),a(xe,"snappixel",Hn),a(xe,"Snap Pixel",Hn),a(xe,"SNAP PIXEL",Hn),a(xe,"snap pixel",Hn),xe),Kn="TVSQUARED",Qn=(a(De={},Kn,Kn),a(De,"TVSquared",Kn),a(De,"tvsquared",Kn),a(De,"tvSquared",Kn),a(De,"TvSquared",Kn),a(De,"Tvsquared",Kn),a(De,"TV Squared",Kn),a(De,"tv squared",Kn),a(De,"tv Squared",Kn),De),qn="VWO",Vn=(a(Me={},qn,qn),a(Me,"VisualWebsiteOptimizer",qn),a(Me,"Visualwebsiteoptimizer",qn),a(Me,"visualwebsiteoptimizer",qn),a(Me,"vwo",qn),a(Me,"Visual Website Optimizer",qn),a(Me,"Visual website optimizer",qn),a(Me,"visual website optimizer",qn),Me),Wn="GA360",Yn=(a(Ne={},Wn,Wn),a(Ne,"Google Analytics 360",Wn),a(Ne,"Google analytics 360",Wn),a(Ne,"google analytics 360",Wn),a(Ne,"Google Analytics360",Wn),a(Ne,"Google analytics360",Wn),a(Ne,"google analytics360",Wn),a(Ne,"GoogleAnalytics360",Wn),a(Ne,"GA 360",Wn),Ne),Xn="ADROLL",Jn=(a(Be={},Xn,Xn),a(Be,"Adroll",Xn),a(Be,"Ad roll",Xn),a(Be,"ad roll",Xn),a(Be,"adroll",Xn),Be),$n="DCM_FLOODLIGHT",Zn=(a(je={},$n,$n),a(je,"DCM Floodlight",$n),a(je,"dcm floodlight",$n),a(je,"Dcm Floodlight",$n),a(je,"DCMFloodlight",$n),a(je,"dcmfloodlight",$n),a(je,"DcmFloodlight",$n),a(je,"dcm_floodlight",$n),a(je,"DCM_Floodlight",$n),je),er="MATOMO",tr=(a(Fe={},er,er),a(Fe,"Matomo",er),a(Fe,"matomo",er),Fe),nr="VERO",rr=(a(Ue={},nr,nr),a(Ue,"Vero",nr),a(Ue,"vero",nr),Ue),ir="MOUSEFLOW",or=(a(Ge={},ir,ir),a(Ge,"Mouseflow",ir),a(Ge,"mouseflow",ir),a(Ge,"mouseFlow",ir),a(Ge,"MouseFlow",ir),a(Ge,"Mouse flow",ir),a(Ge,"mouse flow",ir),a(Ge,"mouse Flow",ir),a(Ge,"Mouse Flow",ir),Ge),sr="ROCKERBOX",ar=(a(He={},sr,sr),a(He,"Rockerbox",sr),a(He,"rockerbox",sr),a(He,"RockerBox",sr),a(He,"Rocker box",sr),a(He,"rocker box",sr),a(He,"Rocker Box",sr),He),ur="CONVERTFLOW",cr=(a(ze={},ur,ur),a(ze,"Convertflow",ur),a(ze,"convertflow",ur),a(ze,"convertFlow",ur),a(ze,"ConvertFlow",ur),a(ze,"Convert flow",ur),a(ze,"convert flow",ur),a(ze,"convert Flow",ur),a(ze,"Convert Flow",ur),a(ze,"CONVERT FLOW",ur),ze),lr="SNAPENGAGE",fr=(a(Ke={},lr,lr),a(Ke,"SnapEngage",lr),a(Ke,"Snap_Engage",lr),a(Ke,"snapengage",lr),a(Ke,"SNAP ENGAGE",lr),a(Ke,"Snap Engage",lr),a(Ke,"snap engage",lr),Ke),hr="LIVECHAT",dr=(a(Qe={},hr,hr),a(Qe,"LiveChat",hr),a(Qe,"Live_Chat",hr),a(Qe,"livechat",hr),a(Qe,"LIVE CHAT",hr),a(Qe,"Live Chat",hr),a(Qe,"live chat",hr),Qe),pr="SHYNET",gr=(a(qe={},pr,pr),a(qe,"shynet",pr),a(qe,"ShyNet",pr),a(qe,"shyNet",pr),a(qe,"Shynet",pr),a(qe,"shy net",pr),a(qe,"Shy Net",pr),a(qe,"shy Net",pr),a(qe,"Shy net",pr),qe),yr="WOOPRA",vr=(a(Ve={},yr,yr),a(Ve,"Woopra",yr),a(Ve,"woopra",yr),Ve),mr="ROLLBAR",Ir=(a(We={},mr,mr),a(We,"RollBar",mr),a(We,"Roll_Bar",mr),a(We,"rollbar",mr),a(We,"Rollbar",mr),a(We,"ROLL BAR",mr),a(We,"Roll Bar",mr),a(We,"roll bar",mr),We),Ar="QUORA_PIXEL",br=(a(Ye={},Ar,Ar),a(Ye,"Quora Pixel",Ar),a(Ye,"Quora pixel",Ar),a(Ye,"QUORA PIXEL",Ar),a(Ye,"QuoraPixel",Ar),a(Ye,"Quorapixel",Ar),a(Ye,"QUORAPIXEL",Ar),a(Ye,"Quora_Pixel",Ar),a(Ye,"quora_pixel",Ar),a(Ye,"Quora",Ar),Ye),kr="JUNE",Er=(a(Xe={},kr,kr),a(Xe,"June",kr),a(Xe,"june",kr),Xe),Sr="ENGAGE",Cr=(a(Je={},Sr,Sr),a(Je,"Engage",Sr),a(Je,"engage",Sr),Je),wr="ITERABLE",Or=(a($e={},wr,wr),a($e,"Iterable",wr),a($e,"iterable",wr),$e),Tr="YANDEX_METRICA",_r=(a(Ze={},Tr,Tr),a(Ze,"Yandexmetrica",Tr),a(Ze,"yandexmetrica",Tr),a(Ze,"yandexMetrica",Tr),a(Ze,"YandexMetrica",Tr),Ze),Rr="REFINER",Pr=(a(et={},Rr,Rr),a(et,"Refiner",Rr),a(et,"refiner",Rr),et),Lr="QUALAROO",xr=(a(tt={},Lr,Lr),a(tt,"Qualaroo",Lr),a(tt,"qualaroo",Lr),tt),Dr="PODSIGHTS",Mr=(a(nt={},Dr,Dr),a(nt,"Podsights",Dr),a(nt,"PodSights",Dr),a(nt,"pod Sights",Dr),a(nt,"Pod Sights",Dr),a(nt,"pod sights",Dr),a(nt,"POD SIGHTS",Dr),a(nt,"Pod sights",Dr),nt),Nr="AXEPTIO",Br=(a(rt={},Nr,Nr),a(rt,"Axeptio",Nr),a(rt,"axeptio",Nr),rt),jr="SATISMETER",Fr=(a(it={},jr,jr),a(it,"Satismeter",jr),a(it,"SatisMeter",jr),a(it,"SATISMETER",jr),it),Ur="MICROSOFT_CLARITY",Gr=(a(ot={},Ur,Ur),a(ot,"Microsoft Clarity",Ur),a(ot,"Microsoft clarity",Ur),a(ot,"microsoft clarity",Ur),a(ot,"Microsoft_clarity",Ur),a(ot,"MicrosoftClarity",Ur),a(ot,"MICROSOFTCLARITY",Ur),a(ot,"microsoftclarity",Ur),a(ot,"microsoftClarity",Ur),ot),Hr="SENDINBLUE",zr=(a(st={},Hr,Hr),a(st,"Sendinblue",Hr),a(st,"sendinblue",Hr),a(st,"SendinBlue",Hr),st),Kr="OLARK",Qr=(a(at={},Kr,Kr),a(at,"Olark",Kr),a(at,"olark",Kr),at),qr="LEMNISK",Vr=(a(ut={},qr,qr),a(ut,"LEMNISK_MARKETING_AUTOMATION",qr),a(ut,"Lemnisk Marketing Automation",qr),a(ut,"LemniskMarketingAutomation",qr),a(ut,"lemniskmarketingautomation",qr),a(ut,"lemniskMarketingAutomation",qr),a(ut,"lemnisk",qr),a(ut,"Lemnisk",qr),ut),Wr=n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n({All:"All"},ht),pt),yt),mt),At),kt),St),wt),Tt),Rt),Lt),Dt),Nt),jt),Ut),Ht),Yn),Kt),qt),Wt),Xt),$t),en),nn),on),an),cn),fn),dn),gn),vn),In),bn),En),Cn),On),_n),Pn),xn),Mn),Bn),Fn),Gn),zn),Qn),Vn),Jn),Zn),tr),rr),or),cr),fr),dr),gr),vr),Ir),br),Er),Cr),Or),ar),_r),Pr),xr),Mr),Br),Fr),Gr),zr),Qr),Vr),Yr={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",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"},Xr=["anonymous_id","id","sent_at","received_at","timestamp","original_timestamp","event_text","event"],Jr="https://api.rudderlabs.com/sourceConfig/?p=npm&v=2.31.1",$r="v1.1",Zr="js-integrations",ei="".concat("https://cdn.rudderlabs.com","/").concat($r,"/").concat(Zr),ti=1e4,ni=1e3,ri="_RS",ii=["Lax","None","Strict"],oi=["US","EU"],si=["oneTrust"],ai=["library","consentManagement"],ui=["none","default","full"];function ci(e){var t=window.rudderanalytics&&window.rudderanalytics.errorReporting;t&&t.notify(e)}function li(e,t,n){var r;try{r=function(e,t,n){var r;try{r="string"==typeof e?e:e instanceof Error||e.message?e.message:JSON.stringify(e)}catch(e){r=""}if(e instanceof Event){if(e.target&&"script"!==e.target.localName)return"";if(e.target.dataset&&("RS_JS_SDK"!==e.target.dataset.loader||"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,'"')}(e,t,n)}catch(t){lt.error("[handleError] Exception:: ",t),lt.error("[handleError] Original error:: ",JSON.stringify(e)),ci(t)}if(r){lt.error(r);var i=e;e instanceof Error||(i=new Error(r)),ci(i)}}function fi(e,t){if(null!=t)return t}function hi(e){return e&&e.endsWith("/")?e.replace(/\/+$/,""):e}function di(){return window.crypto&&"function"==typeof window.crypto.getRandomValues?K():function(){var e,t=0,n="";if(!j||F+16>256){for(j=Array(t=256);t--;)j[t]=256*Math.random()|0;t=F=0}for(;t<16;t++)e=j[F+t],n+=6==t?U[15&e|64]:8==t?U[63&e|128]:U[e],1&t&&t>1&&t<11&&(n+="-");return F++,n}()}function pi(){return(new Date).toISOString()}function gi(e,t){Object.keys(e).forEach((function(n){e.hasOwnProperty(n)&&(t[n]&&(e[t[n]]=e[n]),"All"!=n&&null!=t[n]&&t[n]!=n&&delete e[n])}))}function yi(e){gi(e,Wr)}function vi(e){gi(e,Yr)}function mi(e,t){var n=[];if(!t||0===t.length)return n;var i=!0;void 0!==e.All&&(i=e.All);var o=[];return"string"==typeof t[0]?t.forEach((function(e){o.push({intgName:e,intObj:e})})):"object"===r(t[0])&&t.forEach((function(e){o.push({intgName:e.name,intObj:e})})),o.forEach((function(t){var r=t.intgName,o=t.intObj;if(i){var s=!0;null!=e[r]&&0==e[r]&&(s=!1),s&&n.push(o)}else null!=e[r]&&1==e[r]&&n.push(o)})),n}var Ii=function(){for(var e,t=document.getElementsByTagName("script"),n=!1,r=0;r<t.length;r+=1){var i=hi(t[r].getAttribute("src"));if(i){var o=i.match(/^.*rudder-analytics(-staging)?(\.min)?\.js$/);if(o){e=i,n=void 0!==o[1];break}}}return{sdkURL:e,isStaging:n}},Ai=function(e){return"string"==typeof e||null==e?e:JSON.stringify(e)},bi=function(e){return!(!e||"string"!=typeof e||0===e.trim().length)},ki=function(e,t,n){try{var r=e.source.dataplanes||{};if(Object.keys(r).length){var i=function(e){var t=e?e.residencyServer:void 0;if(t)return"string"==typeof t&&oi.includes(t.toUpperCase())?t.toUpperCase():void lt.error("Invalid residencyServer input")}(n),o=r[i]||r.US;if(o){var s=function(e){if(Array.isArray(e)&&e.length){var t=e.find((function(e){return!0===e.default}));if(t&&bi(t.url))return t.url}}(o);if(s)return s}}if(bi(t))return t;throw Error("Unable to load the SDK due to invalid data plane url")}catch(e){throw Error(e)}},Ei={};!function(e){function t(e){switch(e){case"http:":return 80;case"https:":return 443;default:return location.port}}e.parse=function(e){var n=document.createElement("a");return n.href=e,{href:n.href,host:n.host||location.host,port:"0"===n.port||""===n.port?t(n.protocol):n.port,hash:n.hash,hostname:n.hostname||location.hostname,pathname:"/"!=n.pathname.charAt(0)?"/"+n.pathname:n.pathname,protocol:n.protocol&&":"!=n.protocol?n.protocol:location.protocol,search:n.search,query:n.search.slice(1)}},e.isAbsolute=function(e){return 0==e.indexOf("//")||!!~e.indexOf("://")},e.isRelative=function(t){return!e.isAbsolute(t)},e.isCrossDomain=function(t){t=e.parse(t);var n=e.parse(window.location.href);return t.hostname!==n.hostname||t.port!==n.port||t.protocol!==n.protocol}}(Ei);var Si,Ci={},wi={},Oi={get exports(){return wi},set exports(e){wi=e}};function Ti(){return Si||(Si=1,function(e,t){var n;e.exports=(n=n||function(e,t){var n=Object.create||function(){function e(){}return function(t){var n;return e.prototype=t,n=new e,e.prototype=null,n}}(),r={},i=r.lib={},o=i.Base={extend:function(e){var t=n(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)}},s=i.WordArray=o.extend({init:function(e,n){e=this.words=e||[],this.sigBytes=n!=t?n:4*e.length},toString:function(e){return(e||u).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(o=0;o<i;o+=4)t[r+o>>>2]=n[o>>>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=o.clone.call(this);return e.words=this.words.slice(0),e},random:function(t){for(var n,r=[],i=function(t){var n=987654321,r=4294967295;return function(){var i=((n=36969*(65535&n)+(n>>16)&r)<<16)+(t=18e3*(65535&t)+(t>>16)&r)&r;return i/=4294967296,(i+=.5)*(e.random()>.5?1:-1)}},o=0;o<t;o+=4){var a=i(4294967296*(n||e.random()));n=987654071*a(),r.push(4294967296*a()|0)}return new s.init(r,t)}}),a=r.enc={},u=a.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 s.init(n,t/2)}},c=a.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 s.init(n,t)}},l=a.Utf8={stringify:function(e){try{return decodeURIComponent(escape(c.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return c.parse(unescape(encodeURIComponent(e)))}},f=i.BufferedBlockAlgorithm=o.extend({reset:function(){this._data=new s.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=l.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var n=this._data,r=n.words,i=n.sigBytes,o=this.blockSize,a=i/(4*o),u=(a=t?e.ceil(a):e.max((0|a)-this._minBufferSize,0))*o,c=e.min(4*u,i);if(u){for(var l=0;l<u;l+=o)this._doProcessBlock(r,l);var f=r.splice(0,u);n.sigBytes-=c}return new s.init(f,c)},clone:function(){var e=o.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0});i.Hasher=f.extend({cfg:o.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){f.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 h.HMAC.init(e,n).finalize(t)}}});var h=r.algo={};return r}(Math),n)}(Oi)),wi}var _i,Ri={},Pi={get exports(){return Ri},set exports(e){Ri=e}};function Li(){return _i||(_i=1,function(e,t){var n;e.exports=(n=Ti(),function(){var e=n,t=e.lib.WordArray;function r(e,n,r){for(var i=[],o=0,s=0;s<n;s++)if(s%4){var a=r[e.charCodeAt(s-1)]<<s%4*2,u=r[e.charCodeAt(s)]>>>6-s%4*2;i[o>>>2]|=(a|u)<<24-o%4*8,o++}return t.create(i,o)}e.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+/="}}(),n.enc.Base64)}(Pi)),Ri}var xi,Di={},Mi={get exports(){return Di},set exports(e){Di=e}};function Ni(){return xi||(xi=1,function(e,t){var n;e.exports=(n=Ti(),function(e){var t=n,r=t.lib,i=r.WordArray,o=r.Hasher,s=t.algo,a=[];!function(){for(var t=0;t<64;t++)a[t]=4294967296*e.abs(e.sin(t+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],S=e[t+13],C=e[t+14],w=e[t+15],O=o[0],T=o[1],_=o[2],R=o[3];O=c(O,T,_,R,s,7,a[0]),R=c(R,O,T,_,u,12,a[1]),_=c(_,R,O,T,d,17,a[2]),T=c(T,_,R,O,p,22,a[3]),O=c(O,T,_,R,g,7,a[4]),R=c(R,O,T,_,y,12,a[5]),_=c(_,R,O,T,v,17,a[6]),T=c(T,_,R,O,m,22,a[7]),O=c(O,T,_,R,I,7,a[8]),R=c(R,O,T,_,A,12,a[9]),_=c(_,R,O,T,b,17,a[10]),T=c(T,_,R,O,k,22,a[11]),O=c(O,T,_,R,E,7,a[12]),R=c(R,O,T,_,S,12,a[13]),_=c(_,R,O,T,C,17,a[14]),O=l(O,T=c(T,_,R,O,w,22,a[15]),_,R,u,5,a[16]),R=l(R,O,T,_,v,9,a[17]),_=l(_,R,O,T,k,14,a[18]),T=l(T,_,R,O,s,20,a[19]),O=l(O,T,_,R,y,5,a[20]),R=l(R,O,T,_,b,9,a[21]),_=l(_,R,O,T,w,14,a[22]),T=l(T,_,R,O,g,20,a[23]),O=l(O,T,_,R,A,5,a[24]),R=l(R,O,T,_,C,9,a[25]),_=l(_,R,O,T,p,14,a[26]),T=l(T,_,R,O,I,20,a[27]),O=l(O,T,_,R,S,5,a[28]),R=l(R,O,T,_,d,9,a[29]),_=l(_,R,O,T,m,14,a[30]),O=f(O,T=l(T,_,R,O,E,20,a[31]),_,R,y,4,a[32]),R=f(R,O,T,_,I,11,a[33]),_=f(_,R,O,T,k,16,a[34]),T=f(T,_,R,O,C,23,a[35]),O=f(O,T,_,R,u,4,a[36]),R=f(R,O,T,_,g,11,a[37]),_=f(_,R,O,T,m,16,a[38]),T=f(T,_,R,O,b,23,a[39]),O=f(O,T,_,R,S,4,a[40]),R=f(R,O,T,_,s,11,a[41]),_=f(_,R,O,T,p,16,a[42]),T=f(T,_,R,O,v,23,a[43]),O=f(O,T,_,R,A,4,a[44]),R=f(R,O,T,_,E,11,a[45]),_=f(_,R,O,T,w,16,a[46]),O=h(O,T=f(T,_,R,O,d,23,a[47]),_,R,s,6,a[48]),R=h(R,O,T,_,m,10,a[49]),_=h(_,R,O,T,C,15,a[50]),T=h(T,_,R,O,y,21,a[51]),O=h(O,T,_,R,E,6,a[52]),R=h(R,O,T,_,p,10,a[53]),_=h(_,R,O,T,b,15,a[54]),T=h(T,_,R,O,u,21,a[55]),O=h(O,T,_,R,I,6,a[56]),R=h(R,O,T,_,w,10,a[57]),_=h(_,R,O,T,v,15,a[58]),T=h(T,_,R,O,S,21,a[59]),O=h(O,T,_,R,g,6,a[60]),R=h(R,O,T,_,k,10,a[61]),_=h(_,R,O,T,d,15,a[62]),T=h(T,_,R,O,A,21,a[63]),o[0]=o[0]+O|0,o[1]=o[1]+T|0,o[2]=o[2]+_|0,o[3]=o[3]+R|0},_doFinalize:function(){var t=this._data,n=t.words,r=8*this._nDataBytes,i=8*t.sigBytes;n[i>>>5]|=128<<24-i%32;var o=e.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),t.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}t.MD5=o._createHelper(u),t.HmacMD5=o._createHmacHelper(u)}(Math),n.MD5)}(Mi)),Di}var Bi,ji={},Fi={get exports(){return ji},set exports(e){ji=e}},Ui={},Gi={get exports(){return Ui},set exports(e){Ui=e}};function Hi(){return Bi||(Bi=1,function(e,t){var n,r,i,o,s,a,u,c;e.exports=(c=Ti(),r=(n=c).lib,i=r.WordArray,o=r.Hasher,s=n.algo,a=[],u=s.SHA1=o.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var n=this._hash.words,r=n[0],i=n[1],o=n[2],s=n[3],u=n[4],c=0;c<80;c++){if(c<16)a[c]=0|e[t+c];else{var l=a[c-3]^a[c-8]^a[c-14]^a[c-16];a[c]=l<<1|l>>>31}var f=(r<<5|r>>>27)+u+a[c];f+=c<20?1518500249+(i&o|~i&s):c<40?1859775393+(i^o^s):c<60?(i&o|i&s|o&s)-1894007588:(i^o^s)-899497514,u=s,s=o,o=i<<30|i>>>2,i=r,r=f}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+o|0,n[3]=n[3]+s|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=o.clone.call(this);return e._hash=this._hash.clone(),e}}),n.SHA1=o._createHelper(u),n.HmacSHA1=o._createHmacHelper(u),c.SHA1)}(Gi)),Ui}var zi,Ki,Qi={},qi={get exports(){return Qi},set exports(e){Qi=e}};function Vi(){return Ki||(Ki=1,function(e,t){var n,r,i,o,s,a,u,c;e.exports=(c=Ti(),Hi(),zi||(zi=1,function(e,t){var n;e.exports=(n=Ti(),void function(){var e=n,t=e.lib.Base,r=e.enc.Utf8;e.algo.HMAC=t.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))}})}())}(qi)),r=(n=c).lib,i=r.Base,o=r.WordArray,s=n.algo,a=s.MD5,u=s.EvpKDF=i.extend({cfg:i.extend({keySize:4,hasher:a,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var n=this.cfg,r=n.hasher.create(),i=o.create(),s=i.words,a=n.keySize,u=n.iterations;s.length<a;){c&&r.update(c);var c=r.update(e).finalize(t);r.reset();for(var l=1;l<u;l++)c=r.finalize(c),r.reset();i.concat(c)}return i.sigBytes=4*a,i}}),n.EvpKDF=function(e,t,n){return u.create(n).compute(e,t)},c.EvpKDF)}(Fi)),ji}var Wi,Yi={},Xi={get exports(){return Yi},set exports(e){Yi=e}};!function(e,t){var n;e.exports=(n=Ti(),Li(),Ni(),Vi(),Wi||(Wi=1,function(e,t){var n;e.exports=(n=Ti(),Vi(),void(n.lib.Cipher||function(e){var t=n,r=t.lib,i=r.Base,o=r.WordArray,s=r.BufferedBlockAlgorithm,a=t.enc;a.Utf8;var u=a.Base64,c=t.algo.EvpKDF,l=r.Cipher=s.extend({cfg:i.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(){s.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?I:v}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)}}}}()});r.StreamCipher=l.extend({_doFinalize:function(){return this._process(!0)},blockSize:1});var f=t.mode={},h=r.BlockCipherMode=i.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}}),d=f.CBC=function(){var t=h.extend();function n(t,n,r){var i=this._iv;if(i){var o=i;this._iv=e}else o=this._prevBlock;for(var s=0;s<r;s++)t[n+s]^=o[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}(),p=(t.pad={}).Pkcs7={pad:function(e,t){for(var n=4*t,r=n-e.sigBytes%n,i=r<<24|r<<16|r<<8|r,s=[],a=0;a<r;a+=4)s.push(i);var u=o.create(s,r);e.concat(u)},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}};r.BlockCipher=l.extend({cfg:l.cfg.extend({mode:d,padding:p}),reset:function(){l.reset.call(this);var e=this.cfg,t=e.iv,n=e.mode;if(this._xformMode==this._ENC_XFORM_MODE)var r=n.createEncryptor;else r=n.createDecryptor,this._minBufferSize=1;this._mode&&this._mode.__creator==r?this._mode.init(this,t&&t.words):(this._mode=r.call(n,this,t&&t.words),this._mode.__creator=r)},_doProcessBlock:function(e,t){this._mode.processBlock(e,t)},_doFinalize:function(){var e=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){e.pad(this._data,this.blockSize);var t=this._process(!0)}else t=this._process(!0),e.unpad(t);return t},blockSize:4});var g=r.CipherParams=i.extend({init:function(e){this.mixIn(e)},toString:function(e){return(e||this.formatter).stringify(this)}}),y=(t.format={}).OpenSSL={stringify:function(e){var t=e.ciphertext,n=e.salt;if(n)var r=o.create([1398893684,1701076831]).concat(n).concat(t);else r=t;return r.toString(u)},parse:function(e){var t=u.parse(e),n=t.words;if(1398893684==n[0]&&1701076831==n[1]){var r=o.create(n.slice(2,4));n.splice(0,4),t.sigBytes-=16}return g.create({ciphertext:t,salt:r})}},v=r.SerializableCipher=i.extend({cfg:i.extend({format:y}),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 g.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}}),m=(t.kdf={}).OpenSSL={execute:function(e,t,n,r){r||(r=o.random(8));var i=c.create({keySize:t+n}).compute(e,r),s=o.create(i.words.slice(t),4*n);return i.sigBytes=4*t,g.create({key:i,iv:s,salt:r})}},I=r.PasswordBasedCipher=v.extend({cfg:v.cfg.extend({kdf:m}),encrypt:function(e,t,n,r){var i=(r=this.cfg.extend(r)).kdf.execute(n,e.keySize,e.ivSize);r.iv=i.iv;var o=v.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);return r.iv=i.iv,v.decrypt.call(this,e,t,i.key,r)}})}()))}(Xi)),function(){var e=n,t=e.lib.BlockCipher,r=e.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=t.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++)if(s<n)o[s]=t[s];else{var a=o[s-1];s%n?n>6&&s%n==4&&(a=i[a>>>24]<<24|i[a>>>16&255]<<16|i[a>>>8&255]<<8|i[255&a]):(a=i[(a=a<<8|a>>>24)>>>24]<<24|i[a>>>16&255]<<16|i[a>>>8&255]<<8|i[255&a],a^=p[s/n|0]<<24),o[s]=o[s-n]^a}for(var u=this._invKeySchedule=[],c=0;c<r;c++)s=r-c,a=c%4?o[s]:o[s-4],u[c]=c<4||s<=4?a:l[i[a>>>24]]^f[i[a>>>16&255]]^h[i[a>>>8&255]]^d[i[255&a]]}},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});e.AES=t._createHelper(g)}(),n.AES)}({get exports(){return Ci},set exports(e){Ci=e}});var Ji=Ci,$i={};!function(e,t){e.exports=Ti().enc.Utf8}({get exports(){return $i},set exports(e){$i=e}});var Zi=$i,eo="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{};function to(){throw new Error("setTimeout has not been defined")}function no(){throw new Error("clearTimeout has not been defined")}var ro=to,io=no;function oo(e){if(ro===setTimeout)return setTimeout(e,0);if((ro===to||!ro)&&setTimeout)return ro=setTimeout,setTimeout(e,0);try{return ro(e,0)}catch(t){try{return ro.call(null,e,0)}catch(t){return ro.call(this,e,0)}}}"function"==typeof eo.setTimeout&&(ro=setTimeout),"function"==typeof eo.clearTimeout&&(io=clearTimeout);var so,ao=[],uo=!1,co=-1;function lo(){uo&&so&&(uo=!1,so.length?ao=so.concat(ao):co=-1,ao.length&&fo())}function fo(){if(!uo){var e=oo(lo);uo=!0;for(var t=ao.length;t;){for(so=ao,ao=[];++co<t;)so&&so[co].run();co=-1,t=ao.length}so=null,uo=!1,function(e){if(io===clearTimeout)return clearTimeout(e);if((io===no||!io)&&clearTimeout)return io=clearTimeout,clearTimeout(e);try{io(e)}catch(t){try{return io.call(null,e)}catch(t){return io.call(this,e)}}}(e)}}function ho(e,t){this.fun=e,this.array=t}ho.prototype.run=function(){this.fun.apply(null,this.array)};function po(){}var go=po,yo=po,vo=po,mo=po,Io=po,Ao=po,bo=po;var ko=eo.performance||{},Eo=ko.now||ko.mozNow||ko.msNow||ko.oNow||ko.webkitNow||function(){return(new Date).getTime()};var So=new Date;var Co,wo,Oo={nextTick:function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];ao.push(new ho(e,t)),1!==ao.length||uo||oo(fo)},title:"browser",browser:!0,env:{},argv:[],version:"",versions:{},on:go,addListener:yo,once:vo,off:mo,removeListener:Io,removeAllListeners:Ao,emit:bo,binding:function(e){throw new Error("process.binding is not supported")},cwd:function(){return"/"},chdir:function(e){throw new Error("process.chdir is not supported")},umask:function(){return 0},hrtime:function(e){var t=.001*Eo.call(ko),n=Math.floor(t),r=Math.floor(t%1*1e9);return e&&(n-=e[0],(r-=e[1])<0&&(n--,r+=1e9)),[n,r]},platform:"browser",release:{},config:{},uptime:function(){return(new Date-So)/1e3}},To={};function _o(){if(wo)return Co;wo=1;var e=1e3,t=60*e,n=60*t,i=24*n,o=7*i,s=365.25*i;function a(e,t,n,r){var i=t>=1.5*n;return Math.round(e/n)+" "+r+(i?"s":"")}return Co=function(u,c){c=c||{};var l=r(u);if("string"===l&&u.length>0)return function(r){if((r=String(r)).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(r);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*s;case"weeks":case"week":case"w":return u*o;case"days":case"day":case"d":return u*i;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}}(u);if("number"===l&&isFinite(u))return c.long?function(r){var o=Math.abs(r);if(o>=i)return a(r,o,i,"day");if(o>=n)return a(r,o,n,"hour");if(o>=t)return a(r,o,t,"minute");if(o>=e)return a(r,o,e,"second");return r+" ms"}(u):function(r){var o=Math.abs(r);if(o>=i)return Math.round(r/i)+"d";if(o>=n)return Math.round(r/n)+"h";if(o>=t)return Math.round(r/t)+"m";if(o>=e)return Math.round(r/e)+"s";return r+"ms"}(u);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(u))},Co}var Ro=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);var l=o.log||t.log;l.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=_o(),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&&void 0!==Oo&&"env"in Oo&&(e=Oo.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=Ro(t),e.exports.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}({get exports(){return To},set exports(e){To=e}},To);var Po=To("cookie"),Lo=function(e,t,n){switch(arguments.length){case 3:case 2:return xo(e,t,n);case 1:return Mo(e);default:return Do()}};function xo(e,t,n){n=n||{};var r=No(e)+"="+No(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}function Do(){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[Bo((t=r[i].split("="))[0])]=Bo(t[1]);return n}(e)}function Mo(e){return Do()[e]}function No(e){try{return encodeURIComponent(e)}catch(t){Po("error `encode(%o)` - %o",e,t)}}function Bo(e){try{return decodeURIComponent(e)}catch(t){Po("error `decode(%o)` - %o",e,t)}}var jo={},Fo={get exports(){return jo},set exports(e){jo=e}},Uo=Math.max,Go=function(e,t){var n=t?t.length:0;if(!n)return[];for(var r=Uo(Number(e)||0,0),i=Uo(n-r,0),o=new Array(i),s=0;s<i;s+=1)o[s]=t[s+r];return o},Ho=Math.max,zo=function(e){if(null==e||!e.length)return[];for(var t=new Array(Ho(e.length-2,0)),n=1;n<e.length;n+=1)t[n-1]=e[n];return t},Ko=Go,Qo=zo,qo=Object.prototype.hasOwnProperty,Vo=Object.prototype.toString,Wo=function(e){return Boolean(e)&&"object"===r(e)},Yo=function(e){return Boolean(e)&&"[object Object]"===Vo.call(e)},Xo=function(e,t,n,r){return qo.call(t,r)&&void 0===e[r]&&(e[r]=n),t},Jo=function(e,t,n,r){return qo.call(t,r)&&(Yo(e[r])&&Yo(n)?e[r]=Zo(e[r],n):void 0===e[r]&&(e[r]=n)),t},$o=function(e,t){if(!Wo(t))return t;e=e||Xo;for(var n=Ko(2,arguments),r=0;r<n.length;r+=1)for(var i in n[r])e(t,n[r],n[r][i],i);return t},Zo=function(e){return $o.apply(null,[Jo,e].concat(Qo(arguments)))};Fo.exports=function(e){return $o.apply(null,[null,e].concat(Qo(arguments)))},jo.deep=Zo;var es={},ts={get exports(){return es},set exports(e){es=e}},ns=To("cookie"),rs=function(e,t,n){switch(arguments.length){case 3:case 2:return is(e,t,n);case 1:return ss(e);default:return os()}};function is(e,t,n){n=n||{};var r=as(e)+"="+as(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}function os(){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[us((t=r[i].split("="))[0])]=us(t[1]);return n}(e)}function ss(e){return os()[e]}function as(e){try{return encodeURIComponent(e)}catch(t){ns("error `encode(%o)` - %o",e,t)}}function us(e){try{return decodeURIComponent(e)}catch(t){ns("error `decode(%o)` - %o",e,t)}}!function(e,t){var n=Ei.parse,r=rs;function i(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""}i.levels=function(e){var t=n(e).hostname.split("."),r=t[t.length-1],i=[];if(4===t.length&&r===parseInt(r,10))return i;if(t.length<=1)return i;for(var o=t.length-2;o>=0;--o)i.push(t.slice(o).join("."));return i},i.cookie=r,t=e.exports=i}(ts,es);var cs=es,ls=function(){function e(t){i(this,e),this.cOpts={},this.options(t),this.isSupportAvailable=this.checkSupportAvailability()}return s(e,[{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(cs(window.location.href));return"."===t&&(t=null),this.cOpts=jo(e,{maxage:31536e6,path:"/",domain:t,samesite:"Lax"}),this.cOpts}},{key:"set",value:function(e,t){try{return Lo(e,t,_(this.cOpts)),!0}catch(e){return lt.error(e),!1}}},{key:"get",value:function(e){return Lo(e)}},{key:"remove",value:function(e){try{return Lo(e,null,_(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)}}]),e}(),fs=new ls({}),hs={};!function(e,t){e.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=window.localStorage).setItem(t,n),e.removeItem(t)}catch(i){var r={_data:{},setItem:function(e,t){return this._data[e]=String(t)},getItem:function(e){return this._data.hasOwnProperty(e)?this._data[e]:void 0},removeItem:function(e){return delete this._data[e]},clear:function(){return this._data={}}};(e=r).setItem(t,n),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(!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}};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}()}({get exports(){return hs},set exports(e){hs=e}});var ds=hs,ps=function(){function e(t){i(this,e),this.sOpts={},this.enabled=this.checkSupportAvailability(),this.options(t)}return s(e,[{key:"options",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return 0===arguments.length||(jo(e,{enabled:!0}),this.enabled=e.enabled&&this.enabled,this.sOpts=e),this.sOpts}},{key:"set",value:function(e,t){return ds.set(e,t)}},{key:"get",value:function(e){return ds.get(e)}},{key:"remove",value:function(e){return ds.remove(e)}},{key:"checkSupportAvailability",value:function(){var e="test_rudder_ls";return this.set(e,!0),!!this.get(e)&&(this.remove(e),!0)}}]),e}(),gs=new ps({}),ys="rl_user_id",vs="rl_trait",ms="rl_anonymous_id",Is="rl_group_id",As="rl_group_trait",bs="rl_page_init_referrer",ks="rl_page_init_referring_domain",Es="rl_session",Ss="rl_auth_token",Cs="RudderEncrypt:",ws="Rudder",Os={segment:"ajs_anonymous_id"};function Ts(e){try{return e?JSON.parse(e):null}catch(t){return lt.error(t),e||null}}function _s(e){return e.replace(/^\s+|\s+$/gm,"")}function Rs(e){return!e||"string"==typeof e&&""===_s(e)?e:e.substring(0,Cs.length)===Cs?Ji.decrypt(e.substring(Cs.length),ws).toString(Zi):e}var Ps=function(){function e(){i(this,e),fs.isSupportAvailable?this.storage=fs:(gs.enabled&&(this.storage=gs),this.storage||lt.error("No storage is available :: initializing the SDK without storage"))}return s(e,[{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){this.storage.set(e,function(e){return""===_s(e)?e:"".concat(Cs).concat(Ji.encrypt(e,ws).toString())}(function(e){return JSON.stringify(e)}(t)))}},{key:"setStringItem",value:function(e,t){"string"==typeof t?this.setItem(e,t):lt.error("[Storage] ".concat(e," should be string"))}},{key:"setUserId",value:function(e){this.setStringItem(ys,e)}},{key:"setUserTraits",value:function(e){this.setItem(vs,e)}},{key:"setGroupId",value:function(e){this.setStringItem(Is,e)}},{key:"setGroupTraits",value:function(e){this.setItem(As,e)}},{key:"setAnonymousId",value:function(e){this.setStringItem(ms,e)}},{key:"setInitialReferrer",value:function(e){this.setItem(bs,e)}},{key:"setInitialReferringDomain",value:function(e){this.setItem(ks,e)}},{key:"setSessionInfo",value:function(e){this.setItem(Es,e)}},{key:"setAuthToken",value:function(e){this.setItem(Ss,e)}},{key:"getItem",value:function(e){return Ts(Rs(this.storage.get(e)))}},{key:"getUserId",value:function(){return this.getItem(ys)}},{key:"getUserTraits",value:function(){return this.getItem(vs)}},{key:"getGroupId",value:function(){return this.getItem(Is)}},{key:"getGroupTraits",value:function(){return this.getItem(As)}},{key:"fetchExternalAnonymousId",value:function(e){var t,n=e.toLowerCase();return Object.keys(Os).includes(n)&&"segment"===n?(gs.enabled&&(t=gs.get(Os[n])),!t&&fs.isSupportAvailable&&(t=fs.get(Os[n])),t):t}},{key:"getAnonymousId",value:function(e){var t=Ts(Rs(this.storage.get(ms)));if(t)return t;var n=D(e,"autoCapture.source");if(!0===D(e,"autoCapture.enabled")&&"string"==typeof n){var r=this.fetchExternalAnonymousId(n);if(r)return r}return t}},{key:"getInitialReferrer",value:function(){return this.getItem(bs)}},{key:"getInitialReferringDomain",value:function(){return this.getItem(ks)}},{key:"getSessionInfo",value:function(){return this.getItem(Es)}},{key:"getAuthToken",value:function(){return this.getItem(Ss)}},{key:"removeItem",value:function(e){return this.storage.remove(e)}},{key:"removeSessionInfo",value:function(){this.removeItem(Es)}},{key:"clear",value:function(e){this.storage.remove(ys),this.storage.remove(vs),this.storage.remove(Is),this.storage.remove(As),this.storage.remove(Ss),e&&this.storage.remove(ms)}}]),e}(),Ls=new Ps;function xs(){return document.referrer||"$direct"}function Ds(e){var t=e.split("/");return t.length>=3?t[2]:""}function Ms(){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 Ns(){var e=Ms(),t=e?Ei.parse(e).pathname:window.location.pathname,n=window.location,r=n.search,i=n.href,o=document.title,s=function(e){var t,n=Ms(),r=(t=n?n.includes("?")?n:n+e:window.location.href).indexOf("#");return r>-1?t.slice(0,r):t}(r),a=i,u=xs();return{path:t,referrer:u,referring_domain:Ds(u),search:r,title:o,url:s,tab_url:a,initial_referrer:Ls.getInitialReferrer(),initial_referring_domain:Ls.getInitialReferringDomain()}}for(var Bs,js=s((function e(){i(this,e),this.name="RudderLabs JavaScript SDK",this.namespace="com.rudderlabs.javascript",this.version="2.31.1"})),Fs=s((function e(){i(this,e),this.name="RudderLabs JavaScript SDK",this.version="2.31.1"})),Us=s((function e(){i(this,e),this.name="",this.version=""})),Gs=s((function e(){i(this,e),this.density=0,this.width=0,this.height=0,this.innerWidth=0,this.innerHeight=0})),Hs=s((function e(){var t;i(this,e),this.app=new js,this.traits=null,this.library=new Fs,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 Us,this.locale="undefined"==typeof navigator?null:navigator.language||navigator.browserLanguage,this.screen=(t=new Gs,"undefined"==typeof window||(t.width=window.screen.width,t.height=window.screen.height,t.density=window.devicePixelRatio,t.innerWidth=window.innerWidth,t.innerHeight=window.innerHeight),t)})),zs=function(){function e(){i(this,e),this.channel="web",this.context=new Hs,this.type=null,this.messageId=di(),this.originalTimestamp=(new Date).toISOString(),this.anonymousId=null,this.userId=null,this.event=null,this.properties={},this.integrations={},this.integrations.All=!0}return s(e,[{key:"getProperty",value:function(e){return this.properties[e]}},{key:"addProperty",value:function(e,t){this.properties[e]=t}}]),e}(),Ks=function(){function e(){i(this,e),this.message=new zs}return s(e,[{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}}]),e}(),Qs=function(){function e(){i(this,e),this.rudderProperty=null,this.rudderUserProperty=null,this.event=null,this.userId=null,this.type=null}return s(e,[{key:"setType",value:function(e){return this.type=e,this}},{key:"build",value:function(){var e=new Ks;return e.setUserId(this.userId),e.setType(this.type),e.setEventName(this.event),e.setProperty(this.rudderProperty),e.setUserProperty(this.rudderUserProperty),e}}]),e}(),qs={},Vs=256,Ws=[];Vs--;)Ws[Vs]=(Vs+256).toString(16).substring(1);qs.v4=function(){var e,t=0,n="";if(!Bs||Vs+16>256){for(Bs=Array(t=256);t--;)Bs[t]=256*Math.random()|0;t=Vs=0}for(;t<16;t++)e=Bs[Vs+t],n+=6==t?Ws[15&e|64]:8==t?Ws[63&e|128]:Ws[e],1&t&&t>1&&t<11&&(n+="-");return Vs++,n};var Ys,Xs={},Js=Object.prototype.hasOwnProperty,$s=String.prototype.charAt,Zs=Object.prototype.toString,ea=function(e,t){return $s.call(e,t)},ta=function(e,t){return Js.call(e,t)},na=function(e,t){t=t||ta;for(var n=[],r=0,i=e.length;r<i;r+=1)t(e,r)&&n.push(String(r));return n},ra=function(e){return null==e?[]:(t=e,"[object String]"===Zs.call(t)?na(e,ea):function(e){return null!=e&&"function"!=typeof e&&"number"==typeof e.length}(e)?na(e,ta):function(e,t){t=t||ta;var n=[];for(var r in e)t(e,r)&&n.push(String(r));return n}(e));var t},ia=new Uint8Array(16);function oa(){if(!Ys&&!(Ys="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Ys(ia)}var sa=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function aa(e){return"string"==typeof e&&sa.test(e)}for(var ua,ca,la=[],fa=0;fa<256;++fa)la.push((fa+256).toString(16).substr(1));function ha(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(la[e[t+0]]+la[e[t+1]]+la[e[t+2]]+la[e[t+3]]+"-"+la[e[t+4]]+la[e[t+5]]+"-"+la[e[t+6]]+la[e[t+7]]+"-"+la[e[t+8]]+la[e[t+9]]+"-"+la[e[t+10]]+la[e[t+11]]+la[e[t+12]]+la[e[t+13]]+la[e[t+14]]+la[e[t+15]]).toLowerCase();if(!aa(n))throw TypeError("Stringified UUID is invalid");return n}var da=0,pa=0;function ga(e){if(!aa(e))throw TypeError("Invalid UUID");var t,n=new Uint8Array(16);return n[0]=(t=parseInt(e.slice(0,8),16))>>>24,n[1]=t>>>16&255,n[2]=t>>>8&255,n[3]=255&t,n[4]=(t=parseInt(e.slice(9,13),16))>>>8,n[5]=255&t,n[6]=(t=parseInt(e.slice(14,18),16))>>>8,n[7]=255&t,n[8]=(t=parseInt(e.slice(19,23),16))>>>8,n[9]=255&t,n[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,n[11]=t/4294967296&255,n[12]=t>>>24&255,n[13]=t>>>16&255,n[14]=t>>>8&255,n[15]=255&t,n}function ya(e,t,n){function r(e,r,i,o){if("string"==typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));for(var t=[],n=0;n<e.length;++n)t.push(e.charCodeAt(n));return t}(e)),"string"==typeof r&&(r=ga(r)),16!==r.length)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");var s=new Uint8Array(16+e.length);if(s.set(r),s.set(e,r.length),(s=n(s))[6]=15&s[6]|t,s[8]=63&s[8]|128,i){o=o||0;for(var a=0;a<16;++a)i[o+a]=s[a];return i}return ha(s)}try{r.name=e}catch(e){}return r.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",r.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",r}function va(e){return 14+(e+64>>>9<<4)+1}function ma(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function Ia(e,t,n,r,i,o){return ma((s=ma(ma(t,e),ma(r,o)))<<(a=i)|s>>>32-a,n);var s,a}function Aa(e,t,n,r,i,o,s){return Ia(t&n|~t&r,e,t,i,o,s)}function ba(e,t,n,r,i,o,s){return Ia(t&r|n&~r,e,t,i,o,s)}function ka(e,t,n,r,i,o,s){return Ia(t^n^r,e,t,i,o,s)}function Ea(e,t,n,r,i,o,s){return Ia(n^(t|~r),e,t,i,o,s)}var Sa=ya("v3",48,(function(e){if("string"==typeof e){var t=unescape(encodeURIComponent(e));e=new Uint8Array(t.length);for(var n=0;n<t.length;++n)e[n]=t.charCodeAt(n)}return function(e){for(var t=[],n=32*e.length,r="0123456789abcdef",i=0;i<n;i+=8){var o=e[i>>5]>>>i%32&255,s=parseInt(r.charAt(o>>>4&15)+r.charAt(15&o),16);t.push(s)}return t}(function(e,t){e[t>>5]|=128<<t%32,e[va(t)-1]=t;for(var n=1732584193,r=-271733879,i=-1732584194,o=271733878,s=0;s<e.length;s+=16){var a=n,u=r,c=i,l=o;n=Aa(n,r,i,o,e[s],7,-680876936),o=Aa(o,n,r,i,e[s+1],12,-389564586),i=Aa(i,o,n,r,e[s+2],17,606105819),r=Aa(r,i,o,n,e[s+3],22,-1044525330),n=Aa(n,r,i,o,e[s+4],7,-176418897),o=Aa(o,n,r,i,e[s+5],12,1200080426),i=Aa(i,o,n,r,e[s+6],17,-1473231341),r=Aa(r,i,o,n,e[s+7],22,-45705983),n=Aa(n,r,i,o,e[s+8],7,1770035416),o=Aa(o,n,r,i,e[s+9],12,-1958414417),i=Aa(i,o,n,r,e[s+10],17,-42063),r=Aa(r,i,o,n,e[s+11],22,-1990404162),n=Aa(n,r,i,o,e[s+12],7,1804603682),o=Aa(o,n,r,i,e[s+13],12,-40341101),i=Aa(i,o,n,r,e[s+14],17,-1502002290),n=ba(n,r=Aa(r,i,o,n,e[s+15],22,1236535329),i,o,e[s+1],5,-165796510),o=ba(o,n,r,i,e[s+6],9,-1069501632),i=ba(i,o,n,r,e[s+11],14,643717713),r=ba(r,i,o,n,e[s],20,-373897302),n=ba(n,r,i,o,e[s+5],5,-701558691),o=ba(o,n,r,i,e[s+10],9,38016083),i=ba(i,o,n,r,e[s+15],14,-660478335),r=ba(r,i,o,n,e[s+4],20,-405537848),n=ba(n,r,i,o,e[s+9],5,568446438),o=ba(o,n,r,i,e[s+14],9,-1019803690),i=ba(i,o,n,r,e[s+3],14,-187363961),r=ba(r,i,o,n,e[s+8],20,1163531501),n=ba(n,r,i,o,e[s+13],5,-1444681467),o=ba(o,n,r,i,e[s+2],9,-51403784),i=ba(i,o,n,r,e[s+7],14,1735328473),n=ka(n,r=ba(r,i,o,n,e[s+12],20,-1926607734),i,o,e[s+5],4,-378558),o=ka(o,n,r,i,e[s+8],11,-2022574463),i=ka(i,o,n,r,e[s+11],16,1839030562),r=ka(r,i,o,n,e[s+14],23,-35309556),n=ka(n,r,i,o,e[s+1],4,-1530992060),o=ka(o,n,r,i,e[s+4],11,1272893353),i=ka(i,o,n,r,e[s+7],16,-155497632),r=ka(r,i,o,n,e[s+10],23,-1094730640),n=ka(n,r,i,o,e[s+13],4,681279174),o=ka(o,n,r,i,e[s],11,-358537222),i=ka(i,o,n,r,e[s+3],16,-722521979),r=ka(r,i,o,n,e[s+6],23,76029189),n=ka(n,r,i,o,e[s+9],4,-640364487),o=ka(o,n,r,i,e[s+12],11,-421815835),i=ka(i,o,n,r,e[s+15],16,530742520),n=Ea(n,r=ka(r,i,o,n,e[s+2],23,-995338651),i,o,e[s],6,-198630844),o=Ea(o,n,r,i,e[s+7],10,1126891415),i=Ea(i,o,n,r,e[s+14],15,-1416354905),r=Ea(r,i,o,n,e[s+5],21,-57434055),n=Ea(n,r,i,o,e[s+12],6,1700485571),o=Ea(o,n,r,i,e[s+3],10,-1894986606),i=Ea(i,o,n,r,e[s+10],15,-1051523),r=Ea(r,i,o,n,e[s+1],21,-2054922799),n=Ea(n,r,i,o,e[s+8],6,1873313359),o=Ea(o,n,r,i,e[s+15],10,-30611744),i=Ea(i,o,n,r,e[s+6],15,-1560198380),r=Ea(r,i,o,n,e[s+13],21,1309151649),n=Ea(n,r,i,o,e[s+4],6,-145523070),o=Ea(o,n,r,i,e[s+11],10,-1120210379),i=Ea(i,o,n,r,e[s+2],15,718787259),r=Ea(r,i,o,n,e[s+9],21,-343485551),n=ma(n,a),r=ma(r,u),i=ma(i,c),o=ma(o,l)}return[n,r,i,o]}(function(e){if(0===e.length)return[];for(var t=8*e.length,n=new Uint32Array(va(t)),r=0;r<t;r+=8)n[r>>5]|=(255&e[r/8])<<r%32;return n}(e),8*e.length))})),Ca=Sa;function wa(e,t,n,r){switch(e){case 0:return t&n^~t&r;case 1:case 3:return t^n^r;case 2:return t&n^t&r^n&r}}function Oa(e,t){return e<<t|e>>>32-t}var Ta=ya("v5",80,(function(e){var t=[1518500249,1859775393,2400959708,3395469782],n=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof e){var r=unescape(encodeURIComponent(e));e=[];for(var i=0;i<r.length;++i)e.push(r.charCodeAt(i))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);for(var o=e.length/4+2,s=Math.ceil(o/16),a=new Array(s),u=0;u<s;++u){for(var c=new Uint32Array(16),l=0;l<16;++l)c[l]=e[64*u+4*l]<<24|e[64*u+4*l+1]<<16|e[64*u+4*l+2]<<8|e[64*u+4*l+3];a[u]=c}a[s-1][14]=8*(e.length-1)/Math.pow(2,32),a[s-1][14]=Math.floor(a[s-1][14]),a[s-1][15]=8*(e.length-1)&4294967295;for(var f=0;f<s;++f){for(var h=new Uint32Array(80),d=0;d<16;++d)h[d]=a[f][d];for(var p=16;p<80;++p)h[p]=Oa(h[p-3]^h[p-8]^h[p-14]^h[p-16],1);for(var g=n[0],y=n[1],v=n[2],m=n[3],I=n[4],A=0;A<80;++A){var b=Math.floor(A/20),k=Oa(g,5)+wa(b,y,v,m)+I+t[b]+h[A]>>>0;I=m,m=v,v=Oa(y,30)>>>0,y=g,g=k}n[0]=n[0]+g>>>0,n[1]=n[1]+y>>>0,n[2]=n[2]+v>>>0,n[3]=n[3]+m>>>0,n[4]=n[4]+I>>>0}return[n[0]>>24&255,n[0]>>16&255,n[0]>>8&255,255&n[0],n[1]>>24&255,n[1]>>16&255,n[1]>>8&255,255&n[1],n[2]>>24&255,n[2]>>16&255,n[2]>>8&255,255&n[2],n[3]>>24&255,n[3]>>16&255,n[3]>>8&255,255&n[3],n[4]>>24&255,n[4]>>16&255,n[4]>>8&255,255&n[4]]})),_a=Ta;var Ra=Object.freeze({__proto__:null,v1:function(e,t,n){var r=t&&n||0,i=t||new Array(16),o=(e=e||{}).node||ua,s=void 0!==e.clockseq?e.clockseq:ca;if(null==o||null==s){var a=e.random||(e.rng||oa)();null==o&&(o=ua=[1|a[0],a[1],a[2],a[3],a[4],a[5]]),null==s&&(s=ca=16383&(a[6]<<8|a[7]))}var u=void 0!==e.msecs?e.msecs:Date.now(),c=void 0!==e.nsecs?e.nsecs:pa+1,l=u-da+(c-pa)/1e4;if(l<0&&void 0===e.clockseq&&(s=s+1&16383),(l<0||u>da)&&void 0===e.nsecs&&(c=0),c>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");da=u,pa=c,ca=s;var f=(1e4*(268435455&(u+=122192928e5))+c)%4294967296;i[r++]=f>>>24&255,i[r++]=f>>>16&255,i[r++]=f>>>8&255,i[r++]=255&f;var h=u/4294967296*1e4&268435455;i[r++]=h>>>8&255,i[r++]=255&h,i[r++]=h>>>24&15|16,i[r++]=h>>>16&255,i[r++]=s>>>8|128,i[r++]=255&s;for(var d=0;d<6;++d)i[r+d]=o[d];return t||ha(i)},v3:Ca,v4:function(e,t,n){var r=(e=e||{}).random||(e.rng||oa)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var i=0;i<16;++i)t[n+i]=r[i];return t}return ha(r)},v5:_a,NIL:"00000000-0000-0000-0000-000000000000",version:function(e){if(!aa(e))throw TypeError("Invalid UUID");return parseInt(e.substr(14,1),16)},validate:aa,stringify:ha,parse:ga}),Pa=ra,La=h(Ra).v4,xa={_data:{},length:0,setItem:function(e,t){return this._data[e]=t,this.length=Pa(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=Pa(this._data).length,null},clear:function(){this._data={},this.length=0},key:function(e){return Pa(this._data)[e]}};Xs.defaultEngine=function(){try{if(!window.localStorage)return!1;var e=La();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:xa,Xs.inMemoryEngine=xa;var Da=ra,Ma=Object.prototype.toString,Na="function"==typeof Array.isArray?Array.isArray:function(e){return"[object Array]"===Ma.call(e)},Ba=function(e){return null!=e&&(Na(e)||"function"!==e&&function(e){var t=r(e);return"number"===t||"object"===t&&"[object Number]"===Ma.call(e)}(e.length))},ja=function(e,t){for(var n=0;n<t.length&&!1!==e(t[n],n,t);n+=1);},Fa=function(e,t){for(var n=Da(t),r=0;r<n.length&&!1!==e(t[n[r]],n[r],t);r+=1);},Ua=function(e,t){return(Ba(t)?ja:Fa).call(this,e,t)},Ga=Xs.defaultEngine,Ha=Xs.inMemoryEngine,za=Ua,Ka=ra,Qa=JSON;function qa(e,t,n,r){this.id=t,this.name=e,this.keys=n||{},this.engine=r||Ga,this.originalEngine=this.engine}qa.prototype.set=function(e,t){var n=this._createValidKey(e);if(n)try{this.engine.setItem(n,Qa.stringify(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))}},qa.prototype.get=function(e){try{var t=this.engine.getItem(this._createValidKey(e));return null===t?null:Qa.parse(t)}catch(e){return null}},qa.prototype.getOriginalEngine=function(){return this.originalEngine},qa.prototype.remove=function(e){this.engine.removeItem(this._createValidKey(e))},qa.prototype._createValidKey=function(e){var t,n=this.name,r=this.id;return Ka(this.keys).length?(za((function(i){i===e&&(t=[n,r,e].join("."))}),this.keys),t):[n,r,e].join(".")},qa.prototype._swapEngine=function(){var e=this;za((function(t){var n=e.get(t);Ha.setItem([e.name,e.id,t].join("."),n),e.remove(t)}),this.keys),this.engine=Ha};var Va=qa;var Wa=Ua,Ya={setTimeout:function(e,t){return window.setTimeout(e,t)},clearTimeout:function(e){return window.clearTimeout(e)},Date:window.Date},Xa=Ya,Ja={ASAP:1,RESCHEDULE:2,ABANDON:3};function $a(){this.tasks={},this.nextId=1}$a.prototype.now=function(){return+new Xa.Date},$a.prototype.run=function(e,t,n){var r=this.nextId++;return this.tasks[r]=Xa.setTimeout(this._handle(r,e,t,n||Ja.ASAP),t),r},$a.prototype.cancel=function(e){this.tasks[e]&&(Xa.clearTimeout(this.tasks[e]),delete this.tasks[e])},$a.prototype.cancelAll=function(){Wa(Xa.clearTimeout,this.tasks),this.tasks={}},$a.prototype._handle=function(e,t,n,r){var i=this,o=i.now();return function(){if(delete i.tasks[e],!(r>=Ja.RESCHEDULE&&o+2*n<i.now()))return t();r===Ja.RESCHEDULE&&i.run(t,n,r)}},$a.setClock=function(e){Xa=e},$a.resetClock=function(){Xa=Ya},$a.Modes=Ja;var Za=$a,eu=qs.v4,tu=Va,nu=Ua,ru=Za,iu=To("localstorage-retry");function ou(e,t){return function(){return e.apply(t,arguments)}}function su(e,t,n){"function"==typeof t&&(n=t),this.name=e,this.id=eu(),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 ru,this._processId=0,this._store=new tu(this.name,this.id,this.keys),this._store.set(this.keys.IN_PROGRESS,{}),this._store.set(this.keys.QUEUE,[]),this._ack=ou(this._ack,this),this._checkReclaim=ou(this._checkReclaim,this),this._processHead=ou(this._processHead,this),this._running=!1}d(su.prototype),su.prototype.start=function(){this._running&&this.stop(),this._running=!0,this._ack(),this._checkReclaim(),this._processHead()},su.prototype.stop=function(){this._schedule.cancelAll(),this._running=!1},su.prototype.shouldRetry=function(e,t){return!(t>this.maxAttempts)},su.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))},su.prototype.addItem=function(e){this._enqueue({item:e,attemptNumber:0,time:this._schedule.now(),id:eu()})},su.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||eu()}):this.emit("discard",e,t)},su.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()},su.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=eu();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),nu((function(t){try{e.fn(t.item,t.done)}catch(e){iu("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,ru.Modes.ASAP))},su.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,ru.Modes.ASAP)},su.prototype._checkReclaim=function(){var e=this;nu((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,ru.Modes.ABANDON))}),e.timeouts.RECLAIM_WAIT,ru.Modes.ABANDON)}(t))}),function(t){for(var n=[],r=e._store.getOriginalEngine(),i=0;i<r.length;i++){var o=r.key(i).split(".");3===o.length&&(o[0]===t&&"ack"===o[2]&&n.push(new tu(t,o[1],e.keys)))}return n}(this.name)),this._schedule.run(this._checkReclaim,this.timeouts.RECLAIM_TIMER,ru.Modes.RESCHEDULE)},su.prototype._reclaim=function(e){var t=this,n=new tu(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){nu((function(e){var i=e.id||eu();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),n.remove(this.keys.IN_PROGRESS),n.remove(this.keys.QUEUE),n.remove(this.keys.RECLAIM_START),n.remove(this.keys.RECLAIM_END),n.remove(this.keys.ACK),this._processHead()};var au=su,uu={maxRetryDelay:36e4,minRetryDelay:1e3,backoffFactor:2,maxAttempts:10,maxItems:100},cu=function(){function e(){i(this,e),this.url="",this.writeKey=""}return s(e,[{key:"init",value:function(e,t,n){this.url=t,this.writeKey=e,n&&u(uu,n),this.payloadQueue=new au("rudder",uu,function(e,t){e.message.sentAt=pi(),this.processQueueElement(e.url,e.headers,e.message,1e4,(function(e,n){if(e)return t(e);t(null,n)}))}.bind(this)),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(){4===o.readyState&&(429===o.status||o.status>=500&&o.status<600?(li(new Error("request failed with status: ".concat(o.status).concat(o.statusText," for url: ").concat(e))),i(new Error("request failed with status: ".concat(o.status).concat(o.statusText," for url: ").concat(e)))):i(null,o.status))},o.send(JSON.stringify(n,fi))}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})}}]),e}(),lu="queue",fu=64e3,hu=function(){function e(){i(this,e),this.storage=gs,this.maxItems=10,this.flushQueueTimeOut=void 0,this.timeOutActive=!1,this.flushQueueTimeOutInterval=6e5,this.url="",this.writekey="",this.queueName="".concat(lu,".").concat(Date.now()),this.send=navigator.sendBeacon&&navigator.sendBeacon.bind(navigator)}return s(e,[{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);var r=this.sendQueueDataForBeacon.bind(this);window.addEventListener("unload",r)}},{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};JSON.stringify(r,fi).length>fu&&(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){e.forEach((function(e){e.sentAt=(new Date).toISOString()}));var t={batch:e},n=JSON.stringify(t,fi),r=new Blob([n],{type:"text/plain"});try{this.send("".concat(this.url,"?writeKey=").concat(this.writekey),r)||li(new Error("Unable to queue data to browser's beacon queue"))}catch(e){li(e)}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)}}]),e}(),du=function(){function e(){i(this,e),this.queue=void 0}return s(e,[{key:"initialize",value:function(e,t,n){var i={},o=hi(t);n&&n.useBeacon&&navigator.sendBeacon?(n&&n.beaconQueueOptions&&null!=n.beaconQueueOptions&&"object"===r(n.beaconQueueOptions)&&(i=n.beaconQueueOptions),o="".concat(o,"/beacon/v1/batch"),this.queue=new hu):(n&&n.useBeacon&&lt.info("[EventRepository] sendBeacon feature not available in this browser :: fallback to XHR"),n&&n.queueOptions&&null!=n.queueOptions&&"object"===r(n.queueOptions)&&(i=n.queueOptions),this.queue=new cu),this.queue.init(e,o,i)}},{key:"enqueue",value:function(e,t){var n=e.getElementContent();n.originalTimestamp=n.originalTimestamp||pi(),n.sentAt=pi(),JSON.stringify(n,fi).length>32e3&&lt.error("[EventRepository] enqueue:: message length greater 32 Kb ",n),this.queue.enqueue(n,t)}}]),e}(),pu=new du,gu="RS_JS_SDK",yu=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};try{var r=document.getElementById(e);if(r)return;var i=document.createElement("script");i.src=t,i.async=void 0===n.async||n.async,i.type="text/javascript",i.id=e,!0!==n.skipDatasetAttributes&&(i.setAttribute("data-loader",gu),void 0!==n.isNonNativeSDK&&i.setAttribute("data-isNonNativeSDK",n.isNonNativeSDK));var o=document.getElementsByTagName("head");if(o.length>0)o[0].insertBefore(i,o[0].firstChild);else{var s=document.getElementsByTagName("script")[0];s.parentNode.insertBefore(i,s)}}catch(s){li(s)}},vu=function(){return navigator&&navigator.language},mu=function(){return navigator&&navigator.userAgent};function Iu(e){return decodeURIComponent(atob(e).split("").map((function(e){return"%".concat("00".concat(e.charCodeAt(0).toString(16)).slice(-2))})).join(""))}function Au(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Iu(e=e.endsWith("..")?e.substr(0,e.length-2):e)}var bu=/^[a-zA-Z0-9\-_.]+$/,ku="*";function Eu(e,t,n,r){var i=function(e,t){return[e,(new Date).getTimezoneOffset(),t].join(ku)}(n,r),o=t||0,s=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=-1,r=0;r<e.length;r++)n=n>>>8^t[255&(n^e.charCodeAt(r))];return(-1^n)>>>0}([i,Math.floor(Date.now()/6e4)-o,e].join(ku));return s.toString(36)}function Su(e){var t=function(e){var t=e.split(ku),n=t.length%2==0;return t.length<4||!n||1!==Number(t.shift())?null:{checksum:t.shift(),serializedIds:t.join(ku)}}(e);if(!t)return null;var n=t.checksum,r=t.serializedIds;return function(e,t){for(var n=mu(),r=vu(),i=0;i<=1;i+=1)if(Eu(e,i,n,r)===t)return!0;return!1}(r,n)?function(e){for(var t={},n=e.split(ku),r=0;r<n.length;r+=2){var i=n[r];if(bu.test(i)){var o=Au(n[r+1]);t[i]=o}}return t}(r):null}var Cu={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"},wu=function(){function e(){var t=this;if(i(this,e),!window.OneTrust||!window.OnetrustActiveGroups)throw new Error("OneTrust resources are not accessible. Thus all the destinations will be loaded");this.userSetConsentGroupIds=window.OnetrustActiveGroups.split(",").filter((function(e){return e}));var n=window.OneTrust.GetDomainData().Groups;this.userSetConsentGroupNames=[],this.userDeniedConsentGroupIds=[],n.forEach((function(e){var n=e.CustomGroupId,r=e.GroupName;t.userSetConsentGroupIds.includes(n)?t.userSetConsentGroupNames.push(r.toUpperCase().trim()):t.userDeniedConsentGroupIds.push(n)})),this.userSetConsentGroupIds=this.userSetConsentGroupIds.map((function(e){return e.toUpperCase()}))}return s(e,[{key:"isEnabled",value:function(e){var t=this;try{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 lt.error("Error during onetrust cookie consent management ".concat(e)),!0}}},{key:"getDeniedList",value:function(){return this.userDeniedConsentGroupIds}}]),e}(),Ou=function(){function e(){i(this,e)}return s(e,null,[{key:"initialize",value:function(e){var t;return null!=e&&null!==(t=e.oneTrust)&&void 0!==t&&t.enabled?new wu:null}}]),e}(),Tu=function(){function e(){i(this,e),this.storage=Ls,this.timeout=18e5,this.sessionInfo=this.storage.getSessionInfo()||{autoTrack:!0}}return s(e,[{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&&(lt.warn("[Session]:: Provided timeout value 0 will disable the auto session tracking feature."),this.sessionInfo.autoTrack=!1),n>0&&n<1e4&&lt.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){li(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;lt.error('[Session]:: "sessionId" should at least be "'.concat(10,'" digits long'))}else lt.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()}}]),e}(),_u=new Tu,Ru=function(e,t){if(!Array.isArray(e)||!Array.isArray(t))return _(t);var n=_(e);return t.forEach((function(e,t){n[t]=Pu(n[t],e)})),n},Pu=function(e,t){return L(Ru,e,t)},Lu=["integrations","anonymousId","originalTimestamp"],xu="rs-bugsnag",Du="bugsnag",Mu=["Bugsnag",Du],Nu="{{{{__RS_BUGSNAG_API_KEY__}}}}",Bu=["rudder-analytics.min.js","rudder-analytics-staging.min.js","rudder-analytics.js"].concat(c(Object.keys(Cu).map((function(e){return"".concat(Cu[e],".min.js")}))),c(Object.keys(Cu).map((function(e){return"".concat(Cu[e],"-staging.min.js")}))),c(Object.keys(Cu).map((function(e){return"".concat(Cu[e],".js")})))),ju=function(e){var t=e&&e._client&&e._client._notifier&&e._client._notifier.version;if(!t){var n=e({apiKey:Nu,releaseStage:"version-test",beforeSend:function(){return!1}});t=n.notifier&&n.notifier.version,n=void 0}return t&&"6"===t.charAt(0)},Fu=function(e){Mu.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)}))&&yu(e,"https://d2wy8f7a9ursnm.cloudfront.net/v6/bugsnag.min.js",{isNonNativeSDK:"true",skipDatasetAttributes:!0})},Uu=function(){function e(t,n){i(this,e),this.pluginName=xu,this.sourceId=t,this.onClientReady=n,this.initClientOnLibReadyInterval=void 0,this.init()}return s(e,[{key:"init",value:function(){var e=this;if(!window.rudderanalytics||!window.rudderanalytics.errorReporting){if(!Nu.match(/{{.+}}/)){Fu(this.pluginName);var t=window.bugsnag;"function"!=typeof t?(this.initClientOnLibReadyInterval=setInterval((function(){var t=window.bugsnag;"function"==typeof t&&(ju(t)&&e.initClient(),clearInterval(e.initClientOnLibReadyInterval))}),100),setTimeout((function(){clearInterval(e.initClientOnLibReadyInterval)}),ti)):ju(t)&&this.initClient()}}}},{key:"initClient",value:function(){var e,t=window.bugsnag;this.client=t({apiKey:Nu,appVersion:"2.31.1",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.rs-unit-test-host.com","localhost","127.0.0.1","[::1]"].includes(e)?"development":"production")}),this.onClientReady()}},{key:"onError",value:function(){var e=this.sourceId;return function(t){try{return!!function(e){var t=D(e,"stacktrace.0.file");if(!t||"string"!=typeof t)return!1;var n=t.substring(t.lastIndexOf("/")+1);return Bu.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)}}]),e}(),Gu=xu,Hu=[xu],zu=function(){function e(t){i(this,e),this.isEnabled=!1,this.providerName=Gu,this.provider=void 0,this.logger=t,this.onClientReady=this.onClientReady.bind(this),this.exposeToGlobal=this.exposeToGlobal.bind(this)}return s(e,[{key:"init",value:function(e,t){e&&t?!0===function(e){return D(e,"statsCollection.errors.enabled")||!1}(e)?(this.enable(),this.setProviderName(function(e){return D(e,"statsCollection.errors.provider")}(e)),this.initProvider(e,t)):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||Hu.includes(e)?this.providerName=e:this.logger.error("[Analytics] ErrorReporting :: Invalid error reporting provider value. Value should be one of: ".concat(Hu.join(","))):this.providerName=Gu}},{key:"initProvider",value:function(e,t){if(this.providerName===xu)this.provider=new Uu(t,this.onClientReady)}},{key:"onClientReady",value:function(){this.exposeToGlobal()}},{key:"exposeToGlobal",value:function(){window.rudderanalytics.errorReporting=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()))}}}]),e}(),Ku=new(function(){function e(){i(this,e),this.retryAttempt=3,this.queue=[],this.isTransformationProcessing=!1,this.authToken=null}return s(e,[{key:"init",value:function(e,t,n){this.dataPlaneUrl=hi(t),this.writeKey=e,this.authToken=n||this.authToken,this.start()}},{key:"enqueue",value:function(e,t){this.queue.push({event:e,cb:t})}},{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;if(200===o){if(!s||"string"!=typeof s)return void i("[Transformation]:: Transformation failed. Invalid response from server.");s=JSON.parse(s);var u=[];return s.transformedBatch.forEach((function(e){u.push({id:e.id,payload:e.payload.filter((function(e){return"200"===e.status}))})})),void r({transformedPayload:u,transformationServerAccess:!0})}if(400===o){var c=s?"[Transformation]:: ".concat(s):"[Transformation]:: Invalid request payload";return void i(c)}if(404===o)return void r({transformedPayload:e.batch,transformationServerAccess:!1});if(!(t>0))return void i("[Transformation]:: Transformation failed with status ".concat(o));var l=t-1;setTimeout((function(){return n.sendEventForTransformation(e,l).then(r).catch(i)}),500*Math.pow(2,n.retryAttempt-l))}catch(e){i(e)}},a.send(JSON.stringify(e,fi))}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=this.queue.shift(),r=(t=n.event,{metadata:{"Custom-Authorization":this.authToken},batch:[{orderNo:Date.now(),event:t.message}]});this.sendEventForTransformation(r,this.retryAttempt).then((function(t){e.isTransformationProcessing=!1,n.cb(t),e.checkQueueLengthAndProcess()})).catch((function(t){li("string"==typeof t?t:t.message),e.isTransformationProcessing=!1,n.cb({transformedPayload:null}),e.checkQueueLengthAndProcess()}))}},{key:"start",value:function(){var e=this;setInterval((function(){e.isTransformationProcessing||e.checkQueueLengthAndProcess()}),100)}},{key:"setAuthToken",value:function(e){this.authToken=e}}]),e}()),Qu=function(){function e(){i(this,e),this.initialized=!1,this.clientIntegrations=[],this.loadOnlyIntegrations={},this.clientIntegrationObjects=void 0,this.successfullyLoadedIntegration=[],this.failedToBeLoadedIntegration=[],this.toBeProcessedArray=[],this.toBeProcessedByIntegrationArray=[],this.storage=Ls,this.eventRepository=pu,this.sendAdblockPage=!1,this.sendAdblockPageOptions={},this.clientSuppliedCallbacks={},this.readyCallbacks=[],this.methodToCallbackMapping={syncPixel:"syncPixelCallback"},this.loaded=!1,this.loadIntegration=!0,this.integrationsData={},this.dynamicallyLoadedIntegrations={},this.destSDKBaseURL=ei,this.cookieConsentOptions={},this.logLevel=void 0,this.clientIntegrationsReady=!1,this.uSession=_u,this.version="2.31.1",this.lockIntegrationsVersion=!1,this.errorReporting=new zu(lt),this.deniedConsentIds=[],this.transformationHandler=Ku}return s(e,[{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=xs();this.storage.setInitialReferrer(e),this.storage.setInitialReferringDomain(Ds(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(Cu[t.name]).concat(ri)]}))||t>=2e4?n(e):e.pause(ni).then((function(){return e.allModulesInitialized(t+ni).then(n)}))}))}},{key:"executeReadyCallback",value:function(){this.readyCallbacks.forEach((function(e){return e()}))}},{key:"integrationSDKLoaded",value:function(e,t){try{return window.hasOwnProperty(e)&&window[e][t]&&void 0!==window[e][t].prototype.constructor}catch(e){return li(e),!1}}},{key:"processResponse",value:function(e,t){var n=this;try{var i=t;try{if("string"==typeof t&&(i=JSON.parse(t)),!i||"object"!==r(i)||Array.isArray(i))throw new Error("Invalid source configuration")}catch(e){return void li(e)}try{this.errorReporting.init(i.source.config,i.source.id)}catch(e){li(e)}if(this.serverUrl=ki(i,this.serverUrl,this.options),this.eventRepository.initialize(this.writeKey,this.serverUrl,this.options),this.loaded=!0,this.transformationHandler.init(this.writeKey,this.serverUrl,this.storage.getAuthToken()),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),i.source.destinations.forEach((function(e){e.enabled&&this.clientIntegrations.push({name:e.destinationDefinition.name,config:e.config,destinationInfo:{areTransformationsConnected:e.areTransformationsConnected||!1,destinationId:e.id}})}),this),this.clientIntegrations=mi(this.loadOnlyIntegrations,this.clientIntegrations),Object.keys(this.cookieConsentOptions).length>0)try{var o=Ou.initialize(this.cookieConsentOptions);this.deniedConsentIds=o&&o.getDeniedList(),this.clientIntegrations=this.clientIntegrations.filter((function(e){return!o||o&&o.isEnabled(e.config)}))}catch(e){li(e)}var s="";Ii().isStaging&&(s="-staging"),this.errorReporting.leaveBreadcrumb("Starting device-mode initialization"),this.clientIntegrations.forEach((function(e){var t=Cu[e.name],r="".concat(t).concat(ri),i="".concat(n.destSDKBaseURL,"/").concat(t).concat(s,".min.js");window.hasOwnProperty(r)||yu(r,i,{isNonNativeSDK:!0});var o=n,a=setInterval((function(){if(o.integrationSDKLoaded(r,t)){var i,s=window[r];clearInterval(a);try{var u="[Analytics] processResponse :: trying to initialize integration name:: ".concat(r);n.errorReporting.leaveBreadcrumb(u),(i=new s[t](e.config,o,e.destinationInfo)).init(),o.isInitialized(i).then((function(){o.dynamicallyLoadedIntegrations[r]=s[t]}))}catch(e){li(e,"[Analytics] 'integration.init()' failed :: ".concat(r," :: ").concat(e.message)),o.failedToBeLoadedIntegration.push(i)}}}),100);setTimeout((function(){clearInterval(a)}),ti)}));var a=this;this.allModulesInitialized().then((function(){if(!a.clientIntegrations||0===a.clientIntegrations.length)return n.clientIntegrationsReady=!0,n.executeReadyCallback(),void(n.toBeProcessedByIntegrationArray=[]);a.replayEvents(a)}))}catch(e){li(e)}}},{key:"sendDataToDestination",value:function(e,t,n){try{if(e[n]){var r=_(t);e[n](r)}}catch(t){li(t,"[sendToNative]:: [Destination: ".concat(e.name,"]:: "))}}},{key:"sendTransformedDataToDestination",value:function(e,t,n){var r=this;try{vi(t.message.integrations),this.transformationHandler.enqueue(t,(function(t){var i=t.transformedPayload,o=t.transformationServerAccess;i&&e.forEach((function(e){try{(o?i.find((function(t){return t.id===e.destinationId})).payload:i).forEach((function(t){r.sendDataToDestination(e,{message:t.event},n)}))}catch(t){t instanceof Error&&(t.message="[DMT]::[Destination:".concat(e.name,"]:: ").concat(t.message)),li(t)}}))}))}catch(e){e instanceof Error&&(e.message="[DMT]:: ".concat(e.message)),li(e)}}},{key:"processAndSendEventsToDeviceMode",value:function(e,t,n){var r=this,i=[],o=[];e.forEach((function(e){!r.IsEventBlackListed(t.message.event,e.name)&&(e.areTransformationsConnected?o.push(e):i.push(e))})),i.forEach((function(e){r.sendDataToDestination(e,t,n)})),o.length>0&&this.sendTransformedDataToDestination(o,t,n)}},{key:"replayEvents",value:function(e){var t,n,r,i=this;this.errorReporting.leaveBreadcrumb("Started replaying buffered events"),e.clientIntegrationObjects=[],e.clientIntegrationObjects=e.successfullyLoadedIntegration,e.clientIntegrationObjects.every((function(e){return!e.isReady||e.isReady()}))&&(this.integrationsData=(t=this.integrationsData,n=e.clientIntegrationObjects,r=_(t),n.forEach((function(e){if(e.getDataForIntegrationsObject)try{r=Pu(r,e.getDataForIntegrationsObject())}catch(e){lt.debug("[Analytics: prepareDataForIntegrationsObj]",e)}})),r),e.clientIntegrationsReady=!0,e.executeReadyCallback()),e.toBeProcessedByIntegrationArray.forEach((function(t){var n=t[0];t.shift(),Object.keys(t[0].message.integrations).length>0&&yi(t[0].message.integrations);var r=mi(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>=ti?(t.failedToBeLoadedIntegration.push(e),r(t)):t.pause(ni).then((function(){return t.isInitialized(e,n+ni).then(r)}))}))}},{key:"page",value:function(e,t,n,i,o){if(this.errorReporting.leaveBreadcrumb("Page event"),this.loaded){"function"==typeof i&&(o=i,i=null),"function"==typeof n&&(o=n,i=n=null),"function"==typeof t&&(o=t,i=n=t=null),"function"==typeof e&&(o=e,i=n=t=e=null),"object"===r(e)&&null!=e&&null!=e&&(i=t,n=e,t=e=null),"object"===r(t)&&null!=t&&null!=t&&(i=n,n=t,t=null),"string"==typeof e&&"string"!=typeof t&&(t=e,e=null),this.sendAdblockPage&&"RudderJS-Initiated"!=e&&this.sendSampleRequest();var s=_(n),a=_(i),u=(new Qs).setType("page").build();s||(s={}),t&&(u.message.name=s.name=t),e&&(u.message.category=s.category=e),u.message.properties=this.getPageProperties(s),this.processAndSendDataToDestinations("page",u,a,o)}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=_(t),o=_(n),s=(new Qs).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,i){if(this.errorReporting.leaveBreadcrumb("Identify event"),this.loaded){"function"==typeof n&&(i=n,n=null),"function"==typeof t&&(i=t,n=null,t=null),"object"===r(e)&&(n=t,t=e,e=this.userId),e&&this.userId&&e!==this.userId&&this.reset(),this.userId=Ai(e),this.storage.setUserId(this.userId);var o=_(t),s=_(n);if(o){for(var a in o)this.userTraits[a]=o[a];this.storage.setUserTraits(this.userTraits)}var u=(new Qs).setType("identify").build();this.processAndSendDataToDestinations("identify",u,s,i)}else this.toBeProcessedArray.push(["identify"].concat(Array.prototype.slice.call(arguments)))}},{key:"alias",value:function(e,t,n,i){if(this.errorReporting.leaveBreadcrumb("Alias event"),this.loaded){"function"==typeof n&&(i=n,n=null),"function"==typeof t&&(i=t,n=null,t=null),"function"==typeof e&&(i=e,n=null,t=null,e=null),"object"===r(t)&&(n=t,t=null),"object"===r(e)&&(n=e,t=null,e=null);var o=(new Qs).setType("alias").build();o.message.previousId=Ai(t)||(this.userId?this.userId:this.getAnonymousId()),o.message.userId=Ai(e);var s=_(n);this.processAndSendDataToDestinations("alias",o,s,i)}else this.toBeProcessedArray.push(["alias"].concat(Array.prototype.slice.call(arguments)))}},{key:"group",value:function(e,t,n,i){if(this.errorReporting.leaveBreadcrumb("Group event"),this.loaded){if(0!==arguments.length){"function"==typeof n&&(i=n,n=null),"function"==typeof t&&(i=t,n=null,t=null),"object"===r(e)&&(n=t,t=e,e=this.groupId),"function"==typeof e&&(i=e,n=null,t=null,e=this.groupId),this.groupId=Ai(e),this.storage.setGroupId(this.groupId);var o=_(t),s=_(n),a=(new Qs).setType("group").build();if(o)for(var u in o)this.groupTraits[u]=o[u];else this.groupTraits={};this.storage.setGroupTraits(this.groupTraits),this.processAndSendDataToDestinations("group",a,s,i)}}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=Wr[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:"processAndSendDataToDestinations",value:function(e,t,r,i){try{this.anonymousId||this.setAnonymousId(),this.errorReporting.leaveBreadcrumb("Started sending data to destinations"),t.message.context.traits=n({},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=n({},this.groupTraits)));try{var o=this.uSession.getSessionInfo(),s=o.sessionId,a=o.sessionStart;t.message.context.sessionId=s,a&&(t.message.context.sessionStart=!0)}catch(e){li(e)}l=this.cookieConsentOptions,f=!1,Object.keys(l).forEach((function(e){si.includes(e)&&"boolean"==typeof l[e].enabled&&!0===l[e].enabled&&(f=!0)})),f&&(t.message.context.consentManagement={deniedConsentIds:this.deniedConsentIds}),this.processOptionsParam(t,r),function(e,t){var n=e.properties,r=e.traits;n&&Object.keys(n).forEach((function(e){Xr.indexOf(e.toLowerCase())>=0&&lt.error("Warning! : Reserved keyword used in properties--\x3e ".concat(e," with ").concat(t," call"))})),r&&Object.keys(r).forEach((function(e){Xr.indexOf(e.toLowerCase())>=0&&lt.error("Warning! : Reserved keyword used in traits--\x3e ".concat(e," with ").concat(t," call"))}));var i=e.context.traits;i&&Object.keys(i).forEach((function(e){Xr.indexOf(e.toLowerCase())>=0&&lt.error("Warning! : Reserved keyword used in traits --\x3e ".concat(e," with ").concat(t," call"))}))}(t.message,e);var u=t.message.integrations||{All:!0};yi(u),t.message.integrations=u;try{t.message.context["ua-ch"]=this.uach}catch(e){li(e)}if(this.clientIntegrationObjects){var c=mi(u,this.clientIntegrationObjects);this.processAndSendEventsToDeviceMode(c,t,e)}else this.toBeProcessedByIntegrationArray.push([e,t]);vi(t.message.integrations),t.message.integrations=function(e,t){var n=_(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 Pu(n,r)}(this.integrationsData,u),this.eventRepository.enqueue(t,e),i&&i(t)}catch(e){li(e)}var l,f}},{key:"utm",value:function(e){var t;"?"===e.charAt(0)&&(e=e.substring(1)),e=e.replace(/\?/g,"&");var n=I(e),r={};for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&"utm_"===i.substr(0,4)&&("campaign"===(t=i.substr(4))&&(t="name"),r[t]=n[i]);return r}},{key:"addCampaignInfo",value:function(e){var t=e.message.context;if(t&&"object"===r(t)){var n=Ns().search;e.message.context.campaign=this.utm(n)}}},{key:"processOptionsParam",value:function(e,t){var i=e.message,o=i.type,s=i.properties;this.addCampaignInfo(e),e.message.context.page=this.getContextPageProperties("page"===o?s:void 0),function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};"object"===r(t)&&null!==t&&Object.keys(t).forEach((function(n){Lu.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]:{},i=e.context;return"object"!==r(t)||null===t||Object.keys(t).forEach((function(e){if(!Lu.includes(e)&&!ai.includes(e))if("context"!==e)i=Pu(i,a({},e,t[e]));else if("object"===r(t[e])&&null!==t[e]){var o={};Object.keys(t[e]).forEach((function(n){ai.includes(n)||(o[n]=t[e][n])})),i=Pu(i,n({},o))}else lt.error("[Analytics: processOptionsParam] context passed in options ".concat(e," is not object."))})),i}(e.message,t)}},{key:"getPageProperties",value:function(e,t){var n=Ns(),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=Ns(),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?Su(t):null,r=n?n.rs_amp_id:null;this.anonymousId=e||r||di(),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,i){var o=this;if("object"===r(t)&&null!==t&&(i=t,t=null),i&&i.logLevel&&(this.logLevel=i.logLevel,lt.setLogLevel(i.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");i&&i.cookieConsentManager&&(this.cookieConsentOptions=i.cookieConsentManager),this.writeKey=e,this.serverUrl=t,this.options=i;var s={};if(i&&i.setCookieDomain&&(s=n(n({},s),{},{domain:i.setCookieDomain})),i&&"boolean"==typeof i.secureCookie&&(s=n(n({},s),{},{secure:i.secureCookie})),i&&ii.includes(i.sameSiteCookie)&&(s=n(n({},s),{},{samesite:i.sameSiteCookie})),this.storage.options(s),i&&"string"==typeof i.uaChTrackLevel&&ui.includes(i.uaChTrackLevel)&&(this.uaChTrackLevel=i.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){o.uach=e}),this.uaChTrackLevel),i&&i.integrations&&(u(this.loadOnlyIntegrations,i.integrations),yi(this.loadOnlyIntegrations)),i&&i.sendAdblockPage&&(this.sendAdblockPage=!0),i&&i.sendAdblockPageOptions&&"object"===r(i.sendAdblockPageOptions)&&(this.sendAdblockPageOptions=i.sendAdblockPageOptions),this.uSession.initialize(i),i&&i.clientSuppliedCallbacks){var a={};Object.keys(this.methodToCallbackMapping).forEach((function(e){o.methodToCallbackMapping.hasOwnProperty(e)&&i.clientSuppliedCallbacks[o.methodToCallbackMapping[e]]&&(a[e]=i.clientSuppliedCallbacks[o.methodToCallbackMapping[e]])})),u(this.clientSuppliedCallbacks,a),this.registerCallbacks(!0)}if(i&&null!=i.loadIntegration&&(this.loadIntegration=!!i.loadIntegration),i&&void 0!==i.lockIntegrationsVersion&&(this.lockIntegrationsVersion=!0===i.lockIntegrationsVersion),this.initializeUser(i?i.anonymousIdOptions:void 0),this.setInitialPageProperties(),this.destSDKBaseURL=function(e,t,n){var r="";if(n){if(!(r=hi(n))){var i="CDN base URL for integrations is not valid";throw li({message:"[Analytics] load:: ".concat(i)}),Error("Failed to load Rudder SDK: ".concat(i))}return r}var o=Ii().sdkURL;return r=o?o.split("/").slice(0,-1).concat(Zr).join("/"):ei,t&&(r=r.replace($r,e)),r}(this.version,this.lockIntegrationsVersion,i&&i.destSDKBaseURL),i&&i.getSourceConfig)if("function"!=typeof i.getSourceConfig)li(new Error('option "getSourceConfig" must be a function'));else{var c=i.getSourceConfig();c instanceof Promise?c.then((function(e){return o.processResponse(200,e)})).catch(li):this.processResponse(200,c)}else{var l=function(e){return Jr.concat(Jr.includes("?")?"&":"?").concat(e?"writeKey=".concat(e):"")}(e);i&&i.configUrl&&(l=function(e,t){var n=e;-1===n.indexOf("sourceConfig")&&(n="".concat(hi(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)}(i.configUrl,l));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;200==e?i(200,o.responseText):(li(new Error("request failed with status: ".concat(o.status," for url: ").concat(t))),i(e))},o.send()}(this,l,e,this.processResponse)}catch(e){li(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||!Promise||!Object.entries||!Object.values||!String.prototype.replaceAll||!this.isDatasetAvailable())}},{key:"load",value:function(e,t,n){if(!this.loaded){var r=_(n);if(this.arePolyfillsRequired(r)){var i="polyfill";yu(i,"https://polyfill.io/v3/polyfill.min.js?features=Array.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",{skipDatasetAttributes:!0});var o=this,s=setInterval((function(){(window.hasOwnProperty(i)||null!==document.getElementById(i))&&(clearInterval(s),o.loadAfterPolyfill(e,t,r))}),100);setTimeout((function(){clearInterval(s)}),ti)}else this.loadAfterPolyfill(e,t,r)}}},{key:"ready",value:function(e){this.loaded?"function"!=typeof e?lt.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(){yu("ad-block","//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js")}},{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)):lt.error("Provided input should be in string format")}}]),e}(),qu=new Qu;p(qu),window.addEventListener("error",(function(e){li(e,void 0,qu)}),!0),qu.initializeCallbacks(),qu.registerCallbacks(!1);var Vu,Wu="load",Yu=window.rudderanalytics,Xu=Array.isArray(Yu);if(Xu)for(var Ju=0;Ju<Yu.length;){if(Yu[Ju]&&Yu[Ju][0]===Wu){Vu=Yu[Ju],Yu.splice(Ju,1);break}Ju+=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=I(e);i.ajs_aid&&qu.toBeProcessedArray.push(["setAnonymousId",i.ajs_aid]),i.ajs_uid&&qu.toBeProcessedArray.push(["identify",i.ajs_uid,r(i,t)]),i.ajs_event&&qu.toBeProcessedArray.push(["track",i.ajs_event,r(i,n)])}(window.location.search),Xu&&Yu.forEach((function(e){return qu.toBeProcessedArray.push(e)})),Vu&&Vu.length>0&&(Vu.shift(),qu.load.apply(qu,c(Vu)));var $u=qu.ready.bind(qu),Zu=qu.identify.bind(qu),ec=qu.page.bind(qu),tc=qu.track.bind(qu),nc=qu.alias.bind(qu),rc=qu.group.bind(qu),ic=qu.reset.bind(qu),oc=qu.load.bind(qu),sc=qu.initialized=!0,ac=qu.getUserId.bind(qu),uc=qu.getSessionId.bind(qu),cc=qu.getUserTraits.bind(qu),lc=qu.getAnonymousId.bind(qu),fc=qu.setAnonymousId.bind(qu),hc=qu.getGroupId.bind(qu),dc=qu.getGroupTraits.bind(qu),pc=qu.startSession.bind(qu),gc=qu.endSession.bind(qu),yc=qu.setAuthToken.bind(qu);e.alias=nc,e.endSession=gc,e.getAnonymousId=lc,e.getGroupId=hc,e.getGroupTraits=dc,e.getSessionId=uc,e.getUserId=ac,e.getUserTraits=cc,e.group=rc,e.identify=Zu,e.initialized=sc,e.load=oc,e.page=ec,e.ready=$u,e.reset=ic,e.setAnonymousId=fc,e.setAuthToken=yc,e.startSession=pc,e.track=tc,Object.defineProperty(e,"__esModule",{value:!0})}));