PageSourceSearch

https://www.qualidoc.com.br/_next/static/chunks/profiler.4b4f800dcb287afa.js

js qualidoc.com.br collected 2026-09-24 12:34:34 UTC 5,267 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9983],{55915:function(e,t,n){n.r(t),n.d(t,{DEFAULT_RUM_PROFILER_CONFIGURATION:function(){return p},createRumProfiler:function(){return createRumProfiler}});var r=n(64933),s=n(83206),a=n(51145),i=n(13842),o=n(25026),l=n(65483),c=n(59981);let u=/\/(?![vV]\d{1,2}\/)([^/\d?]*\d+[^/?]*)/g,getCustomOrDefaultViewName=(e,t)=>e||(t?t.replace(u,"/?"):"/");var f=n(19276);let p={sampleIntervalMs:10,collectIntervalMs:6e4,minProfileDurationMs:5e3,minNumberOfSamples:50};function createRumProfiler(e,t,n,u,d,m,h,g=p){let v;let w=(0,c.QB)(e,t,m,6),I=[],P={state:"stopped",stateReason:"initializing"};function start(){if("running"===P.state)return;let t=h.findView();v=t?{startClocks:t.startClocks,viewId:t.id,viewName:getCustomOrDefaultViewName(t.name,document.location.pathname)}:void 0,I.push((0,s.O)(e,window,"visibilitychange",handleVisibilityChange).stop,(0,s.O)(e,window,"beforeunload",handleBeforeUnload).stop),startNextProfilerInstance()}async function stop(){await stopProfiling("stopped-by-user")}async function stopProfiling(e){await stopProfilerInstance(e),I.forEach(e=>e()),u.set({status:"stopped",error_reason:void 0})}function startNextProfilerInstance(){let e;let n=(0,a.Rf)().Profiler;if(!n)throw u.set({status:"error",error_reason:"not-supported-by-browser"}),Error("RUM Profiler is not supported in this browser.");collectProfilerInstance(P).catch(r.$y);let{cleanupTasks:s}=function(e){if("running"===e.state)return{cleanupTasks:e.cleanupTasks};let n=[],r=t.subscribe(2,e=>{let t={viewId:e.id,viewName:getCustomOrDefaultViewName(e.name,document.location.pathname),startClocks:e.startClocks};collectViewEntry(t),v=t});return n.push(r.unsubscribe),{cleanupTasks:n}}(P);try{e=new n({sampleInterval:g.sampleIntervalMs,maxBufferSize:Math.round(1.5*g.collectIntervalMs/g.sampleIntervalMs)})}catch(e){e instanceof Error&&e.message.includes("disabled by Document Policy")?(i.jf.warn("[DD_RUM] Profiler startup failed. Ensure your server includes the `Document-Policy: js-profiling` response header when serving HTML pages.",e),u.set({status:"error",error_reason:"missing-document-policy-header"})):u.set({status:"error",error_reason:"unexpected-exception"});return}u.set({status:"running",error_reason:void 0}),P={state:"running",startClocks:(0,o.$I)(),profiler:e,timeoutId:(0,l.iK)(startNextProfilerInstance,g.collectIntervalMs),views:[],cleanupTasks:s,longTasks:[]},collectViewEntry(v),e.addEventListener("samplebufferfull",handleSampleBufferFull)}async function collectProfilerInstance(t){if("running"!==t.state)return;(0,l.gr)(t.timeoutId),t.profiler.removeEventListener("samplebufferfull",handleSampleBufferFull);let{startClocks:s,views:a}=t;await t.profiler.stop().then(t=>{let r=(0,o.$I)(),i=(0,o._J)(s.timeStamp,r.timeStamp),l=d.findLongTasks(s.relative,i),c=i<g.minProfileDurationMs,u=function(e){let t=0;for(let n of e)void 0!==n.stackId&&t++;return t}(t.samples)<g.minNumberOfSamples;0===l.length&&(c||u)||function(t){var r;let s=null===(r=n.findTrackedSession())||void 0===r?void 0:r.id,a=function(e,t,n){let r=function(e,t,n){let r=(0,f.MS)(t),s=function(e,t,n){let r={application:{id:t}};n&&(r.session={id:n});let{ids:s,names:a}=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);s.length&&(r.view={id:s,name:a});let i=e.longTasks.map(e=>e.id).filter(e=>void 0!==e);return i.length&&(r.long_task={id:i}),r}(e,t.applicationId,n),a=function(e){let t=e.concat(["language:javascript","runtime:chrome","family:chrome","host:browser"]);return t}(r),i={...s,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:a.join(","),_dd:{clock_drift:(0,o.QA)()}};return i}(e,t,n);return{event:r,"wall-time.json":e}}(t,e,s);w.send(a)}(Object.assign(t,{startClocks:s,endClocks:r,clocksOrigin:(0,o.cQ)(),longTasks:l,views:a,sampleInterval:g.sampleIntervalMs}))}).catch(r.$y)}async function stopProfilerInstance(e){"running"===P.state&&(await onPauseOrStopProfilerInstance(),P={state:"stopped",stateReason:e})}async function pauseProfilerInstance(){"running"===P.state&&(await onPauseOrStopProfilerInstance(),P={state:"paused"})}async function onPauseOrStopProfilerInstance(){"running"===P.state&&(P.cleanupTasks.forEach(e
1=>e()),await collectProfilerInstance(P))}function collectViewEntry(e){"running"===P.state&&e&&P.views.push(e)}function handleSampleBufferFull(){startNextProfilerInstance()}function handleVisibilityChange(){"hidden"===document.visibilityState&&"running"===P.state?pauseProfilerInstance().catch(r.$y):"visible"===document.visibilityState&&"paused"===P.state&&startNextProfilerInstance()}function handleBeforeUnload(){startNextProfilerInstance()}return t.subscribe(9,()=>{stopProfiling("session-expired").catch(r.$y)}),t.subscribe(10,()=>{"stopped"===P.state&&"session-expired"===P.stateReason&&start()}),{start,stop,isStopped:function(){return"stopped"===P.state},isRunning:function(){return"running"===P.state},isPaused:function(){return"paused"===P.state}}}}}]);
2//# sourceMappingURL=profiler.4b4f800dcb287afa.js.map

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.