1import{g as y,n as A,a as S,b as u}from"./bel-serializer-Cg3coDPg.js";import{i as c,Q as h,c as f,T as p,d as g,U as v,m as E,l as C}from"./root-HIFWb3i6.js";import{A as L}from"./aggregate-base-C7-Au_i8.js";import{V as m,a as d,D as N,r as R,o as I,b as F,c as w}from"./first-paint-B5wby0Mo.js";import{l as D}from"./load-time-Ctwo7O14.js";import"./chunk-EPOLDU6W-Cy0pbNoL.js";import"./jsx-runtime-u17CrQMm.js";import"./index-e26oBipY.js";import"./index-hDuMSH-s.js";import"./mutation-BhTIUPuz.js";import"./QueryClientProvider-CC4TKqza.js";import"./main-BIrbTr-V.js";import"./status-announcer-provider-twgJHQuP.js";import"./i18nInstance-CHFDjdcJ.js";import"./constant-DgzOUPqJ.js";import"./Info.es-qYAWktLB.js";import"./data-layer-1kvIXlWL.js";import"./sbs-login-instance-QtxHg8-X.js";import"./user-provider-BVDzkoqu.js";import"./preload-helper-BXl3LOEh.js";import"./helpers-Dqt3x3rr.js";const o=new m(d.CUMULATIVE_LAYOUT_SHIFT,n=>n);c&&N(({value:n,attribution:e,id:i})=>{const t={metricId:i,largestShiftTarget:e.largestShiftTarget,largestShiftTime:e.largestShiftTime,largestShiftValue:e.largestShiftValue,loadState:e.loadState};o.update({value:n,attrs:t})},{reportAllChanges:!0});const T=new m(d.INTERACTION_TO_NEXT_PAINT);c&&R(({value:n,attribution:e,id:i})=>{const t={metricId:i,eventTarget:e.interactionTarget,eventTime:e.interactionTime,interactionTarget:e.interactionTarget,interactionTime:e.interactionTime,interactionType:e.interactionType,inputDelay:e.inputDelay,nextPaintTime:e.nextPaintTime,processingDuration:e.processingDuration,presentationDelay:e.presentationDelay,loadState:e.loadState};T.update({value:n,attrs:t})});const l=new m(d.LARGEST_CONTENTFUL_PAINT);c&&I(({value:n,attribution:e})=>{if(h||l.isValid)return;let i;const t=e.lcpEntry;t&&(i={size:t.size,eid:t.id,element:e.element,timeToFirstByte:e.timeToFirstByte,resourceLoadDelay:e.resourceLoadDelay,resourceLoadDuration:e.resourceLoadDuration,resourceLoadTime:e.resourceLoadDuration,elementRenderDelay:e.elementRenderDelay,...e.navigationEntry&&{pageUrl:f(e.navigationEntry.name)}},e.url&&(i.elUrl=f(e.url)),t.element?.tagName&&(i.elTag=t.element.tagName)),l.update({value:n,attrs:i})});function U(n,e,i){let t="unknown";if(n&&n instanceof XMLHttpRequest){const r=i.context(n).params;if(!r||!r.status||!r.method||!r.host||!r.pathname)return"xhrOriginMissing";t=r.status+" "+r.method+": "+r.host+r.pathname}else if(n&&typeof n.tagName=="string"&&(t=n.tagName.toLowerCase(),n.id&&(t+="#"+n.id),n.className))for(let r=0;r<n.classList.length;r++)t+="."+n.classList[r];return t==="unknown"&&(e===document?t="document":e===window?t="window":e instanceof FileReader&&(t="FileReader")),t}class ee extends L{static featureName=p;#e=({name:e,value:i,attrs:t})=>{this.addTiming(e,i,t)};constructor(e){super(e,p),this.curSessEndRecorded=!1,this.firstIxnRecorded=!1,super.customAttributesAreSeparate=!0,g("docHidden",i=>this.endCurrentSession(i),this.featureName,this.ee),g("winPagehide",i=>this.addTiming("unload",i,null),this.featureName,this.ee),this.waitForFlags([]).then(()=>{F.subscribe(this.#e),w.subscribe(this.#e),l.subscribe(this.#e),T.subscribe(this.#e),D.subscribe(({name:i,value:t})=>{this.addTiming(i,Math.round(t))}),v(()=>{const{name:i,value:t,attrs:r}=o.current;t!==void 0&&this.addTiming(i,t*1e3,r)},!0,!0),this.drain()})}endCurrentSession(e){this.curSessEndRecorded||(this.addTiming("pageHide",e,null),this.curSessEndRecorded=!0)}addTiming(e,i,t){t=t||{},x(t),e!==d.CUMULATIVE_LAYOUT_SHIFT&&o.current.value>=0&&(t.cls=o.current.value);const r={name:e,value:i,attrs:t};return this.events.add(r),E("pvtAdded",[e,i,t],void 0,C.sessionTrace,this.ee),this.checkForFirstInteraction(),r}checkForFirstInteraction(){if(this.firstIxnRecorded||h||!performance)return;const e=performance.getEntriesByType("first-input")[0];e&&(this.firstIxnRecorded=!0,this.addTiming("fi",e.startTime,{type:e.name,eventTarget:U(e.target),loadState:document.readyState}))}appendGlobalCustomAttributes(e){var i=e.attrs||{},t=["size","eid","cls","type","fid","elTag","elUrl","net-type","net-etype","net-rtt","net-dlink"];Object.entries(this.agentRef.info.jsAttributes||{}
1).forEach(([r,s])=>{t.indexOf(r)<0&&(i[r]=s)})}preHarvestChecks(){return this.checkForFirstInteraction(),super.preHarvestChecks()}serializer(e){if(!e?.length)return"";for(var i=y(this.agentRef.runtime.obfuscator),t="bel.6;",r=0;r<e.length;r++){var s=e[r];t+="e,",t+=i(s.name)+",",t+=A(s.value,u,!1)+",",this.appendGlobalCustomAttributes(s);var a=S(s.attrs,i);a&&a.length>0&&(t+=u(a.length)+";"+a.join(";")),r+1<e.length&&(t+=";")}return t}}function x(n){var e=navigator.connection||navigator.mozConnection||navigator.webkitConnection;e&&(e.type&&(n["net-type"]=e.type),e.effectiveType&&(n["net-etype"]=e.effectiveType),e.rtt&&(n["net-rtt"]=e.rtt),e.downlink&&(n["net-dlink"]=e.downlink))}export{ee 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.