PageSourceSearch

https://business.jobandtalent.com/_next/static/chunks/0fw6k34yngngd.js

js jobandtalent.com collected 2026-09-24 09:25:57 UTC 171,931 bytes, 11 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,510190,515e3,998023,481044,752791,54097,752420,264791,917147,468190,971517,74587,102091,668324,525891,942765,720427,899745,951178,86522,864545,91047,678638,7058,563556,54828,833875,780093,3082,e=>{"use strict";var t,i,r,n,s,a;function o(e){return Symbol.for(e)}let l=new class e{constructor(t){const i=this;i._currentContext=t?new Map(t):new Map,i.getValue=e=>i._currentContext.get(e),i.setValue=(t,r)=>{let n=new e(i._currentContext);return n._currentContext.set(t,r),n},i.deleteValue=t=>{let r=new e(i._currentContext);return r._currentContext.delete(t),r}}};e.s(["ROOT_CONTEXT",0,l,"createContextKey",0,o],515e3);let u="1.9.1",c=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/,d=function(e){let t=new Set([e]),i=new Set,r=e.match(c);if(!r)return()=>!1;let n={major:+r[1],minor:+r[2],patch:+r[3],prerelease:r[4]};if(null!=n.prerelease)return function(t){return t===e};function s(e){return i.add(e),!1}return function(e){if(t.has(e))return!0;if(i.has(e))return!1;let r=e.match(c);if(!r)return s(e);let a={major:+r[1],minor:+r[2],patch:+r[3],prerelease:r[4]};if(null!=a.prerelease||n.major!==a.major)return s(e);if(0===n.major)return n.minor===a.minor&&n.patch<=a.patch?(t.add(e),!0):s(e);return n.minor<=a.minor?(t.add(e),!0):s(e)}}(u),h=u.split(".")[0],p=Symbol.for(`opentelemetry.js.api.${h}`),g="object"==typeof globalThis?globalThis:"object"==typeof self?self:"object"==typeof window?window:e.g;function m(e,t,i,r=!1){var n;let s=g[p]=null!=(n=g[p])?n:{version:u};if(!r&&s[e]){let t=Error(`@opentelemetry/api: Attempted duplicate registration of API: ${e}`);return i.error(t.stack||t.message),!1}if(s.version!==u){let t=Error(`@opentelemetry/api: Registration of version v${s.version} for ${e} does not match previously registered API v${u}`);return i.error(t.stack||t.message),!1}return s[e]=t,i.debug(`@opentelemetry/api: Registered a global for ${e} v${u}.`),!0}function f(e){var t,i;let r=null==(t=g[p])?void 0:t.version;if(r&&d(r))return null==(i=g[p])?void 0:i[e]}function b(e,t){t.debug(`@opentelemetry/api: Unregistering a global for ${e} v${u}.`);let i=g[p];i&&delete i[e]}e.s(["getGlobal",0,f,"registerGlobal",0,m,"unregisterGlobal",0,b],998023);class v{constructor(e){this._namespace=e.namespace||"DiagComponentLogger"}debug(...e){return _("debug",this._namespace,e)}error(...e){return _("error",this._namespace,e)}info(...e){return _("info",this._namespace,e)}warn(...e){return _("warn",this._namespace,e)}verbose(...e){return _("verbose",this._namespace,e)}}function _(e,t,i){let r=f("diag");if(r)return r[e](t,...i)}(n=t||(t={}))[n.NONE=0]="NONE",n[n.ERROR=30]="ERROR",n[n.WARN=50]="WARN",n[n.INFO=60]="INFO",n[n.DEBUG=70]="DEBUG",n[n.VERBOSE=80]="VERBOSE",n[n.ALL=9999]="ALL",e.s(["DiagLogLevel",0,t],481044);class T{static instance(){return this._instance||(this._instance=new T),this._instance}constructor(){function e(e){return function(...t){let i=f("diag");if(i)return i[e](...t)}}const i=this;i.setLogger=(e,r={logLevel:t.INFO})=>{var n,s,a;if(e===i){let e=Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");return i.error(null!=(n=e.stack)?n:e.message),!1}"number"==typeof r&&(r={logLevel:r});let o=f("diag"),l=function(e,i){function r(t,r){let n=i[t];return"function"==typeof n&&e>=r?n.bind(i):function(){}}return e<t.NONE?e=t.NONE:e>t.ALL&&(e=t.ALL),i=i||{},{error:r("error",t.ERROR),warn:r("warn",t.WARN),info:r("info",t.INFO),debug:r("debug",t.DEBUG),verbose:r("verbose",t.VERBOSE)}}(null!=(s=r.logLevel)?s:t.INFO,e);if(o&&!r.suppressOverrideMessage){let e=null!=(a=Error().stack)?a:"<failed to generate stacktrace>";o.warn(`Current logger will be overwritten from ${e}
1`),l.warn(`Current logger will overwrite one already registered from ${e}`)}return m("diag",l,i,!0)},i.disable=()=>{b("diag",i)},i.createComponentLogger=e=>new v(e),i.verbose=e("verbose"),i.debug=e("debug"),i.info=e("info"),i.warn=e("warn"),i.error=e("error")}}e.s(["DiagAPI",0,T],752791);let E="context",S=new class{active(){return l}with(e,t,i,...r){return t.call(i,...r)}bind(e,t){return t}enable(){return this}disable(){return this}};class w{static getInstance(){return this._instance||(this._instance=new w),this._instance}setGlobalContextManager(e){return m(E,e,T.instance())}active(){return this._getContextManager().active()}with(e,t,i,...r){return this._getContextManager().with(e,t,i,...r)}bind(e,t){return this._getContextManager().bind(e,t)}_getContextManager(){return f(E)||S}disable(){this._getContextManager().disable(),b(E,T.instance())}}let y=w.getInstance();e.s(["context",0,y],510190),(s=i||(i={}))[s.NONE=0]="NONE",s[s.SAMPLED=1]="SAMPLED",e.s(["TraceFlags",0,i],54097);let O="0000000000000000",A="00000000000000000000000000000000",R={traceId:A,spanId:O,traceFlags:i.NONE};e.s(["INVALID_SPANID",0,O,"INVALID_SPAN_CONTEXT",0,R,"INVALID_TRACEID",0,A],752420);class C{constructor(e=R){this._spanContext=e}spanContext(){return this._spanContext}setAttribute(e,t){return this}setAttributes(e){return this}addEvent(e,t){return this}addLink(e){return this}addLinks(e){return this}setStatus(e){return this}updateName(e){return this}end(e){}isRecording(){return!1}recordException(e,t){}}let x=o("OpenTelemetry Context Key SPAN");function N(e){return e.getValue(x)||void 0}function L(){return N(w.getInstance().active())}function P(e,t){return e.setValue(x,t)}function I(e){return e.deleteValue(x)}function k(e,t){return P(e,new C(t))}function D(e){var t;return null==(t=N(e))?void 0:t.spanContext()}let M=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1]);function U(e,t){if("string"!=typeof e||e.length!==t)return!1;let i=0;for(let t=0;t<e.length;t+=4)i+=(0|M[e.charCodeAt(t)])+(0|M[e.charCodeAt(t+1)])+(0|M[e.charCodeAt(t+2)])+(0|M[e.charCodeAt(t+3)]);return i===t}function j(e){return U(e,32)&&e!==A}function B(e){var t;return j(e.traceId)&&U(t=e.spanId,16)&&t!==O}function F(e){return new C(e)}e.s(["isSpanContextValid",0,B,"isValidTraceId",0,j,"wrapSpanContext",0,F],264791);let H=w.getInstance();class V{startSpan(e,t,i=H.active()){var r;if(null==t?void 0:t.root)return new C;let n=i&&D(i);return null!==(r=n)&&"object"==typeof r&&"spanId"in r&&"string"==typeof r.spanId&&"traceId"in r&&"string"==typeof r.traceId&&"traceFlags"in r&&"number"==typeof r.traceFlags&&B(n)?new C(n):new C}startActiveSpan(e,t,i,r){let n,s,a;if(arguments.length<2)return;2==arguments.length?a=t:3==arguments.length?(n=t,a=i):(n=t,s=i,a=r);let o=null!=s?s:H.active(),l=this.startSpan(e,n,o),u=P(o,l);return H.with(u,a,void 0,l)}}let z=new V;class ${constructor(e,t,i,r){this._provider=e,this.name=t,this.version=i,this.options=r}startSpan(e,t,i){return this._getTracer().startSpan(e,t,i)}startActiveSpan(e,t,i,r){let n=this._getTracer();return Reflect.apply(n.startActiveSpan,n,arguments)}_getTracer(){if(this._delegate)return this._delegate;let e=this._provider.getDelegateTracer(this.name,this.version,this.options);return e?(this._delegate=e,this._delegate):z}}let q=new class{getTracer(e,t,i){return new V}};class G{getTracer(e,t,i){var r;return null!=(r=this.getDelegateTracer(e,t,i))?r:new $(this,e,t,i)}getDelegate(){var e;return null!=(e=this._delegate)?e:q}setDelegate(e){this._delegate=e}getDelegateTracer(e,t,i){var r;return null==(r=this._delegate)?void 0:r.getTracer(e,t,i)}}let K="trace",W=(class e{constructor(){this._proxyTracerProvider=new G,this.wrapSpanContext=F,this.isSpanContextValid=B,this.deleteSpan=I,this.get
1Span=N,this.getActiveSpan=L,this.getSpanContext=D,this.setSpan=P,this.setSpanContext=k}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalTracerProvider(e){let t=m(K,this._proxyTracerProvider,T.instance());return t&&this._proxyTracerProvider.setDelegate(e),t}getTracerProvider(){return f(K)||this._proxyTracerProvider}getTracer(e,t){return this.getTracerProvider().getTracer(e,t)}disable(){b(K,T.instance()),this._proxyTracerProvider=new G}}).getInstance();e.s(["trace",0,W],917147);let X=o("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function Y(e){return!0===e.getValue(X)}e.s(["isTracingSuppressed",0,Y,"suppressTracing",0,function(e){return e.setValue(X,!0)},"unsuppressTracing",0,function(e){return e.deleteValue(X)}],468190);let Q="[_0-9a-z-*/]",J=`[a-z]${Q}{0,255}`,Z=`[a-z0-9]${Q}{0,240}@[a-z]${Q}{0,13}`,ee=RegExp(`^(?:${J}|${Z})$`),et=/^[ -~]{0,255}[!-~]$/,ei=/,|=/;function er(e){return et.test(e)&&!ei.test(e)}class en{_length;_rawTraceState;_internalState;constructor(e){this._rawTraceState="string"==typeof e?e:"",this._length=this._rawTraceState.length}set(e,t){if(!ee.test(e)||!er(t))return this;let i=this._getState(),r=i.get(e),n=this._length;if("string"==typeof r?n+=t.length-r.length:n+=e.length+t.length+(i.size>0?2:1),n>512)return this;let s=new Map(i);return s.delete(e),s.set(e,t),this._fromState(s,n)}unset(e){let t=this._getState(),i=t.get(e);if("string"!=typeof i)return this;let r=this._length-(e.length+i.length+1);t.size>1&&(r-=1);let n=new Map(t);return n.delete(e),this._fromState(n,r)}get(e){return this._getState().get(e)}serialize(){let e="",t=0;for(let i of this._getState())t>0&&(e=","+e),e=`${i[0]}=${i[1]}`+e,t++;return e}_getState(){if(this._internalState)return this._internalState;let e=this._rawTraceState.split(","),t=new Map,i=0;for(let r of e){let e=r.trim(),n=e.indexOf("=");if(-1===n)continue;let s=e.slice(0,n),a=e.slice(n+1);if(!ee.test(s)||!er(a))continue;let o=i+e.length+ +(t.size>0);if(!(o>512)&&(t.set(s,a),i=o,t.size>=32))break}return this._length=i,this._internalState=new Map(Array.from(t.entries()).reverse()),this._internalState}_fromState(e,t){let i=Object.create(en.prototype);return i._internalState=e,i._length=t,i}}e.s(["TraceState",0,en],971517);let es="traceparent",ea="tracestate",eo=RegExp("^\\s?((?!ff)[\\da-f]{2})-((?![0]{32})[\\da-f]{32})-((?![0]{16})[\\da-f]{16})-([\\da-f]{2})(-.*)?\\s?$");function el(e){let t=eo.exec(e);return!t||"00"===t[1]&&t[5]?null:{traceId:t[2],spanId:t[3],traceFlags:parseInt(t[4],16)}}e.s(["TRACE_PARENT_HEADER",0,es,"TRACE_STATE_HEADER",0,ea,"W3CTraceContextPropagator",0,class{inject(e,t,r){let n=W.getSpanContext(e);if(!n||Y(e)||!B(n))return;let s=`00-${n.traceId}-${n.spanId}-0${Number(n.traceFlags||i.NONE).toString(16)}`;r.set(t,es,s),n.traceState&&r.set(t,ea,n.traceState.serialize())}extract(e,t,i){let r=i.get(t,es);if(!r)return e;let n=Array.isArray(r)?r[0]:r;if("string"!=typeof n)return e;let s=el(n);if(!s)return e;s.isRemote=!0;let a=i.get(t,ea);if(a){let e=Array.isArray(a)?a.join(","):a;s.traceState=new en("string"==typeof e?e:void 0)}return W.setSpanContext(e,s)}fields(){return[es,ea]}},"parseTraceParent",0,el],74587);let eu=T.instance();e.s(["diag",0,eu],102091);let ec="telemetry.sdk.language",ed="webjs",eh="telemetry.sdk.name",ep="telemetry.sdk.version";e.s(["ATTR_ERROR_TYPE",0,"error.type","ATTR_EXCEPTION_MESSAGE",0,"exception.message","ATTR_EXCEPTION_STACKTRACE",0,"exception.stacktrace","ATTR_EXCEPTION_TYPE",0,"exception.type","ATTR_HTTP_REQUEST_METHOD",0,"http.request.method","ATTR_HTTP_REQUEST_METHOD_ORIGINAL",0,"http.request.method_original","ATTR_HTTP_RESPONSE_STATUS_CODE",0,"http.response.status_code","ATTR_SERVER_ADDRESS",0,"server.address","ATTR_SERVER_PORT",0,"server.port","ATTR_SERVICE_NAME",0,"service.name","ATTR_SERVICE_VERSION",0,"service.version","ATTR_TELEMETRY_SDK_LANGUAGE",0,ec,"ATTR_TELEMETRY_SDK_NAME",0,eh,"ATTR_TELEMETRY_SDK_VERSION",0,ep,"ATTR_URL_FULL",0,"url.full","ATTR_USER_AGENT_ORIGINAL",0,"user_agent.original","TELEMETRY_SDK_LANGUAGE_VALUE_WEBJS",0,ed],668324),e.s(["SDK_INFO",0,{[eh]:"opentelemetry","process.runtime.name":"browser",[ec]:ed,[ep]:"2.8.0"}],525891);class eg{_promise;_resolve;_reject;
1constructor(){this._promise=new Promise((e,t)=>{this._resolve=e,this._reject=t})}get promise(){return this._promise}resolve(e){this._resolve(e)}reject(e){this._reject(e)}}class em{_isCalled=!1;_deferred=new eg;_callback;_that;constructor(e,t){this._callback=e,this._that=t}get isCalled(){return this._isCalled}get promise(){return this._deferred.promise}call(...e){if(!this._isCalled){this._isCalled=!0;try{Promise.resolve(this._callback.call(this._that,...e)).then(e=>this._deferred.resolve(e),e=>this._deferred.reject(e))}catch(e){this._deferred.reject(e)}}return this._deferred.promise}}function ef(){return e=>{var t;eu.error("string"==typeof(t=e)?t:JSON.stringify(function(e){let t={},i=e;for(;null!==i;)Object.getOwnPropertyNames(i).forEach(e=>{if(t[e])return;let r=i[e];r&&(t[e]=String(r))}),i=Object.getPrototypeOf(i);return t}(t)))}}e.s(["BindOnceFuture",0,em],942765),(a=r||(r={}))[a.SUCCESS=0]="SUCCESS",a[a.FAILED=1]="FAILED",e.s(["ExportResultCode",0,r],720427),e.s(["getBooleanFromEnv",0,function(e){},"getNumberFromEnv",0,function(e){},"getStringFromEnv",0,function(e){},"getStringListFromEnv",0,function(e){}],899745),e.s(["loggingErrorHandler",0,ef],951178);let eb=ef();e.s(["globalErrorHandler",0,function(e){try{eb(e)}catch{}},"setGlobalErrorHandler",0,function(e){eb=e}],86522);let ev=Function.prototype.toString,e_=ev.call(Object),eT=Object.getPrototypeOf,eE=Object.prototype,eS=eE.hasOwnProperty,ew=Symbol?Symbol.toStringTag:void 0,ey=eE.toString;function eO(e){var t,i,r;if(null==(t=e)||"object"!=typeof t||"[object Object]"!==(null==(i=e)?void 0===i?"[object Undefined]":"[object Null]":ew&&ew in Object(i)?function(e){let t=eS.call(e,ew),i=e[ew],r=!1;try{e[ew]=void 0,r=!0}catch{}let n=ey.call(e);return r&&(t?e[ew]=i:delete e[ew]),n}(i):(r=i,ey.call(r))))return!1;let n=eT(e);if(null===n)return!0;let s=eS.call(n,"constructor")&&n.constructor;return"function"==typeof s&&s instanceof s&&ev.call(s)===e_}function eA(e){return eC(e)?e.slice():e}function eR(e,t,i){let r=i.get(e[t])||[];for(let i=0,n=r.length;i<n;i++){let n=r[i];if(n.key===t&&n.obj===e)return!0}return!1}function eC(e){return Array.isArray(e)}function ex(e){return"function"==typeof e}function eN(e){return!eL(e)&&!eC(e)&&!ex(e)&&"object"==typeof e}function eL(e){return"string"==typeof e||"number"==typeof e||"boolean"==typeof e||void 0===e||e instanceof Date||e instanceof RegExp||null===e}function eP(e){return null==e||(Array.isArray(e)?function(e){let t;for(let i of e){if(null==i)continue;let e=typeof i;if(e!==t){if(!t&&eI(e)){t=e;continue}return!1}}return!0}(e):eI(typeof e))}function eI(e){switch(e){case"number":case"boolean":case"string":return!0}return!1}e.s(["merge",0,function(...e){let t=e.shift(),i=new WeakMap;for(;e.length>0;)t=function e(t,i,r=0,n){let s;if(!(r>20)){if(r++,eL(t)||eL(i)||ex(i))s=eA(i);else if(eC(t)){if(s=t.slice(),eC(i))for(let e=0,t=i.length;e<t;e++)s.push(eA(i[e]));else if(eN(i)){let e=Object.keys(i);for(let t=0,r=e.length;t<r;t++){let r=e[t];"__proto__"!==r&&"constructor"!==r&&"prototype"!==r&&(s[r]=eA(i[r]))}}}else if(eN(t))if(eN(i)){var a,o;if(a=t,o=i,!(eO(a)&&eO(o)))return i;s=Object.assign({},t);let l=Object.keys(i);for(let a=0,o=l.length;a<o;a++){let o=l[a];if("__proto__"===o||"constructor"===o||"prototype"===o)continue;let u=i[o];if(eL(u))void 0===u?delete s[o]:s[o]=u;else{let a=s[o];if(eR(t,o,n)||eR(i,o,n))delete s[o];else{if(eN(a)&&eN(u)){let e=n.get(a)||[],r=n.get(u)||[];e.push({obj:t,key:o}),r.push({obj:i,key:o}),n.set(a,e),n.set(u,r)}s[o]=e(s[o],u,r,n)}}}}else s=i;return s}}(t,e.shift(),0,i);return t}],864545),e.s(["isAttributeValue",0,eP,"sanitizeAttributes",0,function(e){let t={};if("object"!=typeof e||null==e)return t;for(let r in e){var i;if(!Object.prototype.hasOwnProperty.call(e,r))continue;if("string"!=typeof(i=r)||""===i){eu.warn(`Invalid attribute key: ${r}`);continue}let n=e[r];if(!eP(n)){eu.warn(`Invalid attribute value set for key: ${r}`);continue}Array.isArray(n)?t[r]=n.slice():t[r]=n}return t}],91047);let ek=performance;function eD(e){return[Math.trunc(e/1e3),Math.round(e%1e3*1e6)]}function eM(e){return ej(eD(ek.timeOrigin),eD("number"==typeof e?e:ek.now()))}function eU(e){return Array.isArray(e)&&2===e.length&&"number"==typeof e[0]&&"number"==typeof e[1]}function ej(e,t){let i=[e[0]+t[0],e[1]+t[1]];return i[1]>=1e9&&(i[1]-=1e9,i[0]+=1),i}e.s(["otperformance",0,ek],678638),e.s(["addHrTimes",0,ej,"getTimeOrigin",0,function(){return ek.timeOrigin},"hrTime",0,eM,"hrTimeDuration",0,function(e,t){let i=t[0]-e[0],r=t[1]-e[1];return r<0&&(i-=1,r+=1e9),[i,r]},"hrTimeToMicroseconds",0,function(e){return 1e6*e[0]+e[1]/1e3},"hrTimeToMilliseconds",0,function(e){return 1e3*e[0]+e[1]/1e6},"hrTimeToNanoseconds",0,function(e){return 1e9*e[0]+e[1]},"hrTimeToSeconds",0,function(e){return e[0]+e[1]/1e9},"hrTimeToTimeStamp",0,function(e){let t=`${"0".repeat(9)}${e[1]}Z`,i=t.substring(t.length-9-1);return new Date(1e3*e[0]).toISOString().replace("000Z",i)},"isTimeInput",0,function(e){return eU(e)||"number"==typeof e||e instanceof Date},"isTimeInputHrTime",0,eU,"millisToHrTime",0,eD,"timeInputToHrTime",0,function(e){if(eU(e))return e;if("number"==typeof e)if(e<ek.timeOrigin)return eM(e);else return eD(e);if(e instanceof Date)return eD(e.getTime());throw TypeError("Invalid input type")}],7058);let eB={get(e,t){if(null!=e)return e[t]},keys:e=>null==e?[]:Object.keys(e)},eF={set(e,t,i){null!=e&&(e[t]=i)}},eH=o("OpenTelemetry Baggage Key");function eV(e){return e.getValue(eH)||void 0}function ez(){return eV(w.getInstance().active())}function e$(e,t){return e.setValue(eH,t)}function eq(e){return e.deleteValue(eH)}class eG{constructor(e){this._entries=e?new Map(e):new Map}getEntry(e){let t=this._entries.get(e);if(t)return Object.assign({},t)}getAllEntries(){return Array.from(this._entries.entries())}setEntry(e,t){let i=new eG(this._entries);
1return i._entries.set(e,t),i}removeEntry(e){let t=new eG(this._entries);return t._entries.delete(e),t}removeEntries(...e){let t=new eG(this._entries);for(let i of e)t._entries.delete(i);return t}clear(){return new eG}}let eK=Symbol("BaggageEntryMetadata"),eW=T.instance();function eX(e={}){return new eG(new Map(Object.entries(e)))}let eY="propagation",eQ=new class{inject(e,t){}extract(e,t){return e}fields(){return[]}},eJ=(class e{constructor(){this.createBaggage=eX,this.getBaggage=eV,this.getActiveBaggage=ez,this.setBaggage=e$,this.deleteBaggage=eq}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalPropagator(e){return m(eY,e,T.instance())}inject(e,t,i=eF){return this._getGlobalPropagator().inject(e,t,i)}extract(e,t,i=eB){return this._getGlobalPropagator().extract(e,t,i)}fields(){return this._getGlobalPropagator().fields()}disable(){b(eY,T.instance())}_getGlobalPropagator(){return f(eY)||eQ}}).getInstance();e.s(["propagation",0,eJ],563556),e.s(["CompositePropagator",0,class{_propagators;_fields;constructor(e={}){this._propagators=e.propagators??[];const t=new Set;for(const e of this._propagators)for(const i of"function"==typeof e.fields?e.fields():[])t.add(i);this._fields=Array.from(t)}inject(e,t,i){for(let r of this._propagators)try{r.inject(e,t,i)}catch(e){eu.warn(`Failed to inject with ${r.constructor.name}. Err: ${e.message}`)}}extract(e,t,i){return this._propagators.reduce((e,r)=>{try{return r.extract(e,t,i)}catch(e){eu.warn(`Failed to extract with ${r.constructor.name}. Err: ${e.message}`)}return e},e)}fields(){return this._fields.slice()}}],54828);let eZ="baggage";function e0(e){return e.reduce((e,t)=>{let i=`${e}${""!==e?",":""}${t}`;return i.length>8192?e:i},"")}function e1(e){return e.getAllEntries().map(([e,t])=>{let i=`${encodeURIComponent(e)}=${encodeURIComponent(t.value)}`;return void 0!==t.metadata&&(i+=";"+t.metadata.toString()),i})}function e2(e){let t,i,r;if(!e)return;let n=e.indexOf(";"),s=-1===n?e:e.substring(0,n),a=s.indexOf("=");if(a<=0)return;let o=s.substring(0,a).trim(),l=s.substring(a+1).trim();if(o&&l){try{t=decodeURIComponent(o),i=decodeURIComponent(l)}catch{return}if(-1!==n&&n<e.length-1){var u;"string"!=typeof(u=e.substring(n+1))&&(eW.error(`Cannot create baggage metadata from unknown type: ${typeof u}`),u=""),r={__TYPE__:eK,toString:()=>u}}return{key:t,value:i,metadata:r}}}function e3(e,t,i,r){let n=0;for(;n<e.length&&i<180;){let s=e.indexOf(",",n),a=-1===s?e.length:s,o=a-n;if(o<=4096){let s=e2(e.substring(n,a));if(s){let e=+(0!==i)+o;if(r+e>8192)break;t[s.key]=s.metadata?{value:s.value,metadata:s.metadata}:{value:s.value},i++,r+=e}}if(-1===s)break;n=s+1}return[i,r]}function e4(e,t){return"string"==typeof t?e===t:!!e.match(t)}e.s(["getKeyPairs",0,e1,"parseBaggageHeaderString",0,e3,"parseKeyPairsIntoRecord",0,function(e){let t={};return"string"==typeof e&&e.length>0&&e.split(",").forEach(e=>{let i=e2(e);void 0!==i&&i.value.length>0&&(t[i.key]=i.value)}),t},"serializeKeyPairs",0,e0],833875),e.s(["W3CBaggagePropagator",0,class{inject(e,t,i){let r=eJ.getBaggage(e);if(!r||Y(e))return;let n=e0(e1(r).filter(e=>e.length<=4096).slice(0,180));n.length>0&&i.set(t,eZ,n)}extract(e,t,i){let r=i.get(t,eZ);if(!r)return e;let n={},s=0,a=0;if(Array.isArray(r))for(let e=0;e<r.length;e++)[s,a]=e3(r[e],n,s,a);else[s]=e3(r,n,s,a);return 0===s?e:eJ.setBaggage(e,eJ.createBaggage(n))}fields(){return[eZ]}}],780093),e.s(["isUrlIgnored",0,function(e,t){if(!t)return!1;for(let i of t)if(e4(e,i))return!0;return!1},"urlMatches",0,e4],3082)},727617,e=>{"use strict";var t,i=e.i(510190),r=e.i(468190);let n={_export:function(e,t){return new Promise(n=>{i.context.with((0,r.suppressTracing)(i.context.active()),()=>{e.export(t,n)})})}};e.s(["internal",0,n],584708),e.i(584708);var s=e.i(780093),a=e.i(91047),o=e.i(86522),l=e.i(951178),u=e.i(7058),c=e.i(720427),d=e.i(833875),h=e.i(525891);let p=globalThis;var g=e.i(899745),m=e.i(678638),f=e.i(54828),b=e.i(74587);let v=(0,e.i(515e3).createContextKey)("OpenTelemetry SDK Context Key RPC_METADATA");(t||(t={})).HTTP="http";var _=e.i(971517),T=e.i(864545);
1class E extends Error{constructor(e){super(e),Object.setPrototypeOf(this,E.prototype)}}var S=e.i(3082),w=e.i(942765),y=e.i(102091),O=e.i(481044);let A={ALL:O.DiagLogLevel.ALL,VERBOSE:O.DiagLogLevel.VERBOSE,DEBUG:O.DiagLogLevel.DEBUG,INFO:O.DiagLogLevel.INFO,WARN:O.DiagLogLevel.WARN,ERROR:O.DiagLogLevel.ERROR,NONE:O.DiagLogLevel.NONE};e.s(["AnchoredClock",0,class{_monotonicClock;_epochMillis;_performanceMillis;constructor(e,t){this._monotonicClock=t,this._epochMillis=e.now(),this._performanceMillis=t.now()}now(){let e=this._monotonicClock.now()-this._performanceMillis;return this._epochMillis+e}},"BindOnceFuture",()=>w.BindOnceFuture,"CompositePropagator",()=>f.CompositePropagator,"ExportResultCode",()=>c.ExportResultCode,"RPCType",0,t,"SDK_INFO",()=>h.SDK_INFO,"TRACE_PARENT_HEADER",()=>b.TRACE_PARENT_HEADER,"TRACE_STATE_HEADER",()=>b.TRACE_STATE_HEADER,"TimeoutError",0,E,"TraceState",()=>_.TraceState,"W3CBaggagePropagator",()=>s.W3CBaggagePropagator,"W3CTraceContextPropagator",()=>b.W3CTraceContextPropagator,"_globalThis",0,p,"addHrTimes",()=>u.addHrTimes,"callWithTimeout",0,function(e,t){let i;return Promise.race([e,new Promise(function(e,r){i=setTimeout(function(){r(new E("Operation timed out."))},t)})]).then(e=>(clearTimeout(i),e),e=>{throw clearTimeout(i),e})},"deleteRPCMetadata",0,function(e){return e.deleteValue(v)},"diagLogLevelFromString",0,function(e){if(null==e)return;let t=A[e.toUpperCase()];return null==t?(y.diag.warn(`Unknown log level "${e}", expected one of ${Object.keys(A)}, using default`),O.DiagLogLevel.INFO):t},"getBooleanFromEnv",()=>g.getBooleanFromEnv,"getNumberFromEnv",()=>g.getNumberFromEnv,"getRPCMetadata",0,function(e){return e.getValue(v)},"getStringFromEnv",()=>g.getStringFromEnv,"getStringListFromEnv",()=>g.getStringListFromEnv,"getTimeOrigin",()=>u.getTimeOrigin,"globalErrorHandler",()=>o.globalErrorHandler,"hrTime",()=>u.hrTime,"hrTimeDuration",()=>u.hrTimeDuration,"hrTimeToMicroseconds",()=>u.hrTimeToMicroseconds,"hrTimeToMilliseconds",()=>u.hrTimeToMilliseconds,"hrTimeToNanoseconds",()=>u.hrTimeToNanoseconds,"hrTimeToSeconds",()=>u.hrTimeToSeconds,"hrTimeToTimeStamp",()=>u.hrTimeToTimeStamp,"internal",0,n,"isAttributeValue",()=>a.isAttributeValue,"isTimeInput",()=>u.isTimeInput,"isTimeInputHrTime",()=>u.isTimeInputHrTime,"isTracingSuppressed",()=>r.isTracingSuppressed,"isUrlIgnored",()=>S.isUrlIgnored,"loggingErrorHandler",()=>l.loggingErrorHandler,"merge",()=>T.merge,"millisToHrTime",()=>u.millisToHrTime,"otperformance",()=>m.otperformance,"parseKeyPairsIntoRecord",()=>d.parseKeyPairsIntoRecord,"parseTraceParent",()=>b.parseTraceParent,"sanitizeAttributes",()=>a.sanitizeAttributes,"setGlobalErrorHandler",()=>o.setGlobalErrorHandler,"setRPCMetadata",0,function(e,t){return e.setValue(v,t)},"suppressTracing",()=>r.suppressTracing,"timeInputToHrTime",()=>u.timeInputToHrTime,"unrefTimer",0,function(e){"number"!=typeof e&&e.unref()},"unsuppressTracing",()=>r.unsuppressTracing,"urlMatches",()=>S.urlMatches],727617)},985722,(e,t,i)=>{"use strict";function r(e){return e>=48&&e<=57?e-48:e>=97&&e<=102?e-87:e-55}Object.defineProperty(i,"__esModule",{value:!0}),i.hexToBinary=void 0,i.hexToBinary=function(e){let t=new Uint8Array(e.length/2),i=0;for(let n=0;n<e.length;n+=2){let s=r(e.charCodeAt(n)),a=r(e.charCodeAt(n+1));t[i++]=s<<4|a}return t}},158302,(e,t,i)=>{"use strict";var r=e.i(467034);Object.defineProperty(i,"__esModule",{value:!0}),i.JSON_ENCODER=i.PROTOBUF_ENCODER=i.encodeAsString=i.encodeAsLongBits=i.toLongBits=i.hrTimeToNanos=void 0;let n=e.r(727617),s=e.r(985722);function a(e){let t=BigInt(1e9);return BigInt(Math.trunc(e[0]))*t+BigInt(Math.trunc(e[1]))}function o(e){return{low:Number(BigInt.asUintN(32,e)),high:Number(BigInt.asUintN(32,e>>BigInt(32)))}}function l(e){return o(a(e))}function u(e){return a(e).toString()}i.hrTimeToNanos=a,i.toLongBits=o,i.encodeAsLongBits=l,i.encodeAsString=u;let c="u">typeof BigInt?u:n.hrTimeToNanoseconds;function d(e){return e}i.PROTOBUF_ENCODER={encodeHrTime:l,encodeSpanContext:s.hexToBinary,encodeOptionalSpanContext:function(e){if(void 0!==e)return(0,s.hexToBinary)(e)},encodeUint8Array:d},i.JSON_ENCODER={encodeHrTime:c,encodeSpanContext:d,encodeOptionalSpanContext:d,encodeUint8Array:e=>{if(void 0!==r.Buffer)return r.Buffer.from(e).toString("base64");let t=Array(e.length);for(let i=0;i<e.length;i++)t[i]=String.fromCharCode(e[i]);return btoa(t.join(""))}}},267704,(e,t,i)=>{"use strict";function r(e,t){return Object.keys(e).map(i=>n(i,e[i],t))}function n(e,t,i){return{key:e,value:s(t,i)}}function s(e,t){let i=typeof e;if("string"===i)return{stringValue:e};if("number"===i)return Number.isInteger(e)?{intValue:e}:{doubleValue:e};if("boolean"===i)return{boolValue:e};if(e instanceof Uint8Array)return{bytesValue:t.encodeUint8Array(e)};if(Array.isArray(e)){let i=Array(e.length);for(let r=0;r<e.length;r++)i[r]=s(e[r],t);return{arrayValue:{values:i}}}if("object"===i&&null!=e){let i=Object.keys(e),r=Array(i.length);for(let n=0;n<i.length;n++)r[n]={key:i[n],value:s(e[i[n]],t)};return{kvlistValue:{values:r}}}return{}}Object.defineProperty(i,"__esModule",{value:!0}),i.toAnyValue=i.toKeyValue=i.toAttributes=i.createInstrumentationScope=i.createResource=void 0,i.createResource=function(e,t){let i={attributes:r(e.attributes,t),droppedAttributesCount:0},n=e.schemaUrl;return n&&""!==n&&(i.schemaUrl=n),i},i.createInstrumentationScope=function(e){return{name:e.name,version:e.version}},i.toAttributes=r,i.toKeyValue=n,i.toAnyValue=s},294325,(e,t,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.createExportTraceServiceRequest=i.toOtlpSpanEvent=i.toOtlpLink=i.sdkSpanToOtlpSpan=void 0;let r=e.r(267704);function n(e,t){let i=255&e|256;return t&&(i|=512),i}function s(e,t){let i=e.spanContext(),s=e.status,l=e.parentSpanContext?.spanId?t.encodeSpanContext(e.parentSpanContext?.spanId):void 0;return{traceId:t.encodeSpanContext(i.traceId),spanId:t.encodeSpanContext(i.spanId),parentSpanId:l,traceState:i.traceState?.serialize(),name:e.name,kind:null==e.kind?0:e.kind+1,startTimeUnixNano:t.encodeHrTime(e.startTime),endTimeUnixNano:t.encodeHrTime(e.endTime),attributes:(0,r.toAttributes)(e.attributes,t),droppedAttributesCount:e.droppedAttributesCount,events:e.events.map(e=>o(e,t)),droppedEventsCount:e.droppedEventsCount,status:{code:s.code,message:s.message},links:e.links.map(e=>a(e,t)),droppedLinksCount:e.droppedLinksCount,flags:n(i.traceFlags,e.parentSpanContext?.isRemote)}}function a(e,t){return{attributes:e.attributes?(0,r.toAttributes)(e.attributes,t):[],spanId:t.encodeSpanContext(e.context.spanId),traceId:t.encodeSpanContext(e.context.traceId),traceState:e.context.traceState?.serialize(),droppedAttributesCount:e.droppedAttributesCount||0,flags:n(e.context.traceFlags,e.context.
1isRemote)}}function o(e,t){return{attributes:e.attributes?(0,r.toAttributes)(e.attributes,t):[],name:e.name,timeUnixNano:t.encodeHrTime(e.time),droppedAttributesCount:e.droppedAttributesCount||0}}i.sdkSpanToOtlpSpan=s,i.toOtlpLink=a,i.toOtlpSpanEvent=o,i.createExportTraceServiceRequest=function(e,t){return{resourceSpans:function(e,t){let i=function(e){let t=new Map;for(let i of e){let e=t.get(i.resource);e||(e=new Map,t.set(i.resource,e));let r=`${i.instrumentationScope.name}@${i.instrumentationScope.version||""}:${i.instrumentationScope.schemaUrl||""}`,n=e.get(r);n||(n=[],e.set(r,n)),n.push(i)}return t}(e),n=[],a=i.entries(),o=a.next();for(;!o.done;){let[e,i]=o.value,l=[],u=i.values(),c=u.next();for(;!c.done;){let e=c.value;if(e.length>0){let i=e.map(e=>s(e,t));l.push({scope:(0,r.createInstrumentationScope)(e[0].instrumentationScope),spans:i,schemaUrl:e[0].instrumentationScope.schemaUrl})}c=u.next()}let d=(0,r.createResource)(e,t),h={resource:d,scopeSpans:l,schemaUrl:d.schemaUrl};n.push(h),o=a.next()}return n}(e,t)}}},118792,(e,t,i)=>{"use strict";var r,n;Object.defineProperty(i,"__esModule",{value:!0}),i.EStatusCode=i.ESpanKind=void 0,(r=i.ESpanKind||(i.ESpanKind={}))[r.SPAN_KIND_UNSPECIFIED=0]="SPAN_KIND_UNSPECIFIED",r[r.SPAN_KIND_INTERNAL=1]="SPAN_KIND_INTERNAL",r[r.SPAN_KIND_SERVER=2]="SPAN_KIND_SERVER",r[r.SPAN_KIND_CLIENT=3]="SPAN_KIND_CLIENT",r[r.SPAN_KIND_PRODUCER=4]="SPAN_KIND_PRODUCER",r[r.SPAN_KIND_CONSUMER=5]="SPAN_KIND_CONSUMER",(n=i.EStatusCode||(i.EStatusCode={}))[n.STATUS_CODE_UNSET=0]="STATUS_CODE_UNSET",n[n.STATUS_CODE_OK=1]="STATUS_CODE_OK",n[n.STATUS_CODE_ERROR=2]="STATUS_CODE_ERROR"},175696,e=>{"use strict";var t=e.i(861745),i=e.i(843476);e.s(["default",0,function({locale:e,...r}){if(!e)throw Error(void 0);return(0,i.jsx)(t.IntlProvider,{locale:e,...r})}])},988364,(e,t,i)=>{!function(e){"use strict";var r="function",n="undefined",s="object",a="string",o="major",l="model",u="name",c="type",d="vendor",h="version",p="architecture",g="console",m="mobile",f="tablet",b="smarttv",v="wearable",_="embedded",T="Amazon",E="Apple",S="ASUS",w="BlackBerry",y="Browser",O="Chrome",A="Firefox",R="Google",C="Honor",x="Huawei",N="Microsoft",L="Motorola",P="Nvidia",I="OnePlus",k="Opera",D="OPPO",M="Samsung",U="Sharp",j="Sony",B="Xiaomi",F="Zebra",H="Facebook",V="Chromium OS",z="Mac OS",$=" Browser",q=function(e,t){var i={};for(var r in e)t[r]&&t[r].length%2==0?i[r]=t[r].concat(e[r]):i[r]=e[r];return i},G=function(e){for(var t={},i=0;i<e.length;i++)t[e[i].toUpperCase()]=e[i];return t},K=function(e,t){return typeof e===a&&-1!==W(t).indexOf(W(e))},W=function(e){return e.toLowerCase()},X=function(e,t){if(typeof e===a)return e=e.replace(/^\s\s*/,""),typeof t===n?e:e.substring(0,500)},Y=function(e,t){for(var i,n,a,o,l,u,c=0;c<t.length&&!l;){var d=t[c],h=t[c+1];for(i=n=0;i<d.length&&!l&&d[i];)if(l=d[i++].exec(e))for(a=0;a<h.length;a++)u=l[++n],typeof(o=h[a])===s&&o.length>0?2===o.length?typeof o[1]==r?this[o[0]]=o[1].call(this,u):this[o[0]]=o[1]:3===o.length?typeof o[1]!==r||o[1].exec&&o[1].test?this[o[0]]=u?u.replace(o[
11],o[2]):void 0:this[o[0]]=u?o[1].call(this,u,o[2]):void 0:4===o.length&&(this[o[0]]=u?o[3].call(this,u.replace(o[1],o[2])):void 0):this[o]=u||void 0;c+=2}},Q=function(e,t){for(var i in t)if(typeof t[i]===s&&t[i].length>0){for(var r=0;r<t[i].length;r++)if(K(t[i][r],e))return"?"===i?void 0:i}else if(K(t[i],e))return"?"===i?void 0:i;return t.hasOwnProperty("*")?t["*"]:e},J={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"},Z={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[h,[u,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[h,[u,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[u,h],[/opios[\/ ]+([\w\.]+)/i],[h,[u,k+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[h,[u,k+" GX"]],[/\bopr\/([\w\.]+)/i],[h,[u,k]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[h,[u,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[h,[u,"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],[u,h],[/quark(?:pc)?\/([-\w\.]+)/i],[h,[u,"Quark"]],[/\bddg\/([\w\.]+)/i],[h,[u,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[h,[u,"UC"+y]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[h,[u,"WeChat"]],[/konqueror\/([\w\.]+)/i],[h,[u,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[h,[u,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[h,[u,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[h,[u,"Smart Lenovo "+y]],[/(avast|avg)\/([\w\.]+)/i],[[u,/(.+)/,"$1 Secure "+y],h],[/\bfocus\/([\w\.]+)/i],[h,[u,A+" Focus"]],[/\bopt\/([\w\.]+)/i],[h,[u,k+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[h,[u,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[h,[u,"Dolphin"]],[/coast\/([\w\.]+)/i],[h,[u,k+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[h,[u,"MIUI"+$]],[/fxios\/([\w\.-]+)/i],[h,[u,A]],[/\bqihoobrowser\/?([\w\.]*)/i],[h,[u,"360"]],[/\b(qq)\/([\w\.]+)/i],[[u,/(.+)/,"$1Browser"],h],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[u,/(.+)/,"$1"+$],h],[/samsungbrowser\/([\w\.]+)/i],[h,[u,M+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[h,[u,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[u,"Sogou Mobile"],h],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[u,h],[/(lbbrowser|rekonq)/i,/\[(linkedin)app\]/i],[u],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[h,u],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[u,H],h],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/(daum)apps[\/ ]([\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],[u,h],[/\bgsa\/([\w\.]+) .*safari\//i],[h,[u,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[h,[u,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[h,[u,O+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[u,O+" WebView"],h],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[h,[u,"Android "+y]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[u,h],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[h,[u,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[h,u],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[u,[h,Q,{"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],[u,h],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[u,"Netscape"],h],[/(wolvic|librewolf)\/([\w\.]+)/i],[u,h],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[h,[u,A+" 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,/(amaya|dillo|doris|icab|ladybird|lynx|mosaic|netsurf|obigo|polaris|w3m|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/\b(links) \(([\w\.]+)/i],[u,[h,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[u,[h,/master.|lts./,""]]],cpu:[[/\b((amd|x|x86[-_]?|wow|win)64)\b/i],[[p,"amd64"]],[/(ia32(?=;))/i,/\b((i[346]|x)86)(pc)?\b/i],[[p,"ia32"]],[/\b(aarch64|arm(v?[89]e?l?|_?64))\b/i],[[p,"arm64"]],[/\b(arm(v[67])?ht?n?[fl]p?)\b/i],[[p,"armhf"]],[/( (ce|mobile); ppc;|\/[\w\.]+arm\b)/i],[[p,"arm"]],[/((ppc|powerpc)(64)?)( mac|;|\))/i],[[p,/ower/,"",W]],[/ sun4\w[;\)]/i],[[p,"sparc"]],[/\b(avr32|ia64(?=;)|68k(?=\))|\barm(?=v([1-7]|[5-7]1)l?|;
vendor: 8,020 bytes, line 1
1|eabi)|(irix|mips|sparc)(64)?\b|pa-risc)/i],[[p,W]]],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,[d,M],[c,f]],[/\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,[d,M],[c,m]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[l,[d,E],[c,m]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[l,[d,E],[c,f]],[/(macintosh);/i],[l,[d,E]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[l,[d,U],[c,m]],[/\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i],[l,[d,C],[c,f]],[/honor([-\w ]+)[;\)]/i],[l,[d,C],[c,m]],[/\b((?:ag[rs][2356]?k?|bah[234]?|bg[2o]|bt[kv]|cmr|cpn|db[ry]2?|jdn2|got|kob2?k?|mon|pce|scm|sht?|[tw]gr|vrd)-[ad]?[lw][0125][09]b?|605hw|bg2-u03|(?:gem|fdr|m2|ple|t1)-[7a]0[1-4][lu]|t1-a2[13][lw]|mediapad[\w\. ]*(?= bui|\)))\b(?!.+d\/s)/i],[l,[d,x],[c,f]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[l,[d,x],[c,m]],[/oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i,/\b((?:red)?mi[-_ ]?pad[\w- ]*)(?: bui|\))/i],[[l,/_/g," "],[d,B],[c,f]],[/\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,/ ([\w ]+) miui\/v?\d/i],[[l,/_/g," "],[d,B],[c,m]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[l,[d,D],[c,m]],[/\b(opd2(\d{3}a?))(?: bui|\))/i],[l,[d,Q,{OnePlus:["304","403","203"],"*":D}],[c,f]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[l,[d,"Vivo"],[c,m]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[l,[d,"Realme"],[c,m]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto(?! 360)[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[l,[d,L],[c,m]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[l,[d,L],[c,f]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[l,[d,"LG"],[c,f]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv|watch)\w+)/i,/\blg-?([\d\w]+) bui/i],[l,[d,"LG"],[c,m]],[/(ideatab[-\w ]+|602lv|d-42a|a101lv|a2109a|a3500-hv|s[56]000|pb-6505[my]|tb-?x?\d{3,4}(?:f[cu]|xu|[av])|yt\d?-[jx]?\d+[lfmx])( bui|;|\)|\/)/i,/lenovo ?(b[68]0[08]0-?[hf]?|tab(?:[\w- ]+?)|tb[\w-]{6,7})( bui|;|\)|\/)/i],[l,[d,"Lenovo"],[c,f]],[/(nokia) (t[12][01])/i],[d,l,[c,f]],[/(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i,/nokia[-_ ]?(([-\w\. ]*))/i],[[l,/_/g," "],[c,m],[d,"Nokia"]],[/(pixel (c|tablet))\b/i],[l,[d,R],[c,f]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[l,[d,R],[c,m]],[/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,[d,j],[c,m]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[l,"Xperia Tablet"],[d,j],[c,f]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[l,[d,I],[c,m]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[l,[d,T],[c,f]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[l,/(.+)/g,"Fire Phone $1"],[d,T],[c,m]],[/(playbook);[-\w\),; ]+(rim)/i],[l,d,[c,f]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[l,[d,w],[c,m]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[l,[d,S],[c,f]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[l,[d,S],[c,m]],[/(nexus 9)/i],[l,[d,"HTC"],[c,f]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[d,[l,/_/g," "],[c,m]],[/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,[d,"TCL"],[c,f]],[/(itel) ((\w+))/i],[[d,W],l,[c,Q,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[l,[d,"Acer"],[c,f]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[l,[d,"Meizu"],[c,m]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[l,[d,"Ulefone"],[c,m]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[l,[d,"Energizer"],[c,m]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[l,[d,"Cat"],[c,m]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[l,[d,"Smartfren"],[c,m]],[/droid.+; (a(?:015|06[35]|142p?))/i],[l,[d,"Nothing"],[c,m]],[/; (x67 5g|tikeasy \w+|ac[1789]\d\w+)( b|\))/i,/archos ?(5|gamepad2?|([\w ]*[t1789]|hello) ?\d+[\w ]*)( b|\))/i],[l,[d,"Archos"],[c,f]],[/archos ([\w ]+)( b|\))/i,/; (ac[3-6]\d\w{2,8})( b|\))/i],[l,[d,"Archos"],[c,m]],[/(imo) (tab \w+)/i,/(infinix) (x1101b?)/i],[d,l,[c,f]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus(?! zenw)|dell|jolla|meizu|motorola|polytron|infinix|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (hmd|imo) ([\w ]+?)(?: bui|\))/i,/(hp) ([\w ]+\w)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w ]+?)(?: bui|\)|\/)/i,/(oppo) ?([\w ]+) bui/i],[d,l,[c,m]],[/(kobo)\s(ereader|touch)/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],[d,l,[c,f]],[/(surface duo)/i],[l,[d,N],[c,f]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[l,[d,"Fairphone"],[c,m]],[/(u304aa)/i],[l,[d,"AT&T"],[c,m]],[/\bsie-(\w*)/i],[l,[d,"Siemens"],[c,m]],[/\b(rct\w+) b/i],[l,[d,"RCA"],[c,f]],[/\b(venue[\d ]{2,7}) b/i],[l,[d,"Dell"],[c,f]],[/\b(q(?:mv|ta)\w+) b/i],[l,[d,"Verizon"],[c,f]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[l,[d,"Barnes & Noble"],[c,f]],[/\b(tm\d{3}\w+) b/i],[l,[d,"NuVision"],[c,f]],[/\b(k88) b/i],[l,[d,"ZTE"],[c,f]],[/\b(nx\d{3}j) b/i],[l,[d,"ZTE"],[c,m]],[/\b(gen\d{3}) b.+49h/i],[l,[d,"Swiss"],[c,m]],[/\b(zur\d{3}) b/i],[l,[d,"Swiss"],[c,f]],[/\b((zeki)?tb.*\b) b/i],[l,[d,"Zeki"],[c,f]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[d,"Dragon Touch"],l,[c,f]],[/\b(ns-?\w{0,9}) b/i],[l,[d,"Insignia"],[c,f]],[/\b((nxa|next)-?\w{0,9}) b/i],[l,[d,"NextBook"],[c,f]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[d,"Voice"],l,[c,m]],[/\b(lvtel\-)?(v1[12]) b/i],[[d,"LvTel"],l,[c,m]],[/\b(ph-1) /i],[l,[d,"Essential"],[c,m]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[l,[d,"Envizen"],[c,f]],[/\b(trio[-\w\. ]+) b/i],[l,[d,"MachSpeed"],[c,f]],[/\btu_(1491) b/i],[l,[d,"Rotor"],[c,f]],[/((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i],[l,[d,P],[c,f]],[/(sprint) (\w+)/i],[d,l,[c,m]],[/(kin\.[onetw]{3})/i],[[l,/\./g," "],[d,N],[c,m]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[l,[d,F],[c,f]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[l,[d,F],[c,m]],[/smart-tv.+(samsung)/i],[d,[c,b]],[/hbbtv.+maple;(\d+)/i],[[l,/^/,"SmartTV"],[d,M],[c,b]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[d,"LG"],[c,b]],[/(apple) ?tv/i],[d,[l,E+" TV"],[c,b]],[/crkey/i],[[l,O+"cast"],[d,R],[c,b]],[/droid.+aft(\w+)( bui|\))/i],[l,[d,T],[c,b]],[/(shield \w+ tv)/i],[l,[d,P],[c,b]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[l,[d,U],[c,b]],[/(bravia[\w ]+)( bui|\))/i],[l,[d,j],[c,b]],[/(mi(tv|box)-?\w+) bui/i],[l,[d,B],[c,b]],[/Hbbtv.*(technisat) (.*);/i],[d,l,[c,b]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[d,X],[l,X],[c,b]],[/droid.+; ([\w- ]+) (?:android tv|smart[- ]?tv)/i],[l,[c,b]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[c,b]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[d,l,[c,g]],[/droid.+; (shield)( bui|\))/i],[l,[d,P],[c,g]],[/(playstation \w+)/i],[l,[d,j],[c,g]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[l,[d,N],[c,g]],[/\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i],[l,[d,M],[c,v]],[/((pebble))app/i,/(asu
1s|google|lg|oppo) ((pixel |zen)?watch[\w ]*)( bui|\))/i],[d,l,[c,v]],[/(ow(?:19|20)?we?[1-3]{1,3})/i],[l,[d,D],[c,v]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[l,[d,E],[c,v]],[/(opwwe\d{3})/i],[l,[d,I],[c,v]],[/(moto 360)/i],[l,[d,L],[c,v]],[/(smartwatch 3)/i],[l,[d,j],[c,v]],[/(g watch r)/i],[l,[d,"LG"],[c,v]],[/droid.+; (wt63?0{2,3})\)/i],[l,[d,F],[c,v]],[/droid.+; (glass) \d/i],[l,[d,R],[c,v]],[/(pico) (4|neo3(?: link|pro)?)/i],[d,l,[c,v]],[/; (quest( \d| pro)?)/i],[l,[d,H],[c,v]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[d,[c,_]],[/(aeobc)\b/i],[l,[d,T],[c,_]],[/(homepod).+mac os/i],[l,[d,E],[c,_]],[/windows iot/i],[[c,_]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[l,[c,m]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[l,[c,f]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[c,f]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[c,m]],[/droid .+?; ([\w\. -]+)( bui|\))/i],[l,[d,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[h,[u,"EdgeHTML"]],[/(arkweb)\/([\w\.]+)/i],[u,h],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[h,[u,"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],[u,h],[/ladybird\//i],[[u,"LibWeb"]],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[h,u]],os:[[/microsoft (windows) (vista|xp)/i],[u,h],[/(windows (?:phone(?: os)?|mobile|iot))[\/ ]?([\d\.\w ]*)/i],[u,[h,Q,J]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[h,Q,J],[u,"Windows"]],[/[adehimnop]{4,7}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[h,/_/g,"."],[u,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[u,z],[h,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[h,u],[/(ubuntu) ([\w\.]+) like android/i],[[u,/(.+)/,"$1 Touch"],h],[/(android|bada|blackberry|kaios|maemo|meego|openharmony|qnx|rim tablet os|sailfish|series40|symbian|tizen|webos)\w*[-\/; ]?([\d\.]*)/i],[u,h],[/\(bb(10);/i],[h,[u,w]],[/(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i],[h,[u,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[h,[u,A+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[h,[u,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[h,[u,"watchOS"]],[/crkey\/([\d\.]+)/i],[h,[u,O+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[u,V],h],[/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)(?: arm\w*| x86\w*| ?)([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[u,h],[/(sunos) ?([\w\.\d]*)/i],[[u,"Solaris"],h],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[u,h]]},ee=function(t,i){if(typeof t===s&&(i=t,t=void 0),!(this instanceof ee))return new ee(t,i).getResult();var g=typeof e!==n&&e.navigator?e.navigator:void 0,b=t||(g&&g.userAgent?g.userAgent:""),v=g&&g.userAgentData?g.userAgentData:void 0,_=i?q(Z,i):Z,T=g&&g.userAgent==b;return this.getBrowser=function(){var e,t={};return t[u]=void 0,t[h]=void 0,Y.call(t,b,_.browser),t[o]=typeof(e=t[h])===a?e.replace(/[^\d\.]/g,"").split(".")[0]:void 0,T&&g&&g.brave&&typeof g.brave.isBrave==r&&(t[u]="Brave"),t},this.getCPU=function(){var e={};return e[p]=void 0,Y.call(e,b,_.cpu),e},this.getDevice=function(){var e={};return e[d]=void 0,e[l]=void 0,e[c]=void 0,Y.call(e,b,_.device),T&&!e[c]&&v&&v.mobile&&(e[c]=m),T&&"Macintosh"==e[l]&&g&&typeof g.standalone!==n&&g.maxTouchPoints&&g.maxTouchPoints>2&&(e[l]="iPad",e[c]=f),e},this.getEngine=function(){var e={};return e[u]=void 0,e[h]=void 0,Y.call(e,b,_.engine),e},this.getOS=function(){var e={};return e[u]=void 0,e[h]=void 0,Y.call(e,b,_.os),T&&!e[u]&&v&&v.platform&&"Unknown"!=v.platform&&(e[u]=v.platform.replace(/chrome os/i,V).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?X(e,500):e,this},this.setUA(b),this};ee.VERSION="1.0.41",ee.BROWSER=G([u,h,o]),ee.CPU=G([p]),ee.DEVICE=G([l,d,c,g,m,b,f,v,_]),ee.ENGINE=ee.OS=G([u,h]),t.exports&&(i=t.exports=ee),i.UAParser=ee;var et=typeof e!==n&&(e.jQuery||e.Zepto);if(et&&!et.ua){var ei=new ee;et.ua=ei.getResult(),et.ua.get=function(){return ei.getUA()},et.ua.set=function(e){ei.setUA(e);var t=ei.getResult();for(var i in t)et.ua[i]=t[i]}}}("object"==typeof window?window:e.e)},670511,e=>{"use strict";let t,i,r,n,s,a,o,l,u,c,d,h,p,g,m,f,b,v,_,T,E,S,w,y,O,A;var R,C,x,N,L,P,I,k,D,M,U,j,B,F,H,V,z,$,q,G,K,W,X,Y,Q,J,Z,ee,et,ei=e.i(271645);function er(){}(R=H||(H={}))[R.OFF=0]="OFF",R[R.ERROR=1]="ERROR",R[R.WARN=2]="WARN",R[R.INFO=3]="INFO",R[R.VERBOSE=4]="VERBOSE";let en={debug:er,error:er,info:er,prefix:"Faro",warn:er},es=H.ERROR,ea=Object.assign({},console);class eo{constructor(){this.unpatchedConsole=ea,this.internalLogger=en,this.config={},this.metas={}}logDebug(...e){this.internalLogger.debug(`${this.name}
2`,...e)}logInfo(...e){this.internalLogger.info(`${this.name}
3`,...e)}
3logWarn(...e){this.internalLogger.warn(`${this.name}
4`,...e)}logError(...e){this.internalLogger.error(`${this.name}
5`,...e)}}class el extends eo{constructor(){super(...arguments),this.api={},this.transports={}}}function eu(e,t){return typeof e===t}function ec(e,t){return Object.prototype.toString.call(e)===`[object ${t}]`}function ed(e,t){try{return e instanceof t}catch(e){return!1}}let eh=e=>!eu(e,"null")&&eu(e,"object"),ep=e=>ec(e,"Array"),eg="u">typeof Event,em="u">typeof Error;function ef(e){return null==e||(ep(e)||eu(e,"string")?0===e.length:!!eh(e)&&0===Object.keys(e).length)}function eb(e={}){let t;return JSON.stringify(null!=e?e:{},(t=new WeakSet,function(e,i){if(eh(i)&&null!==i){if(t.has(i))return null;t.add(i)}return i}))}function ev(e={}){let t={};for(let[i,r]of Object.entries(e))t[i]=eh(r)&&null!==r?eb(r):String(r);return t}let e_="Error",eT=e=>e.map(e=>eh(e)?eb(e):String(e)).join(" "),eE=e=>e.map(e=>{try{return String(e)}catch(e){return""}}).join(" ");(C=V||(V={})).TRACE="trace",C.DEBUG="debug",C.INFO="info",C.LOG="log",C.WARN="warn",C.ERROR="error";let eS=V.LOG,ew=[V.TRACE,V.DEBUG,V.INFO,V.LOG,V.WARN,V.ERROR],ey="2.7.1";class eO{constructor(){this.subscribers=[]}subscribe(e){return this.subscribers.push(e),{unsubscribe:()=>this.unsubscribe(e)}}unsubscribe(e){this.subscribers=this.subscribers.filter(t=>t!==e)}notify(e){this.subscribers.forEach(t=>t(e))}first(){let e=new eO,t=t=>{e.notify(t),i.unsubscribe()},i=this.subscribe(t),r=e.unsubscribe.bind(e);return this.withUnsubscribeOverride(e,r,t)}takeWhile(e){let t=new eO,i=r=>{e(r)?t.notify(r):t.unsubscribe(i)};this.subscribe(i);let r=t.unsubscribe.bind(t);return this.withUnsubscribeOverride(t,r,i)}filter(e){let t=new eO,i=i=>{e(i)&&t.notify(i)};this.subscribe(i);let r=t.unsubscribe.bind(t);return this.withUnsubscribeOverride(t,r,i)}merge(...e){let t=new eO,i=[];e.forEach(e=>{let r=e.subscribe(e=>{t.notify(e)});i.push(r)});let r=t.unsubscribeAll.bind(t);return t.unsubscribe=()=>{i.forEach(e=>e.unsubscribe()),r()},t}withUnsubscribeOverride(e,t,i){return e.unsubscribe=e=>{t(e),this.unsubscribe(i)},e}unsubscribeAll(){this.subscribers=[]}}let eA="http-request-start",eR="http-request-end",eC=!1,ex=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i,eN=/^\s*at (?:(?![a-z]+:\/\/)([^(]+?) ?\((?:address at )?)?((?:file|https?|blob|chrome-extension|address|native|eval|webpack|<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,eL=/\((\S*)(?::(\d+))(?::(\d+))\)/,eP="address at ",eI=eP.length,ek=/^\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,eD=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,eM="safari-extension",eU="safari-web-extension",ej=/Minified React error #\d+;/i;function eB(e,t,i,r){let n={filename:e||document.location.href,function:t||"?"};return void 0!==i&&(n.lineno=i),void 0!==r&&(n.colno=r),n}function eF(e,t){let i=null==e?void 0:e.includes(eM),r=!i&&(null==e?void 0:e.includes(eU));return i||r?[(null==e?void 0:e.includes("@"))?e.split("@")[0]:e,i?`${eM}:${t}`:`${eU}:${t}`]:[e,t]}function eH(e){let t=[];e.stacktrace?t=e.stacktrace.split("\n").filter((e,t)=>t%2==0):e.stack&&(t=e.stack.split("\n"));let i=t.reduce((t,i,r)=>{let n,s,a,o,l;if(i.length>1024)return t;if(n=eN.exec(i)){if(s=n[1],a=n[2],o=n[3],l=n[4],null==a?void 0:a.startsWith("eval")){let e=eL.exec(a);e&&(a=e[1],o=e[2],l=e[3])}a=(null==a?void 0:a.startsWith(eP))?a.substring(eI):a,[s,a]=eF(s,a)}else if(n=ek.exec(i)){if(s=n[1],a=n[3],o=n[4],l=n[5],a&&a.includes(" > eval")){let e=eD.exec(a);e&&(s=s||"eval",a=e[1],o=e[2])}else{let t;0===r&&!l&&(eu(t=e.columnNumber,"number")&&!isNaN(t)||eu(t,"bigint"))&&(l=String(e.columnNumber+1))}[s,a]=eF(s,a)}return(a||s)&&t.push(eB(a,s,o?Number(o):void 0,l?Number(l):void 0)),t},[]);return ej.test(e.message)?i.slice(1):i}function eV(e){let t,i,r,n,s=[];if(ec(e,"ErrorEvent")&&e.error)t=e.error.message,i=e.error.name,s=eH(e.error);else if((r=ec(e,"DOMError"))||ec(e,"DOMException")){let{name:n,message:s}=e;i=null!=n?n:r?"DOMError":"DOMException",t=s?`${i}: ${s}`:i}else if(em&&ed(e,Error))i=e.name,t=e.message,s=eH(e);else(eh(e)||(n=eg&&ed(e,Event)))&&(i=n?e.constructor.name:void 0,t=`Non-Error exception captured with keys: ${Object.keys(e)}`);return[t,i,s]}function ez(e){let t,i,[r,n,s,a,o]=e,l=[],u=eu(r,"string"),c=eB(n,"?",s,a);if(o||!u)[t,i,l]=eV(null!=o?o:r),0===l.length&&(l=[c]);else if(u){var d,h;let e,n;[t,i]=(n=null!=(d=null==(e=r.match(ex))?void 0:e[1])?d:e_,[null!=(h=null==e?void 0:e[2])?h:r,n]),l=[c]}return{value:t,type:i,stackFrames:l}}function e$(e,t){let i;return(i=e[0],em&&ed(i,Error))?ez(e):{value:t(e)}}class eq extends el{constructor(){super(...arguments),this.name="@grafana/faro-web-sdk:instrumentation-console",this.version=ey,this.errorSerializer
5=eE}initialize(){var e,i;let r=this.config.consoleInstrumentation,n=(null==r?void 0:r.serializeErrors)||!!(null==r?void 0:r.errorSerializer);this.errorSerializer=n?null!=(e=null==r?void 0:r.errorSerializer)?e:eT:eE;let s=null!=(i=null==r?void 0:r.disabledLevels)?i:eq.defaultDisabledLevels,a=function(e){if(t||(t=new eO),!eC){let i=null!=e?e:ea;ew.forEach(e=>{console[e]=(...r)=>{var n;t.notify({type:"console",level:e,args:r}),null==(n=i[e])||n.apply(console,r)}}),eC=!0}return t}(this.unpatchedConsole);this.subscription=a.subscribe(({level:e,args:t})=>{if(!s.includes(e))try{if(e!==V.ERROR||(null==r?void 0:r.consoleErrorAsLog))if(e===V.ERROR&&(null==r?void 0:r.consoleErrorAsLog)){let{value:i,type:r,stackFrames:n}=e$(t,this.errorSerializer);this.api.pushLog(i?[eq.consoleErrorPrefix+i]:t,{level:e,context:{value:null!=i?i:"",type:null!=r?r:"",stackFrames:(null==n?void 0:n.length)?eT(n):""}})}else this.api.pushLog(t,{level:e});else{let{value:e,type:i,stackFrames:r}=e$(t,this.errorSerializer);if(e&&!i&&!r)return void this.api.pushError(Error(eq.consoleErrorPrefix+e));this.api.pushError(Error(eq.consoleErrorPrefix+e),{type:i,stackFrames:r})}}catch(e){this.logError(e)}})}destroy(){var e;null==(e=this.subscription)||e.unsubscribe(),this.subscription=void 0}}eq.defaultDisabledLevels=[V.DEBUG,V.TRACE,V.LOG],eq.consoleErrorPrefix="console.error: ";class eG extends el{constructor(){super(),this.name="@grafana/faro-web-sdk:instrumentation-csp",this.version=ey}initialize(){document.addEventListener("securitypolicyviolation",this.securitypolicyviolationHandler.bind(this))}destroy(){document.removeEventListener("securitypolicyviolation",this.securitypolicyviolationHandler)}securitypolicyviolationHandler(e){let t={blockedURI:e.blockedURI,columnNumber:e.columnNumber,disposition:e.disposition,documentURI:e.documentURI,effectiveDirective:e.effectiveDirective,lineNumber:e.lineNumber,originalPolicy:e.originalPolicy,referrer:e.referrer,sample:e.sample,sourceFile:e.sourceFile,statusCode:e.statusCode,violatedDirective:e.violatedDirective};this.api.pushEvent("securitypolicyviolation",ev(t))}}let eK=[];class eW extends el{constructor(){super(...arguments),this.name="@grafana/faro-web-sdk:instrumentation-errors",this.version=ey}initialize(){var e,t;let i,r;this.logDebug("Initializing"),e=this.api,i=window.onerror,window.onerror=(...t)=>{try{let{value:i,type:r,stackFrames:n}=ez(t),s=t[4];if(i){let t={type:r,stackFrames:n};null!=s&&(t.originalError=s),e.pushError(Error(i),t)}}finally{null==i||i.apply(window,t)}},t=this.api,r=e=>{var i,r;let n,s,a,o=e;o.reason?o=e.reason:(null==(i=e.detail)?void 0:i.reason)&&(o=null==(r=e.detail)?void 0:r.reason);let l=[];eh(n=o)||eu(n,"function")?[s,a,l]=eV(o):(s=`Non-Error promise rejection captured with value: ${String(o)}`,a="UnhandledRejection"),s&&t.pushError(Error(s),{type:a,stackFrames:l})},window.addEventListener("unhandledrejection",r),eK.push(r)}}var eX=e.i(783254);function eY(){return Date.now()}function eQ(){return"u">typeof performance&&"function"==typeof performance.now?performance.now():Date.now()}function eJ(){return new Date().toISOString()}function eZ(e){return new Date(e).toISOString()}class e0 extends eO{constructor(e,t){var i,r,n,s;super(),this._tracking=!1,this.eventsObservable=e,this._options={inactivityMs:null!=(i=null==t?void 0:t.inactivityMs)?i:100,drainTimeoutMs:null!=(r=null==t?void 0:t.drainTimeoutMs)?r:1e4,isOperationStart:null!=(n=null==t?void 0:t.isOperationStart)?n:()=>void 0,isOperationEnd:null!=(s=null==t?void 0:t.isOperationEnd)?s:()=>void 0},this._initialize()}_initialize(){this.eventsObservable.filter(()=>this._tracking).subscribe(e=>{var t,i,r;this._lastEventTime=eQ(),null==(t=this._currentEvents)||t.push(e);let n=this._options.isOperationStart(e);n&&(null==(i=this._activeOperations)||i.set(n,!0));let s=this._options.isOperationEnd(e);s&&(null==(r=this._activeOperations)||r.delete(s)),this._scheduleInactivityCheck()})}startTracking(){this._tracking||(this._tracking=!0,this._startTime=eQ(),this._lastEventTime=this._startTime,this.notify({message:"tracking-started"}),this._currentEvents=[],this._activeOperations=new Map,this._scheduleInactivityCheck())}stopTracking(){let e;this._tracking=!1,this._clearTimer(this._inactivityTid),this._clearTimer(this._drainTid),e=this.hasActiveOperations()?eQ()-this._startTime:this._lastEventTime?this._lastEventTime-this._startTime:0,this.notify({message:"tracking-ended",events:this._currentEvents,duration:e})}
5_scheduleInactivityCheck(){this._inactivityTid=e1(this._inactivityTid,()=>{this.hasActiveOperations()?this._startDrainTimeout():this.stopTracking()},this._options.inactivityMs)}_startDrainTimeout(){this._drainTid=e1(this._drainTid,()=>{this.stopTracking()},this._options.drainTimeoutMs)}hasActiveOperations(){return!!this._activeOperations&&this._activeOperations.size>0}_clearTimer(e){e&&clearTimeout(e)}}function e1(e,t,i){return e&&clearTimeout(e),e=setTimeout(()=>{t()},i)}function e2(){return i||(i=new eO),r||(r=new MutationObserver((e,t)=>{i.notify({type:"dom-mutation"})})).observe(document,{attributes:!0,childList:!0,subtree:!0,characterData:!0}),i}let e3="abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ0123456789";function e4(e=10){let t=new Uint32Array(e),i="u">typeof globalThis?globalThis.crypto:void 0;if(null==i?void 0:i.getRandomValues)i.getRandomValues(t);else for(let i=0;i<e;i++)t[i]=Math.floor(0x100000000*Math.random());let r="";for(let i=0;i<e;i++)r+=e3[t[i]%e3.length];return r}function e5(e=""){return eX.faro.transports.transports.flatMap(e=>e.getIgnoreUrls()).some(t=>e&&null!=e.match(t))}function e8(e){return eu(e,"string")?e:e instanceof URL?e.href:!ef(e)&&eu(null==e?void 0:e.toString,"function")?e.toString():void 0}let e6="fetch",e9=!1;function e7(){if(n)return n;function e(e){n.notify({type:eA,request:e})}function t(e){n.notify({type:eR,request:e})}return n=new eO,e9||(function({onRequestEnd:e,onRequestStart:t}){a||(a=window.fetch),window.fetch=function(){var i,r;let n=null!=(i=e8(arguments[0]))?i:"",s=e5(n),o=(null!=(r=arguments[1])?r:{}).method,l=e4();return s||t({url:n,method:o,requestId:l,apiType:e6}),a.apply(this,arguments).then(t=>(s||e({url:n,method:o,requestId:l,apiType:e6}),t)).catch(t=>{throw s||e({url:n,method:o,requestId:l,apiType:e6}),t})}}({onRequestStart:e,onRequestEnd:t}),function({onRequestStart:e,onRequestEnd:t}){s||(s=XMLHttpRequest.prototype.open),XMLHttpRequest.prototype.open=function(){let i=arguments[1],r=e5(i),n=arguments[0],a=e4();this.addEventListener("loadstart",function(){r||e({url:i,method:n,requestId:a,apiType:"xhr"})}),this.addEventListener("load",function(){r||t({url:i,method:n,requestId:a,apiType:"xhr"})}),this.addEventListener("error",function(){r||t({url:i,method:n,requestId:a,apiType:"xhr"})}),this.addEventListener("abort",function(){r||t({url:i,method:n,requestId:a,apiType:"xhr"})}),s.apply(this,arguments)}}({onRequestStart:e,onRequestEnd:t}),e9=!0),n}let te=new Set,tt=new Map,ti=!1;class tr extends el{constructor(){super(...arguments),this.name="@grafana/faro-web-sdk:instrumentation-navigation",this.version=ey}initialize(){var e;let t=e7(),i=e2(),r=function(){function e(e,t){let i=null!=t?t:location.href;i!==u&&(l.notify({type:"url-change",from:u,to:i,trigger:e}),u=i)}if(l||(l=new eO,u=location.href),!ti)if("navigation"in window&&"NavigateEvent"in window){g=t=>{try{let i=null==t?void 0:t.destination;(null==i?void 0:i.sameDocument)&&"string"==typeof i.url&&e("navigate",i.url)}catch(e){}},window.navigation.addEventListener("navigate",g);let t=window.NavigateEvent;t&&t.prototype&&"function"==typeof t.prototype.intercept&&(m||(m=t.prototype.intercept),t.prototype.intercept=function(t){try{let t=!!(this===null||void 0===this?void 0:this.canIntercept),i=this===null||void 0===this?void 0:this.destination;t&&i&&!1===i.sameDocument&&"string"==typeof i.url&&e("navigate-intercept",i.url)}catch(e){}return m.call(this,t)}),ti=!0}else c||(c=window.history.pushState),window.history.pushState=function(...t){let i=c.apply(window.history,t);return e("pushState"),i},d||(d=window.history.replaceState),window.history.replaceState=function(...t){let i=d.apply(window.history,t);return e("replaceState"),i},h=()=>e("popstate"),p=()=>e("hashchange"),window.addEventListener("popstate",h),window.addEventListener("hashchange",p),ti=!0;return l}(),n=(e=["pointerdown","keydown"],o||(o=new eO),e.forEach(e=>{if(!te.has(e)){let t=()=>{o.notify({type:"interaction",name:e})};window.addEventListener(e,t),te.add(e),tt.set(e,t)}}),o),s=new e0(new eO().merge(t,i,r),{inactivityMs:100,drainTimeoutMs:1e4,isOperationStart:e=>e.type===eA?e.request.requestId:void 0,isOperationEnd:e=>e.type===eR?e.request.requestId:void 0});s.filter(e=>"tracking-ended"===e.message).subscribe(e=>{var t,i,r;if((null==(t=e.events)?void 0:t.some(e=>"url-change"===e.type))&&(null==(i=e.events)?void 0:i.some(e=>"dom-mutation"===e.type))){let t=null==(r=e.events)?void 0:r.find(e=>"url-change"===e.type);eX.faro.api.pushEvent("faro.navigation",{fromUrl:null==t?void 0:t.from,toUrl:null==t?void 0:t.to,sameDocument:String(!0),duration:e.duration})}}),n.subscribe(()=>{s.startTracking()})}}let tn="unknown",ts="sessionStorage",ta="localStorage";function to(e){var t;try{let t;t=window[e];let i="__faro_storage_test__";return t.setItem(i,i),t.removeItem(i),!0}catch(i){return null==(t=eX.faro.internalLogger)||t.info(`Web storage of type ${e} is not available. Reason: ${i}`),!1}}function tl(e,t){return tp(t)?window[t].getItem(e):null}function tu(e,t,i){if(tp(i))try{window[i].setItem(e,t)}catch(e){}}function tc(e,t){tp(t)&&window[t].removeItem(e)}let td=to(ta),th=to(ts);function tp(e){return e===ta?td:e===ts&&th}let tg="com.grafana.faro.lastNavigationId",tm="resource",tf=/^00-[a-f0-9]{32}-[a-f0-9]{16}-[0-9]{1,2}$/;function tb(e=[]){for(let t of e)if("traceparent"===t.name){if(!tf.test(t.description))continue;let[,e,i]=t.description.split("-");if(null!=e&&null!=i)return{traceId:e,spanId:i};break}}function tv(e){let t,{connectEnd:i,connectStart:r,decodedBodySize:n,domainLookupEnd:s,domainLookupStart:a,duration:o,encodedBodySize:l,fetchStart:u,initiatorType:c,name:d,nextHopProtocol:h,redirectEnd:p,redirectStart:g,renderBlockingStatus:m,requestStart:f,responseEnd:b,responseStart:v,responseStatus:_,secureConnectionStart:T,transferSize:E,workerStart:S}=e;return{name:d,httpHost:function(e){try{return new URL(e).host||tn}catch(e){return tn}}(d),duration:t_(o),tcpHandshakeTime:t_(i-r),dnsLookupTime:t_(s-a),tlsNegotiationTime:t_(i-T),responseStatus:t_(_),redirectTime:t_(p-g),requestTime:t_(v-f),responseTime:t_(b-v),fetchTime:t_(b-u),serviceWorkerTime:t_(u-S),decodedBodySize:t_(n),encodedBodySize:t_(l),cacheHitStatus:(t="fullLoad",0===E?n>0&&(t="cache"):null!=_?304===_&&(t="conditionalFetch"):l>0&&E<l&&(t="conditionalFetch"),t),renderBlockingStatus:t_(m),protocol:h,initiatorType:c,visibilityState:document.visibilityState,ttfb:t_(v-f),transferSize:t_(E)}}function t_(e){return null==e?tn:"number"==typeof e?Math.round(e>0?e:0).toString():e.toString()}let tT={initiatorType:["xmlhttprequest","fetch"]},tE=new eO;class tS extends el{constructor(){super(...arguments),this.name="@grafana/faro-web-sdk:instrumentation-performance",this.version=ey}initialize(){if(!("PerformanceObserver"in window))return void this.logDebug("performance observer not supported. Disable performance instrumentation.");var e=()=>{var e,t,i,r;return e=this,t=void 0,i=void 0,r=function*(){let e,t,i,r=this.api.pushEvent,{faroNavigationId:n}=yield(t=new Promise(t=>{e=t}),new PerformanceObserver(t=>{var i;let[n]=t.getEntries();if(null==n||e5(n.name))return;let s=n.toJSON(),a=tb(null==s?void 0:s.serverTiming),o=null!=(i=tl(tg,ts))?i:tn,l=Object.assign(Object.assign({},function(e){var t;let{activationStart:i,domComplete:r,domContentLoadedEventEnd:n,domContentLoadedEventStart:s,domInteractive:a,fetchStart:o,loadEventEnd:l,loadEventStart:u,responseStart:c,type:d}=e,h=(null==(t=performance.timing)?void 0:t.domLoading)!=null?performance.timing.domLoading-performance.timeOrigin:null;return Object.assign(Object.assign({},tv(e)),{pageLoadTime:t_(r-o),documentParsingTime:t_(h?a-h:null),domProcessingTime:t_(r-a),domContentLoadHandlerTime:t_(n-s),onLoadTime:t_(l-u),ttfb:t_(Math.max(c-(null!=i?i:0),0)),type:d})}(s)),{faroNavigationId:e4(),faroPreviousNavigationId:o});tu(tg,l.faroNavigationId,ts),r("faro.performance.navigation",l,void 0,{spanContext:a,timestampOverwriteMs:performance.timeOrigin+s.startTime}),e(l)}).observe({type:"navigation",buffered:!0}),t);null!=n&&(i=eX.faro.config.trackResources,new PerformanceObserver(e=>{for(let t of e.getEntries()){if(e5(t.name))continue;null==tE||tE.notify({type:tm});let e=t.toJSON(),s=tb(null==e?void 0:e.serverTiming);(null==i&&function(e,t={}){for(let[i,r]of Object.entries(t)){let t=e[i];if(null==t)return!1;if(ep(r))return r.includes(t);return t===r}return!0}(e,tT)||i)&&r("faro.performance.resource",Object.assign(Object.assign({},tv(e)),{faroNavigationId:n,faroResourceId:e4()}),void 0,{spanContext:s,timestampOverwriteMs:performance.timeOrigin+e.startTime})}}).observe({type:tm,buffered:!0}))}
5,new(i||(i=Promise))(function(n,s){function a(e){try{l(r.next(e))}catch(e){s(e)}}function o(e){try{l(r.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?n(e.value):((t=e.value)instanceof i?t:new i(function(e){e(t)})).then(a,o)}l((r=r.apply(e,t||[])).next())})};if("complete"===document.readyState)e();else{let t=()=>{"complete"===document.readyState&&(e(),document.removeEventListener("readystatechange",t))};document.addEventListener("readystatechange",t)}}}let tw="session_start",ty="session_resume";function tO(e,t){let i,r=!1,n=()=>{if(null==i){r=!1;return}e(...i),i=null,setTimeout(n,t)};return(...s)=>{if(r){i=s;return}e(...s),r=!0,setTimeout(n,t)}}let tA="com.grafana.faro.session",tR={enabled:!0,persistent:!1,maxSessionPersistenceTime:9e5};function tC(e,t){if(e===t)return!0;if(eu(e,"number")&&isNaN(e))return eu(t,"number")&&isNaN(t);let i=ep(e),r=ep(t);if(i!==r)return!1;if(i&&r){let i=e.length;if(i!==t.length)return!1;for(let r=i;0!=r--;)if(!tC(e[r],t[r]))return!1;return!0}let n=eh(e),s=eh(t);if(n!==s)return!1;if(e&&t&&n&&s){let i=Object.keys(e),r=Object.keys(t);if(i.length!==r.length)return!1;for(let e of i)if(!r.includes(e))return!1;for(let r of i)if(!tC(e[r],t[r]))return!1;return!0}return!1}function tx(){var e,t,i;let r=eX.faro.config.sessionTracking,n=null!=(i=null!=(t=null==(e=null==r?void 0:r.sampler)?void 0:e.call(r,{metas:eX.faro.metas.value}))?t:null==r?void 0:r.samplingRate)?i:1;return Math.random()<("number"==typeof n?Math.min(1,Math.max(0,n)):0)}function tN({sessionId:e,started:t,lastActivity:i,isSampled:r=!0}={}){var n,s;let a=eY(),o=null==(s=null==(n=eX.faro.config)?void 0:n.sessionTracking)?void 0:s.generateSessionId;return null==e&&(e="function"==typeof o?o():e4()),{sessionId:e,lastActivity:null!=i?i:a,started:null!=t?t:a,isSampled:r}}function tL(e){if(null==e)return!1;let t=eY();return t-e.started<144e5&&t-e.lastActivity<9e5}function tP({fetchUserSession:e,storeUserSession:t}){return function({forceSessionExtend:i}={forceSessionExtend:!1}){var r,n,s;if(!e||!t)return;let a=eX.faro.config.sessionTracking,o=null==a?void 0:a.persistent;if(o&&!td||!o&&!th)return;let l=e();if(!1===i&&tL(l))t(Object.assign(Object.assign({},l),{lastActivity:eY()}));else{let e=tI(tN({isSampled:tx()}),l);t(e),null==(r=eX.faro.api)||r.setSession(e.sessionMeta),null==(n=null==a?void 0:a.onSessionChange)||n.call(a,null!=(s=null==l?void 0:l.sessionMeta)?s:null,e.sessionMeta)}}}function tI(e,t){var i,r,n,s,a,o,l;let u=Object.assign(Object.assign({},e),{sessionMeta:{id:e.sessionId,attributes:function(e){let t={};for(let i of Object.keys(e)){let r=e[i];void 0!==r&&(t[i]=r)}return t}(Object.assign(Object.assign(Object.assign({},null==(r=null==(i=eX.faro.config.sessionTracking)?void 0:i.session)?void 0:r.attributes),null!=(s=null==(n=eX.faro.metas.value.session)?void 0:n.attributes)?s:{}),{isSampled:e.isSampled.toString()}))}}),c=null!=(o=null==(a=eX.faro.metas.value.session)?void 0:a.overrides)?o:null==(l=null==t?void 0:t.sessionMeta)?void 0:l.overrides;ef(c)||(u.sessionMeta.overrides=c);let d=null==t?void 0:t.sessionId;return null!=d&&(u.sessionMeta.attributes.previousSession=d),u}function tk({fetchUserSession:e,storeUserSession:t}){let i=!1;return function(r){if(i)return;let n=r.session,s=e(),a=null==n?void 0:n.id,o=null==n?void 0:n.attributes,l=null==n?void 0:n.overrides,u=null==s?void 0:s.sessionMeta,c=null==u?void 0:u.overrides,d=!!l&&!tC(l,c),h=!!o&&!tC(o,null==u?void 0:u.attributes);if(n&&a!==(null==s?void 0:s.sessionId)||h||d){let e=tI(tN({sessionId:a,isSampled:tx()}),s);t(e),function(e,t={},i={}){var r,n,s;if(!e)return;let a=t.serviceName,o=null!=(s=null!=(r=i.serviceName)?r:null==(n=eX.faro.metas.value.app)?void 0:n.name)?s:"";a&&a!==o&&eX.faro.api.pushEvent("service_name_override",{serviceName:a,previousServiceName:o})}(d,l,c),i=!0;try{eX.faro.api.setSession(e.sessionMeta)}finally{i=!1}}}}class tD{constructor(){this.updateSession=tO(()=>this.updateUserSession(),1e3),this.updateUserSession=tP({fetchUserSession:tD.fetchUserSession,storeUserSession:tD.storeUserSession}),this.init()}static removeUserSession(){tc(tA,tD.storageTypeLocal)}static storeUserSession(e){tu(tA,eb(e),tD.storageTypeLocal)}static fetchUserSession(){let e=tl(tA,tD.storageTypeLocal);return e?JSON.parse(e):null}init(){document.addEventListener("visibilitychange",()=>{"visible"===document.visibilityState&&this.updateSession()}),eX.faro.metas.addListener(tk({fetchUserSession:tD.fetchUserSession,storeUserSession:tD.storeUserSession}))}}tD.storageTypeLocal=ta;class tM{constructor(){this.updateSession=tO(()=>this.updateUserSession(),1e3),this.updateUserSession=tP({fetchUserSession:tM.fetchUserSession,storeUserSession:tM.storeUserSession}),this.init()}static removeUserSession(){tc(tA,tM.storageTypeSession)}static storeUserSession(e){tu(tA,eb(e),tM.storageTypeSession)}static fetchUserSession(){let e=tl(tA,tM.storageTypeSession);return e?JSON.parse(e):null}init(){document.addEventListener("visibilitychange",()=>{"visible"===document.visibilityState&&this.updateSession()}),eX.faro.metas.addListener(tk({fetchUserSession:tM.fetchUserSession,storeUserSession:tM.storeUserSession}))}}function tU(e){return(null==e?void 0:e.persistent)?tD:tM}tM.storageTypeSession=ts;class tj extends el{constructor(){super(...arguments),this.name="@grafana/faro-web-sdk:instrumentation-se
5ssion",this.version=ey}sendSessionStartEvent(e){var t,i;let r=e.session;if(r&&r.id!==(null==(t=this.notifiedSession)?void 0:t.id)){if(this.notifiedSession&&this.notifiedSession.id===(null==(i=r.attributes)?void 0:i.previousSession)){this.api.pushEvent("session_extend",{},void 0,{skipDedupe:!0}),this.notifiedSession=r;return}this.notifiedSession=r,this.api.pushEvent(tw,{},void 0,{skipDedupe:!0})}}createInitialSession(e,t){var i,r,n,s,a,o,l,u,c,d;let h,p,g=e.fetchUserSession();if(t.persistent&&t.maxSessionPersistenceTime&&g){let e=eY();g.lastActivity<e-t.maxSessionPersistenceTime&&(tD.removeUserSession(),g=null)}if(tL(g)){let e=null==g?void 0:g.sessionId;p=tN({sessionId:e,isSampled:g.isSampled||!1,started:null==g?void 0:g.started});let n=null==g?void 0:g.sessionMeta,s=Object.assign(Object.assign({},null==(i=t.session)?void 0:i.overrides),null==n?void 0:n.overrides);p.sessionMeta=Object.assign(Object.assign({},t.session),{id:e,attributes:Object.assign(Object.assign(Object.assign({},null==(r=t.session)?void 0:r.attributes),null==n?void 0:n.attributes),{isSampled:p.isSampled.toString()}),overrides:s}),h=ty}else{let e=null!=(s=null==(n=t.session)?void 0:n.id)?s:({id:null!=(d=null==(c=null==(u=null==(l=eX.faro.config)?void 0:l.sessionTracking)?void 0:u.generateSessionId)?void 0:c.call(u))?d:e4(),attributes:void 0}).id;p=tN({sessionId:e,isSampled:tx()});let i=null==(a=t.session)?void 0:a.overrides;p.sessionMeta=Object.assign({id:e,attributes:Object.assign({isSampled:p.isSampled.toString()},null==(o=t.session)?void 0:o.attributes)},i?{overrides:i}:{}),h=tw}return{initialSession:p,lifecycleType:h}}registerBeforeSendHook(e){var t;let{updateSession:i}=new e;null==(t=this.transports)||t.addBeforeSendHooks(e=>{var t,r,n;i();let s=null==(t=e.meta.session)?void 0:t.attributes;if(s&&(null==s?void 0:s.isSampled)==="true"){let t=JSON.parse(JSON.stringify(e)),i=null==(r=t.meta.session)?void 0:r.attributes;return null==i||delete i.isSampled,0===Object.keys(null!=i?i:{}).length&&(null==(n=t.meta.session)||delete n.attributes),t}return null})}initialize(){this.logDebug("init session instrumentation");let e=this.config.sessionTracking;if(null==e?void 0:e.enabled){let t=tU(e);this.registerBeforeSendHook(t);let{initialSession:i,lifecycleType:r}=this.createInitialSession(t,e);t.storeUserSession(i);let n=i.sessionMeta;this.notifiedSession=n,this.api.setSession(n),r===tw&&this.api.pushEvent(tw,{},void 0,{skipDedupe:!0}),r===ty&&this.api.pushEvent(ty,{},void 0,{skipDedupe:!0})}this.metas.addListener(this.sendSessionStartEvent.bind(this))}}let tB="normal";(x=z||(z={}))[x.Started=0]="Started",x[x.Halted=1]="Halted",x[x.Cancelled=2]="Cancelled",x[x.Ended=3]="Ended",(N=$||($={})).EXCEPTION="exception",N.LOG="log",N.MEASUREMENT="measurement",N.TRACE="trace",N.EVENT="event";let tF={[$.EXCEPTION]:"exceptions",[$.LOG]:"logs",[$.MEASUREMENT]:"measurements",[$.TRACE]:"traces",[$.EVENT]:"events"};class tH{constructor(){this.buffer=[]}addItem(e){this.buffer.push(e)}flushBuffer(e){if(eu(e,"function"))for(let t of this.buffer)e(t);this.buffer.length=0}size(){return this.buffer.length}}class tV extends eO{constructor({name:e,parentId:t,trigger:i,transports:r,attributes:n,trackUserActionsExcludeItem:s,importance:a=tB,pushEvent:o}){super(),this.name=e,this.attributes=n,this.id=e4(),this.trigger=i,this.parentId=null!=t?t:this.id,this.trackUserActionsExcludeItem=s,this.importance=a,this._pushEvent=o,this._itemBuffer=new tH,this._transports=r,this._state=z.Started,this._start()}addItem(e){return this._state===z.Started&&(this._itemBuffer.addItem(e),!0)}_start(){this._state=z.Started,this._state===z.Started&&(this.startTime=eY(),this._startTimeMono=eQ())}halt(){this._state===z.Started&&(this._state=z.Halted,this.notify(this._state))}cancel(){this._state===z.Started&&this._itemBuffer.flushBuffer(e=>{this._transports.execute(e)}),this._state=z.Cancelled,this.notify(this._state)}end(){if(this._state===z.Cancelled)return;let e=eY(),t=eQ()-this._startTimeMono;this._state=z.Ended,this._itemBuffer.flushBuffer(e=>{var t,i;if(t=e,(null==(i=this.trackUserActionsExcludeItem)?void 0:i(t))||t.type===$.MEASUREMENT&&"web-vitals"===t.payload.type)return void this._transports.execute(e);let r=Object.assign(Object.assign({},e),{payload:Object.assign(Object.assign({},e.payload),{action:{parentId:this.id,name:this.name}})});this._transports.execute(r)}),this._state=z.Ended,this.notify(this._state),this._pushEvent("faro.user.action",Object.assign({userActionName:this.name,userActionStartTime:this.startTime.toString(),userActionEndTime:e.toString(),userActionDuration:t.toString(),userActionTrigger:this.trigger,userActionImportance:this.importance},ev(this.attributes)),void 0,{timestampOverwriteMs:this.startTime,customPayloadTransformer:e=>(e.action={id:this.id,name:this.name},e)})}getState(){return this._state}}let tz=new eO;function t$(e,t){return!!e&&(null==e?void 0:e.getState())===z.Started&&(e.addItem(t),!0)}let tq="data-faro-user-action-name",tG=!1;function tK(e){return e.type===eR}class tW{constructor(e){this.userAction=e,this.http=e7(),this.dom=e2(),this.perf=(f||(f=ne
5w eO),tG||(tE.subscribe(e=>{e.type===tm&&f.notify({type:"resource-entry"})}),tG=!0),f),this.isValid=!1,this.runningRequests=new Map}attach(){this.allMonitorsSub=new eO().merge(this.http,this.dom,this.perf).takeWhile(()=>[z.Started,z.Halted].includes(this.userAction.getState())).filter(e=>this.userAction.getState()!==z.Halted||!!(tK(e)&&this.runningRequests.has(e.request.requestId))).subscribe(e=>{e.type===eA&&this.runningRequests.set(e.request.requestId,e.request),tK(e)&&this.runningRequests.delete(e.request.requestId),tK(e)?this.userAction.getState()===z.Halted&&0===this.runningRequests.size&&this.endAction():(this.isValid||(this.isValid=!0),this.scheduleFollowUp())}),this.stateSub=this.userAction.filter(e=>[z.Ended,z.Cancelled].includes(e)).first().subscribe(()=>this.cleanup()),this.scheduleFollowUp()}scheduleFollowUp(){this.clearTimer(this.followUpTid),this.followUpTid=setTimeout(()=>{this.userAction.getState()===z.Started&&this.runningRequests.size>0?this.haltAction():this.isValid?this.endAction():this.cancelAction()},100)}haltAction(){this.userAction.getState()===z.Started&&(this.userAction.halt(),this.startHaltTimeout())}startHaltTimeout(){var e,t;this.clearTimer(this.haltTid),this.haltTid=(e=this.haltTid,t=()=>{this.userAction.getState()===z.Halted&&this.endAction()},e&&clearTimeout(e),e=setTimeout(()=>{t()},1e4))}endAction(){this.userAction.end(),this.cleanup()}cancelAction(){this.userAction.cancel(),this.cleanup()}cleanup(){var e,t;this.clearTimer(this.followUpTid),this.clearTimer(this.haltTid),null==(e=this.allMonitorsSub)||e.unsubscribe(),null==(t=this.stateSub)||t.unsubscribe(),this.allMonitorsSub=void 0,this.stateSub=void 0,this.runningRequests.clear()}clearTimer(e){e&&clearTimeout(e)}}class tX extends el{constructor(){super(...arguments),this.name="@grafana/faro-web-sdk:instrumentation-user-action",this.version=ey}initialize(){let{processUserEvent:e,processUserActionStarted:t}=function(e){let{api:t,config:i}=e;function r(e){new tW(e).attach()}return{processUserEvent:function(e){var n,s;let a=function(e,t){let i,r,n=null==(r=null==(i=t.split("data-")[1])?void 0:i.replace(/-(.)/g,(e,t)=>t.toUpperCase()))?void 0:r.replace(/-/g,""),s=e.dataset;for(let e in s)if(e===n)return s[e]}(e.target,null!=(s=null==(n=i.userActionsInstrumentation)?void 0:n.dataAttributeName)?s:"faroUserActionName");if(!a)return;let o=t.startUserAction(a,{},{triggerName:e.type});o&&r(o)},processUserActionStarted:r}}(eX.faro);window.addEventListener("pointerdown",e),window.addEventListener("keydown",t=>{[" ","Enter"].includes(t.key)&&e(t)}),this._userActionSub=tz.subscribe(({type:e,userAction:i})=>{"user_action_start"===e&&t(i)})}destroy(){var e;null==(e=this._userActionSub)||e.unsubscribe()}}class tY extends el{constructor(){super(...arguments),this.name="@grafana/faro-web-sdk:instrumentation-view",this.version=ey}sendViewChangedEvent(e){var t,i,r,n;let s=e.view;s&&s.name!==(null==(t=this.notifiedView)?void 0:t.name)&&(this.api.pushEvent("view_changed",{fromView:null!=(r=null==(i=this.notifiedView)?void 0:i.name)?r:tn,toView:null!=(n=s.name)?n:tn},void 0,{skipDedupe:!0}),this.notifiedView=s)}initialize(){this.metas.addListener(this.sendViewChangedEvent.bind(this))}}class tQ{t;o=0;i=[];u(e){if(e.hadRecentInput)return;let t=this.i[0],i=this.i.at(-1);this.o&&t&&i&&e.startTime-i.startTime<1e3&&e.startTime-t.startTime<5e3?(this.o+=e.value,this.i.push(e)):(this.o=e.value,this.i=[e]),this.t?.(e)}}let tJ=()=>{let e=performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},tZ=e=>{if("loading"===document.readyState)return"loading";let t=tJ();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"},t0=e=>{let t=e.nodeName;return 1===e.nodeType?t.toLowerCase():t.toUpperCase().replace(/^#/,"")},t1=e=>{let t="";try{for(;9!==e?.nodeType;){let i=e,r=i.id?"#"+i.id:[t0(i),...Array.from(i.classList).sort()].join(".");if(t.length+r.length>99)return t||r;if(t=t?r+">"+t:r,i.id)break;e=i.parentNode}}catch{}return t},t2=new WeakMap;function t3(e,t){return t2.get(e)||t2.set(e,new t),t2.get(e)}let t4=-1,t5=e=>{addEventListener("pageshow",t=>{t.persisted&&(t4=t.timeStamp,e(t))},!0)},t8=(e,t,i,r)=>{let n,s;return a=>{let o;t.value>=0&&(a||r)&&((s=t.value-(n??0))||void 0===n)&&(n=t.value,t.delta=s,o=t.value,t.rating=o>i[1]?"poor":o>i[0]?"needs-improvement":"good",e(t))}},t6=e=>{requestAnimationFrame(()=>requestAnimationFrame(e))},t9=()=>tJ()?.activationStart??0,t7=(e,t=-1)=>{let i=tJ(),r="navigate";return t4>=0?r="back-forward-cache":i&&(document.prerendering||t9()>0?r="prerender":document.wasDiscarded?r="restore":i.type&&(r=i.type.replace(/_/g,"-"))),{name:e,value:t,rating:"good",delta:0,entries:[],id:`v5-${Date.now()}-${Math.floor(0x82f79cd8fff*Math.random())+1e12}`,navigationType:r}},ie=(e,t,i={})=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){let r=new PerformanceObserver(e=>{queueMicrotask(()=>{t(e.getEntries())})});return r.observe({type:e,buffered:!0,...i}),r}}catch{}},it=e=>{let t=!1;return()=>{t||(e(),t=!0)}},ii=-1,ir=new Set,is=()=>"hidden"!==document.visibilityState||document.prerendering?1/0:0,ia=e=>{if("hidden"===document.visibilityState){if("visibilitychange"===e.type)for(let e of ir)e();isFinite(ii)||(ii="visibilitychange"===e.type?e.timeStamp:0,removeEventListener("prerenderingchange",ia,!0))}},io=()=>
5{if(ii<0){let e=t9();ii=(document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").find(t=>"hidden"===t.name&&t.startTime>=e)?.startTime)??is(),addEventListener("visibilitychange",ia,!0),addEventListener("prerenderingchange",ia,!0),t5(()=>{setTimeout(()=>{ii=is()})})}return{get firstHiddenTime(){return ii},onHidden(e){ir.add(e)}}},il=e=>{document.prerendering?addEventListener("prerenderingchange",e,!0):e()},iu=[1800,3e3],ic=(e,t={})=>{il(()=>{let i=io(),r,n=t7("FCP"),s=ie("paint",e=>{for(let t of e)"first-contentful-paint"===t.name&&(s.disconnect(),t.startTime<i.firstHiddenTime&&(n.value=Math.max(t.startTime-t9(),0),n.entries.push(t),r(!0)))});s&&(r=t8(e,n,iu,t.reportAllChanges),t5(i=>{r=t8(e,n=t7("FCP"),iu,t.reportAllChanges),t6(()=>{n.value=performance.now()-i.timeStamp,r(!0)})}))})},id=[.1,.25],ih=e=>e.find(e=>1===e.node?.nodeType)||e[0],ip=0,ig=1/0,im=0,ib=e=>{for(let t of e)t.interactionId&&(ig=Math.min(ig,t.interactionId),ip=(im=Math.max(im,t.interactionId))?(im-ig)/7+1:0)},iv=()=>b?ip:performance.interactionCount??0,i_=0;class iT{l=[];h=new Map;m;p;v(){i_=iv(),this.l.length=0,this.h.clear()}M(){let e=Math.min(this.l.length-1,Math.floor((iv()-i_)/50));return this.l[e]}u(e){if(this.m?.(e),!e.interactionId&&"first-input"!==e.entryType)return;let t=this.l.at(-1),i=this.h.get(e.interactionId);if(i||this.l.length<10||e.duration>t.T){if(i?e.duration>i.T?(i.entries=[e],i.T=e.duration):e.duration===i.T&&e.startTime===i.entries[0].startTime&&i.entries.push(e):(i={id:e.interactionId,entries:[e],T:e.duration},this.h.set(i.id,i),this.l.push(i)),this.l.sort((e,t)=>t.T-e.T),this.l.length>10)for(let e of this.l.splice(10))this.h.delete(e.id);this.p?.(i)}}}let iE=e=>{let t=globalThis.requestIdleCallback||setTimeout,i=globalThis.cancelIdleCallback||clearTimeout;if("hidden"===document.visibilityState)e();else{let r=it(e),n=-1,s=()=>{i(n),r()};addEventListener("visibilitychange",s,{once:!0,capture:!0}),n=t(()=>{removeEventListener("visibilitychange",s,{capture:!0}),r()})}},iS=[200,500];class iw{m;u(e){this.m?.(e)}}let iy=[2500,4e3],iO=[800,1800],iA=e=>{document.prerendering?il(()=>iA(e)):"complete"!==document.readyState?addEventListener("load",()=>iA(e),!0):setTimeout(e)},iR="load_state",iC="time_to_first_byte";class ix{constructor(e,t){this.corePushMeasurement=e,this.webVitalConfig=t}initialize(){this.measureCLS(),this.measureFCP(),this.measureINP(),this.measureLCP(),this.measureTTFB()}measureCLS(){var e;((e,t={})=>{let i=t3(t=Object.assign({},t),tQ),r=new WeakMap;i.t=e=>{if(e?.sources?.length){let i=ih(e.sources),n=i?.node;if(n){let e=t.generateTarget?.(n)??t1(n);r.set(i,e)}}},((e,t={})=>{let i=io();ic(it(()=>{let r,n=t7("CLS",0),s=t3(t,tQ),a=e=>{for(let t of e)s.u(t);s.o>n.value&&(n.value=s.o,n.entries=s.i,r())},o=ie("layout-shift",a);o&&(r=t8(e,n,id,t.reportAllChanges),i.onHidden(()=>{a(o.takeRecords()),r(!0)}),t5(()=>{s.o=0,t6(r=t8(e,n=t7("CLS",0),id,t.reportAllChanges))}),setTimeout(r))}))})(t=>{e((e=>{let t={};if(e.entries.length){let i=e.entries.reduce((e,t)=>e.value>t.value?e:t);if(i?.sources?.length){let e=ih(i.sources);e&&(t={largestShiftTarget:r.get(e),largestShiftTime:i.startTime,largestShiftValue:i.value,largestShiftSource:e,largestShiftEntry:i,loadState:tZ(i.startTime)})}}return Object.assign(e,{attribution:t})})(t))},t)})(e=>{let{loadState:t,largestShiftValue:i,largestShiftTime:r,largestShiftTarget:n}=e.attribution,s=this.buildInitialValues(e);this.addIfPresent(s,"largest_shift_value",i),this.addIfPresent(s,"largest_shift_time",r);let a=this.buildInitialContext(e);this.addIfPresent(a,iR,t),this.addIfPresent(a,"largest_shift_target",n),this.pushMeasurement(s,a)},{reportAllChanges:null==(e=this.webVitalConfig)?void 0:e.reportAllChanges})}measureFCP(){var e;((e,t={})=>{ic(t=>{e((e=>{let t={timeToFirstByte:0,firstByteToFCP:e.value,loadState:tZ(t4)};if(e.entries.length){let i=tJ(),r=e.entries.at(-1);if(i){let n=i.activationStart||0,s=Math.max(0,i.responseStart-n);t={timeToFirstByte:s,firstByteToFCP:e.value-s,loadState:tZ(e.entries[0].startTime),navigationEntry:i,fcpEntry:r}}}return Object.assign(e,{attribution:t})})(t))},t)}
5)(e=>{let{firstByteToFCP:t,timeToFirstByte:i,loadState:r}=e.attribution,n=this.buildInitialValues(e);this.addIfPresent(n,"first_byte_to_fcp",t),this.addIfPresent(n,iC,i);let s=this.buildInitialContext(e);this.addIfPresent(s,iR,r),this.pushMeasurement(n,s)},{reportAllChanges:null==(e=this.webVitalConfig)?void 0:e.reportAllChanges})}measureINP(){var e;((e,t={})=>{let i=t3(t=Object.assign({},t),iT),r=[],n=[],s=0,a=new WeakMap,o=new WeakMap,l=!1,u=()=>{l||(iE(c),l=!0)},c=()=>{let e=new Set(i.l.map(e=>a.get(e.entries[0]))),t=n.length-10;n=n.filter((i,r)=>r>=t||e.has(i));let o=new Set;for(let e of n)for(let t of d(e.startTime,e.processingEnd))o.add(t);r=r.filter(e=>e.startTime>s||o.has(e)),l=!1};i.m=e=>{let i,r=e.startTime+e.duration;s=Math.max(s,e.processingEnd);for(let s=n.length-1;s>=0;s--){let a=n[s];if(8>=Math.abs(r-a.renderTime)){(i=a).startTime=Math.min(e.startTime,i.startTime),i.processingStart=Math.min(e.processingStart,i.processingStart),i.processingEnd=Math.max(e.processingEnd,i.processingEnd),!1!==t.includeProcessedEventEntries&&i.entries.push(e);break}}i||(i={startTime:e.startTime,processingStart:e.processingStart,processingEnd:e.processingEnd,renderTime:r,entries:!1!==t.includeProcessedEventEntries?[e]:[]},n.push(i)),(e.interactionId||"first-input"===e.entryType)&&a.set(e,i),u()},i.p=e=>{if(!o.get(e)){let i=e.entries[0].target;if(i){let r=t.generateTarget?.(i)??t1(i);o.set(e,r)}}};let d=(e,t)=>{let i=[];for(let n of r)if(!(n.startTime+n.duration<e)){if(n.startTime>t)break;i.push(n)}return i};ie("long-animation-frame",e=>{r=r.concat(e),u()}),((e,t={})=>{if(!globalThis.PerformanceEventTiming||!("interactionId"in PerformanceEventTiming.prototype))return;let i=io();il(()=>{"interactionCount"in performance||b||(b=ie("event",ib,{durationThreshold:0}));let r,n=t7("INP"),s=t3(t,iT),a=e=>{iE(()=>{for(let t of e)s.u(t);let t=s.M();t&&t.T!==n.value&&(n.value=t.T,n.entries=t.entries,r())})},o=ie("event",a,{durationThreshold:t.durationThreshold??40});r=t8(e,n,iS,t.reportAllChanges),o&&(o.observe({type:"first-input",buffered:!0}),i.onHidden(()=>{a(o.takeRecords()),r(!0)}),t5(()=>{s.v(),r=t8(e,n=t7("INP"),iS,t.reportAllChanges)}))})})(t=>{let r,n,s,l,u,c,h,p,g;e((r=t.entries[0],n=a.get(r),s=r.processingStart,l=Math.max(r.startTime+r.duration,s),u=Math.min(n.processingEnd,l),c=n.entries.sort((e,t)=>e.processingStart-t.processingStart),h=d(r.startTime,u),p=i.h.get(r.interactionId),(e=>{if(!e.longAnimationFrameEntries?.length)return;let t=e.interactionTime,i=e.inputDelay,r=e.processingDuration,n,s,a=0,o=0,l=0,u=0;for(let l of e.longAnimationFrameEntries)for(let e of(o=o+l.startTime+l.duration-l.styleAndLayoutStart,l.scripts)){let l=e.startTime+e.duration;if(l<t)continue;let c=l-Math.max(t,e.startTime),d=e.duration?c/e.duration*e.forcedStyleAndLayoutDuration:0;a+=c-d,o+=d,c>u&&(s=e.startTime<t+i?"input-delay":e.startTime>=t+i+r?"presentation-delay":"processing-duration",n=e,u=c)}let c=e.longAnimationFrameEntries.at(-1),d=c?c.startTime+c.duration:0;d>=t+i+r&&(l=e.nextPaintTime-d),n&&s&&(e.longestScript={entry:n,subpart:s,intersectingDuration:u}),e.totalScriptDuration=a,e.totalStyleAndLayoutDuration=o,e.totalPaintDuration=l,e.totalUnattributedDuration=e.nextPaintTime-t-a-o-l})(g={interactionTarget:o.get(p),interactionType:r.name.startsWith("key")?"keyboard":"pointer",interactionTime:r.startTime,nextPaintTime:l,processedEventEntries:c,longAnimationFrameEntries:h,inputDelay:s-r.startTime,processingDuration:u-s,presentationDelay:l-u,loadState:tZ(r.startTime),longestScript:void 0,totalScriptDuration:void 0,totalStyleAndLayoutDuration:void 0,totalPaintDuration:void 0,totalUnattributedDuration:void 0}),Object.assign(t,{attribution:g})))},t)}
5)(e=>{let{interactionTime:t,presentationDelay:i,inputDelay:r,processingDuration:n,nextPaintTime:s,loadState:a,interactionTarget:o,interactionType:l}=e.attribution,u=this.buildInitialValues(e);this.addIfPresent(u,"interaction_time",t),this.addIfPresent(u,"presentation_delay",i),this.addIfPresent(u,"input_delay",r),this.addIfPresent(u,"processing_duration",n),this.addIfPresent(u,"next_paint_time",s);let c=this.buildInitialContext(e);this.addIfPresent(c,iR,a),this.addIfPresent(c,"interaction_target",o),this.addIfPresent(c,"interaction_type",l),this.pushMeasurement(u,c)},{reportAllChanges:null==(e=this.webVitalConfig)?void 0:e.reportAllChanges})}measureLCP(){var e;((e,t={})=>{let i=t3(t=Object.assign({},t),iw),r=new WeakMap;i.m=e=>{let i=e.element;if(i){let n=t.generateTarget?.(i)??t1(i);r.set(e,n)}else e.id&&r.set(e,`#${e.id}`)},((e,t={})=>{il(()=>{let i=io(),r,n=t7("LCP"),s=t3(t,iw),a=e=>{for(let a of(t.reportAllChanges||(e=e.slice(-1)),e))s.u(a),a.startTime<i.firstHiddenTime&&(n.value=Math.max(a.startTime-t9(),0),n.entries=[a],r())},o=ie("largest-contentful-paint",a);if(o){r=t8(e,n,iy,t.reportAllChanges);let i=it(()=>{a(o.takeRecords()),o.disconnect(),r(!0)}),s=e=>{e.isTrusted&&(iE(i),removeEventListener(e.type,s,{capture:!0}))};for(let e of["keydown","click","visibilitychange"])addEventListener(e,s,{capture:!0});t5(i=>{r=t8(e,n=t7("LCP"),iy,t.reportAllChanges),t6(()=>{n.value=performance.now()-i.timeStamp,r(!0)})})}})})(t=>{e((e=>{let t={timeToFirstByte:0,resourceLoadDelay:0,resourceLoadDuration:0,elementRenderDelay:e.value};if(e.entries.length){let i=e.entries.at(-1),n=i.url&&performance.getEntriesByType("resource").find(e=>e.name===i.url);t.target=r.get(i),t.lcpEntry=i,i.url&&(t.url=i.url),n&&(t.lcpResourceEntry=n);let s=tJ();if(s){let i=s.activationStart||0,r=Math.max(0,s.responseStart-i),a=Math.max(r,n?(n.requestStart||n.startTime)-i:0),o=Math.min(e.value,Math.max(a,n?n.responseEnd-i:0));t={...t,timeToFirstByte:r,resourceLoadDelay:a-r,resourceLoadDuration:o-a,elementRenderDelay:e.value-o,navigationEntry:s}}}return Object.assign(e,{attribution:t})})(t))},t)})(e=>{let{elementRenderDelay:t,resourceLoadDelay:i,resourceLoadDuration:r,timeToFirstByte:n,target:s}=e.attribution,a=this.buildInitialValues(e);this.addIfPresent(a,"element_render_delay",t),this.addIfPresent(a,"resource_load_delay",i),this.addIfPresent(a,"resource_load_duration",r),this.addIfPresent(a,iC,n);let o=this.buildInitialContext(e);this.addIfPresent(o,"element",s),this.pushMeasurement(a,o)},{reportAllChanges:null==(e=this.webVitalConfig)?void 0:e.reportAllChanges})}measureTTFB(){var e;((e,t={})=>{((e,t={})=>{let i=t7("TTFB"),r=t8(e,i,iO,t.reportAllChanges);iA(()=>{let n=tJ();n&&(i.value=Math.max(n.responseStart-t9(),0),i.entries=[n],r(!0),t5(()=>{(r=t8(e,i=t7("TTFB",0),iO,t.reportAllChanges))(!0)}))})})(t=>{e((e=>{let t={waitingDuration:0,cacheDuration:0,dnsDuration:0,connectionDuration:0,requestDuration:0};if(e.entries.length){let i=e.entries[0],r=i.activationStart||0,n=Math.max((i.workerStart||i.fetchStart)-r,0),s=Math.max(i.domainLookupStart-r,0),a=Math.max(i.connectStart-r,0),o=Math.max(i.connectEnd-r,0);t={waitingDuration:n,cacheDuration:s-n,dnsDuration:a-s,connectionDuration:o-a,requestDuration:e.value-o,navigationEntry:i}}return Object.assign(e,{attribution:t})})(t))},t)})(e=>{let{dnsDuration:t,connectionDuration:i,requestDuration:r,waitingDuration:n,cacheDuration:s}=e.attribution,a=this.buildInitialValues(e);this.addIfPresent(a,"dns_duration",t),this.addIfPresent(a,"connection_duration",i),this.addIfPresent(a,"request_duration",r),this.addIfPresent(a,"waiting_duration",n),this.addIfPresent(a,"cache_duration",s);let o=this.buildInitialContext(e);this.pushMeasurement(a,o)},{reportAllChanges:null==(e=this.webVitalConfig)?void 0:e.reportAllChanges})}buildInitialValues(e){return{[e.name.toLowerCase()]:e.value,delta:e.delta}}buildInitialContext(e){var t;let i=null!=(t=tl(tg,ts))?t:tn;return{id:e.id,rating:e.rating,navigation_type:e.navigationType,navigation_entry_id:i}}pushMeasurement(e,t){this.corePushMeasurement({type:"web-vitals",values:e},{context:t})}addIfPresent(e,t,i){i&&(e[t]=i)}}class iN extends el{constructor(){super(...arguments),this.name="@grafana/faro-web-sdk:instrumentation-web-vitals",this.version=ey}initialize(){this.logDebug("Initializing"),new ix(this.api.pushMeasurement,this.config.webVitalsInstrumentation).initialize()}}function iL(e={}){let t=[new tX,new eW,new iN,new tj,new tY,new tr];return!1!==e.enablePerformanceInstrumentation&&t.unshift(new tS),!1!==e.enableContentSecurityPolicyInstrumentation&&t.push(new eG),!1!==e.captureConsole&&t.push(new eq),t}function iP(e=ea,t=es){return t>
5H.OFF&&(en.error=t>=H.ERROR?function(...t){e.error(`${en.prefix}
6`,...t)}:er,en.warn=t>=H.WARN?function(...t){e.warn(`${en.prefix}
7`,...t)}:er,en.info=t>=H.INFO?function(...t){e.info(`${en.prefix}
8`,...t)}:er,en.debug=t>=H.VERBOSE?function(...t){e.debug(`${en.prefix}
9`,...t)}:er),en}var iI=e.i(777389),ik=e.i(836184);class iD{constructor(e,t){var i,r;this.signalBuffer=[],this.itemLimit=null!=(i=null==t?void 0:t.itemLimit)?i:50,this.sendTimeout=null!=(r=null==t?void 0:t.sendTimeout)?r: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){let t=new Map;return e.forEach(e=>{let i=JSON.stringify(e.meta),r=t.get(i);r=void 0===r?[e]:[...r,e],t.set(i,r)}),Array.from(t.values())}flush(){this.paused||0===this.signalBuffer.length||(this.groupItems(this.signalBuffer).forEach(this.sendFn),this.signalBuffer=[])}}let iM=ea,iU={enabled:!0,sendTimeout:250,itemLimit:50};function ij(e){return{frames:eH(e)}}var iB=e.i(988364);function iF(){let e="u">typeof navigator?navigator.userAgent:"";return _===e&&T||(T=new iB.UAParser(e).getResult(),_=e),T}let iH=()=>{let{browser:e,os:t,ua:i}=iF(),{name:r,version:n}=e,{name:s,version:a}=t,o=navigator.language,l=i.includes("Mobi"),u=function(){if(r&&n&&"userAgentData"in navigator&&navigator.userAgentData)return navigator.userAgentData.brands}();return{browser:{name:null!=r?r:tn,version:null!=n?n:tn,os:`${null!=s?s:tn} ${null!=a?a:tn}`,userAgent:null!=i?i:tn,language:null!=o?o:tn,mobile:l,brands:null!=u?u:tn,viewportWidth:`${window.innerWidth}`,viewportHeight:`${window.innerHeight}`}}},iV=()=>{let{name:e,version:t}=iF().os;if(!e&&!t)return{};let i={};return e&&(i.name=e),t&&(i.version=t),{os:i}},iz=()=>({sdk:{name:"faro-web",version:ey}}),i$=()=>{let e=window.k6;return{k6:Object.assign({isK6Browser:!0},(null==e?void 0:e.testRunId)&&{testRunId:null==e?void 0:e.testRunId})}};class iq extends eo{isBatched(){return!1}getIgnoreUrls(){return[]}}var iG=function(e,t,i,r){return new(i||(i=Promise))(function(n,s){function a(e){try{l(r.next(e))}catch(e){s(e)}}function o(e){try{l(r.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?n(e.value):((t=e.value)instanceof i?t:new i(function(e){e(t)})).then(a,o)}l((r=r.apply(e,t||[])).next())})},iK=function(e,t){var i={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(i[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,r=Object.getOwnPropertySymbols(e);n<r.length;n++)0>t.indexOf(r[n])&&Object.prototype.propertyIsEnumerable.call(e,r[n])&&(i[r[n]]=e[r[n]]);return i};class iW extends iq{constructor(e){var t,i,r,n;super(),this.options=e,this.name="@grafana/faro-web-sdk:transport-fetch",this.version=ey,this.disabledUntil=new Date(0),this.rateLimitBackoffMs=null!=(t=e.defaultRateLimitBackoffMs)?t:5e3,this.getNow=null!=(i=e.getNow)?i:()=>Date.now(),this.promiseBuffer=function(e){let{size:t,concurrency:i}=e,r=[],n=0,s=()=>{if(n<i&&r.length){let{producer:e,resolve:t,reject:i}=r.shift();n++,e().then(e=>{n--,s(),t(e)},e=>{n--,s(),i(e)})}};return{add:e=>{if(r.length+n>=t)throw Error("Task buffer full");return new Promise((t,i)=>{r.push({producer:e,resolve:t,reject:i}),s()})}}}({size:null!=(r=e.bufferSize)?r:30,concurrency:null!=(n=e.concurrency)?n:5})}send(e){return iG(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(()=>iG(this,void 0,void 0,function*(){let t,i,r=JSON.stringify((i={meta:{}},void 0!==e[0]&&(i.meta=e[0].meta),e.forEach(e=>{switch(e.type){case $.LOG:case $.EVENT:case $.EXCEPTION:case $.MEASUREMENT:{let t=tF[e.type],r=i[t];i=Object.assign(Object.assign({},i),{[t]:void 0===r?[e.payload]:[...r,e.payload]});break}case $.TRACE:i=Object.assign(Object.assign({},i),{traces:function(e,t){var i,r;if(void 0===t)return e;if(void 0===e)return{resourceSpans:t};let n=null==(i=e.resourceSpans)?void 0:i[0];if(void 0===n)return e;let s=(null==n?void 0:n.scopeSpans)||[],a=(null==(r=null==t?void 0:t[0])?void 0:r.scopeSpans)||[];return Object.assign(Object.assign({},e),{resourceSpans:[Object.assign(Object.assign({},n),{scopeSpans:[...s,...a]})]})}(i.traces,e.payload.resourceSpans)})}}
9),i)),{url:n,requestOptions:s,apiKey:a}=this.options,o=null!=s?s:{},{headers:l={}}=o,u=iK(o,["headers"]),c=this.metas.value.session;null!=c&&(t=c.id);let d={};for(let[e,t]of Object.entries(l))d[e]="function"==typeof t?yield Promise.resolve(t()):t;return fetch(n,Object.assign({method:"POST",headers:Object.assign(Object.assign(Object.assign({"Content-Type":"application/json"},d),a?{"x-api-key":a}:{}),t?{"x-faro-session-id":t}:{}),body:r,keepalive:r.length<=6e4},null!=u?u:{})).then(e=>iG(this,void 0,void 0,function*(){return 202===e.status&&"invalid"===e.headers.get("X-Faro-Session-Status")&&this.extendFaroSession(this.config,this.logDebug),429===e.status&&(this.disabledUntil=this.getRetryAfterDate(e),this.logWarn(`Too many requests, backing off until ${this.disabledUntil}`)),e.text().catch(er),e})).catch(e=>{this.logError("Failed sending payload to the receiver\n",JSON.parse(r),e)})}))}catch(e){this.logError(e)}})}getIgnoreUrls(){var e;return[this.options.url].concat(null!=(e=this.config.ignoreUrls)?e:[])}isBatched(){return!0}getRetryAfterDate(e){let t=this.getNow(),i=e.headers.get("Retry-After");if(i){let e=Number(i);if(!isNaN(e))return new Date(1e3*e+t);let r=Date.parse(i);if(!isNaN(r))return new Date(r)}return new Date(t+this.rateLimitBackoffMs)}extendFaroSession(e,t){let i="Session expired",r=e.sessionTracking;if(null==r?void 0:r.enabled){let{fetchUserSession:e,storeUserSession:n}=tU(r);tP({fetchUserSession:e,storeUserSession:n})({forceSessionExtend:!0}),t(`${i} created new session.`)}else t(`${i}.`)}}var iX=function(e,t){var i={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(i[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,r=Object.getOwnPropertySymbols(e);n<r.length;n++)0>t.indexOf(r[n])&&Object.prototype.propertyIsEnumerable.call(e,r[n])&&(i[r[n]]=e[r[n]]);return i},iY=e.i(510190),iQ=e.i(917147),iJ=e.i(74587);class iZ{}class i0{addCallback(e){}removeCallback(e){}}let i1=new class{createGauge(e,t){return i3}createHistogram(e,t){return i4}createCounter(e,t){return i2}createUpDownCounter(e,t){return i5}createObservableGauge(e,t){return i6}createObservableCounter(e,t){return i8}createObservableUpDownCounter(e,t){return i9}addBatchObservableCallback(e,t){}removeBatchObservableCallback(e){}},i2=new class extends iZ{add(e,t){}},i3=new class extends iZ{record(e,t){}},i4=new class extends iZ{record(e,t){}},i5=new class extends iZ{add(e,t){}},i8=new class extends i0{},i6=new class extends i0{},i9=new class extends i0{},i7=new class{getMeter(e,t,i){return i1}};var re=e.i(998023),rt=e.i(752791);let ri="metrics",rr=(class e{static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalMeterProvider(e){return(0,re.registerGlobal)(ri,e,rt.DiagAPI.instance())}getMeterProvider(){return(0,re.getGlobal)(ri)||i7}getMeter(e,t,i){return this.getMeterProvider().getMeter(e,t,i)}disable(){(0,re.unregisterGlobal)(ri,rt.DiagAPI.instance())}}).getInstance(),rn=Symbol.for("io.opentelemetry.js.api.logs"),rs=globalThis;class ra{emit(e){}enabled(){return!1}}let ro=new ra,rl=new class{getLogger(e,t,i){return new ra}};class ru{constructor(e,t,i,r){this._provider=e,this.name=t,this.version=i,this.options=r}emit(e){this._getLogger().emit(e)}enabled(e){return this._getLogger().enabled(e)}_getLogger(){if(this._delegate)return this._delegate;let e=this._provider._getDelegateLogger(this.name,this.version,this.options);return e?(this._delegate=e,this._delegate):ro}}class rc{getLogger(e,t,i){var r;return null!=(r=this._getDelegateLogger(e,t,i))?r:new ru(this,e,t,i)}_getDelegate(){var e;return null!=(e=this._delegate)?e:rl}_setDelegate(e){this._delegate=e}_getDelegateLogger(e,t,i){var r;return null==(r=this._delegate)?void 0:r.getLogger(e,t,i)}}let rd=(class e{constructor(){this._proxyLoggerProvider=new rc}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalLoggerProvider(e){return rs[rn]?this.getLoggerProvider():(rs[rn]=t=>1===t?e:rl,this._proxyLoggerProvider._setDelegate(e),e)}getLoggerProvider(){var e,t;return null!=(t=null==(e=rs[rn])?void 0:e.call(rs,1))?t:this._proxyLoggerProvider}getLogger(e,t,i){return this.getLoggerProvider().getLogger(e,t,i)}disable(){delete rs[rn],this._proxyLoggerProvider=new rc}}).getInstance();
9var rh=e.i(102091),rp=e.i(525891),rg=e.i(668324);let rm=e=>null!==e&&"object"==typeof e&&"function"==typeof e.then;class rf{_rawAttributes;_asyncAttributesPending=!1;_schemaUrl;_memoizedAttributes;static FromAttributeList(e,t){let i=new rf({},t);return i._rawAttributes=r_(e),i._asyncAttributesPending=e.filter(([e,t])=>rm(t)).length>0,i}constructor(e,t){const i=e.attributes??{};this._rawAttributes=Object.entries(i).map(([e,t])=>(rm(t)&&(this._asyncAttributesPending=!0),[e,t])),this._rawAttributes=r_(this._rawAttributes),this._schemaUrl=function(e){if("string"==typeof e||void 0===e)return e;rh.diag.warn("Schema URL must be string or undefined, got %s. Schema URL will be ignored.",e)}(t?.schemaUrl)}get asyncAttributesPending(){return this._asyncAttributesPending}async waitForAsyncAttributes(){if(this.asyncAttributesPending){for(let e=0;e<this._rawAttributes.length;e++){let[t,i]=this._rawAttributes[e];this._rawAttributes[e]=[t,rm(i)?await i:i]}this._asyncAttributesPending=!1}}get attributes(){if(this.asyncAttributesPending&&rh.diag.error("Accessing resource attributes before async attributes settled"),this._memoizedAttributes)return this._memoizedAttributes;let e={};for(let[t,i]of this._rawAttributes){if(rm(i)){rh.diag.debug(`Unsettled resource attribute ${t} skipped`);continue}null!=i&&(e[t]??=i)}return this._asyncAttributesPending||(this._memoizedAttributes=e),e}getRawAttributes(){return this._rawAttributes}get schemaUrl(){return this._schemaUrl}merge(e){var t,i;let r,n,s;if(null==e)return this;let a=(t=this,i=e,r=t?.schemaUrl,s=void 0===(n=i?.schemaUrl)||""===n,void 0===r||""===r?n:s||r===n?r:void rh.diag.warn('Schema URL merge conflict: old resource has "%s", updating resource has "%s". Resulting resource will have undefined Schema URL.',r,n));return rf.FromAttributeList([...e.getRawAttributes(),...this.getRawAttributes()],a?{schemaUrl:a}:void 0)}}function rb(e,t){return rf.FromAttributeList(Object.entries(e),t)}function rv(){return rb({[rg.ATTR_SERVICE_NAME]:function(){if(void 0===w)try{let e=globalThis.process.argv0;w=e?`unknown_service:${e}`:"unknown_service"}catch{w="unknown_service"}return w}(),[rg.ATTR_TELEMETRY_SDK_LANGUAGE]:rp.SDK_INFO[rg.ATTR_TELEMETRY_SDK_LANGUAGE],[rg.ATTR_TELEMETRY_SDK_NAME]:rp.SDK_INFO[rg.ATTR_TELEMETRY_SDK_NAME],[rg.ATTR_TELEMETRY_SDK_VERSION]:rp.SDK_INFO[rg.ATTR_TELEMETRY_SDK_VERSION]})}function r_(e){return e.map(([e,t])=>rm(t)?[e,t.catch(t=>{rh.diag.debug("promise rejection for resource attribute: %s - %s",e,t)})]:[e,t])}var rT=e.i(54097),rE=e.i(942765),rS=e.i(720427),rw=e.i(899745),ry=e.i(86522),rO=e.i(468190);class rA{_maxExportBatchSize;_maxQueueSize;_scheduledDelayMillis;_exportTimeoutMillis;_exporter;_isExporting=!1;_finishedSpans=[];_timer;_shutdownOnce;_droppedSpansCount=0;constructor(e,t){this._exporter=e,this._maxExportBatchSize="number"==typeof t?.maxExportBatchSize?t.maxExportBatchSize:(0,rw.getNumberFromEnv)("OTEL_BSP_MAX_EXPORT_BATCH_SIZE")??512,this._maxQueueSize="number"==typeof t?.maxQueueSize?t.maxQueueSize:(0,rw.getNumberFromEnv)("OTEL_BSP_MAX_QUEUE_SIZE")??2048,this._scheduledDelayMillis="number"==typeof t?.scheduledDelayMillis?t.scheduledDelayMillis:(0,rw.getNumberFromEnv)("OTEL_BSP_SCHEDULE_DELAY")??5e3,this._exportTimeoutMillis="number"==typeof t?.exportTimeoutMillis?t.exportTimeoutMillis:(0,rw.getNumberFromEnv)("OTEL_BSP_EXPORT_TIMEOUT")??3e4,this._shutdownOnce=new rE.BindOnceFuture(this._shutdown,this),this._maxExportBatchSize>this._maxQueueSize&&(rh.diag.warn("BatchSpanProcessor: maxExportBatchSize must be smaller or equal to maxQueueSize, setting maxExportBatchSize to match maxQueueSize"),this._maxExportBatchSize=this._maxQueueSize)}forceFlush(){return this._shutdownOnce.isCalled?this._shutdownOnce.promise:this._flushAll()}onStart(e,t){}onEnd(e){this._shutdownOnce.isCalled||(e.spanContext().traceFlags&rT.TraceFlags.SAMPLED)!=0&&this._addToBuffer(e)}shutdown(){return this._shutdownOnce.call()}_shutdown(){return Promise.resolve().then(()=>this.onShutdown()).then(()=>this._flushAll()).then(()=>this._exporter.shutdown())}_addToBuffer(e){if(this._finishedSpans.length>=this._maxQueueSize){0===this._droppedSpansCount&&rh.diag.debug("maxQueueSize reached, dropping spans"),this._droppedSpansCount++;return}this._droppedSpansCount>0&&(rh.diag.warn(`Dropped ${this._droppedSpansCount} spans because maxQueueSize reached`),this._droppedSpansCount=0),this._finishedSpans.push(e),this._maybeStartTimer()}_flushAll(){return new Promise((e,t)=>
9{let i=[],r=Math.ceil(this._finishedSpans.length/this._maxExportBatchSize);for(let e=0;e<r;e++)i.push(this._flushOneBatch());Promise.all(i).then(()=>{e()}).catch(t)})}_flushOneBatch(){return(this._clearTimer(),0===this._finishedSpans.length)?Promise.resolve():new Promise((e,t)=>{let i=setTimeout(()=>{t(Error("Timeout"))},this._exportTimeoutMillis);iY.context.with((0,rO.suppressTracing)(iY.context.active()),()=>{let r;this._finishedSpans.length<=this._maxExportBatchSize?(r=this._finishedSpans,this._finishedSpans=[]):r=this._finishedSpans.splice(0,this._maxExportBatchSize);let n=()=>this._exporter.export(r,r=>{clearTimeout(i),r.code===rS.ExportResultCode.SUCCESS?e():t(r.error??Error("BatchSpanProcessor: span export failed"))}),s=null;for(let e=0,t=r.length;e<t;e++){let t=r[e];t.resource.asyncAttributesPending&&t.resource.waitForAsyncAttributes&&(s??=[]).push(t.resource.waitForAsyncAttributes())}null===s?n():Promise.all(s).then(n,e=>{(0,ry.globalErrorHandler)(e),t(e)})})})}_maybeStartTimer(){if(this._isExporting)return;let e=()=>{this._isExporting=!0,this._flushOneBatch().finally(()=>{this._isExporting=!1,this._finishedSpans.length>0&&(this._clearTimer(),this._maybeStartTimer())}).catch(e=>{this._isExporting=!1,(0,ry.globalErrorHandler)(e)})};if(this._finishedSpans.length>=this._maxExportBatchSize)return e();void 0===this._timer&&(this._timer=setTimeout(()=>e(),this._scheduledDelayMillis),"number"!=typeof this._timer&&this._timer.unref())}_clearTimer(){void 0!==this._timer&&(clearTimeout(this._timer),this._timer=void 0)}}class rR extends rA{_visibilityChangeListener;_pageHideListener;constructor(e,t){super(e,t),this.onInit(t)}onInit(e){e?.disableAutoFlushOnDocumentHide!==!0&&"u">typeof document&&(this._visibilityChangeListener=()=>{"hidden"===document.visibilityState&&this.forceFlush().catch(e=>{(0,ry.globalErrorHandler)(e)})},this._pageHideListener=()=>{this.forceFlush().catch(e=>{(0,ry.globalErrorHandler)(e)})},document.addEventListener("visibilitychange",this._visibilityChangeListener),document.addEventListener("pagehide",this._pageHideListener))}onShutdown(){"u">typeof document&&(this._visibilityChangeListener&&document.removeEventListener("visibilitychange",this._visibilityChangeListener),this._pageHideListener&&document.removeEventListener("pagehide",this._pageHideListener))}}var rC=e.i(864545);(L=q||(q={}))[L.INTERNAL=0]="INTERNAL",L[L.SERVER=1]="SERVER",L[L.CLIENT=2]="CLIENT",L[L.PRODUCER=3]="PRODUCER",L[L.CONSUMER=4]="CONSUMER",(P=G||(G={}))[P.NOT_RECORD=0]="NOT_RECORD",P[P.RECORD=1]="RECORD",P[P.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED";var rx=e.i(752420),rN=e.i(91047);(I=K||(K={}))[I.UNSET=0]="UNSET",I[I.OK=1]="OK",I[I.ERROR=2]="ERROR";var rL=e.i(7058),rP=e.i(678638);class rI{_spanContext;kind;parentSpanContext;attributes={};links=[];events=[];startTime;resource;instrumentationScope;_droppedAttributesCount=0;_droppedEventsCount=0;_droppedLinksCount=0;_attributesCount=0;name;status={code:K.UNSET};endTime=[0,0];_ended=!1;_duration=[-1,-1];_spanProcessor;_spanLimits;_attributeValueLengthLimit;_recordEndMetrics;_performanceStartTime;_performanceOffset;_startTimeProvided;constructor(e){const t=Date.now();if(this._spanContext=e.spanContext,this._performanceStartTime=rP.otperformance.now(),this._performanceOffset=t-(this._performanceStartTime+rP.otperformance.timeOrigin),this._startTimeProvided=null!=e.startTime,this._spanLimits=e.spanLimits,this._attributeValueLengthLimit=this._spanLimits.attributeValueLengthLimit??0,this._spanProcessor=e.spanProcessor,this.name=e.name,this.parentSpanContext=e.parentSpanContext,this.kind=e.kind,e.links)for(const t of e.links)this.addLink(t);this.startTime=this._getTime(e.startTime??t),this.resource=e.resource,this.instrumentationScope=e.scope,this._recordEndMetrics=e.recordEndMetrics,null!=e.attributes&&this.setAttributes(e.attributes),this._spanProcessor.onStart(this,e.context)}spanContext(){return this._spanContext}setAttribute(e,t){if(null==t||this._isSpanEnded())return this;if(0===e.length)return rh.diag.warn(`Invalid attribute key: ${e}`),this;if(!(0,rN.isAttributeValue)(t))return rh.diag.warn(`Invalid attribute value set for key: ${e}`),this;let{attributeCountLimit:i}=this._spanLimits,r=!Object.prototype.hasOwnProperty.call(this.attributes,e);return void 0!==i&&this._attributesCount>=i&&r?this._droppedAttributesCount++:(this.attributes[e]=this._truncateToSize(t),r&&this._attributesCount++),this}setAttributes(e){for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&this.setAttribute(t,e[t]);return this}addEvent(e,t,i){if(this._isSpanEnded())return this;let{eventCountLimit:r}=this._spanLimits;if(0===r)return rh.diag.warn("No events allowed."),this._droppedEventsCount++,this;void 0!==r&&this.events.length>=r&&(0===this._droppedEventsCount&&rh.diag.debug("Dropping extra events."),this.events.shift(),this._droppedEventsCount++),(0,rL.isTimeInput)(t)&&((0,rL.isTimeInput)(i)||(i=t),t=void 0);let n=(0,rN.sanitizeAttributes)(t),{attributePerEventCountLimit:s}=this._spanLimits,a={},o=0,l=0;for(let e in n){if(!Object.prototype.hasOwnProperty.call(n,e))continue;let t=n[e];if(void 0!==s&&l>=s){o++;continue}a[e]=this._truncateToSize(t),l++}return this.events.push({name:e,attributes:a,time:this._getTime(i),droppedAttributesCount:o}),this}addLink(e){if(this._isSpanEnded())return this;let{linkCountLimit:t}=this._spanLimits;if(0===t)return this._droppedLinksCount++,this;void 0!==t&&this.links.length>=t&&(0===this._droppedLinksCount&&rh.diag.debug("Dropping extra links."),this.links.shift(),this._droppedLinksCount++);let{attributePerLinkCountLimit:i}=this._spanLimits,r=(0,rN.sanitizeAttributes)(e.attributes),n={},s=0,a=0;for(let e in r){if(!Object.prototype.hasOwnProperty.call(r,e))continue;let t=r[e];if(void 0!==i&&a>=i){s++;continue}n[e]=this._truncateToSize(t),a++}let o={context:e.context};return a>0&&(o.attributes=n),s>0&&(o.droppedAttributesCount=s),this.links.push(o),this}addLinks(e){for(let t of e)this.addLink(t);return this}setStatus(e){if(this._isSpanEnded()||e.code===K.UNSET||this.status.code===K.OK)return this;let t={code:e.code};return e.code===K.ERROR&&("string"==typeof e.message?t.message=e.message:null!=e.message&&rh.diag.warn(`Dropping invalid status.message of type '${typeof e.message}', expected 'string'`)),this.status=t,this}updateName(e){return this._isSpanEnded()||(this.name=e),this}end(e){this._isSpanEnded()?rh.diag.error(`${this.name} ${this._spanContext.traceId}-${this._spanContext.spanId} - You can only call end() on a span once.`):(this.endTime=this._getTime(e),this._duration=(0,rL.hrTimeDuration)(this.startTime,this.endTime),this._duration[0]<0&&(rh.diag.warn("Inconsistent start and end time, startTime > endTime. Setting span duration to 0ms.",this.startTime,this.endTime),this.endTime=this.startTime.slice(),this._duration=[0,0]),this._droppedEventsCount>0&&rh.diag.warn(`Dropped ${this._droppedEventsCount} events because eventCountLimit reached`),this._droppedLinksCount>0&&rh.diag.warn(`Dropped ${this._droppedLinksCount} links because linkCountLimit reached`),this._spanProcessor.onEnding&&this._spanProcessor.onEnding(this),this._recordEndMetrics?.(),this._ended=!0,this._spanProcessor.onEnd(this))}_getTime(e){if("number"==typeof e&&e<=rP.otperformance.now())return(0,rL.hrTime)(e+this._performanceOffset);if("number"==typeof e)return(0,rL.millisToHrTime)(e);if(e instanceof Date)return(0,rL.millisToHrTime)(e.getTime());if((0,rL.isTimeInputHrTime)(e))return e;if(this._startTimeProvided)return(0,rL.millisToHrTime)(Date.now());let t=rP.otperformance.now()-this._performanceStartTime;return(0,rL.addHrTimes)(this.startTime,(0,rL.millisToHrTime)(t))}isRecording(){return!1===this._ended}recordException(e,t){let i={};"string"==typeof e?i[rg.ATTR_EXCEPTION_MESSAGE]=e:e&&(e.code?i[rg.ATTR_EXCEPTION_TYPE]=e.code.toString():e.name&&(i[rg.ATTR_EXCEPTION_TYPE]=e.name),e.message&&(i[rg.ATTR_EXCEPTION_MESSAGE]=e.message),e.stack&&(i[rg.ATTR_EXCEPTION_STACKTRACE]=e.stack)),i[rg.ATTR_EXCEPTION_TYPE]||i[rg.ATTR_EXCEPTION_MESSAGE]?this.addEvent("exception",i,t):rh.diag.warn(`Failed to record an exception ${e}`)}get duration(){return this._duration}get ended(){return this._ended}get droppedAttributesCount(){return this._droppedAttributesCount}get droppedEventsCount(){return this._droppedEventsCount}get droppedLinksCount(){return this._droppedLinksCount}_isSpanEnded(){if(this._ended){let e=Error(`Operation attempted on ended Span {traceId: ${this._spanContext.traceId}, spanId: ${this._spanContext.spanId}}`);rh.diag.warn(`Cannot execute the operation on ended Span {traceId: ${this._spanContext.traceId}, spanId: ${this._spanContext.spanId}}`,e)}return this._ended}_truncateToLimitUtil(e,t){return e.length<=t?e:e.substring(0,t)}_truncateToSize(e){let t=this._attributeValueLengthLimit;return t<=0?(rh.diag.warn(`Attribute value limit must be positive, got ${t}`),e):"string"==typeof e?this._truncateToLimitUtil(e,t):Array.isArray(e)?e.map(e=>"string"==typeof e?this._truncateToLimitUtil(e,t):e):e}}(k=W||(W={}))[k.NOT_RECORD=0]="NOT_RECORD",k[k.RECORD=1]="RECORD",k[k.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED";class rk{shouldSample(){return{decision:W.NOT_RECORD}}toString(){return"AlwaysOffSampler"}}class rD{shouldSample(){return{decision:W.RECORD_AND_SAMPLED}}toString(){return"AlwaysOnSampler"}}var rM=e.i(264791);class rU{_root;_remoteParentSampled;_remoteParentNotSampled;_localParentSampled;_localParentNotSampled;constructor(e){this._root=e.root,this._root||((0,ry.globalErrorHandler)(Error("ParentBasedSampler must have a root sampler configured")),this._root=new rD),this._remoteParentSampled=e.remoteParentSampled??new rD,this._remoteParentNotSampled=e.remoteParentNotSampled??new rk,this._localParentSampled=e.localParentSampled??new rD,this._localParentNotSampled=e.localParentNotSampled??new rk}shouldSample(e,t,i,r,n,s){let a=iQ.trace.getSpanContext(e);return a&&(0,rM.isSpanContextValid)(a)?a.isRemote?a.traceFlags&rT.TraceFlags.SAMPLED?this._remoteParentSampled.shouldSample(e,t,i,r,n,s):this._remoteParentNotSampled.shouldSample(e,t,i,r,n,s):a.traceFlags&rT.TraceFlags.SAMPLED?this._localParentSampled.shouldSample(e,t,i,r,n,s):this._localParentNotSampled.shouldSample(e,t,i,r,n,s):this._root.shouldSample(e,t,i,r,n,s)}toString(){return`ParentBased{root=${this._root.toString()}, remoteParentSampled=${this._remoteParentSampled.toString()}, remoteParentNotSampled=${this._remoteParentNotSampled.toString()}, localParentSampled=${this._localParentSampled.toString()}, localParentNotSampled=${this._localParentNotSampled.toString()}}`}}class rj{_ratio;_upperBound;constructor(e=0){this._ratio=this._normalize(e),this._upperBound=Math.floor(0xffffffff*this._ratio)}
9shouldSample(e,t){return{decision:(0,rM.isValidTraceId)(t)&&this._accumulate(t)<this._upperBound?W.RECORD_AND_SAMPLED:W.NOT_RECORD}}toString(){return`TraceIdRatioBased{${this._ratio}}`}_normalize(e){return"number"!=typeof e||isNaN(e)?0:e>=1?1:e<=0?0:e}_accumulate(e){let t=0;for(let i=0;i<e.length/8;i++){let r=8*i;t=(t^parseInt(e.slice(r,r+8),16))>>>0}return t}}function rB(){return{sampler:rF(),forceFlushTimeoutMillis:3e4,generalLimits:{attributeValueLengthLimit:(0,rw.getNumberFromEnv)("OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT")??1/0,attributeCountLimit:(0,rw.getNumberFromEnv)("OTEL_ATTRIBUTE_COUNT_LIMIT")??128},spanLimits:{attributeValueLengthLimit:(0,rw.getNumberFromEnv)("OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT")??1/0,attributeCountLimit:(0,rw.getNumberFromEnv)("OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT")??128,linkCountLimit:(0,rw.getNumberFromEnv)("OTEL_SPAN_LINK_COUNT_LIMIT")??128,eventCountLimit:(0,rw.getNumberFromEnv)("OTEL_SPAN_EVENT_COUNT_LIMIT")??128,attributePerEventCountLimit:(0,rw.getNumberFromEnv)("OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT")??128,attributePerLinkCountLimit:(0,rw.getNumberFromEnv)("OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT")??128}}}function rF(){let e=(0,rw.getStringFromEnv)("OTEL_TRACES_SAMPLER")??X.ParentBasedAlwaysOn;switch(e){case X.AlwaysOn:return new rD;case X.AlwaysOff:return new rk;case X.ParentBasedAlwaysOn:return new rU({root:new rD});case X.ParentBasedAlwaysOff:return new rU({root:new rk});case X.TraceIdRatio:return new rj(rH());case X.ParentBasedTraceIdRatio:return new rU({root:new rj(rH())});default:return rh.diag.error(`OTEL_TRACES_SAMPLER value "${e}" invalid, defaulting to "${X.ParentBasedAlwaysOn}".`),new rU({root:new rD})}}function rH(){let e=(0,rw.getNumberFromEnv)("OTEL_TRACES_SAMPLER_ARG");return null==e?(rh.diag.error("OTEL_TRACES_SAMPLER_ARG is blank, defaulting to 1."),1):e<0||e>1?(rh.diag.error(`OTEL_TRACES_SAMPLER_ARG=${e} was given, but it is out of range ([0..1]), defaulting to 1.`),1):e}(D=X||(X={})).AlwaysOff="always_off",D.AlwaysOn="always_on",D.ParentBasedAlwaysOff="parentbased_always_off",D.ParentBasedAlwaysOn="parentbased_always_on",D.ParentBasedTraceIdRatio="parentbased_traceidratio",D.TraceIdRatio="traceidratio";let rV=1/0,rz=new Uint8Array(16),r$=new Uint8Array(8),rq=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function rG(e){for(let t=0;t<e.length;t++)e[t]=256*Math.random()>>>0;for(let t=0;t<e.length;t++)if(e[t]>0)return;e[e.length-1]=1}function rK(e){let t="";for(let i=0;i<e.length;i++)t+=rq[e[i]];return t}class rW{generateTraceId(){return rG(rz),rK(rz)}generateSpanId(){return rG(r$),rK(r$)}}let rX="otel.span.sampling_result";class rY{startedSpans;liveSpans;constructor(e){this.startedSpans=e.createCounter("otel.sdk.span.started",{unit:"{span}",description:"The number of created spans."}),this.liveSpans=e.createUpDownCounter("otel.sdk.span.live",{unit:"{span}",description:"The number of currently live spans."})}startSpan(e,t){var i;let r=function(e){switch(e){case W.RECORD_AND_SAMPLED:return"RECORD_AND_SAMPLE";case W.RECORD:return"RECORD_ONLY";case W.NOT_RECORD:return"DROP"}}(t);if(this.startedSpans.add(1,{"otel.span.parent.origin":(i=e)?i.isRemote?"remote":"local":"none",[rX]:r}),t===W.NOT_RECORD)return()=>{};let n={[rX]:r};return this.liveSpans.add(1,n),()=>{this.liveSpans.add(-1,n)}}}class rQ{_sampler;_generalLimits;_spanLimits;_idGenerator;instrumentationScope;_resource;_spanProcessor;_tracerMetrics;constructor(e,t,i,r){const n=function(e){let t={sampler:rF()},i=rB(),r=Object.assign({},i,t,e);return r.generalLimits=Object.assign({},i.generalLimits,e.generalLimits||{}),r.spanLimits=Object.assign({},i.spanLimits,e.spanLimits||{}),r}(t);this._sampler=n.sampler,this._generalLimits=n.generalLimits,this._spanLimits=n.spanLimits,this._idGenerator=t.idGenerator||new rW,this._resource=i,this._spanProcessor=r,this.instrumentationScope=e;const s=n.meterProvider?n.meterProvider.getMeter("@opentelemetry/sdk-trace","2.6.1"):i1;this._tracerMetrics=new rY(s)}startSpan(e,t={},i=iY.context.active()){let r,n,s;t.root&&(i=iQ.trace.deleteSpan(i));let a=iQ.trace.getSpan(i);if((0,rO.isTracingSuppressed)(i))return rh.diag.debug("Instrumentation suppressed, returning Noop Span"),iQ.trace.wrapSpanContext(rx.INVALID_SPAN_CONTEXT);let o=a?.spanContext(),l=this._idGenerator.generateSpanId();o&&iQ.trace.isSpanContextValid(o)?(n=o.traceId,s=o.traceState,r=o):n=this._idGenerator.generateTraceId();let u=t.kind??q.INTERNAL,c=(t.links??[]).map(e=>({context:e.context,attributes:(0,rN.sanitizeAttributes)(e.attributes)})),d=(0,rN.sanitizeAttributes)(t.attributes),h=this._sampler.shouldSample(i,n,e,u,d,c),p=this._tracerMetrics.startSpan(o,h.decision);s=h.traceState??s;let g={traceId:n,spanId:l,traceFlags:h.decision===G.RECORD_AND_SAMPLED?rT.TraceFlags.SAMPLED:rT.TraceFlags.NONE,traceState:s};if(h.decision===G.NOT_RECORD)return rh.diag.debug("Recording is off, prop
9agating context in a non-recording span"),iQ.trace.wrapSpanContext(g);let m=(0,rN.sanitizeAttributes)(Object.assign(d,h.attributes));return new rI({resource:this._resource,scope:this.instrumentationScope,context:i,spanContext:g,name:e,kind:u,links:c,parentSpanContext:r,attributes:m,startTime:t.startTime,spanProcessor:this._spanProcessor,spanLimits:this._spanLimits,recordEndMetrics:p})}startActiveSpan(e,t,i,r){let n,s,a;if(arguments.length<2)return;2==arguments.length?a=t:3==arguments.length?(n=t,a=i):(n=t,s=i,a=r);let o=s??iY.context.active(),l=this.startSpan(e,n,o),u=iQ.trace.setSpan(o,l);return iY.context.with(u,a,void 0,l)}getGeneralLimits(){return this._generalLimits}getSpanLimits(){return this._spanLimits}}class rJ{_spanProcessors;constructor(e){this._spanProcessors=e}forceFlush(){let e=[];for(let t of this._spanProcessors)e.push(t.forceFlush());return new Promise(t=>{Promise.all(e).then(()=>{t()}).catch(e=>{(0,ry.globalErrorHandler)(e||Error("MultiSpanProcessor: forceFlush failed")),t()})})}onStart(e,t){for(let i of this._spanProcessors)i.onStart(e,t)}onEnding(e){for(let t of this._spanProcessors)t.onEnding&&t.onEnding(e)}onEnd(e){for(let t of this._spanProcessors)t.onEnd(e)}shutdown(){let e=[];for(let t of this._spanProcessors)e.push(t.shutdown());return new Promise((t,i)=>{Promise.all(e).then(()=>{t()},i)})}}(M=Y||(Y={}))[M.resolved=0]="resolved",M[M.timeout=1]="timeout",M[M.error=2]="error",M[M.unresolved=3]="unresolved";class rZ{_config;_tracers=new Map;_resource;_activeSpanProcessor;constructor(e={}){const t=(0,rC.merge)({},rB(),function(e){let t=Object.assign({},e.spanLimits);return t.attributeCountLimit=e.spanLimits?.attributeCountLimit??e.generalLimits?.attributeCountLimit??(0,rw.getNumberFromEnv)("OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT")??(0,rw.getNumberFromEnv)("OTEL_ATTRIBUTE_COUNT_LIMIT")??128,t.attributeValueLengthLimit=e.spanLimits?.attributeValueLengthLimit??e.generalLimits?.attributeValueLengthLimit??(0,rw.getNumberFromEnv)("OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT")??(0,rw.getNumberFromEnv)("OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT")??rV,Object.assign({},e,{spanLimits:t})}(e));this._resource=t.resource??rv(),this._config=Object.assign({},t,{resource:this._resource});const i=[];e.spanProcessors?.length&&i.push(...e.spanProcessors),this._activeSpanProcessor=new rJ(i)}getTracer(e,t,i){let r=`${e}@${t||""}:${i?.schemaUrl||""}`;return this._tracers.has(r)||this._tracers.set(r,new rQ({name:e,version:t,schemaUrl:i?.schemaUrl},this._config,this._resource,this._activeSpanProcessor)),this._tracers.get(r)}forceFlush(){let e=this._config.forceFlushTimeoutMillis,t=this._activeSpanProcessor._spanProcessors.map(t=>new Promise(i=>{let r,n=setTimeout(()=>{i(Error(`Span processor did not completed within timeout period of ${e} ms`)),r=Y.timeout},e);t.forceFlush().then(()=>{clearTimeout(n),r!==Y.timeout&&i(r=Y.resolved)}).catch(e=>{clearTimeout(n),r=Y.error,i(e)})}));return new Promise((e,i)=>{Promise.all(t).then(t=>{let r=t.filter(e=>e!==Y.resolved);r.length>0?i(r):e()}).catch(e=>i([e]))})}shutdown(){return this._activeSpanProcessor.shutdown()}}var r0=e.i(515e3);class r1{_enabled=!1;_currentContext=r0.ROOT_CONTEXT;_bindFunction(e=r0.ROOT_CONTEXT,t){let i=this,r=function(...r){return i.with(e,()=>t.apply(this,r))};return Object.defineProperty(r,"length",{enumerable:!1,configurable:!0,writable:!1,value:t.length}),r}active(){return this._currentContext}bind(e,t){return(void 0===e&&(e=this.active()),"function"==typeof t)?this._bindFunction(e,t):t}disable(){return this._currentContext=r0.ROOT_CONTEXT,this._enabled=!1,this}enable(){return this._enabled||(this._enabled=!0,this._currentContext=r0.ROOT_CONTEXT),this}with(e,t,i,...r){let n=this._currentContext;this._currentContext=e||r0.ROOT_CONTEXT;try{return t.call(i,...r)}finally{this._currentContext=n}}}var r2=e.i(563556),r3=e.i(54828),r4=e.i(780093);class r5 extends rZ{constructor(e={}){super(e)}register(e={}){iQ.trace.setGlobalTracerProvider(this),function(e){if(null!==e){if(void 0===e)return r2.propagation.setGlobalPropagator(new r3.CompositePropagator({propagators:[new iJ.W3CTraceContextPropagator,new r4.W3CBaggagePropagator]}));r2.propagation.setGlobalPropagator(e)}}(e.propagator),function(e){if(null!==e){if(void 0===e){let e=new r1;e.enable(),iY.context.setGlobalContextManager(e);return}e.enable(),iY.context.setGlobalContextManager(e)}}(e.contextManager)}}class r8{constructor(e,t){this.processor=e,this.metas=t}forceFlush(){return this.processor.forceFlush()}onStart(e,t){var i;let r=this.metas.value.session;
9(null==r?void 0:r.id)&&(e.attributes["session.id"]=r.id);let n=null!=(i=this.metas.value.user)?i:{};n.email&&(e.attributes["user.email"]=n.email),n.id&&(e.attributes["user.id"]=n.id),n.username&&(e.attributes["user.name"]=n.username),n.fullName&&(e.attributes["user.full_name"]=n.fullName),n.roles&&(e.attributes["user.roles"]=n.roles.split(",").map(e=>e.trim())),n.hash&&(e.attributes["user.hash"]=n.hash),this.processor.onStart(e,t)}onEnd(e){this.processor.onEnd(e)}shutdown(){return this.processor.shutdown()}}var r6=e.i(158302),r9=e.i(294325),r7=e.i(118792);class ne{constructor(e){this.config=e}export(e,t){let i=(0,r9.createExportTraceServiceRequest)(e,r6.JSON_ENCODER);this.config.api.pushTraces(i),function(e=[],t){var i,r;for(let n of e){let{scopeSpans:e}=n;for(let n of e){let{scope:e,spans:s=[]}=n;for(let n of s){if(n.kind!==r7.ESpanKind.SPAN_KIND_CLIENT)continue;let s={traceId:n.traceId.toString(),spanId:n.spanId.toString()},a={};for(let e of n.attributes)a[e.key]=String(Object.values(e.value)[0]);Number.isNaN(n.endTimeUnixNano)||Number.isNaN(n.startTimeUnixNano)||(a.duration_ns=String(Number(n.endTimeUnixNano)-Number(n.startTimeUnixNano)));let o=(null!=(i=null==e?void 0:e.name)?i:"").indexOf("-"),l=tn;(null==e?void 0:e.name)&&(-1===o&&(l=null!=(r=e.name.split("/")[1])?r:e.name),o>-1&&(l=null==e?void 0:e.name.substring(o+1))),t.pushEvent(`faro.tracing.${l}`,a,void 0,{spanContext:s,timestampOverwriteMs:Number(n.endTimeUnixNano)/1e6,customPayloadTransformer:e=>{var t,i;return null!=a["faro.action.user.name"]&&null!=a["faro.action.user.parentId"]&&(e.action={name:a["faro.action.user.name"],parentId:a["faro.action.user.parentId"]},null==(t=e.attributes)||delete t["faro.action.user.name"],null==(i=e.attributes)||delete i["faro.action.user.parentId"]),e}})}}}}(i.resourceSpans,this.config.api),t({code:rS.ExportResultCode.SUCCESS})}shutdown(){return Promise.resolve(void 0)}}function nt(e,t){let i=Q.OLD;for(let r of t?.split(",").map(e=>e.trim()).filter(e=>""!==e)??[])if(r.toLowerCase()===e+"/dup"){i=Q.DUPLICATE;break}else r.toLowerCase()===e&&(i=Q.STABLE);return i}(U=Q||(Q={}))[U.STABLE=1]="STABLE",U[U.OLD=2]="OLD",U[U.DUPLICATE=3]="DUPLICATE";let ni=console.error.bind(console);function nr(e,t,i){let r=!!e[t]&&Object.prototype.propertyIsEnumerable.call(e,t);Object.defineProperty(e,t,{configurable:!0,enumerable:r,writable:!0,value:i})}let nn=(e,t,i)=>{if(!e||!e[t])return void ni("no original function "+String(t)+" to wrap");if(!i){ni("no wrapper function"),ni(Error().stack);return}let r=e[t];if("function"!=typeof r||"function"!=typeof i)return void ni("original object and wrapper must be functions");let n=i(r,t);return nr(n,"__original",r),nr(n,"__unwrap",()=>{e[t]===n&&nr(e,t,r)}),nr(n,"__wrapped",!0),nr(e,t,n),n},ns=(e,t,i)=>{if(e)Array.isArray(e)||(e=[e]);else{ni("must provide one or more modules to patch"),ni(Error().stack);return}t&&Array.isArray(t)?e.forEach(e=>{t.forEach(t=>{nn(e,t,i)})}):ni("must provide one or more functions to wrap on modules")},na=(e,t)=>{if(!e||!e[t]){ni("no function to unwrap."),ni(Error().stack);return}let i=e[t];i.__unwrap?i.__unwrap():ni("no original to unwrap to -- has "+String(t)+" already been unwrapped?")},no=(e,t)=>{if(e)Array.isArray(e)||(e=[e]);else{ni("must provide one or more modules to patch"),ni(Error().stack);return}t&&Array.isArray(t)?e.forEach(e=>{t.forEach(t=>{na(e,t)})}):ni("must provide one or more functions to unwrap on modules")};function nl(e){e&&e.logger&&("function"!=typeof e.logger?ni("new logger isn't a function, not replacing"):ni=e.logger)}nl.wrap=nn,nl.massWrap=ns,nl.unwrap=na,nl.massUnwrap=no;class nu{_config={};_tracer;_meter;_logger;_diag;instrumentationName;instrumentationVersion;constructor(e,t,i){this.instrumentationName=e,this.instrumentationVersion=t,this.setConfig(i),this._diag=rh.diag.createComponentLogger({namespace:e}),this._tracer=iQ.trace.getTracer(e,t),this._meter=rr.getMeter(e,t),this._logger=rd.getLogger(e,t),this._updateMetricInstruments()}_wrap=nn;_unwrap=na;_massWrap=ns;_massUnwrap=no;get meter(){return this._meter}setMeterProvider(e){this._meter=e.getMeter(this.instrumentationName,this.instrumentationVersion),this._updateMetricInstruments()}get logger(){return this._logger}setLoggerProvider(e){this._logger=e.getLogger(this.instrumentationName,this.instrumentationVersion)}getModuleDefinitions(){let e=this.init()??[];return Array.isArray(e)?e:[e]}_updateMetricInstruments(){}getConfig(){return this._config}setConfig(e){this._config={enabled:!0,...e}}setTracerProvider(e){this._tracer=e.getTracer(this.instrumentationName,this.instrumentationVersion)}get tracer(){return this._tracer}_runSpanCustomizationHook(e,t,i,r){if(e)try{e(i,r)}catch(e){this._diag.error("Error running span customization hook due to exception in handler",{triggerName:t},e)}}}class nc extends nu{constructor(e,t,i){super(e,t,i),this._config.enabled&&this.enable()}}
9function nd(e,t,i){let r,n;try{n=e()}catch(e){r=e}finally{if(t(r,n),r&&!i)throw r;return n}}var nh=e.i(3082);function np(e,t,i,r=!0){if(t in i&&"number"==typeof i[t]&&!(r&&0===i[t]))return e.addEvent(t,i[t])}function ng(e,t,i=!1,r,n){if(void 0===r&&(r=0!==t[J.START_TIME]),i||(np(e,J.FETCH_START,t,r),np(e,J.DOMAIN_LOOKUP_START,t,r),np(e,J.DOMAIN_LOOKUP_END,t,r),np(e,J.CONNECT_START,t,r),np(e,J.SECURE_CONNECTION_START,t,r),np(e,J.CONNECT_END,t,r),np(e,J.REQUEST_START,t,r),np(e,J.RESPONSE_START,t,r),np(e,J.RESPONSE_END,t,r)),!n){let i=t[J.ENCODED_BODY_SIZE];void 0!==i&&e.setAttribute("http.response_content_length",i);let r=t[J.DECODED_BODY_SIZE];void 0!==r&&i!==r&&e.setAttribute("http.response_content_length_uncompressed",r)}}function nm(){return"u">typeof location?location.origin:void 0}function nf(e,t,i,r,n=new WeakSet,s){var a,o,l,u,c,d;let h,p,g,m=nb(e),f=(a=e=m.toString(),o=t,l=i,u=r,c=n,d=s,h=(0,rL.hrTimeToNanoseconds)(o),p=(0,rL.hrTimeToNanoseconds)(l),(g=u.filter(e=>{let t=(0,rL.hrTimeToNanoseconds)((0,rL.timeInputToHrTime)(e[J.FETCH_START])),i=(0,rL.hrTimeToNanoseconds)((0,rL.timeInputToHrTime)(e[J.RESPONSE_END]));return e.initiatorType.toLowerCase()===(d||"xmlhttprequest")&&e.name===a&&t>=h&&i<=p})).length>0&&(g=g.filter(e=>!c.has(e))),g);if(0===f.length)return{mainRequest:void 0};if(1===f.length)return{mainRequest:f[0]};
9let b=f.slice().sort((e,t)=>{let i=e[J.FETCH_START],r=t[J.FETCH_START];return i>r?1:i<r?-1:0});if(m.origin===nm()||!(b.length>1))return{mainRequest:f[0]};{let e=b[0],t=function(e,t,i){let r,n=(0,rL.hrTimeToNanoseconds)(i),s=(0,rL.hrTimeToNanoseconds)((0,rL.timeInputToHrTime)(t)),a=e[1],o=e.length;for(let t=1;t<o;t++){let i=e[t],o=(0,rL.hrTimeToNanoseconds)((0,rL.timeInputToHrTime)(i[J.FETCH_START])),l=n-(0,rL.hrTimeToNanoseconds)((0,rL.timeInputToHrTime)(i[J.RESPONSE_END]));o>=s&&(!r||l<r)&&(r=l,a=i)}return a}(b,e[J.RESPONSE_END],i),r=e[J.RESPONSE_END];return t[J.FETCH_START]<r&&(t=e,e=void 0),{corsPreFlightRequest:e,mainRequest:t}}}function nb(e){if("function"==typeof URL)return new URL(e,"u">typeof document?document.baseURI:"u">typeof location?location.href:void 0);let t=(y||(y=document.createElement("a")),y);return t.href=e,t}function nv(e,t){let i=t||[];return("string"==typeof i||i instanceof RegExp)&&(i=[i]),nb(e).origin===nm()||i.some(t=>(0,nh.urlMatches)(e,t))}(j=J||(J={})).CONNECT_END="connectEnd",j.CONNECT_START="connectStart",j.DECODED_BODY_SIZE="decodedBodySize",j.DOM_COMPLETE="domComplete",j.DOM_CONTENT_LOADED_EVENT_END="domContentLoadedEventEnd",j.DOM_CONTENT_LOADED_EVENT_START="domContentLoadedEventStart",j.DOM_INTERACTIVE="domInteractive",j.DOMAIN_LOOKUP_END="domainLookupEnd",j.DOMAIN_LOOKUP_START="domainLookupStart",j.ENCODED_BODY_SIZE="encodedBodySize",j.FETCH_START="fetchStart",j.LOAD_EVENT_END="loadEventEnd",j.LOAD_EVENT_START="loadEventStart",j.NAVIGATION_START="navigationStart",j.REDIRECT_END="redirectEnd",j.REDIRECT_START="redirectStart",j.REQUEST_START="requestStart",j.RESPONSE_END="responseEnd",j.RESPONSE_START="responseStart",j.SECURE_CONNECTION_START="secureConnectionStart",j.START_TIME="startTime",j.UNLOAD_EVENT_END="unloadEventEnd",j.UNLOAD_EVENT_START="unloadEventStart",(B=Z||(Z={})).COMPONENT="component",B.HTTP_STATUS_TEXT="http.status_text";let n_=rh.diag.createComponentLogger({namespace:"@opentelemetry/opentelemetry-instrumentation-fetch/utils"}),nT=new TextEncoder;function nE(e){return nT.encode(e).byteLength}let nS={CONNECT:!0,DELETE:!0,GET:!0,HEAD:!0,OPTIONS:!0,PATCH:!0,POST:!0,PUT:!0,TRACE:!0,QUERY:!0},nw={"https:":"443","http:":"80"},ny="0.218.0",nO="u">typeof PerformanceObserver;class nA extends nc{component="fetch";version=ny;moduleName=this.component;_usedResources=new WeakSet;_tasksCount=0;_semconvStability;constructor(e={}){super("@opentelemetry/instrumentation-fetch",ny,e),this._semconvStability=nt("http",e?.semconvStabilityOptIn)}init(){}_addChildSpan(e,t){let i=this.tracer.startSpan("CORS Preflight",{startTime:t[J.FETCH_START]},iQ.trace.setSpan(iY.context.active(),e)),r=!(this._semconvStability&Q.OLD);ng(i,t,this.getConfig().ignoreNetworkEvents,void 0,r),i.end(t[J.RESPONSE_END])}_addFinalSpanAttributes(e,t){let i=nb(t.url);if(this._semconvStability&Q.OLD&&(e.setAttribute("http.status_code",t.status),null!=t.statusText&&e.setAttribute(Z.HTTP_STATUS_TEXT,t.statusText),e.setAttribute("http.host",i.host),e.setAttribute("http.scheme",i.protocol.replace(":","")),"u">typeof navigator&&e.setAttribute("http.user_agent",navigator.userAgent)),this._semconvStability&Q.STABLE){let r;e.setAttribute(rg.ATTR_HTTP_RESPONSE_STATUS_CODE,t.status),e.setAttribute(rg.ATTR_SERVER_ADDRESS,i.hostname);let n=(r=Number(i.port||nw[i.protocol]))&&!isNaN(r)?r:void 0;n&&e.setAttribute(rg.ATTR_SERVER_PORT,n)}}_addHeaders(e,t){if(!nv(t,this.getConfig().propagateTraceHeaderCorsUrls)){let e={};r2.propagation.inject(iY.context.active(),e),Object.keys(e).length>0&&this._diag.debug("headers inject skipped due to CORS policy");return}if(e instanceof Request)r2.propagation.inject(iY.context.active(),e.headers,{set:(e,t,i)=>e.set(t,"string"==typeof i?i:String(i))});else{let t=new Headers(e.headers);r2.propagation.inject(iY.context.active(),t,{set:(e,t,i)=>e.set(t,"string"==typeof i?i:String(i))}),e.headers=t}}_clearResources(){0===this._tasksCount&&this.getConfig().clearTimingResources&&(performance.clearResourceTimings(),this._usedResources=new WeakSet)}_createSpan(e,t={}){if(nh.isUrlIgnored(e,this.getConfig().ignoreUrls))return void this._diag.debug("ignoring span as url matches ignored url");let i="",r={};if(this._semconvStability&Q.OLD){let n=(t.method||"GET").toUpperCase();i=`HTTP ${n}`,r[Z.COMPONENT]=this.moduleName,r["http.method"]=n,r["http.url"]=e}if(this._semconvStability&Q.STABLE){var n;let s,a,o=t.method,l=(n=t.method||"GET",s=function(){if(void 0===O){let e=(0,rw.getStringListFromEnv)("OTEL_INSTRUMENTATION_HTTP_KNOWN_METHODS");e&&e.length>0?(O={}
9,e.forEach(e=>{O[e]=!0})):O=nS}return O}(),(a=n.toUpperCase())in s?a:"_OTHER");i||(i=l),r[rg.ATTR_HTTP_REQUEST_METHOD]=l,l!==o&&(r[rg.ATTR_HTTP_REQUEST_METHOD_ORIGINAL]=o),r[rg.ATTR_URL_FULL]=e}return this.tracer.startSpan(i,{kind:q.CLIENT,attributes:r})}_findResourceAndAddNetworkEvents(e,t,i){let r=t.entries;if(!r.length){if(!performance.getEntriesByType)return;r=performance.getEntriesByType("resource")}let n=nf(t.spanUrl,t.startTime,i,r,this._usedResources,"fetch");if(n.mainRequest){let t=n.mainRequest;this._markResourceAsUsed(t);let i=n.corsPreFlightRequest;i&&(this._addChildSpan(e,i),this._markResourceAsUsed(i));let r=!(this._semconvStability&Q.OLD);ng(e,t,this.getConfig().ignoreNetworkEvents,void 0,r)}}_markResourceAsUsed(e){this._usedResources.add(e)}_endSpan(e,t,i){let r=rL.millisToHrTime(Date.now()),n=rL.hrTime();this._addFinalSpanAttributes(e,i),this._semconvStability&Q.STABLE&&i.status>=400&&(e.setStatus({code:K.ERROR}),e.setAttribute(rg.ATTR_ERROR_TYPE,String(i.status))),setTimeout(()=>{t.observer?.disconnect(),this._findResourceAndAddNetworkEvents(e,t,n
9),this._tasksCount--,this._clearResources(),e.end(r)},300)}_patchConstructor(){return e=>{let t=this;return function(...i){let r;if(!t._isEnabled)return e.apply(this,i);let n=this,s=nb(i[0]instanceof Request?i[0].url:String(i[0])).href;r=i[0]instanceof Request?null!=i[1]?new Request(i[0],i[1]):i[0]:i[1]||{};let a=t._createSpan(s,r);if(!a)return e.apply(this,i);let o=t._prepareSpanData(s);function l(e,i){t._applyAttributesAfterFetch(e,r,i),t._endSpan(e,o,{status:i.status||0,statusText:i.message,url:s})}function u(e,i){t._applyAttributesAfterFetch(e,r,i),i.status>=200&&i.status<400?t._endSpan(e,o,i):t._endSpan(e,o,{status:i.status,statusText:i.statusText,url:s})}function c(e,i){try{let t=i.clone().body;if(t){let r=t.getReader(),n=()=>{r.read().then(({done:t})=>{t?u(e,i):n()},t=>{l(e,t)})};n()}else u(e,i)}catch(i){t._diag.error("Failed to read fetch response body",i),t._endSpan(e,o,{status:0,url:s})}return i}function d(e,i){try{l(e,i)}catch(r){t._diag.error("Failed to end span on fetch error",r),t._endSpan(e,o,{status:i.status||0,url:s})}throw i}return t.getConfig().measureRequestSize&&(function(...e){if(e[0]instanceof URL||"string"==typeof e[0]){let t=e[1];if(!t?.body)return Promise.resolve();if(!(t.body instanceof ReadableStream))return Promise.resolve(function(e){return"u">typeof Document&&e instanceof Document?new XMLSerializer().serializeToString(document).length:"string"==typeof e?nE(e):e instanceof Blob?e.size:e instanceof FormData?function(e){let t=0;for(let[i,r]of e.entries())t+=i.length,r instanceof Blob?t+=r.size:t+=r.length;return t}(e):e instanceof URLSearchParams?nE(e.toString()):void 0!==e.byteLength?e.byteLength:void n_.warn("unknown body type")}(t.body));{let{body:e,length:i}=function(e){let t;if(!e.pipeThrough)return n_.warn("Platform has ReadableStream but not pipeThrough!"),{body:e,length:Promise.resolve(void 0)};let i=0,r=new Promise(e=>{t=e}),n=new TransformStream({start(){},async transform(e,t){let r=await e;i+=r.byteLength,t.enqueue(e)},flush(){t(i)}});return{body:e.pipeThrough(n),length:r}}(t.body);return t.body=e,i}}{let t=e[0];return t?.body?t.clone().text().then(e=>nE(e)):Promise.resolve()}})(...i).then(e=>{e&&(t._semconvStability&Q.OLD&&a.setAttribute("http.request_content_length_uncompressed",e),t._semconvStability&Q.STABLE&&a.setAttribute("http.request.body.size",e))}).catch(e=>{t._diag.warn("getFetchBodyLength",e)}),iY.context.with(iQ.trace.setSpan(iY.context.active(),a),()=>(t._callRequestHook(a,r),t._addHeaders(r,s),t._tasksCount++,e.apply(n,r instanceof Request?[r]:[s,r]).then(c.bind(n,a),d.bind(n,a))))}}}_applyAttributesAfterFetch(e,t,i){let r=this.getConfig().applyCustomAttributesOnSpan;r&&nd(()=>r(e,t,i),e=>{e&&this._diag.error("applyCustomAttributesOnSpan",e)},!0)}_callRequestHook(e,t){let i=this.getConfig().requestHook;i&&nd(()=>i(e,t),e=>{e&&this._diag.error("requestHook",e)},!0)}_prepareSpanData(e){let t=rL.hrTime(),i=[];if("function"!=typeof PerformanceObserver)return{entries:i,startTime:t,spanUrl:e};let r=new PerformanceObserver(t=>{t.getEntries().forEach(t=>{"fetch"===t.initiatorType&&t.name===e&&i.push(t)})});return r.observe({entryTypes:["resource"]}),{entries:i,observer:r,startTime:t,spanUrl:e}}enable(){if(!nO)return void this._diag.warn("this instrumentation is intended for web usage only, it does not instrument server-side fetch()");if(!this._isEnabled){if(this._isFetchPatched){this._diag.debug("fetch constructor already patched"),this._isEnabled=!0;return}try{this._wrap(globalThis,"fetch",this._patchConstructor()),this._isFetchPatched=!0,this._isEnabled=!0}catch(e){this._diag.warn("Failed to patch globalThis.fetch; instrumentation will not be enabled. Another script may have locked globalThis.fetch via Object.defineProperty.",e)}}}disable(){!nO||this._isEnabled&&(this._isEnabled=!1,this._usedResources=new WeakSet)}}(F=ee||(ee={})).METHOD_OPEN="open",F.METHOD_SEND="send",F.EVENT_ABORT="abort",F.EVENT_ERROR="error",F.EVENT_LOAD="loaded",F.EVENT_TIMEOUT="timeout";let nR=rh.diag.createComponentLogger({namespace:"@opentelemetry/opentelemetry-instrumentation-xml-http-request/utils"}),nC=new TextEncoder;function nx(e){return nC.encode(e).byteLength}let nN={CONNECT:!0,DELETE:!0,GET:!0,HEAD:!0,OPTIONS:!0,PATCH:!0,POST:!0,PUT:!0,TRACE:!0,QUERY:!0},nL={"https:":"443","http:":"80"},nP="0.218.0";(et||(et={})).HTTP_STATUS_TEXT="http.status_text";class nI extends nc{component="xml-http-request";version=nP;moduleName=this.component;_tasksCount=0;_xhrMem=new WeakMap;_usedResources=new WeakSet;_semconvStability;constructor(e={}){super("@opentelemetry/instrumentation-xml-http-request",nP,e),this._semconvStability=nt("http",e?.semconvStabilityOptIn)}init(){}_addHeaders(e,t){if(!nv(nb(t).href,this.getConfig().propagateTraceHeaderCorsUrls)){let e={};r2.propagation.inject(iY.context.active(),e),Object.keys(e).length>0&&this._diag.debug("headers inject skipped due to CORS policy");return}let i={};r2.propagation.inject(iY.context.active(),i),Object.keys(i).forEac
9h(t=>{e.setRequestHeader(t,String(i[t]))})}_addChildSpan(e,t){iY.context.with(iQ.trace.setSpan(iY.context.active(),e),()=>{let e=this.tracer.startSpan("CORS Preflight",{startTime:t[J.FETCH_START]}),i=!(this._semconvStability&Q.OLD);ng(e,t,this.getConfig().ignoreNetworkEvents,void 0,i),e.end(t[J.RESPONSE_END])})}_addFinalSpanAttributes(e,t,i){if(this._semconvStability&Q.OLD){if(void 0!==t.status&&e.setAttribute("http.status_code",t.status),void 0!==t.statusText&&e.setAttribute(et.HTTP_STATUS_TEXT,t.statusText),"string"==typeof i){let t=nb(i);e.setAttribute("http.host",t.host),e.setAttribute("http.scheme",t.protocol.replace(":",""))}e.setAttribute("http.user_agent",navigator.userAgent)}this._semconvStability&Q.STABLE&&t.status&&e.setAttribute(rg.ATTR_HTTP_RESPONSE_STATUS_CODE,t.status)}_applyAttributesAfterXHR(e,t){let i=this.getConfig().applyCustomAttributesOnSpan;"function"==typeof i&&nd(()=>i(e,t),e=>{e&&this._diag.error("applyCustomAttributesOnSpan",e)},!0)}_addResourceObserver(e,t){let i=this._xhrMem.get(e);i&&"function"==typeof PerformanceObserver&&"function"==typeof PerformanceResourceTiming&&(i.createdResources={observer:new PerformanceObserver(e=>{let r=e.getEntries(),n=nb(t);r.forEach(e=>{"xmlhttprequest"===e.initiatorType&&e.name===n.href&&i.createdResources&&i.createdResources.entries.push(e)})}),entries:[]},i.createdResources.observer.observe({entryTypes:["resource"]}))}_clearResources(){0===this._tasksCount&&this.getConfig().clearTimingResources&&(rP.otperformance.clearResourceTimings(),this._xhrMem=new WeakMap,this._usedResources=new WeakSet)}_findResourceAndAddNetworkEvents(e,t,i,r,n){if(!i||!r||!n||!e.createdResources)return;let s=e.createdResources.entries;s&&s.length||(s=rP.otperformance.getEntriesByType("resource"));let a=nf(nb(i).href,r,n,s,this._usedResources);if(a.mainRequest){let e=a.mainRequest;this._markResourceAsUsed(e);let i=a.corsPreFlightRequest;i&&(this._addChildSpan(t,i),this._markResourceAsUsed(i));let r=!(this._semconvStability&Q.OLD);ng(t,e,this.getConfig().ignoreNetworkEvents,void 0,r)}}_cleanPreviousSpanInformation(e){let t=this._xhrMem.get(e);if(t){let i=t.callbackToRemoveEvents;i&&i(),this._xhrMem.delete(e)}}_createSpan(e,t,i){let r=nb(t);if((0,nh.isUrlIgnored)(r.href,this.getConfig().ignoreUrls))return void this._diag.debug("ignoring span as url matches ignored url");let n="",s={};if(this._semconvStability&Q.OLD&&(n=i.toUpperCase(),s["http.method"]=i,s["http.url"]=r.toString()),this._semconvStability&Q.STABLE){let e,t,a,o=(e=function(){if(void 0===A){let e=(0,rw.getStringListFromEnv)("OTEL_INSTRUMENTATION_HTTP_KNOWN_METHODS");e&&e.length>0?(A={},e.forEach(e=>{A[e]=!0})):A=nN}return A}(),(t=i.toUpperCase())in e?t:"_OTHER");n||(n=o),s[rg.ATTR_HTTP_REQUEST_METHOD]=o,o!==i&&(s[rg.ATTR_HTTP_REQUEST_METHOD_ORIGINAL]=i),s[rg.ATTR_URL_FULL]=r.toString(),s[rg.ATTR_SERVER_ADDRESS]=r.hostname;let l=(a=Number(r.port||nL[r.protocol]))&&!isNaN(a)?a:void 0;l&&(s[rg.ATTR_SERVER_PORT]=l)}let a=this.tracer.startSpan(n,{kind:q.CLIENT,attributes:s});return a.addEvent(ee.METHOD_OPEN),this._cleanPreviousSpanInformation(e),this._xhrMem.set(e,{span:a,spanUrl:t}),a}_markResourceAsUsed(e){this._usedResources.add(e)}_patchOpen(){return e=>{let t=this;return function(...i){if(!t._isEnabled)return e.apply(this,i);let r=i[0],n=i[1];return t._createSpan(this,n,r),e.apply(this,i)}}}_patchSend(){let e=this;function t(t,i,r,n){let s=e._xhrMem.get(i);if(!s)return;if(s.status=i.status,s.statusText=i.statusText,e._xhrMem.delete(i),s.span){let t=s.span;e._applyAttributesAfterXHR(t,i),e._semconvStability&Q.STABLE&&(r?n&&(t.setStatus({code:K.ERROR,message:n}),t.setAttribute(rg.ATTR_ERROR_TYPE,n)):s.status&&s.status>=400&&(t.setStatus({code:K.ERROR}),t.setAttribute(rg.ATTR_ERROR_TYPE,String(s.status))))}let a=(0,rL.hrTime)(),o=Date.now();setTimeout(()=>{!function(t,i,r,n){let s=i.callbackToRemoveEvents;"function"==typeof s&&s();let{span:a,spanUrl:o,sendStartTime:l}=i;a&&(e._findResourceAndAddNetworkEvents(i,a,o,l,r),a.addEvent(t,n),e._addFinalSpanAttributes(a,i,o),a.end(n),e._tasksCount--),e._clearResources()}(t,s,a,o)},300)}function i(){t(ee.EVENT_ERROR,this,!0,"error")}function r(){t(ee.EVENT_ABORT,this,!1)}function n(){t(ee.EVENT_TIMEOUT,this,!0,"timeout")}function s(){this.status<299?t(ee.EVENT_LOAD,this,!1):t(ee.EVENT_ERROR,this,!1)}return t=>function(...a){if(!e._isEnabled)return t.apply(this,a);let o=e._xhrMem.get(this);if(!o)return t.apply(this,a);let l=o.span,u=o.spanUrl;if(l&&u){if(e.getConfig().measureRequestSize&&a?.[0]){var c,d;let t=(d=c=a[0],"u">typeof Document&&d instanceof Document)?new XMLSerializer().serializeToString(document).length:"string"==typeof c?nx(c):c instanceof Blob?c.size:c instanceof FormData?function(e){let t=0;for(let[i,r]of e.entries())t+=i.length,r instanceof Blob?t+=r.size:t+=r.length;return t}(c):c instanceof URLSearchParams?nx(c.toString()):void 0!==c.byteLength?c.byteLength:void nR.warn("unknown body type");void 0!==t&&(e._semconvStability&Q.OLD&&l.setAttribute("http.request_content_length_uncompressed",t),e._semconvStability&Q.STABLE&&l.setAttribute("http.request.body.size",t))}iY.context.with(iQ.trace.setSpan(iY.context.active(),l),()=>{e._tasksCount++,o.sendStartTime=(0,rL.hrTime)(),l.addEvent(ee.METHOD_SEND),this.addEventListener("abort",r),this.addEventListener("error",i),this.addEventListener("load",s),this.addEventListener("timeout",n),o.callbackToRemoveEvents=()=>{let t;this.removeEventListener("abort",r),this.removeEventListener("error",i),this.removeEventListener("load",s),this.removeEventListener("timeout",n),(t=e._xhrMem.get(this))&&(t.callbackToRemoveEvents=void 0),o.createdResources&&o.createdResources.observer.disconnect()},e._addHeaders(this,u),e._addResourceObserver(this,u)})}return t.apply(this,a)}}enable(){if(!this._isEnabled){if(this._isXhrPatched){this._diag.debug("reactivating existing patch on",this.moduleName,this.version),this._isEnabled=!0;return}try{this._diag.debug("applying patch to",this.moduleName,this.version),this._wrap(XMLHttpRequest.prototype,"open",this._patchOpen()),this._wrap(XMLHttpRequest.prototype,"send",this._patchSend()),this._isXhrPatched=!0,this._isEnabled=!0}catch(e){this._unwrap(XMLHttpRequest.prototype,"open"),this._unwrap(XMLHttpRequest.prototype,"send"),this._diag.warn("Failed to patch globalThis.XMLHttpRequest; instrumentation will not be enabled. Another script may have locked globalThis.XMLHttpRequest via Object.defineProperty.",e)}}}disable(){this._isEnabled&&(this._isEnabled=!1,this._tasksCount=0,this._xhrMem=new WeakMap,this._usedResources=new WeakSet)}}class nk extends nI{constructor(e={}){super(e),this.parentCreateSpan=this._createSpan.bind(this)}_patchOpen(){return e=>{let t=this;return function(...i){let r;try{let e=i[0],n=e8(i[1]);r=t.parentCreateSpan(this,n,e)}catch(e){eX.faro.internalLogger.error(e)}let n=eX.faro.api.getActiveUserAction();return r&&n&&(null==n?void 0:n.getState())===z.Started&&(r.setAttribute("faro.action.user.n
9ame",n.name),r.setAttribute("faro.action.user.parentId",n.parentId)),e.apply(this,i)}}}}function nD(e,t){null==t||(0===t||t>=400&&t<600)&&e.setStatus({code:K.ERROR})}var nM=function(e,t){var i={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(i[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,r=Object.getOwnPropertySymbols(e);n<r.length;n++)0>t.indexOf(r[n])&&Object.prototype.propertyIsEnumerable.call(e,r[n])&&(i[r[n]]=e[r[n]]);return i};class nU extends el{constructor(e={}){super(),this.options=e,this.name="@grafana/faro-web-tracing",this.version=ey}initialize(){var e,t,i,r,n;let s=this.options,a={};this.config.app.name&&(a[rg.ATTR_SERVICE_NAME]=this.config.app.name),this.config.app.namespace&&(a["service.namespace"]=this.config.app.namespace),this.config.app.version&&(a[rg.ATTR_SERVICE_VERSION]=this.config.app.version),this.config.app.environment&&(a["deployment.environment.name"]=this.config.app.environment,a["deployment.environment"]=this.config.app.environment);let o=this.metas.value.browser;ep(null==o?void 0:o.brands)&&(a["browser.brands"]=o.brands.map(e=>e.brand)),(null==o?void 0:o.language)&&(a["browser.language"]=o.language),"boolean"==typeof(null==o?void 0:o.mobile)&&(a["browser.mobile"]=!!o.mobile),(null==o?void 0:o.os)&&(a["browser.platform"]=o.os),(null==o?void 0:o.userAgent)&&(a[rg.ATTR_USER_AGENT_ORIGINAL]=o.userAgent),a["process.runtime.name"]="browser",a["process.runtime.version"]=null==(e=this.metas.value.browser)?void 0:e.userAgent,a["telemetry.distro.name"]="faro-web-sdk",a["telemetry.distro.version"]=ey,Object.assign(a,s.resourceAttributes),new r5({resource:rv().merge(rb(a)),sampler:{shouldSample:()=>({decision:function(e={}){var t;return(null==(t=e.attributes)?void 0:t.isSampled)==="true"?W.RECORD_AND_SAMPLED:W.NOT_RECORD}(this.api.getSession())})},spanProcessors:[null!=(t=s.spanProcessor)?t:new r8(new rR(new ne({api:this.api}),{scheduledDelayMillis:nU.SCHEDULED_BATCH_DELAY_MS,maxExportBatchSize:30}),this.metas)]}).register({propagator:null!=(i=s.propagator)?i:new iJ.W3CTraceContextPropagator,contextManager:s.contextManager});let{propagateTraceHeaderCorsUrls:l,fetchInstrumentationOptions:u,xhrInstrumentationOptions:c}=null!=(r=this.options.instrumentationOptions)?r:{};!function(e){let t=e.tracerProvider||iQ.trace.getTracerProvider(),i=e.meterProvider||rr.getMeterProvider(),r=e.loggerProvider||rd.getLoggerProvider(),n=e.instrumentations?.flat()??[];for(let e=0,s=n.length;e<s;e++){let s=n[e];t&&s.setTracerProvider(t),i&&s.setMeterProvider(i),r&&s.setLoggerProvider&&s.setLoggerProvider(r),s.getConfig().enabled||s.enable()}}({instrumentations:null!=(n=s.instrumentations)?n:function(e={}){var t,i,r,n;let{fetchInstrumentationOptions:s,xhrInstrumentationOptions:a}=e,o=nM(e,["fetchInstrumentationOptions","xhrInstrumentationOptions"]),l=(t=s,Object.assign(Object.assign(Object.assign(Object.assign({},o),{ignoreNetworkEvents:!0}),t),{applyCustomAttributesOnSpan:(i=null==t?void 0:t.applyCustomAttributesOnSpan,(e,t,r)=>{nD(e,r instanceof Error?0:r.status),null==i||i(e,t,r)}),requestHook:(e,t)=>{let i=eX.faro.api.getActiveUserAction();i&&(null==i?void 0:i.getState())===z.Started&&(e.setAttribute("faro.action.user.name",i.name),e.setAttribute("faro.action.user.parentId",i.parentId))}})),u=(r=a,Object.assign(Object.assign(Object.assign(Object.assign({},o),{ignoreNetworkEvents:!0}),r),{applyCustomAttributesOnSpan:(n=null==r?void 0:r.applyCustomAttributesOnSpan,(e,t)=>{nD(e,t.status),null==n||n(e,t)})}));return[new nA(l),new nk(u)]}({ignoreUrls:this.getIgnoreUrls(),propagateTraceHeaderCorsUrls:l,fetchInstrumentationOptions:u,xhrInstrumentationOptions:c})}),this.api.initOTEL(iQ.trace,iY.context)}getIgnoreUrls(){return this.transports.transports.flatMap(e=>e.getIgnoreUrls())}}nU.SCHEDULED_BATCH_DELAY_MS=1e3;var nj=e.i(380926);e.s(["default",0,function({faroUrl:e,appName:t,appNamespace:i}){return(0,ei.useEffect)(()=>{if(e&&["production","staging"].includes(nj.APP_ENV))try{var r;let n;r={url:e,app:{name:t||"business-web-app",namespace:i||void 0,version:nj.COMMIT_ID||"1.0.0",environment:nj.APP_ENV},instrumentations:[...iL(),new nU],userActionsInstrumentation:{dataAttributeName:tq}},(n=function(e){var t,i,r,n,s;let a=[],o=iP(e.unpatchedConsole,e.internalLoggerLevel);e.transports?((e.url||e.apiKey)&&o.error('if "transports" is defined, "url" and "apiKey" should not be defined'),a.push(...e.transports)):e.url?a.push(new iW({url:e.url,apiKey:e.apiKey})):o.error('either "url" or "transports" must be defined');let{dedupe:l=!0,eventDomain:u="browser",globalObjectKey:c="faro",instrumentations:d=iL(),internalLoggerLevel:h=es,isolate:p=!1,logArgsSerializer:g=eE,metas:m=function(e){var t,i;let{page:r,generatePageId:n}=null!=(t=null==e?void 0:e.pageTracking)?t:{},s=[iH,iV,function({generatePageId:e,initialPageMeta:t}={}){return()=>{let i=location.href;return eu(e,"function")&&E!==i&&(E=i,S=e(location)),{page:Object.assign(Object.assign({url:i},S?{id:S}:{}),t)}}}({generatePageId:n,initialPageMeta:r}),...null!=(i=e.metas)?i:[],iz];return eh(null==window?void 0:window.k6)?[...s,i$]:s}(e),paused:f=!1,preventGlobalExposure:b=!1,unpatchedConsole:v=ea,url:_,experimental:T}=e,w=iX(e,["dedupe","eventDomain","globalObjectKey","instrumentations","internalLoggerLevel","isolate","logArg
9sSerializer","metas","paused","preventGlobalExposure","unpatchedConsole","url","experimental"]),y=null!=(t=null==T?void 0:T.trackNavigation)&&t,O={dataAttributeName:null!=(r=null==(i=e.userActionsInstrumentation)?void 0:i.dataAttributeName)?r:tq,excludeItem:null==(n=e.userActionsInstrumentation)?void 0:n.excludeItem};return Object.assign(Object.assign({},w),{batching:Object.assign(Object.assign({},iU),e.batching),dedupe:l,globalObjectKey:c,instrumentations:function(e,{experimental:t}){var i;let r=null!=(i=null==t?void 0:t.trackNavigation)&&i;return e.filter(e=>"@grafana/faro-web-sdk:instrumentation-navigation"!==e.name||!!r)}(d,e),internalLoggerLevel:h,isolate:p,logArgsSerializer:g,metas:m,parseStacktrace:ij,paused:f,preventGlobalExposure:b,transports:a,unpatchedConsole:v,eventDomain:u,ignoreUrls:[...null!=(s=e.ignoreUrls)?s:[],..._?[_]:[],/\/collect(?:\/[\w]*)?$/],sessionTracking:Object.assign(Object.assign(Object.assign({},tR),e.sessionTracking),function({trackGeolocation:e,sessionTracking:t}){var i;let r={};return(eu(e,"boolean")&&(r.geoLocationTrackingEnabled=e),ef(r))?{}:{session:Object.assign(Object.assign({},null!=(i=null==t?void 0:t.session)?i:{}),{overrides:r})}}({trackGeolocation:e.trackGeolocation,sessionTracking:e.sessionTracking})),userActionsInstrumentation:O,experimental:{trackNavigation:y}})}(r))&&function(e){var t,i,r,n;let s,a,o,l,u,c,d,h,p,g,m,f,b,_,T,E,S,w,y,O,A=iM=null!=(t=e.unpatchedConsole)?t:iM,R=iP(A,e.internalLoggerLevel);if((0,ik.isInternalFaroOnGlobalObject)()&&!e.isolate)return R.error('Faro is already registered. Either add instrumentations, transports etc. to the global faro instance or use the "isolate" property');R.debug("Initializing");let C=(s=[],a=[],o=()=>s.reduce((e,t)=>Object.assign(e,eu(t,"function")?t():t),{}),l=()=>{if(a.length){let e=o();a.forEach(t=>t(e))}},{add:(...e)=>{R.debug("Adding metas\n",e),s.push(...e),l()},remove:(...e)=>{R.debug("Removing metas\n",e),s=s.filter(t=>!e.includes(t)),l()},addListener:e=>{R.debug("Adding metas listener\n",e),a.push(e)},removeListener:e=>{R.debug("Removing metas listener\n",e),a=a.filter(t=>t!==e)},get value(){return o()}}),x=(R.debug("Initializing transports"),c=[],d=e.paused,h=[],p=t=>{let i=t;for(let t of h){let r=i.map(t).filter(Boolean);if(0===r.length)return[];i=function(e,t){if(t.preserveOriginalError)for(let t of e)t.type===$.EXCEPTION&&delete t.payload.originalError;return e}(r,e)}return i},(null==(i=e.batching)?void 0:i.enabled)&&(u=new iD(e=>{let t=p(e);if(0!==t.length)for(let e of c)R.debug(`Transporting item using ${e.name}
10`,t),e.isBatched()&&e.send(t)},{sendTimeout:e.batching.sendTimeout,itemLimit:e.batching.itemLimit,paused:d})),{add:(...t)=>{R.debug("Adding transports"),t.forEach(t=>{(R.debug(`Adding "${t.name}" transport`),c.some(e=>e===t))?R.warn(`Transport ${t.name} is already added`):(t.unpatchedConsole=A,t.internalLogger=R,t.config=e,t.metas=C,c.push(t))})},addBeforeSendHooks:(...e)=>{R.debug("Adding beforeSendHooks\n",h),e.forEach(e=>{e&&h.push(e)})},getBeforeSendHooks:()=>[...h],execute:t=>{var i;d||((null==(i=e.batching)?void 0:i.enabled)&&(null==u||u.addItem(t)),(t=>{var i,r;if((null==(i=e.batching)?void 0:i.enabled)&&c.every(e=>e.isBatched()))return;let[n]=p([t]);if(void 0!==n)for(let t of c)R.debug(`Transporting item using ${t.name}
11`,n),t.isBatched()?(null==(r=e.batching)?void 0:r.enabled)||t.send([n]):t.send(n)})(t))},isPaused:()=>d,pause:()=>{R.debug("Pausing transports"),null==u||u.pause(),d=!0},remove:(...e)=>{R.debug("Removing transports"),e.forEach(e=>{R.debug(`Removing "${e.name}" transport`);let t=c.indexOf(e);-1===t?R.warn(`Transport "${e.name}" is not added`):c.splice(t,1)})},removeBeforeSendHooks:(...e)=>{h.filter(t=>!e.includes(t))},get transports(){return[...c]},unpause:()=>{R.debug("Unpausing transports"),null==u||u.start(),d=!1}}),N=(R.debug("Initializing API"),g=null,m=function({transports:e,internalLogger:t,config:i,pushEvent:r}){var n;let s,a=null==(n=i.userActionsInstrumentation)?void 0:n.excludeItem,o=()=>s;return{startUserAction:(i,n,l)=>{if(void 0!==o())return void t.error("Attempted to create a new user action while one is already running. This is not possible.");{let t=new tV({name:i,transports:e,attributes:n,trigger:(null==l?void 0:l.triggerName)||"faroApiCall",importance:(null==l?void 0:l.importance)||tB,trackUserActionsExcludeItem:a,pushEvent:r});return t.filter(e=>[z.Ended,z.Cancelled].includes(e)).first().subscribe(()=>{s=void 0}),tz.notify({type:"user_action_start",userAction:t}),s=t}},getActiveUserAction:o}}
11({transports:x,config:e,internalLogger:R,pushEvent:(e,t,i,r)=>{g?g(e,t,i,r):R.warn("pushEventImpl is not initialized. Event dropped:",{name:e,attributes:t,domain:i,options:r})}}),R.debug("Initializing traces API"),b={getOTEL:()=>f,getTraceContext:()=>{let e=null==f?void 0:f.trace.getSpanContext(f.context.active());return e?{trace_id:e.traceId,span_id:e.spanId}:void 0},initOTEL:(e,t)=>{R.debug("Initializing OpenTelemetry"),f={trace:e,context:t}},isOTELInitialized:()=>!!f,pushTraces:e=>{try{let t={type:$.TRACE,payload:e,meta:C.value};R.debug("Pushing trace\n",t),x.execute(t)}catch(e){R.error("Error pushing trace\n",e)}}},_={unpatchedConsole:A,internalLogger:R,userActionsApi:m,config:e,metas:C,transports:x,tracesApi:b},g=(T=function({internalLogger:e,config:t,metas:i,transports:r,tracesApi:n,userActionsApi:s}){let a=null;return{pushEvent:(o,l,u,{skipDedupe:c,spanContext:d,timestampOverwriteMs:h,customPayloadTransformer:p=e=>e}={})=>{try{let g,m=ev(l),f={meta:i.value,payload:p({name:o,domain:null!=u?u:t.eventDomain,attributes:ef(m)?void 0:m,timestamp:h?eZ(h):eJ(),trace:d?{trace_id:d.traceId,span_id:d.spanId}:n.getTraceContext()}),type:$.EVENT},b={name:f.payload.name,attributes:f.payload.attributes,domain:f.payload.domain};if(!c&&t.dedupe&&(g=a,!eu(g,"null"))&&tC(b,a))return void e.debug("Skipping event push because it is the same as the last one\n",f.payload);a=b,e.debug("Pushing event\n",f),t$(s.getActiveUserAction(),f)||r.execute(f)}catch(t){e.error("Error pushing event",t)}}}}(_)).pushEvent,Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},b),function({internalLogger:e,config:t,metas:i,transports:r,tracesApi:n,userActionsApi:s}){var a;e.debug("Initializing exceptions API");let o=null;v=null!=(a=t.parseStacktrace)?a:v;let l=t=>{e.debug("Changing stacktrace parser"),v=null!=t?t:v},{ignoreErrors:u=[],preserveOriginalError:c}=t;return l(t.parseStacktrace),{changeStacktraceParser:l,getStacktraceParser:()=>v,pushError:(a,{skipDedupe:l,stackFrames:d,type:h,context:p,spanContext:g,timestampOverwriteMs:m,originalError:f,fingerprint:b,fatal:_}={})=>{var T,E;if(!function(e,t){var i;let{message:r,name:n,stack:s}=t;return i=r+" "+n+" "+s,e.some(e=>eu(e,"string")?i.includes(e):!!i.match(e))}(u,null!=f?f:a))try{let u,S,w,y=ev(Object.assign(Object.assign({},((u=S=(E=null!=f?f:a).cause,em&&ed(u,Error))?S=E.cause.toString():null!==S&&(eh(E.cause)||ep(E.cause))?S=eb(E.cause):null!=S&&(S=E.cause.toString()),null==S?{}:{cause:S})),null!=p?p:{})),O={meta:i.value,payload:Object.assign(Object.assign(Object.assign(Object.assign({type:h||a.name||e_,value:a.message,timestamp:m?eZ(m):eJ(),trace:g?{trace_id:g.traceId,span_id:g.spanId}:n.getTraceContext()},ef(y)?{}:{context:y}),c?{originalError:f}:{}),b?{fingerprint:b}:{}),void 0!==_?{fatal:_}:{}),type:$.EXCEPTION};(null==(d=null!=d?d:a.stack?null==v?void 0:v(a).frames:void 0)?void 0:d.length)&&(O.payload.stacktrace={frames:d});let A={type:O.payload.type,value:O.payload.value,stacktrace:O.payload.stacktrace,context:O.payload.context,fingerprint:O.payload.fingerprint,fatal:null!=(T=O.payload.fatal)&&T};if(!l&&t.dedupe&&(w=o,!eu(w,"null"))&&tC(A,o))return void e.debug("Skipping error push because it is the same as the last one\n",O.payload);o=A,e.debug("Pushing exception\n",O),t$(s.getActiveUserAction(),O)||r.execute(O)}catch(t){e.error("Error pushing event",t)}}}}(_)),function({internalLogger:e,metas:t}){let i,r,n,s;e.debug("Initializing meta API");let a=e=>{r&&t.remove(r),r={user:e},t.add(r)},o=(e,r)=>{var n;let s=null==r?void 0:r.overrides,a=s?{overrides:Object.assign(Object.assign({},null==(n=null==i?void 0:i.session)?void 0:n.overrides),s)}:{};i&&t.remove(i),i={session:Object.assign(Object.assign({},ef(e)?void 0:e),a)},t.add(i)},l=()=>t.value.session,u=()=>t.value.page;return{setUser:a,resetUser:a,setSession:o,resetSession:o,getSession:l,setView:(e,i)=>{var r;if((null==i?void 0:i.overrides)&&o(l(),{overrides:i.overrides}),(null==(r=null==n?void 0:n.view)?void 0:r.name)===(null==e?void 0:e.name))return;let s=n;n={view:e},t.add(n),s&&t.remove(s)},getView:()=>t.value.view,setPage:e=>{var i;let r=eu(e,"string")?Object.assign(Object.assign({}
11,null!=(i=null==s?void 0:s.page)?i:u()),{id:e}):e;s&&t.remove(s),s={page:r},t.add(s)},getPage:u}}(_)),function({internalLogger:e,config:t,metas:i,transports:r,tracesApi:n,userActionsApi:s}){var a;e.debug("Initializing logs API");let o=null,l=null!=(a=t.logArgsSerializer)?a:eE;return{pushLog:(a,{context:u,level:c,skipDedupe:d,spanContext:h,timestampOverwriteMs:p}={})=>{try{let g,m=ev(u),f={type:$.LOG,payload:{message:l(a),level:null!=c?c:eS,context:ef(m)?void 0:m,timestamp:p?eZ(p):eJ(),trace:h?{trace_id:h.traceId,span_id:h.spanId}:n.getTraceContext()},meta:i.value},b={message:f.payload.message,level:f.payload.level,context:f.payload.context};if(!d&&t.dedupe&&(g=o,!eu(g,"null"))&&tC(b,o))return void e.debug("Skipping log push because it is the same as the last one\n",f.payload);o=b,e.debug("Pushing log\n",f),t$(s.getActiveUserAction(),f)||r.execute(f)}catch(t){e.error("Error pushing log\n",t)}}}}(_)),function({internalLogger:e,config:t,metas:i,transports:r,tracesApi:n,userActionsApi:s}){e.debug("Initializing measurements API");let a=null;return{pushMeasurement:(o,{skipDedupe:l,context:u,spanContext:c,timestampOverwriteMs:d}={})=>{try{let h,p=ev(u),g={type:$.MEASUREMENT,payload:Object.assign(Object.assign({},o),{trace:c?{trace_id:c.traceId,span_id:c.spanId}:n.getTraceContext(),timestamp:d?eZ(d):eJ(),context:ef(p)?void 0:p}),meta:i.value},m={type:g.payload.type,values:g.payload.values,context:g.payload.context};if(!l&&t.dedupe&&(h=a,!eu(h,"null"))&&tC(m,a))return void e.debug("Skipping measurement push because it is the same as the last one\n",g.payload);a=m,e.debug("Pushing measurement\n",g),t$(s.getActiveUserAction(),g)||r.execute(g)}catch(t){e.error("Error pushing measurement\n",t)}}}}(_)),T),m)),L=(R.debug("Initializing instrumentations"),E=[],{add:(...t)=>{R.debug("Adding instrumentations"),t.forEach(t=>{(R.debug(`Adding "${t.name}" instrumentation`),E.some(e=>e.name===t.name))?R.warn(`Instrumentation ${t.name} is already added`):(t.unpatchedConsole=A,t.internalLogger=R,t.config=e,t.metas=C,t.transports=x,t.api=N,E.push(t),t.initialize())})},get instrumentations(){return[...E]},remove:(...e)=>{R.debug("Removing instrumentations"),e.forEach(e=>{var t,i;R.debug(`Removing "${e.name}" instrumentation`);let r=E.reduce((t,i,r)=>null===t&&i.name===e.name?r:null,null);null===r?R.warn(`Instrumentation "${e.name}" is not added`):(null==(i=(t=E[r]).destroy)||i.call(t),E.splice(r,1))})}}),P=(0,eX.registerFaro)(A,R,e,C,x,N,L);w=(S=P.config.app.name)?null===iI.globalObject||void 0===iI.globalObject?void 0:iI.globalObject[`__faroGitHash_${S}`]:void 0,y={sdk:{version:ey,name:"faro"},app:Object.assign({bundleId:S&&function(e){let t=`__faroBundleId_${e}`,i=null===iI.globalObject||void 0===iI.globalObject?void 0:iI.globalObject[t];if("string"==typeof i&&""!==i)return i;let r="u">typeof window?window[t]:void 0;if("string"==typeof r&&""!==r)return r}(S)},void 0!==w?{gitHash:w}:{})},(O=null==(r=P.config.sessionTracking)?void 0:r.session)&&P.api.setSession(O),P.config.app&&(y.app=Object.assign(Object.assign({},P.config.app),y.app)),P.config.user&&(y.user=P.config.user),P.config.view&&(y.view=P.config.view),P.metas.add(y,...null!=(n=P.config.metas)?n:[]),P.transports.add(...P.config.transports),P.transports.addBeforeSendHooks(P.config.beforeSend),P.instrumentations.add(...P.config.instrumentations)}(n)}catch(e){console.error("Failed to initialize Grafana Faro",e)}},[]),null}],670511)}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.