js-agent.newrelic.com
Open in
urlscan Pro
2602:816:5001::39
Public Scan
Submitted URL: http://js-agent.newrelic.com/nr-spa-1.260.1.min.js
Effective URL: https://js-agent.newrelic.com/nr-spa-1.260.1.min.js
Submission: On November 12 via manual from US — Scanned from US
Effective URL: https://js-agent.newrelic.com/nr-spa-1.260.1.min.js
Submission: On November 12 via manual from US — Scanned from US
Form analysis
0 forms found in the DOMText Content
/*! For license information please see nr-spa-1.260.1.min.js.LICENSE.txt */ "use strict";(self["webpackChunk:NRBA-1.260.1.PROD"]=self["webpackChunk:NRBA-1.260.1.PROD"]||[]).push([[111],{2573:(t,e,i)=>{i.d(e,{o:()=>c});var s=i(4247),r=i(1117),n=i(6291),a=i(8310),o=i(7056);class c extends r.w{constructor(t,e,i){super(i),this.endpoint=t,this.opts=e||{},this.started=!1,this.timeoutHandle=null,this.aborted=!1,this.harvesting=!1,this.harvest=new n.M(this.sharedContext),(0,a.L)(this.unload.bind(this)),this.sharedContext?.ee.on(o.wO.RESET,(()=>this.runHarvest({forceNoRetry:!0})))}unload(){this.aborted||(this.opts.onUnload&&this.opts.onUnload(),this.runHarvest({unload:!0}))}startTimer(t,e){this.interval=t,this.started=!0,this.scheduleHarvest(null!=e?e:this.interval)}stopTimer(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.aborted=t,this.started=!1,this.timeoutHandle&&clearTimeout(this.timeoutHandle)}scheduleHarvest(t,e){this.timeoutHandle||(null==t&&(t=this.interval),this.timeoutHandle=setTimeout((()=>{this.timeoutHandle=null,this.runHarvest(e)}),1e3*t))}runHarvest(t){if(this.aborted)return;this.harvesting=!0;const e=e=>{this.harvesting=!1,t?.forceNoRetry&&(e.retry=!1),this.onHarvestFinished(t,e)};let i,r,n=[];if(this.opts.getPayload){if(i=s.qD({isFinalHarvest:t?.unload}),!i)return!1;const e=!t?.unload&&i===s.Be;if(r=this.opts.getPayload({retry:e,...t}),!r)return void(this.started&&this.scheduleHarvest());r="[object Array]"===Object.prototype.toString.call(r)?r:[r],n.push(...r)}let a=t=>this.harvest.sendX(t);n.length?a=this.opts.raw?t=>this.harvest._send(t):t=>this.harvest.send(t):n.push(void 0),n.forEach((s=>{a({endpoint:this.endpoint,payload:s,opts:t,submitMethod:i,cbFinished:e,customUrl:this.opts.customUrl,raw:this.opts.raw})})),this.started&&this.scheduleHarvest()}onHarvestFinished(t,e){if(this.opts.onFinished&&this.opts.onFinished(e),e.sent&&e.retry){const i=e.delay||this.opts.retryDelay;this.started&&i?(clearTimeout(this.timeoutHandle),this.timeoutHandle=null,this.scheduleHarvest(i,t)):!this.started&&i&&this.scheduleHarvest(i,t)}}}},6291:(t,e,i)=>{i.d(e,{M:()=>y});var s=i(4420),r=i(4351),n=i(4247);function a(){return""+location}var o=i(234),c=i(4222),h=i(3239),u=i(6141);function d(t,e){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"string",s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];return t&&"object"==typeof t?(Object.keys(t).forEach((r=>{"object"==typeof t[r]?d(t[r],e,i,s):typeof t[r]!==i||s.includes(r)||(t[r]=e(t[r]))})),t):t}var l=i(1117),f=i(6818),p=i(385),m=i(50),g=i(7894);const v={};class y extends l.w{constructor(t){super(t),this.tooManyRequestsDelay=(0,o.Mt)(this.sharedContext.agentIdentifier,"harvest.tooManyRequestsDelay")||60,this.obfuscator=new u.RR(this.sharedContext),this._events={}}sendX(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const e=n.qD({isFinalHarvest:t.opts?.unload}),i={retry:!t.opts?.unload&&e===n.Be,isFinalHarvest:!0===t.opts?.unload},s=this.createPayload(t.endpoint,i);return(this.obfuscator.shouldObfuscate()?this.obfuscateAndSend.bind(this):this._send.bind(this))({...t,payload:s,submitMethod:e})}send(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(this.obfuscator.shouldObfuscate()?this.obfuscateAndSend.bind(this):this._send.bind(this))(t)}obfuscateAndSend(){var t=this;let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{payload:i={}}=e;return d(i,(function(){return t.obfuscator.obfuscateString(...arguments)}),"string",["e"]),this._send({...e,payload:i})}_send(t){let{endpoint:e,payload:i={},opts:a={},submitMethod:c,cbFinished:u,customUrl:d,raw:l,includeBaseParams:f=!0}=t;const g=(0,o.C5)(this.sharedContext.agentIdentifier);if(!g.errorBeacon)return!1;const y=(0,o.OP)(this.sharedContext.agentIdentifier);let{body:T,qs:b}=this.cleanPayload(i);if(0===Object.keys(T).length&&!a?.sendEmptyBody)return u&&u({sent:!1}),!1;const S=(0,o.P_)(this.sharedContext.agentIdentifier),w=!1===S.ssl?"http":"https",I=S.proxy.beacon||g.errorBeacon,N="rum"!==e?"/".concat(e):"";let R="".concat(w,"://").concat(I).concat(N,"/1/").concat(g.licenseKey);d&&(R=d),l&&(R="".concat(w,"://").concat(I,"/").concat(e));const E=!l&&f?this.baseQueryString(b,e):"";let A=(0,s.j6)(b,y.maxBytes);c||(c=n.qD({isFinalHarvest:a.unload})),""===E&&A.startsWith("&")&&(A=A.substring(1));const x="".concat(R,"?").concat(E).concat(A);!!b?.attributes?.includes("gzip")||(T="events"===e?T.e:(0,r.P)(T),T.length>75e4&&1===(v[e]=(v?.[e]||0)+1)&&(0,m.Z)("The Browser Agent is attempting to send a very large payload to /".concat(e,". This is usually tied to large amounts of custom attributes. Please check your configurations."))),T&&0!==T.length&&"{}"!==T&&"[]"!==T||(T="");const P=[];P.push({key:"content-type",value:"text/plain"});let F=c({url:x,body:T,sync:a.unload&&(p.v6||p.w1),headers:P});if(!a.unload&&u&&c===n.Be){const t=this;F.addEventListener("loadend",(function(){const e={sent:0!==this.status,status:this.status,xhr:this,fullUrl:x};429===this.status?(e.retry=!0,e.delay=t.tooManyRequestsDelay):408!==this.status&&500!==this.status&&503!==this.status||(e.retry=!0),a.needResponse&&(e.responseText=this.responseText),u(e)}),(0,h.m$)(!1))}return(0,o.OP)(this.sharedContext.agentIdentifier).harvestCount++,F}baseQueryString(t,e){const i=(0,o.OP)(this.sharedContext.agentIdentifier),r=(0,o.C5)(this.sharedContext.agentIdentifier),n=(0,c.f)(a()),h=this.obfuscator.shouldObfuscate()?this.obfuscator.obfuscateString(n):n,u=1===i?.session?.state.sessionReplayMode&&"jserrors"!==e,d=["a="+r.applicationID,(0,s.wu)("sa",r.sa?""+r.sa:""),(0,s.wu)("v",f.q4),T(r),(0,s.wu)("ct",i.customTransaction),"&rst="+(0,g.z)(),"&ck=0","&s="+(i.session?.state.value||"0"),(0,s.wu)("ref",h),(0,s.wu)("ptid",i.ptid?""+i.ptid:"")];return u&&d.push((0,s.wu)("hr","1",t)),d.join("")}createPayload(t,e){const i=this._events[t],s={body:{},qs:{}};if(Array.isArray(i)&&i.length>0)for(let t=0;t<i.length;t++){const r=i[t](e);r&&(s.body={...s.body,...r.body||{}},s.qs={...s.qs,...r.qs||{}})}return s}cleanPayload(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const e=t=>"undefined"!=typeof Uint8Array&&t instanceof Uint8Array||Array.isArray(t)?t:"string"==typeof t?t.length>0?t:null:Object.entries(t||{}).reduce(((t,e)=>{let[i,s]=e;return("number"==typeof s||"string"==typeof s&&s.length>0||"object"==typeof s&&Object.keys(s||{}).length>0)&&(t[i]=s),t}),{});return{body:e(t.body),qs:e(t.qs)}}on(t,e){Array.isArray(this._events[t])||(this._events[t]=[]),this._events[t].push(e)}}function T(t){return t.transactionName?(0,s.wu)("to",t.transactionName):(0,s.wu)("t",t.tNamePlain||"Unnamed Transaction")}},214:(t,e,i)=>{i.d(e,{AG:()=>c,FX:()=>u,n1:()=>d,uR:()=>h});var s=i(1284),r=i(4351),n=i(6141),a=Object.prototype.hasOwnProperty,o=64;function c(t,e,i){return t||0===t||""===t?e(t)+(i?",":""):"!"}function h(t,e){return e?Math.floor(t).toString(36):void 0===t||0===t?"":Math.floor(t).toString(36)}function u(t){var e=Object.hasOwnProperty("create")?Object.create(null):{},i=0;return function(s){if(void 0===s||""===s)return"";var r=new n.RR({agentIdentifier:t});s=String(s),r.shouldObfuscate()&&(s=r.obfuscateString(s));return a.call(e,s)?h(e[s],!0):(e[s]=i++,function(t){return"'"+t.replace(l,"\\$1")}(s))}}function d(t,e){var i=[];return(0,s.D)(t,(function(t,s){if(!(i.length>=o)){var n,a=5;switch(t=e(t),typeof s){case"object":s?n=e((0,r.P)(s)):a=9;break;case"number":a=6,n=s%1?s:s+".";break;case"boolean":a=s?7:8;break;case"undefined":a=9;break;default:n=e(s)}i.push([a,t+(n?","+n:"")])}})),i}var l=/([,\\;])/g},5998:(t,e,i)=>{i.d(e,{uB:()=>m,wu:()=>p,zJ:()=>f});var s="Start",r="End",n="unloadEvent",a="redirect",o="domainLookup",c="onnect",h="request",u="response",d="loadEvent",l="domContentLoadedEvent";const f=[];function p(t,e){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},f=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(e)return i.of=t,g(i.of,i,"n",!0),g(e[n+s],i,"u",f),g(e[a+s],i,"r",f),g(e[n+r],i,"ue",f),g(e[a+r],i,"re",f),g(e["fetch"+s],i,"f",f),g(e[o+s],i,"dn",f),g(e[o+r],i,"dne",f),g(e["c"+c+s],i,"c",f),g(e["secureC"+c+"ion"+s],i,"s",f),g(e["c"+c+r],i,"ce",f),g(e[h+s],i,"rq",f),g(e[u+s],i,"rp",f),g(e[u+r],i,"rpe",f),g(e.domLoading,i,"dl",f),g(e.domInteractive,i,"di",f),g(e[l+s],i,"ds",f),g(e[l+r],i,"de",f),g(e.domComplete,i,"dc",f),g(e[d+s],i,"l",f),g(e[d+r],i,"le",f),i}function m(t,e){var i;return g("number"==typeof(i=t.type)?i:{navigate:void 0,reload:1,back_forward:2,prerender:3}[i],e,"ty"),g(t.redirectCount,e,"rc"),e}function g(t,e,i,s){if("number"==typeof t&&t>0){if(s){const i=e?.of>0?e.of:0;t=Math.max(t-i,0)}t=Math.round(t),e[i]=t,f.push(t)}else f.push(void 0)}},8310:(t,e,i)=>{i.d(e,{L:()=>a});var s=i(3239),r=i(385),n=i(7956);if(r.v6){r._A.cleanupTasks=[];const t=r._A.close;r._A.close=()=>{for(let t of r._A.cleanupTasks)t();t()}}function a(t){r.il?((0,n.N)(t,!0),(0,s.bP)("pagehide",t)):r.v6&&r._A.cleanupTasks.push(t)}},4222:(t,e,i)=>{i.d(e,{f:()=>n});var s=/([^?#]*)[^#]*(#[^?]*|$).*/,r=/([^?#]*)().*/;function n(t,e){return t.replace(e?s:r,"$1$2")}},4420:(t,e,i)=>{i.d(e,{j6:()=>u,wu:()=>d});var s=i(1284),r=i(4351),n={"%2C":",","%3A":":","%2F":"/","%40":"@","%24":"$","%3B":";"},a=(0,s.D)(n,(function(t){return t})),o=new RegExp(a.join("|"),"g");function c(t){return n[t]}function h(t){return null==t?"null":encodeURIComponent(t).replace(o,c)}function u(t,e){var i=0,n="";return(0,s.D)(t,(function(t,s){var a,o,c=[];if("string"==typeof s||!Array.isArray(s)&&null!=s&&s.toString().length)a="&"+t+"="+h(s),i+=a.length,n+=a;else if(Array.isArray(s)&&s.length){for(i+=9,o=0;o<s.length&&(a=h((0,r.P)(s[o])),i+=a.length,!(void 0!==e&&i>=e));o++)c.push(a);n+="&"+t+"=%5B"+c.join(",")+"%5D"}})),n}function d(t,e){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Object.keys(i).includes(t)?"":e&&"string"==typeof e?"&"+t+"="+h(e):""}},2271:(t,e,i)=>{i.d(e,{V:()=>r});var s=i(385);function r(){return Boolean("file:"===s._A?.location?.protocol)}},6141:(t,e,i)=>{i.d(e,{$c:()=>h,Ng:()=>u,RR:()=>c});var s=i(234),r=i(1117),n=i(2271),a=i(50),o={regex:/^file:\/\/(.*)/,replacement:atob("ZmlsZTovL09CRlVTQ0FURUQ=")};class c extends r.w{shouldObfuscate(){return h(this.sharedContext.agentIdentifier).length>0}obfuscateString(t){if(!t||"string"!=typeof t)return t;for(var e=h(this.sharedContext.agentIdentifier),i=t,s=0;s<e.length;s++){var r=e[s].regex,n=e[s].replacement||"*";i=i.replace(r,n)}return i}}function h(t){var e=[],i=(0,s.Mt)(t,"obfuscate")||[];return e=e.concat(i),(0,n.V)()&&e.push(o),e}function u(t){for(var e=!1,i=!1,s=0;s<t.length;s++){"regex"in t[s]?"string"==typeof t[s].regex||t[s].regex instanceof RegExp||((0,a.Z)('An obfuscation replacement rule contains a "regex" value with an invalid type (must be a string or RegExp)'),i=!0):((0,a.Z)('An obfuscation replacement rule was detected missing a "regex" value.'),i=!0);var r=t[s].replacement;r&&"string"!=typeof r&&((0,a.Z)('An obfuscation replacement rule contains a "replacement" value with an invalid type (must be a string)'),e=!0)}return!e&&!i}},4247:(t,e,i)=>{i.d(e,{Be:()=>n,qD:()=>r});var s=i(385);function r(){let{isFinalHarvest:t=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t&&s.il&&s.Nk?a:n}function n(t){let{url:e,body:i=null,sync:s,method:r="POST",headers:n=[{key:"content-type",value:"text/plain"}]}=t;const a=new XMLHttpRequest;a.open(r,e,!s);try{"withCredentials"in a&&(a.withCredentials=!0)}catch(t){}return n.forEach((t=>{a.setRequestHeader(t.key,t.value)})),a.send(i),a}function a(t){let{url:e,body:i}=t;try{return window.navigator.sendBeacon.bind(window.navigator)(e,i)}catch(t){return!1}}},8158:(t,e,i)=>{i.d(e,{S:()=>s});const s={FIRST_PAINT:"fp",FIRST_CONTENTFUL_PAINT:"fcp",FIRST_INPUT_DELAY:"fi",LARGEST_CONTENTFUL_PAINT:"lcp",CUMULATIVE_LAYOUT_SHIFT:"cls",INTERACTION_TO_NEXT_PAINT:"inp",LONG_TASK:"lt",TIME_TO_FIRST_BYTE:"ttfb"}},6069:(t,e,i)=>{i.d(e,{y:()=>a});var s=i(5528),r=i(385),n=i(8158);const a=new(i(2094).U)(n.S.FIRST_CONTENTFUL_PAINT);if(r.il)if(r.ux)try{if(!r.iS){performance.getEntriesByType("paint").forEach((t=>{"first-contentful-paint"===t.name&&a.update({value:Math.floor(t.startTime)})}))}}catch(t){}else(0,s.a4)((t=>{let{value:e,attribution:i}=t;if(r.iS||a.isValid)return;const s={timeToFirstByte:i.timeToFirstByte,firstByteToFCP:i.firstByteToFCP,loadState:i.loadState};a.update({value:e,attrs:s})}))},8373:(t,e,i)=>{i.d(e,{U:()=>n});var s=i(385),r=i(8158);const n=new(i(2094).U)(r.S.FIRST_PAINT);if(s.il){const t=t=>{t.forEach((t=>{"first-paint"!==t.name||n.isValid||(e.disconnect(),n.update({value:t.startTime}))}))};let e;try{PerformanceObserver.supportedEntryTypes.includes("paint")&&!s.iS&&(e=new PerformanceObserver((e=>{Promise.resolve().then((()=>{t(e.getEntries())}))})),e.observe({type:"paint",buffered:!0}))}catch(t){}}},4806:(t,e,i)=>{i.d(e,{P:()=>o});var s=i(385),r=i(8158),n=i(2094),a=i(5528);const o=new n.U(r.S.TIME_TO_FIRST_BYTE);if(s.il&&"undefined"!=typeof PerformanceNavigationTiming&&!s.Tt&&window===window.parent)(0,a.mr)((t=>{let{value:e,attribution:i}=t;o.isValid||o.update({value:e,attrs:{navigationEntry:i.navigationEntry}})}));else if(!o.isValid){const t={};for(let e in s._A?.performance?.timing||{})t[e]=Math.max(s._A?.performance?.timing[e]-s.sK,0);o.update({value:t.responseStart,attrs:{navigationEntry:t}})}},2094:(t,e,i)=>{i.d(e,{U:()=>s});class s{#t=new Set;history=[];constructor(t,e){this.name=t,this.attrs={},this.roundingMethod="function"==typeof e?e:Math.floor}update(t){let{value:e,attrs:i={}}=t;if(null==e||e<0)return;const s={value:this.roundingMethod(e),name:this.name,attrs:i};this.history.push(s),this.#t.forEach((t=>{try{t(s)}catch(t){}}))}get current(){return this.history[this.history.length-1]||{value:void 0,name:this.name,attrs:{}}}get isValid(){return this.current.value>=0}subscribe(t){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if("function"==typeof t)return this.#t.add(t),this.isValid&&e&&this.history.forEach((e=>{t(e)})),()=>{this.#t.delete(t)}}}},5185:(t,e,i)=>{i.r(e),i.d(e,{Aggregate:()=>b});var s=i(4322),r=i(4351),n=i(5546),a=i(234),o=i(2573),c=i(1199),h=i(7825),u=i(3325),d=i(3081),l=i(2222);function f(){let{body:t,query:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(t||e)try{const i=function(t){if(!t)return;Array.isArray(t)||(t=[t]);const e=[],i=[];for(let s of t){const t=p(s);t&&(e.push(t.operationName),i.push(t.operationType))}if(!i.length)return;return{operationName:e.join(","),operationType:i.join(","),operationFramework:"GraphQL"}}(m(t));if(i)return i;const s=p(function(t){if(!t||"string"!=typeof t)return;const e=new URLSearchParams(t);return m(Object.fromEntries(e))}(e));if(s)return s}catch(t){}}function p(t){if("object"!=typeof t||!t.query||"string"!=typeof t.query)return;const e=t.query.trim().match(/^(query|mutation|subscription)\s?(\w*)/),i=e?.[1];if(!i)return;return{operationName:t.operationName||e?.[2]||"Anonymous",operationType:i,operationFramework:"GraphQL"}}function m(t){let e;if(!t||"string"!=typeof t&&"object"!=typeof t)return;if(e="string"==typeof t?JSON.parse(t):t,i=e,i?.constructor!=={}.constructor&&!Array.isArray(e))return;var i;let s=!1;return s=Array.isArray(e)?e.some((t=>g(t))):g(e),s?e:void 0}function g(t){return!("object"!=typeof t||!t.query||"string"!=typeof t.query)}var v=i(8632),y=i(214);class T{constructor(t,e){this.addString=(0,y.FX)(e.agentIdentifier),this.events=t,this.payload="bel.7;";for(let i=0;i<t.length;i++){const s=t[i],r=[(0,y.uR)(s.startTime),(0,y.uR)(s.endTime-s.startTime),(0,y.uR)(0),(0,y.uR)(0),this.addString(s.method),(0,y.uR)(s.status),this.addString(s.domain),this.addString(s.path),(0,y.uR)(s.requestSize),(0,y.uR)(s.responseSize),"fetch"===s.type?1:"",this.addString(0),(0,y.AG)(s.spanId,this.addString,!0)+(0,y.AG)(s.traceId,this.addString,!0)+(0,y.AG)(s.spanTimestamp,y.uR,!1)];let n="2,";const o=(0,a.C5)(e.agentIdentifier).jsAttributes,c=(0,y.n1)({...o||{},...s.gql||{}},this.addString);r.unshift((0,y.uR)(c.length)),n+=r.join(","),c&&c.length>0&&(n+=";"+c.join(";")),i+1<t.length&&(n+=";"),this.payload+=n}this.tooBig=2*this.payload.length>e.MAX_PAYLOAD_SIZE}}class b extends l.m{static featureName=h.t;#e;#i;#s;constructor(t,e){super(t,e,h.t),this.#e=(0,a.C5)(t),this.#i=(0,a.OP)(t),this.#s=(0,a.P_)(t);const i=this.#s.ajax.harvestTimeSeconds||10;this.MAX_PAYLOAD_SIZE=this.#s.ajax.maxPayloadSize||1e6,(0,c.R2)(this.#i.denyList),this.ajaxEvents=[],this.spaAjaxEvents={},this.sentAjaxEvents=[];const r=this;this.ee.on("interactionDone",((t,e)=>{this.spaAjaxEvents[t.id]&&(e||this.spaAjaxEvents[t.id].forEach((t=>this.ajaxEvents.push(t))),delete this.spaAjaxEvents[t.id])})),(0,s.X)("returnAjax",(t=>this.ajaxEvents.push(t)),this.featureName,this.ee),(0,s.X)("xhr",(function(){r.storeXhr(...arguments,this)}),this.featureName,this.ee),this.waitForFlags([]).then((()=>{new o.o("events",{onFinished:this.onEventsHarvestFinished.bind(this),getPayload:this.prepareHarvest.bind(this)},this).startTimer(i),this.drain()}))}storeXhr(t,e,i,s,a,o){let h;e.time=i,h=t.cat?(0,r.P)([t.status,t.cat]):(0,r.P)([t.status,t.host,t.pathname]);const l=(0,c.zR)(t),p=this.#s.feature_flags?.includes("ajax_metrics_deny_list");if(!l&&p||this.aggregator.store("xhr",h,t,e),!l)return void(t.hostname===this.#e.errorBeacon||this.#s.proxy?.beacon&&t.hostname===this.#s.proxy.beacon?((0,n.p)(d.xS,["Ajax/Events/Excluded/Agent"],void 0,u.D.metrics,this.ee),p&&(0,n.p)(d.xS,["Ajax/Metrics/Excluded/Agent"],void 0,u.D.metrics,this.ee)):((0,n.p)(d.xS,["Ajax/Events/Excluded/App"],void 0,u.D.metrics,this.ee),p&&(0,n.p)(d.xS,["Ajax/Metrics/Excluded/App"],void 0,u.D.metrics,this.ee)));(0,n.p)("bstXhrAgg",["xhr",h,t,e],void 0,u.D.sessionTrace,this.ee);const m={method:t.method,status:t.status,domain:t.host,path:t.pathname,requestSize:e.txSize,responseSize:e.rxSize,type:a,startTime:i,endTime:s,callbackDuration:e.cbTime};o.dt&&(m.spanId=o.dt.spanId,m.traceId=o.dt.traceId,m.spanTimestamp=this.#i.timeKeeper.correctAbsoluteTimestamp(o.dt.timestamp)),m.gql=t.gql=f({body:o.body,query:o.parsedOrigin?.search}),m.gql&&(0,n.p)(d.xS,["Ajax/Events/GraphQL/Bytes-Added",(0,r.P)(m.gql).length],void 0,u.D.metrics,this.ee);if(Boolean((0,v.ek)(this.agentIdentifier)?.features?.[u.D.softNav]))(0,n.p)("ajax",[m],void 0,u.D.softNav,this.ee);else if(o.spaNode){const t=o.spaNode.interaction.id;this.spaAjaxEvents[t]=this.spaAjaxEvents[t]||[],this.spaAjaxEvents[t].push(m)}else this.ajaxEvents.push(m)}prepareHarvest(t){if(t=t||{},0===this.ajaxEvents.length)return null;const e=this.#r(this.ajaxEvents),i=[];for(let t=0;t<e.length;t++)i.push({body:{e:e[t]}});return t.retry&&(this.sentAjaxEvents=this.ajaxEvents),this.ajaxEvents=[],i}onEventsHarvestFinished(t){t.retry&&this.sentAjaxEvents.length>0&&(this.ajaxEvents.unshift(...this.sentAjaxEvents),this.sentAjaxEvents=[])}#r(t,e){e=e||1;const i=[],s=t.length/e,r=function(t,e){e=e||t.length;const i=[];for(let s=0,r=t.length;s<r;s+=e)i.push(new T(t.slice(s,s+e),this));return i}.call(this,t,s);let n=!1;for(let t=0;t<r.length;t++){const e=r[t];if(e.tooBig){if(e.events.length>1){n=!0;break}}else i.push(e.payload)}return n?this.#r(t,++e):i}}},1028:(t,e,i)=>{i.r(e),i.d(e,{Aggregate:()=>M});const s=/([a-z0-9]+)$/i;function r(t){if(!t)return;const e=t.match(s);return e?e[1]:void 0}var n=/^\n+|\n+$/g;function a(t){return function(t){var e;if(t.length>100){var i=t.length-100;e=t.slice(0,50).join("\n"),e+="\n< ...truncated "+i+" lines... >\n",e+=t.slice(-50).join("\n")}else e=t.join("\n");return e}(t).replace(n,"")}var o=i(385),c=i(4222);function h(t){if("string"!=typeof t)return"";const e=(0,c.f)(t);return e===(0,c.f)(o.FN)?"<inline>":e}var u=!1,d=/function (.+?)\s*\(/,l=/^\s*at (?:((?:\[object object\])?(?:[^(]*\([^)]*\))*[^()]*(?: \[as \S+\])?) )?\(?((?:file|http|https|chrome-extension):.*?)?:(\d+)(?::(\d+))?\)?\s*$/i,f=/^\s*(?:(\S*|global code)(?:\(.*?\))?@)?((?:file|http|https|chrome|safari-extension).*?):(\d+)(?::(\d+))?\s*$/i,p=/^\s*at .+ \(eval at \S+ \((?:(?:file|http|https):[^)]+)?\)(?:, [^:]*:\d+:\d+)?\)$/i,m=/^\s*at Function code \(Function code:\d+:\d+\)\s*/i;function g(t){var e=null;try{if(e=function(t){if(!t.stack)return null;var e=t.stack.split("\n").reduce(v,{frames:[],stackLines:[],wrapperSeen:!1});return e.frames.length?{mode:"stack",name:t.name||y(t),message:t.message,stackString:a(e.stackLines),frames:e.frames}:null}(t),e)return e}catch(t){u}try{if(e=function(t){if(!("line"in t))return null;var e=t.name||y(t);if(!t.sourceURL)return{mode:"sourceline",name:e,message:t.message,stackString:e+": "+t.message+"\n in evaluated code",frames:[{func:"evaluated code"}]};var i=h(t.sourceURL),s=e+": "+t.message+"\n at "+i;t.line&&(s+=":"+t.line,t.column&&(s+=":"+t.column));return{mode:"sourceline",name:e,message:t.message,stackString:s,frames:[{url:i,line:t.line,column:t.column}]}}(t),e)return e}catch(t){u}try{if(e=function(t){var e=t.name||y(t);return e?{mode:"nameonly",name:e,message:t.message,stackString:e+": "+t.message,frames:[]}:null}(t),e)return e}catch(t){u}return{mode:"failed",stackString:"",frames:[]}}function v(t,e){let i=function(t){var e=t.match(f);e||(e=t.match(l));if(e)return{url:e[2],func:"Anonymous function"!==e[1]&&"global code"!==e[1]&&e[1]||null,line:+e[3],column:e[4]?+e[4]:null};if(t.match(p)||t.match(m)||"anonymous"===t)return{func:"evaluated code"}}(e);if(!i)return t.stackLines.push(e),t;var s;if((s=i.func)&&s.indexOf("nrWrapper")>=0&&(t.wrapperSeen=!0),!t.wrapperSeen){let s=h(i.url);s!==i.url&&(e=e.replace(i.url,s),i.url=s),t.stackLines.push(e),t.frames.push(i)}return t}function y(t){var e=d.exec(String(t.constructor));return e&&e.length>1?e[1]:"unknown"}function T(t){var e=0;if(!t||!t.length)return e;for(var i=0;i<t.length;i++)e=(e<<5)-e+t.charCodeAt(i),e|=0;return e}var b=i(4322),S=i(2573),w=i(4351),I=i(5546),N=i(1284),R=i(234),E=i(6660),A=i(3325),x=i(2222),P=i(8632),F=i(8e3),O=i(7894);class M extends x.m{static featureName=E.t;constructor(t,e){var i;super(t,e,E.t),i=this,this.stackReported={},this.observedAt={},this.pageviewReported={},this.bufferedErrorsUnderSpa={},this.currentBody=void 0,this.errorOnPage=!1,this.ee.on("interactionDone",((t,e)=>this.onInteractionDone(t,e))),(0,b.X)("err",(function(){return i.storeError(...arguments)}),this.featureName,this.ee),(0,b.X)("ierr",(function(){return i.storeError(...arguments)}),this.featureName,this.ee),(0,b.X)("softNavFlush",((t,e,i)=>this.onSoftNavNotification(t,e,i)),this.featureName,this.ee);const s=(0,R.Mt)(this.agentIdentifier,"jserrors.harvestTimeSeconds")||10;this.waitForFlags(["err"]).then((t=>{let[e]=t;if(e){const t=new S.o("jserrors",{onFinished:function(){return i.onHarvestFinished(...arguments)}},this);t.harvest.on("jserrors",(function(){return i.onHarvestStarted(...arguments)})),t.startTimer(s),this.drain()}else this.blocked=!0,(0,F.o5)(this.agentIdentifier,this.featureName)}))}onHarvestStarted(t){var e=this.aggregator.take(["err","ierr","xhr"]);t.retry&&(this.currentBody=e);var i={body:e,qs:{}},s=(0,w.P)((0,R.OP)(this.agentIdentifier).releaseIds);return"{}"!==s&&(i.qs.ri=s),e&&e.err&&e.err.length&&(this.#n(e.err),this.errorOnPage||(i.qs.pve="1",this.errorOnPage=!0)),i}onHarvestFinished(t){t.retry&&this.currentBody&&((0,N.D)(this.currentBody,((t,e)=>{for(var i=0;i<e.length;i++){var s=e[i],r=this.getBucketName(t,s.params,s.custom);this.aggregator.merge(t,r,s.metrics,s.params,s.custom)}})),this.currentBody=null)}nameHash(t){return T("".concat(t.exceptionClass,"_").concat(t.message,"_").concat(t.stack_trace||t.browser_stack_hash))}getBucketName(t,e,i){return"xhr"===t?T((0,w.P)(e))+":"+T((0,w.P)(i)):this.nameHash(e)+":"+T((0,w.P)(i))}buildCanonicalStackString(t){for(var e="",i=0;i<t.frames.length;i++){var s=t.frames[i],n=r(s.func);e&&(e+="\n"),n&&(e+=n+"@"),"string"==typeof s.url&&(e+=s.url),s.line&&(e+=":"+s.line)}return e}storeError(t,e,i,s,r){if(!t)return;e=e||(0,O.z)();const n=(0,R.OP)(this.agentIdentifier);let a;if(!i&&n.onerror&&(a=n.onerror(t),a&&("string"!=typeof a.group||!a.group.length)))return;var c=g(t);const h={stackHash:T(this.buildCanonicalStackString(c)),exceptionClass:c.name,request_uri:o._A?.location.pathname};c.message&&(h.message=""+c.message),a?.group&&(h.errorGroup=a.group),r&&(h.hasReplay=r);var u,d=T("".concat(c.name,"_").concat(c.message,"_").concat(c.stackString,"_").concat(h.hasReplay?1:0));this.stackReported[d]?h.browser_stack_hash=T(c.stackString):(this.stackReported[d]=!0,h.stack_trace=(u=c.stackString).length>65530?u.substr(0,65530):u,this.observedAt[d]=n.timeKeeper.convertRelativeTimestamp(e)),h.releaseIds=(0,w.P)(n.releaseIds),this.pageviewReported[d]||(h.pageview=1,this.pageviewReported[d]=!0),h.firstOccurrenceTimestamp=this.observedAt[d],h.timestamp=n.timeKeeper.convertRelativeTimestamp(e);const l=[i?"ierr":"err",d,h,{time:e},s];if((0,I.p)("trace-jserror",l,void 0,A.D.sessionTrace,this.ee),this.blocked)return;t?.__newrelic?.[this.agentIdentifier]&&(h._interactionId=t.__newrelic[this.agentIdentifier].interactionId,h._interactionNodeId=t.__newrelic[this.agentIdentifier].interactionNodeId);Boolean((0,P.ek)(this.agentIdentifier)?.features[A.D.softNav])?(0,I.p)("jserror",[h,e],void 0,A.D.softNav,this.ee):(0,I.p)("spa-jserror",l,void 0,A.D.spa,this.ee),h.browserInteractionId&&!h._softNavFinished?(this.bufferedErrorsUnderSpa[h.browserInteractionId]??=[],this.bufferedErrorsUnderSpa[h.browserInteractionId].push(l)):null!=h._interactionId?(this.bufferedErrorsUnderSpa[h._interactionId]=this.bufferedErrorsUnderSpa[h._interactionId]||[],this.bufferedErrorsUnderSpa[h._interactionId].push(l)):this.#a(l,void 0!==h.browserInteractionId,h._softNavAttributes)}#a(t,e){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},[s,r,n,a,o]=t;const c={};e?(Object.entries(i).forEach((t=>{let[e,i]=t;return u(e,i)})),r+=n.browserInteractionId,delete n._softNavAttributes,delete n._softNavFinished):(Object.entries((0,R.C5)(this.agentIdentifier).jsAttributes).forEach((t=>{let[e,i]=t;return u(e,i)})),delete n.browserInteractionId),o&&Object.entries(o).forEach((t=>{let[e,i]=t;return u(e,i)}));const h=r+":"+T((0,w.P)(c));function u(t,e){c[t]=e&&"object"==typeof e?(0,w.P)(e):e}this.aggregator.store(s,h,n,a,c)}onInteractionDone(t,e){this.bufferedErrorsUnderSpa[t.id]&&!this.blocked&&(this.bufferedErrorsUnderSpa[t.id].forEach((i=>{var s={};const r=i[4];(0,N.D)(t.root.attrs.custom,o),(0,N.D)(r,o);var n=i[2];e&&(n.browserInteractionId=t.root.attrs.id,n._interactionNodeId&&(n.parentNodeId=n._interactionNodeId.toString())),delete n._interactionId,delete n._interactionNodeId;var a=(e?i[1]+t.root.attrs.id:i[1])+":"+T((0,w.P)(s));function o(t,e){s[t]=e&&"object"==typeof e?(0,w.P)(e):e}this.aggregator.store(i[0],a,n,i[3],s)})),delete this.bufferedErrorsUnderSpa[t.id])}onSoftNavNotification(t,e,i){this.blocked||(this.bufferedErrorsUnderSpa[t]?.forEach((t=>this.#a(t,e,i))),delete this.bufferedErrorsUnderSpa[t])}#n(t){const e={errorHashes:t.map((t=>t.params.stackHash))};this.ee.emit("cfc.".concat(this.featureName),[e]),t.find((t=>t.params.hasReplay))&&!e.hasReplay&&t.forEach((t=>{delete t.params.hasReplay}))}}},8939:(t,e,i)=>{i.r(e),i.d(e,{Aggregate:()=>_});var s=i(234),r=i(4322),n=i(2573),a=i(3081),o=i(385);const c="React",h="NextJS",u="Vue",d="NuxtJS",l="Angular",f="AngularUniversal",p="Svelte",m="SvelteKit",g="Preact",v="PreactSSR",y="AngularJS",T="Backbone",b="Ember",S="Meteor",w="Zepto",I="Jquery",N="MooTools",R="Qwik",E="Electron";function A(){if(!o.il)return[];const t=[];try{(function(){try{return Object.prototype.hasOwnProperty.call(window,"React")||Object.prototype.hasOwnProperty.call(window,"ReactDOM")||Object.prototype.hasOwnProperty.call(window,"ReactRedux")||document.querySelector("[data-reactroot], [data-reactid]")||(()=>{const t=document.querySelectorAll("body > div");for(let e=0;e<t.length;e++)if(Object.prototype.hasOwnProperty.call(t[e],"_reactRootContainer"))return!0})()}catch(t){return!1}})()&&(t.push(c),function(){try{return Object.prototype.hasOwnProperty.call(window,"next")&&Object.prototype.hasOwnProperty.call(window.next,"version")}catch(t){return!1}}()&&t.push(h)),function(){try{return Object.prototype.hasOwnProperty.call(window,"Vue")}catch(t){return!1}}()&&(t.push(u),function(){try{return Object.prototype.hasOwnProperty.call(window,"$nuxt")&&Object.prototype.hasOwnProperty.call(window.$nuxt,"nuxt")}catch(t){return!1}}()&&t.push(d)),function(){try{return Object.prototype.hasOwnProperty.call(window,"ng")||document.querySelector("[ng-version]")}catch(t){return!1}}()&&(t.push(l),function(){try{return document.querySelector("[ng-server-context]")}catch(t){return!1}}()&&t.push(f)),function(){try{return Object.prototype.hasOwnProperty.call(window,"__svelte")}catch(t){return!1}}()&&(t.push(p),function(){try{return!!Object.keys(window).find((t=>t.startsWith("__sveltekit")))}catch(t){return!1}}()&&t.push(m)),function(){try{return Object.prototype.hasOwnProperty.call(window,"preact")}catch(t){return!1}}()&&(t.push(g),function(){try{return document.querySelector('script[type="__PREACT_CLI_DATA__"]')}catch(t){return!1}}()&&t.push(v)),function(){try{return Object.prototype.hasOwnProperty.call(window,"angular")||document.querySelector(".ng-binding, [ng-app], [data-ng-app], [ng-controller], [data-ng-controller], [ng-repeat], [data-ng-repeat]")||document.querySelector('script[src*="angular.js"], script[src*="angular.min.js"]')}catch(t){return!1}}()&&t.push(y),Object.prototype.hasOwnProperty.call(window,"Backbone")&&t.push(T),Object.prototype.hasOwnProperty.call(window,"Ember")&&t.push(b),Object.prototype.hasOwnProperty.call(window,"Meteor")&&t.push(S),Object.prototype.hasOwnProperty.call(window,"Zepto")&&t.push(w),Object.prototype.hasOwnProperty.call(window,"jQuery")&&t.push(I),Object.prototype.hasOwnProperty.call(window,"MooTools")&&t.push(N),Object.prototype.hasOwnProperty.call(window,"qwikevents")&&t.push(R),function(){try{return"object"==typeof navigator&&"string"==typeof navigator.userAgent&&navigator.userAgent.indexOf("Electron")>=0}catch(t){return!1}}()&&t.push(E)}catch(t){}return t}var x=i(2271),P=i(6141),F=i(3960),O=i(3239),M=i(2222),C=i(8e3);class _ extends M.m{static featureName=a.t9;constructor(t,e){super(t,e,a.t9),this.waitForFlags(["err"]).then((t=>{let[e]=t;if(e){new n.o("jserrors",{onUnload:()=>this.unload()},this).harvest.on("jserrors",(()=>({body:this.aggregator.take(["cm","sm"])}))),this.drain()}else this.blocked=!0,(0,C.o5)(this.agentIdentifier,this.featureName)})),(0,r.X)(a.xS,this.storeSupportabilityMetrics.bind(this),this.featureName,this.ee),(0,r.X)(a.vz,this.storeEventMetrics.bind(this),this.featureName,this.ee),this.singleChecks(),this.eachSessionChecks()}storeSupportabilityMetrics(t,e){if(this.blocked)return;const i=a.mY,s={name:t};this.aggregator.storeMetric(i,t,s,e)}storeEventMetrics(t,e){if(this.blocked)return;const i=a.gF,s={name:t};this.aggregator.store(i,t,s,e)}singleChecks(){const{distMethod:t,loaderType:e}=(0,s.OP)(this.agentIdentifier),{proxy:i,privacy:r,page_view_timing:n}=(0,s.P_)(this.agentIdentifier);if(e&&this.storeSupportabilityMetrics("Generic/LoaderType/".concat(e,"/Detected")),t&&this.storeSupportabilityMetrics("Generic/DistMethod/".concat(t,"/Detected")),o.il){this.storeSupportabilityMetrics("Generic/Runtime/Browser/Detected");const t=document?.currentScript?.nonce;t&&""!==t&&this.storeSupportabilityMetrics("Generic/Runtime/Nonce/Detected"),(0,F.KB)((()=>{A().forEach((t=>{this.storeSupportabilityMetrics("Framework/"+t+"/Detected")}))})),r.cookies_enabled||this.storeSupportabilityMetrics("Config/SessionTracking/Disabled"),n.long_task&&this.storeSupportabilityMetrics("Config/LongTask/Enabled")}else o.v6?this.storeSupportabilityMetrics("Generic/Runtime/Worker/Detected"):this.storeSupportabilityMetrics("Generic/Runtime/Unknown/Detected");(0,x.V)()&&this.storeSupportabilityMetrics("Generic/FileProtocol/Detected");const a=(0,P.$c)(this.agentIdentifier);a.length>0&&this.storeSupportabilityMetrics("Generic/Obfuscate/Detected"),a.length>0&&!(0,P.Ng)(a)&&this.storeSupportabilityMetrics("Generic/Obfuscate/Invalid"),i.assets&&this.storeSupportabilityMetrics("Config/AssetsUrl/Changed"),i.beacon&&this.storeSupportabilityMetrics("Config/BeaconUrl/Changed")}eachSessionChecks(){o.il&&(0,O.bP)("pageshow",(t=>{t?.persisted&&this.storeSupportabilityMetrics("Generic/BFCache/PageRestored")}))}unload(){try{if(this.resourcesSent)return;this.resourcesSent=!0;const t=["beacon","fetch","xmlhttprequest"],e=["nr-data.net","newrelic.com","nr-local.net","localhost"];function i(e){return t.includes(e.initiatorType)}if((performance?.getEntriesByType("resource")||[]).forEach((t=>{var s;s=t,e.some((t=>s.name.indexOf(t)>=0))?i(t)?this.storeSupportabilityMetrics("Generic/Resources/Ajax/Internal"):this.storeSupportabilityMetrics("Generic/Resources/Non-Ajax/Internal"):i(t)?this.storeSupportabilityMetrics("Generic/Resources/Ajax/External"):this.storeSupportabilityMetrics("Generic/Resources/Non-Ajax/External")})),"undefined"!=typeof performance){const s=performance.getEntriesByType("mark"),r=performance.getEntriesByType("measure");this.storeSupportabilityMetrics("Generic/Performance/Mark/Seen",s.length),this.storeSupportabilityMetrics("Generic/Performance/Measure/Seen",r.length)}}catch(n){}}}},1832:(t,e,i)=>{i.r(e),i.d(e,{Aggregate:()=>f});var s=i(1284),r=i(4351),n=i(4322),a=i(2573),o=i(4222),c=i(234),h=i(4649),u=i(385),d=i(2222),l=i(8e3);class f extends d.m{static featureName=h.t;constructor(t,e){var i;super(t,e,h.t),i=this,this.eventsPerMinute=240,this.harvestTimeSeconds=(0,c.Mt)(this.agentIdentifier,"page_action.harvestTimeSeconds")||(0,c.Mt)(this.agentIdentifier,"ins.harvestTimeSeconds")||30,this.eventsPerHarvest=this.eventsPerMinute*this.harvestTimeSeconds/60,this.referrerUrl=void 0,this.currentEvents=void 0,this.events=[],this.att=(0,c.C5)(this.agentIdentifier).jsAttributes,u.il&&document.referrer&&(this.referrerUrl=(0,o.f)(document.referrer)),(0,n.X)("api-addPageAction",(function(){return i.addPageAction(...arguments)}),this.featureName,this.ee),this.waitForFlags(["ins"]).then((t=>{let[e]=t;if(e){const t=new a.o("ins",{onFinished:function(){return i.onHarvestFinished(...arguments)}},this);t.harvest.on("ins",(function(){return i.onHarvestStarted(...arguments)})),t.startTimer(this.harvestTimeSeconds,0),this.drain()}else this.blocked=!0,(0,l.o5)(this.agentIdentifier,this.featureName)}))}onHarvestStarted(t){const{userAttributes:e,atts:i}=(0,c.C5)(this.agentIdentifier);var s={qs:{ua:e,at:i},body:{ins:this.events}};return t.retry&&(this.currentEvents=this.events),this.events=[],s}onHarvestFinished(t){t&&t.sent&&t.retry&&this.currentEvents&&(this.events=this.events.concat(this.currentEvents),this.currentEvents=null)}addPageAction(t,e,i){if(this.events.length>=this.eventsPerHarvest||this.blocked)return;var n,a,h={};u.il&&window.document.documentElement&&(n=window.document.documentElement.clientWidth,a=window.document.documentElement.clientHeight);const d=(0,c.OP)(this.agentIdentifier);var l={timestamp:d.timeKeeper.convertRelativeTimestamp(t),timeSinceLoad:t/1e3,browserWidth:n,browserHeight:a,referrerUrl:this.referrerUrl,currentUrl:(0,o.f)(""+location),pageUrl:(0,o.f)(d.origin),eventType:"PageAction"};function f(t,e){h[t]=e&&"object"==typeof e?(0,r.P)(e):e}(0,s.D)(l,f),(0,s.D)((0,c.C5)(this.agentIdentifier).jsAttributes,f),i&&"object"==typeof i&&(0,s.D)(i,f),h.actionName=e||"",this.events.push(h)}}},3456:(t,e,i)=>{i.r(e),i.d(e,{Aggregate:()=>I});var s=i(385),r=i(5998),n=i(4351),a=i(234),o=i(6291),c=i(7633),h=i(3325),u=i(8632);function d(t){const e=[],i=(0,u.fP)();try{Object.keys(i.initializedAgents[t].features).forEach((t=>{switch(t){case h.D.ajax:e.push("xhr");break;case h.D.jserrors:e.push("err");break;case h.D.pageAction:e.push("ins");break;case h.D.sessionTrace:e.push("stn");break;case h.D.softNav:case h.D.spa:e.push("spa")}}))}catch(t){}return e}var l=i(2825),f=i(50),p=i(2222),m=i(6069),g=i(8373),v=i(4806),y=i(8e3),T=i(5546),b=i(3081),S=i(7894);class w{#o;#c;#h;#u=!1;constructor(t){this.#o=(0,a.OP)(t)?.session,this.processStoredDiff()}get ready(){return this.#u}get correctedOriginTime(){return this.#c}processRumRequest(t,e,i){if(this.processStoredDiff(),this.#u)return;const r=t.getResponseHeader("Date");if(!r)throw new Error("Missing date header on rum response.");const n=e+(i-e)/2;if(this.#c=Math.floor(Date.parse(r)-n),this.#h=s.sK-this.#c,isNaN(this.#c))throw new Error("Date header invalid format.");this.#o?.write({serverTimeDiff:this.#h}),this.#u=!0}convertRelativeTimestamp(t){return Math.floor(this.#c+t)}correctAbsoluteTimestamp(t){return Math.floor(t-this.#h)}processStoredDiff(){const t=this.#o?.read()?.serverTimeDiff;"number"!=typeof t||isNaN(t)||(this.#h=t,this.#c=s.sK-this.#h,this.#u=!0)}}class I extends p.m{static featureName=c.t;constructor(t,e){super(t,e,c.t),this.timeToFirstByte=0,this.firstByteToWindowLoad=0,this.firstByteToDomContent=0,this.timeKeeper=new w(this.agentIdentifier),s.il?v.P.subscribe((t=>{let{value:e,attrs:i}=t;const s=i.navigationEntry;this.timeToFirstByte=Math.max(e,this.timeToFirstByte),this.firstByteToWindowLoad=Math.max(Math.round(s.loadEventEnd-this.timeToFirstByte),this.firstByteToWindowLoad),this.firstByteToDomContent=Math.max(Math.round(s.domContentLoadedEventEnd-this.timeToFirstByte),this.firstByteToDomContent),this.sendRum()})):this.sendRum()}sendRum(){const t=(0,a.C5)(this.agentIdentifier),e=(0,a.OP)(this.agentIdentifier),i=new o.M(this);if(!t.beacon)return;t.queueTime&&this.aggregator.store("measures","qt",{value:t.queueTime}),t.applicationTime&&this.aggregator.store("measures","ap",{value:t.applicationTime}),this.aggregator.store("measures","be",{value:this.timeToFirstByte}),this.aggregator.store("measures","fe",{value:this.firstByteToWindowLoad}),this.aggregator.store("measures","dc",{value:this.firstByteToDomContent});const c={tt:t.ttGuid,us:t.user,ac:t.account,pr:t.product,af:d(this.agentIdentifier).join(","),...Object.entries(this.aggregator.get("measures")||{}).reduce(((t,e)=>{let[i,s]=e;return t[i]=s.params?.value,t}),{}),xx:t.extra,ua:t.userAttributes,at:t.atts};let u;if(e.session&&(c.fsh=Number(e.session.isNew)),"object"==typeof t.jsAttributes&&Object.keys(t.jsAttributes).length>0&&(u={ja:t.jsAttributes}),s._A.performance)if("undefined"!=typeof PerformanceNavigationTiming){const t=s._A?.performance?.getEntriesByType("navigation")?.[0],e={timing:(0,r.wu)(s.sK,t,{}),navigation:(0,r.uB)(t,{})};c.perf=(0,n.P)(e)}else if("undefined"!=typeof PerformanceTiming){const t={timing:(0,r.wu)(s.sK,s._A.performance.timing,{},!0),navigation:(0,r.uB)(s._A.performance.navigation,{})};c.perf=(0,n.P)(t)}c.fp=g.U.current.value,c.fcp=m.y.current.value,this.timeKeeper?.ready&&(c.timestamp=this.timeKeeper.convertRelativeTimestamp((0,S.z)()));const p=(0,S.z)();i.send({endpoint:"rum",payload:{qs:c,body:u},opts:{needResponse:!0,sendEmptyBody:!0},cbFinished:t=>{let{status:i,responseText:s,xhr:r}=t;const n=(0,S.z)();if(i>=400||0===i)this.ee.abort();else{try{if(this.timeKeeper.processRumRequest(r,p,n),!this.timeKeeper.ready)throw new Error("TimeKeeper not ready");e.timeKeeper=this.timeKeeper}catch(t){return(0,T.p)(b.xS,["PVE/NRTime/Calculation/Failed"],void 0,h.D.metrics,this.ee),(0,y.LP)(this.agentIdentifier,h.D.metrics,!0),this.ee.abort(),void(0,f.Z)("Could not calculate New Relic server time. Agent shutting down.",t)}try{const{app:t,...i}=JSON.parse(s);e.appMetadata=t,(0,l.N)(i,this.agentIdentifier),this.drain()}catch(t){this.ee.abort(),(0,f.Z)("RUM call failed. Agent shutting down.",t)}}}})}}},9766:(t,e,i)=>{i.r(e),i.d(e,{Aggregate:()=>A});var s=i(214),r=i(1284),n=i(2573),a=i(4322),o=i(5546),c=i(234),h=i(9251),u=i(3325),d=i(2222),l=i(5528),f=i(8158),p=i(2094),m=i(385);const g=new p.U(f.S.CUMULATIVE_LAYOUT_SHIFT,(t=>t));m.il&&(0,l.mw)((t=>{let{value:e,attribution:i,id:s}=t;const r={metricId:s,largestShiftTarget:i.largestShiftTarget,largestShiftTime:i.largestShiftTime,largestShiftValue:i.largestShiftValue,loadState:i.loadState};g.update({value:e,attrs:r})}),{reportAllChanges:!0});var v=i(6069);const y=new p.U(f.S.FIRST_INPUT_DELAY);m.il&&(0,l.Fu)((t=>{let{value:e,attribution:i}=t;if(m.iS||y.isValid)return;const s={type:i.eventType,fid:Math.round(e),eventTarget:i.eventTarget,loadState:i.loadState};y.update({value:i.eventTime,attrs:s})}));var T=i(8373);const b=new p.U(f.S.INTERACTION_TO_NEXT_PAINT);m.il&&(0,l.Yn)((t=>{let{value:e,attribution:i,id:s}=t;const r={metricId:s,eventTarget:i.eventTarget,eventType:i.eventType,eventTime:i.eventTime,loadState:i.loadState};b.update({value:e,attrs:r})}));var S=i(4222);const w=new p.U(f.S.LARGEST_CONTENTFUL_PAINT);m.il&&(0,l.NO)((t=>{let e,{value:i,attribution:s}=t;if(m.iS||w.isValid)return;const r=s.lcpEntry;r&&(e={size:r.size,eid:r.id,element:s.element,timeToFirstByte:s.timeToFirstByte,resourceLoadDelay:s.resourceLoadDelay,resourceLoadTime:s.resourceLoadTime,elementRenderDelay:s.elementRenderDelay},s.url&&(e.elUrl=(0,S.f)(s.url)),r.element?.tagName&&(e.elTag=r.element.tagName)),w.update({value:i,attrs:e})}));var I=i(4806),N=i(8310);const R=new p.U(f.S.LONG_TASK);if(m.il){const t=t=>{t.forEach((t=>{R.update({value:t.duration,attrs:{ltFrame:t.name,ltStart:t.startTime,ltCtr:t.attribution[0].containerType,..."window"!==t.attribution[0].containerType&&{ltCtrSrc:t.attribution[0].containerSrc,ltCtrId:t.attribution[0].containerId,ltCtrName:t.attribution[0].containerName}}})}))};let e;try{PerformanceObserver.supportedEntryTypes.includes("longtask")&&(e=new PerformanceObserver((e=>{Promise.resolve().then((()=>{t(e.getEntries())}))})),e.observe({type:"longtask",buffered:!0}))}catch(t){}e&&(0,N.L)((()=>{t(e.takeRecords())}),!0)}var E=i(7956);class A extends d.m{static featureName=h.t;#d=t=>{let{name:e,value:i,attrs:s}=t;this.addTiming(e,i,s)};constructor(t,e){var i;super(t,e,h.t),i=this,this.timings=[],this.timingsSent=[],this.curSessEndRecorded=!1,!0===(0,c.Mt)(this.agentIdentifier,"page_view_timing.long_task")&&R.subscribe(this.#d),(0,a.X)("docHidden",(t=>this.endCurrentSession(t)),this.featureName,this.ee),(0,a.X)("winPagehide",(t=>this.recordPageUnload(t)),this.featureName,this.ee);const s=(0,c.Mt)(this.agentIdentifier,"page_view_timing.initialHarvestSeconds")||10,r=(0,c.Mt)(this.agentIdentifier,"page_view_timing.harvestTimeSeconds")||30;this.waitForFlags([]).then((()=>{T.U.subscribe(this.#d),v.y.subscribe(this.#d),y.subscribe(this.#d),w.subscribe(this.#d),b.subscribe(this.#d),I.P.subscribe((t=>{let{attrs:e}=t;this.addTiming("load",Math.round(e.navigationEntry.loadEventEnd))})),(0,E.N)((()=>{const{name:t,value:e,attrs:i}=g.current;void 0!==e&&this.addTiming(t,1e3*e,i)}),!0);const t=new n.o("events",{onFinished:function(){return i.onHarvestFinished(...arguments)},getPayload:function(){return i.prepareHarvest(...arguments)}},this);t.startTimer(r,s),this.drain()}))}endCurrentSession(t){this.curSessEndRecorded||(this.addTiming("pageHide",t,null),this.curSessEndRecorded=!0)}recordPageUnload(t){this.addTiming("unload",t,null),this.endCurrentSession(t)}addTiming(t,e,i){(function(t){var e=navigator.connection||navigator.mozConnection||navigator.webkitConnection;if(!e)return;e.type&&(t["net-type"]=e.type);e.effectiveType&&(t["net-etype"]=e.effectiveType);e.rtt&&(t["net-rtt"]=e.rtt);e.downlink&&(t["net-dlink"]=e.downlink)})(i=i||{}),t!==f.S.CUMULATIVE_LAYOUT_SHIFT&&g.current.value>=0&&(i.cls=g.current.value),this.timings.push({name:t,value:e,attrs:i}),(0,o.p)("pvtAdded",[t,e,i],void 0,u.D.sessionTrace,this.ee)}onHarvestFinished(t){t.retry&&this.timingsSent.length>0&&(this.timings.unshift(...this.timingsSent),this.timingsSent=[])}appendGlobalCustomAttributes(t){var e=t.attrs||{},i=(0,c.C5)(this.agentIdentifier).jsAttributes||{},s=["size","eid","cls","type","fid","elTag","elUrl","net-type","net-etype","net-rtt","net-dlink"];(0,r.D)(i,(function(t,i){s.indexOf(t)<0&&(e[t]=i)}))}prepareHarvest(t){if(0!==this.timings.length){var e=this.getPayload(this.timings);if(t.retry)for(var i=0;i<this.timings.length;i++)this.timingsSent.push(this.timings[i]);return this.timings=[],{body:{e}}}}getPayload(t){for(var e=(0,s.FX)(this.agentIdentifier),i="bel.6;",r=0;r<t.length;r++){var n=t[r];i+="e,",i+=e(n.name)+",",i+=(0,s.AG)(n.value,s.uR,!1)+",",this.appendGlobalCustomAttributes(n);var a=(0,s.n1)(n.attrs,e);a&&a.length>0&&(i+=(0,s.uR)(a.length)+";"+a.join(";")),r+1<t.length&&(i+=";")}return i}}},9426:(t,e,i)=>{i.r(e),i.d(e,{Aggregate:()=>N});var s=i(4322),r=i(2573),n=i(7144),a=i(234),o=i(2222);let c;const h=new Promise((t=>{c=t})),u=Object.freeze({onReplayReady:c,sessionReplayInitialized:h});var d=i(4420),l=i(50),f=i(385),p=i(3081),m=i(5546),g=i(3325),v=i(6818),y=i(7056),T=i(4351),b=i(9655),S=i(8e3),w=i(7894),I=i(3112);class N extends o.m{static featureName=n.t9;mode=y.IK.OFF;constructor(t,e,i){super(t,e,n.t9),this.harvestTimeSeconds=(0,a.Mt)(this.agentIdentifier,"session_replay.harvestTimeSeconds")||60,this.initialized=!1,this.blocked=!1,this.gzipper=void 0,this.u8=void 0,this.entitled=!1,this.timeKeeper=void 0,this.recorder=i?.recorder,this.errorNoticed=i?.errorNoticed||!1,(0,m.p)(p.xS,["Config/SessionReplay/Enabled"],void 0,g.D.metrics,this.ee),this.ee.on("cfc.".concat(g.D.jserrors),(t=>{t.hasReplay=!(!this.scheduler?.started||!this.recorder||this.mode!==y.IK.FULL||this.blocked||!this.entitled)})),this.ee.on(y.wO.RESET,(()=>{this.abort(n.Mi.RESET)})),this.ee.on(y.wO.PAUSE,(()=>{this.recorder?.stopRecording()})),this.ee.on(y.wO.RESUME,(()=>{if(!this.recorder)return;const{session:t}=(0,a.OP)(this.agentIdentifier);this.mode=t.state.sessionReplayMode,this.initialized&&this.mode!==y.IK.OFF&&this.recorder?.startRecording()})),this.ee.on(y.wO.UPDATE,((t,e)=>{this.recorder&&this.initialized&&!this.blocked&&t===y.uT.CROSS_TAB&&(this.mode!==y.IK.OFF&&e.sessionReplayMode===y.IK.OFF&&this.abort(n.Mi.CROSS_TAB),this.mode=e.sessionReplay)})),this.scheduler=new r.o("browser/blobs",{onFinished:this.onHarvestFinished.bind(this),retryDelay:this.harvestTimeSeconds,getPayload:this.prepareHarvest.bind(this),raw:!0},this),(0,s.X)(n.Ef.PAUSE,(()=>{this.forceStop(this.mode!==y.IK.ERROR)}),this.featureName,this.ee),(0,s.X)(n.Ef.ERROR_DURING_REPLAY,(t=>{this.handleError(t)}),this.featureName,this.ee);const{error_sampling_rate:o,sampling_rate:c,autoStart:h,block_selector:d,mask_text_selector:l,mask_all_inputs:f,inline_stylesheet:v,inline_images:T,collect_fonts:b}=(0,a.Mt)(this.agentIdentifier,"session_replay");this.waitForFlags(["srs","sr"]).then((t=>{let[e,i]=t;if(this.entitled=!!i,!this.entitled)return(0,S.o5)(this.agentIdentifier,this.featureName),void(this.recorder?.recording&&(this.abort(n.Mi.ENTITLEMENTS),(0,m.p)(p.xS,["SessionReplay/EnabledNotEntitled/Detected"],void 0,g.D.metrics,this.ee)));this.drain(),this.initializeRecording(e)})).then((()=>{if(this.mode===y.IK.OFF)for(this.recorder?.stopRecording();this.recorder?.getEvents().events.length;)this.recorder?.clearBuffer?.();u.onReplayReady(this.mode)})),h||(0,m.p)(p.xS,["Config/SessionReplay/AutoStart/Modified"],void 0,g.D.metrics,this.ee),!0===b&&(0,m.p)(p.xS,["Config/SessionReplay/CollectFonts/Modified"],void 0,g.D.metrics,this.ee),!0!==v&&(0,m.p)(p.xS,["Config/SessionReplay/InlineStylesheet/Modified"],void 0,g.D.metrics,this.ee),!0===T&&(0,m.p)(p.xS,["Config/SessionReplay/InlineImages/Modifed"],void 0,g.D.metrics,this.ee),!0!==f&&(0,m.p)(p.xS,["Config/SessionReplay/MaskAllInputs/Modified"],void 0,g.D.metrics,this.ee),"[data-nr-block]"!==d&&(0,m.p)(p.xS,["Config/SessionReplay/BlockSelector/Modified"],void 0,g.D.metrics,this.ee),"*"!==l&&(0,m.p)(p.xS,["Config/SessionReplay/MaskTextSelector/Modified"],void 0,g.D.metrics,this.ee),(0,m.p)(p.xS,["Config/SessionReplay/SamplingRate/Value",c],void 0,g.D.metrics,this.ee),(0,m.p)(p.xS,["Config/SessionReplay/ErrorSamplingRate/Value",o],void 0,g.D.metrics,this.ee)}handleError(t){this.recorder&&(this.recorder.currentBufferTarget.hasError=!0),this.mode===y.IK.ERROR&&"visible"===f._A?.document.visibilityState&&this.switchToFull()}switchToFull(){this.entitled&&!this.blocked&&(this.mode=y.IK.FULL,this.recorder&&this.initialized?(this.recorder.recording||this.recorder.startRecording(),this.scheduler.startTimer(this.harvestTimeSeconds),this.syncWithSessionManager({sessionReplayMode:this.mode})):this.initializeRecording(!1,!0,!0))}async initializeRecording(t,e){if(this.initialized=!0,!this.entitled)return;const{session:s,timeKeeper:r}=(0,a.OP)(this.agentIdentifier);if(this.timeKeeper=r,this.recorder?.parent.trigger===n.pB.API&&this.recorder?.recording?this.mode=y.IK.FULL:s.isNew||e?this.mode=t:this.mode=s.state.sessionReplayMode,this.mode!==y.IK.OFF){if(this.recorder)this.recorder.parent=this;else try{const{Recorder:t}=await Promise.all([i.e(111),i.e(433)]).then(i.bind(i,4345));this.recorder=new t(this),this.recorder.currentBufferTarget.hasError=this.errorNoticed}catch(t){return this.abort(n.Mi.IMPORT)}this.mode===y.IK.ERROR&&this.errorNoticed&&(this.mode=y.IK.FULL),this.mode===y.IK.FULL&&("preloaded"===this.recorder?.getEvents().type&&this.prepUtils().then((()=>{this.scheduler.runHarvest()})),this.scheduler.started||this.scheduler.startTimer(this.harvestTimeSeconds)),await this.prepUtils(),this.recorder.recording||this.recorder.startRecording(),this.syncWithSessionManager({sessionReplayMode:this.mode})}}async prepUtils(){try{const{gzipSync:t,strToU8:e}=await i.e(164).then(i.bind(i,3778));this.gzipper=t,this.u8=e}catch(t){}}prepareHarvest(){let{opts:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!this.recorder||!this.timeKeeper?.ready)return;const e=this.recorder.getEvents();if(!e.events.length||this.mode!==y.IK.FULL||this.blocked)return;const i=this.getHarvestContents(e);if(!i.body.length)return void this.recorder.clearBuffer();(0,m.p)(p.xS,["SessionReplay/Harvest/Attempts"],void 0,g.D.metrics,this.ee);let s=0;if(this.gzipper&&this.u8?(i.body=this.gzipper(this.u8("[".concat(i.body.map((t=>{let{__serialized:e,...i}=t;if(i.__newrelic&&e)return e;const s={...i};return s.__newrelic||(s.__newrelic=(0,I.wi)(i.timestamp,this.timeKeeper),s.timestamp=this.timeKeeper.correctAbsoluteTimestamp(i.timestamp)),(0,T.P)(s)})).join(","),"]"))),s=i.body.length,this.scheduler.opts.gzip=!0):(i.body=i.body.map((t=>{let{__serialized:e,...i}=t;if(i.__newrelic)return i;const s={...i};return s.__newrelic=(0,I.wi)(i.timestamp,this.timeKeeper),s.timestamp=this.timeKeeper.correctAbsoluteTimestamp(i.timestamp),s})),s=(0,T.P)(i.body).length,this.scheduler.opts.gzip=!1),s>n.Ye)return void this.abort(n.Mi.TOO_BIG);const{session:r}=(0,a.OP)(this.agentIdentifier);return r.state.sessionReplaySentFirstChunk||this.syncWithSessionManager({sessionReplaySentFirstChunk:!0}),this.recorder.clearBuffer(),"preloaded"===e.type&&this.scheduler.runHarvest(t),[i]}getCorrectedTimestamp(t){if(t?.timestamp)return t.__newrelic?t.timestamp:this.timeKeeper.correctAbsoluteTimestamp(t.timestamp)}getHarvestContents(t){t??=this.recorder.getEvents();let e=t.events;const i=(0,a.OP)(this.agentIdentifier),s=(0,a.C5)(this.agentIdentifier),r=s.jsAttributes?.["enduser.id"];e?.[0]?.type===n.i9.FullSnapshot&&this.recorder.lastMeta&&(t.hasMeta=!0,e.unshift(this.recorder.lastMeta),this.recorder.lastMeta=void 0);e[e.length-1]?.type===n.i9.Meta&&(this.recorder.lastMeta=e[e.length-1],e=e.slice(0,e.length-1),t.hasMeta=!!e.find((t=>t.type===n.i9.Meta)));const o=(0,w.z)(),c=this.getCorrectedTimestamp(e[0]),h=this.getCorrectedTimestamp(e[e.length-1]),u=c||this.timeKeeper.correctAbsoluteTimestamp(t.cycleTimestamp),l=h||this.timeKeeper.convertRelativeTimestamp(o),f=i.appMetadata?.agents?.[0]||{};return{qs:{browser_monitoring_key:s.licenseKey,type:"SessionReplay",app_id:s.applicationID,protocol_version:"0",timestamp:u,attributes:(0,d.j6)({...!!this.gzipper&&!!this.u8&&{content_encoding:"gzip"},...f.entityGuid&&{entityGuid:f.entityGuid},harvestId:[i.session?.state.value,i.ptid,i.harvestCount].filter((t=>t)).join("_"),"replay.firstTimestamp":u,"replay.lastTimestamp":l,"replay.nodes":e.length,"session.durationMs":i.session.getDuration(),agentVersion:i.version,session:i.session.state.value,rst:o,hasMeta:t.hasMeta||!1,hasSnapshot:t.hasSnapshot||!1,hasError:t.hasError||!1,isFirstChunk:!1===i.session.state.sessionReplaySentFirstChunk,decompressedBytes:t.payloadBytesEstimation,invalidStylesheetsDetected:b.j.invalidStylesheetsDetected,inlinedAllStylesheets:t.inlinedAllStylesheets,"rrweb.version":v.lF,"payload.type":t.type,...r&&{"enduser.id":r}},n.J0).substring(1)},body:e}}onHarvestFinished(t){429===t.status&&this.abort(n.Mi.TOO_MANY),this.blocked&&this.scheduler.stopTimer(!0)}forceStop(t){t&&this.scheduler.runHarvest(),this.mode=y.IK.OFF,this.recorder?.stopRecording?.(),this.syncWithSessionManager({sessionReplayMode:this.mode})}abort(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};for((0,l.Z)("SR aborted -- ".concat(t.message)),(0,m.p)(p.xS,["SessionReplay/Abort/".concat(t.sm)],void 0,g.D.metrics,this.ee),this.blocked=!0,this.mode=y.IK.OFF,this.recorder?.stopRecording?.(),this.syncWithSessionManager({sessionReplayMode:this.mode}),this.recorder?.clearTimestamps?.(),this.ee.emit("REPLAY_ABORTED");this.recorder?.getEvents().events.length;)this.recorder?.clearBuffer?.()}syncWithSessionManager(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{session:e}=(0,a.OP)(this.agentIdentifier);e.write(t)}}},9655:(t,e,i)=>{i.d(e,{j:()=>n});var s=i(234),r=i(385);const n=new class{#l=new WeakSet;#f=[];invalidStylesheetsDetected=!1;failedToFix=0;evaluate(){let t=0;if(r.il)for(let e=0;e<Object.keys(document.styleSheets).length;e++)if(!this.#l.has(document.styleSheets[e])){this.#l.add(document.styleSheets[e]);try{document.styleSheets[e].cssRules}catch(i){if(!document.styleSheets[e].href)return;t++,this.#f.push(this.#p(document.styleSheets[e]))}}return t&&(this.invalidStylesheetsDetected=!0),t}async fix(){await Promise.all(this.#f),this.#f=[];const t=this.failedToFix;return this.failedToFix=0,t}async#p(t){if(t?.href)try{const e=await s.Yu.FETCH.bind(window)(t.href);if(!e.ok)return void this.failedToFix++;const i=await e.text();try{const e=new CSSStyleSheet;await e.replace(i),Object.defineProperty(t,"cssRules",{get:()=>e.cssRules}),Object.defineProperty(t,"rules",{get:()=>e.rules})}catch(e){Object.defineProperty(t,"cssText",{get:()=>i}),this.failedToFix++}}catch(t){this.failedToFix++}}}},5951:(t,e,i)=>{i.r(e),i.d(e,{Aggregate:()=>T});var s=i(4322),r=i(2573),n=i(234),a=i(3614),o=i(2222),c=i(385),h=i(7056),u=i(7894),d=i(7243);class l{constructor(t,e,i,s,r){this.n=t,this.s=e,this.e=i,this.o=s,this.t=r}}const f="function"==typeof c._A.PerformanceObserver,p={global:{mouseup:!0,mousedown:!0},window:{load:!0,pagehide:!0},xhrOriginMissing:{ignoreAll:!0}},m={typing:[1e3,2e3],scrolling:[100,1e3],mousing:[1e3,2e3],touching:[1e3,2e3]};class g{nodeCount=0;trace={};earliestTimeStamp=1/0;latestTimeStamp=0;tempStorage=[];prevStoredEvents=new Set;constructor(t){this.parent=t}storeSTN(t){if(!this.parent.blocked){if(this.nodeCount>=a.c){if(this.parent.agentRuntime.session.state.sessionTraceMode!==h.IK.ERROR)return;if(0===this.trimSTNs(3e4))return}for(;this.tempStorage.length;)this.storeSTN(this.tempStorage.shift());this.trace[t.n]?this.trace[t.n].push(t):this.trace[t.n]=[t],t.s<this.earliestTimeStamp&&(this.earliestTimeStamp=t.s),t.s>this.latestTimeStamp&&(this.latestTimeStamp=t.s),this.nodeCount++}}trimSTNs(t){let e=0;const i=Math.max((0,u.z)()-t,0);return Object.keys(this.trace).forEach((t=>{const s=this.trace[t];let r=s.findIndex((t=>i<=t.e));0!==r&&(r<0?(r=s.length,delete this.trace[t]):s.splice(0,r),this.nodeCount-=r,e+=r)})),e}takeSTNs(){f||this.storeResources(c._A.performance?.getEntriesByType?.("resource"));const t=Object.entries(this.trace).flatMap((t=>{let[e,i]=t;if(!(e in m))return i;const s=this.smearEvtsByOrigin(e),r=i.sort(((t,e)=>t.s-e.s)).reduce(s,{});return Object.values(r).flat()}),this);if(0===t.length)return{};this.trace={},this.nodeCount=0;const e=this.earliestTimeStamp;this.earliestTimeStamp=1/0;const i=this.latestTimeStamp;return this.latestTimeStamp=0,{stns:t,earliestTimeStamp:e,latestTimeStamp:i}}smearEvtsByOrigin(t){const e=m[t][0],i=m[t][1],s={};return(r,n)=>{let a=r[n.o];a||(a=r[n.o]=[]);const o=s[n.o];return"scrolling"!==t||function(t){const e=4;return!!(t&&"number"==typeof t.e&&"number"==typeof t.s&&t.e-t.s<e)}(n)?o&&n.s-o.s<i&&o.e>n.s-e?o.e=n.e:(s[n.o]=n,a.push(n)):(s[n.o]=null,n.n="scroll",a.push(n)),r}}processPVT(t,e,i){this.storeTiming({[t]:e}),function(t,e){return"fi"===t&&!!e&&"number"==typeof e.fid}(t,i)&&this.storeEvent({type:"fid",target:"document"},"document",e,e+i.fid)}storeTiming(t){if(t)for(let e in t){let i=t[e];const s=e.toLowerCase();s.indexOf("size")>=0||s.indexOf("status")>=0||"number"==typeof i&&i>=0&&(i=Math.round(i),this.storeSTN(new l(e,i,i,"document","timing")))}}storeEvent(t,e,i,s){if(this.shouldIgnoreEvent(t,e))return;if(this.prevStoredEvents.has(t))return;this.prevStoredEvents.add(t);const r=new l(this.evtName(t.type),i,s,void 0,"event");try{r.o=this.evtOrigin(t.target,e)}catch(t){r.o=this.evtOrigin(null,e)}this.storeSTN(r)}shouldIgnoreEvent(t,e){const i=this.evtOrigin(t.target,e);return t.type in p.global||(!(!p[i]||!p[i].ignoreAll)||!(!p[i]||!(t.type in p[i])))}evtName(t){switch(t){case"keydown":case"keyup":case"keypress":return"typing";case"mousemove":case"mouseenter":case"mouseleave":case"mouseover":case"mouseout":return"mousing";case"scroll":return"scrolling";case"touchstart":case"touchmove":case"touchend":case"touchcancel":case"touchenter":case"touchleave":return"touching";default:return t}}evtOrigin(t,e){let i="unknown";if(t&&t instanceof XMLHttpRequest){const e=this.parent.ee.context(t).params;if(!(e&&e.status&&e.method&&e.host&&e.pathname))return"xhrOriginMissing";i=e.status+" "+e.method+": "+e.host+e.pathname}else if(t&&"string"==typeof t.tagName&&(i=t.tagName.toLowerCase(),t.id&&(i+="#"+t.id),t.className))for(let e=0;e<t.classList.length;e++)i+="."+t.classList[e];return"unknown"===i&&("string"==typeof e?i=e:e===document?i="document":e===window?i="window":e instanceof FileReader&&(i="FileReader")),i}storeHist(t,e,i){this.storeSTN(new l("history.pushState",i,i,t,e))}#m=0;storeResources(t){t&&0!==t.length&&(t.forEach((t=>{if((0|t.fetchStart)<=this.#m)return;const{initiatorType:e,fetchStart:i,responseEnd:s,entryType:r}=t,{protocol:n,hostname:a,port:o,pathname:c}=(0,d.e)(t.name),h=new l(e,0|i,0|s,"".concat(n,"://").concat(a,":").concat(o).concat(c),r);this.storeSTN(h)})),this.#m=0|t[t.length-1].fetchStart)}storeErrorAgg(t,e,i,s){"err"===t&&this.storeSTN(new l("error",s.time,s.time,i.message,i.stackHash))}storeXhrAgg(t,e,i,s){"xhr"===t&&this.storeSTN(new l("Ajax",s.time,s.time+s.duration,"".concat(i.status," ").concat(i.method,": ").concat(i.host).concat(i.pathname),"ajax"))}restoreNode(t,e){this.nodeCount>=a.c||(this.nodeCount+=e.length,this.trace[t]=this.trace[t]?e.concat(this.trace[t]):e)}}var v=i(4420),y=i(8e3);class T extends o.m{static featureName=a.FEATURE_NAME;constructor(t,e){super(t,e,a.FEATURE_NAME),this.agentRuntime=(0,n.OP)(t),this.agentInfo=(0,n.C5)(t),this.sentTrace=null,this.harvestTimeSeconds=(0,n.Mt)(t,"session_trace.harvestTimeSeconds")||30,this.entitled=void 0,this.everHarvested=!1,this.harvesting=!1,this.traceStorage=new g(this),this.waitForFlags(["sts","st"]).then((t=>{let[e,i]=t;return this.initialize(e,i)}))}initialize(t,e,i){var n=this;return this.entitled??=e,this.blocked||!this.entitled?(0,y.o5)(this.agentIdentifier,this.featureName):(this.initialized||(this.ee.on(h.wO.RESET,(()=>{this.abort()})),this.ee.on(h.wO.UPDATE,((t,e)=>{this.mode===h.IK.FULL||e.sessionReplayMode!==h.IK.FULL&&e.sessionTraceMode!==h.IK.FULL||this.switchToFull()}))),this.agentRuntime.session.isNew||i?this.mode=t:this.mode=this.agentRuntime.session.state.sessionTraceMode,this.initialized=!0,this.mode===h.IK.OFF?(0,y.o5)(this.agentIdentifier,this.featureName):(this.timeKeeper??=this.agentRuntime.timeKeeper,this.scheduler=new r.o("browser/blobs",{onFinished:this.onHarvestFinished.bind(this),retryDelay:this.harvestTimeSeconds,getPayload:this.prepareHarvest.bind(this),raw:!0},this),(0,s.X)("bst",(function(){return n.traceStorage.storeEvent(...arguments)}),this.featureName,this.ee),(0,s.X)("bstResource",(function(){return n.traceStorage.storeResources(...arguments)}),this.featureName,this.ee),(0,s.X)("bstHist",(function(){return n.traceStorage.storeHist(...arguments)}),this.featureName,this.ee),(0,s.X)("bstXhrAgg",(function(){return n.traceStorage.storeXhrAgg(...arguments)}),this.featureName,this.ee),(0,s.X)("bstApi",(function(){return n.traceStorage.storeSTN(...arguments)}),this.featureName,this.ee),(0,s.X)("trace-jserror",(function(){return n.traceStorage.storeErrorAgg(...arguments)}),this.featureName,this.ee),(0,s.X)("pvtAdded",(function(){return n.traceStorage.processPVT(...arguments)}),this.featureName,this.ee),"undefined"!=typeof PerformanceNavigationTiming?this.traceStorage.storeTiming(c._A.performance?.getEntriesByType?.("navigation")[0]):this.traceStorage.storeTiming(c._A.performance?.timing),this.mode===h.IK.FULL?this.startHarvesting():(0,s.X)("trace-jserror",(()=>{this.mode===h.IK.ERROR&&this.switchToFull()}),this.featureName,this.ee),this.agentRuntime.session.write({sessionTraceMode:this.mode}),void this.drain()))}startHarvesting(){this.scheduler.started||this.blocked||(this.scheduler.runHarvest(),this.scheduler.startTimer(this.harvestTimeSeconds))}prepareHarvest(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this.traceStorage.prevStoredEvents.clear(),!this.timeKeeper?.ready)return;if(this.mode===h.IK.OFF&&0===this.traceStorage.nodeCount)return;if(this.mode===h.IK.ERROR)return;const{stns:e,earliestTimeStamp:i,latestTimeStamp:s}=this.traceStorage.takeSTNs();if(!e)return;t.retry&&(this.sentTrace=e);const r=!this.agentRuntime.session.state.traceHarvestStarted;r&&this.agentRuntime.session.write({traceHarvestStarted:!0});const n=1===this.agentRuntime.session?.state.sessionReplayMode,a=this.agentInfo?.jsAttributes?.["enduser.id"];this.everHarvested=!0;const o=this.agentRuntime.appMetadata?.agents?.[0]||{};return{qs:{browser_monitoring_key:this.agentInfo.licenseKey,type:"BrowserSessionChunk",app_id:this.agentInfo.applicationID,protocol_version:"0",timestamp:this.timeKeeper.convertRelativeTimestamp(i),attributes:(0,v.j6)({...o.entityGuid&&{entityGuid:o.entityGuid},harvestId:"".concat(this.agentRuntime.session?.state.value,"_").concat(this.agentRuntime.ptid,"_").concat(this.agentRuntime.harvestCount),"trace.firstTimestamp":this.timeKeeper.convertRelativeTimestamp(i),"trace.lastTimestamp":this.timeKeeper.convertRelativeTimestamp(s),"trace.nodes":e.length,"trace.originTimestamp":this.timeKeeper.correctedOriginTime,agentVersion:this.agentRuntime.version,...r&&{firstSessionHarvest:r},...n&&{hasReplay:n},ptid:"".concat(this.agentRuntime.ptid),session:"".concat(this.agentRuntime.session?.state.value),...a&&{"enduser.id":a}},5e3).substring(1)},body:e}}onHarvestFinished(t){t.sent&&t.retry&&this.sentTrace&&(Object.entries(this.sentTrace).forEach((t=>{let[e,i]=t;this.traceStorage.restoreNode(e,i)})),this.sentTrace=null)}switchToFull(){if(this.mode===h.IK.FULL||!this.entitled||this.blocked)return;const t=this.mode;if(this.mode=h.IK.FULL,this.agentRuntime.session.write({sessionTraceMode:this.mode}),t===h.IK.OFF||!this.initialized)return this.initialize(this.mode,this.entitled);this.initialized&&this.traceStorage.trimSTNs(3e4),this.startHarvesting()}abort(){this.blocked=!0,this.mode=h.IK.OFF,this.agentRuntime.session.write({sessionTraceMode:this.mode}),this.scheduler.stopTimer()}}},1898:(t,e,i)=>{i.r(e),i.d(e,{Aggregate:()=>A});var s=i(234),r=i(8e3),n=i(5546),a=i(4322),o=i(2573),c=i(7872),h=i(4806),u=i(3325),d=i(3081),l=i(2222),f=i(6216),p=i(214);let m=0;class g{belType;children=[];start;end;callbackEnd=0;callbackDuration=0;nodeId=++m;constructor(t){if(!t)throw new Error("Interaction is missing core attributes");this.agentIdentifier=t}addChild(t){this.children.push(t)}serialize(){}}class v extends g{constructor(t,e){super(t),this.belType=f.QZ.AJAX,this.method=e.method,this.status=e.status,this.domain=e.domain,this.path=e.path,this.txSize=e.requestSize,this.rxSize=e.responseSize,this.requestedWith="fetch"===e.type?1:"",this.spanId=e.spanId,this.traceId=e.traceId,this.spanTimestamp=e.spanTimestamp,this.gql=e.gql,this.start=e.startTime,this.end=e.endTime}serialize(t){const e=(0,p.FX)(this.agentIdentifier),i=[],s=[(0,p.uR)(this.belType),0,(0,p.uR)(this.start-t),(0,p.uR)(this.end-this.start),(0,p.uR)(this.callbackEnd),(0,p.uR)(this.callbackDuration),e(this.method),(0,p.uR)(this.status),e(this.domain),e(this.path),(0,p.uR)(this.txSize),(0,p.uR)(this.rxSize),this.requestedWith,e(this.nodeId),(0,p.AG)(this.spanId,e,!0)+(0,p.AG)(this.traceId,e,!0)+(0,p.AG)(this.spanTimestamp,p.uR)];let r=[];return"object"==typeof this.gql&&(r=(0,p.n1)(this.gql,e)),this.children.forEach((t=>r.push(t.serialize()))),s[1]=(0,p.uR)(r.length),i.push(s),r.length&&i.push(r.join(";")),i.join(";")}}var y=i(5998),T=i(385),b=i(4402),S=i(7894),w=i(4222);class I extends g{id=(0,b.Rl)();initialPageURL=T.FN;oldURL=""+T._A?.location;newURL=""+T._A?.location;customName;customAttributes={};customDataByApi={};queueTime;appTime;newRoute;status=f.vh.IP;domTimestamp=0;historyTimestamp=0;createdByApi=!1;keepOpenUntilEndApi=!1;onDone=[];cancellationTimer;constructor(t,e,i,s){super(t),this.belType=f.QZ.INTERACTION,this.trigger=e,this.start=i,this.oldRoute=s,this.eventSubscription=new Map([["finished",[]],["cancelled",[]]]),this.forceSave=this.forceIgnore=!1,this.trigger===f.cS&&(this.createdByApi=!0)}updateDom(t){this.domTimestamp=t||(0,S.z)()}updateHistory(t,e){this.newURL=e||""+T._A?.location,this.historyTimestamp=t||(0,S.z)()}seenHistoryAndDomChange(){return this.historyTimestamp>0&&this.domTimestamp>this.historyTimestamp}on(t,e){if(!this.eventSubscription.has(t))throw new Error("Cannot subscribe to non pre-defined events.");if("function"!=typeof e)throw new Error("Must supply function as callback.");this.eventSubscription.get(t).push(e)}done(t){return(!this.keepOpenUntilEndApi||void 0!==t)&&(this.onDone.forEach((t=>t(this.customDataByApi))),this.forceIgnore?this.#g():this.seenHistoryAndDomChange()?this.#v(t):this.forceSave?this.#v(t||performance.now()):this.#g(),!0)}#v(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;if(this.status!==f.vh.IP)return;clearTimeout(this.cancellationTimer),this.end=Math.max(this.domTimestamp,this.historyTimestamp,t),this.customAttributes={...(0,s.C5)(this.agentIdentifier).jsAttributes,...this.customAttributes},this.status=f.vh.FIN;this.eventSubscription.get("finished").forEach((t=>t()))}#g(){if(this.status!==f.vh.IP)return;clearTimeout(this.cancellationTimer),this.status=f.vh.CAN;this.eventSubscription.get("cancelled").forEach((t=>t()))}isActiveDuring(t){return this.status===f.vh.IP?this.start<=t:this.status===f.vh.FIN&&this.start<=t&&this.end>=t}get firstPaint(){}get firstContentfulPaint(){}get navTiming(){}serialize(t){const e=(0,p.FX)(this.agentIdentifier),i=[];let r;r="initialPageLoad"===this.trigger?f.K8.INITIAL_PAGE_LOAD:this.newURL!==this.oldURL?f.K8.ROUTE_CHANGE:f.K8.UNSPECIFIED;const n=[(0,p.uR)(this.belType),0,(0,p.uR)(this.start-t),(0,p.uR)(this.end-this.start),(0,p.uR)(this.callbackEnd),(0,p.uR)(this.callbackDuration),e(this.trigger),e((0,w.f)(this.initialPageURL,!0)),e((0,w.f)(this.oldURL,!0)),e((0,w.f)(this.newURL,!0)),e(this.customName),r,(0,p.AG)(this.queueTime,p.uR,!0)+(0,p.AG)(this.appTime,p.uR,!0)+(0,p.AG)(this.oldRoute,e,!0)+(0,p.AG)(this.newRoute,e,!0)+e(this.id),e(this.nodeId),(0,p.AG)(this.firstPaint,p.uR,!0)+(0,p.AG)(this.firstContentfulPaint,p.uR)],a=(0,p.n1)(this.customAttributes||{},e);return(0,s.C5)(this.agentIdentifier).atts&&a.push("a,"+e((0,s.C5)(this.agentIdentifier).atts)),this.children.forEach((e=>a.push(e.serialize(t||this.start)))),n[1]=(0,p.uR)(a.length),i.push(n),a.length&&i.push(a.join(";")),this.navTiming?i.push(this.navTiming):i.push(""),i.join(";")}}var N=i(8373),R=i(6069);class E extends I{constructor(t){super(t,"initialPageLoad",0,null);const e=(0,s.C5)(t);this.queueTime=e.queueTime,this.appTime=e.applicationTime}get firstPaint(){return N.U.current.value}get firstContentfulPaint(){return R.y.current.value}get navTiming(){if(!y.zJ.length)return;let t=",",e="b",i=0;return y.zJ.slice(1,21).forEach((s=>{void 0!==s?(e+=t+(0,p.uR)(s-i),t=",",i=s):(e+=t+"!",t="")})),e}}class A extends l.m{static featureName=f.t9;constructor(t,e,i){let{domObserver:c}=i;super(t,e,f.t9);const l=(0,s.Mt)(t,"soft_navigations.harvestTimeSeconds")||10;this.interactionsToHarvest=[],this.interactionsAwaitingRetry=[],this.domObserver=c,this.initialPageLoadInteraction=new E(t),h.P.subscribe((t=>{let{attrs:e}=t;const i=e.navigationEntry.loadEventEnd;this.initialPageLoadInteraction.forceSave=!0,this.initialPageLoadInteraction.done(i),this.interactionsToHarvest.push(this.initialPageLoadInteraction),this.initialPageLoadInteraction=null,(0,n.p)(d.xS,["SoftNav/Interaction/InitialPageLoad/Duration/Ms",Math.round(i)],void 0,u.D.metrics,this.ee)})),this.latestRouteSetByApi=null,this.interactionInProgress=null,this.blocked=!1,this.waitForFlags(["spa"]).then((e=>{let[i]=e;if(i){this.drain();const e=new o.o("events",{onFinished:this.onHarvestFinished.bind(this),retryDelay:l,onUnload:()=>this.interactionInProgress?.done()},{agentIdentifier:t,ee:this.ee});e.harvest.on("events",this.onHarvestStarted.bind(this)),e.startTimer(l,0)}else this.blocked=!0,(0,r.o5)(this.agentIdentifier,this.featureName)})),(0,a.X)("newUIEvent",(t=>this.startUIInteraction(t.type,Math.floor(t.timeStamp),t.target)),this.featureName,this.ee),(0,a.X)("newURL",((t,e)=>this.interactionInProgress?.updateHistory(t,e)),this.featureName,this.ee),(0,a.X)("newDom",(t=>{this.interactionInProgress?.updateDom(t),this.interactionInProgress?.seenHistoryAndDomChange()&&this.interactionInProgress.done()}),this.featureName,this.ee),this.#y(),(0,a.X)("ajax",this.#T.bind(this),this.featureName,this.ee),(0,a.X)("jserror",this.#b.bind(this),this.featureName,this.ee)}onHarvestStarted(t){if(0===this.interactionsToHarvest.length||this.blocked)return;let e=0;const i=[];for(const t of this.interactionsToHarvest)i.push(t.serialize(e)),e||(e=Math.floor(t.start));const s="bel.7;".concat(i.join(";"));return t.retry&&(this.interactionsAwaitingRetry=this.interactionsToHarvest),this.interactionsToHarvest=[],{body:{e:s}}}onHarvestFinished(t){t.sent&&t.retry&&this.interactionsAwaitingRetry.length>0&&(this.interactionsToHarvest=[...this.interactionsAwaitingRetry,...this.interactionsToHarvest]),this.interactionsAwaitingRetry=[]}startUIInteraction(t,e,i){if(!this.interactionInProgress?.createdByApi&&!1!==this.interactionInProgress?.done()){if(this.interactionInProgress=new I(this.agentIdentifier,t,e,this.latestRouteSetByApi),"click"===t){const t=function(t){const e=t.tagName.toLowerCase();if(["a","button","input"].includes(e))return t.title||t.value||t.innerText}(i);t&&(this.interactionInProgress.customAttributes.actionText=t)}this.interactionInProgress.cancellationTimer=setTimeout((()=>{this.interactionInProgress.done(),(0,n.p)(d.xS,["SoftNav/Interaction/TimeOut"],void 0,u.D.metrics,this.ee)}),3e4),this.setClosureHandlers()}}setClosureHandlers(){this.interactionInProgress.on("finished",(()=>{const t=this.interactionInProgress;this.interactionsToHarvest.push(this.interactionInProgress),this.interactionInProgress=null,this.domObserver.disconnect(),(0,n.p)(d.xS,["SoftNav/Interaction/".concat(t.newURL!==t.oldURL?"RouteChange":"Custom","/Duration/Ms"),Math.round(t.end-t.start)],void 0,u.D.metrics,this.ee)})),this.interactionInProgress.on("cancelled",(()=>{this.interactionInProgress=null,this.domObserver.disconnect()}))}getInteractionFor(t){if(this.interactionInProgress?.isActiveDuring(t))return this.interactionInProgress;let e;for(let i=this.interactionsToHarvest.length-1;i>=0;i--){const s=this.interactionsToHarvest[i];if(s.isActiveDuring(t)){if("initialPageLoad"!==s.trigger)return s;e=s}}return e||(this.initialPageLoadInteraction?.isActiveDuring(t)?this.initialPageLoadInteraction:void 0)}#T(t){const e=this.getInteractionFor(t.startTime);function i(t,e,i){const s=new v(t,e);i.addChild(s)}e?e.status===f.vh.FIN?i(this.agentIdentifier,t,e):(e.on("finished",(()=>i(this.agentIdentifier,t,e))),e.on("cancelled",(()=>(0,n.p)("returnAjax",[t],void 0,u.D.ajax,this.ee)))):(0,n.p)("returnAjax",[t],void 0,u.D.ajax,this.ee)}#b(t,e){const i=this.getInteractionFor(e);i&&(t.browserInteractionId=i.id,i.status===f.vh.FIN?(t._softNavFinished=!0,t._softNavAttributes=i.customAttributes):(i.on("finished",(0,c.Z)((()=>(0,n.p)("softNavFlush",[i.id,!0,i.customAttributes],void 0,u.D.jserrors,this.ee)))),i.on("cancelled",(0,c.Z)((()=>(0,n.p)("softNavFlush",[i.id,!1,void 0],void 0,u.D.jserrors,this.ee))))))}#y(){const t="api-ixn-",e=this;(0,a.X)(t+"get",(function(t){let{waitForEnd:i}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.associatedInteraction=e.getInteractionFor(t),this.associatedInteraction||(this.associatedInteraction=e.interactionInProgress=new I(e.agentIdentifier,f.cS,t,e.latestRouteSetByApi),e.setClosureHandlers()),!0===i&&(this.associatedInteraction.keepOpenUntilEndApi=!0)}),e.featureName,e.ee),(0,a.X)(t+"end",(function(t){this.associatedInteraction.done(t)}),e.featureName,e.ee),(0,a.X)(t+"save",(function(){this.associatedInteraction.forceSave=!0}),e.featureName,e.ee),(0,a.X)(t+"ignore",(function(){this.associatedInteraction.forceIgnore=!0}),e.featureName,e.ee),(0,a.X)(t+"getContext",(function(t,e){"function"==typeof e&&setTimeout((()=>e(this.associatedInteraction.customDataByApi)),0)}),e.featureName,e.ee),(0,a.X)(t+"onEnd",(function(t,e){"function"==typeof e&&this.associatedInteraction.onDone.push(e)}),e.featureName,e.ee),(0,a.X)(t+"actionText",(function(t,e){e&&(this.associatedInteraction.customAttributes.actionText=e)}),e.featureName,e.ee),(0,a.X)(t+"setName",(function(t,e,i){e&&(this.associatedInteraction.customName=e),i&&(this.associatedInteraction.trigger=i)}),e.featureName,e.ee),(0,a.X)(t+"setAttribute",(function(t,e,i){this.associatedInteraction.customAttributes[e]=i}),e.featureName,e.ee),(0,a.X)(t+"routeName",(function(t,i){e.latestRouteSetByApi=i,e.interactionInProgress&&(e.interactionInProgress.newRoute=i)}),e.featureName,e.ee)}}},2782:(t,e,i)=>{i.r(e),i.d(e,{Aggregate:()=>Q});var s=i(4322),r=i(7243),n=i(1199),a=i(1284),o=i(5998),c=i(4402),h=i(234),u=i(8325),d=0;function l(t,e,i,s){Object.defineProperty(this,"interaction",{value:t,writable:!0}),this.parent=e,this.id=++d,this.type=i,this.children=[],this.end=null,this.jsEnd=this.start=s,this.jsTime=0,this.attrs={},this.cancelled=!1}var f=l.prototype;f.child=function(t,e,i,s){var r=this.interaction;if(r.end||r.nodes>=128)return null;r.onNodeAdded(this);var n=new l(r,this,t,e);return n.attrs.name=i,r.nodes++,s||r.remaining++,n},f.callback=function(t,e){var i=this;i.jsTime+=t,e>i.jsEnd&&(i.jsEnd=e,i.interaction.lastCb=e)},f.cancel=function(){this.cancelled=!0,this.interaction.remaining--},f.finish=function(t){var e=this;if(e.end)return;e.end=t;let i=e.parent;for(;i?.cancelled;)i=i.parent;i&&i.children.push(e),e.parent=null;var s=this.interaction;s.remaining--,s.lastFinish=t,s.checkFinish()};var p=h.Yu.ST,m=h.Yu.CT,g={};function v(t,e,i,s,r,n){this.agentIdentifier=n,this.ee=u.ee.get(n),g[n]=0,this.id=++g[n],this.eventName=t,this.nodes=0,this.remaining=0,this.finishTimer=null,this.checkingFinish=!1,this.lastCb=this.lastFinish=e,this.handlers=[],this.onFinished=r,this.done=!1;var a=(this.root=new l(this,null,"interaction",e)).attrs;a.trigger=t,a.initialPageURL=(0,h.OP)(n).origin,a.oldRoute=s,a.newURL=a.oldURL=i,a.custom={},a.store={}}var y=v.prototype;y.checkFinish=function(){var t=this;t.remaining>0?t._resetFinishCheck():t.checkingFinish||null===t.root.end&&(t._resetFinishCheck(),t.checkingFinish=!0,t.finishTimer=p((()=>{t.checkingFinish=!1,t.finishTimer=p((()=>{t.finishTimer=null,t.remaining<=0&&t.finish()}),1)}),0))},y.setNewURL=function(t){this.root.attrs.newURL=t},y.setNewRoute=function(t){this.root.attrs.newRoute=t},y.onNodeAdded=function(){this._resetFinishCheck()},y._resetFinishCheck=function(){this.finishTimer&&(m(this.finishTimer),this.finishTimer=null,this.checkingFinish=!1)},y.finish=function(){var t=this,e=t.root;if(null===e.end){var i=Math.max(t.lastCb,t.lastFinish),s=e.attrs.custom;this.onFinished&&this.onFinished(this),(0,a.D)((0,h.C5)(t.agentIdentifier).jsAttributes,(function(t,e){t in s||(s[t]=e)})),e.end=i,t.ee.emit("interaction",[this])}};var T=i(3239),b=i(2573),S=i(4222),w=i(214),I=i(1117);class N extends I.w{constructor(t){super(t),this.firstTimestamp=void 0}serializeMultiple(t,e,i){const s=(0,h.C5)(this.sharedContext.agentIdentifier);var r=(0,w.FX)(this.sharedContext.agentIdentifier),n="bel.7";return t.forEach((t=>{n+=";"+this.serializeInteraction(t.root,e,i,t.routeChange,r,s)})),this.firstTimestamp=void 0,n}serializeSingle(t,e,i,s){const r=(0,h.C5)(this.sharedContext.agentIdentifier);var n=(0,w.FX)(this.sharedContext.agentIdentifier),a="bel.7;"+this.serializeInteraction(t,e,i,s,n,r);return this.firstTimestamp=void 0,a}serializeInteraction(t,e,i,s,r,n){e=e||0;var o="initialPageLoad"===t.attrs.trigger,c={interaction:1,ajax:2,customTracer:4},h=!0;const u=(t,d)=>{if("customEnd"===t.type)return d.push([3,(0,w.uR)(t.end-this.firstTimestamp)]);var l=t.type,f=c[l],p=t.start,m=t.children.length,g=0,v=n.atts,y=o&&i.length&&1===f,T=[],b=t.attrs,I=b.metrics,N=b.params,R=n.queueTime,E=n.applicationTime;void 0===this.firstTimestamp?(p+=e,this.firstTimestamp=p):p-=this.firstTimestamp;var A=[(0,w.uR)(p),(0,w.uR)(t.end-t.start),(0,w.uR)(t.jsEnd-t.end),(0,w.uR)(t.jsTime)];switch(f){case 1:A[2]=(0,w.uR)(t.jsEnd-this.firstTimestamp),A.push(r(b.trigger),r((0,S.f)(b.initialPageURL,h)),r((0,S.f)(b.oldURL,h)),r((0,S.f)(b.newURL,h)),r(b.customName),o?"":s?1:2,(0,w.AG)(o&&R,w.uR,!0)+(0,w.AG)(o&&E,w.uR,!0)+(0,w.AG)(b.oldRoute,r,!0)+(0,w.AG)(b.newRoute,r,!0)+r(b.id),r(t.id),(0,w.AG)(b.firstPaint,w.uR,!0)+(0,w.AG)(b.firstContentfulPaint,w.uR,!1));var x=(0,w.n1)(b.custom,r);T=T.concat(x),g=x.length,v&&(m++,T.push("a,"+r(v)));break;case 2:if(A.push(r(N.method),(0,w.uR)(N.status),r(N.host),r(N.pathname),(0,w.uR)(I.txSize),(0,w.uR)(I.rxSize),b.isFetch?1:b.isJSONP?2:"",r(t.id),(0,w.AG)(t.dt&&t.dt.spanId,r,!0)+(0,w.AG)(t.dt&&t.dt.traceId,r,!0)+(0,w.AG)(t.dt&&t.dt.timestamp,w.uR,!1)),Object.keys(N?.gql||{}).length){var P=(0,w.n1)(N.gql,r);T=T.concat(P),g=P.length}break;case 4:var F=b.tracedTime;A.push(r(b.name),(0,w.AG)(F,w.uR,!0)+r(t.id))}for(var O=0;O<t.children.length;O++)u(t.children[O],T);if(A.unshift((0,w.uR)(f),(0,w.uR)(m+=g)),d.push(A),m&&d.push(T.join(";")),y){var M=",",C="b",_=0;(0,a.D)(i.slice(1,21),(function(t,e){void 0!==e?(C+=M+(0,w.uR)(e-_),M=",",_=e):(C+=M+"!",M="")})),d.push(C)}else 1===f&&d.push("");return d};return u(t,[]).join(";")}}var R=i(7836),E=i(3325),A=i(2222),x=i(6069),P=i(8373),F=i(3117),O=i(385),M=i(5546),C=i(3081),_=i(8e3),k=i(50);const{FEATURE_NAME:D,INTERACTION_EVENTS:j,MAX_TIMER_BUDGET:L,FN_START:U,FN_END:H,CB_START:B,INTERACTION_API:X,REMAINING:z,INTERACTION:K,SPA_NODE:q,JSONP_NODE:G,FETCH_START:V,FETCH_DONE:J,FETCH_BODY:W,JSONP_END:Z,originalSetTimeout:Y}=R;class Q extends A.m{static featureName=D;constructor(t,e){super(t,e,D);const i=(0,h.OP)(t);let d;this.state={initialPageURL:i.origin,lastSeenUrl:i.origin,lastSeenRouteName:null,timerMap:{},timerBudget:L,currentNode:null,prevNode:null,nodeOnLastHashUpdate:null,initialPageLoad:null,pageLoaded:!1,childTime:0,depth:0,harvestTimeSeconds:(0,h.Mt)(t,"spa.harvestTimeSeconds")||10,interactionsToHarvest:[],interactionsSent:[],disableSpaFix:((0,h.Mt)(t,"feature_flags")||[]).indexOf("disable-spa-fix")>-1},this.serializer=new N(this);const{state:l,serializer:f}=this,p=u.ee.get(t),m=p.get("mutation"),g=p.get("promise"),y=p.get("history"),S=p.get("events"),w=p.get("timer"),I=p.get("fetch"),R=p.get("jsonp"),A=p.get("xhr"),Q=p.get("tracer");if(this.waitForFlags(["spa"]).then((e=>{let[i]=e;i?(d=new b.o("events",{onFinished:ut,retryDelay:l.harvestTimeSeconds},{agentIdentifier:t,ee:p}),d.harvest.on("events",ht),this.drain()):(this.blocked=!0,(0,_.o5)(this.agentIdentifier,this.featureName))})),!1===(0,h.Mt)(t,"spa.enabled"))return;l.initialPageLoad=new v("initialPageLoad",0,l.lastSeenUrl,l.lastSeenRouteName,ot,t),l.initialPageLoad.save=!0,l.prevInteraction=l.initialPageLoad,l.currentNode=l.initialPageLoad.root,l.initialPageLoad[z]++,(0,s.X)(U,et,this.featureName,p),(0,s.X)(B,et,this.featureName,g);var tt={getCurrentNode:function(){return l.currentNode},setCurrentNode:at};function et(){l.depth++,this.prevNode=l.currentNode,this.ct=l.childTime,l.childTime=0,l.timerBudget=L}function it(){l.depth--;var t=this.jsTime||0,e=t-l.childTime;l.childTime=this.ct+t,l.currentNode&&(l.currentNode.callback(e,this[H]),this.isTraced&&(l.currentNode.attrs.tracedTime=e)),this.jsTime=l.currentNode?0:e,at(this.prevNode),this.prevNode=null,l.timerBudget=L}function st(t,e,i){var s=this[q];if(s){var r=s[K],n=this.inc;this.isTraced=!0,n?r[z]--:s&&s.finish(t),i?at(s):r.checkFinish()}}function rt(t){return l.currentNode&&l.currentNode[K]===t?l.currentNode:t.root}function nt(){this.resolved||(this.resolved=!0,this[q]=l.currentNode)}function at(t){l.pageLoaded||t||!l.initialPageLoad||(t=l.initialPageLoad.root),l.currentNode&&l.currentNode[K].checkFinish(),l.prevNode=l.currentNode,l.currentNode=t&&!t[K].root.end?t:null}function ot(t){t===l.initialPageLoad&&(l.initialPageLoad=null);var e=t.root,i=e.attrs;l.currentNode=e,(0,a.D)(t.handlers,(function(t,e){e(i.store)})),at(null)}(0,s.X)("spa-register",(function(t){"function"==typeof t&&t(tt)}),E.D.spa,p),(0,s.X)(H,it,this.featureName,p),(0,s.X)("cb-end",it,this.featureName,g),(0,s.X)(U,(function(e,i){var s=e[0],r=s.type,n=s["__nrNode:".concat(F.a)];if(!l.pageLoaded&&("load"===r&&i===window||O.LW)&&(l.pageLoaded=!0,this.prevNode=l.currentNode=null,l.initialPageLoad&&(n=l.initialPageLoad.root,l.initialPageLoad[z]=0,Y((function(){j.push("popstate")})))),n)at(n);else if("hashchange"===r)at(l.nodeOnLastHashUpdate),l.nodeOnLastHashUpdate=null;else if(i instanceof XMLHttpRequest)at(p.context(i).spaNode);else if(!l.currentNode&&-1!==j.indexOf(r)){var a=new v(r,this[U],l.lastSeenUrl,l.lastSeenRouteName,ot,t);if(l.prevInteraction=a,at(a.root),"click"===r){var o=function(t){var e=t.tagName.toLowerCase();if(-1!==["a","button","input"].indexOf(e))return t.title||t.value||t.innerText}(s.target);o&&(l.currentNode.attrs.custom.actionText=o)}}s["__nrNode:".concat(F.a)]=l.currentNode}),this.featureName,S),(0,s.X)("setTimeout-end",(function(t,e,i){!l.currentNode||l.timerBudget-this.timerDuration<0||(!t||t[0]instanceof Function)&&(l.currentNode[K][z]++,this.timerId=i,l.timerMap[i]=l.currentNode,this.timerBudget=l.timerBudget-50)}),this.featureName,w),(0,s.X)("clearTimeout-start",(function(t){var e=t[0],i=l.timerMap[e];if(i){var s=i[K];s[z]--,s.checkFinish(),delete l.timerMap[e]}}),this.featureName,w),(0,s.X)(U,(function(){l.timerBudget=this.timerBudget||L;var t=this.timerId,e=l.timerMap[t];at(e),delete l.timerMap[t],e&&e[K][z]--}),this.featureName,w),(0,s.X)(U,(function(){at(this[q])}),this.featureName,A),(0,s.X)("new-xhr",(function(){if(!l.disableSpaFix&&!l.currentNode&&l.prevInteraction&&!l.prevInteraction.ignored){const t=l.prevInteraction;l.currentNode=t.root,t.root.end=null}l.currentNode&&(this[q]=l.currentNode.child("ajax",null,null,!0))}),this.featureName,A),(0,s.X)("send-xhr-start",(function(){var t=this[q];t&&!this.sent&&(this.sent=!0,t.dt=this.dt,t.dt?.timestamp&&(t.dt.timestamp=i.timeKeeper.correctAbsoluteTimestamp(t.dt.timestamp)),t.jsEnd=t.start=this.startTime,t[K][z]++)}),this.featureName,A),(0,s.X)("xhr-resolved",(function(){var t=this[q];if(t){if(!(0,n.zR)(this.params))return void t.cancel();var e=t.attrs;e.params=this.params,e.metrics=this.metrics,t.finish(this.endTime),this.currentNode&&this.currentNode.interaction&&this.currentNode.interaction.checkFinish()}}),this.featureName,p),(0,s.X)("new-jsonp",(function(t){l.currentNode&&((this[G]=l.currentNode.child("ajax",this[V])).start=this["new-jsonp"],this.url=t,this.status=null)}),this.featureName,R),(0,s.X)("cb-start",(function(t){var e=this[G];e&&(at(e),this.status=200)}),this.featureName,R),(0,s.X)("jsonp-error",(function(){var t=this[G];t&&(at(t),this.status=0)}),this.featureName,R),(0,s.X)(Z,(function(){var t=this[G];if(t){if(null===this.status)return void t.cancel();var e=t.attrs,i=e.params={},s=(0,r.e)(this.url);i.method="GET",i.pathname=s.pathname,i.host=s.hostname+":"+s.port,i.status=this.status,e.metrics={txSize:0,rxSize:0},e.isJSONP=!0,t.jsEnd=this[Z],t.jsTime=this[B]?this[Z]-this[B]:0,t.finish(t.jsEnd)}}),this.featureName,R),(0,s.X)(V,(function(t,e){if(t){if(!l.disableSpaFix&&!l.currentNode&&l.prevInteraction&&!l.prevInteraction.ignored){const t=l.prevInteraction;l.currentNode=t.root,t.root.end=null}l.currentNode&&(this[q]=l.currentNode.child("ajax",this[V]),e&&this[q]&&(this[q].dt=e,this[q].dt?.timestamp&&(this[q].dt.timestamp=i.timeKeeper.correctAbsoluteTimestamp(this[q].dt.timestamp))))}}),this.featureName,I),(0,s.X)(W+"start",(function(t){l.currentNode&&(this[q]=l.currentNode,l.currentNode[K][z]++)}),this.featureName,I),(0,s.X)(W+"end",(function(t,e,i){var s=this[q];s&&s[K][z]--}),this.featureName,I),(0,s.X)(J,(function(t,e){var i=this[q];if(i){if(t||!(0,n.zR)(this.params))return void i.cancel();var s=i.attrs;s.params=this.params,s.metrics={txSize:this.txSize,rxSize:this.rxSize},s.isFetch=!0,i.finish(this[J])}}),this.featureName,I),(0,s.X)("newURL",(function(t,e){if(l.currentNode)l.currentNode[K].setNewURL(t);else if(l.prevInteraction&&!l.prevInteraction.ignored){const e=l.prevInteraction;e.setNewURL(t),e.root.end=null,at(e.root)}l.currentNode&&(l.lastSeenUrl!==t&&(l.currentNode[K].routeChange=!0),e&&(l.nodeOnLastHashUpdate=l.currentNode)),l.lastSeenUrl=t}),this.featureName,y),R.on("dom-start",(function(t){if(l.currentNode){var e=t[0],i=e&&"SCRIPT"===e.nodeName&&""!==e.src,s=l.currentNode.interaction;i&&(s[z]++,e.addEventListener("load",(function(){s[z]--,s.checkFinish()}),(0,T.m$)(!1)),e.addEventListener("error",(function(){s[z]--,s.checkFinish()}),(0,T.m$)(!1)))}})),(0,s.X)(U,(function(){at(l.prevNode)}),this.featureName,m),(0,s.X)("resolve-start",nt,this.featureName,g),(0,s.X)("executor-err",nt,this.featureName,g),(0,s.X)("propagate",(function(t,e){!e&&this[q]||(this[q]=l.currentNode)}),this.featureName,g),(0,s.X)(B,(function(){at((this.getCtx?this.getCtx():this)[q])}),this.featureName,g),(0,s.X)(X+"get",(function(e){var i;i=this.ixn=l?.currentNode?.[K]?l.currentNode[K]:null===l?.prevNode?.end&&"initialPageLoad"!==l?.prevNode?.[K]?.root?.[K]?.eventName?l.prevNode[K]:new v("api",e,l.lastSeenUrl,l.lastSeenRouteName,ot,t),l.currentNode||(i.checkFinish(),l.depth&&at(i.root))}),this.featureName,p),(0,s.X)(X+"actionText",(function(t,e){var i=this.ixn.root.attrs.custom;e&&(i.actionText=e)}),this.featureName,p),(0,s.X)(X+"setName",(function(t,e,i){var s=this.ixn.root.attrs;e&&(s.customName=e),i&&(s.trigger=i)}),this.featureName,p),(0,s.X)(X+"setAttribute",(function(t,e,i){this.ixn.root.attrs.custom[e]=i}),this.featureName,p),(0,s.X)(X+"end",(function(t){var e=this.ixn,i=rt(e);at(null),i.child("customEnd",t).finish(t),e.finish()}),this.featureName,p),(0,s.X)(X+"ignore",(function(t){this.ixn.ignored=!0}),this.featureName,p),(0,s.X)(X+"save",(function(t){this.ixn.save=!0}),this.featureName,p),(0,s.X)(X+"tracer",(function(t,e,i){var s=this.ixn,r=rt(s),n=p.context(i);if(!e)return n.inc=++s[z],n[q]=r;n[q]=r.child("customTracer",t,e)}),this.featureName,p),(0,s.X)(U,st,this.featureName,Q),(0,s.X)("no-"+U,st,this.featureName,Q),(0,s.X)(X+"getContext",(function(t,e){var i=this.ixn.root.attrs.store;setTimeout((function(){e(i)}),0)}),this.featureName,p),(0,s.X)(X+"onEnd",(function(t,e){this.ixn.handlers.push(e)}),this.featureName,p),(0,s.X)("api-routeName",(function(t,e){l.lastSeenRouteName=e,l.currentNode&&l.currentNode[K].setNewRoute(e)}),this.featureName,p);const ct=this;function ht(t){if(0===l.interactionsToHarvest.length||ct.blocked)return{};var e=f.serializeMultiple(l.interactionsToHarvest,0,o.zJ);return t.retry&&l.interactionsToHarvest.forEach((function(t){l.interactionsSent.push(t)})),l.interactionsToHarvest=[],{body:{e}}}function ut(t){t.sent&&t.retry&&l.interactionsSent.length>0&&(l.interactionsSent.forEach((function(t){l.interactionsToHarvest.unshift(t)})),l.interactionsSent=[])}p.on("spa-jserror",(function(t,e,i,s){l.currentNode&&(i._interactionId=l.currentNode.interaction.id,l.currentNode.type&&"interaction"!==l.currentNode.type&&(i._interactionNodeId=l.currentNode.id))})),(0,s.X)("function-err",(function(e,i,s){l.currentNode&&(s.__newrelic??={},s.__newrelic[t]={interactionId:l.currentNode.interaction.id},l.currentNode.type&&"interaction"!==l.currentNode.type&&(s.__newrelic[t].interactionNodeId=l.currentNode.id))}),this.featureName,p),p.on("interaction",(function(t){if(t.ignored||!t.save&&!t.routeChange)return void p.emit("interactionDone",[t,!1]);l.prevInteraction===t&&(l.prevInteraction=null);t.root.attrs.id=(0,c.Rl)(),"initialPageLoad"===t.root.attrs.trigger&&(t.root.attrs.firstPaint=P.U.current.value,t.root.attrs.firstContentfulPaint=x.y.current.value);let e;p.emit("interactionDone",[t,!0]),l.interactionsToHarvest.push(t),e="initialPageLoad"===t.root?.attrs?.trigger?"InitialPageLoad":t.routeChange?"RouteChange":"Custom";(0,M.p)(C.xS,["Spa/Interaction/".concat(e,"/Duration/Ms"),Math.max((t.root?.end||0)-(t.root?.start||0),0)],void 0,E.D.metrics,p),d?.scheduleHarvest(0),d||(0,k.Z)("SPA scheduler is not initialized. Saved interaction is not sent!")}))}}},9446:(t,e,i)=>{i.d(e,{setupAgentSession:()=>E});var s=i(234),r=i(8e3),n=i(8325),a=i(4322),o=i(4402),c=i(50),h=i(4351);class u{constructor(t,e){if(!t.onEnd)throw new Error("onEnd handler is required");if(!e)throw new Error("ms duration is required");this.onEnd=t.onEnd,this.initialMs=e,this.startTimestamp=Date.now(),this.timer=this.create(this.onEnd,e)}create(t,e){return this.timer&&this.clear(),setTimeout((()=>t?t():this.onEnd()),e||this.initialMs)}clear(){clearTimeout(this.timer),this.timer=null}end(){this.clear(),this.onEnd()}isValid(){return this.initialMs-(Date.now()-this.startTimestamp)>0}}var d=i(385),l=i(7056),f=i(7956),p=i(7872);class m extends u{constructor(t,e){super(t,e),this.onPause="function"==typeof t.onPause?t.onPause:()=>{},this.onRefresh="function"==typeof t.onRefresh?t.onRefresh:()=>{},this.onResume="function"==typeof t.onResume?t.onResume:()=>{},this.readStorage=t.readStorage,this.remainingMs=void 0,t.refreshEvents||(t.refreshEvents=["click","keydown","scroll"]);try{this.abortController=new AbortController}catch(t){}if(d.il&&t.ee){if(t.ee){this.ee=t.ee;const e=(0,p.D)(this.refresh.bind(this),500,{leading:!0});this.refreshHandler=i=>{t.refreshEvents.includes(i?.[0]?.type)&&e()},t.ee.on("fn-end",this.refreshHandler)}(0,f.N)((t=>{"hidden"===t?this.pause():this.resume()}),!1,!1,this.abortController?.signal)}}abort(){this.clear(),this.abortController?.abort(),this.refreshHandler&&(this.ee.removeEventListener("fn-end",this.refreshHandler),this.refreshHandler=this.ee=null)}pause(){this.onPause(),clearTimeout(this.timer),this.remainingMs=this.initialMs-(Date.now()-this.startTimestamp)}resume(){try{const e=this.readStorage(),i="string"==typeof e?JSON.parse(e):e;t(i.expiresAt)||t(i.inactiveAt)?this.end():(this.refresh(),this.onResume())}catch(t){this.end()}function t(t){return Date.now()>t}}refresh(t,e){this.clear(),this.timer=this.create(t,e),this.startTimestamp=Date.now(),this.remainingMs=void 0,this.onRefresh()}}var g=i(7806),v=i(9567),y=i(5546),T=i(3081),b=i(3325),S=i(3239);const w={value:"",inactiveAt:0,expiresAt:0,updatedAt:Date.now(),sessionReplayMode:l.IK.OFF,sessionReplaySentFirstChunk:!1,sessionTraceMode:l.IK.OFF,traceHarvestStarted:!1,serverTimeDiff:null,custom:{}};class I{constructor(t){const{agentIdentifier:e,key:i,storage:s}=t;if(!e||!i||!s)throw new Error("Missing required field(s):".concat(e?"":" agentID").concat(i?"":" key").concat(s?"":" storage"));this.agentIdentifier=e,this.storage=s,this.state={},this.key=i,this.ee=n.ee.get(e),(0,g.em)(this.ee),this.setup(t),d.il&&(0,S.bP)("storage",(t=>{if(t.key===this.lookupKey){const e="string"==typeof t.newValue?JSON.parse(t.newValue):t.newValue;this.sync(e),this.ee.emit(l.wO.UPDATE,[l.uT.CROSS_TAB,this.state])}}))}setup(t){let{value:e=(0,o.ky)(16),expiresMs:i=l.oD,inactiveMs:s=l.Hb}=t;const r={serverTimeDiff:this.state.serverTimeDiff||w.serverTimeDiff};this.state={},this.sync({...w,...r}),this.state.value=e,this.expiresMs=i,this.inactiveMs=s;const n=this.read();i?(this.state.expiresAt=n?.expiresAt||this.getFutureTimestamp(i),this.expiresTimer=new u({onEnd:()=>{this.collectSM("expired"),this.collectSM("duration"),this.reset()}},this.state.expiresAt-Date.now())):this.state.expiresAt=1/0,s?(this.state.inactiveAt=n?.inactiveAt||this.getFutureTimestamp(s),this.inactiveTimer=new m({onEnd:()=>{this.collectSM("inactive"),this.collectSM("duration"),this.reset()},onRefresh:this.refresh.bind(this),onResume:()=>{this.ee.emit(l.wO.RESUME)},onPause:()=>{this.initialized&&this.ee.emit(l.wO.PAUSE),this.write((0,v.D)(this.state,w))},ee:this.ee,refreshEvents:["click","keydown","scroll"],readStorage:()=>this.storage.get(this.lookupKey)},this.state.inactiveAt-Date.now())):this.state.inactiveAt=1/0,this.isNew||=!Object.keys(n).length,this.isNew?this.write((0,v.D)(this.state,w),!0):this.sync(n),this.initialized=!0,this.ee.emit(l.wO.STARTED,[this.isNew])}get lookupKey(){return"".concat(l.Bq,"_").concat(this.key)}sync(t){Object.assign(this.state,t)}read(){try{const t=this.storage.get(this.lookupKey);if(!t)return{};const e="string"==typeof t?JSON.parse(t):t;return this.isInvalid(e)?{}:this.isExpired(e.expiresAt)?(this.collectSM("expired"),this.collectSM("duration",e,!0),this.reset()):this.isExpired(e.inactiveAt)?(this.collectSM("inactive"),this.collectSM("duration",e,!0),this.reset()):e}catch(t){return(0,c.Z)("Failed to read from storage API",t),{}}}write(t){try{if(!t||"object"!=typeof t)return;return t.updatedAt=Date.now(),this.sync(t),this.storage.set(this.lookupKey,(0,h.P)(this.state)),this.ee.emit(l.wO.UPDATE,[l.uT.SAME_TAB,this.state]),t}catch(t){return(0,c.Z)("Failed to write to the storage API",t),null}}reset(){try{return this.initialized&&this.ee.emit(l.wO.RESET),this.storage.remove(this.lookupKey),this.inactiveTimer?.abort?.(),this.expiresTimer?.clear?.(),delete this.isNew,this.setup({agentIdentifier:this.agentIdentifier,key:this.key,storage:this.storage,expiresMs:this.expiresMs,inactiveMs:this.inactiveMs}),this.read()}catch(t){return{}}}refresh(){const t=this.read();this.write({...t,inactiveAt:this.getFutureTimestamp(this.inactiveMs)})}isExpired(t){return Date.now()>t}isInvalid(t){return!Object.keys(w).every((e=>Object.keys(t).includes(e)))}collectSM(t,e,i){let s,r;"duration"===t&&(s=this.getDuration(e,i),r="Session/Duration/Ms"),"expired"===t&&(r="Session/Expired/Seen"),"inactive"===t&&(r="Session/Inactive/Seen"),r&&(0,y.p)(T.xS,[r,s],void 0,b.D.metrics,this.ee)}getDuration(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.state,e=arguments.length>1?arguments[1]:void 0;const i=t.expiresAt-this.expiresMs;return(e?Date.now():t.updatedAt)-i}getFutureTimestamp(t){return Date.now()+t}syncCustomAttribute(t,e){if(d.il)if(null===e){const e=this.read();e.custom&&(delete e.custom[t],this.write({...e}))}else{const i=this.read();this.custom={...i?.custom||{},[t]:e},this.write({...i,custom:this.custom})}}}class N{get(t){try{return localStorage.getItem(t)||void 0}catch(t){return""}}set(t,e){try{return null==e?this.remove(t):localStorage.setItem(t,e)}catch(t){}}remove(t){try{localStorage.removeItem(t)}catch(t){}}}let R=0;function E(t){const e=(0,s.OP)(t);if(R++)return e.session;const i=(0,s.P_)(t).session;e.session=new I({agentIdentifier:t,key:l.K4,storage:new N,expiresMs:i?.expiresMs,inactiveMs:i?.inactiveMs});const o=e.session.state.custom,c=(0,s.C5)(t);o&&(c.jsAttributes={...c.jsAttributes,...o});const h=n.ee.get(t);return(0,a.X)("api-setCustomAttribute",((t,i,s)=>{e.session.syncCustomAttribute(i,s)}),"session",h),(0,a.X)("api-setUserId",((t,i,s)=>{e.session.syncCustomAttribute(i,s)}),"session",h),(0,r.LP)(t,"session"),e.session}},2222:(t,e,i)=>{i.d(e,{m:()=>h});var s=i(5938),r=i(234),n=i(2758),a=i(8632),o=i(8e3),c=i(2825);class h extends s.W{constructor(){super(...arguments),this.checkConfiguration()}waitForFlags(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return new Promise(((e,i)=>{function s(e){return t.map((t=>e[t]?e[t]:0))}c.T[this.agentIdentifier]?e(s(c.T[this.agentIdentifier])):this.ee.on("rumresp",(function(){e(s(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}))}))}))}drain(){(0,o.LP)(this.agentIdentifier,this.featureName),this.drained=!0}checkConfiguration(){if(!(0,r.lF)(this.agentIdentifier)){let t={...(0,a.gG)().info?.jsAttributes};try{t={...t,...(0,r.C5)(this.agentIdentifier)?.jsAttributes}}catch(t){}(0,n.j)({agentIdentifier:this.agentIdentifier},{...(0,a.gG)(),info:{...(0,a.gG)().info,jsAttributes:t},runtime:(0,r.OP)(this.agentIdentifier)})}}}},8582:(t,e,i)=>{i.d(e,{lazyFeatureLoader:()=>r});var s=i(3325);function r(t,e){if("aggregate"===e)switch(t){case s.D.ajax:return i.e(111).then(i.bind(i,5185));case s.D.jserrors:return i.e(111).then(i.bind(i,1028));case s.D.metrics:return i.e(111).then(i.bind(i,8939));case s.D.pageAction:return i.e(111).then(i.bind(i,1832));case s.D.pageViewEvent:return i.e(111).then(i.bind(i,3456));case s.D.pageViewTiming:return i.e(111).then(i.bind(i,9766));case s.D.sessionReplay:return i.e(111).then(i.bind(i,9426));case s.D.sessionTrace:return i.e(111).then(i.bind(i,5951));case s.D.spa:return i.e(111).then(i.bind(i,2782));case s.D.softNav:return i.e(111).then(i.bind(i,1898));default:throw new Error("Attempted to load unsupported agent feature: ".concat(t," ").concat(e))}}},7438:(t,e,i)=>{i.r(e),i.d(e,{setAPI:()=>d});var s=i(3325),r=i(234),n=i(8325),a=i(5546),o=i(4322),c=i(7872),h=i(3081),u=i(385);function d(t){var e=n.ee.get(t),i={finished:(0,c.Z)((function(t,i){var r=i?i-u.sK:t;(0,a.p)(h.vz,["finished",{time:r}],void 0,s.D.metrics,e),d(t,{name:"finished",start:r+u.sK,origin:"nr"}),(0,a.p)("api-addPageAction",[r,"finished"],void 0,s.D.pageAction,e)})),setErrorHandler:function(e,i){(0,r.OP)(t).onerror=i},addToTrace:d,addRelease:function(e,i,s){if(++l>10)return;(0,r.OP)(t).releaseIds[i.slice(-200)]=(""+s).slice(-200)}};function d(t,i){if(i&&"object"==typeof i&&i.name&&i.start){var r={n:i.name,s:i.start-u.sK,e:(i.end||i.start)-u.sK,o:i.origin||"",t:"api"};(0,a.p)("bstApi",[r],void 0,s.D.sessionTrace,e)}}Object.entries(i).forEach((t=>{let[i,s]=t;return(0,o.X)("api-"+i,s,"api",e)}));var l=0}},5528:(t,e,i)=>{i.d(e,{Fu:()=>X,NO:()=>rt,Yn:()=>$,a4:()=>C,mr:()=>ct,mw:()=>M});var s,r,n,a,o,c=function(){return window.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]},h=function(t){if("loading"===document.readyState)return"loading";var e=c();if(e){if(t<e.domInteractive)return"loading";if(0===e.domContentLoadedEventStart||t<e.domContentLoadedEventStart)return"dom-interactive";if(0===e.domComplete||t<e.domComplete)return"dom-content-loaded"}return"complete"},u=function(t){var e=t.nodeName;return 1===t.nodeType?e.toLowerCase():e.toUpperCase().replace(/^#/,"")},d=function(t,e){var i="";try{for(;t&&9!==t.nodeType;){var s=t,r=s.id?"#"+s.id:u(s)+(s.classList&&s.classList.value&&s.classList.value.trim()&&s.classList.value.trim().length?"."+s.classList.value.trim().replace(/\s+/g,"."):"");if(i.length+r.length>(e||100)-1)return i||r;if(i=i?r+">"+i:r,s.id)break;t=s.parentNode}}catch(t){}return i},l=-1,f=function(){return l},p=function(t){addEventListener("pageshow",(function(e){e.persisted&&(l=e.timeStamp,t(e))}),!0)},m=function(){var t=c();return t&&t.activationStart||0},g=function(t,e){var i=c(),s="navigate";return f()>=0?s="back-forward-cache":i&&(document.prerendering||m()>0?s="prerender":document.wasDiscarded?s="restore":i.type&&(s=i.type.replace(/_/g,"-"))),{name:t,value:void 0===e?-1:e,rating:"good",delta:0,entries:[],id:"v3-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:s}},v=function(t,e,i){try{if(PerformanceObserver.supportedEntryTypes.includes(t)){var s=new PerformanceObserver((function(t){Promise.resolve().then((function(){e(t.getEntries())}))}));return s.observe(Object.assign({type:t,buffered:!0},i||{})),s}}catch(t){}},y=function(t,e,i,s){var r,n;return function(a){e.value>=0&&(a||s)&&((n=e.value-(r||0))||void 0===r)&&(r=e.value,e.delta=n,e.rating=function(t,e){return t>e[1]?"poor":t>e[0]?"needs-improvement":"good"}(e.value,i),t(e))}},T=function(t){requestAnimationFrame((function(){return requestAnimationFrame((function(){return t()}))}))},b=function(t){var e=function(e){"pagehide"!==e.type&&"hidden"!==document.visibilityState||t(e)};addEventListener("visibilitychange",e,!0),addEventListener("pagehide",e,!0)},S=function(t){var e=!1;return function(i){e||(t(i),e=!0)}},w=-1,I=function(){return"hidden"!==document.visibilityState||document.prerendering?1/0:0},N=function(t){"hidden"===document.visibilityState&&w>-1&&(w="visibilitychange"===t.type?t.timeStamp:0,E())},R=function(){addEventListener("visibilitychange",N,!0),addEventListener("prerenderingchange",N,!0)},E=function(){removeEventListener("visibilitychange",N,!0),removeEventListener("prerenderingchange",N,!0)},A=function(){return w<0&&(w=I(),R(),p((function(){setTimeout((function(){w=I(),R()}),0)}))),{get firstHiddenTime(){return w}}},x=function(t){document.prerendering?addEventListener("prerenderingchange",(function(){return t()}),!0):t()},P=[1800,3e3],F=function(t,e){e=e||{},x((function(){var i,s=A(),r=g("FCP"),n=v("paint",(function(t){t.forEach((function(t){"first-contentful-paint"===t.name&&(n.disconnect(),t.startTime<s.firstHiddenTime&&(r.value=Math.max(t.startTime-m(),0),r.entries.push(t),i(!0)))}))}));n&&(i=y(t,r,P,e.reportAllChanges),p((function(s){r=g("FCP"),i=y(t,r,P,e.reportAllChanges),T((function(){r.value=performance.now()-s.timeStamp,i(!0)}))})))}))},O=[.1,.25],M=function(t,e){!function(t,e){e=e||{},F(S((function(){var i,s=g("CLS",0),r=0,n=[],a=function(t){t.forEach((function(t){if(!t.hadRecentInput){var e=n[0],i=n[n.length-1];r&&t.startTime-i.startTime<1e3&&t.startTime-e.startTime<5e3?(r+=t.value,n.push(t)):(r=t.value,n=[t])}})),r>s.value&&(s.value=r,s.entries=n,i())},o=v("layout-shift",a);o&&(i=y(t,s,O,e.reportAllChanges),b((function(){a(o.takeRecords()),i(!0)})),p((function(){r=0,s=g("CLS",0),i=y(t,s,O,e.reportAllChanges),T((function(){return i()}))})),setTimeout(i,0))})))}((function(e){!function(t){if(t.entries.length){var e=t.entries.reduce((function(t,e){return t&&t.value>e.value?t:e}));if(e&&e.sources&&e.sources.length){var i=(s=e.sources).find((function(t){return t.node&&1===t.node.nodeType}))||s[0];if(i)return void(t.attribution={largestShiftTarget:d(i.node),largestShiftTime:e.startTime,largestShiftValue:e.value,largestShiftSource:i,largestShiftEntry:e,loadState:h(e.startTime)})}}var s;t.attribution={}}(e),t(e)}),e)},C=function(t,e){F((function(e){!function(t){if(t.entries.length){var e=c(),i=t.entries[t.entries.length-1];if(e){var s=e.activationStart||0,r=Math.max(0,e.responseStart-s);return void(t.attribution={timeToFirstByte:r,firstByteToFCP:t.value-r,loadState:h(t.entries[0].startTime),navigationEntry:e,fcpEntry:i})}}t.attribution={timeToFirstByte:0,firstByteToFCP:t.value,loadState:h(f())}}(e),t(e)}),e)},_={passive:!0,capture:!0},k=new Date,D=function(t,e){s||(s=e,r=t,n=new Date,U(removeEventListener),j())},j=function(){if(r>=0&&r<n-k){var t={entryType:"first-input",name:s.type,target:s.target,cancelable:s.cancelable,startTime:s.timeStamp,processingStart:s.timeStamp+r};a.forEach((function(e){e(t)})),a=[]}},L=function(t){if(t.cancelable){var e=(t.timeStamp>1e12?new Date:performance.now())-t.timeStamp;"pointerdown"==t.type?function(t,e){var i=function(){D(t,e),r()},s=function(){r()},r=function(){removeEventListener("pointerup",i,_),removeEventListener("pointercancel",s,_)};addEventListener("pointerup",i,_),addEventListener("pointercancel",s,_)}(e,t):D(e,t)}},U=function(t){["mousedown","keydown","touchstart","pointerdown"].forEach((function(e){return t(e,L,_)}))},H=[100,300],B=function(t,e){e=e||{},x((function(){var i,n=A(),o=g("FID"),c=function(t){t.startTime<n.firstHiddenTime&&(o.value=t.processingStart-t.startTime,o.entries.push(t),i(!0))},h=function(t){t.forEach(c)},u=v("first-input",h);i=y(t,o,H,e.reportAllChanges),u&&b(S((function(){h(u.takeRecords()),u.disconnect()}))),u&&p((function(){var n;o=g("FID"),i=y(t,o,H,e.reportAllChanges),a=[],r=-1,s=null,U(addEventListener),n=c,a.push(n),j()}))}))},X=function(t,e){B((function(e){!function(t){var e=t.entries[0];t.attribution={eventTarget:d(e.target),eventType:e.name,eventTime:e.startTime,eventEntry:e,loadState:h(e.startTime)}}(e),t(e)}),e)},z=0,K=1/0,q=0,G=function(t){t.forEach((function(t){t.interactionId&&(K=Math.min(K,t.interactionId),q=Math.max(q,t.interactionId),z=q?(q-K)/7+1:0)}))},V=function(){return o?z:performance.interactionCount||0},J=function(){"interactionCount"in performance||o||(o=v("event",G,{type:"event",buffered:!0,durationThreshold:0}))},W=[200,500],Z=0,Y=function(){return V()-Z},Q=[],tt={},et=function(t){var e=Q[Q.length-1],i=tt[t.interactionId];if(i||Q.length<10||t.duration>e.latency){if(i)i.entries.push(t),i.latency=Math.max(i.latency,t.duration);else{var s={id:t.interactionId,latency:t.duration,entries:[t]};tt[s.id]=s,Q.push(s)}Q.sort((function(t,e){return e.latency-t.latency})),Q.splice(10).forEach((function(t){delete tt[t.id]}))}},$=function(t,e){!function(t,e){e=e||{},x((function(){var i;J();var s,r=g("INP"),n=function(t){t.forEach((function(t){t.interactionId&&et(t),"first-input"===t.entryType&&!Q.some((function(e){return e.entries.some((function(e){return t.duration===e.duration&&t.startTime===e.startTime}))}))&&et(t)}));var e,i=(e=Math.min(Q.length-1,Math.floor(Y()/50)),Q[e]);i&&i.latency!==r.value&&(r.value=i.latency,r.entries=i.entries,s())},a=v("event",n,{durationThreshold:null!==(i=e.durationThreshold)&&void 0!==i?i:40});s=y(t,r,W,e.reportAllChanges),a&&("PerformanceEventTiming"in window&&"interactionId"in PerformanceEventTiming.prototype&&a.observe({type:"first-input",buffered:!0}),b((function(){n(a.takeRecords()),r.value<0&&Y()>0&&(r.value=0,r.entries=[]),s(!0)})),p((function(){Q=[],Z=V(),r=g("INP"),s=y(t,r,W,e.reportAllChanges)})))}))}((function(e){!function(t){if(t.entries.length){var e=t.entries.sort((function(t,e){return e.duration-t.duration||e.processingEnd-e.processingStart-(t.processingEnd-t.processingStart)}))[0];t.attribution={eventTarget:d(e.target),eventType:e.name,eventTime:e.startTime,eventEntry:e,loadState:h(e.startTime)}}else t.attribution={}}(e),t(e)}),e)},it=[2500,4e3],st={},rt=function(t,e){!function(t,e){e=e||{},x((function(){var i,s=A(),r=g("LCP"),n=function(t){var e=t[t.length-1];e&&e.startTime<s.firstHiddenTime&&(r.value=Math.max(e.startTime-m(),0),r.entries=[e],i())},a=v("largest-contentful-paint",n);if(a){i=y(t,r,it,e.reportAllChanges);var o=S((function(){st[r.id]||(n(a.takeRecords()),a.disconnect(),st[r.id]=!0,i(!0))}));["keydown","click"].forEach((function(t){addEventListener(t,(function(){return setTimeout(o,0)}),!0)})),b(o),p((function(s){r=g("LCP"),i=y(t,r,it,e.reportAllChanges),T((function(){r.value=performance.now()-s.timeStamp,st[r.id]=!0,i(!0)}))}))}}))}((function(e){!function(t){if(t.entries.length){var e=c();if(e){var i=e.activationStart||0,s=t.entries[t.entries.length-1],r=s.url&&performance.getEntriesByType("resource").filter((function(t){return t.name===s.url}))[0],n=Math.max(0,e.responseStart-i),a=Math.max(n,r?(r.requestStart||r.startTime)-i:0),o=Math.max(a,r?r.responseEnd-i:0),h=Math.max(o,s?s.startTime-i:0),u={element:d(s.element),timeToFirstByte:n,resourceLoadDelay:a-n,resourceLoadTime:o-a,elementRenderDelay:h-o,navigationEntry:e,lcpEntry:s};return s.url&&(u.url=s.url),r&&(u.lcpResourceEntry=r),void(t.attribution=u)}}t.attribution={timeToFirstByte:0,resourceLoadDelay:0,resourceLoadTime:0,elementRenderDelay:t.value}}(e),t(e)}),e)},nt=[800,1800],at=function t(e){document.prerendering?x((function(){return t(e)})):"complete"!==document.readyState?addEventListener("load",(function(){return t(e)}),!0):setTimeout(e,0)},ot=function(t,e){e=e||{};var i=g("TTFB"),s=y(t,i,nt,e.reportAllChanges);at((function(){var r=c();if(r){var n=r.responseStart;if(n<=0||n>performance.now())return;i.value=Math.max(n-m(),0),i.entries=[r],s(!0),p((function(){i=g("TTFB",0),(s=y(t,i,nt,e.reportAllChanges))(!0)}))}}))},ct=function(t,e){ot((function(e){!function(t){if(t.entries.length){var e=t.entries[0],i=e.activationStart||0,s=Math.max(e.domainLookupStart-i,0),r=Math.max(e.connectStart-i,0),n=Math.max(e.requestStart-i,0);t.attribution={waitingTime:s,dnsTime:r-s,connectionTime:n-r,requestTime:t.value-n,navigationEntry:e}}else t.attribution={waitingTime:0,dnsTime:0,connectionTime:0,requestTime:0}}(e),t(e)}),e)}}}]);