PageSourceSearch

https://www.modaoperandi.com/dist/client/datadogProfiler-bundle-359c68bb.js

js modaoperandi.com collected 2026-10-02 02:31:50 UTC 8,977 bytes, 2 lines download raw bytes

1"use strict";(self.__LOADABLE_LOADED_CHUNKS__=self.__LOADABLE_LOADED_CHUNKS__||[]).push([[2440],{6827(e,t,n){n.r(t),n.d(t,{DEFAULT_RUM_PROFILER_CONFIGURATION:()=>N,createRumProfiler:()=>M});var s=n(77023);function i(){const e=(0,s.Y9)();return t=>{e.send("profile",t)}}var a=n(30107),r=n(68635);function o(e,t,n){const s=(0,a.wP)(e,t,n,r.j.PROFILING);return({profile:e,trace:t})=>{const n={event:e,"wall-time.json":t};s.send(n)}}const l=/\/(?![vV]\d{1,2}\/)([^/\d?]*\d+[^/?]*)/g,c=(e,t)=>e||function(e){return e?e.replace(l,"/?"):"/"}(t);var u=n(46922),d=n(57369);function p(e,t,n){const s=(0,u.m5)(t),i=function(e,t,n){const{ids:s,names:i}=function(e){const t={ids:[],names:[]};for(const 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),a=e.longTasks.map(e=>e.id).filter(e=>void 0!==e),r=e.actions?.map(e=>e.id).filter(e=>void 0!==e)??[],{ids:o,labels:l}=function(e){const t={ids:[],labels:[]};if(!e)return t;for(const n of e)t.ids.push(n.id),t.labels.push(n.label);return t.labels=Array.from(new Set(t.labels)),t}(e.vitals),c={application:{id:t}};return n&&(c.session={id:n}),s.length&&(c.view={id:s,name:i}),a.length&&(c.long_task={id:a}),r.length&&(c.action={id:r,label:[]}),o.length&&(c.vital={id:o,label:l}),c}(e,t.applicationId,n),a=function(e){return e.concat(["language:javascript","runtime:chrome","family:chrome","host:browser"])}(s);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:a.join(","),_dd:{clock_drift:(0,d._O)()}}}var f=n(66329),v=n(29243);const m=f.AQ;function _(e){const t=(0,v.q)({expireDelay:m});return e.subscribe(a.Rg.RAW_RUM_EVENT_COLLECTED,({rawRumEvent:e,startClocks:n,duration:s})=>{"long_task"===e.type&&t.add({id:e.long_task.id,startClocks:n,duration:s,entryType:e.long_task.entry_type===a.K.LONG_TASK?a.do.LONG_TASK:a.do.LONG_ANIMATION_FRAME},n.relative).close((0,d.Gw)(n.relative,s))}),t}const g=f.AQ;function k(e){const t=(0,v.q)({expireDelay:g});return e.subscribe(a.Rg.ACTION_STARTED,e=>{t.add({id:e.id,label:"",startClocks:e.startClocks,duration:void 0},e.startClocks.relative)}),e.subscribe(a.Rg.RAW_RUM_EVENT_COLLECTED,({rawRumEvent:e,startClocks:n,duration:s})=>{if("action"===e.type){const i=t.getEntries(n.relative).find(t=>t.value.id===e.action.id),a=s??0;i?(i.value.duration=a,i.close((0,d.Gw)(n.relative,a))):t.add({id:e.action.id,label:"",startClocks:n,duration:s},n.relative).close((0,d.Gw)(n.relative,a))}}),t}const b=f.AQ;function E(e){const t=(0,v.q)({expireDelay:b});return e.subscribe(a.Rg.DURATION_VITAL_STARTED,e=>{t.add({id:e.id,type:a.DL.DURATION,startClocks:e.startClocks,duration:void 0,label:e.name},e.startClocks.relative)}),e.subscribe(a.Rg.RAW_RUM_EVENT_COLLECTED,({rawRumEvent:e,startClocks:n,duration:s})=>{if("vital"!==e.type)return;if(e.vital.type===a.DL.OPERATION_STEP){if("start"===e.vital.step_type)t.add({id:e.vital.id,type:e.vital.type,operationKey:e.vital.operation_key,startClocks:n,label:e.vital.name},n.relative);else if("end"===e.vital.step_type){const s=t.findAllEntries().find(t=>t.value.type===a.DL.OPERATION_STEP&&t.value.label===e.vital.name&&t.value.operationKey===e.vital.operation_key);if(!s)return;s.value.duration=(0,d.vk)(s.value.startClocks.relative,n.relative),s.close(n.relative)}return}const i=t.getEntries(n.relative).find(t=>t.value.id===e.vital.id);if(i)return i.value.duration=s,void i.close((0,d.Gw)(n.relative,s));t.add({id:e.vital.id,type:e.vital.type,operationKey:e.vital.operation_key,startClocks:n,duration:s,label:e.vital.name},n.relative).close((0,d.Gw)(n.relative,s))}),t}var h=n(54791),w=n(46473),I=n(94361);function y(e,t,n=5e3){const s=function(e,t){return(0,I.Hg)({proxy:e.proxy,site:e.site,path:"/api/v2/profiling/quota",parameters:`session_id=${t}`,subdomain:"quota"})}(e,t),i=new AbortController;let a;const r=(0,h.h)(s,{credentials:"omit",signal:i.signal,headers:new Headers({"DD-CLIENT-TOKEN":e.clientToken})}).then(e=>{const t=429===e.status?{decision:"quota_ko",reason:"quota_exceeded"}:{decision:"quota_ok",reason:"api-error"};return e.json().then(e=>((0,w.DJ)(a),function(e,t){const n=e?.data?.attributes;if(!n||"boolean"!=typeof n.admitted||"string"!=typeof n.reason)return t;const s="backend_client_not_initialized"===n.reason?"backend_unavailable":n.reason;return{decision:n.admitted?"quota_ok":"quota_ko",reason:s}}(e,t)),()=>((0,w.DJ)(a),t))}).catch(()=>((0,w.DJ)(a),{decision:"quota_ok",reason:"api-error"})),o=new Promise(e=>{a=(0,w.wg)(()=>{i.abort(),e({decision:"quota_ok",reason:"timeout"})},n)});return Promise.race([r,o])}var R=n(91398);function T(e){const t=new Map((0,R.J)(e)?.map(e=>[e.url,e.id])),n=[];return e.forEach((e,s)=>{const i=t.get(e);void 0!==i&&n.push({resourceId:s,debugId:i})}),n.length?n:void 0}var D=n(948),C=n(47111),A=n(96018),O=n(59616),S=n(98104),L=n(320);const N={sampleIntervalMs:10,collectIntervalMs:6e4,minProfileDurationMs:5e3};function M(e,t,n,r,l,u,f=N){const v=(0,s.d0)()?(0,D.B)(i)():(0,D.B)(o)(e,t,l);let m;const g=[],b=(0,D.B)(_)(t),h=(0,D.B)(k)(t),I=(0,D.B)(E)(t);let R={state:"stopped",stateReason:"initializing"},M=0;function q(){if("running"===R.state)return;const t=u.findView();m=t?{startClocks:t.startClocks,viewId:t.id,viewName:c(t.name,document.location.pathname)}:void 0,g.push((0,A.q2)(window,A.gX.VISIBILITY_CHANGE,j).stop,(0,A.q2)(window,A.gX.BEFORE_UNLOAD,K).stop),x(),function(){if((0,s.d0)())return;const t=++M,i=n.findTrackedSession()?.id;i&&(0,D.B)(y)(e,i).then(e=>{t===M&&("running"!==R.state&&"paused"!==R.state||"quota_ko"===e.decision&&P("quota_ko",e.reason))}).catch(L.Dx)}()}function P(e,t){!function(e){if("running"!==R.state)return void(("paused"===R.state||"stopped"===R.state&&"stopped-by-user"===e)&&(R={state:"stopped",stateReason:e}));const t=R;R={state:"stopped",stateReason:e}
1,t.cleanupTasks.forEach(e=>e()),"quota_ko"===e?((0,w.DJ)(t.timeoutId),t.profiler.removeEventListener("samplebufferfull",G),t.profiler.stop().catch(L.Dx)):U(t)}(e),g.forEach(e=>e()),g.length=0,r.set({status:"stopped",error_reason:void 0,quota_reason:t})}function x(){const e=S.J.Profiler;if(!e)throw r.set({status:"error",error_reason:"not-supported-by-browser"}),new Error("RUM Profiler is not supported in this browser.");"running"===R.state&&U(R);const{cleanupTasks:s}=function(e){if("running"===e.state)return{cleanupTasks:e.cleanupTasks};const n=[],s=t.subscribe(a.Rg.VIEW_CREATED,e=>{const t={viewId:e.id,viewName:c(e.name,document.location.pathname),startClocks:e.startClocks};B(t),m=t});return n.push(s.unsubscribe),{cleanupTasks:n}}(R);let i;try{i=new e({sampleInterval:f.sampleIntervalMs,maxBufferSize:Math.round(1.5*f.collectIntervalMs/f.sampleIntervalMs)})}catch(e){return void(e instanceof Error&&e.message.includes("disabled by Document Policy")?(O.V.warn("[DD_RUM] Profiler startup failed. Ensure your server includes the `Document-Policy: js-profiling` response header when serving HTML pages.",e),r.set({status:"error",error_reason:"missing-document-policy-header"})):r.set({status:"error",error_reason:"unexpected-exception"}))}r.set({status:"running",error_reason:void 0}),R={state:"running",startClocks:(0,d.M8)(),profiler:i,timeoutId:(0,w.wg)(x,f.collectIntervalMs),views:[],cleanupTasks:s,longTasks:[],sessionId:n.findTrackedSession()?.id},B(m),i.addEventListener("samplebufferfull",G)}function U(t){(0,w.DJ)(t.timeoutId),t.profiler.removeEventListener("samplebufferfull",G);const{startClocks:n,views:s,sessionId:i}=t;t.profiler.stop().then(t=>{const a=(0,d.M8)(),r=(0,d.vk)(n.relative,a.relative),o=b.findAll(n.relative,r),l=h.findAll(n.relative,r),c=I.findAll(n.relative,r).map(e=>({id:e.id,label:e.label,startClocks:e.startClocks,duration:e.duration})),u=r<f.minProfileDurationMs;0===o.length&&u||function(t,n){const s={profile:p(t,e,n),trace:t};v(s)}(Object.assign({},t,{startClocks:n,endClocks:a,clocksOrigin:(0,d.Oc)(),longTasks:o,actions:l,vitals:c,views:s,sampleInterval:f.sampleIntervalMs,debugIds:T(t.resources)}),i)}).catch(L.Dx)}function B(e){"running"===R.state&&e&&R.views.push(e)}function G(){x()}function j(){"hidden"===document.visibilityState&&"running"===R.state?function(){if("running"!==R.state)return;const e=R;R={state:"paused"},e.cleanupTasks.forEach(e=>e()),U(e)}():"visible"===document.visibilityState&&"paused"===R.state&&x()}function K(){x()}return t.subscribe(a.Rg.SESSION_EXPIRED,()=>{P("session-expired")}),t.subscribe(a.Rg.SESSION_RENEWED,()=>{if("stopped"===R.state&&("session-expired"===R.stateReason||"quota_ko"===R.stateReason)){const t=n.findTrackedSession();if(!t||!(0,C.$5)(t.id,(0,C.it)(e.sessionSampleRate,e.profilingSampleRate)))return;q()}}),{start:q,stop:function(){P("stopped-by-user")},isStopped:function(){return"stopped"===R.state},isRunning:function(){return"running"===R.state},isPaused:function(){return"paused"===R.state}}}}}]);
2//# sourceMappingURL=datadogProfiler-bundle-359c68bb.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.