1"use strict";(self.webpackChunktechassist_host=self.webpackChunktechassist_host||[]).push([[12],{6600:function(e,t,n){n.d(t,{createRumProfiler:function(){return m}});var s=n(42182),i=n(80886),r=n(30194),a=n(32234),o=n(29336),l=n(93001),u=n(26466);let c=/\/(?![vV]\d{1,2}\/)([^/\d?]*\d+[^/?]*)/g,d=(e,t)=>e||(t?t.replace(c,"/?"):"/");var p=n(62360);let f={sampleIntervalMs:10,collectIntervalMs:6e4,minProfileDurationMs:5e3,minNumberOfSamples:50};function m(e,t,n,c,m,v,h,w=f){let g;let b=(0,u.wP)(e,t,v,6),k=[],y={state:"stopped",stateReason:"initializing"};function I(){if("running"===y.state)return;let t=h.findView();g=t?{startClocks:t.startClocks,viewId:t.id,viewName:d(t.name,document.location.pathname)}:void 0,k.push((0,i.q)(e,window,"visibilitychange",E).stop,(0,i.q)(e,window,"beforeunload",O).stop),D()}async function S(){await M("stopped-by-user")}async function M(e){await P(e),k.forEach(e=>e()),c.set({status:"stopped",error_reason:void 0})}function D(){let e;let n=(0,r.VZ)().Profiler;if(!n)throw c.set({status:"error",error_reason:"not-supported-by-browser"}),Error("RUM Profiler is not supported in this browser.");_(y).catch(s.Dx);let{cleanupTasks:i}=function(e){if("running"===e.state)return{cleanupTasks:e.cleanupTasks};let n=[];return n.push(t.subscribe(2,e=>{let t={viewId:e.id,viewName:d(e.name,document.location.pathname),startClocks:e.startClocks};T(t),g=t}).unsubscribe),{cleanupTasks:n}}(y);try{e=new n({sampleInterval:w.sampleIntervalMs,maxBufferSize:Math.round(1.5*w.collectIntervalMs/w.sampleIntervalMs)})}catch(e){e instanceof Error&&e.message.includes("disabled by Document Policy")?(a.Vy.warn("[DD_RUM] Profiler startup failed. Ensure your server includes the `Document-Policy: js-profiling` response header when serving HTML pages.",e),c.set({status:"error",error_reason:"missing-document-policy-header"})):c.set({status:"error",error_reason:"unexpected-exception"});return}c.set({status:"running",error_reason:void 0}),y={state:"running",startClocks:(0,o.M8)(),profiler:e,timeoutId:(0,l.wg)(D,w.collectIntervalMs),views:[],cleanupTasks:i,longTasks:[]},T(g),e.addEventListener("samplebufferfull",j)}async function _(t){if("running"!==t.state)return;(0,l.DJ)(t.timeoutId),t.profiler.removeEventListener("samplebufferfull",j);let{startClocks:i,views:r}=t;await t.profiler.stop().then(t=>{let s=(0,o.M8)(),a=m.findLongTasks(i.relative),l=(0,o.vk)(i.timeStamp,s.timeStamp)<w.minProfileDurationMs,u=function(e){let t=0;for(let n of e)void 0!==n.stackId&&t++;return t}(t.samples)<w.minNumberOfSamples;0===a.length&&(l||u)||function(t){var s;let i={event:function(e,t,n){let s=(0,p.m5)(t),i=function(e,t,n){let s={application:{id:t}};n&&(s.session={id:n});let{ids:i,names:r}=function(e){let t={ids:[],names:[]};for(let n of e)t.ids.push(n.viewId),n.viewName&&t.names.push(n.viewName);return t.names=Array.from(new Set(t.names)),t}(e.views);i.length&&(s.view={id:i,name:r});let a=e.longTasks.map(e=>e.id).filter(e=>void 0!==e);return a.length&&(s.long_task={id:a}),s}(e,t.applicationId,n),r=s.concat(["language:javascript","runtime:chrome","family:chrome","host:browser"]);return{...i,attachments:["wall-time.json"],start:new Date(e.startClocks.timeStamp).toISOString(),end:new Date(e.endClocks.timeStamp).toISOString(),family:"chrome",runtime:"chrome",format:"json",version:4,tags_profiler:r.join(","),_dd:{clock_drift:(0,o.TP)()}}}(t,e,null===(s=n.findTrackedSession())||void 0===s?void 0:s.id),"wall-time.json":t};b.send(i)}(Object.assign(t,{startClocks:i,endClocks:s,clocksOrigin:(0,o.Oc)(),longTasks:a,views:r,sampleInterval:w.sampleIntervalMs}))}).catch(s.Dx)}async function P(e){"running"===y.state&&(await C(),y={state:"stopped",stateReason:e})}async function x(){"running"===y.state&&(await C(),y={state:"paused"})}async function C(){"running"===y.state&&(y.cleanupTasks.forEach(e=>e()),await _(y))}function T(e){"running"===y.state&&e&&y.views.push(e)}function j(){D()}function E(){"hidden"===document.visibilityState&&"running"===y.state?x().catch(s.Dx):"visible"===document.visibilityState&&"paused"===y.state&&D()}function O(){D()}return t.subscribe(9,()=>
1{M("session-expired").catch(s.Dx)}),t.subscribe(10,()=>{"stopped"===y.state&&"session-expired"===y.stateReason&&I()}),{start:I,stop:S,isStopped:function(){return"stopped"===y.state},isRunning:function(){return"running"===y.state},isPaused:function(){return"paused"===y.state}}}}}]);
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.