1var at=Object.defineProperty;var ot=(r,e,t)=>e in r?at(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var q=(r,e,t)=>(ot(r,typeof e!="symbol"?e+"":e,t),t),F=(r,e,t)=>{if(!e.has(r))throw TypeError("Cannot "+t)};var h=(r,e,t)=>(F(r,e,"read from private field"),t?t.call(r):e.get(r)),E=(r,e,t)=>{if(e.has(r))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(r):e.set(r,t)},C=(r,e,t,f)=>(F(r,e,"write to private field"),f?f.call(r,t):e.set(r,t),t);var o=(r,e,t)=>(F(r,e,"access private method"),t);import{r as ct,c as L,R as Y,t as ut,u as ht,O as ft,v as X,w as Q,x as V,f as T,y as lt,z as Z,E as R,k as pt,A as $,B as dt,s as J,n as mt,o as Et,p as yt,q as bt,i as gt}from"./index-2b9d2976.js";import{A as vt}from"./aggregate-base-b4c75160.js";import{O as Ct}from"./obfuscate-8b6bccd2.js";import{T as tt}from"./timer-7077bb56.js";import{i as kt}from"./iframe-05b4451b.js";import{i as et}from"./type-check-ec45d84f.js";import"./cookie-consent-3d528a14.js";import"./event-buffer-dae89a4e.js";const St=(r,e=[],t)=>{const f=[],s={path:void 0,nearestFields:{},get targets(){return f.length?f:[t.runtime.v2Target]},hasButton:!1,hasLink:!1};if(!r)return s;if(r===window)return s.path="window",s;if(r===document)return s.path="document",s;let m="";const S=wt(r);try{for(;r!=null&&r.tagName;){const i=r.tagName.toLowerCase();s.hasLink||(s.hasLink=i==="a"),s.hasButton||(s.hasButton=i==="button"||i==="input"&&r.type.toLowerCase()==="button"),e.forEach(c=>{var u,l,p;(l=s.nearestFields)[p=Mt(c)]||(l[p]=((u=r[c])==null?void 0:u.baseVal)||r[c])});const a=r==null?void 0:r.dataset;a.nrMfeId&&f.push(...ct(a.nrMfeId,t)),m=Tt(r,m),r=r.parentNode}}catch{}return s.path=m?S?"".concat(m,":nth-of-type(").concat(S,")"):m:void 0,s};function Tt(r,e){const{id:t,localName:f}=r;return[f,t?"#".concat(t):"",e?">".concat(e):""].join("")}function wt(r){try{let e=1;const{tagName:t}=r;for(;r.previousElementSibling;)r.previousElementSibling.tagName===t&&e++,r=r.previousElementSibling;return e}catch{}}function Mt(r){return r==="tagName"&&(r="tag"),r==="className"&&(r="class"),"nearest".concat(r.charAt(0).toUpperCase()+r.slice(1))}class Rt{constructor(e,t){this.event=e,this.count=1,this.originMs=Math.floor(e.timeStamp),this.relativeMs=[0],this.selectorPath=t.path,this.rageClick=void 0,this.nearestTargetFields=t.nearestFields,this.currentUrl=L(""+location),this.deadClick=!1,this.errorClick=!1,this.targets=t.targets}aggregate(e){this.count++,this.relativeMs.push(Math.floor(e.timeStamp-this.originMs)),this.isRageClick()&&(this.rageClick=!0)}isRageClick(){const e=this.relativeMs.length;return this.event.type==="click"&&e>=Y&&this.relativeMs[e-1]-this.relativeMs[e-Y]<ut}}var k,O,_,A,P,G,rt,D,K,H,it,B,W,I,j;class _t{constructor(e){E(this,G);E(this,D);E(this,H);E(this,B);E(this,I);E(this,k,void 0);E(this,O,"");E(this,_,void 0);E(this,A,void 0);E(this,P,void 0);this.agentRef=e,ht().o.MO&&C(this,A,new MutationObserver(this.isLiveClick.bind(this)))}get aggregationEvent(){const e=h(this,k);return C(this,O,""),C(this,k,void 0),e}process(e,t){if(!e)return;const f=ft.includes(e.type)?window:e.target,s=St(f,t,this.agentRef),m=At(e,s.path);if(m&&m===h(this,O))h(this,k).aggregate(e);else{const S=h(this,k);return o(this,B,W).call(this),o(this,D,K).call(this),C(this,O,m),C(this,k,new Rt(e,s)),e.type==="click"&&(s.hasButton||s.hasLink)&&(o(this,H,it).call(this,h(this,k)),o(this,G,rt).call(this)),S}}markAsErrorClick(){h(this,k)&&h(this,P)&&(h(this,k).errorClick=!0,o(this,D,K).call(this))}isLiveClick(){o(this,I,j).call(this)&&o(this,B,W).call(this)}}k=new WeakMap,O=new WeakMap,_=new WeakMap,A=new WeakMap,P=new WeakMap,G=new WeakSet,rt=function(){C(this,P,new tt({onEnd:()=>{o(this,D,K).call(this)}},X))},D=new WeakSet,K=function(){var e;(e=h(this,P))==null||e.clear(),C(this,P,void 0)},H=new WeakSet,it=function(e){o(this,I,j).call(this)||!h(this,A)||(h(this,A).observe(document,{attributes:!0,characterData:!0,childList:!0,subtree:!0}),C(this,_,new tt({onEnd:()=>{e.deadClick=!0,o(this,B,W).call(this)}},X)))},B=new WeakSet,W=function(){var e,t;(e=h(this,A))==null||e.disconnect(),(t=h(this,_))==null||t.clear(),
1C(this,_,void 0)},I=new WeakSet,j=function(){return h(this,_)!==void 0};function At(r,e){let t=r.type;return r.type!=="scrollend"&&(t+="-"+e),t}var w,y,g,U,st,x,nt;class Pt extends vt{constructor(t){super(t,Q);E(this,y);E(this,U);E(this,x);E(this,w,void 0);this.referrerUrl=V&&document.referrer?L(document.referrer):void 0,this.obfuscator=new Ct(t),this.waitForFlags(["ins"]).then(([f])=>{var S;if(!f){this.blocked=!0,this.deregisterDrain();return}o(this,U,st).call(this),T("api-recordCustomEvent",(i,a,c,u)=>{if(lt.includes(a))return Z(46);this.addEvent({eventType:a,timestamp:o(this,y,g).call(this,i),...c},u)},this.featureName,this.ee),t.init.page_action.enabled&&T("api-addPageAction",(i,a,c,u)=>{var l,p;this.addEvent({...c,eventType:R.PA,timestamp:o(this,y,g).call(this,i),timeSinceLoad:i/1e3,actionName:a,referrerUrl:this.referrerUrl,...V&&{browserWidth:(l=window.document.documentElement)==null?void 0:l.clientWidth,browserHeight:(p=window.document.documentElement)==null?void 0:p.clientHeight}},u)},this.featureName,this.ee);let s=()=>{};V&&t.init.user_actions.enabled&&(C(this,w,new _t(this.agentRef)),this.harvestOpts.beforeUnload=()=>s==null?void 0:s(h(this,w).aggregationEvent),s=i=>{try{if(i!=null&&i.event){const{target:a,timeStamp:c,type:u}=i.event;i.targets.forEach(l=>{const p={eventType:R.UA,timestamp:o(this,y,g).call(this,c),action:u,actionCount:i.count,actionDuration:i.relativeMs[i.relativeMs.length-1],actionMs:i.relativeMs,rageClick:i.rageClick,target:i.selectorPath,currentUrl:i.currentUrl,...kt(window)&&{iframe:!0},...this.agentRef.init.user_actions.elementAttributes.reduce((n,d)=>(M(d)&&(n[b(d)]=String(a[d]).trim().slice(0,128)),n),{}),...i.nearestTargetFields,...i.deadClick&&{deadClick:!0},...i.errorClick&&{errorClick:!0}};this.addEvent(p,l),o(this,x,nt).call(this,p);function b(n){return n==="tagName"&&(n="tag"),n==="className"&&(n="class"),"target".concat(n.charAt(0).toUpperCase()+n.slice(1))}function M(n){return!!(i.selectorPath!=="window"&&i.selectorPath!=="document"&&a instanceof HTMLElement&&(a!=null&&a[n]))}})}}catch{}},T("ua",i=>{s(h(this,w).process(i,this.agentRef.init.user_actions.elementAttributes))},this.featureName,this.ee),T("navChange",()=>{h(this,w).isLiveClick()},this.featureName,this.ee),T("uaXhr",()=>{h(this,w).isLiveClick()},this.featureName,this.ee),T("uaErr",()=>h(this,w).markAsErrorClick(),this.featureName,this.ee));const m=[...t.init.performance.capture_marks?["mark"]:[],...t.init.performance.capture_measures?["measure"]:[]];if(m.length)try{m.forEach(i=>{PerformanceObserver.supportedEntryTypes.includes(i)&&new PerformanceObserver(c=>{c.getEntries().forEach(u=>{try{let p=function(b){if(b==null)return{};return et(b)?M(b):{entryDetail:b};function M(n,d="entryDetail"){let v={};return n==null||Object.keys(n).forEach(N=>{let z=d+"."+N;et(n[N])?Object.assign(v,M(n[N],z)):n[N]!==null&&n[N]!==void 0&&(v[z]=n[N])}),v}};this.reportSupportabilityMetric("Generic/Performance/"+i+"/Seen");const l=t.init.performance.capture_detail?p(u.detail):{};this.addEvent({...l,eventType:R.BP,timestamp:o(this,y,g).call(this,u.startTime),entryName:u.name,entryDuration:u.duration,entryType:i})}catch{}})}).observe({buffered:!0,type:i})})}catch{}V&&t.init.performance.resources.enabled&&T("browserPerformance.resource",i=>{var a;try{const{name:c,duration:u,...l}=i.toJSON();let p=!1;try{const d=new URL(c).hostname,v=d.includes("newrelic.com")||d.includes("nr-data.net")||d.includes("nr-local.net");if(this.agentRef.init.performance.resources.ignore_newrelic&&v||this.agentRef.init.performance.resources.asset_types.length&&!this.agentRef.init.performance.resources.asset_types.includes(l.initiatorType))return;p=d===((a=pt)==null?void 0:a.location.hostname)||t.init.performance.resources.first_party_domains.includes(d),p&&this.reportSupportabilityMetric("Generic/Performance/FirstPartyResource/Seen"),v&&this.reportSupportabilityMetric("Generic/Performance/NrResource/Seen")}catch{}this.reportSupportabilityMetric("Generic/Performance/Resource/Seen");const b={...l,eventType:R.BP,timestamp:o(this,y,g).call(this,l.startTime),entryName:L(c),entryDuration:u,firstParty:p},M=$(c,this.agentRef);if(M.length){M.forEach(d=>this.addEvent({...b},d));return}this.addEvent({...b},void 0);const n=dt(L(c));if(n!=null&&n.dom.value&&!n.dom.end){const d=()=>{$(c,this.agentRef).forEach(v=>this.addEvent({...b},v))};["load","error"].forEach(v=>n.dom.value.addEventListener(v,d,{once:!0}))}}catch(c){this.ee.emit("internal-error",[c,"GenericEvents-Resource"])}},this.featureName,this.ee),T("api-measure",(i,a,c)=>{const{start:u,duration:l,customAttributes:p}=i,b={...p,eventType:R.BP,timestamp:o(this,y,g).call(this,u),entryName:a,entryDuration:l,entryType:"measure"};this.addEvent(b,c)},this.featureName,this.ee),(t.init.feature_flags.includes("websockets")||(S=t.init.web_sockets)!=null&&S.enabled)&&T("ws-complete",(i,a=[t.runtime.v2Target])=>{a.forEach(c=>{const u={...i,eventType:R.WS,timestamp:o(this,y,g).call(this,i.timestamp),openedAt:o(this,y,g).call(this,i.openedAt),closedAt:o(this,y,g).call(this,i.closedAt)};this.reportSupportabilityMetric("WebSocket/Completed/Seen"),this.reportSupportabilityMetric("WebSocket/Completed/Bytes",J(u).length),this.addEvent(u,c)})},this.featureName,this.ee),t.init.feature_flags.includes("no_spv")||T("spv",(i,a)=>{this.addEvent({eventType:R.SPV,timestamp:o(this,y,g).call(this,a),...i})},this.featureName,this.ee),this.drain()})}addEvent(t={},f){if(!t||!Object.keys(t).length)return;if(!t.eventType){Z(44);return}for(let S in t){let i=t[S];t[S]=i&&typeof i=="object"?J(i):i}const s={timestamp:o(this,y,g).call(this,mt()),pageUrl:L(""+gt),currentUrl:L(""+location)},m={...this.agentRef.info.jsAttributes||{},...s,...t};this.events.add({...m,...Et(f,this)}),yt(f,this)&&this.addEvent({...m,...bt(f,this)})}serializer(t){return this.obfuscator.traverseAndObfuscateEvents({ins:t})}queryStringsBuilder(){return{ua:this.agentRef.info.userAttributes,at:this.agentRef.info.atts}}}w=new WeakMap,y=new WeakSet,g=function(t){return Math.floor(this.agentRef.runtime.timeKeeper.correctRelativeTimestamp(t))},U=new WeakSet,st=function(){var f,s;const t="Config/Performance/";this.agentRef.init.performance.capture_marks&&this.reportSupportabilityMetric(t+"CaptureMarks/Enabled"),this.agentRef.init.performance.capture_measures&&this.reportSupportabilityMetric(t+"CaptureMeasures/Enabled"),this.agentRef.init.performance.resources.enabled&&this.reportSupportabilityMetric(t+"Resources/Enabled"),((f=this.agentRef.init.performance.resources.asset_types)==null?void 0:f.length)!==0&&this.reportSupportabilityMetric(t+"Resources/AssetTypes/Changed"),((s=this.agentRef.init.performance.resources.first_party_domains)==null?void 0:s.length)!==0&&this.reportSupportabilityMetric(t+"Resources/FirstPartyDomains/Changed"),this.agentRef.init.performance.resources.ignore_newrelic===!1&&this.reportSupportabilityMetric(t+"Resources/IgnoreNewrelic/Changed")},x=new WeakSet,nt=function(t){t.rageClick&&this.reportSupportabilityMetric("UserAction/RageClick/Seen"),t.deadClick&&this.reportSupportabilityMetric("UserAction/DeadClick/Seen"),t.errorClick&&this.reportSupportabilityMetric("UserAction/ErrorClick/Seen")},q(Pt,"featureName",Q);export{Pt 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.