PageSourceSearch

https://www.tele.ch/assets/Datadog.astro_astro_type_script_index_0_lang.BZPAVRjO.js

js tele.ch collected 2026-10-02 13:13:07 UTC 187,262 bytes, 8 lines download raw bytes

1import{t as e}from"./preload-helper.B3cghJWJ.js";import{t}from"./_virtual_siteconf.Dw8JNmwO.js";function n(e,t,n){let r=n.getHandler(),a=Array.isArray(r)?r:[r];return i[e]>=i[n.getLevel()]&&a.includes(t)}var r={ok:`ok`,debug:`debug`,info:`info`,notice:`notice`,warn:`warn`,error:`error`,critical:`critical`,alert:`alert`,emerg:`emerg`},i={[r.ok]:0,[r.debug]:1,[r.info]:2,[r.notice]:4,[r.warn]:5,[r.error]:6,[r.critical]:7,[r.alert]:8,[r.emerg]:9};function a(e,{includeMessage:t=!1}={}){return{stack:e.stack,kind:e.type,message:t?e.message:void 0,causes:e.causes,fingerprint:e.fingerprint,handling:e.handling}}function o(e){return e===null?`null`:Array.isArray(e)?`array`:typeof e}function s(e){return o(e)===`object`}function c(e,t){return l(e,t,f())}function l(e,t,n){if(t===void 0)return e;if(typeof t!=`object`||!t)return t;if(t instanceof Date)return new Date(t.getTime());if(t instanceof RegExp)return new RegExp(t.source,t.flags);if(n.hasAlreadyBeenSeen(t))return;if(Array.isArray(t)){let r=Array.isArray(e)?e:[];for(let e=0;e<t.length;++e)r[e]=l(r[e],t[e],n);return r}let r=o(e)===`object`?e:{};for(let e in t)Object.prototype.hasOwnProperty.call(t,e)&&e!==`__proto__`&&(r[e]=l(r[e],t[e],n));return r}function u(e){return c(void 0,e)}function d(...e){let t;for(let n of e)n!=null&&(t=c(t,n));return t}function f(){let e=new WeakSet;return{hasAlreadyBeenSeen(t){let n=e.has(t);return n||e.add(t),n}}}var p={log:`log`,debug:`debug`,info:`info`,warn:`warn`,error:`error`},m=console,h={log:m.log,debug:m.debug,info:m.info,warn:m.warn,error:m.error};function g(e){return{debug:h.debug.bind(m,e),log:h.log.bind(m,e),info:h.info.bind(m,e),warn:h.warn.bind(m,e),error:h.error.bind(m,e)}}var _=!1;function ee(e){_=e}function te(){return _}var v=g(`Datadog Browser SDK:`),ne=`https://docs.datadoghq.com`,re=`${ne}/real_user_monitoring/browser/troubleshooting`,ie=`More details:`;function ae(e,t){return(...n)=>{try{return e(...n)}catch(e){v.error(t,e)}}}function oe(e){return e!==0&&Math.random()*100<=e}function se(e,t){return+e.toFixed(t)}function ce(e){return le(e)&&e>=0&&e<=100}function le(e){return typeof e==`number`}var ue=(e,t)=>e===`__proto__`?void 0:t;function de(e){try{return JSON.parse(e,ue)}catch{}}function fe(e){return{...e}}function pe(e,t){return Object.keys(e).some(n=>e[n]===t)}function y(e){return Object.keys(e).length===0}function me(e,t){let n={};for(let r of Object.keys(e))n[r]=t(e[r]);return n}function b(e){return e?(parseInt(e,10)^Math.random()*16>>parseInt(e,10)/4).toString(16):`10000000-1000-4000-8000-100000000000`.replace(/[018]/g,b)}var he=/(\S+?)\s*=\s*(.*?)(?:;|$)/g;function ge(e,t){for(he.lastIndex=0;;){let n=he.exec(e);if(n){if(n[1]===t)return n[2]}else break}}function _e(e){let t=new Map;for(he.lastIndex=0;;){let n=he.exec(e);if(n){let e=n[1],r=n[2];t.has(e)?t.get(e).push(r):t.set(e,[r])}else break}return t}function ve(e){let t=new Map;for(he.lastIndex=0;;){let n=he.exec(e);if(n)t.set(n[1],n[2]);else break}return t}function ye(e,t,n=``){let r=e.charCodeAt(t-1),i=r>=55296&&r<=56319?t+1:t;return e.length<=i?e:`${e.slice(0,i)}${n}`}var x=globalThis,be=`WorkerGlobalScope`in x;function xe(e){return we(e,x.location?.href).href}function Se(e){try{return!!we(e)}catch{return!1}}function Ce(e){let t=we(e).pathname;return t[0]===`/`?t:`/${t}`}function we(e,t){let{URL:n}=Ee();try{return t===void 0?new n(e):new n(e,t)}catch(e){throw Error(`Failed to construct URL: ${String(e)}`)}}var Te;function Ee(){if(!Te){let e,t;try{e=document.createElement(`iframe`),e.style.display=`none`,document.body.appendChild(e),t=e.contentWindow??x}catch{t=x}Te={URL:t.URL},e?.remove()}return Te}var S=1e3,C=60*S,De=60*C,Oe=365*24*60*60*1e3;function ke(){return new Date().getTime()}function w(){return ke()}function T(e,t){return t-e}function E(e){return typeof e==`number`?Math.round(e*1e6):e}function Ae(e,t){return e+t}function D(){return performance.now()}function O(){return{relative:D(),timeStamp:w()}}function je(){return{relative:0,timeStamp:ze()}}function Me(e){return{relative:e,timeStamp:Be(e)}}function Ne(e){return{relative:Pe(e),timeStamp:e}}function Pe(e){return e-ze()}function Fe(e){return Math.round(Ae(ze(),e))}function Ie(e){return e<Oe}function Le(){return Math.round(ke()-Ae(ze(),performance.now()))}var Re;function ze(){return Re===void 0&&(Re=performance.timing?.navigationStart??performance.timeOrigin),Re}function Be(e){let t=ke()-performance.now();return t>ze()?Math.round(Ae(t,e)):Fe(e)}function Ve(e,t,n=0,r){let i=new Date;i.setTime(i.getTime()+n);let a=`expires=${i.toUTCString()}`,o=r?.crossSite?`none`:`strict`,s=r?.domain?`;domain=${r.domain}`:``,c=r?.secure?`;secure`:``,l=r?.partitioned?`;partitioned`:``;document.cookie=`${e}=${t};${a};path=/;samesite=${o}${s}${c}${l}`}function He(e){let t=ge(document.cookie,e);if(t!==``)return t}function Ue(e){return _e(document.cookie).get(e)||[]}var We;function Ge(e){return We||=ve(document.cookie),We.get(e)}function Ke(e,t){Ve(e,``,0,t)}var qe;function Je(e=x.location?.hostname??``,t=typeof document<`u`?document.referrer:``){if(!(typeof document>`u`)){if(qe===void 0){let n=Ye(e,t);if(n){let e=`dd_site_test_${b()}`,t=n.split(`.`),r=t.pop();for(;t.length&&!He(e);)r=`${t.pop()}.${r}`,Ve(e,`test`,S,{domain:r});Ke(e,{domain:r}),qe=r}}return qe}}function Ye(e,t){try{return e||we(t).hostname}catch{}}function Xe(e,t){function n(e,t,n){n.value=r(n.value)}function r(e){return function(...t){return i(e,this,t)}}function i(e,t,n){try{return e.apply(t,n)}catch(e){a(e)}}function a(n){let r=t=>{te()&&e.error(`[MONITOR]`,t)};r(n);try{t(n)}catch(e){r(e)}}return{monitored:n,monitor:r,callMonitored:i,monitorError:a}}var Ze,{monitored:Qe,monitor:k,callMonitored:A,monitorError:j}=Xe(v,e=>Ze?.(e));function $e(e){Ze=e}function et(e){let t=x.queueMicrotask;typeof t==`function`?t(k(e)):Promise.resolve().then(k(e))}var M=class{constructor(e){this.onFirstSubscribe=e,this.observers=[]}subscribe(e){return this.addObserver(e),{unsubscribe:()=>this.removeObserver(e)}}
1notify(e){this.observers.forEach(t=>t(e))}addObserver(e){this.observers.push(e),this.observers.length===1&&this.onFirstSubscribe&&(this.onLastUnsubscribe=this.onFirstSubscribe(this)||void 0)}removeObserver(e){this.observers=this.observers.filter(t=>e!==t),!this.observers.length&&this.onLastUnsubscribe&&this.onLastUnsubscribe()}};function tt(...e){return new M(t=>{let n=e.map(e=>e.subscribe(e=>t.notify(e)));return()=>n.forEach(e=>e.unsubscribe())})}var nt=class extends M{constructor(e,t){super(),this.maxBufferSize=e,this.onDrop=t,this.buffer=[],this.droppedCount=0}notify(e){this.buffer.push(e),this.buffer.length>this.maxBufferSize&&(this.buffer.shift(),this.droppedCount++),super.notify(e)}subscribe(e){let t=!1;return et(()=>{for(let n of this.buffer){if(t)return;e(n)}t||this.addObserver(e)}),{unsubscribe:()=>{t=!0,this.removeObserver(e)}}}unbuffer(){et(()=>{this.droppedCount>0&&this.onDrop&&this.onDrop(this.droppedCount),this.maxBufferSize=this.buffer.length=0})}},rt={GRANTED:`granted`,NOT_GRANTED:`not-granted`};function it(e){let t=new M;function n(){return e===rt.GRANTED}return{tryToInit(t){e||=t},onGrantedOnce(e){if(n())e();else{let r=t.subscribe(()=>{n()&&(e(),r.unsubscribe())})}},update(n){e=n,t.notify()},isGranted:n,observable:t}}function at(e){let t=o(e);return t===`string`||t===`function`||e instanceof RegExp}function ot(e,t,n=!1){return e.some(e=>{try{if(typeof e==`function`)return e(t);if(e instanceof RegExp)return e.lastIndex=0,e.test(t);if(typeof e==`string`)return n?t.startsWith(e):e===t}catch(e){v.error(e)}return!1})}function N(e){return e}var st=`datad0g.com`,ct=`datadoghq.com`,lt=`datadoghq.eu`,ut=`ddog-gov.com`,dt=`us2.ddog-gov.com`,ft=[`ddsource`,`dd-api-key`,`dd-request-id`];function pt(e){return ft.every(t=>e.includes(t))}var mt=[`chrome-extension://`,`moz-extension://`];function ht(e){return mt.some(t=>e.includes(t))}function gt(e,t=``){return ht(e)?!1:ht(t.split(`
2`).filter(e=>{let t=e.trim();return t.length&&/^at\s+|@/.test(t)})[1]||``)}var _t="Running the Browser SDK in a Web extension content script is forbidden unless the `allowedTrackingOrigins` option is provided.",vt=`SDK initialized on a non-allowed domain.`;function yt(e,t){let n=N(x.location),r=n?n.origin:``,i=e.allowedTrackingOrigins;if(!i)return gt(r,t)?(v.error(_t),!1):!0;let a=ot(i,r);return a||v.error(vt),a}var bt={ALLOW:`allow`,MASK:`mask`,MASK_USER_INPUT:`mask-user-input`,MASK_UNLESS_ALLOWLISTED:`mask-unless-allowlisted`},xt={ALL:`all`,SAMPLED:`sampled`};function St(e,t){return e!=null&&typeof e!=`string`?(v.error(`${t} must be defined as a string`),!1):!0}function Ct(e){return e&&typeof e==`string`&&!/(datadog|ddog|datad0g|dd0g)/.test(e)?(v.error(`Site should be a valid Datadog site. ${ie} ${ne}/getting_started/site/.`),!1):!0}function wt(e,t){return e!==void 0&&!ce(e)?(v.error(`${t} Sample Rate should be a number between 0 and 100`),!1):!0}function Tt(e,t){if(!e?.clientToken){v.error(`Client Token is not configured, we will not send any data.`);return}if(e.allowedTrackingOrigins!==void 0&&!Array.isArray(e.allowedTrackingOrigins)){v.error(`Allowed Tracking Origins must be an array`);return}if(!(!Ct(e.site)||!wt(e.sessionSampleRate,`Session`)||!wt(e.telemetrySampleRate,`Telemetry`)||!wt(e.telemetryConfigurationSampleRate,`Telemetry Configuration`)||!wt(e.telemetryUsageSampleRate,`Telemetry Usage`)||!St(e.version,`Version`)||!St(e.env,`Env`)||!St(e.service,`Service`)||!yt(e,t??``))){if(e.trackingConsent!==void 0&&!pe(rt,e.trackingConsent)){v.error(`Tracking Consent should be either "granted" or "not-granted"`);return}return{clientToken:e.clientToken,proxy:e.proxy,site:e.site||`datadoghq.com`,source:Ot(e.source),beforeSend:e.beforeSend&&ae(e.beforeSend,`beforeSend threw an error:`),cookieOptions:Et(e),sessionPersistence:e.sessionPersistence,sessionSampleRate:e.sessionSampleRate??100,telemetrySampleRate:e.telemetrySampleRate??20,telemetryConfigurationSampleRate:e.telemetryConfigurationSampleRate??5,telemetryUsageSampleRate:e.telemetryUsageSampleRate??5,service:e.service??void 0,env:e.env??void 0,version:e.version??void 0,datacenter:e.datacenter??void 0,silentMultipleInit:!!e.silentMultipleInit,trackingConsent:e.trackingConsent??rt.GRANTED,trackAnonymousUser:e.trackA
2nonymousUser??!0,storeContextsAcrossPages:!!e.storeContextsAcrossPages,variant:e.variant,sdkVersion:e.sdkVersion,replica:e.replica}}}function Et(e){let t={};if(t.secure=!!e.useSecureSessionCookie||!!e.usePartitionedCrossSiteSessionCookie,t.crossSite=!!e.usePartitionedCrossSiteSessionCookie,t.partitioned=!!e.usePartitionedCrossSiteSessionCookie,e.trackSessionAcrossSubdomains){let e=Je();if(!e)return;t.domain=e}return t}function Dt(e){return{session_sample_rate:e.sessionSampleRate,telemetry_sample_rate:e.telemetrySampleRate,telemetry_configuration_sample_rate:e.telemetryConfigurationSampleRate,telemetry_usage_sample_rate:e.telemetryUsageSampleRate,use_before_send:!!e.beforeSend,use_partitioned_cross_site_session_cookie:e.usePartitionedCrossSiteSessionCookie,use_secure_session_cookie:e.useSecureSessionCookie,use_proxy:!!e.proxy,silent_multiple_init:e.silentMultipleInit,track_session_across_subdomains:e.trackSessionAcrossSubdomains,track_anonymous_user:e.trackAnonymousUser,session_persistence:Array.isArray(e.sessionPersistence)?e.sessionPersistence[0]:e.sessionPersistence,store_contexts_across_pages:!!e.storeContextsAcrossPages,allow_untrusted_events:!!e.allowUntrustedEvents,tracking_consent:e.trackingConsent,use_allowed_tracking_origins:Array.isArray(e.allowedTrackingOrigins),source:e.source,sdk_version:e.sdkVersion,variant:e.variant}}function Ot(e){return e===`flutter`||e===`unity`?e:`browser`}function kt(e,t,n){return{build(r,i){return jt({proxy:e.proxy,site:e.site,path:`/api/v2/${t}`,parameters:Mt(e,t,r,i,n)})},trackType:t}}function At({replica:e,proxy:t,source:n},r){if(e)return kt({clientToken:e.clientToken,proxy:t,source:n,site:ct},r,r===`rum`?[`application.id=${e.applicationId}`]:void 0)}function jt({proxy:e,site:t=ct,path:n,parameters:r=``,subdomain:i}){let a=n;if(r&&(a+=`?${r}`),typeof e==`string`){let t=`${xe(e)}?ddforward=${encodeURIComponent(a)}`;return i&&(t+=`&ddforwardSubdomain=${i}`),t}if(typeof e==`function`)return e({path:n,parameters:r,subdomain:i});let o=t.split(`.`),s=o.pop(),c=`browser-intake-${o.join(`-`)}.${s}`;return i&&(c=`${i}.${c}`),`https://${c}${a}`}function Mt({clientToken:e,source:t=`browser`},n,r,{retry:i,encoding:a},o=[]){let s=[`ddsource=${t}`,`dd-api-key=${e}`,`dd-evp-origin-version=7.4.0`,`dd-evp-origin=browser`,`dd-request-id=${b()}`].concat(o);return a&&s.push(`dd-evp-encoding=${a}`),n===`rum`&&(s.push(`batch_time=${w()}`,`_dd.api=${r}`),i&&s.push(`_dd.retry_count=${i.count}`,`_dd.retry_after=${i.lastFailureStatus}`)),s.join(`&`)}var Nt=function(e){return e.TRACK_INTAKE_REQUESTS=`track_intake_requests`,e.PARTIAL_VIEW_UPDATES=`partial_view_updates`,e}({}),Pt=new Set;function Ft(e){Array.isArray(e)&&It(e.filter(e=>pe(Nt,e)))}function It(e){e.forEach(e=>{Pt.add(e)})}function Lt(e){return Pt.has(e)}function Rt(){return Pt}function zt(e,t){let n=x,r;return n.Zone&&typeof n.Zone.__symbol__==`function`&&(r=e[n.Zone.__symbol__(t)]),r||=e[t],r}function P(e,t){return zt(x,`setTimeout`)(k(e),t)}function F(e){zt(x,`clearTimeout`)(e)}function Bt(e,t){return zt(x,`setInterval`)(k(e),t)}function Vt(e){zt(x,`clearInterval`)(e)}function Ht(e,t,n){let r=n?.leading===void 0?!0:n.leading,i=n?.trailing===void 0?!0:n.trailing,a=!1,o,s;return{throttled:(...n)=>{if(a){o=n;return}r?e(...n):o=n,a=!0,s=P(()=>{i&&o&&e(...o),a=!1,o=void 0},t)},cancel:()=>{F(s),a=!1,o=void 0}}}function I(){}var Ut=`?`;function Wt(e){let t=[],n=rn(e,`stack`),r=String(e);if(n?.startsWith(r)&&(n=n.slice(r.length)),n&&n.split(`
3`).forEach(e=>{let n=Yt(e)||Zt(e)||$t(e)||nn(e);n&&(!n.func&&n.line&&(n.func=Ut),t.push(n))}),t.length>0&&un()&&e instanceof Error){let n=[],r=e;for(;(r=Object.getPrototypeOf(r))&&cn(r);){let e=r.constructor?.name||Ut;n.push(e)}for(let e=n.length-1;e>=0&&t[0]?.func===n[e];e--)t.shift()}return{message:rn(e,`message`),name:rn(e,`name`),stack:t}}var Gt=`((?:file|https?|blob|chrome-extension|electron|native|eval|webpack|snippet|<anonymous>|\\w+\\.|\\/).*?)`,Kt=`(?::(\\d+))`,qt=RegExp(`^\\s*at (.*?) ?\\(${Gt}${Kt}?${Kt}?\\)?\\s*$`,`i`),Jt=RegExp(`\\((\\S*)${Kt}${Kt}\\)`);function Yt(e){let t=qt.exec(e);if(!t)return;let n=t[2]?.indexOf(`native`)===0,r=t[2]?.indexOf(`eval`)===0,i=Jt.exec(t[2]);return r&&i&&(t[2]=i[1],t[3]=i[2],t[4]=i[3]),{args:n?[t[2]]:[],column:t[4]?+t[4]:void 0,func:t[1]||Ut,line:t[3]?+t[3]:void 0,url:n?void 0:t[2]}}var Xt=RegExp(`^\\s*at\\s*(?:(.*)?(?: @))?\\s*${Gt}${Kt}?${Kt}??\\s*$`,`i`);function Zt(e){let t=Xt.exec(e);if(t)return{args:[],column:t[4]?+t[4]:void 0,func:t[1]||Ut,line:t[3]?+t[3]:void 0,url:t[2]}}var Qt=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i;function $t(e){let t=Qt.exec(e);if(t)return{args:[],column:t[4]?+t[4]:void 0,func:t[1]||Ut,line:+t[3],url:t[2]}}
3var en=/^\s*(.*?)(?:\((.*?)\))?(?:(?:(?:^|@)((?:file|https?|blob|chrome|webpack|resource|capacitor|\[native).*?|[^@]*bundle|\[wasm code\])(?::(\d+))?(?::(\d+))?)|@)\s*$/i,tn=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;function nn(e){let t=en.exec(e);if(!t)return;let n=t[3]&&t[3].indexOf(` > eval`)>-1,r=tn.exec(t[3]);return n&&r&&(t[3]=r[1],t[4]=r[2],t[5]=void 0),{args:t[2]?t[2].split(`,`):[],column:t[5]?+t[5]:void 0,func:t[1]||Ut,line:t[4]?+t[4]:void 0,url:t[3]}}function rn(e,t){return s(e)&&typeof e[t]==`string`?e[t]:void 0}function an(e,t,n,r){if(t===void 0)return;let{name:i,message:a}=sn(e);return{name:i,message:a,stack:[{url:t,column:r,line:n}]}}var on=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?([\s\S]*)$/;function sn(e){let t,n;return{}.toString.call(e)===`[object String]`&&([,t,n]=on.exec(e)),{name:t,message:n}}function cn(e){return String(e.constructor).startsWith(`class `)}var ln;function un(){if(ln!==void 0)return ln;class e extends Error{constructor(){super(),this.name=`Error`}}let[t,n]=[e,Error].map(e=>new e);return ln=cn(Object.getPrototypeOf(t))&&n.stack!==t.stack,ln}function dn(e){let t=Error(e);t.name=`HandlingStack`;let n;return A(()=>{let e=Wt(t);e.stack=e.stack.slice(2),n=fn(e)}),n}function fn(e){let t=pn(e);return e.stack.forEach(e=>{let n=e.func===`?`?`<anonymous>`:e.func,r=e.args&&e.args.length>0?`(${e.args.join(`, `)})`:``,i=e.line?`:${e.line}`:``,a=e.line&&e.column?`:${e.column}`:``;t+=`\n  at ${n}${r} @ ${e.url}${i}${a}`}),t}function pn(e){return`${e.name||`Error`}: ${e.message}`}function L(e,t,n,{computeHandlingStack:r}={}){let i=e[t];if(typeof i!=`function`)if(t in e&&typeof t==`string`&&t.startsWith(`on`))i=I;else return{stop:I};let a=!1,{stop:o}=mn(e,t,i,function(){if(a)return i.apply(this,arguments);let e=Array.from(arguments);return hn(n,{target:this,parameters:e,handlingStack:r?dn(`instrumented method`):void 0},()=>i.apply(this,e))});return{stop:()=>{a=!0,o()}}}function mn(e,t,n,r){return e[t]=r,{stop:()=>{e[t]===r&&(e[t]=n)}}}function hn(e,t,n){let r;A(e,null,[{...t,onPostCall:e=>{r=e}}]);let i=n();return r&&A(r,null,[i]),i}function gn(e,t,n){let r=Object.getOwnPropertyDescriptor(e,t);if(!r?.set||!r.configurable)return{stop:I};let i=I,a=(e,t)=>{P(()=>{a!==i&&n(e,t)},0)},o=function(e){r.set.call(this,e),a(this,e)};return Object.defineProperty(e,t,{set:o}),{stop:()=>{Object.getOwnPropertyDescriptor(e,t)?.set===o&&Object.defineProperty(e,t,r),a=i}}}var R=function(e){return e.BEFORE_UNLOAD=`beforeunload`,e.CLICK=`click`,e.DBL_CLICK=`dblclick`,e.KEY_DOWN=`keydown`,e.LOAD=`load`,e.POP_STATE=`popstate`,e.SCROLL=`scroll`,e.TOUCH_START=`touchstart`,e.TOUCH_END=`touchend`,e.TOUCH_MOVE=`touchmove`,e.VISIBILITY_CHANGE=`visibilitychange`,e.PAGE_SHOW=`pageshow`,e.FREEZE=`freeze`,e.RESUME=`resume`,e.DOM_CONTENT_LOADED=`DOMContentLoaded`,e.POINTER_DOWN=`pointerdown`,e.POINTER_UP=`pointerup`,e.POINTER_CANCEL=`pointercancel`,e.HASH_CHANGE=`hashchange`,e.PAGE_HIDE=`pagehide`,e.MOUSE_DOWN=`mousedown`,e.MOUSE_UP=`mouseup`,e.MOUSE_MOVE=`mousemove`,e.FOCUS=`focus`,e.BLUR=`blur`,e.CONTEXT_MENU=`contextmenu`,e.RESIZE=`resize`,e.CHANGE=`change`,e.INPUT=`input`,e.PLAY=`play`,e.PAUSE=`pause`,e.SECURITY_POLICY_VIOLATION=`securitypolicyviolation`,e.SELECTION_CHANGE=`selectionchange`,e.STORAGE=`storage`,e.UNHANDLED_REJECTION=`unhandledrejection`,e}({});function z(e,t,n,r){return _n(e,[t],n,r)}function _n(e,t,n,{once:r,capture:i,passive:a}={}){let o=k(e=>{!e.isTrusted&&!e.__ddIsTrusted&&yn===!1||(r&&u(),n(e))}),s=a?{capture:i,passive:a}:i,c=window.EventTarget&&e instanceof EventTarget?window.EventTarget.prototype:e,l=zt(c,`addEventListener`);t.forEach(t=>l.call(e,t,o,s));function u(){let n=zt(c,`removeEventListener`);t.forEach(t=>n.call(e,t,o,s))}return{stop:u}}function vn(e,t){if(!e)return!1;try{return z(e,t,I).stop(),!0}catch{return!1}}var yn;function bn(e){yn!==!0&&(yn=e??!1)}var xn=1024,Sn=1024*xn,Cn=/[^\u0000-\u007F]/;function wn(e){return Cn.test(e)?new TextEncoder().encode(e).length:e.length}function Tn(e){if(e.length===1)return e[0];let t=e.reduce((e,t)=>
3e+t.length,0),n=new Uint8Array(t),r=0;for(let t of e)n.set(t,r),r+=t.length;return n}function En(e,t,n){if(typeof e!=`object`||!e)return JSON.stringify(e);let r=Dn(Object.prototype),i=Dn(Array.prototype),a=Dn(Object.getPrototypeOf(e)),o=Dn(e);try{return JSON.stringify(e,t,n)}catch{return`<error: unable to serialize object>`}finally{r(),i(),a(),o()}}function Dn(e){let t=e,n=t.toJSON;return n?(delete t.toJSON,()=>{t.toJSON=n}):I}var On=220*xn,kn=`$`,An=3;function B(e,t=On){let n=Dn(Object.prototype),r=Dn(Array.prototype);try{let n=[],r=new WeakMap,i=jn(e,kn,void 0,n,r),a=JSON.stringify(i),o=a?a.length:0;if(o>t){In(t,`discarded`,e);return}for(;n.length>0&&o<t;){let i=n.shift(),a=0;if(Array.isArray(i.source))for(let s=0;s<i.source.length;s++){let c=jn(i.source[s],i.path,s,n,r);if(c===void 0?o+=4:o+=JSON.stringify(c).length,o+=a,a=1,o>t){In(t,`truncated`,e);break}i.target[s]=c}else for(let s in i.source)if(Object.prototype.hasOwnProperty.call(i.source,s)){let c=jn(i.source[s],i.path,s,n,r);if(c!==void 0&&(o+=JSON.stringify(c).length+a+s.length+An,a=1),o>t){In(t,`truncated`,e);break}i.target[s]=c}}return i}finally{n(),r()}}function jn(e,t,n,r,i){let a=Fn(e);if(!a||typeof a!=`object`)return Mn(a);let o=Nn(a);if(o!==`[Object]`&&o!==`[Array]`&&o!==`[Error]`)return o;let s=e;if(i.has(s))return`[Reference seen at ${i.get(s)}]`;let c=n===void 0?t:`${t}.${n}`,l=Array.isArray(a)?[]:{};return i.set(s,c),r.push({source:a,target:l,path:c}),l}function Mn(e){return typeof e==`bigint`?`[BigInt] ${e.toString()}`:typeof e==`function`?`[Function] ${e.name||`unknown`}`:typeof e==`symbol`?`[Symbol] ${e.description||e.toString()}`:e}function Nn(e){try{if(e instanceof Event)return Pn(e);if(e instanceof RegExp)return`[RegExp] ${e.toString()}`;let t=Object.prototype.toString.call(e).match(/\[object (.*)\]/);if(t?.[1])return`[${t[1]}]`}catch{}return`[Unserializable]`}function Pn(e){return{type:e.type,isTrusted:e.isTrusted,currentTarget:e.currentTarget?Nn(e.currentTarget):null,target:e.target?Nn(e.target):null}}function Fn(e){let t=e;if(t&&typeof t.toJSON==`function`)try{return t.toJSON()}catch{}return e}function In(e,t,n){v.warn(`The data provided has been ${t} as it is over the limit of ${e} characters:`,n)}var Ln=`No stack, consider using an instance of Error`;function Rn({originalError:e,stackTrace:t,source:n,useFallbackStack:r=!0,nonErrorPrefix:i}){let a=Wn(e);return!t&&a&&(t=Wt(e)),{source:n,type:t?t.name:void 0,message:Bn(t,a,i,e),stack:t?fn(t):r?Ln:void 0}}function zn({stackTrace:e,originalError:t,handlingStack:n,componentStack:r,startClocks:i,nonErrorPrefix:a,useFallbackStack:o=!0,source:s,handling:c}){return{startClocks:i,handling:c,handlingStack:n,componentStack:r,originalError:t,...Rn({originalError:t,stackTrace:e,source:s,useFallbackStack:o,nonErrorPrefix:a}),causes:Wn(t)?Gn(t,s):void 0,fingerprint:Vn(t),context:Hn(t)}}function Bn(e,t,n,r){return e?.message&&e?.name?e.message:t?`Empty message`:n?`${n} ${En(B(r))}`:En(B(r))}function Vn(e){return Wn(e)&&`dd_fingerprint`in e?String(e.dd_fingerprint):void 0}function Hn(e){if(s(e))return e.dd_context}function Un(e){return/@ (.+)/.exec(e)?.[1]}function Wn(e){try{return e instanceof Error||Object.prototype.toString.call(e)===`[object Error]`}catch{return!1}}function Gn(e,t){let n=[],r=e.cause;for(;r!=null&&n.length<10;){let e=Rn({originalError:r,source:t,useFallbackStack:!1});n.push(e),r=Wn(r)?r.cause:void 0}return n.length?n:void 0}var V={AGENT:`agent`,CONSOLE:`console`,CUSTOM:`custom`,LOGGER:`logger`,NETWORK:`network`,SOURCE:`source`,REPORT:`report`},Kn=function(e){return e.UNCAUGHT=`Uncaught`,e.PROVIDED=`Provided`,e}({}),qn=function(e){return e.HANDLED=`handled`,e.UNHANDLED=`unhandled`,e}({});function Jn(){return new M(e=>{let t=(t,n)=>{let r=zn({stackTrace:n,originalError:t,startClocks:O(),nonErrorPrefix:`Uncaught`,source:V.SOURCE,handling:`unhandled`});e.notify(r)},{stop:n}=Yn(t),{stop:r}=Xn(t);return()=>{n(),r()}})}function Yn(e){return L(x,`onerror`,({parameters:[t,n,r,i,a]})=>{let o;Wn(a)||(o=an(t,n,r,i)),e(a??t,o)})}function Xn(e){return vn(x.window,`unhandledrejection`)?L(x,`onunhandledrejection`,({parameters:[t]})=>{e(t.reason||`Empty reason`)}):{stop:I}}function Zn(e){let t={version:`7.4.0`,onReady(e){e()},...e};return Object.defineProperty(t,`_setDebug`,{get(){return ee},enumerable:!1}),t}function Qn(e,t,n){let r=e[t];r&&!r.q&&r.version&&v.warn(`SDK is loaded more than once. This is unsupported and might have unex
3pected behavior.`),e[t]=n,r?.q&&r.q.forEach(e=>ae(e,`onReady callback threw an error:`)())}function $n(e,t){t.silentMultipleInit||v.error(`${e} is already initialized.`)}var er={intervention:`intervention`,deprecation:`deprecation`,cspViolation:`csp_violation`};function tr(e){let t=[];e.includes(er.cspViolation)&&t.push(rr());let n=e.filter(e=>e!==er.cspViolation);return n.length&&t.push(nr(n)),tt(...t)}function nr(e){return new M(t=>{if(!window.ReportingObserver)return;let n=k((e,n)=>e.forEach(e=>t.notify(ir(e)))),r=new window.ReportingObserver(n,{types:e,buffered:!0});return r.observe(),()=>{r.disconnect()}})}function rr(){return new M(e=>{if(!vn(document,`securitypolicyviolation`))return;let{stop:t}=z(document,`securitypolicyviolation`,t=>{e.notify(ar(t))});return t})}function ir(e){let{type:t,body:n}=e;return or({type:n.id,message:`${t}: ${n.message}`,originalError:e,stack:sr(n.id,n.message,n.sourceFile,n.lineNumber,n.columnNumber)})}function ar(e){let t=`'${e.blockedURI}' blocked by '${e.effectiveDirective}' directive`;return or({type:e.effectiveDirective,message:`${er.cspViolation}: ${t}`,originalError:e,csp:{disposition:e.disposition},stack:sr(e.effectiveDirective,e.originalPolicy?`${t} of the policy "${ye(e.originalPolicy,100,`...`)}"`:`no policy`,e.sourceFile,e.lineNumber,e.columnNumber)})}function or(e){return{startClocks:O(),source:V.REPORT,handling:`unhandled`,...e}}function sr(e,t,n,r,i){return n?fn({name:e,message:t,stack:[{func:`?`,url:n,line:r??void 0,column:i??void 0}]}):void 0}function cr(e){let{env:t,service:n,version:r,datacenter:i,sdkVersion:a,variant:o}=e,s=[lr(`sdk_version`,a??`7.4.0`)];return t&&s.push(lr(`env`,t)),n&&s.push(lr(`service`,n)),r&&s.push(lr(`version`,r)),i&&s.push(lr(`datacenter`,i)),o&&s.push(lr(`variant`,o)),s}function lr(e,t){let n=t?`${e}:${t}`:e;return(n.length>200||dr(n))&&v.warn(`Tag ${n} doesn't meet tag requirements and will be sanitized. ${ie} ${ne}/getting_started/tagging/#defining-tags`),ur(n)}function ur(e){return e.replace(/,/g,`_`)}function dr(e){return RegExp(`[^\\p{Ll}\\p{Lo}0-9_:./-]`,`u`).test(e)}function fr(e,t){let n=x.__ddBrowserSdkExtensionCallback;n&&n({type:e,payload:t})}function pr(){let e=x.navigator;return{status:e.onLine?`connected`:`not_connected`,interfaces:e.connection?.type?[e.connection.type]:void 0,effective_type:e.connection?.effectiveType}}function mr(e,t){return zt(x,`fetch`)(e,t)}function hr(e){return e>=500}function gr(e){try{return e.clone()}catch{return}}var _r=80*xn,vr=20*Sn,yr=C,br=S;function xr(e,t,n,r,i,a){t.transportStatus===0&&t.queuedPayloads.size()===0&&t.bandwidthMonitor.canHandle(e)?Cr(e,t,n,a,{onSuccess:()=>wr(0,t,n,r,i,a),onFailure:()=>{t.queuedPayloads.enqueue(e)||a.notify({type:`queue-full`,bandwidth:t.bandwidthMonitor.stats(),payload:e}),Sr(t,n,r,i,a)}}):t.queuedPayloads.enqueue(e)||a.notify({type:`queue-full`,bandwidth:t.bandwidthMonitor.stats(),payload:e})}function Sr(e,t,n,r,i){e.transportStatus===2&&P(()=>{Cr(e.queuedPayloads.first(),e,t,i,{onSuccess:()=>{e.queuedPayloads.dequeue(),e.currentBackoffTime=br,wr(1,e,t,n,r,i)},onFailure:()=>{e.currentBackoffTime=Math.min(yr,e.currentBackoffTime*2),Sr(e,t,n,r,i)}})},e.currentBackoffTime)}function Cr(e,t,n,r,{onSuccess:i,onFailure:a}){t.bandwidthMonitor.add(e),n(e,n=>{t.bandwidthMonitor.remove(e),Tr(n)?(t.transportStatus=t.bandwidthMonitor.ongoingRequestCount>0?1:2,e.retry={count:e.retry?e.retry.count+1:1,lastFailureStatus:n.status},r.notify({type:`failure`,bandwidth:t.bandwidthMonitor.stats(),payload:e}),a()):(t.transportStatus=0,r.notify({type:`success`,bandwidth:t.bandwidthMonitor.stats(),payload:e}),i())})}function wr(e,t,n,r,i,a){e===0&&t.queuedPayloads.isFull()&&!t.queueFullReported&&(i({message:`Reached max ${r} events size queued for upload: ${vr/Sn}MiB`,source:V.AGENT,startClocks:O()}),t.queueFullReported=!0);let o=t.queuedPayloads;for(t.queuedPayloads=Dr();o.size()>0;)xr(o.dequeue(),t,n,r,i,a)}function Tr(e){return e.type!==`opaque`&&(e.status===0&&!navigator.onLine||e.status===408||e.status===429||hr(e.status))}function Er(){return{transportStatus:0,currentBackoffTime:br,bandwidthMonitor:Or(),queuedPayloads:Dr(),queueFullReported:!1}}function Dr(){let e=[];return{bytesCount:0,enqueue(t){return this.isFull()?!1:(e.push(t),this.bytesCount+=t.bytesCount,!0)},first(){return e[0]},dequeue(){let t=e.shift();return t&&(this.bytesCount-=t.bytesCount),t},size(){return e.length},isFull(){return this.bytesCount>=vr}}}function Or(){return{ongoingRequestCount:0,ongoingByteCount:0,canHandle(e){return this.ongoingRequestCount===0||this.ongoingByteCount+e.bytesCount<=_r&&this.ongoingRequestCount<32},add(e){this.ongoingRequestCount+=1,this.ongoingByteCount+=e.bytesCount},remove(e){--this.ongoingRequestCount,this.ongoingByteCount-=e.bytesCount},stats(){return{ongoingByteCount:this.ongoingByteCount,ongoingRequestCount:this.ongoingRequestCount}}}}var kr=16*xn;function Ar(e,t,n=kr){let r=new M,i=Er();return{observable:r,send:n=>{for(let a of e)xr(n,i,(e,t)=>{Pr(a,e,t)},a.trackType,t,r)},sendOnExit:t=>{for(let r of e)jr(r,n,t)}}}function jr(e,t,n){if(n.bytesCount<t)try{let t=e.build(`beacon`,n);if(navigator.sendBeacon(t,n.data))return}catch(e){Nr(e)}Pr(e,n)}var Mr=!1;function Nr(e){Mr||(Mr=!0,j(e))}function Pr(e,t,n){mr(e.build(`fetch`,t),{method:`POST`,body:t.data,mode:`cors`}).then(k(e=>n?.({status:e.status,type:e.type}))).catch(k(()=>n?.({status:0})))}var Fr=function(e){return e.RECORDS=`records`,e.PROFILES=`profiles`,e}({});function Ir(){let e=zr();if(e)return{getCapabilities(){return JSON.parse(e.getCapabilities?.()||`[]`)},getPrivacyLevel(){return e.getPrivacyLevel?.()},getIsTraceSampled(){return JSON.parse(e.getIsTraceSampled?.()||`null`)},getAllowedWebViewHosts(){return JSON.parse(e.getAllowedWebViewHosts())},send(t,n,r){let i=r?{id:r}:void 0;e.send(JSON.stringify({eventType:t,event:n,view:i}))}}}function Lr(e){let t=Ir();return!!t&&t.getCapabilities().includes(e)}function H(e=x.location?.hostname){return Ir()?.getAllowedWebViewHosts().some(t=>Rr(e,t))??!1}function Rr(e,t){if(!t.includes(`*`))return e===t||e.endsWith(`.${t}`);let n=t.split(`*`);if(n.length!==2)return v.error(`Invalid WebView host pattern "${t}": only one wildcard (*) is supported.`),!1;let[r,i]=n;return e.length>r.length+i.length&&e.startsWith(r)&&e.endsWith(i)}function zr(){return x.DatadogEventBridge}function Br(e,t){for(let n=e.length-1;n>=0;--n){let r=e[n];if(t(r,n,e))return r}}function Vr(e){return Object.values(e)}function Hr(e){return Object.entries(e)}var Ur={HIDDEN:`visibility_hidden`,UNLOADING:`before_unload`,PAGEHIDE:`page_hide`,FROZEN:`page_frozen`};function Wr(){return new M(e=>{if(be)return;let{stop:t}=_n(window,[`visibilitychange`,`freeze`],t=>{t.type===`visibilitychange`&&document.visibilityState===`hidden`?e.notify({reason:Ur.HIDDEN}):t.type===`freeze`&&e.notify({reason:Ur.FROZEN})},{capture:!0}),n=z(window,`beforeunload`,()=>{e.notify({reason:Ur.UNLOADING})}).stop;return()=>{t(),n()}})}function Gr(e){return Vr(Ur).includes(e)}var Kr=256*xn;function qr({encoder:e,request:t,flushController:n}){let r={},i=n.flushObservable.subscribe(e=>s(e));function a(t,i,a){if(a!==void 0){let o;r[a]===void 0?(n.notifyBeforeAddMessage(i),o=0):o=i-e.estimateEncodedBytesCount(r[a]),r[a]=t,n.notifyAfterAddMessage(o)}
3else n.notifyBeforeAddMessage(i),e.write(e.isEmpty?t:`\n${t}`,e=>{n.notifyAfterAddMessage(e-i)})}function o(t,n){let r=En(t),i=e.estimateEncodedBytesCount(r);if(i>=Kr){v.warn(`Discarded a message whose size was bigger than the maximum allowed size ${Kr/xn}KiB. ${ie} ${re}/#technical-limitations`);return}a(r,i,n)}function s(n){let i=Vr(r).join(`
4`);r={};let a=Gr(n.reason),o=a?t.sendOnExit:t.send;if(a&&e.isAsync){let t=e.finishSync();t.outputBytesCount&&o(Jr(t));let n=[t.pendingData,i].filter(Boolean).join(`
5`);n&&o({data:n,bytesCount:wn(n)})}else i&&e.write(e.isEmpty?i:`\n${i}`),e.finish(e=>{o(Jr(e))})}return{flushController:n,add:o,upsert:o,stop:i.unsubscribe}}function Jr(e){let t;return t=typeof e.output==`string`?e.output:new Blob([e.output],{type:`text/plain`}),{data:t,bytesCount:e.outputBytesCount,encoding:e.encoding}}var Yr=30*S,Xr=be?1:50;function Zr({pageMayExitObservable:e,sessionExpireObservable:t}){let n,r=new M,i=e.subscribe(e=>{n=e.reason;try{r.notify(e.reason)}finally{n=void 0}l(e.reason)}),a=t.subscribe(()=>l(`session_expire`)),o=new M(()=>()=>{i.unsubscribe(),a.unsubscribe()}),s=0,c=0;function l(e){if(c===0)return;let t=c,n=s;c=0,s=0,f(),o.notify({reason:e,messagesCount:t,bytesCount:n})}let u;function d(){u===void 0&&(u=P(()=>{l(`duration_limit`)},Yr))}function f(){F(u),u=void 0}return{flushObservable:o,preparePageExitFlushObservable:r,get messagesCount(){return c},notifyBeforeAddMessage(e){s+e>=kr&&l(n??`bytes_limit`),c+=1,s+=e,d()},notifyAfterAddMessage(e=0){s+=e,c>=Xr?l(n??`messages_limit`):s>=kr&&l(n??`bytes_limit`)}}}function Qr(){let e=``,t=0;return{isAsync:!1,get isEmpty(){return!e},write(n,r){let i=wn(n);t+=i,e+=n,r&&r(i)},finish(e){e(this.finishSync())},finishSync(){let n={output:e,outputBytesCount:t,rawBytesCount:t,pendingData:``};return e=``,t=0,n},estimateEncodedBytesCount(e){return e.length}}}var $r={LOG:`log`,CONFIGURATION:`configuration`,USAGE:`usage`};function ei(){let e=[];return{register(t){return e.push(t),{unregister(){e=e.filter(e=>e!==t)}}},trigger(t){let n=[];for(let r of e){let e=r(t);if(e===`DISCARDED`)return ti;e!==`SKIPPED`&&n.push(e)}return d(...n)}}}var ti=`DISCARDED`,U=`SKIPPED`,ni=[`https://www.datadoghq-browser-agent.com`,`https://www.datad0g-browser-agent.com`,`https://d3uc069fcn7uxw.cloudfront.net`,`https://d20xtzwzcl0ceb.cloudfront.net`,`http://localhost`,`<anonymous>`],ri=function(e){return e.LOGS=`browser-logs-sdk`,e.RUM=`browser-rum-sdk`,e}({}),ii=function(e){return e.CUSTOMER_DATA_METRIC_NAME=`Customer data measures`,e.REMOTE_CONFIGURATION_METRIC_NAME=`remote configuration metrics`,e.RECORDER_INIT_METRICS_TELEMETRY_NAME=`Recorder init metrics`,e.SEGMENT_METRICS_TELEMETRY_NAME=`Segment network request metrics`,e.INITIAL_VIEW_METRICS_TELEMETRY_NAME=`Initial view metrics`,e.SESSION_MANAGER_INIT_METRICS_TELEMETRY_NAME=`Session manager init metrics`,e}({}),ai=1,oi=[ut,dt],si=15,ci;function li(){return ci||=new nt(100),ci}function ui(e,t,n){let r=new M,{enabled:i,metricsEnabled:a}=di(e,t,n,r),{stop:o}=fi(t,r);return{stop:o,enabled:i,metricsEnabled:a}}function di(e,t,n,r,i=ai,a=si){let o={},s=!oi.includes(t.site)&&oe(t.telemetrySampleRate),c={[$r.LOG]:s,[$r.CONFIGURATION]:s&&oe(t.telemetryConfigurationSampleRate),[$r.USAGE]:s&&oe(t.telemetryUsageSampleRate),metric:s&&oe(i)},l=pi(),u=li();return u.subscribe(({rawEvent:t,metricName:i})=>{if(i&&!c.metric||!c[t.type])return;let s=i||t.status||t.type,u=o[s];if(u||=o[s]=new Set,u.size>=a)return;let d=En(t);if(u.has(d))return;let p=n.trigger({startTime:O().relative});if(p===`DISCARDED`)return;let m=f(p,e,t,l);r.notify(m),fr(`telemetry`,m),u.add(d)}),u.unbuffer(),$e(gi),{enabled:s,metricsEnabled:c.metric};function f(e,n,r,i){return d({type:`telemetry`,date:O().timeStamp,service:n,version:`7.4.0`,source:`browser`,_dd:{format_version:2},telemetry:d(r,{runtime_env:i,connectivity:pr(),sdk_setup:`npm`}),ddtags:cr(t).join(`,`),experimental_features:Array.from(Rt())},e)}}function fi(e,t){let n=[];if(H()){let e=Ir(),r=t.subscribe(t=>e.send(`internal_telemetry`,t));n.push(r.unsubscribe)}else{let r=[kt(e,`rum`)],i=At(e,`rum`);i&&mi(e)&&r.push(i);let a=qr({encoder:Qr(),request:Ar(r,I),flushController:Zr({pageMayExitObservable:Wr(),sessionExpireOb
5servable:new M})});n.push(a.stop);let o=t.subscribe(a.add);n.push(o.unsubscribe)}return{stop:()=>n.forEach(e=>e())}}function pi(){return{is_local_file:x.location?.protocol===`file:`,is_worker:be}}function mi(e){return e.site===st}function hi(e,t){te()&&v.debug(`[Telemetry]`,e,t),li().notify({rawEvent:{type:$r.LOG,message:e,status:`debug`,...t}})}function gi(e,t){li().notify({rawEvent:{type:$r.LOG,status:`error`,...yi(e),...t}})}function _i(e){li().notify({rawEvent:{type:$r.CONFIGURATION,configuration:e}})}function vi(e,t){li().notify({rawEvent:{type:$r.LOG,message:e,status:`debug`,...t},metricName:e})}function W(e){li().notify({rawEvent:{type:$r.USAGE,usage:e}})}function yi(e){if(Wn(e)){let t=Wt(e);return{error:{kind:t.name,stack:fn(bi(t))},message:t.message}}return{error:{stack:Ln},message:`Uncaught ${En(e)}`}}function bi(e){return e.stack=e.stack.filter(e=>!e.url||ni.some(t=>e.url.startsWith(t))),e}function xi(e){let t=new Set;return e.forEach(e=>t.add(e)),Array.from(t)}function Si(e,t){let n=e.indexOf(t);n>=0&&e.splice(n,1)}function Ci(e){return Array.isArray(e)&&e.length>0}var wi=1/0,Ti=C,Ei,Di=new Set;function Oi(){Di.forEach(e=>e())}function ki({expireDelay:e,maxEntries:t}){let n=[];Ei||=Bt(()=>Oi(),Ti);let r=()=>{let t=D()-e;for(;n.length>0&&n[n.length-1].endTime<t;)n.pop()};Di.add(r);function i(e,r){let i={value:e,startTime:r,endTime:wi,remove:()=>{Si(n,i)},close:e=>{i.endTime=e}};return t&&n.length>=t&&n.pop(),n.unshift(i),i}function a(e=wi,t={returnInactive:!1}){for(let r of n)if(r.startTime<=e){if(t.returnInactive||e<=r.endTime)return r.value;break}}function o(e){let t=n[0];t?.endTime===wi&&t.close(e)}function s(e=wi,t=0){let r=Ae(e,t);return n.filter(t=>t.startTime<=r&&e<=t.endTime).map(e=>e.value)}function c(e=wi,t=0){let r=Ae(e,t);return n.filter(t=>t.startTime<=r&&e<=t.endTime)}function l(e){return n.filter(t=>t.startTime===e)}function u(){n=[]}function d(){Di.delete(r),Di.size===0&&Ei&&(Vt(Ei),Ei=void 0)}return{add:i,find:a,closeActive:o,findAll:s,findAllEntries:c,getEntries:l,reset:u,stop:d}}function Ai(e,t){return e*t/100}var ji=new Map;function Mi(e,t){if(t===100)return!0;if(t===0)return!1;let n=ji.get(t);if(e===n?.sessionId)return n.decision;let r=Ni(BigInt(`0x${e.split(`-`)[4]}`),t);return ji.set(t,{sessionId:e,decision:r}),r}function Ni(e,t){let n=2n**64n,r=e*1111111111111111111n%n;return Number(r)<=t/100*Number(n)}var Pi=4*De,Fi=15*C,Ii=Oe,G={COOKIE:`cookie`,MEMORY:`memory`,LOCAL_STORAGE:`local-storage`};async function Li(e,t){let n=`dd_cookie_test_${b()}`,r=`test`,i=e(n,t);try{return await i.getAllAndSet(()=>({value:r,expireDelay:C})),(await i.getAll()).includes(r)}catch(e){return v.error(e),!1}finally{try{await i.getAllAndSet(()=>({value:``,expireDelay:0}))}catch{}}}function Ri(e,t){let n=N(x.cookieStore),r=new M(()=>z(n,`change`,t=>{(t.changed.some(t=>t.name===e)||t.deleted.some(t=>t.name===e))&&r.notify()}).stop);return{async getAll(){return(await n.getAll(e)).map(e=>e.value)},async getAllAndSet(r){let i=await n.getAll(e),{value:a,expireDelay:o}=r(i.map(e=>e.value));try{await n.set({name:e,value:a,expires:ke()+o,path:`/`,sameSite:t.crossSite?`none`:`strict`,domain:t.domain,secure:t.secure,partitioned:t.partitioned})}catch(n){let r=Ue(e);hi(`Failed to set cookie using Cookie Store API`,{"error.message":n.message,newValue:a,cookieOptions:{...t},cookies:i.map(e=>({...e})),cookieCount:i.length,documentCookies:r})}},observable:r}}var zi=S;function Bi(e,t){let n=Ue(e),r=new M(()=>{let t=Bt(()=>{i(Ue(e))},zi);return()=>{Vt(t)}});function i(e){String(e)!==String(n)&&(n=e,r.notify())}return{getAll(){return Promise.resolve(Ue(e))},async getAllAndSet(n){let{value:r,expireDelay:a}=n(Ue(e));Ve(e,r,a,t),await Promise.resolve(),i([r])},observable:r}}function Vi(){let e=N(x.cookieStore);return!!(e&&vn(e,`change`))}var Hi=`_dd_s_v2`,Ui=`_dd_s`,Wi=`_DD_SESSION`;function Gi(){return{type:G.MEMORY}}function Ki(){let e=x;e._DD_SESSION||(e[Wi]={});let t=e[Wi],n=new M,r=t.onChange;return t.onChange=e=>{r?.(e),n.notify(e)},{async setSessionState(e,n){let r=fe(e(t.state??{}));t.state=r,await Promise.resolve(),t.onChange?.(r)},sessionObservable:n}}var qi=/^([a-zA-Z]+)=([a-z0-9-]+)$/;function Ji(e){return!!e&&(e.indexOf(`&`)!==-1||qi.test(e))}function Yi(e){return e.created?Number(e.created):void 0}function Xi(e){let t=e.expire&&Number(e.expire),n=Yi(e);if(t&&n)return Math.min(t,n+Pi)}function Zi(e,t){let n={isExpired:`1`};
5return t.trackAnonymousUser&&e?.anonymousId&&(n.anonymousId=e?.anonymousId),n}function Qi(e){return y(e)}function $i(e){return e.isExpired!==void 0||!ea(e)}function ea(e){let t=Xi(e);return t?ke()<t:!1}function ta(e){e.expire=String(ke()+Fi)}function na(e){return Hr(e).map(([e,t])=>e===`anonymousId`?`aid=${t}`:`${e}=${t}`).join(`&`)}function ra(e){let t={};return Ji(e)&&e.split(`&`).forEach(e=>{let n=qi.exec(e);if(n!==null){let[,e,r]=n;e===`aid`?t.anonymousId=r:t[e]=r}}),t}function ia(e,t){return Qi(e)?(t.trackAnonymousUser&&(e.anonymousId=b()),Zi(e,t)):e}function aa(e,t){if(Qi(e))return e;let n=e;return $i(e)&&(n=Zi(e,t)),n.id||(n.id=b(),n.created=String(ke())),t.trackAnonymousUser&&!n.anonymousId&&(n.anonymousId=b()),delete n.isExpired,ta(n),n}function oa(e){return $i(e)||Qi(e)||!e.id||ta(e),e}var sa=0;async function ca(e){let{cookieOptions:t}=e;if(t){if(Vi()&&await Li(Ri,t))return{type:G.COOKIE,cookieOptions:t,cookieApi:1};if(await Li(Bi,t))return{type:G.COOKIE,cookieOptions:t,cookieApi:0}}}var la;function ua(e,t){let{cookieOptions:n,cookieApi:r}=e,i=new M,a=!!t.trackAnonymousUser,o=ha(n),s=N(fa)(r,n),c=!0;s.observable.subscribe(()=>{s.getAll().then(e=>{i.notify(pa(e,o))}).catch(e=>j(Error(`Error while reading session cookies on change: ${e}`)))});function l(e){return s.getAllAndSet(t=>{let r=pa(t,o);return c&&y(r)&&(r=pa(Ue(Ui),o)),c=!1,{value:ma(e(r),n),expireDelay:a?Ii:Pi}})}return{async setSessionState(e,t){typeof navigator<`u`&&navigator.locks?await navigator.locks.request(Hi,()=>l(e)).catch(e=>{if(!da(e))throw e}):(la=(la??Promise.resolve()).then(()=>l(e)),await la)},sessionObservable:i}}function da(e){return e instanceof Error?e.name===`AbortError`||e.message.includes(`no longer runnable`):!1}function fa(e,t){return e===1?Ri(Hi,t):Bi(Hi,t)}function pa(e,t){let n;for(let r of e.slice().reverse())if(n=ra(r),n.c===t)break;return delete n?.c,n??{}}function ma(e,t){return na(y(e)?e:{...e,c:ha(t)})}function ha(e){let t=e.domain?e.domain.split(`.`).length-1:0,n=0;return n|=sa<<5,n|=t<<1,n|=+!!e.crossSite,n.toString(16)}var ga=`_dd_test_`;function _a(){try{let e=b(),t=`${ga}${e}`;localStorage.setItem(t,e);let n=localStorage.getItem(t);return localStorage.removeItem(t),e===n?{type:G.LOCAL_STORAGE}:void 0}catch{return}}function va(){let e=new M(e=>z(window,`storage`,t=>{t.key===`_dd_s_v2`&&t.storageArea===localStorage&&e.notify(ra(t.newValue))}).stop),t=!0;return{async setSessionState(n,r){let i=ra(localStorage.getItem(Hi));t&&Qi(i)&&(i=ra(localStorage.getItem(Ui))),t=!1;let a=n(i);localStorage.setItem(Hi,na(a)),await Promise.resolve(),e.notify(a)},sessionObservable:e}}async function ya(e){let t=ba(e.sessionPersistence);for(let n of t){let t=await xa(n,e);if(t!==void 0)return t}}function ba(e){return Array.isArray(e)?e:e===void 0?be?[G.MEMORY]:[G.COOKIE]:[e]}function xa(e,t){switch(e){case G.COOKIE:return ca(t);case G.LOCAL_STORAGE:return _a();case G.MEMORY:return Gi();default:v.error(`Invalid session persistence '${String(e)}'`);return}}function Sa(e,t){switch(e.type){case G.COOKIE:return ua(e,t);case G.LOCAL_STORAGE:return va();case G.MEMORY:return Ki()}}var Ca=C,wa=Pi,Ta=De*12,Ea=[];async function Da(e,t){let n=D(),r=new M,i=new M,a=await N(ya)(e);if(!a){v.warn(`No storage available for session. We will not send any data.`);return}let o=N(Sa)(a,e),s=ki({expireDelay:wa});Ea.push(()=>s.stop());let c=!1,{throttled:l,cancel:u}=Ht(()=>{c=!1,o.setSessionState(t=>aa(t,e),`expandOrRenewOnActivity`).catch(j)},S);Ea.push(u);let d;Ea.push(()=>F(d));let f=!1;Ea.push(()=>{f=!0});let p=await m().catch(e=>j(Error(`Error while resolving initial session state: ${e}`)));if(!p||f)return;for(;!t.isGranted();)if(ne(),await new Promise(e=>t.onGrantedOnce(e)),f||(p=await m().catch(j),!p||f))return;return s.add(re(p),je().relative),g(p),h(),_(),vi(`Session manager init metrics`,{metrics:{duration:T(n,D())}}),ee();async function m(){let t={};return await o.setSessionState(n=>(t=aa(ia(n,e),e),t),`initialize`),t}function h(){let e=o.sessionObservable.subscribe(e=>{g(e),te(e)});Ea.push(()=>e.unsubscribe())}function g(n){F(d);let r=Xi(n);r&&(d=P(()=>{o.setSessionState(n=>$i(n)?(t.isGranted()||delete n.anonymousId,Zi(n,e)):n,`expireOnTimeout`).catch(j)}
5,r-ke()))}function _(){t.observable.subscribe(()=>{t.isGranted()?(c=!1,o.setSessionState(t=>aa(t,e),`expandOrRenewOnConsent`).catch(j)):ne()}),be||(ka(()=>{t.isGranted()&&l()}),Aa(()=>{c||o.setSessionState(e=>oa(e),`expandOnVisibility`).catch(j)}),ja(()=>{o.setSessionState(t=>ia(t,e),`initializeOnResume`).catch(j)}))}function ee(){return{findSession:(e,t)=>s.find(e,t),findTrackedSession:(t,n)=>{let r=s.find(t,n);if(!(!r||r.id===`invalid`||!Mi(r.id,e.sessionSampleRate))&&!(ke()-r.createdAt>Ta))return r},renewObservable:r,expireObservable:i,expire:ne,updateSessionState:e=>{o.setSessionState(t=>({...t,...e}),`updateState`).catch(j)}}}function te(e){let t=s.find(),n=t?.id!==void 0,a=e.id!==void 0,o=n&&a&&t.id!==e.id;if(n&&(!a||o)&&(c=!0,i.notify(),s.closeActive(D())),a&&(!n||o)){if(c)return;s.add(re(e),D()),r.notify()}else n&&a&&!o&&(t.isReplayForced=!!e.forcedReplay)}function ne(){u();let n=Zi(s.find(),e);t.isGranted()||delete n.anonymousId,te(n),o.setSessionState(n=>(t.isGranted()||delete n.anonymousId,Zi(n,e)),`expire`).catch(j)}function re(e){let t=Yi(e)??w();return e.id?{id:e.id,isReplayForced:!!e.forcedReplay,anonymousId:e.anonymousId,createdAt:t}
5:{id:`invalid`,isReplayForced:!1,anonymousId:void 0,createdAt:t}}}function Oa(){let e={id:b(),isReplayForced:!1,anonymousId:void 0,createdAt:w()};return Promise.resolve({findSession:()=>e,findTrackedSession:()=>e,renewObservable:new M,expireObservable:new M,expire:I,updateSessionState:t=>{e={...e,...t}}})}function ka(e){let{stop:t}=_n(window,[`click`,`touchstart`,`keydown`,`scroll`],e,{capture:!0,passive:!0});Ea.push(t)}function Aa(e){let t=()=>{document.visibilityState===`visible`&&e()},{stop:n}=z(document,`visibilitychange`,t);Ea.push(n);let r=Bt(t,Ca);Ea.push(()=>{Vt(r)})}function ja(e){let{stop:t}=z(window,`resume`,e,{capture:!0});Ea.push(t)}var Ma=class{constructor(){this.callbacks={}}notify(e,t){let n=this.callbacks[e];n&&n.forEach(e=>e(t))}subscribe(e,t){return this.callbacks[e]||(this.callbacks[e]=[]),this.callbacks[e].push(t),{unsubscribe:()=>{this.callbacks[e]=this.callbacks[e].filter(e=>t!==e)}}}},Na=3e3;function Pa(e,t,n=Na){let r=0,i=!1;return{isLimitReached(){if(r===0&&P(()=>{r=0},C),r+=1,r<=n||i)return i=!1,!1;if(r===n+1){i=!0;try{t({message:`Reached max number of ${e}s by minute: ${n}`,source:V.AGENT,startClocks:O()})}finally{i=!1}}return!0}}}function Fa(e,t){return document.readyState===e||document.readyState===`complete`?(t(),{stop:I}):z(window,e===`complete`?`load`:`DOMContentLoaded`,t,{once:!0})}function Ia(e){return new Promise(t=>{Fa(e,t)})}var La,Ra=new WeakMap;function za(){return La||=Ba(),La}function Ba(){return`XMLHttpRequest`in x?new M(e=>{let{stop:t}=L(XMLHttpRequest.prototype,`open`,Va),{stop:n}=L(XMLHttpRequest.prototype,`send`,t=>{Ha(t,e)},{computeHandlingStack:!0}),{stop:r}=L(XMLHttpRequest.prototype,`abort`,Ua);return()=>{t(),n(),r()}}):new M}function Va({target:e,parameters:[t,n]}){Ra.set(e,{state:`open`,method:String(t).toUpperCase(),url:xe(String(n))})}function Ha({target:e,parameters:[t],handlingStack:n},r){let i=Ra.get(e);if(!i)return;let a=i;a.state=`start`,a.startClocks=O(),a.isAborted=!1,a.xhr=e,a.handlingStack=n,a.requestBody=t;let o=!1,{stop:s}=L(e,`onreadystatechange`,()=>{e.readyState===XMLHttpRequest.DONE&&c()}),c=()=>{if(l(),s(),o)return;o=!0;let t=i;t.duration=T(a.startClocks.timeStamp,w()),t.status=e.status,typeof e.response==`string`&&(t.responseBody=e.response),r.notify({...t,state:`complete`})},{stop:l}=z(e,`loadend`,c);r.notify(a)}function Ua({target:e}){let t=Ra.get(e);t&&(t.isAborted=!0)}async function Wa(e){let t=e.getReader(),n=[];for(;;){let e=await t.read();if(e.done)break;n.push(e.value)}return t.cancel().catch(I),Tn(n)}var Ga=function(e){return e[e.IGNORE=0]=`IGNORE`,e[e.COLLECT=1]=`COLLECT`,e}({}),Ka,qa=[];function Ja({responseBodyAction:e}={}){return e&&qa.push(e),Ka||=Ya(),Ka}function Ya(){return new M(e=>{if(!x.fetch)return;let{stop:t}=L(x,`fetch`,t=>Xa(t,e),{computeHandlingStack:!0});return t})}function Xa({parameters:e,onPostCall:t,handlingStack:n},r){let[i,a]=e,o=a?.method;o===void 0&&i instanceof Request&&(o=i.method);let s=o===void 0?`GET`:String(o).toUpperCase(),c=i instanceof Request?i.url:xe(String(i)),l={state:`start`,init:a,input:i,method:s,startClocks:O(),url:c,handlingStack:n,isAbortedOnStart:i instanceof Request&&i.signal?.aborted||a?.signal?.aborted||!1};r.notify(l),e[0]=l.input,e[1]=l.init,t(e=>{Za(r,e,l).catch(j)})}async function Za(e,t,n){let r=n,i;try{i=await t}catch(t){e.notify({...r,state:`resolve`,status:0,isAborted:r.init?.signal?.aborted||t instanceof DOMException&&t.code===DOMException.ABORT_ERR,error:t});return}if(r.response=i,r.status=i.status,r.responseType=i.type,r.isAborted=!1,qa.reduce((e,t)=>Math.max(e,t(r)),0)===1){let e=gr(i);if(e?.body)try{let t=await Wa(e.body);r.responseBody=new TextDecoder().decode(t)}catch{}}e.notify({...r,state:`resolve`})}function Qa(e,t){if(window.requestIdleCallback&&window.cancelIdleCallback){let n=window.requestIdleCallback(k(e),t);return()=>window.cancelIdleCallback(n)}return $a(e)}function $a(e){let t=ke(),n=P(()=>{e({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(ke()-t))})}
5,0);return()=>F(n)}var eo=S;function to(){let e=[];function t(t){let r;if(!t||t.didTimeout){let e=performance.now();r=()=>30-(performance.now()-e)}else r=t.timeRemaining.bind(t);for(;r()>0&&e.length;)e.shift()();e.length&&n()}function n(){Qa(t,{timeout:eo})}return{push(t){e.push(t)===1&&n()},stop(){e.length=0}}}var no={};function ro(e){return tt(...e.map(e=>(no[e]||(no[e]=io(e)),no[e])))}function io(e){return new M(t=>{let n=m[e];return m[e]=(...r)=>{n.apply(console,r);let i=dn(`console error`);A(()=>{t.notify(ao(r,e,i))})},()=>{m[e]=n}})}function ao(e,t,n){let r=e.map(e=>oo(e)).join(` `);if(t===p.error){let i=zn({originalError:e.find(Wn),handlingStack:n,startClocks:O(),source:V.CONSOLE,handling:`handled`,nonErrorPrefix:`Provided`,useFallbackStack:!1});return i.message=r,{api:t,message:r,handlingStack:n,error:i}}return{api:t,message:r,error:void 0,handlingStack:n}}function oo(e){return typeof e==`string`?B(e):Wn(e)?pn(Wt(e)):En(B(e),void 0,2)}function so(e){let t=o(e)===`object`;return t||v.error(`Unsupported context:`,e),t}function co(e,t,n){let r={...e};for(let[e,{required:i,type:a}]of Object.entries(t))a===`string`&&!lo(r[e])&&(r[e]=String(r[e])),i&&lo(r[e])&&v.warn(`The property ${e} of ${n} is required; context will not be sent to the intake.`);return r}function lo(e){return e==null||e===``}function uo(e=``,{propertiesConfig:t={}}={}){let n={},r=new M,i={getContext:()=>u(n),setContext:a=>{so(a)?n=B(co(a,t,e)):i.clearContext(),r.notify()},setContextProperty:(i,a)=>{n=B(co({...n,[i]:a},t,e)),r.notify()},removeContextProperty:i=>{delete n[i],co(n,t,e),r.notify()},clearContext:()=>{n={},r.notify()},changeObservable:r};return i}function K(e,t,n,r){return k((...i)=>(r&&W({feature:r}),e()[t][n](...i)))}function fo(e,t,n){e.changeObservable.subscribe(()=>{let r=e.getContext();n.notify(e=>e[t].setContext(r))})}var po=`_dd_c`,mo=[];function ho(e,t,n){if(typeof window>`u`||typeof localStorage>`u`)return;let r=go(t,n);mo.push(z(window,`storage`,({key:e})=>{r===e&&a()})),e.changeObservable.subscribe(o);let i=d(s(),e.getContext());y(i)||e.setContext(i);function a(){e.setContext(s())}function o(){localStorage.setItem(r,JSON.stringify(e.getContext()))}function s(){let e=localStorage.getItem(r);return e?de(e)??{}:{}}}function go(e,t){return`${po}_${e}_${t}`}var q={userContext:`userContext`,globalContext:`globalContext`,accountContext:`accountContext`},J={getContext:`getContext`,setContext:`setContext`,setContextProperty:`setContextProperty`,removeContextProperty:`removeContextProperty`,clearContext:`clearContext`};function _o(e,t,n){let r=vo();return t.storeContextsAcrossPages&&ho(r,n,4),e.register(()=>{let e=r.getContext();return y(e)||!e.id?U:{account:e}}),r}function vo(){return uo(`account`,{propertiesConfig:{id:{type:`string`,required:!0},name:{type:`string`}}})}var yo=`_dd_tab_id`,bo;function xo(e){let t=So();e.register(()=>({tab:{id:t}}))}function So(){return bo||=Co()??b(),bo}function Co(){try{let e=sessionStorage.getItem(yo);if(e)return e;let t=b();return sessionStorage.setItem(yo,t),t}catch{return}}function wo(e,t,n,r){let i=To();return t.storeContextsAcrossPages&&ho(i,n,2),e.register(()=>{let e=i.getContext();return r?{context:e}:e}),i}function To(){return uo(`global context`)}function Eo(e,t,n,r){let i=Do();return t.storeContextsAcrossPages&&ho(i,r,1),e.register(({eventType:e,startTime:r})=>{let a=i.getContext(),o=n.findTrackedSession(r);return o?.anonymousId&&!a.anonymous_id&&t.trackAnonymousUser&&(a.anonymous_id=o.anonymousId),y(a)?U:{type:e,usr:a}}),i}function Do(){return uo(`user`,{propertiesConfig:{id:{type:`string`},name:{type:`string`},email:{type:`string`}}})}var Oo=`datadog-synthetics-`,ko=`${Oo}public-id`,Ao=`${Oo}result-id`,jo=`${Oo}injects-rum`,Mo=`${Oo}rum-context`;function No(){return be?!1:!!(x._DATADOG_SYNTHETICS_INJECTS_RUM||Ge(jo))}function Po(){let e=Io();return Lo(e)?e:void 0}function Fo(){return!!Po()}function Io(){let e=x._DATADOG_SYNTHETICS_RUM_CONTEXT;if(e)return e;let t=Ge(Mo);return t?de(decodeURIComponent(t)):{test_id:window._DATADOG_SYNTHETICS_PUBLIC_ID||Ge(ko),result_id:window._DATADOG_SYNTHETICS_RESULT_ID||Ge(Ao)}}function Lo(e){return typeof e==`object`&&!!e&&typeof e.test_id==`string`&&typeof e.result_id==`string`}var Y={DOCUMENT:`document`,XHR:`xhr`,BEACON:`beacon`,FETCH:`fetch`,CSS:`css`,JS:`js`,IMAGE:`image`,FONT:`font`,MEDIA:`media`,OTHER:`other`},Ro={FETCH:Y.FETCH,XHR:Y.XHR},zo=500,Bo=function(e){return e[e.RUNTIME_ERROR=0]=`RUNTIME_ERROR`,e[e.FETCH=1]=`FETCH`,e[e.XHR=2]=`XHR`,e[e.CONSOLE=3]=`CONSOLE`,e}({});function Vo(){let e=new nt(zo,e=>{hi(`Early data collection dropped data on unbuffer`,{count:e})}),t=[];function n(n,r){t.push(r.subscribe(t=>{e.notify({type:n,data:t})}))}return n(0,N(Jn)()),n(1,Ja()),n(2,za()),n(3,ro(Object.values(p))),{observable:e,stop:()=>
5t.forEach(e=>e.unsubscribe())}}function Ho(){try{return new Intl.DateTimeFormat().resolvedOptions().timeZone}catch{return}}var Uo=function(e){return e[e.REPLAY=1]=`REPLAY`,e[e.RUM=2]=`RUM`,e[e.TELEMETRY=4]=`TELEMETRY`,e[e.PROFILING=6]=`PROFILING`,e}({});function Wo(e,t,n){e.register(({startTime:e})=>{let r=t.findTrackedSession(e);return r?{session:{id:r.id},anonymous_id:r.anonymousId,...n}:U})}var Go={console:`console`,http:`http`,silent:`silent`},Ko=Object.keys(r),qo=class{constructor(e,t,n=Go.http,i=r.debug,a={}){this.handleLogStrategy=e,this.handlerType=n,this.level=i,this.contextManager=uo(`logger`),this.tags=[],this.contextManager.setContext(a),t&&this.contextManager.setContextProperty(`logger`,{name:t})}logImplementation(e,t,n=r.info,i,o){A(()=>{let r=B(t),s;if(i!=null){let e=zn({originalError:i,nonErrorPrefix:Kn.PROVIDED,source:V.LOGGER,handling:qn.HANDLED,startClocks:O()});s=d({error:a(e,{includeMessage:!0})},e.context,r)}else s=r;this.handleLogStrategy({message:B(e),context:s,status:n},this,o)})}log(e,t,i=r.info,a){let o;n(i,Go.http,this)&&(o=dn(`log`)),this.logImplementation(e,t,i,a,o)}setContext(e){this.contextManager.setContext(e)}getContext(){return this.contextManager.getContext()}setContextProperty(e,t){this.contextManager.setContextProperty(e,t)}removeContextProperty(e){this.contextManager.removeContextProperty(e)}clearContext(){this.contextManager.clearContext()}addTag(e,t){this.tags.push(lr(e,t))}removeTagsWithKey(e){let t=ur(e);this.tags=this.tags.filter(e=>e!==t&&!e.startsWith(`${t}:`))}getTags(){return this.tags.slice()}setHandler(e){this.handlerType=e}getHandler(){return this.handlerType}setLevel(e){this.level=e}getLevel(){return this.level}};qo.prototype.ok=Jo(r.ok),qo.prototype.debug=Jo(r.debug),qo.prototype.info=Jo(r.info),qo.prototype.notice=Jo(r.notice),qo.prototype.warn=Jo(r.warn),qo.prototype.error=Jo(r.error),qo.prototype.critical=Jo(r.critical),qo.prototype.alert=Jo(r.alert),qo.prototype.emerg=Jo(r.emerg);function Jo(e){return function(t,r,i){let a;n(e,Go.http,this)&&(a=dn(`log`)),this.logImplementation(t,r,e,i,a)}}function Yo(){return be?{}:{view:{referrer:document.referrer,url:window.location.href}}}var Xo=Ma;function Zo(e,t,n,r,i,a){let o=Ko.concat([`custom`]),s={};o.forEach(e=>{s[e]=Pa(e,i,a)}),t.subscribe(0,({rawLogsEvent:i,messageContext:a=void 0,savedCommonContext:o=void 0,domainContext:c,ddtags:l=[]})=>{let u=Pe(i.date),f=o||r(),p=n.trigger({startTime:u});if(p===`DISCARDED`)return;let m=cr(e),h=d({view:f.view},p,i,a,{ddtags:m.concat(l).join(`,`)});e.beforeSend?.(h,c)===!1||h.origin!==V.AGENT&&(s[h.status]??s.custom).isLimitReached()||t.notify(1,h)})}var Qo={[p.log]:r.info,[p.debug]:r.debug,[p.info]:r.info,[p.warn]:r.warn,[p.error]:r.error};function $o(e,t,n){let r=n.subscribe(({data:n,type:r})=>{if(r!==Bo.CONSOLE||!e.forwardConsoleLogs.includes(n.api))return;let i={rawLogsEvent:{date:w(),message:n.message,origin:V.CONSOLE,error:n.error&&a(n.error),status:Qo[n.api]},messageContext:n.error?.context,domainContext:{handlingStack:n.handlingStack}};t.notify(0,i)});return{stop:()=>r.unsubscribe()}}function es(e,t){let n=tr(e.forwardReports).subscribe(e=>{let n=e.message,i,o=e.originalError.type===`deprecation`?r.warn:r.error;o===r.error?i=a(e):e.stack&&(n+=` Found in ${Un(e.stack)}`),t.notify(0,{rawLogsEvent:{date:w(),message:n,origin:V.REPORT,error:i,status:o}})});return{stop:()=>{n.unsubscribe()}}}function ts(e,t,n){if(!e.forwardErrorsToLogs)return{stop:I};Ja({responseBodyAction:e=>a(e)?Ga.COLLECT:Ga.IGNORE});let i=n.subscribe(({data:e,type:t})=>{t===Bo.FETCH&&e.state===`resolve`?o(Ro.FETCH,e):t===Bo.XHR&&e.state===`complete`&&o(Ro.XHR,e)});function a(e){return!pt(e.url)&&!e.isAborted&&(ns(e)||hr(e.status))}function o(n,i){if(!a(i))return;let o=`error`in i&&i.error?fn(Wt(i.error)):i.responseBody||`Failed to load`,s={handlingStack:i.handlingStack};t.notify(0,{rawLogsEvent:{message:`${rs(n)} error ${i.method} ${i.url}`,date:i.startClocks.timeStamp,error:{stack:ye(o,e.requestErrorResponseLengthLimit,`...`),handling:void 0},http:{method:i.method,status_code:i.status,url:i.url},status:r.error,origin:V.NETWORK},domainContext:s})}return{stop:()=>i.unsubscribe()}}function ns(e){return e.status===0&&e.responseType!==`opaque`}function rs(e){return Ro.XHR===e?`XHR`:`Fetch`}function is(e,t,n){if(!e.forwardErrorsToLogs)return{stop:I};let i=n.subscribe(e=>{if(e.type===Bo.RUNTIME_ERROR){let n=e.data;t.notify(0,{rawLogsEvent:{message:n.message,date:n.startClocks.timeStamp,error:a(n),origin:V.SOURCE,status:r.error},messageContext:n.context})}});return{stop:()=>{i.unsubscribe()}}}function as(e){function t(t,r,i,a,o){let s=d(r.getContext(),t.context);if(n(t.status,Go.console,r)&&ss(t,s),n(t.status,Go.http,r)){let n={rawLogsEvent:{date:o||w(),message:t.message,status:t.status,origin:V.LOGGER},messageContext:s,savedCommonContext:a,ddtags:r.getTags()};i&&(n.domainContext={handlingStack:i}),e.notify(0,n)}}return{handleLog:t}}var os={[r.ok]:p.debug,[r.debug]:p.debug,[r.info]:p.info,[r.notice]:p.info,[r.warn]:p.warn,[r.error]:p.error,[r.critical]:p.error,[r.alert]:p.error,[r.emerg]:p.error};function ss({status:e,message:t},n){h[os[e]].call(m,t,n)}function cs(e,t,n,r,i){let a=[kt(e,`logs`)],o=At(e,`logs`);o&&a.push(o);let s=qr({encoder:Qr(),request:Ar(a,n),flushController:Zr({pageMayExitObservable:r,sessionExpireOb
5servable:i.expireObservable})});return t.subscribe(1,e=>{s.add(e)}),s}function ls(e){let t=Ir();e.subscribe(1,e=>{t.send(`log`,e)})}function us(e){return{get:t=>{let n=e.findTrackedSession(t);if(n)return{session_id:n.id}}}}function ds(e){return t=>{e.notify(0,{rawLogsEvent:{message:t.message,date:t.startClocks.timeStamp,origin:V.AGENT,status:r.error}}),hi(`Error reported to customer`,{"error.message":t.message})}}function fs(e){let t=x;e.assemble.register(({startTime:e})=>n(e)||U),e.assembleTelemetry.register(({startTime:e})=>{let t=n(e);return t?{application:{id:t.application_id},view:{id:t.view?.id},action:{id:t.user_action?.id}}:U});function n(e){let n=r(e,No()?t.DD_RUM_SYNTHETICS:t.DD_RUM);if(n)return n}function r(e,t){if(t?.getInternalContext)return t.getInternalContext(e)}}function ps(e,t,n){e.register(({startTime:e})=>{let r=n.findTrackedSession(e);return n.findTrackedSession(e,{returnInactive:!0})?{service:t.service,session_id:r?r.id:void 0,session:r?{id:r.id}:void 0}:ti})}var ms=`logs`;function hs(e,t,n,r,i){let a=new Xo,o=[];a.subscribe(1,e=>fr(`logs`,e));let s=ds(a),c=Wr(),l=i.assemble;ps(l,e,t);let u=_o(l,e,ms),d=Eo(l,e,t,ms),f=wo(l,e,ms,!1);fs(i),xo(l),ts(e,a,r),is(e,a,r),$o(e,a,r),r.unbuffer(),es(e,a);let{handleLog:p}=as(a);if(Zo(e,a,l,n,s),H())ls(a);else{let{stop:n}=cs(e,a,s,c,t);o.push(()=>n())}return{handleLog:p,getInternalContext:us(t).get,accountContext:u,globalContext:f,userContext:d,stop:()=>{o.forEach(e=>e())}}}function gs(){return{assemble:ei(),assembleTelemetry:ei()}}var _s=32*xn;function vs(e,t){let n=Tt(e,t),r=ys(e.forwardConsoleLogs,Vr(p),`Forward Console Logs`),i=ys(e.forwardReports,Vr(er),`Forward Reports`);if(!(!n||!r||!i))return{forwardErrorsToLogs:e.forwardErrorsToLogs!==!1,forwardConsoleLogs:r,forwardReports:i,requestErrorResponseLengthLimit:_s,...n}}function ys(e,t,n){if(e===void 0)return[];if(!(e===`all`||Array.isArray(e)&&e.every(e=>t.includes(e)))){v.error(`${n} should be "all" or an array with allowed values "${t.join(`", "`)}"`);return}return e===`all`?t:xi(e)}function bs(e){let t=Dt(e);return{forward_errors_to_logs:e.forwardErrorsToLogs,forward_console_logs:e.forwardConsoleLogs,forward_reports:e.forwardReports,...t}}function xs(e,t){function n(){return t.isGranted()?U:ti}e.assemble.register(n),e.assembleTelemetry.register(n)}function Ss(e,t,n){let r=new nt(500,e=>{hi(`preStartLogs buffer data lost`,{count:e})}),i=To();fo(i,q.globalContext,r);let a=vo();fo(a,q.accountContext,r);let o=Do();fo(o,q.userContext,r);let s,c,l,u=gs(),d=t.observable.subscribe(f);function f(){if(!c||!s||!l)return;d.unsubscribe();let e=n(c,l,u);r.subscribe(t=>t(e)),r.unbuffer()}return{init(e,n){if(!e){v.error(`Missing configuration`);return}if(Ft(e.enableExperimentalFeatures),bn(e.allowUntrustedEvents),H()&&(e=Cs(e)),s=e,c){$n(`DD_LOGS`,e);return}let r=vs(e,n);r&&(c=r,t.tryToInit(r.trackingConsent),t.onGrantedOnce(()=>{xs(u,t),N(ui)(ri.LOGS,r,u.assembleTelemetry),(H()?Oa():N(Da)(r,t)).then(t=>{t&&(l=t,Wo(u.assembleTelemetry,l),_i(bs(e)),f())}).catch(j)}))},get initConfiguration(){return s},globalContext:i,accountContext:a,userContext:o,getInternalContext:I,handleLog(t,n,i,a=e(),o=w()){r.notify(e=>e.handleLog(t,n,i,a,o))}}}function Cs(e){return{...e,clientToken:`empty`}}function ws(){let e=it(),t=Vo().observable,n=Ss(Yo,e,(e,r,i)=>{let a=N(hs)(e,r,Yo,t,i);return n=Ts(n,a),a}),r=()=>n,i={};return Zn({logger:new qo((...e)=>n.handleLog(...e)),init:e=>{let t=Error().stack;A(()=>n.init(e,t))},setTrackingConsent:k(t=>{e.update(t),W({feature:`set-tracking-consent`,tracking_consent:t})}),getGlobalContext:K(r,q.globalContext,J.getContext),setGlobalContext:K(r,q.globalContext,J.setContext),setGlobalContextProperty:K(r,q.globalContext,J.setContextProperty),removeGlobalContextProperty:K(r,q.globalContext,J.removeContextProperty),clearGlobalContext:K(r,q.globalContext,J.clearContext),createLogger:k((e,t={})=>(i[e]=new qo((...e)=>n.handleLog(...e),B(e),t.handler,t.level,B(t.context)),i[e])),getLogger:k(e=>i[e]),getInitConfiguration:k(()=>u(n.initConfiguration)),getInternalContext:k(e=>n.getInternalContext(e)),setUser:K(r,q.userContext,J.setContext),getUser:K(r,q.userContext,J.getContext),setUserProperty:K(r,q.userContext,J.setContextProperty),removeUserProperty:K(r,q.userContext,J.removeContextProperty),clearUser:K(r,q.userContext,J.clearContext),setAccount:K(r,q.accountContext,J.setContext),getAccount:K(r,q.accountContext,J.getContext),setAccountProperty:K(r,q.accountContext,J.setContextProperty),removeAccountProperty:K(r,q.accountContext,J.removeContextProperty),clearAccount:K(r,q.accountContext,J.clearContext)})}function Ts(e,t){return{...e,init:e=>{$n(`DD_LOGS`,e)}
5,getInternalContext:t.getInternalContext,globalContext:t.globalContext,userContext:t.userContext,accountContext:t.accountContext}}var X=ws();Qn(x,`DD_LOGS`,X);function Es(e,t){let n=0,r=[],i,a=!0,o=0,s=[],c=t,{stop:l}=z(e,`message`,({data:e})=>{if(e.type!==`wrote`||e.streamId!==c)return;let t=s[0];t&&(t.id===e.id?(s.shift(),n+=e.additionalBytesCount,r.push(e.result),i=e.trailer,t.writeCallback?t.writeCallback(e.result.byteLength):t.finishCallback&&t.finishCallback()):t.id<e.id&&l())});function u(){let e=r.length===0?new Uint8Array:Tn(r.concat(i)),t={rawBytesCount:n,output:e,outputBytesCount:e.byteLength,encoding:`deflate`};return n=0,r=[],t}function d(){a||=(e.postMessage({action:`reset`,streamId:t}),!0)}return{isAsync:!0,get isEmpty(){return a},write(n,r){e.postMessage({action:`write`,id:o,data:n,streamId:t}),s.push({id:o,writeCallback:r,data:n}),a=!1,o+=1},finish(e){d(),s.length?(s.forEach(e=>{delete e.writeCallback}),s[s.length-1].finishCallback=()=>e(u())):e(u())},finishSync(){d();let e=s.map(e=>e.data).join(``);return s.length=0,{...u(),pendingData:e}},estimateEncodedBytesCount(e){return e.length/8},stop(){l()}}}function Ds({configuredUrl:e,error:t,source:n,scriptType:r}){if(v.error(`${n} failed to start: an error occurred while initializing the ${r}:`,t),t instanceof Event||t instanceof Error&&Os(t.message)){let t;t=e?`Please make sure the ${r} URL ${e} is correct and CSP is correctly configured.`:`Please make sure CSP is correctly configured.`,v.error(`${t} See documentation at ${ne}/integrations/content_security_policy_logs/#use-csp-with-real-user-monitoring-and-session-replay`)}else r===`worker`&&gi(t)}function Os(e){return e.includes(`Content Security Policy`)||e.includes(`requires 'TrustedScriptURL'`)}var ks=30*S;function As(e){return new Worker(e.workerUrl||URL.createObjectURL(new Blob([`(()=>{function t(t){if(1===t.length)return t[0];const e=t.reduce((t,e)=>t+e.length,0),a=new Uint8Array(e);let n=0;for(const e of t)a.set(e,n),n+=e.length;return a}function e(t){for(var e=t.length;--e>=0;)t[e]=0}var a=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),n=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),r=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),i=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),s=Array(576);e(s);var h=Array(60);e(h);var l=Array(512);e(l);var _=Array(256);e(_);var o=Array(29);e(o);var d,u,f,c=Array(30);function p(t,e,a,n,r){this.static_tree=t,this.extra_bits=e,this.extra_base=a,this.elems=n,this.max_length=r,this.has_stree=t?.length}function g(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}e(c);var v=function(t){return t<256?l[t]:l[256+(t>>>7)]},w=function(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255},m=function(t,e,a){t.bi_valid>16-a?(t.bi_buf|=e<<t.bi_valid&65535,w(t,t.bi_buf),t.bi_buf=e>>16-t.bi_valid,t.bi_valid+=a-16):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=a)},b=function(t,e,a){m(t,a[2*e],a[2*e+1])},y=function(t,e){var a=0;do{a|=1&t,t>>>=1,a<<=1}while(--e>0);return a>>>1},z=function(t,e,a){var n,r,i=Array(16),s=0;for(n=1;n<=15;n++)i[n]=s=s+a[n-1]<<1;for(r=0;r<=e;r++){var h=t[2*r+1];0!==h&&(t[2*r]=y(i[h]++,h))}},k=function(t){var e;for(e=0;e<286;e++)t.dyn_ltree[2*e]=0;for(e=0;e<30;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.last_lit=t.matches=0},x=function(t){t.bi_valid>8?w(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0},A=function(t,e,a,n){var r=2*e,i=2*a;return t[r]<t[i]||t[r]===t[i]&&n[e]<=n[a]},U=function(t,e,a){for(var n=t.heap[a],r=a<<1;r<=t.heap_len&&(r<t.heap_len&&A(e,t.heap[r+1],t.heap[r],t.depth)&&r++,!A(e,n,t.heap[r],t.depth));)t.heap[a]=t.heap[r],a=r,r<<=1;t.heap[a]=n},B=function(t,e,r){var i,s,h,l,d=0;if(0!==t.last_lit)do{i=t.pending_buf[t.d_buf+2*d]<<8|t.pending_buf[t.d_buf+2*d+1],s=t.pending_buf[t.l_buf+d],d++,0===i?b(t,s,e):(h=_[s],b(t,h+256+1,e),0!==(l=a[h])&&(s-=o[h],m(t,s,l)),i--,h=v(i),b(t,h,r),0!==(l=n[h])&&(i-=c[h],m(t,i,l)))}while(d<t.last_lit);b(t,256,e)},I=function(t,e){var a,n,r,i=e.dyn_tree,s=e.stat_desc.static_tree,h=e.stat_desc.has_stree,l=e.stat_desc.elems,_=-1;for(t.heap_len=0,t.heap_max=573,a=0;a<l;
vendor: 4,235 bytes, line 5
5a++)0!==i[2*a]?(t.heap[++t.heap_len]=_=a,t.depth[a]=0):i[2*a+1]=0;for(;t.heap_len<2;)i[2*(r=t.heap[++t.heap_len]=_<2?++_:0)]=1,t.depth[r]=0,t.opt_len--,h&&(t.static_len-=s[2*r+1]);for(e.max_code=_,a=t.heap_len>>1;a>=1;a--)U(t,i,a);r=l;do{a=t.heap[1],t.heap[1]=t.heap[t.heap_len--],U(t,i,1),n=t.heap[1],t.heap[--t.heap_max]=a,t.heap[--t.heap_max]=n,i[2*r]=i[2*a]+i[2*n],t.depth[r]=(t.depth[a]>=t.depth[n]?t.depth[a]:t.depth[n])+1,i[2*a+1]=i[2*n+1]=r,t.heap[1]=r++,U(t,i,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],function(t,e){var a,n,r,i,s,h,l=e.dyn_tree,_=e.max_code,o=e.stat_desc.static_tree,d=e.stat_desc.has_stree,u=e.stat_desc.extra_bits,f=e.stat_desc.extra_base,c=e.stat_desc.max_length,p=0;for(i=0;i<=15;i++)t.bl_count[i]=0;for(l[2*t.heap[t.heap_max]+1]=0,a=t.heap_max+1;a<573;a++)(i=l[2*l[2*(n=t.heap[a])+1]+1]+1)>c&&(i=c,p++),l[2*n+1]=i,n>_||(t.bl_count[i]++,s=0,n>=f&&(s=u[n-f]),h=l[2*n],t.opt_len+=h*(i+s),d&&(t.static_len+=h*(o[2*n+1]+s)));if(0!==p){do{for(i=c-1;0===t.bl_count[i];)i--;t.bl_count[i]--,t.bl_count[i+1]+=2,t.bl_count[c]--,p-=2}while(p>0);for(i=c;0!==i;i--)for(n=t.bl_count[i];0!==n;)(r=t.heap[--a])>_||(l[2*r+1]!==i&&(t.opt_len+=(i-l[2*r+1])*l[2*r],l[2*r+1]=i),n--)}}(t,e),z(i,_,t.bl_count)},E=function(t,e,a){var n,r,i=-1,s=e[1],h=0,l=7,_=4;for(0===s&&(l=138,_=3),e[2*(a+1)+1]=65535,n=0;n<=a;n++)r=s,s=e[2*(n+1)+1],++h<l&&r===s||(h<_?t.bl_tree[2*r]+=h:0!==r?(r!==i&&t.bl_tree[2*r]++,t.bl_tree[32]++):h<=10?t.bl_tree[34]++:t.bl_tree[36]++,h=0,i=r,0===s?(l=138,_=3):r===s?(l=6,_=3):(l=7,_=4))},D=function(t,e,a){var n,r,i=-1,s=e[1],h=0,l=7,_=4;for(0===s&&(l=138,_=3),n=0;n<=a;n++)if(r=s,s=e[2*(n+1)+1],!(++h<l&&r===s)){if(h<_)do{b(t,r,t.bl_tree)}while(0!==--h);else 0!==r?(r!==i&&(b(t,r,t.bl_tree),h--),b(t,16,t.bl_tree),m(t,h-3,2)):h<=10?(b(t,17,t.bl_tree),m(t,h-3,3)):(b(t,18,t.bl_tree),m(t,h-11,7));h=0,i=r,0===s?(l=138,_=3):r===s?(l=6,_=3):(l=7,_=4)}},M=!1,j=function(t,e,a,n){m(t,0+(n?1:0),3),function(t,e,a){x(t),w(t,a),w(t,~a),t.pending_buf.set(t.window.subarray(e,e+a),t.pending),t.pending+=a}(t,e,a)},C=j,L=function(t,e,a,n){for(var r=65535&t,i=t>>>16&65535,s=0;0!==a;){a-=s=a>2e3?2e3:a;do{i=i+(r=r+e[n++]|0)|0}while(--s);r%=65521,i%=65521}return r|i<<16},S=new Uint32Array(function(){for(var t,e=[],a=0;a<256;a++){t=a;for(var n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;e[a]=t}return e}()),O=function(t,e,a,n){var r=S,i=n+a;t^=-1;for(var s=n;s<i;s++)t=t>>>8^r[255&(t^e[s])];return-1^t},T={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},q=C,F=function(t,e,a){return t.pending_buf[t.d_buf+2*t.last_lit]=e>>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&a,t.last_lit++,0===e?t.dyn_ltree[2*a]++:(t.matches++,e--,t.dyn_ltree[2*(_[a]+256+1)]++,t.dyn_dtree[2*v(e)]++),t.last_lit===t.lit_bufsize-1},G=-2,H=258,J=262,K=103,N=113,P=666,Q=function(t,e){return t.msg=T[e],e},R=function(t){return(t<<1)-(t>4?9:0)},V=function(t){for(var e=t.length;--e>=0;)t[e]=0},W=function(t,e,a){return(e<<t.hash_shift^a)&t.hash_mask},X=function(t){var e=t.state,a=e.pending;a>t.avail_out&&(a=t.avail_out),0!==a&&(t.output.set(e.pending_buf.subarray(e.pending_out,e.pending_out+a),t.next_out),t.next_out+=a,e.pending_out+=a,t.total_out+=a,t.avail_out-=a,e.pending-=a,0===e.pending&&(e.pending_out=0))},Y=function(t,e){(function(t,e,a,n){var r,l,_=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=function(t){var e,a=4093624447;for(e=0;e<=31;e++,a>>>=1)if(1&a&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e<256;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0}(t)),I(t,t.l_desc),I(t,t.d_desc),_=function(t){var e;for(E(t,t.dyn_ltree,t.l_desc.max_code),E(t,t.dyn_dtree,t.d_desc.max_code),I(t,t.bl_desc),e=18;e>=3&&0===t.bl_tree[2*i[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(t),r=t.opt_len+3+7>>>3,(l=t.static_len+3+7>>>3)<=r&&(r=l)):r=l=a+5,a+4<=r&&-1!==e?j(t,e,a,n):4===t.strategy||l===r?(m(t,2+(n?1:0),3),B(t,s,h)):(m(t,4+(n?1:0),3),function(t,e,a,n){var r;for(m(t,e-257,5),m(t,a-1,5),m(t,n-4,4),r=0;r<n;r++)m(t,t.bl_tree[2*i[r]+1],3);D(t,t.dyn_ltree,e-1),D(t,t.dyn_dtree,a-1)}
vendor: 8,488 bytes, line 5
5(t,t.l_desc.max_code+1,t.d_desc.max_code+1,_+1),B(t,t.dyn_ltree,t.dyn_dtree)),k(t),n&&x(t)})(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,X(t.strm)},Z=function(t,e){t.pending_buf[t.pending++]=e},$=function(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e},tt=function(t,e,a,n){var r=t.avail_in;return r>n&&(r=n),0===r?0:(t.avail_in-=r,e.set(t.input.subarray(t.next_in,t.next_in+r),a),1===t.state.wrap?t.adler=L(t.adler,e,r,a):2===t.state.wrap&&(t.adler=O(t.adler,e,r,a)),t.next_in+=r,t.total_in+=r,r)},et=function(t,e){var a,n,r=t.max_chain_length,i=t.strstart,s=t.prev_length,h=t.nice_match,l=t.strstart>t.w_size-J?t.strstart-(t.w_size-J):0,_=t.window,o=t.w_mask,d=t.prev,u=t.strstart+H,f=_[i+s-1],c=_[i+s];t.prev_length>=t.good_match&&(r>>=2),h>t.lookahead&&(h=t.lookahead);do{if(_[(a=e)+s]===c&&_[a+s-1]===f&&_[a]===_[i]&&_[++a]===_[i+1]){i+=2,a++;do{}while(_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&i<u);if(n=H-(u-i),i=u-H,n>s){if(t.match_start=e,s=n,n>=h)break;f=_[i+s-1],c=_[i+s]}}}while((e=d[e&o])>l&&0!==--r);return s<=t.lookahead?s:t.lookahead},at=function(t){var e,a,n,r,i,s=t.w_size;do{if(r=t.window_size-t.lookahead-t.strstart,t.strstart>=s+(s-J)){t.window.set(t.window.subarray(s,s+s),0),t.match_start-=s,t.strstart-=s,t.block_start-=s,e=a=t.hash_size;do{n=t.head[--e],t.head[e]=n>=s?n-s:0}while(--a);e=a=s;do{n=t.prev[--e],t.prev[e]=n>=s?n-s:0}while(--a);r+=s}if(0===t.strm.avail_in)break;if(a=tt(t.strm,t.window,t.strstart+t.lookahead,r),t.lookahead+=a,t.lookahead+t.insert>=3)for(i=t.strstart-t.insert,t.ins_h=t.window[i],t.ins_h=W(t,t.ins_h,t.window[i+1]);t.insert&&(t.ins_h=W(t,t.ins_h,t.window[i+3-1]),t.prev[i&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=i,i++,t.insert--,!(t.lookahead+t.insert<3)););}while(t.lookahead<J&&0!==t.strm.avail_in)},nt=function(t,e){for(var a,n;;){if(t.lookahead<J){if(at(t),t.lookahead<J&&0===e)return 1;if(0===t.lookahead)break}if(a=0,t.lookahead>=3&&(t.ins_h=W(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==a&&t.strstart-a<=t.w_size-J&&(t.match_length=et(t,a)),t.match_length>=3)if(n=F(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){t.match_length--;do{t.strstart++,t.ins_h=W(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart}while(0!==--t.match_length);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=W(t,t.ins_h,t.window[t.strstart+1]);else n=F(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(n&&(Y(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Y(t,!1),0===t.strm.avail_out)?1:2},rt=function(t,e){for(var a,n,r;;){if(t.lookahead<J){if(at(t),t.lookahead<J&&0===e)return 1;if(0===t.lookahead)break}if(a=0,t.lookahead>=3&&(t.ins_h=W(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=2,0!==a&&t.prev_length<t.max_lazy_match&&t.strstart-a<=t.w_size-J&&(t.match_length=et(t,a),t.match_length<=5&&(1===t.strategy||3===t.match_length&&t.strstart-t.match_start>4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){r=t.strstart+t.lookahead-3,n=F(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=r&&(t.ins_h=W(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart)}while(0!==--t.prev_length);if(t.match_available=0,t.match_length=2,t.strstart++,n&&(Y(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if((n=F(t,0,t.window[t.strstart-1]))&&Y(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return 1}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(n=F(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Y(t,!1),0===t.strm.avail_out)?1:2};function it(t,e,a,n,r){this.good_length=t,this.max_lazy=e,this.nice_length=a,this.max_chain=n,this.func=r}var st=[new it(0,0,0,0,function(t,e){var a=65535;for(a>t.pending_buf_size-5&&(a=t.pending_buf_size-5);;){if(t.lookahead<=1){if(at(t),0===t.lookahead&&0===e)return 1;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var n=t.block_start+a;if((0===t.strstart||t.strstart>=n)&&(t.lookahead=t.strstart-n,t.strstart=n,Y(t,!1),0===t.strm.avail_out))return 1;if(t.strstart-t.block_start>=t.w_size-J&&(Y(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):(t.strstart>t.block_start&&(Y(t,!1),t.strm.avail_out),1)}),new it(4,4,8,4,nt),new it(4,5,16,8,nt),new it(4,6,32,32,nt),new it(4,4,16,16,rt),new it(8,16,32,32,rt),new it(8,16,128,128,rt),new it(8,32,128,256,rt),new it(32,128,258,1024,rt),new it(32,258,258,4096,rt)];function ht(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=8,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),V(this.dyn_ltree),V(this.dyn_dtree),V(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),V(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),V(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}for(var lt=function(t){var e,i=function(t){if(!t?.state)return Q(t,G);t.total_in=t.total_out=0,t.data_type=2;var e=t.state;return e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?42:N,t.adler=2===e.wrap?0:1,e.last_flush=0,function(t){M||(function(){var t,e,i,g,v,w=Array(16);for(i=0,g=0;g<28;g++)for(o[g]=i,t=0;t<1<<a[g];t++)_[i++]=g;for(_[i-1]=g,v=0,g=0;g<16;g++)for(c[g]=v,t=0;t<1<<n[g];t++)l[v++]=g;for(v>>=7;g<30;g++)for(c[g]=v<<7,t=0;t<1<<n[g]-7;t++)l[256+v++]=g;for(e=0;e<=15;e++)w[e]=0;for(t=0;t<=143;)s[2*t+1]=8,t++,w[8]++;for(;t<=255;)s[2*t+1]=9,t++,w[9]++;for(;t<=279;)s[2*t+1]=7,t++,w[7]++;for(;t<=287;)s[2*t+1]=8,t++,w[8]++;for(z(s,287,w),t=0;t<30;t++)h[2*t+1]=5,h[2*t]=y(t,5);d=new p(s,a,257,286,15),u=new p(h,n,0,30,15),f=new p([],r,0,19,7)}(),M=!0),t.l_desc=new g(t.dyn_ltree,d),t.d_desc=new g(t.dyn_dtree,u),t.bl_desc=new g(t.bl_tree,f),t.bi_buf=0,t.bi_valid=0,k(t)}(e),0}(t);return 0===i&&((e=t.state).window_size=2*e.w_size,V(e.head),e.max_lazy_match=st[e.level].max_lazy,e.good_match=st[e.level].good_length,e.nice_match=st[e.level].nice_length,e.max_chain_length=st[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=2,e.match_available=0,e.ins_h=0),i},_t=function(t,e){var a,n;if(!t?.state||e>5||e<0)return t?Q(t,G):G;var r=t.state;if(!t.output||!t.input&&0!==t.avail_in||r.status===P&&4!==e)return Q(t,0===t.avail_out?-5:G);r.strm=t;var i=r.last_flush;if(r.last_flush=e,42===r.status)if(2===r.wrap)t.adler=0,Z(r,31),Z(r,139),Z(r,8),r.gzhead?(Z(r,(r.gzhead.text?1:0)+(r.gzhead.hcrc?2:0)+(r.gzhead.extra?4:0)+(r.gzhead.name?8:0)+(r.gzhead.comment?16:0)),Z(r,255&r.gzhead.time),Z(r,r.gzhead.time>>8&255),Z(r,r.gzhead.time>>16&255),Z(r,r.gzhead.time>>24&255),Z(r,9===r.level?2:r.strategy>=2||r.level<2?4:0),Z(r,255&r.gzhead.os),r.gzhead.extra?.length&&(Z(r,255&r.gzhead.extra.length),Z(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(t.adler=O(t.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=69):(Z(r,0),Z(r,0),Z(r,0),Z(r,0),Z(r,0),Z(r,9===r.level?2:r.strategy>=2||r.level<2?4:0),Z(r,3),r.status=N);else{var h=8+(r.w_bits-8<<4)<<8;h|=(r.strategy>
5=2||r.level<2?0:r.level<6?1:6===r.level?2:3)<<6,0!==r.strstart&&(h|=32),h+=31-h%31,r.status=N,$(r,h),0!==r.strstart&&($(r,t.adler>>>16),$(r,65535&t.adler)),t.adler=1}if(69===r.status)if(r.gzhead.extra){for(a=r.pending;r.gzindex<(65535&r.gzhead.extra.length)&&(r.pending!==r.pending_buf_size||(r.gzhead.hcrc&&r.pending>a&&(t.adler=O(t.adler,r.pending_buf,r.pending-a,a)),X(t),a=r.pending,r.pending!==r.pending_buf_size));)Z(r,255&r.gzhead.extra[r.gzindex]),r.gzindex++;r.gzhead.hcrc&&r.pending>a&&(t.adler=O(t.adler,r.pending_buf,r.pending-a,a)),r.gzindex===r.gzhead.extra.length&&(r.gzindex=0,r.status=73)}else r.status=73;if(73===r.status)if(r.gzhead.name){a=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>a&&(t.adler=O(t.adler,r.pending_buf,r.pending-a,a)),X(t),a=r.pending,r.pending===r.pending_buf_size)){n=1;break}n=r.gzindex<r.gzhead.name.length?255&r.gzhead.name.charCodeAt(r.gzindex++):0,Z(r,n)}while(0!==n);r.gzhead.hcrc&&r.pending>a&&(t.adler=O(t.adler,r.pending_buf,r.pending-a,a)),0===n&&(r.gzindex=0,r.status=91)}else r.status=91;if(91===r.status)if(r.gzhead.comment){a=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>a&&(t.adler=O(t.adler,r.pending_buf,r.pending-a,a)),X(t),a=r.pending,r.pending===r.pending_buf_size)){n=1;break}n=r.gzindex<r.gzhead.comment.length?255&r.gzhead.comment.charCodeAt(r.gzindex++):0,Z(r,n)}while(0!==n);r.gzhead.hcrc&&r.pending>a&&(t.adler=O(t.adler,r.pending_buf,r.pending-a,a)),0===n&&(r.status=K)}else r.status=K;if(r.status===K&&(r.gzhead.hcrc?(r.pending+2>r.pending_buf_size&&X(t),r.pending+2<=r.pending_buf_size&&(Z(r,255&t.adler),Z(r,t.adler>>8&255),t.adler=0,r.status=N)):r.status=N),0!==r.pending){if(X(t),0===t.avail_out)return r.last_flush=-1,0}else if(0===t.avail_in&&R(e)<=R(i)&&4!==e)return Q(t,-5);if(r.status===P&&0!==t.avail_in)return Q(t,-5);if(0!==t.avail_in||0!==r.lookahead||0!==e&&r.status!==P){var l=2===r.strategy?function(t,e){for(var a;;){if(0===t.lookahead&&(at(t),0===t.lookahead)){if(0===e)return 1;break}if(t.match_length=0,a=F(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,a&&(Y(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Y(t,!1),0===t.strm.avail_out)?1:2}(r,e):3===r.strategy?function(t,e){for(var a,n,r,i,s=t.window;;){if(t.lookahead<=H){if(at(t),t.lookahead<=H&&0===e)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(n=s[r=t.strstart-1])===s[++r]&&n===s[++r]&&n===s[++r]){i=t.strstart+H;do{}while(n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&r<i);t.match_length=H-(i-r),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(a=F(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(a=F(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),a&&(Y(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Y(t,!1),0===t.strm.avail_out)?1:2}(r,e):st[r.level].func(r,e);if(3!==l&&4!==l||(r.status=P),1===l||3===l)return 0===t.avail_out&&(r.last_flush=-1),0;if(2===l&&(1===e?function(t){m(t,2,3),b(t,256,s),function(t){16===t.bi_valid?(w(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}(t)}(r):5!==e&&(q(r,0,0,!1),3===e&&(V(r.head),0===r.lookahead&&(r.strstart=0,r.block_start=0,r.insert=0))),X(t),0===t.avail_out))return r.last_flush=-1,0}return 4!==e?0:r.wrap<=0?1:(2===r.wrap?(Z(r,255&t.adler),Z(r,t.adler>>8&255),Z(r,t.adler>>16&255),Z(r,t.adler>>24&255),Z(r,255&t.total_in),Z(r,t.total_in>>8&255),Z(r,t.total_in>>16&255),Z(r,t.total_in>>24&255)):($(r,t.adler>>>16),$(r,65535&t.adler)),X(t),r.wrap>0&&(r.wrap=-r.wrap),0!==r.pending?0:1)},ot=function(t){if(!t?.state)return G;var e=t.state.status;return 42!==e&&69!==e&&73!==e&&91!==e&&e!==K&&e!==N&&e!==P?Q(t,G):(t.state=null,e===N?Q(t,-3):0)},dt=new Uint8Array(256),ut=0;ut<256;ut++)dt[ut]=ut>=252?6:ut>=248?5:ut>=240?4:ut>=224?3:ut>=192?2:1;dt[254]=dt[254]=1;var ft=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0},ct=Object.prototype.toString;function pt(){this.options={level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0};var t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new ft,this.strm.avail_out=0;var e,a,n=function(t,e,a,n,r,i){if(!t)return G;var s=1;if(-1===e&&(e=6),n<0?(s=0,n=-n):n>15&&(s=2,n-=16),r<1||r>9||8!==a||n<8||n>15||e<0||e>9||i<0||i>4)return Q(t,G);8===n&&(n=9);var h=new ht;return t.state=h,h.strm=t,h.wrap=s,h.gzhead=null,h.w_bits=n,h.w_size=1<<h.w_bits,h.w_mask=h.w_size-1,h.hash_bits=r+7,h.hash_size=1<<h.hash_bits,h.hash_mask=h.hash_size-1,h.hash_shift=~~((h.hash_bits+3-1)/3),h.window=new Uint8Array(2*h.w_size),h.head=new Uint16Array(h.hash_size),h.prev=new Uint16Array(h.w_size),h.lit_bufsize=1<<r+6,h.pending_buf_size=4*h.lit_bufsize,h.pending_buf=new Uint8Array(h.pending_buf_size),h.d_buf=1*h.lit_bufsize,h.l_buf=3*h.lit_bufsize,h.level=e,h.strategy=i,h.method=a,lt(t)}(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(0!==n)throw Error(T[n]);if(t.header&&(e=this.strm,a=t.header,e?.state&&(2!==e.state.wrap||(e.state.gzhead=a))),t.dictionary){var r;if(r="[object ArrayBuffer]"===ct.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,0!==(n=function(t,e){var a=e.length;if(!t?.state)return G;var n=t.state,r=n.wrap;if(2===r||1===r&&42!==n.status||n.lookahead)return G;if(1===r&&(t.adler=L(t.adler,e,a,0)),n.wrap=0,a>=n.w_size){0===r&&(V(n.head),n.strstart=0,n.block_start=0,n.insert=0);var i=new Uint8Array(n.w_size);
5i.set(e.subarray(a-n.w_size,a),0),e=i,a=n.w_size}var s=t.avail_in,h=t.next_in,l=t.input;for(t.avail_in=a,t.next_in=0,t.input=e,at(n);n.lookahead>=3;){var _=n.strstart,o=n.lookahead-2;do{n.ins_h=W(n,n.ins_h,n.window[_+3-1]),n.prev[_&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=_,_++}while(--o);n.strstart=_,n.lookahead=2,at(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=2,n.match_available=0,t.next_in=h,t.input=l,t.avail_in=s,n.wrap=r,0}(this.strm,r)))throw Error(T[n]);this._dict_set=!0}}function gt(t,e,a){try{t.postMessage({type:"errored",error:e,streamId:a})}catch{t.postMessage({type:"errored",error:e+"",streamId:a})}}function vt(t){const e=t.strm.adler;return new Uint8Array([3,0,e>>>24&255,e>>>16&255,e>>>8&255,255&e])}pt.prototype.push=function(t,e){var a,n,r=this.strm,i=this.options.chunkSize;if(this.ended)return!1;for(n=e===~~e?e:!0===e?4:0,"[object ArrayBuffer]"===ct.call(t)?r.input=new Uint8Array(t):r.input=t,r.next_in=0,r.avail_in=r.input.length;;)if(0===r.avail_out&&(r.output=new Uint8Array(i),r.next_out=0,r.avail_out=i),(2===n||3===n)&&r.avail_out<=6)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else{if(1===(a=_t(r,n)))return r.next_out>0&&this.onData(r.output.subarray(0,r.next_out)),a=ot(this.strm),this.onEnd(a),this.ended=!0,0===a;if(0!==r.avail_out){if(n>0&&r.next_out>0)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else if(0===r.avail_in)break}else this.onData(r.output)}return!0},pt.prototype.onData=function(t){this.chunks.push(t)},pt.prototype.onEnd=function(t){0===t&&(this.result=function(t){for(var e=0,a=0,n=t.length;a<n;a++)e+=t[a].length;for(var r=new Uint8Array(e),i=0,s=0,h=t.length;i<h;i++){var l=t[i];r.set(l,s),s+=l.length}return r}(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},function(e=self){try{const a=new Map;e.addEventListener("message",n=>{try{const r=function(e,a){switch(a.action){case"init":return{type:"initialized",version:"7.4.0"};case"write":{let n=e.get(a.streamId);n||(n=new pt,e.set(a.streamId,n));const r=n.chunks.length,i=(new TextEncoder).encode(a.data);return n.push(i,2),{type:"wrote",id:a.id,streamId:a.streamId,result:t(n.chunks.slice(r)),trailer:vt(n),additionalBytesCount:i.length}}case"reset":e.delete(a.streamId)}}(a,n.data);r&&e.postMessage(r)}catch(t){gt(e,t,n.data&&"streamId"in n.data?n.data.streamId:void 0)}})}catch(t){gt(e,t)}}()})();`])))}var Z={status:0};function js(e,t,n){switch(Z.status===0&&Ns(e,t),Z.status){case 1:return Z.initializationFailureCallbacks.push(n),Z.worker;case 3:return Z.worker}}function Ms(){return Z.status}function Ns(e,t){try{let n=N(As)(e),{stop:r}=z(n,`error`,n=>{Is(e,t,n)}),{stop:i}=z(n,`message`,({data:n})=>{n.type===`errored`?Is(e,t,n.error,n.streamId):n.type===`initialized`&&Fs(n.version)});n.postMessage({action:`init`}),P(()=>Ps(t),ks),Z={status:1,worker:n,stop:()=>{r(),i()},initializationFailureCallbacks:[]}}catch(n){Is(e,t,n)}}function Ps(e){Z.status===1&&(v.error(`${e} failed to start: a timeout occurred while initializing the Worker`),Z.initializationFailureCallbacks.forEach(e=>e()),Z={status:2})}function Fs(e){Z.status===1&&(Z={status:3,worker:Z.worker,stop:Z.stop,version:e})}function Is(e,t,n,r){Z.status===1||Z.status===0?(Ds({configuredUrl:e.workerUrl,error:n,source:t,scriptType:`worker`}),Z.status===1&&Z.initializationFailureCallbacks.forEach(e=>e()),Z={status:2}):gi(n,{worker_version:Z.status===3&&Z.version,stream_id:r})}var Ls;function Rs(e){return Us(e).segments_count}function zs(e){Us(e).segments_count+=1}function Bs(e){Us(e).records_count+=1}function Vs(e,t){Us(e).segments_total_raw_size+=t}function Hs(e){return Ls?.get(e)}function Us(e){Ls||=new Map;let t;return Ls.has(e)?t=Ls.get(e):(t={records_count:0,segments_count:0,segments_total_raw_size:0},Ls.set(e,t),Ls.size>1e3&&Ws()),t}function Ws(){if(!Ls)return;let e=Ls.keys().next().value;e&&Ls.delete(e)}var Q={ACTION:`action`,ERROR:`error`,LONG_TASK:`long_task`,VIEW:`view`,VIEW_UPDATE:`view_update`,RESOURCE:`resource`,VITAL:`vital`},Gs={LONG_TASK:`long-task`,LONG_ANIMATION_FRAME:`long-animation-frame`},Ks={INITIAL_LOAD:`initial_load`,ROUTE_CHANGE:`route_change`,SESSION_RENEWAL:`session_renewal`,BF_CACHE:`bf_cache`},qs={CLICK:`click`,CUSTOM:`custom`,TAP:`tap`,SCROLL:`scroll`,SWIPE:`swipe`,APPLICATION_START:`application_start`,BACK:`back`},Js={RAGE_CLICK:`rage_click`,ERROR_CLICK:`error_click`,DEAD_CLICK:`dead_click`}
5,Ys={DURATION:`duration`,OPERATION_STEP:`operation_step`};function Xs(e,t){t.lastIndex=0;let n=t.exec(e);if(!n)return;let[r,i]=n;return i||r}function Zs(e){let t=[],n=0,r,i={quote:void 0,escapeSequence:void 0},a=``;for(let o of e){if(r=ic[n].find(e=>rc[e](o,i)),!r)return[];if(i.escapeSequence!==void 0&&r!==12){if(!sc(i.escapeSequence))return[];a+=lc(i.escapeSequence),i.escapeSequence=void 0}ac.includes(r)?a+=o:oc.includes(r)&&a!==``?(t.push(a),a=``):r===12?i.escapeSequence=i.escapeSequence?`${i.escapeSequence}${o}`:o:r===8?i.quote=o:r===9&&(i.quote=void 0),n=r}return ic[n].includes(1)?(a!==``&&t.push(a),t):[]}var Qs=/[a-zA-Z_$]/,$s=/[a-zA-Z0-9_$]/,ec=/[0-9]/,tc=/[a-fA-F0-9]/,nc=`'"`,rc={0:()=>!1,1:()=>!1,2:e=>Qs.test(e),3:e=>$s.test(e),4:e=>e===`.`,5:e=>e===`[`,6:e=>e===`]`,7:e=>ec.test(e),8:e=>nc.includes(e),9:(e,t)=>e===t.quote,10:()=>!0,11:e=>e===`\\`,12:(e,t)=>t.escapeSequence===void 0?`${t.quote}/\\bfnrtu`.includes(e):t.escapeSequence.startsWith(`u`)&&t.escapeSequence.length<5?tc.test(e):!1},ic={0:[2,5],1:[],2:[3,4,5,1],3:[3,4,5,1],4:[2],5:[8,7],6:[4,5,1],7:[7,6],8:[11,9,10],9:[6],10:[11,9,10],11:[12],12:[12,11,9,10]},ac=[2,3,7,10],oc=[4,5,6];function sc(e){return`"'/\\bfnrt`.includes(e)||e.startsWith(`u`)&&e.length===5}var cc={'"':`"`,"'":`'`,"/":`/`,"\\":`\\`,b:`\b`,f:`\f`,n:`
6`,r:`\r`,t:`	`};function lc(e){return e.startsWith(`u`)?String.fromCharCode(parseInt(e.slice(1),16)):cc[e]}var uc=`dd_rc_`,dc={hit:`success`,miss:`missing`,error:`failure`};function fc(e){return`${uc}${e}`}function pc(e){if(typeof e!=`object`||!e)return!1;let t=`version`in e&&e.version===1,n=`config`in e&&typeof e.config==`object`&&e.config!==null;return t&&n}function mc({remoteConfigurationId:e}){let t=fc(e);return{read(){let e;try{e=localStorage.getItem(t)}catch{return{status:`error`}}if(e===null)return{status:`miss`};let n=de(e);return n===void 0||!pc(n)?(this.remove(),{status:`error`}):{status:`hit`,config:n.config}},remove(){try{localStorage.removeItem(t)}catch{}},write(e){let n={version:1,config:e,fetchedAt:w()};try{localStorage.setItem(t,JSON.stringify(n))}catch{}}}}var hc=`v1`,gc=[`applicationId`,`service`,`env`,`version`,`sessionSampleRate`,`sessionReplaySampleRate`,`defaultPrivacyLevel`,`enablePrivacyForActionName`,`traceSampleRate`,`trackSessionAcrossSubdomains`,`allowedTracingUrls`,`allowedTrackingOrigins`];async function _c(e,t){let n,r=yc(),i=await Cc(e);return i.ok?(r.increment(`fetch`,`success`),n=vc(e,i.value,t,r)):(r.increment(`fetch`,`failure`),v.error(i.error)),vi(ii.REMOTE_CONFIGURATION_METRIC_NAME,{metrics:r.get()}),n}function vc(e,t,n,r){let i={...e};return gc.forEach(e=>{e in t&&(i[e]=a(t[e]))}),Object.keys(n).forEach(e=>{t[e]!==void 0&&o(n[e],t[e])}),i;function a(e){if(Array.isArray(e))return e.map(a);if(s(e)){if(bc(e)){let t=e.rcSerializedType;switch(t){case`string`:return e.value;case`regex`:return xc(e.value);case`dynamic`:return c(e);default:v.error(`Unsupported remote configuration: "rcSerializedType": "${t}"`);return}}return me(e,a)}return e}function o(e,t){t.forEach(({key:t,value:n})=>{e.setContextProperty(t,a(n))})}function c(e){let t=e.strategy,n;switch(t){case`cookie`:n=l(e);break;case`dom`:n=d(e);break;case`js`:n=p(e);break;case`localStorage`:n=u(e);break;default:v.error(`Unsupported remote configuration: "strategy": "${t}"`);return}let r=e.extractor;return r!==void 0&&typeof n==`string`?Sc(r,n):n}function l({name:e}){let t=He(e);return r.increment(`cookie`,t===void 0?`missing`:`success`),t}function u({key:e}){let t;try{t=localStorage.getItem(e)}catch{r.increment(`localStorage`,`failure`);return}return r.increment(`localStorage`,t===null?`missing`:`success`),t??void 0}function d({selector:e,attribute:t}){let n;try{n=document.querySelector(e)}catch{v.error(`Invalid selector in the remote configuration: '${e}'`),r.increment(`dom`,`failure`);return}if(!n){r.increment(`dom`,`missing`);return}if(f(n,t)){v.error(`Forbidden element selected by the remote configuration: '${e}'`),r.increment(`dom`,`failure`);return}let i=t===void 0?n.textContent:n.getAttribute(t);if(i===null){r.increment(`dom`,`missing`);return}return r.increment(`dom`,`success`),i}function f(e,t){return e.getAttribute(`type`)===`password`&&t===`value`}function p({path:e}){let t=window,n=Zs(e);if(n.length===0){v.error(`Invalid JSON path in the remote configuration: '${e}'`),r.increment(`js`,`failure`);return}for(let i of n){if(!(i in t)){r.increment(`js`,`missing`);return}try{t=t[i]}catch(t){v.error(`Error accessing: '${e}'`,t),r.increment(`js`,`failure`);return}}return r.increment(`js`,`success`),t}}function yc(){let e={fetch:{}};return{get:()=>e,increment:(t,n)=>{e[t]||(e[t]={}),e[t][n]||(e[t][n]=0),e[t][n]=e[t][n]+1}}}function bc(e){return`rcSerializedType`in e}function xc(e){try{return new RegExp(e)}catch{v.error(`Invalid regex in the remote configuration: '${e}'`)}}function Sc(e,t){let n=xc(e.value);if(n!==void 0)return Xs(t,n)}async function Cc(e){let t;try{t=await mr(Tc(e))}catch{t=void 0}if(!t?.ok)return{ok:!1,error:Error(`Error fetching the remote configuration.`)};let n=await t.json();return n.rum?{ok:!0,value:n.rum}:{ok:!1,error:Error(`No remote configuration for RUM.`)}}function wc(e){return e.remoteConfiguration?.id??e.remoteConfigurationId}function Tc(e){if(e.remoteConfigurationProxy)return e.remoteConfigurationProxy;let t=wc(e);return jt({site:e.site,path:`/${hc}/${encodeURIComponent(t)}.json`,subdomain:`sdk-configuration`})}function Ec(e,t,n){Cc(e).then(e=>{e.ok?(n.increment(`fetch`,`success`),t.write(e.value)):(n.increment(`fetch`,`failure`),v.error(e.error))}).catch(j).finally(()=>{vi(ii.REMOTE_CONFIGURATION_METRIC_NAME,{metrics:n.get()})})}function Dc(e,t){let n=mc({remoteConfigurationId:wc(e)}),r=yc(),i=n.read();if(r.increment(`cache`,dc[i.status]),Ec(e,n,r),i.status===`hit`)return vc(e,i.config,t,r);if(!e.remoteConfiguration?.required)return e}var Oc=[`tracecontext`,`datadog`],kc=[`cache-control`,`etag`,`age`,`expires`,`content-type`,`content-encoding`,`vary`,`content-length`,`server-timing`,`x-cache`];function Ac(e,t){if(e.trackFeatureFlagsForEvents!==void 0&&!Array.isArray(e.trackFeatureFlagsForEvents)&&v.warn(`trackFeatureFlagsForEvents should be an array`),!e.applicationId){v.error(`Application ID is not configured, no RUM data will be collected.`);return}if(!wt(e.sessionReplaySampleRate,`Session Replay`)||!wt(e.traceSampleRate,`Trace`))return;if(e.excludedActivityUrls!==void 0&&!Array.isArray(e.excludedActivityUrls)){v.error(`Excluded A
6ctivity Urls should be an array`);return}let n=jc(e);if(!n)return;let r=Tt(e,t),i=Pc(e);if(!r)return;let a=e.sessionReplaySampleRate??0;return{applicationId:e.applicationId,actionNameAttribute:e.actionNameAttribute,sessionReplaySampleRate:a,startSessionReplayRecordingManually:e.startSessionReplayRecordingManually===void 0?a===0:!!e.startSessionReplayRecordingManually,traceSampleRate:e.traceSampleRate??100,rulePsr:le(e.traceSampleRate)?e.traceSampleRate/100:void 0,allowedTracingUrls:n,excludedActivityUrls:e.excludedActivityUrls??[],workerUrl:e.workerUrl,compressIntakeRequests:!!e.compressIntakeRequests,trackUserInteractions:!!(e.trackUserInteractions??!0),trackViewsManually:!!e.trackViewsManually,trackResources:!!(e.trackResources??!0),trackResourceHeaders:Ic(e),trackLongTasks:!!(e.trackLongTasks??!0),subdomain:e.subdomain,defaultPrivacyLevel:pe(bt,e.defaultPrivacyLevel)?e.defaultPrivacyLevel:bt.MASK_USER_INPUT,enablePrivacyForActionName:e.enablePrivacyForActionName!==!1,traceContextInjection:pe(xt,e.traceContextInjection)?e.traceContextInjection:xt.SAMPLED,plugins:e.plugins||[],trackFeatureFlagsForEvents:e.trackFeatureFlagsForEvents||[],profilingSampleRate:e.profilingSampleRate??0,propagateTraceBaggage:e.propagateTraceBaggage!==!1,allowedGraphQlUrls:i,...r}}function jc(e){if(e.allowedTracingUrls===void 0)return[];if(!Array.isArray(e.allowedTracingUrls)){v.error(`Allowed Tracing URLs should be an array`);return}if(e.allowedTracingUrls.length!==0&&e.service===void 0){v.error(`Service needs to be configured when tracing is enabled`);return}let t=[];return e.allowedTracingUrls.forEach(e=>{let n=Nc(e);n?t.push(n):v.warn(`Allowed Tracing Urls parameters should be a string, RegExp, function, or an object. Ignoring parameter`,e)}),t}function Mc(e){let t=new Set;return Ci(e.allowedTracingUrls)&&e.allowedTracingUrls.forEach(e=>{Nc(e)?.propagatorTypes.forEach(e=>t.add(e))}),Array.from(t)}function Nc(e){if(at(e))return{match:e,propagatorTypes:Oc};if(s(e)&&at(e.match)&&(e.propagatorTypes===null||e.propagatorTypes===void 0||Array.isArray(e.propagatorTypes)))return{match:e.match,propagatorTypes:e.propagatorTypes||Oc}}function Pc(e){if(!e.allowedGraphQlUrls)return[];if(!Array.isArray(e.allowedGraphQlUrls))return v.warn(`allowedGraphQlUrls should be an array`),[];let t=[];
6return e.allowedGraphQlUrls.forEach(e=>{at(e)?t.push({match:e,trackPayload:!1,trackResponseErrors:!1}):s(e)&&at(e.match)&&t.push({match:e.match,trackPayload:!!e.trackPayload,trackResponseErrors:!!e.trackResponseErrors})}),t}var Fc=[`request`,`response`,`any`];function Ic(e){let t=e.trackResourceHeaders;if(t===void 0||t===!1)return[];if(t===!0)return kc.map(e=>({name:e}));if(!Array.isArray(t))return v.warn(`trackResourceHeaders should be true or an array of MatchHeader`),[];if(t.length===0)return v.warn(`trackResourceHeaders is an empty array, no headers will be captured`),[];let n=[];return t.forEach((e,t)=>{if(!s(e)||!at(e.name)){v.warn(`trackResourceHeaders[${t}] should be a MatchHeader object with a 'name' property`);return}if(e.url!==void 0&&!at(e.url)){v.warn(`trackResourceHeaders[${t}].url should be a MatchOption`);return}if(e.extractor!==void 0&&!(e.extractor instanceof RegExp)){v.warn(`trackResourceHeaders[${t}].extractor should be a RegExp`);return}if(e.location!==void 0&&!Fc.includes(e.location)){v.warn(`trackResourceHeaders[${t}].location should be 'request', 'response', or 'any'`);return}n.push({...e,name:typeof e.name==`string`?e.name.toLowerCase():e.name})}),n}function Lc(e){return Ci(e)&&e.some(e=>s(e)&&e.trackPayload)}function Rc(e){return Ci(e)&&e.some(e=>s(e)&&e.trackResponseErrors)}function zc(e){if(e===!0)return`default_headers`;if(Array.isArray(e))return`custom`}function Bc(e){let t=Dt(e);return{session_replay_sample_rate:e.sessionReplaySampleRate,start_session_replay_recording_manually:e.startSessionReplayRecordingManually,trace_sample_rate:e.traceSampleRate,trace_context_injection:e.traceContextInjection,propagate_trace_baggage:e.propagateTraceBaggage,action_name_attribute:e.actionNameAttribute,use_allowed_tracing_urls:Ci(e.allowedTracingUrls),use_allowed_graph_ql_urls:Ci(e.allowedGraphQlUrls),use_track_graph_ql_payload:Lc(e.allowedGraphQlUrls),use_track_graph_ql_response_errors:Rc(e.allowedGraphQlUrls),selected_tracing_propagators:Mc(e),default_privacy_level:e.defaultPrivacyLevel,enable_privacy_for_action_name:e.enablePrivacyForActionName,use_excluded_activity_urls:Ci(e.excludedActivityUrls),use_worker_url:!!e.workerUrl,compress_intake_requests:e.compressIntakeRequests,track_views_manually:e.trackViewsManually,track_user_interactions:e.trackUserInteractions,track_resources:e.trackResources,track_long_task:e.trackLongTasks,plugins:e.plugins?.map(e=>({name:e.name,...e.getConfigurationTelemetry?.()})),track_feature_flags_for_events:e.trackFeatureFlagsForEvents,remote_configuration_id:wc(e),profiling_sample_rate:e.profilingSampleRate,use_remote_configuration_proxy:!!e.remoteConfigurationProxy,track_resource_headers:zc(e.trackResourceHeaders),...t}}function Vc(){return{assemble:ei(),assembleTelemetry:ei()}}function Hc(){let e=Uc();return new M(t=>{let n=new e(k(e=>t.notify(e)));return n.observe(document,{attributes:!0,characterData:!0,childList:!0,subtree:!0}),()=>n.disconnect()})}function Uc(){let e,t=window;return t.Zone&&(e=zt(t,`MutationObserver`),t.MutationObserver&&e===t.MutationObserver&&(e=zt(new t.MutationObserver(I),`originalInstance`)?.constructor)),e||=t.MutationObserver,e}var Wc=function(e){return e[e.AUTO_ACTION_COMPLETED=0]=`AUTO_ACTION_COMPLETED`,e[e.BEFORE_VIEW_CREATED=1]=`BEFORE_VIEW_CREATED`,e[e.VIEW_CREATED=2]=`VIEW_CREATED`,e[e.BEFORE_VIEW_UPDATED=3]=`BEFORE_VIEW_UPDATED`,e[e.VIEW_UPDATED=4]=`VIEW_UPDATED`,e[e.VIEW_ENDED=5]=`VIEW_ENDED`,e[e.AFTER_VIEW_ENDED=6]=`AFTER_VIEW_ENDED`,e[e.REQUEST_STARTED=7]=`REQUEST_STARTED`,e[e.REQUEST_COMPLETED=8]=`REQUEST_COMPLETED`,e[e.SESSION_EXPIRED=9]=`SESSION_EXPIRED`,e[e.SESSION_RENEWED=10]=`SESSION_RENEWED`,e[e.PAGE_MAY_EXIT=11]=`PAGE_MAY_EXIT`,e[e.RAW_RUM_EVENT_COLLECTED=12]=`RAW_RUM_EVENT_COLLECTED`,e[e.RUM_EVENT_COLLECTED=13]=`RUM_EVENT_COLLECTED`,e[e.RAW_ERROR_COLLECTED=14]=`RAW_ERROR_COLLECTED`,e[e.ACTION_STARTED=15]=`ACTION_STARTED`,e[e.DURATION_VITAL_STARTED=16]=`DURATION_VITAL_STARTED`,e}({}),Gc=Ma,Kc=Pi;function qc(e){let t=ki({expireDelay:Kc});e.subscribe(1,e=>{t.add(n(e),e.startClocks.relative)}),e.subscribe(6,({endClocks:e})=>{t.closeActive(e.relative)}),e.subscribe(3,e=>{let n=t.find(e.startClocks.relative);n&&(e.name&&(n.name=e.name),e.context&&(n.context=e.context),n.sessionIsActive=e.sessionIsActive)}),e.subscribe(10,()=>{t.reset()});function n(e){return{service:e.service,version:e.version,context:e.context,id:e.id,name:e.name,startClocks:e.startClocks}}return{findView:e=>t.find(e),stop:()=>{t.stop()}}}var Jc=[[Y.DOCUMENT,e=>e===`navigation`],[Y.XHR,e=>e===`xmlhttprequest`],[Y.FETCH,e=>e===`fetch`],[Y.BEACON,e=>e===`beacon`],[Y.CSS,(e,t)=>/\.css$/i.test(t)],[Y.JS,(e,t)=>/\.js$/i.test(t)],[Y.IMAGE,(e,t)=>[`image`,`img`,`icon`].includes(e)||/\.(gif|jpg|jpeg|tiff|png|svg|ico)$/i.exec(t)!==null],[Y.FONT,(e,t)=>/\.(woff|eot|woff2|ttf)$/i.exec(t)!==null],[Y.MEDIA,(e,t)=>[`audio`,`video`].includes(e)||/\.(mp3|mp4)$/i.exec(t)!==null]];function Yc(e){let t=e.name;if(!Se(t))return Y.OTHER;let n=Ce(t);for(let[t,r]of Jc)if(r(e.initiatorType,n))return t;return Y.OTHER}function Xc(...e){for(let t=1;t<e.length;t+=1)if(e[t-1]>e[t])return!1;return!0}function Zc(e){return e.initiatorType===`xmlhttprequest`||e.initiatorType===`fetch`}function Qc(e){let{duration:t,startTime:n,responseEnd:r}=e;return e.initiatorType===`navigation`||t===0&&n<r?T(n,r):t}function $c(e){if(!tl(e))return;let{startTime:t,fetchStart:n,workerStart:r,redirectStart:i,redirectEnd:a,domainLookupStart:o,domainLookupEnd:s,connectStart:c,secureConnectionStart:l,connectEnd:u,requestStart:d,responseStart:f,responseEnd:p}=e,m={download:rl(t,f,p),first_byte:rl(t,d,f)};return 0<r&&r<n&&(m.worker=rl(t,r,n)),n<u&&(m.connect=rl(t,c,u),c<=l&&l<=u&&(m.ssl=rl(t,l,u))),n<s&&(m.dns=rl(t,o,s)),t<a&&(m.redirect=rl(t,i,a)),m}function el(e){return e.duration>=0}function tl(e){let t=Xc(e.startTime,e.fetchStart,e.domainLookupStart,e.domainLookupEnd,e.connectStart,e.connectEnd,e.requestStart,e.responseStart,e.responseEnd),n=nl(e)?Xc(e.startTime,e.redirectStart,e.redirectEnd,e.fetchStart):!0;return t&&n}function nl(e){return e.redirectEnd>e.startTime}function rl(e,t,n){if(e<=t&&t<=n)return{duration:E(T(t,n)),start:E(T(e,t))}}function il(e){return e.nextHopProtocol===``?void 0:e.nextHopProtocol}function al(e){return e.deliveryType===``?`other`:e.deliveryType}function ol(e){if(e.startTime<e.responseStart){let{encodedBodySize:t,decodedBodySize:n,transferSize:r}=e;return{size:n,encoded_body_size:t,decoded_body_size:n,transfer_size:r}}return{size:void 0,encoded_body_size:void 0,decoded_body_size:void 0,transfer_size:void 0}}function sl(e){return e&&(!pt(e)||Lt(Nt.TRACK_INTAKE_REQUESTS))}
6var cl=/data:(.+)?(;base64)?,/g,ll=24e3;function ul(e,t=ll){if(e.length<=t||!e.startsWith(`data:`))return e;let n=e.substring(0,100).match(cl);return n?`${n[0]}[...]`:e}function dl(e){return e.nodeType===Node.TEXT_NODE}function fl(e){return e.nodeType===Node.COMMENT_NODE}function pl(e){return e.nodeType===Node.ELEMENT_NODE}function ml(e){return pl(e)&&!!e.shadowRoot}function hl(e){let t=e;return!!t.host&&t.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&pl(t.host)}function gl(e,t){let n=e.firstChild;for(;n;)t(n),n=n.nextSibling;ml(e)&&t(e.shadowRoot)}function _l(e){return hl(e)?e.host:e.parentNode}function vl(e){if(e.parentElement)return e.parentElement;let t=e.parentNode;return t&&hl(t)?t.host:null}var yl=function(e){return e.EVENT=`event`,e.FIRST_INPUT=`first-input`,e.LARGEST_CONTENTFUL_PAINT=`largest-contentful-paint`,e.LAYOUT_SHIFT=`layout-shift`,e.LONG_TASK=`longtask`,e.LONG_ANIMATION_FRAME=`long-animation-frame`,e.NAVIGATION=`navigation`,e.PAINT=`paint`,e.RESOURCE=`resource`,e.VISIBILITY_STATE=`visibility-state`,e}({});function bl(e){return new M(t=>{let n=e=>{let n=Tl(e);n.length>0&&t.notify(n)},r,i=!0,a=new PerformanceObserver(k(e=>{i?r=P(()=>n(e.getEntries())):n(e.getEntries())}));return a.observe(e),i=!1,Sl(),()=>{a.disconnect(),F(r)}})}var xl;function Sl(){!xl&&Cl()&&`addEventListener`in performance&&(xl=z(performance,`resourcetimingbufferfull`,()=>{performance.clearResourceTimings()}))}function Cl(){return window.performance!==void 0&&`getEntries`in performance}function wl(e){return PerformanceObserver.supportedEntryTypes.includes(e)}function Tl(e){return e.filter(e=>!El(e))}function El(e){return e.entryType===`resource`&&(!sl(e.name)||!el(e))}var Dl=`data-dd-action-name`,Ol=`Masked Element`,kl=`::shadow `,Al=[Dl,`data-testid`,`data-test`,`data-qa`,`data-cy`,`data-test-id`,`data-qa-id`,`data-testing`,`data-component`,`data-element`,`data-source-file`],jl=[Bl,Ll],Ml=[Bl,Rl,zl];function Nl(e,t){if(!e.isConnected)return;let n=Pl(e),r=[];for(let{rootNode:e,target:i}of n){let n=Fl(i,e,t);if(!n)return;r.push(n)}return r.join(kl)}function Pl(e){let t=[],n=e;for(;n;){let e=n.getRootNode();if(t.push({rootNode:e,target:n}),hl(e))n=e.host;else break}return t.reverse()}function Fl(e,t,n){let r,i=e;for(;i&&i.nodeName!==`HTML`;){let e=Wl(i,t,jl,Gl,n,r);if(e)return ql(e,r);r=ql(Wl(i,t,Ml,Kl,n,r)||Hl(i),r),i=i.parentElement}return r}function Il(e){return/[0-9]/.test(e)}function Ll(e){if(e.id&&!Il(e.id))return`#${CSS.escape(e.id)}`}function Rl(e){if(e.tagName===`BODY`)return;let t=e.classList;for(let n=0;n<t.length;n+=1){let r=t[n];if(!Il(r))return`${CSS.escape(e.tagName)}.${CSS.escape(r)}`}}function zl(e){return CSS.escape(e.tagName)}function Bl(e,t){if(t){let e=n(t);if(e)return e}for(let e of Al){let t=n(e);if(t)return t}function n(t){if(e.hasAttribute(t))return`${CSS.escape(e.tagName)}${Vl(t,e.getAttribute(t))}`}}function Vl(e,t){return`[${e}="${CSS.escape(t)}"]`}function Hl(e){let t=Ul(e);return`${CSS.escape(e.tagName)}:nth-of-type(${t})`}function Ul(e){let t=e.parentNode.firstElementChild,n=1;for(;t&&t!==e;)t.tagName===e.tagName&&(n+=1),t=t.nextElementSibling;return n}function Wl(e,t,n,r,i,a){for(let o of n){let n=o(e,i);if(n&&r(e,t,n,a))return n}}function Gl(e,t,n,r){return t.querySelectorAll(ql(n,r)).length===1}function Kl(e,t,n,r){let i;if(r===void 0)i=e=>e.matches(n);else{let e=ql(`${n}:scope`,r);i=t=>t.querySelector(e)!==null}let a=e.previousElementSibling;for(;a;){if(i(a))return!1;a=a.previousElementSibling}for(a=e.nextElementSibling;a;){if(i(a))return!1;a=a.nextElementSibling}return!0}function ql(e,t){return t?`${e}>${t}`:e}var $={IGNORE:`ignore`,HIDDEN:`hidden`,ALLOW:bt.ALLOW,MASK:bt.MASK,MASK_USER_INPUT:bt.MASK_USER_INPUT,MASK_UNLESS_ALLOWLISTED:bt.MASK_UNLESS_ALLOWLISTED},Jl=`data-dd-privacy`,Yl=`hidden`,Xl=`dd-privacy-`,Zl=`data:image/gif;base64,R0lGODlhAQABAIAAAMLCwgAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==`,Ql={INPUT:!0,OUTPUT:!0,TEXTAREA:!0,SELECT:!0,OPTION:!0,DATALIST:!0,OPTGROUP:!0};function $l(e){return`[${Jl}="${e}"], .${Xl}${e}`}function eu(e,t,n){if(n?.has(e))return n.get(e);let r=_l(e),i=r?eu(r,t,n):t,a=tu(nu(e),i);return n&&n.set(e,a),a}function tu(e,t){switch(t){case $.HIDDEN:case $.IGNORE:return t}switch(e){case $.ALLOW:case $.MASK:case $.MASK_USER_INPUT:case $.MASK_UNLESS_ALLOWLISTED:case $.HIDDEN:case $.IGNORE:return e;default:return t}}function nu(e){if(pl(e)){if(e.tagName===`BASE`)return $.ALLOW;if(e.tagName===`INPUT`){let t=e;if(t.type===`password`||t.type===`email`||t.type===`tel`||t.type===`hidden`)return $.MASK;let n=t.getAttribute(`autocomplete`);if(n&&(n.startsWith(`cc-`)||n.endsWith(`-password`)))return $.MASK}if(e.matches($l($.HIDDEN)))return $.HIDDEN;if(e.matches($l($.MASK)))return $.MASK;if(e.matches($l($.MASK_UNLESS_ALLOWLISTED)))return $.MASK_UNLESS_ALLOWLISTED;if(e.matches($l($.MASK_USER_INPUT)))return $.MASK_USER_INPUT;if(e.matches($l($.ALLOW)))return $.ALLOW;if(cu(e))return $.IGNORE}}function ru(e,t){switch(t){case $.MASK:case $.HIDDEN:case $.IGNORE:return!0;case $.MASK_UNLESS_ALLOWLISTED:return dl(e)?au(e.parentNode)?!0:!lu(e.textContent||``):au(e);case $.MASK_USER_INPUT:return dl(e)?au(e.parentNode):au(e);default:return!1}}function iu(e,t,n,r,i){if(r!==$.MASK&&r!==$.MASK_UNLESS_ALLOWLISTED||t===`data-dd-privacy`||Al.includes(t)||t===i.actionNameAttribute)return!1;switch(t){case`title`:case`alt`:case`placeholder`:case`aria-label`:case`name`:return!0}return!!(e===`A`&&t===`href`||e===`IFRAME`&&t===`srcdoc`||n&&t.startsWith(`data-`)||(e===`IMG`||e===`SOURCE`)&&(t===`src`||t===`srcset`))}function au(e){if(!e||e.nodeType!==e.ELEMENT_NODE)return!1;let t=e;if(t.tagName===`INPUT`)switch(t.type){case`button`:case`color`:case`reset`:case`submit`:return!1}return!!Ql[t.tagName]}function ou(e){return e.replace(/\S/g,`x`)}function su(e,t){let n=e.parentElement?.tagName,r=e.textContent||``,i=t;return n===`SCRIPT`||i===$.HIDDEN?r=`***`:ru(e,i)&&(n===`DATALIST`||n===`SELECT`||n===`OPTGROUP`||(r=n===`OPTION`?`***`:ou(r))),n===`HEAD`&&!r.trim()?``:r}function cu(e){if(e.nodeName===`SCRIPT`)return!0;
6if(e.nodeName===`LINK`){let e=t(`rel`);return/preload|prefetch/i.test(e)&&t(`as`)===`script`||e===`shortcut icon`||e===`icon`}if(e.nodeName===`META`){let n=t(`name`),r=t(`rel`),i=t(`property`);return/^msapplication-tile(image|color)$/.test(n)||n===`application-name`||r===`icon`||r===`apple-touch-icon`||r===`shortcut icon`||n===`keywords`||n===`description`||/^(og|twitter|fb):/.test(i)||/^(og|twitter):/.test(n)||n===`pinterest`||n===`robots`||n===`googlebot`||n===`bingbot`||e.hasAttribute(`http-equiv`)||n===`author`||n===`generator`||n===`framework`||n===`publisher`||n===`progid`||/^article:/.test(i)||/^product:/.test(i)||n===`google-site-verification`||n===`yandex-verification`||n===`csrf-token`||n===`p:domain_verify`||n===`verify-v1`||n===`verification`||n===`shopify-checkout-api-token`}function t(t){return(e.getAttribute(t)||``).toLowerCase()}return!1}function lu(e){return e?.trim()?window.$DD_ALLOW?.has(e.toLocaleLowerCase())||!1:!0}function uu(e,t){return lu(e)?e:t||ou(e)}function du(){let e,t=window.visualViewport;return e=t?t.pageLeft-t.offsetLeft:window.scrollX===void 0?window.pageXOffset||0:window.scrollX,Math.round(e)}function fu(){let e,t=window.visualViewport;return e=t?t.pageTop-t.offsetTop:window.scrollY===void 0?window.pageYOffset||0:window.scrollY,Math.round(e)}var pu;function mu(){return pu||=hu(),pu}function hu(){return new M(e=>{let{throttled:t}=Ht(()=>{e.notify(gu())},200);return z(window,R.RESIZE,t,{capture:!0,passive:!0}).stop})}function gu(){let e=window.visualViewport;return e?{width:Number(e.width*e.scale),height:Number(e.height*e.scale)}:{width:Number(window.innerWidth||0),height:Number(window.innerHeight||0)}}var _u=function(e){return e[e.OFF=0]=`OFF`,e[e.SAMPLED=1]=`SAMPLED`,e[e.FORCED=2]=`FORCED`,e}({});function vu(e,t){return H()?+!!Lr(Fr.RECORDS):Mi(e.id,Ai(t.sessionSampleRate,t.sessionReplaySampleRate))?1:e.isReplayForced?2:0}function yu(){let e=new M,{stop:t}=L(window,`open`,()=>e.notify());return{observable:e,stop:t}}function bu(e,t,n,r,i){return{get:a=>{let o=n.findView(a),s=i.findUrl(a),c=t.findTrackedSession(a);if(c&&o&&s){let t=r.findActionId(a);return{application_id:e,session_id:c.id,user_action:t?{id:t}:void 0,view:{id:o.id,name:o.name,referrer:s.referrer,url:s.url}}}}}}function xu(){return Cu(64)}function Su(){return Cu(63)}function Cu(e){let t=crypto.getRandomValues(new Uint32Array(2)),n=BigInt(t[0])+(BigInt(t[1])<<32n);return e===63&&(n&=9223372036854775807n),n}function wu(e){return e.toString(16).padStart(16,`0`)}function Tu(e){e.status===0&&!e.isAborted&&(e.traceId=void 0,e.spanId=void 0,e.traceSampled=void 0)}function Eu(e,t,n,r){return{clearTracingIfNeeded:Tu,traceFetch:i=>Du(e,i,t,n,r,e=>{if(i.input instanceof Request&&!i.init?.headers)i.input=new Request(i.input),Object.keys(e).forEach(t=>{i.input.headers.append(t,e[t])});else{i.init=fe(i.init);let t=[];i.init.headers instanceof Headers?i.init.headers.forEach((e,n)=>{t.push([n,e])}):Array.isArray(i.init.headers)?i.init.headers.forEach(e=>{t.push(e)}):i.init.headers&&Object.keys(i.init.headers).forEach(e=>{t.push([e,i.init.headers[e]])}),i.init.headers=t.concat(Hr(e))}}),traceXhr:(i,a)=>Du(e,i,t,n,r,e=>{try{Object.keys(e).forEach(t=>{a.setRequestHeader(t,e[t])})}catch{}})}}function Du(e,t,n,r,i,a){let o=n.findTrackedSession();if(!o)return;let s=e.allowedTracingUrls.find(e=>ot([e.match],t.url,!0));if(!s)return;let c=Mi(o.id,Ai(e.sessionSampleRate,e.traceSampleRate)),l=H()?Ir()?.getIsTraceSampled()??c:c;(l||e.traceContextInjection===xt.ALL)&&(t.traceSampled=l,t.traceId=xu(),t.spanId=Su(),a(Ou(t.traceId,t.spanId,t.traceSampled,o.id,s.propagatorTypes,r,i,e)))}function Ou(e,t,n,r,i,a,o,s){let c={};if(i.forEach(r=>{switch(r){case`datadog`:Object.assign(c,{"x-datadog-origin":`rum`,"x-datadog-parent-id":t.toString(),"x-datadog-sampling-priority":n?`1`:`0`,"x-datadog-trace-id":e.toString()});break;case`tracecontext`:Object.assign(c,{traceparent:`00-0000000000000000${wu(e)}-${wu(t)}-0${n?`1`:`0`}`,tracestate:`dd=s:${n?`1`:`0`};o:rum`});break;case`b3`:Object.assign(c,{b3:`${wu(e)}-${wu(t)}-${n?`1`:`0`}`});break;case`b3multi`:Object.assign(c,{"X-B3-TraceId":wu(e),"X-B3-SpanId":wu(t),"X-B3-Sampled":n?`1`:`0`});break}}),s.propagateTraceBaggage){let e={"session.id":r},t=a.getContext().id;typeof t==`string`&&(e[`user.id`]=t);let n=o.getContext().id;typeof n==`string`&&(e[`account.id`]=n);let i=Object.entries(e).map(([e,t])=>`${e}=${encodeURIComponent(t)}`).join(`,`);i&&(c.baggage=i)}return c}var ku=32*xn;function Au(e,t){let n=Nu(e,t.trackPayload);if(n){if(t.trackResponseErrors&&e.responseBody){let t=ju(e.responseBody);t&&(n.error_count=t.length,n.errors=t)}return n}}function ju(e){let t=de(e);if(!t||typeof t!=`object`)return;let n=t;if(Ci(n.errors))return n.errors.map(e=>({message:e.message,path:e.path,locations:e.locations,code:e.extensions?.code}))}function Mu(e,t){return t.allowedGraphQlUrls.find(t=>ot([t.match],e))}function Nu(e,t=!1){let n;if(e.method===`POST`?n=Pu(e.requestBody):e.method===`GET`&&(n=Fu(e.url)),n)return Iu(n,t)}function Pu(e){if(!e||typeof e!=`string`)return;let t=de(e);if(t)return{query:t.query,operationName:t.operationName,variables:t.variables?JSON.stringify(t.variables):void 0,operationType:t.operationType}}function Fu(e){let t=we(e).searchParams,n=t.get(`variables`),r=n&&de(n)!==void 0?n:void 0;return{query:t.get(`query`)||void 0,operationName:t.get(`operationName`)||void 0,variables:r,operationType:t.get(`operationType`)||void 0}}function Iu(e,t){let n,r,i;if(e.query){let i=e.query.trim();n=Lu(i),t&&(r=ye(i,ku,`...`))}if(!n){let t=e.operationType;(t===`query`||t===`mutation`||t===`subscription`)&&(n=t)}return e.variables&&(i=e.variables),{operationType:n,operationName:e.operationName,variables:i,payload:r}}function Lu(e){return e.match(/^\s*(query|mutation|subscription)\b/i)?.[1]}var Ru=1;function zu(e,t,n,r,i,a){let o=Eu(t,n,r,i);Bu(e,o,a),Vu(e,t,o,a)}function Bu(e,t,n){let r=[];return r.push(za().subscribe(e=>{e.state===`start`&&sl(e.url)&&(t.traceXhr(e,e.xhr),Hu(e))})),r.push(n.subscribe(({data:n,type:r})=>
6{if(r!==Bo.XHR)return;let i=n;if(sl(i.url))switch(i.state){case`start`:Hu(i),e.notify(7,{requestIndex:i.requestIndex,url:i.url});break;case`complete`:t.clearTracingIfNeeded(i),e.notify(8,{...i,type:Ro.XHR,isAbortedOnStart:!1});break}})),{stop:()=>r.forEach(e=>e.unsubscribe())}}function Vu(e,t,n,r){let i=[];return i.push(Ja({responseBodyAction:e=>Mu(e.url,t)?.trackResponseErrors?Ga.COLLECT:Ga.IGNORE}).subscribe(e=>{e.state===`start`&&sl(e.url)&&(n.traceFetch(e),Hu(e))})),i.push(r.subscribe(({data:t,type:r})=>{if(r!==Bo.FETCH)return;let i=t;if(sl(i.url))switch(i.state){case`start`:Hu(i),e.notify(7,{requestIndex:i.requestIndex,url:i.url});break;case`resolve`:n.clearTracingIfNeeded(i),e.notify(8,{...i,duration:T(i.startClocks.timeStamp,w()),type:Ro.FETCH,requestBody:i.init?.body});break}})),{stop:()=>i.forEach(e=>e.unsubscribe())}}function Hu(e){e.requestIndex||=Ru++}function Uu(e){return le(e)&&e<0?void 0:e}function Wu(e,t,n,r,i,a){let o=N(Gu)(e,t,n,r),s,c=!1,l=P(k(()=>p({hadActivity:!1})),100),u=a===void 0?void 0:P(k(()=>p({hadActivity:!0,end:w()})),a),d=o.subscribe(({isBusy:e})=>{F(l),F(s);let t=w();e||(s=P(k(()=>p({hadActivity:!0,end:t})),100))}),f=()=>{c=!0,F(l),F(s),F(u),d.unsubscribe()};function p(e){c||(f(),i(e))}return{stop:f}}function Gu(e,t,n,r){return new M(i=>{let a=[],o,s=0;return a.push(t.subscribe(e=>{e.every(qu)||c()}),n.subscribe(c),bl({type:`resource`}).subscribe(e=>{e.some(e=>!Ku(r,e.name))&&c()}),e.subscribe(7,e=>{Ku(r,e.url)||(o===void 0&&(o=e.requestIndex),s+=1,c())}),e.subscribe(8,e=>{Ku(r,e.url)||o===void 0||e.requestIndex<o||(--s,c())})),()=>{a.forEach(e=>e.unsubscribe())};function c(){i.notify({isBusy:s>0})}})}function Ku(e,t){return ot(e.excludedActivityUrls,t)}function qu(e){let t=e.type===`characterData`?e.target.parentElement:e.target;return!!(t&&pl(t)&&t.matches(`[data-dd-excluded-activity-mutations], [data-dd-excluded-activity-mutations] *`))}function Ju({lifeCycle:e,isChildEvent:t,onChange:n=I}){let r={errorCount:0,longTaskCount:0,resourceCount:0,actionCount:0,frustrationCount:0},i=e.subscribe(13,e=>{if(!(e.type===`view`||e.type===`vital`||!t(e)))switch(e.type){case Q.ERROR:r.errorCount+=1,n();break;case Q.ACTION:r.actionCount+=1,e.action.frustration&&(r.frustrationCount+=e.action.frustration.type.length),n();break;case Q.LONG_TASK:r.longTaskCount+=1,n();break;case Q.RESOURCE:e._dd?.discarded||(r.resourceCount+=1,n());break}});return{stop:()=>{i.unsubscribe()},eventCounts:r}}var Yu=5*C;function Xu(e){let t=ki({expireDelay:Yu}),n=new Map;function r(e){n.delete(e.key),e.eventCounts?.stop()}function i(){n.forEach(e=>{r(e)}),t.reset()}let a=e.subscribe(10,i);function o(i,a,o,s){let c=b(),l=t.add(c,a.relative),u=n.get(i);u&&r(u);let d={id:c,key:i,startClocks:a,data:o,historyEntry:l,eventCounts:s?.isChildEvent?Ju({lifeCycle:e,isChildEvent:s.isChildEvent(c)}):void 0};return n.set(i,d),d}function s(e,t,i){let a=n.get(e);if(!a)return;let o=i?d(a.data,i):a.data;a.historyEntry.close(t.relative);let s=T(a.startClocks.timeStamp,t.timeStamp),c=a.eventCounts?.eventCounts;return r(a),{...o,id:a.id,startClocks:a.startClocks,duration:s,counts:c}}function c(e){let t=n.get(e);if(!t)return;let i=t.eventCounts?.eventCounts;return r(t),t.historyEntry.remove(),{...t.data,id:t.id,startClocks:t.startClocks,counts:i}}function l(e){return t.findAll(e)}function u(e){return n.get(e)?.eventCounts?.eventCounts}function f(){a.unsubscribe(),i(),t.stop()}return{start:o,stop:s,discard:c,getCounts:u,findId:l,stopAll:f}}var Zu=[`HTML`,`BODY`],Qu=2*xn,$u=Al.concat([`role`,`type`,`disabled`,`readonly`,`tabindex`,`draggable`,`target`,`rel`,`download`,`method`,`action`,`enctype`,`autocomplete`]);function ed(e,t){let n=e.filter(e=>e instanceof Element&&!Zu.includes(e.tagName));if(n.length===0)return``;let r=t?[t].concat($u):$u,i=``;for(let e of n){let t=td(e,r);if(i+=t,i.length>=Qu)return ye(i,Qu)}return i}function td(e,t){let n=zl(e),r=Ll(e),i=nd(e),a=id(e,t),o=rd(e);return`${n}${r||``}${a}${i}${o};`}function nd(e){return Array.from(e.classList).filter(e=>!Il(e)).sort().map(e=>`.${CSS.escape(e)}`).join(``)}function rd(e){let t=Array.from(e.parentNode.children);if(t.length<=1)return``;let n=t.filter(t=>t.tagName===e.tagName),r=t.indexOf(e),i=Ul(e);return`:nth-child(${r+1})${n.length>1?`:nth-of-type(${i})`:``}`}function id(e,t){let n=[],r=Array.from(e.attributes);for(let e of r)t.includes(e.name)&&n.push(Vl(e.name,e.value));return n.sort().join(``)}var ad=S;function od(e,t){let n=[],r=0,i;a(e);function a(e){e.stopObservable.subscribe(o),n.push(e),F(i),i=P(s,ad)}function o(){r===1&&n.every(e=>e.isStopped())&&(r=2,t(n))}function s(){F(i),r===0&&(r=1,o())}return{tryAppend:e=>r===0?n.length>0&&!sd(n[n.length-1].event,e.event)?(s(),!1):(a(e),!0):!1,stop:()=>{s()}}}function sd(e,t){return e.target===t.target&&cd(e,t)<=100&&e.timeStamp-t.timeStamp<=ad}function cd(e,t){return Math.sqrt((e.clientX-t.clientX)**2+(e.clientY-t.clientY)**2)}function ld(e,t,n=$.ALLOW){let r=new Map,{actionNameAttribute:i}=t,a=ud(e,`data-dd-action-name`)||i&&ud(e,i);return a?{name:a,nameSource:`custom_attribute`}:n===$.MASK?{name:Ol,nameSource:`mask_placeholder`}:hd(e,fd,t,r)||hd(e,pd,t,r)||{name:``,nameSource:`blank`}}function ud(e,t){let n=dd(e,`[${t}]`);
6if(n)return _d(gd(n.getAttribute(t).trim()))}function dd(e,t){let n=e;for(;n;){if(n.matches(t))return n;n=vl(n)}return null}var fd=[(e,t,n)=>{if(`labels`in e&&e.labels&&e.labels.length>0)return bd(e.labels[0],t,n)},e=>{if(e.nodeName===`INPUT`){let t=e,n=t.getAttribute(`type`);if(n===`button`||n===`submit`||n===`reset`)return{name:t.value,nameSource:`text_content`}}},(e,t,n)=>{if(e.nodeName===`BUTTON`||e.nodeName===`LABEL`||e.getAttribute(`role`)===`button`)return bd(e,t,n)},(e,t,n)=>yd(e,`aria-label`,t,n),(e,t,n)=>{let r=e.getAttribute(`aria-labelledby`);if(r)return{name:r.split(/\s+/).map(t=>vd(e,t)).filter(e=>!!e).map(e=>xd(e,t,n)).join(` `),nameSource:`text_content`}},(e,t,n)=>yd(e,`alt`,t,n),(e,t,n)=>yd(e,`name`,t,n),(e,t,n)=>yd(e,`title`,t,n),(e,t,n)=>yd(e,`placeholder`,t,n),(e,t,n)=>{if(`options`in e&&e.options.length>0)return bd(e.options[0],t,n)}],pd=[(e,t,n)=>bd(e,t,n)],md=10;function hd(e,t,n,r){let i=e,a=0;for(;a<=md&&i&&i.nodeName!==`BODY`&&i.nodeName!==`HTML`&&i.nodeName!==`HEAD`;){for(let e of t){let t=e(i,n,r);if(t){let{name:e,nameSource:n}=t,r=e?.trim();if(r)return{name:_d(gd(r)),nameSource:n}}}if(i.nodeName===`FORM`)break;i=vl(i),a+=1}}function gd(e){return e.replace(/\s+/g,` `)}function _d(e){return e.length>100?`${ye(e,100)} [...]`:e}function vd(e,t){let n=e.getRootNode();if(n instanceof ShadowRoot){let e=n.getElementById(t);if(e)return e}return e.ownerDocument?e.ownerDocument.getElementById(t):null}function yd(e,t,n,r){let{enablePrivacyForActionName:i,defaultPrivacyLevel:a}=n,o=e.getAttribute(t);if(o&&i){let i=eu(e,a,r);iu(e.tagName,t,o,i,n)&&(o=uu(o,Ol))}else o||=``;return{name:o,nameSource:`standard_attribute`}}function bd(e,t,n){return{name:xd(e,t,n)||``,nameSource:`text_content`}}function xd(e,t,n){if(e.isContentEditable)return;let{enablePrivacyForActionName:r,actionNameAttribute:i,defaultPrivacyLevel:a}=t,o=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_TEXT,c),s=``;for(;o.nextNode();){let e=o.currentNode;if(pl(e)){(e.nodeName===`BR`||e.nodeName===`P`||[`block`,`flex`,`grid`,`list-item`,`table`,`table-caption`].includes(getComputedStyle(e).display))&&(s+=` `);continue}s+=e.textContent||``}return s.replace(/\s+/g,` `).trim();function c(e){let t=eu(e,a,n);if(r&&t&&ru(e,t))return NodeFilter.FILTER_REJECT;if(pl(e)){if(e.hasAttribute(`data-dd-action-name`)||i&&e.hasAttribute(i))return NodeFilter.FILTER_REJECT;let t=getComputedStyle(e);if(t.visibility!==`visible`||t.display===`none`||t.contentVisibility&&t.contentVisibility!==`visible`)return NodeFilter.FILTER_REJECT}return NodeFilter.FILTER_ACCEPT}}function Sd({onPointerDown:e,onPointerUp:t}){let n,r={selection:!1,input:!1,scroll:!1},i,a=[z(window,R.POINTER_DOWN,t=>{wd(t)&&(n=Cd(),r={selection:!1,input:!1,scroll:!1},i=e(t))},{capture:!0}),z(window,R.SELECTION_CHANGE,()=>{(!n||!Cd())&&(r.selection=!0)},{capture:!0}),z(window,R.SCROLL,()=>{r.scroll=!0},{capture:!0,passive:!0}),z(window,R.POINTER_UP,e=>{if(wd(e)&&i){let n=r;t(i,e,()=>n),i=void 0}},{capture:!0}),z(window,R.INPUT,()=>{r.input=!0},{capture:!0})];return{stop:()=>{a.forEach(e=>e.stop())}}}function Cd(){let e=window.getSelection();return!e||e.isCollapsed}function wd(e){return e.target instanceof Element&&e.isPrimary!==!1}var Td=3;function Ed(e,t){if(Dd(e))return t.addFrustration(Js.RAGE_CLICK),e.some(kd)&&t.addFrustration(Js.DEAD_CLICK),t.hasError&&t.addFrustration(Js.ERROR_CLICK),{isRage:!0};let n=e.some(e=>e.getUserActivity().selection);return e.forEach(e=>{e.hasError&&e.addFrustration(Js.ERROR_CLICK),kd(e)&&!n&&e.addFrustration(Js.DEAD_CLICK)}),{isRage:!1}}function Dd(e){if(e.some(e=>e.getUserActivity().selection||e.getUserActivity().scroll))return!1;for(let t=0;t<e.length-(Td-1);t+=1)if(e[t+Td-1].event.timeStamp-e[t].event.timeStamp<=1e3)return!0;return!1}var Od=`input:not([type="checkbox"]):not([type="radio"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="range"]),textarea,select,[contenteditable],[contenteditable] *,canvas,a[href],a[href] *`;function kd(e){if(e.hasPageActivity||e.getUserActivity().input||e.getUserActivity().scroll)return!1;let t=e.event.target;return t.tagName===`LABEL`&&t.hasAttribute(`for`)&&(t=document.getElementById(t.getAttribute(`for`))),!t?.matches(Od)}var Ad=10*S,jd=new Map;function Md(e){let t=jd.get(e);return jd.delete(e),t}
6function Nd(e,t){jd.set(e,t),jd.forEach((e,t)=>{T(t,D())>Ad&&jd.delete(t)})}function Pd(e){return t=>t.action?.id?.includes(e)??!1}function Fd(e,t,n,r){let i=Xu(e),a=new M,o;e.subscribe(5,l),e.subscribe(11,l);let{stop:s}=Sd({onPointerDown:i=>Id(r,e,t,i,n),onPointerUp:({clickActionBase:o,hadActivityOnPointerDown:s},l,u)=>{Ld(r,e,t,n,i,a,c,o,l,u,s)}});return{stop:()=>{l(),a.notify(),s(),i.stopAll()},findActionId:i.findId};function c(e){if(!o?.tryAppend(e)){let t=e.clone();o=od(e,e=>{Vd(e,t),o=void 0})}}function l(){o&&o.stop()}}function Id(e,t,n,r,i){let a;if(a=e.enablePrivacyForActionName?eu(zd(r),e.defaultPrivacyLevel):$.ALLOW,a===$.HIDDEN)return;let o=Rd(r,a,e),s=!1;return Wu(t,n,i,e,e=>{s=e.hadActivity},100),{clickActionBase:o,hadActivityOnPointerDown:()=>s}}function Ld(e,t,n,r,i,a,o,s,c,l,u){let d=Bd(t,i,l,s,c);o(d);let f=s?.target?.selector;f&&Nd(c.timeStamp,f);let{stop:p}=Wu(t,n,r,e,e=>{e.hadActivity&&e.end<d.startClocks.timeStamp?d.discard():e.hadActivity?d.stop(e.end):u()?d.stop(d.startClocks.timeStamp):d.stop()},Ad),m=t.subscribe(5,({endClocks:e})=>{d.stop(e.timeStamp)}),h=t.subscribe(11,()=>{d.stop(w())}),g=a.subscribe(()=>{d.stop()});d.stopObservable.subscribe(()=>{h.unsubscribe(),m.unsubscribe(),p(),g.unsubscribe()})}function Rd(e,t,n){let r=zd(e),i=r.getBoundingClientRect(),a=Nl(r,n.actionNameAttribute),o=ed(e.composedPath(),n.actionNameAttribute);a&&Nd(e.timeStamp,a);let{name:s,nameSource:c}=ld(r,n,t);return{type:qs.CLICK,target:{width:Math.round(i.width),height:Math.round(i.height),selector:a,composedPathSelector:o||void 0},position:{x:Math.round(e.clientX-i.left),y:Math.round(e.clientY-i.top)},name:s,nameSource:c}}function zd(e){if(e.composed&&ml(e.target)&&typeof e.composedPath==`function`){let t=e.composedPath();if(t.length>0&&t[0]instanceof Element)return t[0]}return e.target}function Bd(e,t,n,r,i){let a=b(),o=Me(i.timeStamp),s=t.start(a,o,r,{isChildEvent:Pd});e.notify(15,s);let c=0,l,u=[],d=new M;function f(e){c===0&&(c=1,l=e?t.stop(a,Ne(e)):t.discard(a),d.notify())}return{event:i,stop:f,stopObservable:d,get hasError(){let e=l?.counts??t.getCounts(a);return e?e.errorCount>0:!1},get hasPageActivity(){return l&&`duration`in l},getUserActivity:n,addFrustration:e=>{u.push(e)},get startClocks(){return o},isStopped:()=>c===1||c===2,clone:()=>Bd(e,t,n,r,i),validate:t=>{if(f(),c!==1||!l)return;let n={frustrationTypes:u,events:t??[i],event:i,...l,counts:l.counts};e.notify(0,n),c=2},discard:()=>{f(),c=2}}}function Vd(e,t){let{isRage:n}=Ed(e,t);n?(e.forEach(e=>e.discard()),t.stop(w()),t.validate(e.map(e=>e.event))):(t.discard(),e.forEach(e=>e.validate()))}function Hd(e,t){let n=Xu(e);function r(t,r={},i=O()){let a=r.actionKey??t,o=n.start(a,i,{name:t,...r},{isChildEvent:Pd});e.notify(15,o)}function i(e,r={},i=O()){let a=r.actionKey??e,o=n.stop(a,i,r);if(!o)return;let s=[];o.counts&&o.counts.errorCount>0&&s.push(Js.ERROR_CLICK),t({...o,type:o.type||qs.CUSTOM,frustrationTypes:s})}function a(e){t({id:b(),frustrationTypes:[],...e})}return{addAction:a,startAction:r,stopAction:i,findActionId:n.findId,stop:n.stopAll}}function Ud(e,t,n,r,i){let{unsubscribe:a}=e.subscribe(0,t=>{e.notify(12,Wd(t))}),o=I,s;i.trackUserInteractions&&(s=Fd(e,n,r,i));let c=Hd(e,t=>{e.notify(12,Wd(t))}),l={findActionId:e=>{let t=c.findActionId(e),n=s?.findActionId(e)??[];return t.concat(n)}};return t.assemble.register(({startTime:e,eventType:t})=>{if(t!==Q.ERROR&&t!==Q.RESOURCE&&t!==Q.LONG_TASK)return U;let n=t===Q.LONG_TASK?Ae(e,1):e,r=l.findActionId(n);return r.length?{type:t,action:{id:r}}:U}),t.assembleTelemetry.register(({startTime:e})=>({action:{id:l.findActionId(e)}})),{addAction:c.addAction,startAction:c.startAction,stopAction:c.stopAction,actionContexts:l,stop:()=>{a(),o(),c.stop(),s?.stop()}}}function Wd(e){let t=Gd(e),n=Uu(E(e.duration));return{rawRumEvent:{type:Q.ACTION,date:e.startClocks.timeStamp,action:{id:e.id,target:{name:e.name},type:e.type,...n!==void 0&&{loading_time:n},...e.counts&&{error:{count:e.counts.errorCount},long_task:{count:e.counts.longTaskCount},resource:{count:e.counts.resourceCount}},frustration:{type:e.frustrationTypes}},...t?{_dd:{action:{target:{selector:e.target?.selector||void 0,width:e.target?.width||void 0,height:e.target?.height||void 0,composed_path_selector:e.target?.composedPathSelector},position:e.position,name_source:e.nameSource}}}:{context:e.context}},duration:e.duration,startClocks:e.startClocks,domainContext:t?{events:e.events}:{handlingStack:e.handlingStack}}}function Gd(e){return`events`in e}function Kd(e){let t=tr([er.cspViolation,er.intervention]).subscribe(t=>e.notify(t));return{stop:()=>{t.unsubscribe()}}}function qd(e,t){let n=new M;return t.subscribe(({data:e,type:t})=>{t===Bo.RUNTIME_ERROR?n.notify(e):t===Bo.CONSOLE&&e.api===p.error&&n.notify(e.error)}),Kd(n),n.subscribe(t=>e.notify(14,{error:t})),Jd(e)}function Jd(e){return e.subscribe(14,({error:t})=>{e.notify(12,Yd(t))}),{addError:({error:t,handlingStack:n,componentStack:r,startClocks:i,context:a})=>{let o=zn({originalError:t,handlingStack:n,componentStack:r,startClocks:i,nonErrorPrefix:Kn.PROVIDED,source:V.CUSTOM,handling:qn.HANDLED});o.context=d(o.context,a),e.notify(14,{error:o})}}}function Yd(e){let t={date:e.startClocks.timeStamp,error:{id:b(),message:e.message,source:e.source,stack:e.stack,handling_stack:e.handlingStack,component_stack:e.componentStack,type:e.type,handling:e.handling,causes:e.causes,source_type:`browser`,fingerprint:e.fingerprint,csp:e.csp},type:Q.ERROR,context:e.context},n={error:e.originalError,handlingStack:e.handlingStack};return{rawRumEvent:t,startClocks:e.startClocks,domainContext:n}}var Xd=2*C;function Zd(e){let t=Qd(e)||$d(e);if(!(!t||t.traceTime<=ze()-Xd))return t.traceId}function Qd(e){let t=e.querySelector(`meta[name=dd-trace-id]`),n=e.querySelector(`meta[name=dd-trace-time]`);return ef(t?.content,n?.content)}function $d(e){let t=tf(e);if(t)return ef(ge(t,`trace-id`),ge(t,`trace-time`))}function ef(e,t){let n=t&&Number(t);if(!(!e||!n))return{traceId:e,traceTime:n}}function tf(e){for(let t=0;t<e.childNodes.length;t+=1){let n=nf(e.childNodes[t]);if(n)return n}if(e.body)for(let t=e.body.childNodes.length-1;t>=0;--t){let n=e.body.childNodes[t],r=nf(n);if(r)return r;if(!dl(n))break}}function nf(e){if(e&&fl(e)){let t=/^\s*DATADOG;(.*?)\s*$/.exec(e.data);if(t)return t[1]}}function rf(e){return!(e.loadEventEnd>0&&e.domComplete<=0)}function af(){if(wl(`navigation`)){let e=performance.getEntriesByType(`navigation`)[0];if(e&&rf(e))return e}let e=of(),t={entryType:`navigation`,initiatorType:`navigation`,name:window.location.href,startTime:0,duration:e.loadEventEnd,decodedBodySize:0,encodedBodySize:0,transferSize:0,workerStart:0,toJSON:()=>({...t,toJSON:void 0}),...e};return t}function of(){let e={},t=performance.timing;for(let n in t)if(le(t[n])){let r=n,i=t[r];e[r]=i===0?0:Pe(i)}return e}function sf(e){return e.responseStart>=0&&e.responseStart<=D()?e.responseStart:void 0}function cf(){if(wl(`resource`))return performance.getEntriesByType(`resource`)}function lf(e,t){let n=cf();if(n)return Br(n,n=>n.name===e&&n.startTime<=t)}function uf(e){let t=new Set,n=e.subscribe(8,e=>{t.add(e),t.size>1e3&&t.delete(t.values().next().value)});return{getMatchingRequest(e){let n=1/0,r;for(let i of t){let t=e.startTime-i.startClocks.relative;0<=t&&t<n&&i.url===e.name&&(n=Math.abs(t),r=i)}return r&&t.delete(r),r},stop(){n.unsubscribe()}}}function df(e,t){function n(e,n={},r=O()){let i=n.resourceKey??e;t.start(i,r,{url:e,...n})}function r(n,r={},i=O()){let a=r.resourceKey??n,o=t.stop(a,i,{context:r.context,type:r.type});if(!o)return;let s=T(o.startClocks.relative,i.relative),c={date:o.startClocks.timeStamp,type:Q.RESOURCE,resource:{id:o.id,type:o.type||Y.OTHER,url:ul(o.url),duration:E(s),method:o.method,status_code:r.statusCode,size:r.size},_dd:{},context:o.context};e.notify(12,{rawRumEvent:c,startClocks:o.startClocks,duration:s,domainContext:{isManual:!0}})}return{startResource:n,stopResource:r}}function ff(e,t){let n=N(to)(),r=uf(e),i=bl({type:`resource`,buffered:!0}).subscribe(n=>{for(let i of n)Zc(i)?P(()=>{let n=pf(i,r.getMatchingRequest(i),t);n&&e.notify(12,n)},50):o(()=>pf(i,void 0,t))}),{stop:a}=Fa(`interactive`,()=>{o(()=>pf(af(),void 0,t))});function o(t){n.push(()=>{let n=t();n&&e.notify(12,n)})}let s=Xu(e),c=df(e,s);return{startResource:c.startResource,stopResource:c.stopResource,stop:()=>{a(),n.stop(),i.unsubscribe(),s.stopAll()}}}function pf(e,t,n){let r=t?_f(t,n):vf(e,n);if(!n.trackResources&&!r)return;let i=Me(e.startTime),a=Qc(e),o=bf(t,n);return{startClocks:i,duration:a,rawRumEvent:d({date:i.timeStamp,resource:{id:b(),duration:E(a),type:Yc(e),method:t?.method,status_code:t?t.status:yf(e.responseStatus),url:t?ul(t.url):e.name,protocol:il(e),delivery_type:al(e),graphql:t&&mf(t,n),render_blocking_status:e.renderBlockingStatus,...ol(e),...$c(e)},type:Q.RESOURCE,_dd:{discarded:!n.trackResources}},r,hf(e),o),domainContext:gf(e,t)}}function mf(e,t){let n=Mu(e.url,t);if(n)return Au(e,n)}function hf(e){let t=e.contentType;if(t)return{resource:{response:{headers:{"content-type":t}}}}}function gf(e,t){return{performanceEntry:e,isManual:!1,isAborted:t?t.isAborted:!1,handlingStack:t?.handlingStack,requestInit:t?.init,requestInput:t?.input,response:t?.response,error:t?.error,xhr:t?.xhr}}function _f(e,t){if(e.traceSampled&&e.traceId&&e.spanId)return{_dd:{span_id:e.spanId.toString(),trace_id:e.traceId.toString(),rule_psr:t.rulePsr}}}function vf(e,t){if(e.initiatorType!==`navigation`)return;let n=N(Zd)(document);if(n)return{_dd:{trace_id:n,span_id:Su().toString(),rule_psr:t.rulePsr}}}function yf(e){return e===0?void 0:e}function bf(e,t){let n=t.trackResourceHeaders;if(n.length===0||!e)return;let r=n.filter(t=>t.url===void 0?!0:ot([t.url],e.url,!0));if(r.length===0)return;let i=r.filter(e=>e.location===void 0||e.location===`any`||e.location===`response`),a=r.filter(e=>e.location===void 0||e.location===`any`||e.location===`request`),o=i.length>0?xf(e,i):void 0,s=a.length>0?Sf(e,a):void 0;if(!(!o&&!s))return{resource:{request:s?{headers:s}:void 0,response:o?{headers:o}:void 0}}}function xf(e,t){if(e.type===Ro.FETCH&&e.response)return Ef(e.response.headers,t);if(e.type===Ro.XHR&&e.xhr){let n=e.xhr.getAllResponseHeaders();if(n)try{return Ef(new Headers(Df(n)),t)}catch{}}}function Sf(e,t){if(e.type!==Ro.FETCH)return;let n;return e.init?.headers?n=new Headers(e.init.headers):e.input instanceof Request&&(n=e.input.headers),n?Ef(n,t):void 0}var Cf=/(token|cookie|secret|authorization|(api|secret|access|app).?key|(client|connecting|real).?ip|forwarded)/,wf=100,Tf=128;function Ef(e,t){let n={},r=0,i=0,a=!1;return e.forEach((e,o)=>{if(i++,r>=wf){a||=(v.warn(`Maximum number of headers (${wf}) has been reached. Further headers are dropped.`),!0);return}let s=o.toLowerCase();if(Cf.test(s))return;let c=t.find(e=>ot([e.name],s));if(!c)return;let{extractor:l}=c,u=l?Xs(e,l):e;u!==void 0&&(u.length>Tf&&(v.warn(`Header "${s}" value was truncated from ${u.length} to ${Tf} characters.`),hi(`Resource header value was truncated`,{header_name:s,original_length:u.length,limit:Tf})),n[s]=ye(u,Tf),r++)}
6),a&&hi(`Maximum number of resource headers reached`,{collectedHeaderCount:r,totalHeaderCount:i}),r>0?n:void 0}function Df(e){let t=[],n=e.trim().split(/\r\n/);for(let e of n){let n=e.indexOf(`:`);n>0&&t.push([e.substring(0,n).trim(),e.substring(n+1).trim()])}return t}function Of(e,t,n){let{stop:r,eventCounts:i}=Ju({lifeCycle:e,isChildEvent:e=>e.view.id===t,onChange:n});return{stop:r,eventCounts:i}}var kf=10*C;function Af(e,t){return{stop:bl({type:`paint`,buffered:!0}).subscribe(n=>{let r=n.find(t=>t.name===`first-contentful-paint`&&t.startTime<e.timeStamp&&t.startTime<kf);r&&t(r.startTime)}).unsubscribe}}function jf(e,t){requestAnimationFrame(()=>{requestAnimationFrame(()=>{t(T(e,D()))})})}function Mf(e){return Ff(()=>{let t=N(af)();Pf(t)||e(Nf(t))})}function Nf(e){return{domComplete:e.domComplete,domContentLoaded:e.domContentLoadedEventEnd,domInteractive:e.domInteractive,loadEvent:e.loadEventEnd,firstByte:sf(e)}}function Pf(e){return e.loadEventEnd<=0}function Ff(e){let t,{stop:n}=Fa(`complete`,()=>{t=P(()=>e())});return{stop:()=>{n(),F(t)}}}var If=10*C;function Lf(e,t,n,r){let i=1/0,{stop:a}=_n(n,[R.POINTER_DOWN,R.KEY_DOWN],e=>{i=e.timeStamp},{capture:!0,once:!0}),o=0,s=bl({type:`largest-contentful-paint`,buffered:!0}).subscribe(n=>{let a=Br(n,e=>e.entryType===`largest-contentful-paint`&&e.startTime<i&&e.startTime<t.timeStamp&&e.startTime<If&&e.size>o);if(a){let t;a.element&&(t=Nl(a.element,e.actionNameAttribute));let n=Rf(a),i=a.startTime,s=zf(n,i);r({value:i,targetSelector:t,resourceUrl:n,subParts:s}),o=a.size}});return{stop:()=>{a(),s.unsubscribe()}}}function Rf(e){return e.url===``?void 0:e.url}function zf(e,t){let n=sf(af());if(n===void 0)return;let r=e?lf(e,t):void 0,i=r?Math.max(n,r.requestStart||r.startTime):n,a=Math.min(t,Math.max(i,r?.responseEnd||0));return{loadDelay:i-n,loadTime:a-i,renderDelay:t-a}}function Bf(e,t=window){if(document.visibilityState===`hidden`)return{timeStamp:0,stop:I};if(wl(`visibility-state`)){let t=performance.getEntriesByType(`visibility-state`).filter(e=>e.name===`hidden`).find(t=>t.startTime>=e.relative);if(t)return{timeStamp:t.startTime,stop:I}}let n=1/0,{stop:r}=_n(t,[R.PAGE_HIDE,R.VISIBILITY_CHANGE],e=>{(e.type===R.PAGE_HIDE||document.visibilityState===`hidden`)&&(n=e.timeStamp,r())},{capture:!0});return{get timeStamp(){return n},stop:r}}function Vf(e,t,n,r){let i={},{stop:a}=Mf(e=>{n(e.loadEvent),i.navigationTimings=e,r()}),o=Bf(t),{stop:s}=Af(o,e=>{i.firstContentfulPaint=e,r()}),{stop:c}=Lf(e,o,window,e=>{i.largestContentfulPaint=e,r()});function l(){a(),s(),c(),o.stop()}return{stop:l,initialViewMetrics:i}}var Hf=(e,t)=>e*t,Uf=(e,t)=>{let n=Math.max(e.left,t.left),r=Math.max(e.top,t.top),i=Math.min(e.right,t.right),a=Math.min(e.bottom,t.bottom);return n>=i||r>=a?0:Hf(i-n,a-r)},Wf=e=>{let t=Hf(e.previousRect.width,e.previousRect.height),n=Hf(e.currentRect.width,e.currentRect.height),r=Uf(e.previousRect,e.currentRect);return t+n-r};function Gf(e,t,n){if(!Zf())return{stop:I};let r=0,i;n({value:0});let a=Xf(),o=bl({type:`layout-shift`,buffered:!0}).subscribe(o=>{for(let s of o){if(s.hadRecentInput||s.startTime<t)continue;let{cumulatedValue:o,isMaxValue:c}=a.update(s);if(c){let e=Kf(s.sources);i={target:e?.node?new WeakRef(e.node):void 0,time:T(t,s.startTime),previousRect:e?.previousRect,currentRect:e?.currentRect,devicePixelRatio:window.devicePixelRatio}}if(o>r){r=o;let t=i?.target?.deref();n({value:se(r,4),targetSelector:t&&Nl(t,e.actionNameAttribute),time:i?.time,previousRect:i?.previousRect?qf(i.previousRect):void 0,currentRect:i?.currentRect?qf(i.currentRect):void 0,devicePixelRatio:i?.devicePixelRatio})}}});return{stop:()=>{o.unsubscribe()}}}function Kf(e){let t;for(let n of e)if(n.node&&pl(n.node)){let e=Wf(n);(!t||Wf(t)<e)&&(t=n)}return t}function qf({x:e,y:t,width:n,height:r}){return{x:e,y:t,width:n,height:r}}var Jf=5*S,Yf=S;function Xf(){let e=0,t,n,r=0;return{update:i=>{let a=t===void 0||i.startTime-n>=Yf||i.startTime-t>=Jf,o;return a?(t=n=i.startTime,r=e=i.value,o=!0):(e+=i.value,n=i.startTime,o=i.value>r,o&&(r=i.value)),{cumulatedValue:e,isMaxValue:o}}}}function Zf(){return wl(`layout-shift`)&&`WeakRef`in window}var Qf,$f=0,ep=1/0,tp=0;function np(){`interactionCount`in performance||Qf||(Qf=new window.PerformanceObserver(k(e=>
6{e.getEntries().forEach(e=>{let t=e;t.interactionId&&(ep=Math.min(ep,t.interactionId),tp=Math.max(tp,t.interactionId),$f=(tp-ep)/7+1)})})),Qf.observe({type:`event`,buffered:!0,durationThreshold:0}))}var rp=()=>Qf?$f:window.performance.interactionCount||0,ip=10,ap=1*C,op=8;function sp(e,t,n){if(!dp())return{getInteractionToNextPaint:()=>void 0,setViewEnd:I,stop:I};let r=1/0,i,{getViewInteractionCount:a,stopViewInteractionCount:o}=lp(n),s=cp(a),c=up(s),l=bl({type:`first-input`,buffered:!0}).subscribe(d),u=bl({type:`event`,durationThreshold:40,buffered:!0}).subscribe(d);function d(e){for(let n of e)n.interactionId&&n.startTime>=t&&n.startTime<=r&&(s.process(n),c.process(n));c.pruneUntracked();let n=s.estimateP98Interaction();n&&f(n)}function f(n){let r=T(t,n.startTime);if(n.duration!==i?.duration||r!==i.startTime){let t=Md(n.startTime);!t&&n.target&&pl(n.target)&&(t=Nl(n.target,e.actionNameAttribute)),i={duration:n.duration,startTime:r,targetSelector:t}}i.subParts=c.computeSubParts(n,fp(i.duration))}return{getInteractionToNextPaint:()=>{if(i)return{value:fp(i.duration),targetSelector:i.targetSelector,time:i.startTime,subParts:i.subParts};if(a())return{value:0}}
6,setViewEnd:e=>{r=e,o()},stop:()=>{u.unsubscribe(),l.unsubscribe(),c.stop()}}}function cp(e){let t=[];function n(){t.sort((e,t)=>t.duration-e.duration).splice(ip)}return{process(e){let r=t.findIndex(t=>e.interactionId===t.interactionId),i=t[t.length-1];r===-1?(t.length<ip||e.duration>i.duration)&&(t.push(e),n()):e.duration>t[r].duration&&(t[r]=e,n())},estimateP98Interaction(){return t[Math.min(t.length-1,Math.floor(e()/50))]},isTracked(e){return t.some(t=>t.interactionId===e)}}}function lp(e){np();let t=e===Ks.INITIAL_LOAD?0:rp(),n={stopped:!1};function r(){return rp()-t}return{getViewInteractionCount:()=>n.stopped?n.interactionCount:r(),stopViewInteractionCount:()=>{n={stopped:!0,interactionCount:r()}}}}function up(e){let t=new Map;function n(e,t){e.startTime=Math.min(t.startTime,e.startTime),e.processingStart=Math.min(t.processingStart,e.processingStart),e.processingEnd=Math.max(t.processingEnd,e.processingEnd)}return{process(e){if(e.interactionId===void 0||!e.processingStart||!e.processingEnd)return;let r=e.startTime+e.duration,i=t.get(e.interactionId);if(i){n(i,e);return}for(let[,i]of t.entries())if(Math.abs(r-i.referenceRenderTime)<=op){n(i,e),t.set(e.interactionId,i);return}t.set(e.interactionId,{startTime:e.startTime,processingStart:e.processingStart,processingEnd:e.processingEnd,referenceRenderTime:r})},pruneUntracked(){for(let[n]of t)e.isTracked(n)||t.delete(n)},computeSubParts(e,n){if(!e.processingStart||!e.processingEnd||e.interactionId===void 0)return;let r=t.get(e.interactionId);if(!r)return;let i=Math.max(r.startTime+n,r.processingStart),a=Math.min(r.processingEnd,i);return{inputDelay:T(r.startTime,r.processingStart),processingDuration:T(r.processingStart,a),presentationDelay:T(a,i)}},stop(){t.clear()}}}function dp(){return wl(`event`)&&window.PerformanceEventTiming&&`interactionId`in PerformanceEventTiming.prototype}function fp(e){return Math.min(e,ap)}function pp(e,t,n,r,i,a,o){let s=i===Ks.INITIAL_LOAD,c=!0,l=[],u=Bf(a);function d(){if(!c&&!s&&l.length>0){let e=Math.max(...l);e<u.timeStamp-a.relative&&o(e)}}let{stop:f}=Wu(e,t,n,r,e=>{c&&(c=!1,e.hadActivity&&l.push(T(a.timeStamp,e.end)),d())});return{stop:()=>{f(),u.stop()},setLoadEvent:e=>{s&&(s=!1,l.push(e),d())}}}var mp=S;function hp(e,t,n=_p()){let r=0,i=0,a=0,o=n.subscribe(({scrollDepth:n,scrollTop:o,scrollHeight:s})=>{let c=!1;if(n>r&&(r=n,c=!0),s>i){i=s;let t=D();a=T(e.relative,t),c=!0}c&&t({maxDepth:Math.min(r,i),maxDepthScrollTop:o,maxScrollHeight:i,maxScrollHeightTime:a})});return{stop:()=>o.unsubscribe()}}function gp(){let e=fu(),{height:t}=gu();return{scrollHeight:Math.round((document.scrollingElement||document.documentElement).scrollHeight),scrollDepth:Math.round(t+e),scrollTop:e}}function _p(e=mp){return new M(t=>{function n(){t.notify(gp())}let r=Ht(n,e,{leading:!1,trailing:!0}),i=document.scrollingElement||document.documentElement,a=new ResizeObserver(k(r.throttled));i&&a.observe(i);let o=z(window,R.SCROLL,r.throttled,{passive:!0});return()=>{r.cancel(),a.disconnect(),o.stop()}})}function vp(e,t,n,r,i,a,o){let s={},c=!1,l=!1,{stop:u,setLoadEvent:d}=pp(e,t,n,r,a,o,e=>{c||(s.loadingTime=e,i())}),{stop:f}=hp(o,e=>{s.scroll=e}),{stop:p}=Gf(r,o.relative,e=>{s.cumulativeLayoutShift=e,i()}),{stop:m,getInteractionToNextPaint:h,setViewEnd:g}=sp(r,o.relative,a);return{stop:()=>{u(),p(),f()},stopINPTracking:m,setLoadEvent:d,setViewEnd:e=>{l=!0,g(e)},getCommonViewMetrics:()=>
6(s.interactionToNextPaint=h(),s),setLoadingTime:e=>{if(l)return;let t=T(o.timeStamp,e??w());c||u(),c=!0,s.loadingTime=t,i()}}}function yp(e){let{stop:t}=z(window,R.PAGE_SHOW,t=>{t.persisted&&e(t)},{capture:!0});return t}function bp(e,t,n){jf(e.relative,e=>{t.firstContentfulPaint=e,t.largestContentfulPaint={value:e},n()})}var xp=3e3,Sp=5*C,Cp=5*C;function wp(e,t,n,r,i,a,o){let s=new Set,c=d(Ks.INITIAL_LOAD,je(),o),l;f();let u;a&&(u=p(i),l=yp(e=>{c.end();let t=Me(e.timeStamp);c=d(Ks.BF_CACHE,t,void 0)}));function d(i,a,o){let c=Tp(e,t,n,r,i,a,o);return s.add(c),c.stopObservable.subscribe(()=>{s.delete(c)}),c}function f(){e.subscribe(10,()=>{c=d(Ks.SESSION_RENEWAL,void 0,{name:c.name,service:c.service,version:c.version,context:c.contextManager.getContext()})}),e.subscribe(9,()=>{c.end({sessionIsActive:!1})})}function p(e){return e.subscribe(({oldLocation:e,newLocation:t})=>{Dp(e,t)&&(c.end(),c=d(Ks.ROUTE_CHANGE))})}return{addTiming:(e,t=w())=>{c.addTiming(e,t)},setLoadingTime:e=>c.setLoadingTime(e),startView:(e,t)=>{c.end({endClocks:t}),c=d(Ks.ROUTE_CHANGE,t,e)},setViewContext:e=>{c.contextManager.setContext(e)},setViewContextProperty:(e,t)=>{c.contextManager.setContextProperty(e,t)},setViewName:e=>{c.setViewName(e)},getViewContext:()=>c.contextManager.getContext(),stop:()=>
6{u&&u.unsubscribe(),l&&l(),c.end(),s.forEach(e=>e.stop())}}}function Tp(e,t,n,r,i,a=O(),o){let s=b(),c=new M,l={},u=0,d,f=fe(N(window.location)),p=uo(),m=!0,h=o?.name,g=o?.service||r.service,_=o?.version||r.version,ee=o?.context,te=o?.handlingStack;ee&&p.setContext(ee);let v={id:s,name:h,startClocks:a,service:g,version:_,context:ee,url:o?.url};e.notify(1,v),e.notify(2,v);let{throttled:ne,cancel:re}=Ht(ve,xp,{leading:!1}),{setLoadEvent:ie,setViewEnd:ae,stop:oe,stopINPTracking:se,getCommonViewMetrics:ce,setLoadingTime:le}=vp(e,t,n,r,_e,i,a),{stop:ue,initialViewMetrics:de}=i===Ks.INITIAL_LOAD?Vf(r,a,ie,_e):{stop:I,initialViewMetrics:{}};i===Ks.BF_CACHE&&bp(a,de,_e);let{stop:pe,eventCounts:y}=Of(e,s,_e),me=Bt(ve,Sp),he=e.subscribe(11,e=>{e.reason===Ur.UNLOADING&&ve()});ve(),p.changeObservable.subscribe(_e);function ge(){e.notify(3,{id:s,name:h,context:p.getContext(),startClocks:a,sessionIsActive:m})}function _e(){ge(),ne()}function ve(){re(),ge(),u+=1;let t=d===void 0?w():d.timeStamp;e.notify(4,{customTimings:l,documentVersion:u,id:s,name:h,service:g,version:_,context:p.getContext(),loadingType:i,location:f,handlingStack:te,startClocks:a,commonViewMetrics:ce(),initialViewMetrics:de,duration:T(a.timeStamp,t),isActive:d===void 0,sessionIsActive:m,eventCounts:y})}return{get name(){return h},service:g,version:_,contextManager:p,stopObservable:c,end(t={}){d||(d=t.endClocks??O(),m=t.sessionIsActive??!0,e.notify(5,{endClocks:d}),e.notify(6,{endClocks:d}),Vt(me),ae(d.relative),oe(),he.unsubscribe(),ve(),P(()=>{this.stop()},Cp))},stop(){ue(),pe(),se(),c.notify()},addTiming(e,t){if(d)return;let n=Ie(t)?t:T(a.timeStamp,t);l[Ep(e)]=n,_e()},setLoadingTime:le,setViewName(e){h=e,ve()}}}function Ep(e){let t=e.replace(/[^a-zA-Z0-9-_.@$]/g,`_`);return t!==e&&v.warn(`Invalid timing name: ${e}, sanitized to: ${t}`),t}function Dp(e,t){return e.pathname!==t.pathname||!Op(t.hash)&&kp(t.hash)!==kp(e.hash)}function Op(e){let t=e.substring(1);return t!==``&&!!document.getElementById(t)}function kp(e){let t=e.indexOf(`?`);return t<0?e:e.slice(0,t)}function Ap(e,t,n,r,i,a,o,s,c){return e.subscribe(4,t=>e.notify(12,jp(t,n,o))),t.assemble.register(({startTime:e,eventType:t})=>{let n=s.findView(e);return n?{type:t,service:n.service,version:n.version,context:n.context,view:{id:n.id,name:n.name}}:ti}),t.assembleTelemetry.register(({startTime:e})=>({view:{id:s.findView(e)?.id}})),wp(e,r,i,n,a,!n.trackViewsManually,c)}
6function jp(e,t,n){let r=n.getReplayStats(e.id),i=e.commonViewMetrics?.cumulativeLayoutShift?.devicePixelRatio,a={_dd:{document_version:e.documentVersion,replay_stats:r,cls:i?{device_pixel_ratio:i}:void 0,configuration:{start_session_replay_recording_manually:t.startSessionReplayRecordingManually}},date:e.startClocks.timeStamp,type:Q.VIEW,view:{action:{count:e.eventCounts.actionCount},frustration:{count:e.eventCounts.frustrationCount},cumulative_layout_shift:e.commonViewMetrics.cumulativeLayoutShift?.value,cumulative_layout_shift_time:E(e.commonViewMetrics.cumulativeLayoutShift?.time),cumulative_layout_shift_target_selector:e.commonViewMetrics.cumulativeLayoutShift?.targetSelector,first_byte:E(e.initialViewMetrics.navigationTimings?.firstByte),dom_complete:E(e.initialViewMetrics.navigationTimings?.domComplete),dom_content_loaded:E(e.initialViewMetrics.navigationTimings?.domContentLoaded),dom_interactive:E(e.initialViewMetrics.navigationTimings?.domInteractive),error:{count:e.eventCounts.errorCount},first_contentful_paint:E(e.initialViewMetrics.firstContentfulPaint),interaction_to_next_paint:E(e.commonViewMetrics.interactionToNextPaint?.value),interaction_to_next_paint_time:E(e.commonViewMetrics.interactionToNextPaint?.time),interaction_to_next_paint_target_selector:e.commonViewMetrics.interactionToNextPaint?.targetSelector,is_active:e.isActive,name:e.name,largest_contentful_paint:E(e.initialViewMetrics.largestContentfulPaint?.value),largest_contentful_paint_target_selector:e.initialViewMetrics.largestContentfulPaint?.targetSelector,load_event:E(e.initialViewMetrics.navigationTimings?.loadEvent),loading_time:Uu(E(e.commonViewMetrics.loadingTime)),loading_type:e.loadingType,long_task:{count:e.eventCounts.longTaskCount},performance:Mp(e.commonViewMetrics,e.initialViewMetrics),resource:{count:e.eventCounts.resourceCount},time_spent:E(e.duration)},display:e.commonViewMetrics.scroll?{scroll:{max_depth:e.commonViewMetrics.scroll.maxDepth,max_depth_scroll_top:e.commonViewMetrics.scroll.maxDepthScrollTop,max_scroll_height:e.commonViewMetrics.scroll.maxScrollHeight,max_scroll_height_time:E(e.commonViewMetrics.scroll.maxScrollHeightTime)}}:void 0,privacy:{replay_level:t.defaultPrivacyLevel},device:{locale:navigator.language,locales:navigator.languages,time_zone:Ho()}};return y(e.customTimings)||(a.view.custom_timings=me(e.customTimings,E)),{rawRumEvent:a,startClocks:e.startClocks,duration:e.duration,domainContext:{location:e.location,handlingStack:e.handlingStack}}}function Mp({cumulativeLayoutShift:e,interactionToNextPaint:t},{firstContentfulPaint:n,largestContentfulPaint:r}){return{cls:e&&{score:e.value,timestamp:E(e.time),target_selector:e.targetSelector,previous_rect:e.previousRect,current_rect:e.currentRect},fcp:n&&{timestamp:E(n)},inp:t&&{duration:E(t.value),timestamp:E(t.time),target_selector:t.targetSelector,sub_parts:t.subParts?{input_delay:E(t.subParts.inputDelay),processing_duration:E(t.subParts.processingDuration),presentation_delay:E(t.subParts.presentationDelay)}:void 0},lcp:r&&{timestamp:E(r.value),target_selector:r.targetSelector,resource_url:r.resourceUrl,sub_parts:r.subParts?{load_delay:E(r.subParts.loadDelay),load_time:E(r.subParts.loadTime),render_delay:E(r.subParts.renderDelay)}:void 0}}}function Np(e,t){if(e===t)return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return e===t;if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length?e.every((e,n)=>Np(e,t[n])):!1;if(Array.isArray(e)||Array.isArray(t))return!1;let n=e,r=t,i=Object.keys(n),a=Object.keys(r);return i.length===a.length?i.every(e=>a.includes(e)&&Np(n[e],r[e])):!1}function Pp(e,t,n){let r={},i=n?.replaceKeys??new Set,a=n?.appendKeys??new Set,o=n?.ignoreKeys??new Set;for(let n of Object.keys(e)){if(o.has(n))continue;let c=e[n],l=t[n];if(!i.has(n)&&s(c)&&s(l)){let e=Pp(c,l,{replaceKeys:Fp(i,n),appendKeys:Fp(a,n),ignoreKeys:Fp(o,n)});e&&(r[n]=e)}else a.has(n)&&Array.isArray(c)&&Array.isArray(l)?c.length>l.length&&(r[n]=c.slice(l.length)):Np(c,l)||(r[n]=c)}for(let n of Object.keys(t))n in e||(r[n]=null);return Object.keys(r).length>0?r:void 0}function Fp(e,t){let n=new Set;for(let r of e)r.startsWith(`${t}.`)&&n.add(r.slice(t.length+1));return n}function Ip(e,t){let n=Pp(e,t,{replaceKeys:new Set([`view.custom_timings`,`context`,`connectivity`,`usr`,`device`,`privacy`]),appendKeys:new Set([`_dd.page_states`]),ignoreKeys:new Set([`date`,`type`,`application`,`session`,`view.id`,`view.url`,`_dd.document_version`,`_dd.format_version`])});if(n)return d(n,{type:Q.VIEW_UPDATE,date:e.date,application:e.application,session:e.session,view:{id:e.view.id,url:e.view.url},_dd:{document_version:e._dd.document_version,format_version:e._dd.format_version}})}function Lp(e,t,n,r,i,a){let o=[kt(e,`rum`)],s=At(e,`rum`);s&&o.push(s);let c=qr({encoder:a(Uo.RUM),request:Ar(o,n),flushController:Zr({pageMayExitObservable:r,sessionExpireOb
6servable:i})}),l,u=0;return t.subscribe(13,e=>{if(e.type!==Q.VIEW){c.add(e);return}let t=e;if(!Lt(Nt.PARTIAL_VIEW_UPDATES)){c.upsert(t,t.view.id);return}let n=t.view.id;if(!t.view.is_active){l=void 0,u=0,c.upsert(t,n);return}if(n!==l?.view.id){l=t,u=0,c.upsert(t,n);return}if(u+=1,u>=100){u=0,l=t,c.upsert(t,n);return}let r=Ip(t,l);l=t,r&&(fr(`rum`,r),c.add(r))}),c}function Rp(e){let t=Ir();e.subscribe(13,e=>{t.send(`rum`,e)})}var zp=Pi;function Bp(e,t,n){let r=ki({expireDelay:zp}),i;e.subscribe(1,({startClocks:e,url:t})=>{let n=N(x.location).href,a=t===void 0?n:we(t,n).href;r.add(o({url:a,referrer:i||document.referrer}),e.relative),i=a}),e.subscribe(6,({endClocks:e})=>{r.closeActive(e.relative)});let a=n.subscribe(({newLocation:e})=>{let t=r.find();if(t){let n=D();r.closeActive(n),r.add(o({url:e.href,referrer:t.referrer}),n)}});function o({url:e,referrer:t}){return{url:e,referrer:t}}return t.register(({startTime:e,eventType:t})=>{let n=r.find(e);return n?{type:t,view:{url:n.url,referrer:n.referrer}}:ti}),{findUrl:e=>r.find(e),stop:()=>{a.unsubscribe(),r.stop()}}}function Vp(){let e=fe(Hp());return new M(t=>{let{stop:n}=Up(i),{stop:r}=Wp(i);function i(){if(e.href===Hp().href)return;let n=fe(Hp());t.notify({newLocation:n,oldLocation:e}),e=n}return()=>{n(),r()}})}function Hp(){return N(x.location)}function Up(e){let{stop:t}=L(Gp(`pushState`),`pushState`,({onPostCall:t})=>{t(e)}),{stop:n}=L(Gp(`replaceState`),`replaceState`,({onPostCall:t})=>{t(e)}),{stop:r}=z(window,R.POP_STATE,e);return{stop:()=>{t(),n(),r()}}}function Wp(e){return z(window,R.HASH_CHANGE,e)}function Gp(e){return Object.prototype.hasOwnProperty.call(history,e)?history:History.prototype}var Kp=Pi;function qp(e,t,n){let r=ki({expireDelay:Kp});return e.subscribe(1,({startClocks:e})=>{r.add({},e.relative)}),e.subscribe(6,({endClocks:e})=>{r.closeActive(e.relative)}),t.register(({startTime:e,eventType:t})=>{if(!n.trackFeatureFlagsForEvents.concat([Q.VIEW,Q.ERROR]).includes(t))return U;let i=r.find(e);return!i||y(i)?U:{type:t,feature_flags:i}}),{addFeatureFlagEvaluation:(e,t)=>{let n=r.find();n&&(n[e]=t)}}}var Jp=10*S,Yp,Xp;function Zp(e,t,n){e.metricsEnabled&&(tm(),Xp=!1,t.subscribe(13,()=>{Xp=!0}),n.subscribe(({bytesCount:e,messagesCount:t})=>{Xp&&(Xp=!1,Yp.batchCount+=1,em(Yp.batchBytesCount,e),em(Yp.batchMessagesCount,t))}),Bt(Qp,Jp))}function Qp(){Yp.batchCount!==0&&(vi(ii.CUSTOMER_DATA_METRIC_NAME,Yp),tm())}function $p(){return{min:1/0,max:0,sum:0}}function em(e,t){e.sum+=t,e.min=Math.min(e.min,t),e.max=Math.max(e.max,t)}function tm(){Yp={batchCount:0,batchBytesCount:$p(),batchMessagesCount:$p()}}var nm=4e3,rm=Pi;function im(e,t=500){let n=ki({expireDelay:rm,maxEntries:nm}),r;wl(`visibility-state`)&&performance.getEntriesByType(`visibility-state`).forEach(e=>{a(e.name===`hidden`?`hidden`:`active`,e.startTime)}),a(sm(),D());let{stop:i}=_n(window,[R.PAGE_SHOW,R.FOCUS,R.BLUR,R.VISIBILITY_CHANGE,R.RESUME,R.FREEZE,R.PAGE_HIDE],e=>{a(om(e),e.timeStamp)},{capture:!0});function a(e,t=D()){e!==r&&(r=e,n.closeActive(t),n.add({state:r,startTime:t},t))}function o(e,t,r){return n.findAll(t,r).some(t=>t.state===e)}return e.register(({startTime:e,duration:r=0,eventType:i})=>i===Q.VIEW?{type:i,_dd:{page_states:am(n.findAll(e,r),e,t)}}:i===Q.ACTION||i===Q.ERROR?{type:i,view:{in_foreground:o(`active`,e,0)}}:U),{wasInPageStateDuringPeriod:o,addPageState:a,stop:()=>{i(),n.stop()}}}function am(e,t,n){if(e.length!==0)return e.slice(-n).reverse().map(({state:e,startTime:n})=>({state:e,start:E(T(t,n))}))}function om(e){return e.type===R.FREEZE?`frozen`:e.type===R.PAGE_HIDE?e.persisted?`frozen`:`terminated`:sm()}function sm(){return document.visibilityState===`hidden`?`hidden`:document.hasFocus()?`active`:`passive`}function cm(e){let t,n=requestAnimationFrame(k(()=>{t=gu()})),r=mu().subscribe(e=>{t=e}).unsubscribe;return e.register(({eventType:e})=>({type:e,display:t?{viewport:t}:void 0})),{stop:()=>{r(),n&&cancelAnimationFrame(n)}}}function lm(e,t){let n=Xu(e);function r(e){return!t.wasInPageStateDuringPeriod(`frozen`,e.startClocks.relative,e.duration)}function i(t){r(t)&&e.notify(12,um(t))}function a(t,n,r,i){let{operationKey:a,context:o,description:s,handlingStack:c}=r||{}
6,l={name:t,type:Ys.OPERATION_STEP,operationKey:a,failureReason:i,stepType:n,startClocks:O(),context:B(o),description:s,handlingStack:c};e.notify(12,um(l))}function o(t,r={},i=O()){let{id:a}=n.start(r.vitalKey??t,i,{name:t,...r});e.notify(16,{id:a,name:t,startClocks:i,...r})}function s(e,t={},r=O()){let a=n.stop(t.vitalKey??e,r,t);a&&i({type:Ys.DURATION,...a})}return{addOperationStepVital:a,addDurationVital:i,startDurationVital:o,stopDurationVital:s}}function um(e){let{startClocks:t,type:n,name:r,description:i,context:a,handlingStack:o}=e,s={id:(e.type===Ys.DURATION?e.id:void 0)??b(),type:n,name:r,description:i,...n===Ys.DURATION?{duration:E(e.duration)}:{step_type:e.stepType,operation_key:e.operationKey,failure_reason:e.failureReason}};return{rawRumEvent:{date:t.timeStamp,vital:s,type:Q.VITAL,context:a},startClocks:t,duration:n===Ys.DURATION?e.duration:void 0,domainContext:o?{handlingStack:o}:{}}}function dm(e,t,n,r,i){e.register(({eventType:e,startTime:a})=>{let o=n.findTrackedSession(a),s=i.findView(a);if(!o||!s)return ti;let c,l,u;return e===Q.VIEW?(c=r.getReplayStats(s.id)?!0:void 0,l=vu(o,t)===1,u=s.sessionIsActive?void 0:!1):c=r.isRecording()?!0:void 0,{type:e,session:{id:o.id,type:`user`,has_replay:c,sampled_for_replay:l,is_active:u}}})}function fm(e){let t=Vi()?pm():hm;return new M(n=>t(e,e=>n.notify(e)))}function pm(){return(e,t)=>z(x.cookieStore,R.CHANGE,n=>{let r=n.changed.find(t=>t.name===e)||n.deleted.find(t=>t.name===e);r&&t(r.value)}).stop}var mm=S;function hm(e,t){let n=He(e),r=Bt(()=>{let r=He(e);r!==n&&(n=r,t(r))},mm);return()=>{Vt(r)}}var gm=`datadog-ci-visibility-test-execution-id`;function _m(e,t=fm(gm)){let n=Ge(`datadog-ci-visibility-test-execution-id`)||vm(),r=t.subscribe(e=>{n=e});return e.register(({eventType:e})=>typeof n==`string`?{type:e,session:{type:`ci_test`},ci_test:{test_execution_id:n}}:U),{stop:()=>{r.unsubscribe()}}}function vm(){let e=window.Cypress;if(e)try{return e.env(`traceId`)}catch{v.warn(`Failed to read Cypress test execution id via Cypress.env(). Upgrade dd-trace-js to >= 5.88.0 to keep RUM ↔ test correlation working.`);return}}function ym(e,t){let n=bl({type:wl(`long-animation-frame`)?`long-animation-frame`:`longtask`,buffered:!0}).subscribe(n=>{for(let r of n){if(!t.trackLongTasks)break;let n=Me(r.startTime),i=bm(r,n);e.notify(12,{rawRumEvent:i,startClocks:n,duration:r.duration,domainContext:{performanceEntry:r}})}});return{stop:()=>n.unsubscribe()}}function bm(e,t){let n=b(),r=E(e.duration),i={date:t.timeStamp,type:Q.LONG_TASK,_dd:{discarded:!1}};return e.entryType===`longtask`?{...i,long_task:{id:n,entry_type:Gs.LONG_TASK,duration:r}}:{...i,long_task:{id:n,entry_type:Gs.LONG_ANIMATION_FRAME,duration:r,blocking_duration:E(e.blockingDuration),first_ui_event_timestamp:E(e.firstUIEventTimestamp),render_start:E(e.renderStart),style_and_layout_start:E(e.styleAndLayoutStart),start_time:E(e.startTime),scripts:e.scripts.map(e=>({duration:E(e.duration),pause_duration:E(e.pauseDuration),forced_style_and_layout_duration:E(e.forcedStyleAndLayoutDuration),start_time:E(e.startTime),execution_start:E(e.executionStart),source_url:e.sourceURL,source_function_name:e.sourceFunctionName,source_char_position:e.sourceCharPosition,invoker:e.invoker,invoker_type:e.invokerType,window_attribution:e.windowAttribution}))}}}function xm(e){e.register(({eventType:e})=>Fo()?{type:e,session:{type:`synthetics`},synthetics:{...Po(),injected:No()}}:U)}function Sm(e,t,n){let r=u(e),i=n(r);return Hr(t).forEach(([t,n])=>Cm(e,r,t.split(/\.|(?=\[\])/),n)),i}function Cm(e,t,n,r){let[i,...a]=n;if(i===`[]`){Array.isArray(e)&&Array.isArray(t)&&e.forEach((e,n)=>Cm(e,t[n],a,r));return}if(!(!Tm(e)||!Tm(t))){if(a.length>0)return Cm(e[i],t[i],a,r);wm(e,i,t[i],r)}}function wm(e,t,n,r){if(e[t]===n)return;let i=o(n);i===r?e[t]=B(n):r===`object`&&(i===`undefined`||i===`null`)&&(e[t]={})}function Tm(e){return o(e)===`object`}var Em={"view.name":`string`,"view.url":`string`,"view.referrer":`string`,context:`object`,service:`string`,version:`string`},Dm={[Q.VIEW]:{...Em,"view.performance.lcp.resource_url":`string`},[Q.ERROR]:{...Em,"error.message":`string`,"error.stack":`string`,"error.handling_stack":`string`,"error.resource.url":`string`,"error.fingerprint":`string`},[Q.RESOURCE]:{...Em,"resource.url":`string`,"resource.graphql.variables":`string`,"resource.request.headers":`object`,"resource.response.headers":`object`},[Q.ACTION]:{...Em,"action.target.name":`string`},[Q.LONG_TASK]:{...Em,"long_task.scripts[].source_url":`string`,"long_task.scripts[].invoker":`string`},[Q.VITAL]:Em};
6function Om(e,t,n,r,i){let a={[Q.ERROR]:Pa(Q.ERROR,r,i),[Q.ACTION]:Pa(Q.ACTION,r,i),[Q.VITAL]:Pa(Q.VITAL,r,i)};t.subscribe(12,({startClocks:r,duration:i,rawRumEvent:o,domainContext:s})=>{let c=n.trigger({eventType:o.type,rawRumEvent:o,domainContext:s,startTime:r.relative,duration:i});if(c===`DISCARDED`)return;let l=d(c,o,{ddtags:cr(e).join(`,`)});km(l,e.beforeSend,s,a)&&(y(l.context)&&delete l.context,t.notify(13,l))})}function km(e,t,n,r){if(t){let r=Sm(e,Dm[e.type],e=>t(e,n));if(r===!1&&e.type!==Q.VIEW)return!1;r===!1&&v.warn(`Can't dismiss view events using beforeSend!`)}return!r[e.type]?.isLimitReached()}function Am(e){e.register(({eventType:e})=>({type:e,connectivity:pr()}))}function jm(e,t,n){e.register(({eventType:e})=>{let r=t.source;return{type:e,_dd:{format_version:2,drift:Le(),configuration:{session_sample_rate:se(t.sessionSampleRate,3),session_replay_sample_rate:se(t.sessionReplaySampleRate,3),profiling_sample_rate:se(t.profilingSampleRate,3),trace_sample_rate:se(t.traceSampleRate,3)},browser_sdk_version:H()?`7.4.0`:void 0,sdk_name:n},application:{id:t.applicationId},date:w(),source:r}})}var Mm=[Q.ACTION,Q.ERROR,Q.LONG_TASK,Q.RESOURCE,Q.VITAL];function Nm(e){return{addEvent:(t,n,r,i)=>{Mm.includes(n.type)&&e.notify(12,{startClocks:Me(t),rawRumEvent:n,domainContext:r,duration:i})}}}function Pm(e,t){if(!t.metricsEnabled)return{stop:I};let{unsubscribe:n}=e.subscribe(4,({initialViewMetrics:e})=>{!e.largestContentfulPaint||!e.navigationTimings||(vi(ii.INITIAL_VIEW_METRICS_TELEMETRY_NAME,{metrics:Fm(e.largestContentfulPaint,e.navigationTimings)}),n())});return{stop:n}}function Fm(e,t){return{lcp:{value:e.value},navigation:{domComplete:t.domComplete,domContentLoaded:t.domContentLoaded,domInteractive:t.domInteractive,firstByte:t.firstByte,loadEvent:t.loadEvent}}}function Im(e){let t=window,n=new Map;function r(){t.DD_SOURCE_CODE_CONTEXT&&=(W({feature:`source-code-context`}),Hr(t.DD_SOURCE_CODE_CONTEXT).forEach(([e,t])=>{let r=Wt({stack:e}).stack[0];if(!r.url){gi(`Source code context: missing frame url`,{stack:e});return}n.has(r.url)||n.set(r.url,t)}),{})}r(),e.register(({domainContext:e,rawRumEvent:t})=>{if(r(),n.size===0)return U;let i=Lm(e,t),a=i&&n.get(i);return a?{type:t.type,service:a.service,version:a.version}:U})}function Lm(e,t){if(t.type===`long_task`&&t.long_task.entry_type===`long-animation-frame`)return t.long_task.scripts[0]?.source_url;let n;return`handlingStack`in e&&(n=e.handlingStack),t.type===`error`&&t.error.stack&&(n=t.error.stack),Wt({stack:n}).stack[0]?.url}function Rm(e,t,n,r,i,a,o,s,c,l){let u=[],d=new Gc;d.subscribe(13,e=>fr(`rum`,e)),t.expireObservable.subscribe(()=>d.notify(9)),t.renewObservable.subscribe(()=>d.notify(10));let f=e=>{d.notify(14,{error:e}),hi(`Error reported to customer`,{"error.message":e.message})},p=Wr();if(H()){Rp(d);let e=p.subscribe(e=>{d.notify(11,e)});u.push(()=>e.unsubscribe())}else{let n=Lp(e,d,f,p,t.expireObservable,a),r=n.flushController.preparePageExitFlushObservable.subscribe(e=>{d.notify(11,{reason:e})});u.push(()=>r.unsubscribe()),u.push(()=>n.stop()),Zp(s,d,n.flushController.flushObservable)}let{stop:m}=Pm(d,s);u.push(m);let{stop:h,...g}=zm(d,c,e,t,n,i,o,l,f);return u.push(h),o.unbuffer(),u.push(()=>r.stop()),{...g,lifeCycle:d,sessionManager:t,stopSession:()=>t.expire(),telemetry:s,stop:()=>{u.forEach(e=>e())},hooks:c}}function zm(e,t,n,r,i,a,o,s,c){let l=[],u=Hc(),d=Vp(),{observable:f,stop:p}=yu();l.push(p);let{assemble:m}=t;jm(m,n,s);let h=im(m);l.push(()=>h.stop());let g=qc(e);l.push(()=>g.stop());let _=Bp(e,m,d);l.push(()=>_.stop());let ee=qp(e,m,n);dm(m,n,r,i,g),Am(m),xo(m);let te=wo(m,n,`rum`,!0),v=Eo(m,n,r,`rum`),ne=_o(m,n,`rum`),re=Ud(e,t,u,f,n);l.push(re.stop);let ie=Nm(e),ae=cm(m);l.push(ae.stop);let oe=_m(m);l.push(oe.stop),xm(m),Om(n,e,m,c);let{addTiming:se,setLoadingTime:ce,startView:le,setViewName:ue,setViewContext:de,setViewContextProperty:fe,getViewContext:pe,stop:y}=Ap(e,t,n,u,f,d,i,g,a);Im(m),l.push(y);let me=ff(e,n);l.push(me.stop);let{stop:b}=ym(e,n);l.push(b);let{addError:he}=qd(e,o);zu(e,n,r,v,ne,o);let ge=lm(e,h),_e=bu(n.applicationId,r,g,re.actionContexts,_);return{addAction:re.addAction,startAction:re.startAction,stopAction:re.stopAction,startResource:me.startResource,stopResource:me.stopResource,addEvent:ie.addEvent,addError:he,addTiming:se,setLoadingTime:ce,addFeatureFlagEvaluation:ee.addFeatureFlagEvaluation,startView:le,setViewContext:de,setViewContextProperty:fe,getViewContext:pe,setViewName:ue,viewHistory:g,sessionManager:r,stopSession:()=>r.expire(),getInternalContext:_e.get,startDurationVital:ge.startDurationVital,stopDurationVital:ge.stopDurationVital,addDurationVital:ge.addDurationVital,addOperationStepVital:ge.addOperationStepVital,globalContext:te,userContext:v,accountContext:ne,stop:()=>
6l.forEach(e=>e())}}function Bm(e,t,n){if(e)for(let r of e){let e=r[t];e&&e(n)}}function Vm(e,t){e.register(()=>t.isGranted()?U:ti)}function Hm({ignoreInitIfSyntheticsWillInjectRum:e=!0,startDeflateWorker:t},n,r){let i=new nt(500,e=>{hi(`preStartRum buffer data lost`,{count:e})}),a=To();fo(a,q.globalContext,i);let o=Do();fo(o,q.userContext,i);let s=vo();fo(s,q.accountContext,i);let c,l,u,d,f,p,m=Vc(),h=n.observable.subscribe(ee),g={},_=!1;function ee(){if(_||!u||!d||!f||!p)return;h.unsubscribe();let e;if(d.trackViewsManually){if(!c)return;e=c.options}let t=d.trackViewsManually?c?.callback:void 0,n=r(d,f,l,e,p,m);_=!0,i.subscribe(e=>{e!==t&&e(n)}),i.unbuffer()}function te(e,r){let i=H();if(i&&(e=Um(e)),u=e,d){$n(`DD_RUM`,e);return}let a=Ac(e,r);a&&(a.compressIntakeRequests&&!i&&t&&(l=t(a,`Datadog RUM`,I),!l)||(d=a,n.tryToInit(a.trackingConsent),n.onGrantedOnce(()=>{let{assembleTelemetry:t}=m;if(Vm(t,n),p=N(ui)(ri.RUM,a,t),be){v.warn(`The RUM SDK is not supported in a web or service worker environment.`);return}(H()?Oa():N(Da)(a,n)).then(n=>{n&&(f=n,Wo(t,f,{application:{id:a.applicationId}}),_i(Bc(e)),ee())}).catch(j)})))}return{init(t,n,r){if(!t){v.error(`Missing configuration`);return}if(Ft(t.enableExperimentalFeatures),bn(t.allowUntrustedEvents),u=t,!(e&&No()))if(Bm(t.plugins,`onInit`,{initConfiguration:t,publicApi:n}),wc(t)){let e={user:o,context:a};if(t.remoteConfigurationId||t.remoteConfiguration?.sync)_c(t,e).then(e=>{e&&te(e,r)}).catch(j);else{let n=Dc(t,e);n&&te(n,r)}}else te(t,r)},get initConfiguration(){return u},getInternalContext:I,stopSession:I,addTiming(e,t=w()){i.notify(n=>n.addTiming(e,t))},setLoadingTime:(e=>{i.notify(t=>t.setLoadingTime(e))}),startView(e,t=O()){let n=n=>{n.startView(e,t)};i.notify(n),c||(c={options:e,callback:n},ee())},setViewName(e){i.notify(t=>t.setViewName(e))},setViewContext(e){i.notify(t=>t.setViewContext(e))},setViewContextProperty(e,t){i.notify(n=>n.setViewContextProperty(e,t))},getViewContext:()=>g,globalContext:a,userContext:o,accountContext:s,addAction(e){i.notify(t=>t.addAction(e))},startAction(e,t){let n=O();i.notify(r=>r.startAction(e,t,n))},stopAction(e,t){let n=O();i.notify(r=>r.stopAction(e,t,n))},startResource(e,t){let n=O();i.notify(r=>r.startResource(e,t,n))},stopResource(e,t){let n=O();i.notify(r=>r.stopResource(e,t,n))},addError(e){i.notify(t=>t.addError(e))},addFeatureFlagEvaluation(e,t){i.notify(n=>n.addFeatureFlagEvaluation(e,t))},startDurationVital(e,t){let n=O();i.notify(r=>r.startDurationVital(e,t,n))},stopDurationVital(e,t){let n=O();i.notify(r=>r.stopDurationVital(e,t,n))},addDurationVital(e){i.notify(t=>t.addDurationVital(e))},addOperationStepVital:(e,t,n,r)=>{i.notify(i=>i.addOperationStepVital(B(e),t,B(n),B(r)))}}}function Um(e){return{...e,applicationId:`00000000-aaaa-0000-aaaa-000000000000`,clientToken:`empty`,sessionSampleRate:100,defaultPrivacyLevel:e.defaultPrivacyLevel??Ir()?.getPrivacyLevel()}}function Wm(e,t,n={}){let r=it(),i=Vo(),a=Hm(n,r,(r,o,s,c,l,u)=>{let d=s&&n.createDeflateEncoder?e=>n.createDeflateEncoder(s,e):Qr,f=N(Rm)(r,o,e,t,c,d,i.observable,l,u,n.sdkName);return e.onRumStart(f.lifeCycle,r,o,f.viewHistory,s,f.telemetry),t.onRumStart(f.lifeCycle,f.hooks,r,o,f.viewHistory,d),a=Gm(a,f),Bm(r.plugins,`onRumStart`,{addEvent:f.addEvent,addError:f.addError}),f}),o=()=>a,s=e=>{let t=dn(`view`);A(()=>{let n=typeof e==`object`?e:{name:e};a.startView({...n,handlingStack:t}),W({feature:`start-view`})})},c=(e,t)=>{let n=dn(`vital`);A(()=>{W({feature:`add-operation-step-vital`,action_type:`start`}),a.addOperationStepVital(e,`start`,{...t,handlingStack:n})})},l=k((e,t)=>{W({feature:`add-operation-step-vital`,action_type:`succeed`}),a.addOperationStepVital(e,`end`,t)}),d=k((e,t,n)=>{W({feature:`add-operation-step-vital`,action_type:`fail`}),a.addOperationStepVital(e,`end`,n,t)}),f=Zn({init:e=>{let t=Error().stack;A(()=>a.init(e,f,t))},setTrackingConsent:k(e=>{r.update(e),W({feature:`set-tracking-consent`,tracking_consent:e})}),setViewName:k(e=>{a.setViewName(e),W({feature:`set-view-name`})}),setViewContext:k(e=>{a.setViewContext(e),W({feature:`set-view-context`})}
6),setViewContextProperty:k((e,t)=>{a.setViewContextProperty(e,t),W({feature:`set-view-context-property`})}),getViewContext:k(()=>(W({feature:`set-view-context-property`}),a.getViewContext())),getInternalContext:k(e=>a.getInternalContext(e)),getInitConfiguration:k(()=>u(a.initConfiguration)),addAction:(e,t)=>{let n=dn(`action`);A(()=>{a.addAction({name:B(e),context:B(t),startClocks:O(),type:qs.CUSTOM,handlingStack:n}),W({feature:`add-action`})})},startAction:k((e,t)=>{W({feature:`start-action`}),a.startAction(B(e),{type:B(t?.type),context:B(t?.context),actionKey:t?.actionKey})}),stopAction:k((e,t)=>{W({feature:`stop-action`}),a.stopAction(B(e),{type:B(t?.type),context:B(t?.context),actionKey:t?.actionKey})}),startResource:k((e,t)=>{W({feature:`start-resource`}),a.startResource(B(e),{type:B(t?.type),method:B(t?.method),context:B(t?.context),resourceKey:t?.resourceKey})}),stopResource:k((e,t)=>{W({feature:`stop-resource`}),a.stopResource(B(e),{type:B(t?.type),statusCode:t?.statusCode,size:t?.size,context:B(t?.context),resourceKey:t?.resourceKey})}),addError:(e,t)=>{let n=dn(`error`);A(()=>{a.addError({error:e,handlingStack:n,context:B(t),startClocks:O()}),W({feature:`add-error`})})},addTiming:k((e,t)=>{a.addTiming(B(e),t)}),setViewLoadingTime:k(()=>{let e=w();a.setLoadingTime(e),W({feature:`addViewLoadingTime`})}),setGlobalContext:K(o,q.globalContext,J.setContext,`set-global-context`),getGlobalContext:K(o,q.globalContext,J.getContext,`get-global-context`),setGlobalContextProperty:K(o,q.globalContext,J.setContextProperty,`set-global-context-property`),removeGlobalContextProperty:K(o,q.globalContext,J.removeContextProperty,`remove-global-context-property`),clearGlobalContext:K(o,q.globalContext,J.clearContext,`clear-global-context`),setUser:K(o,q.userContext,J.setContext,`set-user`),getUser:K(o,q.userContext,J.getContext,`get-user`),setUserProperty:K(o,q.userContext,J.setContextProperty,`set-user-property`),removeUserProperty:K(o,q.userContext,J.removeContextProperty,`remove-user-property`),clearUser:K(o,q.userContext,J.clearContext,`clear-user`),setAccount:K(o,q.accountContext,J.setContext,`set-account`),getAccount:K(o,q.accountContext,J.getContext,`get-account`),setAccountProperty:K(o,q.accountContext,J.setContextProperty,`set-account-property`),removeAccountProperty:K(o,q.accountContext,J.removeContextProperty,`remove-account-property`),clearAccount:K(o,q.accountContext,J.clearContext,`clear-account`),startView:s,stopSession:k(()=>{a.stopSession(),W({feature:`stop-session`})}),addFeatureFlagEvaluation:k((e,t)=>{a.addFeatureFlagEvaluation(B(e),B(t)),W({feature:`add-feature-flag-evaluation`})}),getSessionReplayLink:k(()=>e.getSessionReplayLink()),startSessionReplayRecording:k(t=>{e.start(t),W({feature:`start-session-replay-recording`,force:t?.force})}),stopSessionReplayRecording:k(()=>e.stop()),addDurationVital:(e,t)=>{let n=dn(`vital`);A(()=>{W({feature:`add-duration-vital`}),a.addDurationVital({id:b(),name:B(e),type:Ys.DURATION,startClocks:Ne(t.startTime),duration:t.duration,context:B(t?.context),description:B(t?.description),handlingStack:n})})},startDurationVital:(e,t)=>{let n=dn(`vital`);A(()=>{W({feature:`start-duration-vital`}),a.startDurationVital(B(e),{vitalKey:t?.vitalKey,context:B(t?.context),description:B(t?.description),handlingStack:n})})},stopDurationVital:k((e,t)=>{W({feature:`stop-duration-vital`}),a.stopDurationVital(B(e),{vitalKey:t?.vitalKey,context:B(t?.context),description:B(t?.description)})}),startOperation:c,succeedOperation:l,failOperation:d,startFeatureOperation:c,succeedFeatureOperation:l,failFeatureOperation:d,DEFAULT_TRACKED_RESOURCE_HEADERS:kc});return f}function Gm(e,t){return{...e,init:e=>{$n(`DD_RUM`,e)},getInternalContext:t.getInternalContext,stopSession:t.stopSession,getViewContext:t.getViewContext,globalContext:t.globalContext,userContext:t.userContext,accountContext:t.accountContext}}function Km(e,{session:t,viewContext:n,errorType:r}){let i=t?t.id:`no-session-id`,a=[];return r!==void 0&&a.push(`error-type=${r}`),n&&(a.push(`seed=${n.id}`),a.push(`from=${n.startClocks.timeStamp}`)),`${qm(e)}${`/rum/replay/sessions/${i}`}?${a.join(`&`)}`}function qm(e){let t=e.site,n=e.subdomain||Jm(e);return`https://${n?`${n}.`:``}${t}`}function Jm(e){switch(e.site){case ct:case lt:return`app`;case st:return`dd`;default:return}}function Ym(e,t,n,r){let i=Ar([kt(e,`profile`)],e=>{t.notify(14,{error:e}),hi(`Error reported to customer`,{"error.message":e.message})}),a=n(r);return{async send({event:e,...t}){let n=new FormData,r=En(e);if(!r)throw Error(`Failed to serialize event`);n.append(`event`,new Blob([r],{type:`application/json`}),`event.json`);let o=r.length;for(let[e,r]of Hr(t)){let t=En(r);if(!t)throw Error(`Failed to serialize attachment`);let i=await Xm(a,t);o+=i.outputBytesCount,n.append(e,new Blob([i.output]),e)}i.send({data:n,bytesCount:o})}}}function Xm(e,t){return new Promise(n=>{e.write(t),e.finish(e=>{n(e)})})}function Zm(e,t,n,r){let i=t.findTrackedSession(),a=Qm(e,i,r);return Km(e,{viewContext:n.findView(),errorType:a,session:i})}function Qm(e,t,n){if(!t)return`rum-not-tracked`;if(vu(t,e)===_u.OFF)return`incorrect-session-plan`;if(!n)return`replay-not-started`}function $m(e,t){if(!e.metricsEnabled)return{stop:I};let n,r,i,{unsubscribe:a}=t.subscribe(e=>{switch(e.type){case`start`:n={forced:e.forced,timestamp:w()},r=void 0,i=void 0;break;case`document-ready`:n&&(r=T(n.timestamp,w()));break;case`recorder-settled`:n&&(i=T(n.timestamp,w()));break;case`aborted`:case`deflate-encoder-load-failed`:case`recorder-load-failed`:case`succeeded`:a(),n&&vi(ii.RECORDER_INIT_METRICS_TELEMETRY_NAME,{metrics:eh(n.forced,i,T(n.timestamp,w()),e.type,r)});break}});return{stop:a}}function eh(e,t,n,r,i){return{forced:e,loadRecorderModuleDuration:t,recorderInitDuration:n,result:r,waitForDocReadyDuration:i}}async function th(){try{return await N(nh)()}catch(e){Ds({error:e,source:`Recorder`,scriptType:`module`})}}async function nh(){return(await e(async()=>{let{startRecording:e}=await import(`./datadogRecorder.9i7aDWYQ.js`);return{startRecording:e}},[])).startRecording}function rh(e,t,n,r,i,a){let o=0,s;t.subscribe(Wc.SESSION_EXPIRED,()=>{(o===2||o===3)&&(d(),o=1)}),t.subscribe(Wc.SESSION_RENEWED,()=>{o===1&&u()});let c=new M;$m(a,c);let l=async l=>{c.notify({type:`start`,forced:l});let[u]=await Promise.all([sh(c,{type:`recorder-settled`},th()),sh(c,{type:`document-ready`},Ia(`interactive`))]);if(o!==2){c.notify({type:`aborted`});return}if(!u){o=0,c.notify({type:`recorder-load-failed`});return}let d=i();if(!d){o=0,c.notify({type:`deflate-encoder-load-failed`});return}({stop:s}=u(t,e,n,r,d,a)),o=3,c.notify({type:`succeeded`})};function u(t){let r=n.findTrackedSession(),i=r?vu(r,e):void 0;if(!ih(i,t)){o=1;return}if(ah(o))return;o=2;let a=oh(i,t)||!1;
6l(a).catch(j),a&&n.updateSessionState({forcedReplay:`1`})}function d(){o===3&&s?.(),o=0}return{start:u,stop:d,getSessionReplayLink(){return Zm(e,n,r,o!==0)},isRecording:()=>o===3}}function ih(e,t){return e!==void 0&&(e!==_u.OFF||t?.force)}function ah(e){return e===2||e===3}function oh(e,t){return t&&t.force&&e===_u.OFF}async function sh(e,t,n){try{return await n}finally{e.notify(t)}}function ch(){let e=0;return{strategy:{start(){e=1},stop(){e=2},isRecording:()=>!1,getSessionReplayLink:I},shouldStartImmediately(t){return e===1||e===0&&!t.startSessionReplayRecordingManually}}}function lh(){if(H()&&!Lr(Fr.RECORDS))return{start:I,stop:I,getReplayStats:()=>void 0,onRumStart:I,isRecording:()=>!1,getSessionReplayLink:()=>void 0};let{strategy:e,shouldStartImmediately:t}=ch();return{start:t=>e.start(t),stop:()=>e.stop(),getSessionReplayLink:()=>e.getSessionReplayLink(),onRumStart:n,isRecording:()=>Ms()===3&&e.isRecording(),getReplayStats:e=>Ms()===3?Hs(e):void 0};function n(n,r,i,a,o,s){let c;function l(){return c||(o??=js(r,`Datadog Session Replay`,()=>e.stop()),o&&(c=Es(o,Uo.REPLAY))),c}e=rh(r,n,i,a,l,s),t(r)&&e.start()}}function uh(){return x.Profiler!==void 0}function dh(e){let t={status:`starting`};return e.assemble.register(({eventType:e})=>e!==Q.VIEW&&e!==Q.LONG_TASK&&e!==Q.ACTION&&e!==Q.VITAL?U:{type:e,_dd:{profiling:t}}),{get:()=>t,set:e=>{t=e}}}async function fh(){try{return await N(ph)()}catch(e){Ds({error:e,source:`Profiler`,scriptType:`module`})}}async function ph(){return(await e(async()=>{let{createRumProfiler:e}=await import(`./datadogProfiler.C4jBXYN4.js`);return{createRumProfiler:e}},[])).createRumProfiler}function mh(){let e;function t(t,n,r,i,a,o){let s=i.findTrackedSession();if(!s||!hh(r,s))return;let c=dh(n);if(!N(uh)()){c.set({status:`error`,error_reason:`not-supported-by-browser`});return}N(fh)().then(n=>{if(!n){c.set({status:`error`,error_reason:`failed-to-lazy-load`});return}e=n(r,t,i,c,o,a,void 0),e.start()}).catch(j)}return{onRumStart:t,stop:()=>{e?.stop()}}}function hh(e,t){return H()?Lr(Fr.PROFILES):Mi(t.id,Ai(e.sessionSampleRate,e.profilingSampleRate))}var gh=Wm(lh(),mh(),{startDeflateWorker:js,createDeflateEncoder:Es,sdkName:`rum`});Qn(x,`DD_RUM`,gh);var _h=(e=``)=>e.includes(`.pr.orbit-origin.`)||!1,vh=e=>e===`localhost`||e.startsWith(`local.`),yh=e=>vh(e)||(globalThis.location?.hostname?vh(globalThis.location.hostname):!1),bh=new Set([`Script error.`,`Uncaught "Script error."`]),xh=e=>[e.stack,e.handling_stack].filter(Boolean).join(`
7`),Sh=e=>e.split(`
8`).map(e=>e.trim()).filter(e=>e.includes(`@`)||e.startsWith(`at `)),Ch=e=>e.includes(`http://`)||e.includes(`https://`),wh=(e,t=[])=>{let n=Sh(e).filter(Ch);return t.some(e=>e.trim()!==``&&n.some(t=>t.includes(e)))},Th=e=>{let t=Sh(e);return t.length>0&&t.every(e=>!Ch(e))},Eh=e=>e.message===`Can't find variable: _AutofillCallbackHandler`&&/^ReferenceError: Can't find variable: _AutofillCallbackHandler\n\s+at global code @ https:\/\/www\.[^\s]+:1:25$/.test(e.stack??``),Dh=(e,{muteAnonymousStackErrors:t=!1,muteLogs:n=[]}={})=>{if(e.type!==`error`||!e.error)return!0;if(e.error.message!==void 0&&bh.has(e.error.message))return!1;let r=xh(e.error);return!(wh(r,n)||Eh(e.error)||t&&Th(r))},Oh={log:0,debug:1,info:2,warn:3,error:4,trace:5};(()=>{let e=t.features.datadog;if(!e.enabled)return;let n=`datadoghq.eu`,r=`orbit-stack`,i=`datadog-context`,{applicationName:a,clientToken:o,env:s,rum:c,logLevel:l=`error`,forwardConsoleLogs:u=[],forwardErrorsToLogs:d=!0}=e,f=JSON.parse(window.localStorage.getItem(i)||`null`),p={publication:a,env:s};if(X.init({clientToken:o,site:n,service:r,env:s,forwardConsoleLogs:u,forwardErrorsToLogs:d,beforeSend:e=>!(e.origin===`console`&&!u.includes(e.status))}),X.setGlobalContext(p),f&&X.setUser(f),c.enabled){let{applicationId:e,sampleRate:t,replaySampleRate:i,trackUserInteractions:a,trackResources:l,trackLongTasks:u,defaultPrivacyLevel:d,muteLogs:m=[],muteAnonymousStackErrors:h=!1}=c;gh.init({clientToken:o,applicationId:e,site:n,service:r,env:s,sessionSampleRate:t,sessionReplaySampleRate:i,trackUserInteractions:a,trackResources:l,trackLongTasks:u,defaultPrivacyLevel:d,beforeSend:e=>Dh(e,{muteLogs:m,muteAnonymousStackErrors:h})}),gh.setGlobalContext(p),f&&gh.setUser(f)}let m=e=>{X.setGlobalContext({...e,...p}),c.enabled&&gh.setGlobalContext({...e,...p})},h=()=>{X.setGlobalContext(p),c.enabled&&gh.setGlobalContext(p)},g=()=>X.getUser()||JSON.parse(window.localStorage.getItem(i)||`null`),_=(e,t=!0)=>{let n={id:e.id};X.setUser(n),c.enabled&&gh.setUser(n),t&&window.localStorage.setItem(i,JSON.stringify(n))},ee=()=>{X.clearUser(),gh.clearUser(),window.localStorage.removeItem(i)},te=(e,...t)=>t.length===0?e:e+t.map((e,t)=>{if(!(t===0&&e instanceof Error)){if(e instanceof Error)return`\n[Error ${t+1}]: ${e.message}\n${e.stack||`No stack trace available`}`;if(typeof e==`object`&&e)try{return`\n[Arg ${t+1}]:\n${JSON.stringify(e,null,2)}`}catch{return`\n[Arg ${t+1}]: [Object - could not stringify]`}else if(typeof e==`string`)try{let n=JSON.parse(e);return`\n[Arg ${t+1} (parsed)]:\n${JSON.stringify(n,null,2)}`}catch{return`\n[Arg ${t+1}]: ${e}`}else return`\n[Arg ${t+1}]: ${String(e)}`}}).join(``),v=e=>(t,n,...r)=>{let i={...t,timestamp:Date.now()};if(yh(window.location.hostname)||_h(window.location.hostname)||e===`log`||e===`trace`)r.length>0&&r[0]instanceof Error?console[e](n,{context:{...X.getGlobalContext(),...i},user:g()||null},...r):console[e](n,...r,{context:{...X.getGlobalContext(),...i},user:g()||null}),(e===`log`||e===`trace`)&&console.info(`💡 The previous log message will not be sent to Datadog because method "${e}" is not supported. Check the Datadog documentatation here https://spotlight.rms.rocks/features/datadog`);else{if(Oh[e]<Oh[l])return;let t=r.length>0&&r[0]instanceof Error,a=te(n,...r);X.logger.log(a,{context:i},e,t?r[0]:null)}};window.logger={setGlobalContext:m,resetGlobalContext:h,setUser:_,clearUser:ee,log:v(`log`),info:v(`info`),warn:v(`warn`),error:v(`error`),debug:v(`debug`),trace:v(`trace`)}})();export{Ht as $,Rs as A,Gr as B,Wc as C,Bs as D,Ys as E,Mi as F,fr as G,Ir as H,ki as I,z as J,cr as K,ii as L,Qa as M,Pi as N,zs as O,Ai as P,I as Q,hi as R,ul as S,Gs as T,Ar as U,H as V,mr as W,L as X,_n as Y,gn as Z,gl as _,fu as a,k as at,ml as b,su as c,Ae as ct,ru as d,je as dt,F as et,Zl as f,T as ft,yl as g,v as gt,Yl as h,x as ht,du as i,N as it,Uo as j,Vs as k,tu as l,Le as lt,Jl as m,we as mt,gu as n,jt as nt,eu as o,j as ot,$ as p,w as pt,R as q,mu as r,kt as rt,nu as s,S as st,Ym as t,P as tt,iu as u,O as ut,_l as v,Uc as w,hl as x,pl as y,vi as z};

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.