rudder-sdk-js 2.41.0 → 2.42.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +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,h(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=h(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 f(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||l(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){if(e){if("string"==typeof e)return f(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?f(e,t):void 0}}function f(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 h(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)}var d="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function p(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function g(e){return e&&Object.prototype.hasOwnProperty.call(e,"default")&&1===Object.keys(e).length?e.default:e}var y={exports:{}};!function(e){function t(e){if(e)return function(e){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}}(y);var v=y.exports,m=p(v);function I(e){return null!=e&&"object"===r(e)&&!0===e["@@functional/placeholder"]}function A(e){return function t(n){return 0===arguments.length||I(n)?t:e.apply(this,arguments)}}function b(e){return function t(n,r){switch(arguments.length){case 0:return t;case 1:return I(n)?t:A((function(t){return e(n,t)}));default:return I(n)&&I(r)?t:I(n)?A((function(t){return e(t,r)})):I(r)?A((function(t){return e(n,t)})):e(n,r)}}}function k(e){return function t(n,r,i){switch(arguments.length){case 0:return t;case 1:return I(n)?t:b((function(t,r){return e(n,t,r)}));case 2:return I(n)&&I(r)?t:I(n)?b((function(t,n){return e(t,r,n)})):I(r)?b((function(t,r){return e(n,t,r)})):A((function(t){return e(n,r,t)}));default:return I(n)&&I(r)&&I(i)?t:I(n)&&I(r)?b((function(t,n){return e(t,n,i)})):I(n)&&I(i)?b((function(t,n){return e(t,r,n)})):I(r)&&I(i)?b((function(t,r){return e(n,t,r)})):I(n)?A((function(t){return e(t,r,i)})):I(r)?A((function(t){return e(n,t,i)})):I(i)?A((function(t){return e(n,r,t)})):e(n,r,i)}}}function E(e,t){return Object.prototype.hasOwnProperty.call(t,e)}var C=A((function(e){return null===e?"Null":void 0===e?"Undefined":Object.prototype.toString.call(e).slice(8,-1)}));function S(e){return"[object Object]"===Object.prototype.toString.call(e)}function O(e,t,n){if(n||(n=new w),function(e){var t=r(e);return null==e||"object"!=t&&"function"!=t}(e))return e;var i,o=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 o(Object.create(Object.getPrototypeOf(e)));case"Array":return o([]);case"Date":return new Date(e.valueOf());case"RegExp":return i=e,new RegExp(i.source,i.flags?i.flags:(i.global?"g":"")+(i.ignoreCase?"i":"")+(i.multiline?"m":"")+(i.sticky?"y":"")+(i.unicode?"u":"")+(i.dotAll?"s":""));case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"BigInt64Array":case"BigUint64Array":return e.slice();default:return e}}var T,w=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}(),_=A((function(e){return null!=e&&"function"==typeof e.clone?e.clone():O(e,!0)})),R=k((function(e,t,n){var r,i={};for(r in n=n||{},t=t||{})E(r,t)&&(i[r]=E(r,n)?e(r,t[r],n[r]):t[r]);for(r in n)E(r,n)&&!E(r,i)&&(i[r]=n[r]);return i})),P=k((function e(t,n,r){return R((function(n,r,i){return S(r)&&S(i)?e(t,r,i):t(n,r,i)}),n,r)})),D=k((function(e,t,n){return P((function(t,n,r){return e(n,r)}),t,n)})),L={HS:"HubSpot",GA:"GA",HOTJAR:"Hotjar",GOOGLEADS:"GoogleAds",VWO:"VWO",GTM:"GoogleTagManager",BRAZE:"Braze",INTERCOM:"INTERCOM",KEEN:"Keen",KISSMETRICS:"Kissmetrics",CUSTOMERIO:"CustomerIO",CHARTBEAT:"Chartbeat",COMSCORE:"Comscore",FACEBOOK_PIXEL:"FacebookPixel",LOTAME:"Lotame",OPTIMIZELY:"Optimizely",BUGSNAG:"Bugsnag",FULLSTORY:"Fullstory",TVSQUARED:"TVSquared",GA4:"GA4",MOENGAGE:"MoEngage",AM:"Amplitude",PENDO:"Pendo",LYTICS:"Lytics",APPCUES:"Appcues",POSTHOG:"Posthog",KLAVIYO:"Klaviyo",CLEVERTAP:"Clevertap",BINGADS:"BingAds",PINTEREST_TAG:"PinterestTag",ADOBE_ANALYTICS:"AdobeAnalytics",LINKEDIN_INSIGHT_TAG:"LinkedInInsightTag",REDDIT_PIXEL:"RedditPixel",DRIP:"Drip",HEAP:"Heap",CRITEO:"Criteo",MP:"Mixpanel",QUALTRICS:"Qualtrics",PROFITWELL:"ProfitWell",SENTRY:"Sentry",QUANTUMMETRIC:"QuantumMetric",SNAP_PIXEL:"SnapPixel",POST_AFFILIATE_PRO:"PostAffiliatePro",GOOGLE_OPTIMIZE:"GoogleOptimize",LAUNCHDARKLY:"LaunchDarkly",GA360:"GA360",ADROLL:"Adroll",DCM_FLOODLIGHT:"DCMFloodlight",MATOMO:"Matomo",VERO:"Vero",MOUSEFLOW:"Mouseflow",ROCKERBOX:"Rockerbox",CONVERTFLOW:"ConvertFlow",SNAPENGAGE:"SnapEngage",LIVECHAT:"LiveChat",SHYNET:"Shynet",WOOPRA:"Woopra",ROLLBAR:"RollBar",QUORA_PIXEL:"QuoraPixel",JUNE:"June",ENGAGE:"Engage",ITERABLE:"Iterable",YANDEX_METRICA:"YandexMetrica",REFINER:"Refiner",QUALAROO:"Qualaroo",PODSIGHTS:"Podsights",AXEPTIO:"Axeptio",SATISMETER:"Satismeter",MICROSOFT_CLARITY:"MicrosoftClarity",SENDINBLUE:"Sendinblue",OLARK:"Olark",LEMNISK:"Lemnisk",TIKTOK_ADS:"TiktokAds",ACTIVE_CAMPAIGN:"ActiveCampaign"},x="ADOBE_ANALYTICS";a({},"Adobe Analytics","AdobeAnalytics");var M,B=(a(T={"Adobe Analytics":x,ADOBEANALYTICS:x,"ADOBE ANALYTICS":x},x,x),a(T,"AdobeAnalytics",x),a(T,"adobeanalytics",x),a(T,"adobe analytics",x),a(T,"Adobe analytics",x),a(T,"adobe Analytics",x),T),N="AM";a({},"Amplitude","Amplitude");var G,F=(a(M={},N,N),a(M,"AMPLITUDE",N),a(M,"Amplitude",N),a(M,"am",N),M),U="APPCUES";a({},"Appcues","Appcues");var j,K=(a(G={},U,U),a(G,"Appcues",U),a(G,"App Cues",U),a(G,"appcues",U),G),Q="BINGADS";a({},"Bing Ads","BingAds");var H,z=(a(j={},Q,Q),a(j,"BingAds",Q),a(j,"bingads",Q),a(j,"Bing Ads",Q),a(j,"Bing ads",Q),a(j,"bing Ads",Q),a(j,"bing ads",Q),j),q="BRAZE";a({},"Braze","Braze");var V,W=(a(H={},q,q),a(H,"Braze",q),a(H,"braze",q),H),Y="BUGSNAG";a({},"Bugsnag","Bugsnag");var X,J=(a(V={},Y,Y),a(V,"bugsnag",Y),a(V,"Bugsnag",Y),V),$="CHARTBEAT";a({},"Chartbeat","Chartbeat");var Z,ee=(a(X={},$,$),a(X,"Chartbeat",$),a(X,"chartbeat",$),a(X,"Chart Beat",$),a(X,"chart beat",$),X),te="CLEVERTAP";a({},"CleverTap","Clevertap");var ne,re=(a(Z={},te,te),a(Z,"Clevertap",te),a(Z,"clevertap",te),Z),ie="COMSCORE";a({},"Comscore","Comscore");var oe,se=(a(ne={},ie,ie),a(ne,"Comscore",ie),a(ne,"Com Score",ie),a(ne,"com Score",ie),a(ne,"com score",ie),a(ne,"Com score",ie),ne),ae="CRITEO";a({},"Criteo","Criteo");var ue,ce=(a(oe={},ae,ae),a(oe,"Criteo",ae),a(oe,"criteo",ae),oe),le="CUSTOMERIO";a({},"Customer IO","CustomerIO");var fe,he=(a(ue={},le,le),a(ue,"Customerio",le),a(ue,"Customer.io",le),a(ue,"CUSTOMER.IO",le),a(ue,"customer.io",le),ue),de="DRIP";a({},"Drip","Drip");var pe,ge=(a(fe={},de,de),a(fe,"Drip",de),a(fe,"drip",de),fe),ye="FACEBOOK_PIXEL";a({},"Facebook Pixel","FacebookPixel");var ve,me=(a(pe={},ye,ye),a(pe,"FB Pixel",ye),a(pe,"Facebook Pixel",ye),a(pe,"facebook pixel",ye),a(pe,"fbpixel",ye),a(pe,"FBPIXEL",ye),a(pe,"FB_PIXEL",ye),pe),Ie="FULLSTORY";a({},"Fullstory","Fullstory");var Ae,be=(a(ve={},Ie,Ie),a(ve,"Fullstory",Ie),a(ve,"FullStory",Ie),a(ve,"full Story",Ie),a(ve,"Full Story",Ie),a(ve,"Full story",Ie),a(ve,"full story",Ie),a(ve,"fullstory",Ie),ve),ke="GA";a({},"Google Analytics","GA");var Ee,Ce=(a(Ae={},ke,ke),a(Ae,"Google Analytics",ke),a(Ae,"GoogleAnalytics",ke),a(Ae,"GOOGLE ANALYTICS",ke),a(Ae,"google analytics",ke),Ae),Se="GA4";a({},"Google Analytics 4 (GA4)","GA4");var Oe,Te=(a(Ee={},Se,Se),a(Ee,"Google Analytics 4",Se),a(Ee,"Google analytics 4",Se),a(Ee,"google analytics 4",Se),a(Ee,"Google Analytics4",Se),a(Ee,"Google analytics4",Se),a(Ee,"google analytics4",Se),a(Ee,"Google Analytics 4 (GA4)",Se),a(Ee,"google analytics 4 (ga4)",Se),a(Ee,"GoogleAnalytics4",Se),Ee),we="GOOGLEADS";a({},"Google Ads","GoogleAds");var _e,Re=(a(Oe={},we,we),a(Oe,"Google Ads",we),a(Oe,"GoogleAds",we),a(Oe,"GOOGLE ADS",we),a(Oe,"google ads",we),a(Oe,"googleads",we),Oe),Pe="GOOGLE_OPTIMIZE";a({},"Google Optimize","GoogleOptimize");var De,Le=(a(_e={},Pe,Pe),a(_e,"Google Optimize",Pe),a(_e,"GoogleOptimize",Pe),a(_e,"Googleoptimize",Pe),a(_e,"GOOGLEOPTIMIZE",Pe),a(_e,"google optimize",Pe),a(_e,"Google optimize",Pe),a(_e,"GOOGLE OPTIMIZE",Pe),_e),xe="GTM";a({},"Google Tag Manager","GoogleTagManager");var Me,Be=(a(De={},xe,xe),a(De,"Google Tag Manager",xe),a(De,"google tag manager",xe),a(De,"googletag manager",xe),a(De,"googletagmanager",xe),De),Ne="HEAP";a({},"Heap.io","Heap");var Ge,Fe=(a(Me={},Ne,Ne),a(Me,"Heap",Ne),a(Me,"heap",Ne),a(Me,"Heap.io",Ne),Me),Ue="HOTJAR";a({},"Hotjar","Hotjar");var je,Ke=(a(Ge={},Ue,Ue),a(Ge,"Hotjar",Ue),a(Ge,"hotjar",Ue),a(Ge,"Hot Jar",Ue),a(Ge,"hot jar",Ue),Ge),Qe="HS";a({},"HubSpot","HubSpot");var He,ze=(a(je={},Qe,Qe),a(je,"Hubspot",Qe),a(je,"HUBSPOT",Qe),a(je,"hub spot",Qe),a(je,"Hub Spot",Qe),a(je,"Hub spot",Qe),je),qe="INTERCOM";a({},"Intercom","INTERCOM");var Ve,We=(a(He={},qe,qe),a(He,"Intercom",qe),a(He,"intercom",qe),He),Ye="KEEN";a({},"Keen","Keen");var Xe,Je=(a(Ve={},Ye,Ye),a(Ve,"Keen",Ye),a(Ve,"Keen.io",Ye),a(Ve,"keen",Ye),a(Ve,"keen.io",Ye),Ve),$e="KISSMETRICS";a({},"Kiss Metrics","Kissmetrics");var Ze,et=(a(Xe={},$e,$e),a(Xe,"Kissmetrics",$e),a(Xe,"kissmetrics",$e),Xe),tt="KLAVIYO";a({},"Klaviyo","Klaviyo");var nt,rt=(a(Ze={},tt,tt),a(Ze,"Klaviyo",tt),a(Ze,"klaviyo",tt),Ze),it="LAUNCHDARKLY";a({},"LaunchDarkly","LaunchDarkly");var ot,st=(a(nt={},it,it),a(nt,"LaunchDarkly",it),a(nt,"Launch_Darkly",it),a(nt,"Launch Darkly",it),a(nt,"launchDarkly",it),a(nt,"launch darkly",it),nt),at="LINKEDIN_INSIGHT_TAG";a({},"Linkedin Insight Tag","LinkedInInsightTag");var ut,ct=(a(ot={},at,at),a(ot,"LinkedIn Insight Tag",at),a(ot,"LinkedIn insight tag",at),a(ot,"linkedIn insight tag",at),a(ot,"Linkedin_insight_tag",at),a(ot,"LinkedinInsighttag",at),a(ot,"LinkedinInsightTag",at),a(ot,"LinkedInInsightTag",at),a(ot,"Linkedininsighttag",at),a(ot,"LINKEDININSIGHTTAG",at),a(ot,"linkedininsighttag",at),ot),lt="LOTAME";a({},"Lotame","Lotame");var ft,ht=(a(ut={},lt,lt),a(ut,"Lotame",lt),a(ut,"lotame",lt),ut),dt="LYTICS";a({},"Lytics","Lytics");var pt,gt=(a(ft={},dt,dt),a(ft,"Lytics",dt),a(ft,"lytics",dt),ft),yt="MP";a({},"Mixpanel","Mixpanel");var vt,mt=(a(pt={},yt,yt),a(pt,"MIXPANEL",yt),a(pt,"Mixpanel",yt),a(pt,"MIX PANEL",yt),a(pt,"Mix panel",yt),a(pt,"Mix Panel",yt),pt),It="MOENGAGE";a({},"MoEngage","MoEngage");var At,bt=(a(vt={},It,It),a(vt,"MoEngage",It),a(vt,"moengage",It),a(vt,"Moengage",It),a(vt,"Mo Engage",It),a(vt,"mo engage",It),a(vt,"Mo engage",It),vt),kt="OPTIMIZELY";a({},"Optimizely Web","Optimizely");var Et,Ct=(a(At={},kt,kt),a(At,"Optimizely",kt),a(At,"optimizely",kt),At),St="PENDO";a({},"Pendo","Pendo");var Ot,Tt=(a(Et={},St,St),a(Et,"Pendo",St),a(Et,"pendo",St),Et),wt="PINTEREST_TAG";a({},"Pinterest Tag","PinterestTag");var _t,Rt=(a(Ot={},wt,wt),a(Ot,"PinterestTag",wt),a(Ot,"Pinterest_Tag",wt),a(Ot,"PINTERESTTAG",wt),a(Ot,"pinterest",wt),a(Ot,"PinterestAds",wt),a(Ot,"Pinterest_Ads",wt),a(Ot,"Pinterest",wt),a(Ot,"Pinterest Tag",wt),a(Ot,"Pinterest tag",wt),a(Ot,"PINTEREST TAG",wt),a(Ot,"pinterest tag",wt),a(Ot,"Pinterest Ads",wt),a(Ot,"Pinterest ads",wt),Ot),Pt="POST_AFFILIATE_PRO";a({},"Post Affiliate Pro","PostAffiliatePro");var Dt,Lt=(a(_t={},Pt,Pt),a(_t,"PostAffiliatePro",Pt),a(_t,"Post_affiliate_pro",Pt),a(_t,"Post Affiliate Pro",Pt),a(_t,"Post affiliate pro",Pt),a(_t,"post affiliate pro",Pt),a(_t,"postaffiliatepro",Pt),a(_t,"POSTAFFILIATEPRO",Pt),_t),xt="POSTHOG";a({},"PostHog","Posthog");var Mt,Bt=(a(Dt={},xt,xt),a(Dt,"PostHog",xt),a(Dt,"Posthog",xt),a(Dt,"posthog",xt),a(Dt,"Post Hog",xt),a(Dt,"Post hog",xt),a(Dt,"post hog",xt),Dt),Nt="PROFITWELL";a({},"ProfitWell","ProfitWell");var Gt,Ft=(a(Mt={},Nt,Nt),a(Mt,"ProfitWell",Nt),a(Mt,"profitwell",Nt),a(Mt,"Profitwell",Nt),a(Mt,"Profit Well",Nt),a(Mt,"profit well",Nt),a(Mt,"Profit well",Nt),Mt),Ut="QUALTRICS";a({},"Qualtrics","Qualtrics");var jt,Kt=(a(Gt={},Ut,Ut),a(Gt,"Qualtrics",Ut),a(Gt,"qualtrics",Ut),Gt),Qt="QUANTUMMETRIC";a({},"Quantum Metric","QuantumMetric");var Ht,zt=(a(jt={},Qt,Qt),a(jt,"Quantum Metric",Qt),a(jt,"quantum Metric",Qt),a(jt,"quantum metric",Qt),a(jt,"QuantumMetric",Qt),a(jt,"quantumMetric",Qt),a(jt,"quantummetric",Qt),a(jt,"Quantum_Metric",Qt),jt),qt="REDDIT_PIXEL";a({},"Reddit Pixel","RedditPixel");var Vt,Wt=(a(Ht={},qt,qt),a(Ht,"Reddit_Pixel",qt),a(Ht,"RedditPixel",qt),a(Ht,"REDDITPIXEL",qt),a(Ht,"redditpixel",qt),a(Ht,"Reddit Pixel",qt),a(Ht,"REDDIT PIXEL",qt),a(Ht,"reddit pixel",qt),Ht),Yt="SENTRY";a({},"Sentry","Sentry");var Xt,Jt=(a(Vt={},Yt,Yt),a(Vt,"sentry",Yt),a(Vt,"Sentry",Yt),Vt),$t="SNAP_PIXEL";a({},"Snap Pixel","SnapPixel");var Zt,en=(a(Xt={},$t,$t),a(Xt,"Snap_Pixel",$t),a(Xt,"SnapPixel",$t),a(Xt,"SNAPPIXEL",$t),a(Xt,"snappixel",$t),a(Xt,"Snap Pixel",$t),a(Xt,"SNAP PIXEL",$t),a(Xt,"snap pixel",$t),Xt),tn="TVSQUARED";a({},"TVSquared","TVSquared");var nn,rn=(a(Zt={},tn,tn),a(Zt,"TVSquared",tn),a(Zt,"tvsquared",tn),a(Zt,"tvSquared",tn),a(Zt,"TvSquared",tn),a(Zt,"Tvsquared",tn),a(Zt,"TV Squared",tn),a(Zt,"tv squared",tn),a(Zt,"tv Squared",tn),Zt),on="VWO";a({},"VWO","VWO");var sn,an=(a(nn={},on,on),a(nn,"VisualWebsiteOptimizer",on),a(nn,"Visualwebsiteoptimizer",on),a(nn,"visualwebsiteoptimizer",on),a(nn,"vwo",on),a(nn,"Visual Website Optimizer",on),a(nn,"Visual website optimizer",on),a(nn,"visual website optimizer",on),nn),un="GA360";a({},"Google Analytics 360","GA360");var cn,ln=(a(sn={},un,un),a(sn,"Google Analytics 360",un),a(sn,"Google analytics 360",un),a(sn,"google analytics 360",un),a(sn,"Google Analytics360",un),a(sn,"Google analytics360",un),a(sn,"google analytics360",un),a(sn,"GoogleAnalytics360",un),a(sn,"GA 360",un),sn),fn="ADROLL";a({},"Adroll","Adroll");var hn,dn=(a(cn={},fn,fn),a(cn,"Adroll",fn),a(cn,"Ad roll",fn),a(cn,"ad roll",fn),a(cn,"adroll",fn),cn),pn="DCM_FLOODLIGHT";a({},"DCM Floodlight","DCMFloodlight");var gn,yn=(a(hn={},pn,pn),a(hn,"DCM Floodlight",pn),a(hn,"dcm floodlight",pn),a(hn,"Dcm Floodlight",pn),a(hn,"DCMFloodlight",pn),a(hn,"dcmfloodlight",pn),a(hn,"DcmFloodlight",pn),a(hn,"dcm_floodlight",pn),a(hn,"DCM_Floodlight",pn),hn),vn="MATOMO";a({},"Matomo","Matomo");var mn,In=(a(gn={},vn,vn),a(gn,"Matomo",vn),a(gn,"matomo",vn),gn),An="VERO";a({},"Vero","Vero");var bn,kn=(a(mn={},An,An),a(mn,"Vero",An),a(mn,"vero",An),mn),En="MOUSEFLOW";a({},"Mouseflow","Mouseflow");var Cn,Sn=(a(bn={},En,En),a(bn,"Mouseflow",En),a(bn,"mouseflow",En),a(bn,"mouseFlow",En),a(bn,"MouseFlow",En),a(bn,"Mouse flow",En),a(bn,"mouse flow",En),a(bn,"mouse Flow",En),a(bn,"Mouse Flow",En),bn),On="ROCKERBOX";a({},"Rockerbox","Rockerbox");var Tn,wn=(a(Cn={},On,On),a(Cn,"Rockerbox",On),a(Cn,"rockerbox",On),a(Cn,"RockerBox",On),a(Cn,"Rocker box",On),a(Cn,"rocker box",On),a(Cn,"Rocker Box",On),Cn),_n="CONVERTFLOW";a({},"ConvertFlow","ConvertFlow");var Rn,Pn=(a(Tn={},_n,_n),a(Tn,"Convertflow",_n),a(Tn,"convertflow",_n),a(Tn,"convertFlow",_n),a(Tn,"ConvertFlow",_n),a(Tn,"Convert flow",_n),a(Tn,"convert flow",_n),a(Tn,"convert Flow",_n),a(Tn,"Convert Flow",_n),a(Tn,"CONVERT FLOW",_n),Tn),Dn="SNAPENGAGE";a({},"SnapEngage","SnapEngage");var Ln,xn=(a(Rn={},Dn,Dn),a(Rn,"SnapEngage",Dn),a(Rn,"Snap_Engage",Dn),a(Rn,"snapengage",Dn),a(Rn,"SNAP ENGAGE",Dn),a(Rn,"Snap Engage",Dn),a(Rn,"snap engage",Dn),Rn),Mn="LIVECHAT";a({},"LiveChat","LiveChat");var Bn,Nn=(a(Ln={},Mn,Mn),a(Ln,"LiveChat",Mn),a(Ln,"Live_Chat",Mn),a(Ln,"livechat",Mn),a(Ln,"LIVE CHAT",Mn),a(Ln,"Live Chat",Mn),a(Ln,"live chat",Mn),Ln),Gn="SHYNET";a({},"Shynet","Shynet");var Fn,Un=(a(Bn={},Gn,Gn),a(Bn,"shynet",Gn),a(Bn,"ShyNet",Gn),a(Bn,"shyNet",Gn),a(Bn,"Shynet",Gn),a(Bn,"shy net",Gn),a(Bn,"Shy Net",Gn),a(Bn,"shy Net",Gn),a(Bn,"Shy net",Gn),Bn),jn="WOOPRA";a({},"Woopra","Woopra");var Kn,Qn=(a(Fn={},jn,jn),a(Fn,"Woopra",jn),a(Fn,"woopra",jn),Fn),Hn="ROLLBAR";a({},"RollBar","RollBar");var zn,qn=(a(Kn={},Hn,Hn),a(Kn,"RollBar",Hn),a(Kn,"Roll_Bar",Hn),a(Kn,"rollbar",Hn),a(Kn,"Rollbar",Hn),a(Kn,"ROLL BAR",Hn),a(Kn,"Roll Bar",Hn),a(Kn,"roll bar",Hn),Kn),Vn="QUORA_PIXEL";a({},"Quora Pixel","QuoraPixel");var Wn,Yn=(a(zn={},Vn,Vn),a(zn,"Quora Pixel",Vn),a(zn,"Quora pixel",Vn),a(zn,"QUORA PIXEL",Vn),a(zn,"QuoraPixel",Vn),a(zn,"Quorapixel",Vn),a(zn,"QUORAPIXEL",Vn),a(zn,"Quora_Pixel",Vn),a(zn,"quora_pixel",Vn),a(zn,"Quora",Vn),zn),Xn="JUNE";a({},"June","June");var Jn,$n=(a(Wn={},Xn,Xn),a(Wn,"June",Xn),a(Wn,"june",Xn),Wn),Zn="ENGAGE";a({},"Engage","Engage");var er,tr=(a(Jn={},Zn,Zn),a(Jn,"Engage",Zn),a(Jn,"engage",Zn),Jn),nr="ITERABLE";a({},"Iterable","Iterable");var rr,ir=(a(er={},nr,nr),a(er,"Iterable",nr),a(er,"iterable",nr),er),or="YANDEX_METRICA";a({},"Yandex.Metrica","YandexMetrica");var sr,ar=(a(rr={},or,or),a(rr,"Yandexmetrica",or),a(rr,"yandexmetrica",or),a(rr,"yandexMetrica",or),a(rr,"YandexMetrica",or),rr),ur="REFINER";a({},"Refiner","Refiner");var cr,lr=(a(sr={},ur,ur),a(sr,"Refiner",ur),a(sr,"refiner",ur),sr),fr="QUALAROO";a({},"Qualaroo","Qualaroo");var hr,dr=(a(cr={},fr,fr),a(cr,"Qualaroo",fr),a(cr,"qualaroo",fr),cr),pr="PODSIGHTS";a({},"Podsights","Podsights");var gr,yr=(a(hr={},pr,pr),a(hr,"Podsights",pr),a(hr,"PodSights",pr),a(hr,"pod Sights",pr),a(hr,"Pod Sights",pr),a(hr,"pod sights",pr),a(hr,"POD SIGHTS",pr),a(hr,"Pod sights",pr),hr),vr="AXEPTIO";a({},"Axeptio","Axeptio");var mr,Ir=(a(gr={},vr,vr),a(gr,"Axeptio",vr),a(gr,"axeptio",vr),gr),Ar="SATISMETER";a({},"Satismeter","Satismeter");var br,kr=(a(mr={},Ar,Ar),a(mr,"Satismeter",Ar),a(mr,"SatisMeter",Ar),mr),Er="MICROSOFT_CLARITY";a({},"Microsoft Clarity","MicrosoftClarity");var Cr,Sr=(a(br={},Er,Er),a(br,"Microsoft Clarity",Er),a(br,"Microsoft clarity",Er),a(br,"microsoft clarity",Er),a(br,"Microsoft_clarity",Er),a(br,"MicrosoftClarity",Er),a(br,"MICROSOFTCLARITY",Er),a(br,"microsoftclarity",Er),a(br,"microsoftClarity",Er),br),Or="SENDINBLUE";a({},"Sendinblue","Sendinblue");var Tr,wr=(a(Cr={},Or,Or),a(Cr,"Sendinblue",Or),a(Cr,"sendinblue",Or),a(Cr,"SendinBlue",Or),Cr),_r="OLARK";a({},"Olark","Olark");var Rr,Pr=(a(Tr={},_r,_r),a(Tr,"Olark",_r),a(Tr,"olark",_r),Tr),Dr="LEMNISK";a({},"Lemnisk","Lemnisk");var Lr,xr=(a(Rr={},Dr,Dr),a(Rr,"LEMNISK_MARKETING_AUTOMATION",Dr),a(Rr,"Lemnisk Marketing Automation",Dr),a(Rr,"LemniskMarketingAutomation",Dr),a(Rr,"lemniskmarketingautomation",Dr),a(Rr,"lemniskMarketingAutomation",Dr),a(Rr,"lemnisk",Dr),a(Rr,"Lemnisk",Dr),Rr),Mr="TIKTOK_ADS";a({},"TikTok Ads","TiktokAds");var Br,Nr=(a(Lr={},Mr,Mr),a(Lr,"TiktokAds",Mr),a(Lr,"Tiktok ads",Mr),a(Lr,"Tiktok Ads",Mr),a(Lr,"Tik Tok Ads",Mr),a(Lr,"tik tok ads",Mr),a(Lr,"tiktokads",Mr),Lr),Gr="ACTIVE_CAMPAIGN";a({},"Active Campaign","ActiveCampaign");var Fr=(a(Br={ActiveCampaign:Gr,"Active Campaign":Gr,"ACTIVE CAMPAIGN":Gr},Gr,Gr),a(Br,"activecampaign",Gr),a(Br,"active campaign",Gr),a(Br,"Active campaign",Gr),a(Br,"active Campaign",Gr),a(Br,"active_campaign",Gr),Br),Ur=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(n(n({All:"All"},B),F),K),z),W),J),ee),re),se),ce),he),ge),me),be),Ce),Te),ln),Re),Le),Be),Fe),Ke),ze),We),Je),et),rt),st),ct),ht),gt),mt),bt),Ct),Tt),Rt),Lt),Bt),Ft),Kt),zt),Wt),Jt),en),rn),an),dn),yn),In),kn),Sn),Pn),xn),Nn),Un),Qn),qn),Yn),$n),tr),ir),wn),ar),lr),dr),yr),Ir),kr),Sr),wr),Pr),xr),Nr),Fr),jr=4,Kr={setLogLevel:function(e){switch(e.toUpperCase()){case"INFO":jr=1;break;case"DEBUG":jr=2;break;case"WARN":jr=3;break;default:jr=4}},info:function(){var e;jr<=1&&(e=console).info.apply(e,arguments)},debug:function(){var e;jr<=2&&(e=console).log.apply(e,arguments)},warn:function(){var e;jr<=3&&(e=console).warn.apply(e,arguments)},error:function(){var e;jr<=4&&(e=console).error.apply(e,arguments)}},Qr=1e4,Hr=1e3,zr="RS_JS_SDK",qr="Request failed with status:",Vr=[qr],Wr="errorReporting",Yr=function(e){var t=window.RudderStackGlobals&&window.RudderStackGlobals[Wr];t&&e instanceof Error&&t.notify(e)},Xr=function(e,t){return JSON.stringify(e,function(e){var t=[];return function(n,i){if(!e||null!=i){if("object"!==r(i)||null===i)return i;for(;t.length>0&&t[t.length-1]!==this;)t.pop();return t.includes(i)?(Kr.debug("Circular Reference detected for key: ".concat(n)),"[Circular Reference]"):(t.push(i),i)}}}(t))},Jr=function(e,t,n){var i,o;try{i="string"==typeof e?e:e instanceof Error||e.message?e.message:Xr(e)}catch(e){i=""}if("object"===r(o=e)&&null!==o&&"target"in o){if(e.target&&"script"!==e.target.localName)return"";if(e.target.dataset&&(e.target.dataset.loader!==zr||"true"!==e.target.dataset.isnonnativesdk))return"";if(i="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:i},n.sendAdblockPageOptions),""}return"[handleError]::".concat(t||"",' "').concat(i,'"')},$r=function(e,t,n){var r;try{r=Jr(e,t,n)}catch(t){Kr.error("[handleError] Exception:: ",t),Kr.error("[handleError] Original error:: ",Xr(e)),Yr(t)}r&&(Kr.error(r),function(e){return!e.message||!Vr.some((function(t){return e.message.includes(t)}))}(e)&&Yr(e))},Zr={exports:{}};var ei,ti={exports:{}},ni=g(Object.freeze({__proto__:null,default:{}}));function ri(){return ei||(ei=1,function(e,t){var n;e.exports=(n=n||function(e,t){var n;if("undefined"!=typeof window&&window.crypto&&(n=window.crypto),"undefined"!=typeof self&&self.crypto&&(n=self.crypto),"undefined"!=typeof globalThis&&globalThis.crypto&&(n=globalThis.crypto),!n&&"undefined"!=typeof window&&window.msCrypto&&(n=window.msCrypto),!n&&void 0!==d&&d.crypto&&(n=d.crypto),!n)try{n=ni}catch(e){}var r=function(){if(n){if("function"==typeof n.getRandomValues)try{return n.getRandomValues(new Uint32Array(1))[0]}catch(e){}if("function"==typeof n.randomBytes)try{return n.randomBytes(4).readInt32LE()}catch(e){}}throw new Error("Native crypto module could not be used to get secure random number.")},i=Object.create||function(){function e(){}return function(t){var n;return e.prototype=t,n=new e,e.prototype=null,n}}(),o={},s=o.lib={},a=s.Base={extend:function(e){var t=i(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},u=s.WordArray=a.extend({init:function(e,n){e=this.words=e||[],this.sigBytes=n!=t?n:4*e.length},toString:function(e){return(e||l).stringify(this)},concat:function(e){var t=this.words,n=e.words,r=this.sigBytes,i=e.sigBytes;if(this.clamp(),r%4)for(var o=0;o<i;o++){var s=n[o>>>2]>>>24-o%4*8&255;t[r+o>>>2]|=s<<24-(r+o)%4*8}else for(var a=0;a<i;a+=4)t[r+a>>>2]=n[a>>>2];return this.sigBytes+=i,this},clamp:function(){var t=this.words,n=this.sigBytes;t[n>>>2]&=4294967295<<32-n%4*8,t.length=e.ceil(n/4)},clone:function(){var e=a.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],n=0;n<e;n+=4)t.push(r());return new u.init(t,e)}}),c=o.enc={},l=c.Hex={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],i=0;i<n;i++){var o=t[i>>>2]>>>24-i%4*8&255;r.push((o>>>4).toString(16)),r.push((15&o).toString(16))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r+=2)n[r>>>3]|=parseInt(e.substr(r,2),16)<<24-r%8*4;return new u.init(n,t/2)}},f=c.Latin1={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],i=0;i<n;i++){var o=t[i>>>2]>>>24-i%4*8&255;r.push(String.fromCharCode(o))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r++)n[r>>>2]|=(255&e.charCodeAt(r))<<24-r%4*8;return new u.init(n,t)}},h=c.Utf8={stringify:function(e){try{return decodeURIComponent(escape(f.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return f.parse(unescape(encodeURIComponent(e)))}},p=s.BufferedBlockAlgorithm=a.extend({reset:function(){this._data=new u.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=h.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var n,r=this._data,i=r.words,o=r.sigBytes,s=this.blockSize,a=o/(4*s),c=(a=t?e.ceil(a):e.max((0|a)-this._minBufferSize,0))*s,l=e.min(4*c,o);if(c){for(var f=0;f<c;f+=s)this._doProcessBlock(i,f);n=i.splice(0,c),r.sigBytes-=l}return new u.init(n,l)},clone:function(){var e=a.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0});s.Hasher=p.extend({cfg:a.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){p.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:16,_createHelper:function(e){return function(t,n){return new e.init(n).finalize(t)}},_createHmacHelper:function(e){return function(t,n){return new g.HMAC.init(e,n).finalize(t)}}});var g=o.algo={};return o}(Math),n)}(ti)),ti.exports}var ii,oi={exports:{}};function si(){return ii||(ii=1,function(e,t){var n;e.exports=(n=ri(),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|r[e.charCodeAt(s)]>>>6-s%4*2;i[o>>>2]|=a<<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)}(oi)),oi.exports}var ai,ui={exports:{}};function ci(){return ai||(ai=1,function(e,t){var n;e.exports=(n=ri(),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],C=e[t+13],S=e[t+14],O=e[t+15],T=o[0],w=o[1],_=o[2],R=o[3];T=c(T,w,_,R,s,7,a[0]),R=c(R,T,w,_,u,12,a[1]),_=c(_,R,T,w,d,17,a[2]),w=c(w,_,R,T,p,22,a[3]),T=c(T,w,_,R,g,7,a[4]),R=c(R,T,w,_,y,12,a[5]),_=c(_,R,T,w,v,17,a[6]),w=c(w,_,R,T,m,22,a[7]),T=c(T,w,_,R,I,7,a[8]),R=c(R,T,w,_,A,12,a[9]),_=c(_,R,T,w,b,17,a[10]),w=c(w,_,R,T,k,22,a[11]),T=c(T,w,_,R,E,7,a[12]),R=c(R,T,w,_,C,12,a[13]),_=c(_,R,T,w,S,17,a[14]),T=l(T,w=c(w,_,R,T,O,22,a[15]),_,R,u,5,a[16]),R=l(R,T,w,_,v,9,a[17]),_=l(_,R,T,w,k,14,a[18]),w=l(w,_,R,T,s,20,a[19]),T=l(T,w,_,R,y,5,a[20]),R=l(R,T,w,_,b,9,a[21]),_=l(_,R,T,w,O,14,a[22]),w=l(w,_,R,T,g,20,a[23]),T=l(T,w,_,R,A,5,a[24]),R=l(R,T,w,_,S,9,a[25]),_=l(_,R,T,w,p,14,a[26]),w=l(w,_,R,T,I,20,a[27]),T=l(T,w,_,R,C,5,a[28]),R=l(R,T,w,_,d,9,a[29]),_=l(_,R,T,w,m,14,a[30]),T=f(T,w=l(w,_,R,T,E,20,a[31]),_,R,y,4,a[32]),R=f(R,T,w,_,I,11,a[33]),_=f(_,R,T,w,k,16,a[34]),w=f(w,_,R,T,S,23,a[35]),T=f(T,w,_,R,u,4,a[36]),R=f(R,T,w,_,g,11,a[37]),_=f(_,R,T,w,m,16,a[38]),w=f(w,_,R,T,b,23,a[39]),T=f(T,w,_,R,C,4,a[40]),R=f(R,T,w,_,s,11,a[41]),_=f(_,R,T,w,p,16,a[42]),w=f(w,_,R,T,v,23,a[43]),T=f(T,w,_,R,A,4,a[44]),R=f(R,T,w,_,E,11,a[45]),_=f(_,R,T,w,O,16,a[46]),T=h(T,w=f(w,_,R,T,d,23,a[47]),_,R,s,6,a[48]),R=h(R,T,w,_,m,10,a[49]),_=h(_,R,T,w,S,15,a[50]),w=h(w,_,R,T,y,21,a[51]),T=h(T,w,_,R,E,6,a[52]),R=h(R,T,w,_,p,10,a[53]),_=h(_,R,T,w,b,15,a[54]),w=h(w,_,R,T,u,21,a[55]),T=h(T,w,_,R,I,6,a[56]),R=h(R,T,w,_,O,10,a[57]),_=h(_,R,T,w,v,15,a[58]),w=h(w,_,R,T,C,21,a[59]),T=h(T,w,_,R,g,6,a[60]),R=h(R,T,w,_,k,10,a[61]),_=h(_,R,T,w,d,15,a[62]),w=h(w,_,R,T,A,21,a[63]),o[0]=o[0]+T|0,o[1]=o[1]+w|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)}(ui)),ui.exports}var li,fi={exports:{}},hi={exports:{}};function di(){return li||(li=1,function(e,t){var n,r,i,o,s,a,u,c;e.exports=(c=ri(),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)}(hi)),hi.exports}var pi,gi,yi={exports:{}};function vi(){return gi||(gi=1,function(e,t){var n,r,i,o,s,a,u,c;e.exports=(c=ri(),di(),pi||(pi=1,function(e,t){var n;e.exports=(n=ri(),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))}})}())}(yi)),yi.exports,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,r=this.cfg,i=r.hasher.create(),s=o.create(),a=s.words,u=r.keySize,c=r.iterations;a.length<u;){n&&i.update(n),n=i.update(e).finalize(t),i.reset();for(var l=1;l<c;l++)n=i.finalize(n),i.reset();s.concat(n)}return s.sigBytes=4*u,s}}),n.EvpKDF=function(e,t,n){return u.create(n).compute(e,t)},c.EvpKDF)}(fi)),fi.exports}var mi,Ii={exports:{}};!function(e,t){var n;e.exports=(n=ri(),si(),ci(),vi(),mi||(mi=1,function(e,t){var n;e.exports=(n=ri(),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,o=this._iv;o?(i=o,this._iv=e):i=this._prevBlock;for(var s=0;s<r;s++)t[n+s]^=i[s]}return t.Encryptor=t.extend({processBlock:function(e,t){var r=this._cipher,i=r.blockSize;n.call(this,e,t,i),r.encryptBlock(e,t),this._prevBlock=e.slice(t,t+i)}}),t.Decryptor=t.extend({processBlock:function(e,t){var r=this._cipher,i=r.blockSize,o=e.slice(t,t+i);r.decryptBlock(e,t),n.call(this,e,t,i),this._prevBlock=o}}),t}(),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(){var e;l.reset.call(this);var t=this.cfg,n=t.iv,r=t.mode;this._xformMode==this._ENC_XFORM_MODE?e=r.createEncryptor:(e=r.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==e?this._mode.init(this,n&&n.words):(this._mode=e.call(r,this,n&&n.words),this._mode.__creator=e)},_doProcessBlock:function(e,t){this._mode.processBlock(e,t)},_doFinalize:function(){var e,t=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(t.pad(this._data,this.blockSize),e=this._process(!0)):(e=this._process(!0),t.unpad(e)),e},blockSize:4});var 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;return(n?o.create([1398893684,1701076831]).concat(n).concat(t):t).toString(u)},parse:function(e){var t,n=u.parse(e),r=n.words;return 1398893684==r[0]&&1701076831==r[1]&&(t=o.create(r.slice(2,4)),r.splice(0,4),n.sigBytes-=16),g.create({ciphertext:n,salt:t})}},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)}})}()))}(Ii)),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++)s<n?o[s]=t[s]:(c=o[s-1],s%n?n>6&&s%n==4&&(c=i[c>>>24]<<24|i[c>>>16&255]<<16|i[c>>>8&255]<<8|i[255&c]):(c=i[(c=c<<8|c>>>24)>>>24]<<24|i[c>>>16&255]<<16|i[c>>>8&255]<<8|i[255&c],c^=p[s/n|0]<<24),o[s]=o[s-n]^c);for(var a=this._invKeySchedule=[],u=0;u<r;u++){if(s=r-u,u%4)var c=o[s];else c=o[s-4];a[u]=u<4||s<=4?c:l[i[c>>>24]]^f[i[c>>>16&255]]^h[i[c>>>8&255]]^d[i[255&c]]}}},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,s,a,u,c,i)},decryptBlock:function(e,t){var n=e[t+1];e[t+1]=e[t+3],e[t+3]=n,this._doCryptBlock(e,t,this._invKeySchedule,l,f,h,d,o),n=e[t+1],e[t+1]=e[t+3],e[t+3]=n},_doCryptBlock:function(e,t,n,r,i,o,s,a){for(var u=this._nRounds,c=e[t]^n[0],l=e[t+1]^n[1],f=e[t+2]^n[2],h=e[t+3]^n[3],d=4,p=1;p<u;p++){var g=r[c>>>24]^i[l>>>16&255]^o[f>>>8&255]^s[255&h]^n[d++],y=r[l>>>24]^i[f>>>16&255]^o[h>>>8&255]^s[255&c]^n[d++],v=r[f>>>24]^i[h>>>16&255]^o[c>>>8&255]^s[255&l]^n[d++],m=r[h>>>24]^i[c>>>16&255]^o[l>>>8&255]^s[255&f]^n[d++];c=g,l=y,f=v,h=m}g=(a[c>>>24]<<24|a[l>>>16&255]<<16|a[f>>>8&255]<<8|a[255&h])^n[d++],y=(a[l>>>24]<<24|a[f>>>16&255]<<16|a[h>>>8&255]<<8|a[255&c])^n[d++],v=(a[f>>>24]<<24|a[h>>>16&255]<<16|a[c>>>8&255]<<8|a[255&l])^n[d++],m=(a[h>>>24]<<24|a[c>>>16&255]<<16|a[l>>>8&255]<<8|a[255&f])^n[d++],e[t]=g,e[t+1]=y,e[t+2]=v,e[t+3]=m},keySize:8});e.AES=t._createHelper(g)}(),n.AES)}(Zr);var Ai=p(Zr.exports),bi={exports:{}};!function(e,t){e.exports=ri().enc.Utf8}(bi);var ki=p(bi.exports),Ei=function(e){return null!=e&&"object"===r(e)&&!1===Array.isArray(e)},Ci=function(e,t,n){if(Ei(n)||(n={default:n}),!Ti(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 Oi(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=Si([l.slice(0,-1),a[++c]||""],s,n);if(l in e){if(!Oi(l,e,n))return n.default;e=e[l]}else{for(var f=!1,h=c+1;h<u;)if(f=(l=Si([l,a[h++]],s,n))in e){if(!Oi(l,e,n))return n.default;e=e[l],c=h-1;break}if(!f)return n.default}}while(++c<u&&Ti(e));return c===u?e:n.default};function Si(e,t,n){return"function"==typeof n.join?n.join(e):e[0]+t+e[1]}function Oi(e,t,n){return"function"!=typeof n.isValid||n.isValid(e,t)}function Ti(e){return Ei(e)||Array.isArray(e)||"function"==typeof e}var wi,_i,Ri=p(Ci),Pi={exports:{}};function Di(){if(_i)return wi;_i=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 wi=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))},wi}var Li=function(e){function t(e){var r,i,o,s=null;function a(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];if(a.enabled){var o=a,s=Number(new Date),u=s-(r||s);o.diff=u,o.prev=r,o.curr=s,r=s,n[0]=t.coerce(n[0]),"string"!=typeof n[0]&&n.unshift("%O");var c=0;n[0]=n[0].replace(/%([a-zA-Z%])/g,(function(e,r){if("%%"===e)return"%";c++;var i=t.formatters[r];if("function"==typeof i){var s=n[c];e=i.call(o,s),n.splice(c,1),c--}return e})),t.formatArgs.call(o,n),(o.log||t.log).apply(o,n)}}return a.namespace=e,a.useColors=t.useColors(),a.color=t.selectColor(e),a.extend=n,a.destroy=t.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:function(){return null!==s?s:(i!==t.namespaces&&(i=t.namespaces,o=t.enabled(e)),o)},set:function(e){s=e}}),"function"==typeof t.init&&t.init(a),a}function n(e,n){var r=t(this.namespace+(void 0===n?":":n)+e);return r.log=this.log,r}function r(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){var e=[].concat(c(t.names.map(r)),c(t.skips.map(r).map((function(e){return"-"+e})))).join(",");return t.enable(""),e},t.enable=function(e){var n;t.save(e),t.namespaces=e,t.names=[],t.skips=[];var r=("string"==typeof e?e:"").split(/[\s,]+/),i=r.length;for(n=0;n<i;n++)r[n]&&("-"===(e=r[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.slice(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;var n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=Di(),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((function(n){t[n]=e[n]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){for(var n=0,r=0;r<e.length;r++)n=(n<<5)-n+e.charCodeAt(r),n|=0;return t.colors[Math.abs(n)%t.colors.length]},t.enable(t.load()),t};!function(e,t){var n;t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;var n="color: "+this.color;t.splice(1,0,n,"color: inherit");var r=0,i=0;t[0].replace(/%[a-zA-Z%]/g,(function(e){"%%"!==e&&(r++,"%c"===e&&(i=r))})),t.splice(i,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){var e;try{e=t.storage.getItem("debug")}catch(e){}!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG);return e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(n=!1,function(){n||(n=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||function(){},e.exports=Li(t),e.exports.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}(Pi,Pi.exports);var xi=Pi.exports,Mi=xi("cookie"),Bi=function(e,t,n){switch(arguments.length){case 3:case 2:return function(e,t,n){n=n||{};var r=Gi(e)+"="+Gi(t);null==t&&(n.maxage=-1);n.maxage&&(n.expires=new Date(+new Date+n.maxage));n.path&&(r+="; path="+n.path);n.domain&&(r+="; domain="+n.domain);n.expires&&(r+="; expires="+n.expires.toUTCString());n.samesite&&(r+="; samesite="+n.samesite);n.secure&&(r+="; secure");document.cookie=r}(e,t,n);case 1:return function(e){return Ni()[e]}(e);default:return Ni()}};function Ni(){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[Fi((t=r[i].split("="))[0])]=Fi(t[1]);return n}(e)}function Gi(e){try{return encodeURIComponent(e)}catch(t){Mi("error `encode(%o)` - %o",e,t)}}function Fi(e){try{return decodeURIComponent(e)}catch(t){Mi("error `decode(%o)` - %o",e,t)}}var Ui=p(Bi),ji={exports:{}},Ki=Math.max,Qi=function(e,t){var n=t?t.length:0;if(!n)return[];for(var r=Ki(Number(e)||0,0),i=Ki(n-r,0),o=new Array(i),s=0;s<i;s+=1)o[s]=t[s+r];return o},Hi=Math.max,zi=function(e){if(null==e||!e.length)return[];for(var t=new Array(Hi(e.length-2,0)),n=1;n<e.length;n+=1)t[n-1]=e[n];return t},qi=Qi,Vi=zi,Wi=Object.prototype.hasOwnProperty,Yi=Object.prototype.toString,Xi=function(e){return Boolean(e)&&"[object Object]"===Yi.call(e)},Ji=function(e,t,n,r){return Wi.call(t,r)&&void 0===e[r]&&(e[r]=n),t},$i=function(e,t,n,r){return Wi.call(t,r)&&(Xi(e[r])&&Xi(n)?e[r]=eo(e[r],n):void 0===e[r]&&(e[r]=n)),t},Zi=function(e,t){if(n=t,!Boolean(n)||"object"!==r(n))return t;var n;e=e||Ji;for(var i=qi(2,arguments),o=0;o<i.length;o+=1)for(var s in i[o])e(t,i[o],i[o][s],s);return t},eo=function(e){return Zi.apply(null,[$i,e].concat(Vi(arguments)))};ji.exports=function(e){return Zi.apply(null,[null,e].concat(Vi(arguments)))},ji.exports.deep=eo;var to=p(ji.exports),no={exports:{}},ro=xi("cookie"),io=function(e,t,n){switch(arguments.length){case 3:case 2:return function(e,t,n){n=n||{};var r=so(e)+"="+so(t);null==t&&(n.maxage=-1);n.maxage&&(n.expires=new Date(+new Date+n.maxage));n.path&&(r+="; path="+n.path);n.domain&&(r+="; domain="+n.domain);n.expires&&(r+="; expires="+n.expires.toUTCString());n.secure&&(r+="; secure");document.cookie=r}(e,t,n);case 1:return function(e){return oo()[e]}(e);default:return oo()}};function oo(){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[ao((t=r[i].split("="))[0])]=ao(t[1]);return n}(e)}function so(e){try{return encodeURIComponent(e)}catch(t){ro("error `encode(%o)` - %o",e,t)}}function ao(e){try{return decodeURIComponent(e)}catch(t){ro("error `decode(%o)` - %o",e,t)}}!function(e,t){var n=io;function r(e){for(var n=t.cookie,r=t.levels(e),i=0;i<r.length;++i){var o="__tld__",s=r[i],a={domain:"."+s};if(n(o,1,a),n(o))return n(o,null,a),s}return""}r.levels=function(e){var t,n,r=("function"!=typeof window.URL?(t=e,(n=document.createElement("a")).href=t,n.hostname):new URL(e).hostname).split("."),i=r[r.length-1],o=[];if(4===r.length&&i===parseInt(i,10))return o;if(r.length<=1)return o;for(var s=r.length-2;s>=0;--s)o.push(r.slice(s).join("."));return o},r.cookie=n,t=e.exports=r}(no,no.exports);var uo=p(no.exports),co=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(uo(window.location.href));return"."===t&&(t=null),this.cOpts=to(e,{maxage:31536e6,path:"/",domain:t,samesite:"Lax"}),this.cOpts}},{key:"set",value:function(e,t){try{return Ui(e,t,_(this.cOpts)),!0}catch(e){return Kr.error(e),!1}}},{key:"get",value:function(e){return Ui(e)}},{key:"remove",value:function(e){try{return Ui(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}(),lo=new co({}),fo={exports:{}};!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||(e=window.localStorage),e.setItem(t,n),e.removeItem(t)}catch(t){var r={_data:{},setItem:function(e,t){return r._data[e]=String(t)},getItem:function(e){return r._data.hasOwnProperty(e)?r._data[e]:void 0},removeItem:function(e){return delete r._data[e]},clear:function(){return r._data={}}};e=r}finally{e.getItem(t)===n&&e.removeItem(t)}return e}var s=o();function a(){if(!(this instanceof a))return new a}a.prototype={set:function(n,r){if(n&&!e(n))s.setItem(n,t(r));else if(e(n))for(var i in n)this.set(i,n[i]);return this},get:function(e){if(!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}()}(fo);var ho=p(fo.exports),po=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||(to(e,{enabled:!0}),this.enabled=e.enabled&&this.enabled,this.sOpts=e),this.sOpts}},{key:"set",value:function(e,t){return ho.set(e,t)}},{key:"get",value:function(e){return ho.get(e)}},{key:"remove",value:function(e){return ho.remove(e)}},{key:"checkSupportAvailability",value:function(){var e="test_rudder_ls";return this.set(e,!0),!!this.get(e)&&(this.remove(e),!0)}}]),e}(),go=new po({}),yo=function(e){return(new TextDecoder).decode((t=e,n=globalThis.atob(t).split("").map((function(e){return e.charCodeAt(0)})),new Uint8Array(n)));var t,n},vo="rl_user_id",mo="rl_trait",Io="rl_anonymous_id",Ao="rl_group_id",bo="rl_group_trait",ko="rl_page_init_referrer",Eo="rl_page_init_referring_domain",Co="rl_session",So="rl_auth_token",Oo="RudderEncrypt:",To="RS_ENC_v3_",wo="Rudder",_o={segment:"ajs_anonymous_id"};function Ro(e){try{return e?JSON.parse(e):null}catch(t){return Kr.error(t),e||null}}function Po(e){return e.replace(/^\s+|\s+$/gm,"")}function Do(e){return e&&"string"==typeof e&&""!==Po(e)?e.substring(0,Oo.length)===Oo?Ai.decrypt(e.substring(Oo.length),wo).toString(ki):e.substring(0,To.length)===To?yo(e.substring(To.length)):e:e}for(var Lo,xo=function(){function e(){i(this,e),lo.isSupportAvailable?this.storage=lo:(go.enabled&&(this.storage=go),this.storage||Kr.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""===Po(e)?e:"".concat(Oo).concat(Ai.encrypt(e,wo).toString())}(function(e){return JSON.stringify(e)}(t)))}},{key:"setStringItem",value:function(e,t){"string"==typeof t?this.setItem(e,t):Kr.error("[Storage] ".concat(e," should be string"))}},{key:"setUserId",value:function(e){this.setStringItem(vo,e)}},{key:"setUserTraits",value:function(e){this.setItem(mo,e)}},{key:"setGroupId",value:function(e){this.setStringItem(Ao,e)}},{key:"setGroupTraits",value:function(e){this.setItem(bo,e)}},{key:"setAnonymousId",value:function(e){this.setStringItem(Io,e)}},{key:"setInitialReferrer",value:function(e){this.setItem(ko,e)}},{key:"setInitialReferringDomain",value:function(e){this.setItem(Eo,e)}},{key:"setSessionInfo",value:function(e){this.setItem(Co,e)}},{key:"setAuthToken",value:function(e){this.setItem(So,e)}},{key:"getItem",value:function(e){return Ro(Do(this.storage.get(e)))}},{key:"getUserId",value:function(){return this.getItem(vo)}},{key:"getUserTraits",value:function(){return this.getItem(mo)}},{key:"getGroupId",value:function(){return this.getItem(Ao)}},{key:"getGroupTraits",value:function(){return this.getItem(bo)}},{key:"fetchExternalAnonymousId",value:function(e){var t,n=e.toLowerCase();return Object.keys(_o).includes(n)&&"segment"===n?(go.enabled&&(t=go.get(_o[n])),!t&&lo.isSupportAvailable&&(t=lo.get(_o[n])),t):t}},{key:"getAnonymousId",value:function(e){var t=Ro(Do(this.storage.get(Io)));if(t)return t;var n=Ri(e,"autoCapture.source");if(!0===Ri(e,"autoCapture.enabled")&&"string"==typeof n){var r=this.fetchExternalAnonymousId(n);if(r)return r}return t}},{key:"getInitialReferrer",value:function(){return this.getItem(ko)}},{key:"getInitialReferringDomain",value:function(){return this.getItem(Eo)}},{key:"getSessionInfo",value:function(){return this.getItem(Co)}},{key:"getAuthToken",value:function(){return this.getItem(So)}},{key:"removeItem",value:function(e){return this.storage.remove(e)}},{key:"removeSessionInfo",value:function(){this.removeItem(Co)}},{key:"clear",value:function(e){this.storage.remove(vo),this.storage.remove(mo),this.storage.remove(Ao),this.storage.remove(bo),this.storage.remove(So),e&&this.storage.remove(Io)}}]),e}(),Mo=new xo,Bo=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};try{if(document.getElementById(e))return;var r=document.createElement("script");r.src=t,r.async=void 0===n.async||n.async,r.type="text/javascript",r.id=e,!0!==n.skipDatasetAttributes&&(r.setAttribute("data-loader",zr),void 0!==n.isNonNativeSDK&&r.setAttribute("data-isNonNativeSDK",n.isNonNativeSDK));var i=document.getElementsByTagName("head");if(i.length>0)i[0].insertBefore(r,i[0].firstChild);else{var o=document.getElementsByTagName("script")[0];o.parentNode.insertBefore(r,o)}}catch(o){$r(o)}},No=function(e){return null===e},Go=function(e,t){if(!Array.isArray(e)||!Array.isArray(t))return _(t);var n=_(e);return t.forEach((function(e,t){n[t]=Array.isArray(e)||function(e){return!No(e)&&"object"===r(e)&&!Array.isArray(e)}(e)?Fo(n[t],e):e})),n},Fo=function(e,t){return D(Go,e,t)},Uo=function(e){return function(e){return!No(e)&&"[object Object]"===Object.prototype.toString.call(e)}(e)&&Object.keys(e).length>0},jo=256,Ko=[];jo--;)Ko[jo]=(jo+256).toString(16).substring(1);for(var Qo,Ho=4096,zo=[],qo=0;qo<256;qo++)zo[qo]=(qo+256).toString(16).substring(1);function Vo(){var e;(!Qo||qo+16>Ho)&&(e=Ho,Qo=crypto.getRandomValues(new Uint8Array(e)),qo=0);for(var t,n=0,r="";n<16;n++)t=Qo[qo+n],r+=6==n?zo[15&t|64]:8==n?zo[63&t|128]:zo[t],1&n&&n>1&&n<11&&(r+="-");return qo+=16,r}var Wo={All:"All",GA:"Google Analytics",GOOGLEADS:"Google Ads",BRAZE:"Braze",CHARTBEAT:"Chartbeat",COMSCORE:"Comscore",CUSTOMERIO:"Customer IO",DCM_Floodlight:"DCM Floodlight",FACEBOOK_PIXEL:"Facebook Pixel",GTM:"Google Tag Manager",HOTJAR:"Hotjar",HS:"HubSpot",INTERCOM:"Intercom",KEEN:"Keen",KISSMETRICS:"Kiss Metrics",LOTAME:"Lotame",VWO:"VWO",OPTIMIZELY:"Optimizely Web",FULLSTORY:"Fullstory",TVSQUARED:"TVSquared",GA4:"Google Analytics 4 (GA4)",MOENGAGE:"MoEngage",AM:"Amplitude",PENDO:"Pendo",LYTICS:"Lytics",APPCUES:"Appcues",POSTHOG:"PostHog",PROFITWELL:"ProfitWell",KLAVIYO:"Klaviyo",CLEVERTAP:"CleverTap",BINGADS:"Bing Ads",PINTEREST_TAG:"Pinterest Tag",SNAP_PIXEL:"Snap Pixel",LINKEDIN_INSIGHT_TAG:"Linkedin Insight Tag",REDDIT_PIXEL:"Reddit Pixel",DRIP:"Drip",HEAP:"Heap.io",CRITEO:"Criteo",MP:"Mixpanel",QUALTRICS:"Qualtrics",SENTRY:"Sentry",GOOGLE_OPTIMIZE:"Google Optimize",POST_AFFILIATE_PRO:"Post Affiliate Pro",LAUNCHDARKLY:"LaunchDarkly",GA360:"Google Analytics 360",ADROLL:"Adroll",VERO:"Vero",MATOMO:"Matomo",MOUSEFLOW:"Mouseflow",ROCKERBOX:"Rockerbox",CONVERTFLOW:"ConvertFlow",SNAPENGAGE:"SnapEngage",LIVECHAT:"LiveChat",SHYNET:"Shynet",WOOPRA:"Woopra",ROLLBAR:"RollBar",QUORA_PIXEL:"Quora Pixel",JUNE:"June",ENGAGE:"Engage",ITERABLE:"Iterable",YANDEX_METRICA:"Yandex.Metrica",REFINER:"Refiner",QUALAROO:"Qualaroo",PODSIGHTS:"Podsights",AXEPTIO:"Axeptio",SATISMETER:"Satismeter",MICROSOFT_CLARITY:"Microsoft Clarity",SENDINBLUE:"Sendinblue",OLARK:"Olark",LEMNISK:"Lemnisk",TIKTOK_ADS:"TikTok Ads",ACTIVE_CAMPAIGN:"ActiveCampaign"},Yo=["anonymous_id","id","sent_at","received_at","timestamp","original_timestamp","event_text","event"],Xo="https://api.rudderstack.com/sourceConfig/?p=npm&v=2.42.0",Jo="v1.1",$o="js-integrations",Zo="".concat("https://cdn.rudderlabs.com","/").concat(Jo,"/").concat($o),es=["Lax","None","Strict"],ts=["US","EU"],ns=["oneTrust","ketch"],rs=["library","consentManagement"],is=["none","default","full"],os={All:!0};function ss(e){return e&&e.endsWith("/")?e.replace(/\/+$/,""):e}function as(){return window.crypto&&"function"==typeof window.crypto.getRandomValues?Vo():function(){var e,t=0,n="";if(!Lo||jo+16>256){for(Lo=Array(t=256);t--;)Lo[t]=256*Math.random()|0;t=jo=0}for(;t<16;t++)e=Lo[jo+t],n+=6==t?Ko[15&e|64]:8==t?Ko[63&e|128]:Ko[e],1&t&&t>1&&t<11&&(n+="-");return jo++,n}()}function us(){return(new Date).toISOString()}function cs(e,t){Object.keys(e).forEach((function(n){e.hasOwnProperty(n)&&(t[n]&&(e[t[n]]=e[n]),"All"!==n&&void 0!==t[n]&&t[n]!==n&&delete e[n])}))}function ls(e){cs(e,Ur)}function fs(e){cs(e,Wo)}function hs(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;void 0!==e[r]&&!1===Boolean(e[r])&&(s=!1),s&&n.push(o)}else void 0!==e[r]&&!0===Boolean(e[r])&&n.push(o)})),n}var ds=function(){var e,t,n=!1,r=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=l(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){a=!0,o=e},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw o}}}}(document.getElementsByTagName("script"));try{for(r.s();!(t=r.n()).done;){var i=ss(t.value.getAttribute("src"));if(i){var o=i.match(/^.*rudder-analytics(-staging)?(\.min)?\.js$/);if(o){e=i,n=void 0!==o[1];break}}}}catch(e){r.e(e)}finally{r.f()}return{sdkURL:e,isStaging:n}},ps=function(e){return"string"==typeof e||null==e?e:JSON.stringify(e)},gs=function(e){return"string"==typeof e&&e.trim().length>0},ys=function(e,t,n){try{var r=e.source.dataplanes||{};if(Object.keys(r).length>0){var i=function(e){var t=e?e.residencyServer:void 0;if(t)return"string"==typeof t&&ts.includes(t.toUpperCase())?t.toUpperCase():void Kr.error("Invalid residencyServer input")}(n),o=r[i]||r.US;if(o){var s=function(e){if(Array.isArray(e)&&e.length>0){var t=e.find((function(e){return!0===e.default}));if(t&&gs(t.url))return t.url}}(o);if(s)return s}}if(gs(t))return t;throw Error("Unable to load the SDK due to invalid data plane url")}catch(e){throw Error(e)}};function vs(){return document.referrer||"$direct"}function ms(e){var t=e.split("/");return t.length>=3?t[2]:""}function Is(){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 As(){var e=Is(),t=window.location.pathname;if(e)try{t=new URL(e).pathname}catch(e){}var n=window.location,r=n.search,i=n.href,o=document.title,s=function(e){var t,n=Is(),r=(t=n?n.includes("?")?n:n+e:window.location.href).indexOf("#");return r>-1?t.slice(0,r):t}(r),a=i,u=vs();return{path:t,referrer:u,referring_domain:ms(u),search:r,title:o,url:s,tab_url:a,initial_referrer:Mo.getInitialReferrer()||"",initial_referring_domain:Mo.getInitialReferringDomain()||""}}for(var bs,ks=s((function e(){i(this,e),this.name="RudderLabs JavaScript SDK",this.namespace="com.rudderlabs.javascript",this.version="2.42.0"})),Es=s((function e(){i(this,e),this.name="RudderLabs JavaScript SDK",this.version="2.42.0"})),Cs=s((function e(){i(this,e),this.name="",this.version=""})),Ss=s((function e(){i(this,e),this.density=0,this.width=0,this.height=0,this.innerWidth=0,this.innerHeight=0})),Os=s((function e(){var t;i(this,e),this.app=new ks,this.traits=null,this.library=new Es,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 Cs,this.locale="undefined"==typeof navigator?null:navigator.language||navigator.browserLanguage,this.screen=(t=new Ss,"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)})),Ts=function(){function e(){i(this,e),this.channel="web",this.context=new Os,this.type=null,this.messageId=as(),this.originalTimestamp=(new Date).toISOString(),this.anonymousId=null,this.userId=null,this.event=null,this.properties={}}return s(e,[{key:"getProperty",value:function(e){return this.properties[e]}},{key:"addProperty",value:function(e,t){this.properties[e]=t}}]),e}(),ws=function(){function e(){i(this,e),this.message=new Ts}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}(),_s=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 ws;return e.setUserId(this.userId),e.setType(this.type),e.setEventName(this.event),e.setProperty(this.rudderProperty),e.setUserProperty(this.rudderUserProperty),e}}]),e}(),Rs={},Ps=256,Ds=[];Ps--;)Ds[Ps]=(Ps+256).toString(16).substring(1);Rs.v4=function(){var e,t=0,n="";if(!bs||Ps+16>256){for(bs=Array(t=256);t--;)bs[t]=256*Math.random()|0;t=Ps=0}for(;t<16;t++)e=bs[Ps+t],n+=6==t?Ds[15&e|64]:8==t?Ds[63&e|128]:Ds[e],1&t&&t>1&&t<11&&(n+="-");return Ps++,n};var Ls={},xs=Object.prototype.hasOwnProperty,Ms=String.prototype.charAt,Bs=Object.prototype.toString,Ns=function(e,t){return Ms.call(e,t)},Gs=function(e,t){return xs.call(e,t)},Fs=function(e,t){t=t||Gs;for(var n=[],r=0,i=e.length;r<i;r+=1)t(e,r)&&n.push(String(r));return n},Us=function(e){return null==e?[]:(t=e,"[object String]"===Bs.call(t)?Fs(e,Ns):function(e){return null!=e&&"function"!=typeof e&&"number"==typeof e.length}(e)?Fs(e,Gs):function(e,t){t=t||Gs;var n=[];for(var r in e)t(e,r)&&n.push(String(r));return n}(e));var t},js=Us,Ks=Rs.v4,Qs={_data:{},length:0,setItem:function(e,t){return this._data[e]=t,this.length=js(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=js(this._data).length,null},clear:function(){this._data={},this.length=0},key:function(e){return js(this._data)[e]}};Ls.defaultEngine=function(){try{if(!window.localStorage)return!1;var e=Ks();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:Qs,Ls.inMemoryEngine=Qs;var Hs=Us,zs=Object.prototype.toString,qs="function"==typeof Array.isArray?Array.isArray:function(e){return"[object Array]"===zs.call(e)},Vs=function(e){return null!=e&&(qs(e)||"function"!==e&&function(e){var t=r(e);return"number"===t||"object"===t&&"[object Number]"===zs.call(e)}(e.length))},Ws=function(e,t){for(var n=0;n<t.length&&!1!==e(t[n],n,t);n+=1);},Ys=function(e,t){for(var n=Hs(t),r=0;r<n.length&&!1!==e(t[n[r]],n[r],t);r+=1);},Xs=function(e,t){return(Vs(t)?Ws:Ys).call(this,e,t)},Js=Ls.defaultEngine,$s=Ls.inMemoryEngine,Zs=Xs,ea=Us,ta=JSON;function na(e,t,n,r){this.id=t,this.name=e,this.keys=n||{},this.engine=r||Js,this.originalEngine=this.engine}na.prototype.set=function(e,t){var n=this._createValidKey(e);if(n)try{this.engine.setItem(n,ta.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))}},na.prototype.get=function(e){try{var t=this.engine.getItem(this._createValidKey(e));return null===t?null:ta.parse(t)}catch(e){return null}},na.prototype.getOriginalEngine=function(){return this.originalEngine},na.prototype.remove=function(e){this.engine.removeItem(this._createValidKey(e))},na.prototype._createValidKey=function(e){var t,n=this.name,r=this.id;return ea(this.keys).length?(Zs((function(i){i===e&&(t=[n,r,e].join("."))}),this.keys),t):[n,r,e].join(".")},na.prototype._swapEngine=function(){var e=this;Zs((function(t){var n=e.get(t);$s.setItem([e.name,e.id,t].join("."),n),e.remove(t)}),this.keys),this.engine=$s};var ra=na;var ia=Xs,oa={setTimeout:function(e,t){return window.setTimeout(e,t)},clearTimeout:function(e){return window.clearTimeout(e)},Date:window.Date},sa=oa,aa={ASAP:1,RESCHEDULE:2,ABANDON:3};function ua(){this.tasks={},this.nextId=1}ua.prototype.now=function(){return+new sa.Date},ua.prototype.run=function(e,t,n){var r=this.nextId++;return this.tasks[r]=sa.setTimeout(this._handle(r,e,t,n||aa.ASAP),t),r},ua.prototype.cancel=function(e){this.tasks[e]&&(sa.clearTimeout(this.tasks[e]),delete this.tasks[e])},ua.prototype.cancelAll=function(){ia(sa.clearTimeout,this.tasks),this.tasks={}},ua.prototype._handle=function(e,t,n,r){var i=this,o=i.now();return function(){if(delete i.tasks[e],!(r>=aa.RESCHEDULE&&o+2*n<i.now()))return t();r===aa.RESCHEDULE&&i.run(t,n,r)}},ua.setClock=function(e){sa=e},ua.resetClock=function(){sa=oa},ua.Modes=aa;var ca=ua,la=Rs.v4,fa=ra,ha=Xs,da=ca,pa=xi("localstorage-retry");function ga(e,t){return function(){return e.apply(t,arguments)}}function ya(e,t,n){"function"==typeof t&&(n=t),this.name=e,this.id=la(),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 da,this._processId=0,this._store=new fa(this.name,this.id,this.keys),this._store.set(this.keys.IN_PROGRESS,{}),this._store.set(this.keys.QUEUE,[]),this._ack=ga(this._ack,this),this._checkReclaim=ga(this._checkReclaim,this),this._processHead=ga(this._processHead,this),this._running=!1}v(ya.prototype),ya.prototype.start=function(){this._running&&this.stop(),this._running=!0,this._ack(),this._checkReclaim(),this._processHead()},ya.prototype.stop=function(){this._schedule.cancelAll(),this._running=!1},ya.prototype.shouldRetry=function(e,t){return!(t>this.maxAttempts)},ya.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))},ya.prototype.addItem=function(e){this._enqueue({item:e,attemptNumber:0,time:this._schedule.now(),id:la()})},ya.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||la()}):this.emit("discard",e,t)},ya.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()},ya.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=la();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),ha((function(t){try{e.fn(t.item,t.done)}catch(e){pa("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,da.Modes.ASAP))},ya.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,da.Modes.ASAP)},ya.prototype._checkReclaim=function(){var e=this;ha((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,da.Modes.ABANDON))}),e.timeouts.RECLAIM_WAIT,da.Modes.ABANDON)}(t))}),function(t){for(var n=[],r=e._store.getOriginalEngine(),i=0;i<r.length;i++){var o=r.key(i);if(null!==o){var s=o.split(".");3===s.length&&s[0]===t&&"ack"===s[2]&&n.push(new fa(t,s[1],e.keys))}}return n}(this.name)),this._schedule.run(this._checkReclaim,this.timeouts.RECLAIM_TIMER,da.Modes.RESCHEDULE)},ya.prototype._reclaim=function(e){var t=this,n=new fa(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){ha((function(e){var i=e.id||la();o.indexOf(i)>=0?t.emit("duplication",e.item,e.attemptNumber):(r.queue.push({item:e.item,attemptNumber:e.attemptNumber+n,time:t._schedule.now(),id:i}),o.push(i))}),e)};s(i.queue,0),s(i.inProgress,1),r.queue=r.queue.sort((function(e,t){return e.time-t.time})),this._store.set(this.keys.QUEUE,r.queue);try{this._clearOtherQueue(n,1)}catch(e){if("NS_ERROR_STORAGE_BUSY"===e.name||"NS_ERROR_STORAGE_BUSY"===e.code||2153971713===e.code)try{this._clearOtherQueue(n,40)}catch(e){console.error(e)}else console.error(e)}this._processHead()},ya.prototype._clearOtherQueue=function(e,t){var n=this;setTimeout((function(){e.remove(n.keys.IN_PROGRESS),setTimeout((function(){e.remove(n.keys.QUEUE),setTimeout((function(){e.remove(n.keys.RECLAIM_START),setTimeout((function(){e.remove(n.keys.RECLAIM_END),setTimeout((function(){e.remove(n.keys.ACK)}),t)}),t)}),t)}),t)}),t)};var va=p(ya),ma={maxRetryDelay:36e4,minRetryDelay:1e3,backoffFactor:2,maxAttempts:10,maxItems:100},Ia=function(){function e(){i(this,e),this.url="",this.writeKey=""}return s(e,[{key:"init",value:function(e,t,n){var r=this;this.url=t,this.writeKey=e,n&&u(ma,n),this.payloadQueue=new va("rudder",ma,(function(e,t){e.message.sentAt=us(),r.processQueueElement(e.url,e.headers,e.message,1e4,(function(e,n){if(e)return t(e);t(null,n)}))})),this.payloadQueue.start()}},{key:"processQueueElement",value:function(e,t,n,r,i){try{var o=new XMLHttpRequest;for(var s in o.open("POST",e,!0),t)o.setRequestHeader(s,t[s]);o.timeout=r,o.ontimeout=i,o.onerror=i,o.onreadystatechange=function(){if(4===o.readyState)if(429===o.status||o.status>=500&&o.status<600){var t="".concat(qr,' "').concat(o.status,'" status text: "').concat(o.statusText,'" for URL: "').concat(e,'"'),n=new Error(t);$r(n),i(n)}else i(null,o.status)},o.send(Xr(n,!0))}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}(),Aa="queue",ba=64e3,ka=function(){function e(){i(this,e),this.storage=go,this.maxItems=10,this.flushQueueTimeOut=void 0,this.timeOutActive=!1,this.flushQueueTimeOutInterval=6e5,this.url="",this.writekey="",this.queueName="".concat(Aa,".").concat(Date.now())}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),this.sendQueueDataForBeacon=this.sendQueueDataForBeacon.bind(this),this.attachListeners()}},{key:"attachListeners",value:function(){var e=this;window.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&e.sendQueueDataForBeacon()}))}},{key:"getQueue",value:function(){return this.storage.get(this.queueName)}},{key:"setQueue",value:function(e){this.storage.set(this.queueName,e)}},{key:"enqueue",value:function(e){var t=this.getQueue()||[];(t=t.slice(-(this.maxItems-1))).push(e);var n=t.slice(0);Xr({batch:n},!0).length>ba&&(n=t.slice(0,t.length-1),this.flushQueue(n),(t=this.getQueue()).push(e)),this.setQueue(t),this.setTimer(),t.length===this.maxItems&&this.flushQueue(n)}},{key:"sendDataFromQueueAndDestroyQueue",value:function(){this.sendDataFromQueue(),this.storage.remove(this.queueName)}},{key:"sendDataFromQueue",value:function(){var e=this.getQueue();if(e&&e.length>0){var t=e.slice(0,e.length);this.flushQueue(t)}}},{key:"flushQueue",value:function(e){if(e&&e.length>0){e.forEach((function(e){e.sentAt=(new Date).toISOString()}));var t=Xr({batch:e},!0),n=new Blob([t],{type:"text/plain"}),r="".concat(this.url,"?writeKey=").concat(this.writekey);try{"function"!=typeof navigator.sendBeacon&&$r(new Error("Beacon API is not supported by browser")),navigator.sendBeacon(r,n)||$r(new Error("Unable to queue data to browser's beacon queue"))}catch(e){e.message="".concat(e.message," - While sending Beacon data to: ").concat(r),$r(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}(),Ea=function(){function e(){i(this,e),this.queue=void 0}return s(e,[{key:"initialize",value:function(e,t,n){var i={},o=ss(t);n&&n.useBeacon&&navigator.sendBeacon?(n.beaconQueueOptions&&null!=n.beaconQueueOptions&&"object"===r(n.beaconQueueOptions)&&(i=n.beaconQueueOptions),o="".concat(o,"/beacon/v1/batch"),this.queue=new ka):(n&&n.useBeacon&&Kr.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 Ia),this.queue.init(e,o,i)}},{key:"enqueue",value:function(e,t){var n=e.getElementContent();n.originalTimestamp=n.originalTimestamp||us(),n.sentAt=us(),Xr(n,!0).length>32e3&&Kr.error("[EventRepository] enqueue:: message length greater 32 Kb ",n),this.queue.enqueue(n,t)}}]),e}(),Ca=new Ea,Sa={maxRetryDelay:36e4,minRetryDelay:1e3,backoffFactor:2,maxAttempts:1/0},Oa=function(){function e(){i(this,e),this.callback=void 0,this.processQueueElements=!1}return s(e,[{key:"init",value:function(e,t){var n=this;e&&u(Sa,e),t&&(this.callback=t),this.payloadQueue=new va("rs_events",Sa,(function(e,t){n.processQueueElement(e.type,e.rudderElement,(function(e,n){if(e)return t(e);t(null,n)}))})),this.payloadQueue.start()}},{key:"activateProcessor",value:function(){this.processQueueElements=!0}},{key:"processQueueElement",value:function(e,t,n){try{this.processQueueElements?(Object.setPrototypeOf(t,ws.prototype),this.callback(e,t),n(null)):n(new Error("The queue elements are not ready to be processed yet"))}catch(e){n(e)}}},{key:"enqueue",value:function(e,t){this.payloadQueue.addItem({type:e,rudderElement:t})}}]),e}(),Ta=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},wa={getUserLanguage:function(){return navigator&&navigator.language},getUserAgent:function(){return navigator&&navigator.userAgent}};function _a(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e=e.endsWith("..")?e.substr(0,e.length-2):e,decodeURIComponent(atob(e).split("").map((function(e){return"%".concat("00".concat(e.charCodeAt(0).toString(16)).slice(-2))})).join(""))}var Ra=/^[a-zA-Z0-9\-_.]+$/,Pa=1,Da=1,La="*";function xa(e,t,n,r){var i=function(e,t){return[e,(new Date).getTimezoneOffset(),t].join(La)}(n,r),o=t||0,s=Math.floor(Date.now()/6e4)-o;return Ta([i,s,e].join(La)).toString(36)}function Ma(e){var t=function(e){var t=e.split(La),n=t.length%2==0;return t.length<4||!n||Number(t.shift())!==Da?null:{checksum:t.shift(),serializedIds:t.join(La)}}(e);if(!t)return null;var n=t.checksum,r=t.serializedIds;return function(e,t){for(var n=wa.getUserAgent(),r=wa.getUserLanguage(),i=0;i<=Pa;i+=1)if(xa(e,i,n,r)===t)return!0;return!1}(r,n)?function(e){for(var t={},n=e.split(La),r=0;r<n.length;r+=2){var i=n[r];if(Ra.test(i)){var o=_a(n[r+1]);t[i]=o}}return t}(r):null}var Ba=function(){function e(){var t=this;if(i(this,e),a(this,"isInitialized",!1),window.OneTrust&&window.OnetrustActiveGroups){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()})),this.isInitialized=!0}else Kr.error("OneTrust resources are not accessible.")}return s(e,[{key:"isEnabled",value:function(e){var t=this;try{if(!this.isInitialized)return!0;var n=e.oneTrustCookieCategories;if(!n)return!0;var r=n.map((function(e){return e.oneTrustCookieCategory})).filter((function(e){return e}));return r.every((function(e){return t.userSetConsentGroupIds.includes(e.toUpperCase().trim())||t.userSetConsentGroupNames.includes(e.toUpperCase().trim())}))}catch(e){return Kr.error("Error during onetrust cookie consent management ".concat(e)),!0}}},{key:"getDeniedList",value:function(){return this.isInitialized?this.userDeniedConsentGroupIds:[]}}]),e}(),Na=function(){function e(){var t=this;if(i(this,e),a(this,"updatePurposes",(function(e){e&&Object.entries(e).forEach((function(e){var n=e[0];e[1]?t.userConsentedPurposes.push(n):t.userDeniedPurposes.push(n)}))})),this.userConsentedPurposes=[],this.userDeniedPurposes=[],window.updateKetchConsent=function(e){e&&(t.userConsentedPurposes=[],t.userDeniedPurposes=[],t.updatePurposes(e))},window.getKetchUserConsentedPurposes=function(){return t.userConsentedPurposes.slice()},window.getKetchUserDeniedPurposes=function(){return t.userDeniedPurposes.slice()},window.ketchConsent)this.updatePurposes(window.ketchConsent);else{var n=this.getConsent();this.updatePurposes(n)}}return s(e,[{key:"isEnabled",value:function(e){var t=this;try{var n=e.ketchConsentPurposes;if(!n||0===n.length)return!0;var r=n.map((function(e){return e.purpose})).filter((function(e){return e}));return r.some((function(e){return t.userConsentedPurposes.includes(e.trim())}))}catch(e){return Kr.error("Error occured checking ketch consent state ".concat(e)),!0}}},{key:"getDeniedList",value:function(){return this.userDeniedPurposes}},{key:"getConsent",value:function(){var e=lo.get("_ketch_consent_v1_");if(e){var t;try{t=JSON.parse(atob(e))}catch(e){return void Kr.error("Error occurred while parsing consent cookie ".concat(e))}if(t){var n={};return Object.entries(t).forEach((function(e){var t=e[0],r=e[1];r&&r.status&&(n[t]="granted"===r.status)})),n}}}}]),e}(),Ga=function(e){var t,n;return null!=e&&null!==(t=e.oneTrust)&&void 0!==t&&t.enabled?new Ba:null!=e&&null!==(n=e.ketch)&&void 0!==n&&n.enabled?new Na:null},Fa=function(){function e(){i(this,e),this.storage=Mo,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&&(Kr.warn("[Session]:: Provided timeout value 0 will disable the auto session tracking feature."),this.sessionInfo.autoTrack=!1),n>0&&n<1e4&&Kr.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){$r(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;Kr.error('[Session]:: "sessionId" should at least be "'.concat(10,'" digits long'))}else Kr.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}(),Ua=new Fa,ja=["integrations","anonymousId","originalTimestamp"],Ka="rs-bugsnag",Qa="bugsnag",Ha=["Bugsnag",Qa],za="0d96a60df267f4a13f808bbaa54e535c",qa=["rudder-analytics.min.js","rudder-analytics-staging.min.js","rudder-analytics.js"].concat(c(Object.keys(L).map((function(e){return"".concat(L[e],".min.js")}))),c(Object.keys(L).map((function(e){return"".concat(L[e],"-staging.min.js")}))),c(Object.keys(L).map((function(e){return"".concat(L[e],".js")})))),Va=function(e){var t=e&&e._client&&e._client._notifier&&e._client._notifier.version;if(!t){var n=e({apiKey:za,releaseStage:"version-test",beforeSend:function(){return!1}});t=n.notifier&&n.notifier.version,n=void 0}return t&&"6"===t.charAt(0)},Wa=function(e){Ha.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)}))&&Bo(e,"https://d2wy8f7a9ursnm.cloudfront.net/v6/bugsnag.min.js",{isNonNativeSDK:"true",skipDatasetAttributes:!0})},Ya=function(){function e(t,n){i(this,e),this.pluginName=Ka,this.sourceId=t,this.onClientReady=n,this.initClientOnLibReadyInterval=void 0,this.init()}return s(e,[{key:"init",value:function(){var e=this;if(!window.RudderStackGlobals||!window.RudderStackGlobals[Wr]){if(!za.match(/{{.+}}/)){Wa(this.pluginName);var t=window[Qa];"function"!=typeof t?(this.initClientOnLibReadyInterval=setInterval((function(){var t=window[Qa];"function"==typeof t&&(Va(t)&&e.initClient(),clearInterval(e.initClientOnLibReadyInterval))}),100),setTimeout((function(){clearInterval(e.initClientOnLibReadyInterval)}),Qr)):Va(t)&&this.initClient()}}}},{key:"initClient",value:function(){var e,t=window[Qa];this.client=t({apiKey:za,appVersion:"2.42.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.test-host.com","localhost","127.0.0.1","[::1]"].includes(e)?"development":"production"),networkBreadcrumbsEnabled:!1}),this.onClientReady()}},{key:"onError",value:function(){var e=this.sourceId;return function(t){try{return!!function(e){var t=Ri(e,"stacktrace.0.file");if(!t||"string"!=typeof t)return!1;var n=t.substring(t.lastIndexOf("/")+1);return qa.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}(),Xa=Ka,Ja=[Ka],$a=function(){function e(t){i(this,e),this.isEnabled=!1,this.providerName=Xa,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 Ri(e,"statsCollection.errors.enabled")||!1}(e)?(this.enable(),this.setProviderName(function(e){return Ri(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||Ja.includes(e)?this.providerName=e:this.logger.error("[Analytics] ErrorReporting :: Invalid error reporting provider value. Value should be one of: ".concat(Ja.join(","))):this.providerName=Xa}},{key:"initProvider",value:function(e,t){if(this.providerName===Ka)this.provider=new Ya(t,this.onClientReady)}},{key:"onClientReady",value:function(){this.exposeToGlobal()}},{key:"exposeToGlobal",value:function(){window.RudderStackGlobals||(window.RudderStackGlobals={}),window.RudderStackGlobals[Wr]=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}(),Za=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=ss(t),this.writeKey=e,this.authToken=n||this.authToken,this.start()}},{key:"enqueue",value:function(e,t,n){this.queue.push({event:e,destinationIds:t,cb:n})}},{key:"sendEventForTransformation",value:function(e,t){var n=this;return new Promise((function(r,i){var o="".concat(n.dataPlaneUrl,"/transform"),s={"Content-Type":"application/json",Authorization:"Basic ".concat(btoa("".concat(n.writeKey,":")))};try{var a=new XMLHttpRequest;a.open("POST",o,!0),Object.keys(s).forEach((function(e){return a.setRequestHeader(e,s[e])})),a.timeout=1e4,a.onreadystatechange=function(){if(4===a.readyState)try{var o=a.status,s=a.response;switch(o){case 200:return s=JSON.parse(s),void r({status:o,transformedPayload:s.transformedBatch});case 400:var u=s?"".concat(s):"Invalid request payload";return void r({status:o,errorMessage:u});case 404:return void r({status:o});default:if(t>0){var c=t-1;setTimeout((function(){return n.sendEventForTransformation(e,c).then(r).catch(i)}),500*Math.pow(2,n.retryAttempt-c))}else r({status:o,errorMessage:"Retries exhausted"})}}catch(e){i(e)}},a.send(Xr(e,!0))}catch(e){i(e)}}))}},{key:"checkQueueLengthAndProcess",value:function(){this.queue.length>0&&this.process()}},{key:"process",value:function(){var e=this;this.isTransformationProcessing=!0;var t,n,r=this.queue.shift(),i=(t=r.event,n=r.destinationIds,{metadata:{"Custom-Authorization":this.authToken},batch:[{orderNo:Date.now(),destinationIds:n,event:t.message}]});this.sendEventForTransformation(i,this.retryAttempt).then((function(t){e.isTransformationProcessing=!1,r.cb(t),e.checkQueueLengthAndProcess()})).catch((function(t){$r("string"==typeof t?t:t.message),e.isTransformationProcessing=!1,r.cb({status:0}),e.checkQueueLengthAndProcess()}))}},{key:"start",value:function(){var e=this;setInterval((function(){e.isTransformationProcessing||e.checkQueueLengthAndProcess()}),100)}},{key:"setAuthToken",value:function(e){this.authToken=e}}]),e}()),eu=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=Mo,this.eventRepository=Ca,this.preProcessQueue=new Oa,this.sendAdblockPage=!1,this.sendAdblockPageOptions={},this.clientSuppliedCallbacks={},this.readyCallbacks=[],this.methodToCallbackMapping={syncPixel:"syncPixelCallback"},this.loaded=!1,this.loadIntegration=!0,this.bufferDataPlaneEventsUntilReady=!1,this.dataPlaneEventsBufferTimeout=1e4,this.integrationsData={},this.dynamicallyLoadedIntegrations={},this.destSDKBaseURL=Zo,this.cookieConsentOptions={},this.logLevel=void 0,this.clientIntegrationsReady=!1,this.uSession=Ua,this.version="2.42.0",this.lockIntegrationsVersion=!1,this.errorReporting=new $a(Kr),this.deniedConsentIds=[],this.transformationHandler=Za}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=vs();this.storage.setInitialReferrer(e),this.storage.setInitialReferringDomain(ms(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(L[t.name]).concat("_RS")]}))||t>=2e4?n(e):e.pause(Hr).then((function(){return e.allModulesInitialized(t+Hr).then(n)}))}))}},{key:"executeReadyCallback",value:function(){this.readyCallbacks.forEach((function(e){return e()}))}},{key:"integrationSDKLoaded",value:function(e,t){return window[e]&&window[e][t]&&window[e][t].prototype&&void 0!==window[e][t].prototype.constructor}},{key:"processResponse",value:function(e,t){var n=this;try{var i=t;try{if("string"==typeof t&&(i=JSON.parse(t)),!i||"object"!==r(i)||Array.isArray(i))return void Kr.error("Invalid source configuration")}catch(e){return void $r(e)}try{this.errorReporting.init(i.source.config,i.source.id)}catch(e){$r(e)}if(this.serverUrl=ys(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:{shouldApplyDeviceModeTransformation:e.shouldApplyDeviceModeTransformation||!1,propagateEventsUntransformedOnError:e.propagateEventsUntransformedOnError||!1,destinationId:e.id}})}),this),this.clientIntegrations=hs(this.loadOnlyIntegrations,this.clientIntegrations),Object.keys(this.cookieConsentOptions).length>0)try{var o=Ga(this.cookieConsentOptions);this.deniedConsentIds=o&&o.getDeniedList(),this.clientIntegrations=this.clientIntegrations.filter((function(e){return!o||o&&o.isEnabled(e.config)}))}catch(e){$r(e)}this.clientIntegrations=this.clientIntegrations.filter((function(e){return!!L[e.name]||(Kr.error("[Analytics] Integration:: ".concat(e.name," not available for initialization")),!1)}));var s="";ds().isStaging&&(s="-staging"),this.bufferDataPlaneEventsUntilReady&&setTimeout((function(){n.processBufferedCloudModeEvents()}),this.dataPlaneEventsBufferTimeout),this.errorReporting.leaveBreadcrumb("Starting device-mode initialization"),this.clientIntegrations.forEach((function(e){var t=L[e.name],r="".concat(t).concat("_RS"),i="".concat(n.destSDKBaseURL,"/").concat(t).concat(s,".min.js");window.hasOwnProperty(r)||Bo(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){var c="[Analytics] 'integration.init()' failed :: ".concat(r," :: ").concat(e.message);$r(e,c),o.failedToBeLoadedIntegration.push(i)}}}),100);setTimeout((function(){clearInterval(a)}),Qr)}));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){$r(e)}}},{key:"sendDataToDestination",value:function(e,t,n){try{if(e[n]){var r=_(t);e[n](r)}}catch(t){var i="[sendToNative]:: [Destination: ".concat(e.name,"]:: ");$r(t,i)}}},{key:"sendTransformedDataToDestination",value:function(e,t,n){var r=this;try{fs(t.message.integrations);var i=e.map((function(e){return e.destinationId}));this.transformationHandler.enqueue(t,i,(function(i){var o=i.status,s=i.transformedPayload,a=i.errorMessage;e.forEach((function(e){try{switch(o){case 200:var i=s.find((function(t){return t.id===e.destinationId})),u=[];null==i||i.payload.forEach((function(n){if("200"===n.status)u.push(n);else{var r='[DMT]:: Event transformation unsuccessful for destination "'.concat(e.name,'". Reason: '),i="Unknown";"410"===n.status&&(i="Transformation is not available");var o="Dropping the event",s=Kr.error;!0===e.propagateEventsUntransformedOnError&&(o="Sending untransformed event to the destination",s=Kr.warn,u.push({event:t.message})),s("".concat(r," ").concat(i,". ").concat(o,"."))}})),null==u||u.forEach((function(t){Uo(t.event)&&r.sendDataToDestination(e,{message:t.event},n)}));break;case 404:Kr.warn("[DMT]:: Transformation server access is denied. The configuration data seems to be out of sync. Sending untransformed event to the destination."),r.sendDataToDestination(e,t,n);break;default:!0===e.propagateEventsUntransformedOnError?(Kr.warn("[DMT]::[Destination: ".concat(e.name,"] :: Transformation request failed with status: ").concat(o," ").concat(a,". Sending untransformed event.")),r.sendDataToDestination(e,t,n)):Kr.error("[DMT]::[Destination: ".concat(e.name,"] :: Transformation request failed with status: ").concat(o," ").concat(a,". Dropping the event."))}}catch(t){t instanceof Error&&(t.message="[DMT]::[Destination:".concat(e.name,"]:: ").concat(t.message)),$r(t)}}))}))}catch(e){e instanceof Error&&(e.message="[DMT]:: ".concat(e.message)),$r(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.shouldApplyDeviceModeTransformation?o.push(e):i.push(e))})),i.forEach((function(e){r.sendDataToDestination(e,t,n)})),o.length>0&&this.sendTransformedDataToDestination(o,t,n)}},{key:"queueEventForDataPlane",value:function(e,t){var n=t.message.integrations||{All:!0};t.message.integrations=function(e,t){var n=_(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 Fo(n,r)}(this.integrationsData,n),this.eventRepository.enqueue(t,e)}},{key:"processBufferedCloudModeEvents",value:function(){this.bufferDataPlaneEventsUntilReady&&this.preProcessQueue.activateProcessor()}},{key:"replayEvents",value:function(e){var t,n,r,i=this;this.errorReporting.leaveBreadcrumb("Started replaying buffered events"),e.clientIntegrationObjects=[],e.clientIntegrationObjects=e.successfullyLoadedIntegration,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=Fo(r,e.getDataForIntegrationsObject())}catch(e){Kr.debug("[Analytics: prepareDataForIntegrationsObj]",e)}})),r),e.clientIntegrationsReady=!0,e.executeReadyCallback()),this.processBufferedCloudModeEvents(),e.toBeProcessedByIntegrationArray.forEach((function(t){var n=t[0];t.shift(),Object.keys(t[0].message.integrations).length>0&&ls(t[0].message.integrations);var r=hs(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>=Qr?(t.failedToBeLoadedIntegration.push(e),r(t)):t.pause(Hr).then((function(){return t.isInitialized(e,n+Hr).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 _s).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 _s).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);var o=ps(e);o&&this.userId&&o!==this.userId&&this.reset(),this.userId=o,this.storage.setUserId(this.userId);var s=_(t),a=_(n);if(s){for(var u in s)this.userTraits[u]=s[u];this.storage.setUserTraits(this.userTraits)}var c=(new _s).setType("identify").build();this.processAndSendDataToDestinations("identify",c,a,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 _s).setType("alias").build();o.message.previousId=ps(t)||(this.userId?this.userId:this.getAnonymousId()),o.message.userId=ps(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=ps(e),this.storage.setGroupId(this.groupId);var o=_(t),s=_(n),a=(new _s).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=Ur[t],r=this.clientIntegrations.find((function(e){return e.name===n})).config,i=r.blacklistedEvents,o=r.whitelistedEvents,s=r.eventFilteringOption;if(!s)return!1;var a=e.trim().toUpperCase();switch(s){case"disable":default:return!1;case"blacklistedEvents":return!!Array.isArray(i)&&i.some((function(e){return e.eventName.trim().toUpperCase()===a}));case"whitelistedEvents":return!Array.isArray(o)||!o.some((function(e){return e.eventName.trim().toUpperCase()===a}))}}},{key:"shouldUseGlobalIntegrationsConfigInEvents",value:function(){return this.useGlobalIntegrationsConfigInEvents&&this.loadOnlyIntegrations&&Object.keys(this.loadOnlyIntegrations).length>0}},{key:"processAndSendDataToDestinations",value:function(e,t,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){$r(e)}f=this.cookieConsentOptions,h=!1,Object.keys(f).forEach((function(e){ns.includes(e)&&"boolean"==typeof f[e].enabled&&!0===f[e].enabled&&(h=!0)})),h&&(t.message.context.consentManagement={deniedConsentIds:this.deniedConsentIds||[]}),this.processOptionsParam(t,r),function(e,t){var n=e.properties,r=e.traits,i=e.context;n&&Object.keys(n).forEach((function(e){Yo.indexOf(e.toLowerCase())>=0&&Kr.error("Warning! : Reserved keyword used in properties--\x3e ".concat(e," with ").concat(t," call"))})),r&&Object.keys(r).forEach((function(e){Yo.indexOf(e.toLowerCase())>=0&&Kr.error("Warning! : Reserved keyword used in traits--\x3e ".concat(e," with ").concat(t," call"))}));var o=i.traits;o&&Object.keys(o).forEach((function(e){Yo.indexOf(e.toLowerCase())>=0&&Kr.error("Warning! : Reserved keyword used in traits --\x3e ".concat(e," with ").concat(t," call"))}))}(t.message,e);var u=t.message.integrations;u?ls(u):u=this.shouldUseGlobalIntegrationsConfigInEvents()?this.loadOnlyIntegrations:os,t.message.integrations=u;try{t.message.context["ua-ch"]=this.uach}catch(e){$r(e)}if(this.clientIntegrationObjects){var c=hs(u,this.clientIntegrationObjects);this.processAndSendEventsToDeviceMode(c,t,e)}else this.toBeProcessedByIntegrationArray.push([e,t]);var l=_(t);fs(l.message.integrations),!this.bufferDataPlaneEventsUntilReady||this.clientIntegrationObjects?this.queueEventForDataPlane(e,l):this.preProcessQueue.enqueue(e,l),i&&"function"==typeof i&&i(l)}catch(e){$r(e)}var f,h}},{key:"utm",value:function(e){var t={};try{var n=new URL(e),r="utm_";n.searchParams.forEach((function(e,n){if(n.startsWith(r)){var i=n.substring(4);"campaign"===i&&(i="name"),t[i]=e}}))}catch(e){}return t}},{key:"addCampaignInfo",value:function(e){var t=e.message.context;t&&"object"===r(t)&&(e.message.context.campaign=this.utm(window.location.href))}},{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){ja.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(!ja.includes(e)&&!rs.includes(e))if("context"!==e)i=Fo(i,a({},e,t[e]));else if("object"===r(t[e])&&null!==t[e]){var o={};Object.keys(t[e]).forEach((function(n){rs.includes(n)||(o[n]=t[e][n])})),i=Fo(i,n({},o))}else Kr.error("[Analytics: processOptionsParam] context passed in options ".concat(e," is not object."))})),i}(e.message,t)}},{key:"getPageProperties",value:function(e,t){var n=As(),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=As(),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?Ma(t):null,r=n?n.rs_amp_id:null;this.anonymousId=e||r||as(),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,Kr.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&&-1!==es.indexOf(i.sameSiteCookie)&&(s=n(n({},s),{},{samesite:i.sameSiteCookie})),this.storage.options(s),i&&"string"==typeof i.uaChTrackLevel&&is.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),ls(this.loadOnlyIntegrations)),this.useGlobalIntegrationsConfigInEvents=i&&!0===i.useGlobalIntegrationsConfigInEvents,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&&"boolean"==typeof i.bufferDataPlaneEventsUntilReady&&(this.bufferDataPlaneEventsUntilReady=!0===i.bufferDataPlaneEventsUntilReady,this.bufferDataPlaneEventsUntilReady&&this.preProcessQueue.init(this.options,this.queueEventForDataPlane.bind(this))),i&&"number"==typeof i.dataPlaneEventsBufferTimeout&&(this.dataPlaneEventsBufferTimeout=i.dataPlaneEventsBufferTimeout),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=ss(n))){var i="CDN base URL for integrations is not valid";throw $r({message:"[Analytics] load:: ".concat(i)}),Error("Failed to load Rudder SDK: ".concat(i))}return r}var o=ds().sdkURL;return r=o?o.split("/").slice(0,-1).concat($o).join("/"):Zo,t&&(r=r.replace(Jo,e)),r}(this.version,this.lockIntegrationsVersion,i&&i.destSDKBaseURL),i&&i.getSourceConfig)if("function"!=typeof i.getSourceConfig)$r(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($r):this.processResponse(200,c)}else{var l=function(e){return Xo.concat(Xo.includes("?")?"&":"?").concat(e?"writeKey=".concat(e):"")}(e);i&&i.configUrl&&(l=function(e,t){var n=e;-1===n.indexOf("sourceConfig")&&(n="".concat(ss(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,n=o.responseText;200===e?i(200,n):($r(new Error("".concat(qr," ").concat(e," for url: ").concat(t))),i(e))},o.send()}(this,l,e,this.processResponse)}catch(e){$r(e)}}}},{key:"arePolyfillsRequired",value:function(e){return(!e||"boolean"!=typeof e.polyfillIfRequired||e.polyfillIfRequired)&&(!String.prototype.endsWith||!String.prototype.startsWith||!String.prototype.includes||!Array.prototype.find||!Array.prototype.includes||"function"!=typeof window.URL||"undefined"==typeof Promise||!Object.entries||!Object.values||!String.prototype.replaceAll||!this.isDatasetAvailable()||"function"!=typeof TextDecoder||"function"!=typeof Uint8Array)}},{key:"load",value:function(e,t,n){if(!this.loaded){var r=_(n);if(this.arePolyfillsRequired(r)){var i="polyfill";Bo(i,"https://polyfill.io/v3/polyfill.min.js?features=Number.isNaN%2CURL%2CArray.prototype.find%2CArray.prototype.includes%2CPromise%2CString.prototype.endsWith%2CString.prototype.includes%2CString.prototype.startsWith%2CObject.entries%2CObject.values%2CElement.prototype.dataset%2CString.prototype.replaceAll%2CTextDecoder%2Uint8Array",{skipDatasetAttributes:!0});var o=this,s=setInterval((function(){!window.hasOwnProperty(i)&&null===document.getElementById(i)||"undefined"==typeof Promise||(clearInterval(s),o.loadAfterPolyfill(e,t,r))}),100);setTimeout((function(){clearInterval(s)}),Qr)}else this.loadAfterPolyfill(e,t,r)}}},{key:"ready",value:function(e){this.loaded?"function"!=typeof e?Kr.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(){Bo("ad-block","//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js",{isNonNativeSDK:!0})}},{key:"startSession",value:function(e){this.uSession.start(e)}},{key:"endSession",value:function(){this.uSession.end()}},{key:"setAuthToken",value:function(e){"string"==typeof e?(this.storage.setAuthToken(e),this.transformationHandler.setAuthToken(e)):Kr.error("Provided input should be in string format")}}]),e}(),tu=new eu;m(tu),window.addEventListener("error",(function(e){$r(e,void 0,tu)}),!0),tu.initializeCallbacks(),tu.registerCallbacks(!1);var nu,ru="load",iu=window.rudderanalytics,ou=Array.isArray(iu);if(ou)for(var su=0;su<iu.length;){if(iu[su]&&iu[su][0]===ru){nu=iu[su],iu.splice(su,1);break}su+=1}!function(e){var t="ajs_trait_",n="ajs_prop_";function r(e,t){var n={};return Object.keys(e).forEach((function(r){r.startsWith(t)&&(n[r.substr(t.length)]=e[r])})),n}var i=function(e){var t={};try{new URL(e).searchParams.forEach((function(e,n){t[n]=e}))}catch(e){}return t}(e);i.ajs_aid&&tu.toBeProcessedArray.push(["setAnonymousId",i.ajs_aid]),i.ajs_uid&&tu.toBeProcessedArray.push(["identify",i.ajs_uid,r(i,t)]),i.ajs_event&&tu.toBeProcessedArray.push(["track",i.ajs_event,r(i,n)])}(window.location.href),ou&&iu.forEach((function(e){return tu.toBeProcessedArray.push(e)})),nu&&nu.length>0&&(nu.shift(),tu[ru].apply(tu,c(nu)));var au=tu.ready.bind(tu),uu=tu.identify.bind(tu),cu=tu.page.bind(tu),lu=tu.track.bind(tu),fu=tu.alias.bind(tu),hu=tu.group.bind(tu),du=tu.reset.bind(tu),pu=tu.load.bind(tu),gu=tu.initialized=!0,yu=tu.getUserId.bind(tu),vu=tu.getSessionId.bind(tu),mu=tu.getUserTraits.bind(tu),Iu=tu.getAnonymousId.bind(tu),Au=tu.setAnonymousId.bind(tu),bu=tu.getGroupId.bind(tu),ku=tu.getGroupTraits.bind(tu),Eu=tu.startSession.bind(tu),Cu=tu.endSession.bind(tu),Su=tu.setAuthToken.bind(tu);e.alias=fu,e.endSession=Cu,e.getAnonymousId=Iu,e.getGroupId=bu,e.getGroupTraits=ku,e.getSessionId=vu,e.getUserId=yu,e.getUserTraits=mu,e.group=hu,e.identify=uu,e.initialized=gu,e.load=pu,e.page=cu,e.ready=au,e.reset=du,e.setAnonymousId=Au,e.setAuthToken=Su,e.startSession=Eu,e.track=lu}));
@@ -0,0 +1 @@
1
+ function t(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function e(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?t(Object(n),!0).forEach((function(t){u(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):t(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function r(){r=function(){return e};var t,e={},n=Object.prototype,o=n.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},u=a.iterator||"@@iterator",s=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,r){return t[e]=r}}function l(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,a=Object.create(o.prototype),u=new I(n||[]);return i(a,"_invoke",{value:S(t,r,u)}),a}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var p="suspendedStart",d="suspendedYield",y="executing",g="completed",v={};function m(){}function b(){}function w(){}var E={};f(E,u,(function(){return this}));var _=Object.getPrototypeOf,O=_&&_(_(C([])));O&&O!==n&&o.call(O,u)&&(E=O);var A=w.prototype=m.prototype=Object.create(E);function R(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function T(t,e){function r(n,i,a,u){var s=h(t[n],t,i);if("throw"!==s.type){var c=s.arg,f=c.value;return f&&"object"==typeof f&&o.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(f).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,u)}))}u(s.arg)}var n;i(this,"_invoke",{value:function(t,o){function i(){return new e((function(e,n){r(t,o,e,n)}))}return n=n?n.then(i,i):i()}})}function S(e,r,n){var o=p;return function(i,a){if(o===y)throw new Error("Generator is already running");if(o===g){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var s=j(u,n);if(s){if(s===v)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=g,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=y;var c=h(e,r,n);if("normal"===c.type){if(o=n.done?g:d,c.arg===v)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=g,n.method="throw",n.arg=c.arg)}}}function j(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,j(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var i=h(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,v;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,v):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function x(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(x,this),this.reset(!0)}function C(e){if(e||""===e){var r=e[u];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,i=function r(){for(;++n<e.length;)if(o.call(e,n))return r.value=e[n],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(typeof e+" is not iterable")}return b.prototype=w,i(A,"constructor",{value:w,configurable:!0}),i(w,"constructor",{value:b,configurable:!0}),b.displayName=f(w,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,f(t,c,"GeneratorFunction")),t.prototype=Object.create(A),t},e.awrap=function(t){return{__await:t}},R(T.prototype),f(T.prototype,s,(function(){return this})),e.AsyncIterator=T,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new T(l(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},R(A),f(A,c,"Generator"),f(A,u,(function(){return this})),f(A,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=C,I.prototype={constructor:I,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(P),!e)for(var r in this)"t"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,o){return u.type="throw",u.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var s=o.call(a,"catchLoc"),c=o.call(a,"finallyLoc");if(s&&c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,v):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;P(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:C(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),v}},e}function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function o(t,e,r,n,o,i,a){try{var u=t[i](a),s=u.value}catch(t){return void r(t)}u.done?e(s):Promise.resolve(s).then(n,o)}function i(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var a=t.apply(e,r);function u(t){o(a,n,i,u,s,"next",t)}function s(t){o(a,n,i,u,s,"throw",t)}u(void 0)}))}}function a(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,c(n.key),n)}}function u(t,e,r){return(e=c(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function s(){return s=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},s.apply(this,arguments)}function c(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}var f="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function l(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var h=Object.prototype.toString;var p=l((function(t){switch(h.call(t)){case"[object Date]":return"date";case"[object RegExp]":return"regexp";case"[object Arguments]":return"arguments";case"[object Array]":return"array";case"[object Error]":return"error"}return null===t?"null":void 0===t?"undefined":t!=t?"nan":t&&1===t.nodeType?"element":null!=(e=t)&&(e._isBuffer||e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e))?"buffer":n(t=t.valueOf?t.valueOf():Object.prototype.valueOf.apply(t));var e})),d=l((function(t,e,r){return e=e||"and",r=r||", ",t.length<2?t[0]||"":(e.slice(0,2)===r?2==t.length&&(e=e.slice(1)):e=" "+e,t.slice(0,-1).join(r)+e+" "+t[t.length-1])})),y="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},g=[],v=[],m="undefined"!=typeof Uint8Array?Uint8Array:Array,b=!1;function w(){b=!0;for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e=0;e<64;++e)g[e]=t[e],v[t.charCodeAt(e)]=e;v["-".charCodeAt(0)]=62,v["_".charCodeAt(0)]=63}function E(t,e,r){for(var n,o,i=[],a=e;a<r;a+=3)n=(t[a]<<16)+(t[a+1]<<8)+t[a+2],i.push(g[(o=n)>>18&63]+g[o>>12&63]+g[o>>6&63]+g[63&o]);return i.join("")}function _(t){var e;b||w();for(var r=t.length,n=r%3,o="",i=[],a=16383,u=0,s=r-n;u<s;u+=a)i.push(E(t,u,u+a>s?s:u+a));return 1===n?(e=t[r-1],o+=g[e>>2],o+=g[e<<4&63],o+="=="):2===n&&(e=(t[r-2]<<8)+t[r-1],o+=g[e>>10],o+=g[e>>4&63],o+=g[e<<2&63],o+="="),i.push(o),i.join("")}function O(t,e,r,n,o){var i,a,u=8*o-n-1,s=(1<<u)-1,c=s>>1,f=-7,l=r?o-1:0,h=r?-1:1,p=t[e+l];for(l+=h,i=p&(1<<-f)-1,p>>=-f,f+=u;f>0;i=256*i+t[e+l],l+=h,f-=8);for(a=i&(1<<-f)-1,i>>=-f,f+=n;f>0;a=256*a+t[e+l],l+=h,f-=8);if(0===i)i=1-c;else{if(i===s)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,n),i-=c}return(p?-1:1)*a*Math.pow(2,i-n)}function A(t,e,r,n,o,i){var a,u,s,c=8*i-o-1,f=(1<<c)-1,l=f>>1,h=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:i-1,d=n?1:-1,y=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(u=isNaN(e)?1:0,a=f):(a=Math.floor(Math.log(e)/Math.LN2),e*(s=Math.pow(2,-a))<1&&(a--,s*=2),(e+=a+l>=1?h/s:h*Math.pow(2,1-l))*s>=2&&(a++,s/=2),a+l>=f?(u=0,a=f):a+l>=1?(u=(e*s-1)*Math.pow(2,o),a+=l):(u=e*Math.pow(2,l-1)*Math.pow(2,o),a=0));o>=8;t[r+p]=255&u,p+=d,u/=256,o-=8);for(a=a<<o|u,c+=o;c>0;t[r+p]=255&a,p+=d,a/=256,c-=8);t[r+p-d]|=128*y}var R={}.toString,T=Array.isArray||function(t){return"[object Array]"==R.call(t)};function S(){return x.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function j(t,e){if(S()<e)throw new RangeError("Invalid typed array length");return x.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=x.prototype:(null===t&&(t=new x(e)),t.length=e),t}function x(t,e,r){if(!(x.TYPED_ARRAY_SUPPORT||this instanceof x))return new x(t,e,r);if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return C(this,t)}return P(this,t,e,r)}function P(t,e,r,n){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?function(t,e,r,n){if(e.byteLength,r<0||e.byteLength<r)throw new RangeError("'offset' is out of bounds");if(e.byteLength<r+(n||0))throw new RangeError("'length' is out of bounds");e=void 0===r&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,r):new Uint8Array(e,r,n);x.TYPED_ARRAY_SUPPORT?(t=e).__proto__=x.prototype:t=N(t,e);return t}(t,e,r,n):"string"==typeof e?function(t,e,r){"string"==typeof r&&""!==r||(r="utf8");if(!x.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=0|D(e,r);t=j(t,n);var o=t.write(e,r);o!==n&&(t=t.slice(0,o));return t}(t,e,r):function(t,e){if(L(e)){var r=0|U(e.length);return 0===(t=j(t,r)).length||e.copy(t,0,0,r),t}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||(n=e.length)!=n?j(t,0):N(t,e);if("Buffer"===e.type&&T(e.data))return N(t,e.data)}var n;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}function I(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function C(t,e){if(I(e),t=j(t,e<0?0:0|U(e)),!x.TYPED_ARRAY_SUPPORT)for(var r=0;r<e;++r)t[r]=0;return t}function N(t,e){var r=e.length<0?0:0|U(e.length);t=j(t,r);for(var n=0;n<r;n+=1)t[n]=255&e[n];return t}function U(t){if(t>=S())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+S().toString(16)+" bytes");return 0|t}function L(t){return!(null==t||!t._isBuffer)}function D(t,e){if(L(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var r=t.length;if(0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return ct(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return ft(t).length;default:if(n)return ct(t).length;e=(""+e).toLowerCase(),n=!0}}function k(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return Q(this,e,r);case"utf8":case"utf-8":return $(this,e,r);case"ascii":return K(this,e,r);case"latin1":case"binary":return X(this,e,r);case"base64":return J(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Z(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function B(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function F(t,e,r,n,o){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=o?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(o)return-1;r=t.length-1}else if(r<0){if(!o)return-1;r=0}if("string"==typeof e&&(e=x.from(e,n)),L(e))return 0===e.length?-1:Y(t,e,r,n,o);if("number"==typeof e)return e&=255,x.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):Y(t,[e],r,n,o);throw new TypeError("val must be string, number or Buffer")}function Y(t,e,r,n,o){var i,a=1,u=t.length,s=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;a=2,u/=2,s/=2,r/=2}function c(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(o){var f=-1;for(i=r;i<u;i++)if(c(t,i)===c(e,-1===f?0:i-f)){if(-1===f&&(f=i),i-f+1===s)return f*a}else-1!==f&&(i-=i-f),f=-1}else for(r+s>u&&(r=u-s),i=r;i>=0;i--){for(var l=!0,h=0;h<s;h++)if(c(t,i+h)!==c(e,h)){l=!1;break}if(l)return i}return-1}function M(t,e,r,n){r=Number(r)||0;var o=t.length-r;n?(n=Number(n))>o&&(n=o):n=o;var i=e.length;if(i%2!=0)throw new TypeError("Invalid hex string");n>i/2&&(n=i/2);for(var a=0;a<n;++a){var u=parseInt(e.substr(2*a,2),16);if(isNaN(u))return a;t[r+a]=u}return a}function q(t,e,r,n){return lt(ct(e,t.length-r),t,r,n)}function z(t,e,r,n){return lt(function(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,n)}function G(t,e,r,n){return z(t,e,r,n)}function H(t,e,r,n){return lt(ft(e),t,r,n)}function V(t,e,r,n){return lt(function(t,e){for(var r,n,o,i=[],a=0;a<t.length&&!((e-=2)<0);++a)n=(r=t.charCodeAt(a))>>8,o=r%256,i.push(o),i.push(n);return i}(e,t.length-r),t,r,n)}function J(t,e,r){return 0===e&&r===t.length?_(t):_(t.slice(e,r))}function $(t,e,r){r=Math.min(t.length,r);for(var n=[],o=e;o<r;){var i,a,u,s,c=t[o],f=null,l=c>239?4:c>223?3:c>191?2:1;if(o+l<=r)switch(l){case 1:c<128&&(f=c);break;case 2:128==(192&(i=t[o+1]))&&(s=(31&c)<<6|63&i)>127&&(f=s);break;case 3:i=t[o+1],a=t[o+2],128==(192&i)&&128==(192&a)&&(s=(15&c)<<12|(63&i)<<6|63&a)>2047&&(s<55296||s>57343)&&(f=s);break;case 4:i=t[o+1],a=t[o+2],u=t[o+3],128==(192&i)&&128==(192&a)&&128==(192&u)&&(s=(15&c)<<18|(63&i)<<12|(63&a)<<6|63&u)>65535&&s<1114112&&(f=s)}null===f?(f=65533,l=1):f>65535&&(f-=65536,n.push(f>>>10&1023|55296),f=56320|1023&f),n.push(f),o+=l}return function(t){var e=t.length;if(e<=W)return String.fromCharCode.apply(String,t);var r="",n=0;for(;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=W));return r}(n)}x.TYPED_ARRAY_SUPPORT=void 0===y.TYPED_ARRAY_SUPPORT||y.TYPED_ARRAY_SUPPORT,S(),x.poolSize=8192,x._augment=function(t){return t.__proto__=x.prototype,t},x.from=function(t,e,r){return P(null,t,e,r)},x.TYPED_ARRAY_SUPPORT&&(x.prototype.__proto__=Uint8Array.prototype,x.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&x[Symbol.species]),x.alloc=function(t,e,r){return function(t,e,r,n){return I(e),e<=0?j(t,e):void 0!==r?"string"==typeof n?j(t,e).fill(r,n):j(t,e).fill(r):j(t,e)}(null,t,e,r)},x.allocUnsafe=function(t){return C(null,t)},x.allocUnsafeSlow=function(t){return C(null,t)},x.isBuffer=ht,x.compare=function(t,e){if(!L(t)||!L(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var r=t.length,n=e.length,o=0,i=Math.min(r,n);o<i;++o)if(t[o]!==e[o]){r=t[o],n=e[o];break}return r<n?-1:n<r?1:0},x.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},x.concat=function(t,e){if(!T(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return x.alloc(0);var r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;var n=x.allocUnsafe(e),o=0;for(r=0;r<t.length;++r){var i=t[r];if(!L(i))throw new TypeError('"list" argument must be an Array of Buffers');i.copy(n,o),o+=i.length}return n},x.byteLength=D,x.prototype._isBuffer=!0,x.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)B(this,e,e+1);return this},x.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)B(this,e,e+3),B(this,e+1,e+2);return this},x.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)B(this,e,e+7),B(this,e+1,e+6),B(this,e+2,e+5),B(this,e+3,e+4);return this},x.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?$(this,0,t):k.apply(this,arguments)},x.prototype.equals=function(t){if(!L(t))throw new TypeError("Argument must be a Buffer");return this===t||0===x.compare(this,t)},x.prototype.inspect=function(){var t="";return this.length>0&&(t=this.toString("hex",0,50).match(/.{2}/g).join(" "),this.length>50&&(t+=" ... ")),"<Buffer "+t+">"},x.prototype.compare=function(t,e,r,n,o){if(!L(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),e<0||r>t.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&e>=r)return 0;if(n>=o)return-1;if(e>=r)return 1;if(this===t)return 0;for(var i=(o>>>=0)-(n>>>=0),a=(r>>>=0)-(e>>>=0),u=Math.min(i,a),s=this.slice(n,o),c=t.slice(e,r),f=0;f<u;++f)if(s[f]!==c[f]){i=s[f],a=c[f];break}return i<a?-1:a<i?1:0},x.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},x.prototype.indexOf=function(t,e,r){return F(this,t,e,r,!0)},x.prototype.lastIndexOf=function(t,e,r){return F(this,t,e,r,!1)},x.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(r)?(r|=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var o=this.length-e;if((void 0===r||r>o)&&(r=o),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var i=!1;;)switch(n){case"hex":return M(this,t,e,r);case"utf8":case"utf-8":return q(this,t,e,r);case"ascii":return z(this,t,e,r);case"latin1":case"binary":return G(this,t,e,r);case"base64":return H(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return V(this,t,e,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},x.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var W=4096;function K(t,e,r){var n="";r=Math.min(t.length,r);for(var o=e;o<r;++o)n+=String.fromCharCode(127&t[o]);return n}function X(t,e,r){var n="";r=Math.min(t.length,r);for(var o=e;o<r;++o)n+=String.fromCharCode(t[o]);return n}function Q(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);for(var o="",i=e;i<r;++i)o+=st(t[i]);return o}function Z(t,e,r){for(var n=t.slice(e,r),o="",i=0;i<n.length;i+=2)o+=String.fromCharCode(n[i]+256*n[i+1]);return o}function tt(t,e,r){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function et(t,e,r,n,o,i){if(!L(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>o||e<i)throw new RangeError('"value" argument is out of bounds');if(r+n>t.length)throw new RangeError("Index out of range")}function rt(t,e,r,n){e<0&&(e=65535+e+1);for(var o=0,i=Math.min(t.length-r,2);o<i;++o)t[r+o]=(e&255<<8*(n?o:1-o))>>>8*(n?o:1-o)}function nt(t,e,r,n){e<0&&(e=4294967295+e+1);for(var o=0,i=Math.min(t.length-r,4);o<i;++o)t[r+o]=e>>>8*(n?o:3-o)&255}function ot(t,e,r,n,o,i){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function it(t,e,r,n,o){return o||ot(t,0,r,4),A(t,e,r,n,23,4),r+4}function at(t,e,r,n,o){return o||ot(t,0,r,8),A(t,e,r,n,52,8),r+8}x.prototype.slice=function(t,e){var r,n=this.length;if((t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(e=void 0===e?n:~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),e<t&&(e=t),x.TYPED_ARRAY_SUPPORT)(r=this.subarray(t,e)).__proto__=x.prototype;else{var o=e-t;r=new x(o,void 0);for(var i=0;i<o;++i)r[i]=this[i+t]}return r},x.prototype.readUIntLE=function(t,e,r){t|=0,e|=0,r||tt(t,e,this.length);for(var n=this[t],o=1,i=0;++i<e&&(o*=256);)n+=this[t+i]*o;return n},x.prototype.readUIntBE=function(t,e,r){t|=0,e|=0,r||tt(t,e,this.length);for(var n=this[t+--e],o=1;e>0&&(o*=256);)n+=this[t+--e]*o;return n},x.prototype.readUInt8=function(t,e){return e||tt(t,1,this.length),this[t]},x.prototype.readUInt16LE=function(t,e){return e||tt(t,2,this.length),this[t]|this[t+1]<<8},x.prototype.readUInt16BE=function(t,e){return e||tt(t,2,this.length),this[t]<<8|this[t+1]},x.prototype.readUInt32LE=function(t,e){return e||tt(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},x.prototype.readUInt32BE=function(t,e){return e||tt(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},x.prototype.readIntLE=function(t,e,r){t|=0,e|=0,r||tt(t,e,this.length);for(var n=this[t],o=1,i=0;++i<e&&(o*=256);)n+=this[t+i]*o;return n>=(o*=128)&&(n-=Math.pow(2,8*e)),n},x.prototype.readIntBE=function(t,e,r){t|=0,e|=0,r||tt(t,e,this.length);for(var n=e,o=1,i=this[t+--n];n>0&&(o*=256);)i+=this[t+--n]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*e)),i},x.prototype.readInt8=function(t,e){return e||tt(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},x.prototype.readInt16LE=function(t,e){e||tt(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},x.prototype.readInt16BE=function(t,e){e||tt(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},x.prototype.readInt32LE=function(t,e){return e||tt(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},x.prototype.readInt32BE=function(t,e){return e||tt(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},x.prototype.readFloatLE=function(t,e){return e||tt(t,4,this.length),O(this,t,!0,23,4)},x.prototype.readFloatBE=function(t,e){return e||tt(t,4,this.length),O(this,t,!1,23,4)},x.prototype.readDoubleLE=function(t,e){return e||tt(t,8,this.length),O(this,t,!0,52,8)},x.prototype.readDoubleBE=function(t,e){return e||tt(t,8,this.length),O(this,t,!1,52,8)},x.prototype.writeUIntLE=function(t,e,r,n){(t=+t,e|=0,r|=0,n)||et(this,t,e,r,Math.pow(2,8*r)-1,0);var o=1,i=0;for(this[e]=255&t;++i<r&&(o*=256);)this[e+i]=t/o&255;return e+r},x.prototype.writeUIntBE=function(t,e,r,n){(t=+t,e|=0,r|=0,n)||et(this,t,e,r,Math.pow(2,8*r)-1,0);var o=r-1,i=1;for(this[e+o]=255&t;--o>=0&&(i*=256);)this[e+o]=t/i&255;return e+r},x.prototype.writeUInt8=function(t,e,r){return t=+t,e|=0,r||et(this,t,e,1,255,0),x.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},x.prototype.writeUInt16LE=function(t,e,r){return t=+t,e|=0,r||et(this,t,e,2,65535,0),x.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):rt(this,t,e,!0),e+2},x.prototype.writeUInt16BE=function(t,e,r){return t=+t,e|=0,r||et(this,t,e,2,65535,0),x.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):rt(this,t,e,!1),e+2},x.prototype.writeUInt32LE=function(t,e,r){return t=+t,e|=0,r||et(this,t,e,4,4294967295,0),x.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):nt(this,t,e,!0),e+4},x.prototype.writeUInt32BE=function(t,e,r){return t=+t,e|=0,r||et(this,t,e,4,4294967295,0),x.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):nt(this,t,e,!1),e+4},x.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e|=0,!n){var o=Math.pow(2,8*r-1);et(this,t,e,r,o-1,-o)}var i=0,a=1,u=0;for(this[e]=255&t;++i<r&&(a*=256);)t<0&&0===u&&0!==this[e+i-1]&&(u=1),this[e+i]=(t/a>>0)-u&255;return e+r},x.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e|=0,!n){var o=Math.pow(2,8*r-1);et(this,t,e,r,o-1,-o)}var i=r-1,a=1,u=0;for(this[e+i]=255&t;--i>=0&&(a*=256);)t<0&&0===u&&0!==this[e+i+1]&&(u=1),this[e+i]=(t/a>>0)-u&255;return e+r},x.prototype.writeInt8=function(t,e,r){return t=+t,e|=0,r||et(this,t,e,1,127,-128),x.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},x.prototype.writeInt16LE=function(t,e,r){return t=+t,e|=0,r||et(this,t,e,2,32767,-32768),x.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):rt(this,t,e,!0),e+2},x.prototype.writeInt16BE=function(t,e,r){return t=+t,e|=0,r||et(this,t,e,2,32767,-32768),x.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):rt(this,t,e,!1),e+2},x.prototype.writeInt32LE=function(t,e,r){return t=+t,e|=0,r||et(this,t,e,4,2147483647,-2147483648),x.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):nt(this,t,e,!0),e+4},x.prototype.writeInt32BE=function(t,e,r){return t=+t,e|=0,r||et(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),x.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):nt(this,t,e,!1),e+4},x.prototype.writeFloatLE=function(t,e,r){return it(this,t,e,!0,r)},x.prototype.writeFloatBE=function(t,e,r){return it(this,t,e,!1,r)},x.prototype.writeDoubleLE=function(t,e,r){return at(this,t,e,!0,r)},x.prototype.writeDoubleBE=function(t,e,r){return at(this,t,e,!1,r)},x.prototype.copy=function(t,e,r,n){if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-r&&(n=t.length-e+r);var o,i=n-r;if(this===t&&r<e&&e<n)for(o=i-1;o>=0;--o)t[o+e]=this[o+r];else if(i<1e3||!x.TYPED_ARRAY_SUPPORT)for(o=0;o<i;++o)t[o+e]=this[o+r];else Uint8Array.prototype.set.call(t,this.subarray(r,r+i),e);return i},x.prototype.fill=function(t,e,r,n){if("string"==typeof t){if("string"==typeof e?(n=e,e=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),1===t.length){var o=t.charCodeAt(0);o<256&&(t=o)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!x.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;var i;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(i=e;i<r;++i)this[i]=t;else{var a=L(t)?t:ct(new x(t,n).toString()),u=a.length;for(i=0;i<r-e;++i)this[i+e]=a[i%u]}return this};var ut=/[^+\/0-9A-Za-z-_]/g;function st(t){return t<16?"0"+t.toString(16):t.toString(16)}function ct(t,e){var r;e=e||1/0;for(var n=t.length,o=null,i=[],a=0;a<n;++a){if((r=t.charCodeAt(a))>55295&&r<57344){if(!o){if(r>56319){(e-=3)>-1&&i.push(239,191,189);continue}if(a+1===n){(e-=3)>-1&&i.push(239,191,189);continue}o=r;continue}if(r<56320){(e-=3)>-1&&i.push(239,191,189),o=r;continue}r=65536+(o-55296<<10|r-56320)}else o&&(e-=3)>-1&&i.push(239,191,189);if(o=null,r<128){if((e-=1)<0)break;i.push(r)}else if(r<2048){if((e-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function ft(t){return function(t){var e,r,n,o,i,a;b||w();var u=t.length;if(u%4>0)throw new Error("Invalid string. Length must be a multiple of 4");i="="===t[u-2]?2:"="===t[u-1]?1:0,a=new m(3*u/4-i),n=i>0?u-4:u;var s=0;for(e=0,r=0;e<n;e+=4,r+=3)o=v[t.charCodeAt(e)]<<18|v[t.charCodeAt(e+1)]<<12|v[t.charCodeAt(e+2)]<<6|v[t.charCodeAt(e+3)],a[s++]=o>>16&255,a[s++]=o>>8&255,a[s++]=255&o;return 2===i?(o=v[t.charCodeAt(e)]<<2|v[t.charCodeAt(e+1)]>>4,a[s++]=255&o):1===i&&(o=v[t.charCodeAt(e)]<<10|v[t.charCodeAt(e+1)]<<4|v[t.charCodeAt(e+2)]>>2,a[s++]=o>>8&255,a[s++]=255&o),a}(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(ut,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function lt(t,e,r,n){for(var o=0;o<n&&!(o+r>=e.length||o>=t.length);++o)e[o+r]=t[o];return o}function ht(t){return null!=t&&(!!t._isBuffer||pt(t)||function(t){return"function"==typeof t.readFloatLE&&"function"==typeof t.slice&&pt(t.slice(0,0))}(t))}function pt(t){return!!t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}var dt="function"==typeof Object.create?function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:function(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t};function yt(t,e){var r={seen:[],stylize:vt};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),Et(e)?r.showHidden=e:e&&function(t,e){if(!e||!Tt(e))return t;var r=Object.keys(e),n=r.length;for(;n--;)t[r[n]]=e[r[n]]}(r,e),At(r.showHidden)&&(r.showHidden=!1),At(r.depth)&&(r.depth=2),At(r.colors)&&(r.colors=!1),At(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=gt),mt(r,t,r.depth)}function gt(t,e){var r=yt.styles[e];return r?"["+yt.colors[r][0]+"m"+t+"["+yt.colors[r][1]+"m":t}function vt(t,e){return t}function mt(t,e,r){if(t.customInspect&&e&&xt(e.inspect)&&e.inspect!==yt&&(!e.constructor||e.constructor.prototype!==e)){var n=e.inspect(r,t);return Ot(n)||(n=mt(t,n,r)),n}var o=function(t,e){if(At(e))return t.stylize("undefined","undefined");if(Ot(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}if(n=e,"number"==typeof n)return t.stylize(""+e,"number");var n;if(Et(e))return t.stylize(""+e,"boolean");if(_t(e))return t.stylize("null","null")}(t,e);if(o)return o;var i=Object.keys(e),a=function(t){var e={};return t.forEach((function(t,r){e[t]=!0})),e}(i);if(t.showHidden&&(i=Object.getOwnPropertyNames(e)),jt(e)&&(i.indexOf("message")>=0||i.indexOf("description")>=0))return bt(e);if(0===i.length){if(xt(e)){var u=e.name?": "+e.name:"";return t.stylize("[Function"+u+"]","special")}if(Rt(e))return t.stylize(RegExp.prototype.toString.call(e),"regexp");if(St(e))return t.stylize(Date.prototype.toString.call(e),"date");if(jt(e))return bt(e)}var s,c,f="",l=!1,h=["{","}"];(s=e,Array.isArray(s)&&(l=!0,h=["[","]"]),xt(e))&&(f=" [Function"+(e.name?": "+e.name:"")+"]");return Rt(e)&&(f=" "+RegExp.prototype.toString.call(e)),St(e)&&(f=" "+Date.prototype.toUTCString.call(e)),jt(e)&&(f=" "+bt(e)),0!==i.length||l&&0!=e.length?r<0?Rt(e)?t.stylize(RegExp.prototype.toString.call(e),"regexp"):t.stylize("[Object]","special"):(t.seen.push(e),c=l?function(t,e,r,n,o){for(var i=[],a=0,u=e.length;a<u;++a)Ct(e,String(a))?i.push(wt(t,e,r,n,String(a),!0)):i.push("");return o.forEach((function(o){o.match(/^\d+$/)||i.push(wt(t,e,r,n,o,!0))})),i}(t,e,r,a,i):i.map((function(n){return wt(t,e,r,a,n,l)})),t.seen.pop(),function(t,e,r){var n=t.reduce((function(t,e){return e.indexOf("\n"),t+e.replace(/\u001b\[\d\d?m/g,"").length+1}),0);if(n>60)return r[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+r[1];return r[0]+e+" "+t.join(", ")+" "+r[1]}(c,f,h)):h[0]+f+h[1]}function bt(t){return"["+Error.prototype.toString.call(t)+"]"}function wt(t,e,r,n,o,i){var a,u,s;if((s=Object.getOwnPropertyDescriptor(e,o)||{value:e[o]}).get?u=s.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):s.set&&(u=t.stylize("[Setter]","special")),Ct(n,o)||(a="["+o+"]"),u||(t.seen.indexOf(s.value)<0?(u=_t(r)?mt(t,s.value,null):mt(t,s.value,r-1)).indexOf("\n")>-1&&(u=i?u.split("\n").map((function(t){return" "+t})).join("\n").substr(2):"\n"+u.split("\n").map((function(t){return" "+t})).join("\n")):u=t.stylize("[Circular]","special")),At(a)){if(i&&o.match(/^\d+$/))return u;(a=JSON.stringify(""+o)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=t.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=t.stylize(a,"string"))}return a+": "+u}function Et(t){return"boolean"==typeof t}function _t(t){return null===t}function Ot(t){return"string"==typeof t}function At(t){return void 0===t}function Rt(t){return Tt(t)&&"[object RegExp]"===It(t)}function Tt(t){return"object"==typeof t&&null!==t}function St(t){return Tt(t)&&"[object Date]"===It(t)}function jt(t){return Tt(t)&&("[object Error]"===It(t)||t instanceof Error)}function xt(t){return"function"==typeof t}function Pt(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t}function It(t){return Object.prototype.toString.call(t)}function Ct(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function Nt(t,e){if(t===e)return 0;for(var r=t.length,n=e.length,o=0,i=Math.min(r,n);o<i;++o)if(t[o]!==e[o]){r=t[o],n=e[o];break}return r<n?-1:n<r?1:0}yt.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},yt.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};var Ut,Lt=Object.prototype.hasOwnProperty,Dt=Object.keys||function(t){var e=[];for(var r in t)Lt.call(t,r)&&e.push(r);return e},kt=Array.prototype.slice;function Bt(){return void 0!==Ut?Ut:Ut="foo"===function(){}.name}function Ft(t){return Object.prototype.toString.call(t)}function Yt(t){return!ht(t)&&("function"==typeof y.ArrayBuffer&&("function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):!!t&&(t instanceof DataView||!!(t.buffer&&t.buffer instanceof ArrayBuffer))))}function Mt(t,e){t||Jt(t,!0,e,"==",$t)}var qt=/\s*function\s+([^\(\s]*)\s*/;function zt(t){if(xt(t)){if(Bt())return t.name;var e=t.toString().match(qt);return e&&e[1]}}function Gt(t){this.name="AssertionError",this.actual=t.actual,this.expected=t.expected,this.operator=t.operator,t.message?(this.message=t.message,this.generatedMessage=!1):(this.message=function(t){return Ht(Vt(t.actual),128)+" "+t.operator+" "+Ht(Vt(t.expected),128)}(this),this.generatedMessage=!0);var e=t.stackStartFunction||Jt;if(Error.captureStackTrace)Error.captureStackTrace(this,e);else{var r=new Error;if(r.stack){var n=r.stack,o=zt(e),i=n.indexOf("\n"+o);if(i>=0){var a=n.indexOf("\n",i+1);n=n.substring(a+1)}this.stack=n}}}function Ht(t,e){return"string"==typeof t?t.length<e?t:t.slice(0,e):t}function Vt(t){if(Bt()||!xt(t))return yt(t);var e=zt(t);return"[Function"+(e?": "+e:"")+"]"}function Jt(t,e,r,n,o){throw new Gt({message:r,actual:t,expected:e,operator:n,stackStartFunction:o})}function $t(t,e){t||Jt(t,!0,e,"==",$t)}function Wt(t,e,r,n){if(t===e)return!0;if(ht(t)&&ht(e))return 0===Nt(t,e);if(St(t)&&St(e))return t.getTime()===e.getTime();if(Rt(t)&&Rt(e))return t.source===e.source&&t.global===e.global&&t.multiline===e.multiline&&t.lastIndex===e.lastIndex&&t.ignoreCase===e.ignoreCase;if(null!==t&&"object"==typeof t||null!==e&&"object"==typeof e){if(Yt(t)&&Yt(e)&&Ft(t)===Ft(e)&&!(t instanceof Float32Array||t instanceof Float64Array))return 0===Nt(new Uint8Array(t.buffer),new Uint8Array(e.buffer));if(ht(t)!==ht(e))return!1;var o=(n=n||{actual:[],expected:[]}).actual.indexOf(t);return-1!==o&&o===n.expected.indexOf(e)||(n.actual.push(t),n.expected.push(e),function(t,e,r,n){if(null==t||null==e)return!1;if(Pt(t)||Pt(e))return t===e;if(r&&Object.getPrototypeOf(t)!==Object.getPrototypeOf(e))return!1;var o=Kt(t),i=Kt(e);if(o&&!i||!o&&i)return!1;if(o)return Wt(t=kt.call(t),e=kt.call(e),r);var a,u,s=Dt(t),c=Dt(e);if(s.length!==c.length)return!1;for(s.sort(),c.sort(),u=s.length-1;u>=0;u--)if(s[u]!==c[u])return!1;for(u=s.length-1;u>=0;u--)if(!Wt(t[a=s[u]],e[a],r,n))return!1;return!0}(t,e,r,n))}return r?t===e:t==e}function Kt(t){return"[object Arguments]"==Object.prototype.toString.call(t)}function Xt(t,e){if(!t||!e)return!1;if("[object RegExp]"==Object.prototype.toString.call(e))return e.test(t);try{if(t instanceof e)return!0}catch(t){}return!Error.isPrototypeOf(e)&&!0===e.call({},t)}function Qt(t,e,r,n){var o;if("function"!=typeof e)throw new TypeError('"block" argument must be a function');"string"==typeof r&&(n=r,r=null),o=function(t){var e;try{t()}catch(t){e=t}return e}(e),n=(r&&r.name?" ("+r.name+").":".")+(n?" "+n:"."),t&&!o&&Jt(o,r,"Missing expected exception"+n);var i="string"==typeof n,a=!t&&o&&!r;if((!t&&jt(o)&&i&&Xt(o,r)||a)&&Jt(o,r,"Got unwanted exception"+n),t&&o&&r&&!Xt(o,r)||!t&&o)throw o}Mt.AssertionError=Gt,dt(Gt,Error),Mt.fail=Jt,Mt.ok=$t,Mt.equal=function t(e,r,n){e!=r&&Jt(e,r,n,"==",t)},Mt.notEqual=function t(e,r,n){e==r&&Jt(e,r,n,"!=",t)},Mt.deepEqual=function t(e,r,n){Wt(e,r,!1)||Jt(e,r,n,"deepEqual",t)},Mt.deepStrictEqual=function t(e,r,n){Wt(e,r,!0)||Jt(e,r,n,"deepStrictEqual",t)},Mt.notDeepEqual=function t(e,r,n){Wt(e,r,!1)&&Jt(e,r,n,"notDeepEqual",t)},Mt.notDeepStrictEqual=function t(e,r,n){Wt(e,r,!0)&&Jt(e,r,n,"notDeepStrictEqual",t)},Mt.strictEqual=function t(e,r,n){e!==r&&Jt(e,r,n,"===",t)},Mt.notStrictEqual=function t(e,r,n){e===r&&Jt(e,r,n,"!==",t)},Mt.throws=function(t,e,r){Qt(!0,t,e,r)},Mt.doesNotThrow=function(t,e,r){Qt(!1,t,e,r)},Mt.ifError=function(t){if(t)throw t};var Zt=32768;function te(t,e){switch(re(t),Mt(e=e||t.type,"You must pass an event type."),e){case"track":return function(t){Mt(t.anonymousId||t.userId,'You must pass either an "anonymousId" or a "userId".'),Mt(t.event,'You must pass an "event".')}(t);case"group":return function(t){Mt(t.anonymousId||t.userId,'You must pass either an "anonymousId" or a "userId".'),Mt(t.groupId,'You must pass a "groupId".')}(t);case"identify":case"page":case"screen":return function(t){Mt(t.anonymousId||t.userId,'You must pass either an "anonymousId" or a "userId".')}(t);case"alias":return function(t){Mt(t.userId,'You must pass a "userId".'),Mt(t.previousId,'You must pass a "previousId".')}(t);default:Mt(0,'Invalid event type: "'+e+'"')}}var ee={anonymousId:["string","number"],category:"string",context:"object",event:"string",groupId:["string","number"],integrations:"object",name:"string",previousId:["string","number"],timestamp:"date",userId:["string","number"],type:"string"};function re(t){Mt("object"===p(t),"You must pass a message object.");var e=JSON.stringify(t);for(var r in Mt(Buffer.byteLength(e,"utf8")<Zt,"Your message must be < 32kb."),ee){var n=t[r];if(n){var o=ee[r];"array"!==p(o)&&(o=[o]);var i="object"===o[0]?"an":"a";Mt(o.some((function(t){return p(n)===t})),'"'+r+'" must be '+i+" "+d(o,"or")+".")}}}var ne,oe={exports:{}},ie=function(t,e){return function(){for(var r=new Array(arguments.length),n=0;n<r.length;n++)r[n]=arguments[n];return t.apply(e,r)}},ae=ie,ue=Object.prototype.toString,se=(ne=Object.create(null),function(t){var e=ue.call(t);return ne[e]||(ne[e]=e.slice(8,-1).toLowerCase())});function ce(t){return t=t.toLowerCase(),function(e){return se(e)===t}}function fe(t){return Array.isArray(t)}function le(t){return void 0===t}var he=ce("ArrayBuffer");function pe(t){return null!==t&&"object"===n(t)}function de(t){if("object"!==se(t))return!1;var e=Object.getPrototypeOf(t);return null===e||e===Object.prototype}var ye=ce("Date"),ge=ce("File"),ve=ce("Blob"),me=ce("FileList");function be(t){return"[object Function]"===ue.call(t)}var we=ce("URLSearchParams");function Ee(t,e){if(null!=t)if("object"!==n(t)&&(t=[t]),fe(t))for(var r=0,o=t.length;r<o;r++)e.call(null,t[r],r,t);else for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.call(null,t[i],i,t)}var _e,Oe=(_e="undefined"!=typeof Uint8Array&&Object.getPrototypeOf(Uint8Array),function(t){return _e&&t instanceof _e}),Ae={isArray:fe,isArrayBuffer:he,isBuffer:function(t){return null!==t&&!le(t)&&null!==t.constructor&&!le(t.constructor)&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)},isFormData:function(t){var e="[object FormData]";return t&&("function"==typeof FormData&&t instanceof FormData||ue.call(t)===e||be(t.toString)&&t.toString()===e)},isArrayBufferView:function(t){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&he(t.buffer)},isString:function(t){return"string"==typeof t},isNumber:function(t){return"number"==typeof t},isObject:pe,isPlainObject:de,isUndefined:le,isDate:ye,isFile:ge,isBlob:ve,isFunction:be,isStream:function(t){return pe(t)&&be(t.pipe)},isURLSearchParams:we,isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:Ee,merge:function t(){var e={};function r(r,n){de(e[n])&&de(r)?e[n]=t(e[n],r):de(r)?e[n]=t({},r):fe(r)?e[n]=r.slice():e[n]=r}for(var n=0,o=arguments.length;n<o;n++)Ee(arguments[n],r);return e},extend:function(t,e,r){return Ee(e,(function(e,n){t[n]=r&&"function"==typeof e?ae(e,r):e})),t},trim:function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")},stripBOM:function(t){return 65279===t.charCodeAt(0)&&(t=t.slice(1)),t},inherits:function(t,e,r,n){t.prototype=Object.create(e.prototype,n),t.prototype.constructor=t,r&&s(t.prototype,r)},toFlatObject:function(t,e,r){var n,o,i,a={};e=e||{};do{for(o=(n=Object.getOwnPropertyNames(t)).length;o-- >0;)a[i=n[o]]||(e[i]=t[i],a[i]=!0);t=Object.getPrototypeOf(t)}while(t&&(!r||r(t,e))&&t!==Object.prototype);return e},kindOf:se,kindOfTest:ce,endsWith:function(t,e,r){t=String(t),(void 0===r||r>t.length)&&(r=t.length),r-=e.length;var n=t.indexOf(e,r);return-1!==n&&n===r},toArray:function(t){if(!t)return null;var e=t.length;if(le(e))return null;for(var r=new Array(e);e-- >0;)r[e]=t[e];return r},isTypedArray:Oe,isFileList:me},Re=Ae;function Te(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var Se=function(t,e,r){if(!e)return t;var n;if(r)n=r(e);else if(Re.isURLSearchParams(e))n=e.toString();else{var o=[];Re.forEach(e,(function(t,e){null!=t&&(Re.isArray(t)?e+="[]":t=[t],Re.forEach(t,(function(t){Re.isDate(t)?t=t.toISOString():Re.isObject(t)&&(t=JSON.stringify(t)),o.push(Te(e)+"="+Te(t))})))})),n=o.join("&")}if(n){var i=t.indexOf("#");-1!==i&&(t=t.slice(0,i)),t+=(-1===t.indexOf("?")?"?":"&")+n}return t},je=l(Se),xe=Ae;function Pe(){this.handlers=[]}Pe.prototype.use=function(t,e,r){return this.handlers.push({fulfilled:t,rejected:e,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1},Pe.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)},Pe.prototype.forEach=function(t){xe.forEach(this.handlers,(function(e){null!==e&&t(e)}))};var Ie,Ce,Ne=Pe,Ue=Ae;function Le(){if(Ce)return Ie;Ce=1;var t=Ae;function e(t,e,r,n,o){Error.call(this),this.message=t,this.name="AxiosError",e&&(this.code=e),r&&(this.config=r),n&&(this.request=n),o&&(this.response=o)}t.inherits(e,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var r=e.prototype,n={};return["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED"].forEach((function(t){n[t]={value:t}})),Object.defineProperties(e,n),Object.defineProperty(r,"isAxiosError",{value:!0}),e.from=function(n,o,i,a,u,c){var f=Object.create(r);return t.toFlatObject(n,f,(function(t){return t!==Error.prototype})),e.call(f,n.message,o,i,a,u),f.name=n.name,c&&s(f,c),f},Ie=e}var De,ke,Be={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1};function Fe(){if(ke)return De;ke=1;var t=Ae;return De=function(e,r){r=r||new FormData;var o=[];function i(e){return null===e?"":t.isDate(e)?e.toISOString():t.isArrayBuffer(e)||t.isTypedArray(e)?"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}return function e(a,u){if(t.isPlainObject(a)||t.isArray(a)){if(-1!==o.indexOf(a))throw Error("Circular reference detected in "+u);o.push(a),t.forEach(a,(function(o,a){if(!t.isUndefined(o)){var s,c=u?u+"."+a:a;if(o&&!u&&"object"===n(o))if(t.endsWith(a,"{}"))o=JSON.stringify(o);else if(t.endsWith(a,"[]")&&(s=t.toArray(o)))return void s.forEach((function(e){!t.isUndefined(e)&&r.append(c,i(e))}));e(o,c)}})),o.pop()}else r.append(u,i(a))}(e),r},De}var Ye,Me,qe=Le(),ze=function(t,e,r){var n=r.config.validateStatus;r.status&&n&&!n(r.status)?e(new qe("Request failed with status code "+r.status,[qe.ERR_BAD_REQUEST,qe.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):t(r)},Ge=l(ze);function He(){if(Me)return Ye;Me=1;var t=Ae;return Ye=t.isStandardBrowserEnv()?{write:function(e,r,n,o,i,a){var u=[];u.push(e+"="+encodeURIComponent(r)),t.isNumber(n)&&u.push("expires="+new Date(n).toGMTString()),t.isString(o)&&u.push("path="+o),t.isString(i)&&u.push("domain="+i),!0===a&&u.push("secure"),document.cookie=u.join("; ")},read:function(t){var e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}}var Ve,Je,$e,We,Ke,Xe,Qe,Ze,tr,er,rr,nr,or=function(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)},ir=function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t},ar=function(t,e){return t&&!or(e)?ir(t,e):e},ur=l(ar);function sr(){if(Je)return Ve;Je=1;var t=Ae,e=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];return Ve=function(r){var n,o,i,a={};return r?(t.forEach(r.split("\n"),(function(r){if(i=r.indexOf(":"),n=t.trim(r.substr(0,i)).toLowerCase(),o=t.trim(r.substr(i+1)),n){if(a[n]&&e.indexOf(n)>=0)return;a[n]="set-cookie"===n?(a[n]?a[n]:[]).concat([o]):a[n]?a[n]+", "+o:o}})),a):a}}function cr(){if(We)return $e;We=1;var t=Ae;return $e=t.isStandardBrowserEnv()?function(){var e,r=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function o(t){var e=t;return r&&(n.setAttribute("href",e),e=n.href),n.setAttribute("href",e),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=o(window.location.href),function(r){var n=t.isString(r)?o(r):r;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0}}function fr(){if(Xe)return Ke;Xe=1;var t=Le();function e(e){t.call(this,null==e?"canceled":e,t.ERR_CANCELED),this.name="CanceledError"}return Ae.inherits(e,t,{__CANCEL__:!0}),Ke=e}function lr(){return Ze?Qe:(Ze=1,Qe=function(t){var e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""})}function hr(){if(er)return tr;er=1;var t=Ae,e=ze,r=He(),n=Se,o=ar,i=sr(),a=cr(),u=Be,s=Le(),c=fr(),f=lr();return tr=function(l){return new Promise((function(h,p){var d,y=l.data,g=l.headers,v=l.responseType;function m(){l.cancelToken&&l.cancelToken.unsubscribe(d),l.signal&&l.signal.removeEventListener("abort",d)}t.isFormData(y)&&t.isStandardBrowserEnv()&&delete g["Content-Type"];var b=new XMLHttpRequest;if(l.auth){var w=l.auth.username||"",E=l.auth.password?unescape(encodeURIComponent(l.auth.password)):"";g.Authorization="Basic "+btoa(w+":"+E)}var _=o(l.baseURL,l.url);function O(){if(b){var t="getAllResponseHeaders"in b?i(b.getAllResponseHeaders()):null,r={data:v&&"text"!==v&&"json"!==v?b.response:b.responseText,status:b.status,statusText:b.statusText,headers:t,config:l,request:b};e((function(t){h(t),m()}),(function(t){p(t),m()}),r),b=null}}if(b.open(l.method.toUpperCase(),n(_,l.params,l.paramsSerializer),!0),b.timeout=l.timeout,"onloadend"in b?b.onloadend=O:b.onreadystatechange=function(){b&&4===b.readyState&&(0!==b.status||b.responseURL&&0===b.responseURL.indexOf("file:"))&&setTimeout(O)},b.onabort=function(){b&&(p(new s("Request aborted",s.ECONNABORTED,l,b)),b=null)},b.onerror=function(){p(new s("Network Error",s.ERR_NETWORK,l,b,b)),b=null},b.ontimeout=function(){var t=l.timeout?"timeout of "+l.timeout+"ms exceeded":"timeout exceeded",e=l.transitional||u;l.timeoutErrorMessage&&(t=l.timeoutErrorMessage),p(new s(t,e.clarifyTimeoutError?s.ETIMEDOUT:s.ECONNABORTED,l,b)),b=null},t.isStandardBrowserEnv()){var A=(l.withCredentials||a(_))&&l.xsrfCookieName?r.read(l.xsrfCookieName):void 0;A&&(g[l.xsrfHeaderName]=A)}"setRequestHeader"in b&&t.forEach(g,(function(t,e){void 0===y&&"content-type"===e.toLowerCase()?delete g[e]:b.setRequestHeader(e,t)})),t.isUndefined(l.withCredentials)||(b.withCredentials=!!l.withCredentials),v&&"json"!==v&&(b.responseType=l.responseType),"function"==typeof l.onDownloadProgress&&b.addEventListener("progress",l.onDownloadProgress),"function"==typeof l.onUploadProgress&&b.upload&&b.upload.addEventListener("progress",l.onUploadProgress),(l.cancelToken||l.signal)&&(d=function(t){b&&(p(!t||t&&t.type?new c:t),b.abort(),b=null)},l.cancelToken&&l.cancelToken.subscribe(d),l.signal&&(l.signal.aborted?d():l.signal.addEventListener("abort",d))),y||(y=null);var R=f(_);R&&-1===["http","https","file"].indexOf(R)?p(new s("Unsupported protocol "+R+":",s.ERR_BAD_REQUEST,l)):b.send(y)}))},tr}var pr=Ae,dr=function(t,e){Ue.forEach(t,(function(r,n){n!==e&&n.toUpperCase()===e.toUpperCase()&&(t[e]=r,delete t[n])}))},yr=Le(),gr=Be,vr=Fe(),mr={"Content-Type":"application/x-www-form-urlencoded"};function br(t,e){!pr.isUndefined(t)&&pr.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}var wr,Er={transitional:gr,adapter:(("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(wr=hr()),wr),transformRequest:[function(t,e){if(dr(e,"Accept"),dr(e,"Content-Type"),pr.isFormData(t)||pr.isArrayBuffer(t)||pr.isBuffer(t)||pr.isStream(t)||pr.isFile(t)||pr.isBlob(t))return t;if(pr.isArrayBufferView(t))return t.buffer;if(pr.isURLSearchParams(t))return br(e,"application/x-www-form-urlencoded;charset=utf-8"),t.toString();var r,n=pr.isObject(t),o=e&&e["Content-Type"];if((r=pr.isFileList(t))||n&&"multipart/form-data"===o){var i=this.env&&this.env.FormData;return vr(r?{"files[]":t}:t,i&&new i)}return n||"application/json"===o?(br(e,"application/json"),function(t,e,r){if(pr.isString(t))try{return(e||JSON.parse)(t),pr.trim(t)}catch(t){if("SyntaxError"!==t.name)throw t}return(r||JSON.stringify)(t)}(t)):t}],transformResponse:[function(t){var e=this.transitional||Er.transitional,r=e&&e.silentJSONParsing,n=e&&e.forcedJSONParsing,o=!r&&"json"===this.responseType;if(o||n&&pr.isString(t)&&t.length)try{return JSON.parse(t)}catch(t){if(o){if("SyntaxError"===t.name)throw yr.from(t,yr.ERR_BAD_RESPONSE,this,null,this.response);throw t}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:nr?rr:(nr=1,rr=null)},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};pr.forEach(["delete","get","head"],(function(t){Er.headers[t]={}})),pr.forEach(["post","put","patch"],(function(t){Er.headers[t]=pr.merge(mr)}));var _r,Or,Ar=Er,Rr=Ae,Tr=Ar;function Sr(){return Or?_r:(Or=1,_r=function(t){return!(!t||!t.__CANCEL__)})}var jr=Ae,xr=function(t,e,r){var n=this||Tr;return Rr.forEach(r,(function(r){t=r.call(n,t,e)})),t},Pr=Sr(),Ir=Ar,Cr=fr();function Nr(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Cr}var Ur,Lr,Dr=Ae,kr=function(t,e){e=e||{};var r={};function n(t,e){return Dr.isPlainObject(t)&&Dr.isPlainObject(e)?Dr.merge(t,e):Dr.isPlainObject(e)?Dr.merge({},e):Dr.isArray(e)?e.slice():e}function o(r){return Dr.isUndefined(e[r])?Dr.isUndefined(t[r])?void 0:n(void 0,t[r]):n(t[r],e[r])}function i(t){if(!Dr.isUndefined(e[t]))return n(void 0,e[t])}function a(r){return Dr.isUndefined(e[r])?Dr.isUndefined(t[r])?void 0:n(void 0,t[r]):n(void 0,e[r])}function u(r){return r in e?n(t[r],e[r]):r in t?n(void 0,t[r]):void 0}var s={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:u};return Dr.forEach(Object.keys(t).concat(Object.keys(e)),(function(t){var e=s[t]||o,n=e(t);Dr.isUndefined(n)&&e!==u||(r[t]=n)})),r};function Br(){return Lr?Ur:(Lr=1,Ur={version:"0.27.2"})}var Fr=Br().version,Yr=Le(),Mr={};["object","boolean","number","function","string","symbol"].forEach((function(t,e){Mr[t]=function(r){return n(r)===t||"a"+(e<1?"n ":" ")+t}}));var qr={};Mr.transitional=function(t,e,r){function n(t,e){return"[Axios v"+Fr+"] Transitional option '"+t+"'"+e+(r?". "+r:"")}return function(r,o,i){if(!1===t)throw new Yr(n(o," has been removed"+(e?" in "+e:"")),Yr.ERR_DEPRECATED);return e&&!qr[o]&&(qr[o]=!0,console.warn(n(o," has been deprecated since v"+e+" and will be removed in the near future"))),!t||t(r,o,i)}};var zr,Gr,Hr,Vr,Jr,$r,Wr={assertOptions:function(t,e,r){if("object"!==n(t))throw new Yr("options must be an object",Yr.ERR_BAD_OPTION_VALUE);for(var o=Object.keys(t),i=o.length;i-- >0;){var a=o[i],u=e[a];if(u){var s=t[a],c=void 0===s||u(s,a,t);if(!0!==c)throw new Yr("option "+a+" must be "+c,Yr.ERR_BAD_OPTION_VALUE)}else if(!0!==r)throw new Yr("Unknown option "+a,Yr.ERR_BAD_OPTION)}},validators:Mr},Kr=Ae,Xr=Se,Qr=Ne,Zr=function(t){return Nr(t),t.headers=t.headers||{},t.data=xr.call(t,t.data,t.headers,t.transformRequest),t.headers=jr.merge(t.headers.common||{},t.headers[t.method]||{},t.headers),jr.forEach(["delete","get","head","post","put","patch","common"],(function(e){delete t.headers[e]})),(t.adapter||Ir.adapter)(t).then((function(e){return Nr(t),e.data=xr.call(t,e.data,e.headers,t.transformResponse),e}),(function(e){return Pr(e)||(Nr(t),e&&e.response&&(e.response.data=xr.call(t,e.response.data,e.response.headers,t.transformResponse))),Promise.reject(e)}))},tn=kr,en=ar,rn=Wr,nn=rn.validators;function on(t){this.defaults=t,this.interceptors={request:new Qr,response:new Qr}}on.prototype.request=function(t,e){"string"==typeof t?(e=e||{}).url=t:e=t||{},(e=tn(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var r=e.transitional;void 0!==r&&rn.assertOptions(r,{silentJSONParsing:nn.transitional(nn.boolean),forcedJSONParsing:nn.transitional(nn.boolean),clarifyTimeoutError:nn.transitional(nn.boolean)},!1);var n=[],o=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(o=o&&t.synchronous,n.unshift(t.fulfilled,t.rejected))}));var i,a=[];if(this.interceptors.response.forEach((function(t){a.push(t.fulfilled,t.rejected)})),!o){var u=[Zr,void 0];for(Array.prototype.unshift.apply(u,n),u=u.concat(a),i=Promise.resolve(e);u.length;)i=i.then(u.shift(),u.shift());return i}for(var s=e;n.length;){var c=n.shift(),f=n.shift();try{s=c(s)}catch(t){f(t);break}}try{i=Zr(s)}catch(t){return Promise.reject(t)}for(;a.length;)i=i.then(a.shift(),a.shift());return i},on.prototype.getUri=function(t){t=tn(this.defaults,t);var e=en(t.baseURL,t.url);return Xr(e,t.params,t.paramsSerializer)},Kr.forEach(["delete","get","head","options"],(function(t){on.prototype[t]=function(e,r){return this.request(tn(r||{},{method:t,url:e,data:(r||{}).data}))}})),Kr.forEach(["post","put","patch"],(function(t){function e(e){return function(r,n,o){return this.request(tn(o||{},{method:t,headers:e?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}on.prototype[t]=e(),on.prototype[t+"Form"]=e(!0)}));var an=Ae,un=ie,sn=on,cn=kr;var fn=function t(e){var r=new sn(e),n=un(sn.prototype.request,r);return an.extend(n,sn.prototype,r),an.extend(n,r),n.create=function(r){return t(cn(e,r))},n}(Ar);fn.Axios=sn,fn.CanceledError=fr(),fn.CancelToken=function(){if(Gr)return zr;Gr=1;var t=fr();function e(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var r;this.promise=new Promise((function(t){r=t}));var n=this;this.promise.then((function(t){if(n._listeners){var e,r=n._listeners.length;for(e=0;e<r;e++)n._listeners[e](t);n._listeners=null}})),this.promise.then=function(t){var e,r=new Promise((function(t){n.subscribe(t),e=t})).then(t);return r.cancel=function(){n.unsubscribe(e)},r},e((function(e){n.reason||(n.reason=new t(e),r(n.reason))}))}return e.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},e.prototype.subscribe=function(t){this.reason?t(this.reason):this._listeners?this._listeners.push(t):this._listeners=[t]},e.prototype.unsubscribe=function(t){if(this._listeners){var e=this._listeners.indexOf(t);-1!==e&&this._listeners.splice(e,1)}},e.source=function(){var t;return{token:new e((function(e){t=e})),cancel:t}},zr=e}(),fn.isCancel=Sr(),fn.VERSION=Br().version,fn.toFormData=Fe(),fn.AxiosError=Le(),fn.Cancel=fn.CanceledError,fn.all=function(t){return Promise.all(t)},fn.spread=Vr?Hr:(Vr=1,Hr=function(t){return function(e){return t.apply(null,e)}}),fn.isAxiosError=function(){if($r)return Jr;$r=1;var t=Ae;return Jr=function(e){return t.isObject(e)&&!0===e.isAxiosError}}(),oe.exports=fn,oe.exports.default=fn;var ln=l(oe.exports),hn=new Set(["ENOTFOUND","ENETUNREACH","UNABLE_TO_GET_ISSUER_CERT","UNABLE_TO_GET_CRL","UNABLE_TO_DECRYPT_CERT_SIGNATURE","UNABLE_TO_DECRYPT_CRL_SIGNATURE","UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY","CERT_SIGNATURE_FAILURE","CRL_SIGNATURE_FAILURE","CERT_NOT_YET_VALID","CERT_HAS_EXPIRED","CRL_NOT_YET_VALID","CRL_HAS_EXPIRED","ERROR_IN_CERT_NOT_BEFORE_FIELD","ERROR_IN_CERT_NOT_AFTER_FIELD","ERROR_IN_CRL_LAST_UPDATE_FIELD","ERROR_IN_CRL_NEXT_UPDATE_FIELD","OUT_OF_MEM","DEPTH_ZERO_SELF_SIGNED_CERT","SELF_SIGNED_CERT_IN_CHAIN","UNABLE_TO_GET_ISSUER_CERT_LOCALLY","UNABLE_TO_VERIFY_LEAF_SIGNATURE","CERT_CHAIN_TOO_LONG","CERT_REVOKED","INVALID_CA","PATH_LENGTH_EXCEEDED","INVALID_PURPOSE","CERT_UNTRUSTED","CERT_REJECTED","HOSTNAME_MISMATCH"]),pn=l((function(t){return!hn.has(t&&t.code)}));function dn(t,e,r,n,o,i,a){try{var u=t[i](a),s=u.value}catch(t){return void r(t)}u.done?e(s):Promise.resolve(s).then(n,o)}function yn(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){dn(i,n,o,a,u,"next",t)}function u(t){dn(i,n,o,a,u,"throw",t)}a(void 0)}))}}function gn(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function vn(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?gn(Object(r),!0).forEach((function(e){mn(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):gn(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function mn(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var bn="axios-retry";function wn(t){return!t.response&&Boolean(t.code)&&"ECONNABORTED"!==t.code&&pn(t)}var En=["get","head","options"],_n=En.concat(["put","delete"]);function On(t){return"ECONNABORTED"!==t.code&&(!t.response||t.response.status>=500&&t.response.status<=599)}function An(t){return!!t.config&&(On(t)&&-1!==_n.indexOf(t.config.method))}function Rn(t){return wn(t)||An(t)}function Tn(){return 0}function Sn(t){var e=t[bn]||{};return e.retryCount=e.retryCount||0,t[bn]=e,e}function jn(t,e){return vn(vn({},e),t[bn])}function xn(t,e){t.defaults.agent===e.agent&&delete e.agent,t.defaults.httpAgent===e.httpAgent&&delete e.httpAgent,t.defaults.httpsAgent===e.httpsAgent&&delete e.httpsAgent}function Pn(t,e,r,n){return In.apply(this,arguments)}function In(){return(In=yn(r().mark((function t(e,o,i,a){var u,s;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("object"!==n(u=i.retryCount<e&&o(a))){t.next=12;break}return t.prev=2,t.next=5,u;case 5:return s=t.sent,t.abrupt("return",!1!==s);case 9:return t.prev=9,t.t0=t.catch(2),t.abrupt("return",!1);case 12:return t.abrupt("return",u);case 13:case"end":return t.stop()}}),t,null,[[2,9]])})))).apply(this,arguments)}function Cn(t,e){var n=t.interceptors.request.use((function(t){return Sn(t).lastRequestTime=Date.now(),t})),o=t.interceptors.response.use(null,function(){var n=yn(r().mark((function n(o){var i,a,u,s,c,f,l,h,p,d,y,g,v,m,b,w;return r().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(i=o.config){r.next=3;break}return r.abrupt("return",Promise.reject(o));case 3:return a=jn(i,e),u=a.retries,s=void 0===u?3:u,c=a.retryCondition,f=void 0===c?Rn:c,l=a.retryDelay,h=void 0===l?Tn:l,p=a.shouldResetTimeout,d=void 0!==p&&p,y=a.onRetry,g=void 0===y?function(){}:y,v=Sn(i),r.next=7,Pn(s,f,v,o);case 7:if(!r.sent){r.next=20;break}if(v.retryCount+=1,m=h(v.retryCount,o),xn(t,i),d||!i.timeout||!v.lastRequestTime){r.next=17;break}if(b=Date.now()-v.lastRequestTime,!((w=i.timeout-b-m)<=0)){r.next=16;break}return r.abrupt("return",Promise.reject(o));case 16:i.timeout=w;case 17:return i.transformRequest=[function(t){return t}],g(v.retryCount,o,i),r.abrupt("return",new Promise((function(e){return setTimeout((function(){return e(t(i))}),m)})));case 20:return r.abrupt("return",Promise.reject(o));case 21:case"end":return r.stop()}}),n)})));return function(t){return n.apply(this,arguments)}}());return{requestInterceptorId:n,responseInterceptorId:o}}Cn.isNetworkError=wn,Cn.isSafeRequestError=function(t){return!!t.config&&(On(t)&&-1!==En.indexOf(t.config.method))},Cn.isIdempotentRequestError=An,Cn.isNetworkOrIdempotentRequestError=Rn,Cn.exponentialDelay=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:100,r=Math.pow(2,t)*e;return r+.2*r*Math.random()},Cn.isRetryableError=On;var Nn=1e3,Un=60*Nn,Ln=60*Un,Dn=24*Ln,kn=7*Dn,Bn=365.25*Dn,Fn=function(t,e){e=e||{};var r=n(t);if("string"===r&&t.length>0)return function(t){if((t=String(t)).length>100)return;var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(!e)return;var r=parseFloat(e[1]);switch((e[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return r*Bn;case"weeks":case"week":case"w":return r*kn;case"days":case"day":case"d":return r*Dn;case"hours":case"hour":case"hrs":case"hr":case"h":return r*Ln;case"minutes":case"minute":case"mins":case"min":case"m":return r*Un;case"seconds":case"second":case"secs":case"sec":case"s":return r*Nn;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}(t);if("number"===r&&isFinite(t))return e.long?function(t){var e=Math.abs(t);if(e>=Dn)return Yn(t,e,Dn,"day");if(e>=Ln)return Yn(t,e,Ln,"hour");if(e>=Un)return Yn(t,e,Un,"minute");if(e>=Nn)return Yn(t,e,Nn,"second");return t+" ms"}(t):function(t){var e=Math.abs(t);if(e>=Dn)return Math.round(t/Dn)+"d";if(e>=Ln)return Math.round(t/Ln)+"h";if(e>=Un)return Math.round(t/Un)+"m";if(e>=Nn)return Math.round(t/Nn)+"s";return t+"ms"}(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function Yn(t,e,r,n){var o=e>=1.5*r;return Math.round(t/r)+" "+n+(o?"s":"")}for(var Mn,qn=l(Fn),zn=256,Gn=[];zn--;)Gn[zn]=(zn+256).toString(16).substring(1);var Hn=Object.prototype.toString,Vn=Array.isArray;var Jn=l((function(t){return"string"==typeof t||!Vn(t)&&function(t){return!!t&&"object"==n(t)}(t)&&"[object String]"==Hn.call(t)})),$n={exports:{}};!function(t,e){var r="__lodash_hash_undefined__",o=9007199254740991,i="[object Arguments]",a="[object Boolean]",u="[object Date]",s="[object Function]",c="[object GeneratorFunction]",l="[object Map]",h="[object Number]",p="[object Object]",d="[object Promise]",y="[object RegExp]",g="[object Set]",v="[object String]",m="[object Symbol]",b="[object WeakMap]",w="[object ArrayBuffer]",E="[object DataView]",_="[object Float32Array]",O="[object Float64Array]",A="[object Int8Array]",R="[object Int16Array]",T="[object Int32Array]",S="[object Uint8Array]",j="[object Uint8ClampedArray]",x="[object Uint16Array]",P="[object Uint32Array]",I=/\w*$/,C=/^\[object .+?Constructor\]$/,N=/^(?:0|[1-9]\d*)$/,U={};U[i]=U["[object Array]"]=U[w]=U[E]=U[a]=U[u]=U[_]=U[O]=U[A]=U[R]=U[T]=U[l]=U[h]=U[p]=U[y]=U[g]=U[v]=U[m]=U[S]=U[j]=U[x]=U[P]=!0,U["[object Error]"]=U[s]=U[b]=!1;var L="object"==n(f)&&f&&f.Object===Object&&f,D="object"==("undefined"==typeof self?"undefined":n(self))&&self&&self.Object===Object&&self,k=L||D||Function("return this")(),B=e&&!e.nodeType&&e,F=B&&t&&!t.nodeType&&t,Y=F&&F.exports===B;function M(t,e){return t.set(e[0],e[1]),t}function q(t,e){return t.add(e),t}function z(t,e,r,n){var o=-1,i=t?t.length:0;for(n&&i&&(r=t[++o]);++o<i;)r=e(r,t[o],o,t);return r}function G(t){var e=!1;if(null!=t&&"function"!=typeof t.toString)try{e=!!(t+"")}catch(t){}return e}function H(t){var e=-1,r=Array(t.size);return t.forEach((function(t,n){r[++e]=[n,t]})),r}function V(t,e){return function(r){return t(e(r))}}function J(t){var e=-1,r=Array(t.size);return t.forEach((function(t){r[++e]=t})),r}var $,W=Array.prototype,K=Function.prototype,X=Object.prototype,Q=k["__core-js_shared__"],Z=($=/[^.]+$/.exec(Q&&Q.keys&&Q.keys.IE_PROTO||""))?"Symbol(src)_1."+$:"",tt=K.toString,et=X.hasOwnProperty,rt=X.toString,nt=RegExp("^"+tt.call(et).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ot=Y?k.Buffer:void 0,it=k.Symbol,at=k.Uint8Array,ut=V(Object.getPrototypeOf,Object),st=Object.create,ct=X.propertyIsEnumerable,ft=W.splice,lt=Object.getOwnPropertySymbols,ht=ot?ot.isBuffer:void 0,pt=V(Object.keys,Object),dt=Ft(k,"DataView"),yt=Ft(k,"Map"),gt=Ft(k,"Promise"),vt=Ft(k,"Set"),mt=Ft(k,"WeakMap"),bt=Ft(Object,"create"),wt=Gt(dt),Et=Gt(yt),_t=Gt(gt),Ot=Gt(vt),At=Gt(mt),Rt=it?it.prototype:void 0,Tt=Rt?Rt.valueOf:void 0;function St(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function jt(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function xt(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function Pt(t){this.__data__=new jt(t)}function It(t,e){var r=Vt(t)||function(t){return function(t){return function(t){return!!t&&"object"==n(t)}(t)&&Jt(t)}(t)&&et.call(t,"callee")&&(!ct.call(t,"callee")||rt.call(t)==i)}(t)?function(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}(t.length,String):[],o=r.length,a=!!o;for(var u in t)!e&&!et.call(t,u)||a&&("length"==u||qt(u,o))||r.push(u);return r}function Ct(t,e,r){var n=t[e];et.call(t,e)&&Ht(n,r)&&(void 0!==r||e in t)||(t[e]=r)}function Nt(t,e){for(var r=t.length;r--;)if(Ht(t[r][0],e))return r;return-1}function Ut(t,e,r,n,o,f,d){var b;if(n&&(b=f?n(t,o,f,d):n(t)),void 0!==b)return b;if(!Kt(t))return t;var C=Vt(t);if(C){if(b=function(t){var e=t.length,r=t.constructor(e);e&&"string"==typeof t[0]&&et.call(t,"index")&&(r.index=t.index,r.input=t.input);return r}(t),!e)return function(t,e){var r=-1,n=t.length;e||(e=Array(n));for(;++r<n;)e[r]=t[r];return e}(t,b)}else{var N=Mt(t),L=N==s||N==c;if($t(t))return function(t,e){if(e)return t.slice();var r=new t.constructor(t.length);return t.copy(r),r}(t,e);if(N==p||N==i||L&&!f){if(G(t))return f?t:{};if(b=function(t){return"function"!=typeof t.constructor||zt(t)?{}:(e=ut(t),Kt(e)?st(e):{});var e}(L?{}:t),!e)return function(t,e){return kt(t,Yt(t),e)}(t,function(t,e){return t&&kt(e,Xt(e),t)}(b,t))}else{if(!U[N])return f?t:{};b=function(t,e,r,n){var o=t.constructor;switch(e){case w:return Dt(t);case a:case u:return new o(+t);case E:return function(t,e){var r=e?Dt(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}(t,n);case _:case O:case A:case R:case T:case S:case j:case x:case P:return function(t,e){var r=e?Dt(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}(t,n);case l:return function(t,e,r){var n=e?r(H(t),!0):H(t);return z(n,M,new t.constructor)}(t,n,r);case h:case v:return new o(t);case y:return function(t){var e=new t.constructor(t.source,I.exec(t));return e.lastIndex=t.lastIndex,e}(t);case g:return function(t,e,r){var n=e?r(J(t),!0):J(t);return z(n,q,new t.constructor)}(t,n,r);case m:return i=t,Tt?Object(Tt.call(i)):{}}var i}(t,N,Ut,e)}}d||(d=new Pt);var D=d.get(t);if(D)return D;if(d.set(t,b),!C)var k=r?function(t){return function(t,e,r){var n=e(t);return Vt(t)?n:function(t,e){for(var r=-1,n=e.length,o=t.length;++r<n;)t[o+r]=e[r];return t}(n,r(t))}(t,Xt,Yt)}(t):Xt(t);return function(t,e){for(var r=-1,n=t?t.length:0;++r<n&&!1!==e(t[r],r,t););}(k||t,(function(o,i){k&&(o=t[i=o]),Ct(b,i,Ut(o,e,r,n,i,t,d))})),b}function Lt(t){return!(!Kt(t)||(e=t,Z&&Z in e))&&(Wt(t)||G(t)?nt:C).test(Gt(t));var e}function Dt(t){var e=new t.constructor(t.byteLength);return new at(e).set(new at(t)),e}function kt(t,e,r,n){r||(r={});for(var o=-1,i=e.length;++o<i;){var a=e[o],u=n?n(r[a],t[a],a,r,t):void 0;Ct(r,a,void 0===u?t[a]:u)}return r}function Bt(t,e){var r=t.__data__;return function(t){var e=n(t);return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}(e)?r["string"==typeof e?"string":"hash"]:r.map}function Ft(t,e){var r=function(t,e){return null==t?void 0:t[e]}(t,e);return Lt(r)?r:void 0}St.prototype.clear=function(){this.__data__=bt?bt(null):{}},St.prototype.delete=function(t){return this.has(t)&&delete this.__data__[t]},St.prototype.get=function(t){var e=this.__data__;if(bt){var n=e[t];return n===r?void 0:n}return et.call(e,t)?e[t]:void 0},St.prototype.has=function(t){var e=this.__data__;return bt?void 0!==e[t]:et.call(e,t)},St.prototype.set=function(t,e){return this.__data__[t]=bt&&void 0===e?r:e,this},jt.prototype.clear=function(){this.__data__=[]},jt.prototype.delete=function(t){var e=this.__data__,r=Nt(e,t);return!(r<0)&&(r==e.length-1?e.pop():ft.call(e,r,1),!0)},jt.prototype.get=function(t){var e=this.__data__,r=Nt(e,t);return r<0?void 0:e[r][1]},jt.prototype.has=function(t){return Nt(this.__data__,t)>-1},jt.prototype.set=function(t,e){var r=this.__data__,n=Nt(r,t);return n<0?r.push([t,e]):r[n][1]=e,this},xt.prototype.clear=function(){this.__data__={hash:new St,map:new(yt||jt),string:new St}},xt.prototype.delete=function(t){return Bt(this,t).delete(t)},xt.prototype.get=function(t){return Bt(this,t).get(t)},xt.prototype.has=function(t){return Bt(this,t).has(t)},xt.prototype.set=function(t,e){return Bt(this,t).set(t,e),this},Pt.prototype.clear=function(){this.__data__=new jt},Pt.prototype.delete=function(t){return this.__data__.delete(t)},Pt.prototype.get=function(t){return this.__data__.get(t)},Pt.prototype.has=function(t){return this.__data__.has(t)},Pt.prototype.set=function(t,e){var r=this.__data__;if(r instanceof jt){var n=r.__data__;if(!yt||n.length<199)return n.push([t,e]),this;r=this.__data__=new xt(n)}return r.set(t,e),this};var Yt=lt?V(lt,Object):function(){return[]},Mt=function(t){return rt.call(t)};function qt(t,e){return!!(e=null==e?o:e)&&("number"==typeof t||N.test(t))&&t>-1&&t%1==0&&t<e}function zt(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||X)}function Gt(t){if(null!=t){try{return tt.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function Ht(t,e){return t===e||t!=t&&e!=e}(dt&&Mt(new dt(new ArrayBuffer(1)))!=E||yt&&Mt(new yt)!=l||gt&&Mt(gt.resolve())!=d||vt&&Mt(new vt)!=g||mt&&Mt(new mt)!=b)&&(Mt=function(t){var e=rt.call(t),r=e==p?t.constructor:void 0,n=r?Gt(r):void 0;if(n)switch(n){case wt:return E;case Et:return l;case _t:return d;case Ot:return g;case At:return b}return e});var Vt=Array.isArray;function Jt(t){return null!=t&&function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=o}(t.length)&&!Wt(t)}var $t=ht||function(){return!1};function Wt(t){var e=Kt(t)?rt.call(t):"";return e==s||e==c}function Kt(t){var e=n(t);return!!t&&("object"==e||"function"==e)}function Xt(t){return Jt(t)?It(t):function(t){if(!zt(t))return pt(t);var e=[];for(var r in Object(t))et.call(t,r)&&"constructor"!=r&&e.push(r);return e}(t)}t.exports=function(t){return Ut(t,!0,!0)}}($n,$n.exports);var Wn=l($n.exports);function Kn(t){return Xn.apply(this,arguments)}function Xn(){return Xn=i(r().mark((function t(e){var n,o,i;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=to(e),o=[Qn(n,e)],e.timeout&&e.timeout>0&&o.push(new Promise((function(t){setTimeout((function(){var r=e.timeoutErrorMessage?e.timeoutErrorMessage:"timeout of "+e.timeout+"ms exceeded";t(eo(r,e,"ECONNABORTED",n))}),e.timeout)}))),t.next=5,Promise.race(o);case 5:return i=t.sent,t.abrupt("return",new Promise((function(t,r){i instanceof Error?r(i):"[object Function]"===Object.prototype.toString.call(e.settle)?e.settle(t,r,i):Ge(t,r,i)})));case 7:case"end":return t.stop()}}),t)}))),Xn.apply(this,arguments)}function Qn(t,e){return Zn.apply(this,arguments)}function Zn(){return(Zn=i(r().mark((function t(e,n){var o,i;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,fetch(e);case 3:o=t.sent,t.next=9;break;case 6:return t.prev=6,t.t0=t.catch(0),t.abrupt("return",eo("Network Error",n,"ERR_NETWORK",e));case 9:if(i={ok:o.ok,status:o.status,statusText:o.statusText,headers:new Headers(o.headers),config:n,request:e},!(o.status>=200&&204!==o.status)){t.next=34;break}t.t1=n.responseType,t.next="arraybuffer"===t.t1?14:"blob"===t.t1?18:"json"===t.t1?22:"formData"===t.t1?26:30;break;case 14:return t.next=16,o.arrayBuffer();case 16:case 20:case 24:case 28:case 32:return i.data=t.sent,t.abrupt("break",34);case 18:return t.next=20,o.blob();case 22:return t.next=24,o.json();case 26:return t.next=28,o.formData();case 30:return t.next=32,o.text();case 34:return t.abrupt("return",i);case 35:case"end":return t.stop()}}),t,null,[[0,6]])})))).apply(this,arguments)}function to(t){var e=new Headers(t.headers);if(t.auth){var r=t.auth.username||"",n=t.auth.password?decodeURI(encodeURIComponent(t.auth.password)):"";e.set("Authorization","Basic ".concat(btoa(r+":"+n)))}var o=t.method.toUpperCase(),i={headers:e,method:o};"GET"!==o&&"HEAD"!==o&&(i.body=t.data,Ae.isFormData(i.body)&&Ae.isStandardBrowserEnv()&&e.delete("Content-Type")),t.mode&&(i.mode=t.mode),t.cache&&(i.cache=t.cache),t.integrity&&(i.integrity=t.integrity),t.redirect&&(i.redirect=t.redirect),t.referrer&&(i.referrer=t.referrer),Ae.isUndefined(t.withCredentials)||(i.credentials=t.withCredentials?"include":"omit");var a=ur(t.baseURL,t.url),u=je(a,t.params,t.paramsSerializer);return new Request(u,i)}function eo(t,e,r,n,o){return ln.AxiosError&&"function"==typeof ln.AxiosError?new ln.AxiosError(t,ln.AxiosError[r],e,n,o):function(t,e,r,n,o){t.config=e,r&&(t.code=r);return t.request=n,t.response=o,t.isAxiosError=!0,t.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}},t}(new Error(t),e,r,n,o)}var ro="2.42.0",no=process.nextTick.bind(process),oo=function(){},io=function(){function t(e,r,n){if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),n=n||{},!e)throw new Error("You must pass your project's write key.");if(!r)throw new Error("You must pass our data plane url.");var o,i;this.queue=[],this.writeKey=e,this.host=(o=r)&&o.endsWith("/")?o.replace(/\/+$/,""):o,this.timeout=n.timeout||!1,this.flushAt=Math.max(n.flushAt,1)||20,this.flushInterval=n.flushInterval||2e4,this.maxInternalQueueSize=n.maxInternalQueueSize||2e4,this.logLevel=n.logLevel||"info",this.flushOverride=n.flushOverride&&("function"==typeof(i=n.flushOverride)&&Boolean(i.constructor&&i.call&&i.apply))?n.flushOverride:void 0,this.flushed=!1,this.axiosInstance=ln.create({adapter:Kn}),Object.defineProperty(this,"enable",{configurable:!1,writable:!1,enumerable:!0,value:"boolean"!=typeof n.enable||n.enable}),this.logger={error:function(t){if("off"!==this.logLevel){for(var e,r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];(e=console).error.apply(e,["".concat((new Date).toISOString(),' ["Rudder"] error: ').concat(t)].concat(n))}},info:function(t){if(["silly","debug","info"].includes(this.logLevel)){for(var e,r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];(e=console).log.apply(e,["".concat((new Date).toISOString(),' ["Rudder"] info: ').concat(t)].concat(n))}},debug:function(t){if(["silly","debug"].includes(this.logLevel)){for(var e,r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];(e=console).debug.apply(e,["".concat((new Date).toISOString(),' ["Rudder"] debug: ').concat(t)].concat(n))}},silly:function(t){if(["silly"].includes(this.logLevel)){for(var e,r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];(e=console).info.apply(e,["".concat((new Date).toISOString(),' ["Rudder"] silly: ').concat(t)].concat(n))}}},Cn(this.axiosInstance,{retries:0})}var r,o,i;return r=t,o=[{key:"_validate",value:function(t,e){try{te(t,e)}catch(e){if("Your message must be < 32kb."===e.message)return void this.logger.info("Your message must be < 32kb. This is currently surfaced as a warning. Please update your code",t);throw e}}},{key:"identify",value:function(t,e){return this._validate(t,"identify"),this.enqueue("identify",t,e),this}},{key:"group",value:function(t,e){return this._validate(t,"group"),this.enqueue("group",t,e),this}},{key:"track",value:function(t,e){return this._validate(t,"track"),this.enqueue("track",t,e),this}},{key:"page",value:function(t,e){return this._validate(t,"page"),this.enqueue("page",t,e),this}},{key:"screen",value:function(t,e){return this._validate(t,"screen"),this.enqueue("screen",t,e),this}},{key:"alias",value:function(t,e){return this._validate(t,"alias"),this.enqueue("alias",t,e),this}},{key:"enqueue",value:function(t,r,n){if(this.queue.length>=this.maxInternalQueueSize)this.logger.error("not adding events for processing as queue size ".concat(this.queue.length," >= than max configuration ").concat(this.maxInternalQueueSize));else{var o=Wn(r);if(n=n||oo,!this.enable)return no(n);if("identify"==t&&o.traits&&(o.context||(o.context={}),o.context.traits=o.traits),(o=e({},o)).type=t,o.context=e({library:{name:"analytics-service-worker",version:ro}},o.context),o.channel="service-worker",o._metadata=e({serviceWorkerVersion:ro},o._metadata),o.originalTimestamp||(o.originalTimestamp=new Date),o.messageId||(o.messageId=function(){var t,e=0,r="";if(!Mn||zn+16>256){for(Mn=Array(e=256);e--;)Mn[e]=256*Math.random()|0;e=zn=0}for(;e<16;e++)t=Mn[zn+e],r+=6==e?Gn[15&t|64]:8==e?Gn[63&t|128]:Gn[t],1&e&&e>1&&e<11&&(r+="-");return zn++,r}()),o.anonymousId&&!Jn(o.anonymousId)&&(o.anonymousId=JSON.stringify(o.anonymousId)),o.userId&&!Jn(o.userId)&&(o.userId=JSON.stringify(o.userId)),this.queue.push({message:o,callback:n}),!this.flushed)return this.flushed=!0,void this.flush();this.queue.length>=this.flushAt&&(this.logger.debug("flushAt reached, trying flush..."),this.flush()),this.flushInterval&&!this.flushTimer&&(this.logger.debug("no existing flush timer, creating new one"),this.flushTimer=setTimeout(this.flush.bind(this),this.flushInterval))}}},{key:"flush",value:function(t){var r=this;if(this.logger.debug("in flush"),t=t||oo,!this.enable)return no(t);if(this.timer&&(this.logger.debug("cancelling existing timer..."),clearTimeout(this.timer),this.timer=null),this.flushTimer&&(this.logger.debug("cancelling existing flushTimer..."),clearTimeout(this.flushTimer),this.flushTimer=null),!this.queue.length)return this.logger.debug("queue is empty, nothing to flush"),no(t);var o=this.queue.splice(0,this.flushAt),i=o.map((function(t){return t.callback})),a={batch:o.map((function(t){return"object"===n(t.message)&&(t.message.sentAt=new Date),t.message})),sentAt:new Date};this.logger.debug("batch size is ".concat(o.length)),this.logger.silly("===data===",a);var u=function(e){i.forEach((function(t){t(e)})),t(e,a)};if(0===a.batch.length)return this.logger.debug("batch is empty, nothing to flush"),no(t);var s={};"undefined"==typeof window&&(s["user-agent"]="analytics-service-worker/".concat(ro),s["Content-Type"]="application/json");var c="string"==typeof this.timeout?qn(this.timeout):this.timeout;if(this.flushOverride)this.flushOverride({host:"".concat(this.host),writeKey:this.writeKey,data:a,headers:s,reqTimeout:c,flush:this.flush.bind(this),done:u,isErrorRetryable:this._isErrorRetryable.bind(this)});else{var f={method:"POST",url:"".concat(this.host),auth:{username:this.writeKey},data:a,headers:s};c&&(f.timeout=c),this.axiosInstance(e(e({},f),{},{"axios-retry":{retries:3,retryCondition:this._isErrorRetryable.bind(this),retryDelay:Cn.exponentialDelay}})).then((function(t){r.timer=setTimeout(r.flush.bind(r),r.flushInterval),u()})).catch((function(t){if(console.log(t),r.logger.error("got error while attempting send for 3 times, dropping ".concat(o.length," events")),r.timer=setTimeout(r.flush.bind(r),r.flushInterval),t.response){var e=new Error(t.response.statusText);return u(e)}u(t)}))}}},{key:"_isErrorRetryable",value:function(t){return!!Cn.isNetworkError(t)||!!t.response&&(this.logger.error("error status: ".concat(t.response.status)),t.response.status>=500&&t.response.status<=599||429===t.response.status)}}],o&&a(r.prototype,o),i&&a(r,i),Object.defineProperty(r,"prototype",{writable:!1}),t}();export{io as Analytics};