"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7042],{67042:function(t,e,n){let r;e.S1=e.jl=void 0;let o=n(90458),i=n(19137),a=n(51003);e.jl=()=>r;let u=!1,s=!1;e.S1=({clientToken:t="",service:e="",env:n="",version:c="",site:f="datadoghq.com",forwardErrorsToLogs:d=!0,sampleRate:l=100,context:p={},useRum:v=!1,rumApplicationId:m="",trackInteractions:h=!0,disabled:g=!1,additionalDatadogLogOptions:E={},additionalDatadogRUMOptions:y={}}={})=>{if(g)r=new a.LocalLogger,(t="",e="")=>{console.log("Adding to Global Context",t,e)};else{if("string"!=typeof t||""===t)throw Error("Client token must be provided");if("string"!=typeof e||""===e)throw Error("Service must be provided");u||(o.datadogLogs.onReady(()=>{u=!0}),o.datadogLogs.init(Object.assign({service:e,clientToken:t,env:n,version:c,site:f,forwardErrorsToLogs:d,sampleRate:l},E))),v&&""!==m&&!s&&(i.datadogRum.onReady(()=>{s=!0}),i.datadogRum.init(Object.assign({applicationId:m,clientToken:t,site:f,service:e,env:n,version:c,sampleRate:l,trackInteractions:h},y))),Object.keys(p).forEach(t=>{o.datadogLogs.addLoggerGlobalContext(t,p[t])}),o.datadogLogs.addLoggerGlobalContext,r=o.datadogLogs.logger}}},51003:function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.LocalLogger=void 0;let r=n(90458);class o extends r.Logger{constructor(t={}){super(t=>{},r.HandlerType.http,r.StatusType.debug),console.log("Setting up Local Logger with context",t)}addContext(t,e){}debug(t,e){console.debug(t,e)}error(t,e){console.error(t,e)}info(t,e){console.info(t,e)}warn(t,e){console.warn(t,e)}log(t,e,n){}removeContext(t){}setContext(t){}setHandler(t){}setLevel(t){console.log(`Setting Level to ${t}`)}}e.LocalLogger=o},8678:function(t,e,n){n.d(e,{G5:function(){return v},VE:function(){return m},f7:function(){return o},mC:function(){return p},r5:function(){return d},y:function(){return l}});var r,o,i=n(36325),a=n(49647),u=n(9862),s=n(96734),c=n(40812),f=n(13842);function d(t){var e=(0,i.pi)((0,i.pi)({},t),{onReady:function(t){t()}});return Object.defineProperty(e,"_setDebug",{get:function(){return s.yD},enumerable:!1}),e}function l(t,e,n){var r=t[e];t[e]=n,r&&r.q&&r.q.forEach(function(t){return(0,c.Z)(t,"onReady callback threw an error:")()})}function p(t,e){var n=(0,u._7)(t,e),r=(0,s.py)(n);return{configuration:n,internalMonitoring:r}}function v(t){return!!(0,a.oX)(t)||(f.j.warn("Cookies are not authorized, we will not send any data."),!1)}function m(){return"file:"!==window.location.protocol||(f.j.error("Execution is not allowed in the current context."),!1)}(r=o||(o={})).RELEASE="release",r.STAGING="staging",r.E2E_TEST="e2e-test"},49647:function(t,e,n){n.d(e,{MI:function(){return a},WQ:function(){return d},ej:function(){return c},fH:function(){return u},oX:function(){return f}});var r,o=n(13842),i=n(64828),a=i.WT;function u(t,e){var n,r,o=!1,i=function(){o=!0,clearTimeout(n),n=setTimeout(function(){o=!1},a)};return{get:function(){return o||(r=c(t),i()),r},set:function(n,o){s(t,n,o,e),r=n,i()}}}function s(t,e,n,r){var o=new Date;o.setTime(o.getTime()+n);var i="expires="+o.toUTCString(),a=r&&r.crossSite?"none":"strict",u=r&&r.domain?";domain="+r.domain:"",s=r&&r.secure?";secure":"";document.cookie=t+"="+e+";"+i+";path=/;samesite="+a+u+s}function c(t){return(0,i.MY)(document.cookie,t)}function f(t){if(void 0===document.cookie||null===document.cookie)return!1;try{var e="dd_cookie_test_"+(0,i.DO)(),n="test";s(e,n,i.WT,t);var r=c(e)===n;return s(e,"",0,t),r}catch(t){return o.j.error(t),!1}}function d(){if(void 0===r){for(var t="dd_site_test_"+(0,i.DO)(),e=window.location.hostname.split("."),n=e.pop();e.length&&!c(t);)n=e.pop()+"."+n,s(t,"test",i.WT,{domain:n});s(t,"",0,{domain:n}),r=n}return r}},10267:function(t,e,n){n.d(e,{o:function(){return v},z:function(){return p}});var r,o,i=n(36325),a=n(96734),u=n(1307),s=n(37697),c=n(82027),f=n(54343),d=[],l=[];function p(){return r||(window.fetch&&(o=window.fetch,window.fetch=function(t,e){var n,r=(0,a.L6)(m,null,[t,e]);return r?(n=o.call(this,r.input,r.init),(0,a.L6)(h,null,[n,r])):n=o.call(this,t,e),n}),r={beforeSend:function(t){d.push(t)},onRequestComplete:function(t){l.push(t)}}),r}function v(){r&&(r=void 0,d.splice(0,d.length),l.splice(0,l.length),window.fetch=o)}function m(t,e){var n=e&&e.method||"object"==typeof t&&t.method||"GET",r=(0,f.D5)("object"==typeof t&&t.url||t),o={init:e,input:t,method:n,startClocks:(0,c.$I)(),url:r};return d.forEach(function(t){return t(o)}),o}function h(t,e){var n=this,r=function(t){return(0,i.mG)(n,void 0,void 0,function(){var n;return(0,i.Jh)(this,function(r){switch(r.label){case 0:if(e.duration=(0,c._J)(e.startClocks.timeStamp,(0,c.n$)()),!("stack"in t||t instanceof Error))return[3,1];return e.status=0,e.responseText=(0,s.P3)((0,u._t)(t)),e.isAborted=t instanceof DOMException&&t.code===DOMException.ABORT_ERR,e.error=t,l.forEach(function(t){return t(e)}),[3,6];case 1:if(!("status"in t))return[3,6];n=void 0,r.label=2;case 2:return r.trys.push([2,4,,5]),[4,t.clone().text()];case 3:return n=r.sent(),[3,5];case 4:return n="Unable to retrieve response: "+r.sent(),[3,5];case 5:e.response=t,e.responseText=n,e.responseType=t.type,e.status=t.status,e.isAborted=!1,l.forEach(function(t){return t(e)}),r.label=6;case 6:return[2]}})})};t.then((0,a.zk)(r),(0,a.zk)(r))}},31737:function(t,e,n){n.d(e,{E:function(){return v},h:function(){return p}});var r,o,i,a,u=n(36325),s=n(96734),c=n(82027),f=n(54343),d=[],l=[];function p(){return r||(o=XMLHttpRequest.prototype.open,i=XMLHttpRequest.prototype.send,a=XMLHttpRequest.prototype.abort,XMLHttpRequest.prototype.open=m,XMLHttpRequest.prototype.send=h,XMLHttpRequest.prototype.abort=g,r={beforeSend:function(t){d.push(t)},onRequestComplete:function(t){l.push(t)}}),r}function v(){r&&(r=void 0,d.length=0,l.length=0,XMLHttpRequest.prototype.open=o,XMLHttpRequest.prototype.send=i,XMLHttpRequest.prototype.abort=a)}function m(t,e){var n=this;return(0,s.L6)(function(){n._datadog_xhr={method:t,url:(0,f.D5)(e)}}),o.apply(this,arguments)}function h(){var t=this;return(0,s.L6)(function(){if(t._datadog_xhr){t._datadog_xhr.startTime=(0,c._q)(),t._datadog_xhr.startClocks=(0,c.$I)(),t._datadog_xhr.isAborted=!1;var e=!1,n=t.onreadystatechange,r=function(){this.readyState===XMLHttpRequest.DONE&&o(),n&&n.apply(this,arguments)},o=(0,s.zk)(function(){if(t.removeEventListener("loadend",o),t.onreadystatechange===r&&(t.onreadystatechange=n),!e)e=!0,t._datadog_xhr.duration=(0,c._J)(t._datadog_xhr.startClocks.timeStamp,(0,c.n$)()),t._datadog_xhr.responseText=t.response,t._datadog_xhr.status=t.status,t._datadog_xhr.xhr=t,l.forEach(function(e){return e((0,u.pi)({},t._datadog_xhr))})});t.onreadystatechange=r,t.addEventListener("loadend",o),d.forEach(function(e){return e(t._datadog_xhr,t)})}}),i.apply(this,arguments)}function g(){var t=this;return(0,s.L6)(function(){t._datadog_xhr&&(t._datadog_xhr.isAborted=!0)}),a.apply(this,arguments)}},9862:function(t,e,n){n.d(e,{_7:function(){return h},HZ:function(){return g}});var r,o=n(36325),i=n(49647),a=n(40812),u=n(64828),s=n(8678),c={alternate:{logs:"logs",rum:"rum",sessionReplay:"session-replay",trace:"trace"},classic:{logs:"browser",rum:"rum",sessionReplay:void 0,trace:"public-trace"}},f={EU:"eu",US:"us"},d=((r={})[f.EU]="datadoghq.eu",r[f.US]="datadoghq.com",r),l=[d[f.US],d[f.EU]];function p(t,e,n){var r,o,i,a;return"classic"===t&&(r=c.classic[e])&&r+"-http-intake.logs."+n||(o=c.alternate[e],a=(i=n.split(".")).pop(),o+".browser-intake-"+i.join("-")+"."+a)}function v(t,e,n,r){var o="sdk_version:"+n.sdkVersion+(n.env?",env:"+n.env:"")+(n.service?",service:"+n.service:"")+(n.version?",version:"+n.version:""),i=p(t,e,n.site),a=n.proxyHost?n.proxyHost:i,u=(n.proxyHost?"ddhost="+i+"&":"")+"ddsource="+(r||"browser")+"&ddtags="+encodeURIComponent(o);return"https://"+a+"/v1/input/"+n.clientToken+"?"+u}var m={allowedTracingOrigins:[],maxErrorsByMinute:3e3,maxInternalMonitoringMessagesPerPage:15,resourceSampleRate:100,sampleRate:100,silentMultipleInit:!1,trackInteractions:!1,trackViewsManually:!1,requestErrorResponseLengthLimit:32*u.Tn,flushTimeout:30*u.WT,maxBatchSize:50,maxMessageSize:256*u.Tn,batchBytesLimit:16*u.Tn};function h(t,e){var n=Array.isArray(t.enableExperimentalFeatures)?t.enableExperimentalFeatures:[],r=(0,o.pi)((0,o.pi)({beforeSend:t.beforeSend&&(0,a.Z)(t.beforeSend,"beforeSend threw an error:"),cookieOptions:g(t),isEnabled:function(t){return(0,u.q9)(n,t)},service:t.service},function(t,e){var n,r={buildMode:e.buildMode,clientToken:t.clientToken,env:t.env,proxyHost:t.proxyHost,sdkVersion:e.sdkVersion,service:t.service,site:t.site||d[t.datacenter||e.datacenter],version:t.version},i=(n=r.site,!t.useAlternateIntakeDomains&&(0,u.q9)(l,n)?"classic":"alternate"),a=function(t,e,n){if(e.proxyHost)return["https://"+e.proxyHost+"/v1/input/"];var r=[e.site];e.buildMode===s.f7.STAGING&&n&&r.push(d[f.US]);for(var o=[],i=Object.keys(c[t]),a=0;a>>",m.logsEndpoint="<<< E2E LOGS ENDPOINT >>>",m.rumEndpoint="<<< E2E RUM ENDPOINT >>>",m.sessionReplayEndpoint="<<< E2E SESSION REPLAY ENDPOINT >>>"),r.buildMode===s.f7.STAGING&&void 0!==t.replica){var h=(0,o.pi)((0,o.pi)({},r),{applicationId:t.replica.applicationId,clientToken:t.replica.clientToken,site:d[f.US]});m.replica={applicationId:t.replica.applicationId,internalMonitoringEndpoint:v(i,"logs",h,"browser-agent-internal-monitoring"),logsEndpoint:v(i,"logs",h),rumEndpoint:v(i,"rum",h)}}return m}(t,e)),m);return"allowedTracingOrigins"in t&&(r.allowedTracingOrigins=t.allowedTracingOrigins),"sampleRate"in t&&(r.sampleRate=t.sampleRate),"resourceSampleRate"in t&&(r.resourceSampleRate=t.resourceSampleRate),"trackInteractions"in t&&(r.trackInteractions=!!t.trackInteractions),"trackViewsManually"in t&&(r.trackViewsManually=!!t.trackViewsManually),"actionNameAttribute"in t&&(r.actionNameAttribute=t.actionNameAttribute),r}function g(t){var e={};return e.secure=!!t.useSecureSessionCookie||!!t.useCrossSiteSessionCookie,e.crossSite=!!t.useCrossSiteSessionCookie,t.trackSessionAcrossSubdomains&&(e.domain=(0,i.WQ)()),e}},84433:function(t,e,n){n.d(e,{U:function(){return f}});var r,o=n(36325),i=n(37697),a=n(82027),u=n(64828),s=n(96734),c=n(1307);function f(t){return r=console.error,console.error=function(){for(var e=[],n=0;n=500)&&e.notify({message:(a.xd.XHR===r?"XHR":"Fetch")+" error "+o.method+" "+o.url,resource:{method:o.method,statusCode:o.status,url:o.url},source:i.zH.NETWORK,stack:((u=o.responseText)&&u.length>t.requestErrorResponseLengthLimit?u.substring(0,t.requestErrorResponseLengthLimit)+"...":u)||"Failed to load",startClocks:o.startClocks})}return void 0===n&&(n=!0),(0,o.h)().onRequestComplete(function(t){return u(a.xd.XHR,t)}),(0,r.z)().onRequestComplete(function(t){return u(a.xd.FETCH,t)}),{stop:function(){(0,o.E)(),(0,r.o)()}}}},21315:function(t,e,n){n.d(e,{L:function(){return u}});var r,o=n(37697),i=n(82027),a=n(25926);function u(t){return r=function(e,n,r){var a=(0,o.wl)(e,r,"Uncaught"),u=a.stack,s=a.message,c=a.type;t.notify({message:s,stack:u,type:c,source:o.zH.SOURCE,startClocks:(0,i.$I)(),originalError:r,handling:o.Xw.UNHANDLED})},(0,a.Ld)(r),{stop:function(){(0,a.r1)(r)}}}},96734:function(t,e,n){n.d(e,{L6:function(){return h},Th:function(){return v},Ur:function(){return E},py:function(){return p},tV:function(){return g},yD:function(){return T},zk:function(){return m}});var r,o,i,a=n(36325),u=n(13842),s=n(37697),c=n(64828),f=n(2097),d=n(1307);(r=o||(o={})).info="info",r.error="error";var l={maxMessagesPerPage:0,sentMessageCount:0};function p(t){if(t.internalMonitoringEndpoint){var e=function(t){var e,n=r(t.internalMonitoringEndpoint);function r(e){return new f.E(new f.a(e,t.batchBytesLimit),t.maxBatchSize,t.batchBytesLimit,t.maxMessageSize,t.flushTimeout)}return void 0!==t.replica&&(e=r(t.replica.internalMonitoringEndpoint)),{add:function(t){var r=(0,c.$e)({date:new Date().getTime(),view:{referrer:document.referrer,url:window.location.href}},void 0!==i?i():{},t);n.add(r),e&&e.add(r)}}}(t);(0,c.f0)(l,{batch:e,maxMessagesPerPage:t.maxInternalMonitoringMessagesPerPage,sentMessageCount:0})}return{setExternalContextProvider:function(t){i=t}}}function v(t,e,n){var r=n.value;n.value=function(){for(var t=[],e=0;e]+)>|([^\)]+))\((.*)\))? in (.*):\s*$/i,i=n.split("\n"),a=[],s=0;s|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,s=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|capacitor|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,c=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,f=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,d=/\((\S*)(?::(\d+))(?::(\d+))\)/,l=i.split("\n"),p=[],v=0,m=l.length;v eval")>-1,n=f.exec(r[3]),e&&n?(r[3]=n[1],r[4]=n[2],r[5]=void 0):0!==v||r[5]||(h=t.columnNumber,void 0===h)||(p[0].column=t.columnNumber+1),o={args:r[2]?r[2].split(","):[],column:r[5]?+r[5]:void 0,func:r[1]||"?",line:r[4]?+r[4]:void 0,url:r[3]}}!o.func&&o.line&&(o.func="?"),p.push(o)}if(p.length)return{stack:p,message:u(t,"message"),name:u(t,"name")}}}(t))return n}catch(t){if(i)throw t}try{if(n=function(t){var e,n=u(t,"message");if(n){var r=n.split("\n");if(!(r.length<4)){var o=/^\s*Line (\d+) of linked script ((?:file|https?|blob)\S+)(?:: in function (\S+))?\s*$/i,i=/^\s*Line (\d+) of inline#(\d+) script in ((?:file|https?|blob)\S+)(?:: in function (\S+))?\s*$/i,a=/^\s*Line (\d+) of function script\s*$/i,s=[],c=window&&window.document&&window.document.getElementsByTagName("script"),f=[];for(var d in c)Object.prototype.hasOwnProperty.call(c,d)&&!c[d].src&&f.push(c[d]);for(var l=2;l0&&o[0].url===r.url){if(o[0].line===r.line)return!1;if(!o[0].line&&o[0].func===r.func)return o[0].line=r.line,o[0].context=r.context,!1}return o.unshift(r),t.partial=!0,!0}return t.incomplete=!0,!1}function u(t,e){if("object"==typeof t&&t&&e in t){var n=t[e];return"string"==typeof n?n:void 0}}},25926:function(t,e,n){n.d(e,{Hj:function(){return l},Ld:function(){return v},r1:function(){return m}});var r,o,i,a,u,s,c=n(96734),f=n(1307),d=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/;function l(t){if(o){if(r===t)return;y()}var e=(0,f._t)(t);throw o=e,r=t,setTimeout((0,c.zk)(function(){r===t&&y()}),e.incomplete?2e3:0),t}var p=[];function v(t){a||(i=window.onerror,window.onerror=(0,c.zk)(g),a=!0),s||(u=null!==window.onunhandledrejection?window.onunhandledrejection:void 0,window.onunhandledrejection=(0,c.zk)(E),s=!0),p.push(t)}function m(t){for(var e=p.length-1;e>=0;e-=1)p[e]===t&&p.splice(e,1);0===p.length&&(a&&(window.onerror=i,a=!1),s&&(window.onunhandledrejection=u,s=!1))}function h(t,e,n){var r;if(p.forEach(function(o){try{o(t,e,n)}catch(t){r=t}}),r)throw r}function g(t,e,n,r,a){if(o)(0,f.F1)(o,e,n),y();else if(a)h((0,f._t)(a),!0,a);else{var u,s=t;if("[object String]"===({}).toString.call(t)){var c=d.exec(s);c&&(u=c[1],s=c[2])}h({name:u,message:"string"==typeof s?s:void 0,stack:[{url:e,column:r,line:n}]},!0,t)}return!!i&&i.apply(this,arguments)}function E(t){var e=t.reason||"Empty reason";h((0,f._t)(e),!0,e)}function y(){var t=o,e=r;o=void 0,r=void 0,h(t,!1,e)}},68783:function(t,e,n){n.d(e,{S:function(){return r}});var r=function(){function t(t){void 0===t&&(t=1e4),this.limit=t,this.buffer=[]}return t.prototype.add=function(t){this.buffer.push(t)>this.limit&&this.buffer.splice(0,1)},t.prototype.drain=function(){this.buffer.forEach(function(t){return t()}),this.buffer.length=0},t}()},40812:function(t,e,n){n.d(e,{Z:function(){return o}});var r=n(13842);function o(t,e){return function(){for(var n=[],o=0;o":t.func,r=t.args&&t.args.length>0?"("+t.args.join(", ")+")":"",o=t.line?":"+t.line:"",i=t.line&&t.column?":"+t.column:"";e+="\n at "+n+r+" @ "+t.url+o+i}),e}function d(t){return(t.name||"Error")+": "+t.message}function l(){var t,e=Error();if(!e.stack)try{throw e}catch(t){(0,u.ZT)()}return(0,i.L6)(function(){var n=(0,a._t)(e);n.stack=n.stack.slice(2),t=f(n)}),t}(r=o||(o={})).HANDLED="handled",r.UNHANDLED="unhandled"},64766:function(t,e,n){n.d(e,{S:function(){return a}});var r=n(37697),o=n(82027),i=n(64828);function a(t,e){var n=0,a=!1;return{isLimitReached:function(){if(0===n&&setTimeout(function(){n=0},i.yR),(n+=1)<=t.maxErrorsByMinute||a)return a=!1,!1;if(n===t.maxErrorsByMinute+1){a=!0;try{e({message:"Reached max number of errors by minute: "+t.maxErrorsByMinute,source:r.zH.AGENT,startClocks:(0,o.$I)()})}finally{a=!1}}return!0}}}},73473:function(t,e,n){n.d(e,{y:function(){return r}});var r=function(){function t(){this.observers=[]}return t.prototype.subscribe=function(t){var e=this;return this.observers.push(t),{unsubscribe:function(){e.observers=e.observers.filter(function(e){return t!==e})}}},t.prototype.notify=function(t){this.observers.forEach(function(e){return e(t)})},t}()},82027:function(t,e,n){n.d(e,{$I:function(){return f},DY:function(){return i},QA:function(){return a},_J:function(){return l},_q:function(){return c},c0:function(){return u},cQ:function(){return d},n$:function(){return s},ni:function(){return p}});var r,o=n(64828);function i(t){var e;return{relative:t,timeStamp:(e=Date.now()-performance.now())>v()?Math.round(e+t):Math.round(v()+t)}}function a(){return Math.round(Date.now()-(v()+performance.now()))}function u(t){return(0,o.hj)(t)?(0,o.NM)(1e6*t,0):t}function s(){return Date.now()}function c(){return performance.now()}function f(){return{relative:c(),timeStamp:s()}}function d(){return{relative:0,timeStamp:v()}}function l(t,e){return e-t}function p(t){return t-v()}function v(){return void 0===r&&(r=performance.timing.navigationStart),r}},54343:function(t,e,n){n.d(e,{D5:function(){return i},P$:function(){return u},jv:function(){return a},ye:function(){return s}});var r,o=n(64828);function i(t){return c(t,(0,o.Dp)()).href}function a(t){try{return!!c(t)}catch(t){return!1}}function u(t){return(0,o.j1)(c(t))}function s(t){var e=c(t).pathname;return"/"===e[0]?e:"/"+e}function c(t,e){if(function(){if(void 0!==r)return r;try{var t=new URL("http://test/path");r="http://test/path"===t.href}catch(t){r=!1}return r}())return void 0!==e?new URL(t,e):new URL(t);if(void 0===e&&!/:/.test(t))throw Error("Invalid URL: '"+t+"'");var n=document,o=n.createElement("a");if(void 0!==e){var i=(n=document.implementation.createHTMLDocument("")).createElement("base");i.href=e,n.head.appendChild(i),n.body.appendChild(o)}return o.href=t,o}},64828:function(t,e,n){n.d(e,{$e:function(){return H},DO:function(){return m},Dp:function(){return L},I8:function(){return j},MY:function(){return A},NM:function(){return g},Oo:function(){return N},P2:function(){return p},Q8:function(){return k},Qr:function(){return w},Rf:function(){return x},TT:function(){return S},Tm:function(){return U},Tn:function(){return l},WT:function(){return s},ZT:function(){return E},_g:function(){return i},_z:function(){return D},dV:function(){return f},f0:function(){return v},hj:function(){return R},j1:function(){return I},lh:function(){return y},oL:function(){return P},q9:function(){return b},qP:function(){return O},s2:function(){return d},sE:function(){return C},xd:function(){return a},y7:function(){return h},yR:function(){return c},yw:function(){return M},zz:function(){return _}});var r,o,i,a,u=n(96734),s=1e3,c=6e4,f=36e5,d=864e5,l=1024;function p(t,e,n){var r,o,i=!n||void 0===n.leading||n.leading,a=!n||void 0===n.trailing||n.trailing,u=!1;return{throttled:function(){for(var n=[],s=0;s>parseInt(t,10)/4).toString(16):"10000000-1000-4000-8000-100000000000".replace(/[018]/g,m)}function h(t){return 0!==t&&100*Math.random()<=t}function g(t,e){return+t.toFixed(e)}function E(){}function y(t,e,n){if(null==t)return JSON.stringify(t);var r,o,i=[!1,void 0];T(t)&&(i=[!0,t.toJSON],delete t.toJSON);var a=[!1,void 0];"object"==typeof t&&T(r=Object.getPrototypeOf(t))&&(a=[!0,r.toJSON],delete r.toJSON);try{o=JSON.stringify(t,e,n)}catch(t){o=""}finally{i[0]&&(t.toJSON=i[1]),a[0]&&(r.toJSON=a[1])}return o}function T(t){return"object"==typeof t&&null!==t&&t.hasOwnProperty("toJSON")}function b(t,e){return -1!==t.indexOf(e)}function C(t,e){for(var n=0;n=0&&t<=100}function R(t){return"number"==typeof t}function S(t){var e=[];return Object.keys(t).forEach(function(n){e.push(t[n])}),e}function O(t){return Object.keys(t).map(function(e){return[e,t[e]]})}function w(t){return 0===Object.keys(t).length}function k(t,e){for(var n={},r=0,o=Object.keys(t);r=55296&&n<=56319?t.slice(0,e+1):t.slice(0,e)}function N(t,e,n,r){return M(t,[e],n,r)}function M(t,e,n,r){var o=void 0===r?{}:r,i=o.once,a=o.capture,s=o.passive,c=(0,u.zk)(i?function(t){d(),n(t)}:n),f=s?{capture:a,passive:s}:a;e.forEach(function(e){return t.addEventListener(e,c,f)});var d=function(){return e.forEach(function(e){return t.removeEventListener(e,c,f)})};return{stop:d}}function U(t,e){document.readyState===t||"complete"===document.readyState?e():N(window,"complete"===t?"load":"DOMContentLoaded",e,{once:!0})}function P(t){return null===t?"null":Array.isArray(t)?"array":typeof t}function z(t,e,n){if(void 0===n&&(n=function(){if("undefined"!=typeof WeakSet){var t=new WeakSet;return{hasAlreadyBeenSeen:function(e){var n=t.has(e);return n||t.add(e),n}}}var e=[];return{hasAlreadyBeenSeen:function(t){var n=e.indexOf(t)>=0;return n||e.push(t),n}}}()),void 0===e)return t;if("object"!=typeof e||null===e)return e;if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){var r=e.flags||[e.global?"g":"",e.ignoreCase?"i":"",e.multiline?"m":"",e.sticky?"y":"",e.unicode?"u":""].join("");return new RegExp(e.source,r)}if(!n.hasAlreadyBeenSeen(e)){if(Array.isArray(e)){for(var o=Array.isArray(t)?t:[],i=0;i=200&&n.status<300||s||(s=!0,(0,a.tV)("XHR fallback failed",{on_line:navigator.onLine,size:e,url:r,try_beacon:o,event:{is_trusted:t.isTrusted,total:t.total,loaded:t.loaded},request:{status:n.status,ready_state:n.readyState,response_text:n.responseText.slice(0,64)}}))},u=new XMLHttpRequest;u.addEventListener("loadend",(0,a.zk)(function(t){return i(t)})),u.open("POST",r,!0),u.send(t)},t}(),f=!1,d=function(){function t(t,e,n,r,o,a){void 0===a&&(a=i.ZT),this.request=t,this.maxSize=e,this.bytesLimit=n,this.maxMessageSize=r,this.flushTimeout=o,this.beforeUnloadCallback=a,this.pushOnlyBuffer=[],this.upsertBuffer={},this.bufferBytesSize=0,this.bufferMessageCount=0,this.flushOnVisibilityHidden(),this.flushPeriodically()}return t.prototype.add=function(t){this.addOrUpdate(t)},t.prototype.upsert=function(t,e){this.addOrUpdate(t,e)},t.prototype.flush=function(){if(0!==this.bufferMessageCount){var t=(0,r.pr)(this.pushOnlyBuffer,(0,i.TT)(this.upsertBuffer));this.request.send(t.join("\n"),this.bufferBytesSize),this.pushOnlyBuffer=[],this.upsertBuffer={},this.bufferBytesSize=0,this.bufferMessageCount=0}},t.prototype.sizeInBytes=function(t){return u.test(t)?void 0!==window.TextEncoder?new TextEncoder().encode(t).length:new Blob([t]).size:t.length},t.prototype.addOrUpdate=function(t,e){var n=this.process(t),r=n.processedMessage,i=n.messageBytesSize;if(i>=this.maxMessageSize){o.j.warn("Discarded a message whose size was bigger than the maximum allowed size "+this.maxMessageSize+"KB.");return}this.hasMessageFor(e)&&this.remove(e),this.willReachedBytesLimitWith(i)&&this.flush(),this.push(r,i,e),this.isFull()&&this.flush()},t.prototype.process=function(t){var e=(0,i.lh)(t),n=this.sizeInBytes(e);return{processedMessage:e,messageBytesSize:n}},t.prototype.push=function(t,e,n){this.bufferMessageCount>0&&(this.bufferBytesSize+=1),void 0!==n?this.upsertBuffer[n]=t:this.pushOnlyBuffer.push(t),this.bufferBytesSize+=e,this.bufferMessageCount+=1},t.prototype.remove=function(t){var e=this.upsertBuffer[t];delete this.upsertBuffer[t];var n=this.sizeInBytes(e);this.bufferBytesSize-=n,this.bufferMessageCount-=1,this.bufferMessageCount>0&&(this.bufferBytesSize-=1)},t.prototype.hasMessageFor=function(t){return void 0!==t&&void 0!==this.upsertBuffer[t]},t.prototype.willReachedBytesLimitWith=function(t){return this.bufferBytesSize+t+1>=this.bytesLimit},t.prototype.isFull=function(){return this.bufferMessageCount===this.maxSize||this.bufferBytesSize>=this.bytesLimit},t.prototype.flushPeriodically=function(){var t=this;setTimeout((0,a.zk)(function(){t.flush(),t.flushPeriodically()}),this.flushTimeout)},t.prototype.flushOnVisibilityHidden=function(){var t=this;navigator.sendBeacon&&((0,i.Oo)(window,"beforeunload",this.beforeUnloadCallback),(0,i.Oo)(document,"visibilitychange",function(){"hidden"===document.visibilityState&&t.flush()}),(0,i.Oo)(window,"beforeunload",function(){return t.flush()}))},t}()},36325:function(t,e,n){n.d(e,{Jh:function(){return i},mG:function(){return o},pi:function(){return r},pr:function(){return a}});var r=function(){return(r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]=p[this.level]){var r=Array.isArray(this.handlerType)?this.handlerType:[this.handlerType];(0,s.q9)(r,v.http)&&this.sendLog(a({message:t,status:n},(0,s.$e)(this.contextManager.get(),e))),(0,s.q9)(r,v.console)&&c.j.log(n+": "+t,(0,s.$e)(this.contextManager.get(),e))}},t.prototype.debug=function(t,e){this.log(t,e,l.debug)},t.prototype.info=function(t,e){this.log(t,e,l.info)},t.prototype.warn=function(t,e){this.log(t,e,l.warn)},t.prototype.error=function(t,e){var n={error:{origin:f.zH.LOGGER}};this.log(t,(0,s.$e)(n,e),l.error)},t.prototype.setContext=function(t){this.contextManager.set(t)},t.prototype.addContext=function(t,e){this.contextManager.add(t,e)},t.prototype.removeContext=function(t){this.contextManager.remove(t)},t.prototype.setHandler=function(t){this.handlerType=t},t.prototype.setLevel=function(t){this.level=t},!function(t,e,n,r){var o,i=arguments.length,a=i<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(a=(i<3?o(a):i>3?o(e,n,a):o(e,n))||a);i>3&&a&&Object.defineProperty(e,n,a)}([d.Th],t.prototype,"log",null),t}(),h=n(8678),g=n(68783),E=n(73473),y=n(84433),T=n(21315),b=n(59288),C=n(49647),_=n(2097),R=n(64766),S=n(11269);function O(t){return(0,s.y7)(t.sampleRate)?o.TRACKED:o.NOT_TRACKED}(i=o||(o={})).NOT_TRACKED="0",i.TRACKED="1";var w={buildMode:"release",datacenter:"us",sdkVersion:"2.18.0"};function k(t){var e=window.DD_RUM;return e&&e.getInternalContext?e.getInternalContext(t):void 0}var x=function(t){var e=!1,n=(0,u.W)(),r={},o=new g.S,i=function(t,e){o.add(function(){return i(t,e)})},f=function(){},l=new m(p);return(0,h.r5)({logger:l,init:(0,d.zk)(function(r){(e?(r.silentMultipleInit||c.j.error("DD_LOGS is already initialized."),!1):r&&(r.publicApiKey||r.clientToken)?!!(void 0===r.sampleRate||(0,s.zz)(r.sampleRate))||(c.j.error("Sample Rate should be a number between 0 and 100"),!1):(c.j.error("Client Token is not configured, we will not send any data."),!1))&&(r.publicApiKey&&(r.clientToken=r.publicApiKey,c.j.warn("Public API Key is deprecated. Please use Client Token instead.")),i=t(r,l,n.get),f=function(){return(0,s.I8)(r)},o.drain(),e=!0)}),getLoggerGlobalContext:(0,d.zk)(n.get),setLoggerGlobalContext:(0,d.zk)(n.set),addLoggerGlobalContext:(0,d.zk)(n.add),removeLoggerGlobalContext:(0,d.zk)(n.remove),createLogger:(0,d.zk)(function(t,e){return void 0===e&&(e={}),r[t]=new m(p,e.handler,e.level,a(a({},e.context),{logger:{name:t}})),r[t]}),getLogger:(0,d.zk)(function(t){return r[t]}),getInitConfiguration:(0,d.zk)(function(){return f()})});function p(t){i(t,(0,s.$e)({date:Date.now(),view:{referrer:document.referrer,url:window.location.href}},n.get()))}}(function(t,e,n){var r=(0,h.mC)(t,w),i=r.configuration,a=r.internalMonitoring,u=new E.y;!1!==t.forwardErrorsToLogs&&((0,y.U)(u),(0,T.L)(u),(0,b.D)(i,u,i.isEnabled("remove-network-errors")));var c=function(t,e){if(!e){var n=O(t)===o.TRACKED;return{getId:function(){},isTracked:function(){return n}}}var r=(0,S.M_)(t.cookieOptions,"logs",function(e){var n;return{trackingType:n=e===o.NOT_TRACKED||e===o.TRACKED?e:O(t),isTracked:n===o.TRACKED}});return{getId:r.getId,isTracked:function(){return r.getTrackingType()===o.TRACKED}}}(i,(0,C.oX)(i.cookieOptions));return function(t,e,n,r,o,i){n.setExternalContextProvider(function(){return(0,s.$e)({session_id:r.getId()},i(),k())});var a,u=(a=(0,R.S)(t,f),function(e,n){if(r.isTracked()){var o=(0,s.$e)({service:t.service,session_id:r.getId()},n,k(),e);if(!(t.beforeSend&&!1===t.beforeSend(o)||o.status===l.error&&a.isLimitReached()))return o}}),c=function(t){var e,n=r(t.logsEndpoint);function r(e){return new _.E(new _.a(e,t.batchBytesLimit),t.maxBatchSize,t.batchBytesLimit,t.maxMessageSize,t.flushTimeout)}return void 0!==t.replica&&(e=r(t.replica.logsEndpoint)),{add:function(t){n.add(t),e&&e.add(t)}}}(t);function f(t){o.error(t.message,(0,s.$e)({date:t.startClocks.timeStamp,error:{kind:t.type,origin:t.source,stack:t.stack}},t.resource?{http:{method:t.resource.method,status_code:t.resource.statusCode,url:t.resource.url}}:void 0,k(t.startClocks.relative)))}return e.subscribe(f),function(t,e){var n=u(t,e);n&&c.add(n)}}(i,u,a,c,e,n)});(0,h.y)((0,s.Rf)(),"DD_LOGS",x)},19137:function(t,e,n){n.r(e),n.d(e,{datadogRum:function(){return tF}});var r,o,i,a,u,s,c,f,d,l,p,v,m,h,g,E,y,T,b=n(8678),C=n(64828),_=n(26839),R=n(68783),S=n(82027),O=n(9862),w=n(96734),k=n(37697),x=n(13842);(r=f||(f={})).ACTION="action",r.ERROR="error",r.LONG_TASK="long_task",r.VIEW="view",r.RESOURCE="resource",(o=d||(d={})).INITIAL_LOAD="initial_load",o.ROUTE_CHANGE="route_change",(i=l||(l={})).CLICK="click",i.CUSTOM="custom";var L={buildMode:"release",datacenter:"us",sdkVersion:"2.18.0"},I=function(){return(I=Object.assign||function(t){for(var e,n=1,r=arguments.length;nt[n])return!1;return!0}function P(t){if(U(t.startTime,t.fetchStart,t.domainLookupStart,t.domainLookupEnd,t.connectStart,t.connectEnd,t.requestStart,t.responseStart,t.responseEnd)){if(!z(t))return t;var e=t.redirectStart,n=t.redirectEnd;if(e500){(0,w.tV)("Reached maximum of foreground time");return}var t=te[te.length-1];if(void 0!==t&&void 0===t.end){(0,w.tV)("Previous foreground periods not closed. Continuing current one",{inForegroundPeriodsCount:te.length,currentForegroundPeriodStart:t.start});return}te.push({start:(0,S._q)()})}function tr(){if(0===te.length){(0,w.tV)("No foreground period");return}var t=te[te.length-1];if(void 0!==t.end){(0,w.tV)("Current foreground period already closed",{inForegroundPeriodsCount:te.length,currentForegroundPeriodStart:t.start,currentForegroundPeriodEnd:t.end});return}t.end=(0,S._q)()}function to(t){for(var e=te.length-1;e>=0;e--){var n=te[e];if(void 0!==n.end&&t>n.end)break;if(t>n.start&&(void 0===n.end||t=0;o--){var i=te[o];if(void 0!==i.end&&t>i.end)break;if(!(ni.start?t:i.start,u=(0,S._J)(t,a),s=void 0===i.end||n0})}return o.push(e.subscribe(function(){return a()})),o.push(t.subscribe(p.PERFORMANCE_ENTRY_COLLECTED,function(t){"resource"===t.entryType&&a()})),o.push(t.subscribe(p.REQUEST_STARTED,function(t){void 0===n&&(n=t.requestIndex),i+=1,a()})),o.push(t.subscribe(p.REQUEST_COMPLETED,function(t){void 0===n||t.requestIndex0)return tw(t.labels[0])}else if(t.id){var e=t.ownerDocument&&t.ownerDocument.querySelector('label[for="'+t.id.replace('"','\\"')+'"]');return e&&tw(e)}},function(t){if("INPUT"===t.nodeName){var e=t.getAttribute("type");if("button"===e||"submit"===e||"reset"===e)return t.value}},function(t){if("BUTTON"===t.nodeName||"LABEL"===t.nodeName||"button"===t.getAttribute("role"))return tw(t)},function(t){return t.getAttribute("aria-label")},function(t){var e=t.getAttribute("aria-labelledby");if(e)return e.split(/\s+/).map(function(e){return t.ownerDocument?t.ownerDocument.getElementById(e):null}).filter(function(t){return!!t}).map(tw).join(" ")},function(t){return t.getAttribute("alt")},function(t){return t.getAttribute("name")},function(t){return t.getAttribute("title")},function(t){return t.getAttribute("placeholder")},function(t){if("options"in t&&t.options.length>0)return tw(t.options[0])}],t_=[function(t){return tw(t)}];function tR(t,e){for(var n=t,r=0;r<=10&&n&&"BODY"!==n.nodeName&&"HTML"!==n.nodeName&&"HEAD"!==n.nodeName;){for(var o=0;o100?(0,C._z)(t,100)+" [...]":t}function tw(t){if(!t.isContentEditable){if("innerText"in t){var e=t.innerText;if(!function(){if(void 0===m){var t=document.createElement("style");t.textContent="*";var e=document.createElement("div");e.appendChild(t),document.body.appendChild(e),m=""===e.innerText,document.body.removeChild(e)}return m}())for(var n=t.querySelectorAll("script, style"),r=0;r0&&(e=e.replace(o,""))}return e}return t.textContent}}var tk=function(){function t(t,e,n,r){this.lifeCycle=t,this.type=e,this.name=n,this.event=r,this.id=(0,C.DO)(),this.startClocks=(0,S.$I)(),this.eventCountsSubscription=tE(t),this.lifeCycle.notify(p.AUTO_ACTION_CREATED,{id:this.id,startClocks:this.startClocks})}return t.prototype.complete=function(t){var e=this.eventCountsSubscription.eventCounts;this.lifeCycle.notify(p.AUTO_ACTION_COMPLETED,{counts:{errorCount:e.errorCount,longTaskCount:e.longTaskCount,resourceCount:e.resourceCount},duration:(0,S._J)(this.startClocks.timeStamp,t),id:this.id,name:this.name,startClocks:this.startClocks,type:this.type,event:this.event}),this.eventCountsSubscription.stop()},t.prototype.discard=function(){this.lifeCycle.notify(p.AUTO_ACTION_DISCARDED),this.eventCountsSubscription.stop()},t}();function tx(t,e){var n=tL(t)?{action:{error:{count:t.counts.errorCount},id:t.id,loading_time:(0,S.c0)(t.duration),long_task:{count:t.counts.longTaskCount},resource:{count:t.counts.resourceCount}}}:void 0,r=tL(t)?void 0:t.context,o=(0,C.$e)({action:{id:(0,C.DO)(),target:{name:t.name},type:t.type},date:t.startClocks.timeStamp,type:f.ACTION},n),i=e.getInForeground(t.startClocks.relative);return void 0!==i&&(o.view={in_foreground:i}),{customerContext:r,rawRumEvent:o,startTime:t.startClocks.relative,domainContext:tL(t)?{event:t.event}:{}}}function tL(t){return t.type!==l.CUSTOM}var tI=n(84433),tA=n(21315),tD=n(59288),tN=n(1307);function tM(t){return t.startTime+t.duration}function tU(t){var e,n,r;return{resource:I({duration:(e=t.duration,n=t.startTime,r=t.responseEnd,0===e&&nC.s2&&(0,w.tV)("resource duration > 1 day",{debug:{type:t.initiatorType,name:t.name,startTime:Math.round(n),responseEnd:Math.round(r),duration:Math.round(e),relativeNow:Math.round((0,S._q)()),timeStampNow:(0,S.n$)()}}),(0,S.c0)(e))),size:function(t){if(t.startTime0)||e(Math.max.apply(Math,o))}return{setLoadEvent:function(t){n&&(n=!1,o.push(t),i())},setActivityLoadingTime:function(t){r&&(r=!1,void 0!==t&&o.push(t),i())}}}(o,function(t){l.loadingTime=t,A()})).setActivityLoadingTime,g=m.setLoadEvent,E=(s=(0,S.n$)(),{stop:tT(t,e,function(t){h(t.hadActivity?(0,S._J)(s,t.endTime):void 0)}).stop}).stop,$("layout-shift")?(l.cumulativeLayoutShift=0,f=(c=function(t){l.cumulativeLayoutShift=(0,C.NM)(l.cumulativeLayoutShift+t,4),A()},{stop:t.subscribe(p.PERFORMANCE_ENTRY_COLLECTED,function(t){"layout-shift"!==t.entryType||t.hadRecentInput||c(t.value)}).unsubscribe}).stop):f=C.ZT,{stop:function(){v(),E(),f()},setLoadEvent:g,viewMetrics:l}),M=N.setLoadEvent,U=N.stop,P=N.viewMetrics;function z(){R+=1;var e=void 0===y?(0,S.n$)():y.timeStamp;t.notify(p.VIEW_UPDATED,I(I({},P),{customTimings:_,documentVersion:R,id:T,name:u,loadingType:o,location:O,hasReplay:k,referrer:i,startClocks:a,timings:b,duration:(0,S._J)(a.timeStamp,e),isActive:void 0===y}))}return z(),{name:u,scheduleUpdate:A,end:function(e){void 0===e&&(e=(0,S.$I)()),y=e,U(),t.notify(p.VIEW_ENDED,{endClocks:y})},getLocation:function(){return O},triggerUpdate:function(){D(),z()},updateTimings:function(t){b=t,void 0!==t.loadEvent&&M(t.loadEvent)},addTiming:function(t,e){var n;_[(n=t.replace(/[^a-zA-Z0-9-_.@$]/g,"_"))!==t&&x.j.warn("Invalid timing name: "+t+", sanitized to: "+n),n]=(0,S._J)(a.timeStamp,e)},updateLocation:function(t){O=I({},t)},updateHasReplay:function(t){k=t},get url(){return O.href}}}function tB(t){return void 0!==t.getId()&&tW(t.getTrackingType())}function tW(t){return t===T.TRACKED_WITH_RESOURCES||t===T.TRACKED_WITHOUT_RESOURCES}(s=y||(y={}))[s.LITE=1]="LITE",s[s.REPLAY=2]="REPLAY",(c=T||(T={})).NOT_TRACKED="0",c.TRACKED_WITH_RESOURCES="1",c.TRACKED_WITHOUT_RESOURCES="2";var t$=n(2097),tF=function(t){var e=!1,n=(0,_.W)(),r={},o=function(){},i=function(){},a=new R.S,u=function(t,e){void 0===e&&(e=(0,S.n$)()),a.add(function(){return u(t,e)})},s=function(t,e){void 0===e&&(e=(0,S.$I)()),a.add(function(){return s(t,e)})},c=function(t,e){void 0===e&&(e=d()),a.add(function(){return c(t,e)})},f=function(t,e){void 0===e&&(e=d()),a.add(function(){return f(t,e)})};function d(){return(0,C.I8)({context:n.get(),user:r})}var p=(0,b.r5)({init:(0,w.zk)(function(d){if((0,b.G5)((0,O.HZ)(d))&&(0,b.VE)()&&(e?(d.silentMultipleInit||x.j.error("DD_RUM is already initialized."),!1):d&&(d.clientToken||d.publicApiKey)?d.applicationId?void 0===d.sampleRate||(0,C.zz)(d.sampleRate)?void 0===d.resourceSampleRate||(0,C.zz)(d.resourceSampleRate)?!Array.isArray(d.allowedTracingOrigins)||0===d.allowedTracingOrigins.length||void 0!==d.service||(x.j.error("Service need to be configured when tracing is enabled"),!1):(x.j.error("Resource Sample Rate should be a number between 0 and 100"),!1):(x.j.error("Sample Rate should be a number between 0 and 100"),!1):(x.j.error("Application ID is not configured, no RUM data will be collected."),!1):(x.j.error("Client Token is not configured, we will not send any data."),!1))){d.publicApiKey&&(d.clientToken=d.publicApiKey);var l=(0,b.mC)(d,L),p=l.configuration,v=l.internalMonitoring;if(p.trackViewsManually){var m=a;a=new R.S,s=function(t){h(t)},m.drain()}else h();i=function(){return(0,C.I8)(d)},e=!0}function h(e){var i;s=(i=t(d,p,v,function(){return{user:r,context:n.get()}},e)).startView,c=i.addAction,f=i.addError,u=i.addTiming,o=i.getInternalContext,a.drain()}}),addRumGlobalContext:(0,w.zk)(n.add),removeRumGlobalContext:(0,w.zk)(n.remove),getRumGlobalContext:(0,w.zk)(n.get),setRumGlobalContext:(0,w.zk)(n.set),getInternalContext:(0,w.zk)(function(t){return o(t)}),getInitConfiguration:(0,w.zk)(function(){return i()}),addAction:(0,w.zk)(function(t,e){c({name:t,context:(0,C.I8)(e),startClocks:(0,S.$I)(),type:l.CUSTOM})}),addUserAction:function(t,e){p.addAction(t,e)},addError:function(t,e,n){void 0===n&&(n=k.zH.CUSTOM);var r=(0,k.Xp)();(0,w.L6)(function(){var o;n===k.zH.CUSTOM||n===k.zH.NETWORK||n===k.zH.SOURCE?o=n:(x.j.error("DD_RUM.addError: Invalid source '"+n+"'"),o=k.zH.CUSTOM),f({error:t,handlingStack:r,context:(0,C.I8)(e),source:o,startClocks:(0,S.$I)()})})},addTiming:(0,w.zk)(function(t){u(t)}),setUser:(0,w.zk)(function(t){var e=function(t){if("object"==typeof t&&t){var e=(0,C.I8)(t);return"id"in e&&(e.id=String(e.id)),"name"in e&&(e.name=String(e.name)),"email"in e&&(e.email=String(e.email)),e}}(t);e?r=e:x.j.error("Unsupported user:",t)}),removeUser:(0,w.zk)(function(){r={}}),startView:(0,w.zk)(function(t){s(t)})});return p}(function(t,e,n,r,o){var i,a,u,s,c,m,h,g,E,b,_,R,O,L,U,z,j,Q,tv,tm,th,tE,tS,tO,tw,tL,tF=new A,tG=((tv=(0,ta.M_)(e.cookieOptions,"rum",function(t){var n;return{trackingType:n=t===T.NOT_TRACKED||t===T.TRACKED_WITH_RESOURCES||t===T.TRACKED_WITHOUT_RESOURCES?t:(0,C.y7)(e.sampleRate)?(0,C.y7)(e.resourceSampleRate)?T.TRACKED_WITH_RESOURCES:T.TRACKED_WITHOUT_RESOURCES:T.NOT_TRACKED,isTracked:tW(n)}})).renewObservable.subscribe(function(){tF.notify(p.SESSION_RENEWED)}),{getId:tv.getId,getPlan:function(){return tB(tv)?y.REPLAY:void 0},isTracked:function(){return tB(tv)},isTrackedWithResource:function(){return void 0!==tv.getId()&&tv.getTrackingType()===T.TRACKED_WITH_RESOURCES}}),tK=(tm=[],tE=(th=function(){var t,e=window;if(e.Zone){var n=e.Zone.__symbol__("MutationObserver");t=e[n]}return t||(t=e.MutationObserver),t}())?new th((0,w.zk)(function(){tm.forEach(function(t){return t()})})):void 0,{subscribe:function(t){return tm.length||!tE||tE.observe(document,{attributes:!0,characterData:!0,childList:!0,subtree:!0}),tm.push(t),{unsubscribe:function(){(tm=tm.filter(function(e){return t!==e})).length||!tE||tE.disconnect()}}}});n.setExternalContextProvider(function(){return(0,C.$e)({application_id:t.applicationId},tJ.findView(),r().context)});var tX=(i=t.applicationId,a=tF,u=e,s=tG,c=r,h=function(t,e){var n,r,o,i=[],a=[];t.subscribe(p.VIEW_CREATED,function(t){n=t,o=e.getId()}),t.subscribe(p.VIEW_UPDATED,function(t){n&&n.id===t.id&&(n=t)}),t.subscribe(p.VIEW_ENDED,function(t){var e=t.endClocks;n&&(i.unshift({endTime:e.relative,context:c(),startTime:n.startClocks.relative}),n=void 0)}),t.subscribe(p.AUTO_ACTION_CREATED,function(t){r=t}),t.subscribe(p.AUTO_ACTION_COMPLETED,function(t){r&&a.unshift({context:f(),endTime:r.startClocks.relative+t.duration,startTime:r.startClocks.relative}),r=void 0}),t.subscribe(p.AUTO_ACTION_DISCARDED,function(){r=void 0}),t.subscribe(p.SESSION_RENEWED,function(){i=[],a=[],n=void 0,r=void 0});var u=setInterval((0,w.zk)(function(){s(i,tu),s(a,ts)}),tc);function s(t,e){for(var n=(0,S._q)()-e;t.length>0&&t[t.length-1].startTime=n.startClocks.relative)return t();for(var o=0;oi.endTime)break;if(r>=i.startTime)return i.context}}return{findAction:function(t){return d(f,a,r,t)},findView:function(t){return d(c,i,n,t)},stop:function(){clearInterval(u)}}}(a,s),g=function(t){if(!t.isEnabled("track-foreground"))return{getInForeground:function(){},getInForegroundPeriods:function(){},stop:C.ZT};document.hasFocus()&&tn();var e=(0,C.Oo)(window,"focus",function(){return tn()}).stop,n=(0,C.Oo)(window,"blur",function(){return tr()}).stop;return{getInForeground:to,getInForegroundPeriods:ti,stop:function(){te=[],e(),n()}}}(u),E=(m=function(t,e){var n,r=i(t.rumEndpoint,function(){return e.notify(p.BEFORE_UNLOAD)}),o=t.replica;function i(e,n){return new t$.E(new t$.a(e,t.batchBytesLimit,!0),t.maxBatchSize,t.batchBytesLimit,t.maxMessageSize,t.flushTimeout,n)}function a(t){return(0,C.$e)(t,{application:{id:o.applicationId}})}void 0!==o&&(n=i(o.rumEndpoint));var u=!1;return{add:function(t){!u&&(r.add(t),n&&n.add(a(t)))},stop:function(){u=!0},upsert:function(t,e){!u&&(r.upsert(t,e),n&&n.upsert(a(t),e))}}}(u,a),a.subscribe(p.RUM_EVENT_COLLECTED,function(t){t.type===f.VIEW?m.upsert(t,t.view.id):m.add(t)}),{stop:function(){m.stop()}}),!function(t,e,n,r,o,i){var a=(0,X.S)(e,function(t){n.notify(p.RAW_ERROR_COLLECTED,{error:t})});n.subscribe(p.RAW_RUM_EVENT_COLLECTED,function(u){var s=u.startTime,c=u.rawRumEvent,d=u.domainContext,l=u.savedCommonContext,m=u.customerContext,h=o.findView(s),g=r.getPlan();if(g&&h&&h.session.id===r.getId()){var E=o.findAction(s),y=l||i(),T={_dd:{format_version:2,drift:(0,S.QA)(),session:{plan:g}},application:{id:t},date:(0,S.n$)(),service:e.service,session:{type:void 0===window._DATADOG_SYNTHETICS_BROWSER?v.USER:v.SYNTHETICS}},b=-1!==[f.ERROR,f.RESOURCE,f.LONG_TASK].indexOf(c.type)?(0,C.$e)(T,h,E,c):(0,C.$e)(T,h,c);b.context=(0,C.$e)(y.context,m),"has_replay"in b.session||(b.session.has_replay=y.hasReplay),(0,C.Qr)(y.user)||(b.usr=y.user),function(t,e,n,r){if(e){var o,i,a,u=(o=t.type===f.VIEW?Z:tt,a=e(i=(0,C.I8)(t),n),o.forEach(function(e){var n=J(t,e),r=J(i,e),o=(0,C.oL)(n),a=(0,C.oL)(r);a===o?Y(t,e,r):"object"===o&&("undefined"===a||"null"===a)&&Y(t,e,{})}),a);if(!1===u&&t.type!==f.VIEW)return!1;!1===u&&x.j.warn("Can't dismiss view events using beforeSend!")}return t.type!==f.ERROR||!r.isLimitReached()}(b,e.beforeSend,d,a)&&((0,C.Qr)(b.context)&&delete b.context,"number"!=typeof b.date&&(0,w.tV)("invalid date",{debug:{eventType:b.type,eventTimeStamp:b.date,eventRelativeTime:Math.round(s),timeStampNow:(0,S.n$)(),relativeNow:Math.round((0,S._q)()),drift:(0,S.QA)()}}),n.notify(p.RUM_EVENT_COLLECTED,b))}})}(i,u,a,s,h,c),{parentContexts:h,foregroundContexts:g,stop:function(){E.stop(),h.stop(),g.stop()}}),tJ=tX.parentContexts,tY=tX.foregroundContexts;!function(t){t.subscribe(p.PERFORMANCE_ENTRY_COLLECTED,function(e){if("longtask"===e.entryType){var n=(0,S.DY)(e.startTime),r={date:n.timeStamp,long_task:{id:(0,C.DO)(),duration:(0,S.c0)(e.duration)},type:f.LONG_TASK};t.notify(p.RAW_RUM_EVENT_COLLECTED,{rawRumEvent:r,startTime:n.relative,domainContext:{performanceEntry:e.toJSON()}})}})}(tF),tF.subscribe(p.REQUEST_COMPLETED,function(t){var e,n,r,o,i,a;tG.isTrackedWithResource()&&tF.notify(p.RAW_RUM_EVENT_COLLECTED,(e=t.type===C.xd.XHR?C._g.XHR:C._g.FETCH,r=(n=function(t){if(performance&&"getEntriesByName"in performance){var e=performance.getEntriesByName(t.url,"resource");if(e.length&&"toJSON"in e[0]){var n=e.map(function(t){return t.toJSON()}).filter(P).filter(function(e){var n,r;return n=t.startClocks.relative,r=tM({startTime:t.startClocks.relative,duration:t.duration}),e.startTime>=n-1&&tM(e)<=r+1});return 1===n.length?n[0]:2===n.length&&tM(n[0])<=n[1].startTime?n[1]:void 0}}}(t))?(0,S.DY)(n.startTime):t.startClocks,o=n?tU(n):void 0,i=function(t){if(t.traceId&&t.spanId)return{_dd:{span_id:t.spanId.toDecimalString(),trace_id:t.traceId.toDecimalString()}}}(t),a=(0,C.$e)({date:r.timeStamp,resource:{id:(0,C.DO)(),type:e,duration:(0,S.c0)(t.duration),method:t.method,status_code:t.status,url:t.url},type:f.RESOURCE},i,o),{startTime:r.relative,rawRumEvent:a,domainContext:{performanceEntry:n&&tP(n),xhr:t.xhr,response:t.response,requestInput:t.input,requestInit:t.init,error:t.error}}))}),tF.subscribe(p.PERFORMANCE_ENTRY_COLLECTED,function(t){if(tG.isTrackedWithResource()&&"resource"===t.entryType&&!("xmlhttprequest"===t.initiatorType||"fetch"===t.initiatorType)){var e,n,r,o,i;tF.notify(p.RAW_RUM_EVENT_COLLECTED,(e=function(t){var e=t.name;if(!(0,D.jv)(e))return(0,w.tV)('Failed to construct URL for "'+t.name+'"'),C._g.OTHER;for(var n=(0,D.ye)(e),r=0;rC.s2&&(0,w.tV)("FCP > 1 day",{debug:{fcp:Math.round(t.startTime),relativeNow:Math.round((0,S._q)()),timeStampNow:(0,S.n$)()}}),n({firstContentfulPaint:t.startTime}))}).unsubscribe}).stop,h=(o=window,i=function(t){n({largestContentfulPaint:t})},a=tz(),u=1/0,s=(0,C.yw)(o,["pointerdown","keydown"],function(t){u=t.timeStamp},{capture:!0,once:!0}).stop,c=t.subscribe(p.PERFORMANCE_ENTRY_COLLECTED,function(t){"largest-contentful-paint"===t.entryType&&t.startTimeC.s2&&(0,w.tV)("LCP > 1 day",{debug:{lcp:Math.round(t.startTime),relativeNow:Math.round((0,S._q)()),timeStampNow:(0,S.n$)()}}),i(t.startTime))}).unsubscribe,{stop:function(){s(),c()}}).stop,g=(f=function(t){n({firstInputDelay:t.firstInputDelay,firstInputTime:t.firstInputTime})},d=tz(),{stop:t.subscribe(p.PERFORMANCE_ENTRY_COLLECTED,function(t){if("first-input"===t.entryType&&t.startTime=0?e:0,firstInputTime:t.startTime})}}).unsubscribe}).stop;return{stop:function(){v(),m(),h(),g()}}}(e,function(t){i.updateTimings(t),i.scheduleUpdate()}).stop,{initialView:i,stop:a}),f=c.stop,l=c.initialView,v=(e.subscribe(p.SESSION_RENEWED,function(){l.end(),l=h(void 0,l.name)}),e.subscribe(p.BEFORE_UNLOAD,function(){l.end(),l.triggerUpdate()}),e.subscribe(p.RECORD_STARTED,function(){s=!0,l.updateHasReplay(!0)}),e.subscribe(p.RECORD_STOPPED,function(){s=!1}),u=window.setInterval((0,w.zk)(function(){l.triggerUpdate()}),tV),{stop:function(){clearInterval(u)}}).stop,m=(r?tj(function(){var e,n;if((e=l.getLocation()).pathname!==t.pathname||(n=t.hash.substr(1),!document.getElementById(n)&&tH(t.hash)!==tH(e.hash))){l.end(),l.triggerUpdate(),l=h();return}l.updateLocation(t),l.triggerUpdate()}):tj(function(){l.updateLocation(t),l.triggerUpdate()})).stop;function h(r,o){return tq(e,n,t,s,d.ROUTE_CHANGE,l.url,r,o)}return{addTiming:function(t,e){void 0===e&&(e=(0,S.n$)()),l.addTiming(t,e),l.triggerUpdate()},startView:function(t,e){l.end(e),l.triggerUpdate(),l=h(e,t)},stop:function(){m(),f(),v(),l.end()}}}(tS,tF,tK,!e.trackViewsManually,o)),tZ=tQ.addTiming,t0=tQ.startView,t1=(tO=new ty.y,(0,tI.U)(tO),(0,tA.L)(tO),e.isEnabled("remove-network-errors")||(0,tD.D)(e,tO),tO.subscribe(function(t){return tF.notify(p.RAW_ERROR_COLLECTED,{error:t})}),tF.subscribe(p.RAW_ERROR_COLLECTED,function(t){var e,n,r=t.error,o=t.customerContext,i=t.savedCommonContext;tF.notify(p.RAW_RUM_EVENT_COLLECTED,I({customerContext:o,savedCommonContext:i},(e={date:r.startClocks.timeStamp,error:{id:(0,C.DO)(),message:r.message,resource:r.resource?{method:r.resource.method,status_code:r.resource.statusCode,url:r.resource.url}:void 0,source:r.source,stack:r.stack,handling_stack:r.handlingStack,type:r.type,handling:r.handling},type:f.ERROR},void 0!==(n=tY.getInForeground(r.startClocks.relative))&&(e.view={in_foreground:n}),{rawRumEvent:e,startTime:r.startClocks.relative,domainContext:{error:r.originalError}})))}),{addError:function(t,e){var n,r,o=t.error,i=t.handlingStack,a=t.startClocks,u=t.context,s=(n=t.source,r=o instanceof Error?(0,tN._t)(o):void 0,I(I({startClocks:a,source:n,originalError:o},(0,k.wl)(r,o,"Provided",i)),{handling:k.Xw.HANDLED}));tF.notify(p.RAW_ERROR_COLLECTED,{customerContext:u,savedCommonContext:e,error:s})}}).addError,t2=(tF.subscribe(p.AUTO_ACTION_COMPLETED,function(t){return tF.notify(p.RAW_RUM_EVENT_COLLECTED,tx(t,tY))}),e.trackInteractions&&(U=e.actionNameAttribute,z={create:function(t,e,n){if(!O){var r=new tk(tF,t,e,n);O=r,L=tT(tF,tK,function(t){t.hadActivity?r.complete(t.endTime):r.discard(),O=void 0})}},discardCurrent:function(){O&&(L.stop(),O.discard(),O=void 0)}},tF.subscribe(p.VIEW_CREATED,function(){z.discardCurrent()}),(0,C.Oo)(window,"click",function(t){if(t.target instanceof Element){var e,n=tb(e=t.target,"data-dd-action-name")||U&&tb(e,U)||tR(e,tC)||tR(e,t_)||"";n&&z.create(l.CLICK,n,t)}},{capture:!0}).stop),{addAction:function(t,e){tF.notify(p.RAW_RUM_EVENT_COLLECTED,I({savedCommonContext:e},tx(t,tY)))}}).addAction;tw={clearTracingIfNeeded:tl,traceFetch:function(t){return tp(e,t,function(e){var n;if(t.input instanceof Request&&!(null===(n=t.init)||void 0===n?void 0:n.headers))t.input=new Request(t.input),Object.keys(e).forEach(function(n){t.input.headers.append(n,e[n])});else{t.init=I({},t.init);var r=[];t.init.headers instanceof Headers?t.init.headers.forEach(function(t,e){r.push([e,t])}):Array.isArray(t.init.headers)?t.init.headers.forEach(function(t){r.push(t)}):t.init.headers&&Object.keys(t.init.headers).forEach(function(e){r.push([e,t.init.headers[e]])}),t.init.headers=r.concat((0,C.qP)(e))}})},traceXhr:function(t,n){return tp(e,t,function(t){Object.keys(t).forEach(function(e){n.setRequestHeader(e,t[e])})})}},(j=(0,tf.h)()).beforeSend(function(t,n){H(e,t.url)&&(tw.traceXhr(t,n),t.requestIndex=tg(),tF.notify(p.REQUEST_STARTED,{requestIndex:t.requestIndex}))}),j.onRequestComplete(function(t){H(e,t.url)&&(tw.clearTracingIfNeeded(t),tF.notify(p.REQUEST_COMPLETED,{duration:t.duration,method:t.method,requestIndex:t.requestIndex,responseText:t.responseText,spanId:t.spanId,startClocks:t.startClocks,status:t.status,traceId:t.traceId,type:C.xd.XHR,url:t.url,xhr:t.xhr}))}),(Q=(0,td.z)()).beforeSend(function(t){H(e,t.url)&&(tw.traceFetch(t),t.requestIndex=tg(),tF.notify(p.REQUEST_STARTED,{requestIndex:t.requestIndex}))}),Q.onRequestComplete(function(t){H(e,t.url)&&(tw.clearTracingIfNeeded(t),tF.notify(p.REQUEST_COMPLETED,{duration:t.duration,method:t.method,requestIndex:t.requestIndex,responseText:t.responseText,responseType:t.responseType,spanId:t.spanId,startClocks:t.startClocks,status:t.status,traceId:t.traceId,type:C.xd.FETCH,url:t.url,response:t.response,init:t.init,input:t.input}))}),b=tF,_=e,R=function(t){K(b,_,t)},(0,C.Tm)("interactive",function(){var t,e={entryType:"resource",initiatorType:N,traceId:function(t){var e,n,r=(e=t.querySelector("meta[name=dd-trace-id]"),n=t.querySelector("meta[name=dd-trace-time]"),q(e&&e.content,n&&n.content)||function(t){var e=function(t){for(var e=0;e=0;e-=1){var r=t.body.childNodes[e],n=B(r);if(n)return n;if("#text"!==r.nodeName)break}}(t);if(e)return q((0,C.MY)(e,"trace-id"),(0,C.MY)(e,"trace-time"))}(t));if(!(!r||r.traceTime<=Date.now()-V))return r.traceId}(document)};if($("navigation")&&performance.getEntriesByType("navigation").length>0){var n=performance.getEntriesByType("navigation")[0];t=I(I({},n.toJSON()),e)}else{var r=F();t=I(I(I({},r),{decodedBodySize:0,duration:r.responseEnd,name:window.location.href,startTime:0}),e)}R(t)}),W()&&G(b,_,performance.getEntries()),window.PerformanceObserver&&(new PerformanceObserver((0,w.zk)(function(t){return G(b,_,t.getEntries())})).observe({entryTypes:["resource","navigation","longtask","paint","largest-contentful-paint","first-input","layout-shift"]}),W()&&"addEventListener"in performance&&performance.addEventListener("resourcetimingbufferfull",function(){performance.clearResourceTimings()})),$("navigation")||function(t){function e(){t(I(I({},F()),{entryType:"navigation"}))}(0,C.Tm)("complete",function(){setTimeout((0,w.zk)(e))})}(function(t){K(b,_,t)}),$("first-input")||function(t){var e=Date.now(),n=!1,r=(0,C.yw)(window,["click","mousedown","keydown","touchstart","pointerdown"],function(t){if(t.cancelable){var e={entryType:"first-input",processingStart:(0,S._q)(),startTime:t.timeStamp};"pointerdown"===t.type?(0,C.yw)(window,["pointerup","pointercancel"],function(t){"pointerup"===t.type&&o(e)},{once:!0}):o(e)}},{passive:!0,capture:!0}).stop;function o(o){if(!n){n=!0,r();var i=o.processingStart-o.startTime;i>=0&&i