1"use strict";(globalThis.wpRiseJsonp=globalThis.wpRiseJsonp||[]).push([["datadogProfiler"],{54912(ge,V,c){c.d(V,{createRumProfiler:()=>te});var E=c(48121),O=c(19179),j=c(82447),G=c(69421),f=c(28011),D=c(40046),R=c(9077),y=c(87331);function U(s){let e=0;for(const t of s)t.stackId!==void 0&&e++;return e}const B=/\/(?![vV]\d{1,2}\/)([^/\d?]*\d+[^/?]*)/g;function x(s){return s?s.replace(B,"/?"):"/"}const S=(s,e)=>s||x(e);var F=c(75267);function Y(s,e,t){const{ids:i,names:l}=K(s.views),d=s.longTasks.map(v=>v.id).filter(v=>v!==void 0),r=s.actions?.map(v=>v.id).filter(v=>v!==void 0)??[],{ids:b,labels:h}=J(s.vitals),p={application:{id:e}};return t&&(p.session={id:t}),i.length&&(p.view={id:i,name:l}),d.length&&(p.long_task={id:d}),r.length&&(p.action={id:r,label:[]}),b.length&&(p.vital={id:b,label:h}),p}function K(s){const e={ids:[],names:[]};for(const t of s)e.ids.push(t.viewId),t.viewName&&e.names.push(t.viewName);return e.names=Array.from(new Set(e.names)),e}function J(s){const e={ids:[],labels:[]};if(!s)return e;for(const t of s)e.ids.push(t.id),e.labels.push(t.label);return e.labels=Array.from(new Set(e.labels)),e}function Q(s,e,t){return{event:z(s,e,t),"wall-time.json":s}}function z(s,e,t){const i=(0,F.m5)(e),l=Y(s,e.applicationId,t),d=X(i);return{...l,attachments:["wall-time.json"],start:new Date(s.startClocks.timeStamp).toISOString(),end:new Date(s.endClocks.timeStamp).toISOString(),family:"chrome",runtime:"chrome",format:"json",version:4,tags_profiler:d.join(","),_dd:{clock_drift:(0,f.TP)()}}}function X(s){return s.concat(["language:javascript","runtime:chrome","family:chrome","host:browser"])}var w=c(93590),A=c(26956);const Z=w.AQ;function W(s){const e=(0,A.qj)({expireDelay:Z});return s.subscribe(12,({rawRumEvent:t,startClocks:i,duration:l})=>{t.type==="long_task"&&e.add({id:t.long_task.id,startClocks:i,duration:l,entryType:t.long_task.entry_type===y.K.LONG_TASK?y.do.LONG_TASK:y.do.LONG_ANIMATION_FRAME},i.relative).close((0,f.Gw)(i.relative,l))}),e}const $=w.AQ;function q(s){const e=(0,A.qj)({expireDelay:$});return s.subscribe(15,t=>{e.add({id:t.id,label:"",startClocks:t.startClocks,duration:void 0},t.startClocks.relative)}),s.subscribe(12,({rawRumEvent:t,startClocks:i,duration:l})=>{if(t.type==="action"){const d=e.getEntries(i.relative).find(b=>b.value.id===t.action.id),r=l??0;d?(d.value.duration=r,d.close((0,f.Gw)(i.relative,r))):e.add({id:t.action.id,label:"",startClocks:i,duration:l},i.relative).close((0,f.Gw)(i.relative,r))}}),e}const C=w.AQ;function _(s){const e=(0,A.qj)({expireDelay:C});return s.subscribe(16,t=>{e.add({id:t.id,startClocks:t.startClocks,duration:void 0,label:t.name},t.startClocks.relative)}),s.subscribe(12,({rawRumEvent:t,startClocks:i,duration:l})=>{if(t.type==="vital"){const d=e.getEntries(i.relative).find(r=>r.value.id===t.vital.id);d?(d.value.duration=l,d.close((0,f.Gw)(i.relative,l))):e.add({id:t.vital.id,startClocks:i,duration:l,label:t.vital.name},i.relative).close((0,f.Gw)(i.relative,l))}}),e}const ee={sampleIntervalMs:10,collectIntervalMs:6e4,minProfileDurationMs:5e3,minNumberOfSamples:50};function te(s,e,t,i,l,d,r=ee){const b=(0,y.wP)(s,e,l,6);let h;const p=[],v=(0,E.B)(W)(e),se=(0,E.B)(q)(e),ne=(0,E.B)(_)(e);let o={state:"stopped",stateReason:"initializing"};e.subscribe(9,()=>{L("session-expired")}),e.subscribe(10,()=>{o.state==="stopped"&&o.stateReason==="session-expired"&&N()});function N(){if(o.state==="running")return;const n=d.findView();h=n?{startClocks:n.startClocks,viewId:n.id,viewName:S(n.name,document.location.pathname)}:void 0,p.push((0,O.q)(s,window,"visibilitychange",de).stop,(0,O.q)(s,window,"beforeunload",ce).stop),g()}function ie(){L("stopped-by-user")}function L(n){ae(n),p.forEach(a=>a()),p.length=0,i.set({status:"stopped",error_reason:void 0})}function oe(n){if(n.state==="running")return{cleanupTasks:n.cleanupTasks};const a=[],u=e.subscribe(2,m=>{const I={viewId:m.id,viewName:S(m.name,document.location.pathname),startClocks:m.startClocks};k(I),h=I});return a.push(u.unsubscribe),{cleanupTasks:a}}function g(){const n=(0,j.VZ)().Profiler;if(!n)throw i.set({status:"error",error_reason:"not-supported-by-browser"}),new Error("RUM Profiler is not supported in this browser.");o.state==="running"&&P(o);const{cleanupTasks:a}=oe(o);let u;
1try{u=new n({sampleInterval:r.sampleIntervalMs,maxBufferSize:Math.round(r.collectIntervalMs*1.5/r.sampleIntervalMs)})}catch(m){m instanceof Error&&m.message.includes("disabled by Document Policy")?(G.Vy.warn("[DD_RUM] Profiler startup failed. Ensure your server includes the `Document-Policy: js-profiling` response header when serving HTML pages.",m),i.set({status:"error",error_reason:"missing-document-policy-header"})):i.set({status:"error",error_reason:"unexpected-exception"});return}i.set({status:"running",error_reason:void 0}),o={state:"running",startClocks:(0,f.M8)(),profiler:u,timeoutId:(0,D.wg)(g,r.collectIntervalMs),views:[],cleanupTasks:a,longTasks:[]},k(h),u.addEventListener("samplebufferfull",M)}function P(n){(0,D.DJ)(n.timeoutId),n.profiler.removeEventListener("samplebufferfull",M);const{startClocks:a,views:u}=n;n.profiler.stop().then(m=>{const I=(0,f.M8)(),T=(0,f.vk)(a.relative,I.relative),H=v.findAll(a.relative,T),me=se.findAll(a.relative,T),ve=ne.findAll(a.relative,T),be=T<r.minProfileDurationMs,he=U(m.samples)<r.minNumberOfSamples;H.length===0&&(be||he)||le(Object.assign(m,{startClocks:a,endClocks:I,clocksOrigin:(0,f.Oc)(),longTasks:H,actions:me,vitals:ve,views:u,sampleInterval:r.sampleIntervalMs}))}).catch(R.Dx)}function ae(n){if(o.state!=="running"){(o.state==="paused"||o.state==="stopped"&&n==="stopped-by-user")&&(o={state:"stopped",stateReason:n});return}const a=o;o={state:"stopped",stateReason:n},a.cleanupTasks.forEach(u=>u()),P(a)}function re(){if(o.state!=="running")return;const n=o;o={state:"paused"},n.cleanupTasks.forEach(a=>a()),P(n)}function k(n){o.state!=="running"||!n||o.views.push(n)}function le(n){const a=t.findTrackedSession()?.id,u=Q(n,s,a);b.send(u)}function M(){g()}function de(){document.visibilityState==="hidden"&&o.state==="running"?re():document.visibilityState==="visible"&&o.state==="paused"&&g()}function ce(){g()}function ue(){return o.state==="stopped"}function fe(){return o.state==="running"}function pe(){return o.state==="paused"}return{start:N,stop:ie,isStopped:ue,isRunning:fe,isPaused:pe}}}}]);
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.