@dash0/sdk-web 0.13.3 → 0.13.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/dash0.iife.js +1 -1
- package/dist/dash0.iife.js.map +1 -1
- package/dist/dash0.js +1 -1
- package/dist/dash0.js.map +1 -1
- package/dist/dash0.umd.cjs +1 -1
- package/dist/dash0.umd.cjs.map +1 -1
- package/dist/modules/attributes/common.js +2 -2
- package/dist/modules/attributes/url.js +11 -10
- package/dist/modules/instrumentations/http/fetch.js +3 -3
- package/dist/modules/semantic-conventions.js +1 -0
- package/dist/modules/utils/otel/attributes.js +8 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/attributes/common.d.ts +3 -0
- package/dist/types/attributes/url.d.ts +2 -1
- package/dist/types/semantic-conventions.d.ts +1 -0
- package/dist/types/utils/otel/attributes.d.ts +2 -0
- package/package.json +1 -1
- package/src/attributes/common.ts +5 -1
- package/src/attributes/url.ts +12 -10
- package/src/instrumentations/http/fetch.ts +3 -3
- package/src/semantic-conventions.ts +1 -0
- package/src/utils/otel/attributes.ts +11 -0
package/dist/dash0.umd.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).dash0={})}(this,(function(t){"use strict";function e(){}var n={debug:0,info:1,warn:2,error:3},r=n.warn;var i=s("info"),o=s("warn"),a=s("error"),u=s("debug");function s(t){if("undefined"!=typeof console&&console[t]&&"function"==typeof console[t].apply){var i=n[t];return function(){i>=r&&console[t].apply(console,arguments)}}return e}var c=Object.prototype.hasOwnProperty;function l(t,e){return c.call(t,e)}var f="undefined"!=typeof window?window:void 0,d=null==f?void 0:f.document,v=null==f?void 0:f.navigator,p="undefined"!=typeof location?location:void 0,h=(null==f?void 0:f.performance)||(null==f?void 0:f.webkitPerformance)||(null==f?void 0:f.msPerformance)||(null==f?void 0:f.mozPerformance);null==f||f.encodeURIComponent;var m=null==f?void 0:f.fetch,y=function(){try{var t;return null!==(t=null==f?void 0:f.localStorage)&&void 0!==t?t:null}catch(t){return null}}(),g=function(){try{var t;return null!==(t=null==f?void 0:f.sessionStorage)&&void 0!==t?t:null}catch(t){return null}}(),b=Array(32);function T(t){for(var e=0;e<2*t;e++)b[e]=Math.floor(16*Math.random())+48,b[e]>=58&&(b[e]+=39);return String.fromCharCode.apply(null,b.slice(0,2*t))}function E(t,e,n){t.addEventListener?t.addEventListener(e,n,!1):t.attachEvent&&t.attachEvent("on"+e,n)}var w=null!=y&&"function"==typeof y.getItem&&"function"==typeof y.setItem;function S(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function A(t,e,n,r,i,o,a){try{var u=t[o](a),s=u.value}catch(t){return void n(t)}u.done?e(s):Promise.resolve(s).then(r,i)}function O(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){A(o,r,i,a,u,"next",t)}function u(t){A(o,r,i,a,u,"throw",t)}a(void 0)}))}}function I(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function N(t,e,n){return e&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,P(r.key),r)}}(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function L(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=D(t))||e){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){u=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw o}}}}function C(t,e,n){return(e=P(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function _(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function R(){R=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var o=e&&e.prototype instanceof y?e:y,a=Object.create(o.prototype),u=new _(r||[]);return i(a,"_invoke",{value:I(t,n,u)}),a}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var d="suspendedStart",v="suspendedYield",p="executing",h="completed",m={};function y(){}function g(){}function b(){}var T={};c(T,a,(function(){return this}));var E=Object.getPrototypeOf,w=E&&E(E(x([])));w&&w!==n&&r.call(w,a)&&(T=w);var S=b.prototype=y.prototype=Object.create(T);function A(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function n(i,o,a,u){var s=f(t[i],t,o);if("throw"!==s.type){var c=s.arg,l=c.value;return l&&"object"==typeof l&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(l).then((function(t){c.value=t,a(c)}),(function(t){return n("throw",t,a,u)}))}u(s.arg)}var o;i(this,"_invoke",{value:function(t,r){function i(){return new e((function(e,i){n(t,r,e,i)}))}return o=o?o.then(i,i):i()}})}function I(e,n,r){var i=d;return function(o,a){if(i===p)throw Error("Generator is already running");if(i===h){if("throw"===o)throw a;return{value:t,done:!0}}for(r.method=o,r.arg=a;;){var u=r.delegate;if(u){var s=N(u,r);if(s){if(s===m)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===d)throw i=h,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=p;var c=f(e,n,r);if("normal"===c.type){if(i=r.done?h:v,c.arg===m)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=h,r.method="throw",r.arg=c.arg)}}}function N(e,n){var r=n.method,i=e.iterator[r];if(i===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,N(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var o=f(i,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,m;var a=o.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,m):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function L(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function _(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(L,this),this.reset(!0)}function x(e){if(e||""===e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function n(){for(;++i<e.length;)if(r.call(e,i))return n.value=e[i],n.done=!1,n;return n.value=t,n.done=!0,n};return o.next=o}}throw new TypeError(typeof e+" is not iterable")}return g.prototype=b,i(S,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:g,configurable:!0}),g.displayName=c(b,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,c(t,s,"GeneratorFunction")),t.prototype=Object.create(S),t},e.awrap=function(t){return{__await:t}},A(O.prototype),c(O.prototype,u,(function(){return this})),e.AsyncIterator=O,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var a=new O(l(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},A(S),c(S,s,"Generator"),c(S,a,(function(){return this})),c(S,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=x,_.prototype={constructor:_,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(C),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function i(r,i){return u.type="throw",u.arg=e,n.next=r,i&&(n.method="next",n.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(s&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),C(n),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;C(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:x(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),m}},e}function x(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,u=[],s=!0,c=!1;try{if(o=(n=n.call(t)).next,0===e);else for(;!(s=(r=o.call(n)).done)&&(u.push(r.value),u.length!==e);s=!0);}catch(t){c=!0,i=t}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return u}}(t,e)||D(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function k(t){return function(t){if(Array.isArray(t))return S(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||D(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function P(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}function j(t){return j="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},j(t)}function D(t,e){if(t){if("string"==typeof t)return S(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?S(t,e):void 0}}function M(){return(new Date).getTime()}function U(){var t=V();return t?String(1e6*(h.now()+t)):F(new Date)}function F(t){return"object"===j(t)?F(t.getTime()):String(t)+"000000"}function V(){var t,e=null==h?void 0:h.timeOrigin;"number"!=typeof e&&(e=null==h||null===(t=h.timing)||void 0===t?void 0:t.fetchStart);return e}var B={setTimeout:null==f?void 0:f.setTimeout,clearTimeout:null==f?void 0:f.clearTimeout,setInterval:null==f?void 0:f.setInterval,clearInterval:null==f?void 0:f.clearInterval},W=null!=f&&null!=f.Zone&&null!=f.Zone.root&&"function"==typeof f.Zone.root.run;function H(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return z.apply("setTimeout",arguments)}function q(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return z.apply("setInterval",arguments)}function z(){var t,e=this;if(W)try{var n=Array.prototype.slice.apply(arguments);return f.Zone.root.run(B[e],f,n)}catch(t){o("Failed to execute %s inside of zone (via Zone.js). Falling back to execution inside currently active zone.",e,t)}return null===(t=B[e])||void 0===t?void 0:t.apply(f,arguments)}W&&u("Discovered Zone.js globals. Will attempt to register all timers inside the root Zone.");h&&h.getEntriesByType;var G=h&&"function"==typeof f.PerformanceObserver&&"function"==typeof h.now,K=Object.freeze({CONNECT_END:"connectEnd",CONNECT_START:"connectStart",DECODED_BODY_SIZE:"decodedBodySize",DOM_COMPLETE:"domComplete",DOM_CONTENT_LOADED_EVENT_END:"domContentLoadedEventEnd",DOM_CONTENT_LOADED_EVENT_START:"domContentLoadedEventStart",DOM_INTERACTIVE:"domInteractive",DOMAIN_LOOKUP_END:"domainLookupEnd",DOMAIN_LOOKUP_START:"domainLookupStart",ENCODED_BODY_SIZE:"encodedBodySize",FETCH_START:"fetchStart",LOAD_EVENT_END:"loadEventEnd",LOAD_EVENT_START:"loadEventStart",NAVIGATION_START:"navigationStart",REDIRECT_END:"redirectEnd",REDIRECT_START:"redirectStart",REQUEST_START:"requestStart",RESPONSE_END:"responseEnd",RESPONSE_START:"responseStart",SECURE_CONNECTION_START:"secureConnectionStart",START_TIME:"startTime",UNLOAD_EVENT_END:"unloadEventEnd",UNLOAD_EVENT_START:"unloadEventStart"}),Z=new WeakSet;function Y(t){if(!G)return function(t){var n=0;return{start:function(){n=M()},end:function(){return t({duration:M()-n})},cancel:e}}(t.onEnd);var n,r,i,o,a,u=[];return{start:function(){n=h.now();try{var t,e=null==f?void 0:f.PerformanceObserver;if(e)null===(t=i=new e(c))||void 0===t||t.observe({type:"resource"})}catch(t){}a=H(v,6e5)},end:function(){if(r=h.now(),p(),!Q())return s();H((function(){return s()}),Math.min(300,t.maxWaitForResourceMillis)),E(d,"visibilitychange",l),o=H(s,t.maxWaitForResourceMillis)},cancel:v};function s(){v();var e=function(){if(!u.length)return;var e,i,o=u.filter((function(e){return e.responseEnd<=r+t.maxToleranceForResourceTimingsMillis&&!Z.has(e)}));if(!o.length)return;1===o.length&&(e=o[0]);if(!e){var a,s=L(o);try{for(s.s();!(a=s.n()).done;){var c=a.value,l=Math.abs(r-n-c.duration)+Math.abs(c.responseEnd-r);(void 0===i||l<i)&&(i=l,e=c)}}catch(t){s.e(t)}finally{s.f()}}if(!e)return;return Z.add(e),e}();null!=e&&e.duration&&e.duration<864e5?t.onEnd({resource:e,duration:e.duration}):t.onEnd({resource:e,duration:r-n})}function c(e){e.getEntriesByType("resource").filter((function(e){var r=e;return r.startTime>=n&&t.resourceMatcher(r)})).forEach((function(t){return u.push(t)}))}function l(){Q()||s()}function v(){!function(){if(i){try{var t;null===(t=i)||void 0===t||t.disconnect()}catch(t){}i=void 0}}(),o&&(clearTimeout(o),o=void 0),p(),function(){if(!d)return;t=d,e="visibilitychange",n=l,t.removeEventListener?t.removeEventListener(e,n,!1):t.detachEvent&&t.detachEvent("on"+e,n);var t,e,n}()}function p(){a&&(clearTimeout(a),a=void 0)}}function Q(){return"visible"===(null==d?void 0:d.visibilityState)||"prerender"===(null==d?void 0:d.visibilityState)}var X="undefined";function $(t){return Math.round(100*t)/100}function J(t){var e;return"string"!=typeof t?t:new URL(t,null!==(e=null==d?void 0:d.baseURI)&&void 0!==e?e:null==p?void 0:p.href)}function tt(t){try{return J(t).origin===("undefined"!=typeof location?location.origin:void 0)}catch(t){return!1}}var et=Symbol.for("INSTRUMENTED_BY_DASH0");function nt(t,e,n){var r=t[e];r?(!0===r[et]&&u("".concat(String(e)," has already been instrumented, skipping")),function(t){t[et]=!0}(r),t[e]=n(r)):u("".concat(String(e)," is not defined, unable to instrument"))}var rt={endpoints:[],resource:{attributes:[]},scope:{name:"dash0-web-sdk",version:"0.13.3",attributes:[]},signalAttributes:[],ignoreUrls:[],ignoreErrorMessages:[],wrapEventHandlers:!0,wrapTimers:!0,propagateTraceHeadersCorsURLs:[],maxWaitForResourceTimingsMillis:1e4,maxToleranceForResourceTimingsMillis:50,headersToCapture:[],pageViewInstrumentation:{trackVirtualPageViews:!0,includeParts:[]}},it="service.name",ot="service.version",at="deployment.environment.name",ut="deployment.name",st="deployment.id",ct="event.name",lt="dash0.web.event.id",ft="page.load.id",dt="user_agent.original",vt="user.id",pt="user.name",ht="user.full_name",mt="user.email",yt="user.hash",gt="user.roles",bt="exception.message",Tt="exception.type",Et="exception.stacktrace",wt="url.full",St={PAGE_VIEW:"browser.page_view",NAVIGATION_TIMING:"browser.navigation_timing",WEB_VITAL:"browser.web_vital",ERROR:"browser.error"},At={UNSPECIFIED:0,TRACE:1,DEBUG:5,INFO:9,WARN:13,ERROR:17,FATAL:21},Ot=0,It=1,Nt="pushState",Lt="replaceState",Ct=1;function _t(){var t,e;return"".concat((t={ephemeralSession:!w},e=0,t.ephemeralSession&&(e|=Ct),e.toString(16).padStart(2,"0"))).concat(T(7))}var Rt="d0_session",xt="#",kt=864e5,Pt=null;function jt(t,e){if(!w)return u("Storage API is not available and session tracking is therefore not supported."),void(Pt=_t());t||(t=108e5),e||(e=216e5),t=Math.min(t,kt),e=Math.min(e,kt);try{var n=function(t){return w&&y?y.getItem(t):null}(Rt),r=function(t){if(!t)return null;var e=t.split(xt);if(e.length<3)return null;var n=e[0],r=parseInt(e[1],10),i=parseInt(e[2],10);if(!n||isNaN(r)||isNaN(i))return null;return{id:n,startTime:r,lastActivityTime:i}}(n);r&&!function(t,e,n){var r=M()-e;if(t.lastActivityTime<r)return!1;var i=M()-n;return t.startTime>=i}(r,t,e)&&(r=null),r?r.lastActivityTime=M():r={id:_t(),startTime:M(),lastActivityTime:M()},function(t,e){w&&y&&y.setItem(t,e)}(Rt,function(t){return t.id+xt+t.startTime+xt+t.lastActivityTime}(r)),Pt=r.id}catch(t){o("Failed to record session information",t)}}var Dt=-1,Mt=function(t){addEventListener("pageshow",(function(e){e.persisted&&(Dt=e.timeStamp,t(e))}),!0)},Ut=function(t,e,n,r){var i,o;return function(a){e.value>=0&&(a||r)&&(((o=e.value-(null!=i?i:0))||void 0===i)&&(i=e.value,e.delta=o,e.rating=function(t,e){return t>e[1]?"poor":t>e[0]?"needs-improvement":"good"}(e.value,n),t(e)))}},Ft=function(t){requestAnimationFrame((function(){return requestAnimationFrame((function(){return t()}))}))},Vt=function(){var t=performance.getEntriesByType("navigation")[0];if(t&&t.responseStart>0&&t.responseStart<performance.now())return t},Bt=function(){var t,e=Vt();return null!==(t=null==e?void 0:e.activationStart)&&void 0!==t?t:0},Wt=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1,n=Vt(),r="navigate";return Dt>=0?r="back-forward-cache":n&&(document.prerendering||Bt()>0?r="prerender":document.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:t,value:e,rating:"good",delta:0,entries:[],id:"v5-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:r}},Ht=new WeakMap;function qt(t,e){return Ht.get(t)||Ht.set(t,new e),Ht.get(t)}var zt,Gt=function(){return N((function t(){I(this,t),C(this,"t",void 0),C(this,"i",0),C(this,"o",[])}),[{key:"h",value:function(t){var e;if(!t.hadRecentInput){var n=this.o[0],r=this.o.at(-1);this.i&&n&&r&&t.startTime-r.startTime<1e3&&t.startTime-n.startTime<5e3?(this.i+=t.value,this.o.push(t)):(this.i=t.value,this.o=[t]),null===(e=this.t)||void 0===e||e.call(this,t)}}}])}(),Kt=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};try{if(PerformanceObserver.supportedEntryTypes.includes(t)){var r=new PerformanceObserver((function(t){Promise.resolve().then((function(){e(t.getEntries())}))}));return r.observe(function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?_(Object(n),!0).forEach((function(e){C(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):_(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({type:t,buffered:!0},n)),r}}catch(t){}},Zt=function(t){var e=!1;return function(){e||(t(),e=!0)}},Yt=-1,Qt=function(){return"hidden"!==document.visibilityState||document.prerendering?1/0:0},Xt=function(t){"hidden"===document.visibilityState&&Yt>-1&&(Yt="visibilitychange"===t.type?t.timeStamp:0,Jt())},$t=function(){addEventListener("visibilitychange",Xt,!0),addEventListener("prerenderingchange",Xt,!0)},Jt=function(){removeEventListener("visibilitychange",Xt,!0),removeEventListener("prerenderingchange",Xt,!0)},te=function(){if(Yt<0){var t,e=Bt(),n=document.prerendering||null===(t=globalThis.performance.getEntriesByType("visibility-state").filter((function(t){return"hidden"===t.name&&t.startTime>e}))[0])||void 0===t?void 0:t.startTime;Yt=null!=n?n:Qt(),$t(),Mt((function(){setTimeout((function(){Yt=Qt(),$t()}))}))}return{get firstHiddenTime(){return Yt}}},ee=function(t){document.prerendering?addEventListener("prerenderingchange",(function(){return t()}),!0):t()},ne=[1800,3e3],re=[.1,.25],ie=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};ee((function(){var n,r=te(),i=Wt("FCP"),o=Kt("paint",(function(t){var e,a=L(t);try{for(a.s();!(e=a.n()).done;){var u=e.value;"first-contentful-paint"===u.name&&(o.disconnect(),u.startTime<r.firstHiddenTime&&(i.value=Math.max(u.startTime-Bt(),0),i.entries.push(u),n(!0)))}}catch(t){a.e(t)}finally{a.f()}}));o&&(n=Ut(t,i,ne,e.reportAllChanges),Mt((function(r){i=Wt("FCP"),n=Ut(t,i,ne,e.reportAllChanges),Ft((function(){i.value=performance.now()-r.timeStamp,n(!0)}))})))}))}(Zt((function(){var n,r=Wt("CLS",0),i=qt(e,Gt),o=function(t){var e,o=L(t);try{for(o.s();!(e=o.n()).done;){var a=e.value;i.h(a)}}catch(t){o.e(t)}finally{o.f()}i.i>r.value&&(r.value=i.i,r.entries=i.o,n())},a=Kt("layout-shift",o);a&&(n=Ut(t,r,re,e.reportAllChanges),document.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&(o(a.takeRecords()),n(!0))})),Mt((function(){i.i=0,r=Wt("CLS",0),n=Ut(t,r,re,e.reportAllChanges),Ft((function(){return n()}))})),setTimeout(n))})))},oe=0,ae=1/0,ue=0,se=function(t){var e,n=L(t);try{for(n.s();!(e=n.n()).done;){var r=e.value;r.interactionId&&(ae=Math.min(ae,r.interactionId),ue=Math.max(ue,r.interactionId),oe=ue?(ue-ae)/7+1:0)}}catch(t){n.e(t)}finally{n.f()}},ce=function(){var t;return zt?oe:null!==(t=performance.interactionCount)&&void 0!==t?t:0},le=0,fe=function(){return N((function t(){I(this,t),C(this,"u",[]),C(this,"l",new Map),C(this,"m",void 0),C(this,"v",void 0)}),[{key:"p",value:function(){le=ce(),this.u.length=0,this.l.clear()}},{key:"P",value:function(){var t=Math.min(this.u.length-1,Math.floor((ce()-le)/50));return this.u[t]}},{key:"h",value:function(t){var e;if(null!==(e=this.m)&&void 0!==e&&e.call(this,t),t.interactionId||"first-input"===t.entryType){var n=this.u.at(-1),r=this.l.get(t.interactionId);if(r||this.u.length<10||t.duration>n.T){var i;if(r?t.duration>r.T?(r.entries=[t],r.T=t.duration):t.duration===r.T&&t.startTime===r.entries[0].startTime&&r.entries.push(t):(r={id:t.interactionId,entries:[t],T:t.duration},this.l.set(r.id,r),this.u.push(r)),this.u.sort((function(t,e){return e.T-t.T})),this.u.length>10){var o,a=L(this.u.splice(10));try{for(a.s();!(o=a.n()).done;){var u=o.value;this.l.delete(u.id)}}catch(t){a.e(t)}finally{a.f()}}null===(i=this.v)||void 0===i||i.call(this,r)}}}}])}(),de=function(t){var e=globalThis.requestIdleCallback||setTimeout;"hidden"===document.visibilityState?t():(t=Zt(t),document.addEventListener("visibilitychange",t,{once:!0}),e((function(){t(),document.removeEventListener("visibilitychange",t)})))},ve=[200,500],pe=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};globalThis.PerformanceEventTiming&&"interactionId"in PerformanceEventTiming.prototype&&ee((function(){var n;"interactionCount"in performance||zt||(zt=Kt("event",se,{type:"event",buffered:!0,durationThreshold:0}));var r,i=Wt("INP"),o=qt(e,fe),a=function(t){de((function(){var e,n=L(t);try{for(n.s();!(e=n.n()).done;){var a=e.value;o.h(a)}}catch(t){n.e(t)}finally{n.f()}var u=o.P();u&&u.T!==i.value&&(i.value=u.T,i.entries=u.entries,r())}))},u=Kt("event",a,{durationThreshold:null!==(n=e.durationThreshold)&&void 0!==n?n:40});r=Ut(t,i,ve,e.reportAllChanges),u&&(u.observe({type:"first-input",buffered:!0}),document.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&(a(u.takeRecords()),r(!0))})),Mt((function(){o.p(),i=Wt("INP"),r=Ut(t,i,ve,e.reportAllChanges)})))}))},he=function(){return N((function t(){I(this,t),C(this,"m",void 0)}),[{key:"h",value:function(t){var e;null===(e=this.m)||void 0===e||e.call(this,t)}}])}(),me=[2500,4e3],ye=!1;function ge(t){var e,n,r=[];return n=i,ye&&n(),d&&f&&(E(d,"visibilitychange",(function(){"visible"!==d.visibilityState&&n()})),E(f,"pagehide",(function(){ye=!0,n()})),E(f,"beforeunload",(function(){ye=!0,n()}))),{send:function(n){"visible"===(null==d?void 0:d.visibilityState)?(r.push(n),r.length>=15?i():null==e&&(e=H(i,1e3))):t([n])}};function i(){null!=e&&(clearTimeout(e),e=null),r.length>0&&(t(r.slice()),r.length=0)}}function be(t,e){return Te.apply(this,arguments)}function Te(){return Te=O(R().mark((function t(n,r){var i,a,s,c;return R().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(u("Transmitting telemetry to endpoints",r),i=JSON.stringify(r),a=i,s=i.length,c=!1,"undefined"==typeof CompressionStream){t.next=11;break}return t.next=8,Ee(i);case 8:a=t.sent,s=a.byteLength,c=!0;case 11:return t.next=13,Promise.all(rt.endpoints.map(function(){var t=O(R().mark((function t(r){var i,u,l;return R().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,(i=new URL(r.url)).pathname=i.pathname+(i.pathname.endsWith("/")?n.substring(1):n),u={"Content-Type":"application/json",Authorization:"Bearer ".concat(r.authToken)},r.dataset&&(u["Dash0-Dataset"]=r.dataset),c&&(u["Content-Encoding"]="gzip"),m){t.next=9;break}return o("Unable to send telemetry, fetch is not defined"),t.abrupt("return");case 9:return t.next=11,m(i,{method:"POST",headers:u,body:a,keepalive:s<=6e4});case 11:(l=t.sent).text().catch(e),l.ok||o("Failed to send telemetry to ".concat(i,": ").concat(l.status," ").concat(l.statusText)),t.next=19;break;case 16:t.prev=16,t.t0=t.catch(0),o("Error sending telemetry to ".concat(r.url).concat(n,":"),t.t0);case 19:case"end":return t.stop()}}),t,null,[[0,16]])})));return function(e){return t.apply(this,arguments)}}()));case 13:case"end":return t.stop()}}),t)}))),Te.apply(this,arguments)}function Ee(t){return we.apply(this,arguments)}function we(){return(we=O(R().mark((function t(e){var n,r,i;return R().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=new Blob([e]),r=n.stream(),i=r.pipeThrough(new CompressionStream("gzip")),t.abrupt("return",new Response(i).arrayBuffer());case 4:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var Se,Ae=ge((function(t){be("/v1/logs",{resourceLogs:[{resource:rt.resource,scopeLogs:[{scope:rt.scope,logRecords:t}]}]}).catch((function(t){a("Failed to transmit logs",t)}))})),Oe=ge((function(t){be("/v1/traces",{resourceSpans:[{resource:rt.resource,scopeSpans:[{scope:rt.scope,spans:t}]}]}).catch((function(t){a("Failed to transmit spans",t)}))}));function Ie(){var t,e,n,r,i,o,a;return Se||(e=(t={maxCalls:8096,maxCallsPerTenMinutes:4096,maxCallsPerTenSeconds:128}).maxCalls,n=t.maxCallsPerTenMinutes,r=t.maxCallsPerTenSeconds,i=0,o=0,a=0,q((function(){o=0}),6e5),q((function(){a=0}),1e4),Se=function(){return++i>e||++o>n||++a>r}),Se()}function Ne(t){Ie()?u("Transport rate limit. Will not send item.",t):Ae.send(t)}function Le(t){Ie()?u("Transport rate limit. Will not send item.",t):Oe.send(t)}var Ce=["stringValue","boolValue","intValue","doubleValue","arrayValue","kvlistValue","bytesValue"];function _e(t){if(null!=t){var e={};return Array.isArray(t)?e.arrayValue={values:t.map((function(t){return _e(t)}))}:"string"==typeof t?e.stringValue=t:"number"==typeof t?e.doubleValue=t:"boolean"==typeof t?e.boolValue=t:!function(t){if(null==t||"object"!==j(t))return!1;var e=Object.keys(t);return 1===e.length&&Ce.includes(e[0])}(t)?"object"===j(t)&&(e.kvlistValue={values:Object.entries(t).map((function(t){var e=x(t,2);return Re(e[0],e[1])}))}):e=t,e}}function Re(t,e){return{key:t,value:_e(e)}}function xe(t,e,n){e&&t.push(Re(e,n))}function ke(t,e){var n=t.findIndex((function(t){return t.key===e}));-1!==n&&t.splice(n,1)}var Pe="traceparent",je=/^00-([a-f0-9]{32})-([a-f0-9]{16})-[0-9]{1,2}$/;function De(){var t,e,n=((null===(t=Array.from(null!==(e=null==d?void 0:d.getElementsByTagName("meta"))&&void 0!==e?e:[]).find((function(t){var e;return(null===(e=t.getAttribute("name"))||void 0===e?void 0:e.toLowerCase())===Pe})))||void 0===t?void 0:t.content.trim())||"").match(je)||function(){var t=h.getEntriesByType("navigation")[0];if(!t)return"";if(!t.serverTiming)return"";return function(t){var e,n=L(t);try{for(n.s();!(e=n.n()).done;){var r=e.value;if(r.name===Pe)return r.description.trim()}}catch(t){n.e(t)}finally{n.f()}return""}(t.serverTiming)}().match(je);if(n)return{traceId:n[1],spanId:n[2]}}function Me(t,e,n){t.call(e,"traceparent","00-".concat(n.traceId,"-").concat(n.spanId,"-01"))}var Ue="d042",Fe=1;function Ve(t){var e=0;return t.withoutSession&&(e|=Fe),e.toString(16).padStart(2,"0")}for(var Be=new Uint32Array(256),We=0;We<256;We++){for(var He=We,qe=0;qe<8;qe++)He=1&He?3988292384^He>>>1:He>>>1;Be[We]=He>>>0}function ze(t){var e=function(t){for(var e=new Uint8Array(t.length/2),n=0;n<t.length;n+=2)e[n/2]=parseInt(t.substring(n,n+2),16);for(var r=4294967295,i=0;i<e.length;i++){var o=e[i];r=r>>>8^Be[255&(r^o)]}return(4294967295^r)>>>0}(t).toString(16).padStart(8,"0");return"".concat(e).concat(T(4))}function Ge(t){var e=function(t){return t?"".concat(Ue).concat(Ve({withoutSession:!1})).concat(t).concat(T(5)):"".concat(Ue).concat(Ve({withoutSession:!0})).concat(T(13))}(Pt),n=ze(e),r=[];return xe(r,lt,n),{traceId:e,spanId:n,name:t,kind:3,startTimeUnixNano:U(),attributes:r,events:[],links:[],status:{code:0}}}function Ke(t,e,n){var r=t;return e&&(r.status=e),r.endTimeUnixNano=null!=n?String(Math.round(parseInt(r.startTimeUnixNano)+n)):U(),r}function Ze(t,e,n,r){var i=void 0,o=void 0;"string"==typeof n?i=n:Array.isArray(n)&&(o=n),t.events.push({name:e,timeUnixNano:null!=i?i:U(),attributes:null!=o?o:[]})}var Ye=null!=g&&"function"==typeof g.getItem&&"function"==typeof g.setItem;var Qe="d0_tab",Xe=null;function $e(){if(Ye)try{var t=function(t){return Ye&&g?g.getItem(t):null}(Qe);if(t)return void(Xe=t);Xe=T(8),function(t,e){Ye&&g&&g.setItem(t,e)}(Qe,Xe)}catch(t){o("Failed to record tab ID information",t)}else u("Storage API is not available and tab tracking is therefore not supported.")}function Je(t,e){var n,r,i,o,a;void 0===t.find((function(t){return t.key===lt}))&&xe(t,lt,T(8));for(var u=0;u<rt.signalAttributes.length;u++)t.push(rt.signalAttributes[u]);!function(t,e){try{var n=J(e);n.username&&(n.username="REDACTED"),n.password&&(n.password="REDACTED"),xe(t,wt,n.href),xe(t,"url.path",n.pathname),xe(t,"url.domain",n.hostname),xe(t,"url.scheme",n.protocol.replace(":","")),n.hash&&xe(t,"url.fragment",n.hash.replace("#","")),n.search&&xe(t,"url.query",n.search.replace("?",""))}catch(n){xe(t,wt,String(e))}}(t,null!==(n=null!==(r=null==e?void 0:e.url)&&void 0!==r?r:null==f?void 0:f.location.href)&&void 0!==n?n:X),Pt&&xe(t,"session.id",Pt),Xe&&xe(t,"browser.tab.id",Xe),xe(t,"browser.window.width",null!==(i=null==f?void 0:f.innerWidth)&&void 0!==i?i:X),xe(t,"browser.window.height",null!==(o=null==f?void 0:f.innerHeight)&&void 0!==o?o:X);var s=null==v||null===(a=v.connection)||void 0===a?void 0:a.effectiveType;s&&xe(t,"network.connection.subtype",s)}function tn(){!function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};ee((function(){var n,r=te(),i=Wt("LCP"),o=qt(e,he),a=function(t){e.reportAllChanges||(t=t.slice(-1));var a,u=L(t);try{for(u.s();!(a=u.n()).done;){var s=a.value;o.h(s),s.startTime<r.firstHiddenTime&&(i.value=Math.max(s.startTime-Bt(),0),i.entries=[s],n())}}catch(t){u.e(t)}finally{u.f()}},u=Kt("largest-contentful-paint",a);if(u){n=Ut(t,i,me,e.reportAllChanges);for(var s=Zt((function(){a(u.takeRecords()),u.disconnect(),n(!0)})),c=0,l=["keydown","click","visibilitychange"];c<l.length;c++)addEventListener(l[c],(function(){return de(s)}),{capture:!0,once:!0});Mt((function(r){i=Wt("LCP"),n=Ut(t,i,me,e.reportAllChanges),Ft((function(){i.value=performance.now()-r.timeStamp,n(!0)}))}))}}))}(en,{reportAllChanges:!0}),pe(en,{reportAllChanges:!0}),ie(en,{reportAllChanges:!0})}function en(t){var e=[];xe(e,ct,St.WEB_VITAL);var n=[];xe(n,"name",t.name),xe(n,"value",$(t.value)),xe(n,"delta",$(t.delta));var r={timeUnixNano:U(),attributes:e,severityNumber:At.INFO,severityText:"INFO",body:{kvlistValue:{values:n}}};Je(r.attributes),Ne(r)}function nn(t,e){for(var n=0,r=t.length;n<r;n++)if(t[n].test(e))return!0;return!1}var rn="data:";function on(t){return!t||(!(t=String(t))||(null==t.substring||t.substring(0,5).toLowerCase()===rn||(!!function(t){for(var e=t.toLowerCase(),n=0,r=rt.endpoints.length;n<r;n++){var i=rt.endpoints[n];if(e.startsWith(i.url))return!0}return!1}(t)||nn(rt.ignoreUrls,t))))}var an,un=0,sn=0,cn={},ln=!1;function fn(){ln=!0}function dn(t,e){t&&vn("string"==typeof t?{message:t,opts:e}:{message:t.message,type:t.name,stack:t.stack,opts:e})}function vn(t){var e=t.message,n=t.type,r=t.stack,i=t.opts;if(e&&!(un>100)&&!function(t){return!t||nn(rt.ignoreErrorMessages,t)}(e)){sn>=20&&(cn={},sn=0);var o=(e=String(e).substring(0,300))+(r=function(t){return String(t||"").split("\n").slice(0,30).join("\n")}(r))+(null==f?void 0:f.location.href),a=cn[o];if(a)a.seenCount++;else{var u=[];xe(u,ct,St.ERROR),xe(u,bt,e),n&&xe(u,Tt,n),r&&xe(u,Et,r),null!=i&&i.componentStack&&xe(u,"exception.component_stack",null==i?void 0:i.componentStack.substring(0,2048)),Je(u),a={seenCount:1,transmittedCount:0,log:{timeUnixNano:U(),attributes:u,severityNumber:At.ERROR,severityText:"ERROR",body:{stringValue:e}}},cn[o]=a,sn++}!function(){if(an)return;an=setTimeout(pn,1e3)}()}}function pn(){for(var t in an&&(clearTimeout(an),an=null),cn)if(l(cn,t)){var e=cn[t];e.seenCount>e.transmittedCount&&(Ne(e.log),un++)}cn={},sn=0}var hn="Unhandled promise rejection: ",mn="<unavailable because Promise wasn't rejected with an Error object>";function yn(t){null==t.reason?dn({message:hn+"<no reason defined>",stack:mn}):"string"==typeof t.reason.message?dn({message:hn+t.reason.message,stack:"string"==typeof t.reason.stack?t.reason.stack:mn}):"object"!==j(t.reason)&&dn({message:hn+t.reason,stack:mn})}var gn="__dash0OriginalFunctions";function bn(t,e){for(var n=t[gn],r=0;r<n.length;r++){if(Tn(n[r].valuesForEqualityCheck,e))return r}return-1}function Tn(t,e){if(t.length!==e.length)return!1;for(var n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}function En(t,e,n,r,i){return function(t,e,n){if(!t)return e;var r=t[gn]=t[gn]||[],i=bn(t,n);return-1!==i?r[i].wrappedFunction:(r.push({wrappedFunction:e,valuesForEqualityCheck:n}),e)}(t,e,wn(n,r,i))}function wn(t,e,n){return[t,e,Sn(n)]}function Sn(t){return null!=t&&("object"===j(t)?Boolean(t.capture):Boolean(t))}function An(t,e,n,r,i){return function(t,e,n){var r=null==t?void 0:t[gn];if(null==r)return n;var i=bn(t,e);if(-1===i)return n;var o=r[i];return r.splice(i,1),o.wrappedFunction}(t,wn(e,n,r),i)}function On(){rt.wrapEventHandlers&&function(t){if(!t||"function"!=typeof t.prototype.addEventListener||"function"!=typeof t.prototype.removeEventListener)return;var e=t.prototype.addEventListener,n=t.prototype.removeEventListener;t.prototype.addEventListener=function(t,n,r){if("function"!=typeof n)return e.apply(this,arguments);for(var i=new Array(arguments.length),o=0;o<arguments.length;o++)i[o]=arguments[o];return i[1]=function(){try{return n.apply(this,arguments)}catch(t){throw reportError(t),fn(),t}},i[1]=En(this,i[1],t,n,r),e.apply(this,i)},t.prototype.removeEventListener=function(t,e,r){if("function"!=typeof e)return n.apply(this,arguments);for(var i=new Array(arguments.length),o=0;o<arguments.length;o++)i[o]=arguments[o];return i[1]=An(this,t,e,r,e),n.apply(this,i)}}(null==f?void 0:f.EventTarget)}function In(t){var e=null==f?void 0:f[t];"function"==typeof e&&(f[t]=function(t){for(var n=new Array(arguments.length),r=0;r<arguments.length;r++)n[r]=arguments[r];return n[0]=function(t){if("function"!=typeof t)return t;return function(){try{return t.apply(this,arguments)}catch(t){throw reportError(t),fn(),t}}}(t),e.apply(this,n)})}function Nn(){!function(){if(f){var t=f.onerror;f.onerror=function(e,n,r,i,o){if(ln)return ln=!1,"function"==typeof t?t.apply(this,arguments):void 0;var a=o&&o.stack;return a||(a="at "+n+" "+r,null!=i&&(a+=":"+i)),vn({message:String(e),stack:a}),"function"==typeof t?t.apply(this,arguments):void 0}}}(),"function"==typeof(null==f?void 0:f.addEventListener)&&f.addEventListener("unhandledrejection",yn),On(),function(){if(rt.wrapTimers){if(W)return void o("We discovered a usage of Zone.js. In order to avoid any incompatibility issues timer wrapping is not going to be enabled.");In("setTimeout"),In("setInterval")}}()}var Ln=["GET","HEAD","POST","PUT","DELETE","CONNECT","OPTIONS","TRACE","PATCH"];function Cn(t){return Ln.includes(t)}function _n(t,e){var n=0!==e.startTime;Rn(t,K.FETCH_START,e,n),Rn(t,K.DOMAIN_LOOKUP_START,e,n),Rn(t,K.DOMAIN_LOOKUP_END,e,n),Rn(t,K.CONNECT_START,e,n),Rn(t,K.SECURE_CONNECTION_START,e,n),Rn(t,K.CONNECT_END,e,n),Rn(t,K.REQUEST_START,e,n),Rn(t,K.RESPONSE_START,e,n),Rn(t,K.RESPONSE_END,e,n)}function Rn(t,e,n){var r,i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];!(e in n)||"number"!=typeof n[e]||i&&0===n[e]||Ze(t,e,(r=n[e],String(Math.round(1e6*(r+V())))))}function xn(t,e){var n=e.encodedBodySize;null!=n&&xe(t.attributes,"http.response.body.size",n)}function kn(t){return function(){var e=O(R().mark((function e(n,r){var i,o,a,s,c,l,f,d,v,p,h,m,y,g;return R().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=r?Object.assign({},r):r,s=null,null!==(i=a)&&void 0!==i&&i.body&&(s=a.body,a.body=void 0),c=new Request(n,a),s&&a&&(a.body=s),!on(l=c.url)){e.next=9;break}return u("Not creating span for fetch call because the url is ignored, URL: ".concat(l)),e.abrupt("return",t(n instanceof Request?c:n,r));case 9:return f=null!==(o=c.method)&&void 0!==o?o:"GET",d=Cn(f),v=Cn(f.toUpperCase()),p=v?f.toUpperCase():"_OTHER",Je((h=Ge("HTTP ".concat(p))).attributes,{url:l}),Pn(n,r),xe(h.attributes,"http.request.method",p),d||xe(h.attributes,"http.request.method_original",f),(tt(l)||nn(rt.propagateTraceHeadersCorsURLs,l))&&(null!==(m=a)&&void 0!==m&&m.headers?(a.headers=new Headers(a.headers),Me(a.headers.append,a.headers,h)):n instanceof Request?Me(c.headers.append,c.headers,h):(a||(a={}),a.headers=new Headers,Me(a.headers.append,a.headers,h))),jn(c.headers,h,(function(t){return e=t,"".concat("http.request.header",".").concat(e.toLowerCase());var e})),(y=Y({resourceMatcher:function(t){var e=t.initiatorType,n=t.name;return("fetch"===e||"xmlhttprequest"===e)&&n===J(l).href},maxWaitForResourceMillis:rt.maxWaitForResourceTimingsMillis,maxToleranceForResourceTimingsMillis:rt.maxToleranceForResourceTimingsMillis,onEnd:function(t){var e=t.duration,n=t.resource;n&&(_n(h,n),xn(h,n)),Le(Ke(h,void 0,1e6*e))}})).start(),e.prev=23,e.next=26,t(n instanceof Request?c:n,a);case 26:return g=e.sent,Dn(h,g),Mn(g).then((function(){return y.end()})).catch((function(t){y.cancel(),Un(h,t)})),e.abrupt("return",g);case 32:throw e.prev=32,e.t0=e.catch(23),y.cancel(),Un(h,e.t0),e.t0;case 37:case"end":return e.stop()}}),e,null,[[23,32]])})));return function(t,n){return e.apply(this,arguments)}}()}function Pn(t,e,n){try{return void 0}catch(n){u("failed to analyze request for GraphQL insights",n,t,e)}}function jn(t,e,n){try{t.forEach((function(t,r){rt.headersToCapture.some((function(t){return t.test(r)}))&&xe(e.attributes,n(r),t)}))}catch(t){u("unable to capture http headers due to CORS policy")}}function Dn(t,e){var n=e.status;!function(t,e,n){t.status={code:e,message:n}}(t,n>=200&&n<400?0:2),0===n&&xe(t.attributes,"error.type",e.type),xe(t.attributes,"http.response.status_code",String(n)),jn(e.headers,t,(function(t){return e=t,"".concat("http.response.header",".").concat(e.toLowerCase());var e}))}function Mn(t){return new Promise((function(e){var n=t.clone().body;if(!n)return e();var r=n.getReader(),i=function(){var t=O(R().mark((function t(){var n;return R().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,r.read();case 2:if(n=t.sent,!n.done){t.next=6;break}return t.abrupt("return",e());case 6:return t.abrupt("return",i());case 7:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();return i()}))}function Un(t,e){!function(t,e){var n=[];"string"==typeof e?xe(n,bt,e):e&&(e.code?xe(n,Tt,e.code.toString()):e.name&&xe(n,Tt,e.name),e.message&&xe(n,bt,e.message),e.stack&&xe(n,Et,e.stack),Ze(t,"exception",n))}(t,e),Le(Ke(t,function(t){return{code:2,message:t&&"object"===j(t)&&"message"in t?t.message:String(t)}}(e),void 0))}function Fn(t,e,n,r){var i,o,a=function(t){var e,n,r;return t&&null!==(e=null===(n=(r=rt.pageViewInstrumentation).generateMetadata)||void 0===n?void 0:n.call(r,t))&&void 0!==e?e:{}}(e),u=[];xe(u,ct,St.PAGE_VIEW),a.attributes&&Object.entries(a.attributes).forEach((function(t){var e=x(t,2),n=e[0],r=e[1];return xe(u,n,r)})),Je(u,{url:e});var s=[];xe(s,"title",null!==(i=null!==(o=a.title)&&void 0!==o?o:null==d?void 0:d.title)&&void 0!==i?i:X),null!=d&&d.referrer&&xe(s,"referrer",d.referrer),xe(s,"type",n?It:Ot),xe(s,"change_state",r?Lt:Nt);var c={timeUnixNano:t,attributes:u,severityNumber:At.INFO,severityText:"INFO",body:{kvlistValue:{values:s}}},l=De();l&&(c.traceId=l.traceId,c.spanId=l.spanId),Ne(c)}function Vn(){var t=null==f?void 0:f.performance.getEntriesByType("navigation")[0];if(t){var e=[];xe(e,ct,St.NAVIGATION_TIMING);var n=[];xe(n,"name",t.name),Bn(n,t,"responseStatus"),Bn(n,t,"fetchStart"),Bn(n,t,"requestStart"),Bn(n,t,"responseStart"),Bn(n,t,"domInteractive"),Bn(n,t,"domContentLoadedEventEnd"),Bn(n,t,"domComplete"),Bn(n,t,"loadEventEnd"),Bn(n,t,"transferSize"),Bn(n,t,"encodedBodySize"),Bn(n,t,"decodedBodySize");var r={timeUnixNano:Wn(),attributes:e,severityNumber:At.INFO,severityText:"INFO",body:{kvlistValue:{values:n}}};Je(r.attributes);var i=De();i&&(r.traceId=i.traceId,r.spanId=i.spanId),Ne(r)}else u("Navigation timings not available. Cannot emit navigation timing log")}function Bn(t,e,n){var r=e[n];"number"!=typeof r||isNaN(r)||xe(t,n,Number.isInteger(r)?r:$(r))}function Wn(){return F(Math.round(V()))}var Hn={},qn=!1,zn=!1;function Gn(){Zn(null==f?void 0:f.location.href)}function Kn(t){Zn(t.newURL)}function Zn(t,e){var n;if(t)try{var r=new URL(t,null==f?void 0:f.location.href);((n=r).pathname!==Hn.path||zn&&n.search!==Hn.search||qn&&n.hash!==Hn.hash)&&(Yn(r),Fn(U(),r,!0,Boolean(e)))}catch(t){u("Failed to handle url change",t)}}function Yn(t){Hn.path=t.pathname,Hn.search=t.search,Hn.hash=t.hash}function Qn(){!function(){try{Fn(Wn(),null!=f&&f.location.href?new URL(null==f?void 0:f.location.href):void 0)}catch(t){a("Failed to transmit initial page view event",t)}if("complete"===(null==d?void 0:d.readyState))return Vn();f&&E(f,"load",(function(){setTimeout(Vn,0)}))}(),function(){var t,e,n,r;if(f&&f.history){if(rt.pageViewInstrumentation.trackVirtualPageViews){zn=null!==(t=null===(e=rt.pageViewInstrumentation.includeParts)||void 0===e?void 0:e.includes("SEARCH"))&&void 0!==t&&t,qn=null!==(n=null===(r=rt.pageViewInstrumentation.includeParts)||void 0===r?void 0:r.includes("HASH"))&&void 0!==n&&n,nt(f.history,"replaceState",(function(t){return function(e,n,r){return Zn(r?String(r):void 0,!0),t.apply(this,[e,n,r])}})),nt(f.history,"pushState",(function(t){return function(e,n,r){return Zn(r?String(r):void 0),t.apply(this,[e,n,r])}})),f.addEventListener("hashchange",Kn),f.addEventListener("popstate",Gn);try{Yn(new URL(f.location.href))}catch(t){}}}else u("Browser does not support history API, skipping instrumentation")}()}var Xn=function(t){if("object"===j(t)&&null!==t){if("function"==typeof Object.getPrototypeOf){var e=Object.getPrototypeOf(t);return e===Object.prototype||null===e}return"[object Object]"===Object.prototype.toString.call(t)}return!1},$n=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return e.reduce((function(t,e){if(void 0===e)return t;if(Array.isArray(e))throw new TypeError("Arguments provided to ts-deepmerge must be objects, not arrays.");return Object.keys(e).forEach((function(n){["__proto__","constructor","prototype"].includes(n)||(Array.isArray(t[n])&&Array.isArray(e[n])?t[n]=$n.options.mergeArrays?$n.options.uniqueArrayItems?Array.from(new Set(t[n].concat(e[n]))):[].concat(k(t[n]),k(e[n])):e[n]:Xn(t[n])&&Xn(e[n])?t[n]=$n(t[n],e[n]):!Xn(t[n])&&Xn(e[n])?t[n]=$n(e[n],void 0):t[n]=void 0===e[n]?$n.options.allowUndefinedOverrides?e[n]:t[n]:e[n])})),t}),{})},Jn={allowUndefinedOverrides:!0,mergeArrays:!0,uniqueArrayItems:!0};$n.options=Jn,$n.withOptions=function(t){$n.options=Object.assign(Object.assign({},Jn),t);for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];var i=$n.apply(void 0,n);return $n.options=Jn,i};var tr=!1;function er(t){tr?u("Dash0 SDK is being reinitialized, skipping ..."):null!=f?"function"==typeof m&&h&&h.getEntriesByType?(rt.endpoints=t.endpoint instanceof Array?t.endpoint:[t.endpoint],0!==rt.endpoints.length?(Object.assign(rt,$n(rt,function(t,e){var n,r={},i=L(e);try{for(i.s();!(n=i.n()).done;){var o=n.value;o in t&&(r[o]=t[o])}}catch(t){i.e(t)}finally{i.f()}return r}(t,["ignoreUrls","ignoreErrorMessages","wrapEventHandlers","wrapTimers","propagateTraceHeadersCorsURLs","maxWaitForResourceTimingsMillis","maxToleranceForResourceTimingsMillis","headersToCapture","pageViewInstrumentation"]))),function(t){xe(rt.resource.attributes,it,t.serviceName),t.serviceVersion&&xe(rt.resource.attributes,ot,t.serviceVersion);var e=function(t){if(t.environment)return t.environment;try{var e;return null===(e=process)||void 0===e||null===(e=e.env)||void 0===e?void 0:e.NEXT_PUBLIC_VERCEL_ENV}catch(t){return}}(t);e&&xe(rt.resource.attributes,at,e);var n=function(t){if(t.deploymentName)return t.deploymentName;try{var e;return null===(e=process)||void 0===e||null===(e=e.env)||void 0===e?void 0:e.NEXT_PUBLIC_VERCEL_TARGET_ENV}catch(t){return}}(t);n&&xe(rt.resource.attributes,ut,n);var r=function(t){if(t.deploymentId)return t.deploymentId;try{var e;return null===(e=process)||void 0===e||null===(e=e.env)||void 0===e?void 0:e.NEXT_PUBLIC_VERCEL_BRANCH_URL}catch(t){return}}(t);r&&xe(rt.resource.attributes,st,r)}(t),function(t){var e;xe(rt.signalAttributes,ft,T(16)),xe(rt.signalAttributes,dt,null!==(e=null==v?void 0:v.userAgent)&&void 0!==e?e:X),t.additionalSignalAttributes&&Object.entries(t.additionalSignalAttributes).forEach((function(t){var e=x(t,2),n=e[0],r=e[1];xe(rt.signalAttributes,n,r)}))}(t),$e(),jt(t.sessionInactivityTimeoutMillis,t.sessionTerminationTimeoutMillis),Qn(),tn(),Nn(),f&&f.fetch&&f.Request?nt(f,"fetch",kn):u("Browser does not support the Fetch API, skipping instrumentation"),tr=!0):o("No telemetry endpoint configured. Aborting Dash0 Web SDK initialization process.")):u("Stopping Dash0 Web SDK initialization. This browser does not support the necessary APIs"):u("Looks like we are not running in a browser context. Stopping Dash0 Web SDK initialization.")}t.addSignalAttribute=function(t,e){xe(rt.signalAttributes,t,e)},t.debug=function(){u("Dash0 Web SDK configuration state:",rt)},t.identify=function(t,e){ke(rt.signalAttributes,vt),null!=t&&xe(rt.signalAttributes,vt,t),ke(rt.signalAttributes,pt),null!=(null==e?void 0:e.name)&&xe(rt.signalAttributes,pt,e.name),ke(rt.signalAttributes,ht),null!=(null==e?void 0:e.fullName)&&xe(rt.signalAttributes,ht,e.fullName),ke(rt.signalAttributes,mt),null!=(null==e?void 0:e.email)&&xe(rt.signalAttributes,mt,e.email),ke(rt.signalAttributes,yt),null!=(null==e?void 0:e.hash)&&xe(rt.signalAttributes,yt,e.hash),ke(rt.signalAttributes,gt),null!=(null==e?void 0:e.roles)&&xe(rt.signalAttributes,gt,e.roles)},t.init=function(t){u("".concat("Initializing Dash0 Web SDK"," (via package)")),er(t)},t.removeSignalAttribute=function(t){ke(rt.signalAttributes,t)},t.reportError=function(t,e){dn(t,e)},t.sendEvent=function(t,e){var n;if(Object.values(St).includes(t))o("Unable to send custom event ".concat(t,". You are not allowed to use an internal event name while sending a custom event. Dropping event..."));else{var r=[];Je(r),Object.entries(null!==(n=null==e?void 0:e.attributes)&&void 0!==n?n:{}).forEach((function(t){var e=x(t,2),n=e[0],i=e[1];return xe(r,n,i)})),xe(r,ct,t),null!=e&&e.title&&xe(r,"dash0.web.event.title",e.title),Ne({timeUnixNano:null!=(null==e?void 0:e.timestamp)?F(e.timestamp):U(),attributes:r,body:_e(null==e?void 0:e.data),severityText:null==e?void 0:e.severity,severityNumber:null!=e&&e.severity?At[e.severity]:void 0})}},t.setActiveLogLevel=function(t){var e;r=null!==(e=n[t])&&void 0!==e?e:n.warn},t.terminateSession=function(){if(w)try{!function(t){w&&y&&y.removeItem(t)}(Rt)}catch(t){i("Failed to terminate session",t)}}}));
|
|
1
|
+
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).dash0={})}(this,(function(t){"use strict";function e(){}var n={debug:0,info:1,warn:2,error:3},r=n.warn;var i=s("info"),o=s("warn"),a=s("error"),u=s("debug");function s(t){if("undefined"!=typeof console&&console[t]&&"function"==typeof console[t].apply){var i=n[t];return function(){i>=r&&console[t].apply(console,arguments)}}return e}var c=Object.prototype.hasOwnProperty;function l(t,e){return c.call(t,e)}var f="undefined"!=typeof window?window:void 0,d=null==f?void 0:f.document,v=null==f?void 0:f.navigator,p="undefined"!=typeof location?location:void 0,h=(null==f?void 0:f.performance)||(null==f?void 0:f.webkitPerformance)||(null==f?void 0:f.msPerformance)||(null==f?void 0:f.mozPerformance);null==f||f.encodeURIComponent;var y=null==f?void 0:f.fetch,m=function(){try{var t;return null!==(t=null==f?void 0:f.localStorage)&&void 0!==t?t:null}catch(t){return null}}(),g=function(){try{var t;return null!==(t=null==f?void 0:f.sessionStorage)&&void 0!==t?t:null}catch(t){return null}}(),b=Array(32);function T(t){for(var e=0;e<2*t;e++)b[e]=Math.floor(16*Math.random())+48,b[e]>=58&&(b[e]+=39);return String.fromCharCode.apply(null,b.slice(0,2*t))}function E(t,e,n){t.addEventListener?t.addEventListener(e,n,!1):t.attachEvent&&t.attachEvent("on"+e,n)}var w=null!=m&&"function"==typeof m.getItem&&"function"==typeof m.setItem;function S(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function A(t,e,n,r,i,o,a){try{var u=t[o](a),s=u.value}catch(t){return void n(t)}u.done?e(s):Promise.resolve(s).then(r,i)}function O(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){A(o,r,i,a,u,"next",t)}function u(t){A(o,r,i,a,u,"throw",t)}a(void 0)}))}}function I(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function N(t,e,n){return e&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,P(r.key),r)}}(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function L(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=D(t))||e){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){u=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw o}}}}function C(t,e,n){return(e=P(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function _(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function R(){R=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var o=e&&e.prototype instanceof m?e:m,a=Object.create(o.prototype),u=new _(r||[]);return i(a,"_invoke",{value:I(t,n,u)}),a}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var d="suspendedStart",v="suspendedYield",p="executing",h="completed",y={};function m(){}function g(){}function b(){}var T={};c(T,a,(function(){return this}));var E=Object.getPrototypeOf,w=E&&E(E(x([])));w&&w!==n&&r.call(w,a)&&(T=w);var S=b.prototype=m.prototype=Object.create(T);function A(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function n(i,o,a,u){var s=f(t[i],t,o);if("throw"!==s.type){var c=s.arg,l=c.value;return l&&"object"==typeof l&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(l).then((function(t){c.value=t,a(c)}),(function(t){return n("throw",t,a,u)}))}u(s.arg)}var o;i(this,"_invoke",{value:function(t,r){function i(){return new e((function(e,i){n(t,r,e,i)}))}return o=o?o.then(i,i):i()}})}function I(e,n,r){var i=d;return function(o,a){if(i===p)throw Error("Generator is already running");if(i===h){if("throw"===o)throw a;return{value:t,done:!0}}for(r.method=o,r.arg=a;;){var u=r.delegate;if(u){var s=N(u,r);if(s){if(s===y)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===d)throw i=h,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=p;var c=f(e,n,r);if("normal"===c.type){if(i=r.done?h:v,c.arg===y)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=h,r.method="throw",r.arg=c.arg)}}}function N(e,n){var r=n.method,i=e.iterator[r];if(i===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,N(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),y;var o=f(i,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,y;var a=o.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,y):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,y)}function L(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function _(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(L,this),this.reset(!0)}function x(e){if(e||""===e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function n(){for(;++i<e.length;)if(r.call(e,i))return n.value=e[i],n.done=!1,n;return n.value=t,n.done=!0,n};return o.next=o}}throw new TypeError(typeof e+" is not iterable")}return g.prototype=b,i(S,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:g,configurable:!0}),g.displayName=c(b,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,c(t,s,"GeneratorFunction")),t.prototype=Object.create(S),t},e.awrap=function(t){return{__await:t}},A(O.prototype),c(O.prototype,u,(function(){return this})),e.AsyncIterator=O,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var a=new O(l(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},A(S),c(S,s,"Generator"),c(S,a,(function(){return this})),c(S,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=x,_.prototype={constructor:_,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(C),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function i(r,i){return u.type="throw",u.arg=e,n.next=r,i&&(n.method="next",n.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(s&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,y):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),C(n),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;C(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:x(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),y}},e}function x(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,u=[],s=!0,c=!1;try{if(o=(n=n.call(t)).next,0===e);else for(;!(s=(r=o.call(n)).done)&&(u.push(r.value),u.length!==e);s=!0);}catch(t){c=!0,i=t}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return u}}(t,e)||D(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function k(t){return function(t){if(Array.isArray(t))return S(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||D(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function P(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}function j(t){return j="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},j(t)}function D(t,e){if(t){if("string"==typeof t)return S(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?S(t,e):void 0}}function M(){return(new Date).getTime()}function U(){var t=V();return t?String(1e6*(h.now()+t)):F(new Date)}function F(t){return"object"===j(t)?F(t.getTime()):String(t)+"000000"}function V(){var t,e=null==h?void 0:h.timeOrigin;"number"!=typeof e&&(e=null==h||null===(t=h.timing)||void 0===t?void 0:t.fetchStart);return e}var B={setTimeout:null==f?void 0:f.setTimeout,clearTimeout:null==f?void 0:f.clearTimeout,setInterval:null==f?void 0:f.setInterval,clearInterval:null==f?void 0:f.clearInterval},W=null!=f&&null!=f.Zone&&null!=f.Zone.root&&"function"==typeof f.Zone.root.run;function H(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return z.apply("setTimeout",arguments)}function q(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return z.apply("setInterval",arguments)}function z(){var t,e=this;if(W)try{var n=Array.prototype.slice.apply(arguments);return f.Zone.root.run(B[e],f,n)}catch(t){o("Failed to execute %s inside of zone (via Zone.js). Falling back to execution inside currently active zone.",e,t)}return null===(t=B[e])||void 0===t?void 0:t.apply(f,arguments)}W&&u("Discovered Zone.js globals. Will attempt to register all timers inside the root Zone.");h&&h.getEntriesByType;var G=h&&"function"==typeof f.PerformanceObserver&&"function"==typeof h.now,K=Object.freeze({CONNECT_END:"connectEnd",CONNECT_START:"connectStart",DECODED_BODY_SIZE:"decodedBodySize",DOM_COMPLETE:"domComplete",DOM_CONTENT_LOADED_EVENT_END:"domContentLoadedEventEnd",DOM_CONTENT_LOADED_EVENT_START:"domContentLoadedEventStart",DOM_INTERACTIVE:"domInteractive",DOMAIN_LOOKUP_END:"domainLookupEnd",DOMAIN_LOOKUP_START:"domainLookupStart",ENCODED_BODY_SIZE:"encodedBodySize",FETCH_START:"fetchStart",LOAD_EVENT_END:"loadEventEnd",LOAD_EVENT_START:"loadEventStart",NAVIGATION_START:"navigationStart",REDIRECT_END:"redirectEnd",REDIRECT_START:"redirectStart",REQUEST_START:"requestStart",RESPONSE_END:"responseEnd",RESPONSE_START:"responseStart",SECURE_CONNECTION_START:"secureConnectionStart",START_TIME:"startTime",UNLOAD_EVENT_END:"unloadEventEnd",UNLOAD_EVENT_START:"unloadEventStart"}),Z=new WeakSet;function Y(t){if(!G)return function(t){var n=0;return{start:function(){n=M()},end:function(){return t({duration:M()-n})},cancel:e}}(t.onEnd);var n,r,i,o,a,u=[];return{start:function(){n=h.now();try{var t,e=null==f?void 0:f.PerformanceObserver;if(e)null===(t=i=new e(c))||void 0===t||t.observe({type:"resource"})}catch(t){}a=H(v,6e5)},end:function(){if(r=h.now(),p(),!Q())return s();H((function(){return s()}),Math.min(300,t.maxWaitForResourceMillis)),E(d,"visibilitychange",l),o=H(s,t.maxWaitForResourceMillis)},cancel:v};function s(){v();var e=function(){if(!u.length)return;var e,i,o=u.filter((function(e){return e.responseEnd<=r+t.maxToleranceForResourceTimingsMillis&&!Z.has(e)}));if(!o.length)return;1===o.length&&(e=o[0]);if(!e){var a,s=L(o);try{for(s.s();!(a=s.n()).done;){var c=a.value,l=Math.abs(r-n-c.duration)+Math.abs(c.responseEnd-r);(void 0===i||l<i)&&(i=l,e=c)}}catch(t){s.e(t)}finally{s.f()}}if(!e)return;return Z.add(e),e}();null!=e&&e.duration&&e.duration<864e5?t.onEnd({resource:e,duration:e.duration}):t.onEnd({resource:e,duration:r-n})}function c(e){e.getEntriesByType("resource").filter((function(e){var r=e;return r.startTime>=n&&t.resourceMatcher(r)})).forEach((function(t){return u.push(t)}))}function l(){Q()||s()}function v(){!function(){if(i){try{var t;null===(t=i)||void 0===t||t.disconnect()}catch(t){}i=void 0}}(),o&&(clearTimeout(o),o=void 0),p(),function(){if(!d)return;t=d,e="visibilitychange",n=l,t.removeEventListener?t.removeEventListener(e,n,!1):t.detachEvent&&t.detachEvent("on"+e,n);var t,e,n}()}function p(){a&&(clearTimeout(a),a=void 0)}}function Q(){return"visible"===(null==d?void 0:d.visibilityState)||"prerender"===(null==d?void 0:d.visibilityState)}var X="undefined";function $(t){return Math.round(100*t)/100}function J(t){var e;return"string"!=typeof t?t:new URL(t,null!==(e=null==d?void 0:d.baseURI)&&void 0!==e?e:null==p?void 0:p.href)}function tt(t){try{return J(t).origin===("undefined"!=typeof location?location.origin:void 0)}catch(t){return!1}}var et=Symbol.for("INSTRUMENTED_BY_DASH0");function nt(t,e,n){var r=t[e];r?(!0===r[et]&&u("".concat(String(e)," has already been instrumented, skipping")),function(t){t[et]=!0}(r),t[e]=n(r)):u("".concat(String(e)," is not defined, unable to instrument"))}var rt={endpoints:[],resource:{attributes:[]},scope:{name:"dash0-web-sdk",version:"0.13.4",attributes:[]},signalAttributes:[],ignoreUrls:[],ignoreErrorMessages:[],wrapEventHandlers:!0,wrapTimers:!0,propagateTraceHeadersCorsURLs:[],maxWaitForResourceTimingsMillis:1e4,maxToleranceForResourceTimingsMillis:50,headersToCapture:[],pageViewInstrumentation:{trackVirtualPageViews:!0,includeParts:[]}},it="service.name",ot="service.version",at="deployment.environment.name",ut="deployment.name",st="deployment.id",ct="event.name",lt="dash0.web.event.id",ft="page.load.id",dt="user_agent.original",vt="user.id",pt="user.name",ht="user.full_name",yt="user.email",mt="user.hash",gt="user.roles",bt="exception.message",Tt="exception.type",Et="exception.stacktrace",wt="url.full",St={PAGE_VIEW:"browser.page_view",NAVIGATION_TIMING:"browser.navigation_timing",WEB_VITAL:"browser.web_vital",ERROR:"browser.error"},At={UNSPECIFIED:0,TRACE:1,DEBUG:5,INFO:9,WARN:13,ERROR:17,FATAL:21},Ot=0,It=1,Nt="pushState",Lt="replaceState",Ct=1;function _t(){var t,e;return"".concat((t={ephemeralSession:!w},e=0,t.ephemeralSession&&(e|=Ct),e.toString(16).padStart(2,"0"))).concat(T(7))}var Rt="d0_session",xt="#",kt=864e5,Pt=null;function jt(t,e){if(!w)return u("Storage API is not available and session tracking is therefore not supported."),void(Pt=_t());t||(t=108e5),e||(e=216e5),t=Math.min(t,kt),e=Math.min(e,kt);try{var n=function(t){return w&&m?m.getItem(t):null}(Rt),r=function(t){if(!t)return null;var e=t.split(xt);if(e.length<3)return null;var n=e[0],r=parseInt(e[1],10),i=parseInt(e[2],10);if(!n||isNaN(r)||isNaN(i))return null;return{id:n,startTime:r,lastActivityTime:i}}(n);r&&!function(t,e,n){var r=M()-e;if(t.lastActivityTime<r)return!1;var i=M()-n;return t.startTime>=i}(r,t,e)&&(r=null),r?r.lastActivityTime=M():r={id:_t(),startTime:M(),lastActivityTime:M()},function(t,e){w&&m&&m.setItem(t,e)}(Rt,function(t){return t.id+xt+t.startTime+xt+t.lastActivityTime}(r)),Pt=r.id}catch(t){o("Failed to record session information",t)}}var Dt=-1,Mt=function(t){addEventListener("pageshow",(function(e){e.persisted&&(Dt=e.timeStamp,t(e))}),!0)},Ut=function(t,e,n,r){var i,o;return function(a){e.value>=0&&(a||r)&&(((o=e.value-(null!=i?i:0))||void 0===i)&&(i=e.value,e.delta=o,e.rating=function(t,e){return t>e[1]?"poor":t>e[0]?"needs-improvement":"good"}(e.value,n),t(e)))}},Ft=function(t){requestAnimationFrame((function(){return requestAnimationFrame((function(){return t()}))}))},Vt=function(){var t=performance.getEntriesByType("navigation")[0];if(t&&t.responseStart>0&&t.responseStart<performance.now())return t},Bt=function(){var t,e=Vt();return null!==(t=null==e?void 0:e.activationStart)&&void 0!==t?t:0},Wt=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1,n=Vt(),r="navigate";return Dt>=0?r="back-forward-cache":n&&(document.prerendering||Bt()>0?r="prerender":document.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:t,value:e,rating:"good",delta:0,entries:[],id:"v5-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:r}},Ht=new WeakMap;function qt(t,e){return Ht.get(t)||Ht.set(t,new e),Ht.get(t)}var zt,Gt=function(){return N((function t(){I(this,t),C(this,"t",void 0),C(this,"i",0),C(this,"o",[])}),[{key:"h",value:function(t){var e;if(!t.hadRecentInput){var n=this.o[0],r=this.o.at(-1);this.i&&n&&r&&t.startTime-r.startTime<1e3&&t.startTime-n.startTime<5e3?(this.i+=t.value,this.o.push(t)):(this.i=t.value,this.o=[t]),null===(e=this.t)||void 0===e||e.call(this,t)}}}])}(),Kt=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};try{if(PerformanceObserver.supportedEntryTypes.includes(t)){var r=new PerformanceObserver((function(t){Promise.resolve().then((function(){e(t.getEntries())}))}));return r.observe(function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?_(Object(n),!0).forEach((function(e){C(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):_(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({type:t,buffered:!0},n)),r}}catch(t){}},Zt=function(t){var e=!1;return function(){e||(t(),e=!0)}},Yt=-1,Qt=function(){return"hidden"!==document.visibilityState||document.prerendering?1/0:0},Xt=function(t){"hidden"===document.visibilityState&&Yt>-1&&(Yt="visibilitychange"===t.type?t.timeStamp:0,Jt())},$t=function(){addEventListener("visibilitychange",Xt,!0),addEventListener("prerenderingchange",Xt,!0)},Jt=function(){removeEventListener("visibilitychange",Xt,!0),removeEventListener("prerenderingchange",Xt,!0)},te=function(){if(Yt<0){var t,e=Bt(),n=document.prerendering||null===(t=globalThis.performance.getEntriesByType("visibility-state").filter((function(t){return"hidden"===t.name&&t.startTime>e}))[0])||void 0===t?void 0:t.startTime;Yt=null!=n?n:Qt(),$t(),Mt((function(){setTimeout((function(){Yt=Qt(),$t()}))}))}return{get firstHiddenTime(){return Yt}}},ee=function(t){document.prerendering?addEventListener("prerenderingchange",(function(){return t()}),!0):t()},ne=[1800,3e3],re=[.1,.25],ie=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};ee((function(){var n,r=te(),i=Wt("FCP"),o=Kt("paint",(function(t){var e,a=L(t);try{for(a.s();!(e=a.n()).done;){var u=e.value;"first-contentful-paint"===u.name&&(o.disconnect(),u.startTime<r.firstHiddenTime&&(i.value=Math.max(u.startTime-Bt(),0),i.entries.push(u),n(!0)))}}catch(t){a.e(t)}finally{a.f()}}));o&&(n=Ut(t,i,ne,e.reportAllChanges),Mt((function(r){i=Wt("FCP"),n=Ut(t,i,ne,e.reportAllChanges),Ft((function(){i.value=performance.now()-r.timeStamp,n(!0)}))})))}))}(Zt((function(){var n,r=Wt("CLS",0),i=qt(e,Gt),o=function(t){var e,o=L(t);try{for(o.s();!(e=o.n()).done;){var a=e.value;i.h(a)}}catch(t){o.e(t)}finally{o.f()}i.i>r.value&&(r.value=i.i,r.entries=i.o,n())},a=Kt("layout-shift",o);a&&(n=Ut(t,r,re,e.reportAllChanges),document.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&(o(a.takeRecords()),n(!0))})),Mt((function(){i.i=0,r=Wt("CLS",0),n=Ut(t,r,re,e.reportAllChanges),Ft((function(){return n()}))})),setTimeout(n))})))},oe=0,ae=1/0,ue=0,se=function(t){var e,n=L(t);try{for(n.s();!(e=n.n()).done;){var r=e.value;r.interactionId&&(ae=Math.min(ae,r.interactionId),ue=Math.max(ue,r.interactionId),oe=ue?(ue-ae)/7+1:0)}}catch(t){n.e(t)}finally{n.f()}},ce=function(){var t;return zt?oe:null!==(t=performance.interactionCount)&&void 0!==t?t:0},le=0,fe=function(){return N((function t(){I(this,t),C(this,"u",[]),C(this,"l",new Map),C(this,"m",void 0),C(this,"v",void 0)}),[{key:"p",value:function(){le=ce(),this.u.length=0,this.l.clear()}},{key:"P",value:function(){var t=Math.min(this.u.length-1,Math.floor((ce()-le)/50));return this.u[t]}},{key:"h",value:function(t){var e;if(null!==(e=this.m)&&void 0!==e&&e.call(this,t),t.interactionId||"first-input"===t.entryType){var n=this.u.at(-1),r=this.l.get(t.interactionId);if(r||this.u.length<10||t.duration>n.T){var i;if(r?t.duration>r.T?(r.entries=[t],r.T=t.duration):t.duration===r.T&&t.startTime===r.entries[0].startTime&&r.entries.push(t):(r={id:t.interactionId,entries:[t],T:t.duration},this.l.set(r.id,r),this.u.push(r)),this.u.sort((function(t,e){return e.T-t.T})),this.u.length>10){var o,a=L(this.u.splice(10));try{for(a.s();!(o=a.n()).done;){var u=o.value;this.l.delete(u.id)}}catch(t){a.e(t)}finally{a.f()}}null===(i=this.v)||void 0===i||i.call(this,r)}}}}])}(),de=function(t){var e=globalThis.requestIdleCallback||setTimeout;"hidden"===document.visibilityState?t():(t=Zt(t),document.addEventListener("visibilitychange",t,{once:!0}),e((function(){t(),document.removeEventListener("visibilitychange",t)})))},ve=[200,500],pe=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};globalThis.PerformanceEventTiming&&"interactionId"in PerformanceEventTiming.prototype&&ee((function(){var n;"interactionCount"in performance||zt||(zt=Kt("event",se,{type:"event",buffered:!0,durationThreshold:0}));var r,i=Wt("INP"),o=qt(e,fe),a=function(t){de((function(){var e,n=L(t);try{for(n.s();!(e=n.n()).done;){var a=e.value;o.h(a)}}catch(t){n.e(t)}finally{n.f()}var u=o.P();u&&u.T!==i.value&&(i.value=u.T,i.entries=u.entries,r())}))},u=Kt("event",a,{durationThreshold:null!==(n=e.durationThreshold)&&void 0!==n?n:40});r=Ut(t,i,ve,e.reportAllChanges),u&&(u.observe({type:"first-input",buffered:!0}),document.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&(a(u.takeRecords()),r(!0))})),Mt((function(){o.p(),i=Wt("INP"),r=Ut(t,i,ve,e.reportAllChanges)})))}))},he=function(){return N((function t(){I(this,t),C(this,"m",void 0)}),[{key:"h",value:function(t){var e;null===(e=this.m)||void 0===e||e.call(this,t)}}])}(),ye=[2500,4e3],me=!1;function ge(t){var e,n,r=[];return n=i,me&&n(),d&&f&&(E(d,"visibilitychange",(function(){"visible"!==d.visibilityState&&n()})),E(f,"pagehide",(function(){me=!0,n()})),E(f,"beforeunload",(function(){me=!0,n()}))),{send:function(n){"visible"===(null==d?void 0:d.visibilityState)?(r.push(n),r.length>=15?i():null==e&&(e=H(i,1e3))):t([n])}};function i(){null!=e&&(clearTimeout(e),e=null),r.length>0&&(t(r.slice()),r.length=0)}}function be(t,e){return Te.apply(this,arguments)}function Te(){return Te=O(R().mark((function t(n,r){var i,a,s,c;return R().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(u("Transmitting telemetry to endpoints",r),i=JSON.stringify(r),a=i,s=i.length,c=!1,"undefined"==typeof CompressionStream){t.next=11;break}return t.next=8,Ee(i);case 8:a=t.sent,s=a.byteLength,c=!0;case 11:return t.next=13,Promise.all(rt.endpoints.map(function(){var t=O(R().mark((function t(r){var i,u,l;return R().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,(i=new URL(r.url)).pathname=i.pathname+(i.pathname.endsWith("/")?n.substring(1):n),u={"Content-Type":"application/json",Authorization:"Bearer ".concat(r.authToken)},r.dataset&&(u["Dash0-Dataset"]=r.dataset),c&&(u["Content-Encoding"]="gzip"),y){t.next=9;break}return o("Unable to send telemetry, fetch is not defined"),t.abrupt("return");case 9:return t.next=11,y(i,{method:"POST",headers:u,body:a,keepalive:s<=6e4});case 11:(l=t.sent).text().catch(e),l.ok||o("Failed to send telemetry to ".concat(i,": ").concat(l.status," ").concat(l.statusText)),t.next=19;break;case 16:t.prev=16,t.t0=t.catch(0),o("Error sending telemetry to ".concat(r.url).concat(n,":"),t.t0);case 19:case"end":return t.stop()}}),t,null,[[0,16]])})));return function(e){return t.apply(this,arguments)}}()));case 13:case"end":return t.stop()}}),t)}))),Te.apply(this,arguments)}function Ee(t){return we.apply(this,arguments)}function we(){return(we=O(R().mark((function t(e){var n,r,i;return R().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=new Blob([e]),r=n.stream(),i=r.pipeThrough(new CompressionStream("gzip")),t.abrupt("return",new Response(i).arrayBuffer());case 4:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var Se,Ae=ge((function(t){be("/v1/logs",{resourceLogs:[{resource:rt.resource,scopeLogs:[{scope:rt.scope,logRecords:t}]}]}).catch((function(t){a("Failed to transmit logs",t)}))})),Oe=ge((function(t){be("/v1/traces",{resourceSpans:[{resource:rt.resource,scopeSpans:[{scope:rt.scope,spans:t}]}]}).catch((function(t){a("Failed to transmit spans",t)}))}));function Ie(){var t,e,n,r,i,o,a;return Se||(e=(t={maxCalls:8096,maxCallsPerTenMinutes:4096,maxCallsPerTenSeconds:128}).maxCalls,n=t.maxCallsPerTenMinutes,r=t.maxCallsPerTenSeconds,i=0,o=0,a=0,q((function(){o=0}),6e5),q((function(){a=0}),1e4),Se=function(){return++i>e||++o>n||++a>r}),Se()}function Ne(t){Ie()?u("Transport rate limit. Will not send item.",t):Ae.send(t)}function Le(t){Ie()?u("Transport rate limit. Will not send item.",t):Oe.send(t)}var Ce=["stringValue","boolValue","intValue","doubleValue","arrayValue","kvlistValue","bytesValue"];function _e(t){if(null!=t){var e={};return Array.isArray(t)?e.arrayValue={values:t.map((function(t){return _e(t)}))}:"string"==typeof t?e.stringValue=t:"number"==typeof t?e.doubleValue=t:"boolean"==typeof t?e.boolValue=t:!function(t){if(null==t||"object"!==j(t))return!1;var e=Object.keys(t);return 1===e.length&&Ce.includes(e[0])}(t)?"object"===j(t)&&(e.kvlistValue={values:Object.entries(t).map((function(t){var e=x(t,2);return Re(e[0],e[1])}))}):e=t,e}}function Re(t,e){return{key:t,value:_e(e)}}function xe(t,e,n){e&&t.push(Re(e,n))}function ke(t,e){var n=t.findIndex((function(t){return t.key===e}));-1!==n&&t.splice(n,1)}var Pe="traceparent",je=/^00-([a-f0-9]{32})-([a-f0-9]{16})-[0-9]{1,2}$/;function De(){var t,e,n=((null===(t=Array.from(null!==(e=null==d?void 0:d.getElementsByTagName("meta"))&&void 0!==e?e:[]).find((function(t){var e;return(null===(e=t.getAttribute("name"))||void 0===e?void 0:e.toLowerCase())===Pe})))||void 0===t?void 0:t.content.trim())||"").match(je)||function(){var t=h.getEntriesByType("navigation")[0];if(!t)return"";if(!t.serverTiming)return"";return function(t){var e,n=L(t);try{for(n.s();!(e=n.n()).done;){var r=e.value;if(r.name===Pe)return r.description.trim()}}catch(t){n.e(t)}finally{n.f()}return""}(t.serverTiming)}().match(je);if(n)return{traceId:n[1],spanId:n[2]}}function Me(t,e,n){t.call(e,"traceparent","00-".concat(n.traceId,"-").concat(n.spanId,"-01"))}var Ue="d042",Fe=1;function Ve(t){var e=0;return t.withoutSession&&(e|=Fe),e.toString(16).padStart(2,"0")}for(var Be=new Uint32Array(256),We=0;We<256;We++){for(var He=We,qe=0;qe<8;qe++)He=1&He?3988292384^He>>>1:He>>>1;Be[We]=He>>>0}function ze(t){var e=function(t){for(var e=new Uint8Array(t.length/2),n=0;n<t.length;n+=2)e[n/2]=parseInt(t.substring(n,n+2),16);for(var r=4294967295,i=0;i<e.length;i++){var o=e[i];r=r>>>8^Be[255&(r^o)]}return(4294967295^r)>>>0}(t).toString(16).padStart(8,"0");return"".concat(e).concat(T(4))}function Ge(t){var e=function(t){return t?"".concat(Ue).concat(Ve({withoutSession:!1})).concat(t).concat(T(5)):"".concat(Ue).concat(Ve({withoutSession:!0})).concat(T(13))}(Pt),n=ze(e),r=[];return xe(r,lt,n),{traceId:e,spanId:n,name:t,kind:3,startTimeUnixNano:U(),attributes:r,events:[],links:[],status:{code:0}}}function Ke(t,e,n){var r=t;return e&&(r.status=e),r.endTimeUnixNano=null!=n?String(Math.round(parseInt(r.startTimeUnixNano)+n)):U(),r}function Ze(t,e,n,r){var i=void 0,o=void 0;"string"==typeof n?i=n:Array.isArray(n)&&(o=n),t.events.push({name:e,timeUnixNano:null!=i?i:U(),attributes:null!=o?o:[]})}function Ye(t,e,n){var r=function(t){return t?Array.isArray(t)?function(e){return[].concat(k(t),[e]).join(".")}:function(e){return"".concat(t,".").concat(e)}:function(t){return t}}(n);try{var i=J(e);i.username&&(i.username="REDACTED"),i.password&&(i.password="REDACTED"),xe(t,r(wt),i.href),xe(t,r("url.path"),i.pathname),xe(t,r("url.domain"),i.hostname),xe(t,r("url.scheme"),i.protocol.replace(":","")),i.hash&&xe(t,r("url.fragment"),i.hash.replace("#","")),i.search&&xe(t,r("url.query"),i.search.replace("?",""))}catch(n){xe(t,r(wt),String(e))}}var Qe=null!=g&&"function"==typeof g.getItem&&"function"==typeof g.setItem;var Xe="d0_tab",$e=null;function Je(){if(Qe)try{var t=function(t){return Qe&&g?g.getItem(t):null}(Xe);if(t)return void($e=t);$e=T(8),function(t,e){Qe&&g&&g.setItem(t,e)}(Xe,$e)}catch(t){o("Failed to record tab ID information",t)}else u("Storage API is not available and tab tracking is therefore not supported.")}function tn(t,e){var n,r,i,o,a;void 0===t.find((function(t){return t.key===lt}))&&xe(t,lt,T(8));for(var u=0;u<rt.signalAttributes.length;u++)t.push(rt.signalAttributes[u]);Ye(t,null!==(n=null!==(r=null==e?void 0:e.url)&&void 0!==r?r:null==f?void 0:f.location.href)&&void 0!==n?n:X,"page"),Pt&&xe(t,"session.id",Pt),$e&&xe(t,"browser.tab.id",$e),xe(t,"browser.window.width",null!==(i=null==f?void 0:f.innerWidth)&&void 0!==i?i:X),xe(t,"browser.window.height",null!==(o=null==f?void 0:f.innerHeight)&&void 0!==o?o:X);var s=null==v||null===(a=v.connection)||void 0===a?void 0:a.effectiveType;s&&xe(t,"network.connection.subtype",s)}function en(){!function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};ee((function(){var n,r=te(),i=Wt("LCP"),o=qt(e,he),a=function(t){e.reportAllChanges||(t=t.slice(-1));var a,u=L(t);try{for(u.s();!(a=u.n()).done;){var s=a.value;o.h(s),s.startTime<r.firstHiddenTime&&(i.value=Math.max(s.startTime-Bt(),0),i.entries=[s],n())}}catch(t){u.e(t)}finally{u.f()}},u=Kt("largest-contentful-paint",a);if(u){n=Ut(t,i,ye,e.reportAllChanges);for(var s=Zt((function(){a(u.takeRecords()),u.disconnect(),n(!0)})),c=0,l=["keydown","click","visibilitychange"];c<l.length;c++)addEventListener(l[c],(function(){return de(s)}),{capture:!0,once:!0});Mt((function(r){i=Wt("LCP"),n=Ut(t,i,ye,e.reportAllChanges),Ft((function(){i.value=performance.now()-r.timeStamp,n(!0)}))}))}}))}(nn,{reportAllChanges:!0}),pe(nn,{reportAllChanges:!0}),ie(nn,{reportAllChanges:!0})}function nn(t){var e=[];xe(e,ct,St.WEB_VITAL);var n=[];xe(n,"name",t.name),xe(n,"value",$(t.value)),xe(n,"delta",$(t.delta));var r={timeUnixNano:U(),attributes:e,severityNumber:At.INFO,severityText:"INFO",body:{kvlistValue:{values:n}}};tn(r.attributes),Ne(r)}function rn(t,e){for(var n=0,r=t.length;n<r;n++)if(t[n].test(e))return!0;return!1}var on="data:";function an(t){return!t||(!(t=String(t))||(null==t.substring||t.substring(0,5).toLowerCase()===on||(!!function(t){for(var e=t.toLowerCase(),n=0,r=rt.endpoints.length;n<r;n++){var i=rt.endpoints[n];if(e.startsWith(i.url))return!0}return!1}(t)||rn(rt.ignoreUrls,t))))}var un,sn=0,cn=0,ln={},fn=!1;function dn(){fn=!0}function vn(t,e){t&&pn("string"==typeof t?{message:t,opts:e}:{message:t.message,type:t.name,stack:t.stack,opts:e})}function pn(t){var e=t.message,n=t.type,r=t.stack,i=t.opts;if(e&&!(sn>100)&&!function(t){return!t||rn(rt.ignoreErrorMessages,t)}(e)){cn>=20&&(ln={},cn=0);var o=(e=String(e).substring(0,300))+(r=function(t){return String(t||"").split("\n").slice(0,30).join("\n")}(r))+(null==f?void 0:f.location.href),a=ln[o];if(a)a.seenCount++;else{var u=[];xe(u,ct,St.ERROR),xe(u,bt,e),n&&xe(u,Tt,n),r&&xe(u,Et,r),null!=i&&i.componentStack&&xe(u,"exception.component_stack",null==i?void 0:i.componentStack.substring(0,2048)),tn(u),a={seenCount:1,transmittedCount:0,log:{timeUnixNano:U(),attributes:u,severityNumber:At.ERROR,severityText:"ERROR",body:{stringValue:e}}},ln[o]=a,cn++}!function(){if(un)return;un=setTimeout(hn,1e3)}()}}function hn(){for(var t in un&&(clearTimeout(un),un=null),ln)if(l(ln,t)){var e=ln[t];e.seenCount>e.transmittedCount&&(Ne(e.log),sn++)}ln={},cn=0}var yn="Unhandled promise rejection: ",mn="<unavailable because Promise wasn't rejected with an Error object>";function gn(t){null==t.reason?vn({message:yn+"<no reason defined>",stack:mn}):"string"==typeof t.reason.message?vn({message:yn+t.reason.message,stack:"string"==typeof t.reason.stack?t.reason.stack:mn}):"object"!==j(t.reason)&&vn({message:yn+t.reason,stack:mn})}var bn="__dash0OriginalFunctions";function Tn(t,e){for(var n=t[bn],r=0;r<n.length;r++){if(En(n[r].valuesForEqualityCheck,e))return r}return-1}function En(t,e){if(t.length!==e.length)return!1;for(var n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}function wn(t,e,n,r,i){return function(t,e,n){if(!t)return e;var r=t[bn]=t[bn]||[],i=Tn(t,n);return-1!==i?r[i].wrappedFunction:(r.push({wrappedFunction:e,valuesForEqualityCheck:n}),e)}(t,e,Sn(n,r,i))}function Sn(t,e,n){return[t,e,An(n)]}function An(t){return null!=t&&("object"===j(t)?Boolean(t.capture):Boolean(t))}function On(t,e,n,r,i){return function(t,e,n){var r=null==t?void 0:t[bn];if(null==r)return n;var i=Tn(t,e);if(-1===i)return n;var o=r[i];return r.splice(i,1),o.wrappedFunction}(t,Sn(e,n,r),i)}function In(){rt.wrapEventHandlers&&function(t){if(!t||"function"!=typeof t.prototype.addEventListener||"function"!=typeof t.prototype.removeEventListener)return;var e=t.prototype.addEventListener,n=t.prototype.removeEventListener;t.prototype.addEventListener=function(t,n,r){if("function"!=typeof n)return e.apply(this,arguments);for(var i=new Array(arguments.length),o=0;o<arguments.length;o++)i[o]=arguments[o];return i[1]=function(){try{return n.apply(this,arguments)}catch(t){throw reportError(t),dn(),t}},i[1]=wn(this,i[1],t,n,r),e.apply(this,i)},t.prototype.removeEventListener=function(t,e,r){if("function"!=typeof e)return n.apply(this,arguments);for(var i=new Array(arguments.length),o=0;o<arguments.length;o++)i[o]=arguments[o];return i[1]=On(this,t,e,r,e),n.apply(this,i)}}(null==f?void 0:f.EventTarget)}function Nn(t){var e=null==f?void 0:f[t];"function"==typeof e&&(f[t]=function(t){for(var n=new Array(arguments.length),r=0;r<arguments.length;r++)n[r]=arguments[r];return n[0]=function(t){if("function"!=typeof t)return t;return function(){try{return t.apply(this,arguments)}catch(t){throw reportError(t),dn(),t}}}(t),e.apply(this,n)})}function Ln(){!function(){if(f){var t=f.onerror;f.onerror=function(e,n,r,i,o){if(fn)return fn=!1,"function"==typeof t?t.apply(this,arguments):void 0;var a=o&&o.stack;return a||(a="at "+n+" "+r,null!=i&&(a+=":"+i)),pn({message:String(e),stack:a}),"function"==typeof t?t.apply(this,arguments):void 0}}}(),"function"==typeof(null==f?void 0:f.addEventListener)&&f.addEventListener("unhandledrejection",gn),In(),function(){if(rt.wrapTimers){if(W)return void o("We discovered a usage of Zone.js. In order to avoid any incompatibility issues timer wrapping is not going to be enabled.");Nn("setTimeout"),Nn("setInterval")}}()}var Cn=["GET","HEAD","POST","PUT","DELETE","CONNECT","OPTIONS","TRACE","PATCH"];function _n(t){return Cn.includes(t)}function Rn(t,e){var n=0!==e.startTime;xn(t,K.FETCH_START,e,n),xn(t,K.DOMAIN_LOOKUP_START,e,n),xn(t,K.DOMAIN_LOOKUP_END,e,n),xn(t,K.CONNECT_START,e,n),xn(t,K.SECURE_CONNECTION_START,e,n),xn(t,K.CONNECT_END,e,n),xn(t,K.REQUEST_START,e,n),xn(t,K.RESPONSE_START,e,n),xn(t,K.RESPONSE_END,e,n)}function xn(t,e,n){var r,i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];!(e in n)||"number"!=typeof n[e]||i&&0===n[e]||Ze(t,e,(r=n[e],String(Math.round(1e6*(r+V())))))}function kn(t,e){var n=e.encodedBodySize;null!=n&&xe(t.attributes,"http.response.body.size",n)}function Pn(t){return function(){var e=O(R().mark((function e(n,r){var i,o,a,s,c,l,f,d,v,p,h,y,m,g;return R().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=r?Object.assign({},r):r,s=null,null!==(i=a)&&void 0!==i&&i.body&&(s=a.body,a.body=void 0),c=new Request(n,a),s&&a&&(a.body=s),!an(l=c.url)){e.next=9;break}return u("Not creating span for fetch call because the url is ignored, URL: ".concat(l)),e.abrupt("return",t(n instanceof Request?c:n,r));case 9:return f=null!==(o=c.method)&&void 0!==o?o:"GET",d=_n(f),v=_n(f.toUpperCase()),p=v?f.toUpperCase():"_OTHER",tn((h=Ge("HTTP ".concat(p))).attributes),Ye(h.attributes,l),jn(n,r),xe(h.attributes,"http.request.method",p),d||xe(h.attributes,"http.request.method_original",f),(tt(l)||rn(rt.propagateTraceHeadersCorsURLs,l))&&(null!==(y=a)&&void 0!==y&&y.headers?(a.headers=new Headers(a.headers),Me(a.headers.append,a.headers,h)):n instanceof Request?Me(c.headers.append,c.headers,h):(a||(a={}),a.headers=new Headers,Me(a.headers.append,a.headers,h))),Dn(c.headers,h,(function(t){return e=t,"".concat("http.request.header",".").concat(e.toLowerCase());var e})),(m=Y({resourceMatcher:function(t){var e=t.initiatorType,n=t.name;return("fetch"===e||"xmlhttprequest"===e)&&n===J(l).href},maxWaitForResourceMillis:rt.maxWaitForResourceTimingsMillis,maxToleranceForResourceTimingsMillis:rt.maxToleranceForResourceTimingsMillis,onEnd:function(t){var e=t.duration,n=t.resource;n&&(Rn(h,n),kn(h,n)),Le(Ke(h,void 0,1e6*e))}})).start(),e.prev=24,e.next=27,t(n instanceof Request?c:n,a);case 27:return g=e.sent,Mn(h,g),Un(g).then((function(){return m.end()})).catch((function(t){m.cancel(),Fn(h,t)})),e.abrupt("return",g);case 33:throw e.prev=33,e.t0=e.catch(24),m.cancel(),Fn(h,e.t0),e.t0;case 38:case"end":return e.stop()}}),e,null,[[24,33]])})));return function(t,n){return e.apply(this,arguments)}}()}function jn(t,e,n){try{return void 0}catch(n){u("failed to analyze request for GraphQL insights",n,t,e)}}function Dn(t,e,n){try{t.forEach((function(t,r){rt.headersToCapture.some((function(t){return t.test(r)}))&&xe(e.attributes,n(r),t)}))}catch(t){u("unable to capture http headers due to CORS policy")}}function Mn(t,e){var n=e.status;!function(t,e,n){t.status={code:e,message:n}}(t,n>=200&&n<400?0:2),0===n&&xe(t.attributes,"error.type",e.type),xe(t.attributes,"http.response.status_code",String(n)),Dn(e.headers,t,(function(t){return e=t,"".concat("http.response.header",".").concat(e.toLowerCase());var e}))}function Un(t){return new Promise((function(e){var n=t.clone().body;if(!n)return e();var r=n.getReader(),i=function(){var t=O(R().mark((function t(){var n;return R().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,r.read();case 2:if(n=t.sent,!n.done){t.next=6;break}return t.abrupt("return",e());case 6:return t.abrupt("return",i());case 7:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();return i()}))}function Fn(t,e){!function(t,e){var n=[];"string"==typeof e?xe(n,bt,e):e&&(e.code?xe(n,Tt,e.code.toString()):e.name&&xe(n,Tt,e.name),e.message&&xe(n,bt,e.message),e.stack&&xe(n,Et,e.stack),Ze(t,"exception",n))}(t,e),Le(Ke(t,function(t){return{code:2,message:t&&"object"===j(t)&&"message"in t?t.message:String(t)}}(e),void 0))}function Vn(t,e,n,r){var i,o,a=function(t){var e,n,r;return t&&null!==(e=null===(n=(r=rt.pageViewInstrumentation).generateMetadata)||void 0===n?void 0:n.call(r,t))&&void 0!==e?e:{}}(e),u=[];xe(u,ct,St.PAGE_VIEW),a.attributes&&Object.entries(a.attributes).forEach((function(t){var e=x(t,2),n=e[0],r=e[1];return xe(u,n,r)})),tn(u,{url:e});var s=[];xe(s,"title",null!==(i=null!==(o=a.title)&&void 0!==o?o:null==d?void 0:d.title)&&void 0!==i?i:X),null!=d&&d.referrer&&xe(s,"referrer",d.referrer),xe(s,"type",n?It:Ot),xe(s,"change_state",r?Lt:Nt);var c={timeUnixNano:t,attributes:u,severityNumber:At.INFO,severityText:"INFO",body:{kvlistValue:{values:s}}},l=De();l&&(c.traceId=l.traceId,c.spanId=l.spanId),Ne(c)}function Bn(){var t=null==f?void 0:f.performance.getEntriesByType("navigation")[0];if(t){var e=[];xe(e,ct,St.NAVIGATION_TIMING);var n=[];xe(n,"name",t.name),Wn(n,t,"responseStatus"),Wn(n,t,"fetchStart"),Wn(n,t,"requestStart"),Wn(n,t,"responseStart"),Wn(n,t,"domInteractive"),Wn(n,t,"domContentLoadedEventEnd"),Wn(n,t,"domComplete"),Wn(n,t,"loadEventEnd"),Wn(n,t,"transferSize"),Wn(n,t,"encodedBodySize"),Wn(n,t,"decodedBodySize");var r={timeUnixNano:Hn(),attributes:e,severityNumber:At.INFO,severityText:"INFO",body:{kvlistValue:{values:n}}};tn(r.attributes);var i=De();i&&(r.traceId=i.traceId,r.spanId=i.spanId),Ne(r)}else u("Navigation timings not available. Cannot emit navigation timing log")}function Wn(t,e,n){var r=e[n];"number"!=typeof r||isNaN(r)||xe(t,n,Number.isInteger(r)?r:$(r))}function Hn(){return F(Math.round(V()))}var qn={},zn=!1,Gn=!1;function Kn(){Yn(null==f?void 0:f.location.href)}function Zn(t){Yn(t.newURL)}function Yn(t,e){var n;if(t)try{var r=new URL(t,null==f?void 0:f.location.href);((n=r).pathname!==qn.path||Gn&&n.search!==qn.search||zn&&n.hash!==qn.hash)&&(Qn(r),Vn(U(),r,!0,Boolean(e)))}catch(t){u("Failed to handle url change",t)}}function Qn(t){qn.path=t.pathname,qn.search=t.search,qn.hash=t.hash}function Xn(){!function(){try{Vn(Hn(),null!=f&&f.location.href?new URL(null==f?void 0:f.location.href):void 0)}catch(t){a("Failed to transmit initial page view event",t)}if("complete"===(null==d?void 0:d.readyState))return Bn();f&&E(f,"load",(function(){setTimeout(Bn,0)}))}(),function(){var t,e,n,r;if(f&&f.history){if(rt.pageViewInstrumentation.trackVirtualPageViews){Gn=null!==(t=null===(e=rt.pageViewInstrumentation.includeParts)||void 0===e?void 0:e.includes("SEARCH"))&&void 0!==t&&t,zn=null!==(n=null===(r=rt.pageViewInstrumentation.includeParts)||void 0===r?void 0:r.includes("HASH"))&&void 0!==n&&n,nt(f.history,"replaceState",(function(t){return function(e,n,r){return Yn(r?String(r):void 0,!0),t.apply(this,[e,n,r])}})),nt(f.history,"pushState",(function(t){return function(e,n,r){return Yn(r?String(r):void 0),t.apply(this,[e,n,r])}})),f.addEventListener("hashchange",Zn),f.addEventListener("popstate",Kn);try{Qn(new URL(f.location.href))}catch(t){}}}else u("Browser does not support history API, skipping instrumentation")}()}var $n=function(t){if("object"===j(t)&&null!==t){if("function"==typeof Object.getPrototypeOf){var e=Object.getPrototypeOf(t);return e===Object.prototype||null===e}return"[object Object]"===Object.prototype.toString.call(t)}return!1},Jn=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return e.reduce((function(t,e){if(void 0===e)return t;if(Array.isArray(e))throw new TypeError("Arguments provided to ts-deepmerge must be objects, not arrays.");return Object.keys(e).forEach((function(n){["__proto__","constructor","prototype"].includes(n)||(Array.isArray(t[n])&&Array.isArray(e[n])?t[n]=Jn.options.mergeArrays?Jn.options.uniqueArrayItems?Array.from(new Set(t[n].concat(e[n]))):[].concat(k(t[n]),k(e[n])):e[n]:$n(t[n])&&$n(e[n])?t[n]=Jn(t[n],e[n]):!$n(t[n])&&$n(e[n])?t[n]=Jn(e[n],void 0):t[n]=void 0===e[n]?Jn.options.allowUndefinedOverrides?e[n]:t[n]:e[n])})),t}),{})},tr={allowUndefinedOverrides:!0,mergeArrays:!0,uniqueArrayItems:!0};Jn.options=tr,Jn.withOptions=function(t){Jn.options=Object.assign(Object.assign({},tr),t);for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];var i=Jn.apply(void 0,n);return Jn.options=tr,i};var er=!1;function nr(t){er?u("Dash0 SDK is being reinitialized, skipping ..."):null!=f?"function"==typeof y&&h&&h.getEntriesByType?(rt.endpoints=t.endpoint instanceof Array?t.endpoint:[t.endpoint],0!==rt.endpoints.length?(Object.assign(rt,Jn(rt,function(t,e){var n,r={},i=L(e);try{for(i.s();!(n=i.n()).done;){var o=n.value;o in t&&(r[o]=t[o])}}catch(t){i.e(t)}finally{i.f()}return r}(t,["ignoreUrls","ignoreErrorMessages","wrapEventHandlers","wrapTimers","propagateTraceHeadersCorsURLs","maxWaitForResourceTimingsMillis","maxToleranceForResourceTimingsMillis","headersToCapture","pageViewInstrumentation"]))),function(t){xe(rt.resource.attributes,it,t.serviceName),t.serviceVersion&&xe(rt.resource.attributes,ot,t.serviceVersion);var e=function(t){if(t.environment)return t.environment;try{var e;return null===(e=process)||void 0===e||null===(e=e.env)||void 0===e?void 0:e.NEXT_PUBLIC_VERCEL_ENV}catch(t){return}}(t);e&&xe(rt.resource.attributes,at,e);var n=function(t){if(t.deploymentName)return t.deploymentName;try{var e;return null===(e=process)||void 0===e||null===(e=e.env)||void 0===e?void 0:e.NEXT_PUBLIC_VERCEL_TARGET_ENV}catch(t){return}}(t);n&&xe(rt.resource.attributes,ut,n);var r=function(t){if(t.deploymentId)return t.deploymentId;try{var e;return null===(e=process)||void 0===e||null===(e=e.env)||void 0===e?void 0:e.NEXT_PUBLIC_VERCEL_BRANCH_URL}catch(t){return}}(t);r&&xe(rt.resource.attributes,st,r)}(t),function(t){var e;xe(rt.signalAttributes,ft,T(16)),xe(rt.signalAttributes,dt,null!==(e=null==v?void 0:v.userAgent)&&void 0!==e?e:X),t.additionalSignalAttributes&&Object.entries(t.additionalSignalAttributes).forEach((function(t){var e=x(t,2),n=e[0],r=e[1];xe(rt.signalAttributes,n,r)}))}(t),Je(),jt(t.sessionInactivityTimeoutMillis,t.sessionTerminationTimeoutMillis),Xn(),en(),Ln(),f&&f.fetch&&f.Request?nt(f,"fetch",Pn):u("Browser does not support the Fetch API, skipping instrumentation"),er=!0):o("No telemetry endpoint configured. Aborting Dash0 Web SDK initialization process.")):u("Stopping Dash0 Web SDK initialization. This browser does not support the necessary APIs"):u("Looks like we are not running in a browser context. Stopping Dash0 Web SDK initialization.")}t.addSignalAttribute=function(t,e){xe(rt.signalAttributes,t,e)},t.debug=function(){u("Dash0 Web SDK configuration state:",rt)},t.identify=function(t,e){ke(rt.signalAttributes,vt),null!=t&&xe(rt.signalAttributes,vt,t),ke(rt.signalAttributes,pt),null!=(null==e?void 0:e.name)&&xe(rt.signalAttributes,pt,e.name),ke(rt.signalAttributes,ht),null!=(null==e?void 0:e.fullName)&&xe(rt.signalAttributes,ht,e.fullName),ke(rt.signalAttributes,yt),null!=(null==e?void 0:e.email)&&xe(rt.signalAttributes,yt,e.email),ke(rt.signalAttributes,mt),null!=(null==e?void 0:e.hash)&&xe(rt.signalAttributes,mt,e.hash),ke(rt.signalAttributes,gt),null!=(null==e?void 0:e.roles)&&xe(rt.signalAttributes,gt,e.roles)},t.init=function(t){u("".concat("Initializing Dash0 Web SDK"," (via package)")),nr(t)},t.removeSignalAttribute=function(t){ke(rt.signalAttributes,t)},t.reportError=function(t,e){vn(t,e)},t.sendEvent=function(t,e){var n;if(Object.values(St).includes(t))o("Unable to send custom event ".concat(t,". You are not allowed to use an internal event name while sending a custom event. Dropping event..."));else{var r=[];tn(r),Object.entries(null!==(n=null==e?void 0:e.attributes)&&void 0!==n?n:{}).forEach((function(t){var e=x(t,2),n=e[0],i=e[1];return xe(r,n,i)})),xe(r,ct,t),null!=e&&e.title&&xe(r,"dash0.web.event.title",e.title),Ne({timeUnixNano:null!=(null==e?void 0:e.timestamp)?F(e.timestamp):U(),attributes:r,body:_e(null==e?void 0:e.data),severityText:null==e?void 0:e.severity,severityNumber:null!=e&&e.severity?At[e.severity]:void 0})}},t.setActiveLogLevel=function(t){var e;r=null!==(e=n[t])&&void 0!==e?e:n.warn},t.terminateSession=function(){if(w)try{!function(t){w&&m&&m.removeItem(t)}(Rt)}catch(t){i("Failed to terminate session",t)}}}));
|
|
2
2
|
//# sourceMappingURL=dash0.umd.cjs.map
|