1var x=Object.defineProperty;var K=(i,e,t)=>e in i?x(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t;var w=(i,e,t)=>(K(i,typeof e!="symbol"?e+"":e,t),t),R=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)};var a=(i,e,t)=>(R(i,e,"read from private field"),t?t.call(i):e.get(i)),d=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},n=(i,e,t,r)=>(R(i,e,"write to private field"),r?r.call(i,t):e.set(i,t),t);import{d as q,F as h,a0 as P,b$ as u,a as B,w as v,i as k,b as y,l as A,n as E}from"./index.3ec72d2e.js";import{a as F,b as N}from"./nav-timing.c84d458e.js";import{i as O}from"./info.d5329f52.js";import{A as C,H as L}from"./aggregate-base.0695104a.js";import{d as I}from"./configure.2bbcfbcf.js";import{f as W,a as U}from"./first-paint.cfaa9ce2.js";import{t as H}from"./time-to-first-byte.65f4761c.js";import{a as _}from"./traverse.774c271e.js";import"./shared-context.ae8b129f.js";function z(i){const e=[],t=q();try{Object.keys(t.initializedAgents[i].features).forEach(r=>{switch(r){case h.ajax:e.push("xhr");break;case h.jserrors:e.push("err");break;case h.genericEvents:e.push("ins");break;case h.sessionTrace:e.push("stn");break;case h.softNav:case h.spa:e.push("spa");break}})}catch{}return e}var p,m,o,f;class G{constructor(e){d(this,p,void 0);d(this,m,void 0);d(this,o,void 0);d(this,f,!1);n(this,p,P(e)?.session),this.processStoredDiff()}get ready(){return a(this,f)}get correctedOriginTime(){return a(this,m)}get localTimeDiff(){return a(this,o)}processRumRequest(e,t,r,s){if(this.processStoredDiff(),a(this,f))return;if(!s)throw new Error("nrServerTime not found");const T=(r-t)/2,l=t+T;if(n(this,m,Math.floor(s-l)),n(this,o,u-a(this,m)),isNaN(a(this,m)))throw new Error("Failed to correct browser time to server time");a(this,p)?.write({serverTimeDiff:a(this,o)}),n(this,f,!0)}convertRelativeTimestamp(e){return u+e}convertAbsoluteTimestamp(e){return e-u}correctAbsoluteTimestamp(e){return e-a(this,o)}correctRelativeTimestamp(e){return this.correctAbsoluteTimestamp(this.convertRelativeTimestamp(e))}processStoredDiff(){if(a(this,f))return;const e=a(this,p)?.read()?.serverTimeDiff;typeof e=="number"&&!isNaN(e)&&(n(this,o,e),n(this,m,u-a(this,o)),n(this,f,!0))}}p=new WeakMap,m=new WeakMap,o=new WeakMap,f=new WeakMap;class J extends C{constructor(e){if(super(e,B),this.timeToFirstByte=0,this.firstByteToWindowLoad=0,this.firstByteToDomContent=0,this.timeKeeper=new G(e.agentIdentifier),!O(e.agentIdentifier))return this.ee.abort(),v(43);k?H.subscribe(({value:t,attrs:r})=>{const s=r.navigationEntry;this.timeToFirstByte=Math.max(t,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 e=this.agentRef.info,t=new L(this),r={};e.queueTime&&(r.qt=e.queueTime),e.applicationTime&&(r.ap=e.applicationTime),r.be=this.timeToFirstByte,r.fe=this.firstByteToWindowLoad,r.dc=this.firstByteToDomContent;const s={tt:e.ttGuid,us:e.user,ac:e.account,pr:e.product,af:z(this.agentIdentifier).join(","),...r,xx:e.extra,ua:e.userAttributes,at:e.atts};this.agentRef.runtime.session&&(s.fsh=Number(this.agentRef.runtime.session.isNew));let T;if(typeof e.jsAttributes=="object"&&Object.keys(e.jsAttributes).length>0&&(T=_({ja:e.jsAttributes},this.obfuscator.obfuscateString.bind(this.obfuscator),"string")),y.performance){if(typeof PerformanceNavigationTiming<"u"){const c=y?.performance?.getEntriesByType("navigation")?.[0],b={timing:F(u,c,{}),navigation:N(c,{})};s.perf=A(b)}else if(typeof PerformanceTiming<"u"){const c={timing:F(u,y.performance.timing,{},!0),navigation:N(y.performance.navigation,{})};s.perf=A(c)}}s.fp=W.current.value,s.fcp=U.current.value,this.timeKeeper?.ready&&(s.timestamp=Math.floor(this.timeKeeper.correctRelativeTimestamp(E())));const l=E();t.send({endpoint:"rum",payload:{qs:s,body:T},opts:{needResponse:!0,sendEmptyBody:!0},cbFinished:({status:c,responseText:b,xhr:D})=>{const M=E();if(c>=400||c===0){this.ee.abort();return}try{const{app:g,...S}=JSON.parse(b);try{if(this.timeKeeper.processRumRequest(D,l,M,g.nrServerTime),!this.timeKeeper.ready)throw new Error("TimeKeeper not ready");this.agentRef.runtime.timeKeeper=this.timeKeeper}catch(j){this.ee.abort(),v(17,j);return}this.agentRef.runtime.appMetadata=g,I(S,this.agentIdentifier),this.drain()}catch(g){this.ee.abort(),v(18,g)}}})}}w(J,"featureName",B);export{J as Aggregate};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.