@grafana/faro-web-sdk 1.12.3 → 1.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundle/faro-web-sdk.iife.js +1 -1
- package/dist/bundle/types/config/makeCoreConfig.d.ts +1 -1
- package/dist/bundle/types/index.d.ts +1 -1
- package/dist/bundle/types/instrumentations/console/instrumentation.d.ts +3 -1
- package/dist/bundle/types/instrumentations/errors/getErrorDetails.d.ts +8 -1
- package/dist/bundle/types/instrumentations/errors/instrumentation.d.ts +1 -1
- package/dist/bundle/types/instrumentations/performance/instrumentation.d.ts +1 -1
- package/dist/bundle/types/instrumentations/session/instrumentation.d.ts +1 -1
- package/dist/bundle/types/instrumentations/session/sessionManager/sessionManagerUtils.d.ts +6 -0
- package/dist/bundle/types/instrumentations/view/instrumentation.d.ts +1 -1
- package/dist/bundle/types/instrumentations/webVitals/instrumentation.d.ts +1 -1
- package/dist/bundle/types/metas/index.d.ts +0 -2
- package/dist/bundle/types/metas/page/index.d.ts +1 -1
- package/dist/bundle/types/metas/page/meta.d.ts +7 -2
- package/dist/bundle/types/transports/console/transport.d.ts +1 -1
- package/dist/bundle/types/transports/fetch/transport.d.ts +1 -1
- package/dist/bundle/types/utils/index.d.ts +0 -1
- package/dist/cjs/config/makeCoreConfig.js +43 -36
- package/dist/cjs/config/makeCoreConfig.js.map +1 -1
- package/dist/cjs/index.js +2 -4
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/instrumentations/console/instrumentation.js +26 -3
- package/dist/cjs/instrumentations/console/instrumentation.js.map +1 -1
- package/dist/cjs/instrumentations/errors/getErrorDetails.js +32 -1
- package/dist/cjs/instrumentations/errors/getErrorDetails.js.map +1 -1
- package/dist/cjs/instrumentations/errors/registerOnerror.js +1 -21
- package/dist/cjs/instrumentations/errors/registerOnerror.js.map +1 -1
- package/dist/cjs/instrumentations/session/instrumentation.js +6 -4
- package/dist/cjs/instrumentations/session/instrumentation.js.map +1 -1
- package/dist/cjs/instrumentations/session/sessionManager/PersistentSessionsManager.js +5 -11
- package/dist/cjs/instrumentations/session/sessionManager/PersistentSessionsManager.js.map +1 -1
- package/dist/cjs/instrumentations/session/sessionManager/VolatileSessionManager.js +5 -12
- package/dist/cjs/instrumentations/session/sessionManager/VolatileSessionManager.js.map +1 -1
- package/dist/cjs/instrumentations/session/sessionManager/sessionManagerUtils.js +49 -3
- package/dist/cjs/instrumentations/session/sessionManager/sessionManagerUtils.js.map +1 -1
- package/dist/cjs/metas/index.js +1 -5
- package/dist/cjs/metas/index.js.map +1 -1
- package/dist/cjs/metas/page/index.js +2 -2
- package/dist/cjs/metas/page/index.js.map +1 -1
- package/dist/cjs/metas/page/meta.js +30 -7
- package/dist/cjs/metas/page/meta.js.map +1 -1
- package/dist/cjs/utils/index.js +1 -4
- package/dist/cjs/utils/index.js.map +1 -1
- package/dist/cjs/utils/webStorage.js +0 -1
- package/dist/cjs/utils/webStorage.js.map +1 -1
- package/dist/esm/config/makeCoreConfig.js +43 -37
- package/dist/esm/config/makeCoreConfig.js.map +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/instrumentations/console/instrumentation.js +27 -4
- package/dist/esm/instrumentations/console/instrumentation.js.map +1 -1
- package/dist/esm/instrumentations/errors/getErrorDetails.js +31 -3
- package/dist/esm/instrumentations/errors/getErrorDetails.js.map +1 -1
- package/dist/esm/instrumentations/errors/registerOnerror.js +2 -21
- package/dist/esm/instrumentations/errors/registerOnerror.js.map +1 -1
- package/dist/esm/instrumentations/session/instrumentation.js +6 -4
- package/dist/esm/instrumentations/session/instrumentation.js.map +1 -1
- package/dist/esm/instrumentations/session/sessionManager/PersistentSessionsManager.js +7 -13
- package/dist/esm/instrumentations/session/sessionManager/PersistentSessionsManager.js.map +1 -1
- package/dist/esm/instrumentations/session/sessionManager/VolatileSessionManager.js +6 -13
- package/dist/esm/instrumentations/session/sessionManager/VolatileSessionManager.js.map +1 -1
- package/dist/esm/instrumentations/session/sessionManager/sessionManagerUtils.js +45 -3
- package/dist/esm/instrumentations/session/sessionManager/sessionManagerUtils.js.map +1 -1
- package/dist/esm/metas/index.js +0 -2
- package/dist/esm/metas/index.js.map +1 -1
- package/dist/esm/metas/page/index.js +1 -1
- package/dist/esm/metas/page/index.js.map +1 -1
- package/dist/esm/metas/page/meta.js +16 -5
- package/dist/esm/metas/page/meta.js.map +1 -1
- package/dist/esm/utils/index.js +0 -1
- package/dist/esm/utils/index.js.map +1 -1
- package/dist/esm/utils/webStorage.js +0 -1
- package/dist/esm/utils/webStorage.js.map +1 -1
- package/dist/types/config/makeCoreConfig.d.ts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/instrumentations/console/instrumentation.d.ts +3 -1
- package/dist/types/instrumentations/errors/getErrorDetails.d.ts +8 -1
- package/dist/types/instrumentations/errors/instrumentation.d.ts +1 -1
- package/dist/types/instrumentations/performance/instrumentation.d.ts +1 -1
- package/dist/types/instrumentations/session/instrumentation.d.ts +1 -1
- package/dist/types/instrumentations/session/sessionManager/sessionManagerUtils.d.ts +6 -0
- package/dist/types/instrumentations/view/instrumentation.d.ts +1 -1
- package/dist/types/instrumentations/webVitals/instrumentation.d.ts +1 -1
- package/dist/types/metas/index.d.ts +0 -2
- package/dist/types/metas/page/index.d.ts +1 -1
- package/dist/types/metas/page/meta.d.ts +7 -2
- package/dist/types/transports/console/transport.d.ts +1 -1
- package/dist/types/transports/fetch/transport.d.ts +1 -1
- package/dist/types/utils/index.d.ts +0 -1
- package/package.json +6 -3
- package/dist/bundle/types/metas/const.d.ts +0 -2
- package/dist/bundle/types/utils/json.d.ts +0 -2
- package/dist/cjs/metas/const.js +0 -7
- package/dist/cjs/metas/const.js.map +0 -1
- package/dist/cjs/utils/json.js +0 -22
- package/dist/cjs/utils/json.js.map +0 -1
- package/dist/esm/metas/const.js +0 -4
- package/dist/esm/metas/const.js.map +0 -1
- package/dist/esm/utils/json.js +0 -16
- package/dist/esm/utils/json.js.map +0 -1
- package/dist/types/metas/const.d.ts +0 -2
- package/dist/types/utils/json.d.ts +0 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
var GrafanaFaroWebSdk=function(e){"use strict";function t(e,t){return typeof e===t}function n(e,t){return Object.prototype.toString.call(e)===`[object ${t}]`}function i(e,t){try{return e instanceof t}catch(e){return!1}}const r=e=>t(e,"null"),o=e=>t(e,"string"),s=e=>t(e,"number")&&!isNaN(e)||t(e,"bigint"),a=e=>!r(e)&&t(e,"object"),u=e=>t(e,"function"),l=e=>n(e,"Array"),c=e=>!a(e)&&!u(e),d="undefined"!=typeof Event,f=e=>d&&i(e,Event),p="undefined"!=typeof Error,m=e=>p&&i(e,Error),g=e=>n(e,"ErrorEvent"),v=e=>n(e,"DOMError"),h=e=>n(e,"DOMException"),b="undefined"!=typeof Element,w="undefined"!=typeof Map;function y(e,n){if(e===n)return!0;if(t(e,"number")&&isNaN(e))return t(n,"number")&&isNaN(n);const i=l(e),r=l(n);if(i!==r)return!1;if(i&&r){const t=e.length;if(t!==n.length)return!1;for(let i=t;0!=i--;)if(!y(e[i],n[i]))return!1;return!0}const o=a(e),s=a(n);if(o!==s)return!1;if(e&&n&&o&&s){const t=Object.keys(e),i=Object.keys(n);if(t.length!==i.length)return!1;for(let e of t)if(!i.includes(e))return!1;for(let i of t)if(!y(e[i],n[i]))return!1;return!0}return!1}function S(){return Date.now()}function T(){return(new Date).toISOString()}function E(e){return new Date(e).toISOString()}var I;e.LogLevel=void 0,(I=e.LogLevel||(e.LogLevel={})).TRACE="trace",I.DEBUG="debug",I.INFO="info",I.LOG="log",I.WARN="warn",I.ERROR="error";const k=e.LogLevel.LOG,x=[e.LogLevel.TRACE,e.LogLevel.DEBUG,e.LogLevel.INFO,e.LogLevel.LOG,e.LogLevel.WARN,e.LogLevel.ERROR];function L(){}function O(e){const{size:t,concurrency:n}=e,i=[];let r=0;const o=()=>{if(r<n&&i.length){const{producer:e,resolve:t,reject:n}=i.shift();r++,e().then((e=>{r--,o(),t(e)}),(e=>{r--,o(),n(e)}))}};return{add:e=>{if(i.length+r>=t)throw new Error("Task buffer full");return new Promise(((t,n)=>{i.push({producer:e,resolve:t,reject:n}),o()}))}}}const C="abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ0123456789";function P(e=10){return Array.from(Array(e)).map((()=>C[Math.floor(Math.random()*C.length)])).join("")}const _="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof self?self:void 0;class N{constructor(e,t){var n,i;this.signalBuffer=[],this.itemLimit=null!==(n=null==t?void 0:t.itemLimit)&&void 0!==n?n:50,this.sendTimeout=null!==(i=null==t?void 0:t.sendTimeout)&&void 0!==i?i:250,this.paused=(null==t?void 0:t.paused)||!1,this.sendFn=e,this.flushInterval=-1,this.paused||this.start(),document.addEventListener("visibilitychange",(()=>{"hidden"===document.visibilityState&&this.flush()}))}addItem(e){this.paused||(this.signalBuffer.push(e),this.signalBuffer.length>=this.itemLimit&&this.flush())}start(){this.paused=!1,this.sendTimeout>0&&(this.flushInterval=window.setInterval((()=>this.flush()),this.sendTimeout))}pause(){this.paused=!0,clearInterval(this.flushInterval)}groupItems(e){const t=new Map;return e.forEach((e=>{const n=JSON.stringify(e.meta);let i=t.get(n);i=void 0===i?[e]:[...i,e],t.set(n,i)})),Array.from(t.values())}flush(){if(this.paused||0===this.signalBuffer.length)return;this.groupItems(this.signalBuffer).forEach(this.sendFn),this.signalBuffer=[]}}var M;e.TransportItemType=void 0,(M=e.TransportItemType||(e.TransportItemType={})).EXCEPTION="exception",M.LOG="log",M.MEASUREMENT="measurement",M.TRACE="trace",M.EVENT="event";const A={[e.TransportItemType.EXCEPTION]:"exceptions",[e.TransportItemType.LOG]:"logs",[e.TransportItemType.MEASUREMENT]:"measurements",[e.TransportItemType.TRACE]:"traces",[e.TransportItemType.EVENT]:"events"};function D(t){return n=>{if(n.type===e.TransportItemType.EXCEPTION&&n.payload){const e=n.payload,i=`${e.type}: ${e.value}`;if(function(e,t){return e.some((e=>o(e)?t.includes(e):!!t.match(e)))}(t,i))return null}return n}}function j(e,t,n,i){var r;t.debug("Initializing transports");const o=[];let s=n.paused,a=[];const u=e=>{let t=e;for(const e of a){const n=t.map(e).filter(Boolean);if(0===n.length)return[];t=n}return t},l=e=>{const n=u(e);if(0!==n.length)for(const e of o)t.debug(`Transporting item using ${e.name}\n`,n),e.isBatched()&&e.send(n)};let c;(null===(r=n.batching)||void 0===r?void 0:r.enabled)&&(c=new N(l,{sendTimeout:n.batching.sendTimeout,itemLimit:n.batching.itemLimit,paused:s}));return{add:(...r)=>{t.debug("Adding transports"),r.forEach((r=>{t.debug(`Adding "${r.name}" transport`);o.some((e=>e===r))?t.warn(`Transport ${r.name} is already added`):(r.unpatchedConsole=e,r.internalLogger=t,r.config=n,r.metas=i,o.push(r))}))},addBeforeSendHooks:(...e)=>{t.debug("Adding beforeSendHooks\n",a),e.forEach((e=>{e&&a.push(e)}))},addIgnoreErrorsPatterns:(...e)=>{t.debug("Adding ignoreErrorsPatterns\n",e),e.forEach((e=>{e&&a.push(D(e))}))},getBeforeSendHooks:()=>[...a],execute:e=>{var i;s||((null===(i=n.batching)||void 0===i?void 0:i.enabled)&&(null==c||c.addItem(e)),(e=>{var i,r;if((null===(i=n.batching)||void 0===i?void 0:i.enabled)&&o.every((e=>e.isBatched())))return;const[s]=u([e]);if(void 0!==s)for(const e of o)t.debug(`Transporting item using ${e.name}\n`,s),e.isBatched()?(null===(r=n.batching)||void 0===r?void 0:r.enabled)||e.send([s]):e.send(s)})(e))},isPaused:()=>s,pause:()=>{t.debug("Pausing transports"),null==c||c.pause(),s=!0},remove:(...e)=>{t.debug("Removing transports"),e.forEach((e=>{t.debug(`Removing "${e.name}" transport`);const n=o.indexOf(e);-1!==n?o.splice(n,1):t.warn(`Transport "${e.name}" is not added`)}))},removeBeforeSendHooks:(...e)=>{a.filter((t=>!e.includes(t)))},get transports(){return[...o]},unpause:()=>{t.debug("Unpausing transports"),null==c||c.start(),s=!1}}}var R;e.InternalLoggerLevel=void 0,(R=e.InternalLoggerLevel||(e.InternalLoggerLevel={}))[R.OFF=0]="OFF",R[R.ERROR=1]="ERROR",R[R.WARN=2]="WARN",R[R.INFO=3]="INFO",R[R.VERBOSE=4]="VERBOSE";const B={debug:L,error:L,info:L,prefix:"Faro",warn:L},U=e.InternalLoggerLevel.ERROR,F=Object.assign({},console);let z=F;function V(e){var t;return z=null!==(t=e.unpatchedConsole)&&void 0!==t?t:z,z}function $(t=F,n=U){const i=B;return n>e.InternalLoggerLevel.OFF&&(i.error=n>=e.InternalLoggerLevel.ERROR?function(...e){t.error(`${i.prefix}\n`,...e)}:L,i.warn=n>=e.InternalLoggerLevel.WARN?function(...e){t.warn(`${i.prefix}\n`,...e)}:L,i.info=n>=e.InternalLoggerLevel.INFO?function(...e){t.info(`${i.prefix}\n`,...e)}:L,i.debug=n>=e.InternalLoggerLevel.VERBOSE?function(...e){t.debug(`${i.prefix}\n`,...e)}:L),i}let q=B;function G(e,t){return q=$(e,t.internalLoggerLevel),q}class H{constructor(){this.unpatchedConsole=F,this.internalLogger=B,this.config={},this.metas={}}logDebug(...e){this.internalLogger.debug(`${this.name}\n`,...e)}logInfo(...e){this.internalLogger.info(`${this.name}\n`,...e)}logWarn(...e){this.internalLogger.warn(`${this.name}\n`,...e)}logError(...e){this.internalLogger.error(`${this.name}\n`,...e)}}class W extends H{isBatched(){return!1}getIgnoreUrls(){return[]}}function K(e,t){var n,i;if(void 0===t)return e;if(void 0===e)return{resourceSpans:t};const r=null===(n=e.resourceSpans)||void 0===n?void 0:n[0];if(void 0===r)return e;const o=(null==r?void 0:r.scopeSpans)||[],s=(null===(i=null==t?void 0:t[0])||void 0===i?void 0:i.scopeSpans)||[];return Object.assign(Object.assign({},e),{resourceSpans:[Object.assign(Object.assign({},r),{scopeSpans:[...o,...s]})]})}function X(t){let n={meta:{}};return void 0!==t[0]&&(n.meta=t[0].meta),t.forEach((t=>{switch(t.type){case e.TransportItemType.LOG:case e.TransportItemType.EVENT:case e.TransportItemType.EXCEPTION:case e.TransportItemType.MEASUREMENT:const i=A[t.type],r=n[i];n=Object.assign(Object.assign({},n),{[i]:void 0===r?[t.payload]:[...r,t.payload]});break;case e.TransportItemType.TRACE:n=Object.assign(Object.assign({},n),{traces:K(n.traces,t.payload.resourceSpans)})}})),n}const J="Error";let Z;function Y(e){let t=e.cause;return m(t)?t=e.cause.toString():null!==t&&(a(e.cause)||l(e.cause))?t=JSON.stringify(e.cause):null!=t&&(t=e.cause.toString()),null==t?{}:{cause:t}}const Q=e=>e.map((e=>{try{return String(e)}catch(e){return""}})).join(" ");function ee(t,n,i,o,s){n.debug("Initializing API");const a=function(t,n,i,r,o){let s;return n.debug("Initializing traces API"),{getOTEL:()=>s,getTraceContext:()=>{const e=null==s?void 0:s.trace.getSpanContext(s.context.active());return e?{trace_id:e.traceId,span_id:e.spanId}:void 0},initOTEL:(e,t)=>{n.debug("Initializing OpenTelemetry"),s={trace:e,context:t}},isOTELInitialized:()=>!!s,pushTraces:t=>{try{const i={type:e.TransportItemType.TRACE,payload:t,meta:r.value};n.debug("Pushing trace\n",i),o.execute(i)}catch(e){n.error("Error pushing trace\n",e)}}}}(0,n,0,o,s);return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},a),function(t,n,i,o,s,a){var u;n.debug("Initializing exceptions API");let l=null;Z=null!==(u=i.parseStacktrace)&&void 0!==u?u:Z;const c=e=>{n.debug("Changing stacktrace parser"),Z=null!=e?e:Z};return c(i.parseStacktrace),{changeStacktraceParser:c,getStacktraceParser:()=>Z,pushError:(t,{skipDedupe:u,stackFrames:c,type:d,context:f,spanContext:p,timestampOverwriteMs:m}={})=>{d=d||t.name||J;const g={meta:o.value,payload:{type:d,value:t.message,timestamp:m?E(m):T(),trace:p?{trace_id:p.traceId,span_id:p.spanId}:a.getTraceContext(),context:Object.assign(Object.assign({},Y(t)),null!=f?f:{})},type:e.TransportItemType.EXCEPTION};(null==(c=null!=c?c:t.stack?null==Z?void 0:Z(t).frames:void 0)?void 0:c.length)&&(g.payload.stacktrace={frames:c});const v={type:g.payload.type,value:g.payload.value,stackTrace:g.payload.stacktrace,context:g.payload.context};u||!i.dedupe||r(l)||!y(v,l)?(l=v,n.debug("Pushing exception\n",g),s.execute(g)):n.debug("Skipping error push because it is the same as the last one\n",g.payload)}}}(0,n,i,o,s,a)),function(e,t,n,i){let r,o,s;t.debug("Initializing meta API");const a=e=>{o&&i.remove(o),o={user:e},i.add(o)},u=e=>{r&&i.remove(r),r={session:e},i.add(r)};return{setUser:a,resetUser:a,setSession:u,resetSession:u,getSession:()=>i.value.session,setView:e=>{var t;if((null===(t=null==s?void 0:s.view)||void 0===t?void 0:t.name)===(null==e?void 0:e.name))return;const n=s;s={view:e},i.add(s),n&&i.remove(n)},getView:()=>i.value.view}}(0,n,0,o)),function(t,n,i,o,s,a){var u;n.debug("Initializing logs API");let l=null;const c=null!==(u=i.logArgsSerializer)&&void 0!==u?u:Q;return{pushLog:(t,{context:u,level:d,skipDedupe:f,spanContext:p,timestampOverwriteMs:m}={})=>{try{const g={type:e.TransportItemType.LOG,payload:{message:c(t),level:null!=d?d:k,context:null!=u?u:{},timestamp:m?E(m):T(),trace:p?{trace_id:p.traceId,span_id:p.spanId}:a.getTraceContext()},meta:o.value},v={message:g.payload.message,level:g.payload.level,context:g.payload.context};if(!f&&i.dedupe&&!r(l)&&y(v,l))return void n.debug("Skipping log push because it is the same as the last one\n",g.payload);l=v,n.debug("Pushing log\n",g),s.execute(g)}catch(e){n.error("Error pushing log\n",e)}}}}(0,n,i,o,s,a)),function(t,n,i,o,s,a){n.debug("Initializing measurements API");let u=null;return{pushMeasurement:(t,{skipDedupe:l,context:c,spanContext:d,timestampOverwriteMs:f}={})=>{try{const p={type:e.TransportItemType.MEASUREMENT,payload:Object.assign(Object.assign({},t),{trace:d?{trace_id:d.traceId,span_id:d.spanId}:a.getTraceContext(),timestamp:f?E(f):T(),context:null!=c?c:{}}),meta:o.value},m={type:p.payload.type,values:p.payload.values,context:p.payload.context};if(!l&&i.dedupe&&!r(u)&&y(m,u))return void n.debug("Skipping measurement push because it is the same as the last one\n",p.payload);u=m,n.debug("Pushing measurement\n",p),s.execute(p)}catch(e){n.error("Error pushing measurement\n",e)}}}}(0,n,i,o,s,a)),function(t,n,i,o,s,a){let u=null;return{pushEvent:(t,l,c,{skipDedupe:d,spanContext:f,timestampOverwriteMs:p}={})=>{try{const m={meta:o.value,payload:{name:t,domain:null!=c?c:i.eventDomain,attributes:l,timestamp:p?E(p):T(),trace:f?{trace_id:f.traceId,span_id:f.spanId}:a.getTraceContext()},type:e.TransportItemType.EVENT},g={name:m.payload.name,attributes:m.payload.attributes,domain:m.payload.domain};if(!d&&i.dedupe&&!r(u)&&y(g,u))return void n.debug("Skipping event push because it is the same as the last one\n",m.payload);u=g,n.debug("Pushing event\n",m),s.execute(m)}catch(e){n.error("Error pushing event",e)}}}}(0,n,i,o,s,a))}class te extends H{constructor(){super(...arguments),this.api={},this.transports={}}}const ne="1.12.3";const ie="_faroInternal";function re(e){e.config.isolate?e.internalLogger.debug("Skipping registering internal Faro instance on global object"):(e.internalLogger.debug("Registering internal Faro instance on global object"),Object.defineProperty(_,ie,{configurable:!1,enumerable:!1,writable:!1,value:e}))}function oe(){return ie in _}function se(t,n,i,r,o,s,a){return n.debug("Initializing Faro"),e.faro={api:s,config:i,instrumentations:a,internalLogger:n,metas:r,pause:o.pause,transports:o,unpatchedConsole:t,unpause:o.unpause},re(e.faro),function(e){if(e.config.preventGlobalExposure)e.internalLogger.debug("Skipping registering public Faro instance in the global scope");else{if(e.internalLogger.debug(`Registering public faro reference in the global scope using "${e.config.globalObjectKey}" key`),e.config.globalObjectKey in _)return void e.internalLogger.warn(`Skipping global registration due to key "${e.config.globalObjectKey}" being used already. Please set "globalObjectKey" to something else or set "preventGlobalExposure" to "true"`);Object.defineProperty(_,e.config.globalObjectKey,{configurable:!1,writable:!1,value:e})}}(e.faro),e.faro}function ae(e){const t=V(e),n=G(t,e);if(oe()&&!e.isolate)return void n.error('Faro is already registered. Either add instrumentations, transports etc. to the global faro instance or use the "isolate" property');n.debug("Initializing");const i=function(e,t){let n=[],i=[];const r=()=>n.reduce(((e,t)=>Object.assign(e,u(t)?t():t)),{}),o=()=>{if(i.length){const e=r();i.forEach((t=>t(e)))}};return{add:(...e)=>{t.debug("Adding metas\n",e),n.push(...e),o()},remove:(...e)=>{t.debug("Removing metas\n",e),n=n.filter((t=>!e.includes(t))),o()},addListener:e=>{t.debug("Adding metas listener\n",e),i.push(e)},removeListener:e=>{t.debug("Removing metas listener\n",e),i=i.filter((t=>t!==e))},get value(){return r()}}}(0,n),r=j(t,n,e,i),o=ee(0,n,e,i,r),s=function(e,t,n,i,r,o){t.debug("Initializing instrumentations");const s=[];return{add:(...a)=>{t.debug("Adding instrumentations"),a.forEach((a=>{t.debug(`Adding "${a.name}" instrumentation`),s.some((e=>e.name===a.name))?t.warn(`Instrumentation ${a.name} is already added`):(a.unpatchedConsole=e,a.internalLogger=t,a.config=n,a.metas=i,a.transports=r,a.api=o,s.push(a),a.initialize())}))},get instrumentations(){return[...s]},remove:(...e)=>{t.debug("Removing instrumentations"),e.forEach((e=>{var n,i;t.debug(`Removing "${e.name}" instrumentation`);const r=s.reduce(((t,n,i)=>null===t&&n.name===e.name?i:null),null);r?(null===(i=(n=s[r]).destroy)||void 0===i||i.call(n),s.splice(r,1)):t.warn(`Instrumentation "${e.name}" is not added`)}))}}}(t,n,e,i,r,o),a=se(t,n,e,i,r,o,s);return function(e){var t,n;const i={sdk:{version:ne},app:{bundleId:e.config.app.name&&(r=e.config.app.name,null==_?void 0:_[`__faroBundleId_${r}`])}};var r;const o=null===(t=e.config.sessionTracking)||void 0===t?void 0:t.session;o&&e.api.setSession(o),e.config.app&&(i.app=Object.assign(Object.assign({},e.config.app),i.app)),e.config.user&&(i.user=e.config.user),e.config.view&&(i.view=e.config.view),e.metas.add(i,...null!==(n=e.config.metas)&&void 0!==n?n:[])}(a),function(e){e.transports.add(...e.config.transports),e.transports.addBeforeSendHooks(e.config.beforeSend),e.transports.addIgnoreErrorsPatterns(e.config.ignoreErrors)}(a),function(e){e.instrumentations.add(...e.config.instrumentations)}(a),a}e.faro={};const ue="faro",le={enabled:!0,sendTimeout:250,itemLimit:50},ce="view_changed",de="session_start",fe="session_resume",pe="session_extend",me="unknown";var ge,ve={exports:{}},he=ve.exports;var be=(ge||(ge=1,function(e,t){!function(n,i){var r="function",o="undefined",s="object",a="string",u="major",l="model",c="name",d="type",f="vendor",p="version",m="architecture",g="console",v="mobile",h="tablet",b="smarttv",w="wearable",y="embedded",S="Amazon",T="Apple",E="ASUS",I="BlackBerry",k="Browser",x="Chrome",L="Firefox",O="Google",C="Huawei",P="LG",_="Microsoft",N="Motorola",M="Opera",A="Samsung",D="Sharp",j="Sony",R="Xiaomi",B="Zebra",U="Facebook",F="Chromium OS",z="Mac OS",V=" Browser",$=function(e){for(var t={},n=0;n<e.length;n++)t[e[n].toUpperCase()]=e[n];return t},q=function(e,t){return typeof e===a&&-1!==G(t).indexOf(G(e))},G=function(e){return e.toLowerCase()},H=function(e,t){if(typeof e===a)return e=e.replace(/^\s\s*/,""),typeof t===o?e:e.substring(0,500)},W=function(e,t){for(var n,o,a,u,l,c,d=0;d<t.length&&!l;){var f=t[d],p=t[d+1];for(n=o=0;n<f.length&&!l&&f[n];)if(l=f[n++].exec(e))for(a=0;a<p.length;a++)c=l[++o],typeof(u=p[a])===s&&u.length>0?2===u.length?typeof u[1]==r?this[u[0]]=u[1].call(this,c):this[u[0]]=u[1]:3===u.length?typeof u[1]!==r||u[1].exec&&u[1].test?this[u[0]]=c?c.replace(u[1],u[2]):i:this[u[0]]=c?u[1].call(this,c,u[2]):i:4===u.length&&(this[u[0]]=c?u[3].call(this,c.replace(u[1],u[2])):i):this[u]=c||i;d+=2}},K=function(e,t){for(var n in t)if(typeof t[n]===s&&t[n].length>0){for(var r=0;r<t[n].length;r++)if(q(t[n][r],e))return"?"===n?i:n}else if(q(t[n],e))return"?"===n?i:n;return t.hasOwnProperty("*")?t["*"]:e},X={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},J={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[p,[c,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[p,[c,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[c,p],[/opios[\/ ]+([\w\.]+)/i],[p,[c,M+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[p,[c,M+" GX"]],[/\bopr\/([\w\.]+)/i],[p,[c,M]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[p,[c,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[p,[c,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon)\/([-\w\.]+)/i,/(heytap|ovi|115)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[c,p],[/quark(?:pc)?\/([-\w\.]+)/i],[p,[c,"Quark"]],[/\bddg\/([\w\.]+)/i],[p,[c,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[p,[c,"UC"+k]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[p,[c,"WeChat"]],[/konqueror\/([\w\.]+)/i],[p,[c,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[p,[c,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[p,[c,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[p,[c,"Smart Lenovo "+k]],[/(avast|avg)\/([\w\.]+)/i],[[c,/(.+)/,"$1 Secure "+k],p],[/\bfocus\/([\w\.]+)/i],[p,[c,L+" Focus"]],[/\bopt\/([\w\.]+)/i],[p,[c,M+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[p,[c,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[p,[c,"Dolphin"]],[/coast\/([\w\.]+)/i],[p,[c,M+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[p,[c,"MIUI"+V]],[/fxios\/([\w\.-]+)/i],[p,[c,L]],[/\bqihoobrowser\/?([\w\.]*)/i],[p,[c,"360"]],[/\b(qq)\/([\w\.]+)/i],[[c,/(.+)/,"$1Browser"],p],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[c,/(.+)/,"$1"+V],p],[/samsungbrowser\/([\w\.]+)/i],[p,[c,A+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[p,[c,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[c,"Sogou Mobile"],p],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[c,p],[/(lbbrowser|rekonq)/i,/\[(linkedin)app\]/i],[c],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[p,c],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[c,U],p],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[c,p],[/\bgsa\/([\w\.]+) .*safari\//i],[p,[c,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[p,[c,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[p,[c,x+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[c,x+" WebView"],p],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[p,[c,"Android "+k]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[c,p],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[p,[c,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[p,c],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[c,[p,K,{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}]],[/(webkit|khtml)\/([\w\.]+)/i],[c,p],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[c,"Netscape"],p],[/(wolvic|librewolf)\/([\w\.]+)/i],[c,p],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[p,[c,L+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i],[c,[p,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[c,[p,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[m,"amd64"]],[/(ia32(?=;))/i],[[m,G]],[/((?:i[346]|x)86)[;\)]/i],[[m,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[m,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[m,"armhf"]],[/windows (ce|mobile); ppc;/i],[[m,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[m,/ower/,"",G]],[/(sun4\w)[;\)]/i],[[m,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[m,G]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[l,[f,A],[d,h]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[l,[f,A],[d,v]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[l,[f,T],[d,v]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[l,[f,T],[d,h]],[/(macintosh);/i],[l,[f,T]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[l,[f,D],[d,v]],[/(?:honor)([-\w ]+)[;\)]/i],[l,[f,"Honor"],[d,v]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[l,[f,C],[d,h]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[l,[f,C],[d,v]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i],[[l,/_/g," "],[f,R],[d,v]],[/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[l,/_/g," "],[f,R],[d,h]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[l,[f,"OPPO"],[d,v]],[/\b(opd2\d{3}a?) bui/i],[l,[f,"OPPO"],[d,h]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[l,[f,"Vivo"],[d,v]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[l,[f,"Realme"],[d,v]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[l,[f,N],[d,v]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[l,[f,N],[d,h]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[l,[f,P],[d,h]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[l,[f,P],[d,v]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[l,[f,"Lenovo"],[d,h]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[l,/_/g," "],[f,"Nokia"],[d,v]],[/(pixel c)\b/i],[l,[f,O],[d,h]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[l,[f,O],[d,v]],[/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[l,[f,j],[d,v]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[l,"Xperia Tablet"],[f,j],[d,h]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[l,[f,"OnePlus"],[d,v]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[l,[f,S],[d,h]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[l,/(.+)/g,"Fire Phone $1"],[f,S],[d,v]],[/(playbook);[-\w\),; ]+(rim)/i],[l,f,[d,h]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[l,[f,I],[d,v]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[l,[f,E],[d,h]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[l,[f,E],[d,v]],[/(nexus 9)/i],[l,[f,"HTC"],[d,h]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[f,[l,/_/g," "],[d,v]],[/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])\w*(\)| bui)/i],[l,[f,"TCL"],[d,h]],[/(itel) ((\w+))/i],[[f,G],l,[d,K,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[l,[f,"Acer"],[d,h]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[l,[f,"Meizu"],[d,v]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[l,[f,"Ulefone"],[d,v]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[l,[f,"Energizer"],[d,v]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[l,[f,"Cat"],[d,v]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[l,[f,"Smartfren"],[d,v]],[/droid.+; (a(?:015|06[35]|142p?))/i],[l,[f,"Nothing"],[d,v]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (imo) ((?!tab)[\w ]+?)(?: bui|\))/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[f,l,[d,v]],[/(imo) (tab \w+)/i,/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[f,l,[d,h]],[/(surface duo)/i],[l,[f,_],[d,h]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[l,[f,"Fairphone"],[d,v]],[/(u304aa)/i],[l,[f,"AT&T"],[d,v]],[/\bsie-(\w*)/i],[l,[f,"Siemens"],[d,v]],[/\b(rct\w+) b/i],[l,[f,"RCA"],[d,h]],[/\b(venue[\d ]{2,7}) b/i],[l,[f,"Dell"],[d,h]],[/\b(q(?:mv|ta)\w+) b/i],[l,[f,"Verizon"],[d,h]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[l,[f,"Barnes & Noble"],[d,h]],[/\b(tm\d{3}\w+) b/i],[l,[f,"NuVision"],[d,h]],[/\b(k88) b/i],[l,[f,"ZTE"],[d,h]],[/\b(nx\d{3}j) b/i],[l,[f,"ZTE"],[d,v]],[/\b(gen\d{3}) b.+49h/i],[l,[f,"Swiss"],[d,v]],[/\b(zur\d{3}) b/i],[l,[f,"Swiss"],[d,h]],[/\b((zeki)?tb.*\b) b/i],[l,[f,"Zeki"],[d,h]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[f,"Dragon Touch"],l,[d,h]],[/\b(ns-?\w{0,9}) b/i],[l,[f,"Insignia"],[d,h]],[/\b((nxa|next)-?\w{0,9}) b/i],[l,[f,"NextBook"],[d,h]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[f,"Voice"],l,[d,v]],[/\b(lvtel\-)?(v1[12]) b/i],[[f,"LvTel"],l,[d,v]],[/\b(ph-1) /i],[l,[f,"Essential"],[d,v]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[l,[f,"Envizen"],[d,h]],[/\b(trio[-\w\. ]+) b/i],[l,[f,"MachSpeed"],[d,h]],[/\btu_(1491) b/i],[l,[f,"Rotor"],[d,h]],[/(shield[\w ]+) b/i],[l,[f,"Nvidia"],[d,h]],[/(sprint) (\w+)/i],[f,l,[d,v]],[/(kin\.[onetw]{3})/i],[[l,/\./g," "],[f,_],[d,v]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[l,[f,B],[d,h]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[l,[f,B],[d,v]],[/smart-tv.+(samsung)/i],[f,[d,b]],[/hbbtv.+maple;(\d+)/i],[[l,/^/,"SmartTV"],[f,A],[d,b]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[f,P],[d,b]],[/(apple) ?tv/i],[f,[l,T+" TV"],[d,b]],[/crkey/i],[[l,x+"cast"],[f,O],[d,b]],[/droid.+aft(\w+)( bui|\))/i],[l,[f,S],[d,b]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[l,[f,D],[d,b]],[/(bravia[\w ]+)( bui|\))/i],[l,[f,j],[d,b]],[/(mitv-\w{5}) bui/i],[l,[f,R],[d,b]],[/Hbbtv.*(technisat) (.*);/i],[f,l,[d,b]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[f,H],[l,H],[d,b]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[d,b]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[f,l,[d,g]],[/droid.+; (shield) bui/i],[l,[f,"Nvidia"],[d,g]],[/(playstation [345portablevi]+)/i],[l,[f,j],[d,g]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[l,[f,_],[d,g]],[/\b(sm-[lr]\d\d[05][fnuw]?s?)\b/i],[l,[f,A],[d,w]],[/((pebble))app/i],[f,l,[d,w]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[l,[f,T],[d,w]],[/droid.+; (glass) \d/i],[l,[f,O],[d,w]],[/droid.+; (wt63?0{2,3})\)/i],[l,[f,B],[d,w]],[/droid.+; (glass) \d/i],[l,[f,O],[d,w]],[/(pico) (4|neo3(?: link|pro)?)/i],[f,l,[d,w]],[/; (quest( \d| pro)?)/i],[l,[f,U],[d,w]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[f,[d,y]],[/(aeobc)\b/i],[l,[f,S],[d,y]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[l,[d,v]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[l,[d,h]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[d,h]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[d,v]],[/(android[-\w\. ]{0,9});.+buil/i],[l,[f,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[p,[c,"EdgeHTML"]],[/(arkweb)\/([\w\.]+)/i],[c,p],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[p,[c,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[c,p],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[p,c]],os:[[/microsoft (windows) (vista|xp)/i],[c,p],[/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i],[c,[p,K,X]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[p,K,X],[c,"Windows"]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[p,/_/g,"."],[c,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[c,z],[p,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[p,c],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish|openharmony)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[c,p],[/\(bb(10);/i],[p,[c,I]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[p,[c,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[p,[c,L+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[p,[c,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[p,[c,"watchOS"]],[/crkey\/([\d\.]+)/i],[p,[c,x+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[c,F],p],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[c,p],[/(sunos) ?([\w\.\d]*)/i],[[c,"Solaris"],p],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[c,p]]},Z=function(e,t){if(typeof e===s&&(t=e,e=i),!(this instanceof Z))return new Z(e,t).getResult();var g=typeof n!==o&&n.navigator?n.navigator:i,b=e||(g&&g.userAgent?g.userAgent:""),w=g&&g.userAgentData?g.userAgentData:i,y=t?function(e,t){var n={};for(var i in e)t[i]&&t[i].length%2==0?n[i]=t[i].concat(e[i]):n[i]=e[i];return n}(J,t):J,S=g&&g.userAgent==b;return this.getBrowser=function(){var e,t={};return t[c]=i,t[p]=i,W.call(t,b,y.browser),t[u]=typeof(e=t[p])===a?e.replace(/[^\d\.]/g,"").split(".")[0]:i,S&&g&&g.brave&&typeof g.brave.isBrave==r&&(t[c]="Brave"),t},this.getCPU=function(){var e={};return e[m]=i,W.call(e,b,y.cpu),e},this.getDevice=function(){var e={};return e[f]=i,e[l]=i,e[d]=i,W.call(e,b,y.device),S&&!e[d]&&w&&w.mobile&&(e[d]=v),S&&"Macintosh"==e[l]&&g&&typeof g.standalone!==o&&g.maxTouchPoints&&g.maxTouchPoints>2&&(e[l]="iPad",e[d]=h),e},this.getEngine=function(){var e={};return e[c]=i,e[p]=i,W.call(e,b,y.engine),e},this.getOS=function(){var e={};return e[c]=i,e[p]=i,W.call(e,b,y.os),S&&!e[c]&&w&&w.platform&&"Unknown"!=w.platform&&(e[c]=w.platform.replace(/chrome os/i,F).replace(/macos/i,z)),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return b},this.setUA=function(e){return b=typeof e===a&&e.length>500?H(e,500):e,this},this.setUA(b),this};Z.VERSION="1.0.40",Z.BROWSER=$([c,p,u]),Z.CPU=$([m]),Z.DEVICE=$([l,f,d,g,v,b,h,w,y]),Z.ENGINE=Z.OS=$([c,p]),e.exports&&(t=e.exports=Z),t.UAParser=Z;var Y=typeof n!==o&&(n.jQuery||n.Zepto);if(Y&&!Y.ua){var Q=new Z;Y.ua=Q.getResult(),Y.ua.get=function(){return Q.getUA()},Y.ua.set=function(e){Q.setUA(e);var t=Q.getResult();for(var n in t)Y.ua[n]=t[n]}}}("object"==typeof window?window:he)}(ve,ve.exports)),ve.exports);const we=()=>{const e=new be.UAParser,{name:t,version:n}=e.getBrowser(),{name:i,version:r}=e.getOS(),o=e.getUA(),s=navigator.language,a=navigator.userAgent.includes("Mobi"),u=function(){if(!t||!n)return;if("userAgentData"in navigator&&navigator.userAgentData)return navigator.userAgentData.brands;return}();return{browser:{name:null!=t?t:me,version:null!=n?n:me,os:`${null!=i?i:me} ${null!=r?r:me}`,userAgent:null!=o?o:me,language:null!=s?s:me,mobile:a,brands:null!=u?u:me,viewportWidth:`${window.innerWidth}`,viewportHeight:`${window.innerHeight}`}}},ye=()=>({page:{url:location.href}}),Se=[we,ye];function Te(t){var n,i,r,o;return{id:null!==(o=null===(r=null===(i=null===(n=e.faro.config)||void 0===n?void 0:n.sessionTracking)||void 0===i?void 0:i.generateSessionId)||void 0===r?void 0:r.call(i))&&void 0!==o?o:P(),attributes:t}}const Ee={session:"sessionStorage",local:"localStorage"};function Ie(t){var n;try{let e;e=window[t];const n="__faro_storage_test__";return e.setItem(n,n),e.removeItem(n),!0}catch(i){return null===(n=e.faro.internalLogger)||void 0===n||n.info(`Web storage of type ${t} is not available. Reason: ${i}`),!1}}function ke(e,t){return Pe(t)?window[t].getItem(e):null}function xe(e,t,n){if(Pe(n))try{window[n].setItem(e,t)}catch(e){}}function Le(e,t){Pe(t)&&window[t].removeItem(e)}const Oe=Ie(Ee.local),Ce=Ie(Ee.session);function Pe(e){return e===Ee.local?Oe:e===Ee.session&&Ce}function _e(e,t){let n,i=!1;const r=()=>{null!=n?(e(...n),n=null,setTimeout(r,t)):i=!1};return(...o)=>{i?n=o:(e(...o),i=!0,setTimeout(r,t))}}function Ne(e={}){return JSON.stringify(null!=e?e:{},function(){const e=new WeakSet;return function(t,n){if("object"==typeof n&&null!==n){if(e.has(n))return null;e.add(n)}return n}}())}function Me(){var t,n,i;const r=e.faro.config.sessionTracking;let o=null!==(i=null!==(n=null===(t=null==r?void 0:r.sampler)||void 0===t?void 0:t.call(r,{metas:e.faro.metas.value}))&&void 0!==n?n:null==r?void 0:r.samplingRate)&&void 0!==i?i:1;if("number"!=typeof o){o=0}return Math.random()<o}const Ae="com.grafana.faro.session",De=144e5,je=9e5,Re=je,Be={enabled:!0,persistent:!1,maxSessionPersistenceTime:Re};function Ue({sessionId:t,started:n,lastActivity:i,isSampled:r=!0}={}){var o,s;const a=S(),u=null===(s=null===(o=e.faro.config)||void 0===o?void 0:o.sessionTracking)||void 0===s?void 0:s.generateSessionId;return null==t&&(t="function"==typeof u?u():P()),{sessionId:t,lastActivity:null!=i?i:a,started:null!=n?n:a,isSampled:r}}function Fe(e){if(null==e)return!1;const t=S();if(!(t-e.started<De))return!1;return t-e.lastActivity<je}function ze({fetchUserSession:t,storeUserSession:n}){return function({forceSessionExtend:i}={forceSessionExtend:!1}){var r,o,s;if(!t||!n)return;const a=e.faro.config.sessionTracking,u=null==a?void 0:a.persistent;if(u&&!Oe||!u&&!Ce)return;const l=t();if(!1===i&&Fe(l))n(Object.assign(Object.assign({},l),{lastActivity:S()}));else{let t=Ve(Ue({isSampled:Me()}),l);n(t),null===(r=e.faro.api)||void 0===r||r.setSession(t.sessionMeta),null===(o=null==a?void 0:a.onSessionChange)||void 0===o||o.call(a,null!==(s=null==l?void 0:l.sessionMeta)&&void 0!==s?s:null,t.sessionMeta)}}}function Ve(t,n){var i,r,o,s;return Object.assign(Object.assign({},t),{sessionMeta:{id:t.sessionId,attributes:Object.assign(Object.assign(Object.assign(Object.assign({},null===(r=null===(i=e.faro.config.sessionTracking)||void 0===i?void 0:i.session)||void 0===r?void 0:r.attributes),null!==(s=null===(o=e.faro.metas.value.session)||void 0===o?void 0:o.attributes)&&void 0!==s?s:{}),null!=n?{previousSession:n.sessionId}:{}),{isSampled:t.isSampled.toString()})}})}class $e{constructor(){this.updateSession=_e((()=>this.updateUserSession()),1e3),this.updateUserSession=ze({fetchUserSession:$e.fetchUserSession,storeUserSession:$e.storeUserSession}),this.init()}static removeUserSession(){Le(Ae,$e.storageTypeLocal)}static storeUserSession(e){xe(Ae,Ne(e),$e.storageTypeLocal)}static fetchUserSession(){const e=ke(Ae,$e.storageTypeLocal);return e?JSON.parse(e):null}init(){document.addEventListener("visibilitychange",(()=>{"visible"===document.visibilityState&&this.updateSession()})),e.faro.metas.addListener((function(t){const n=t.session,i=$e.fetchUserSession();if(n&&n.id!==(null==i?void 0:i.sessionId)){const t=Ve(Ue({sessionId:n.id,isSampled:Me()}),i);$e.storeUserSession(t),e.faro.api.setSession(t.sessionMeta)}}))}}$e.storageTypeLocal=Ee.local;class qe{constructor(){this.updateSession=_e((()=>this.updateUserSession()),1e3),this.updateUserSession=ze({fetchUserSession:qe.fetchUserSession,storeUserSession:qe.storeUserSession}),this.init()}static removeUserSession(){Le(Ae,qe.storageTypeSession)}static storeUserSession(e){xe(Ae,Ne(e),qe.storageTypeSession)}static fetchUserSession(){const e=ke(Ae,qe.storageTypeSession);return e?JSON.parse(e):null}init(){document.addEventListener("visibilitychange",(()=>{"visible"===document.visibilityState&&this.updateSession()})),e.faro.metas.addListener((function(t){const n=t.session,i=qe.fetchUserSession();if(n&&n.id!==(null==i?void 0:i.sessionId)){const t=Ve(Ue({sessionId:n.id,isSampled:Me()}),i);qe.storeUserSession(t),e.faro.api.setSession(t.sessionMeta)}}))}}function Ge(e){return(null==e?void 0:e.persistent)?$e:qe}qe.storageTypeSession=Ee.session;class He extends te{constructor(){super(...arguments),this.name="@grafana/faro-web-sdk:instrumentation-session",this.version=ne}sendSessionStartEvent(e){var t,n;const i=e.session;if(i&&i.id!==(null===(t=this.notifiedSession)||void 0===t?void 0:t.id)){if(this.notifiedSession&&this.notifiedSession.id===(null===(n=i.attributes)||void 0===n?void 0:n.previousSession))return this.api.pushEvent(pe,{},void 0,{skipDedupe:!0}),void(this.notifiedSession=i);this.notifiedSession=i,this.api.pushEvent(de,{},void 0,{skipDedupe:!0})}}createInitialSession(e,t){var n,i,r,o,s;let a,u,l=e.fetchUserSession();if(t.persistent&&t.maxSessionPersistenceTime&&l){const e=S();l.lastActivity<e-t.maxSessionPersistenceTime&&($e.removeUserSession(),l=null)}if(Fe(l)){const e=null==l?void 0:l.sessionId;u=Ue({sessionId:e,isSampled:l.isSampled||!1,started:null==l?void 0:l.started}),u.sessionMeta={id:e,attributes:Object.assign(Object.assign(Object.assign({},null===(n=t.session)||void 0===n?void 0:n.attributes),null===(i=null==l?void 0:l.sessionMeta)||void 0===i?void 0:i.attributes),{isSampled:u.isSampled.toString()})},a=fe}else{const e=null!==(o=null===(r=t.session)||void 0===r?void 0:r.id)&&void 0!==o?o:Te().id;u=Ue({sessionId:e,isSampled:Me()}),u.sessionMeta={id:e,attributes:Object.assign({isSampled:u.isSampled.toString()},null===(s=t.session)||void 0===s?void 0:s.attributes)},a=de}return{initialSession:u,lifecycleType:a}}registerBeforeSendHook(e){var t;const{updateSession:n}=new e;null===(t=this.transports)||void 0===t||t.addBeforeSendHooks((e=>{var t,i,r;n();const o=null===(t=e.meta.session)||void 0===t?void 0:t.attributes;if(o&&"true"===(null==o?void 0:o.isSampled)){let t=JSON.parse(JSON.stringify(e));const n=null===(i=t.meta.session)||void 0===i?void 0:i.attributes;return null==n||delete n.isSampled,0===Object.keys(null!=n?n:{}).length&&(null===(r=t.meta.session)||void 0===r||delete r.attributes),t}return null}))}initialize(){this.logDebug("init session instrumentation");const e=this.config.sessionTracking;if(null==e?void 0:e.enabled){const t=Ge(e);this.registerBeforeSendHook(t);const{initialSession:n,lifecycleType:i}=this.createInitialSession(t,e);t.storeUserSession(n);const r=n.sessionMeta;this.notifiedSession=r,this.api.setSession(r),i===de&&this.api.pushEvent(de,{},void 0,{skipDedupe:!0}),i===fe&&this.api.pushEvent(fe,{},void 0,{skipDedupe:!0})}this.metas.addListener(this.sendSessionStartEvent.bind(this))}}class We extends te{constructor(e={}){super(),this.options=e,this.name="@grafana/faro-web-sdk:instrumentation-console",this.version=ne}initialize(){this.logDebug("Initializing\n",this.options),this.options=Object.assign(Object.assign({},this.options),this.config.consoleInstrumentation),x.filter((e=>{var t,n;return!(null!==(n=null===(t=this.options)||void 0===t?void 0:t.disabledLevels)&&void 0!==n?n:We.defaultDisabledLevels).includes(e)})).forEach((t=>{console[t]=(...n)=>{var i;try{t!==e.LogLevel.ERROR||(null===(i=this.options)||void 0===i?void 0:i.consoleErrorAsLog)?this.api.pushLog(n,{level:t}):this.api.pushError(new Error("console.error: "+Q(n)))}catch(e){this.logError(e)}finally{this.unpatchedConsole[t](...n)}}}))}}We.defaultDisabledLevels=[e.LogLevel.DEBUG,e.LogLevel.TRACE,e.LogLevel.LOG];const Ke="DOMError",Xe="DOMException",Je="Non-Error exception captured with keys:",Ze=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i,Ye="\n",Qe="eval",et="?",tt="@",nt=/^\s*at (?:(.*\).*?|.*?) ?\((?:address at )?)?((?:file|https?|blob|chrome-extension|address|native|eval|webpack|<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,it=/\((\S*)(?::(\d+))(?::(\d+))\)/,rt="eval",ot="address at ",st=ot.length,at=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension|safari-extension|safari-web-extension|capacitor)?:\/.*?|\[native code]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,ut=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,lt=" > eval",ct="safari-extension",dt="safari-web-extension",ft=/Minified React error #\d+;/i;function pt(e,t,n,i){const r={filename:e||document.location.href,function:t||et};return void 0!==n&&(r.lineno=n),void 0!==i&&(r.colno=i),r}function mt(e,t){const n=null==e?void 0:e.includes(ct),i=!n&&(null==e?void 0:e.includes(dt));return n||i?[(null==e?void 0:e.includes(tt))?e.split(tt)[0]:e,n?`${ct}:${t}`:`${dt}:${t}`]:[e,t]}function gt(e){let t=[];e.stacktrace?t=e.stacktrace.split(Ye).filter(((e,t)=>t%2==0)):e.stack&&(t=e.stack.split(Ye));const n=t.reduce(((t,n,i)=>{let r,o,a,u,l;if(r=nt.exec(n)){if(o=r[1],a=r[2],u=r[3],l=r[4],null==a?void 0:a.startsWith(rt)){const e=it.exec(a);e&&(a=e[1],u=e[2],l=e[3])}a=(null==a?void 0:a.startsWith(ot))?a.substring(st):a,[o,a]=mt(o,a)}else if(r=at.exec(n)){if(o=r[1],a=r[3],u=r[4],l=r[5],a&&a.includes(lt)){const e=ut.exec(a);e&&(o=o||Qe,a=e[1],u=e[2])}else 0===i&&!l&&s(e.columnNumber)&&(l=String(e.columnNumber+1));[o,a]=mt(o,a)}return(a||o)&&t.push(pt(a,o,u?Number(u):void 0,l?Number(l):void 0)),t}),[]);return ft.test(e.message)?n.slice(1):n}function vt(e){return{frames:gt(e)}}function ht(e){let t,n,i,r,o=[];if(g(e)&&e.error)t=e.error.message,n=e.error.name,o=gt(e.error);else if((i=v(e))||h(e)){const{name:r,message:o}=e;n=null!=r?r:i?Ke:Xe,t=o?`${n}: ${o}`:n}else m(e)?(t=e.message,o=gt(e)):(a(e)||(r=f(e)))&&(n=r?e.constructor.name:void 0,t=`${Je} ${Object.keys(e)}`);return[t,n,o]}function bt(e){const t=window.onerror;window.onerror=(...n)=>{try{const[t,i,r,s,a]=n;let u,l,c=[];const d=o(t),f=pt(i,"?",r,s);a||!d?([u,l,c]=ht(null!=a?a:t),0===c.length&&(c=[f])):d&&([u,l]=function(e){var t,n;const i=e.match(Ze),r=null!==(t=null==i?void 0:i[1])&&void 0!==t?t:J;return[null!==(n=null==i?void 0:i[2])&&void 0!==n?n:e,r]}(t),c=[f]),u&&e.pushError(new Error(u),{type:l,stackFrames:c})}finally{null==t||t.apply(window,n)}}}class wt extends te{constructor(){super(...arguments),this.name="@grafana/faro-web-sdk:instrumentation-errors",this.version=ne}initialize(){var e;this.logDebug("Initializing"),bt(this.api),e=this.api,window.addEventListener("unhandledrejection",(t=>{var n,i;let r,o,s=t;s.reason?s=t.reason:(null===(n=t.detail)||void 0===n?void 0:n.reason)&&(s=null===(i=t.detail)||void 0===i?void 0:i.reason);let a=[];c(s)?(r=`Non-Error promise rejection captured with value: ${String(s)}`,o="UnhandledRejection"):[r,o,a]=ht(s),r&&e.pushError(new Error(r),{type:o,stackFrames:a})}))}}class yt extends te{constructor(){super(...arguments),this.name="@grafana/faro-web-sdk:instrumentation-view",this.version=ne}sendViewChangedEvent(e){var t,n,i,r;const o=e.view;o&&o.name!==(null===(t=this.notifiedView)||void 0===t?void 0:t.name)&&(this.api.pushEvent(ce,{fromView:null!==(i=null===(n=this.notifiedView)||void 0===n?void 0:n.name)&&void 0!==i?i:me,toView:null!==(r=o.name)&&void 0!==r?r:me},void 0,{skipDedupe:!0}),this.notifiedView=o)}initialize(){this.metas.addListener(this.sendViewChangedEvent.bind(this))}}var St,Tt,Et,It,kt,xt=-1,Lt=function(e){addEventListener("pageshow",(function(t){t.persisted&&(xt=t.timeStamp,e(t))}),!0)},Ot=function(){var e=self.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},Ct=function(){var e=Ot();return e&&e.activationStart||0},Pt=function(e,t){var n=Ot(),i="navigate";return xt>=0?i="back-forward-cache":n&&(document.prerendering||Ct()>0?i="prerender":document.wasDiscarded?i="restore":n.type&&(i=n.type.replace(/_/g,"-"))),{name:e,value:void 0===t?-1:t,rating:"good",delta:0,entries:[],id:"v4-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:i}},_t=function(e,t,n){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){var i=new PerformanceObserver((function(e){Promise.resolve().then((function(){t(e.getEntries())}))}));return i.observe(Object.assign({type:e,buffered:!0},n||{})),i}}catch(e){}},Nt=function(e,t,n,i){var r,o;return function(s){t.value>=0&&(s||i)&&((o=t.value-(r||0))||void 0===r)&&(r=t.value,t.delta=o,t.rating=function(e,t){return e>t[1]?"poor":e>t[0]?"needs-improvement":"good"}(t.value,n),e(t))}},Mt=function(e){requestAnimationFrame((function(){return requestAnimationFrame((function(){return e()}))}))},At=function(e){document.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&e()}))},Dt=function(e){var t=!1;return function(){t||(e(),t=!0)}},jt=-1,Rt=function(){return"hidden"!==document.visibilityState||document.prerendering?1/0:0},Bt=function(e){"hidden"===document.visibilityState&&jt>-1&&(jt="visibilitychange"===e.type?e.timeStamp:0,Ft())},Ut=function(){addEventListener("visibilitychange",Bt,!0),addEventListener("prerenderingchange",Bt,!0)},Ft=function(){removeEventListener("visibilitychange",Bt,!0),removeEventListener("prerenderingchange",Bt,!0)},zt=function(){return jt<0&&(jt=Rt(),Ut(),Lt((function(){setTimeout((function(){jt=Rt(),Ut()}),0)}))),{get firstHiddenTime(){return jt}}},Vt=function(e){document.prerendering?addEventListener("prerenderingchange",(function(){return e()}),!0):e()},$t=[1800,3e3],qt=function(e,t){t=t||{},Vt((function(){var n,i=zt(),r=Pt("FCP"),o=_t("paint",(function(e){e.forEach((function(e){"first-contentful-paint"===e.name&&(o.disconnect(),e.startTime<i.firstHiddenTime&&(r.value=Math.max(e.startTime-Ct(),0),r.entries.push(e),n(!0)))}))}));o&&(n=Nt(e,r,$t,t.reportAllChanges),Lt((function(i){r=Pt("FCP"),n=Nt(e,r,$t,t.reportAllChanges),Mt((function(){r.value=performance.now()-i.timeStamp,n(!0)}))})))}))},Gt=[.1,.25],Ht=0,Wt=1/0,Kt=0,Xt=function(e){e.forEach((function(e){e.interactionId&&(Wt=Math.min(Wt,e.interactionId),Kt=Math.max(Kt,e.interactionId),Ht=Kt?(Kt-Wt)/7+1:0)}))},Jt=[],Zt=new Map,Yt=0,Qt=[],en=function(e){if(Qt.forEach((function(t){return t(e)})),e.interactionId||"first-input"===e.entryType){var t=Jt[Jt.length-1],n=Zt.get(e.interactionId);if(n||Jt.length<10||e.duration>t.latency){if(n)e.duration>n.latency?(n.entries=[e],n.latency=e.duration):e.duration===n.latency&&e.startTime===n.entries[0].startTime&&n.entries.push(e);else{var i={id:e.interactionId,latency:e.duration,entries:[e]};Zt.set(i.id,i),Jt.push(i)}Jt.sort((function(e,t){return t.latency-e.latency})),Jt.length>10&&Jt.splice(10).forEach((function(e){return Zt.delete(e.id)}))}}},tn=[200,500],nn=[2500,4e3],rn={},on=[800,1800],sn=function e(t){document.prerendering?Vt((function(){return e(t)})):"complete"!==document.readyState?addEventListener("load",(function(){return e(t)}),!0):setTimeout(t,0)},an={passive:!0,capture:!0},un=new Date,ln=function(e,t){Tt||(Tt=t,Et=e,It=new Date,fn(removeEventListener),cn())},cn=function(){if(Et>=0&&Et<It-un){var e={entryType:"first-input",name:Tt.type,target:Tt.target,cancelable:Tt.cancelable,startTime:Tt.timeStamp,processingStart:Tt.timeStamp+Et};kt.forEach((function(t){t(e)})),kt=[]}},dn=function(e){if(e.cancelable){var t=(e.timeStamp>1e12?new Date:performance.now())-e.timeStamp;"pointerdown"==e.type?function(e,t){var n=function(){ln(e,t),r()},i=function(){r()},r=function(){removeEventListener("pointerup",n,an),removeEventListener("pointercancel",i,an)};addEventListener("pointerup",n,an),addEventListener("pointercancel",i,an)}(t,e):ln(t,e)}},fn=function(e){["mousedown","keydown","touchstart","pointerdown"].forEach((function(t){return e(t,dn,an)}))},pn=[100,300];class mn{constructor(e){this.pushMeasurement=e}initialize(){Object.entries(mn.mapping).forEach((([e,t])=>{t((t=>{this.pushMeasurement({type:"web-vitals",values:{[e]:t.value}})}))}))}}mn.mapping={cls:function(e,t){t=t||{},qt(Dt((function(){var n,i=Pt("CLS",0),r=0,o=[],s=function(e){e.forEach((function(e){if(!e.hadRecentInput){var t=o[0],n=o[o.length-1];r&&e.startTime-n.startTime<1e3&&e.startTime-t.startTime<5e3?(r+=e.value,o.push(e)):(r=e.value,o=[e])}})),r>i.value&&(i.value=r,i.entries=o,n())},a=_t("layout-shift",s);a&&(n=Nt(e,i,Gt,t.reportAllChanges),At((function(){s(a.takeRecords()),n(!0)})),Lt((function(){r=0,i=Pt("CLS",0),n=Nt(e,i,Gt,t.reportAllChanges),Mt((function(){return n()}))})),setTimeout(n,0))})))},fcp:qt,fid:function(e,t){t=t||{},Vt((function(){var n,i=zt(),r=Pt("FID"),o=function(e){e.startTime<i.firstHiddenTime&&(r.value=e.processingStart-e.startTime,r.entries.push(e),n(!0))},s=function(e){e.forEach(o)},a=_t("first-input",s);n=Nt(e,r,pn,t.reportAllChanges),a&&(At(Dt((function(){s(a.takeRecords()),a.disconnect()}))),Lt((function(){var i;r=Pt("FID"),n=Nt(e,r,pn,t.reportAllChanges),kt=[],Et=-1,Tt=null,fn(addEventListener),i=o,kt.push(i),cn()})))}))},inp:function(e,t){t=t||{},Vt((function(){var n;"interactionCount"in performance||St||(St=_t("event",Xt,{type:"event",buffered:!0,durationThreshold:0}));var i,r=Pt("INP"),o=function(e){e.forEach(en);var t,n=(t=Math.min(Jt.length-1,Math.floor(((St?Ht:performance.interactionCount||0)-Yt)/50)),Jt[t]);n&&n.latency!==r.value&&(r.value=n.latency,r.entries=n.entries,i())},s=_t("event",o,{durationThreshold:null!==(n=t.durationThreshold)&&void 0!==n?n:40});i=Nt(e,r,tn,t.reportAllChanges),s&&("PerformanceEventTiming"in self&&"interactionId"in PerformanceEventTiming.prototype&&s.observe({type:"first-input",buffered:!0}),At((function(){o(s.takeRecords()),i(!0)})),Lt((function(){Yt=0,Jt.length=0,Zt.clear(),r=Pt("INP"),i=Nt(e,r,tn,t.reportAllChanges)})))}))},lcp:function(e,t){t=t||{},Vt((function(){var n,i=zt(),r=Pt("LCP"),o=function(e){t.reportAllChanges||(e=e.slice(-1)),e.forEach((function(e){e.startTime<i.firstHiddenTime&&(r.value=Math.max(e.startTime-Ct(),0),r.entries=[e],n())}))},s=_t("largest-contentful-paint",o);if(s){n=Nt(e,r,nn,t.reportAllChanges);var a=Dt((function(){rn[r.id]||(o(s.takeRecords()),s.disconnect(),rn[r.id]=!0,n(!0))}));["keydown","click"].forEach((function(e){addEventListener(e,(function(){return e=a,t=self.requestIdleCallback||self.setTimeout,n=-1,e=Dt(e),"hidden"===document.visibilityState?e():(n=t(e),At(e)),n;var e,t,n}),!0)})),At(a),Lt((function(i){r=Pt("LCP"),n=Nt(e,r,nn,t.reportAllChanges),Mt((function(){r.value=performance.now()-i.timeStamp,rn[r.id]=!0,n(!0)}))}))}}))},ttfb:function(e,t){t=t||{};var n=Pt("TTFB"),i=Nt(e,n,on,t.reportAllChanges);sn((function(){var r=Ot();r&&(n.value=Math.max(r.responseStart-Ct(),0),n.entries=[r],i(!0),Lt((function(){n=Pt("TTFB",0),(i=Nt(e,n,on,t.reportAllChanges))(!0)})))}))}};var gn,vn,hn=function(){var e=self.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},bn=function(e){if("loading"===document.readyState)return"loading";var t=hn();if(t){if(e<t.domInteractive)return"loading";if(0===t.domContentLoadedEventStart||e<t.domContentLoadedEventStart)return"dom-interactive";if(0===t.domComplete||e<t.domComplete)return"dom-content-loaded"}return"complete"},wn=function(e){var t=e.nodeName;return 1===e.nodeType?t.toLowerCase():t.toUpperCase().replace(/^#/,"")},yn=function(e,t){var n="";try{for(;e&&9!==e.nodeType;){var i=e,r=i.id?"#"+i.id:wn(i)+(i.classList&&i.classList.value&&i.classList.value.trim()&&i.classList.value.trim().length?"."+i.classList.value.trim().replace(/\s+/g,"."):"");if(n.length+r.length>(t||100)-1)return n||r;if(n=n?r+">"+n:r,i.id)break;e=i.parentNode}}catch(e){}return n},Sn=-1,Tn=function(){return Sn},En=function(e){addEventListener("pageshow",(function(t){t.persisted&&(Sn=t.timeStamp,e(t))}),!0)},In=function(){var e=hn();return e&&e.activationStart||0},kn=function(e,t){var n=hn(),i="navigate";return Tn()>=0?i="back-forward-cache":n&&(document.prerendering||In()>0?i="prerender":document.wasDiscarded?i="restore":n.type&&(i=n.type.replace(/_/g,"-"))),{name:e,value:void 0===t?-1:t,rating:"good",delta:0,entries:[],id:"v4-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:i}},xn=function(e,t,n){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){var i=new PerformanceObserver((function(e){Promise.resolve().then((function(){t(e.getEntries())}))}));return i.observe(Object.assign({type:e,buffered:!0},n||{})),i}}catch(e){}},Ln=function(e,t,n,i){var r,o;return function(s){t.value>=0&&(s||i)&&((o=t.value-(r||0))||void 0===r)&&(r=t.value,t.delta=o,t.rating=function(e,t){return e>t[1]?"poor":e>t[0]?"needs-improvement":"good"}(t.value,n),e(t))}},On=function(e){requestAnimationFrame((function(){return requestAnimationFrame((function(){return e()}))}))},Cn=function(e){document.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&e()}))},Pn=function(e){var t=!1;return function(){t||(e(),t=!0)}},_n=-1,Nn=function(){return"hidden"!==document.visibilityState||document.prerendering?1/0:0},Mn=function(e){"hidden"===document.visibilityState&&_n>-1&&(_n="visibilitychange"===e.type?e.timeStamp:0,Dn())},An=function(){addEventListener("visibilitychange",Mn,!0),addEventListener("prerenderingchange",Mn,!0)},Dn=function(){removeEventListener("visibilitychange",Mn,!0),removeEventListener("prerenderingchange",Mn,!0)},jn=function(){return _n<0&&(_n=Nn(),An(),En((function(){setTimeout((function(){_n=Nn(),An()}),0)}))),{get firstHiddenTime(){return _n}}},Rn=function(e){document.prerendering?addEventListener("prerenderingchange",(function(){return e()}),!0):e()},Bn=[1800,3e3],Un=function(e,t){t=t||{},Rn((function(){var n,i=jn(),r=kn("FCP"),o=xn("paint",(function(e){e.forEach((function(e){"first-contentful-paint"===e.name&&(o.disconnect(),e.startTime<i.firstHiddenTime&&(r.value=Math.max(e.startTime-In(),0),r.entries.push(e),n(!0)))}))}));o&&(n=Ln(e,r,Bn,t.reportAllChanges),En((function(i){r=kn("FCP"),n=Ln(e,r,Bn,t.reportAllChanges),On((function(){r.value=performance.now()-i.timeStamp,n(!0)}))})))}))},Fn=[.1,.25],zn=0,Vn=1/0,$n=0,qn=function(e){e.forEach((function(e){e.interactionId&&(Vn=Math.min(Vn,e.interactionId),$n=Math.max($n,e.interactionId),zn=$n?($n-Vn)/7+1:0)}))},Gn=function(){"interactionCount"in performance||gn||(gn=xn("event",qn,{type:"event",buffered:!0,durationThreshold:0}))},Hn=[],Wn=new Map,Kn=0,Xn=function(){return(gn?zn:performance.interactionCount||0)-Kn},Jn=[],Zn=function(e){if(Jn.forEach((function(t){return t(e)})),e.interactionId||"first-input"===e.entryType){var t=Hn[Hn.length-1],n=Wn.get(e.interactionId);if(n||Hn.length<10||e.duration>t.latency){if(n)e.duration>n.latency?(n.entries=[e],n.latency=e.duration):e.duration===n.latency&&e.startTime===n.entries[0].startTime&&n.entries.push(e);else{var i={id:e.interactionId,latency:e.duration,entries:[e]};Wn.set(i.id,i),Hn.push(i)}Hn.sort((function(e,t){return t.latency-e.latency})),Hn.length>10&&Hn.splice(10).forEach((function(e){return Wn.delete(e.id)}))}}},Yn=function(e){var t=self.requestIdleCallback||self.setTimeout,n=-1;return e=Pn(e),"hidden"===document.visibilityState?e():(n=t(e),Cn(e)),n},Qn=[200,500],ei=[],ti=new Map,ni=[],ii=new WeakMap,ri=new Map,oi=-1,si=function(e){e.forEach((function(e){return ei.push(e)}))},ai=function(){ri.size>10&&ri.forEach((function(e,t){Wn.has(t)||ri.delete(t)})),ni=ni.slice(-50);var e=new Set(ni.concat(Hn.map((function(e){return ii.get(e.entries[0])}))));ti.forEach((function(t,n){e.has(n)||ti.delete(n)}));var t=new Set;ti.forEach((function(e){fi(e.startTime,e.processingEnd).forEach((function(e){t.add(e)}))})),ei=Array.from(t),oi=-1};Jn.push((function(e){e.interactionId&&e.target&&!ri.has(e.interactionId)&&ri.set(e.interactionId,e.target)}),(function(e){for(var t,n=e.startTime+e.duration,i=ni.length-1;i>=0;i--)if(t=ni[i],Math.abs(n-t)<=8){var r=ti.get(t);r.startTime=Math.min(e.startTime,r.startTime),r.processingStart=Math.min(e.processingStart,r.processingStart),r.processingEnd=Math.max(e.processingEnd,r.processingEnd),r.entries.push(e),n=t;break}n!==t&&(ni.push(n),ti.set(n,{startTime:e.startTime,processingStart:e.processingStart,processingEnd:e.processingEnd,entries:[e]})),(e.interactionId||"first-input"===e.entryType)&&ii.set(e,n)}),(function(){oi<0&&(oi=Yn(ai))}));var ui,li,ci,di,fi=function(e,t){for(var n,i=[],r=0;n=ei[r];r++)if(!(n.startTime+n.duration<e)){if(n.startTime>t)break;i.push(n)}return i},pi=function(e,t){vn||(vn=xn("long-animation-frame",si)),function(e,t){t=t||{},Rn((function(){var n;Gn();var i,r=kn("INP"),o=function(e){e.forEach(Zn);var t,n=(t=Math.min(Hn.length-1,Math.floor(Xn()/50)),Hn[t]);n&&n.latency!==r.value&&(r.value=n.latency,r.entries=n.entries,i())},s=xn("event",o,{durationThreshold:null!==(n=t.durationThreshold)&&void 0!==n?n:40});i=Ln(e,r,Qn,t.reportAllChanges),s&&("PerformanceEventTiming"in self&&"interactionId"in PerformanceEventTiming.prototype&&s.observe({type:"first-input",buffered:!0}),Cn((function(){o(s.takeRecords()),i(!0)})),En((function(){Kn=0,Hn.length=0,Wn.clear(),r=kn("INP"),i=Ln(e,r,Qn,t.reportAllChanges)})))}))}((function(t){Yn((function(){var n=function(e){var t=e.entries[0],n=ii.get(t),i=ti.get(n),r=t.processingStart,o=i.processingEnd,s=i.entries.sort((function(e,t){return e.processingStart-t.processingStart})),a=fi(t.startTime,o),u=e.entries.find((function(e){return e.target})),l=u&&u.target||ri.get(t.interactionId),c=[t.startTime+t.duration,o].concat(a.map((function(e){return e.startTime+e.duration}))),d=Math.max.apply(Math,c),f={interactionTarget:yn(l),interactionTargetElement:l,interactionType:t.name.startsWith("key")?"keyboard":"pointer",interactionTime:t.startTime,nextPaintTime:d,processedEventEntries:s,longAnimationFrameEntries:a,inputDelay:r-t.startTime,processingDuration:o-r,presentationDelay:Math.max(d-o,0),loadState:bn(t.startTime)};return Object.assign(e,{attribution:f})}(t);e(n)}))}),t)},mi=[2500,4e3],gi={},vi=[800,1800],hi=function e(t){document.prerendering?Rn((function(){return e(t)})):"complete"!==document.readyState?addEventListener("load",(function(){return e(t)}),!0):setTimeout(t,0)},bi=function(e,t){t=t||{};var n=kn("TTFB"),i=Ln(e,n,vi,t.reportAllChanges);hi((function(){var r=hn();r&&(n.value=Math.max(r.responseStart-In(),0),n.entries=[r],i(!0),En((function(){n=kn("TTFB",0),(i=Ln(e,n,vi,t.reportAllChanges))(!0)})))}))},wi={passive:!0,capture:!0},yi=new Date,Si=function(e,t){ui||(ui=t,li=e,ci=new Date,Ii(removeEventListener),Ti())},Ti=function(){if(li>=0&&li<ci-yi){var e={entryType:"first-input",name:ui.type,target:ui.target,cancelable:ui.cancelable,startTime:ui.timeStamp,processingStart:ui.timeStamp+li};di.forEach((function(t){t(e)})),di=[]}},Ei=function(e){if(e.cancelable){var t=(e.timeStamp>1e12?new Date:performance.now())-e.timeStamp;"pointerdown"==e.type?function(e,t){var n=function(){Si(e,t),r()},i=function(){r()},r=function(){removeEventListener("pointerup",n,wi),removeEventListener("pointercancel",i,wi)};addEventListener("pointerup",n,wi),addEventListener("pointercancel",i,wi)}(t,e):Si(t,e)}},Ii=function(e){["mousedown","keydown","touchstart","pointerdown"].forEach((function(t){return e(t,Ei,wi)}))},ki=[100,300],xi=function(e,t){!function(e,t){t=t||{},Rn((function(){var n,i=jn(),r=kn("FID"),o=function(e){e.startTime<i.firstHiddenTime&&(r.value=e.processingStart-e.startTime,r.entries.push(e),n(!0))},s=function(e){e.forEach(o)},a=xn("first-input",s);n=Ln(e,r,ki,t.reportAllChanges),a&&(Cn(Pn((function(){s(a.takeRecords()),a.disconnect()}))),En((function(){var i;r=kn("FID"),n=Ln(e,r,ki,t.reportAllChanges),di=[],li=-1,ui=null,Ii(addEventListener),i=o,di.push(i),Ti()})))}))}((function(t){var n=function(e){var t=e.entries[0],n={eventTarget:yn(t.target),eventType:t.name,eventTime:t.startTime,eventEntry:t,loadState:bn(t.startTime)};return Object.assign(e,{attribution:n})}(t);e(n)}),t)};const Li="com.grafana.faro.lastNavigationId",Oi="load_state",Ci="time_to_first_byte";class Pi{constructor(e){this.corePushMeasurement=e}initialize(){this.measureCLS(),this.measureFCP(),this.measureFID(),this.measureINP(),this.measureLCP(),this.measureTTFB()}measureCLS(){!function(e,t){!function(e,t){t=t||{},Un(Pn((function(){var n,i=kn("CLS",0),r=0,o=[],s=function(e){e.forEach((function(e){if(!e.hadRecentInput){var t=o[0],n=o[o.length-1];r&&e.startTime-n.startTime<1e3&&e.startTime-t.startTime<5e3?(r+=e.value,o.push(e)):(r=e.value,o=[e])}})),r>i.value&&(i.value=r,i.entries=o,n())},a=xn("layout-shift",s);a&&(n=Ln(e,i,Fn,t.reportAllChanges),Cn((function(){s(a.takeRecords()),n(!0)})),En((function(){r=0,i=kn("CLS",0),n=Ln(e,i,Fn,t.reportAllChanges),On((function(){return n()}))})),setTimeout(n,0))})))}((function(t){var n=function(e){var t,n={};if(e.entries.length){var i=e.entries.reduce((function(e,t){return e&&e.value>t.value?e:t}));if(i&&i.sources&&i.sources.length){var r=(t=i.sources).find((function(e){return e.node&&1===e.node.nodeType}))||t[0];r&&(n={largestShiftTarget:yn(r.node),largestShiftTime:i.startTime,largestShiftValue:i.value,largestShiftSource:r,largestShiftEntry:i,loadState:bn(i.startTime)})}}return Object.assign(e,{attribution:n})}(t);e(n)}),t)}((e=>{const{loadState:t,largestShiftValue:n,largestShiftTime:i,largestShiftTarget:r}=e.attribution,o=this.buildInitialValues(e);this.addIfPresent(o,"largest_shift_value",n),this.addIfPresent(o,"largest_shift_time",i);const s=this.buildInitialContext(e);this.addIfPresent(s,Oi,t),this.addIfPresent(s,"largest_shift_target",r),this.pushMeasurement(o,s)}))}measureFCP(){!function(e,t){Un((function(t){var n=function(e){var t={timeToFirstByte:0,firstByteToFCP:e.value,loadState:bn(Tn())};if(e.entries.length){var n=hn(),i=e.entries[e.entries.length-1];if(n){var r=n.activationStart||0,o=Math.max(0,n.responseStart-r);t={timeToFirstByte:o,firstByteToFCP:e.value-o,loadState:bn(e.entries[0].startTime),navigationEntry:n,fcpEntry:i}}}return Object.assign(e,{attribution:t})}(t);e(n)}),t)}((e=>{const{firstByteToFCP:t,timeToFirstByte:n,loadState:i}=e.attribution,r=this.buildInitialValues(e);this.addIfPresent(r,"first_byte_to_fcp",t),this.addIfPresent(r,Ci,n);const o=this.buildInitialContext(e);this.addIfPresent(o,Oi,i),this.pushMeasurement(r,o)}))}measureFID(){xi((e=>{const{eventTime:t,eventTarget:n,eventType:i,loadState:r}=e.attribution,o=this.buildInitialValues(e);this.addIfPresent(o,"event_time",t);const s=this.buildInitialContext(e);this.addIfPresent(s,"event_target",n),this.addIfPresent(s,"event_type",i),this.addIfPresent(s,Oi,r),this.pushMeasurement(o,s)}))}measureINP(){pi((e=>{const{interactionTime:t,presentationDelay:n,inputDelay:i,processingDuration:r,nextPaintTime:o,loadState:s,interactionTarget:a,interactionType:u}=e.attribution,l=this.buildInitialValues(e);this.addIfPresent(l,"interaction_time",t),this.addIfPresent(l,"presentation_delay",n),this.addIfPresent(l,"input_delay",i),this.addIfPresent(l,"processing_duration",r),this.addIfPresent(l,"next_paint_time",o);const c=this.buildInitialContext(e);this.addIfPresent(c,Oi,s),this.addIfPresent(c,"interaction_target",a),this.addIfPresent(c,"interaction_type",u),this.pushMeasurement(l,c)}))}measureLCP(){!function(e,t){!function(e,t){t=t||{},Rn((function(){var n,i=jn(),r=kn("LCP"),o=function(e){t.reportAllChanges||(e=e.slice(-1)),e.forEach((function(e){e.startTime<i.firstHiddenTime&&(r.value=Math.max(e.startTime-In(),0),r.entries=[e],n())}))},s=xn("largest-contentful-paint",o);if(s){n=Ln(e,r,mi,t.reportAllChanges);var a=Pn((function(){gi[r.id]||(o(s.takeRecords()),s.disconnect(),gi[r.id]=!0,n(!0))}));["keydown","click"].forEach((function(e){addEventListener(e,(function(){return Yn(a)}),!0)})),Cn(a),En((function(i){r=kn("LCP"),n=Ln(e,r,mi,t.reportAllChanges),On((function(){r.value=performance.now()-i.timeStamp,gi[r.id]=!0,n(!0)}))}))}}))}((function(t){var n=function(e){var t={timeToFirstByte:0,resourceLoadDelay:0,resourceLoadDuration:0,elementRenderDelay:e.value};if(e.entries.length){var n=hn();if(n){var i=n.activationStart||0,r=e.entries[e.entries.length-1],o=r.url&&performance.getEntriesByType("resource").filter((function(e){return e.name===r.url}))[0],s=Math.max(0,n.responseStart-i),a=Math.max(s,o?(o.requestStart||o.startTime)-i:0),u=Math.max(a,o?o.responseEnd-i:0),l=Math.max(u,r.startTime-i);t={element:yn(r.element),timeToFirstByte:s,resourceLoadDelay:a-s,resourceLoadDuration:u-a,elementRenderDelay:l-u,navigationEntry:n,lcpEntry:r},r.url&&(t.url=r.url),o&&(t.lcpResourceEntry=o)}}return Object.assign(e,{attribution:t})}(t);e(n)}),t)}((e=>{const{elementRenderDelay:t,resourceLoadDelay:n,resourceLoadDuration:i,timeToFirstByte:r,element:o}=e.attribution,s=this.buildInitialValues(e);this.addIfPresent(s,"element_render_delay",t),this.addIfPresent(s,"resource_load_delay",n),this.addIfPresent(s,"resource_load_duration",i),this.addIfPresent(s,Ci,r);const a=this.buildInitialContext(e);this.addIfPresent(a,"element",o),this.pushMeasurement(s,a)}))}measureTTFB(){!function(e,t){bi((function(t){var n=function(e){var t={waitingDuration:0,cacheDuration:0,dnsDuration:0,connectionDuration:0,requestDuration:0};if(e.entries.length){var n=e.entries[0],i=n.activationStart||0,r=Math.max((n.workerStart||n.fetchStart)-i,0),o=Math.max(n.domainLookupStart-i,0),s=Math.max(n.connectStart-i,0),a=Math.max(n.connectEnd-i,0);t={waitingDuration:r,cacheDuration:o-r,dnsDuration:s-o,connectionDuration:a-s,requestDuration:e.value-a,navigationEntry:n}}return Object.assign(e,{attribution:t})}(t);e(n)}),t)}((e=>{const{dnsDuration:t,connectionDuration:n,requestDuration:i,waitingDuration:r,cacheDuration:o}=e.attribution,s=this.buildInitialValues(e);this.addIfPresent(s,"dns_duration",t),this.addIfPresent(s,"connection_duration",n),this.addIfPresent(s,"request_duration",i),this.addIfPresent(s,"waiting_duration",r),this.addIfPresent(s,"cache_duration",o);const a=this.buildInitialContext(e);this.pushMeasurement(s,a)}))}buildInitialValues(e){const t=e.name.toLowerCase();return{[t]:e.value,delta:e.delta}}buildInitialContext(e){var t;const n=null!==(t=ke(Li,Ee.session))&&void 0!==t?t:me;return{id:e.id,rating:e.rating,navigation_type:e.navigationType,navigation_entry_id:n}}pushMeasurement(e,t){this.corePushMeasurement({type:"web-vitals",values:e},{context:t})}addIfPresent(e,t,n){n&&(e[t]=n)}}class _i extends te{constructor(){super(...arguments),this.name="@grafana/faro-web-sdk:instrumentation-web-vitals",this.version=ne}initialize(){this.logDebug("Initializing");this.intializeWebVitalsInstrumentation().initialize()}intializeWebVitalsInstrumentation(){return this.config.trackWebVitalsAttribution?new Pi(this.api.pushMeasurement):new mn(this.api.pushMeasurement)}}function Ni(e,t,n,i){return new(n||(n=Promise))((function(r,o){function s(e){try{u(i.next(e))}catch(e){o(e)}}function a(e){try{u(i.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((i=i.apply(e,t||[])).next())}))}"function"==typeof SuppressedError&&SuppressedError;const Mi=/^00-[a-f0-9]{32}-[a-f0-9]{16}-[0-9]{1,2}$/;function Ai(e=[]){for(const t of e)if("traceparent"===t.name){if(!Mi.test(t.description))continue;const[,e,n]=t.description.split("-");if(null!=e&&null!=n)return{traceId:e,spanId:n};break}}function Di(e=[],t){return e.some((e=>e&&null!=t.match(e)))}function ji(e,t={}){for(const[n,i]of Object.entries(t)){const t=e[n];return null!=t&&(l(i)?i.includes(t):t===i)}return!0}function Ri(e){const{connectEnd:t,connectStart:n,decodedBodySize:i,domainLookupEnd:r,domainLookupStart:o,duration:s,encodedBodySize:a,fetchStart:u,initiatorType:l,name:c,nextHopProtocol:d,redirectEnd:f,redirectStart:p,renderBlockingStatus:m,requestStart:g,responseEnd:v,responseStart:h,responseStatus:b,secureConnectionStart:w,transferSize:y,workerStart:S}=e;return{name:c,duration:Ui(s),tcpHandshakeTime:Ui(t-n),dnsLookupTime:Ui(r-o),tlsNegotiationTime:Ui(g-w),responseStatus:Ui(b),redirectTime:Ui(f-p),requestTime:Ui(h-g),responseTime:Ui(v-h),fetchTime:Ui(v-u),serviceWorkerTime:Ui(u-S),decodedBodySize:Ui(i),encodedBodySize:Ui(a),cacheHitStatus:function(){let e="fullLoad";0===y?i>0&&(e="cache"):null!=b?304===b&&(e="conditionalFetch"):a>0&&y<a&&(e="conditionalFetch");return e}(),renderBlockingStatus:Ui(m),protocol:d,initiatorType:l,visibilityState:document.visibilityState,ttfb:Ui(h-g)}}function Bi(e){const{activationStart:t,domComplete:n,domContentLoadedEventEnd:i,domContentLoadedEventStart:r,domInteractive:o,fetchStart:s,loadEventEnd:a,loadEventStart:u,responseStart:l,type:c}=e,d=function(){var e;if(null!=(null===(e=performance.timing)||void 0===e?void 0:e.domLoading))return performance.timing.domLoading-performance.timeOrigin;return null}();return Object.assign(Object.assign({},Ri(e)),{pageLoadTime:Ui(n-s),documentParsingTime:Ui(d?o-d:null),domProcessingTime:Ui(n-o),domContentLoadHandlerTime:Ui(i-r),onLoadTime:Ui(a-u),ttfb:Ui(Math.max(l-(null!=t?t:0),0)),type:c})}function Ui(e){return null==e?me:"number"==typeof e?Math.round(e).toString():e.toString()}const Fi={initiatorType:["xmlhttprequest","fetch"]};class zi extends te{constructor(){super(...arguments),this.name="@grafana/faro-web-sdk:instrumentation-performance",this.version=ne}initialize(){"PerformanceObserver"in window?function(e){if("complete"===document.readyState)e();else{const t=()=>{"complete"===document.readyState&&(e(),document.removeEventListener("readystatechange",t))};document.addEventListener("readystatechange",t)}}((()=>Ni(this,void 0,void 0,(function*(){const t=this.api.pushEvent,n=this.getIgnoreUrls(),{faroNavigationId:i}=yield function(e,t){let n;const i=new Promise((e=>{n=e}));return new PerformanceObserver((i=>{var r;const[o]=i.getEntries();if(null==o||Di(t,o.name))return;const s=o.toJSON();let a=Ai(null==s?void 0:s.serverTiming);const u=null!==(r=ke(Li,Ee.session))&&void 0!==r?r:me,l=Object.assign(Object.assign({},Bi(s)),{faroNavigationId:P(),faroPreviousNavigationId:u});xe(Li,l.faroNavigationId,Ee.session),e("faro.performance.navigation",l,void 0,{spanContext:a,timestampOverwriteMs:performance.timeOrigin+s.startTime}),n(l)})).observe({type:"navigation",buffered:!0}),i}(t,n);null!=i&&function(t,n,i){const r=e.faro.config.trackResources;new PerformanceObserver((e=>{const o=e.getEntries();for(const e of o){if(Di(i,e.name))return;const o=e.toJSON();let s=Ai(null==o?void 0:o.serverTiming);if(null==r&&ji(o,Fi)||r){const e=Object.assign(Object.assign({},Ri(o)),{faroNavigationId:t,faroResourceId:P()});n("faro.performance.resource",e,void 0,{spanContext:s,timestampOverwriteMs:performance.timeOrigin+o.startTime})}}})).observe({type:"resource",buffered:!0})}(i,t,n)})))):this.logDebug("performance observer not supported. Disable performance instrumentation.")}getIgnoreUrls(){var e;return null===(e=this.transports.transports)||void 0===e?void 0:e.flatMap((e=>e.getIgnoreUrls()))}}function Vi(e={}){const t=[new wt,new _i,new He,new yt];return!1!==e.enablePerformanceInstrumentation&&t.unshift(new zi),!1!==e.captureConsole&&t.push(new We({disabledLevels:e.captureConsoleDisabledLevels})),t}const $i="browser",qi=()=>{const e=window.k6;return{k6:Object.assign({isK6Browser:!0},(null==e?void 0:e.testRunId)&&{testRunId:null==e?void 0:e.testRunId})}};class Gi extends W{constructor(e){var t,n,i,r;super(),this.options=e,this.name="@grafana/faro-web-sdk:transport-fetch",this.version=ne,this.disabledUntil=new Date,this.rateLimitBackoffMs=null!==(t=e.defaultRateLimitBackoffMs)&&void 0!==t?t:5e3,this.getNow=null!==(n=e.getNow)&&void 0!==n?n:()=>Date.now(),this.promiseBuffer=O({size:null!==(i=e.bufferSize)&&void 0!==i?i:30,concurrency:null!==(r=e.concurrency)&&void 0!==r?r:5})}send(e){return Ni(this,void 0,void 0,(function*(){try{if(this.disabledUntil>new Date(this.getNow()))return this.logWarn(`Dropping transport item due to too many requests. Backoff until ${this.disabledUntil}`),Promise.resolve();yield this.promiseBuffer.add((()=>{const t=JSON.stringify(X(e)),{url:n,requestOptions:i,apiKey:r}=this.options,o=null!=i?i:{},{headers:s}=o,a=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]])}return n}(o,["headers"]);let u;const l=this.metas.value.session;return null!=l&&(u=l.id),fetch(n,Object.assign({method:"POST",headers:Object.assign(Object.assign(Object.assign({"Content-Type":"application/json"},null!=s?s:{}),r?{"x-api-key":r}:{}),u?{"x-faro-session-id":u}:{}),body:t,keepalive:t.length<=6e4},null!=a?a:{})).then((e=>Ni(this,void 0,void 0,(function*(){if(202===e.status){"invalid"===e.headers.get("X-Faro-Session-Status")&&this.extendFaroSession(this.config,this.logDebug)}return 429===e.status&&(this.disabledUntil=this.getRetryAfterDate(e),this.logWarn(`Too many requests, backing off until ${this.disabledUntil}`)),e.text().catch(L),e})))).catch((e=>{this.logError("Failed sending payload to the receiver\n",JSON.parse(t),e)}))}))}catch(e){this.logError(e)}}))}getIgnoreUrls(){var e;return[this.options.url].concat(null!==(e=this.config.ignoreUrls)&&void 0!==e?e:[])}isBatched(){return!0}getRetryAfterDate(e){const t=this.getNow(),n=e.headers.get("Retry-After");if(n){const e=Number(n);if(!isNaN(e))return new Date(1e3*e+t);const i=Date.parse(n);if(!isNaN(i))return new Date(i)}return new Date(t+this.rateLimitBackoffMs)}extendFaroSession(e,t){const n="Session expired",i=e.sessionTracking;if(null==i?void 0:i.enabled){const{fetchUserSession:e,storeUserSession:r}=Ge(i);ze({fetchUserSession:e,storeUserSession:r})({forceSessionExtend:!0}),t(`${n} created new session.`)}else t(`${n}.`)}}function Hi(e){var t,n,i,r,o,s,u,l,c,d;const f=[],p=$(e.unpatchedConsole,e.internalLoggerLevel);e.transports?((e.url||e.apiKey)&&p.error('if "transports" is defined, "url" and "apiKey" should not be defined'),f.push(...e.transports)):e.url?f.push(new Gi({url:e.url,apiKey:e.apiKey})):p.error('either "url" or "transports" must be defined');return{app:e.app,batching:Object.assign(Object.assign({},le),e.batching),dedupe:null===(t=e.dedupe)||void 0===t||t,globalObjectKey:e.globalObjectKey||ue,instrumentations:null!==(n=e.instrumentations)&&void 0!==n?n:Vi(),internalLoggerLevel:null!==(i=e.internalLoggerLevel)&&void 0!==i?i:U,isolate:null!==(r=e.isolate)&&void 0!==r&&r,logArgsSerializer:null!==(o=e.logArgsSerializer)&&void 0!==o?o:Q,metas:function(){const t=Se;return e.metas&&t.push(...e.metas),a(window.k6)?[...t,qi]:t}(),parseStacktrace:vt,paused:null!==(s=e.paused)&&void 0!==s&&s,preventGlobalExposure:null!==(u=e.preventGlobalExposure)&&void 0!==u&&u,transports:f,unpatchedConsole:null!==(l=e.unpatchedConsole)&&void 0!==l?l:F,beforeSend:e.beforeSend,eventDomain:null!==(c=e.eventDomain)&&void 0!==c?c:$i,ignoreErrors:e.ignoreErrors,ignoreUrls:(null!==(d=e.ignoreUrls)&&void 0!==d?d:[]).concat([/\/collect(?:\/[\w]*)?$/]),sessionTracking:Object.assign(Object.assign({},Be),e.sessionTracking),user:e.user,view:e.view,trackResources:e.trackResources,trackWebVitalsAttribution:e.trackWebVitalsAttribution,consoleInstrumentation:e.consoleInstrumentation}}return e.BaseExtension=H,e.BaseInstrumentation=te,e.BaseTransport=W,e.ConsoleInstrumentation=We,e.ConsoleTransport=class extends W{constructor(e={}){super(),this.options=e,this.name="@grafana/faro-web-sdk:transport-console",this.version=ne}send(t){var n;return this.unpatchedConsole[null!==(n=this.options.level)&&void 0!==n?n:e.LogLevel.DEBUG]("New event",X([t]))}},e.Conventions={EventNames:{CLICK:"click",NAVIGATION:"navigation",SESSION_START:"session_start",VIEW_CHANGED:"view_changed"}},e.EVENT_CLICK="click",e.EVENT_NAVIGATION="navigation",e.EVENT_ROUTE_CHANGE="route_change",e.EVENT_SESSION_EXTEND=pe,e.EVENT_SESSION_RESUME=fe,e.EVENT_SESSION_START=de,e.EVENT_VIEW_CHANGED=ce,e.ErrorsInstrumentation=wt,e.FetchTransport=Gi,e.MAX_SESSION_PERSISTENCE_TIME=Re,e.MAX_SESSION_PERSISTENCE_TIME_BUFFER=6e4,e.PerformanceInstrumentation=zi,e.PersistentSessionsManager=$e,e.SESSION_EXPIRATION_TIME=De,e.SESSION_INACTIVITY_TIME=je,e.STORAGE_KEY=Ae,e.SessionInstrumentation=He,e.VERSION=ne,e.ViewInstrumentation=yt,e.VolatileSessionsManager=qe,e.WebVitalsInstrumentation=_i,e.allLogLevels=x,e.browserMeta=we,e.buildStackFrame=pt,e.createInternalLogger=$,e.createPromiseBuffer=O,e.createSession=Te,e.deepEqual=y,e.defaultEventDomain=$i,e.defaultExceptionType=J,e.defaultGlobalObjectKey=ue,e.defaultInternalLoggerLevel=U,e.defaultLogLevel=k,e.defaultMetas=Se,e.genShortID=P,e.getCurrentTimestamp=T,e.getDataFromSafariExtensions=mt,e.getIgnoreUrls=function(){return e.faro.transports.transports.flatMap((e=>e.getIgnoreUrls()))},e.getInternalFaroFromGlobalObject=function(){return _[ie]},e.getStackFramesFromError=gt,e.getTransportBody=X,e.getWebInstrumentations=Vi,e.globalObject=_,e.initializeFaro=function(e){const t=Hi(e);if(t)return ae(t)},e.internalGlobalObjectKey=ie,e.isArray=l,e.isBoolean=e=>t(e,"boolean"),e.isDomError=v,e.isDomException=h,e.isElement=e=>b&&i(e,Element),e.isElementDefined=b,e.isError=m,e.isErrorDefined=p,e.isErrorEvent=g,e.isEvent=f,e.isEventDefined=d,e.isFunction=u,e.isInstanceOf=i,e.isInt=e=>s(e)&&Number.isInteger(e),e.isInternalFaroOnGlobalObject=oe,e.isMap=e=>w&&i(e,Map),e.isMapDefined=w,e.isNull=r,e.isNumber=s,e.isObject=a,e.isPrimitive=c,e.isRegExp=e=>n(e,"RegExp"),e.isString=o,e.isSymbol=e=>t(e,"symbol"),e.isSyntheticEvent=e=>a(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e,e.isThenable=e=>u(null==e?void 0:e.then),e.isToString=n,e.isTypeof=t,e.isUndefined=e=>t(e,"undefined"),e.makeCoreConfig=Hi,e.noop=L,e.pageMeta=ye,e.parseStacktrace=vt,e.sdkMeta=()=>({sdk:{name:"@grafana/faro-core",version:ne,integrations:e.faro.config.instrumentations.map((({name:e,version:t})=>({name:e,version:t})))}}),e.setInternalFaroOnGlobalObject=re,e.transportItemTypeToBodyKey=A,e}({});
|
|
1
|
+
var GrafanaFaroWebSdk=function(e){"use strict";function t(e,t){return typeof e===t}function n(e,t){return Object.prototype.toString.call(e)===`[object ${t}]`}function i(e,t){try{return e instanceof t}catch(e){return!1}}const r=e=>t(e,"null"),o=e=>t(e,"string"),s=e=>t(e,"number")&&!isNaN(e)||t(e,"bigint"),a=e=>!r(e)&&t(e,"object"),u=e=>t(e,"function"),l=e=>n(e,"Array"),c=e=>!a(e)&&!u(e),d="undefined"!=typeof Event,f=e=>d&&i(e,Event),p="undefined"!=typeof Error,m=e=>p&&i(e,Error),g=e=>n(e,"ErrorEvent"),v=e=>n(e,"DOMError"),h=e=>n(e,"DOMException"),b="undefined"!=typeof Element,w="undefined"!=typeof Map;function y(e){return null==e||(l(e)||o(e)?0===e.length:!!a(e)&&0===Object.keys(e).length)}function S(e,n){if(e===n)return!0;if(t(e,"number")&&isNaN(e))return t(n,"number")&&isNaN(n);const i=l(e),r=l(n);if(i!==r)return!1;if(i&&r){const t=e.length;if(t!==n.length)return!1;for(let i=t;0!=i--;)if(!S(e[i],n[i]))return!1;return!0}const o=a(e),s=a(n);if(o!==s)return!1;if(e&&n&&o&&s){const t=Object.keys(e),i=Object.keys(n);if(t.length!==i.length)return!1;for(let e of t)if(!i.includes(e))return!1;for(let i of t)if(!S(e[i],n[i]))return!1;return!0}return!1}function E(){return Date.now()}function T(){return(new Date).toISOString()}function I(e){return new Date(e).toISOString()}var k;e.LogLevel=void 0,(k=e.LogLevel||(e.LogLevel={})).TRACE="trace",k.DEBUG="debug",k.INFO="info",k.LOG="log",k.WARN="warn",k.ERROR="error";const x=e.LogLevel.LOG,O=[e.LogLevel.TRACE,e.LogLevel.DEBUG,e.LogLevel.INFO,e.LogLevel.LOG,e.LogLevel.WARN,e.LogLevel.ERROR];function L(){}function C(e){const{size:t,concurrency:n}=e,i=[];let r=0;const o=()=>{if(r<n&&i.length){const{producer:e,resolve:t,reject:n}=i.shift();r++,e().then((e=>{r--,o(),t(e)}),(e=>{r--,o(),n(e)}))}};return{add:e=>{if(i.length+r>=t)throw new Error("Task buffer full");return new Promise(((t,n)=>{i.push({producer:e,resolve:t,reject:n}),o()}))}}}const P="abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ0123456789";function N(e=10){return Array.from(Array(e)).map((()=>P[Math.floor(Math.random()*P.length)])).join("")}const _="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof self?self:void 0;function M(e={}){return JSON.stringify(null!=e?e:{},function(){const e=new WeakSet;return function(t,n){if("object"==typeof n&&null!==n){if(e.has(n))return null;e.add(n)}return n}}())}class A{constructor(e,t){var n,i;this.signalBuffer=[],this.itemLimit=null!==(n=null==t?void 0:t.itemLimit)&&void 0!==n?n:50,this.sendTimeout=null!==(i=null==t?void 0:t.sendTimeout)&&void 0!==i?i:250,this.paused=(null==t?void 0:t.paused)||!1,this.sendFn=e,this.flushInterval=-1,this.paused||this.start(),document.addEventListener("visibilitychange",(()=>{"hidden"===document.visibilityState&&this.flush()}))}addItem(e){this.paused||(this.signalBuffer.push(e),this.signalBuffer.length>=this.itemLimit&&this.flush())}start(){this.paused=!1,this.sendTimeout>0&&(this.flushInterval=window.setInterval((()=>this.flush()),this.sendTimeout))}pause(){this.paused=!0,clearInterval(this.flushInterval)}groupItems(e){const t=new Map;return e.forEach((e=>{const n=JSON.stringify(e.meta);let i=t.get(n);i=void 0===i?[e]:[...i,e],t.set(n,i)})),Array.from(t.values())}flush(){if(this.paused||0===this.signalBuffer.length)return;this.groupItems(this.signalBuffer).forEach(this.sendFn),this.signalBuffer=[]}}var j;e.TransportItemType=void 0,(j=e.TransportItemType||(e.TransportItemType={})).EXCEPTION="exception",j.LOG="log",j.MEASUREMENT="measurement",j.TRACE="trace",j.EVENT="event";const D={[e.TransportItemType.EXCEPTION]:"exceptions",[e.TransportItemType.LOG]:"logs",[e.TransportItemType.MEASUREMENT]:"measurements",[e.TransportItemType.TRACE]:"traces",[e.TransportItemType.EVENT]:"events"};function R(t){return n=>{if(n.type===e.TransportItemType.EXCEPTION&&n.payload){const e=n.payload,i=`${e.type}: ${e.value}`;if(function(e,t){return e.some((e=>o(e)?t.includes(e):!!t.match(e)))}(t,i))return null}return n}}function U(e,t,n,i){var r;t.debug("Initializing transports");const o=[];let s=n.paused,a=[];const u=e=>{let t=e;for(const e of a){const n=t.map(e).filter(Boolean);if(0===n.length)return[];t=n}return t},l=e=>{const n=u(e);if(0!==n.length)for(const e of o)t.debug(`Transporting item using ${e.name}\n`,n),e.isBatched()&&e.send(n)};let c;(null===(r=n.batching)||void 0===r?void 0:r.enabled)&&(c=new A(l,{sendTimeout:n.batching.sendTimeout,itemLimit:n.batching.itemLimit,paused:s}));return{add:(...r)=>{t.debug("Adding transports"),r.forEach((r=>{t.debug(`Adding "${r.name}" transport`);o.some((e=>e===r))?t.warn(`Transport ${r.name} is already added`):(r.unpatchedConsole=e,r.internalLogger=t,r.config=n,r.metas=i,o.push(r))}))},addBeforeSendHooks:(...e)=>{t.debug("Adding beforeSendHooks\n",a),e.forEach((e=>{e&&a.push(e)}))},addIgnoreErrorsPatterns:(...e)=>{t.debug("Adding ignoreErrorsPatterns\n",e),e.forEach((e=>{e&&a.push(R(e))}))},getBeforeSendHooks:()=>[...a],execute:e=>{var i;s||((null===(i=n.batching)||void 0===i?void 0:i.enabled)&&(null==c||c.addItem(e)),(e=>{var i,r;if((null===(i=n.batching)||void 0===i?void 0:i.enabled)&&o.every((e=>e.isBatched())))return;const[s]=u([e]);if(void 0!==s)for(const e of o)t.debug(`Transporting item using ${e.name}\n`,s),e.isBatched()?(null===(r=n.batching)||void 0===r?void 0:r.enabled)||e.send([s]):e.send(s)})(e))},isPaused:()=>s,pause:()=>{t.debug("Pausing transports"),null==c||c.pause(),s=!0},remove:(...e)=>{t.debug("Removing transports"),e.forEach((e=>{t.debug(`Removing "${e.name}" transport`);const n=o.indexOf(e);-1!==n?o.splice(n,1):t.warn(`Transport "${e.name}" is not added`)}))},removeBeforeSendHooks:(...e)=>{a.filter((t=>!e.includes(t)))},get transports(){return[...o]},unpause:()=>{t.debug("Unpausing transports"),null==c||c.start(),s=!1}}}var F;e.InternalLoggerLevel=void 0,(F=e.InternalLoggerLevel||(e.InternalLoggerLevel={}))[F.OFF=0]="OFF",F[F.ERROR=1]="ERROR",F[F.WARN=2]="WARN",F[F.INFO=3]="INFO",F[F.VERBOSE=4]="VERBOSE";const B={debug:L,error:L,info:L,prefix:"Faro",warn:L},z=e.InternalLoggerLevel.ERROR,V=Object.assign({},console);let $=V;function q(e){var t;return $=null!==(t=e.unpatchedConsole)&&void 0!==t?t:$,$}function G(t=V,n=z){const i=B;return n>e.InternalLoggerLevel.OFF&&(i.error=n>=e.InternalLoggerLevel.ERROR?function(...e){t.error(`${i.prefix}\n`,...e)}:L,i.warn=n>=e.InternalLoggerLevel.WARN?function(...e){t.warn(`${i.prefix}\n`,...e)}:L,i.info=n>=e.InternalLoggerLevel.INFO?function(...e){t.info(`${i.prefix}\n`,...e)}:L,i.debug=n>=e.InternalLoggerLevel.VERBOSE?function(...e){t.debug(`${i.prefix}\n`,...e)}:L),i}let H=B;function W(e,t){return H=G(e,t.internalLoggerLevel),H}class K{constructor(){this.unpatchedConsole=V,this.internalLogger=B,this.config={},this.metas={}}logDebug(...e){this.internalLogger.debug(`${this.name}\n`,...e)}logInfo(...e){this.internalLogger.info(`${this.name}\n`,...e)}logWarn(...e){this.internalLogger.warn(`${this.name}\n`,...e)}logError(...e){this.internalLogger.error(`${this.name}\n`,...e)}}class X extends K{isBatched(){return!1}getIgnoreUrls(){return[]}}function J(e,t){var n,i;if(void 0===t)return e;if(void 0===e)return{resourceSpans:t};const r=null===(n=e.resourceSpans)||void 0===n?void 0:n[0];if(void 0===r)return e;const o=(null==r?void 0:r.scopeSpans)||[],s=(null===(i=null==t?void 0:t[0])||void 0===i?void 0:i.scopeSpans)||[];return Object.assign(Object.assign({},e),{resourceSpans:[Object.assign(Object.assign({},r),{scopeSpans:[...o,...s]})]})}function Z(t){let n={meta:{}};return void 0!==t[0]&&(n.meta=t[0].meta),t.forEach((t=>{switch(t.type){case e.TransportItemType.LOG:case e.TransportItemType.EVENT:case e.TransportItemType.EXCEPTION:case e.TransportItemType.MEASUREMENT:const i=D[t.type],r=n[i];n=Object.assign(Object.assign({},n),{[i]:void 0===r?[t.payload]:[...r,t.payload]});break;case e.TransportItemType.TRACE:n=Object.assign(Object.assign({},n),{traces:J(n.traces,t.payload.resourceSpans)})}})),n}const Y="Error",Q=e=>e.map((e=>a(e)?M(e):String(e))).join(" ");let ee;function te(e){let t=e.cause;return m(t)?t=e.cause.toString():null!==t&&(a(e.cause)||l(e.cause))?t=JSON.stringify(e.cause):null!=t&&(t=e.cause.toString()),null==t?{}:{cause:t}}const ne=e=>e.map((e=>{try{return String(e)}catch(e){return""}})).join(" ");function ie(t,n,i,s,a){n.debug("Initializing API");const u=function(t,n,i,r,o){let s;return n.debug("Initializing traces API"),{getOTEL:()=>s,getTraceContext:()=>{const e=null==s?void 0:s.trace.getSpanContext(s.context.active());return e?{trace_id:e.traceId,span_id:e.spanId}:void 0},initOTEL:(e,t)=>{n.debug("Initializing OpenTelemetry"),s={trace:e,context:t}},isOTELInitialized:()=>!!s,pushTraces:t=>{try{const i={type:e.TransportItemType.TRACE,payload:t,meta:r.value};n.debug("Pushing trace\n",i),o.execute(i)}catch(e){n.error("Error pushing trace\n",e)}}}}(0,n,0,s,a);return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},u),function(t,n,i,o,s,a){var u;n.debug("Initializing exceptions API");let l=null;ee=null!==(u=i.parseStacktrace)&&void 0!==u?u:ee;const c=e=>{n.debug("Changing stacktrace parser"),ee=null!=e?e:ee};return c(i.parseStacktrace),{changeStacktraceParser:c,getStacktraceParser:()=>ee,pushError:(t,{skipDedupe:u,stackFrames:c,type:d,context:f,spanContext:p,timestampOverwriteMs:m}={})=>{d=d||t.name||Y;const g={meta:o.value,payload:{type:d,value:t.message,timestamp:m?I(m):T(),trace:p?{trace_id:p.traceId,span_id:p.spanId}:a.getTraceContext(),context:Object.assign(Object.assign({},te(t)),null!=f?f:{})},type:e.TransportItemType.EXCEPTION};(null==(c=null!=c?c:t.stack?null==ee?void 0:ee(t).frames:void 0)?void 0:c.length)&&(g.payload.stacktrace={frames:c});const v={type:g.payload.type,value:g.payload.value,stackTrace:g.payload.stacktrace,context:g.payload.context};u||!i.dedupe||r(l)||!S(v,l)?(l=v,n.debug("Pushing exception\n",g),s.execute(g)):n.debug("Skipping error push because it is the same as the last one\n",g.payload)}}}(0,n,i,s,a,u)),function(e,t,n,i){let r,s,a,u;t.debug("Initializing meta API");const l=e=>{s&&i.remove(s),s={user:e},i.add(s)},c=(e,t)=>{const n=null==t?void 0:t.overrides;r&&i.remove(r),r={session:Object.assign(Object.assign({},y(e)?void 0:e),n?{overrides:n}:{})},i.add(r)},d=()=>i.value.session;return{setUser:l,resetUser:l,setSession:c,resetSession:c,getSession:d,setView:(e,t)=>{var n;if((null==t?void 0:t.overrides)&&c(d(),{overrides:t.overrides}),(null===(n=null==a?void 0:a.view)||void 0===n?void 0:n.name)===(null==e?void 0:e.name))return;const r=a;a={view:e},i.add(a),r&&i.remove(r)},getView:()=>i.value.view,setPage:e=>{const t=o(e)?Object.assign(Object.assign({},null==u?void 0:u.page),{id:e}):e;u&&i.remove(u),u={page:t},i.add(u)},getPage:()=>i.value.page}}(0,n,0,s)),function(t,n,i,o,s,a){var u;n.debug("Initializing logs API");let l=null;const c=null!==(u=i.logArgsSerializer)&&void 0!==u?u:ne;return{pushLog:(t,{context:u,level:d,skipDedupe:f,spanContext:p,timestampOverwriteMs:m}={})=>{try{const g={type:e.TransportItemType.LOG,payload:{message:c(t),level:null!=d?d:x,context:null!=u?u:{},timestamp:m?I(m):T(),trace:p?{trace_id:p.traceId,span_id:p.spanId}:a.getTraceContext()},meta:o.value},v={message:g.payload.message,level:g.payload.level,context:g.payload.context};if(!f&&i.dedupe&&!r(l)&&S(v,l))return void n.debug("Skipping log push because it is the same as the last one\n",g.payload);l=v,n.debug("Pushing log\n",g),s.execute(g)}catch(e){n.error("Error pushing log\n",e)}}}}(0,n,i,s,a,u)),function(t,n,i,o,s,a){n.debug("Initializing measurements API");let u=null;return{pushMeasurement:(t,{skipDedupe:l,context:c,spanContext:d,timestampOverwriteMs:f}={})=>{try{const p={type:e.TransportItemType.MEASUREMENT,payload:Object.assign(Object.assign({},t),{trace:d?{trace_id:d.traceId,span_id:d.spanId}:a.getTraceContext(),timestamp:f?I(f):T(),context:null!=c?c:{}}),meta:o.value},m={type:p.payload.type,values:p.payload.values,context:p.payload.context};if(!l&&i.dedupe&&!r(u)&&S(m,u))return void n.debug("Skipping measurement push because it is the same as the last one\n",p.payload);u=m,n.debug("Pushing measurement\n",p),s.execute(p)}catch(e){n.error("Error pushing measurement\n",e)}}}}(0,n,i,s,a,u)),function(t,n,i,o,s,a){let u=null;return{pushEvent:(t,l,c,{skipDedupe:d,spanContext:f,timestampOverwriteMs:p}={})=>{try{const m={meta:o.value,payload:{name:t,domain:null!=c?c:i.eventDomain,attributes:l,timestamp:p?I(p):T(),trace:f?{trace_id:f.traceId,span_id:f.spanId}:a.getTraceContext()},type:e.TransportItemType.EVENT},g={name:m.payload.name,attributes:m.payload.attributes,domain:m.payload.domain};if(!d&&i.dedupe&&!r(u)&&S(g,u))return void n.debug("Skipping event push because it is the same as the last one\n",m.payload);u=g,n.debug("Pushing event\n",m),s.execute(m)}catch(e){n.error("Error pushing event",e)}}}}(0,n,i,s,a,u))}class re extends K{constructor(){super(...arguments),this.api={},this.transports={}}}const oe="1.13.0";const se="_faroInternal";function ae(e){e.config.isolate?e.internalLogger.debug("Skipping registering internal Faro instance on global object"):(e.internalLogger.debug("Registering internal Faro instance on global object"),Object.defineProperty(_,se,{configurable:!1,enumerable:!1,writable:!1,value:e}))}function ue(){return se in _}function le(t,n,i,r,o,s,a){return n.debug("Initializing Faro"),e.faro={api:s,config:i,instrumentations:a,internalLogger:n,metas:r,pause:o.pause,transports:o,unpatchedConsole:t,unpause:o.unpause},ae(e.faro),function(e){if(e.config.preventGlobalExposure)e.internalLogger.debug("Skipping registering public Faro instance in the global scope");else{if(e.internalLogger.debug(`Registering public faro reference in the global scope using "${e.config.globalObjectKey}" key`),e.config.globalObjectKey in _)return void e.internalLogger.warn(`Skipping global registration due to key "${e.config.globalObjectKey}" being used already. Please set "globalObjectKey" to something else or set "preventGlobalExposure" to "true"`);Object.defineProperty(_,e.config.globalObjectKey,{configurable:!1,writable:!1,value:e})}}(e.faro),e.faro}function ce(e){const t=q(e),n=W(t,e);if(ue()&&!e.isolate)return void n.error('Faro is already registered. Either add instrumentations, transports etc. to the global faro instance or use the "isolate" property');n.debug("Initializing");const i=function(e,t){let n=[],i=[];const r=()=>n.reduce(((e,t)=>Object.assign(e,u(t)?t():t)),{}),o=()=>{if(i.length){const e=r();i.forEach((t=>t(e)))}};return{add:(...e)=>{t.debug("Adding metas\n",e),n.push(...e),o()},remove:(...e)=>{t.debug("Removing metas\n",e),n=n.filter((t=>!e.includes(t))),o()},addListener:e=>{t.debug("Adding metas listener\n",e),i.push(e)},removeListener:e=>{t.debug("Removing metas listener\n",e),i=i.filter((t=>t!==e))},get value(){return r()}}}(0,n),r=U(t,n,e,i),o=ie(0,n,e,i,r),s=function(e,t,n,i,r,o){t.debug("Initializing instrumentations");const s=[];return{add:(...a)=>{t.debug("Adding instrumentations"),a.forEach((a=>{t.debug(`Adding "${a.name}" instrumentation`),s.some((e=>e.name===a.name))?t.warn(`Instrumentation ${a.name} is already added`):(a.unpatchedConsole=e,a.internalLogger=t,a.config=n,a.metas=i,a.transports=r,a.api=o,s.push(a),a.initialize())}))},get instrumentations(){return[...s]},remove:(...e)=>{t.debug("Removing instrumentations"),e.forEach((e=>{var n,i;t.debug(`Removing "${e.name}" instrumentation`);const r=s.reduce(((t,n,i)=>null===t&&n.name===e.name?i:null),null);r?(null===(i=(n=s[r]).destroy)||void 0===i||i.call(n),s.splice(r,1)):t.warn(`Instrumentation "${e.name}" is not added`)}))}}}(t,n,e,i,r,o),a=le(t,n,e,i,r,o,s);return function(e){var t,n;const i={sdk:{version:oe},app:{bundleId:e.config.app.name&&(r=e.config.app.name,null==_?void 0:_[`__faroBundleId_${r}`])}};var r;const o=null===(t=e.config.sessionTracking)||void 0===t?void 0:t.session;o&&e.api.setSession(o),e.config.app&&(i.app=Object.assign(Object.assign({},e.config.app),i.app)),e.config.user&&(i.user=e.config.user),e.config.view&&(i.view=e.config.view),e.metas.add(i,...null!==(n=e.config.metas)&&void 0!==n?n:[])}(a),function(e){e.transports.add(...e.config.transports),e.transports.addBeforeSendHooks(e.config.beforeSend),e.transports.addIgnoreErrorsPatterns(e.config.ignoreErrors)}(a),function(e){e.instrumentations.add(...e.config.instrumentations)}(a),a}e.faro={};const de="faro",fe={enabled:!0,sendTimeout:250,itemLimit:50},pe="view_changed",me="session_start",ge="session_resume",ve="session_extend",he="service_name_override",be="unknown";var we,ye={exports:{}},Se=ye.exports;var Ee=(we||(we=1,function(e,t){!function(n,i){var r="function",o="undefined",s="object",a="string",u="major",l="model",c="name",d="type",f="vendor",p="version",m="architecture",g="console",v="mobile",h="tablet",b="smarttv",w="wearable",y="embedded",S="Amazon",E="Apple",T="ASUS",I="BlackBerry",k="Browser",x="Chrome",O="Firefox",L="Google",C="Huawei",P="LG",N="Microsoft",_="Motorola",M="Opera",A="Samsung",j="Sharp",D="Sony",R="Xiaomi",U="Zebra",F="Facebook",B="Chromium OS",z="Mac OS",V=" Browser",$=function(e){for(var t={},n=0;n<e.length;n++)t[e[n].toUpperCase()]=e[n];return t},q=function(e,t){return typeof e===a&&-1!==G(t).indexOf(G(e))},G=function(e){return e.toLowerCase()},H=function(e,t){if(typeof e===a)return e=e.replace(/^\s\s*/,""),typeof t===o?e:e.substring(0,500)},W=function(e,t){for(var n,o,a,u,l,c,d=0;d<t.length&&!l;){var f=t[d],p=t[d+1];for(n=o=0;n<f.length&&!l&&f[n];)if(l=f[n++].exec(e))for(a=0;a<p.length;a++)c=l[++o],typeof(u=p[a])===s&&u.length>0?2===u.length?typeof u[1]==r?this[u[0]]=u[1].call(this,c):this[u[0]]=u[1]:3===u.length?typeof u[1]!==r||u[1].exec&&u[1].test?this[u[0]]=c?c.replace(u[1],u[2]):i:this[u[0]]=c?u[1].call(this,c,u[2]):i:4===u.length&&(this[u[0]]=c?u[3].call(this,c.replace(u[1],u[2])):i):this[u]=c||i;d+=2}},K=function(e,t){for(var n in t)if(typeof t[n]===s&&t[n].length>0){for(var r=0;r<t[n].length;r++)if(q(t[n][r],e))return"?"===n?i:n}else if(q(t[n],e))return"?"===n?i:n;return t.hasOwnProperty("*")?t["*"]:e},X={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},J={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[p,[c,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[p,[c,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[c,p],[/opios[\/ ]+([\w\.]+)/i],[p,[c,M+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[p,[c,M+" GX"]],[/\bopr\/([\w\.]+)/i],[p,[c,M]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[p,[c,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[p,[c,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon)\/([-\w\.]+)/i,/(heytap|ovi|115)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[c,p],[/quark(?:pc)?\/([-\w\.]+)/i],[p,[c,"Quark"]],[/\bddg\/([\w\.]+)/i],[p,[c,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[p,[c,"UC"+k]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[p,[c,"WeChat"]],[/konqueror\/([\w\.]+)/i],[p,[c,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[p,[c,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[p,[c,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[p,[c,"Smart Lenovo "+k]],[/(avast|avg)\/([\w\.]+)/i],[[c,/(.+)/,"$1 Secure "+k],p],[/\bfocus\/([\w\.]+)/i],[p,[c,O+" Focus"]],[/\bopt\/([\w\.]+)/i],[p,[c,M+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[p,[c,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[p,[c,"Dolphin"]],[/coast\/([\w\.]+)/i],[p,[c,M+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[p,[c,"MIUI"+V]],[/fxios\/([\w\.-]+)/i],[p,[c,O]],[/\bqihoobrowser\/?([\w\.]*)/i],[p,[c,"360"]],[/\b(qq)\/([\w\.]+)/i],[[c,/(.+)/,"$1Browser"],p],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[c,/(.+)/,"$1"+V],p],[/samsungbrowser\/([\w\.]+)/i],[p,[c,A+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[p,[c,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[c,"Sogou Mobile"],p],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[c,p],[/(lbbrowser|rekonq)/i,/\[(linkedin)app\]/i],[c],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[p,c],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[c,F],p],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[c,p],[/\bgsa\/([\w\.]+) .*safari\//i],[p,[c,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[p,[c,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[p,[c,x+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[c,x+" WebView"],p],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[p,[c,"Android "+k]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[c,p],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[p,[c,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[p,c],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[c,[p,K,{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}]],[/(webkit|khtml)\/([\w\.]+)/i],[c,p],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[c,"Netscape"],p],[/(wolvic|librewolf)\/([\w\.]+)/i],[c,p],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[p,[c,O+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i],[c,[p,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[c,[p,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[m,"amd64"]],[/(ia32(?=;))/i],[[m,G]],[/((?:i[346]|x)86)[;\)]/i],[[m,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[m,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[m,"armhf"]],[/windows (ce|mobile); ppc;/i],[[m,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[m,/ower/,"",G]],[/(sun4\w)[;\)]/i],[[m,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[m,G]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[l,[f,A],[d,h]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[l,[f,A],[d,v]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[l,[f,E],[d,v]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[l,[f,E],[d,h]],[/(macintosh);/i],[l,[f,E]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[l,[f,j],[d,v]],[/(?:honor)([-\w ]+)[;\)]/i],[l,[f,"Honor"],[d,v]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[l,[f,C],[d,h]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[l,[f,C],[d,v]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i],[[l,/_/g," "],[f,R],[d,v]],[/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[l,/_/g," "],[f,R],[d,h]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[l,[f,"OPPO"],[d,v]],[/\b(opd2\d{3}a?) bui/i],[l,[f,"OPPO"],[d,h]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[l,[f,"Vivo"],[d,v]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[l,[f,"Realme"],[d,v]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[l,[f,_],[d,v]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[l,[f,_],[d,h]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[l,[f,P],[d,h]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[l,[f,P],[d,v]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[l,[f,"Lenovo"],[d,h]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[l,/_/g," "],[f,"Nokia"],[d,v]],[/(pixel c)\b/i],[l,[f,L],[d,h]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[l,[f,L],[d,v]],[/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[l,[f,D],[d,v]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[l,"Xperia Tablet"],[f,D],[d,h]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[l,[f,"OnePlus"],[d,v]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[l,[f,S],[d,h]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[l,/(.+)/g,"Fire Phone $1"],[f,S],[d,v]],[/(playbook);[-\w\),; ]+(rim)/i],[l,f,[d,h]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[l,[f,I],[d,v]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[l,[f,T],[d,h]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[l,[f,T],[d,v]],[/(nexus 9)/i],[l,[f,"HTC"],[d,h]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[f,[l,/_/g," "],[d,v]],[/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])\w*(\)| bui)/i],[l,[f,"TCL"],[d,h]],[/(itel) ((\w+))/i],[[f,G],l,[d,K,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[l,[f,"Acer"],[d,h]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[l,[f,"Meizu"],[d,v]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[l,[f,"Ulefone"],[d,v]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[l,[f,"Energizer"],[d,v]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[l,[f,"Cat"],[d,v]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[l,[f,"Smartfren"],[d,v]],[/droid.+; (a(?:015|06[35]|142p?))/i],[l,[f,"Nothing"],[d,v]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (imo) ((?!tab)[\w ]+?)(?: bui|\))/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[f,l,[d,v]],[/(imo) (tab \w+)/i,/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[f,l,[d,h]],[/(surface duo)/i],[l,[f,N],[d,h]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[l,[f,"Fairphone"],[d,v]],[/(u304aa)/i],[l,[f,"AT&T"],[d,v]],[/\bsie-(\w*)/i],[l,[f,"Siemens"],[d,v]],[/\b(rct\w+) b/i],[l,[f,"RCA"],[d,h]],[/\b(venue[\d ]{2,7}) b/i],[l,[f,"Dell"],[d,h]],[/\b(q(?:mv|ta)\w+) b/i],[l,[f,"Verizon"],[d,h]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[l,[f,"Barnes & Noble"],[d,h]],[/\b(tm\d{3}\w+) b/i],[l,[f,"NuVision"],[d,h]],[/\b(k88) b/i],[l,[f,"ZTE"],[d,h]],[/\b(nx\d{3}j) b/i],[l,[f,"ZTE"],[d,v]],[/\b(gen\d{3}) b.+49h/i],[l,[f,"Swiss"],[d,v]],[/\b(zur\d{3}) b/i],[l,[f,"Swiss"],[d,h]],[/\b((zeki)?tb.*\b) b/i],[l,[f,"Zeki"],[d,h]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[f,"Dragon Touch"],l,[d,h]],[/\b(ns-?\w{0,9}) b/i],[l,[f,"Insignia"],[d,h]],[/\b((nxa|next)-?\w{0,9}) b/i],[l,[f,"NextBook"],[d,h]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[f,"Voice"],l,[d,v]],[/\b(lvtel\-)?(v1[12]) b/i],[[f,"LvTel"],l,[d,v]],[/\b(ph-1) /i],[l,[f,"Essential"],[d,v]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[l,[f,"Envizen"],[d,h]],[/\b(trio[-\w\. ]+) b/i],[l,[f,"MachSpeed"],[d,h]],[/\btu_(1491) b/i],[l,[f,"Rotor"],[d,h]],[/(shield[\w ]+) b/i],[l,[f,"Nvidia"],[d,h]],[/(sprint) (\w+)/i],[f,l,[d,v]],[/(kin\.[onetw]{3})/i],[[l,/\./g," "],[f,N],[d,v]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[l,[f,U],[d,h]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[l,[f,U],[d,v]],[/smart-tv.+(samsung)/i],[f,[d,b]],[/hbbtv.+maple;(\d+)/i],[[l,/^/,"SmartTV"],[f,A],[d,b]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[f,P],[d,b]],[/(apple) ?tv/i],[f,[l,E+" TV"],[d,b]],[/crkey/i],[[l,x+"cast"],[f,L],[d,b]],[/droid.+aft(\w+)( bui|\))/i],[l,[f,S],[d,b]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[l,[f,j],[d,b]],[/(bravia[\w ]+)( bui|\))/i],[l,[f,D],[d,b]],[/(mitv-\w{5}) bui/i],[l,[f,R],[d,b]],[/Hbbtv.*(technisat) (.*);/i],[f,l,[d,b]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[f,H],[l,H],[d,b]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[d,b]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[f,l,[d,g]],[/droid.+; (shield) bui/i],[l,[f,"Nvidia"],[d,g]],[/(playstation [345portablevi]+)/i],[l,[f,D],[d,g]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[l,[f,N],[d,g]],[/\b(sm-[lr]\d\d[05][fnuw]?s?)\b/i],[l,[f,A],[d,w]],[/((pebble))app/i],[f,l,[d,w]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[l,[f,E],[d,w]],[/droid.+; (glass) \d/i],[l,[f,L],[d,w]],[/droid.+; (wt63?0{2,3})\)/i],[l,[f,U],[d,w]],[/droid.+; (glass) \d/i],[l,[f,L],[d,w]],[/(pico) (4|neo3(?: link|pro)?)/i],[f,l,[d,w]],[/; (quest( \d| pro)?)/i],[l,[f,F],[d,w]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[f,[d,y]],[/(aeobc)\b/i],[l,[f,S],[d,y]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[l,[d,v]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[l,[d,h]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[d,h]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[d,v]],[/(android[-\w\. ]{0,9});.+buil/i],[l,[f,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[p,[c,"EdgeHTML"]],[/(arkweb)\/([\w\.]+)/i],[c,p],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[p,[c,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[c,p],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[p,c]],os:[[/microsoft (windows) (vista|xp)/i],[c,p],[/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i],[c,[p,K,X]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[p,K,X],[c,"Windows"]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[p,/_/g,"."],[c,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[c,z],[p,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[p,c],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish|openharmony)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[c,p],[/\(bb(10);/i],[p,[c,I]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[p,[c,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[p,[c,O+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[p,[c,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[p,[c,"watchOS"]],[/crkey\/([\d\.]+)/i],[p,[c,x+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[c,B],p],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[c,p],[/(sunos) ?([\w\.\d]*)/i],[[c,"Solaris"],p],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[c,p]]},Z=function(e,t){if(typeof e===s&&(t=e,e=i),!(this instanceof Z))return new Z(e,t).getResult();var g=typeof n!==o&&n.navigator?n.navigator:i,b=e||(g&&g.userAgent?g.userAgent:""),w=g&&g.userAgentData?g.userAgentData:i,y=t?function(e,t){var n={};for(var i in e)t[i]&&t[i].length%2==0?n[i]=t[i].concat(e[i]):n[i]=e[i];return n}(J,t):J,S=g&&g.userAgent==b;return this.getBrowser=function(){var e,t={};return t[c]=i,t[p]=i,W.call(t,b,y.browser),t[u]=typeof(e=t[p])===a?e.replace(/[^\d\.]/g,"").split(".")[0]:i,S&&g&&g.brave&&typeof g.brave.isBrave==r&&(t[c]="Brave"),t},this.getCPU=function(){var e={};return e[m]=i,W.call(e,b,y.cpu),e},this.getDevice=function(){var e={};return e[f]=i,e[l]=i,e[d]=i,W.call(e,b,y.device),S&&!e[d]&&w&&w.mobile&&(e[d]=v),S&&"Macintosh"==e[l]&&g&&typeof g.standalone!==o&&g.maxTouchPoints&&g.maxTouchPoints>2&&(e[l]="iPad",e[d]=h),e},this.getEngine=function(){var e={};return e[c]=i,e[p]=i,W.call(e,b,y.engine),e},this.getOS=function(){var e={};return e[c]=i,e[p]=i,W.call(e,b,y.os),S&&!e[c]&&w&&w.platform&&"Unknown"!=w.platform&&(e[c]=w.platform.replace(/chrome os/i,B).replace(/macos/i,z)),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return b},this.setUA=function(e){return b=typeof e===a&&e.length>500?H(e,500):e,this},this.setUA(b),this};Z.VERSION="1.0.40",Z.BROWSER=$([c,p,u]),Z.CPU=$([m]),Z.DEVICE=$([l,f,d,g,v,b,h,w,y]),Z.ENGINE=Z.OS=$([c,p]),e.exports&&(t=e.exports=Z),t.UAParser=Z;var Y=typeof n!==o&&(n.jQuery||n.Zepto);if(Y&&!Y.ua){var Q=new Z;Y.ua=Q.getResult(),Y.ua.get=function(){return Q.getUA()},Y.ua.set=function(e){Q.setUA(e);var t=Q.getResult();for(var n in t)Y.ua[n]=t[n]}}}("object"==typeof window?window:Se)}(ye,ye.exports)),ye.exports);const Te=()=>{const e=new Ee.UAParser,{name:t,version:n}=e.getBrowser(),{name:i,version:r}=e.getOS(),o=e.getUA(),s=navigator.language,a=navigator.userAgent.includes("Mobi"),u=function(){if(!t||!n)return;if("userAgentData"in navigator&&navigator.userAgentData)return navigator.userAgentData.brands;return}();return{browser:{name:null!=t?t:be,version:null!=n?n:be,os:`${null!=i?i:be} ${null!=r?r:be}`,userAgent:null!=o?o:be,language:null!=s?s:be,mobile:a,brands:null!=u?u:be,viewportWidth:`${window.innerWidth}`,viewportHeight:`${window.innerHeight}`}}};function Ie(t){var n,i,r,o;return{id:null!==(o=null===(r=null===(i=null===(n=e.faro.config)||void 0===n?void 0:n.sessionTracking)||void 0===i?void 0:i.generateSessionId)||void 0===r?void 0:r.call(i))&&void 0!==o?o:N(),attributes:t}}const ke={session:"sessionStorage",local:"localStorage"};function xe(t){var n;try{let e;e=window[t];const n="__faro_storage_test__";return e.setItem(n,n),e.removeItem(n),!0}catch(i){return null===(n=e.faro.internalLogger)||void 0===n||n.info(`Web storage of type ${t} is not available. Reason: ${i}`),!1}}function Oe(e,t){return _e(t)?window[t].getItem(e):null}function Le(e,t,n){if(_e(n))try{window[n].setItem(e,t)}catch(e){}}function Ce(e,t){_e(t)&&window[t].removeItem(e)}const Pe=xe(ke.local),Ne=xe(ke.session);function _e(e){return e===ke.local?Pe:e===ke.session&&Ne}function Me(e,t){let n,i=!1;const r=()=>{null!=n?(e(...n),n=null,setTimeout(r,t)):i=!1};return(...o)=>{i?n=o:(e(...o),i=!0,setTimeout(r,t))}}const Ae="com.grafana.faro.session",je=144e5,De=9e5,Re=De,Ue={enabled:!0,persistent:!1,maxSessionPersistenceTime:Re};function Fe(){var t,n,i;const r=e.faro.config.sessionTracking;let o=null!==(i=null!==(n=null===(t=null==r?void 0:r.sampler)||void 0===t?void 0:t.call(r,{metas:e.faro.metas.value}))&&void 0!==n?n:null==r?void 0:r.samplingRate)&&void 0!==i?i:1;if("number"!=typeof o){o=0}return Math.random()<o}function Be({sessionId:t,started:n,lastActivity:i,isSampled:r=!0}={}){var o,s;const a=E(),u=null===(s=null===(o=e.faro.config)||void 0===o?void 0:o.sessionTracking)||void 0===s?void 0:s.generateSessionId;return null==t&&(t="function"==typeof u?u():N()),{sessionId:t,lastActivity:null!=i?i:a,started:null!=n?n:a,isSampled:r}}function ze(e){if(null==e)return!1;const t=E();if(!(t-e.started<je))return!1;return t-e.lastActivity<De}function Ve({fetchUserSession:t,storeUserSession:n}){return function({forceSessionExtend:i}={forceSessionExtend:!1}){var r,o,s;if(!t||!n)return;const a=e.faro.config.sessionTracking,u=null==a?void 0:a.persistent;if(u&&!Pe||!u&&!Ne)return;const l=t();if(!1===i&&ze(l))n(Object.assign(Object.assign({},l),{lastActivity:E()}));else{let t=$e(Be({isSampled:Fe()}),l);n(t),null===(r=e.faro.api)||void 0===r||r.setSession(t.sessionMeta),null===(o=null==a?void 0:a.onSessionChange)||void 0===o||o.call(a,null!==(s=null==l?void 0:l.sessionMeta)&&void 0!==s?s:null,t.sessionMeta)}}}function $e(t,n){var i,r,o,s,a,u,l;const c=Object.assign(Object.assign({},t),{sessionMeta:{id:t.sessionId,attributes:Object.assign(Object.assign(Object.assign({},null===(r=null===(i=e.faro.config.sessionTracking)||void 0===i?void 0:i.session)||void 0===r?void 0:r.attributes),null!==(s=null===(o=e.faro.metas.value.session)||void 0===o?void 0:o.attributes)&&void 0!==s?s:{}),{isSampled:t.isSampled.toString()})}}),d=null!==(u=null===(a=e.faro.metas.value.session)||void 0===a?void 0:a.overrides)&&void 0!==u?u:null===(l=null==n?void 0:n.sessionMeta)||void 0===l?void 0:l.overrides;y(d)||(c.sessionMeta.overrides=d);const f=null==n?void 0:n.sessionId;return null!=f&&(c.sessionMeta.attributes.previousSession=f),c}function qe({fetchUserSession:t,storeUserSession:n}){return function(i){const r=i.session,o=t();let s=null==r?void 0:r.id;const a=null==r?void 0:r.attributes,u=null==r?void 0:r.overrides,l=null==o?void 0:o.sessionMeta,c=null==l?void 0:l.overrides,d=!!u&&!S(u,c),f=!!a&&!S(a,null==l?void 0:l.attributes);if(!!r&&s!==(null==o?void 0:o.sessionId)||f||d){const t=$e(Be({sessionId:s,isSampled:Fe()}),o);n(t),function(t,n={},i={}){var r,o,s;if(!t)return;const a=n.serviceName,u=null!==(s=null!==(r=i.serviceName)&&void 0!==r?r:null===(o=e.faro.metas.value.app)||void 0===o?void 0:o.name)&&void 0!==s?s:"";a&&a!==u&&e.faro.api.pushEvent(he,{serviceName:a,previousServiceName:u})}(d,u,c),e.faro.api.setSession(t.sessionMeta)}}}class Ge{constructor(){this.updateSession=Me((()=>this.updateUserSession()),1e3),this.updateUserSession=Ve({fetchUserSession:Ge.fetchUserSession,storeUserSession:Ge.storeUserSession}),this.init()}static removeUserSession(){Ce(Ae,Ge.storageTypeLocal)}static storeUserSession(e){Le(Ae,M(e),Ge.storageTypeLocal)}static fetchUserSession(){const e=Oe(Ae,Ge.storageTypeLocal);return e?JSON.parse(e):null}init(){document.addEventListener("visibilitychange",(()=>{"visible"===document.visibilityState&&this.updateSession()})),e.faro.metas.addListener(qe({fetchUserSession:Ge.fetchUserSession,storeUserSession:Ge.storeUserSession}))}}Ge.storageTypeLocal=ke.local;class He{constructor(){this.updateSession=Me((()=>this.updateUserSession()),1e3),this.updateUserSession=Ve({fetchUserSession:He.fetchUserSession,storeUserSession:He.storeUserSession}),this.init()}static removeUserSession(){Ce(Ae,He.storageTypeSession)}static storeUserSession(e){Le(Ae,M(e),He.storageTypeSession)}static fetchUserSession(){const e=Oe(Ae,He.storageTypeSession);return e?JSON.parse(e):null}init(){document.addEventListener("visibilitychange",(()=>{"visible"===document.visibilityState&&this.updateSession()})),e.faro.metas.addListener(qe({fetchUserSession:He.fetchUserSession,storeUserSession:He.storeUserSession}))}}function We(e){return(null==e?void 0:e.persistent)?Ge:He}He.storageTypeSession=ke.session;class Ke extends re{constructor(){super(...arguments),this.name="@grafana/faro-web-sdk:instrumentation-session",this.version=oe}sendSessionStartEvent(e){var t,n;const i=e.session;if(i&&i.id!==(null===(t=this.notifiedSession)||void 0===t?void 0:t.id)){if(this.notifiedSession&&this.notifiedSession.id===(null===(n=i.attributes)||void 0===n?void 0:n.previousSession))return this.api.pushEvent(ve,{},void 0,{skipDedupe:!0}),void(this.notifiedSession=i);this.notifiedSession=i,this.api.pushEvent(me,{},void 0,{skipDedupe:!0})}}createInitialSession(e,t){var n,i,r,o;let s,a,u=e.fetchUserSession();if(t.persistent&&t.maxSessionPersistenceTime&&u){const e=E();u.lastActivity<e-t.maxSessionPersistenceTime&&(Ge.removeUserSession(),u=null)}if(ze(u)){const e=null==u?void 0:u.sessionId;a=Be({sessionId:e,isSampled:u.isSampled||!1,started:null==u?void 0:u.started});const i=null==u?void 0:u.sessionMeta;a.sessionMeta={id:e,attributes:Object.assign(Object.assign(Object.assign({},null===(n=t.session)||void 0===n?void 0:n.attributes),null==i?void 0:i.attributes),{isSampled:a.isSampled.toString()}),overrides:null==i?void 0:i.overrides},s=ge}else{const e=null!==(r=null===(i=t.session)||void 0===i?void 0:i.id)&&void 0!==r?r:Ie().id;a=Be({sessionId:e,isSampled:Fe()}),a.sessionMeta={id:e,attributes:Object.assign({isSampled:a.isSampled.toString()},null===(o=t.session)||void 0===o?void 0:o.attributes)},s=me}return{initialSession:a,lifecycleType:s}}registerBeforeSendHook(e){var t;const{updateSession:n}=new e;null===(t=this.transports)||void 0===t||t.addBeforeSendHooks((e=>{var t,i,r;n();const o=null===(t=e.meta.session)||void 0===t?void 0:t.attributes;if(o&&"true"===(null==o?void 0:o.isSampled)){let t=JSON.parse(JSON.stringify(e));const n=null===(i=t.meta.session)||void 0===i?void 0:i.attributes;return null==n||delete n.isSampled,0===Object.keys(null!=n?n:{}).length&&(null===(r=t.meta.session)||void 0===r||delete r.attributes),t}return null}))}initialize(){this.logDebug("init session instrumentation");const e=this.config.sessionTracking;if(null==e?void 0:e.enabled){const t=We(e);this.registerBeforeSendHook(t);const{initialSession:n,lifecycleType:i}=this.createInitialSession(t,e);t.storeUserSession(n);const r=n.sessionMeta;this.notifiedSession=r,this.api.setSession(r),i===me&&this.api.pushEvent(me,{},void 0,{skipDedupe:!0}),i===ge&&this.api.pushEvent(ge,{},void 0,{skipDedupe:!0})}this.metas.addListener(this.sendSessionStartEvent.bind(this))}}const Xe="DOMError",Je="DOMException",Ze="Non-Error exception captured with keys:",Ye="?",Qe=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;const et="\n",tt="eval",nt="?",it="@",rt=/^\s*at (?:(.*\).*?|.*?) ?\((?:address at )?)?((?:file|https?|blob|chrome-extension|address|native|eval|webpack|<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,ot=/\((\S*)(?::(\d+))(?::(\d+))\)/,st="eval",at="address at ",ut=at.length,lt=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension|safari-extension|safari-web-extension|capacitor)?:\/.*?|\[native code]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,ct=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,dt=" > eval",ft="safari-extension",pt="safari-web-extension",mt=/Minified React error #\d+;/i;function gt(e,t,n,i){const r={filename:e||document.location.href,function:t||nt};return void 0!==n&&(r.lineno=n),void 0!==i&&(r.colno=i),r}function vt(e,t){const n=null==e?void 0:e.includes(ft),i=!n&&(null==e?void 0:e.includes(pt));return n||i?[(null==e?void 0:e.includes(it))?e.split(it)[0]:e,n?`${ft}:${t}`:`${pt}:${t}`]:[e,t]}function ht(e){let t=[];e.stacktrace?t=e.stacktrace.split(et).filter(((e,t)=>t%2==0)):e.stack&&(t=e.stack.split(et));const n=t.reduce(((t,n,i)=>{let r,o,a,u,l;if(r=rt.exec(n)){if(o=r[1],a=r[2],u=r[3],l=r[4],null==a?void 0:a.startsWith(st)){const e=ot.exec(a);e&&(a=e[1],u=e[2],l=e[3])}a=(null==a?void 0:a.startsWith(at))?a.substring(ut):a,[o,a]=vt(o,a)}else if(r=lt.exec(n)){if(o=r[1],a=r[3],u=r[4],l=r[5],a&&a.includes(dt)){const e=ct.exec(a);e&&(o=o||tt,a=e[1],u=e[2])}else 0===i&&!l&&s(e.columnNumber)&&(l=String(e.columnNumber+1));[o,a]=vt(o,a)}return(a||o)&&t.push(gt(a,o,u?Number(u):void 0,l?Number(l):void 0)),t}),[]);return mt.test(e.message)?n.slice(1):n}function bt(e){return{frames:ht(e)}}function wt(e){let t,n,i,r,o=[];if(g(e)&&e.error)t=e.error.message,n=e.error.name,o=ht(e.error);else if((i=v(e))||h(e)){const{name:r,message:o}=e;n=null!=r?r:i?Xe:Je,t=o?`${n}: ${o}`:n}else m(e)?(t=e.message,o=ht(e)):(a(e)||(r=f(e)))&&(n=r?e.constructor.name:void 0,t=`${Ze} ${Object.keys(e)}`);return[t,n,o]}function yt(e){const[t,n,i,r,s]=e;let a,u,l=[];const c=o(t),d=gt(n,Ye,i,r);return s||!c?([a,u,l]=wt(null!=s?s:t),0===l.length&&(l=[d])):c&&([a,u]=function(e){var t,n;const i=e.match(Qe),r=null!==(t=null==i?void 0:i[1])&&void 0!==t?t:Y;return[null!==(n=null==i?void 0:i[2])&&void 0!==n?n:e,r]}(t),l=[d]),{value:a,type:u,stackFrames:l}}function St(e,t){return m(e[0])?yt(e):{value:t(e)}}class Et extends re{constructor(e={}){super(),this.options=e,this.name="@grafana/faro-web-sdk:instrumentation-console",this.version=oe,this.errorSerializer=ne}initialize(){var t,n,i,r;this.options=Object.assign(Object.assign({},this.options),this.config.consoleInstrumentation);const o=(null===(t=this.options)||void 0===t?void 0:t.serializeErrors)||!!(null===(n=this.options)||void 0===n?void 0:n.errorSerializer);this.errorSerializer=o?null!==(r=null===(i=this.options)||void 0===i?void 0:i.errorSerializer)&&void 0!==r?r:Q:ne,O.filter((e=>{var t,n;return!(null!==(n=null===(t=this.options)||void 0===t?void 0:t.disabledLevels)&&void 0!==n?n:Et.defaultDisabledLevels).includes(e)})).forEach((t=>{console[t]=(...n)=>{var i,r;try{if(t!==e.LogLevel.ERROR||(null===(i=this.options)||void 0===i?void 0:i.consoleErrorAsLog))if(t===e.LogLevel.ERROR&&(null===(r=this.options)||void 0===r?void 0:r.consoleErrorAsLog)){const{value:e,type:i,stackFrames:r}=St(n,this.errorSerializer);this.api.pushLog(e?[Et.consoleErrorPrefix+e]:n,{level:t,context:{value:null!=e?e:"",type:null!=i?i:"",stackFrames:(null==r?void 0:r.length)?Q(r):""}})}else this.api.pushLog(n,{level:t});else{const{value:e,type:t,stackFrames:i}=St(n,this.errorSerializer);if(e&&!t&&!i)return void this.api.pushError(new Error(Et.consoleErrorPrefix+e));this.api.pushError(new Error(Et.consoleErrorPrefix+e),{type:t,stackFrames:i})}}catch(e){this.logError(e)}finally{this.unpatchedConsole[t](...n)}}}))}}Et.defaultDisabledLevels=[e.LogLevel.DEBUG,e.LogLevel.TRACE,e.LogLevel.LOG],Et.consoleErrorPrefix="console.error: ";class Tt extends re{constructor(){super(...arguments),this.name="@grafana/faro-web-sdk:instrumentation-errors",this.version=oe}initialize(){var e;this.logDebug("Initializing"),function(e){const t=window.onerror;window.onerror=(...n)=>{try{const{value:t,type:i,stackFrames:r}=yt(n);t&&e.pushError(new Error(t),{type:i,stackFrames:r})}finally{null==t||t.apply(window,n)}}}(this.api),e=this.api,window.addEventListener("unhandledrejection",(t=>{var n,i;let r,o,s=t;s.reason?s=t.reason:(null===(n=t.detail)||void 0===n?void 0:n.reason)&&(s=null===(i=t.detail)||void 0===i?void 0:i.reason);let a=[];c(s)?(r=`Non-Error promise rejection captured with value: ${String(s)}`,o="UnhandledRejection"):[r,o,a]=wt(s),r&&e.pushError(new Error(r),{type:o,stackFrames:a})}))}}class It extends re{constructor(){super(...arguments),this.name="@grafana/faro-web-sdk:instrumentation-view",this.version=oe}sendViewChangedEvent(e){var t,n,i,r;const o=e.view;o&&o.name!==(null===(t=this.notifiedView)||void 0===t?void 0:t.name)&&(this.api.pushEvent(pe,{fromView:null!==(i=null===(n=this.notifiedView)||void 0===n?void 0:n.name)&&void 0!==i?i:be,toView:null!==(r=o.name)&&void 0!==r?r:be},void 0,{skipDedupe:!0}),this.notifiedView=o)}initialize(){this.metas.addListener(this.sendViewChangedEvent.bind(this))}}var kt,xt,Ot,Lt,Ct,Pt=-1,Nt=function(e){addEventListener("pageshow",(function(t){t.persisted&&(Pt=t.timeStamp,e(t))}),!0)},_t=function(){var e=self.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},Mt=function(){var e=_t();return e&&e.activationStart||0},At=function(e,t){var n=_t(),i="navigate";return Pt>=0?i="back-forward-cache":n&&(document.prerendering||Mt()>0?i="prerender":document.wasDiscarded?i="restore":n.type&&(i=n.type.replace(/_/g,"-"))),{name:e,value:void 0===t?-1:t,rating:"good",delta:0,entries:[],id:"v4-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:i}},jt=function(e,t,n){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){var i=new PerformanceObserver((function(e){Promise.resolve().then((function(){t(e.getEntries())}))}));return i.observe(Object.assign({type:e,buffered:!0},n||{})),i}}catch(e){}},Dt=function(e,t,n,i){var r,o;return function(s){t.value>=0&&(s||i)&&((o=t.value-(r||0))||void 0===r)&&(r=t.value,t.delta=o,t.rating=function(e,t){return e>t[1]?"poor":e>t[0]?"needs-improvement":"good"}(t.value,n),e(t))}},Rt=function(e){requestAnimationFrame((function(){return requestAnimationFrame((function(){return e()}))}))},Ut=function(e){document.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&e()}))},Ft=function(e){var t=!1;return function(){t||(e(),t=!0)}},Bt=-1,zt=function(){return"hidden"!==document.visibilityState||document.prerendering?1/0:0},Vt=function(e){"hidden"===document.visibilityState&&Bt>-1&&(Bt="visibilitychange"===e.type?e.timeStamp:0,qt())},$t=function(){addEventListener("visibilitychange",Vt,!0),addEventListener("prerenderingchange",Vt,!0)},qt=function(){removeEventListener("visibilitychange",Vt,!0),removeEventListener("prerenderingchange",Vt,!0)},Gt=function(){return Bt<0&&(Bt=zt(),$t(),Nt((function(){setTimeout((function(){Bt=zt(),$t()}),0)}))),{get firstHiddenTime(){return Bt}}},Ht=function(e){document.prerendering?addEventListener("prerenderingchange",(function(){return e()}),!0):e()},Wt=[1800,3e3],Kt=function(e,t){t=t||{},Ht((function(){var n,i=Gt(),r=At("FCP"),o=jt("paint",(function(e){e.forEach((function(e){"first-contentful-paint"===e.name&&(o.disconnect(),e.startTime<i.firstHiddenTime&&(r.value=Math.max(e.startTime-Mt(),0),r.entries.push(e),n(!0)))}))}));o&&(n=Dt(e,r,Wt,t.reportAllChanges),Nt((function(i){r=At("FCP"),n=Dt(e,r,Wt,t.reportAllChanges),Rt((function(){r.value=performance.now()-i.timeStamp,n(!0)}))})))}))},Xt=[.1,.25],Jt=0,Zt=1/0,Yt=0,Qt=function(e){e.forEach((function(e){e.interactionId&&(Zt=Math.min(Zt,e.interactionId),Yt=Math.max(Yt,e.interactionId),Jt=Yt?(Yt-Zt)/7+1:0)}))},en=function(){return kt?Jt:performance.interactionCount||0},tn=[],nn=new Map,rn=0,on=[],sn=function(e){if(on.forEach((function(t){return t(e)})),e.interactionId||"first-input"===e.entryType){var t=tn[tn.length-1],n=nn.get(e.interactionId);if(n||tn.length<10||e.duration>t.latency){if(n)e.duration>n.latency?(n.entries=[e],n.latency=e.duration):e.duration===n.latency&&e.startTime===n.entries[0].startTime&&n.entries.push(e);else{var i={id:e.interactionId,latency:e.duration,entries:[e]};nn.set(i.id,i),tn.push(i)}tn.sort((function(e,t){return t.latency-e.latency})),tn.length>10&&tn.splice(10).forEach((function(e){return nn.delete(e.id)}))}}},an=function(e){var t=self.requestIdleCallback||self.setTimeout,n=-1;return e=Ft(e),"hidden"===document.visibilityState?e():(n=t(e),Ut(e)),n},un=[200,500],ln=[2500,4e3],cn={},dn=[800,1800],fn=function e(t){document.prerendering?Ht((function(){return e(t)})):"complete"!==document.readyState?addEventListener("load",(function(){return e(t)}),!0):setTimeout(t,0)},pn={passive:!0,capture:!0},mn=new Date,gn=function(e,t){xt||(xt=t,Ot=e,Lt=new Date,bn(removeEventListener),vn())},vn=function(){if(Ot>=0&&Ot<Lt-mn){var e={entryType:"first-input",name:xt.type,target:xt.target,cancelable:xt.cancelable,startTime:xt.timeStamp,processingStart:xt.timeStamp+Ot};Ct.forEach((function(t){t(e)})),Ct=[]}},hn=function(e){if(e.cancelable){var t=(e.timeStamp>1e12?new Date:performance.now())-e.timeStamp;"pointerdown"==e.type?function(e,t){var n=function(){gn(e,t),r()},i=function(){r()},r=function(){removeEventListener("pointerup",n,pn),removeEventListener("pointercancel",i,pn)};addEventListener("pointerup",n,pn),addEventListener("pointercancel",i,pn)}(t,e):gn(t,e)}},bn=function(e){["mousedown","keydown","touchstart","pointerdown"].forEach((function(t){return e(t,hn,pn)}))},wn=[100,300];class yn{constructor(e){this.pushMeasurement=e}initialize(){Object.entries(yn.mapping).forEach((([e,t])=>{t((t=>{this.pushMeasurement({type:"web-vitals",values:{[e]:t.value}})}))}))}}yn.mapping={cls:function(e,t){t=t||{},Kt(Ft((function(){var n,i=At("CLS",0),r=0,o=[],s=function(e){e.forEach((function(e){if(!e.hadRecentInput){var t=o[0],n=o[o.length-1];r&&e.startTime-n.startTime<1e3&&e.startTime-t.startTime<5e3?(r+=e.value,o.push(e)):(r=e.value,o=[e])}})),r>i.value&&(i.value=r,i.entries=o,n())},a=jt("layout-shift",s);a&&(n=Dt(e,i,Xt,t.reportAllChanges),Ut((function(){s(a.takeRecords()),n(!0)})),Nt((function(){r=0,i=At("CLS",0),n=Dt(e,i,Xt,t.reportAllChanges),Rt((function(){return n()}))})),setTimeout(n,0))})))},fcp:Kt,fid:function(e,t){t=t||{},Ht((function(){var n,i=Gt(),r=At("FID"),o=function(e){e.startTime<i.firstHiddenTime&&(r.value=e.processingStart-e.startTime,r.entries.push(e),n(!0))},s=function(e){e.forEach(o)},a=jt("first-input",s);n=Dt(e,r,wn,t.reportAllChanges),a&&(Ut(Ft((function(){s(a.takeRecords()),a.disconnect()}))),Nt((function(){var i;r=At("FID"),n=Dt(e,r,wn,t.reportAllChanges),Ct=[],Ot=-1,xt=null,bn(addEventListener),i=o,Ct.push(i),vn()})))}))},inp:function(e,t){"PerformanceEventTiming"in self&&"interactionId"in PerformanceEventTiming.prototype&&(t=t||{},Ht((function(){var n;"interactionCount"in performance||kt||(kt=jt("event",Qt,{type:"event",buffered:!0,durationThreshold:0}));var i,r=At("INP"),o=function(e){an((function(){e.forEach(sn);var t=function(){var e=Math.min(tn.length-1,Math.floor((en()-rn)/50));return tn[e]}();t&&t.latency!==r.value&&(r.value=t.latency,r.entries=t.entries,i())}))},s=jt("event",o,{durationThreshold:null!==(n=t.durationThreshold)&&void 0!==n?n:40});i=Dt(e,r,un,t.reportAllChanges),s&&(s.observe({type:"first-input",buffered:!0}),Ut((function(){o(s.takeRecords()),i(!0)})),Nt((function(){rn=en(),tn.length=0,nn.clear(),r=At("INP"),i=Dt(e,r,un,t.reportAllChanges)})))})))},lcp:function(e,t){t=t||{},Ht((function(){var n,i=Gt(),r=At("LCP"),o=function(e){t.reportAllChanges||(e=e.slice(-1)),e.forEach((function(e){e.startTime<i.firstHiddenTime&&(r.value=Math.max(e.startTime-Mt(),0),r.entries=[e],n())}))},s=jt("largest-contentful-paint",o);if(s){n=Dt(e,r,ln,t.reportAllChanges);var a=Ft((function(){cn[r.id]||(o(s.takeRecords()),s.disconnect(),cn[r.id]=!0,n(!0))}));["keydown","click"].forEach((function(e){addEventListener(e,(function(){return an(a)}),{once:!0,capture:!0})})),Ut(a),Nt((function(i){r=At("LCP"),n=Dt(e,r,ln,t.reportAllChanges),Rt((function(){r.value=performance.now()-i.timeStamp,cn[r.id]=!0,n(!0)}))}))}}))},ttfb:function(e,t){t=t||{};var n=At("TTFB"),i=Dt(e,n,dn,t.reportAllChanges);fn((function(){var r=_t();r&&(n.value=Math.max(r.responseStart-Mt(),0),n.entries=[r],i(!0),Nt((function(){n=At("TTFB",0),(i=Dt(e,n,dn,t.reportAllChanges))(!0)})))}))}};var Sn,En,Tn=function(){var e=self.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},In=function(e){if("loading"===document.readyState)return"loading";var t=Tn();if(t){if(e<t.domInteractive)return"loading";if(0===t.domContentLoadedEventStart||e<t.domContentLoadedEventStart)return"dom-interactive";if(0===t.domComplete||e<t.domComplete)return"dom-content-loaded"}return"complete"},kn=function(e){var t=e.nodeName;return 1===e.nodeType?t.toLowerCase():t.toUpperCase().replace(/^#/,"")},xn=function(e,t){var n="";try{for(;e&&9!==e.nodeType;){var i=e,r=i.id?"#"+i.id:kn(i)+(i.classList&&i.classList.value&&i.classList.value.trim()&&i.classList.value.trim().length?"."+i.classList.value.trim().replace(/\s+/g,"."):"");if(n.length+r.length>(t||100)-1)return n||r;if(n=n?r+">"+n:r,i.id)break;e=i.parentNode}}catch(e){}return n},On=-1,Ln=function(){return On},Cn=function(e){addEventListener("pageshow",(function(t){t.persisted&&(On=t.timeStamp,e(t))}),!0)},Pn=function(){var e=Tn();return e&&e.activationStart||0},Nn=function(e,t){var n=Tn(),i="navigate";return Ln()>=0?i="back-forward-cache":n&&(document.prerendering||Pn()>0?i="prerender":document.wasDiscarded?i="restore":n.type&&(i=n.type.replace(/_/g,"-"))),{name:e,value:void 0===t?-1:t,rating:"good",delta:0,entries:[],id:"v4-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:i}},_n=function(e,t,n){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){var i=new PerformanceObserver((function(e){Promise.resolve().then((function(){t(e.getEntries())}))}));return i.observe(Object.assign({type:e,buffered:!0},n||{})),i}}catch(e){}},Mn=function(e,t,n,i){var r,o;return function(s){t.value>=0&&(s||i)&&((o=t.value-(r||0))||void 0===r)&&(r=t.value,t.delta=o,t.rating=function(e,t){return e>t[1]?"poor":e>t[0]?"needs-improvement":"good"}(t.value,n),e(t))}},An=function(e){requestAnimationFrame((function(){return requestAnimationFrame((function(){return e()}))}))},jn=function(e){document.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&e()}))},Dn=function(e){var t=!1;return function(){t||(e(),t=!0)}},Rn=-1,Un=function(){return"hidden"!==document.visibilityState||document.prerendering?1/0:0},Fn=function(e){"hidden"===document.visibilityState&&Rn>-1&&(Rn="visibilitychange"===e.type?e.timeStamp:0,zn())},Bn=function(){addEventListener("visibilitychange",Fn,!0),addEventListener("prerenderingchange",Fn,!0)},zn=function(){removeEventListener("visibilitychange",Fn,!0),removeEventListener("prerenderingchange",Fn,!0)},Vn=function(){return Rn<0&&(Rn=Un(),Bn(),Cn((function(){setTimeout((function(){Rn=Un(),Bn()}),0)}))),{get firstHiddenTime(){return Rn}}},$n=function(e){document.prerendering?addEventListener("prerenderingchange",(function(){return e()}),!0):e()},qn=[1800,3e3],Gn=function(e,t){t=t||{},$n((function(){var n,i=Vn(),r=Nn("FCP"),o=_n("paint",(function(e){e.forEach((function(e){"first-contentful-paint"===e.name&&(o.disconnect(),e.startTime<i.firstHiddenTime&&(r.value=Math.max(e.startTime-Pn(),0),r.entries.push(e),n(!0)))}))}));o&&(n=Mn(e,r,qn,t.reportAllChanges),Cn((function(i){r=Nn("FCP"),n=Mn(e,r,qn,t.reportAllChanges),An((function(){r.value=performance.now()-i.timeStamp,n(!0)}))})))}))},Hn=[.1,.25],Wn=0,Kn=1/0,Xn=0,Jn=function(e){e.forEach((function(e){e.interactionId&&(Kn=Math.min(Kn,e.interactionId),Xn=Math.max(Xn,e.interactionId),Wn=Xn?(Xn-Kn)/7+1:0)}))},Zn=function(){return Sn?Wn:performance.interactionCount||0},Yn=function(){"interactionCount"in performance||Sn||(Sn=_n("event",Jn,{type:"event",buffered:!0,durationThreshold:0}))},Qn=[],ei=new Map,ti=0,ni=[],ii=function(e){if(ni.forEach((function(t){return t(e)})),e.interactionId||"first-input"===e.entryType){var t=Qn[Qn.length-1],n=ei.get(e.interactionId);if(n||Qn.length<10||e.duration>t.latency){if(n)e.duration>n.latency?(n.entries=[e],n.latency=e.duration):e.duration===n.latency&&e.startTime===n.entries[0].startTime&&n.entries.push(e);else{var i={id:e.interactionId,latency:e.duration,entries:[e]};ei.set(i.id,i),Qn.push(i)}Qn.sort((function(e,t){return t.latency-e.latency})),Qn.length>10&&Qn.splice(10).forEach((function(e){return ei.delete(e.id)}))}}},ri=function(e){var t=self.requestIdleCallback||self.setTimeout,n=-1;return e=Dn(e),"hidden"===document.visibilityState?e():(n=t(e),jn(e)),n},oi=[200,500],si=function(e,t){"PerformanceEventTiming"in self&&"interactionId"in PerformanceEventTiming.prototype&&(t=t||{},$n((function(){var n;Yn();var i,r=Nn("INP"),o=function(e){ri((function(){e.forEach(ii);var t=function(){var e=Math.min(Qn.length-1,Math.floor((Zn()-ti)/50));return Qn[e]}();t&&t.latency!==r.value&&(r.value=t.latency,r.entries=t.entries,i())}))},s=_n("event",o,{durationThreshold:null!==(n=t.durationThreshold)&&void 0!==n?n:40});i=Mn(e,r,oi,t.reportAllChanges),s&&(s.observe({type:"first-input",buffered:!0}),jn((function(){o(s.takeRecords()),i(!0)})),Cn((function(){ti=Zn(),Qn.length=0,ei.clear(),r=Nn("INP"),i=Mn(e,r,oi,t.reportAllChanges)})))})))},ai=[],ui=[],li=0,ci=new WeakMap,di=new Map,fi=-1,pi=function(e){ai=ai.concat(e),mi()},mi=function(){fi<0&&(fi=ri(gi))},gi=function(){di.size>10&&di.forEach((function(e,t){ei.has(t)||di.delete(t)}));var e=Qn.map((function(e){return ci.get(e.entries[0])})),t=ui.length-50;ui=ui.filter((function(n,i){return i>=t||e.includes(n)}));for(var n=new Set,i=0;i<ui.length;i++){var r=ui[i];yi(r.startTime,r.processingEnd).forEach((function(e){n.add(e)}))}var o=ai.length-1-50;ai=ai.filter((function(e,t){return e.startTime>li&&t>o||n.has(e)})),fi=-1};ni.push((function(e){e.interactionId&&e.target&&!di.has(e.interactionId)&&di.set(e.interactionId,e.target)}),(function(e){var t,n=e.startTime+e.duration;li=Math.max(li,e.processingEnd);for(var i=ui.length-1;i>=0;i--){var r=ui[i];if(Math.abs(n-r.renderTime)<=8){(t=r).startTime=Math.min(e.startTime,t.startTime),t.processingStart=Math.min(e.processingStart,t.processingStart),t.processingEnd=Math.max(e.processingEnd,t.processingEnd),t.entries.push(e);break}}t||(t={startTime:e.startTime,processingStart:e.processingStart,processingEnd:e.processingEnd,renderTime:n,entries:[e]},ui.push(t)),(e.interactionId||"first-input"===e.entryType)&&ci.set(e,t),mi()}));var vi,hi,bi,wi,yi=function(e,t){for(var n,i=[],r=0;n=ai[r];r++)if(!(n.startTime+n.duration<e)){if(n.startTime>t)break;i.push(n)}return i},Si=[2500,4e3],Ei={},Ti=[800,1800],Ii=function e(t){document.prerendering?$n((function(){return e(t)})):"complete"!==document.readyState?addEventListener("load",(function(){return e(t)}),!0):setTimeout(t,0)},ki=function(e,t){t=t||{};var n=Nn("TTFB"),i=Mn(e,n,Ti,t.reportAllChanges);Ii((function(){var r=Tn();r&&(n.value=Math.max(r.responseStart-Pn(),0),n.entries=[r],i(!0),Cn((function(){n=Nn("TTFB",0),(i=Mn(e,n,Ti,t.reportAllChanges))(!0)})))}))},xi={passive:!0,capture:!0},Oi=new Date,Li=function(e,t){vi||(vi=t,hi=e,bi=new Date,Ni(removeEventListener),Ci())},Ci=function(){if(hi>=0&&hi<bi-Oi){var e={entryType:"first-input",name:vi.type,target:vi.target,cancelable:vi.cancelable,startTime:vi.timeStamp,processingStart:vi.timeStamp+hi};wi.forEach((function(t){t(e)})),wi=[]}},Pi=function(e){if(e.cancelable){var t=(e.timeStamp>1e12?new Date:performance.now())-e.timeStamp;"pointerdown"==e.type?function(e,t){var n=function(){Li(e,t),r()},i=function(){r()},r=function(){removeEventListener("pointerup",n,xi),removeEventListener("pointercancel",i,xi)};addEventListener("pointerup",n,xi),addEventListener("pointercancel",i,xi)}(t,e):Li(t,e)}},Ni=function(e){["mousedown","keydown","touchstart","pointerdown"].forEach((function(t){return e(t,Pi,xi)}))},_i=[100,300],Mi=function(e,t){!function(e,t){t=t||{},$n((function(){var n,i=Vn(),r=Nn("FID"),o=function(e){e.startTime<i.firstHiddenTime&&(r.value=e.processingStart-e.startTime,r.entries.push(e),n(!0))},s=function(e){e.forEach(o)},a=_n("first-input",s);n=Mn(e,r,_i,t.reportAllChanges),a&&(jn(Dn((function(){s(a.takeRecords()),a.disconnect()}))),Cn((function(){var i;r=Nn("FID"),n=Mn(e,r,_i,t.reportAllChanges),wi=[],hi=-1,vi=null,Ni(addEventListener),i=o,wi.push(i),Ci()})))}))}((function(t){var n=function(e){var t=e.entries[0],n={eventTarget:xn(t.target),eventType:t.name,eventTime:t.startTime,eventEntry:t,loadState:In(t.startTime)};return Object.assign(e,{attribution:n})}(t);e(n)}),t)};const Ai="com.grafana.faro.lastNavigationId",ji="load_state",Di="time_to_first_byte";class Ri{constructor(e){this.corePushMeasurement=e}initialize(){this.measureCLS(),this.measureFCP(),this.measureFID(),this.measureINP(),this.measureLCP(),this.measureTTFB()}measureCLS(){!function(e,t){!function(e,t){t=t||{},Gn(Dn((function(){var n,i=Nn("CLS",0),r=0,o=[],s=function(e){e.forEach((function(e){if(!e.hadRecentInput){var t=o[0],n=o[o.length-1];r&&e.startTime-n.startTime<1e3&&e.startTime-t.startTime<5e3?(r+=e.value,o.push(e)):(r=e.value,o=[e])}})),r>i.value&&(i.value=r,i.entries=o,n())},a=_n("layout-shift",s);a&&(n=Mn(e,i,Hn,t.reportAllChanges),jn((function(){s(a.takeRecords()),n(!0)})),Cn((function(){r=0,i=Nn("CLS",0),n=Mn(e,i,Hn,t.reportAllChanges),An((function(){return n()}))})),setTimeout(n,0))})))}((function(t){var n=function(e){var t,n={};if(e.entries.length){var i=e.entries.reduce((function(e,t){return e&&e.value>t.value?e:t}));if(i&&i.sources&&i.sources.length){var r=(t=i.sources).find((function(e){return e.node&&1===e.node.nodeType}))||t[0];r&&(n={largestShiftTarget:xn(r.node),largestShiftTime:i.startTime,largestShiftValue:i.value,largestShiftSource:r,largestShiftEntry:i,loadState:In(i.startTime)})}}return Object.assign(e,{attribution:n})}(t);e(n)}),t)}((e=>{const{loadState:t,largestShiftValue:n,largestShiftTime:i,largestShiftTarget:r}=e.attribution,o=this.buildInitialValues(e);this.addIfPresent(o,"largest_shift_value",n),this.addIfPresent(o,"largest_shift_time",i);const s=this.buildInitialContext(e);this.addIfPresent(s,ji,t),this.addIfPresent(s,"largest_shift_target",r),this.pushMeasurement(o,s)}))}measureFCP(){!function(e,t){Gn((function(t){var n=function(e){var t={timeToFirstByte:0,firstByteToFCP:e.value,loadState:In(Ln())};if(e.entries.length){var n=Tn(),i=e.entries[e.entries.length-1];if(n){var r=n.activationStart||0,o=Math.max(0,n.responseStart-r);t={timeToFirstByte:o,firstByteToFCP:e.value-o,loadState:In(e.entries[0].startTime),navigationEntry:n,fcpEntry:i}}}return Object.assign(e,{attribution:t})}(t);e(n)}),t)}((e=>{const{firstByteToFCP:t,timeToFirstByte:n,loadState:i}=e.attribution,r=this.buildInitialValues(e);this.addIfPresent(r,"first_byte_to_fcp",t),this.addIfPresent(r,Di,n);const o=this.buildInitialContext(e);this.addIfPresent(o,ji,i),this.pushMeasurement(r,o)}))}measureFID(){Mi((e=>{const{eventTime:t,eventTarget:n,eventType:i,loadState:r}=e.attribution,o=this.buildInitialValues(e);this.addIfPresent(o,"event_time",t);const s=this.buildInitialContext(e);this.addIfPresent(s,"event_target",n),this.addIfPresent(s,"event_type",i),this.addIfPresent(s,ji,r),this.pushMeasurement(o,s)}))}measureINP(){!function(e,t){En||(En=_n("long-animation-frame",pi)),si((function(t){var n=function(e){var t=e.entries[0],n=ci.get(t),i=t.processingStart,r=n.processingEnd,o=n.entries.sort((function(e,t){return e.processingStart-t.processingStart})),s=yi(t.startTime,r),a=e.entries.find((function(e){return e.target})),u=a&&a.target||di.get(t.interactionId),l=[t.startTime+t.duration,r].concat(s.map((function(e){return e.startTime+e.duration}))),c=Math.max.apply(Math,l),d={interactionTarget:xn(u),interactionTargetElement:u,interactionType:t.name.startsWith("key")?"keyboard":"pointer",interactionTime:t.startTime,nextPaintTime:c,processedEventEntries:o,longAnimationFrameEntries:s,inputDelay:i-t.startTime,processingDuration:r-i,presentationDelay:Math.max(c-r,0),loadState:In(t.startTime)};return Object.assign(e,{attribution:d})}(t);e(n)}),t)}((e=>{const{interactionTime:t,presentationDelay:n,inputDelay:i,processingDuration:r,nextPaintTime:o,loadState:s,interactionTarget:a,interactionType:u}=e.attribution,l=this.buildInitialValues(e);this.addIfPresent(l,"interaction_time",t),this.addIfPresent(l,"presentation_delay",n),this.addIfPresent(l,"input_delay",i),this.addIfPresent(l,"processing_duration",r),this.addIfPresent(l,"next_paint_time",o);const c=this.buildInitialContext(e);this.addIfPresent(c,ji,s),this.addIfPresent(c,"interaction_target",a),this.addIfPresent(c,"interaction_type",u),this.pushMeasurement(l,c)}))}measureLCP(){!function(e,t){!function(e,t){t=t||{},$n((function(){var n,i=Vn(),r=Nn("LCP"),o=function(e){t.reportAllChanges||(e=e.slice(-1)),e.forEach((function(e){e.startTime<i.firstHiddenTime&&(r.value=Math.max(e.startTime-Pn(),0),r.entries=[e],n())}))},s=_n("largest-contentful-paint",o);if(s){n=Mn(e,r,Si,t.reportAllChanges);var a=Dn((function(){Ei[r.id]||(o(s.takeRecords()),s.disconnect(),Ei[r.id]=!0,n(!0))}));["keydown","click"].forEach((function(e){addEventListener(e,(function(){return ri(a)}),{once:!0,capture:!0})})),jn(a),Cn((function(i){r=Nn("LCP"),n=Mn(e,r,Si,t.reportAllChanges),An((function(){r.value=performance.now()-i.timeStamp,Ei[r.id]=!0,n(!0)}))}))}}))}((function(t){var n=function(e){var t={timeToFirstByte:0,resourceLoadDelay:0,resourceLoadDuration:0,elementRenderDelay:e.value};if(e.entries.length){var n=Tn();if(n){var i=n.activationStart||0,r=e.entries[e.entries.length-1],o=r.url&&performance.getEntriesByType("resource").filter((function(e){return e.name===r.url}))[0],s=Math.max(0,n.responseStart-i),a=Math.max(s,o?(o.requestStart||o.startTime)-i:0),u=Math.max(a,o?o.responseEnd-i:0),l=Math.max(u,r.startTime-i);t={element:xn(r.element),timeToFirstByte:s,resourceLoadDelay:a-s,resourceLoadDuration:u-a,elementRenderDelay:l-u,navigationEntry:n,lcpEntry:r},r.url&&(t.url=r.url),o&&(t.lcpResourceEntry=o)}}return Object.assign(e,{attribution:t})}(t);e(n)}),t)}((e=>{const{elementRenderDelay:t,resourceLoadDelay:n,resourceLoadDuration:i,timeToFirstByte:r,element:o}=e.attribution,s=this.buildInitialValues(e);this.addIfPresent(s,"element_render_delay",t),this.addIfPresent(s,"resource_load_delay",n),this.addIfPresent(s,"resource_load_duration",i),this.addIfPresent(s,Di,r);const a=this.buildInitialContext(e);this.addIfPresent(a,"element",o),this.pushMeasurement(s,a)}))}measureTTFB(){!function(e,t){ki((function(t){var n=function(e){var t={waitingDuration:0,cacheDuration:0,dnsDuration:0,connectionDuration:0,requestDuration:0};if(e.entries.length){var n=e.entries[0],i=n.activationStart||0,r=Math.max((n.workerStart||n.fetchStart)-i,0),o=Math.max(n.domainLookupStart-i,0),s=Math.max(n.connectStart-i,0),a=Math.max(n.connectEnd-i,0);t={waitingDuration:r,cacheDuration:o-r,dnsDuration:s-o,connectionDuration:a-s,requestDuration:e.value-a,navigationEntry:n}}return Object.assign(e,{attribution:t})}(t);e(n)}),t)}((e=>{const{dnsDuration:t,connectionDuration:n,requestDuration:i,waitingDuration:r,cacheDuration:o}=e.attribution,s=this.buildInitialValues(e);this.addIfPresent(s,"dns_duration",t),this.addIfPresent(s,"connection_duration",n),this.addIfPresent(s,"request_duration",i),this.addIfPresent(s,"waiting_duration",r),this.addIfPresent(s,"cache_duration",o);const a=this.buildInitialContext(e);this.pushMeasurement(s,a)}))}buildInitialValues(e){const t=e.name.toLowerCase();return{[t]:e.value,delta:e.delta}}buildInitialContext(e){var t;const n=null!==(t=Oe(Ai,ke.session))&&void 0!==t?t:be;return{id:e.id,rating:e.rating,navigation_type:e.navigationType,navigation_entry_id:n}}pushMeasurement(e,t){this.corePushMeasurement({type:"web-vitals",values:e},{context:t})}addIfPresent(e,t,n){n&&(e[t]=n)}}class Ui extends re{constructor(){super(...arguments),this.name="@grafana/faro-web-sdk:instrumentation-web-vitals",this.version=oe}initialize(){this.logDebug("Initializing");this.intializeWebVitalsInstrumentation().initialize()}intializeWebVitalsInstrumentation(){return this.config.trackWebVitalsAttribution?new Ri(this.api.pushMeasurement):new yn(this.api.pushMeasurement)}}function Fi(e,t,n,i){return new(n||(n=Promise))((function(r,o){function s(e){try{u(i.next(e))}catch(e){o(e)}}function a(e){try{u(i.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((i=i.apply(e,t||[])).next())}))}"function"==typeof SuppressedError&&SuppressedError;const Bi=/^00-[a-f0-9]{32}-[a-f0-9]{16}-[0-9]{1,2}$/;function zi(e=[]){for(const t of e)if("traceparent"===t.name){if(!Bi.test(t.description))continue;const[,e,n]=t.description.split("-");if(null!=e&&null!=n)return{traceId:e,spanId:n};break}}function Vi(e=[],t){return e.some((e=>e&&null!=t.match(e)))}function $i(e,t={}){for(const[n,i]of Object.entries(t)){const t=e[n];return null!=t&&(l(i)?i.includes(t):t===i)}return!0}function qi(e){const{connectEnd:t,connectStart:n,decodedBodySize:i,domainLookupEnd:r,domainLookupStart:o,duration:s,encodedBodySize:a,fetchStart:u,initiatorType:l,name:c,nextHopProtocol:d,redirectEnd:f,redirectStart:p,renderBlockingStatus:m,requestStart:g,responseEnd:v,responseStart:h,responseStatus:b,secureConnectionStart:w,transferSize:y,workerStart:S}=e;return{name:c,duration:Hi(s),tcpHandshakeTime:Hi(t-n),dnsLookupTime:Hi(r-o),tlsNegotiationTime:Hi(g-w),responseStatus:Hi(b),redirectTime:Hi(f-p),requestTime:Hi(h-g),responseTime:Hi(v-h),fetchTime:Hi(v-u),serviceWorkerTime:Hi(u-S),decodedBodySize:Hi(i),encodedBodySize:Hi(a),cacheHitStatus:function(){let e="fullLoad";0===y?i>0&&(e="cache"):null!=b?304===b&&(e="conditionalFetch"):a>0&&y<a&&(e="conditionalFetch");return e}(),renderBlockingStatus:Hi(m),protocol:d,initiatorType:l,visibilityState:document.visibilityState,ttfb:Hi(h-g)}}function Gi(e){const{activationStart:t,domComplete:n,domContentLoadedEventEnd:i,domContentLoadedEventStart:r,domInteractive:o,fetchStart:s,loadEventEnd:a,loadEventStart:u,responseStart:l,type:c}=e,d=function(){var e;if(null!=(null===(e=performance.timing)||void 0===e?void 0:e.domLoading))return performance.timing.domLoading-performance.timeOrigin;return null}();return Object.assign(Object.assign({},qi(e)),{pageLoadTime:Hi(n-s),documentParsingTime:Hi(d?o-d:null),domProcessingTime:Hi(n-o),domContentLoadHandlerTime:Hi(i-r),onLoadTime:Hi(a-u),ttfb:Hi(Math.max(l-(null!=t?t:0),0)),type:c})}function Hi(e){return null==e?be:"number"==typeof e?Math.round(e).toString():e.toString()}const Wi={initiatorType:["xmlhttprequest","fetch"]};class Ki extends re{constructor(){super(...arguments),this.name="@grafana/faro-web-sdk:instrumentation-performance",this.version=oe}initialize(){"PerformanceObserver"in window?function(e){if("complete"===document.readyState)e();else{const t=()=>{"complete"===document.readyState&&(e(),document.removeEventListener("readystatechange",t))};document.addEventListener("readystatechange",t)}}((()=>Fi(this,void 0,void 0,(function*(){const t=this.api.pushEvent,n=this.getIgnoreUrls(),{faroNavigationId:i}=yield function(e,t){let n;const i=new Promise((e=>{n=e}));return new PerformanceObserver((i=>{var r;const[o]=i.getEntries();if(null==o||Vi(t,o.name))return;const s=o.toJSON();let a=zi(null==s?void 0:s.serverTiming);const u=null!==(r=Oe(Ai,ke.session))&&void 0!==r?r:be,l=Object.assign(Object.assign({},Gi(s)),{faroNavigationId:N(),faroPreviousNavigationId:u});Le(Ai,l.faroNavigationId,ke.session),e("faro.performance.navigation",l,void 0,{spanContext:a,timestampOverwriteMs:performance.timeOrigin+s.startTime}),n(l)})).observe({type:"navigation",buffered:!0}),i}(t,n);null!=i&&function(t,n,i){const r=e.faro.config.trackResources;new PerformanceObserver((e=>{const o=e.getEntries();for(const e of o){if(Vi(i,e.name))return;const o=e.toJSON();let s=zi(null==o?void 0:o.serverTiming);if(null==r&&$i(o,Wi)||r){const e=Object.assign(Object.assign({},qi(o)),{faroNavigationId:t,faroResourceId:N()});n("faro.performance.resource",e,void 0,{spanContext:s,timestampOverwriteMs:performance.timeOrigin+o.startTime})}}})).observe({type:"resource",buffered:!0})}(i,t,n)})))):this.logDebug("performance observer not supported. Disable performance instrumentation.")}getIgnoreUrls(){var e;return null===(e=this.transports.transports)||void 0===e?void 0:e.flatMap((e=>e.getIgnoreUrls()))}}function Xi(e={}){const t=[new Tt,new Ui,new Ke,new It];return!1!==e.enablePerformanceInstrumentation&&t.unshift(new Ki),!1!==e.captureConsole&&t.push(new Et({disabledLevels:e.captureConsoleDisabledLevels})),t}const Ji="browser",Zi=()=>{const e=window.k6;return{k6:Object.assign({isK6Browser:!0},(null==e?void 0:e.testRunId)&&{testRunId:null==e?void 0:e.testRunId})}};let Yi,Qi;function er({generatePageId:e,initialPageMeta:t}={}){return()=>{const n=location.href;return u(e)&&Yi!==n&&(Yi=n,Qi=e(location)),{page:Object.assign(Object.assign({url:n},Qi?{id:Qi}:{}),t)}}}class tr extends X{constructor(e){var t,n,i,r;super(),this.options=e,this.name="@grafana/faro-web-sdk:transport-fetch",this.version=oe,this.disabledUntil=new Date,this.rateLimitBackoffMs=null!==(t=e.defaultRateLimitBackoffMs)&&void 0!==t?t:5e3,this.getNow=null!==(n=e.getNow)&&void 0!==n?n:()=>Date.now(),this.promiseBuffer=C({size:null!==(i=e.bufferSize)&&void 0!==i?i:30,concurrency:null!==(r=e.concurrency)&&void 0!==r?r:5})}send(e){return Fi(this,void 0,void 0,(function*(){try{if(this.disabledUntil>new Date(this.getNow()))return this.logWarn(`Dropping transport item due to too many requests. Backoff until ${this.disabledUntil}`),Promise.resolve();yield this.promiseBuffer.add((()=>{const t=JSON.stringify(Z(e)),{url:n,requestOptions:i,apiKey:r}=this.options,o=null!=i?i:{},{headers:s}=o,a=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]])}return n}(o,["headers"]);let u;const l=this.metas.value.session;return null!=l&&(u=l.id),fetch(n,Object.assign({method:"POST",headers:Object.assign(Object.assign(Object.assign({"Content-Type":"application/json"},null!=s?s:{}),r?{"x-api-key":r}:{}),u?{"x-faro-session-id":u}:{}),body:t,keepalive:t.length<=6e4},null!=a?a:{})).then((e=>Fi(this,void 0,void 0,(function*(){if(202===e.status){"invalid"===e.headers.get("X-Faro-Session-Status")&&this.extendFaroSession(this.config,this.logDebug)}return 429===e.status&&(this.disabledUntil=this.getRetryAfterDate(e),this.logWarn(`Too many requests, backing off until ${this.disabledUntil}`)),e.text().catch(L),e})))).catch((e=>{this.logError("Failed sending payload to the receiver\n",JSON.parse(t),e)}))}))}catch(e){this.logError(e)}}))}getIgnoreUrls(){var e;return[this.options.url].concat(null!==(e=this.config.ignoreUrls)&&void 0!==e?e:[])}isBatched(){return!0}getRetryAfterDate(e){const t=this.getNow(),n=e.headers.get("Retry-After");if(n){const e=Number(n);if(!isNaN(e))return new Date(1e3*e+t);const i=Date.parse(n);if(!isNaN(i))return new Date(i)}return new Date(t+this.rateLimitBackoffMs)}extendFaroSession(e,t){const n="Session expired",i=e.sessionTracking;if(null==i?void 0:i.enabled){const{fetchUserSession:e,storeUserSession:r}=We(i);Ve({fetchUserSession:e,storeUserSession:r})({forceSessionExtend:!0}),t(`${n} created new session.`)}else t(`${n}.`)}}function nr(e){var t;const n=[],i=G(e.unpatchedConsole,e.internalLoggerLevel);e.transports?((e.url||e.apiKey)&&i.error('if "transports" is defined, "url" and "apiKey" should not be defined'),n.push(...e.transports)):e.url?n.push(new tr({url:e.url,apiKey:e.apiKey})):i.error('either "url" or "transports" must be defined');const{app:r,batching:o,beforeSend:s,consoleInstrumentation:a,ignoreErrors:u,sessionTracking:l,trackResources:c,trackWebVitalsAttribution:d,user:f,view:p,dedupe:m=!0,eventDomain:g=Ji,globalObjectKey:v=de,instrumentations:h=Xi(),internalLoggerLevel:b=z,isolate:w=!1,logArgsSerializer:y=ne,metas:S=ir(e),paused:E=!1,preventGlobalExposure:T=!1,unpatchedConsole:I=V}=e;return{app:r,batching:Object.assign(Object.assign({},fe),o),dedupe:m,globalObjectKey:v,instrumentations:h,internalLoggerLevel:b,isolate:w,logArgsSerializer:y,metas:S,parseStacktrace:bt,paused:E,preventGlobalExposure:T,transports:n,unpatchedConsole:I,beforeSend:s,eventDomain:g,ignoreErrors:u,ignoreUrls:(null!==(t=e.ignoreUrls)&&void 0!==t?t:[]).concat([/\/collect(?:\/[\w]*)?$/]),sessionTracking:Object.assign(Object.assign({},Ue),l),user:f,view:p,trackResources:c,trackWebVitalsAttribution:d,consoleInstrumentation:a}}function ir(e){var t,n;const{page:i,generatePageId:r}=null!==(t=null==e?void 0:e.pageTracking)&&void 0!==t?t:{},o=[Te,er({generatePageId:r,initialPageMeta:i}),...null!==(n=e.metas)&&void 0!==n?n:[]];return a(window.k6)?[...o,Zi]:o}return e.BaseExtension=K,e.BaseInstrumentation=re,e.BaseTransport=X,e.ConsoleInstrumentation=Et,e.ConsoleTransport=class extends X{constructor(e={}){super(),this.options=e,this.name="@grafana/faro-web-sdk:transport-console",this.version=oe}send(t){var n;return this.unpatchedConsole[null!==(n=this.options.level)&&void 0!==n?n:e.LogLevel.DEBUG]("New event",Z([t]))}},e.Conventions={EventNames:{CLICK:"click",NAVIGATION:"navigation",SESSION_START:"session_start",VIEW_CHANGED:"view_changed"}},e.EVENT_CLICK="click",e.EVENT_NAVIGATION="navigation",e.EVENT_ROUTE_CHANGE="route_change",e.EVENT_SESSION_EXTEND=ve,e.EVENT_SESSION_RESUME=ge,e.EVENT_SESSION_START=me,e.EVENT_VIEW_CHANGED=pe,e.ErrorsInstrumentation=Tt,e.FetchTransport=tr,e.MAX_SESSION_PERSISTENCE_TIME=Re,e.MAX_SESSION_PERSISTENCE_TIME_BUFFER=6e4,e.PerformanceInstrumentation=Ki,e.PersistentSessionsManager=Ge,e.SESSION_EXPIRATION_TIME=je,e.SESSION_INACTIVITY_TIME=De,e.STORAGE_KEY=Ae,e.SessionInstrumentation=Ke,e.VERSION=oe,e.ViewInstrumentation=It,e.VolatileSessionsManager=He,e.WebVitalsInstrumentation=Ui,e.allLogLevels=O,e.browserMeta=Te,e.buildStackFrame=gt,e.createInternalLogger=G,e.createPromiseBuffer=C,e.createSession=Ie,e.deepEqual=S,e.defaultEventDomain=Ji,e.defaultExceptionType=Y,e.defaultGlobalObjectKey=de,e.defaultInternalLoggerLevel=z,e.defaultLogLevel=x,e.genShortID=N,e.getCurrentTimestamp=T,e.getDataFromSafariExtensions=vt,e.getIgnoreUrls=function(){return e.faro.transports.transports.flatMap((e=>e.getIgnoreUrls()))},e.getInternalFaroFromGlobalObject=function(){return _[se]},e.getStackFramesFromError=ht,e.getTransportBody=Z,e.getWebInstrumentations=Xi,e.globalObject=_,e.initializeFaro=function(e){const t=nr(e);if(t)return ce(t)},e.internalGlobalObjectKey=se,e.isArray=l,e.isBoolean=e=>t(e,"boolean"),e.isDomError=v,e.isDomException=h,e.isElement=e=>b&&i(e,Element),e.isElementDefined=b,e.isError=m,e.isErrorDefined=p,e.isErrorEvent=g,e.isEvent=f,e.isEventDefined=d,e.isFunction=u,e.isInstanceOf=i,e.isInt=e=>s(e)&&Number.isInteger(e),e.isInternalFaroOnGlobalObject=ue,e.isMap=e=>w&&i(e,Map),e.isMapDefined=w,e.isNull=r,e.isNumber=s,e.isObject=a,e.isPrimitive=c,e.isRegExp=e=>n(e,"RegExp"),e.isString=o,e.isSymbol=e=>t(e,"symbol"),e.isSyntheticEvent=e=>a(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e,e.isThenable=e=>u(null==e?void 0:e.then),e.isToString=n,e.isTypeof=t,e.isUndefined=e=>t(e,"undefined"),e.makeCoreConfig=nr,e.noop=L,e.parseStacktrace=bt,e.sdkMeta=()=>({sdk:{name:"@grafana/faro-core",version:oe,integrations:e.faro.config.instrumentations.map((({name:e,version:t})=>({name:e,version:t})))}}),e.setInternalFaroOnGlobalObject=ae,e.transportItemTypeToBodyKey=D,e}({});
|
|
@@ -4,7 +4,7 @@ export { defaultEventDomain } from './consts';
|
|
|
4
4
|
export { initializeFaro } from './initialize';
|
|
5
5
|
export { buildStackFrame, ConsoleInstrumentation, ErrorsInstrumentation, getDataFromSafariExtensions, getStackFramesFromError, parseStacktrace, ViewInstrumentation, WebVitalsInstrumentation, SessionInstrumentation, PerformanceInstrumentation, } from './instrumentations';
|
|
6
6
|
export type { ConsoleInstrumentationOptions, ErrorEvent, ExtendedPromiseRejectionEvent } from './instrumentations';
|
|
7
|
-
export { browserMeta, createSession,
|
|
7
|
+
export { browserMeta, createSession, sdkMeta } from './metas';
|
|
8
8
|
export { ConsoleTransport, FetchTransport } from './transports';
|
|
9
9
|
export type { ClockFn, ConsoleTransportOptions, FetchTransportOptions, FetchTransportRequestOptions, } from './transports';
|
|
10
10
|
export { faro, allLogLevels, BaseExtension, BaseInstrumentation, BaseTransport, Conventions, createInternalLogger, createPromiseBuffer, deepEqual, defaultExceptionType, defaultGlobalObjectKey, defaultInternalLoggerLevel, defaultLogLevel, genShortID, getCurrentTimestamp, getInternalFaroFromGlobalObject, getTransportBody, globalObject, internalGlobalObjectKey, isArray, isBoolean, isDomError, isDomException, isElement, isElementDefined, isError, isErrorDefined, isErrorEvent, isEvent, isEventDefined, isFunction, isInstanceOf, isInt, isInternalFaroOnGlobalObject, isMap, isMapDefined, isNull, isNumber, isObject, isPrimitive, isRegExp, isString, isSymbol, isSyntheticEvent, isThenable, isToString, isTypeof, isUndefined, InternalLoggerLevel, LogLevel, noop, setInternalFaroOnGlobalObject, TransportItemType, transportItemTypeToBodyKey, VERSION, EVENT_CLICK, EVENT_NAVIGATION, EVENT_ROUTE_CHANGE, EVENT_SESSION_EXTEND, EVENT_SESSION_RESUME, EVENT_SESSION_START, EVENT_VIEW_CHANGED, } from '@grafana/faro-core';
|
|
@@ -3,8 +3,10 @@ import type { ConsoleInstrumentationOptions } from './types';
|
|
|
3
3
|
export declare class ConsoleInstrumentation extends BaseInstrumentation {
|
|
4
4
|
private options;
|
|
5
5
|
readonly name = "@grafana/faro-web-sdk:instrumentation-console";
|
|
6
|
-
readonly version = "1.
|
|
6
|
+
readonly version = "1.13.0";
|
|
7
7
|
static defaultDisabledLevels: LogLevel[];
|
|
8
|
+
static consoleErrorPrefix: string;
|
|
9
|
+
private errorSerializer;
|
|
8
10
|
constructor(options?: ConsoleInstrumentationOptions);
|
|
9
11
|
initialize(): void;
|
|
10
12
|
}
|
|
@@ -1,3 +1,10 @@
|
|
|
1
|
-
import type { ExceptionStackFrame } from '@grafana/faro-core';
|
|
1
|
+
import type { ExceptionStackFrame, LogArgsSerializer } from '@grafana/faro-core';
|
|
2
2
|
import type { ErrorEvent } from './types';
|
|
3
3
|
export declare function getErrorDetails(evt: ErrorEvent): [string | undefined, string | undefined, ExceptionStackFrame[]];
|
|
4
|
+
export interface ErrorDetails {
|
|
5
|
+
value?: string;
|
|
6
|
+
type?: string;
|
|
7
|
+
stackFrames?: ExceptionStackFrame[];
|
|
8
|
+
}
|
|
9
|
+
export declare function getDetailsFromErrorArgs(args: [any?, ...any[]]): ErrorDetails;
|
|
10
|
+
export declare function getDetailsFromConsoleErrorArgs(args: [any?, ...any[]], serializer: LogArgsSerializer): ErrorDetails;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BaseInstrumentation } from '@grafana/faro-core';
|
|
2
2
|
export declare class ErrorsInstrumentation extends BaseInstrumentation {
|
|
3
3
|
readonly name = "@grafana/faro-web-sdk:instrumentation-errors";
|
|
4
|
-
readonly version = "1.
|
|
4
|
+
readonly version = "1.13.0";
|
|
5
5
|
initialize(): void;
|
|
6
6
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { BaseInstrumentation } from '@grafana/faro-core';
|
|
2
2
|
export declare class PerformanceInstrumentation extends BaseInstrumentation {
|
|
3
3
|
readonly name = "@grafana/faro-web-sdk:instrumentation-performance";
|
|
4
|
-
readonly version = "1.
|
|
4
|
+
readonly version = "1.13.0";
|
|
5
5
|
initialize(): void;
|
|
6
6
|
private getIgnoreUrls;
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { BaseInstrumentation } from '@grafana/faro-core';
|
|
2
2
|
export declare class SessionInstrumentation extends BaseInstrumentation {
|
|
3
3
|
readonly name = "@grafana/faro-web-sdk:instrumentation-session";
|
|
4
|
-
readonly version = "1.
|
|
4
|
+
readonly version = "1.13.0";
|
|
5
5
|
private notifiedSession;
|
|
6
6
|
private sendSessionStartEvent;
|
|
7
7
|
private createInitialSession;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Meta } from '@grafana/faro-core';
|
|
1
2
|
import type { FaroUserSession } from './types';
|
|
2
3
|
type CreateUserSessionObjectParams = {
|
|
3
4
|
sessionId?: string;
|
|
@@ -16,4 +17,9 @@ type UpdateSessionParams = {
|
|
|
16
17
|
};
|
|
17
18
|
export declare function getUserSessionUpdater({ fetchUserSession, storeUserSession, }: GetUserSessionUpdaterParams): (options?: UpdateSessionParams) => void;
|
|
18
19
|
export declare function addSessionMetadataToNextSession(newSession: FaroUserSession, previousSession: FaroUserSession | null): Required<FaroUserSession>;
|
|
20
|
+
type GetUserSessionMetaUpdateHandlerParams = {
|
|
21
|
+
storeUserSession: (session: FaroUserSession) => void;
|
|
22
|
+
fetchUserSession: () => FaroUserSession | null;
|
|
23
|
+
};
|
|
24
|
+
export declare function getSessionMetaUpdateHandler({ fetchUserSession, storeUserSession, }: GetUserSessionMetaUpdateHandlerParams): (meta: Meta) => void;
|
|
19
25
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { BaseInstrumentation } from '@grafana/faro-core';
|
|
2
2
|
export declare class ViewInstrumentation extends BaseInstrumentation {
|
|
3
3
|
readonly name = "@grafana/faro-web-sdk:instrumentation-view";
|
|
4
|
-
readonly version = "1.
|
|
4
|
+
readonly version = "1.13.0";
|
|
5
5
|
private notifiedView;
|
|
6
6
|
private sendViewChangedEvent;
|
|
7
7
|
initialize(): void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { BaseInstrumentation } from '@grafana/faro-core';
|
|
2
2
|
export declare class WebVitalsInstrumentation extends BaseInstrumentation {
|
|
3
3
|
readonly name = "@grafana/faro-web-sdk:instrumentation-web-vitals";
|
|
4
|
-
readonly version = "1.
|
|
4
|
+
readonly version = "1.13.0";
|
|
5
5
|
initialize(): void;
|
|
6
6
|
private intializeWebVitalsInstrumentation;
|
|
7
7
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { createPageMeta } from './meta';
|
|
@@ -1,2 +1,7 @@
|
|
|
1
|
-
import type
|
|
2
|
-
|
|
1
|
+
import { type Meta, type MetaItem } from '@grafana/faro-core';
|
|
2
|
+
type createPageMetaProps = {
|
|
3
|
+
generatePageId?: (location: Location) => string;
|
|
4
|
+
initialPageMeta?: Meta['page'];
|
|
5
|
+
};
|
|
6
|
+
export declare function createPageMeta({ generatePageId, initialPageMeta }?: createPageMetaProps): MetaItem<Pick<Meta, 'page'>>;
|
|
7
|
+
export {};
|
|
@@ -4,7 +4,7 @@ import type { ConsoleTransportOptions } from './types';
|
|
|
4
4
|
export declare class ConsoleTransport extends BaseTransport {
|
|
5
5
|
private options;
|
|
6
6
|
readonly name = "@grafana/faro-web-sdk:transport-console";
|
|
7
|
-
readonly version = "1.
|
|
7
|
+
readonly version = "1.13.0";
|
|
8
8
|
constructor(options?: ConsoleTransportOptions);
|
|
9
9
|
send(item: TransportItem): void;
|
|
10
10
|
}
|
|
@@ -4,7 +4,7 @@ import type { FetchTransportOptions } from './types';
|
|
|
4
4
|
export declare class FetchTransport extends BaseTransport {
|
|
5
5
|
private options;
|
|
6
6
|
readonly name = "@grafana/faro-web-sdk:transport-fetch";
|
|
7
|
-
readonly version = "1.
|
|
7
|
+
readonly version = "1.13.0";
|
|
8
8
|
promiseBuffer: PromiseBuffer<Response | void>;
|
|
9
9
|
private readonly rateLimitBackoffMs;
|
|
10
10
|
private readonly getNow;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
export { isLocalStorageAvailable, isSessionStorageAvailable, webStorageType, getItem, isWebStorageAvailable, removeItem, setItem, } from './webStorage';
|
|
2
2
|
export { throttle } from './throttle';
|
|
3
|
-
export { getCircularDependencyReplacer, stringifyExternalJson } from './json';
|
|
4
3
|
export { getIgnoreUrls } from './url';
|