Socket
Socket
Sign inDemoInstall

@datadog/browser-logs

Package Overview
Dependencies
1
Maintainers
1
Versions
247
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 4.48.1 to 4.48.2

2

bundle/datadog-logs.js

@@ -1,1 +0,1 @@

!function(){"use strict";var e={log:"log",debug:"debug",info:"info",warn:"warn",error:"error"},t=function(n){for(var r=[],o=1;o<arguments.length;o++)r[o-1]=arguments[o];Object.prototype.hasOwnProperty.call(e,n)||(n=e.log),t[n].apply(t,r)},n=console;function r(e,n){return function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];try{return e.apply(void 0,r)}catch(e){t.error(n,e)}}}t.debug=n.debug.bind(n),t.log=n.log.bind(n),t.info=n.info.bind(n),t.warn=n.warn.bind(n),t.error=n.error.bind(n);var o,i=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))},a=!1;function s(e){a=e}function u(e,t,n){var r=n.value;n.value=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return(o?c(r):r).apply(this,e)}}function c(e){return function(){return f(e,this,arguments)}}function f(t,n,r){try{return t.apply(n,r)}catch(t){if(l(e.error,t),o)try{o(t)}catch(t){l(e.error,t)}}}function l(e){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];a&&t.apply(void 0,i([e,"[MONITOR]"],n,!1))}function d(e,t){return-1!==e.indexOf(t)}function v(e){if(Array.from)return Array.from(e);var t=[];if(e instanceof Set)e.forEach((function(e){return t.push(e)}));else for(var n=0;n<e.length;n++)t.push(e[n]);return t}function p(e){return Object.keys(e).map((function(t){return e[t]}))}function g(e,t){return e.slice(0,t.length)===t}function h(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.forEach((function(t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})),e}function y(){if("object"==typeof globalThis)return globalThis;Object.defineProperty(Object.prototype,"_dd_temp_",{get:function(){return this},configurable:!0});var e=_dd_temp_;return delete Object.prototype._dd_temp_,"object"!=typeof e&&(e="object"==typeof self?self:"object"==typeof window?window:{}),e}var m=1024,b=1024*m,w=/[^\u0000-\u007F]/;function S(e){return w.test(e)?void 0!==window.TextEncoder?(new TextEncoder).encode(e).length:new Blob([e]).size:e.length}function E(e,t){var n,r=y();return r.Zone&&"function"==typeof r.Zone.__symbol__&&(n=e[r.Zone.__symbol__(t)]),n||(n=e[t]),n}function C(e,t){return E(y(),"setTimeout")(c(e),t)}function x(e){E(y(),"clearTimeout")(e)}function k(e,t){return E(y(),"setInterval")(c(e),t)}function _(e){E(y(),"clearInterval")(e)}function O(e,t,n){var r,o,i=!n||void 0===n.leading||n.leading,a=!n||void 0===n.trailing||n.trailing,s=!1;return{throttled:function(){for(var n=[],u=0;u<arguments.length;u++)n[u]=arguments[u];s?r=n:(i?e.apply(void 0,n):r=n,s=!0,o=C((function(){a&&r&&e.apply(void 0,r),s=!1,r=void 0}),t))},cancel:function(){x(o),s=!1,r=void 0}}}function R(){}function T(e){return null===e?"null":Array.isArray(e)?"array":typeof e}function L(e,t,n){if(void 0===n&&(n=function(){if("undefined"!=typeof WeakSet){var e=new WeakSet;return{hasAlreadyBeenSeen:function(t){var n=e.has(t);return n||e.add(t),n}}}var t=[];return{hasAlreadyBeenSeen:function(e){var n=t.indexOf(e)>=0;return n||t.push(e),n}}}()),void 0===t)return e;if("object"!=typeof t||null===t)return t;if(t instanceof Date)return new Date(t.getTime());if(t instanceof RegExp){var r=t.flags||[t.global?"g":"",t.ignoreCase?"i":"",t.multiline?"m":"",t.sticky?"y":"",t.unicode?"u":""].join("");return new RegExp(t.source,r)}if(!n.hasAlreadyBeenSeen(t)){if(Array.isArray(t)){for(var o=Array.isArray(e)?e:[],i=0;i<t.length;++i)o[i]=L(o[i],t[i],n);return o}var a="object"===T(e)?e:{};for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(a[s]=L(a[s],t[s],n));return a}}function A(e){return L(void 0,e)}function P(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var r=0,o=t;r<o.length;r++){var i=o[r];null!=i&&(e=L(e,i))}return e}function B(e,t,n){if("object"!=typeof e||null===e)return JSON.stringify(e);var r=I(Object.prototype),o=I(Array.prototype),i=I(Object.getPrototypeOf(e)),a=I(e);try{return JSON.stringify(e,t,n)}catch(e){return"<error: unable to serialize object>"}finally{r(),o(),i(),a()}}function I(e){var t=e,n=t.toJSON;return n?(delete t.toJSON,function(){t.toJSON=n}):R}var N=220*m,M="$",U=3;function q(e,t){var n;void 0===t&&(t=N);var r=I(Object.prototype),o=I(Array.prototype),i=[],a=new WeakMap,s=j(e,M,void 0,i,a),u=(null===(n=JSON.stringify(s))||void 0===n?void 0:n.length)||0;if(!(u>t)){for(;i.length>0&&u<t;){var c=i.shift(),f=0;if(Array.isArray(c.source))for(var l=0;l<c.source.length;l++){if(u+=void 0!==(d=j(c.source[l],c.path,l,i,a))?JSON.stringify(d).length:4,u+=f,f=1,u>t){D(t,"truncated",e);break}c.target[l]=d}else for(var l in c.source)if(Object.prototype.hasOwnProperty.call(c.source,l)){var d;if(void 0!==(d=j(c.source[l],c.path,l,i,a))&&(u+=JSON.stringify(d).length+f+l.length+U,f=1),u>t){D(t,"truncated",e);break}c.target[l]=d}}return r(),o(),s}D(t,"discarded",e)}function j(e,t,n,r,o){var i=function(e){var t=e;if(t&&"function"==typeof t.toJSON)try{return t.toJSON()}catch(e){}return e}(e);if(!i||"object"!=typeof i)return function(e){if("bigint"==typeof e)return"[BigInt] ".concat(e.toString());if("function"==typeof e)return"[Function] ".concat(e.name||"unknown");if("symbol"==typeof e)return"[Symbol] ".concat(e.description||e.toString());return e}(i);var a=function(e){try{if(e instanceof Event)return{isTrusted:e.isTrusted};var t=Object.prototype.toString.call(e).match(/\[object (.*)\]/);if(t&&t[1])return"[".concat(t[1],"]")}catch(e){}return"[Unserializable]"}(i);if("[Object]"!==a&&"[Array]"!==a&&"[Error]"!==a)return a;var s=e;if(o.has(s))return"[Reference seen at ".concat(o.get(s),"]");var u=void 0!==n?"".concat(t,".").concat(n):t,c=Array.isArray(i)?[]:{};return o.set(s,u),r.push({source:i,target:c,path:u}),c}function D(e,n,r){t.warn("The data provided has been ".concat(n," as it is over the limit of ").concat(e," characters:"),r)}var G=3*m;var F=200;function H(e,n){void 0===n&&(n=S);var r,o={},i=!1,a=O((function(o){r=n(B(o)),i||(i=function(e,n){return e>G&&(t.warn("The ".concat(n," data exceeds the recommended ").concat(G/m,"KiB threshold. More details: https://docs.datadoghq.com/real_user_monitoring/browser/troubleshooting/#customer-data-exceeds-the-recommended-3kib-warning")),!0)}(r,e))}),F).throttled,s={getBytesCount:function(){return r},get:function(){return o},add:function(e,t){o[e]=t,a(o)},remove:function(e){delete o[e],a(o)},set:function(e){a(o=e)},getContext:function(){return A(o)},setContext:function(e){"object"===T(e)?(o=q(e),a(o)):s.clearContext()},setContextProperty:function(e,t){o[e]=q(t),a(o)},removeContextProperty:function(e){delete o[e],a(o)},clearContext:function(){o={},r=0}};return s}var z,J,V=function(){function e(){this.buffer=[]}return e.prototype.add=function(e){this.buffer.push(e)>500&&this.buffer.splice(0,1)},e.prototype.drain=function(){this.buffer.forEach((function(e){return e()})),this.buffer.length=0},e}(),W=1e3,$=60*W,X=60*$;function Z(){return(new Date).getTime()}function K(){return Z()}function Y(){return performance.now()}function Q(){return{relative:Y(),timeStamp:K()}}function ee(e,t){return e+t}function te(){return void 0===z&&(z=performance.timing.navigationStart),z}function ne(){var e=y().DatadogEventBridge;if(e)return{getAllowedWebViewHosts:function(){return JSON.parse(e.getAllowedWebViewHosts())},send:function(t,n){e.send(JSON.stringify({eventType:t,event:n}))}}}function re(e){var t;void 0===e&&(e=null===(t=y().location)||void 0===t?void 0:t.hostname);var n=ne();return!!n&&n.getAllowedWebViewHosts().some((function(t){return e===t||(n=e,r=".".concat(t),n.slice(-r.length)===r);var n,r}))}function oe(e){var t=h({},e);return["id","name","email"].forEach((function(e){e in t&&(t[e]=String(t[e]))})),t}!function(e){e.PAGEHIDE="pagehide",e.FEATURE_FLAGS="feature_flags",e.RESOURCE_PAGE_STATES="resource_page_states",e.PAGE_STATES="page_states",e.COLLECT_FLUSH_REASON="collect_flush_reason",e.NO_RESOURCE_DURATION_FROZEN_STATE="no_resource_duration_frozen_state",e.SCROLLMAP="scrollmap",e.INTERACTION_TO_NEXT_PAINT="interaction_to_next_paint",e.DISABLE_REPLAY_INLINE_CSS="disable_replay_inline_css"}(J||(J={}));var ie=new Set;function ae(e){return ie.has(e)}function se(){return ie}function ue(e){return 0!==e&&100*Math.random()<=e}function ce(e){return function(e){return"number"==typeof e}(e)&&e>=0&&e<=100}function fe(e){return 0===Object.keys(e).length}var le=function(){function e(e){this.onFirstSubscribe=e,this.observers=[]}return e.prototype.subscribe=function(e){var t=this;return!this.observers.length&&this.onFirstSubscribe&&(this.onLastUnsubscribe=this.onFirstSubscribe()||void 0),this.observers.push(e),{unsubscribe:function(){t.observers=t.observers.filter((function(t){return e!==t})),!t.observers.length&&t.onLastUnsubscribe&&t.onLastUnsubscribe()}}},e.prototype.notify=function(e){this.observers.forEach((function(t){return t(e)}))},e}();function de(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=new le((function(){var t=e.map((function(e){return e.subscribe((function(e){return n.notify(e)}))}));return function(){return t.forEach((function(e){return e.unsubscribe()}))}}));return n}function ve(e){return e?(parseInt(e,10)^16*Math.random()>>parseInt(e,10)/4).toString(16):"".concat(1e7,"-").concat(1e3,"-").concat(4e3,"-").concat(8e3,"-").concat(1e11).replace(/[018]/g,ve)}function pe(e,t,n){void 0===n&&(n="");var r=e.charCodeAt(t-1),o=r>=55296&&r<=56319?t+1:t;return e.length<=o?e:"".concat(e.slice(0,o)).concat(n)}var ge,he=4*X,ye=15*$;function me(e,t,n,r){var o=new Date;o.setTime(o.getTime()+n);var i="expires=".concat(o.toUTCString()),a=r&&r.crossSite?"none":"strict",s=r&&r.domain?";domain=".concat(r.domain):"",u=r&&r.secure?";secure":"";document.cookie="".concat(e,"=").concat(t,";").concat(i,";path=/;samesite=").concat(a).concat(s).concat(u)}function be(e){return function(e,t){var n=new RegExp("(?:^|;)\\s*".concat(t,"\\s*=\\s*([^;]+)")).exec(e);return n?n[1]:void 0}(document.cookie,e)}function we(e,t){me(e,"",0,t)}var Se="_dd_s",Ee=/^([a-z]+)=([a-z0-9-]+)$/,Ce="&";function xe(e){return fe(e)}function ke(e){e.expire=String(Z()+ye)}function _e(e){return(t=e,Object.keys(t).map((function(e){return[e,t[e]]}))).map((function(e){var t=e[0],n=e[1];return"".concat(t,"=").concat(n)})).join(Ce);var t}function Oe(e){var t={};return function(e){return!!e&&(-1!==e.indexOf(Ce)||Ee.test(e))}(e)&&e.split(Ce).forEach((function(e){var n=Ee.exec(e);if(null!==n){var r=n[1],o=n[2];t[r]=o}})),t}var Re="_dd",Te="_dd_r",Le="_dd_l",Ae="rum",Pe="logs";function Be(e){var n=function(e){var t={};t.secure=!!e.useSecureSessionCookie||!!e.useCrossSiteSessionCookie,t.crossSite=!!e.useCrossSiteSessionCookie,e.trackSessionAcrossSubdomains&&(t.domain=function(){if(void 0===ge){for(var e="dd_site_test_".concat(ve()),t=window.location.hostname.split("."),n=t.pop();t.length&&!be(e);)n="".concat(t.pop(),".").concat(n),me(e,"test",W,{domain:n});we(e,{domain:n}),ge=n}return ge}());return t}(e);return function(e){if(void 0===document.cookie||null===document.cookie)return!1;try{var n="dd_cookie_test_".concat(ve()),r="test";me(n,r,$,e);var o=be(n)===r;return we(n,e),o}catch(e){return t.error(e),!1}}(n)?{type:"Cookie",cookieOptions:n}:void 0}function Ie(e){var t,n={persistSession:(t=e,function(e){me(Se,_e(e),ye,t)}),retrieveSession:Ne,clearSession:Me(e)};return function(e){if(!be(Se)){var t=be(Re),n=be(Te),r=be(Le),o={};t&&(o.id=t),r&&/^[01]$/.test(r)&&(o[Pe]=r),n&&/^[012]$/.test(n)&&(o[Ae]=n),xe(o)||(ke(o),e.persistSession(o))}}(n),n}function Ne(){return Oe(be(Se))}function Me(e){return function(){we(Se,e)}}var Ue="_dd_test_";function qe(e){localStorage.setItem(Se,_e(e))}function je(){return Oe(localStorage.getItem(Se))}function De(){localStorage.removeItem(Se)}var Ge,Fe=10,He=100,ze=[];function Je(e,t,n){var r;void 0===n&&(n=0);var o=t.retrieveSession,i=t.persistSession,a=t.clearSession,s=Ve();if(Ge||(Ge=e),e===Ge)if(s&&n>=He)$e(t);else{var u,c=o();if(s){if(c.lock)return void We(e,t,n);if(u=ve(),c.lock=u,i(c),(c=o()).lock!==u)return void We(e,t,n)}var f=e.process(c);if(s&&(c=o()).lock!==u)We(e,t,n);else{if(f&&(xe(f)?a():(ke(f),i(f))),s&&(!f||!xe(f))){if((c=o()).lock!==u)return void We(e,t,n);delete c.lock,i(c),f=c}null===(r=e.after)||void 0===r||r.call(e,f||c),$e(t)}}else ze.push(e)}var Ve=function(){return!!window.chrome||/HeadlessChrome/.test(window.navigator.userAgent)};function We(e,t,n){C((function(){Je(e,t,n+1)}),Fe)}function $e(e){Ge=void 0;var t=ze.shift();t&&Je(t,e)}var Xe=W;function Ze(e){var t=Be(e);return!t&&e.allowFallbackToLocalStorage&&(t=function(){try{var e=ve(),t="".concat(Ue).concat(e);localStorage.setItem(t,e);var n=localStorage.getItem(t);return localStorage.removeItem(t),e===n?{type:"LocalStorage"}:void 0}catch(e){return}}()),t}function Ke(e,t,n){var r=new le,o=new le,i="Cookie"===e.type?Ie(e.cookieOptions):{persistSession:qe,retrieveSession:je,clearSession:De},a=i.clearSession,s=i.retrieveSession,u=k((function(){Je({process:function(e){return d(e)?void 0:{}},after:f},i)}),Xe),c=function(){var e=s();if(d(e))return e;return{}}();function f(e){return d(e)||(e={}),l()&&(!function(e){return c.id!==e.id||c[t]!==e[t]}(e)?c=e:(c={},o.notify())),e}function l(){return void 0!==c[t]}function d(e){return(void 0===e.created||Z()-Number(e.created)<he)&&(void 0===e.expire||Z()<Number(e.expire))}return{expandOrRenewSession:O((function(){var e;Je({process:function(r){var o=f(r);return e=function(e){var r=n(e[t]),o=r.trackingType,i=r.isTracked;e[t]=o,i&&!e.id&&(e.id=ve(),e.created=String(Z()));return i}(o),o},after:function(t){e&&!l()&&function(e){c=e,r.notify()}(t),c=t}},i)}),Xe).throttled,expandSession:function(){Je({process:function(e){return l()?f(e):void 0}},i)},getSession:function(){return c},renewObservable:r,expireObservable:o,expire:function(){a(),f({})},stop:function(){_(u)}}}function Ye(e){return Qe(e,nt(window.location)).href}function Qe(e,t){var n=function(){if(void 0===et)try{var e=new tt("http://test/path");et="http://test/path"===e.href}catch(e){et=!1}return et?tt:void 0}();if(n)try{return void 0!==t?new n(e,t):new n(e)}catch(n){throw new Error("Failed to construct URL: ".concat(String(n)," ").concat(B({url:e,base:t})))}if(void 0===t&&!/:/.test(e))throw new Error("Invalid URL: '".concat(e,"'"));var r=document,o=r.createElement("a");if(void 0!==t){var i=(r=document.implementation.createHTMLDocument("")).createElement("base");i.href=t,r.head.appendChild(i),r.body.appendChild(o)}return o.href=e,o}var et,tt=URL;function nt(e){if(e.origin&&"null"!==e.origin)return e.origin;var t=e.host.replace(/(:80|:443)$/,"");return"".concat(e.protocol,"//").concat(t)}var rt="datad0g.com",ot="datadoghq.com",it="ap1.datadoghq.com",at={logs:"logs",rum:"rum",sessionReplay:"session-replay"},st={logs:"logs",rum:"rum",sessionReplay:"replay"};function ut(e,t,n){var r=function(e,t){var n="/api/v2/".concat(st[t]),r=e.proxy,o=e.proxyUrl;if(r){var i=Ye(r);return function(e){return"".concat(i,"?ddforward=").concat(encodeURIComponent("".concat(n,"?").concat(e)))}}var a=function(e,t){var n=e.site,r=void 0===n?ot:n,o=e.internalAnalyticsSubdomain;if(o&&r===ot)return"".concat(o,".").concat(ot);var i=r.split("."),a=i.pop(),s=r!==it?"".concat(at[t],"."):"";return"".concat(s,"browser-intake-").concat(i.join("-"),".").concat(a)}(e,t);if(void 0===r&&o){var s=Ye(o);return function(e){return"".concat(s,"?ddforward=").concat(encodeURIComponent("https://".concat(a).concat(n,"?").concat(e)))}}return function(e){return"https://".concat(a).concat(n,"?").concat(e)}}(e,t);return{build:function(o,i,a){var s=function(e,t,n,r,o,i){var a=e.clientToken,s=e.internalAnalyticsSubdomain,u=["sdk_version:".concat("4.48.1"),"api:".concat(r)].concat(n);o&&ae(J.COLLECT_FLUSH_REASON)&&u.push("flush_reason:".concat(o));i&&u.push("retry_count:".concat(i.count),"retry_after:".concat(i.lastFailureStatus));var c=["ddsource=browser","ddtags=".concat(encodeURIComponent(u.join(","))),"dd-api-key=".concat(a),"dd-evp-origin-version=".concat(encodeURIComponent("4.48.1")),"dd-evp-origin=browser","dd-request-id=".concat(ve())];"rum"===t&&c.push("batch_time=".concat(K()));s&&c.reverse();return c.join("&")}(e,t,n,o,i,a);return r(s)},urlPrefix:r(""),endpointType:t}}var ct=200;var ft=/[^a-z0-9_:./-]/;function lt(e,n){var r=ct-e.length-1;(n.length>r||ft.test(n))&&t.warn("".concat(e," value doesn't meet tag requirements and will be sanitized"));var o=n.replace(/,/g,"_");return"".concat(e,":").concat(o)}function dt(e){var t=function(e){var t=e.env,n=e.service,r=e.version,o=e.datacenter,i=[];return t&&i.push(lt("env",t)),n&&i.push(lt("service",n)),r&&i.push(lt("version",r)),o&&i.push(lt("datacenter",o)),i}(e),n=function(e,t){return{logsEndpointBuilder:ut(e,"logs",t),rumEndpointBuilder:ut(e,"rum",t),sessionReplayEndpointBuilder:ut(e,"sessionReplay",t)}}(e,t),r=p(n).map((function(e){return e.urlPrefix})),o=function(e,t,n){if(!e.replica)return;var r=h({},e,{site:ot,clientToken:e.replica.clientToken}),o={logsEndpointBuilder:ut(r,"logs",n),rumEndpointBuilder:ut(r,"rum",n)};return t.push.apply(t,p(o).map((function(e){return e.urlPrefix}))),h({applicationId:e.replica.applicationId},o)}(e,r,t);return h({isIntakeUrl:function(e){return r.some((function(t){return 0===e.indexOf(t)}))},replica:o,site:e.site||ot},n)}function vt(e){var n,o,i;if(e&&e.clientToken){var a=null!==(n=e.sessionSampleRate)&&void 0!==n?n:e.sampleRate;if(void 0===a||ce(a))if(void 0===e.telemetrySampleRate||ce(e.telemetrySampleRate)){if(void 0===e.telemetryConfigurationSampleRate||ce(e.telemetryConfigurationSampleRate))return Array.isArray(e.enableExperimentalFeatures)&&e.enableExperimentalFeatures.filter((function(e){return t=J,n=e,Object.keys(t).some((function(e){return t[e]===n}));var t,n})).forEach((function(e){ie.add(e)})),h({beforeSend:e.beforeSend&&r(e.beforeSend,"beforeSend threw an error:"),sessionStoreStrategyType:Ze(e),sessionSampleRate:null!=a?a:100,telemetrySampleRate:null!==(o=e.telemetrySampleRate)&&void 0!==o?o:20,telemetryConfigurationSampleRate:null!==(i=e.telemetryConfigurationSampleRate)&&void 0!==i?i:5,service:e.service,silentMultipleInit:!!e.silentMultipleInit,batchBytesLimit:16*m,eventRateLimiterThreshold:3e3,maxTelemetryEventsPerPage:15,flushTimeout:30*W,batchMessagesLimit:50,messageBytesLimit:256*m},dt(e));t.error("Telemetry Configuration Sample Rate should be a number between 0 and 100")}else t.error("Telemetry Sample Rate should be a number between 0 and 100");else t.error("Session Sample Rate should be a number between 0 and 100")}else t.error("Client Token is not configured, we will not send any data.")}var pt="?";function gt(e){var t=[],n=xt(e,"stack"),r=String(e);return n&&g(n,r)&&(n=n.slice(r.length)),n&&n.split("\n").forEach((function(e){var n=function(e){var t=mt.exec(e);if(!t)return;var n=t[2]&&0===t[2].indexOf("native"),r=t[2]&&0===t[2].indexOf("eval"),o=bt.exec(t[2]);r&&o&&(t[2]=o[1],t[3]=o[2],t[4]=o[3]);return{args:n?[t[2]]:[],column:t[4]?+t[4]:void 0,func:t[1]||pt,line:t[3]?+t[3]:void 0,url:n?void 0:t[2]}}(e)||function(e){var t=wt.exec(e);if(!t)return;return{args:[],column:t[3]?+t[3]:void 0,func:pt,line:t[2]?+t[2]:void 0,url:t[1]}}(e)||function(e){var t=St.exec(e);if(!t)return;return{args:[],column:t[4]?+t[4]:void 0,func:t[1]||pt,line:+t[3],url:t[2]}}(e)||function(e){var t=Et.exec(e);if(!t)return;var n=t[3]&&t[3].indexOf(" > eval")>-1,r=Ct.exec(t[3]);n&&r&&(t[3]=r[1],t[4]=r[2],t[5]=void 0);return{args:t[2]?t[2].split(","):[],column:t[5]?+t[5]:void 0,func:t[1]||pt,line:t[4]?+t[4]:void 0,url:t[3]}}(e);n&&(!n.func&&n.line&&(n.func=pt),t.push(n))})),{message:xt(e,"message"),name:xt(e,"name"),stack:t}}var ht="((?:file|https?|blob|chrome-extension|native|eval|webpack|snippet|<anonymous>|\\w+\\.|\\/).*?)",yt="(?::(\\d+))",mt=new RegExp("^\\s*at (.*?) ?\\(".concat(ht).concat(yt,"?").concat(yt,"?\\)?\\s*$"),"i"),bt=new RegExp("\\((\\S*)".concat(yt).concat(yt,"\\)"));var wt=new RegExp("^\\s*at ?".concat(ht).concat(yt,"?").concat(yt,"??\\s*$"),"i");var St=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i;var Et=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|capacitor|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,Ct=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;function xt(e,t){if("object"==typeof e&&e&&t in e){var n=e[t];return"string"==typeof n?n:void 0}}var kt="No stack, consider using an instance of Error";function _t(e){var t=e.stackTrace,n=e.originalError,r=e.handlingStack,o=e.startClocks,i=e.nonErrorPrefix,a=e.source,s=e.handling,u=n instanceof Error,c=function(e,t,n,r){return(null==e?void 0:e.message)&&(null==e?void 0:e.name)?e.message:t?"Empty message":"".concat(n," ").concat(B(q(r)))}(t,u,i,n),f=function(e,t){if(void 0===t)return!1;if(e)return!0;return t.stack.length>0&&(t.stack.length>1||void 0!==t.stack[0].url)}(u,t)?Rt(t):kt,l=u?function(e,t){var n=e,r=[];for(;(null==n?void 0:n.cause)instanceof Error&&r.length<10;){var o=gt(n.cause);r.push({message:n.cause.message,source:t,type:null==o?void 0:o.name,stack:o&&Rt(o)}),n=n.cause}return r.length?r:void 0}(n,a):void 0;return{startClocks:o,source:a,handling:s,handlingStack:r,originalError:n,type:null==t?void 0:t.name,message:c,stack:f,causes:l,fingerprint:Ot(n)}}function Ot(e){return e instanceof Error&&"dd_fingerprint"in e?String(e.dd_fingerprint):void 0}function Rt(e){var t=Tt(e);return e.stack.forEach((function(e){var n="?"===e.func?"<anonymous>":e.func,r=e.args&&e.args.length>0?"(".concat(e.args.join(", "),")"):"",o=e.line?":".concat(e.line):"",i=e.line&&e.column?":".concat(e.column):"";t+="\n at ".concat(n).concat(r," @ ").concat(e.url).concat(o).concat(i)})),t}function Tt(e){return"".concat(e.name||"Error",": ").concat(e.message)}function Lt(e,t,n,r,o){return At(e,t,[n],r,o)}function At(e,t,n,r,o){var i=void 0===o?{}:o,a=i.once,s=i.capture,u=i.passive,f=c(a?function(e){v(),r(e)}:r),l=u?{capture:s,passive:u}:s,d=E(t,"addEventListener");function v(){var e=E(t,"removeEventListener");n.forEach((function(n){return e.call(t,n,f,l)}))}return n.forEach((function(e){return d.call(t,e,f,l)})),{stop:v}}var Pt={intervention:"intervention",deprecation:"deprecation",cspViolation:"csp_violation"};function Bt(e,t){var n=[];d(t,Pt.cspViolation)&&n.push(function(e){var t=new le((function(){return Lt(e,document,"securitypolicyviolation",(function(e){t.notify(function(e){var t=Pt.cspViolation,n="'".concat(e.blockedURI,"' blocked by '").concat(e.effectiveDirective,"' directive");return{type:Pt.cspViolation,subtype:e.effectiveDirective,message:"".concat(t,": ").concat(n),stack:It(e.effectiveDirective,e.originalPolicy?"".concat(n,' of the policy "').concat(pe(e.originalPolicy,100,"..."),'"'):"no policy",e.sourceFile,e.lineNumber,e.columnNumber)}}(e))})).stop}));return t}(e));var r=t.filter((function(e){return e!==Pt.cspViolation}));return r.length&&n.push(function(e){var t=new le((function(){if(window.ReportingObserver){var n=c((function(e,n){return e.forEach((function(e){t.notify(function(e){var t=e.type,n=e.body;return{type:t,subtype:n.id,message:"".concat(t,": ").concat(n.message),stack:It(n.id,n.message,n.sourceFile,n.lineNumber,n.columnNumber)}}(e))}))})),r=new window.ReportingObserver(n,{types:e,buffered:!0});return r.observe(),function(){r.disconnect()}}}));return t}(r)),de.apply(void 0,n)}function It(e,t,n,r,o){return n?Rt({name:e,message:t,stack:[{func:"?",url:n,line:null!=r?r:void 0,column:null!=o?o:void 0}]}):void 0}var Nt=32*m;function Mt(e,n,r){return void 0===e?[]:"all"===e||Array.isArray(e)&&e.every((function(e){return d(n,e)}))?"all"===e?n:(o=e,i=new Set,o.forEach((function(e){return i.add(e)})),v(i)):void t.error("".concat(r,' should be "all" or an array with allowed values "').concat(n.join('", "'),'"'));var o,i}var Ut={AGENT:"agent",CONSOLE:"console",CUSTOM:"custom",LOGGER:"logger",NETWORK:"network",SOURCE:"source",REPORT:"report"},qt=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},jt={debug:"debug",error:"error",info:"info",warn:"warn"},Dt={console:"console",http:"http",silent:"silent"},Gt=Object.keys(jt),Ft=function(){function e(e,t,n,r,o){void 0===n&&(n=Dt.http),void 0===r&&(r=jt.debug),void 0===o&&(o={}),this.handleLogStrategy=e,this.handlerType=n,this.level=r,this.contextManager=H("logger context"),this.contextManager.set(h({},o,t?{logger:{name:t}}:void 0))}return e.prototype.log=function(e,t,n,r){var o;if(void 0===n&&(n=jt.info),n===jt.error&&(o={origin:Ut.LOGGER}),null!=r){var i=_t({stackTrace:r instanceof Error?gt(r):void 0,originalError:r,nonErrorPrefix:"Provided",source:Ut.LOGGER,handling:"handled",startClocks:Q()});o={origin:Ut.LOGGER,stack:i.stack,kind:i.type,message:i.message}}var a=q(t),s=o?P({error:o},a):a;this.handleLogStrategy({message:q(e),context:s,status:n},this)},e.prototype.debug=function(e,t,n){this.log(e,t,jt.debug,n)},e.prototype.info=function(e,t,n){this.log(e,t,jt.info,n)},e.prototype.warn=function(e,t,n){this.log(e,t,jt.warn,n)},e.prototype.error=function(e,t,n){this.log(e,t,jt.error,n)},e.prototype.setContext=function(e){this.contextManager.set(e)},e.prototype.getContext=function(){return this.contextManager.get()},e.prototype.addContext=function(e,t){this.contextManager.add(e,t)},e.prototype.removeContext=function(e){this.contextManager.remove(e)},e.prototype.setHandler=function(e){this.handlerType=e},e.prototype.getHandler=function(){return this.handlerType},e.prototype.setLevel=function(e){this.level=e},e.prototype.getLevel=function(){return this.level},qt([u],e.prototype,"log",null),e}();function Ht(e,t){var n=window.__ddBrowserSdkExtensionCallback;n&&n({type:e,payload:t})}var zt,Jt={log:"log",configuration:"configuration"},Vt=["https://www.datadoghq-browser-agent.com","https://www.datad0g-browser-agent.com","https://d3uc069fcn7uxw.cloudfront.net","https://d20xtzwzcl0ceb.cloudfront.net","http://localhost","<anonymous>"],Wt=["ddog-gov.com"],$t={maxEventsPerPage:0,sentEventCount:0,telemetryEnabled:!1,telemetryConfigurationEnabled:!1};function Xt(e,t){var n,r=new le;return $t.telemetryEnabled=!d(Wt,t.site)&&ue(t.telemetrySampleRate),$t.telemetryConfigurationEnabled=$t.telemetryEnabled&&ue(t.telemetryConfigurationSampleRate),zt=function(t){if($t.telemetryEnabled){var o=function(e,t){return P({type:"telemetry",date:K(),service:e,version:"4.48.1",source:"browser",_dd:{format_version:2},telemetry:t,experimental_features:v(se())},void 0!==n?n():{})}(e,t);r.notify(o),Ht("telemetry",o)}},o=Kt,h($t,{maxEventsPerPage:t.maxTelemetryEventsPerPage,sentEventCount:0}),{setContextProvider:function(e){n=e},observable:r,enabled:$t.telemetryEnabled}}function Zt(t,n){l(e.debug,t,n),Yt(h({type:Jt.log,message:t,status:"debug"},n))}function Kt(e,t){Yt(h({type:Jt.log,status:"error"},function(e){if(e instanceof Error){var t=gt(e);return{error:{kind:t.name,stack:Rt(Qt(t))},message:t.message}}return{error:{stack:kt},message:"".concat("Uncaught"," ").concat(B(e))}}(e),t))}function Yt(e){zt&&$t.sentEventCount<$t.maxEventsPerPage&&($t.sentEventCount+=1,zt(e))}function Qt(e){return e.stack=e.stack.filter((function(e){return!e.url||Vt.some((function(t){return g(e.url,t)}))})),e}var en={HIDDEN:"visibility_hidden",UNLOADING:"before_unload",PAGEHIDE:"page_hide",FROZEN:"page_frozen"};var tn="datadog-synthetics-public-id",nn="datadog-synthetics-result-id",rn="datadog-synthetics-injects-rum";function on(){return Boolean(window._DATADOG_SYNTHETICS_INJECTS_RUM||be(rn))}function an(){var e=window._DATADOG_SYNTHETICS_RESULT_ID||be(nn);return"string"==typeof e?e:void 0}var sn=function(){function e(e,t,n){var r=this;this.request=e,this.flushController=t,this.messageBytesLimit=n,this.pushOnlyBuffer=[],this.upsertBuffer={},this.flushController.flushObservable.subscribe((function(e){return r.flush(e)}))}return e.prototype.add=function(e){this.addOrUpdate(e)},e.prototype.upsert=function(e,t){this.addOrUpdate(e,t)},e.prototype.flush=function(e){var t=this.pushOnlyBuffer.concat(p(this.upsertBuffer));this.pushOnlyBuffer=[],this.upsertBuffer={};var n,r={data:t.join("\n"),bytesCount:e.bytesCount,flushReason:e.reason};n=e.reason,d(p(en),n)?this.request.sendOnExit(r):this.request.send(r)},e.prototype.addOrUpdate=function(e,n){var r=this.process(e),o=r.processedMessage,i=r.messageBytesCount;i>=this.messageBytesLimit?t.warn("Discarded a message whose size was bigger than the maximum allowed size ".concat(this.messageBytesLimit,"KB.")):(this.hasMessageFor(n)&&this.remove(n),this.push(o,i,n))},e.prototype.process=function(e){var t=B(e);return{processedMessage:t,messageBytesCount:S(t)}},e.prototype.push=function(e,t,n){var r=this.flushController.messagesCount>0?1:0;this.flushController.notifyBeforeAddMessage(t+r),void 0!==n?this.upsertBuffer[n]=e:this.pushOnlyBuffer.push(e),this.flushController.notifyAfterAddMessage()},e.prototype.remove=function(e){var t=this.upsertBuffer[e];delete this.upsertBuffer[e];var n=S(t),r=this.flushController.messagesCount>1?1:0;this.flushController.notifyAfterRemoveMessage(n+r)},e.prototype.hasMessageFor=function(e){return void 0!==e&&void 0!==this.upsertBuffer[e]},e}();function un(e){return e>=500}var cn=80*m,fn=32,ln=3*b,dn=$,vn=W;function pn(e,t,n,r,o){0===t.transportStatus&&0===t.queuedPayloads.size()&&t.bandwidthMonitor.canHandle(e)?hn(e,t,n,{onSuccess:function(){return yn(0,t,n,r,o)},onFailure:function(){t.queuedPayloads.enqueue(e),gn(t,n,r,o)}}):t.queuedPayloads.enqueue(e)}function gn(e,t,n,r){2===e.transportStatus&&C((function(){hn(e.queuedPayloads.first(),e,t,{onSuccess:function(){e.queuedPayloads.dequeue(),e.currentBackoffTime=vn,yn(1,e,t,n,r)},onFailure:function(){e.currentBackoffTime=Math.min(dn,2*e.currentBackoffTime),gn(e,t,n,r)}})}),e.currentBackoffTime)}function hn(e,t,n,r){var o=r.onSuccess,i=r.onFailure;t.bandwidthMonitor.add(e),n(e,(function(n){t.bandwidthMonitor.remove(e),!function(e){return"opaque"!==e.type&&(0===e.status&&!navigator.onLine||408===e.status||429===e.status||un(e.status))}(n)?(t.transportStatus=0,o()):(t.transportStatus=t.bandwidthMonitor.ongoingRequestCount>0?1:2,e.retry={count:e.retry?e.retry.count+1:1,lastFailureStatus:n.status},i())}))}function yn(e,t,n,r,o){0===e&&t.queuedPayloads.isFull()&&!t.queueFullReported&&(o({message:"Reached max ".concat(r," events size queued for upload: ").concat(ln/b,"MiB"),source:Ut.AGENT,startClocks:Q()}),t.queueFullReported=!0);var i=t.queuedPayloads;for(t.queuedPayloads=mn();i.size()>0;)pn(i.dequeue(),t,n,r,o)}function mn(){var e=[];return{bytesCount:0,enqueue:function(t){this.isFull()||(e.push(t),this.bytesCount+=t.bytesCount)},first:function(){return e[0]},dequeue:function(){var t=e.shift();return t&&(this.bytesCount-=t.bytesCount),t},size:function(){return e.length},isFull:function(){return this.bytesCount>=ln}}}function bn(e,t,n,r){var o={transportStatus:0,currentBackoffTime:vn,bandwidthMonitor:{ongoingRequestCount:0,ongoingByteCount:0,canHandle:function(e){return 0===this.ongoingRequestCount||this.ongoingByteCount+e.bytesCount<=cn&&this.ongoingRequestCount<fn},add:function(e){this.ongoingRequestCount+=1,this.ongoingByteCount+=e.bytesCount},remove:function(e){this.ongoingRequestCount-=1,this.ongoingByteCount-=e.bytesCount}},queuedPayloads:mn(),queueFullReported:!1},i=function(r,o){return function(e,t,n,r,o){var i=r.data,a=r.bytesCount,s=r.flushReason,u=r.retry,f=function(){try{return window.Request&&"keepalive"in new Request("http://a")}catch(e){return!1}}()&&a<n;if(f){var l=t.build("fetch",s,u);fetch(l,{method:"POST",body:i,keepalive:!0,mode:"cors"}).then(c((function(e){return null==o?void 0:o({status:e.status,type:e.type})})),c((function(){var n=t.build("xhr",s,u);Sn(e,n,i,o)})))}else{var d=t.build("xhr",s,u);Sn(e,d,i,o)}}(e,t,n,r,o)};return{send:function(e){pn(e,o,i,t.endpointType,r)},sendOnExit:function(r){!function(e,t,n,r){var o=r.data,i=r.bytesCount,a=r.flushReason,s=!!navigator.sendBeacon&&i<n;if(s)try{var u=t.build("beacon",a);if(navigator.sendBeacon(u,o))return}catch(e){!function(e){wn||(wn=!0,Kt(e))}(e)}var c=t.build("xhr",a);Sn(e,c,o)}(e,t,n,r)}}}var wn=!1;function Sn(e,t,n,r){var o=new XMLHttpRequest;o.open("POST",t,!0),Lt(e,o,"loadend",(function(){null==r||r({status:o.status})}),{once:!0}),o.send(n)}function En(e){var t=e.messagesLimit,n=e.bytesLimit,r=e.durationLimit,o=e.pageExitObservable,i=e.sessionExpireObservable,a=new le;o.subscribe((function(e){return f(e.reason)})),i.subscribe((function(){return f("session_expire")}));var s,u=0,c=0;function f(e){if(0!==c){var t=c,n=u;c=0,u=0,l(),a.notify({reason:e,messagesCount:t,bytesCount:n})}}function l(){x(s),s=void 0}return{flushObservable:a,get messagesCount(){return c},notifyBeforeAddMessage:function(e){u+e>=n&&f("bytes_limit"),c+=1,u+=e,void 0===s&&(s=C((function(){f("duration_limit")}),r))},notifyAfterAddMessage:function(){c>=t?f("messages_limit"):u>=n&&f("bytes_limit")},notifyAfterRemoveMessage:function(e){u-=e,0===(c-=1)&&l()}}}function Cn(e,t,n,r,o,i){var a=u(e,t.endpoint),s=n&&u(e,n.endpoint);function u(e,t){return new sn(bn(e,t,e.batchBytesLimit,r),En({messagesLimit:e.batchMessagesLimit,bytesLimit:e.batchBytesLimit,durationLimit:e.flushTimeout,pageExitObservable:o,sessionExpireObservable:i}),e.messageBytesLimit)}return{flushObservable:a.flushController.flushObservable,add:function(e,t){void 0===t&&(t=!0),a.add(e),s&&t&&s.add(n.transformMessage?n.transformMessage(e):e)},upsert:function(e,t){a.upsert(e,t),s&&s.upsert(n.transformMessage?n.transformMessage(e):e,t)}}}var xn=1/0,kn=$,_n=function(){function e(e,t){var n=this;this.expireDelay=e,this.maxEntries=t,this.entries=[],this.clearOldValuesInterval=k((function(){return n.clearOldValues()}),kn)}return e.prototype.add=function(e,t){var n=this,r={value:e,startTime:t,endTime:xn,remove:function(){var e=n.entries.indexOf(r);e>=0&&n.entries.splice(e,1)},close:function(e){r.endTime=e}};return this.maxEntries&&this.entries.length>=this.maxEntries&&this.entries.pop(),this.entries.unshift(r),r},e.prototype.find=function(e){void 0===e&&(e=xn);for(var t=0,n=this.entries;t<n.length;t++){var r=n[t];if(r.startTime<=e){if(e<=r.endTime)return r.value;break}}},e.prototype.closeActive=function(e){var t=this.entries[0];t&&t.endTime===xn&&t.close(e)},e.prototype.findAll=function(e,t){void 0===e&&(e=xn),void 0===t&&(t=0);var n=ee(e,t);return this.entries.filter((function(t){return t.startTime<=n&&e<=t.endTime})).map((function(e){return e.value}))},e.prototype.reset=function(){this.entries=[]},e.prototype.stop=function(){_(this.clearOldValuesInterval)},e.prototype.clearOldValues=function(){for(var e=Y()-this.expireDelay;this.entries.length>0&&this.entries[this.entries.length-1].endTime<e;)this.entries.pop()},e}(),On=$,Rn=he,Tn=[];function Ln(e,t,n){var r=Ke(e.sessionStoreStrategyType,t,n);Tn.push((function(){return r.stop()}));var o,i=new _n(Rn);function a(){return{id:r.getSession().id,trackingType:r.getSession()[t]}}return Tn.push((function(){return i.stop()})),r.renewObservable.subscribe((function(){i.add(a(),Y())})),r.expireObservable.subscribe((function(){i.closeActive(Y())})),r.expandOrRenewSession(),i.add(a(),[0,te()][0]),o=At(0,window,["click","touchstart","keydown","scroll"],(function(){return r.expandOrRenewSession()}),{capture:!0,passive:!0}).stop,Tn.push(o),function(e,t){var n=function(){"visible"===document.visibilityState&&t()},r=Lt(e,document,"visibilitychange",n).stop;Tn.push(r);var o=k(n,On);Tn.push((function(){_(o)}))}(e,(function(){return r.expandSession()})),{findActiveSession:function(e){return i.find(e)},renewObservable:r.renewObservable,expireObservable:r.expireObservable,expire:r.expire}}var An,Pn="logs";function Bn(e){var t=Ln(e,Pn,(function(t){return function(e,t){var n=function(e){return"0"===e||"1"===e}(t)?t:In(e);return{trackingType:n,isTracked:"1"===n}}(e,t)}));return{findTrackedSession:function(e){var n=t.findActiveSession(e);return n&&"1"===n.trackingType?{id:n.id}:void 0},expireObservable:t.expireObservable}}function In(e){return ue(e.sessionSampleRate)?"1":"0"}var Nn=((An={})[jt.debug]=0,An[jt.info]=1,An[jt.warn]=2,An[jt.error]=3,An);function Mn(e,t,n){var r=n.getHandler(),o=Array.isArray(r)?r:[r];return Nn[e]>=Nn[n.getLevel()]&&d(o,t)}function Un(e,t,n,r,o,i){var a=Gt.concat(["custom"]),s={};a.forEach((function(e){var n,r,o,a,u;s[e]=(n=e,r=t.eventRateLimiterThreshold,o=i,a=0,u=!1,{isLimitReached:function(){if(0===a&&C((function(){a=0}),$),(a+=1)<=r||u)return u=!1,!1;if(a===r+1){u=!0;try{o({message:"Reached max number of ".concat(n,"s by minute: ").concat(r),source:Ut.AGENT,startClocks:Q()})}finally{u=!1}}return!0}})})),n.subscribe(0,(function(i){var a,u,c,f=i.rawLogsEvent,l=i.messageContext,d=void 0===l?void 0:l,v=i.savedCommonContext,p=void 0===v?void 0:v,g=i.logger,h=void 0===g?o:g,y=f.date-te(),m=e.findTrackedSession(y);if(m){var b=p||r(),w=P({service:t.service,session_id:m.id,usr:fe(b.user)?void 0:b.user,view:b.view},b.context,jn(y),f,h.getContext(),d);!Mn(f.status,Dt.http,h)||!1===(null===(a=t.beforeSend)||void 0===a?void 0:a.call(t,w))||(null===(u=w.error)||void 0===u?void 0:u.origin)!==Ut.AGENT&&(null!==(c=s[w.status])&&void 0!==c?c:s.custom).isLimitReached()||n.notify(1,w)}}))}var qn=!1;function jn(e){var t,n=window;if(on()){var r=o(n.DD_RUM_SYNTHETICS);return r||qn||(qn=!0,Zt("Logs sent before RUM is injected by the synthetics worker",{testId:(t=window._DATADOG_SYNTHETICS_PUBLIC_ID||be(tn),"string"==typeof t?t:void 0),resultId:an()})),r}return o(n.DD_RUM);function o(t){if(t&&t.getInternalContext)return t.getInternalContext(e)}}var Dn,Gn={};function Fn(t){var r=t.map((function(t){return Gn[t]||(Gn[t]=function(t){var r=new le((function(){var o=n[t];return n[t]=function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];o.apply(console,n);var a=function(){var e,t=new Error;if(!t.stack)try{throw t}catch(e){}return f((function(){var n=gt(t);n.stack=n.stack.slice(2),e=Rt(n)})),e}();f((function(){r.notify(function(t,n,r){var o,i,a=t.map((function(e){return function(e){if("string"==typeof e)return q(e);if(e instanceof Error)return Tt(gt(e));return B(q(e),void 0,2)}(e)})).join(" ");if(n===e.error){var s=function(e,t){for(var n=0;n<e.length;n+=1){var r=e[n];if(t(r,n))return r}}(t,(function(e){return e instanceof Error}));o=s?Rt(gt(s)):void 0,i=Ot(s),a="console error: ".concat(a)}return{api:n,message:a,stack:o,handlingStack:r,fingerprint:i}}(n,t,a))}))},function(){n[t]=o}}));return r}(t)),Gn[t]}));return de.apply(void 0,r)}var Hn,zn=((Dn={})[e.log]=jt.info,Dn[e.debug]=jt.debug,Dn[e.info]=jt.info,Dn[e.warn]=jt.warn,Dn[e.error]=jt.error,Dn);var Jn,Vn=((Hn={})[Pt.cspViolation]=jt.error,Hn[Pt.intervention]=jt.error,Hn[Pt.deprecation]=jt.warn,Hn);function Wn(e,t,n){var r=e[t],o=n(r),i=function(){if("function"==typeof o)return o.apply(this,arguments)};return e[t]=i,{stop:function(){e[t]===i?e[t]=r:o=r}}}function $n(e,t,n){var r=n.before,o=n.after;return Wn(e,t,(function(e){return function(){var t,n=arguments;return r&&f(r,this,n),"function"==typeof e&&(t=e.apply(this,n)),o&&f(o,this,n),t}}))}var Xn,Zn=new WeakMap;function Kn(e){return Jn||(Jn=function(e){var t=new le((function(){var n=$n(XMLHttpRequest.prototype,"open",{before:Yn}).stop,r=$n(XMLHttpRequest.prototype,"send",{before:function(){Qn.call(this,e,t)}}).stop,o=$n(XMLHttpRequest.prototype,"abort",{before:er}).stop;return function(){n(),r(),o()}}));return t}(e)),Jn}function Yn(e,t){Zn.set(this,{state:"open",method:e,url:Ye(String(t))})}function Qn(e,t){var n=this,r=Zn.get(this);if(r){var o=r;o.state="start",o.startTime=Y(),o.startClocks=Q(),o.isAborted=!1,o.xhr=this;var i=!1,a=$n(this,"onreadystatechange",{before:function(){this.readyState===XMLHttpRequest.DONE&&s()}}).stop,s=function(){if(u(),a(),!i){i=!0;var e,s=r;s.state="complete",s.duration=(e=o.startClocks.timeStamp,K()-e),s.status=n.status,t.notify(h({},s))}},u=Lt(e,this,"loadend",s).stop;t.notify(o)}}function er(){var e=Zn.get(this);e&&(e.isAborted=!0)}function tr(){var e;return Xn||(e=new le((function(){if(window.fetch)return Wn(window,"fetch",(function(t){return function(n,r){var o,i=f(nr,null,[e,n,r]);return i?(o=t.call(this,i.input,i.init),f(rr,null,[e,o,i])):o=t.call(this,n,r),o}})).stop})),Xn=e),Xn}function nr(e,t,n){var r=n&&n.method||t instanceof Request&&t.method||"GET",o=t instanceof Request?t.url:Ye(String(t)),i={state:"start",init:n,input:t,method:r,startClocks:Q(),url:o};return e.notify(i),i}function rr(e,t,n){var r=function(t){var r=n;r.state="resolve","stack"in t||t instanceof Error?(r.status=0,r.isAborted=t instanceof DOMException&&t.code===DOMException.ABORT_ERR,r.error=t):"status"in t&&(r.response=t,r.responseType=t.type,r.status=t.status,r.isAborted=!1),e.notify(r)};t.then(c(r),c(r))}function or(e,t){if(!e.forwardErrorsToLogs)return{stop:R};var n=Kn(e).subscribe((function(e){"complete"===e.state&&o("xhr",e)})),r=tr().subscribe((function(e){"resolve"===e.state&&o("fetch",e)}));function o(n,r){function o(e){t.notify(0,{rawLogsEvent:{message:"".concat(ar(n)," error ").concat(r.method," ").concat(r.url),date:r.startClocks.timeStamp,error:{origin:Ut.NETWORK,stack:e||"Failed to load"},http:{method:r.method,status_code:r.status,url:r.url},status:jt.error,origin:Ut.NETWORK}})}e.isIntakeUrl(r.url)||!function(e){return 0===e.status&&"opaque"!==e.responseType}(r)&&!un(r.status)||("xhr"in r?function(e,t,n){"string"==typeof e.response?n(ir(e.response,t)):n(e.response)}(r.xhr,e,o):r.response?function(e,t,n){var r=function(e){try{return e.clone()}catch(e){return}}(e);r&&r.body?window.TextDecoder?function(e,t,n){!function(e,t,n){var r=e.getReader(),o=[],i=0;function a(){var e,a;if(r.cancel().catch(R),n.collectStreamBody){var s;if(1===o.length)s=o[0];else{s=new Uint8Array(i);var u=0;o.forEach((function(e){s.set(e,u),u+=e.length}))}e=s.slice(0,n.bytesLimit),a=s.length>n.bytesLimit}t(void 0,e,a)}!function e(){r.read().then(c((function(t){t.done?a():(n.collectStreamBody&&o.push(t.value),(i+=t.value.length)>n.bytesLimit?a():e())})),c((function(e){return t(e)})))}()}(e,(function(e,t,r){if(e)n(e);else{var o=(new TextDecoder).decode(t);r&&(o+="..."),n(void 0,o)}}),{bytesLimit:t,collectStreamBody:!0})}(r.body,t.requestErrorResponseLengthLimit,(function(e,t){n(e?"Unable to retrieve response: ".concat(e):t)})):r.text().then(c((function(e){return n(ir(e,t))})),c((function(e){return n("Unable to retrieve response: ".concat(e))}))):n()}(r.response,e,o):r.error&&function(e,t,n){n(ir(Rt(gt(e)),t))}(r.error,e,o))}return{stop:function(){n.unsubscribe(),r.unsubscribe()}}}function ir(e,t){return e.length>t.requestErrorResponseLengthLimit?"".concat(e.substring(0,t.requestErrorResponseLengthLimit),"..."):e}function ar(e){return"xhr"===e?"XHR":"Fetch"}var sr=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?([\s\S]*)$/;function ur(e){var t=function(e){return $n(window,"onerror",{before:function(t,n,r,o,i){var a;if(i instanceof Error)a=gt(i);else{var s=[{url:n,column:o,line:r}],u=function(e){var t,n,r;"[object String]"==={}.toString.call(e)&&(n=(t=sr.exec(e))[1],r=t[2]);return{name:n,message:r}}(t);a={name:u.name,message:u.message,stack:s}}e(a,null!=i?i:t)}})}(e).stop,n=function(e){return $n(window,"onunhandledrejection",{before:function(t){var n=t.reason||"Empty reason",r=gt(n);e(r,n)}})}(e).stop;return{stop:function(){t(),n()}}}function cr(e,t){if(!e.forwardErrorsToLogs)return{stop:R};var n,r=new le,o=(n=r,ur((function(e,t){n.notify(_t({stackTrace:e,originalError:t,startClocks:Q(),nonErrorPrefix:"Uncaught",source:Ut.SOURCE,handling:"unhandled"}))}))).stop,i=r.subscribe((function(e){t.notify(0,{rawLogsEvent:{message:e.message,date:e.startClocks.timeStamp,error:{kind:e.type,origin:Ut.SOURCE,stack:e.stack},origin:Ut.SOURCE,status:jt.error}})}));return{stop:function(){o(),i.unsubscribe()}}}var fr=function(){function e(){this.callbacks={}}return e.prototype.notify=function(e,t){var n=this.callbacks[e];n&&n.forEach((function(e){return e(t)}))},e.prototype.subscribe=function(e,t){var n=this;return this.callbacks[e]||(this.callbacks[e]=[]),this.callbacks[e].push(t),{unsubscribe:function(){n.callbacks[e]=n.callbacks[e].filter((function(e){return t!==e}))}}},e}();var lr,dr,vr,pr,gr=function(n){var r,o,i=!1,a=H("global context"),u=H("user"),f={},l=function(){},v=new V,g=function(e,t,n,r){void 0===n&&(n=A(b())),void 0===r&&(r=K()),v.add((function(){return g(e,t,n,r)}))},y=function(){},m=new Ft((function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return g.apply(void 0,e)}));function b(){return{view:{referrer:document.referrer,url:window.location.href},context:a.getContext(),user:u.getContext()}}return r={logger:m,init:c((function(r){var o;if(y=function(){return A(r)},re()&&(r=function(e){return h({},e,{clientToken:"empty"})}(r)),function(e){return!i||(e.silentMultipleInit||t.error("DD_LOGS is already initialized."),!1)}(r)){var a=function(t){var n=vt(t),r=Mt(t.forwardConsoleLogs,p(e),"Forward Console Logs"),o=Mt(t.forwardReports,p(Pt),"Forward Reports");if(n&&r&&o)return t.forwardErrorsToLogs&&!d(r,e.error)&&r.push(e.error),h({forwardErrorsToLogs:!1!==t.forwardErrorsToLogs,forwardConsoleLogs:r,forwardReports:o,requestErrorResponseLengthLimit:Nt},n)}(r);a&&(o=n(r,a,b,m),g=o.handleLog,l=o.getInternalContext,v.drain(),i=!0)}})),getLoggerGlobalContext:c(a.get),getGlobalContext:c(a.getContext),setLoggerGlobalContext:c(a.set),setGlobalContext:c(a.setContext),addLoggerGlobalContext:c(a.add),setGlobalContextProperty:c(a.setContextProperty),removeLoggerGlobalContext:c(a.remove),removeGlobalContextProperty:c(a.removeContextProperty),clearGlobalContext:c(a.clearContext),createLogger:c((function(e,t){return void 0===t&&(t={}),f[e]=new Ft((function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return g.apply(void 0,e)}),q(e),t.handler,t.level,q(t.context)),f[e]})),getLogger:c((function(e){return f[e]})),getInitConfiguration:c((function(){return y()})),getInternalContext:c((function(e){return l(e)})),setUser:c((function(e){(function(e){var n="object"===T(e);return n||t.error("Unsupported user:",e),n})(e)&&u.setContext(oe(e))})),getUser:c(u.getContext),setUserProperty:c((function(e,t){var n,r=oe((n={},n[e]=t,n))[e];u.setContextProperty(e,r)})),removeUserProperty:c(u.removeContextProperty),clearUser:c(u.clearContext)},o=h({version:"4.48.1",onReady:function(e){e()}},r),Object.defineProperty(o,"_setDebug",{get:function(){return s},enumerable:!1}),o}((function(n,r,o,i){var a=new fr;a.subscribe(1,(function(e){return Ht("logs",e)}));var s=function(e){a.notify(0,{rawLogsEvent:{message:e.message,date:e.startClocks.timeStamp,error:{origin:Ut.AGENT},origin:Ut.AGENT,status:jt.error}}),Zt("Error reported to customer",{"error.message":e.message})},u=function(e){var t=new le((function(){var n=ae(J.PAGEHIDE),r=At(0,window,["visibilitychange","freeze","pagehide"],(function(e){"pagehide"===e.type&&n?t.notify({reason:en.PAGEHIDE}):"visibilitychange"===e.type&&"hidden"===document.visibilityState?t.notify({reason:en.HIDDEN}):"freeze"===e.type&&t.notify({reason:en.FROZEN})}),{capture:!0}).stop,o=R;return n||(o=Lt(e,window,"beforeunload",(function(){t.notify({reason:en.UNLOADING})})).stop),function(){r(),o()}}));return t}(r),c=!r.sessionStoreStrategyType||re()||on()?function(e){var t="1"===In(e)?{}:void 0;return{findTrackedSession:function(){return t},expireObservable:new le}}(r):Bn(r);(function(e,t,n,r){var o=Xt("browser-logs-sdk",e);if(re()){var i=ne();o.observable.subscribe((function(e){return i.send("internal_telemetry",e)}))}else{var a=Cn(e,{endpoint:e.rumEndpointBuilder},e.replica&&{endpoint:e.replica.rumEndpointBuilder},t,n,r);o.observable.subscribe((function(t){return a.add(t,function(e){return e.site===rt}(e))}))}return o})(r,s,u,c.expireObservable).setContextProvider((function(){var e,t,n,r,o,i;return{application:{id:null===(e=jn())||void 0===e?void 0:e.application_id},session:{id:null===(t=c.findTrackedSession())||void 0===t?void 0:t.id},view:{id:null===(r=null===(n=jn())||void 0===n?void 0:n.view)||void 0===r?void 0:r.id},action:{id:null===(i=null===(o=jn())||void 0===o?void 0:o.user_action)||void 0===i?void 0:i.id}}})),or(r,a),cr(r,a),function(t,n){var r=Fn(t.forwardConsoleLogs).subscribe((function(t){n.notify(0,{rawLogsEvent:{date:K(),message:t.message,origin:Ut.CONSOLE,error:t.api===e.error?{origin:Ut.CONSOLE,stack:t.stack,fingerprint:t.fingerprint}:void 0,status:zn[t.api]}})}))}(r,a),function(e,t){var n=Bt(e,e.forwardReports).subscribe((function(e){var n,r=e.message,o=Vn[e.type];o===jt.error?n={kind:e.subtype,origin:Ut.REPORT,stack:e.stack}:e.stack&&(r+=" Found in ".concat(function(e){var t;return null===(t=/@ (.+)/.exec(e))||void 0===t?void 0:t[1]}(e.stack))),t.notify(0,{rawLogsEvent:{date:K(),message:r,origin:Ut.REPORT,error:n,status:o}})}))}(r,a);var f,l=function(e){return{handleLog:function(n,r,o,i){var a=n.context;Mn(n.status,Dt.console,r)&&t(n.status,n.message,P(r.getContext(),a)),e.notify(0,{rawLogsEvent:{date:i||K(),message:n.message,status:n.status,origin:Ut.LOGGER},messageContext:a,savedCommonContext:o,logger:r})}}}(a).handleLog;return Un(c,r,a,o,i,s),re()?function(e){var t=ne();e.subscribe(1,(function(e){t.send("log",e)}))}(a):function(e,t,n,r,o){var i=Cn(e,{endpoint:e.logsEndpointBuilder},e.replica&&{endpoint:e.replica.logsEndpointBuilder},n,r,o);t.subscribe(1,(function(e){i.add(e)}))}(r,a,s,u,c.expireObservable),function(e){$t.telemetryConfigurationEnabled&&Yt({type:Jt.configuration,configuration:e})}(function(e){var t=function(e){var t,n,r=null!==(t=e.proxy)&&void 0!==t?t:e.proxyUrl;return{session_sample_rate:null!==(n=e.sessionSampleRate)&&void 0!==n?n:e.sampleRate,telemetry_sample_rate:e.telemetrySampleRate,telemetry_configuration_sample_rate:e.telemetryConfigurationSampleRate,use_before_send:!!e.beforeSend,use_cross_site_session_cookie:e.useCrossSiteSessionCookie,use_secure_session_cookie:e.useSecureSessionCookie,use_proxy:void 0!==r?!!r:void 0,silent_multiple_init:e.silentMultipleInit,track_session_across_subdomains:e.trackSessionAcrossSubdomains,track_resources:e.trackResources,track_long_task:e.trackLongTasks,allow_fallback_to_local_storage:!!e.allowFallbackToLocalStorage}}(e);return h({forward_errors_to_logs:e.forwardErrorsToLogs,forward_console_logs:e.forwardConsoleLogs,forward_reports:e.forwardReports},t)}(n)),{handleLog:l,getInternalContext:(f=c,{get:function(e){var t=f.findTrackedSession(e);if(t)return{session_id:t.id}}}).get}}));lr=y(),vr=gr,pr=lr[dr="DD_LOGS"],lr[dr]=vr,pr&&pr.q&&pr.q.forEach((function(e){return r(e,"onReady callback threw an error:")()}))}();
!function(){"use strict";var e={log:"log",debug:"debug",info:"info",warn:"warn",error:"error"},t=function(n){for(var r=[],o=1;o<arguments.length;o++)r[o-1]=arguments[o];Object.prototype.hasOwnProperty.call(e,n)||(n=e.log),t[n].apply(t,r)},n=console;function r(e,n){return function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];try{return e.apply(void 0,r)}catch(e){t.error(n,e)}}}t.debug=n.debug.bind(n),t.log=n.log.bind(n),t.info=n.info.bind(n),t.warn=n.warn.bind(n),t.error=n.error.bind(n);var o,i=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))},a=!1;function s(e){a=e}function u(e,t,n){var r=n.value;n.value=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return(o?c(r):r).apply(this,e)}}function c(e){return function(){return f(e,this,arguments)}}function f(t,n,r){try{return t.apply(n,r)}catch(t){if(l(e.error,t),o)try{o(t)}catch(t){l(e.error,t)}}}function l(e){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];a&&t.apply(void 0,i([e,"[MONITOR]"],n,!1))}function d(e,t){return-1!==e.indexOf(t)}function v(e){if(Array.from)return Array.from(e);var t=[];if(e instanceof Set)e.forEach((function(e){return t.push(e)}));else for(var n=0;n<e.length;n++)t.push(e[n]);return t}function p(e){return Object.keys(e).map((function(t){return e[t]}))}function g(e,t){return e.slice(0,t.length)===t}function h(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.forEach((function(t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})),e}function y(){if("object"==typeof globalThis)return globalThis;Object.defineProperty(Object.prototype,"_dd_temp_",{get:function(){return this},configurable:!0});var e=_dd_temp_;return delete Object.prototype._dd_temp_,"object"!=typeof e&&(e="object"==typeof self?self:"object"==typeof window?window:{}),e}var m=1024,b=1024*m,w=/[^\u0000-\u007F]/;function S(e){return w.test(e)?void 0!==window.TextEncoder?(new TextEncoder).encode(e).length:new Blob([e]).size:e.length}function E(e,t){var n,r=y();return r.Zone&&"function"==typeof r.Zone.__symbol__&&(n=e[r.Zone.__symbol__(t)]),n||(n=e[t]),n}function C(e,t){return E(y(),"setTimeout")(c(e),t)}function x(e){E(y(),"clearTimeout")(e)}function k(e,t){return E(y(),"setInterval")(c(e),t)}function _(e){E(y(),"clearInterval")(e)}function O(e,t,n){var r,o,i=!n||void 0===n.leading||n.leading,a=!n||void 0===n.trailing||n.trailing,s=!1;return{throttled:function(){for(var n=[],u=0;u<arguments.length;u++)n[u]=arguments[u];s?r=n:(i?e.apply(void 0,n):r=n,s=!0,o=C((function(){a&&r&&e.apply(void 0,r),s=!1,r=void 0}),t))},cancel:function(){x(o),s=!1,r=void 0}}}function R(){}function T(e){return null===e?"null":Array.isArray(e)?"array":typeof e}function L(e,t,n){if(void 0===n&&(n=function(){if("undefined"!=typeof WeakSet){var e=new WeakSet;return{hasAlreadyBeenSeen:function(t){var n=e.has(t);return n||e.add(t),n}}}var t=[];return{hasAlreadyBeenSeen:function(e){var n=t.indexOf(e)>=0;return n||t.push(e),n}}}()),void 0===t)return e;if("object"!=typeof t||null===t)return t;if(t instanceof Date)return new Date(t.getTime());if(t instanceof RegExp){var r=t.flags||[t.global?"g":"",t.ignoreCase?"i":"",t.multiline?"m":"",t.sticky?"y":"",t.unicode?"u":""].join("");return new RegExp(t.source,r)}if(!n.hasAlreadyBeenSeen(t)){if(Array.isArray(t)){for(var o=Array.isArray(e)?e:[],i=0;i<t.length;++i)o[i]=L(o[i],t[i],n);return o}var a="object"===T(e)?e:{};for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(a[s]=L(a[s],t[s],n));return a}}function A(e){return L(void 0,e)}function P(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var r=0,o=t;r<o.length;r++){var i=o[r];null!=i&&(e=L(e,i))}return e}function B(e,t,n){if("object"!=typeof e||null===e)return JSON.stringify(e);var r=I(Object.prototype),o=I(Array.prototype),i=I(Object.getPrototypeOf(e)),a=I(e);try{return JSON.stringify(e,t,n)}catch(e){return"<error: unable to serialize object>"}finally{r(),o(),i(),a()}}function I(e){var t=e,n=t.toJSON;return n?(delete t.toJSON,function(){t.toJSON=n}):R}var N=220*m,M="$",U=3;function q(e,t){var n;void 0===t&&(t=N);var r=I(Object.prototype),o=I(Array.prototype),i=[],a=new WeakMap,s=j(e,M,void 0,i,a),u=(null===(n=JSON.stringify(s))||void 0===n?void 0:n.length)||0;if(!(u>t)){for(;i.length>0&&u<t;){var c=i.shift(),f=0;if(Array.isArray(c.source))for(var l=0;l<c.source.length;l++){if(u+=void 0!==(d=j(c.source[l],c.path,l,i,a))?JSON.stringify(d).length:4,u+=f,f=1,u>t){D(t,"truncated",e);break}c.target[l]=d}else for(var l in c.source)if(Object.prototype.hasOwnProperty.call(c.source,l)){var d;if(void 0!==(d=j(c.source[l],c.path,l,i,a))&&(u+=JSON.stringify(d).length+f+l.length+U,f=1),u>t){D(t,"truncated",e);break}c.target[l]=d}}return r(),o(),s}D(t,"discarded",e)}function j(e,t,n,r,o){var i=function(e){var t=e;if(t&&"function"==typeof t.toJSON)try{return t.toJSON()}catch(e){}return e}(e);if(!i||"object"!=typeof i)return function(e){if("bigint"==typeof e)return"[BigInt] ".concat(e.toString());if("function"==typeof e)return"[Function] ".concat(e.name||"unknown");if("symbol"==typeof e)return"[Symbol] ".concat(e.description||e.toString());return e}(i);var a=function(e){try{if(e instanceof Event)return{isTrusted:e.isTrusted};var t=Object.prototype.toString.call(e).match(/\[object (.*)\]/);if(t&&t[1])return"[".concat(t[1],"]")}catch(e){}return"[Unserializable]"}(i);if("[Object]"!==a&&"[Array]"!==a&&"[Error]"!==a)return a;var s=e;if(o.has(s))return"[Reference seen at ".concat(o.get(s),"]");var u=void 0!==n?"".concat(t,".").concat(n):t,c=Array.isArray(i)?[]:{};return o.set(s,u),r.push({source:i,target:c,path:u}),c}function D(e,n,r){t.warn("The data provided has been ".concat(n," as it is over the limit of ").concat(e," characters:"),r)}var G=3*m;var F=200;function H(e,n){void 0===n&&(n=S);var r,o={},i=!1,a=O((function(o){r=n(B(o)),i||(i=function(e,n){return e>G&&(t.warn("The ".concat(n," data exceeds the recommended ").concat(G/m,"KiB threshold. More details: https://docs.datadoghq.com/real_user_monitoring/browser/troubleshooting/#customer-data-exceeds-the-recommended-3kib-warning")),!0)}(r,e))}),F).throttled,s={getBytesCount:function(){return r},get:function(){return o},add:function(e,t){o[e]=t,a(o)},remove:function(e){delete o[e],a(o)},set:function(e){a(o=e)},getContext:function(){return A(o)},setContext:function(e){"object"===T(e)?(o=q(e),a(o)):s.clearContext()},setContextProperty:function(e,t){o[e]=q(t),a(o)},removeContextProperty:function(e){delete o[e],a(o)},clearContext:function(){o={},r=0}};return s}var z,J,V=function(){function e(){this.buffer=[]}return e.prototype.add=function(e){this.buffer.push(e)>500&&this.buffer.splice(0,1)},e.prototype.drain=function(){this.buffer.forEach((function(e){return e()})),this.buffer.length=0},e}(),W=1e3,$=60*W,X=60*$;function Z(){return(new Date).getTime()}function K(){return Z()}function Y(){return performance.now()}function Q(){return{relative:Y(),timeStamp:K()}}function ee(e,t){return e+t}function te(){return void 0===z&&(z=performance.timing.navigationStart),z}function ne(){var e=y().DatadogEventBridge;if(e)return{getAllowedWebViewHosts:function(){return JSON.parse(e.getAllowedWebViewHosts())},send:function(t,n){e.send(JSON.stringify({eventType:t,event:n}))}}}function re(e){var t;void 0===e&&(e=null===(t=y().location)||void 0===t?void 0:t.hostname);var n=ne();return!!n&&n.getAllowedWebViewHosts().some((function(t){return e===t||(n=e,r=".".concat(t),n.slice(-r.length)===r);var n,r}))}function oe(e){var t=h({},e);return["id","name","email"].forEach((function(e){e in t&&(t[e]=String(t[e]))})),t}!function(e){e.PAGEHIDE="pagehide",e.FEATURE_FLAGS="feature_flags",e.RESOURCE_PAGE_STATES="resource_page_states",e.PAGE_STATES="page_states",e.COLLECT_FLUSH_REASON="collect_flush_reason",e.NO_RESOURCE_DURATION_FROZEN_STATE="no_resource_duration_frozen_state",e.SCROLLMAP="scrollmap",e.INTERACTION_TO_NEXT_PAINT="interaction_to_next_paint",e.DISABLE_REPLAY_INLINE_CSS="disable_replay_inline_css"}(J||(J={}));var ie=new Set;function ae(e){return ie.has(e)}function se(){return ie}function ue(e){return 0!==e&&100*Math.random()<=e}function ce(e){return function(e){return"number"==typeof e}(e)&&e>=0&&e<=100}function fe(e){return 0===Object.keys(e).length}var le=function(){function e(e){this.onFirstSubscribe=e,this.observers=[]}return e.prototype.subscribe=function(e){var t=this;return!this.observers.length&&this.onFirstSubscribe&&(this.onLastUnsubscribe=this.onFirstSubscribe()||void 0),this.observers.push(e),{unsubscribe:function(){t.observers=t.observers.filter((function(t){return e!==t})),!t.observers.length&&t.onLastUnsubscribe&&t.onLastUnsubscribe()}}},e.prototype.notify=function(e){this.observers.forEach((function(t){return t(e)}))},e}();function de(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=new le((function(){var t=e.map((function(e){return e.subscribe((function(e){return n.notify(e)}))}));return function(){return t.forEach((function(e){return e.unsubscribe()}))}}));return n}function ve(e){return e?(parseInt(e,10)^16*Math.random()>>parseInt(e,10)/4).toString(16):"".concat(1e7,"-").concat(1e3,"-").concat(4e3,"-").concat(8e3,"-").concat(1e11).replace(/[018]/g,ve)}function pe(e,t,n){void 0===n&&(n="");var r=e.charCodeAt(t-1),o=r>=55296&&r<=56319?t+1:t;return e.length<=o?e:"".concat(e.slice(0,o)).concat(n)}var ge,he=4*X,ye=15*$;function me(e,t,n,r){var o=new Date;o.setTime(o.getTime()+n);var i="expires=".concat(o.toUTCString()),a=r&&r.crossSite?"none":"strict",s=r&&r.domain?";domain=".concat(r.domain):"",u=r&&r.secure?";secure":"";document.cookie="".concat(e,"=").concat(t,";").concat(i,";path=/;samesite=").concat(a).concat(s).concat(u)}function be(e){return function(e,t){var n=new RegExp("(?:^|;)\\s*".concat(t,"\\s*=\\s*([^;]+)")).exec(e);return n?n[1]:void 0}(document.cookie,e)}function we(e,t){me(e,"",0,t)}var Se="_dd_s",Ee=/^([a-z]+)=([a-z0-9-]+)$/,Ce="&";function xe(e){return fe(e)}function ke(e){e.expire=String(Z()+ye)}function _e(e){return(t=e,Object.keys(t).map((function(e){return[e,t[e]]}))).map((function(e){var t=e[0],n=e[1];return"".concat(t,"=").concat(n)})).join(Ce);var t}function Oe(e){var t={};return function(e){return!!e&&(-1!==e.indexOf(Ce)||Ee.test(e))}(e)&&e.split(Ce).forEach((function(e){var n=Ee.exec(e);if(null!==n){var r=n[1],o=n[2];t[r]=o}})),t}var Re="_dd",Te="_dd_r",Le="_dd_l",Ae="rum",Pe="logs";function Be(e){var n=function(e){var t={};t.secure=!!e.useSecureSessionCookie||!!e.useCrossSiteSessionCookie,t.crossSite=!!e.useCrossSiteSessionCookie,e.trackSessionAcrossSubdomains&&(t.domain=function(){if(void 0===ge){for(var e="dd_site_test_".concat(ve()),t=window.location.hostname.split("."),n=t.pop();t.length&&!be(e);)n="".concat(t.pop(),".").concat(n),me(e,"test",W,{domain:n});we(e,{domain:n}),ge=n}return ge}());return t}(e);return function(e){if(void 0===document.cookie||null===document.cookie)return!1;try{var n="dd_cookie_test_".concat(ve()),r="test";me(n,r,$,e);var o=be(n)===r;return we(n,e),o}catch(e){return t.error(e),!1}}(n)?{type:"Cookie",cookieOptions:n}:void 0}function Ie(e){var t,n={persistSession:(t=e,function(e){me(Se,_e(e),ye,t)}),retrieveSession:Ne,clearSession:Me(e)};return function(e){if(!be(Se)){var t=be(Re),n=be(Te),r=be(Le),o={};t&&(o.id=t),r&&/^[01]$/.test(r)&&(o[Pe]=r),n&&/^[012]$/.test(n)&&(o[Ae]=n),xe(o)||(ke(o),e.persistSession(o))}}(n),n}function Ne(){return Oe(be(Se))}function Me(e){return function(){we(Se,e)}}var Ue="_dd_test_";function qe(e){localStorage.setItem(Se,_e(e))}function je(){return Oe(localStorage.getItem(Se))}function De(){localStorage.removeItem(Se)}var Ge,Fe=10,He=100,ze=[];function Je(e,t,n){var r;void 0===n&&(n=0);var o=t.retrieveSession,i=t.persistSession,a=t.clearSession,s=Ve();if(Ge||(Ge=e),e===Ge)if(s&&n>=He)$e(t);else{var u,c=o();if(s){if(c.lock)return void We(e,t,n);if(u=ve(),c.lock=u,i(c),(c=o()).lock!==u)return void We(e,t,n)}var f=e.process(c);if(s&&(c=o()).lock!==u)We(e,t,n);else{if(f&&(xe(f)?a():(ke(f),i(f))),s&&(!f||!xe(f))){if((c=o()).lock!==u)return void We(e,t,n);delete c.lock,i(c),f=c}null===(r=e.after)||void 0===r||r.call(e,f||c),$e(t)}}else ze.push(e)}var Ve=function(){return!!window.chrome||/HeadlessChrome/.test(window.navigator.userAgent)};function We(e,t,n){C((function(){Je(e,t,n+1)}),Fe)}function $e(e){Ge=void 0;var t=ze.shift();t&&Je(t,e)}var Xe=W;function Ze(e){var t=Be(e);return!t&&e.allowFallbackToLocalStorage&&(t=function(){try{var e=ve(),t="".concat(Ue).concat(e);localStorage.setItem(t,e);var n=localStorage.getItem(t);return localStorage.removeItem(t),e===n?{type:"LocalStorage"}:void 0}catch(e){return}}()),t}function Ke(e,t,n){var r=new le,o=new le,i="Cookie"===e.type?Ie(e.cookieOptions):{persistSession:qe,retrieveSession:je,clearSession:De},a=i.clearSession,s=i.retrieveSession,u=k((function(){Je({process:function(e){return d(e)?void 0:{}},after:f},i)}),Xe),c=function(){var e=s();if(d(e))return e;return{}}();function f(e){return d(e)||(e={}),l()&&(!function(e){return c.id!==e.id||c[t]!==e[t]}(e)?c=e:(c={},o.notify())),e}function l(){return void 0!==c[t]}function d(e){return(void 0===e.created||Z()-Number(e.created)<he)&&(void 0===e.expire||Z()<Number(e.expire))}return{expandOrRenewSession:O((function(){var e;Je({process:function(r){var o=f(r);return e=function(e){var r=n(e[t]),o=r.trackingType,i=r.isTracked;e[t]=o,i&&!e.id&&(e.id=ve(),e.created=String(Z()));return i}(o),o},after:function(t){e&&!l()&&function(e){c=e,r.notify()}(t),c=t}},i)}),Xe).throttled,expandSession:function(){Je({process:function(e){return l()?f(e):void 0}},i)},getSession:function(){return c},renewObservable:r,expireObservable:o,expire:function(){a(),f({})},stop:function(){_(u)}}}function Ye(e){return Qe(e,nt(window.location)).href}function Qe(e,t){var n=function(){if(void 0===et)try{var e=new tt("http://test/path");et="http://test/path"===e.href}catch(e){et=!1}return et?tt:void 0}();if(n)try{return void 0!==t?new n(e,t):new n(e)}catch(n){throw new Error("Failed to construct URL: ".concat(String(n)," ").concat(B({url:e,base:t})))}if(void 0===t&&!/:/.test(e))throw new Error("Invalid URL: '".concat(e,"'"));var r=document,o=r.createElement("a");if(void 0!==t){var i=(r=document.implementation.createHTMLDocument("")).createElement("base");i.href=t,r.head.appendChild(i),r.body.appendChild(o)}return o.href=e,o}var et,tt=URL;function nt(e){if(e.origin&&"null"!==e.origin)return e.origin;var t=e.host.replace(/(:80|:443)$/,"");return"".concat(e.protocol,"//").concat(t)}var rt="datad0g.com",ot="datadoghq.com",it="ap1.datadoghq.com",at={logs:"logs",rum:"rum",sessionReplay:"session-replay"},st={logs:"logs",rum:"rum",sessionReplay:"replay"};function ut(e,t,n){var r=function(e,t){var n="/api/v2/".concat(st[t]),r=e.proxy,o=e.proxyUrl;if(r){var i=Ye(r);return function(e){return"".concat(i,"?ddforward=").concat(encodeURIComponent("".concat(n,"?").concat(e)))}}var a=function(e,t){var n=e.site,r=void 0===n?ot:n,o=e.internalAnalyticsSubdomain;if(o&&r===ot)return"".concat(o,".").concat(ot);var i=r.split("."),a=i.pop(),s=r!==it?"".concat(at[t],"."):"";return"".concat(s,"browser-intake-").concat(i.join("-"),".").concat(a)}(e,t);if(void 0===r&&o){var s=Ye(o);return function(e){return"".concat(s,"?ddforward=").concat(encodeURIComponent("https://".concat(a).concat(n,"?").concat(e)))}}return function(e){return"https://".concat(a).concat(n,"?").concat(e)}}(e,t);return{build:function(o,i,a){var s=function(e,t,n,r,o,i){var a=e.clientToken,s=e.internalAnalyticsSubdomain,u=["sdk_version:".concat("4.48.2"),"api:".concat(r)].concat(n);o&&ae(J.COLLECT_FLUSH_REASON)&&u.push("flush_reason:".concat(o));i&&u.push("retry_count:".concat(i.count),"retry_after:".concat(i.lastFailureStatus));var c=["ddsource=browser","ddtags=".concat(encodeURIComponent(u.join(","))),"dd-api-key=".concat(a),"dd-evp-origin-version=".concat(encodeURIComponent("4.48.2")),"dd-evp-origin=browser","dd-request-id=".concat(ve())];"rum"===t&&c.push("batch_time=".concat(K()));s&&c.reverse();return c.join("&")}(e,t,n,o,i,a);return r(s)},urlPrefix:r(""),endpointType:t}}var ct=200;var ft=/[^a-z0-9_:./-]/;function lt(e,n){var r=ct-e.length-1;(n.length>r||ft.test(n))&&t.warn("".concat(e," value doesn't meet tag requirements and will be sanitized"));var o=n.replace(/,/g,"_");return"".concat(e,":").concat(o)}function dt(e){var t=function(e){var t=e.env,n=e.service,r=e.version,o=e.datacenter,i=[];return t&&i.push(lt("env",t)),n&&i.push(lt("service",n)),r&&i.push(lt("version",r)),o&&i.push(lt("datacenter",o)),i}(e),n=function(e,t){return{logsEndpointBuilder:ut(e,"logs",t),rumEndpointBuilder:ut(e,"rum",t),sessionReplayEndpointBuilder:ut(e,"sessionReplay",t)}}(e,t),r=p(n).map((function(e){return e.urlPrefix})),o=function(e,t,n){if(!e.replica)return;var r=h({},e,{site:ot,clientToken:e.replica.clientToken}),o={logsEndpointBuilder:ut(r,"logs",n),rumEndpointBuilder:ut(r,"rum",n)};return t.push.apply(t,p(o).map((function(e){return e.urlPrefix}))),h({applicationId:e.replica.applicationId},o)}(e,r,t);return h({isIntakeUrl:function(e){return r.some((function(t){return 0===e.indexOf(t)}))},replica:o,site:e.site||ot},n)}function vt(e){var n,o,i;if(e&&e.clientToken){var a=null!==(n=e.sessionSampleRate)&&void 0!==n?n:e.sampleRate;if(void 0===a||ce(a))if(void 0===e.telemetrySampleRate||ce(e.telemetrySampleRate)){if(void 0===e.telemetryConfigurationSampleRate||ce(e.telemetryConfigurationSampleRate))return Array.isArray(e.enableExperimentalFeatures)&&e.enableExperimentalFeatures.filter((function(e){return t=J,n=e,Object.keys(t).some((function(e){return t[e]===n}));var t,n})).forEach((function(e){ie.add(e)})),h({beforeSend:e.beforeSend&&r(e.beforeSend,"beforeSend threw an error:"),sessionStoreStrategyType:Ze(e),sessionSampleRate:null!=a?a:100,telemetrySampleRate:null!==(o=e.telemetrySampleRate)&&void 0!==o?o:20,telemetryConfigurationSampleRate:null!==(i=e.telemetryConfigurationSampleRate)&&void 0!==i?i:5,service:e.service,silentMultipleInit:!!e.silentMultipleInit,batchBytesLimit:16*m,eventRateLimiterThreshold:3e3,maxTelemetryEventsPerPage:15,flushTimeout:30*W,batchMessagesLimit:50,messageBytesLimit:256*m},dt(e));t.error("Telemetry Configuration Sample Rate should be a number between 0 and 100")}else t.error("Telemetry Sample Rate should be a number between 0 and 100");else t.error("Session Sample Rate should be a number between 0 and 100")}else t.error("Client Token is not configured, we will not send any data.")}var pt="?";function gt(e){var t=[],n=xt(e,"stack"),r=String(e);return n&&g(n,r)&&(n=n.slice(r.length)),n&&n.split("\n").forEach((function(e){var n=function(e){var t=mt.exec(e);if(!t)return;var n=t[2]&&0===t[2].indexOf("native"),r=t[2]&&0===t[2].indexOf("eval"),o=bt.exec(t[2]);r&&o&&(t[2]=o[1],t[3]=o[2],t[4]=o[3]);return{args:n?[t[2]]:[],column:t[4]?+t[4]:void 0,func:t[1]||pt,line:t[3]?+t[3]:void 0,url:n?void 0:t[2]}}(e)||function(e){var t=wt.exec(e);if(!t)return;return{args:[],column:t[3]?+t[3]:void 0,func:pt,line:t[2]?+t[2]:void 0,url:t[1]}}(e)||function(e){var t=St.exec(e);if(!t)return;return{args:[],column:t[4]?+t[4]:void 0,func:t[1]||pt,line:+t[3],url:t[2]}}(e)||function(e){var t=Et.exec(e);if(!t)return;var n=t[3]&&t[3].indexOf(" > eval")>-1,r=Ct.exec(t[3]);n&&r&&(t[3]=r[1],t[4]=r[2],t[5]=void 0);return{args:t[2]?t[2].split(","):[],column:t[5]?+t[5]:void 0,func:t[1]||pt,line:t[4]?+t[4]:void 0,url:t[3]}}(e);n&&(!n.func&&n.line&&(n.func=pt),t.push(n))})),{message:xt(e,"message"),name:xt(e,"name"),stack:t}}var ht="((?:file|https?|blob|chrome-extension|native|eval|webpack|snippet|<anonymous>|\\w+\\.|\\/).*?)",yt="(?::(\\d+))",mt=new RegExp("^\\s*at (.*?) ?\\(".concat(ht).concat(yt,"?").concat(yt,"?\\)?\\s*$"),"i"),bt=new RegExp("\\((\\S*)".concat(yt).concat(yt,"\\)"));var wt=new RegExp("^\\s*at ?".concat(ht).concat(yt,"?").concat(yt,"??\\s*$"),"i");var St=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i;var Et=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|capacitor|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,Ct=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;function xt(e,t){if("object"==typeof e&&e&&t in e){var n=e[t];return"string"==typeof n?n:void 0}}var kt="No stack, consider using an instance of Error";function _t(e){var t=e.stackTrace,n=e.originalError,r=e.handlingStack,o=e.startClocks,i=e.nonErrorPrefix,a=e.source,s=e.handling,u=n instanceof Error,c=function(e,t,n,r){return(null==e?void 0:e.message)&&(null==e?void 0:e.name)?e.message:t?"Empty message":"".concat(n," ").concat(B(q(r)))}(t,u,i,n),f=function(e,t){if(void 0===t)return!1;if(e)return!0;return t.stack.length>0&&(t.stack.length>1||void 0!==t.stack[0].url)}(u,t)?Rt(t):kt,l=u?function(e,t){var n=e,r=[];for(;(null==n?void 0:n.cause)instanceof Error&&r.length<10;){var o=gt(n.cause);r.push({message:n.cause.message,source:t,type:null==o?void 0:o.name,stack:o&&Rt(o)}),n=n.cause}return r.length?r:void 0}(n,a):void 0;return{startClocks:o,source:a,handling:s,handlingStack:r,originalError:n,type:null==t?void 0:t.name,message:c,stack:f,causes:l,fingerprint:Ot(n)}}function Ot(e){return e instanceof Error&&"dd_fingerprint"in e?String(e.dd_fingerprint):void 0}function Rt(e){var t=Tt(e);return e.stack.forEach((function(e){var n="?"===e.func?"<anonymous>":e.func,r=e.args&&e.args.length>0?"(".concat(e.args.join(", "),")"):"",o=e.line?":".concat(e.line):"",i=e.line&&e.column?":".concat(e.column):"";t+="\n at ".concat(n).concat(r," @ ").concat(e.url).concat(o).concat(i)})),t}function Tt(e){return"".concat(e.name||"Error",": ").concat(e.message)}function Lt(e,t,n,r,o){return At(e,t,[n],r,o)}function At(e,t,n,r,o){var i=void 0===o?{}:o,a=i.once,s=i.capture,u=i.passive,f=c(a?function(e){v(),r(e)}:r),l=u?{capture:s,passive:u}:s,d=E(t,"addEventListener");function v(){var e=E(t,"removeEventListener");n.forEach((function(n){return e.call(t,n,f,l)}))}return n.forEach((function(e){return d.call(t,e,f,l)})),{stop:v}}var Pt={intervention:"intervention",deprecation:"deprecation",cspViolation:"csp_violation"};function Bt(e,t){var n=[];d(t,Pt.cspViolation)&&n.push(function(e){var t=new le((function(){return Lt(e,document,"securitypolicyviolation",(function(e){t.notify(function(e){var t=Pt.cspViolation,n="'".concat(e.blockedURI,"' blocked by '").concat(e.effectiveDirective,"' directive");return{type:Pt.cspViolation,subtype:e.effectiveDirective,message:"".concat(t,": ").concat(n),stack:It(e.effectiveDirective,e.originalPolicy?"".concat(n,' of the policy "').concat(pe(e.originalPolicy,100,"..."),'"'):"no policy",e.sourceFile,e.lineNumber,e.columnNumber)}}(e))})).stop}));return t}(e));var r=t.filter((function(e){return e!==Pt.cspViolation}));return r.length&&n.push(function(e){var t=new le((function(){if(window.ReportingObserver){var n=c((function(e,n){return e.forEach((function(e){t.notify(function(e){var t=e.type,n=e.body;return{type:t,subtype:n.id,message:"".concat(t,": ").concat(n.message),stack:It(n.id,n.message,n.sourceFile,n.lineNumber,n.columnNumber)}}(e))}))})),r=new window.ReportingObserver(n,{types:e,buffered:!0});return r.observe(),function(){r.disconnect()}}}));return t}(r)),de.apply(void 0,n)}function It(e,t,n,r,o){return n?Rt({name:e,message:t,stack:[{func:"?",url:n,line:null!=r?r:void 0,column:null!=o?o:void 0}]}):void 0}var Nt=32*m;function Mt(e,n,r){return void 0===e?[]:"all"===e||Array.isArray(e)&&e.every((function(e){return d(n,e)}))?"all"===e?n:(o=e,i=new Set,o.forEach((function(e){return i.add(e)})),v(i)):void t.error("".concat(r,' should be "all" or an array with allowed values "').concat(n.join('", "'),'"'));var o,i}var Ut={AGENT:"agent",CONSOLE:"console",CUSTOM:"custom",LOGGER:"logger",NETWORK:"network",SOURCE:"source",REPORT:"report"},qt=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},jt={debug:"debug",error:"error",info:"info",warn:"warn"},Dt={console:"console",http:"http",silent:"silent"},Gt=Object.keys(jt),Ft=function(){function e(e,t,n,r,o){void 0===n&&(n=Dt.http),void 0===r&&(r=jt.debug),void 0===o&&(o={}),this.handleLogStrategy=e,this.handlerType=n,this.level=r,this.contextManager=H("logger context"),this.contextManager.set(h({},o,t?{logger:{name:t}}:void 0))}return e.prototype.log=function(e,t,n,r){var o;if(void 0===n&&(n=jt.info),n===jt.error&&(o={origin:Ut.LOGGER}),null!=r){var i=_t({stackTrace:r instanceof Error?gt(r):void 0,originalError:r,nonErrorPrefix:"Provided",source:Ut.LOGGER,handling:"handled",startClocks:Q()});o={origin:Ut.LOGGER,stack:i.stack,kind:i.type,message:i.message}}var a=q(t),s=o?P({error:o},a):a;this.handleLogStrategy({message:q(e),context:s,status:n},this)},e.prototype.debug=function(e,t,n){this.log(e,t,jt.debug,n)},e.prototype.info=function(e,t,n){this.log(e,t,jt.info,n)},e.prototype.warn=function(e,t,n){this.log(e,t,jt.warn,n)},e.prototype.error=function(e,t,n){this.log(e,t,jt.error,n)},e.prototype.setContext=function(e){this.contextManager.set(e)},e.prototype.getContext=function(){return this.contextManager.get()},e.prototype.addContext=function(e,t){this.contextManager.add(e,t)},e.prototype.removeContext=function(e){this.contextManager.remove(e)},e.prototype.setHandler=function(e){this.handlerType=e},e.prototype.getHandler=function(){return this.handlerType},e.prototype.setLevel=function(e){this.level=e},e.prototype.getLevel=function(){return this.level},qt([u],e.prototype,"log",null),e}();function Ht(e,t){var n=window.__ddBrowserSdkExtensionCallback;n&&n({type:e,payload:t})}var zt,Jt={log:"log",configuration:"configuration"},Vt=["https://www.datadoghq-browser-agent.com","https://www.datad0g-browser-agent.com","https://d3uc069fcn7uxw.cloudfront.net","https://d20xtzwzcl0ceb.cloudfront.net","http://localhost","<anonymous>"],Wt=["ddog-gov.com"],$t={maxEventsPerPage:0,sentEventCount:0,telemetryEnabled:!1,telemetryConfigurationEnabled:!1};function Xt(e,t){var n,r=new le;return $t.telemetryEnabled=!d(Wt,t.site)&&ue(t.telemetrySampleRate),$t.telemetryConfigurationEnabled=$t.telemetryEnabled&&ue(t.telemetryConfigurationSampleRate),zt=function(t){if($t.telemetryEnabled){var o=function(e,t){return P({type:"telemetry",date:K(),service:e,version:"4.48.2",source:"browser",_dd:{format_version:2},telemetry:t,experimental_features:v(se())},void 0!==n?n():{})}(e,t);r.notify(o),Ht("telemetry",o)}},o=Kt,h($t,{maxEventsPerPage:t.maxTelemetryEventsPerPage,sentEventCount:0}),{setContextProvider:function(e){n=e},observable:r,enabled:$t.telemetryEnabled}}function Zt(t,n){l(e.debug,t,n),Yt(h({type:Jt.log,message:t,status:"debug"},n))}function Kt(e,t){Yt(h({type:Jt.log,status:"error"},function(e){if(e instanceof Error){var t=gt(e);return{error:{kind:t.name,stack:Rt(Qt(t))},message:t.message}}return{error:{stack:kt},message:"".concat("Uncaught"," ").concat(B(e))}}(e),t))}function Yt(e){zt&&$t.sentEventCount<$t.maxEventsPerPage&&($t.sentEventCount+=1,zt(e))}function Qt(e){return e.stack=e.stack.filter((function(e){return!e.url||Vt.some((function(t){return g(e.url,t)}))})),e}var en={HIDDEN:"visibility_hidden",UNLOADING:"before_unload",PAGEHIDE:"page_hide",FROZEN:"page_frozen"};var tn="datadog-synthetics-public-id",nn="datadog-synthetics-result-id",rn="datadog-synthetics-injects-rum";function on(){return Boolean(window._DATADOG_SYNTHETICS_INJECTS_RUM||be(rn))}function an(){var e=window._DATADOG_SYNTHETICS_RESULT_ID||be(nn);return"string"==typeof e?e:void 0}var sn=function(){function e(e,t,n){var r=this;this.request=e,this.flushController=t,this.messageBytesLimit=n,this.pushOnlyBuffer=[],this.upsertBuffer={},this.flushController.flushObservable.subscribe((function(e){return r.flush(e)}))}return e.prototype.add=function(e){this.addOrUpdate(e)},e.prototype.upsert=function(e,t){this.addOrUpdate(e,t)},e.prototype.flush=function(e){var t=this.pushOnlyBuffer.concat(p(this.upsertBuffer));this.pushOnlyBuffer=[],this.upsertBuffer={};var n,r={data:t.join("\n"),bytesCount:e.bytesCount,flushReason:e.reason};n=e.reason,d(p(en),n)?this.request.sendOnExit(r):this.request.send(r)},e.prototype.addOrUpdate=function(e,n){var r=this.process(e),o=r.processedMessage,i=r.messageBytesCount;i>=this.messageBytesLimit?t.warn("Discarded a message whose size was bigger than the maximum allowed size ".concat(this.messageBytesLimit,"KB.")):(this.hasMessageFor(n)&&this.remove(n),this.push(o,i,n))},e.prototype.process=function(e){var t=B(e);return{processedMessage:t,messageBytesCount:S(t)}},e.prototype.push=function(e,t,n){var r=this.flushController.messagesCount>0?1:0;this.flushController.notifyBeforeAddMessage(t+r),void 0!==n?this.upsertBuffer[n]=e:this.pushOnlyBuffer.push(e),this.flushController.notifyAfterAddMessage()},e.prototype.remove=function(e){var t=this.upsertBuffer[e];delete this.upsertBuffer[e];var n=S(t),r=this.flushController.messagesCount>1?1:0;this.flushController.notifyAfterRemoveMessage(n+r)},e.prototype.hasMessageFor=function(e){return void 0!==e&&void 0!==this.upsertBuffer[e]},e}();function un(e){return e>=500}var cn=80*m,fn=32,ln=3*b,dn=$,vn=W;function pn(e,t,n,r,o){0===t.transportStatus&&0===t.queuedPayloads.size()&&t.bandwidthMonitor.canHandle(e)?hn(e,t,n,{onSuccess:function(){return yn(0,t,n,r,o)},onFailure:function(){t.queuedPayloads.enqueue(e),gn(t,n,r,o)}}):t.queuedPayloads.enqueue(e)}function gn(e,t,n,r){2===e.transportStatus&&C((function(){hn(e.queuedPayloads.first(),e,t,{onSuccess:function(){e.queuedPayloads.dequeue(),e.currentBackoffTime=vn,yn(1,e,t,n,r)},onFailure:function(){e.currentBackoffTime=Math.min(dn,2*e.currentBackoffTime),gn(e,t,n,r)}})}),e.currentBackoffTime)}function hn(e,t,n,r){var o=r.onSuccess,i=r.onFailure;t.bandwidthMonitor.add(e),n(e,(function(n){t.bandwidthMonitor.remove(e),!function(e){return"opaque"!==e.type&&(0===e.status&&!navigator.onLine||408===e.status||429===e.status||un(e.status))}(n)?(t.transportStatus=0,o()):(t.transportStatus=t.bandwidthMonitor.ongoingRequestCount>0?1:2,e.retry={count:e.retry?e.retry.count+1:1,lastFailureStatus:n.status},i())}))}function yn(e,t,n,r,o){0===e&&t.queuedPayloads.isFull()&&!t.queueFullReported&&(o({message:"Reached max ".concat(r," events size queued for upload: ").concat(ln/b,"MiB"),source:Ut.AGENT,startClocks:Q()}),t.queueFullReported=!0);var i=t.queuedPayloads;for(t.queuedPayloads=mn();i.size()>0;)pn(i.dequeue(),t,n,r,o)}function mn(){var e=[];return{bytesCount:0,enqueue:function(t){this.isFull()||(e.push(t),this.bytesCount+=t.bytesCount)},first:function(){return e[0]},dequeue:function(){var t=e.shift();return t&&(this.bytesCount-=t.bytesCount),t},size:function(){return e.length},isFull:function(){return this.bytesCount>=ln}}}function bn(e,t,n,r){var o={transportStatus:0,currentBackoffTime:vn,bandwidthMonitor:{ongoingRequestCount:0,ongoingByteCount:0,canHandle:function(e){return 0===this.ongoingRequestCount||this.ongoingByteCount+e.bytesCount<=cn&&this.ongoingRequestCount<fn},add:function(e){this.ongoingRequestCount+=1,this.ongoingByteCount+=e.bytesCount},remove:function(e){this.ongoingRequestCount-=1,this.ongoingByteCount-=e.bytesCount}},queuedPayloads:mn(),queueFullReported:!1},i=function(r,o){return function(e,t,n,r,o){var i=r.data,a=r.bytesCount,s=r.flushReason,u=r.retry,f=function(){try{return window.Request&&"keepalive"in new Request("http://a")}catch(e){return!1}}()&&a<n;if(f){var l=t.build("fetch",s,u);fetch(l,{method:"POST",body:i,keepalive:!0,mode:"cors"}).then(c((function(e){return null==o?void 0:o({status:e.status,type:e.type})})),c((function(){var n=t.build("xhr",s,u);Sn(e,n,i,o)})))}else{var d=t.build("xhr",s,u);Sn(e,d,i,o)}}(e,t,n,r,o)};return{send:function(e){pn(e,o,i,t.endpointType,r)},sendOnExit:function(r){!function(e,t,n,r){var o=r.data,i=r.bytesCount,a=r.flushReason,s=!!navigator.sendBeacon&&i<n;if(s)try{var u=t.build("beacon",a);if(navigator.sendBeacon(u,o))return}catch(e){!function(e){wn||(wn=!0,Kt(e))}(e)}var c=t.build("xhr",a);Sn(e,c,o)}(e,t,n,r)}}}var wn=!1;function Sn(e,t,n,r){var o=new XMLHttpRequest;o.open("POST",t,!0),Lt(e,o,"loadend",(function(){null==r||r({status:o.status})}),{once:!0}),o.send(n)}function En(e){var t=e.messagesLimit,n=e.bytesLimit,r=e.durationLimit,o=e.pageExitObservable,i=e.sessionExpireObservable,a=new le;o.subscribe((function(e){return f(e.reason)})),i.subscribe((function(){return f("session_expire")}));var s,u=0,c=0;function f(e){if(0!==c){var t=c,n=u;c=0,u=0,l(),a.notify({reason:e,messagesCount:t,bytesCount:n})}}function l(){x(s),s=void 0}return{flushObservable:a,get messagesCount(){return c},notifyBeforeAddMessage:function(e){u+e>=n&&f("bytes_limit"),c+=1,u+=e,void 0===s&&(s=C((function(){f("duration_limit")}),r))},notifyAfterAddMessage:function(){c>=t?f("messages_limit"):u>=n&&f("bytes_limit")},notifyAfterRemoveMessage:function(e){u-=e,0===(c-=1)&&l()}}}function Cn(e,t,n,r,o,i){var a=u(e,t.endpoint),s=n&&u(e,n.endpoint);function u(e,t){return new sn(bn(e,t,e.batchBytesLimit,r),En({messagesLimit:e.batchMessagesLimit,bytesLimit:e.batchBytesLimit,durationLimit:e.flushTimeout,pageExitObservable:o,sessionExpireObservable:i}),e.messageBytesLimit)}return{flushObservable:a.flushController.flushObservable,add:function(e,t){void 0===t&&(t=!0),a.add(e),s&&t&&s.add(n.transformMessage?n.transformMessage(e):e)},upsert:function(e,t){a.upsert(e,t),s&&s.upsert(n.transformMessage?n.transformMessage(e):e,t)}}}var xn=1/0,kn=$,_n=function(){function e(e,t){var n=this;this.expireDelay=e,this.maxEntries=t,this.entries=[],this.clearOldValuesInterval=k((function(){return n.clearOldValues()}),kn)}return e.prototype.add=function(e,t){var n=this,r={value:e,startTime:t,endTime:xn,remove:function(){var e=n.entries.indexOf(r);e>=0&&n.entries.splice(e,1)},close:function(e){r.endTime=e}};return this.maxEntries&&this.entries.length>=this.maxEntries&&this.entries.pop(),this.entries.unshift(r),r},e.prototype.find=function(e){void 0===e&&(e=xn);for(var t=0,n=this.entries;t<n.length;t++){var r=n[t];if(r.startTime<=e){if(e<=r.endTime)return r.value;break}}},e.prototype.closeActive=function(e){var t=this.entries[0];t&&t.endTime===xn&&t.close(e)},e.prototype.findAll=function(e,t){void 0===e&&(e=xn),void 0===t&&(t=0);var n=ee(e,t);return this.entries.filter((function(t){return t.startTime<=n&&e<=t.endTime})).map((function(e){return e.value}))},e.prototype.reset=function(){this.entries=[]},e.prototype.stop=function(){_(this.clearOldValuesInterval)},e.prototype.clearOldValues=function(){for(var e=Y()-this.expireDelay;this.entries.length>0&&this.entries[this.entries.length-1].endTime<e;)this.entries.pop()},e}(),On=$,Rn=he,Tn=[];function Ln(e,t,n){var r=Ke(e.sessionStoreStrategyType,t,n);Tn.push((function(){return r.stop()}));var o,i=new _n(Rn);function a(){return{id:r.getSession().id,trackingType:r.getSession()[t]}}return Tn.push((function(){return i.stop()})),r.renewObservable.subscribe((function(){i.add(a(),Y())})),r.expireObservable.subscribe((function(){i.closeActive(Y())})),r.expandOrRenewSession(),i.add(a(),[0,te()][0]),o=At(0,window,["click","touchstart","keydown","scroll"],(function(){return r.expandOrRenewSession()}),{capture:!0,passive:!0}).stop,Tn.push(o),function(e,t){var n=function(){"visible"===document.visibilityState&&t()},r=Lt(e,document,"visibilitychange",n).stop;Tn.push(r);var o=k(n,On);Tn.push((function(){_(o)}))}(e,(function(){return r.expandSession()})),{findActiveSession:function(e){return i.find(e)},renewObservable:r.renewObservable,expireObservable:r.expireObservable,expire:r.expire}}var An,Pn="logs";function Bn(e){var t=Ln(e,Pn,(function(t){return function(e,t){var n=function(e){return"0"===e||"1"===e}(t)?t:In(e);return{trackingType:n,isTracked:"1"===n}}(e,t)}));return{findTrackedSession:function(e){var n=t.findActiveSession(e);return n&&"1"===n.trackingType?{id:n.id}:void 0},expireObservable:t.expireObservable}}function In(e){return ue(e.sessionSampleRate)?"1":"0"}var Nn=((An={})[jt.debug]=0,An[jt.info]=1,An[jt.warn]=2,An[jt.error]=3,An);function Mn(e,t,n){var r=n.getHandler(),o=Array.isArray(r)?r:[r];return Nn[e]>=Nn[n.getLevel()]&&d(o,t)}function Un(e,t,n,r,o,i){var a=Gt.concat(["custom"]),s={};a.forEach((function(e){var n,r,o,a,u;s[e]=(n=e,r=t.eventRateLimiterThreshold,o=i,a=0,u=!1,{isLimitReached:function(){if(0===a&&C((function(){a=0}),$),(a+=1)<=r||u)return u=!1,!1;if(a===r+1){u=!0;try{o({message:"Reached max number of ".concat(n,"s by minute: ").concat(r),source:Ut.AGENT,startClocks:Q()})}finally{u=!1}}return!0}})})),n.subscribe(0,(function(i){var a,u,c,f=i.rawLogsEvent,l=i.messageContext,d=void 0===l?void 0:l,v=i.savedCommonContext,p=void 0===v?void 0:v,g=i.logger,h=void 0===g?o:g,y=f.date-te(),m=e.findTrackedSession(y);if(m){var b=p||r(),w=P({service:t.service,session_id:m.id,usr:fe(b.user)?void 0:b.user,view:b.view},b.context,jn(y),f,h.getContext(),d);!Mn(f.status,Dt.http,h)||!1===(null===(a=t.beforeSend)||void 0===a?void 0:a.call(t,w))||(null===(u=w.error)||void 0===u?void 0:u.origin)!==Ut.AGENT&&(null!==(c=s[w.status])&&void 0!==c?c:s.custom).isLimitReached()||n.notify(1,w)}}))}var qn=!1;function jn(e){var t,n=window;if(on()){var r=o(n.DD_RUM_SYNTHETICS);return r||qn||(qn=!0,Zt("Logs sent before RUM is injected by the synthetics worker",{testId:(t=window._DATADOG_SYNTHETICS_PUBLIC_ID||be(tn),"string"==typeof t?t:void 0),resultId:an()})),r}return o(n.DD_RUM);function o(t){if(t&&t.getInternalContext)return t.getInternalContext(e)}}var Dn,Gn={};function Fn(t){var r=t.map((function(t){return Gn[t]||(Gn[t]=function(t){var r=new le((function(){var o=n[t];return n[t]=function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];o.apply(console,n);var a=function(){var e,t=new Error;if(!t.stack)try{throw t}catch(e){}return f((function(){var n=gt(t);n.stack=n.stack.slice(2),e=Rt(n)})),e}();f((function(){r.notify(function(t,n,r){var o,i,a=t.map((function(e){return function(e){if("string"==typeof e)return q(e);if(e instanceof Error)return Tt(gt(e));return B(q(e),void 0,2)}(e)})).join(" ");if(n===e.error){var s=function(e,t){for(var n=0;n<e.length;n+=1){var r=e[n];if(t(r,n))return r}}(t,(function(e){return e instanceof Error}));o=s?Rt(gt(s)):void 0,i=Ot(s),a="console error: ".concat(a)}return{api:n,message:a,stack:o,handlingStack:r,fingerprint:i}}(n,t,a))}))},function(){n[t]=o}}));return r}(t)),Gn[t]}));return de.apply(void 0,r)}var Hn,zn=((Dn={})[e.log]=jt.info,Dn[e.debug]=jt.debug,Dn[e.info]=jt.info,Dn[e.warn]=jt.warn,Dn[e.error]=jt.error,Dn);var Jn,Vn=((Hn={})[Pt.cspViolation]=jt.error,Hn[Pt.intervention]=jt.error,Hn[Pt.deprecation]=jt.warn,Hn);function Wn(e,t,n){var r=e[t],o=n(r),i=function(){if("function"==typeof o)return o.apply(this,arguments)};return e[t]=i,{stop:function(){e[t]===i?e[t]=r:o=r}}}function $n(e,t,n){var r=n.before,o=n.after;return Wn(e,t,(function(e){return function(){var t,n=arguments;return r&&f(r,this,n),"function"==typeof e&&(t=e.apply(this,n)),o&&f(o,this,n),t}}))}var Xn,Zn=new WeakMap;function Kn(e){return Jn||(Jn=function(e){var t=new le((function(){var n=$n(XMLHttpRequest.prototype,"open",{before:Yn}).stop,r=$n(XMLHttpRequest.prototype,"send",{before:function(){Qn.call(this,e,t)}}).stop,o=$n(XMLHttpRequest.prototype,"abort",{before:er}).stop;return function(){n(),r(),o()}}));return t}(e)),Jn}function Yn(e,t){Zn.set(this,{state:"open",method:e,url:Ye(String(t))})}function Qn(e,t){var n=this,r=Zn.get(this);if(r){var o=r;o.state="start",o.startTime=Y(),o.startClocks=Q(),o.isAborted=!1,o.xhr=this;var i=!1,a=$n(this,"onreadystatechange",{before:function(){this.readyState===XMLHttpRequest.DONE&&s()}}).stop,s=function(){if(u(),a(),!i){i=!0;var e,s=r;s.state="complete",s.duration=(e=o.startClocks.timeStamp,K()-e),s.status=n.status,t.notify(h({},s))}},u=Lt(e,this,"loadend",s).stop;t.notify(o)}}function er(){var e=Zn.get(this);e&&(e.isAborted=!0)}function tr(){var e;return Xn||(e=new le((function(){if(window.fetch)return Wn(window,"fetch",(function(t){return function(n,r){var o,i=f(nr,null,[e,n,r]);return i?(o=t.call(this,i.input,i.init),f(rr,null,[e,o,i])):o=t.call(this,n,r),o}})).stop})),Xn=e),Xn}function nr(e,t,n){var r=n&&n.method||t instanceof Request&&t.method||"GET",o=t instanceof Request?t.url:Ye(String(t)),i={state:"start",init:n,input:t,method:r,startClocks:Q(),url:o};return e.notify(i),i}function rr(e,t,n){var r=function(t){var r=n;r.state="resolve","stack"in t||t instanceof Error?(r.status=0,r.isAborted=t instanceof DOMException&&t.code===DOMException.ABORT_ERR,r.error=t):"status"in t&&(r.response=t,r.responseType=t.type,r.status=t.status,r.isAborted=!1),e.notify(r)};t.then(c(r),c(r))}function or(e,t){if(!e.forwardErrorsToLogs)return{stop:R};var n=Kn(e).subscribe((function(e){"complete"===e.state&&o("xhr",e)})),r=tr().subscribe((function(e){"resolve"===e.state&&o("fetch",e)}));function o(n,r){function o(e){t.notify(0,{rawLogsEvent:{message:"".concat(ar(n)," error ").concat(r.method," ").concat(r.url),date:r.startClocks.timeStamp,error:{origin:Ut.NETWORK,stack:e||"Failed to load"},http:{method:r.method,status_code:r.status,url:r.url},status:jt.error,origin:Ut.NETWORK}})}e.isIntakeUrl(r.url)||!function(e){return 0===e.status&&"opaque"!==e.responseType}(r)&&!un(r.status)||("xhr"in r?function(e,t,n){"string"==typeof e.response?n(ir(e.response,t)):n(e.response)}(r.xhr,e,o):r.response?function(e,t,n){var r=function(e){try{return e.clone()}catch(e){return}}(e);r&&r.body?window.TextDecoder?function(e,t,n){!function(e,t,n){var r=e.getReader(),o=[],i=0;function a(){var e,a;if(r.cancel().catch(R),n.collectStreamBody){var s;if(1===o.length)s=o[0];else{s=new Uint8Array(i);var u=0;o.forEach((function(e){s.set(e,u),u+=e.length}))}e=s.slice(0,n.bytesLimit),a=s.length>n.bytesLimit}t(void 0,e,a)}!function e(){r.read().then(c((function(t){t.done?a():(n.collectStreamBody&&o.push(t.value),(i+=t.value.length)>n.bytesLimit?a():e())})),c((function(e){return t(e)})))}()}(e,(function(e,t,r){if(e)n(e);else{var o=(new TextDecoder).decode(t);r&&(o+="..."),n(void 0,o)}}),{bytesLimit:t,collectStreamBody:!0})}(r.body,t.requestErrorResponseLengthLimit,(function(e,t){n(e?"Unable to retrieve response: ".concat(e):t)})):r.text().then(c((function(e){return n(ir(e,t))})),c((function(e){return n("Unable to retrieve response: ".concat(e))}))):n()}(r.response,e,o):r.error&&function(e,t,n){n(ir(Rt(gt(e)),t))}(r.error,e,o))}return{stop:function(){n.unsubscribe(),r.unsubscribe()}}}function ir(e,t){return e.length>t.requestErrorResponseLengthLimit?"".concat(e.substring(0,t.requestErrorResponseLengthLimit),"..."):e}function ar(e){return"xhr"===e?"XHR":"Fetch"}var sr=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?([\s\S]*)$/;function ur(e){var t=function(e){return $n(window,"onerror",{before:function(t,n,r,o,i){var a;if(i instanceof Error)a=gt(i);else{var s=[{url:n,column:o,line:r}],u=function(e){var t,n,r;"[object String]"==={}.toString.call(e)&&(n=(t=sr.exec(e))[1],r=t[2]);return{name:n,message:r}}(t);a={name:u.name,message:u.message,stack:s}}e(a,null!=i?i:t)}})}(e).stop,n=function(e){return $n(window,"onunhandledrejection",{before:function(t){var n=t.reason||"Empty reason",r=gt(n);e(r,n)}})}(e).stop;return{stop:function(){t(),n()}}}function cr(e,t){if(!e.forwardErrorsToLogs)return{stop:R};var n,r=new le,o=(n=r,ur((function(e,t){n.notify(_t({stackTrace:e,originalError:t,startClocks:Q(),nonErrorPrefix:"Uncaught",source:Ut.SOURCE,handling:"unhandled"}))}))).stop,i=r.subscribe((function(e){t.notify(0,{rawLogsEvent:{message:e.message,date:e.startClocks.timeStamp,error:{kind:e.type,origin:Ut.SOURCE,stack:e.stack},origin:Ut.SOURCE,status:jt.error}})}));return{stop:function(){o(),i.unsubscribe()}}}var fr=function(){function e(){this.callbacks={}}return e.prototype.notify=function(e,t){var n=this.callbacks[e];n&&n.forEach((function(e){return e(t)}))},e.prototype.subscribe=function(e,t){var n=this;return this.callbacks[e]||(this.callbacks[e]=[]),this.callbacks[e].push(t),{unsubscribe:function(){n.callbacks[e]=n.callbacks[e].filter((function(e){return t!==e}))}}},e}();var lr,dr,vr,pr,gr=function(n){var r,o,i=!1,a=H("global context"),u=H("user"),f={},l=function(){},v=new V,g=function(e,t,n,r){void 0===n&&(n=A(b())),void 0===r&&(r=K()),v.add((function(){return g(e,t,n,r)}))},y=function(){},m=new Ft((function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return g.apply(void 0,e)}));function b(){return{view:{referrer:document.referrer,url:window.location.href},context:a.getContext(),user:u.getContext()}}return r={logger:m,init:c((function(r){var o;if(y=function(){return A(r)},re()&&(r=function(e){return h({},e,{clientToken:"empty"})}(r)),function(e){return!i||(e.silentMultipleInit||t.error("DD_LOGS is already initialized."),!1)}(r)){var a=function(t){var n=vt(t),r=Mt(t.forwardConsoleLogs,p(e),"Forward Console Logs"),o=Mt(t.forwardReports,p(Pt),"Forward Reports");if(n&&r&&o)return t.forwardErrorsToLogs&&!d(r,e.error)&&r.push(e.error),h({forwardErrorsToLogs:!1!==t.forwardErrorsToLogs,forwardConsoleLogs:r,forwardReports:o,requestErrorResponseLengthLimit:Nt},n)}(r);a&&(o=n(r,a,b,m),g=o.handleLog,l=o.getInternalContext,v.drain(),i=!0)}})),getLoggerGlobalContext:c(a.get),getGlobalContext:c(a.getContext),setLoggerGlobalContext:c(a.set),setGlobalContext:c(a.setContext),addLoggerGlobalContext:c(a.add),setGlobalContextProperty:c(a.setContextProperty),removeLoggerGlobalContext:c(a.remove),removeGlobalContextProperty:c(a.removeContextProperty),clearGlobalContext:c(a.clearContext),createLogger:c((function(e,t){return void 0===t&&(t={}),f[e]=new Ft((function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return g.apply(void 0,e)}),q(e),t.handler,t.level,q(t.context)),f[e]})),getLogger:c((function(e){return f[e]})),getInitConfiguration:c((function(){return y()})),getInternalContext:c((function(e){return l(e)})),setUser:c((function(e){(function(e){var n="object"===T(e);return n||t.error("Unsupported user:",e),n})(e)&&u.setContext(oe(e))})),getUser:c(u.getContext),setUserProperty:c((function(e,t){var n,r=oe((n={},n[e]=t,n))[e];u.setContextProperty(e,r)})),removeUserProperty:c(u.removeContextProperty),clearUser:c(u.clearContext)},o=h({version:"4.48.2",onReady:function(e){e()}},r),Object.defineProperty(o,"_setDebug",{get:function(){return s},enumerable:!1}),o}((function(n,r,o,i){var a=new fr;a.subscribe(1,(function(e){return Ht("logs",e)}));var s=function(e){a.notify(0,{rawLogsEvent:{message:e.message,date:e.startClocks.timeStamp,error:{origin:Ut.AGENT},origin:Ut.AGENT,status:jt.error}}),Zt("Error reported to customer",{"error.message":e.message})},u=function(e){var t=new le((function(){var n=ae(J.PAGEHIDE),r=At(0,window,["visibilitychange","freeze","pagehide"],(function(e){"pagehide"===e.type&&n?t.notify({reason:en.PAGEHIDE}):"visibilitychange"===e.type&&"hidden"===document.visibilityState?t.notify({reason:en.HIDDEN}):"freeze"===e.type&&t.notify({reason:en.FROZEN})}),{capture:!0}).stop,o=R;return n||(o=Lt(e,window,"beforeunload",(function(){t.notify({reason:en.UNLOADING})})).stop),function(){r(),o()}}));return t}(r),c=!r.sessionStoreStrategyType||re()||on()?function(e){var t="1"===In(e)?{}:void 0;return{findTrackedSession:function(){return t},expireObservable:new le}}(r):Bn(r);(function(e,t,n,r){var o=Xt("browser-logs-sdk",e);if(re()){var i=ne();o.observable.subscribe((function(e){return i.send("internal_telemetry",e)}))}else{var a=Cn(e,{endpoint:e.rumEndpointBuilder},e.replica&&{endpoint:e.replica.rumEndpointBuilder},t,n,r);o.observable.subscribe((function(t){return a.add(t,function(e){return e.site===rt}(e))}))}return o})(r,s,u,c.expireObservable).setContextProvider((function(){var e,t,n,r,o,i;return{application:{id:null===(e=jn())||void 0===e?void 0:e.application_id},session:{id:null===(t=c.findTrackedSession())||void 0===t?void 0:t.id},view:{id:null===(r=null===(n=jn())||void 0===n?void 0:n.view)||void 0===r?void 0:r.id},action:{id:null===(i=null===(o=jn())||void 0===o?void 0:o.user_action)||void 0===i?void 0:i.id}}})),or(r,a),cr(r,a),function(t,n){var r=Fn(t.forwardConsoleLogs).subscribe((function(t){n.notify(0,{rawLogsEvent:{date:K(),message:t.message,origin:Ut.CONSOLE,error:t.api===e.error?{origin:Ut.CONSOLE,stack:t.stack,fingerprint:t.fingerprint}:void 0,status:zn[t.api]}})}))}(r,a),function(e,t){var n=Bt(e,e.forwardReports).subscribe((function(e){var n,r=e.message,o=Vn[e.type];o===jt.error?n={kind:e.subtype,origin:Ut.REPORT,stack:e.stack}:e.stack&&(r+=" Found in ".concat(function(e){var t;return null===(t=/@ (.+)/.exec(e))||void 0===t?void 0:t[1]}(e.stack))),t.notify(0,{rawLogsEvent:{date:K(),message:r,origin:Ut.REPORT,error:n,status:o}})}))}(r,a);var f,l=function(e){return{handleLog:function(n,r,o,i){var a=n.context;Mn(n.status,Dt.console,r)&&t(n.status,n.message,P(r.getContext(),a)),e.notify(0,{rawLogsEvent:{date:i||K(),message:n.message,status:n.status,origin:Ut.LOGGER},messageContext:a,savedCommonContext:o,logger:r})}}}(a).handleLog;return Un(c,r,a,o,i,s),re()?function(e){var t=ne();e.subscribe(1,(function(e){t.send("log",e)}))}(a):function(e,t,n,r,o){var i=Cn(e,{endpoint:e.logsEndpointBuilder},e.replica&&{endpoint:e.replica.logsEndpointBuilder},n,r,o);t.subscribe(1,(function(e){i.add(e)}))}(r,a,s,u,c.expireObservable),function(e){$t.telemetryConfigurationEnabled&&Yt({type:Jt.configuration,configuration:e})}(function(e){var t=function(e){var t,n,r=null!==(t=e.proxy)&&void 0!==t?t:e.proxyUrl;return{session_sample_rate:null!==(n=e.sessionSampleRate)&&void 0!==n?n:e.sampleRate,telemetry_sample_rate:e.telemetrySampleRate,telemetry_configuration_sample_rate:e.telemetryConfigurationSampleRate,use_before_send:!!e.beforeSend,use_cross_site_session_cookie:e.useCrossSiteSessionCookie,use_secure_session_cookie:e.useSecureSessionCookie,use_proxy:void 0!==r?!!r:void 0,silent_multiple_init:e.silentMultipleInit,track_session_across_subdomains:e.trackSessionAcrossSubdomains,track_resources:e.trackResources,track_long_task:e.trackLongTasks,allow_fallback_to_local_storage:!!e.allowFallbackToLocalStorage}}(e);return h({forward_errors_to_logs:e.forwardErrorsToLogs,forward_console_logs:e.forwardConsoleLogs,forward_reports:e.forwardReports},t)}(n)),{handleLog:l,getInternalContext:(f=c,{get:function(e){var t=f.findTrackedSession(e);if(t)return{session_id:t.id}}}).get}}));lr=y(),vr=gr,pr=lr[dr="DD_LOGS"],lr[dr]=vr,pr&&pr.q&&pr.q.forEach((function(e){return r(e,"onReady callback threw an error:")()}))}();
{
"name": "@datadog/browser-logs",
"version": "4.48.1",
"version": "4.48.2",
"license": "Apache-2.0",

@@ -16,6 +16,6 @@ "main": "cjs/entries/main.js",

"dependencies": {
"@datadog/browser-core": "4.48.1"
"@datadog/browser-core": "4.48.2"
},
"peerDependencies": {
"@datadog/browser-rum": "4.48.1"
"@datadog/browser-rum": "4.48.2"
},

@@ -38,3 +38,3 @@ "peerDependenciesMeta": {

},
"gitHead": "b5ae7eb3288b0e8ae8b1ad1b160dfff29c039a56"
"gitHead": "da0c864639fd36358540f38342787b9967638ed4"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc