@dash0/sdk-web 0.13.0 → 0.13.1

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/README.md CHANGED
@@ -17,7 +17,7 @@ Should you need a currently unavailable format, let us know by creating a github
17
17
 
18
18
  ### Before you begin
19
19
 
20
- You'll need a couple of prequesites before you can start:
20
+ You'll need a couple of prerequisites before you can start:
21
21
 
22
22
  - An active dash0 account. [Sign Up](https://www.dash0.com/sign-up)
23
23
  - An [Auth Token](https://www.dash0.com/documentation/dash0/key-concepts/auth-tokens)
@@ -52,7 +52,7 @@ You'll need a couple of prequesites before you can start:
52
52
  url: "http://example.com",
53
53
  // Replace this with your auth token you created earlier
54
54
  // Ideally inject the value at build time to not commit the token to git, even if its effectively public
55
- authToken: "you-auth-token-goes-here",
55
+ authToken: "your-auth-token-goes-here",
56
56
  },
57
57
  });
58
58
  ```
@@ -134,7 +134,7 @@ This currently also requires the use of Next.js
134
134
  type: `string`<br>
135
135
  optional: `true`<br>
136
136
  default: `undefined`<br>
137
- Id of the deployment, aps to the [deployment.id](https://opentelemetry.io/docs/specs/semconv/registry/attributes/deployment/#deployment-id) otel attribute.
137
+ Id of the deployment, maps to the [deployment.id](https://opentelemetry.io/docs/specs/semconv/registry/attributes/deployment/#deployment-id) otel attribute.
138
138
  This value is [auto detected](#configuration-auto-detection) in certain build environments.
139
139
  - **Additional Signal Attributes**<br>
140
140
  key: `additionalSignalAttributes`<br>
@@ -150,7 +150,7 @@ This currently also requires the use of Next.js
150
150
  key: `endpoint`<br>
151
151
  type: `Endpoint | Endpoint[]`<br>
152
152
  optional: `false`<br>
153
- The OTLP to which the generated telemtetry should be sent. Supports multiple endpoints in parallel if an array is provided.
153
+ The OTLP to which the generated telemetry should be sent. Supports multiple endpoints in parallel if an array is provided.
154
154
  - **Endpoint URL**<br>
155
155
  key: `endpoint.url`<br>
156
156
  type: `string`<br>
@@ -197,7 +197,7 @@ This currently also requires the use of Next.js
197
197
  type: `boolean`<br>
198
198
  optional: `true`<br>
199
199
  default: `true`<br>
200
- Whether we should automatically wrap DOM event handlers added via addEventlistener for improved uncaught error tracking.
200
+ Whether we should automatically wrap DOM event handlers added via addEventListener for improved uncaught error tracking.
201
201
  This results in improved uncaught error tracking for cross-origin errors,
202
202
  but may have adverse effects on website performance and stability.
203
203
  - **Wrap Timers**<br>
@@ -438,10 +438,10 @@ In this means:
438
438
  - `MINOR` versions add functionality in a backward compatible manner.
439
439
  - `PATCH` versions include bug and security fixes which do not break backward compatibility.
440
440
 
441
- We automatically release new versions of this package whenever a PR is merged to main and the ci is able to detect a
441
+ We automatically release new versions of this package whenever a PR is merged to main and the CI is able to detect a
442
442
  valid version increase from the merge commit. It uses [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/)
443
443
  to calculate the version increase and to generate additional messaging such as changelogs.
444
- Please make sure PR merge commits are formatted accordingly, not matching messages will create a PATCH release, but no
444
+ Please make sure PR merge commits are formatted accordingly, non matching messages will create a PATCH release, but no
445
445
  changelog entry.
446
446
  Examples:
447
447
 
@@ -487,7 +487,7 @@ They currently don't have a fully local setup, but tests can be executed locally
487
487
 
488
488
  #### Setup
489
489
 
490
- - Get a labmda test account
490
+ - Get a lambda test account
491
491
  - Create a `.env` file based on `.env.example` and provide your lambda test credentials.
492
492
  - Run the tests via `pnpm run test:e2e`
493
493
 
@@ -1,2 +1,2 @@
1
- !function(){"use strict";function t(){}o("log");var e=o("info"),n=o("warn"),r=o("error"),i=o("debug");function o(e){return"undefined"==typeof console||"function"!=typeof console.log||"function"!=typeof console.log.apply?t:console[e]&&"function"==typeof console[e].apply?function(){console[e].apply(console,arguments)}:function(){console.log.apply(console,arguments)}}var a=Object.prototype.hasOwnProperty;function u(t,e){return a.call(t,e)}var s="undefined"!=typeof window?window:void 0,c=null==s?void 0:s.document,l=null==s?void 0:s.navigator,f="undefined"!=typeof location?location:void 0,d=(null==s?void 0:s.performance)||(null==s?void 0:s.webkitPerformance)||(null==s?void 0:s.msPerformance)||(null==s?void 0:s.mozPerformance);null==s||s.encodeURIComponent;var v=null==s?void 0:s.fetch,p=function(){try{var t;return null!==(t=null==s?void 0:s.localStorage)&&void 0!==t?t:null}catch(t){return null}}(),h=function(){try{var t;return null!==(t=null==s?void 0:s.sessionStorage)&&void 0!==t?t:null}catch(t){return null}}(),m=Array(32);function y(t){for(var e=0;e<2*t;e++)m[e]=Math.floor(16*Math.random())+48,m[e]>=58&&(m[e]+=39);return String.fromCharCode.apply(null,m.slice(0,2*t))}function g(t,e,n){t.addEventListener?t.addEventListener(e,n,!1):t.attachEvent&&t.attachEvent("on"+e,n)}var b=null!=p&&"function"==typeof p.getItem&&"function"==typeof p.setItem;function T(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 E(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 w(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){E(o,r,i,a,u,"next",t)}function u(t){E(o,r,i,a,u,"throw",t)}a(void 0)}))}}function S(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function A(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,R(r.key),r)}}(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function O(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=k(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 I(t,e,n){return(e=R(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function N(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 _(){_=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(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 C(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 L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function R(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(C,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,R.prototype={constructor:R,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(L),!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),L(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;L(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 C(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)||k(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 L(t){return function(t){if(Array.isArray(t))return T(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||k(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 R(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 x(t){return x="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},x(t)}function k(t,e){if(t){if("string"==typeof t)return T(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)?T(t,e):void 0}}function P(){return(new Date).getTime()}function D(){var t=M();return t?String(1e6*(d.now()+t)):j(new Date)}function j(t){return"object"===x(t)?j(t.getTime()):String(t)+"000000"}function M(){var t,e=null==d?void 0:d.timeOrigin;"number"!=typeof e&&(e=null==d||null===(t=d.timing)||void 0===t?void 0:t.fetchStart);return e}var U={setTimeout:null==s?void 0:s.setTimeout,clearTimeout:null==s?void 0:s.clearTimeout,setInterval:null==s?void 0:s.setInterval,clearInterval:null==s?void 0:s.clearInterval},F=null!=s&&null!=s.Zone&&null!=s.Zone.root&&"function"==typeof s.Zone.root.run;function V(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return W.apply("setTimeout",arguments)}function B(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return W.apply("setInterval",arguments)}function W(){var t,e=this;if(F)try{var r=Array.prototype.slice.apply(arguments);return s.Zone.root.run(U[e],s,r)}catch(t){n("Failed to execute %s inside of zone (via Zone.js). Falling back to execution inside currently active zone.",e,t)}return null===(t=U[e])||void 0===t?void 0:t.apply(s,arguments)}F&&i("Discovered Zone.js globals. Will attempt to register all timers inside the root Zone.");d&&d.getEntriesByType;var q=d&&"function"==typeof s.PerformanceObserver&&"function"==typeof d.now,H=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"});function z(e){return q?{start:function(){n=d.now();try{var t,e=null==s?void 0:s.PerformanceObserver;if(e)null===(t=o=new e(f))||void 0===t||t.observe({type:"resource"})}catch(t){}u=V(p,6e5)},end:function(){r=d.now(),h(),i||!G()?l():(g(c,"visibilitychange",v),a=V(l,e.maxWaitForResourceMillis))},cancel:p}:function(e){var n=0;return{start:function(){n=P()},end:function(){return e({duration:P()-n})},cancel:t}}(e.onEnd);var n,r,i,o,a,u;function l(){var t;p(),null!==(t=i)&&void 0!==t&&t.duration&&i.duration<864e5?e.onEnd({resource:i,duration:Math.round(i.duration)}):e.onEnd({resource:i,duration:Math.round(r-n)})}function f(t){var o=t.getEntriesByType("resource").find((function(t){var i=t;return i.startTime>=n&&(!r||r+e.maxToleranceForResourceTimingsMillis>=i.responseEnd)&&e.resourceMatcher(i)}));o&&(i=o,r&&l())}function v(){G()||l()}function p(){!function(){if(o){try{var t;null===(t=o)||void 0===t||t.disconnect()}catch(t){}o=void 0}}(),a&&(clearTimeout(a),a=void 0),h(),function(){if(!c)return;t=c,e="visibilitychange",n=v,t.removeEventListener?t.removeEventListener(e,n,!1):t.detachEvent&&t.detachEvent("on"+e,n);var t,e,n}()}function h(){u&&(clearTimeout(u),u=void 0)}}function G(){return"visible"===(null==c?void 0:c.visibilityState)||"prerender"===(null==c?void 0:c.visibilityState)}var K="undefined";function Z(t){return Math.round(100*t)/100}function Y(t){var e;return"string"!=typeof t?t:new URL(t,null!==(e=null==c?void 0:c.baseURI)&&void 0!==e?e:null==f?void 0:f.href)}function Q(t){try{return Y(t).origin===("undefined"!=typeof location?location.origin:void 0)}catch(t){return!1}}var X=Symbol.for("INSTRUMENTED_BY_DASH0");function $(t,e,n){var r=t[e];r?(!0===r[X]&&i("".concat(String(e)," has already been instrumented, skipping")),function(t){t[X]=!0}(r),t[e]=n(r)):i("".concat(String(e)," is not defined, unable to instrument"))}var J={endpoints:[],resource:{attributes:[]},scope:{name:"dash0-web-sdk",version:"0.13.0",attributes:[]},signalAttributes:[],ignoreUrls:[],ignoreErrorMessages:[],wrapEventHandlers:!0,wrapTimers:!0,propagateTraceHeadersCorsURLs:[],maxWaitForResourceTimingsMillis:1e4,maxToleranceForResourceTimingsMillis:3e3,headersToCapture:[],pageViewInstrumentation:{trackVirtualPageViews:!0,includeParts:[]}};function tt(t,e){for(var n=0,r=t.length;n<r;n++)if(t[n].test(e))return!0;return!1}var et="data:";function nt(t){return!t||(!(t=String(t))||(null==t.substring||t.substring(0,5).toLowerCase()===et||(!!function(t){for(var e=t.toLowerCase(),n=0,r=J.endpoints.length;n<r;n++){var i=J.endpoints[n];if(e.startsWith(i.url))return!0}return!1}(t)||tt(J.ignoreUrls,t))))}var rt=!1;function it(t){var e,n,r=[];return n=i,rt&&n(),c&&s&&(g(c,"visibilitychange",(function(){"visible"!==c.visibilityState&&n()})),g(s,"pagehide",(function(){rt=!0,n()})),g(s,"beforeunload",(function(){rt=!0,n()}))),{send:function(n){"visible"===(null==c?void 0:c.visibilityState)?(r.push(n),r.length>=15?i():null==e&&(e=V(i,1e3))):t([n])}};function i(){null!=e&&(clearTimeout(e),e=null),r.length>0&&(t(r.slice()),r.length=0)}}function ot(t,e){return at.apply(this,arguments)}function at(){return at=w(_().mark((function e(r,i){var o,a,u,s;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=JSON.stringify(i),a=o,u=o.length,s=!1,"undefined"==typeof CompressionStream){e.next=10;break}return e.next=7,ut(o);case 7:a=e.sent,u=a.byteLength,s=!0;case 10:return e.next=12,Promise.all(J.endpoints.map(function(){var e=w(_().mark((function e(i){var o,c,l;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,(o=new URL(i.url)).pathname=o.pathname+(o.pathname.endsWith("/")?r.substring(1):r),c={"Content-Type":"application/json",Authorization:"Bearer ".concat(i.authToken)},i.dataset&&(c["Dash0-Dataset"]=i.dataset),s&&(c["Content-Encoding"]="gzip"),v){e.next=9;break}return n("Unable to send telemetry, fetch is not defined"),e.abrupt("return");case 9:return e.next=11,v(o,{method:"POST",headers:c,body:a,keepalive:u<=6e4});case 11:(l=e.sent).text().catch(t),l.ok||n("Failed to send telemetry to ".concat(o,": ").concat(l.status," ").concat(l.statusText)),e.next=19;break;case 16:e.prev=16,e.t0=e.catch(0),n("Error sending telemetry to ".concat(i.url).concat(r,":"),e.t0);case 19:case"end":return e.stop()}}),e,null,[[0,16]])})));return function(t){return e.apply(this,arguments)}}()));case 12:case"end":return e.stop()}}),e)}))),at.apply(this,arguments)}function ut(t){return st.apply(this,arguments)}function st(){return(st=w(_().mark((function t(e){var n,r,i;return _().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 ct,lt=it((function(t){ot("/v1/logs",{resourceLogs:[{resource:J.resource,scopeLogs:[{scope:J.scope,logRecords:t}]}]}).catch((function(t){r("Failed to transmit logs",t)}))})),ft=it((function(t){ot("/v1/traces",{resourceSpans:[{resource:J.resource,scopeSpans:[{scope:J.scope,spans:t}]}]}).catch((function(t){r("Failed to transmit spans",t)}))}));function dt(){var t,e,n,r,i,o,a;return ct||(e=(t={maxCalls:8096,maxCallsPerTenMinutes:4096,maxCallsPerTenSeconds:128}).maxCalls,n=t.maxCallsPerTenMinutes,r=t.maxCallsPerTenSeconds,i=0,o=0,a=0,B((function(){o=0}),6e5),B((function(){a=0}),1e4),ct=function(){return++i>e||++o>n||++a>r}),ct()}function vt(t){dt()?i("Transport rate limit. Will not send item.",t):lt.send(t)}function pt(t){dt()?i("Transport rate limit. Will not send item.",t):ft.send(t)}var ht="service.name",mt="service.version",yt="deployment.environment.name",gt="deployment.name",bt="deployment.id",Tt="event.name",Et="dash0.web.event.id",wt="page.load.id",St="user_agent.original",At="user.id",Ot="user.name",It="user.full_name",Nt="user.email",_t="user.hash",Ct="user.roles",Lt="exception.message",Rt="exception.type",xt="exception.stacktrace",kt="url.full",Pt={PAGE_VIEW:"browser.page_view",NAVIGATION_TIMING:"browser.navigation_timing",WEB_VITAL:"browser.web_vital",ERROR:"browser.error"},Dt={UNSPECIFIED:0,TRACE:1,DEBUG:5,INFO:9,WARN:13,ERROR:17,FATAL:21},jt=0,Mt=1,Ut="pushState",Ft="replaceState",Vt=["stringValue","boolValue","intValue","doubleValue","arrayValue","kvlistValue","bytesValue"];function Bt(t){if(null!=t){var e={};return Array.isArray(t)?e.arrayValue={values:t.map((function(t){return Bt(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"!==x(t))return!1;var e=Object.keys(t);return 1===e.length&&Vt.includes(e[0])}(t)?"object"===x(t)&&(e.kvlistValue={values:Object.entries(t).map((function(t){var e=C(t,2);return Wt(e[0],e[1])}))}):e=t,e}}function Wt(t,e){return{key:t,value:Bt(e)}}function qt(t,e,n){e&&t.push(Wt(e,n))}function Ht(t,e){var n=t.findIndex((function(t){return t.key===e}));-1!==n&&t.splice(n,1)}var zt="traceparent",Gt=/^00-([a-f0-9]{32})-([a-f0-9]{16})-[0-9]{1,2}$/;function Kt(){var t,e,n=((null===(t=Array.from(null!==(e=null==c?void 0:c.getElementsByTagName("meta"))&&void 0!==e?e:[]).find((function(t){var e;return(null===(e=t.getAttribute("name"))||void 0===e?void 0:e.toLowerCase())===zt})))||void 0===t?void 0:t.content.trim())||"").match(Gt)||function(){var t=d.getEntriesByType("navigation")[0];if(!t)return"";if(!t.serverTiming)return"";return function(t){var e,n=O(t);try{for(n.s();!(e=n.n()).done;){var r=e.value;if(r.name===zt)return r.description.trim()}}catch(t){n.e(t)}finally{n.f()}return""}(t.serverTiming)}().match(Gt);if(n)return{traceId:n[1],spanId:n[2]}}function Zt(t,e,n){t.call(e,"traceparent","00-".concat(n.traceId,"-").concat(n.spanId,"-01"))}var Yt=1;function Qt(){var t,e;return"".concat((t={ephemeralSession:!b},e=0,t.ephemeralSession&&(e|=Yt),e.toString(16).padStart(2,"0"))).concat(y(7))}var Xt="d0_session",$t="#",Jt=864e5,te=null;function ee(t,e){if(!b)return i("Storage API is not available and session tracking is therefore not supported."),void(te=Qt());t||(t=108e5),e||(e=216e5),t=Math.min(t,Jt),e=Math.min(e,Jt);try{var r=function(t){return b&&p?p.getItem(t):null}(Xt),o=function(t){if(!t)return null;var e=t.split($t);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}}(r);o&&!function(t,e,n){var r=P()-e;if(t.lastActivityTime<r)return!1;var i=P()-n;return t.startTime>=i}(o,t,e)&&(o=null),o?o.lastActivityTime=P():o={id:Qt(),startTime:P(),lastActivityTime:P()},function(t,e){b&&p&&p.setItem(t,e)}(Xt,function(t){return t.id+$t+t.startTime+$t+t.lastActivityTime}(o)),te=o.id}catch(t){n("Failed to record session information",t)}}var ne="d042",re=1;function ie(t){var e=0;return t.withoutSession&&(e|=re),e.toString(16).padStart(2,"0")}for(var oe=new Uint32Array(256),ae=0;ae<256;ae++){for(var ue=ae,se=0;se<8;se++)ue=1&ue?3988292384^ue>>>1:ue>>>1;oe[ae]=ue>>>0}function ce(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^oe[255&(r^o)]}return(4294967295^r)>>>0}(t).toString(16).padStart(8,"0");return"".concat(e).concat(y(4))}function le(t){var e=function(t){return t?"".concat(ne).concat(ie({withoutSession:!1})).concat(t).concat(y(5)):"".concat(ne).concat(ie({withoutSession:!0})).concat(y(13))}(te),n=ce(e),r=[];return qt(r,Et,n),{traceId:e,spanId:n,name:t,kind:3,startTimeUnixNano:D(),attributes:r,events:[],links:[],status:{code:0}}}function fe(t,e,n){var r=t;return e&&(r.status=e),r.endTimeUnixNano=null!=n?String(Math.round(parseInt(r.startTimeUnixNano)+n)):D(),r}function de(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:D(),attributes:null!=o?o:[]})}var ve=null!=h&&"function"==typeof h.getItem&&"function"==typeof h.setItem;var pe="d0_tab",he=null;function me(){if(ve)try{var t=function(t){return ve&&h?h.getItem(t):null}(pe);if(t)return void(he=t);he=y(8),function(t,e){ve&&h&&h.setItem(t,e)}(pe,he)}catch(t){n("Failed to record tab ID information",t)}else i("Storage API is not available and tab tracking is therefore not supported.")}function ye(t,e){var n,r,i,o,a;void 0===t.find((function(t){return t.key===Et}))&&qt(t,Et,y(8));for(var u=0;u<J.signalAttributes.length;u++)t.push(J.signalAttributes[u]);!function(t,e){try{var n=Y(e);n.username&&(n.username="REDACTED"),n.password&&(n.password="REDACTED"),qt(t,kt,n.href),qt(t,"url.path",n.pathname),qt(t,"url.domain",n.hostname),qt(t,"url.scheme",n.protocol.replace(":","")),n.hash&&qt(t,"url.fragment",n.hash.replace("#","")),n.search&&qt(t,"url.query",n.search.replace("?",""))}catch(n){qt(t,kt,String(e))}}(t,null!==(n=null!==(r=null==e?void 0:e.url)&&void 0!==r?r:null==s?void 0:s.location.href)&&void 0!==n?n:K),te&&qt(t,"session.id",te),he&&qt(t,"browser.tab.id",he),qt(t,"browser.window.width",null!==(i=null==s?void 0:s.innerWidth)&&void 0!==i?i:K),qt(t,"browser.window.height",null!==(o=null==s?void 0:s.innerHeight)&&void 0!==o?o:K);var c=null==l||null===(a=l.connection)||void 0===a?void 0:a.effectiveType;c&&qt(t,"network.connection.subtype",c)}var ge,be=0,Te=0,Ee={},we=!1;function Se(){we=!0}function Ae(t,e){t&&Oe("string"==typeof t?{message:t,opts:e}:{message:t.message,type:t.name,stack:t.stack,opts:e})}function Oe(t){var e=t.message,n=t.type,r=t.stack,i=t.opts;if(e&&!(be>100)&&!function(t){return!t||tt(J.ignoreErrorMessages,t)}(e)){Te>=20&&(Ee={},Te=0);var o=(e=String(e).substring(0,300))+(r=function(t){return String(t||"").split("\n").slice(0,30).join("\n")}(r))+(null==s?void 0:s.location.href),a=Ee[o];if(a)a.seenCount++;else{var u=[];qt(u,Tt,Pt.ERROR),qt(u,Lt,e),n&&qt(u,Rt,n),r&&qt(u,xt,r),null!=i&&i.componentStack&&qt(u,"exception.component_stack",null==i?void 0:i.componentStack.substring(0,2048)),ye(u),a={seenCount:1,transmittedCount:0,log:{timeUnixNano:D(),attributes:u,severityNumber:Dt.ERROR,severityText:"ERROR",body:{stringValue:e}}},Ee[o]=a,Te++}!function(){if(ge)return;ge=setTimeout(Ie,1e3)}()}}function Ie(){for(var t in ge&&(clearTimeout(ge),ge=null),Ee)if(u(Ee,t)){var e=Ee[t];e.seenCount>e.transmittedCount&&(vt(e.log),be++)}Ee={},Te=0}var Ne=-1,_e=function(t){addEventListener("pageshow",(function(e){e.persisted&&(Ne=e.timeStamp,t(e))}),!0)},Ce=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)))}},Le=function(t){requestAnimationFrame((function(){return requestAnimationFrame((function(){return t()}))}))},Re=function(){var t=performance.getEntriesByType("navigation")[0];if(t&&t.responseStart>0&&t.responseStart<performance.now())return t},xe=function(){var t,e=Re();return null!==(t=null==e?void 0:e.activationStart)&&void 0!==t?t:0},ke=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1,n=Re(),r="navigate";return Ne>=0?r="back-forward-cache":n&&(document.prerendering||xe()>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}},Pe=new WeakMap;function De(t,e){return Pe.get(t)||Pe.set(t,new e),Pe.get(t)}var je,Me=function(){return A((function t(){S(this,t),I(this,"t",void 0),I(this,"i",0),I(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)}}}])}(),Ue=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?N(Object(n),!0).forEach((function(e){I(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):N(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({type:t,buffered:!0},n)),r}}catch(t){}},Fe=function(t){var e=!1;return function(){e||(t(),e=!0)}},Ve=-1,Be=function(){return"hidden"!==document.visibilityState||document.prerendering?1/0:0},We=function(t){"hidden"===document.visibilityState&&Ve>-1&&(Ve="visibilitychange"===t.type?t.timeStamp:0,He())},qe=function(){addEventListener("visibilitychange",We,!0),addEventListener("prerenderingchange",We,!0)},He=function(){removeEventListener("visibilitychange",We,!0),removeEventListener("prerenderingchange",We,!0)},ze=function(){if(Ve<0){var t,e=xe(),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;Ve=null!=n?n:Be(),qe(),_e((function(){setTimeout((function(){Ve=Be(),qe()}))}))}return{get firstHiddenTime(){return Ve}}},Ge=function(t){document.prerendering?addEventListener("prerenderingchange",(function(){return t()}),!0):t()},Ke=[1800,3e3],Ze=[.1,.25],Ye=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]:{};Ge((function(){var n,r=ze(),i=ke("FCP"),o=Ue("paint",(function(t){var e,a=O(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-xe(),0),i.entries.push(u),n(!0)))}}catch(t){a.e(t)}finally{a.f()}}));o&&(n=Ce(t,i,Ke,e.reportAllChanges),_e((function(r){i=ke("FCP"),n=Ce(t,i,Ke,e.reportAllChanges),Le((function(){i.value=performance.now()-r.timeStamp,n(!0)}))})))}))}(Fe((function(){var n,r=ke("CLS",0),i=De(e,Me),o=function(t){var e,o=O(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=Ue("layout-shift",o);a&&(n=Ce(t,r,Ze,e.reportAllChanges),document.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&(o(a.takeRecords()),n(!0))})),_e((function(){i.i=0,r=ke("CLS",0),n=Ce(t,r,Ze,e.reportAllChanges),Le((function(){return n()}))})),setTimeout(n))})))},Qe=0,Xe=1/0,$e=0,Je=function(t){var e,n=O(t);try{for(n.s();!(e=n.n()).done;){var r=e.value;r.interactionId&&(Xe=Math.min(Xe,r.interactionId),$e=Math.max($e,r.interactionId),Qe=$e?($e-Xe)/7+1:0)}}catch(t){n.e(t)}finally{n.f()}},tn=function(){var t;return je?Qe:null!==(t=performance.interactionCount)&&void 0!==t?t:0},en=0,nn=function(){return A((function t(){S(this,t),I(this,"u",[]),I(this,"l",new Map),I(this,"m",void 0),I(this,"v",void 0)}),[{key:"p",value:function(){en=tn(),this.u.length=0,this.l.clear()}},{key:"P",value:function(){var t=Math.min(this.u.length-1,Math.floor((tn()-en)/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=O(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)}}}}])}(),rn=function(t){var e=globalThis.requestIdleCallback||setTimeout;"hidden"===document.visibilityState?t():(t=Fe(t),document.addEventListener("visibilitychange",t,{once:!0}),e((function(){t(),document.removeEventListener("visibilitychange",t)})))},on=[200,500],an=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};globalThis.PerformanceEventTiming&&"interactionId"in PerformanceEventTiming.prototype&&Ge((function(){var n;"interactionCount"in performance||je||(je=Ue("event",Je,{type:"event",buffered:!0,durationThreshold:0}));var r,i=ke("INP"),o=De(e,nn),a=function(t){rn((function(){var e,n=O(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=Ue("event",a,{durationThreshold:null!==(n=e.durationThreshold)&&void 0!==n?n:40});r=Ce(t,i,on,e.reportAllChanges),u&&(u.observe({type:"first-input",buffered:!0}),document.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&(a(u.takeRecords()),r(!0))})),_e((function(){o.p(),i=ke("INP"),r=Ce(t,i,on,e.reportAllChanges)})))}))},un=function(){return A((function t(){S(this,t),I(this,"m",void 0)}),[{key:"h",value:function(t){var e;null===(e=this.m)||void 0===e||e.call(this,t)}}])}(),sn=[2500,4e3];function cn(){!function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Ge((function(){var n,r=ze(),i=ke("LCP"),o=De(e,un),a=function(t){e.reportAllChanges||(t=t.slice(-1));var a,u=O(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-xe(),0),i.entries=[s],n())}}catch(t){u.e(t)}finally{u.f()}},u=Ue("largest-contentful-paint",a);if(u){n=Ce(t,i,sn,e.reportAllChanges);for(var s=Fe((function(){a(u.takeRecords()),u.disconnect(),n(!0)})),c=0,l=["keydown","click","visibilitychange"];c<l.length;c++)addEventListener(l[c],(function(){return rn(s)}),{capture:!0,once:!0});_e((function(r){i=ke("LCP"),n=Ce(t,i,sn,e.reportAllChanges),Le((function(){i.value=performance.now()-r.timeStamp,n(!0)}))}))}}))}(ln,{reportAllChanges:!0}),an(ln,{reportAllChanges:!0}),Ye(ln,{reportAllChanges:!0})}function ln(t){var e=[];qt(e,Tt,Pt.WEB_VITAL);var n=[];qt(n,"name",t.name),qt(n,"value",Z(t.value)),qt(n,"delta",Z(t.delta));var r={timeUnixNano:D(),attributes:e,severityNumber:Dt.INFO,severityText:"INFO",body:{kvlistValue:{values:n}}};ye(r.attributes),vt(r)}var fn="Unhandled promise rejection: ",dn="<unavailable because Promise wasn't rejected with an Error object>";function vn(t){null==t.reason?Ae({message:fn+"<no reason defined>",stack:dn}):"string"==typeof t.reason.message?Ae({message:fn+t.reason.message,stack:"string"==typeof t.reason.stack?t.reason.stack:dn}):"object"!==x(t.reason)&&Ae({message:fn+t.reason,stack:dn})}var pn="__dash0OriginalFunctions";function hn(t,e){for(var n=t[pn],r=0;r<n.length;r++){if(mn(n[r].valuesForEqualityCheck,e))return r}return-1}function mn(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 yn(t,e,n,r,i){return function(t,e,n){if(!t)return e;var r=t[pn]=t[pn]||[],i=hn(t,n);return-1!==i?r[i].wrappedFunction:(r.push({wrappedFunction:e,valuesForEqualityCheck:n}),e)}(t,e,gn(n,r,i))}function gn(t,e,n){return[t,e,bn(n)]}function bn(t){return null!=t&&("object"===x(t)?Boolean(t.capture):Boolean(t))}function Tn(t,e,n,r,i){return function(t,e,n){var r=null==t?void 0:t[pn];if(null==r)return n;var i=hn(t,e);if(-1===i)return n;var o=r[i];return r.splice(i,1),o.wrappedFunction}(t,gn(e,n,r),i)}function En(){J.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),Se(),t}},i[1]=yn(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]=Tn(this,t,e,r,e),n.apply(this,i)}}(null==s?void 0:s.EventTarget)}function wn(t){var e=null==s?void 0:s[t];"function"==typeof e&&(s[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),Se(),t}}}(t),e.apply(this,n)})}function Sn(){!function(){if(s){var t=s.onerror;s.onerror=function(e,n,r,i,o){if(we)return we=!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)),Oe({message:String(e),stack:a}),"function"==typeof t?t.apply(this,arguments):void 0}}}(),"function"==typeof(null==s?void 0:s.addEventListener)&&s.addEventListener("unhandledrejection",vn),En(),function(){if(J.wrapTimers){if(F)return void n("We discovered a usage of Zone.js. In order to avoid any incompatibility issues timer wrapping is not going to be enabled.");wn("setTimeout"),wn("setInterval")}}()}var An=["GET","HEAD","POST","PUT","DELETE","CONNECT","OPTIONS","TRACE","PATCH"];function On(t){return An.includes(t)}function In(t,e){var n=0!==e.startTime;Nn(t,H.FETCH_START,e,n),Nn(t,H.DOMAIN_LOOKUP_START,e,n),Nn(t,H.DOMAIN_LOOKUP_END,e,n),Nn(t,H.CONNECT_START,e,n),Nn(t,H.SECURE_CONNECTION_START,e,n),Nn(t,H.CONNECT_END,e,n),Nn(t,H.REQUEST_START,e,n),Nn(t,H.RESPONSE_START,e,n),Nn(t,H.RESPONSE_END,e,n)}function Nn(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]||de(t,e,(r=n[e],String(Math.round(1e6*(r+M())))))}function _n(t,e){var n=e.encodedBodySize;null!=n&&qt(t.attributes,"http.response.body.size",n)}function Cn(t){return function(){var e=w(_().mark((function e(n,r){var o,a,u,s,c,l,f,d,v,p,h,m,y,g;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(u=r?Object.assign({},r):r,s=null,null!==(o=u)&&void 0!==o&&o.body&&(s=u.body,u.body=void 0),c=new Request(n,u),s&&u&&(u.body=s),!nt(l=c.url)){e.next=9;break}return i("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!==(a=c.method)&&void 0!==a?a:"GET",d=On(f),v=On(f.toUpperCase()),p=v?f.toUpperCase():"_OTHER",ye((h=le("HTTP ".concat(p))).attributes,{url:l}),Ln(n,r),qt(h.attributes,"http.request.method",p),d||qt(h.attributes,"http.request.method_original",f),(Q(l)||tt(J.propagateTraceHeadersCorsURLs,l))&&(null!==(m=u)&&void 0!==m&&m.headers?(u.headers=new Headers(u.headers),Zt(u.headers.append,u.headers,h)):n instanceof Request?Zt(c.headers.append,c.headers,h):(u||(u={}),u.headers=new Headers,Zt(u.headers.append,u.headers,h))),Rn(c.headers,h,(function(t){return e=t,"".concat("http.request.header",".").concat(e.toLowerCase());var e})),(y=z({resourceMatcher:function(t){var e=t.initiatorType,n=t.name;return("fetch"===e||"xmlhttprequest"===e)&&n===Y(l).href},maxWaitForResourceMillis:J.maxWaitForResourceTimingsMillis,maxToleranceForResourceTimingsMillis:J.maxToleranceForResourceTimingsMillis,onEnd:function(t){var e=t.duration,n=t.resource;n&&(In(h,n),_n(h,n)),pt(fe(h,void 0,1e6*e))}})).start(),e.prev=23,e.next=26,t(n instanceof Request?c:n,u);case 26:return g=e.sent,xn(h,g),kn(g).then((function(){return y.end()})).catch((function(t){y.cancel(),Pn(h,t)})),e.abrupt("return",g);case 32:throw e.prev=32,e.t0=e.catch(23),y.cancel(),Pn(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 Ln(t,e,n){try{return void 0}catch(n){i("failed to analyze request for GraphQL insights",n,t,e)}}function Rn(t,e,n){try{t.forEach((function(t,r){J.headersToCapture.some((function(t){return t.test(r)}))&&qt(e.attributes,n(r),t)}))}catch(t){i("unable to capture http headers due to CORS policy")}}function xn(t,e){var n=e.status;!function(t,e,n){t.status={code:e,message:n}}(t,n>=200&&n<400?0:2,e.statusText),qt(t.attributes,"http.response.status_code",String(n)),Rn(e.headers,t,(function(t){return e=t,"".concat("http.response.header",".").concat(e.toLowerCase());var e}))}function kn(t){return new Promise((function(e){var n=t.clone().body;if(!n)return e();var r=n.getReader(),i=function(){var t=w(_().mark((function t(){var n;return _().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 Pn(t,e){!function(t,e){var n=[];"string"==typeof e?qt(n,Lt,e):e&&(e.code?qt(n,Rt,e.code.toString()):e.name&&qt(n,Rt,e.name),e.message&&qt(n,Lt,e.message),e.stack&&qt(n,xt,e.stack),de(t,"exception",n))}(t,e),pt(fe(t,function(t){return{code:2,message:t&&"object"===x(t)&&"message"in t?t.message:String(t)}}(e),void 0))}function Dn(t,e,n,r){var i,o,a=function(t){var e,n,r;return t&&null!==(e=null===(n=(r=J.pageViewInstrumentation).generateMetadata)||void 0===n?void 0:n.call(r,t))&&void 0!==e?e:{}}(e),u=[];qt(u,Tt,Pt.PAGE_VIEW),a.attributes&&Object.entries(a.attributes).forEach((function(t){var e=C(t,2),n=e[0],r=e[1];return qt(u,n,r)})),ye(u,{url:e});var s=[];qt(s,"title",null!==(i=null!==(o=a.title)&&void 0!==o?o:null==c?void 0:c.title)&&void 0!==i?i:K),null!=c&&c.referrer&&qt(s,"referrer",c.referrer),qt(s,"type",n?Mt:jt),qt(s,"change_state",r?Ft:Ut);var l={timeUnixNano:t,attributes:u,severityNumber:Dt.INFO,severityText:"INFO",body:{kvlistValue:{values:s}}},f=Kt();f&&(l.traceId=f.traceId,l.spanId=f.spanId),vt(l)}function jn(){var t=null==s?void 0:s.performance.getEntriesByType("navigation")[0];if(t){var e=[];qt(e,Tt,Pt.NAVIGATION_TIMING);var n=[];qt(n,"name",t.name),Mn(n,t,"responseStatus"),Mn(n,t,"fetchStart"),Mn(n,t,"requestStart"),Mn(n,t,"responseStart"),Mn(n,t,"domInteractive"),Mn(n,t,"domContentLoadedEventEnd"),Mn(n,t,"domComplete"),Mn(n,t,"loadEventEnd"),Mn(n,t,"transferSize"),Mn(n,t,"encodedBodySize"),Mn(n,t,"decodedBodySize");var r={timeUnixNano:Un(),attributes:e,severityNumber:Dt.INFO,severityText:"INFO",body:{kvlistValue:{values:n}}};ye(r.attributes);var o=Kt();o&&(r.traceId=o.traceId,r.spanId=o.spanId),vt(r)}else i("Navigation timings not available. Cannot emit navigation timing log")}function Mn(t,e,n){var r=e[n];"number"!=typeof r||isNaN(r)||qt(t,n,Number.isInteger(r)?r:Z(r))}function Un(){return j(Math.round(M()))}var Fn={},Vn=!1,Bn=!1;function Wn(){Hn(null==s?void 0:s.location.href)}function qn(t){Hn(t.newURL)}function Hn(t,e){var n;if(t)try{var r=new URL(t,null==s?void 0:s.location.href);((n=r).pathname!==Fn.path||Bn&&n.search!==Fn.search||Vn&&n.hash!==Fn.hash)&&(zn(r),Dn(D(),r,!0,Boolean(e)))}catch(t){i("Failed to handle url change",t)}}function zn(t){Fn.path=t.pathname,Fn.search=t.search,Fn.hash=t.hash}function Gn(){!function(){try{Dn(Un(),null!=s&&s.location.href?new URL(null==s?void 0:s.location.href):void 0)}catch(t){r("Failed to transmit initial page view event",t)}if("complete"===(null==c?void 0:c.readyState))return jn();s&&g(s,"load",(function(){setTimeout(jn,0)}))}(),function(){var t,e,n,r;if(s&&s.history){if(J.pageViewInstrumentation.trackVirtualPageViews){Bn=null!==(t=null===(e=J.pageViewInstrumentation.includeParts)||void 0===e?void 0:e.includes("SEARCH"))&&void 0!==t&&t,Vn=null!==(n=null===(r=J.pageViewInstrumentation.includeParts)||void 0===r?void 0:r.includes("HASH"))&&void 0!==n&&n,$(s.history,"replaceState",(function(t){return function(e,n,r){return Hn(r?String(r):void 0,!0),t.apply(this,[e,n,r])}})),$(s.history,"pushState",(function(t){return function(e,n,r){return Hn(r?String(r):void 0),t.apply(this,[e,n,r])}})),s.addEventListener("hashchange",qn),s.addEventListener("popstate",Wn);try{zn(new URL(s.location.href))}catch(t){}}}else i("Browser does not support history API, skipping instrumentation")}()}var Kn=function(t){if("object"===x(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},Zn=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]=Zn.options.mergeArrays?Zn.options.uniqueArrayItems?Array.from(new Set(t[n].concat(e[n]))):[].concat(L(t[n]),L(e[n])):e[n]:Kn(t[n])&&Kn(e[n])?t[n]=Zn(t[n],e[n]):!Kn(t[n])&&Kn(e[n])?t[n]=Zn(e[n],void 0):t[n]=void 0===e[n]?Zn.options.allowUndefinedOverrides?e[n]:t[n]:e[n])})),t}),{})},Yn={allowUndefinedOverrides:!0,mergeArrays:!0,uniqueArrayItems:!0};Zn.options=Yn,Zn.withOptions=function(t){Zn.options=Object.assign(Object.assign({},Yn),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=Zn.apply(void 0,n);return Zn.options=Yn,i};var Qn=!1;var Xn={init:function(t){Qn?i("Dash0 SDK is being reinitialized, skipping ..."):null!=s?"function"==typeof v&&d&&d.getEntriesByType?(J.endpoints=t.endpoint instanceof Array?t.endpoint:[t.endpoint],0!==J.endpoints.length?(Object.assign(J,Zn(J,function(t,e){var n,r={},i=O(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){qt(J.resource.attributes,ht,t.serviceName),t.serviceVersion&&qt(J.resource.attributes,mt,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&&qt(J.resource.attributes,yt,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&&qt(J.resource.attributes,gt,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&&qt(J.resource.attributes,bt,r)}(t),function(t){var e;qt(J.signalAttributes,wt,y(16)),qt(J.signalAttributes,St,null!==(e=null==l?void 0:l.userAgent)&&void 0!==e?e:K),t.additionalSignalAttributes&&Object.entries(t.additionalSignalAttributes).forEach((function(t){var e=C(t,2),n=e[0],r=e[1];qt(J.signalAttributes,n,r)}))}(t),me(),ee(t.sessionInactivityTimeoutMillis,t.sessionTerminationTimeoutMillis),Gn(),cn(),Sn(),s&&s.fetch&&s.Request?$(s,"fetch",Cn):i("Browser does not support the Fetch API, skipping instrumentation"),Qn=!0):n("No telemetry endpoint configured. Aborting Dash0 Web SDK initialization process.")):i("Stopping Dash0 Web SDK initialization. This browser does not support the necessary APIs"):i("Looks like we are not running in a browser context. Stopping Dash0 Web SDK initialization.")},debug:function(){i("Dash0 Web SDK configuration state:",J)},identify:function(t,e){Ht(J.signalAttributes,At),null!=t&&qt(J.signalAttributes,At,t),Ht(J.signalAttributes,Ot),null!=(null==e?void 0:e.name)&&qt(J.signalAttributes,Ot,e.name),Ht(J.signalAttributes,It),null!=(null==e?void 0:e.fullName)&&qt(J.signalAttributes,It,e.fullName),Ht(J.signalAttributes,Nt),null!=(null==e?void 0:e.email)&&qt(J.signalAttributes,Nt,e.email),Ht(J.signalAttributes,_t),null!=(null==e?void 0:e.hash)&&qt(J.signalAttributes,_t,e.hash),Ht(J.signalAttributes,Ct),null!=(null==e?void 0:e.roles)&&qt(J.signalAttributes,Ct,e.roles)},terminateSession:function(){if(b)try{!function(t){b&&p&&p.removeItem(t)}(Xt)}catch(t){e("Failed to terminate session",t)}},reportError:function(t,e){Ae(t,e)},addSignalAttribute:function(t,e){qt(J.signalAttributes,t,e)},removeSignalAttribute:function(t){Ht(J.signalAttributes,t)},sendEvent:function(t,e){var r;if(Object.values(Pt).includes(t))n("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 i=[];ye(i),Object.entries(null!==(r=null==e?void 0:e.attributes)&&void 0!==r?r:{}).forEach((function(t){var e=C(t,2),n=e[0],r=e[1];return qt(i,n,r)})),qt(i,Tt,t),null!=e&&e.title&&qt(i,"dash0.web.event.title",e.title),vt({timeUnixNano:null!=(null==e?void 0:e.timestamp)?j(e.timestamp):D(),attributes:i,body:Bt(null==e?void 0:e.data),severityText:null==e?void 0:e.severity,severityNumber:null!=e&&e.severity?Dt[e.severity]:void 0})}}};function $n(t){var e=t[0],r=Xn[e];if(r){for(var i=[],o=1;o<t.length;o++)i.push(t[o]);r.apply(null,i)}else n("Unsupported Dash0 Web SDK api: ",t[0])}!function(){i("".concat("Initializing Dash0 Web SDK"," (via Script)"));var t=s.dash0;if(!t)return void n("global 'dash0' not found. Did you use the correct Dash0 Web SDK initializer?");if(!t._q)return void n("Dash0 Web SDK command queue not defined. Did you add the script tag multiple times to your website?");(function(t){for(var e=0,n=t.length;e<n;e++)$n(t[e])})(t._q),s.dash0=function(){return $n(arguments)}}()}();
1
+ !function(){"use strict";function t(){}o("log");var e=o("info"),n=o("warn"),r=o("error"),i=o("debug");function o(e){return"undefined"==typeof console||"function"!=typeof console.log||"function"!=typeof console.log.apply?t:console[e]&&"function"==typeof console[e].apply?function(){console[e].apply(console,arguments)}:function(){console.log.apply(console,arguments)}}var a=Object.prototype.hasOwnProperty;function u(t,e){return a.call(t,e)}var s="undefined"!=typeof window?window:void 0,c=null==s?void 0:s.document,l=null==s?void 0:s.navigator,f="undefined"!=typeof location?location:void 0,d=(null==s?void 0:s.performance)||(null==s?void 0:s.webkitPerformance)||(null==s?void 0:s.msPerformance)||(null==s?void 0:s.mozPerformance);null==s||s.encodeURIComponent;var v=null==s?void 0:s.fetch,p=function(){try{var t;return null!==(t=null==s?void 0:s.localStorage)&&void 0!==t?t:null}catch(t){return null}}(),h=function(){try{var t;return null!==(t=null==s?void 0:s.sessionStorage)&&void 0!==t?t:null}catch(t){return null}}(),m=Array(32);function y(t){for(var e=0;e<2*t;e++)m[e]=Math.floor(16*Math.random())+48,m[e]>=58&&(m[e]+=39);return String.fromCharCode.apply(null,m.slice(0,2*t))}function g(t,e,n){t.addEventListener?t.addEventListener(e,n,!1):t.attachEvent&&t.attachEvent("on"+e,n)}var b=null!=p&&"function"==typeof p.getItem&&"function"==typeof p.setItem;function T(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 E(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 w(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){E(o,r,i,a,u,"next",t)}function u(t){E(o,r,i,a,u,"throw",t)}a(void 0)}))}}function S(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function A(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,R(r.key),r)}}(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function O(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=k(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 I(t,e,n){return(e=R(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function N(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 _(){_=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(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 C(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 L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function R(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(C,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,R.prototype={constructor:R,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(L),!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),L(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;L(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 C(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)||k(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 L(t){return function(t){if(Array.isArray(t))return T(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||k(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 R(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 x(t){return x="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},x(t)}function k(t,e){if(t){if("string"==typeof t)return T(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)?T(t,e):void 0}}function P(){return(new Date).getTime()}function D(){var t=M();return t?String(1e6*(d.now()+t)):j(new Date)}function j(t){return"object"===x(t)?j(t.getTime()):String(t)+"000000"}function M(){var t,e=null==d?void 0:d.timeOrigin;"number"!=typeof e&&(e=null==d||null===(t=d.timing)||void 0===t?void 0:t.fetchStart);return e}var U={setTimeout:null==s?void 0:s.setTimeout,clearTimeout:null==s?void 0:s.clearTimeout,setInterval:null==s?void 0:s.setInterval,clearInterval:null==s?void 0:s.clearInterval},F=null!=s&&null!=s.Zone&&null!=s.Zone.root&&"function"==typeof s.Zone.root.run;function V(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return W.apply("setTimeout",arguments)}function B(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return W.apply("setInterval",arguments)}function W(){var t,e=this;if(F)try{var r=Array.prototype.slice.apply(arguments);return s.Zone.root.run(U[e],s,r)}catch(t){n("Failed to execute %s inside of zone (via Zone.js). Falling back to execution inside currently active zone.",e,t)}return null===(t=U[e])||void 0===t?void 0:t.apply(s,arguments)}F&&i("Discovered Zone.js globals. Will attempt to register all timers inside the root Zone.");d&&d.getEntriesByType;var q=d&&"function"==typeof s.PerformanceObserver&&"function"==typeof d.now,H=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"});function z(e){return q?{start:function(){n=d.now();try{var t,e=null==s?void 0:s.PerformanceObserver;if(e)null===(t=o=new e(f))||void 0===t||t.observe({type:"resource"})}catch(t){}u=V(p,6e5)},end:function(){r=d.now(),h(),i||!G()?l():(g(c,"visibilitychange",v),a=V(l,e.maxWaitForResourceMillis))},cancel:p}:function(e){var n=0;return{start:function(){n=P()},end:function(){return e({duration:P()-n})},cancel:t}}(e.onEnd);var n,r,i,o,a,u;function l(){var t;p(),null!==(t=i)&&void 0!==t&&t.duration&&i.duration<864e5?e.onEnd({resource:i,duration:Math.round(i.duration)}):e.onEnd({resource:i,duration:Math.round(r-n)})}function f(t){var o=t.getEntriesByType("resource").find((function(t){var i=t;return i.startTime>=n&&(!r||r+e.maxToleranceForResourceTimingsMillis>=i.responseEnd)&&e.resourceMatcher(i)}));o&&(i=o,r&&l())}function v(){G()||l()}function p(){!function(){if(o){try{var t;null===(t=o)||void 0===t||t.disconnect()}catch(t){}o=void 0}}(),a&&(clearTimeout(a),a=void 0),h(),function(){if(!c)return;t=c,e="visibilitychange",n=v,t.removeEventListener?t.removeEventListener(e,n,!1):t.detachEvent&&t.detachEvent("on"+e,n);var t,e,n}()}function h(){u&&(clearTimeout(u),u=void 0)}}function G(){return"visible"===(null==c?void 0:c.visibilityState)||"prerender"===(null==c?void 0:c.visibilityState)}var K="undefined";function Z(t){return Math.round(100*t)/100}function Y(t){var e;return"string"!=typeof t?t:new URL(t,null!==(e=null==c?void 0:c.baseURI)&&void 0!==e?e:null==f?void 0:f.href)}function Q(t){try{return Y(t).origin===("undefined"!=typeof location?location.origin:void 0)}catch(t){return!1}}var X=Symbol.for("INSTRUMENTED_BY_DASH0");function $(t,e,n){var r=t[e];r?(!0===r[X]&&i("".concat(String(e)," has already been instrumented, skipping")),function(t){t[X]=!0}(r),t[e]=n(r)):i("".concat(String(e)," is not defined, unable to instrument"))}var J={endpoints:[],resource:{attributes:[]},scope:{name:"dash0-web-sdk",version:"0.13.1",attributes:[]},signalAttributes:[],ignoreUrls:[],ignoreErrorMessages:[],wrapEventHandlers:!0,wrapTimers:!0,propagateTraceHeadersCorsURLs:[],maxWaitForResourceTimingsMillis:1e4,maxToleranceForResourceTimingsMillis:3e3,headersToCapture:[],pageViewInstrumentation:{trackVirtualPageViews:!0,includeParts:[]}};function tt(t,e){for(var n=0,r=t.length;n<r;n++)if(t[n].test(e))return!0;return!1}var et="data:";function nt(t){return!t||(!(t=String(t))||(null==t.substring||t.substring(0,5).toLowerCase()===et||(!!function(t){for(var e=t.toLowerCase(),n=0,r=J.endpoints.length;n<r;n++){var i=J.endpoints[n];if(e.startsWith(i.url))return!0}return!1}(t)||tt(J.ignoreUrls,t))))}var rt=!1;function it(t){var e,n,r=[];return n=i,rt&&n(),c&&s&&(g(c,"visibilitychange",(function(){"visible"!==c.visibilityState&&n()})),g(s,"pagehide",(function(){rt=!0,n()})),g(s,"beforeunload",(function(){rt=!0,n()}))),{send:function(n){"visible"===(null==c?void 0:c.visibilityState)?(r.push(n),r.length>=15?i():null==e&&(e=V(i,1e3))):t([n])}};function i(){null!=e&&(clearTimeout(e),e=null),r.length>0&&(t(r.slice()),r.length=0)}}function ot(t,e){return at.apply(this,arguments)}function at(){return at=w(_().mark((function e(r,i){var o,a,u,s;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=JSON.stringify(i),a=o,u=o.length,s=!1,"undefined"==typeof CompressionStream){e.next=10;break}return e.next=7,ut(o);case 7:a=e.sent,u=a.byteLength,s=!0;case 10:return e.next=12,Promise.all(J.endpoints.map(function(){var e=w(_().mark((function e(i){var o,c,l;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,(o=new URL(i.url)).pathname=o.pathname+(o.pathname.endsWith("/")?r.substring(1):r),c={"Content-Type":"application/json",Authorization:"Bearer ".concat(i.authToken)},i.dataset&&(c["Dash0-Dataset"]=i.dataset),s&&(c["Content-Encoding"]="gzip"),v){e.next=9;break}return n("Unable to send telemetry, fetch is not defined"),e.abrupt("return");case 9:return e.next=11,v(o,{method:"POST",headers:c,body:a,keepalive:u<=6e4});case 11:(l=e.sent).text().catch(t),l.ok||n("Failed to send telemetry to ".concat(o,": ").concat(l.status," ").concat(l.statusText)),e.next=19;break;case 16:e.prev=16,e.t0=e.catch(0),n("Error sending telemetry to ".concat(i.url).concat(r,":"),e.t0);case 19:case"end":return e.stop()}}),e,null,[[0,16]])})));return function(t){return e.apply(this,arguments)}}()));case 12:case"end":return e.stop()}}),e)}))),at.apply(this,arguments)}function ut(t){return st.apply(this,arguments)}function st(){return(st=w(_().mark((function t(e){var n,r,i;return _().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 ct,lt=it((function(t){ot("/v1/logs",{resourceLogs:[{resource:J.resource,scopeLogs:[{scope:J.scope,logRecords:t}]}]}).catch((function(t){r("Failed to transmit logs",t)}))})),ft=it((function(t){ot("/v1/traces",{resourceSpans:[{resource:J.resource,scopeSpans:[{scope:J.scope,spans:t}]}]}).catch((function(t){r("Failed to transmit spans",t)}))}));function dt(){var t,e,n,r,i,o,a;return ct||(e=(t={maxCalls:8096,maxCallsPerTenMinutes:4096,maxCallsPerTenSeconds:128}).maxCalls,n=t.maxCallsPerTenMinutes,r=t.maxCallsPerTenSeconds,i=0,o=0,a=0,B((function(){o=0}),6e5),B((function(){a=0}),1e4),ct=function(){return++i>e||++o>n||++a>r}),ct()}function vt(t){dt()?i("Transport rate limit. Will not send item.",t):lt.send(t)}function pt(t){dt()?i("Transport rate limit. Will not send item.",t):ft.send(t)}var ht="service.name",mt="service.version",yt="deployment.environment.name",gt="deployment.name",bt="deployment.id",Tt="event.name",Et="dash0.web.event.id",wt="page.load.id",St="user_agent.original",At="user.id",Ot="user.name",It="user.full_name",Nt="user.email",_t="user.hash",Ct="user.roles",Lt="exception.message",Rt="exception.type",xt="exception.stacktrace",kt="url.full",Pt={PAGE_VIEW:"browser.page_view",NAVIGATION_TIMING:"browser.navigation_timing",WEB_VITAL:"browser.web_vital",ERROR:"browser.error"},Dt={UNSPECIFIED:0,TRACE:1,DEBUG:5,INFO:9,WARN:13,ERROR:17,FATAL:21},jt=0,Mt=1,Ut="pushState",Ft="replaceState",Vt=["stringValue","boolValue","intValue","doubleValue","arrayValue","kvlistValue","bytesValue"];function Bt(t){if(null!=t){var e={};return Array.isArray(t)?e.arrayValue={values:t.map((function(t){return Bt(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"!==x(t))return!1;var e=Object.keys(t);return 1===e.length&&Vt.includes(e[0])}(t)?"object"===x(t)&&(e.kvlistValue={values:Object.entries(t).map((function(t){var e=C(t,2);return Wt(e[0],e[1])}))}):e=t,e}}function Wt(t,e){return{key:t,value:Bt(e)}}function qt(t,e,n){e&&t.push(Wt(e,n))}function Ht(t,e){var n=t.findIndex((function(t){return t.key===e}));-1!==n&&t.splice(n,1)}var zt="traceparent",Gt=/^00-([a-f0-9]{32})-([a-f0-9]{16})-[0-9]{1,2}$/;function Kt(){var t,e,n=((null===(t=Array.from(null!==(e=null==c?void 0:c.getElementsByTagName("meta"))&&void 0!==e?e:[]).find((function(t){var e;return(null===(e=t.getAttribute("name"))||void 0===e?void 0:e.toLowerCase())===zt})))||void 0===t?void 0:t.content.trim())||"").match(Gt)||function(){var t=d.getEntriesByType("navigation")[0];if(!t)return"";if(!t.serverTiming)return"";return function(t){var e,n=O(t);try{for(n.s();!(e=n.n()).done;){var r=e.value;if(r.name===zt)return r.description.trim()}}catch(t){n.e(t)}finally{n.f()}return""}(t.serverTiming)}().match(Gt);if(n)return{traceId:n[1],spanId:n[2]}}function Zt(t,e,n){t.call(e,"traceparent","00-".concat(n.traceId,"-").concat(n.spanId,"-01"))}var Yt=1;function Qt(){var t,e;return"".concat((t={ephemeralSession:!b},e=0,t.ephemeralSession&&(e|=Yt),e.toString(16).padStart(2,"0"))).concat(y(7))}var Xt="d0_session",$t="#",Jt=864e5,te=null;function ee(t,e){if(!b)return i("Storage API is not available and session tracking is therefore not supported."),void(te=Qt());t||(t=108e5),e||(e=216e5),t=Math.min(t,Jt),e=Math.min(e,Jt);try{var r=function(t){return b&&p?p.getItem(t):null}(Xt),o=function(t){if(!t)return null;var e=t.split($t);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}}(r);o&&!function(t,e,n){var r=P()-e;if(t.lastActivityTime<r)return!1;var i=P()-n;return t.startTime>=i}(o,t,e)&&(o=null),o?o.lastActivityTime=P():o={id:Qt(),startTime:P(),lastActivityTime:P()},function(t,e){b&&p&&p.setItem(t,e)}(Xt,function(t){return t.id+$t+t.startTime+$t+t.lastActivityTime}(o)),te=o.id}catch(t){n("Failed to record session information",t)}}var ne="d042",re=1;function ie(t){var e=0;return t.withoutSession&&(e|=re),e.toString(16).padStart(2,"0")}for(var oe=new Uint32Array(256),ae=0;ae<256;ae++){for(var ue=ae,se=0;se<8;se++)ue=1&ue?3988292384^ue>>>1:ue>>>1;oe[ae]=ue>>>0}function ce(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^oe[255&(r^o)]}return(4294967295^r)>>>0}(t).toString(16).padStart(8,"0");return"".concat(e).concat(y(4))}function le(t){var e=function(t){return t?"".concat(ne).concat(ie({withoutSession:!1})).concat(t).concat(y(5)):"".concat(ne).concat(ie({withoutSession:!0})).concat(y(13))}(te),n=ce(e),r=[];return qt(r,Et,n),{traceId:e,spanId:n,name:t,kind:3,startTimeUnixNano:D(),attributes:r,events:[],links:[],status:{code:0}}}function fe(t,e,n){var r=t;return e&&(r.status=e),r.endTimeUnixNano=null!=n?String(Math.round(parseInt(r.startTimeUnixNano)+n)):D(),r}function de(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:D(),attributes:null!=o?o:[]})}var ve=null!=h&&"function"==typeof h.getItem&&"function"==typeof h.setItem;var pe="d0_tab",he=null;function me(){if(ve)try{var t=function(t){return ve&&h?h.getItem(t):null}(pe);if(t)return void(he=t);he=y(8),function(t,e){ve&&h&&h.setItem(t,e)}(pe,he)}catch(t){n("Failed to record tab ID information",t)}else i("Storage API is not available and tab tracking is therefore not supported.")}function ye(t,e){var n,r,i,o,a;void 0===t.find((function(t){return t.key===Et}))&&qt(t,Et,y(8));for(var u=0;u<J.signalAttributes.length;u++)t.push(J.signalAttributes[u]);!function(t,e){try{var n=Y(e);n.username&&(n.username="REDACTED"),n.password&&(n.password="REDACTED"),qt(t,kt,n.href),qt(t,"url.path",n.pathname),qt(t,"url.domain",n.hostname),qt(t,"url.scheme",n.protocol.replace(":","")),n.hash&&qt(t,"url.fragment",n.hash.replace("#","")),n.search&&qt(t,"url.query",n.search.replace("?",""))}catch(n){qt(t,kt,String(e))}}(t,null!==(n=null!==(r=null==e?void 0:e.url)&&void 0!==r?r:null==s?void 0:s.location.href)&&void 0!==n?n:K),te&&qt(t,"session.id",te),he&&qt(t,"browser.tab.id",he),qt(t,"browser.window.width",null!==(i=null==s?void 0:s.innerWidth)&&void 0!==i?i:K),qt(t,"browser.window.height",null!==(o=null==s?void 0:s.innerHeight)&&void 0!==o?o:K);var c=null==l||null===(a=l.connection)||void 0===a?void 0:a.effectiveType;c&&qt(t,"network.connection.subtype",c)}var ge,be=0,Te=0,Ee={},we=!1;function Se(){we=!0}function Ae(t,e){t&&Oe("string"==typeof t?{message:t,opts:e}:{message:t.message,type:t.name,stack:t.stack,opts:e})}function Oe(t){var e=t.message,n=t.type,r=t.stack,i=t.opts;if(e&&!(be>100)&&!function(t){return!t||tt(J.ignoreErrorMessages,t)}(e)){Te>=20&&(Ee={},Te=0);var o=(e=String(e).substring(0,300))+(r=function(t){return String(t||"").split("\n").slice(0,30).join("\n")}(r))+(null==s?void 0:s.location.href),a=Ee[o];if(a)a.seenCount++;else{var u=[];qt(u,Tt,Pt.ERROR),qt(u,Lt,e),n&&qt(u,Rt,n),r&&qt(u,xt,r),null!=i&&i.componentStack&&qt(u,"exception.component_stack",null==i?void 0:i.componentStack.substring(0,2048)),ye(u),a={seenCount:1,transmittedCount:0,log:{timeUnixNano:D(),attributes:u,severityNumber:Dt.ERROR,severityText:"ERROR",body:{stringValue:e}}},Ee[o]=a,Te++}!function(){if(ge)return;ge=setTimeout(Ie,1e3)}()}}function Ie(){for(var t in ge&&(clearTimeout(ge),ge=null),Ee)if(u(Ee,t)){var e=Ee[t];e.seenCount>e.transmittedCount&&(vt(e.log),be++)}Ee={},Te=0}var Ne=-1,_e=function(t){addEventListener("pageshow",(function(e){e.persisted&&(Ne=e.timeStamp,t(e))}),!0)},Ce=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)))}},Le=function(t){requestAnimationFrame((function(){return requestAnimationFrame((function(){return t()}))}))},Re=function(){var t=performance.getEntriesByType("navigation")[0];if(t&&t.responseStart>0&&t.responseStart<performance.now())return t},xe=function(){var t,e=Re();return null!==(t=null==e?void 0:e.activationStart)&&void 0!==t?t:0},ke=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1,n=Re(),r="navigate";return Ne>=0?r="back-forward-cache":n&&(document.prerendering||xe()>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}},Pe=new WeakMap;function De(t,e){return Pe.get(t)||Pe.set(t,new e),Pe.get(t)}var je,Me=function(){return A((function t(){S(this,t),I(this,"t",void 0),I(this,"i",0),I(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)}}}])}(),Ue=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?N(Object(n),!0).forEach((function(e){I(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):N(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({type:t,buffered:!0},n)),r}}catch(t){}},Fe=function(t){var e=!1;return function(){e||(t(),e=!0)}},Ve=-1,Be=function(){return"hidden"!==document.visibilityState||document.prerendering?1/0:0},We=function(t){"hidden"===document.visibilityState&&Ve>-1&&(Ve="visibilitychange"===t.type?t.timeStamp:0,He())},qe=function(){addEventListener("visibilitychange",We,!0),addEventListener("prerenderingchange",We,!0)},He=function(){removeEventListener("visibilitychange",We,!0),removeEventListener("prerenderingchange",We,!0)},ze=function(){if(Ve<0){var t,e=xe(),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;Ve=null!=n?n:Be(),qe(),_e((function(){setTimeout((function(){Ve=Be(),qe()}))}))}return{get firstHiddenTime(){return Ve}}},Ge=function(t){document.prerendering?addEventListener("prerenderingchange",(function(){return t()}),!0):t()},Ke=[1800,3e3],Ze=[.1,.25],Ye=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]:{};Ge((function(){var n,r=ze(),i=ke("FCP"),o=Ue("paint",(function(t){var e,a=O(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-xe(),0),i.entries.push(u),n(!0)))}}catch(t){a.e(t)}finally{a.f()}}));o&&(n=Ce(t,i,Ke,e.reportAllChanges),_e((function(r){i=ke("FCP"),n=Ce(t,i,Ke,e.reportAllChanges),Le((function(){i.value=performance.now()-r.timeStamp,n(!0)}))})))}))}(Fe((function(){var n,r=ke("CLS",0),i=De(e,Me),o=function(t){var e,o=O(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=Ue("layout-shift",o);a&&(n=Ce(t,r,Ze,e.reportAllChanges),document.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&(o(a.takeRecords()),n(!0))})),_e((function(){i.i=0,r=ke("CLS",0),n=Ce(t,r,Ze,e.reportAllChanges),Le((function(){return n()}))})),setTimeout(n))})))},Qe=0,Xe=1/0,$e=0,Je=function(t){var e,n=O(t);try{for(n.s();!(e=n.n()).done;){var r=e.value;r.interactionId&&(Xe=Math.min(Xe,r.interactionId),$e=Math.max($e,r.interactionId),Qe=$e?($e-Xe)/7+1:0)}}catch(t){n.e(t)}finally{n.f()}},tn=function(){var t;return je?Qe:null!==(t=performance.interactionCount)&&void 0!==t?t:0},en=0,nn=function(){return A((function t(){S(this,t),I(this,"u",[]),I(this,"l",new Map),I(this,"m",void 0),I(this,"v",void 0)}),[{key:"p",value:function(){en=tn(),this.u.length=0,this.l.clear()}},{key:"P",value:function(){var t=Math.min(this.u.length-1,Math.floor((tn()-en)/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=O(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)}}}}])}(),rn=function(t){var e=globalThis.requestIdleCallback||setTimeout;"hidden"===document.visibilityState?t():(t=Fe(t),document.addEventListener("visibilitychange",t,{once:!0}),e((function(){t(),document.removeEventListener("visibilitychange",t)})))},on=[200,500],an=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};globalThis.PerformanceEventTiming&&"interactionId"in PerformanceEventTiming.prototype&&Ge((function(){var n;"interactionCount"in performance||je||(je=Ue("event",Je,{type:"event",buffered:!0,durationThreshold:0}));var r,i=ke("INP"),o=De(e,nn),a=function(t){rn((function(){var e,n=O(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=Ue("event",a,{durationThreshold:null!==(n=e.durationThreshold)&&void 0!==n?n:40});r=Ce(t,i,on,e.reportAllChanges),u&&(u.observe({type:"first-input",buffered:!0}),document.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&(a(u.takeRecords()),r(!0))})),_e((function(){o.p(),i=ke("INP"),r=Ce(t,i,on,e.reportAllChanges)})))}))},un=function(){return A((function t(){S(this,t),I(this,"m",void 0)}),[{key:"h",value:function(t){var e;null===(e=this.m)||void 0===e||e.call(this,t)}}])}(),sn=[2500,4e3];function cn(){!function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Ge((function(){var n,r=ze(),i=ke("LCP"),o=De(e,un),a=function(t){e.reportAllChanges||(t=t.slice(-1));var a,u=O(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-xe(),0),i.entries=[s],n())}}catch(t){u.e(t)}finally{u.f()}},u=Ue("largest-contentful-paint",a);if(u){n=Ce(t,i,sn,e.reportAllChanges);for(var s=Fe((function(){a(u.takeRecords()),u.disconnect(),n(!0)})),c=0,l=["keydown","click","visibilitychange"];c<l.length;c++)addEventListener(l[c],(function(){return rn(s)}),{capture:!0,once:!0});_e((function(r){i=ke("LCP"),n=Ce(t,i,sn,e.reportAllChanges),Le((function(){i.value=performance.now()-r.timeStamp,n(!0)}))}))}}))}(ln,{reportAllChanges:!0}),an(ln,{reportAllChanges:!0}),Ye(ln,{reportAllChanges:!0})}function ln(t){var e=[];qt(e,Tt,Pt.WEB_VITAL);var n=[];qt(n,"name",t.name),qt(n,"value",Z(t.value)),qt(n,"delta",Z(t.delta));var r={timeUnixNano:D(),attributes:e,severityNumber:Dt.INFO,severityText:"INFO",body:{kvlistValue:{values:n}}};ye(r.attributes),vt(r)}var fn="Unhandled promise rejection: ",dn="<unavailable because Promise wasn't rejected with an Error object>";function vn(t){null==t.reason?Ae({message:fn+"<no reason defined>",stack:dn}):"string"==typeof t.reason.message?Ae({message:fn+t.reason.message,stack:"string"==typeof t.reason.stack?t.reason.stack:dn}):"object"!==x(t.reason)&&Ae({message:fn+t.reason,stack:dn})}var pn="__dash0OriginalFunctions";function hn(t,e){for(var n=t[pn],r=0;r<n.length;r++){if(mn(n[r].valuesForEqualityCheck,e))return r}return-1}function mn(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 yn(t,e,n,r,i){return function(t,e,n){if(!t)return e;var r=t[pn]=t[pn]||[],i=hn(t,n);return-1!==i?r[i].wrappedFunction:(r.push({wrappedFunction:e,valuesForEqualityCheck:n}),e)}(t,e,gn(n,r,i))}function gn(t,e,n){return[t,e,bn(n)]}function bn(t){return null!=t&&("object"===x(t)?Boolean(t.capture):Boolean(t))}function Tn(t,e,n,r,i){return function(t,e,n){var r=null==t?void 0:t[pn];if(null==r)return n;var i=hn(t,e);if(-1===i)return n;var o=r[i];return r.splice(i,1),o.wrappedFunction}(t,gn(e,n,r),i)}function En(){J.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),Se(),t}},i[1]=yn(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]=Tn(this,t,e,r,e),n.apply(this,i)}}(null==s?void 0:s.EventTarget)}function wn(t){var e=null==s?void 0:s[t];"function"==typeof e&&(s[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),Se(),t}}}(t),e.apply(this,n)})}function Sn(){!function(){if(s){var t=s.onerror;s.onerror=function(e,n,r,i,o){if(we)return we=!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)),Oe({message:String(e),stack:a}),"function"==typeof t?t.apply(this,arguments):void 0}}}(),"function"==typeof(null==s?void 0:s.addEventListener)&&s.addEventListener("unhandledrejection",vn),En(),function(){if(J.wrapTimers){if(F)return void n("We discovered a usage of Zone.js. In order to avoid any incompatibility issues timer wrapping is not going to be enabled.");wn("setTimeout"),wn("setInterval")}}()}var An=["GET","HEAD","POST","PUT","DELETE","CONNECT","OPTIONS","TRACE","PATCH"];function On(t){return An.includes(t)}function In(t,e){var n=0!==e.startTime;Nn(t,H.FETCH_START,e,n),Nn(t,H.DOMAIN_LOOKUP_START,e,n),Nn(t,H.DOMAIN_LOOKUP_END,e,n),Nn(t,H.CONNECT_START,e,n),Nn(t,H.SECURE_CONNECTION_START,e,n),Nn(t,H.CONNECT_END,e,n),Nn(t,H.REQUEST_START,e,n),Nn(t,H.RESPONSE_START,e,n),Nn(t,H.RESPONSE_END,e,n)}function Nn(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]||de(t,e,(r=n[e],String(Math.round(1e6*(r+M())))))}function _n(t,e){var n=e.encodedBodySize;null!=n&&qt(t.attributes,"http.response.body.size",n)}function Cn(t){return function(){var e=w(_().mark((function e(n,r){var o,a,u,s,c,l,f,d,v,p,h,m,y,g;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(u=r?Object.assign({},r):r,s=null,null!==(o=u)&&void 0!==o&&o.body&&(s=u.body,u.body=void 0),c=new Request(n,u),s&&u&&(u.body=s),!nt(l=c.url)){e.next=9;break}return i("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!==(a=c.method)&&void 0!==a?a:"GET",d=On(f),v=On(f.toUpperCase()),p=v?f.toUpperCase():"_OTHER",ye((h=le("HTTP ".concat(p))).attributes,{url:l}),Ln(n,r),qt(h.attributes,"http.request.method",p),d||qt(h.attributes,"http.request.method_original",f),(Q(l)||tt(J.propagateTraceHeadersCorsURLs,l))&&(null!==(m=u)&&void 0!==m&&m.headers?(u.headers=new Headers(u.headers),Zt(u.headers.append,u.headers,h)):n instanceof Request?Zt(c.headers.append,c.headers,h):(u||(u={}),u.headers=new Headers,Zt(u.headers.append,u.headers,h))),Rn(c.headers,h,(function(t){return e=t,"".concat("http.request.header",".").concat(e.toLowerCase());var e})),(y=z({resourceMatcher:function(t){var e=t.initiatorType,n=t.name;return("fetch"===e||"xmlhttprequest"===e)&&n===Y(l).href},maxWaitForResourceMillis:J.maxWaitForResourceTimingsMillis,maxToleranceForResourceTimingsMillis:J.maxToleranceForResourceTimingsMillis,onEnd:function(t){var e=t.duration,n=t.resource;n&&(In(h,n),_n(h,n)),pt(fe(h,void 0,1e6*e))}})).start(),e.prev=23,e.next=26,t(n instanceof Request?c:n,u);case 26:return g=e.sent,xn(h,g),kn(g).then((function(){return y.end()})).catch((function(t){y.cancel(),Pn(h,t)})),e.abrupt("return",g);case 32:throw e.prev=32,e.t0=e.catch(23),y.cancel(),Pn(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 Ln(t,e,n){try{return void 0}catch(n){i("failed to analyze request for GraphQL insights",n,t,e)}}function Rn(t,e,n){try{t.forEach((function(t,r){J.headersToCapture.some((function(t){return t.test(r)}))&&qt(e.attributes,n(r),t)}))}catch(t){i("unable to capture http headers due to CORS policy")}}function xn(t,e){var n=e.status;!function(t,e,n){t.status={code:e,message:n}}(t,n>=200&&n<400?0:2,e.statusText),qt(t.attributes,"http.response.status_code",String(n)),Rn(e.headers,t,(function(t){return e=t,"".concat("http.response.header",".").concat(e.toLowerCase());var e}))}function kn(t){return new Promise((function(e){var n=t.clone().body;if(!n)return e();var r=n.getReader(),i=function(){var t=w(_().mark((function t(){var n;return _().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 Pn(t,e){!function(t,e){var n=[];"string"==typeof e?qt(n,Lt,e):e&&(e.code?qt(n,Rt,e.code.toString()):e.name&&qt(n,Rt,e.name),e.message&&qt(n,Lt,e.message),e.stack&&qt(n,xt,e.stack),de(t,"exception",n))}(t,e),pt(fe(t,function(t){return{code:2,message:t&&"object"===x(t)&&"message"in t?t.message:String(t)}}(e),void 0))}function Dn(t,e,n,r){var i,o,a=function(t){var e,n,r;return t&&null!==(e=null===(n=(r=J.pageViewInstrumentation).generateMetadata)||void 0===n?void 0:n.call(r,t))&&void 0!==e?e:{}}(e),u=[];qt(u,Tt,Pt.PAGE_VIEW),a.attributes&&Object.entries(a.attributes).forEach((function(t){var e=C(t,2),n=e[0],r=e[1];return qt(u,n,r)})),ye(u,{url:e});var s=[];qt(s,"title",null!==(i=null!==(o=a.title)&&void 0!==o?o:null==c?void 0:c.title)&&void 0!==i?i:K),null!=c&&c.referrer&&qt(s,"referrer",c.referrer),qt(s,"type",n?Mt:jt),qt(s,"change_state",r?Ft:Ut);var l={timeUnixNano:t,attributes:u,severityNumber:Dt.INFO,severityText:"INFO",body:{kvlistValue:{values:s}}},f=Kt();f&&(l.traceId=f.traceId,l.spanId=f.spanId),vt(l)}function jn(){var t=null==s?void 0:s.performance.getEntriesByType("navigation")[0];if(t){var e=[];qt(e,Tt,Pt.NAVIGATION_TIMING);var n=[];qt(n,"name",t.name),Mn(n,t,"responseStatus"),Mn(n,t,"fetchStart"),Mn(n,t,"requestStart"),Mn(n,t,"responseStart"),Mn(n,t,"domInteractive"),Mn(n,t,"domContentLoadedEventEnd"),Mn(n,t,"domComplete"),Mn(n,t,"loadEventEnd"),Mn(n,t,"transferSize"),Mn(n,t,"encodedBodySize"),Mn(n,t,"decodedBodySize");var r={timeUnixNano:Un(),attributes:e,severityNumber:Dt.INFO,severityText:"INFO",body:{kvlistValue:{values:n}}};ye(r.attributes);var o=Kt();o&&(r.traceId=o.traceId,r.spanId=o.spanId),vt(r)}else i("Navigation timings not available. Cannot emit navigation timing log")}function Mn(t,e,n){var r=e[n];"number"!=typeof r||isNaN(r)||qt(t,n,Number.isInteger(r)?r:Z(r))}function Un(){return j(Math.round(M()))}var Fn={},Vn=!1,Bn=!1;function Wn(){Hn(null==s?void 0:s.location.href)}function qn(t){Hn(t.newURL)}function Hn(t,e){var n;if(t)try{var r=new URL(t,null==s?void 0:s.location.href);((n=r).pathname!==Fn.path||Bn&&n.search!==Fn.search||Vn&&n.hash!==Fn.hash)&&(zn(r),Dn(D(),r,!0,Boolean(e)))}catch(t){i("Failed to handle url change",t)}}function zn(t){Fn.path=t.pathname,Fn.search=t.search,Fn.hash=t.hash}function Gn(){!function(){try{Dn(Un(),null!=s&&s.location.href?new URL(null==s?void 0:s.location.href):void 0)}catch(t){r("Failed to transmit initial page view event",t)}if("complete"===(null==c?void 0:c.readyState))return jn();s&&g(s,"load",(function(){setTimeout(jn,0)}))}(),function(){var t,e,n,r;if(s&&s.history){if(J.pageViewInstrumentation.trackVirtualPageViews){Bn=null!==(t=null===(e=J.pageViewInstrumentation.includeParts)||void 0===e?void 0:e.includes("SEARCH"))&&void 0!==t&&t,Vn=null!==(n=null===(r=J.pageViewInstrumentation.includeParts)||void 0===r?void 0:r.includes("HASH"))&&void 0!==n&&n,$(s.history,"replaceState",(function(t){return function(e,n,r){return Hn(r?String(r):void 0,!0),t.apply(this,[e,n,r])}})),$(s.history,"pushState",(function(t){return function(e,n,r){return Hn(r?String(r):void 0),t.apply(this,[e,n,r])}})),s.addEventListener("hashchange",qn),s.addEventListener("popstate",Wn);try{zn(new URL(s.location.href))}catch(t){}}}else i("Browser does not support history API, skipping instrumentation")}()}var Kn=function(t){if("object"===x(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},Zn=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]=Zn.options.mergeArrays?Zn.options.uniqueArrayItems?Array.from(new Set(t[n].concat(e[n]))):[].concat(L(t[n]),L(e[n])):e[n]:Kn(t[n])&&Kn(e[n])?t[n]=Zn(t[n],e[n]):!Kn(t[n])&&Kn(e[n])?t[n]=Zn(e[n],void 0):t[n]=void 0===e[n]?Zn.options.allowUndefinedOverrides?e[n]:t[n]:e[n])})),t}),{})},Yn={allowUndefinedOverrides:!0,mergeArrays:!0,uniqueArrayItems:!0};Zn.options=Yn,Zn.withOptions=function(t){Zn.options=Object.assign(Object.assign({},Yn),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=Zn.apply(void 0,n);return Zn.options=Yn,i};var Qn=!1;var Xn={init:function(t){Qn?i("Dash0 SDK is being reinitialized, skipping ..."):null!=s?"function"==typeof v&&d&&d.getEntriesByType?(J.endpoints=t.endpoint instanceof Array?t.endpoint:[t.endpoint],0!==J.endpoints.length?(Object.assign(J,Zn(J,function(t,e){var n,r={},i=O(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){qt(J.resource.attributes,ht,t.serviceName),t.serviceVersion&&qt(J.resource.attributes,mt,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&&qt(J.resource.attributes,yt,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&&qt(J.resource.attributes,gt,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&&qt(J.resource.attributes,bt,r)}(t),function(t){var e;qt(J.signalAttributes,wt,y(16)),qt(J.signalAttributes,St,null!==(e=null==l?void 0:l.userAgent)&&void 0!==e?e:K),t.additionalSignalAttributes&&Object.entries(t.additionalSignalAttributes).forEach((function(t){var e=C(t,2),n=e[0],r=e[1];qt(J.signalAttributes,n,r)}))}(t),me(),ee(t.sessionInactivityTimeoutMillis,t.sessionTerminationTimeoutMillis),Gn(),cn(),Sn(),s&&s.fetch&&s.Request?$(s,"fetch",Cn):i("Browser does not support the Fetch API, skipping instrumentation"),Qn=!0):n("No telemetry endpoint configured. Aborting Dash0 Web SDK initialization process.")):i("Stopping Dash0 Web SDK initialization. This browser does not support the necessary APIs"):i("Looks like we are not running in a browser context. Stopping Dash0 Web SDK initialization.")},debug:function(){i("Dash0 Web SDK configuration state:",J)},identify:function(t,e){Ht(J.signalAttributes,At),null!=t&&qt(J.signalAttributes,At,t),Ht(J.signalAttributes,Ot),null!=(null==e?void 0:e.name)&&qt(J.signalAttributes,Ot,e.name),Ht(J.signalAttributes,It),null!=(null==e?void 0:e.fullName)&&qt(J.signalAttributes,It,e.fullName),Ht(J.signalAttributes,Nt),null!=(null==e?void 0:e.email)&&qt(J.signalAttributes,Nt,e.email),Ht(J.signalAttributes,_t),null!=(null==e?void 0:e.hash)&&qt(J.signalAttributes,_t,e.hash),Ht(J.signalAttributes,Ct),null!=(null==e?void 0:e.roles)&&qt(J.signalAttributes,Ct,e.roles)},terminateSession:function(){if(b)try{!function(t){b&&p&&p.removeItem(t)}(Xt)}catch(t){e("Failed to terminate session",t)}},reportError:function(t,e){Ae(t,e)},addSignalAttribute:function(t,e){qt(J.signalAttributes,t,e)},removeSignalAttribute:function(t){Ht(J.signalAttributes,t)},sendEvent:function(t,e){var r;if(Object.values(Pt).includes(t))n("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 i=[];ye(i),Object.entries(null!==(r=null==e?void 0:e.attributes)&&void 0!==r?r:{}).forEach((function(t){var e=C(t,2),n=e[0],r=e[1];return qt(i,n,r)})),qt(i,Tt,t),null!=e&&e.title&&qt(i,"dash0.web.event.title",e.title),vt({timeUnixNano:null!=(null==e?void 0:e.timestamp)?j(e.timestamp):D(),attributes:i,body:Bt(null==e?void 0:e.data),severityText:null==e?void 0:e.severity,severityNumber:null!=e&&e.severity?Dt[e.severity]:void 0})}}};function $n(t){var e=t[0],r=Xn[e];if(r){for(var i=[],o=1;o<t.length;o++)i.push(t[o]);r.apply(null,i)}else n("Unsupported Dash0 Web SDK api: ",t[0])}!function(){i("".concat("Initializing Dash0 Web SDK"," (via Script)"));var t=s.dash0;if(!t)return void n("global 'dash0' not found. Did you use the correct Dash0 Web SDK initializer?");if(!t._q)return void n("Dash0 Web SDK command queue not defined. Did you add the script tag multiple times to your website?");(function(t){for(var e=0,n=t.length;e<n;e++)$n(t[e])})(t._q),s.dash0=function(){return $n(arguments)}}()}();
2
2
  //# sourceMappingURL=dash0.iife.js.map
package/dist/dash0.js CHANGED
@@ -1,2 +1,2 @@
1
- function t(){}o("log");var e=o("info"),n=o("warn"),r=o("error"),i=o("debug");function o(e){return"undefined"==typeof console||"function"!=typeof console.log||"function"!=typeof console.log.apply?t:console[e]&&"function"==typeof console[e].apply?function(){console[e].apply(console,arguments)}:function(){console.log.apply(console,arguments)}}var a=Object.prototype.hasOwnProperty;function u(t,e){return a.call(t,e)}var s="undefined"!=typeof window?window:void 0,c=null==s?void 0:s.document,l=null==s?void 0:s.navigator,f="undefined"!=typeof location?location:void 0,d=(null==s?void 0:s.performance)||(null==s?void 0:s.webkitPerformance)||(null==s?void 0:s.msPerformance)||(null==s?void 0:s.mozPerformance);null==s||s.encodeURIComponent;var v=null==s?void 0:s.fetch,p=function(){try{var t;return null!==(t=null==s?void 0:s.localStorage)&&void 0!==t?t:null}catch(t){return null}}(),h=function(){try{var t;return null!==(t=null==s?void 0:s.sessionStorage)&&void 0!==t?t:null}catch(t){return null}}(),y=Array(32);function m(t){for(var e=0;e<2*t;e++)y[e]=Math.floor(16*Math.random())+48,y[e]>=58&&(y[e]+=39);return String.fromCharCode.apply(null,y.slice(0,2*t))}function g(t,e,n){t.addEventListener?t.addEventListener(e,n,!1):t.attachEvent&&t.attachEvent("on"+e,n)}var b=null!=p&&"function"==typeof p.getItem&&"function"==typeof p.setItem;function T(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 E(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 w(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){E(o,r,i,a,u,"next",t)}function u(t){E(o,r,i,a,u,"throw",t)}a(void 0)}))}}function S(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function A(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,R(r.key),r)}}(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function O(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=k(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 I(t,e,n){return(e=R(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function N(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 C(){C=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(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 _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function R(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,R.prototype={constructor:R,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(_),!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),_(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;_(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 L(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)||k(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 _(t){return function(t){if(Array.isArray(t))return T(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||k(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 R(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 x(t){return x="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},x(t)}function k(t,e){if(t){if("string"==typeof t)return T(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)?T(t,e):void 0}}function P(){return(new Date).getTime()}function j(){var t=M();return t?String(1e6*(d.now()+t)):D(new Date)}function D(t){return"object"===x(t)?D(t.getTime()):String(t)+"000000"}function M(){var t,e=null==d?void 0:d.timeOrigin;"number"!=typeof e&&(e=null==d||null===(t=d.timing)||void 0===t?void 0:t.fetchStart);return e}var U={setTimeout:null==s?void 0:s.setTimeout,clearTimeout:null==s?void 0:s.clearTimeout,setInterval:null==s?void 0:s.setInterval,clearInterval:null==s?void 0:s.clearInterval},F=null!=s&&null!=s.Zone&&null!=s.Zone.root&&"function"==typeof s.Zone.root.run;function V(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return H.apply("setTimeout",arguments)}function B(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return H.apply("setInterval",arguments)}function H(){var t,e=this;if(F)try{var r=Array.prototype.slice.apply(arguments);return s.Zone.root.run(U[e],s,r)}catch(t){n("Failed to execute %s inside of zone (via Zone.js). Falling back to execution inside currently active zone.",e,t)}return null===(t=U[e])||void 0===t?void 0:t.apply(s,arguments)}F&&i("Discovered Zone.js globals. Will attempt to register all timers inside the root Zone.");d&&d.getEntriesByType;var W=d&&"function"==typeof s.PerformanceObserver&&"function"==typeof d.now,q=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"});function z(e){return W?{start:function(){n=d.now();try{var t,e=null==s?void 0:s.PerformanceObserver;if(e)null===(t=o=new e(f))||void 0===t||t.observe({type:"resource"})}catch(t){}u=V(p,6e5)},end:function(){r=d.now(),h(),i||!G()?l():(g(c,"visibilitychange",v),a=V(l,e.maxWaitForResourceMillis))},cancel:p}:function(e){var n=0;return{start:function(){n=P()},end:function(){return e({duration:P()-n})},cancel:t}}(e.onEnd);var n,r,i,o,a,u;function l(){var t;p(),null!==(t=i)&&void 0!==t&&t.duration&&i.duration<864e5?e.onEnd({resource:i,duration:Math.round(i.duration)}):e.onEnd({resource:i,duration:Math.round(r-n)})}function f(t){var o=t.getEntriesByType("resource").find((function(t){var i=t;return i.startTime>=n&&(!r||r+e.maxToleranceForResourceTimingsMillis>=i.responseEnd)&&e.resourceMatcher(i)}));o&&(i=o,r&&l())}function v(){G()||l()}function p(){!function(){if(o){try{var t;null===(t=o)||void 0===t||t.disconnect()}catch(t){}o=void 0}}(),a&&(clearTimeout(a),a=void 0),h(),function(){if(!c)return;t=c,e="visibilitychange",n=v,t.removeEventListener?t.removeEventListener(e,n,!1):t.detachEvent&&t.detachEvent("on"+e,n);var t,e,n}()}function h(){u&&(clearTimeout(u),u=void 0)}}function G(){return"visible"===(null==c?void 0:c.visibilityState)||"prerender"===(null==c?void 0:c.visibilityState)}var K="undefined";function Z(t){return Math.round(100*t)/100}function Y(t){var e;return"string"!=typeof t?t:new URL(t,null!==(e=null==c?void 0:c.baseURI)&&void 0!==e?e:null==f?void 0:f.href)}function Q(t){try{return Y(t).origin===("undefined"!=typeof location?location.origin:void 0)}catch(t){return!1}}var X=Symbol.for("INSTRUMENTED_BY_DASH0");function $(t,e,n){var r=t[e];r?(!0===r[X]&&i("".concat(String(e)," has already been instrumented, skipping")),function(t){t[X]=!0}(r),t[e]=n(r)):i("".concat(String(e)," is not defined, unable to instrument"))}var J={endpoints:[],resource:{attributes:[]},scope:{name:"dash0-web-sdk",version:"0.13.0",attributes:[]},signalAttributes:[],ignoreUrls:[],ignoreErrorMessages:[],wrapEventHandlers:!0,wrapTimers:!0,propagateTraceHeadersCorsURLs:[],maxWaitForResourceTimingsMillis:1e4,maxToleranceForResourceTimingsMillis:3e3,headersToCapture:[],pageViewInstrumentation:{trackVirtualPageViews:!0,includeParts:[]}},tt="service.name",et="service.version",nt="deployment.environment.name",rt="deployment.name",it="deployment.id",ot="event.name",at="dash0.web.event.id",ut="page.load.id",st="user_agent.original",ct="user.id",lt="user.name",ft="user.full_name",dt="user.email",vt="user.hash",pt="user.roles",ht="exception.message",yt="exception.type",mt="exception.stacktrace",gt="url.full",bt={PAGE_VIEW:"browser.page_view",NAVIGATION_TIMING:"browser.navigation_timing",WEB_VITAL:"browser.web_vital",ERROR:"browser.error"},Tt={UNSPECIFIED:0,TRACE:1,DEBUG:5,INFO:9,WARN:13,ERROR:17,FATAL:21},Et=0,wt=1,St="pushState",At="replaceState",Ot=1;function It(){var t,e;return"".concat((t={ephemeralSession:!b},e=0,t.ephemeralSession&&(e|=Ot),e.toString(16).padStart(2,"0"))).concat(m(7))}var Nt="d0_session",Ct="#",Lt=864e5,_t=null;function Rt(t,e){if(!b)return i("Storage API is not available and session tracking is therefore not supported."),void(_t=It());t||(t=108e5),e||(e=216e5),t=Math.min(t,Lt),e=Math.min(e,Lt);try{var r=function(t){return b&&p?p.getItem(t):null}(Nt),o=function(t){if(!t)return null;var e=t.split(Ct);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}}(r);o&&!function(t,e,n){var r=P()-e;if(t.lastActivityTime<r)return!1;var i=P()-n;return t.startTime>=i}(o,t,e)&&(o=null),o?o.lastActivityTime=P():o={id:It(),startTime:P(),lastActivityTime:P()},function(t,e){b&&p&&p.setItem(t,e)}(Nt,function(t){return t.id+Ct+t.startTime+Ct+t.lastActivityTime}(o)),_t=o.id}catch(t){n("Failed to record session information",t)}}function xt(){if(b)try{!function(t){b&&p&&p.removeItem(t)}(Nt)}catch(t){e("Failed to terminate session",t)}}var kt=-1,Pt=function(t){addEventListener("pageshow",(function(e){e.persisted&&(kt=e.timeStamp,t(e))}),!0)},jt=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)))}},Dt=function(t){requestAnimationFrame((function(){return requestAnimationFrame((function(){return t()}))}))},Mt=function(){var t=performance.getEntriesByType("navigation")[0];if(t&&t.responseStart>0&&t.responseStart<performance.now())return t},Ut=function(){var t,e=Mt();return null!==(t=null==e?void 0:e.activationStart)&&void 0!==t?t:0},Ft=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1,n=Mt(),r="navigate";return kt>=0?r="back-forward-cache":n&&(document.prerendering||Ut()>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}},Vt=new WeakMap;function Bt(t,e){return Vt.get(t)||Vt.set(t,new e),Vt.get(t)}var Ht,Wt=function(){return A((function t(){S(this,t),I(this,"t",void 0),I(this,"i",0),I(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)}}}])}(),qt=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?N(Object(n),!0).forEach((function(e){I(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):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)}},Gt=-1,Kt=function(){return"hidden"!==document.visibilityState||document.prerendering?1/0:0},Zt=function(t){"hidden"===document.visibilityState&&Gt>-1&&(Gt="visibilitychange"===t.type?t.timeStamp:0,Qt())},Yt=function(){addEventListener("visibilitychange",Zt,!0),addEventListener("prerenderingchange",Zt,!0)},Qt=function(){removeEventListener("visibilitychange",Zt,!0),removeEventListener("prerenderingchange",Zt,!0)},Xt=function(){if(Gt<0){var t,e=Ut(),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;Gt=null!=n?n:Kt(),Yt(),Pt((function(){setTimeout((function(){Gt=Kt(),Yt()}))}))}return{get firstHiddenTime(){return Gt}}},$t=function(t){document.prerendering?addEventListener("prerenderingchange",(function(){return t()}),!0):t()},Jt=[1800,3e3],te=[.1,.25],ee=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]:{};$t((function(){var n,r=Xt(),i=Ft("FCP"),o=qt("paint",(function(t){var e,a=O(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-Ut(),0),i.entries.push(u),n(!0)))}}catch(t){a.e(t)}finally{a.f()}}));o&&(n=jt(t,i,Jt,e.reportAllChanges),Pt((function(r){i=Ft("FCP"),n=jt(t,i,Jt,e.reportAllChanges),Dt((function(){i.value=performance.now()-r.timeStamp,n(!0)}))})))}))}(zt((function(){var n,r=Ft("CLS",0),i=Bt(e,Wt),o=function(t){var e,o=O(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=qt("layout-shift",o);a&&(n=jt(t,r,te,e.reportAllChanges),document.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&(o(a.takeRecords()),n(!0))})),Pt((function(){i.i=0,r=Ft("CLS",0),n=jt(t,r,te,e.reportAllChanges),Dt((function(){return n()}))})),setTimeout(n))})))},ne=0,re=1/0,ie=0,oe=function(t){var e,n=O(t);try{for(n.s();!(e=n.n()).done;){var r=e.value;r.interactionId&&(re=Math.min(re,r.interactionId),ie=Math.max(ie,r.interactionId),ne=ie?(ie-re)/7+1:0)}}catch(t){n.e(t)}finally{n.f()}},ae=function(){var t;return Ht?ne:null!==(t=performance.interactionCount)&&void 0!==t?t:0},ue=0,se=function(){return A((function t(){S(this,t),I(this,"u",[]),I(this,"l",new Map),I(this,"m",void 0),I(this,"v",void 0)}),[{key:"p",value:function(){ue=ae(),this.u.length=0,this.l.clear()}},{key:"P",value:function(){var t=Math.min(this.u.length-1,Math.floor((ae()-ue)/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=O(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)}}}}])}(),ce=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)})))},le=[200,500],fe=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};globalThis.PerformanceEventTiming&&"interactionId"in PerformanceEventTiming.prototype&&$t((function(){var n;"interactionCount"in performance||Ht||(Ht=qt("event",oe,{type:"event",buffered:!0,durationThreshold:0}));var r,i=Ft("INP"),o=Bt(e,se),a=function(t){ce((function(){var e,n=O(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=qt("event",a,{durationThreshold:null!==(n=e.durationThreshold)&&void 0!==n?n:40});r=jt(t,i,le,e.reportAllChanges),u&&(u.observe({type:"first-input",buffered:!0}),document.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&(a(u.takeRecords()),r(!0))})),Pt((function(){o.p(),i=Ft("INP"),r=jt(t,i,le,e.reportAllChanges)})))}))},de=function(){return A((function t(){S(this,t),I(this,"m",void 0)}),[{key:"h",value:function(t){var e;null===(e=this.m)||void 0===e||e.call(this,t)}}])}(),ve=[2500,4e3],pe=!1;function he(t){var e,n,r=[];return n=i,pe&&n(),c&&s&&(g(c,"visibilitychange",(function(){"visible"!==c.visibilityState&&n()})),g(s,"pagehide",(function(){pe=!0,n()})),g(s,"beforeunload",(function(){pe=!0,n()}))),{send:function(n){"visible"===(null==c?void 0:c.visibilityState)?(r.push(n),r.length>=15?i():null==e&&(e=V(i,1e3))):t([n])}};function i(){null!=e&&(clearTimeout(e),e=null),r.length>0&&(t(r.slice()),r.length=0)}}function ye(t,e){return me.apply(this,arguments)}function me(){return me=w(C().mark((function e(r,i){var o,a,u,s;return C().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=JSON.stringify(i),a=o,u=o.length,s=!1,"undefined"==typeof CompressionStream){e.next=10;break}return e.next=7,ge(o);case 7:a=e.sent,u=a.byteLength,s=!0;case 10:return e.next=12,Promise.all(J.endpoints.map(function(){var e=w(C().mark((function e(i){var o,c,l;return C().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,(o=new URL(i.url)).pathname=o.pathname+(o.pathname.endsWith("/")?r.substring(1):r),c={"Content-Type":"application/json",Authorization:"Bearer ".concat(i.authToken)},i.dataset&&(c["Dash0-Dataset"]=i.dataset),s&&(c["Content-Encoding"]="gzip"),v){e.next=9;break}return n("Unable to send telemetry, fetch is not defined"),e.abrupt("return");case 9:return e.next=11,v(o,{method:"POST",headers:c,body:a,keepalive:u<=6e4});case 11:(l=e.sent).text().catch(t),l.ok||n("Failed to send telemetry to ".concat(o,": ").concat(l.status," ").concat(l.statusText)),e.next=19;break;case 16:e.prev=16,e.t0=e.catch(0),n("Error sending telemetry to ".concat(i.url).concat(r,":"),e.t0);case 19:case"end":return e.stop()}}),e,null,[[0,16]])})));return function(t){return e.apply(this,arguments)}}()));case 12:case"end":return e.stop()}}),e)}))),me.apply(this,arguments)}function ge(t){return be.apply(this,arguments)}function be(){return(be=w(C().mark((function t(e){var n,r,i;return C().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 Te,Ee=he((function(t){ye("/v1/logs",{resourceLogs:[{resource:J.resource,scopeLogs:[{scope:J.scope,logRecords:t}]}]}).catch((function(t){r("Failed to transmit logs",t)}))})),we=he((function(t){ye("/v1/traces",{resourceSpans:[{resource:J.resource,scopeSpans:[{scope:J.scope,spans:t}]}]}).catch((function(t){r("Failed to transmit spans",t)}))}));function Se(){var t,e,n,r,i,o,a;return Te||(e=(t={maxCalls:8096,maxCallsPerTenMinutes:4096,maxCallsPerTenSeconds:128}).maxCalls,n=t.maxCallsPerTenMinutes,r=t.maxCallsPerTenSeconds,i=0,o=0,a=0,B((function(){o=0}),6e5),B((function(){a=0}),1e4),Te=function(){return++i>e||++o>n||++a>r}),Te()}function Ae(t){Se()?i("Transport rate limit. Will not send item.",t):Ee.send(t)}function Oe(t){Se()?i("Transport rate limit. Will not send item.",t):we.send(t)}var Ie=["stringValue","boolValue","intValue","doubleValue","arrayValue","kvlistValue","bytesValue"];function Ne(t){if(null!=t){var e={};return Array.isArray(t)?e.arrayValue={values:t.map((function(t){return Ne(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"!==x(t))return!1;var e=Object.keys(t);return 1===e.length&&Ie.includes(e[0])}(t)?"object"===x(t)&&(e.kvlistValue={values:Object.entries(t).map((function(t){var e=L(t,2);return Ce(e[0],e[1])}))}):e=t,e}}function Ce(t,e){return{key:t,value:Ne(e)}}function Le(t,e,n){e&&t.push(Ce(e,n))}function _e(t,e){var n=t.findIndex((function(t){return t.key===e}));-1!==n&&t.splice(n,1)}var Re="traceparent",xe=/^00-([a-f0-9]{32})-([a-f0-9]{16})-[0-9]{1,2}$/;function ke(){var t,e,n=((null===(t=Array.from(null!==(e=null==c?void 0:c.getElementsByTagName("meta"))&&void 0!==e?e:[]).find((function(t){var e;return(null===(e=t.getAttribute("name"))||void 0===e?void 0:e.toLowerCase())===Re})))||void 0===t?void 0:t.content.trim())||"").match(xe)||function(){var t=d.getEntriesByType("navigation")[0];if(!t)return"";if(!t.serverTiming)return"";return function(t){var e,n=O(t);try{for(n.s();!(e=n.n()).done;){var r=e.value;if(r.name===Re)return r.description.trim()}}catch(t){n.e(t)}finally{n.f()}return""}(t.serverTiming)}().match(xe);if(n)return{traceId:n[1],spanId:n[2]}}function Pe(t,e,n){t.call(e,"traceparent","00-".concat(n.traceId,"-").concat(n.spanId,"-01"))}var je="d042",De=1;function Me(t){var e=0;return t.withoutSession&&(e|=De),e.toString(16).padStart(2,"0")}for(var Ue=new Uint32Array(256),Fe=0;Fe<256;Fe++){for(var Ve=Fe,Be=0;Be<8;Be++)Ve=1&Ve?3988292384^Ve>>>1:Ve>>>1;Ue[Fe]=Ve>>>0}function He(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^Ue[255&(r^o)]}return(4294967295^r)>>>0}(t).toString(16).padStart(8,"0");return"".concat(e).concat(m(4))}function We(t){var e=function(t){return t?"".concat(je).concat(Me({withoutSession:!1})).concat(t).concat(m(5)):"".concat(je).concat(Me({withoutSession:!0})).concat(m(13))}(_t),n=He(e),r=[];return Le(r,at,n),{traceId:e,spanId:n,name:t,kind:3,startTimeUnixNano:j(),attributes:r,events:[],links:[],status:{code:0}}}function qe(t,e,n){var r=t;return e&&(r.status=e),r.endTimeUnixNano=null!=n?String(Math.round(parseInt(r.startTimeUnixNano)+n)):j(),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:j(),attributes:null!=o?o:[]})}var Ge=null!=h&&"function"==typeof h.getItem&&"function"==typeof h.setItem;var Ke="d0_tab",Ze=null;function Ye(){if(Ge)try{var t=function(t){return Ge&&h?h.getItem(t):null}(Ke);if(t)return void(Ze=t);Ze=m(8),function(t,e){Ge&&h&&h.setItem(t,e)}(Ke,Ze)}catch(t){n("Failed to record tab ID information",t)}else i("Storage API is not available and tab tracking is therefore not supported.")}function Qe(t,e){var n,r,i,o,a;void 0===t.find((function(t){return t.key===at}))&&Le(t,at,m(8));for(var u=0;u<J.signalAttributes.length;u++)t.push(J.signalAttributes[u]);!function(t,e){try{var n=Y(e);n.username&&(n.username="REDACTED"),n.password&&(n.password="REDACTED"),Le(t,gt,n.href),Le(t,"url.path",n.pathname),Le(t,"url.domain",n.hostname),Le(t,"url.scheme",n.protocol.replace(":","")),n.hash&&Le(t,"url.fragment",n.hash.replace("#","")),n.search&&Le(t,"url.query",n.search.replace("?",""))}catch(n){Le(t,gt,String(e))}}(t,null!==(n=null!==(r=null==e?void 0:e.url)&&void 0!==r?r:null==s?void 0:s.location.href)&&void 0!==n?n:K),_t&&Le(t,"session.id",_t),Ze&&Le(t,"browser.tab.id",Ze),Le(t,"browser.window.width",null!==(i=null==s?void 0:s.innerWidth)&&void 0!==i?i:K),Le(t,"browser.window.height",null!==(o=null==s?void 0:s.innerHeight)&&void 0!==o?o:K);var c=null==l||null===(a=l.connection)||void 0===a?void 0:a.effectiveType;c&&Le(t,"network.connection.subtype",c)}function Xe(){!function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};$t((function(){var n,r=Xt(),i=Ft("LCP"),o=Bt(e,de),a=function(t){e.reportAllChanges||(t=t.slice(-1));var a,u=O(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-Ut(),0),i.entries=[s],n())}}catch(t){u.e(t)}finally{u.f()}},u=qt("largest-contentful-paint",a);if(u){n=jt(t,i,ve,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 ce(s)}),{capture:!0,once:!0});Pt((function(r){i=Ft("LCP"),n=jt(t,i,ve,e.reportAllChanges),Dt((function(){i.value=performance.now()-r.timeStamp,n(!0)}))}))}}))}($e,{reportAllChanges:!0}),fe($e,{reportAllChanges:!0}),ee($e,{reportAllChanges:!0})}function $e(t){var e=[];Le(e,ot,bt.WEB_VITAL);var n=[];Le(n,"name",t.name),Le(n,"value",Z(t.value)),Le(n,"delta",Z(t.delta));var r={timeUnixNano:j(),attributes:e,severityNumber:Tt.INFO,severityText:"INFO",body:{kvlistValue:{values:n}}};Qe(r.attributes),Ae(r)}function Je(t,e){for(var n=0,r=t.length;n<r;n++)if(t[n].test(e))return!0;return!1}var tn="data:";function en(t){return!t||(!(t=String(t))||(null==t.substring||t.substring(0,5).toLowerCase()===tn||(!!function(t){for(var e=t.toLowerCase(),n=0,r=J.endpoints.length;n<r;n++){var i=J.endpoints[n];if(e.startsWith(i.url))return!0}return!1}(t)||Je(J.ignoreUrls,t))))}var nn,rn=0,on=0,an={},un=!1;function sn(){un=!0}function cn(t,e){t&&ln("string"==typeof t?{message:t,opts:e}:{message:t.message,type:t.name,stack:t.stack,opts:e})}function ln(t){var e=t.message,n=t.type,r=t.stack,i=t.opts;if(e&&!(rn>100)&&!function(t){return!t||Je(J.ignoreErrorMessages,t)}(e)){on>=20&&(an={},on=0);var o=(e=String(e).substring(0,300))+(r=function(t){return String(t||"").split("\n").slice(0,30).join("\n")}(r))+(null==s?void 0:s.location.href),a=an[o];if(a)a.seenCount++;else{var u=[];Le(u,ot,bt.ERROR),Le(u,ht,e),n&&Le(u,yt,n),r&&Le(u,mt,r),null!=i&&i.componentStack&&Le(u,"exception.component_stack",null==i?void 0:i.componentStack.substring(0,2048)),Qe(u),a={seenCount:1,transmittedCount:0,log:{timeUnixNano:j(),attributes:u,severityNumber:Tt.ERROR,severityText:"ERROR",body:{stringValue:e}}},an[o]=a,on++}!function(){if(nn)return;nn=setTimeout(fn,1e3)}()}}function fn(){for(var t in nn&&(clearTimeout(nn),nn=null),an)if(u(an,t)){var e=an[t];e.seenCount>e.transmittedCount&&(Ae(e.log),rn++)}an={},on=0}var dn="Unhandled promise rejection: ",vn="<unavailable because Promise wasn't rejected with an Error object>";function pn(t){null==t.reason?cn({message:dn+"<no reason defined>",stack:vn}):"string"==typeof t.reason.message?cn({message:dn+t.reason.message,stack:"string"==typeof t.reason.stack?t.reason.stack:vn}):"object"!==x(t.reason)&&cn({message:dn+t.reason,stack:vn})}var hn="__dash0OriginalFunctions";function yn(t,e){for(var n=t[hn],r=0;r<n.length;r++){if(mn(n[r].valuesForEqualityCheck,e))return r}return-1}function mn(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 gn(t,e,n,r,i){return function(t,e,n){if(!t)return e;var r=t[hn]=t[hn]||[],i=yn(t,n);return-1!==i?r[i].wrappedFunction:(r.push({wrappedFunction:e,valuesForEqualityCheck:n}),e)}(t,e,bn(n,r,i))}function bn(t,e,n){return[t,e,Tn(n)]}function Tn(t){return null!=t&&("object"===x(t)?Boolean(t.capture):Boolean(t))}function En(t,e,n,r,i){return function(t,e,n){var r=null==t?void 0:t[hn];if(null==r)return n;var i=yn(t,e);if(-1===i)return n;var o=r[i];return r.splice(i,1),o.wrappedFunction}(t,bn(e,n,r),i)}function wn(){J.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),sn(),t}},i[1]=gn(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]=En(this,t,e,r,e),n.apply(this,i)}}(null==s?void 0:s.EventTarget)}function Sn(t){var e=null==s?void 0:s[t];"function"==typeof e&&(s[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),sn(),t}}}(t),e.apply(this,n)})}function An(){!function(){if(s){var t=s.onerror;s.onerror=function(e,n,r,i,o){if(un)return un=!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)),ln({message:String(e),stack:a}),"function"==typeof t?t.apply(this,arguments):void 0}}}(),"function"==typeof(null==s?void 0:s.addEventListener)&&s.addEventListener("unhandledrejection",pn),wn(),function(){if(J.wrapTimers){if(F)return void n("We discovered a usage of Zone.js. In order to avoid any incompatibility issues timer wrapping is not going to be enabled.");Sn("setTimeout"),Sn("setInterval")}}()}var On=["GET","HEAD","POST","PUT","DELETE","CONNECT","OPTIONS","TRACE","PATCH"];function In(t){return On.includes(t)}function Nn(t,e){var n=0!==e.startTime;Cn(t,q.FETCH_START,e,n),Cn(t,q.DOMAIN_LOOKUP_START,e,n),Cn(t,q.DOMAIN_LOOKUP_END,e,n),Cn(t,q.CONNECT_START,e,n),Cn(t,q.SECURE_CONNECTION_START,e,n),Cn(t,q.CONNECT_END,e,n),Cn(t,q.REQUEST_START,e,n),Cn(t,q.RESPONSE_START,e,n),Cn(t,q.RESPONSE_END,e,n)}function Cn(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+M())))))}function Ln(t,e){var n=e.encodedBodySize;null!=n&&Le(t.attributes,"http.response.body.size",n)}function _n(t){return function(){var e=w(C().mark((function e(n,r){var o,a,u,s,c,l,f,d,v,p,h,y,m,g;return C().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(u=r?Object.assign({},r):r,s=null,null!==(o=u)&&void 0!==o&&o.body&&(s=u.body,u.body=void 0),c=new Request(n,u),s&&u&&(u.body=s),!en(l=c.url)){e.next=9;break}return i("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!==(a=c.method)&&void 0!==a?a:"GET",d=In(f),v=In(f.toUpperCase()),p=v?f.toUpperCase():"_OTHER",Qe((h=We("HTTP ".concat(p))).attributes,{url:l}),Rn(n,r),Le(h.attributes,"http.request.method",p),d||Le(h.attributes,"http.request.method_original",f),(Q(l)||Je(J.propagateTraceHeadersCorsURLs,l))&&(null!==(y=u)&&void 0!==y&&y.headers?(u.headers=new Headers(u.headers),Pe(u.headers.append,u.headers,h)):n instanceof Request?Pe(c.headers.append,c.headers,h):(u||(u={}),u.headers=new Headers,Pe(u.headers.append,u.headers,h))),xn(c.headers,h,(function(t){return e=t,"".concat("http.request.header",".").concat(e.toLowerCase());var e})),(m=z({resourceMatcher:function(t){var e=t.initiatorType,n=t.name;return("fetch"===e||"xmlhttprequest"===e)&&n===Y(l).href},maxWaitForResourceMillis:J.maxWaitForResourceTimingsMillis,maxToleranceForResourceTimingsMillis:J.maxToleranceForResourceTimingsMillis,onEnd:function(t){var e=t.duration,n=t.resource;n&&(Nn(h,n),Ln(h,n)),Oe(qe(h,void 0,1e6*e))}})).start(),e.prev=23,e.next=26,t(n instanceof Request?c:n,u);case 26:return g=e.sent,kn(h,g),Pn(g).then((function(){return m.end()})).catch((function(t){m.cancel(),jn(h,t)})),e.abrupt("return",g);case 32:throw e.prev=32,e.t0=e.catch(23),m.cancel(),jn(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 Rn(t,e,n){try{return void 0}catch(n){i("failed to analyze request for GraphQL insights",n,t,e)}}function xn(t,e,n){try{t.forEach((function(t,r){J.headersToCapture.some((function(t){return t.test(r)}))&&Le(e.attributes,n(r),t)}))}catch(t){i("unable to capture http headers due to CORS policy")}}function kn(t,e){var n=e.status;!function(t,e,n){t.status={code:e,message:n}}(t,n>=200&&n<400?0:2,e.statusText),Le(t.attributes,"http.response.status_code",String(n)),xn(e.headers,t,(function(t){return e=t,"".concat("http.response.header",".").concat(e.toLowerCase());var e}))}function Pn(t){return new Promise((function(e){var n=t.clone().body;if(!n)return e();var r=n.getReader(),i=function(){var t=w(C().mark((function t(){var n;return C().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 jn(t,e){!function(t,e){var n=[];"string"==typeof e?Le(n,ht,e):e&&(e.code?Le(n,yt,e.code.toString()):e.name&&Le(n,yt,e.name),e.message&&Le(n,ht,e.message),e.stack&&Le(n,mt,e.stack),ze(t,"exception",n))}(t,e),Oe(qe(t,function(t){return{code:2,message:t&&"object"===x(t)&&"message"in t?t.message:String(t)}}(e),void 0))}function Dn(t,e,n,r){var i,o,a=function(t){var e,n,r;return t&&null!==(e=null===(n=(r=J.pageViewInstrumentation).generateMetadata)||void 0===n?void 0:n.call(r,t))&&void 0!==e?e:{}}(e),u=[];Le(u,ot,bt.PAGE_VIEW),a.attributes&&Object.entries(a.attributes).forEach((function(t){var e=L(t,2),n=e[0],r=e[1];return Le(u,n,r)})),Qe(u,{url:e});var s=[];Le(s,"title",null!==(i=null!==(o=a.title)&&void 0!==o?o:null==c?void 0:c.title)&&void 0!==i?i:K),null!=c&&c.referrer&&Le(s,"referrer",c.referrer),Le(s,"type",n?wt:Et),Le(s,"change_state",r?At:St);var l={timeUnixNano:t,attributes:u,severityNumber:Tt.INFO,severityText:"INFO",body:{kvlistValue:{values:s}}},f=ke();f&&(l.traceId=f.traceId,l.spanId=f.spanId),Ae(l)}function Mn(){var t=null==s?void 0:s.performance.getEntriesByType("navigation")[0];if(t){var e=[];Le(e,ot,bt.NAVIGATION_TIMING);var n=[];Le(n,"name",t.name),Un(n,t,"responseStatus"),Un(n,t,"fetchStart"),Un(n,t,"requestStart"),Un(n,t,"responseStart"),Un(n,t,"domInteractive"),Un(n,t,"domContentLoadedEventEnd"),Un(n,t,"domComplete"),Un(n,t,"loadEventEnd"),Un(n,t,"transferSize"),Un(n,t,"encodedBodySize"),Un(n,t,"decodedBodySize");var r={timeUnixNano:Fn(),attributes:e,severityNumber:Tt.INFO,severityText:"INFO",body:{kvlistValue:{values:n}}};Qe(r.attributes);var o=ke();o&&(r.traceId=o.traceId,r.spanId=o.spanId),Ae(r)}else i("Navigation timings not available. Cannot emit navigation timing log")}function Un(t,e,n){var r=e[n];"number"!=typeof r||isNaN(r)||Le(t,n,Number.isInteger(r)?r:Z(r))}function Fn(){return D(Math.round(M()))}var Vn={},Bn=!1,Hn=!1;function Wn(){zn(null==s?void 0:s.location.href)}function qn(t){zn(t.newURL)}function zn(t,e){var n;if(t)try{var r=new URL(t,null==s?void 0:s.location.href);((n=r).pathname!==Vn.path||Hn&&n.search!==Vn.search||Bn&&n.hash!==Vn.hash)&&(Gn(r),Dn(j(),r,!0,Boolean(e)))}catch(t){i("Failed to handle url change",t)}}function Gn(t){Vn.path=t.pathname,Vn.search=t.search,Vn.hash=t.hash}function Kn(){!function(){try{Dn(Fn(),null!=s&&s.location.href?new URL(null==s?void 0:s.location.href):void 0)}catch(t){r("Failed to transmit initial page view event",t)}if("complete"===(null==c?void 0:c.readyState))return Mn();s&&g(s,"load",(function(){setTimeout(Mn,0)}))}(),function(){var t,e,n,r;if(s&&s.history){if(J.pageViewInstrumentation.trackVirtualPageViews){Hn=null!==(t=null===(e=J.pageViewInstrumentation.includeParts)||void 0===e?void 0:e.includes("SEARCH"))&&void 0!==t&&t,Bn=null!==(n=null===(r=J.pageViewInstrumentation.includeParts)||void 0===r?void 0:r.includes("HASH"))&&void 0!==n&&n,$(s.history,"replaceState",(function(t){return function(e,n,r){return zn(r?String(r):void 0,!0),t.apply(this,[e,n,r])}})),$(s.history,"pushState",(function(t){return function(e,n,r){return zn(r?String(r):void 0),t.apply(this,[e,n,r])}})),s.addEventListener("hashchange",qn),s.addEventListener("popstate",Wn);try{Gn(new URL(s.location.href))}catch(t){}}}else i("Browser does not support history API, skipping instrumentation")}()}var Zn=function(t){if("object"===x(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},Yn=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]=Yn.options.mergeArrays?Yn.options.uniqueArrayItems?Array.from(new Set(t[n].concat(e[n]))):[].concat(_(t[n]),_(e[n])):e[n]:Zn(t[n])&&Zn(e[n])?t[n]=Yn(t[n],e[n]):!Zn(t[n])&&Zn(e[n])?t[n]=Yn(e[n],void 0):t[n]=void 0===e[n]?Yn.options.allowUndefinedOverrides?e[n]:t[n]:e[n])})),t}),{})},Qn={allowUndefinedOverrides:!0,mergeArrays:!0,uniqueArrayItems:!0};Yn.options=Qn,Yn.withOptions=function(t){Yn.options=Object.assign(Object.assign({},Qn),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=Yn.apply(void 0,n);return Yn.options=Qn,i};var Xn=!1;function $n(t){Xn?i("Dash0 SDK is being reinitialized, skipping ..."):null!=s?"function"==typeof v&&d&&d.getEntriesByType?(J.endpoints=t.endpoint instanceof Array?t.endpoint:[t.endpoint],0!==J.endpoints.length?(Object.assign(J,Yn(J,function(t,e){var n,r={},i=O(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){Le(J.resource.attributes,tt,t.serviceName),t.serviceVersion&&Le(J.resource.attributes,et,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&&Le(J.resource.attributes,nt,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&&Le(J.resource.attributes,rt,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&&Le(J.resource.attributes,it,r)}(t),function(t){var e;Le(J.signalAttributes,ut,m(16)),Le(J.signalAttributes,st,null!==(e=null==l?void 0:l.userAgent)&&void 0!==e?e:K),t.additionalSignalAttributes&&Object.entries(t.additionalSignalAttributes).forEach((function(t){var e=L(t,2),n=e[0],r=e[1];Le(J.signalAttributes,n,r)}))}(t),Ye(),Rt(t.sessionInactivityTimeoutMillis,t.sessionTerminationTimeoutMillis),Kn(),Xe(),An(),s&&s.fetch&&s.Request?$(s,"fetch",_n):i("Browser does not support the Fetch API, skipping instrumentation"),Xn=!0):n("No telemetry endpoint configured. Aborting Dash0 Web SDK initialization process.")):i("Stopping Dash0 Web SDK initialization. This browser does not support the necessary APIs"):i("Looks like we are not running in a browser context. Stopping Dash0 Web SDK initialization.")}function Jn(t,e){_e(J.signalAttributes,ct),null!=t&&Le(J.signalAttributes,ct,t),_e(J.signalAttributes,lt),null!=(null==e?void 0:e.name)&&Le(J.signalAttributes,lt,e.name),_e(J.signalAttributes,ft),null!=(null==e?void 0:e.fullName)&&Le(J.signalAttributes,ft,e.fullName),_e(J.signalAttributes,dt),null!=(null==e?void 0:e.email)&&Le(J.signalAttributes,dt,e.email),_e(J.signalAttributes,vt),null!=(null==e?void 0:e.hash)&&Le(J.signalAttributes,vt,e.hash),_e(J.signalAttributes,pt),null!=(null==e?void 0:e.roles)&&Le(J.signalAttributes,pt,e.roles)}function tr(){i("Dash0 Web SDK configuration state:",J)}function er(t,e){Le(J.signalAttributes,t,e)}function nr(t){_e(J.signalAttributes,t)}function rr(t,e){var r;if(Object.values(bt).includes(t))n("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 i=[];Qe(i),Object.entries(null!==(r=null==e?void 0:e.attributes)&&void 0!==r?r:{}).forEach((function(t){var e=L(t,2),n=e[0],r=e[1];return Le(i,n,r)})),Le(i,ot,t),null!=e&&e.title&&Le(i,"dash0.web.event.title",e.title),Ae({timeUnixNano:null!=(null==e?void 0:e.timestamp)?D(e.timestamp):j(),attributes:i,body:Ne(null==e?void 0:e.data),severityText:null==e?void 0:e.severity,severityNumber:null!=e&&e.severity?Tt[e.severity]:void 0})}}function ir(t,e){cn(t,e)}function or(t){i("".concat("Initializing Dash0 Web SDK"," (via package)")),$n(t)}export{er as addSignalAttribute,tr as debug,Jn as identify,or as init,nr as removeSignalAttribute,ir as reportError,rr as sendEvent,xt as terminateSession};
1
+ function t(){}o("log");var e=o("info"),n=o("warn"),r=o("error"),i=o("debug");function o(e){return"undefined"==typeof console||"function"!=typeof console.log||"function"!=typeof console.log.apply?t:console[e]&&"function"==typeof console[e].apply?function(){console[e].apply(console,arguments)}:function(){console.log.apply(console,arguments)}}var a=Object.prototype.hasOwnProperty;function u(t,e){return a.call(t,e)}var s="undefined"!=typeof window?window:void 0,c=null==s?void 0:s.document,l=null==s?void 0:s.navigator,f="undefined"!=typeof location?location:void 0,d=(null==s?void 0:s.performance)||(null==s?void 0:s.webkitPerformance)||(null==s?void 0:s.msPerformance)||(null==s?void 0:s.mozPerformance);null==s||s.encodeURIComponent;var v=null==s?void 0:s.fetch,p=function(){try{var t;return null!==(t=null==s?void 0:s.localStorage)&&void 0!==t?t:null}catch(t){return null}}(),h=function(){try{var t;return null!==(t=null==s?void 0:s.sessionStorage)&&void 0!==t?t:null}catch(t){return null}}(),y=Array(32);function m(t){for(var e=0;e<2*t;e++)y[e]=Math.floor(16*Math.random())+48,y[e]>=58&&(y[e]+=39);return String.fromCharCode.apply(null,y.slice(0,2*t))}function g(t,e,n){t.addEventListener?t.addEventListener(e,n,!1):t.attachEvent&&t.attachEvent("on"+e,n)}var b=null!=p&&"function"==typeof p.getItem&&"function"==typeof p.setItem;function T(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 E(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 w(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){E(o,r,i,a,u,"next",t)}function u(t){E(o,r,i,a,u,"throw",t)}a(void 0)}))}}function S(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function A(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,R(r.key),r)}}(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function O(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=k(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 I(t,e,n){return(e=R(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function N(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 C(){C=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(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 _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function R(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,R.prototype={constructor:R,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(_),!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),_(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;_(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 L(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)||k(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 _(t){return function(t){if(Array.isArray(t))return T(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||k(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 R(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 x(t){return x="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},x(t)}function k(t,e){if(t){if("string"==typeof t)return T(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)?T(t,e):void 0}}function P(){return(new Date).getTime()}function j(){var t=M();return t?String(1e6*(d.now()+t)):D(new Date)}function D(t){return"object"===x(t)?D(t.getTime()):String(t)+"000000"}function M(){var t,e=null==d?void 0:d.timeOrigin;"number"!=typeof e&&(e=null==d||null===(t=d.timing)||void 0===t?void 0:t.fetchStart);return e}var U={setTimeout:null==s?void 0:s.setTimeout,clearTimeout:null==s?void 0:s.clearTimeout,setInterval:null==s?void 0:s.setInterval,clearInterval:null==s?void 0:s.clearInterval},F=null!=s&&null!=s.Zone&&null!=s.Zone.root&&"function"==typeof s.Zone.root.run;function V(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return H.apply("setTimeout",arguments)}function B(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return H.apply("setInterval",arguments)}function H(){var t,e=this;if(F)try{var r=Array.prototype.slice.apply(arguments);return s.Zone.root.run(U[e],s,r)}catch(t){n("Failed to execute %s inside of zone (via Zone.js). Falling back to execution inside currently active zone.",e,t)}return null===(t=U[e])||void 0===t?void 0:t.apply(s,arguments)}F&&i("Discovered Zone.js globals. Will attempt to register all timers inside the root Zone.");d&&d.getEntriesByType;var W=d&&"function"==typeof s.PerformanceObserver&&"function"==typeof d.now,q=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"});function z(e){return W?{start:function(){n=d.now();try{var t,e=null==s?void 0:s.PerformanceObserver;if(e)null===(t=o=new e(f))||void 0===t||t.observe({type:"resource"})}catch(t){}u=V(p,6e5)},end:function(){r=d.now(),h(),i||!G()?l():(g(c,"visibilitychange",v),a=V(l,e.maxWaitForResourceMillis))},cancel:p}:function(e){var n=0;return{start:function(){n=P()},end:function(){return e({duration:P()-n})},cancel:t}}(e.onEnd);var n,r,i,o,a,u;function l(){var t;p(),null!==(t=i)&&void 0!==t&&t.duration&&i.duration<864e5?e.onEnd({resource:i,duration:Math.round(i.duration)}):e.onEnd({resource:i,duration:Math.round(r-n)})}function f(t){var o=t.getEntriesByType("resource").find((function(t){var i=t;return i.startTime>=n&&(!r||r+e.maxToleranceForResourceTimingsMillis>=i.responseEnd)&&e.resourceMatcher(i)}));o&&(i=o,r&&l())}function v(){G()||l()}function p(){!function(){if(o){try{var t;null===(t=o)||void 0===t||t.disconnect()}catch(t){}o=void 0}}(),a&&(clearTimeout(a),a=void 0),h(),function(){if(!c)return;t=c,e="visibilitychange",n=v,t.removeEventListener?t.removeEventListener(e,n,!1):t.detachEvent&&t.detachEvent("on"+e,n);var t,e,n}()}function h(){u&&(clearTimeout(u),u=void 0)}}function G(){return"visible"===(null==c?void 0:c.visibilityState)||"prerender"===(null==c?void 0:c.visibilityState)}var K="undefined";function Z(t){return Math.round(100*t)/100}function Y(t){var e;return"string"!=typeof t?t:new URL(t,null!==(e=null==c?void 0:c.baseURI)&&void 0!==e?e:null==f?void 0:f.href)}function Q(t){try{return Y(t).origin===("undefined"!=typeof location?location.origin:void 0)}catch(t){return!1}}var X=Symbol.for("INSTRUMENTED_BY_DASH0");function $(t,e,n){var r=t[e];r?(!0===r[X]&&i("".concat(String(e)," has already been instrumented, skipping")),function(t){t[X]=!0}(r),t[e]=n(r)):i("".concat(String(e)," is not defined, unable to instrument"))}var J={endpoints:[],resource:{attributes:[]},scope:{name:"dash0-web-sdk",version:"0.13.1",attributes:[]},signalAttributes:[],ignoreUrls:[],ignoreErrorMessages:[],wrapEventHandlers:!0,wrapTimers:!0,propagateTraceHeadersCorsURLs:[],maxWaitForResourceTimingsMillis:1e4,maxToleranceForResourceTimingsMillis:3e3,headersToCapture:[],pageViewInstrumentation:{trackVirtualPageViews:!0,includeParts:[]}},tt="service.name",et="service.version",nt="deployment.environment.name",rt="deployment.name",it="deployment.id",ot="event.name",at="dash0.web.event.id",ut="page.load.id",st="user_agent.original",ct="user.id",lt="user.name",ft="user.full_name",dt="user.email",vt="user.hash",pt="user.roles",ht="exception.message",yt="exception.type",mt="exception.stacktrace",gt="url.full",bt={PAGE_VIEW:"browser.page_view",NAVIGATION_TIMING:"browser.navigation_timing",WEB_VITAL:"browser.web_vital",ERROR:"browser.error"},Tt={UNSPECIFIED:0,TRACE:1,DEBUG:5,INFO:9,WARN:13,ERROR:17,FATAL:21},Et=0,wt=1,St="pushState",At="replaceState",Ot=1;function It(){var t,e;return"".concat((t={ephemeralSession:!b},e=0,t.ephemeralSession&&(e|=Ot),e.toString(16).padStart(2,"0"))).concat(m(7))}var Nt="d0_session",Ct="#",Lt=864e5,_t=null;function Rt(t,e){if(!b)return i("Storage API is not available and session tracking is therefore not supported."),void(_t=It());t||(t=108e5),e||(e=216e5),t=Math.min(t,Lt),e=Math.min(e,Lt);try{var r=function(t){return b&&p?p.getItem(t):null}(Nt),o=function(t){if(!t)return null;var e=t.split(Ct);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}}(r);o&&!function(t,e,n){var r=P()-e;if(t.lastActivityTime<r)return!1;var i=P()-n;return t.startTime>=i}(o,t,e)&&(o=null),o?o.lastActivityTime=P():o={id:It(),startTime:P(),lastActivityTime:P()},function(t,e){b&&p&&p.setItem(t,e)}(Nt,function(t){return t.id+Ct+t.startTime+Ct+t.lastActivityTime}(o)),_t=o.id}catch(t){n("Failed to record session information",t)}}function xt(){if(b)try{!function(t){b&&p&&p.removeItem(t)}(Nt)}catch(t){e("Failed to terminate session",t)}}var kt=-1,Pt=function(t){addEventListener("pageshow",(function(e){e.persisted&&(kt=e.timeStamp,t(e))}),!0)},jt=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)))}},Dt=function(t){requestAnimationFrame((function(){return requestAnimationFrame((function(){return t()}))}))},Mt=function(){var t=performance.getEntriesByType("navigation")[0];if(t&&t.responseStart>0&&t.responseStart<performance.now())return t},Ut=function(){var t,e=Mt();return null!==(t=null==e?void 0:e.activationStart)&&void 0!==t?t:0},Ft=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1,n=Mt(),r="navigate";return kt>=0?r="back-forward-cache":n&&(document.prerendering||Ut()>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}},Vt=new WeakMap;function Bt(t,e){return Vt.get(t)||Vt.set(t,new e),Vt.get(t)}var Ht,Wt=function(){return A((function t(){S(this,t),I(this,"t",void 0),I(this,"i",0),I(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)}}}])}(),qt=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?N(Object(n),!0).forEach((function(e){I(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):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)}},Gt=-1,Kt=function(){return"hidden"!==document.visibilityState||document.prerendering?1/0:0},Zt=function(t){"hidden"===document.visibilityState&&Gt>-1&&(Gt="visibilitychange"===t.type?t.timeStamp:0,Qt())},Yt=function(){addEventListener("visibilitychange",Zt,!0),addEventListener("prerenderingchange",Zt,!0)},Qt=function(){removeEventListener("visibilitychange",Zt,!0),removeEventListener("prerenderingchange",Zt,!0)},Xt=function(){if(Gt<0){var t,e=Ut(),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;Gt=null!=n?n:Kt(),Yt(),Pt((function(){setTimeout((function(){Gt=Kt(),Yt()}))}))}return{get firstHiddenTime(){return Gt}}},$t=function(t){document.prerendering?addEventListener("prerenderingchange",(function(){return t()}),!0):t()},Jt=[1800,3e3],te=[.1,.25],ee=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]:{};$t((function(){var n,r=Xt(),i=Ft("FCP"),o=qt("paint",(function(t){var e,a=O(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-Ut(),0),i.entries.push(u),n(!0)))}}catch(t){a.e(t)}finally{a.f()}}));o&&(n=jt(t,i,Jt,e.reportAllChanges),Pt((function(r){i=Ft("FCP"),n=jt(t,i,Jt,e.reportAllChanges),Dt((function(){i.value=performance.now()-r.timeStamp,n(!0)}))})))}))}(zt((function(){var n,r=Ft("CLS",0),i=Bt(e,Wt),o=function(t){var e,o=O(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=qt("layout-shift",o);a&&(n=jt(t,r,te,e.reportAllChanges),document.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&(o(a.takeRecords()),n(!0))})),Pt((function(){i.i=0,r=Ft("CLS",0),n=jt(t,r,te,e.reportAllChanges),Dt((function(){return n()}))})),setTimeout(n))})))},ne=0,re=1/0,ie=0,oe=function(t){var e,n=O(t);try{for(n.s();!(e=n.n()).done;){var r=e.value;r.interactionId&&(re=Math.min(re,r.interactionId),ie=Math.max(ie,r.interactionId),ne=ie?(ie-re)/7+1:0)}}catch(t){n.e(t)}finally{n.f()}},ae=function(){var t;return Ht?ne:null!==(t=performance.interactionCount)&&void 0!==t?t:0},ue=0,se=function(){return A((function t(){S(this,t),I(this,"u",[]),I(this,"l",new Map),I(this,"m",void 0),I(this,"v",void 0)}),[{key:"p",value:function(){ue=ae(),this.u.length=0,this.l.clear()}},{key:"P",value:function(){var t=Math.min(this.u.length-1,Math.floor((ae()-ue)/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=O(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)}}}}])}(),ce=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)})))},le=[200,500],fe=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};globalThis.PerformanceEventTiming&&"interactionId"in PerformanceEventTiming.prototype&&$t((function(){var n;"interactionCount"in performance||Ht||(Ht=qt("event",oe,{type:"event",buffered:!0,durationThreshold:0}));var r,i=Ft("INP"),o=Bt(e,se),a=function(t){ce((function(){var e,n=O(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=qt("event",a,{durationThreshold:null!==(n=e.durationThreshold)&&void 0!==n?n:40});r=jt(t,i,le,e.reportAllChanges),u&&(u.observe({type:"first-input",buffered:!0}),document.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&(a(u.takeRecords()),r(!0))})),Pt((function(){o.p(),i=Ft("INP"),r=jt(t,i,le,e.reportAllChanges)})))}))},de=function(){return A((function t(){S(this,t),I(this,"m",void 0)}),[{key:"h",value:function(t){var e;null===(e=this.m)||void 0===e||e.call(this,t)}}])}(),ve=[2500,4e3],pe=!1;function he(t){var e,n,r=[];return n=i,pe&&n(),c&&s&&(g(c,"visibilitychange",(function(){"visible"!==c.visibilityState&&n()})),g(s,"pagehide",(function(){pe=!0,n()})),g(s,"beforeunload",(function(){pe=!0,n()}))),{send:function(n){"visible"===(null==c?void 0:c.visibilityState)?(r.push(n),r.length>=15?i():null==e&&(e=V(i,1e3))):t([n])}};function i(){null!=e&&(clearTimeout(e),e=null),r.length>0&&(t(r.slice()),r.length=0)}}function ye(t,e){return me.apply(this,arguments)}function me(){return me=w(C().mark((function e(r,i){var o,a,u,s;return C().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=JSON.stringify(i),a=o,u=o.length,s=!1,"undefined"==typeof CompressionStream){e.next=10;break}return e.next=7,ge(o);case 7:a=e.sent,u=a.byteLength,s=!0;case 10:return e.next=12,Promise.all(J.endpoints.map(function(){var e=w(C().mark((function e(i){var o,c,l;return C().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,(o=new URL(i.url)).pathname=o.pathname+(o.pathname.endsWith("/")?r.substring(1):r),c={"Content-Type":"application/json",Authorization:"Bearer ".concat(i.authToken)},i.dataset&&(c["Dash0-Dataset"]=i.dataset),s&&(c["Content-Encoding"]="gzip"),v){e.next=9;break}return n("Unable to send telemetry, fetch is not defined"),e.abrupt("return");case 9:return e.next=11,v(o,{method:"POST",headers:c,body:a,keepalive:u<=6e4});case 11:(l=e.sent).text().catch(t),l.ok||n("Failed to send telemetry to ".concat(o,": ").concat(l.status," ").concat(l.statusText)),e.next=19;break;case 16:e.prev=16,e.t0=e.catch(0),n("Error sending telemetry to ".concat(i.url).concat(r,":"),e.t0);case 19:case"end":return e.stop()}}),e,null,[[0,16]])})));return function(t){return e.apply(this,arguments)}}()));case 12:case"end":return e.stop()}}),e)}))),me.apply(this,arguments)}function ge(t){return be.apply(this,arguments)}function be(){return(be=w(C().mark((function t(e){var n,r,i;return C().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 Te,Ee=he((function(t){ye("/v1/logs",{resourceLogs:[{resource:J.resource,scopeLogs:[{scope:J.scope,logRecords:t}]}]}).catch((function(t){r("Failed to transmit logs",t)}))})),we=he((function(t){ye("/v1/traces",{resourceSpans:[{resource:J.resource,scopeSpans:[{scope:J.scope,spans:t}]}]}).catch((function(t){r("Failed to transmit spans",t)}))}));function Se(){var t,e,n,r,i,o,a;return Te||(e=(t={maxCalls:8096,maxCallsPerTenMinutes:4096,maxCallsPerTenSeconds:128}).maxCalls,n=t.maxCallsPerTenMinutes,r=t.maxCallsPerTenSeconds,i=0,o=0,a=0,B((function(){o=0}),6e5),B((function(){a=0}),1e4),Te=function(){return++i>e||++o>n||++a>r}),Te()}function Ae(t){Se()?i("Transport rate limit. Will not send item.",t):Ee.send(t)}function Oe(t){Se()?i("Transport rate limit. Will not send item.",t):we.send(t)}var Ie=["stringValue","boolValue","intValue","doubleValue","arrayValue","kvlistValue","bytesValue"];function Ne(t){if(null!=t){var e={};return Array.isArray(t)?e.arrayValue={values:t.map((function(t){return Ne(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"!==x(t))return!1;var e=Object.keys(t);return 1===e.length&&Ie.includes(e[0])}(t)?"object"===x(t)&&(e.kvlistValue={values:Object.entries(t).map((function(t){var e=L(t,2);return Ce(e[0],e[1])}))}):e=t,e}}function Ce(t,e){return{key:t,value:Ne(e)}}function Le(t,e,n){e&&t.push(Ce(e,n))}function _e(t,e){var n=t.findIndex((function(t){return t.key===e}));-1!==n&&t.splice(n,1)}var Re="traceparent",xe=/^00-([a-f0-9]{32})-([a-f0-9]{16})-[0-9]{1,2}$/;function ke(){var t,e,n=((null===(t=Array.from(null!==(e=null==c?void 0:c.getElementsByTagName("meta"))&&void 0!==e?e:[]).find((function(t){var e;return(null===(e=t.getAttribute("name"))||void 0===e?void 0:e.toLowerCase())===Re})))||void 0===t?void 0:t.content.trim())||"").match(xe)||function(){var t=d.getEntriesByType("navigation")[0];if(!t)return"";if(!t.serverTiming)return"";return function(t){var e,n=O(t);try{for(n.s();!(e=n.n()).done;){var r=e.value;if(r.name===Re)return r.description.trim()}}catch(t){n.e(t)}finally{n.f()}return""}(t.serverTiming)}().match(xe);if(n)return{traceId:n[1],spanId:n[2]}}function Pe(t,e,n){t.call(e,"traceparent","00-".concat(n.traceId,"-").concat(n.spanId,"-01"))}var je="d042",De=1;function Me(t){var e=0;return t.withoutSession&&(e|=De),e.toString(16).padStart(2,"0")}for(var Ue=new Uint32Array(256),Fe=0;Fe<256;Fe++){for(var Ve=Fe,Be=0;Be<8;Be++)Ve=1&Ve?3988292384^Ve>>>1:Ve>>>1;Ue[Fe]=Ve>>>0}function He(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^Ue[255&(r^o)]}return(4294967295^r)>>>0}(t).toString(16).padStart(8,"0");return"".concat(e).concat(m(4))}function We(t){var e=function(t){return t?"".concat(je).concat(Me({withoutSession:!1})).concat(t).concat(m(5)):"".concat(je).concat(Me({withoutSession:!0})).concat(m(13))}(_t),n=He(e),r=[];return Le(r,at,n),{traceId:e,spanId:n,name:t,kind:3,startTimeUnixNano:j(),attributes:r,events:[],links:[],status:{code:0}}}function qe(t,e,n){var r=t;return e&&(r.status=e),r.endTimeUnixNano=null!=n?String(Math.round(parseInt(r.startTimeUnixNano)+n)):j(),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:j(),attributes:null!=o?o:[]})}var Ge=null!=h&&"function"==typeof h.getItem&&"function"==typeof h.setItem;var Ke="d0_tab",Ze=null;function Ye(){if(Ge)try{var t=function(t){return Ge&&h?h.getItem(t):null}(Ke);if(t)return void(Ze=t);Ze=m(8),function(t,e){Ge&&h&&h.setItem(t,e)}(Ke,Ze)}catch(t){n("Failed to record tab ID information",t)}else i("Storage API is not available and tab tracking is therefore not supported.")}function Qe(t,e){var n,r,i,o,a;void 0===t.find((function(t){return t.key===at}))&&Le(t,at,m(8));for(var u=0;u<J.signalAttributes.length;u++)t.push(J.signalAttributes[u]);!function(t,e){try{var n=Y(e);n.username&&(n.username="REDACTED"),n.password&&(n.password="REDACTED"),Le(t,gt,n.href),Le(t,"url.path",n.pathname),Le(t,"url.domain",n.hostname),Le(t,"url.scheme",n.protocol.replace(":","")),n.hash&&Le(t,"url.fragment",n.hash.replace("#","")),n.search&&Le(t,"url.query",n.search.replace("?",""))}catch(n){Le(t,gt,String(e))}}(t,null!==(n=null!==(r=null==e?void 0:e.url)&&void 0!==r?r:null==s?void 0:s.location.href)&&void 0!==n?n:K),_t&&Le(t,"session.id",_t),Ze&&Le(t,"browser.tab.id",Ze),Le(t,"browser.window.width",null!==(i=null==s?void 0:s.innerWidth)&&void 0!==i?i:K),Le(t,"browser.window.height",null!==(o=null==s?void 0:s.innerHeight)&&void 0!==o?o:K);var c=null==l||null===(a=l.connection)||void 0===a?void 0:a.effectiveType;c&&Le(t,"network.connection.subtype",c)}function Xe(){!function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};$t((function(){var n,r=Xt(),i=Ft("LCP"),o=Bt(e,de),a=function(t){e.reportAllChanges||(t=t.slice(-1));var a,u=O(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-Ut(),0),i.entries=[s],n())}}catch(t){u.e(t)}finally{u.f()}},u=qt("largest-contentful-paint",a);if(u){n=jt(t,i,ve,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 ce(s)}),{capture:!0,once:!0});Pt((function(r){i=Ft("LCP"),n=jt(t,i,ve,e.reportAllChanges),Dt((function(){i.value=performance.now()-r.timeStamp,n(!0)}))}))}}))}($e,{reportAllChanges:!0}),fe($e,{reportAllChanges:!0}),ee($e,{reportAllChanges:!0})}function $e(t){var e=[];Le(e,ot,bt.WEB_VITAL);var n=[];Le(n,"name",t.name),Le(n,"value",Z(t.value)),Le(n,"delta",Z(t.delta));var r={timeUnixNano:j(),attributes:e,severityNumber:Tt.INFO,severityText:"INFO",body:{kvlistValue:{values:n}}};Qe(r.attributes),Ae(r)}function Je(t,e){for(var n=0,r=t.length;n<r;n++)if(t[n].test(e))return!0;return!1}var tn="data:";function en(t){return!t||(!(t=String(t))||(null==t.substring||t.substring(0,5).toLowerCase()===tn||(!!function(t){for(var e=t.toLowerCase(),n=0,r=J.endpoints.length;n<r;n++){var i=J.endpoints[n];if(e.startsWith(i.url))return!0}return!1}(t)||Je(J.ignoreUrls,t))))}var nn,rn=0,on=0,an={},un=!1;function sn(){un=!0}function cn(t,e){t&&ln("string"==typeof t?{message:t,opts:e}:{message:t.message,type:t.name,stack:t.stack,opts:e})}function ln(t){var e=t.message,n=t.type,r=t.stack,i=t.opts;if(e&&!(rn>100)&&!function(t){return!t||Je(J.ignoreErrorMessages,t)}(e)){on>=20&&(an={},on=0);var o=(e=String(e).substring(0,300))+(r=function(t){return String(t||"").split("\n").slice(0,30).join("\n")}(r))+(null==s?void 0:s.location.href),a=an[o];if(a)a.seenCount++;else{var u=[];Le(u,ot,bt.ERROR),Le(u,ht,e),n&&Le(u,yt,n),r&&Le(u,mt,r),null!=i&&i.componentStack&&Le(u,"exception.component_stack",null==i?void 0:i.componentStack.substring(0,2048)),Qe(u),a={seenCount:1,transmittedCount:0,log:{timeUnixNano:j(),attributes:u,severityNumber:Tt.ERROR,severityText:"ERROR",body:{stringValue:e}}},an[o]=a,on++}!function(){if(nn)return;nn=setTimeout(fn,1e3)}()}}function fn(){for(var t in nn&&(clearTimeout(nn),nn=null),an)if(u(an,t)){var e=an[t];e.seenCount>e.transmittedCount&&(Ae(e.log),rn++)}an={},on=0}var dn="Unhandled promise rejection: ",vn="<unavailable because Promise wasn't rejected with an Error object>";function pn(t){null==t.reason?cn({message:dn+"<no reason defined>",stack:vn}):"string"==typeof t.reason.message?cn({message:dn+t.reason.message,stack:"string"==typeof t.reason.stack?t.reason.stack:vn}):"object"!==x(t.reason)&&cn({message:dn+t.reason,stack:vn})}var hn="__dash0OriginalFunctions";function yn(t,e){for(var n=t[hn],r=0;r<n.length;r++){if(mn(n[r].valuesForEqualityCheck,e))return r}return-1}function mn(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 gn(t,e,n,r,i){return function(t,e,n){if(!t)return e;var r=t[hn]=t[hn]||[],i=yn(t,n);return-1!==i?r[i].wrappedFunction:(r.push({wrappedFunction:e,valuesForEqualityCheck:n}),e)}(t,e,bn(n,r,i))}function bn(t,e,n){return[t,e,Tn(n)]}function Tn(t){return null!=t&&("object"===x(t)?Boolean(t.capture):Boolean(t))}function En(t,e,n,r,i){return function(t,e,n){var r=null==t?void 0:t[hn];if(null==r)return n;var i=yn(t,e);if(-1===i)return n;var o=r[i];return r.splice(i,1),o.wrappedFunction}(t,bn(e,n,r),i)}function wn(){J.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),sn(),t}},i[1]=gn(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]=En(this,t,e,r,e),n.apply(this,i)}}(null==s?void 0:s.EventTarget)}function Sn(t){var e=null==s?void 0:s[t];"function"==typeof e&&(s[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),sn(),t}}}(t),e.apply(this,n)})}function An(){!function(){if(s){var t=s.onerror;s.onerror=function(e,n,r,i,o){if(un)return un=!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)),ln({message:String(e),stack:a}),"function"==typeof t?t.apply(this,arguments):void 0}}}(),"function"==typeof(null==s?void 0:s.addEventListener)&&s.addEventListener("unhandledrejection",pn),wn(),function(){if(J.wrapTimers){if(F)return void n("We discovered a usage of Zone.js. In order to avoid any incompatibility issues timer wrapping is not going to be enabled.");Sn("setTimeout"),Sn("setInterval")}}()}var On=["GET","HEAD","POST","PUT","DELETE","CONNECT","OPTIONS","TRACE","PATCH"];function In(t){return On.includes(t)}function Nn(t,e){var n=0!==e.startTime;Cn(t,q.FETCH_START,e,n),Cn(t,q.DOMAIN_LOOKUP_START,e,n),Cn(t,q.DOMAIN_LOOKUP_END,e,n),Cn(t,q.CONNECT_START,e,n),Cn(t,q.SECURE_CONNECTION_START,e,n),Cn(t,q.CONNECT_END,e,n),Cn(t,q.REQUEST_START,e,n),Cn(t,q.RESPONSE_START,e,n),Cn(t,q.RESPONSE_END,e,n)}function Cn(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+M())))))}function Ln(t,e){var n=e.encodedBodySize;null!=n&&Le(t.attributes,"http.response.body.size",n)}function _n(t){return function(){var e=w(C().mark((function e(n,r){var o,a,u,s,c,l,f,d,v,p,h,y,m,g;return C().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(u=r?Object.assign({},r):r,s=null,null!==(o=u)&&void 0!==o&&o.body&&(s=u.body,u.body=void 0),c=new Request(n,u),s&&u&&(u.body=s),!en(l=c.url)){e.next=9;break}return i("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!==(a=c.method)&&void 0!==a?a:"GET",d=In(f),v=In(f.toUpperCase()),p=v?f.toUpperCase():"_OTHER",Qe((h=We("HTTP ".concat(p))).attributes,{url:l}),Rn(n,r),Le(h.attributes,"http.request.method",p),d||Le(h.attributes,"http.request.method_original",f),(Q(l)||Je(J.propagateTraceHeadersCorsURLs,l))&&(null!==(y=u)&&void 0!==y&&y.headers?(u.headers=new Headers(u.headers),Pe(u.headers.append,u.headers,h)):n instanceof Request?Pe(c.headers.append,c.headers,h):(u||(u={}),u.headers=new Headers,Pe(u.headers.append,u.headers,h))),xn(c.headers,h,(function(t){return e=t,"".concat("http.request.header",".").concat(e.toLowerCase());var e})),(m=z({resourceMatcher:function(t){var e=t.initiatorType,n=t.name;return("fetch"===e||"xmlhttprequest"===e)&&n===Y(l).href},maxWaitForResourceMillis:J.maxWaitForResourceTimingsMillis,maxToleranceForResourceTimingsMillis:J.maxToleranceForResourceTimingsMillis,onEnd:function(t){var e=t.duration,n=t.resource;n&&(Nn(h,n),Ln(h,n)),Oe(qe(h,void 0,1e6*e))}})).start(),e.prev=23,e.next=26,t(n instanceof Request?c:n,u);case 26:return g=e.sent,kn(h,g),Pn(g).then((function(){return m.end()})).catch((function(t){m.cancel(),jn(h,t)})),e.abrupt("return",g);case 32:throw e.prev=32,e.t0=e.catch(23),m.cancel(),jn(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 Rn(t,e,n){try{return void 0}catch(n){i("failed to analyze request for GraphQL insights",n,t,e)}}function xn(t,e,n){try{t.forEach((function(t,r){J.headersToCapture.some((function(t){return t.test(r)}))&&Le(e.attributes,n(r),t)}))}catch(t){i("unable to capture http headers due to CORS policy")}}function kn(t,e){var n=e.status;!function(t,e,n){t.status={code:e,message:n}}(t,n>=200&&n<400?0:2,e.statusText),Le(t.attributes,"http.response.status_code",String(n)),xn(e.headers,t,(function(t){return e=t,"".concat("http.response.header",".").concat(e.toLowerCase());var e}))}function Pn(t){return new Promise((function(e){var n=t.clone().body;if(!n)return e();var r=n.getReader(),i=function(){var t=w(C().mark((function t(){var n;return C().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 jn(t,e){!function(t,e){var n=[];"string"==typeof e?Le(n,ht,e):e&&(e.code?Le(n,yt,e.code.toString()):e.name&&Le(n,yt,e.name),e.message&&Le(n,ht,e.message),e.stack&&Le(n,mt,e.stack),ze(t,"exception",n))}(t,e),Oe(qe(t,function(t){return{code:2,message:t&&"object"===x(t)&&"message"in t?t.message:String(t)}}(e),void 0))}function Dn(t,e,n,r){var i,o,a=function(t){var e,n,r;return t&&null!==(e=null===(n=(r=J.pageViewInstrumentation).generateMetadata)||void 0===n?void 0:n.call(r,t))&&void 0!==e?e:{}}(e),u=[];Le(u,ot,bt.PAGE_VIEW),a.attributes&&Object.entries(a.attributes).forEach((function(t){var e=L(t,2),n=e[0],r=e[1];return Le(u,n,r)})),Qe(u,{url:e});var s=[];Le(s,"title",null!==(i=null!==(o=a.title)&&void 0!==o?o:null==c?void 0:c.title)&&void 0!==i?i:K),null!=c&&c.referrer&&Le(s,"referrer",c.referrer),Le(s,"type",n?wt:Et),Le(s,"change_state",r?At:St);var l={timeUnixNano:t,attributes:u,severityNumber:Tt.INFO,severityText:"INFO",body:{kvlistValue:{values:s}}},f=ke();f&&(l.traceId=f.traceId,l.spanId=f.spanId),Ae(l)}function Mn(){var t=null==s?void 0:s.performance.getEntriesByType("navigation")[0];if(t){var e=[];Le(e,ot,bt.NAVIGATION_TIMING);var n=[];Le(n,"name",t.name),Un(n,t,"responseStatus"),Un(n,t,"fetchStart"),Un(n,t,"requestStart"),Un(n,t,"responseStart"),Un(n,t,"domInteractive"),Un(n,t,"domContentLoadedEventEnd"),Un(n,t,"domComplete"),Un(n,t,"loadEventEnd"),Un(n,t,"transferSize"),Un(n,t,"encodedBodySize"),Un(n,t,"decodedBodySize");var r={timeUnixNano:Fn(),attributes:e,severityNumber:Tt.INFO,severityText:"INFO",body:{kvlistValue:{values:n}}};Qe(r.attributes);var o=ke();o&&(r.traceId=o.traceId,r.spanId=o.spanId),Ae(r)}else i("Navigation timings not available. Cannot emit navigation timing log")}function Un(t,e,n){var r=e[n];"number"!=typeof r||isNaN(r)||Le(t,n,Number.isInteger(r)?r:Z(r))}function Fn(){return D(Math.round(M()))}var Vn={},Bn=!1,Hn=!1;function Wn(){zn(null==s?void 0:s.location.href)}function qn(t){zn(t.newURL)}function zn(t,e){var n;if(t)try{var r=new URL(t,null==s?void 0:s.location.href);((n=r).pathname!==Vn.path||Hn&&n.search!==Vn.search||Bn&&n.hash!==Vn.hash)&&(Gn(r),Dn(j(),r,!0,Boolean(e)))}catch(t){i("Failed to handle url change",t)}}function Gn(t){Vn.path=t.pathname,Vn.search=t.search,Vn.hash=t.hash}function Kn(){!function(){try{Dn(Fn(),null!=s&&s.location.href?new URL(null==s?void 0:s.location.href):void 0)}catch(t){r("Failed to transmit initial page view event",t)}if("complete"===(null==c?void 0:c.readyState))return Mn();s&&g(s,"load",(function(){setTimeout(Mn,0)}))}(),function(){var t,e,n,r;if(s&&s.history){if(J.pageViewInstrumentation.trackVirtualPageViews){Hn=null!==(t=null===(e=J.pageViewInstrumentation.includeParts)||void 0===e?void 0:e.includes("SEARCH"))&&void 0!==t&&t,Bn=null!==(n=null===(r=J.pageViewInstrumentation.includeParts)||void 0===r?void 0:r.includes("HASH"))&&void 0!==n&&n,$(s.history,"replaceState",(function(t){return function(e,n,r){return zn(r?String(r):void 0,!0),t.apply(this,[e,n,r])}})),$(s.history,"pushState",(function(t){return function(e,n,r){return zn(r?String(r):void 0),t.apply(this,[e,n,r])}})),s.addEventListener("hashchange",qn),s.addEventListener("popstate",Wn);try{Gn(new URL(s.location.href))}catch(t){}}}else i("Browser does not support history API, skipping instrumentation")}()}var Zn=function(t){if("object"===x(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},Yn=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]=Yn.options.mergeArrays?Yn.options.uniqueArrayItems?Array.from(new Set(t[n].concat(e[n]))):[].concat(_(t[n]),_(e[n])):e[n]:Zn(t[n])&&Zn(e[n])?t[n]=Yn(t[n],e[n]):!Zn(t[n])&&Zn(e[n])?t[n]=Yn(e[n],void 0):t[n]=void 0===e[n]?Yn.options.allowUndefinedOverrides?e[n]:t[n]:e[n])})),t}),{})},Qn={allowUndefinedOverrides:!0,mergeArrays:!0,uniqueArrayItems:!0};Yn.options=Qn,Yn.withOptions=function(t){Yn.options=Object.assign(Object.assign({},Qn),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=Yn.apply(void 0,n);return Yn.options=Qn,i};var Xn=!1;function $n(t){Xn?i("Dash0 SDK is being reinitialized, skipping ..."):null!=s?"function"==typeof v&&d&&d.getEntriesByType?(J.endpoints=t.endpoint instanceof Array?t.endpoint:[t.endpoint],0!==J.endpoints.length?(Object.assign(J,Yn(J,function(t,e){var n,r={},i=O(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){Le(J.resource.attributes,tt,t.serviceName),t.serviceVersion&&Le(J.resource.attributes,et,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&&Le(J.resource.attributes,nt,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&&Le(J.resource.attributes,rt,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&&Le(J.resource.attributes,it,r)}(t),function(t){var e;Le(J.signalAttributes,ut,m(16)),Le(J.signalAttributes,st,null!==(e=null==l?void 0:l.userAgent)&&void 0!==e?e:K),t.additionalSignalAttributes&&Object.entries(t.additionalSignalAttributes).forEach((function(t){var e=L(t,2),n=e[0],r=e[1];Le(J.signalAttributes,n,r)}))}(t),Ye(),Rt(t.sessionInactivityTimeoutMillis,t.sessionTerminationTimeoutMillis),Kn(),Xe(),An(),s&&s.fetch&&s.Request?$(s,"fetch",_n):i("Browser does not support the Fetch API, skipping instrumentation"),Xn=!0):n("No telemetry endpoint configured. Aborting Dash0 Web SDK initialization process.")):i("Stopping Dash0 Web SDK initialization. This browser does not support the necessary APIs"):i("Looks like we are not running in a browser context. Stopping Dash0 Web SDK initialization.")}function Jn(t,e){_e(J.signalAttributes,ct),null!=t&&Le(J.signalAttributes,ct,t),_e(J.signalAttributes,lt),null!=(null==e?void 0:e.name)&&Le(J.signalAttributes,lt,e.name),_e(J.signalAttributes,ft),null!=(null==e?void 0:e.fullName)&&Le(J.signalAttributes,ft,e.fullName),_e(J.signalAttributes,dt),null!=(null==e?void 0:e.email)&&Le(J.signalAttributes,dt,e.email),_e(J.signalAttributes,vt),null!=(null==e?void 0:e.hash)&&Le(J.signalAttributes,vt,e.hash),_e(J.signalAttributes,pt),null!=(null==e?void 0:e.roles)&&Le(J.signalAttributes,pt,e.roles)}function tr(){i("Dash0 Web SDK configuration state:",J)}function er(t,e){Le(J.signalAttributes,t,e)}function nr(t){_e(J.signalAttributes,t)}function rr(t,e){var r;if(Object.values(bt).includes(t))n("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 i=[];Qe(i),Object.entries(null!==(r=null==e?void 0:e.attributes)&&void 0!==r?r:{}).forEach((function(t){var e=L(t,2),n=e[0],r=e[1];return Le(i,n,r)})),Le(i,ot,t),null!=e&&e.title&&Le(i,"dash0.web.event.title",e.title),Ae({timeUnixNano:null!=(null==e?void 0:e.timestamp)?D(e.timestamp):j(),attributes:i,body:Ne(null==e?void 0:e.data),severityText:null==e?void 0:e.severity,severityNumber:null!=e&&e.severity?Tt[e.severity]:void 0})}}function ir(t,e){cn(t,e)}function or(t){i("".concat("Initializing Dash0 Web SDK"," (via package)")),$n(t)}export{er as addSignalAttribute,tr as debug,Jn as identify,or as init,nr as removeSignalAttribute,ir as reportError,rr as sendEvent,xt as terminateSession};
2
2
  //# sourceMappingURL=dash0.js.map
@@ -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(){}a("log");var n=a("info"),r=a("warn"),i=a("error"),o=a("debug");function a(t){return"undefined"==typeof console||"function"!=typeof console.log||"function"!=typeof console.log.apply?e:console[t]&&"function"==typeof console[t].apply?function(){console[t].apply(console,arguments)}:function(){console.log.apply(console,arguments)}}var u=Object.prototype.hasOwnProperty;function s(t,e){return u.call(t,e)}var c="undefined"!=typeof window?window:void 0,l=null==c?void 0:c.document,f=null==c?void 0:c.navigator,d="undefined"!=typeof location?location:void 0,v=(null==c?void 0:c.performance)||(null==c?void 0:c.webkitPerformance)||(null==c?void 0:c.msPerformance)||(null==c?void 0:c.mozPerformance);null==c||c.encodeURIComponent;var p=null==c?void 0:c.fetch,h=function(){try{var t;return null!==(t=null==c?void 0:c.localStorage)&&void 0!==t?t:null}catch(t){return null}}(),y=function(){try{var t;return null!==(t=null==c?void 0:c.sessionStorage)&&void 0!==t?t:null}catch(t){return null}}(),m=Array(32);function g(t){for(var e=0;e<2*t;e++)m[e]=Math.floor(16*Math.random())+48,m[e]>=58&&(m[e]+=39);return String.fromCharCode.apply(null,m.slice(0,2*t))}function b(t,e,n){t.addEventListener?t.addEventListener(e,n,!1):t.attachEvent&&t.attachEvent("on"+e,n)}var T=null!=h&&"function"==typeof h.getItem&&"function"==typeof h.setItem;function E(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 w(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 S(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){w(o,r,i,a,u,"next",t)}function u(t){w(o,r,i,a,u,"throw",t)}a(void 0)}))}}function A(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function O(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,x(r.key),r)}}(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function I(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=P(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 N(t,e,n){return(e=x(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function C(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 L(){L=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(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 C(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 _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function R(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(C,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,R.prototype={constructor:R,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(_),!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),_(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;_(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 _(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)||P(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 R(t){return function(t){if(Array.isArray(t))return E(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||P(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 x(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 k(t){return k="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},k(t)}function P(t,e){if(t){if("string"==typeof t)return E(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)?E(t,e):void 0}}function j(){return(new Date).getTime()}function D(){var t=U();return t?String(1e6*(v.now()+t)):M(new Date)}function M(t){return"object"===k(t)?M(t.getTime()):String(t)+"000000"}function U(){var t,e=null==v?void 0:v.timeOrigin;"number"!=typeof e&&(e=null==v||null===(t=v.timing)||void 0===t?void 0:t.fetchStart);return e}var F={setTimeout:null==c?void 0:c.setTimeout,clearTimeout:null==c?void 0:c.clearTimeout,setInterval:null==c?void 0:c.setInterval,clearInterval:null==c?void 0:c.clearInterval},V=null!=c&&null!=c.Zone&&null!=c.Zone.root&&"function"==typeof c.Zone.root.run;function B(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return W.apply("setTimeout",arguments)}function H(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return W.apply("setInterval",arguments)}function W(){var t,e=this;if(V)try{var n=Array.prototype.slice.apply(arguments);return c.Zone.root.run(F[e],c,n)}catch(t){r("Failed to execute %s inside of zone (via Zone.js). Falling back to execution inside currently active zone.",e,t)}return null===(t=F[e])||void 0===t?void 0:t.apply(c,arguments)}V&&o("Discovered Zone.js globals. Will attempt to register all timers inside the root Zone.");v&&v.getEntriesByType;var q=v&&"function"==typeof c.PerformanceObserver&&"function"==typeof v.now,z=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"});function G(t){return q?{start:function(){n=v.now();try{var t,e=null==c?void 0:c.PerformanceObserver;if(e)null===(t=o=new e(f))||void 0===t||t.observe({type:"resource"})}catch(t){}u=B(p,6e5)},end:function(){r=v.now(),h(),i||!K()?s():(b(l,"visibilitychange",d),a=B(s,t.maxWaitForResourceMillis))},cancel:p}:function(t){var n=0;return{start:function(){n=j()},end:function(){return t({duration:j()-n})},cancel:e}}(t.onEnd);var n,r,i,o,a,u;function s(){var e;p(),null!==(e=i)&&void 0!==e&&e.duration&&i.duration<864e5?t.onEnd({resource:i,duration:Math.round(i.duration)}):t.onEnd({resource:i,duration:Math.round(r-n)})}function f(e){var o=e.getEntriesByType("resource").find((function(e){var i=e;return i.startTime>=n&&(!r||r+t.maxToleranceForResourceTimingsMillis>=i.responseEnd)&&t.resourceMatcher(i)}));o&&(i=o,r&&s())}function d(){K()||s()}function p(){!function(){if(o){try{var t;null===(t=o)||void 0===t||t.disconnect()}catch(t){}o=void 0}}(),a&&(clearTimeout(a),a=void 0),h(),function(){if(!l)return;t=l,e="visibilitychange",n=d,t.removeEventListener?t.removeEventListener(e,n,!1):t.detachEvent&&t.detachEvent("on"+e,n);var t,e,n}()}function h(){u&&(clearTimeout(u),u=void 0)}}function K(){return"visible"===(null==l?void 0:l.visibilityState)||"prerender"===(null==l?void 0:l.visibilityState)}var Z="undefined";function Y(t){return Math.round(100*t)/100}function Q(t){var e;return"string"!=typeof t?t:new URL(t,null!==(e=null==l?void 0:l.baseURI)&&void 0!==e?e:null==d?void 0:d.href)}function X(t){try{return Q(t).origin===("undefined"!=typeof location?location.origin:void 0)}catch(t){return!1}}var $=Symbol.for("INSTRUMENTED_BY_DASH0");function J(t,e,n){var r=t[e];r?(!0===r[$]&&o("".concat(String(e)," has already been instrumented, skipping")),function(t){t[$]=!0}(r),t[e]=n(r)):o("".concat(String(e)," is not defined, unable to instrument"))}var tt={endpoints:[],resource:{attributes:[]},scope:{name:"dash0-web-sdk",version:"0.13.0",attributes:[]},signalAttributes:[],ignoreUrls:[],ignoreErrorMessages:[],wrapEventHandlers:!0,wrapTimers:!0,propagateTraceHeadersCorsURLs:[],maxWaitForResourceTimingsMillis:1e4,maxToleranceForResourceTimingsMillis:3e3,headersToCapture:[],pageViewInstrumentation:{trackVirtualPageViews:!0,includeParts:[]}},et="service.name",nt="service.version",rt="deployment.environment.name",it="deployment.name",ot="deployment.id",at="event.name",ut="dash0.web.event.id",st="page.load.id",ct="user_agent.original",lt="user.id",ft="user.name",dt="user.full_name",vt="user.email",pt="user.hash",ht="user.roles",yt="exception.message",mt="exception.type",gt="exception.stacktrace",bt="url.full",Tt={PAGE_VIEW:"browser.page_view",NAVIGATION_TIMING:"browser.navigation_timing",WEB_VITAL:"browser.web_vital",ERROR:"browser.error"},Et={UNSPECIFIED:0,TRACE:1,DEBUG:5,INFO:9,WARN:13,ERROR:17,FATAL:21},wt=0,St=1,At="pushState",Ot="replaceState",It=1;function Nt(){var t,e;return"".concat((t={ephemeralSession:!T},e=0,t.ephemeralSession&&(e|=It),e.toString(16).padStart(2,"0"))).concat(g(7))}var Ct="d0_session",Lt="#",_t=864e5,Rt=null;function xt(t,e){if(!T)return o("Storage API is not available and session tracking is therefore not supported."),void(Rt=Nt());t||(t=108e5),e||(e=216e5),t=Math.min(t,_t),e=Math.min(e,_t);try{var n=function(t){return T&&h?h.getItem(t):null}(Ct),i=function(t){if(!t)return null;var e=t.split(Lt);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);i&&!function(t,e,n){var r=j()-e;if(t.lastActivityTime<r)return!1;var i=j()-n;return t.startTime>=i}(i,t,e)&&(i=null),i?i.lastActivityTime=j():i={id:Nt(),startTime:j(),lastActivityTime:j()},function(t,e){T&&h&&h.setItem(t,e)}(Ct,function(t){return t.id+Lt+t.startTime+Lt+t.lastActivityTime}(i)),Rt=i.id}catch(t){r("Failed to record session information",t)}}var kt=-1,Pt=function(t){addEventListener("pageshow",(function(e){e.persisted&&(kt=e.timeStamp,t(e))}),!0)},jt=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)))}},Dt=function(t){requestAnimationFrame((function(){return requestAnimationFrame((function(){return t()}))}))},Mt=function(){var t=performance.getEntriesByType("navigation")[0];if(t&&t.responseStart>0&&t.responseStart<performance.now())return t},Ut=function(){var t,e=Mt();return null!==(t=null==e?void 0:e.activationStart)&&void 0!==t?t:0},Ft=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1,n=Mt(),r="navigate";return kt>=0?r="back-forward-cache":n&&(document.prerendering||Ut()>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}},Vt=new WeakMap;function Bt(t,e){return Vt.get(t)||Vt.set(t,new e),Vt.get(t)}var Ht,Wt=function(){return O((function t(){A(this,t),N(this,"t",void 0),N(this,"i",0),N(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)}}}])}(),qt=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?C(Object(n),!0).forEach((function(e){N(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):C(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)}},Gt=-1,Kt=function(){return"hidden"!==document.visibilityState||document.prerendering?1/0:0},Zt=function(t){"hidden"===document.visibilityState&&Gt>-1&&(Gt="visibilitychange"===t.type?t.timeStamp:0,Qt())},Yt=function(){addEventListener("visibilitychange",Zt,!0),addEventListener("prerenderingchange",Zt,!0)},Qt=function(){removeEventListener("visibilitychange",Zt,!0),removeEventListener("prerenderingchange",Zt,!0)},Xt=function(){if(Gt<0){var t,e=Ut(),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;Gt=null!=n?n:Kt(),Yt(),Pt((function(){setTimeout((function(){Gt=Kt(),Yt()}))}))}return{get firstHiddenTime(){return Gt}}},$t=function(t){document.prerendering?addEventListener("prerenderingchange",(function(){return t()}),!0):t()},Jt=[1800,3e3],te=[.1,.25],ee=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]:{};$t((function(){var n,r=Xt(),i=Ft("FCP"),o=qt("paint",(function(t){var e,a=I(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-Ut(),0),i.entries.push(u),n(!0)))}}catch(t){a.e(t)}finally{a.f()}}));o&&(n=jt(t,i,Jt,e.reportAllChanges),Pt((function(r){i=Ft("FCP"),n=jt(t,i,Jt,e.reportAllChanges),Dt((function(){i.value=performance.now()-r.timeStamp,n(!0)}))})))}))}(zt((function(){var n,r=Ft("CLS",0),i=Bt(e,Wt),o=function(t){var e,o=I(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=qt("layout-shift",o);a&&(n=jt(t,r,te,e.reportAllChanges),document.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&(o(a.takeRecords()),n(!0))})),Pt((function(){i.i=0,r=Ft("CLS",0),n=jt(t,r,te,e.reportAllChanges),Dt((function(){return n()}))})),setTimeout(n))})))},ne=0,re=1/0,ie=0,oe=function(t){var e,n=I(t);try{for(n.s();!(e=n.n()).done;){var r=e.value;r.interactionId&&(re=Math.min(re,r.interactionId),ie=Math.max(ie,r.interactionId),ne=ie?(ie-re)/7+1:0)}}catch(t){n.e(t)}finally{n.f()}},ae=function(){var t;return Ht?ne:null!==(t=performance.interactionCount)&&void 0!==t?t:0},ue=0,se=function(){return O((function t(){A(this,t),N(this,"u",[]),N(this,"l",new Map),N(this,"m",void 0),N(this,"v",void 0)}),[{key:"p",value:function(){ue=ae(),this.u.length=0,this.l.clear()}},{key:"P",value:function(){var t=Math.min(this.u.length-1,Math.floor((ae()-ue)/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=I(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)}}}}])}(),ce=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)})))},le=[200,500],fe=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};globalThis.PerformanceEventTiming&&"interactionId"in PerformanceEventTiming.prototype&&$t((function(){var n;"interactionCount"in performance||Ht||(Ht=qt("event",oe,{type:"event",buffered:!0,durationThreshold:0}));var r,i=Ft("INP"),o=Bt(e,se),a=function(t){ce((function(){var e,n=I(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=qt("event",a,{durationThreshold:null!==(n=e.durationThreshold)&&void 0!==n?n:40});r=jt(t,i,le,e.reportAllChanges),u&&(u.observe({type:"first-input",buffered:!0}),document.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&(a(u.takeRecords()),r(!0))})),Pt((function(){o.p(),i=Ft("INP"),r=jt(t,i,le,e.reportAllChanges)})))}))},de=function(){return O((function t(){A(this,t),N(this,"m",void 0)}),[{key:"h",value:function(t){var e;null===(e=this.m)||void 0===e||e.call(this,t)}}])}(),ve=[2500,4e3],pe=!1;function he(t){var e,n,r=[];return n=i,pe&&n(),l&&c&&(b(l,"visibilitychange",(function(){"visible"!==l.visibilityState&&n()})),b(c,"pagehide",(function(){pe=!0,n()})),b(c,"beforeunload",(function(){pe=!0,n()}))),{send:function(n){"visible"===(null==l?void 0:l.visibilityState)?(r.push(n),r.length>=15?i():null==e&&(e=B(i,1e3))):t([n])}};function i(){null!=e&&(clearTimeout(e),e=null),r.length>0&&(t(r.slice()),r.length=0)}}function ye(t,e){return me.apply(this,arguments)}function me(){return me=S(L().mark((function t(n,i){var o,a,u,s;return L().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(o=JSON.stringify(i),a=o,u=o.length,s=!1,"undefined"==typeof CompressionStream){t.next=10;break}return t.next=7,ge(o);case 7:a=t.sent,u=a.byteLength,s=!0;case 10:return t.next=12,Promise.all(tt.endpoints.map(function(){var t=S(L().mark((function t(i){var o,c,l;return L().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,(o=new URL(i.url)).pathname=o.pathname+(o.pathname.endsWith("/")?n.substring(1):n),c={"Content-Type":"application/json",Authorization:"Bearer ".concat(i.authToken)},i.dataset&&(c["Dash0-Dataset"]=i.dataset),s&&(c["Content-Encoding"]="gzip"),p){t.next=9;break}return r("Unable to send telemetry, fetch is not defined"),t.abrupt("return");case 9:return t.next=11,p(o,{method:"POST",headers:c,body:a,keepalive:u<=6e4});case 11:(l=t.sent).text().catch(e),l.ok||r("Failed to send telemetry to ".concat(o,": ").concat(l.status," ").concat(l.statusText)),t.next=19;break;case 16:t.prev=16,t.t0=t.catch(0),r("Error sending telemetry to ".concat(i.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 12:case"end":return t.stop()}}),t)}))),me.apply(this,arguments)}function ge(t){return be.apply(this,arguments)}function be(){return(be=S(L().mark((function t(e){var n,r,i;return L().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 Te,Ee=he((function(t){ye("/v1/logs",{resourceLogs:[{resource:tt.resource,scopeLogs:[{scope:tt.scope,logRecords:t}]}]}).catch((function(t){i("Failed to transmit logs",t)}))})),we=he((function(t){ye("/v1/traces",{resourceSpans:[{resource:tt.resource,scopeSpans:[{scope:tt.scope,spans:t}]}]}).catch((function(t){i("Failed to transmit spans",t)}))}));function Se(){var t,e,n,r,i,o,a;return Te||(e=(t={maxCalls:8096,maxCallsPerTenMinutes:4096,maxCallsPerTenSeconds:128}).maxCalls,n=t.maxCallsPerTenMinutes,r=t.maxCallsPerTenSeconds,i=0,o=0,a=0,H((function(){o=0}),6e5),H((function(){a=0}),1e4),Te=function(){return++i>e||++o>n||++a>r}),Te()}function Ae(t){Se()?o("Transport rate limit. Will not send item.",t):Ee.send(t)}function Oe(t){Se()?o("Transport rate limit. Will not send item.",t):we.send(t)}var Ie=["stringValue","boolValue","intValue","doubleValue","arrayValue","kvlistValue","bytesValue"];function Ne(t){if(null!=t){var e={};return Array.isArray(t)?e.arrayValue={values:t.map((function(t){return Ne(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"!==k(t))return!1;var e=Object.keys(t);return 1===e.length&&Ie.includes(e[0])}(t)?"object"===k(t)&&(e.kvlistValue={values:Object.entries(t).map((function(t){var e=_(t,2);return Ce(e[0],e[1])}))}):e=t,e}}function Ce(t,e){return{key:t,value:Ne(e)}}function Le(t,e,n){e&&t.push(Ce(e,n))}function _e(t,e){var n=t.findIndex((function(t){return t.key===e}));-1!==n&&t.splice(n,1)}var Re="traceparent",xe=/^00-([a-f0-9]{32})-([a-f0-9]{16})-[0-9]{1,2}$/;function ke(){var t,e,n=((null===(t=Array.from(null!==(e=null==l?void 0:l.getElementsByTagName("meta"))&&void 0!==e?e:[]).find((function(t){var e;return(null===(e=t.getAttribute("name"))||void 0===e?void 0:e.toLowerCase())===Re})))||void 0===t?void 0:t.content.trim())||"").match(xe)||function(){var t=v.getEntriesByType("navigation")[0];if(!t)return"";if(!t.serverTiming)return"";return function(t){var e,n=I(t);try{for(n.s();!(e=n.n()).done;){var r=e.value;if(r.name===Re)return r.description.trim()}}catch(t){n.e(t)}finally{n.f()}return""}(t.serverTiming)}().match(xe);if(n)return{traceId:n[1],spanId:n[2]}}function Pe(t,e,n){t.call(e,"traceparent","00-".concat(n.traceId,"-").concat(n.spanId,"-01"))}var je="d042",De=1;function Me(t){var e=0;return t.withoutSession&&(e|=De),e.toString(16).padStart(2,"0")}for(var Ue=new Uint32Array(256),Fe=0;Fe<256;Fe++){for(var Ve=Fe,Be=0;Be<8;Be++)Ve=1&Ve?3988292384^Ve>>>1:Ve>>>1;Ue[Fe]=Ve>>>0}function He(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^Ue[255&(r^o)]}return(4294967295^r)>>>0}(t).toString(16).padStart(8,"0");return"".concat(e).concat(g(4))}function We(t){var e=function(t){return t?"".concat(je).concat(Me({withoutSession:!1})).concat(t).concat(g(5)):"".concat(je).concat(Me({withoutSession:!0})).concat(g(13))}(Rt),n=He(e),r=[];return Le(r,ut,n),{traceId:e,spanId:n,name:t,kind:3,startTimeUnixNano:D(),attributes:r,events:[],links:[],status:{code:0}}}function qe(t,e,n){var r=t;return e&&(r.status=e),r.endTimeUnixNano=null!=n?String(Math.round(parseInt(r.startTimeUnixNano)+n)):D(),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:D(),attributes:null!=o?o:[]})}var Ge=null!=y&&"function"==typeof y.getItem&&"function"==typeof y.setItem;var Ke="d0_tab",Ze=null;function Ye(){if(Ge)try{var t=function(t){return Ge&&y?y.getItem(t):null}(Ke);if(t)return void(Ze=t);Ze=g(8),function(t,e){Ge&&y&&y.setItem(t,e)}(Ke,Ze)}catch(t){r("Failed to record tab ID information",t)}else o("Storage API is not available and tab tracking is therefore not supported.")}function Qe(t,e){var n,r,i,o,a;void 0===t.find((function(t){return t.key===ut}))&&Le(t,ut,g(8));for(var u=0;u<tt.signalAttributes.length;u++)t.push(tt.signalAttributes[u]);!function(t,e){try{var n=Q(e);n.username&&(n.username="REDACTED"),n.password&&(n.password="REDACTED"),Le(t,bt,n.href),Le(t,"url.path",n.pathname),Le(t,"url.domain",n.hostname),Le(t,"url.scheme",n.protocol.replace(":","")),n.hash&&Le(t,"url.fragment",n.hash.replace("#","")),n.search&&Le(t,"url.query",n.search.replace("?",""))}catch(n){Le(t,bt,String(e))}}(t,null!==(n=null!==(r=null==e?void 0:e.url)&&void 0!==r?r:null==c?void 0:c.location.href)&&void 0!==n?n:Z),Rt&&Le(t,"session.id",Rt),Ze&&Le(t,"browser.tab.id",Ze),Le(t,"browser.window.width",null!==(i=null==c?void 0:c.innerWidth)&&void 0!==i?i:Z),Le(t,"browser.window.height",null!==(o=null==c?void 0:c.innerHeight)&&void 0!==o?o:Z);var s=null==f||null===(a=f.connection)||void 0===a?void 0:a.effectiveType;s&&Le(t,"network.connection.subtype",s)}function Xe(){!function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};$t((function(){var n,r=Xt(),i=Ft("LCP"),o=Bt(e,de),a=function(t){e.reportAllChanges||(t=t.slice(-1));var a,u=I(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-Ut(),0),i.entries=[s],n())}}catch(t){u.e(t)}finally{u.f()}},u=qt("largest-contentful-paint",a);if(u){n=jt(t,i,ve,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 ce(s)}),{capture:!0,once:!0});Pt((function(r){i=Ft("LCP"),n=jt(t,i,ve,e.reportAllChanges),Dt((function(){i.value=performance.now()-r.timeStamp,n(!0)}))}))}}))}($e,{reportAllChanges:!0}),fe($e,{reportAllChanges:!0}),ee($e,{reportAllChanges:!0})}function $e(t){var e=[];Le(e,at,Tt.WEB_VITAL);var n=[];Le(n,"name",t.name),Le(n,"value",Y(t.value)),Le(n,"delta",Y(t.delta));var r={timeUnixNano:D(),attributes:e,severityNumber:Et.INFO,severityText:"INFO",body:{kvlistValue:{values:n}}};Qe(r.attributes),Ae(r)}function Je(t,e){for(var n=0,r=t.length;n<r;n++)if(t[n].test(e))return!0;return!1}var tn="data:";function en(t){return!t||(!(t=String(t))||(null==t.substring||t.substring(0,5).toLowerCase()===tn||(!!function(t){for(var e=t.toLowerCase(),n=0,r=tt.endpoints.length;n<r;n++){var i=tt.endpoints[n];if(e.startsWith(i.url))return!0}return!1}(t)||Je(tt.ignoreUrls,t))))}var nn,rn=0,on=0,an={},un=!1;function sn(){un=!0}function cn(t,e){t&&ln("string"==typeof t?{message:t,opts:e}:{message:t.message,type:t.name,stack:t.stack,opts:e})}function ln(t){var e=t.message,n=t.type,r=t.stack,i=t.opts;if(e&&!(rn>100)&&!function(t){return!t||Je(tt.ignoreErrorMessages,t)}(e)){on>=20&&(an={},on=0);var o=(e=String(e).substring(0,300))+(r=function(t){return String(t||"").split("\n").slice(0,30).join("\n")}(r))+(null==c?void 0:c.location.href),a=an[o];if(a)a.seenCount++;else{var u=[];Le(u,at,Tt.ERROR),Le(u,yt,e),n&&Le(u,mt,n),r&&Le(u,gt,r),null!=i&&i.componentStack&&Le(u,"exception.component_stack",null==i?void 0:i.componentStack.substring(0,2048)),Qe(u),a={seenCount:1,transmittedCount:0,log:{timeUnixNano:D(),attributes:u,severityNumber:Et.ERROR,severityText:"ERROR",body:{stringValue:e}}},an[o]=a,on++}!function(){if(nn)return;nn=setTimeout(fn,1e3)}()}}function fn(){for(var t in nn&&(clearTimeout(nn),nn=null),an)if(s(an,t)){var e=an[t];e.seenCount>e.transmittedCount&&(Ae(e.log),rn++)}an={},on=0}var dn="Unhandled promise rejection: ",vn="<unavailable because Promise wasn't rejected with an Error object>";function pn(t){null==t.reason?cn({message:dn+"<no reason defined>",stack:vn}):"string"==typeof t.reason.message?cn({message:dn+t.reason.message,stack:"string"==typeof t.reason.stack?t.reason.stack:vn}):"object"!==k(t.reason)&&cn({message:dn+t.reason,stack:vn})}var hn="__dash0OriginalFunctions";function yn(t,e){for(var n=t[hn],r=0;r<n.length;r++){if(mn(n[r].valuesForEqualityCheck,e))return r}return-1}function mn(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 gn(t,e,n,r,i){return function(t,e,n){if(!t)return e;var r=t[hn]=t[hn]||[],i=yn(t,n);return-1!==i?r[i].wrappedFunction:(r.push({wrappedFunction:e,valuesForEqualityCheck:n}),e)}(t,e,bn(n,r,i))}function bn(t,e,n){return[t,e,Tn(n)]}function Tn(t){return null!=t&&("object"===k(t)?Boolean(t.capture):Boolean(t))}function En(t,e,n,r,i){return function(t,e,n){var r=null==t?void 0:t[hn];if(null==r)return n;var i=yn(t,e);if(-1===i)return n;var o=r[i];return r.splice(i,1),o.wrappedFunction}(t,bn(e,n,r),i)}function wn(){tt.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),sn(),t}},i[1]=gn(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]=En(this,t,e,r,e),n.apply(this,i)}}(null==c?void 0:c.EventTarget)}function Sn(t){var e=null==c?void 0:c[t];"function"==typeof e&&(c[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),sn(),t}}}(t),e.apply(this,n)})}function An(){!function(){if(c){var t=c.onerror;c.onerror=function(e,n,r,i,o){if(un)return un=!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)),ln({message:String(e),stack:a}),"function"==typeof t?t.apply(this,arguments):void 0}}}(),"function"==typeof(null==c?void 0:c.addEventListener)&&c.addEventListener("unhandledrejection",pn),wn(),function(){if(tt.wrapTimers){if(V)return void r("We discovered a usage of Zone.js. In order to avoid any incompatibility issues timer wrapping is not going to be enabled.");Sn("setTimeout"),Sn("setInterval")}}()}var On=["GET","HEAD","POST","PUT","DELETE","CONNECT","OPTIONS","TRACE","PATCH"];function In(t){return On.includes(t)}function Nn(t,e){var n=0!==e.startTime;Cn(t,z.FETCH_START,e,n),Cn(t,z.DOMAIN_LOOKUP_START,e,n),Cn(t,z.DOMAIN_LOOKUP_END,e,n),Cn(t,z.CONNECT_START,e,n),Cn(t,z.SECURE_CONNECTION_START,e,n),Cn(t,z.CONNECT_END,e,n),Cn(t,z.REQUEST_START,e,n),Cn(t,z.RESPONSE_START,e,n),Cn(t,z.RESPONSE_END,e,n)}function Cn(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+U())))))}function Ln(t,e){var n=e.encodedBodySize;null!=n&&Le(t.attributes,"http.response.body.size",n)}function _n(t){return function(){var e=S(L().mark((function e(n,r){var i,a,u,s,c,l,f,d,v,p,h,y,m,g;return L().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(u=r?Object.assign({},r):r,s=null,null!==(i=u)&&void 0!==i&&i.body&&(s=u.body,u.body=void 0),c=new Request(n,u),s&&u&&(u.body=s),!en(l=c.url)){e.next=9;break}return o("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!==(a=c.method)&&void 0!==a?a:"GET",d=In(f),v=In(f.toUpperCase()),p=v?f.toUpperCase():"_OTHER",Qe((h=We("HTTP ".concat(p))).attributes,{url:l}),Rn(n,r),Le(h.attributes,"http.request.method",p),d||Le(h.attributes,"http.request.method_original",f),(X(l)||Je(tt.propagateTraceHeadersCorsURLs,l))&&(null!==(y=u)&&void 0!==y&&y.headers?(u.headers=new Headers(u.headers),Pe(u.headers.append,u.headers,h)):n instanceof Request?Pe(c.headers.append,c.headers,h):(u||(u={}),u.headers=new Headers,Pe(u.headers.append,u.headers,h))),xn(c.headers,h,(function(t){return e=t,"".concat("http.request.header",".").concat(e.toLowerCase());var e})),(m=G({resourceMatcher:function(t){var e=t.initiatorType,n=t.name;return("fetch"===e||"xmlhttprequest"===e)&&n===Q(l).href},maxWaitForResourceMillis:tt.maxWaitForResourceTimingsMillis,maxToleranceForResourceTimingsMillis:tt.maxToleranceForResourceTimingsMillis,onEnd:function(t){var e=t.duration,n=t.resource;n&&(Nn(h,n),Ln(h,n)),Oe(qe(h,void 0,1e6*e))}})).start(),e.prev=23,e.next=26,t(n instanceof Request?c:n,u);case 26:return g=e.sent,kn(h,g),Pn(g).then((function(){return m.end()})).catch((function(t){m.cancel(),jn(h,t)})),e.abrupt("return",g);case 32:throw e.prev=32,e.t0=e.catch(23),m.cancel(),jn(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 Rn(t,e,n){try{return void 0}catch(n){o("failed to analyze request for GraphQL insights",n,t,e)}}function xn(t,e,n){try{t.forEach((function(t,r){tt.headersToCapture.some((function(t){return t.test(r)}))&&Le(e.attributes,n(r),t)}))}catch(t){o("unable to capture http headers due to CORS policy")}}function kn(t,e){var n=e.status;!function(t,e,n){t.status={code:e,message:n}}(t,n>=200&&n<400?0:2,e.statusText),Le(t.attributes,"http.response.status_code",String(n)),xn(e.headers,t,(function(t){return e=t,"".concat("http.response.header",".").concat(e.toLowerCase());var e}))}function Pn(t){return new Promise((function(e){var n=t.clone().body;if(!n)return e();var r=n.getReader(),i=function(){var t=S(L().mark((function t(){var n;return L().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 jn(t,e){!function(t,e){var n=[];"string"==typeof e?Le(n,yt,e):e&&(e.code?Le(n,mt,e.code.toString()):e.name&&Le(n,mt,e.name),e.message&&Le(n,yt,e.message),e.stack&&Le(n,gt,e.stack),ze(t,"exception",n))}(t,e),Oe(qe(t,function(t){return{code:2,message:t&&"object"===k(t)&&"message"in t?t.message:String(t)}}(e),void 0))}function Dn(t,e,n,r){var i,o,a=function(t){var e,n,r;return t&&null!==(e=null===(n=(r=tt.pageViewInstrumentation).generateMetadata)||void 0===n?void 0:n.call(r,t))&&void 0!==e?e:{}}(e),u=[];Le(u,at,Tt.PAGE_VIEW),a.attributes&&Object.entries(a.attributes).forEach((function(t){var e=_(t,2),n=e[0],r=e[1];return Le(u,n,r)})),Qe(u,{url:e});var s=[];Le(s,"title",null!==(i=null!==(o=a.title)&&void 0!==o?o:null==l?void 0:l.title)&&void 0!==i?i:Z),null!=l&&l.referrer&&Le(s,"referrer",l.referrer),Le(s,"type",n?St:wt),Le(s,"change_state",r?Ot:At);var c={timeUnixNano:t,attributes:u,severityNumber:Et.INFO,severityText:"INFO",body:{kvlistValue:{values:s}}},f=ke();f&&(c.traceId=f.traceId,c.spanId=f.spanId),Ae(c)}function Mn(){var t=null==c?void 0:c.performance.getEntriesByType("navigation")[0];if(t){var e=[];Le(e,at,Tt.NAVIGATION_TIMING);var n=[];Le(n,"name",t.name),Un(n,t,"responseStatus"),Un(n,t,"fetchStart"),Un(n,t,"requestStart"),Un(n,t,"responseStart"),Un(n,t,"domInteractive"),Un(n,t,"domContentLoadedEventEnd"),Un(n,t,"domComplete"),Un(n,t,"loadEventEnd"),Un(n,t,"transferSize"),Un(n,t,"encodedBodySize"),Un(n,t,"decodedBodySize");var r={timeUnixNano:Fn(),attributes:e,severityNumber:Et.INFO,severityText:"INFO",body:{kvlistValue:{values:n}}};Qe(r.attributes);var i=ke();i&&(r.traceId=i.traceId,r.spanId=i.spanId),Ae(r)}else o("Navigation timings not available. Cannot emit navigation timing log")}function Un(t,e,n){var r=e[n];"number"!=typeof r||isNaN(r)||Le(t,n,Number.isInteger(r)?r:Y(r))}function Fn(){return M(Math.round(U()))}var Vn={},Bn=!1,Hn=!1;function Wn(){zn(null==c?void 0:c.location.href)}function qn(t){zn(t.newURL)}function zn(t,e){var n;if(t)try{var r=new URL(t,null==c?void 0:c.location.href);((n=r).pathname!==Vn.path||Hn&&n.search!==Vn.search||Bn&&n.hash!==Vn.hash)&&(Gn(r),Dn(D(),r,!0,Boolean(e)))}catch(t){o("Failed to handle url change",t)}}function Gn(t){Vn.path=t.pathname,Vn.search=t.search,Vn.hash=t.hash}function Kn(){!function(){try{Dn(Fn(),null!=c&&c.location.href?new URL(null==c?void 0:c.location.href):void 0)}catch(t){i("Failed to transmit initial page view event",t)}if("complete"===(null==l?void 0:l.readyState))return Mn();c&&b(c,"load",(function(){setTimeout(Mn,0)}))}(),function(){var t,e,n,r;if(c&&c.history){if(tt.pageViewInstrumentation.trackVirtualPageViews){Hn=null!==(t=null===(e=tt.pageViewInstrumentation.includeParts)||void 0===e?void 0:e.includes("SEARCH"))&&void 0!==t&&t,Bn=null!==(n=null===(r=tt.pageViewInstrumentation.includeParts)||void 0===r?void 0:r.includes("HASH"))&&void 0!==n&&n,J(c.history,"replaceState",(function(t){return function(e,n,r){return zn(r?String(r):void 0,!0),t.apply(this,[e,n,r])}})),J(c.history,"pushState",(function(t){return function(e,n,r){return zn(r?String(r):void 0),t.apply(this,[e,n,r])}})),c.addEventListener("hashchange",qn),c.addEventListener("popstate",Wn);try{Gn(new URL(c.location.href))}catch(t){}}}else o("Browser does not support history API, skipping instrumentation")}()}var Zn=function(t){if("object"===k(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},Yn=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]=Yn.options.mergeArrays?Yn.options.uniqueArrayItems?Array.from(new Set(t[n].concat(e[n]))):[].concat(R(t[n]),R(e[n])):e[n]:Zn(t[n])&&Zn(e[n])?t[n]=Yn(t[n],e[n]):!Zn(t[n])&&Zn(e[n])?t[n]=Yn(e[n],void 0):t[n]=void 0===e[n]?Yn.options.allowUndefinedOverrides?e[n]:t[n]:e[n])})),t}),{})},Qn={allowUndefinedOverrides:!0,mergeArrays:!0,uniqueArrayItems:!0};Yn.options=Qn,Yn.withOptions=function(t){Yn.options=Object.assign(Object.assign({},Qn),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=Yn.apply(void 0,n);return Yn.options=Qn,i};var Xn=!1;function $n(t){Xn?o("Dash0 SDK is being reinitialized, skipping ..."):null!=c?"function"==typeof p&&v&&v.getEntriesByType?(tt.endpoints=t.endpoint instanceof Array?t.endpoint:[t.endpoint],0!==tt.endpoints.length?(Object.assign(tt,Yn(tt,function(t,e){var n,r={},i=I(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){Le(tt.resource.attributes,et,t.serviceName),t.serviceVersion&&Le(tt.resource.attributes,nt,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&&Le(tt.resource.attributes,rt,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&&Le(tt.resource.attributes,it,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&&Le(tt.resource.attributes,ot,r)}(t),function(t){var e;Le(tt.signalAttributes,st,g(16)),Le(tt.signalAttributes,ct,null!==(e=null==f?void 0:f.userAgent)&&void 0!==e?e:Z),t.additionalSignalAttributes&&Object.entries(t.additionalSignalAttributes).forEach((function(t){var e=_(t,2),n=e[0],r=e[1];Le(tt.signalAttributes,n,r)}))}(t),Ye(),xt(t.sessionInactivityTimeoutMillis,t.sessionTerminationTimeoutMillis),Kn(),Xe(),An(),c&&c.fetch&&c.Request?J(c,"fetch",_n):o("Browser does not support the Fetch API, skipping instrumentation"),Xn=!0):r("No telemetry endpoint configured. Aborting Dash0 Web SDK initialization process.")):o("Stopping Dash0 Web SDK initialization. This browser does not support the necessary APIs"):o("Looks like we are not running in a browser context. Stopping Dash0 Web SDK initialization.")}t.addSignalAttribute=function(t,e){Le(tt.signalAttributes,t,e)},t.debug=function(){o("Dash0 Web SDK configuration state:",tt)},t.identify=function(t,e){_e(tt.signalAttributes,lt),null!=t&&Le(tt.signalAttributes,lt,t),_e(tt.signalAttributes,ft),null!=(null==e?void 0:e.name)&&Le(tt.signalAttributes,ft,e.name),_e(tt.signalAttributes,dt),null!=(null==e?void 0:e.fullName)&&Le(tt.signalAttributes,dt,e.fullName),_e(tt.signalAttributes,vt),null!=(null==e?void 0:e.email)&&Le(tt.signalAttributes,vt,e.email),_e(tt.signalAttributes,pt),null!=(null==e?void 0:e.hash)&&Le(tt.signalAttributes,pt,e.hash),_e(tt.signalAttributes,ht),null!=(null==e?void 0:e.roles)&&Le(tt.signalAttributes,ht,e.roles)},t.init=function(t){o("".concat("Initializing Dash0 Web SDK"," (via package)")),$n(t)},t.removeSignalAttribute=function(t){_e(tt.signalAttributes,t)},t.reportError=function(t,e){cn(t,e)},t.sendEvent=function(t,e){var n;if(Object.values(Tt).includes(t))r("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 i=[];Qe(i),Object.entries(null!==(n=null==e?void 0:e.attributes)&&void 0!==n?n:{}).forEach((function(t){var e=_(t,2),n=e[0],r=e[1];return Le(i,n,r)})),Le(i,at,t),null!=e&&e.title&&Le(i,"dash0.web.event.title",e.title),Ae({timeUnixNano:null!=(null==e?void 0:e.timestamp)?M(e.timestamp):D(),attributes:i,body:Ne(null==e?void 0:e.data),severityText:null==e?void 0:e.severity,severityNumber:null!=e&&e.severity?Et[e.severity]:void 0})}},t.terminateSession=function(){if(T)try{!function(t){T&&h&&h.removeItem(t)}(Ct)}catch(t){n("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(){}a("log");var n=a("info"),r=a("warn"),i=a("error"),o=a("debug");function a(t){return"undefined"==typeof console||"function"!=typeof console.log||"function"!=typeof console.log.apply?e:console[t]&&"function"==typeof console[t].apply?function(){console[t].apply(console,arguments)}:function(){console.log.apply(console,arguments)}}var u=Object.prototype.hasOwnProperty;function s(t,e){return u.call(t,e)}var c="undefined"!=typeof window?window:void 0,l=null==c?void 0:c.document,f=null==c?void 0:c.navigator,d="undefined"!=typeof location?location:void 0,v=(null==c?void 0:c.performance)||(null==c?void 0:c.webkitPerformance)||(null==c?void 0:c.msPerformance)||(null==c?void 0:c.mozPerformance);null==c||c.encodeURIComponent;var p=null==c?void 0:c.fetch,h=function(){try{var t;return null!==(t=null==c?void 0:c.localStorage)&&void 0!==t?t:null}catch(t){return null}}(),y=function(){try{var t;return null!==(t=null==c?void 0:c.sessionStorage)&&void 0!==t?t:null}catch(t){return null}}(),m=Array(32);function g(t){for(var e=0;e<2*t;e++)m[e]=Math.floor(16*Math.random())+48,m[e]>=58&&(m[e]+=39);return String.fromCharCode.apply(null,m.slice(0,2*t))}function b(t,e,n){t.addEventListener?t.addEventListener(e,n,!1):t.attachEvent&&t.attachEvent("on"+e,n)}var T=null!=h&&"function"==typeof h.getItem&&"function"==typeof h.setItem;function E(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 w(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 S(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){w(o,r,i,a,u,"next",t)}function u(t){w(o,r,i,a,u,"throw",t)}a(void 0)}))}}function A(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function O(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,x(r.key),r)}}(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function I(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=P(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 N(t,e,n){return(e=x(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function C(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 L(){L=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(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 C(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 _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function R(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(C,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,R.prototype={constructor:R,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(_),!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),_(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;_(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 _(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)||P(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 R(t){return function(t){if(Array.isArray(t))return E(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||P(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 x(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 k(t){return k="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},k(t)}function P(t,e){if(t){if("string"==typeof t)return E(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)?E(t,e):void 0}}function j(){return(new Date).getTime()}function D(){var t=U();return t?String(1e6*(v.now()+t)):M(new Date)}function M(t){return"object"===k(t)?M(t.getTime()):String(t)+"000000"}function U(){var t,e=null==v?void 0:v.timeOrigin;"number"!=typeof e&&(e=null==v||null===(t=v.timing)||void 0===t?void 0:t.fetchStart);return e}var F={setTimeout:null==c?void 0:c.setTimeout,clearTimeout:null==c?void 0:c.clearTimeout,setInterval:null==c?void 0:c.setInterval,clearInterval:null==c?void 0:c.clearInterval},V=null!=c&&null!=c.Zone&&null!=c.Zone.root&&"function"==typeof c.Zone.root.run;function B(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return W.apply("setTimeout",arguments)}function H(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return W.apply("setInterval",arguments)}function W(){var t,e=this;if(V)try{var n=Array.prototype.slice.apply(arguments);return c.Zone.root.run(F[e],c,n)}catch(t){r("Failed to execute %s inside of zone (via Zone.js). Falling back to execution inside currently active zone.",e,t)}return null===(t=F[e])||void 0===t?void 0:t.apply(c,arguments)}V&&o("Discovered Zone.js globals. Will attempt to register all timers inside the root Zone.");v&&v.getEntriesByType;var q=v&&"function"==typeof c.PerformanceObserver&&"function"==typeof v.now,z=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"});function G(t){return q?{start:function(){n=v.now();try{var t,e=null==c?void 0:c.PerformanceObserver;if(e)null===(t=o=new e(f))||void 0===t||t.observe({type:"resource"})}catch(t){}u=B(p,6e5)},end:function(){r=v.now(),h(),i||!K()?s():(b(l,"visibilitychange",d),a=B(s,t.maxWaitForResourceMillis))},cancel:p}:function(t){var n=0;return{start:function(){n=j()},end:function(){return t({duration:j()-n})},cancel:e}}(t.onEnd);var n,r,i,o,a,u;function s(){var e;p(),null!==(e=i)&&void 0!==e&&e.duration&&i.duration<864e5?t.onEnd({resource:i,duration:Math.round(i.duration)}):t.onEnd({resource:i,duration:Math.round(r-n)})}function f(e){var o=e.getEntriesByType("resource").find((function(e){var i=e;return i.startTime>=n&&(!r||r+t.maxToleranceForResourceTimingsMillis>=i.responseEnd)&&t.resourceMatcher(i)}));o&&(i=o,r&&s())}function d(){K()||s()}function p(){!function(){if(o){try{var t;null===(t=o)||void 0===t||t.disconnect()}catch(t){}o=void 0}}(),a&&(clearTimeout(a),a=void 0),h(),function(){if(!l)return;t=l,e="visibilitychange",n=d,t.removeEventListener?t.removeEventListener(e,n,!1):t.detachEvent&&t.detachEvent("on"+e,n);var t,e,n}()}function h(){u&&(clearTimeout(u),u=void 0)}}function K(){return"visible"===(null==l?void 0:l.visibilityState)||"prerender"===(null==l?void 0:l.visibilityState)}var Z="undefined";function Y(t){return Math.round(100*t)/100}function Q(t){var e;return"string"!=typeof t?t:new URL(t,null!==(e=null==l?void 0:l.baseURI)&&void 0!==e?e:null==d?void 0:d.href)}function X(t){try{return Q(t).origin===("undefined"!=typeof location?location.origin:void 0)}catch(t){return!1}}var $=Symbol.for("INSTRUMENTED_BY_DASH0");function J(t,e,n){var r=t[e];r?(!0===r[$]&&o("".concat(String(e)," has already been instrumented, skipping")),function(t){t[$]=!0}(r),t[e]=n(r)):o("".concat(String(e)," is not defined, unable to instrument"))}var tt={endpoints:[],resource:{attributes:[]},scope:{name:"dash0-web-sdk",version:"0.13.1",attributes:[]},signalAttributes:[],ignoreUrls:[],ignoreErrorMessages:[],wrapEventHandlers:!0,wrapTimers:!0,propagateTraceHeadersCorsURLs:[],maxWaitForResourceTimingsMillis:1e4,maxToleranceForResourceTimingsMillis:3e3,headersToCapture:[],pageViewInstrumentation:{trackVirtualPageViews:!0,includeParts:[]}},et="service.name",nt="service.version",rt="deployment.environment.name",it="deployment.name",ot="deployment.id",at="event.name",ut="dash0.web.event.id",st="page.load.id",ct="user_agent.original",lt="user.id",ft="user.name",dt="user.full_name",vt="user.email",pt="user.hash",ht="user.roles",yt="exception.message",mt="exception.type",gt="exception.stacktrace",bt="url.full",Tt={PAGE_VIEW:"browser.page_view",NAVIGATION_TIMING:"browser.navigation_timing",WEB_VITAL:"browser.web_vital",ERROR:"browser.error"},Et={UNSPECIFIED:0,TRACE:1,DEBUG:5,INFO:9,WARN:13,ERROR:17,FATAL:21},wt=0,St=1,At="pushState",Ot="replaceState",It=1;function Nt(){var t,e;return"".concat((t={ephemeralSession:!T},e=0,t.ephemeralSession&&(e|=It),e.toString(16).padStart(2,"0"))).concat(g(7))}var Ct="d0_session",Lt="#",_t=864e5,Rt=null;function xt(t,e){if(!T)return o("Storage API is not available and session tracking is therefore not supported."),void(Rt=Nt());t||(t=108e5),e||(e=216e5),t=Math.min(t,_t),e=Math.min(e,_t);try{var n=function(t){return T&&h?h.getItem(t):null}(Ct),i=function(t){if(!t)return null;var e=t.split(Lt);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);i&&!function(t,e,n){var r=j()-e;if(t.lastActivityTime<r)return!1;var i=j()-n;return t.startTime>=i}(i,t,e)&&(i=null),i?i.lastActivityTime=j():i={id:Nt(),startTime:j(),lastActivityTime:j()},function(t,e){T&&h&&h.setItem(t,e)}(Ct,function(t){return t.id+Lt+t.startTime+Lt+t.lastActivityTime}(i)),Rt=i.id}catch(t){r("Failed to record session information",t)}}var kt=-1,Pt=function(t){addEventListener("pageshow",(function(e){e.persisted&&(kt=e.timeStamp,t(e))}),!0)},jt=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)))}},Dt=function(t){requestAnimationFrame((function(){return requestAnimationFrame((function(){return t()}))}))},Mt=function(){var t=performance.getEntriesByType("navigation")[0];if(t&&t.responseStart>0&&t.responseStart<performance.now())return t},Ut=function(){var t,e=Mt();return null!==(t=null==e?void 0:e.activationStart)&&void 0!==t?t:0},Ft=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1,n=Mt(),r="navigate";return kt>=0?r="back-forward-cache":n&&(document.prerendering||Ut()>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}},Vt=new WeakMap;function Bt(t,e){return Vt.get(t)||Vt.set(t,new e),Vt.get(t)}var Ht,Wt=function(){return O((function t(){A(this,t),N(this,"t",void 0),N(this,"i",0),N(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)}}}])}(),qt=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?C(Object(n),!0).forEach((function(e){N(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):C(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)}},Gt=-1,Kt=function(){return"hidden"!==document.visibilityState||document.prerendering?1/0:0},Zt=function(t){"hidden"===document.visibilityState&&Gt>-1&&(Gt="visibilitychange"===t.type?t.timeStamp:0,Qt())},Yt=function(){addEventListener("visibilitychange",Zt,!0),addEventListener("prerenderingchange",Zt,!0)},Qt=function(){removeEventListener("visibilitychange",Zt,!0),removeEventListener("prerenderingchange",Zt,!0)},Xt=function(){if(Gt<0){var t,e=Ut(),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;Gt=null!=n?n:Kt(),Yt(),Pt((function(){setTimeout((function(){Gt=Kt(),Yt()}))}))}return{get firstHiddenTime(){return Gt}}},$t=function(t){document.prerendering?addEventListener("prerenderingchange",(function(){return t()}),!0):t()},Jt=[1800,3e3],te=[.1,.25],ee=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]:{};$t((function(){var n,r=Xt(),i=Ft("FCP"),o=qt("paint",(function(t){var e,a=I(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-Ut(),0),i.entries.push(u),n(!0)))}}catch(t){a.e(t)}finally{a.f()}}));o&&(n=jt(t,i,Jt,e.reportAllChanges),Pt((function(r){i=Ft("FCP"),n=jt(t,i,Jt,e.reportAllChanges),Dt((function(){i.value=performance.now()-r.timeStamp,n(!0)}))})))}))}(zt((function(){var n,r=Ft("CLS",0),i=Bt(e,Wt),o=function(t){var e,o=I(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=qt("layout-shift",o);a&&(n=jt(t,r,te,e.reportAllChanges),document.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&(o(a.takeRecords()),n(!0))})),Pt((function(){i.i=0,r=Ft("CLS",0),n=jt(t,r,te,e.reportAllChanges),Dt((function(){return n()}))})),setTimeout(n))})))},ne=0,re=1/0,ie=0,oe=function(t){var e,n=I(t);try{for(n.s();!(e=n.n()).done;){var r=e.value;r.interactionId&&(re=Math.min(re,r.interactionId),ie=Math.max(ie,r.interactionId),ne=ie?(ie-re)/7+1:0)}}catch(t){n.e(t)}finally{n.f()}},ae=function(){var t;return Ht?ne:null!==(t=performance.interactionCount)&&void 0!==t?t:0},ue=0,se=function(){return O((function t(){A(this,t),N(this,"u",[]),N(this,"l",new Map),N(this,"m",void 0),N(this,"v",void 0)}),[{key:"p",value:function(){ue=ae(),this.u.length=0,this.l.clear()}},{key:"P",value:function(){var t=Math.min(this.u.length-1,Math.floor((ae()-ue)/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=I(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)}}}}])}(),ce=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)})))},le=[200,500],fe=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};globalThis.PerformanceEventTiming&&"interactionId"in PerformanceEventTiming.prototype&&$t((function(){var n;"interactionCount"in performance||Ht||(Ht=qt("event",oe,{type:"event",buffered:!0,durationThreshold:0}));var r,i=Ft("INP"),o=Bt(e,se),a=function(t){ce((function(){var e,n=I(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=qt("event",a,{durationThreshold:null!==(n=e.durationThreshold)&&void 0!==n?n:40});r=jt(t,i,le,e.reportAllChanges),u&&(u.observe({type:"first-input",buffered:!0}),document.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&(a(u.takeRecords()),r(!0))})),Pt((function(){o.p(),i=Ft("INP"),r=jt(t,i,le,e.reportAllChanges)})))}))},de=function(){return O((function t(){A(this,t),N(this,"m",void 0)}),[{key:"h",value:function(t){var e;null===(e=this.m)||void 0===e||e.call(this,t)}}])}(),ve=[2500,4e3],pe=!1;function he(t){var e,n,r=[];return n=i,pe&&n(),l&&c&&(b(l,"visibilitychange",(function(){"visible"!==l.visibilityState&&n()})),b(c,"pagehide",(function(){pe=!0,n()})),b(c,"beforeunload",(function(){pe=!0,n()}))),{send:function(n){"visible"===(null==l?void 0:l.visibilityState)?(r.push(n),r.length>=15?i():null==e&&(e=B(i,1e3))):t([n])}};function i(){null!=e&&(clearTimeout(e),e=null),r.length>0&&(t(r.slice()),r.length=0)}}function ye(t,e){return me.apply(this,arguments)}function me(){return me=S(L().mark((function t(n,i){var o,a,u,s;return L().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(o=JSON.stringify(i),a=o,u=o.length,s=!1,"undefined"==typeof CompressionStream){t.next=10;break}return t.next=7,ge(o);case 7:a=t.sent,u=a.byteLength,s=!0;case 10:return t.next=12,Promise.all(tt.endpoints.map(function(){var t=S(L().mark((function t(i){var o,c,l;return L().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,(o=new URL(i.url)).pathname=o.pathname+(o.pathname.endsWith("/")?n.substring(1):n),c={"Content-Type":"application/json",Authorization:"Bearer ".concat(i.authToken)},i.dataset&&(c["Dash0-Dataset"]=i.dataset),s&&(c["Content-Encoding"]="gzip"),p){t.next=9;break}return r("Unable to send telemetry, fetch is not defined"),t.abrupt("return");case 9:return t.next=11,p(o,{method:"POST",headers:c,body:a,keepalive:u<=6e4});case 11:(l=t.sent).text().catch(e),l.ok||r("Failed to send telemetry to ".concat(o,": ").concat(l.status," ").concat(l.statusText)),t.next=19;break;case 16:t.prev=16,t.t0=t.catch(0),r("Error sending telemetry to ".concat(i.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 12:case"end":return t.stop()}}),t)}))),me.apply(this,arguments)}function ge(t){return be.apply(this,arguments)}function be(){return(be=S(L().mark((function t(e){var n,r,i;return L().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 Te,Ee=he((function(t){ye("/v1/logs",{resourceLogs:[{resource:tt.resource,scopeLogs:[{scope:tt.scope,logRecords:t}]}]}).catch((function(t){i("Failed to transmit logs",t)}))})),we=he((function(t){ye("/v1/traces",{resourceSpans:[{resource:tt.resource,scopeSpans:[{scope:tt.scope,spans:t}]}]}).catch((function(t){i("Failed to transmit spans",t)}))}));function Se(){var t,e,n,r,i,o,a;return Te||(e=(t={maxCalls:8096,maxCallsPerTenMinutes:4096,maxCallsPerTenSeconds:128}).maxCalls,n=t.maxCallsPerTenMinutes,r=t.maxCallsPerTenSeconds,i=0,o=0,a=0,H((function(){o=0}),6e5),H((function(){a=0}),1e4),Te=function(){return++i>e||++o>n||++a>r}),Te()}function Ae(t){Se()?o("Transport rate limit. Will not send item.",t):Ee.send(t)}function Oe(t){Se()?o("Transport rate limit. Will not send item.",t):we.send(t)}var Ie=["stringValue","boolValue","intValue","doubleValue","arrayValue","kvlistValue","bytesValue"];function Ne(t){if(null!=t){var e={};return Array.isArray(t)?e.arrayValue={values:t.map((function(t){return Ne(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"!==k(t))return!1;var e=Object.keys(t);return 1===e.length&&Ie.includes(e[0])}(t)?"object"===k(t)&&(e.kvlistValue={values:Object.entries(t).map((function(t){var e=_(t,2);return Ce(e[0],e[1])}))}):e=t,e}}function Ce(t,e){return{key:t,value:Ne(e)}}function Le(t,e,n){e&&t.push(Ce(e,n))}function _e(t,e){var n=t.findIndex((function(t){return t.key===e}));-1!==n&&t.splice(n,1)}var Re="traceparent",xe=/^00-([a-f0-9]{32})-([a-f0-9]{16})-[0-9]{1,2}$/;function ke(){var t,e,n=((null===(t=Array.from(null!==(e=null==l?void 0:l.getElementsByTagName("meta"))&&void 0!==e?e:[]).find((function(t){var e;return(null===(e=t.getAttribute("name"))||void 0===e?void 0:e.toLowerCase())===Re})))||void 0===t?void 0:t.content.trim())||"").match(xe)||function(){var t=v.getEntriesByType("navigation")[0];if(!t)return"";if(!t.serverTiming)return"";return function(t){var e,n=I(t);try{for(n.s();!(e=n.n()).done;){var r=e.value;if(r.name===Re)return r.description.trim()}}catch(t){n.e(t)}finally{n.f()}return""}(t.serverTiming)}().match(xe);if(n)return{traceId:n[1],spanId:n[2]}}function Pe(t,e,n){t.call(e,"traceparent","00-".concat(n.traceId,"-").concat(n.spanId,"-01"))}var je="d042",De=1;function Me(t){var e=0;return t.withoutSession&&(e|=De),e.toString(16).padStart(2,"0")}for(var Ue=new Uint32Array(256),Fe=0;Fe<256;Fe++){for(var Ve=Fe,Be=0;Be<8;Be++)Ve=1&Ve?3988292384^Ve>>>1:Ve>>>1;Ue[Fe]=Ve>>>0}function He(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^Ue[255&(r^o)]}return(4294967295^r)>>>0}(t).toString(16).padStart(8,"0");return"".concat(e).concat(g(4))}function We(t){var e=function(t){return t?"".concat(je).concat(Me({withoutSession:!1})).concat(t).concat(g(5)):"".concat(je).concat(Me({withoutSession:!0})).concat(g(13))}(Rt),n=He(e),r=[];return Le(r,ut,n),{traceId:e,spanId:n,name:t,kind:3,startTimeUnixNano:D(),attributes:r,events:[],links:[],status:{code:0}}}function qe(t,e,n){var r=t;return e&&(r.status=e),r.endTimeUnixNano=null!=n?String(Math.round(parseInt(r.startTimeUnixNano)+n)):D(),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:D(),attributes:null!=o?o:[]})}var Ge=null!=y&&"function"==typeof y.getItem&&"function"==typeof y.setItem;var Ke="d0_tab",Ze=null;function Ye(){if(Ge)try{var t=function(t){return Ge&&y?y.getItem(t):null}(Ke);if(t)return void(Ze=t);Ze=g(8),function(t,e){Ge&&y&&y.setItem(t,e)}(Ke,Ze)}catch(t){r("Failed to record tab ID information",t)}else o("Storage API is not available and tab tracking is therefore not supported.")}function Qe(t,e){var n,r,i,o,a;void 0===t.find((function(t){return t.key===ut}))&&Le(t,ut,g(8));for(var u=0;u<tt.signalAttributes.length;u++)t.push(tt.signalAttributes[u]);!function(t,e){try{var n=Q(e);n.username&&(n.username="REDACTED"),n.password&&(n.password="REDACTED"),Le(t,bt,n.href),Le(t,"url.path",n.pathname),Le(t,"url.domain",n.hostname),Le(t,"url.scheme",n.protocol.replace(":","")),n.hash&&Le(t,"url.fragment",n.hash.replace("#","")),n.search&&Le(t,"url.query",n.search.replace("?",""))}catch(n){Le(t,bt,String(e))}}(t,null!==(n=null!==(r=null==e?void 0:e.url)&&void 0!==r?r:null==c?void 0:c.location.href)&&void 0!==n?n:Z),Rt&&Le(t,"session.id",Rt),Ze&&Le(t,"browser.tab.id",Ze),Le(t,"browser.window.width",null!==(i=null==c?void 0:c.innerWidth)&&void 0!==i?i:Z),Le(t,"browser.window.height",null!==(o=null==c?void 0:c.innerHeight)&&void 0!==o?o:Z);var s=null==f||null===(a=f.connection)||void 0===a?void 0:a.effectiveType;s&&Le(t,"network.connection.subtype",s)}function Xe(){!function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};$t((function(){var n,r=Xt(),i=Ft("LCP"),o=Bt(e,de),a=function(t){e.reportAllChanges||(t=t.slice(-1));var a,u=I(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-Ut(),0),i.entries=[s],n())}}catch(t){u.e(t)}finally{u.f()}},u=qt("largest-contentful-paint",a);if(u){n=jt(t,i,ve,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 ce(s)}),{capture:!0,once:!0});Pt((function(r){i=Ft("LCP"),n=jt(t,i,ve,e.reportAllChanges),Dt((function(){i.value=performance.now()-r.timeStamp,n(!0)}))}))}}))}($e,{reportAllChanges:!0}),fe($e,{reportAllChanges:!0}),ee($e,{reportAllChanges:!0})}function $e(t){var e=[];Le(e,at,Tt.WEB_VITAL);var n=[];Le(n,"name",t.name),Le(n,"value",Y(t.value)),Le(n,"delta",Y(t.delta));var r={timeUnixNano:D(),attributes:e,severityNumber:Et.INFO,severityText:"INFO",body:{kvlistValue:{values:n}}};Qe(r.attributes),Ae(r)}function Je(t,e){for(var n=0,r=t.length;n<r;n++)if(t[n].test(e))return!0;return!1}var tn="data:";function en(t){return!t||(!(t=String(t))||(null==t.substring||t.substring(0,5).toLowerCase()===tn||(!!function(t){for(var e=t.toLowerCase(),n=0,r=tt.endpoints.length;n<r;n++){var i=tt.endpoints[n];if(e.startsWith(i.url))return!0}return!1}(t)||Je(tt.ignoreUrls,t))))}var nn,rn=0,on=0,an={},un=!1;function sn(){un=!0}function cn(t,e){t&&ln("string"==typeof t?{message:t,opts:e}:{message:t.message,type:t.name,stack:t.stack,opts:e})}function ln(t){var e=t.message,n=t.type,r=t.stack,i=t.opts;if(e&&!(rn>100)&&!function(t){return!t||Je(tt.ignoreErrorMessages,t)}(e)){on>=20&&(an={},on=0);var o=(e=String(e).substring(0,300))+(r=function(t){return String(t||"").split("\n").slice(0,30).join("\n")}(r))+(null==c?void 0:c.location.href),a=an[o];if(a)a.seenCount++;else{var u=[];Le(u,at,Tt.ERROR),Le(u,yt,e),n&&Le(u,mt,n),r&&Le(u,gt,r),null!=i&&i.componentStack&&Le(u,"exception.component_stack",null==i?void 0:i.componentStack.substring(0,2048)),Qe(u),a={seenCount:1,transmittedCount:0,log:{timeUnixNano:D(),attributes:u,severityNumber:Et.ERROR,severityText:"ERROR",body:{stringValue:e}}},an[o]=a,on++}!function(){if(nn)return;nn=setTimeout(fn,1e3)}()}}function fn(){for(var t in nn&&(clearTimeout(nn),nn=null),an)if(s(an,t)){var e=an[t];e.seenCount>e.transmittedCount&&(Ae(e.log),rn++)}an={},on=0}var dn="Unhandled promise rejection: ",vn="<unavailable because Promise wasn't rejected with an Error object>";function pn(t){null==t.reason?cn({message:dn+"<no reason defined>",stack:vn}):"string"==typeof t.reason.message?cn({message:dn+t.reason.message,stack:"string"==typeof t.reason.stack?t.reason.stack:vn}):"object"!==k(t.reason)&&cn({message:dn+t.reason,stack:vn})}var hn="__dash0OriginalFunctions";function yn(t,e){for(var n=t[hn],r=0;r<n.length;r++){if(mn(n[r].valuesForEqualityCheck,e))return r}return-1}function mn(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 gn(t,e,n,r,i){return function(t,e,n){if(!t)return e;var r=t[hn]=t[hn]||[],i=yn(t,n);return-1!==i?r[i].wrappedFunction:(r.push({wrappedFunction:e,valuesForEqualityCheck:n}),e)}(t,e,bn(n,r,i))}function bn(t,e,n){return[t,e,Tn(n)]}function Tn(t){return null!=t&&("object"===k(t)?Boolean(t.capture):Boolean(t))}function En(t,e,n,r,i){return function(t,e,n){var r=null==t?void 0:t[hn];if(null==r)return n;var i=yn(t,e);if(-1===i)return n;var o=r[i];return r.splice(i,1),o.wrappedFunction}(t,bn(e,n,r),i)}function wn(){tt.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),sn(),t}},i[1]=gn(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]=En(this,t,e,r,e),n.apply(this,i)}}(null==c?void 0:c.EventTarget)}function Sn(t){var e=null==c?void 0:c[t];"function"==typeof e&&(c[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),sn(),t}}}(t),e.apply(this,n)})}function An(){!function(){if(c){var t=c.onerror;c.onerror=function(e,n,r,i,o){if(un)return un=!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)),ln({message:String(e),stack:a}),"function"==typeof t?t.apply(this,arguments):void 0}}}(),"function"==typeof(null==c?void 0:c.addEventListener)&&c.addEventListener("unhandledrejection",pn),wn(),function(){if(tt.wrapTimers){if(V)return void r("We discovered a usage of Zone.js. In order to avoid any incompatibility issues timer wrapping is not going to be enabled.");Sn("setTimeout"),Sn("setInterval")}}()}var On=["GET","HEAD","POST","PUT","DELETE","CONNECT","OPTIONS","TRACE","PATCH"];function In(t){return On.includes(t)}function Nn(t,e){var n=0!==e.startTime;Cn(t,z.FETCH_START,e,n),Cn(t,z.DOMAIN_LOOKUP_START,e,n),Cn(t,z.DOMAIN_LOOKUP_END,e,n),Cn(t,z.CONNECT_START,e,n),Cn(t,z.SECURE_CONNECTION_START,e,n),Cn(t,z.CONNECT_END,e,n),Cn(t,z.REQUEST_START,e,n),Cn(t,z.RESPONSE_START,e,n),Cn(t,z.RESPONSE_END,e,n)}function Cn(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+U())))))}function Ln(t,e){var n=e.encodedBodySize;null!=n&&Le(t.attributes,"http.response.body.size",n)}function _n(t){return function(){var e=S(L().mark((function e(n,r){var i,a,u,s,c,l,f,d,v,p,h,y,m,g;return L().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(u=r?Object.assign({},r):r,s=null,null!==(i=u)&&void 0!==i&&i.body&&(s=u.body,u.body=void 0),c=new Request(n,u),s&&u&&(u.body=s),!en(l=c.url)){e.next=9;break}return o("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!==(a=c.method)&&void 0!==a?a:"GET",d=In(f),v=In(f.toUpperCase()),p=v?f.toUpperCase():"_OTHER",Qe((h=We("HTTP ".concat(p))).attributes,{url:l}),Rn(n,r),Le(h.attributes,"http.request.method",p),d||Le(h.attributes,"http.request.method_original",f),(X(l)||Je(tt.propagateTraceHeadersCorsURLs,l))&&(null!==(y=u)&&void 0!==y&&y.headers?(u.headers=new Headers(u.headers),Pe(u.headers.append,u.headers,h)):n instanceof Request?Pe(c.headers.append,c.headers,h):(u||(u={}),u.headers=new Headers,Pe(u.headers.append,u.headers,h))),xn(c.headers,h,(function(t){return e=t,"".concat("http.request.header",".").concat(e.toLowerCase());var e})),(m=G({resourceMatcher:function(t){var e=t.initiatorType,n=t.name;return("fetch"===e||"xmlhttprequest"===e)&&n===Q(l).href},maxWaitForResourceMillis:tt.maxWaitForResourceTimingsMillis,maxToleranceForResourceTimingsMillis:tt.maxToleranceForResourceTimingsMillis,onEnd:function(t){var e=t.duration,n=t.resource;n&&(Nn(h,n),Ln(h,n)),Oe(qe(h,void 0,1e6*e))}})).start(),e.prev=23,e.next=26,t(n instanceof Request?c:n,u);case 26:return g=e.sent,kn(h,g),Pn(g).then((function(){return m.end()})).catch((function(t){m.cancel(),jn(h,t)})),e.abrupt("return",g);case 32:throw e.prev=32,e.t0=e.catch(23),m.cancel(),jn(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 Rn(t,e,n){try{return void 0}catch(n){o("failed to analyze request for GraphQL insights",n,t,e)}}function xn(t,e,n){try{t.forEach((function(t,r){tt.headersToCapture.some((function(t){return t.test(r)}))&&Le(e.attributes,n(r),t)}))}catch(t){o("unable to capture http headers due to CORS policy")}}function kn(t,e){var n=e.status;!function(t,e,n){t.status={code:e,message:n}}(t,n>=200&&n<400?0:2,e.statusText),Le(t.attributes,"http.response.status_code",String(n)),xn(e.headers,t,(function(t){return e=t,"".concat("http.response.header",".").concat(e.toLowerCase());var e}))}function Pn(t){return new Promise((function(e){var n=t.clone().body;if(!n)return e();var r=n.getReader(),i=function(){var t=S(L().mark((function t(){var n;return L().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 jn(t,e){!function(t,e){var n=[];"string"==typeof e?Le(n,yt,e):e&&(e.code?Le(n,mt,e.code.toString()):e.name&&Le(n,mt,e.name),e.message&&Le(n,yt,e.message),e.stack&&Le(n,gt,e.stack),ze(t,"exception",n))}(t,e),Oe(qe(t,function(t){return{code:2,message:t&&"object"===k(t)&&"message"in t?t.message:String(t)}}(e),void 0))}function Dn(t,e,n,r){var i,o,a=function(t){var e,n,r;return t&&null!==(e=null===(n=(r=tt.pageViewInstrumentation).generateMetadata)||void 0===n?void 0:n.call(r,t))&&void 0!==e?e:{}}(e),u=[];Le(u,at,Tt.PAGE_VIEW),a.attributes&&Object.entries(a.attributes).forEach((function(t){var e=_(t,2),n=e[0],r=e[1];return Le(u,n,r)})),Qe(u,{url:e});var s=[];Le(s,"title",null!==(i=null!==(o=a.title)&&void 0!==o?o:null==l?void 0:l.title)&&void 0!==i?i:Z),null!=l&&l.referrer&&Le(s,"referrer",l.referrer),Le(s,"type",n?St:wt),Le(s,"change_state",r?Ot:At);var c={timeUnixNano:t,attributes:u,severityNumber:Et.INFO,severityText:"INFO",body:{kvlistValue:{values:s}}},f=ke();f&&(c.traceId=f.traceId,c.spanId=f.spanId),Ae(c)}function Mn(){var t=null==c?void 0:c.performance.getEntriesByType("navigation")[0];if(t){var e=[];Le(e,at,Tt.NAVIGATION_TIMING);var n=[];Le(n,"name",t.name),Un(n,t,"responseStatus"),Un(n,t,"fetchStart"),Un(n,t,"requestStart"),Un(n,t,"responseStart"),Un(n,t,"domInteractive"),Un(n,t,"domContentLoadedEventEnd"),Un(n,t,"domComplete"),Un(n,t,"loadEventEnd"),Un(n,t,"transferSize"),Un(n,t,"encodedBodySize"),Un(n,t,"decodedBodySize");var r={timeUnixNano:Fn(),attributes:e,severityNumber:Et.INFO,severityText:"INFO",body:{kvlistValue:{values:n}}};Qe(r.attributes);var i=ke();i&&(r.traceId=i.traceId,r.spanId=i.spanId),Ae(r)}else o("Navigation timings not available. Cannot emit navigation timing log")}function Un(t,e,n){var r=e[n];"number"!=typeof r||isNaN(r)||Le(t,n,Number.isInteger(r)?r:Y(r))}function Fn(){return M(Math.round(U()))}var Vn={},Bn=!1,Hn=!1;function Wn(){zn(null==c?void 0:c.location.href)}function qn(t){zn(t.newURL)}function zn(t,e){var n;if(t)try{var r=new URL(t,null==c?void 0:c.location.href);((n=r).pathname!==Vn.path||Hn&&n.search!==Vn.search||Bn&&n.hash!==Vn.hash)&&(Gn(r),Dn(D(),r,!0,Boolean(e)))}catch(t){o("Failed to handle url change",t)}}function Gn(t){Vn.path=t.pathname,Vn.search=t.search,Vn.hash=t.hash}function Kn(){!function(){try{Dn(Fn(),null!=c&&c.location.href?new URL(null==c?void 0:c.location.href):void 0)}catch(t){i("Failed to transmit initial page view event",t)}if("complete"===(null==l?void 0:l.readyState))return Mn();c&&b(c,"load",(function(){setTimeout(Mn,0)}))}(),function(){var t,e,n,r;if(c&&c.history){if(tt.pageViewInstrumentation.trackVirtualPageViews){Hn=null!==(t=null===(e=tt.pageViewInstrumentation.includeParts)||void 0===e?void 0:e.includes("SEARCH"))&&void 0!==t&&t,Bn=null!==(n=null===(r=tt.pageViewInstrumentation.includeParts)||void 0===r?void 0:r.includes("HASH"))&&void 0!==n&&n,J(c.history,"replaceState",(function(t){return function(e,n,r){return zn(r?String(r):void 0,!0),t.apply(this,[e,n,r])}})),J(c.history,"pushState",(function(t){return function(e,n,r){return zn(r?String(r):void 0),t.apply(this,[e,n,r])}})),c.addEventListener("hashchange",qn),c.addEventListener("popstate",Wn);try{Gn(new URL(c.location.href))}catch(t){}}}else o("Browser does not support history API, skipping instrumentation")}()}var Zn=function(t){if("object"===k(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},Yn=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]=Yn.options.mergeArrays?Yn.options.uniqueArrayItems?Array.from(new Set(t[n].concat(e[n]))):[].concat(R(t[n]),R(e[n])):e[n]:Zn(t[n])&&Zn(e[n])?t[n]=Yn(t[n],e[n]):!Zn(t[n])&&Zn(e[n])?t[n]=Yn(e[n],void 0):t[n]=void 0===e[n]?Yn.options.allowUndefinedOverrides?e[n]:t[n]:e[n])})),t}),{})},Qn={allowUndefinedOverrides:!0,mergeArrays:!0,uniqueArrayItems:!0};Yn.options=Qn,Yn.withOptions=function(t){Yn.options=Object.assign(Object.assign({},Qn),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=Yn.apply(void 0,n);return Yn.options=Qn,i};var Xn=!1;function $n(t){Xn?o("Dash0 SDK is being reinitialized, skipping ..."):null!=c?"function"==typeof p&&v&&v.getEntriesByType?(tt.endpoints=t.endpoint instanceof Array?t.endpoint:[t.endpoint],0!==tt.endpoints.length?(Object.assign(tt,Yn(tt,function(t,e){var n,r={},i=I(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){Le(tt.resource.attributes,et,t.serviceName),t.serviceVersion&&Le(tt.resource.attributes,nt,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&&Le(tt.resource.attributes,rt,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&&Le(tt.resource.attributes,it,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&&Le(tt.resource.attributes,ot,r)}(t),function(t){var e;Le(tt.signalAttributes,st,g(16)),Le(tt.signalAttributes,ct,null!==(e=null==f?void 0:f.userAgent)&&void 0!==e?e:Z),t.additionalSignalAttributes&&Object.entries(t.additionalSignalAttributes).forEach((function(t){var e=_(t,2),n=e[0],r=e[1];Le(tt.signalAttributes,n,r)}))}(t),Ye(),xt(t.sessionInactivityTimeoutMillis,t.sessionTerminationTimeoutMillis),Kn(),Xe(),An(),c&&c.fetch&&c.Request?J(c,"fetch",_n):o("Browser does not support the Fetch API, skipping instrumentation"),Xn=!0):r("No telemetry endpoint configured. Aborting Dash0 Web SDK initialization process.")):o("Stopping Dash0 Web SDK initialization. This browser does not support the necessary APIs"):o("Looks like we are not running in a browser context. Stopping Dash0 Web SDK initialization.")}t.addSignalAttribute=function(t,e){Le(tt.signalAttributes,t,e)},t.debug=function(){o("Dash0 Web SDK configuration state:",tt)},t.identify=function(t,e){_e(tt.signalAttributes,lt),null!=t&&Le(tt.signalAttributes,lt,t),_e(tt.signalAttributes,ft),null!=(null==e?void 0:e.name)&&Le(tt.signalAttributes,ft,e.name),_e(tt.signalAttributes,dt),null!=(null==e?void 0:e.fullName)&&Le(tt.signalAttributes,dt,e.fullName),_e(tt.signalAttributes,vt),null!=(null==e?void 0:e.email)&&Le(tt.signalAttributes,vt,e.email),_e(tt.signalAttributes,pt),null!=(null==e?void 0:e.hash)&&Le(tt.signalAttributes,pt,e.hash),_e(tt.signalAttributes,ht),null!=(null==e?void 0:e.roles)&&Le(tt.signalAttributes,ht,e.roles)},t.init=function(t){o("".concat("Initializing Dash0 Web SDK"," (via package)")),$n(t)},t.removeSignalAttribute=function(t){_e(tt.signalAttributes,t)},t.reportError=function(t,e){cn(t,e)},t.sendEvent=function(t,e){var n;if(Object.values(Tt).includes(t))r("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 i=[];Qe(i),Object.entries(null!==(n=null==e?void 0:e.attributes)&&void 0!==n?n:{}).forEach((function(t){var e=_(t,2),n=e[0],r=e[1];return Le(i,n,r)})),Le(i,at,t),null!=e&&e.title&&Le(i,"dash0.web.event.title",e.title),Ae({timeUnixNano:null!=(null==e?void 0:e.timestamp)?M(e.timestamp):D(),attributes:i,body:Ne(null==e?void 0:e.data),severityText:null==e?void 0:e.severity,severityNumber:null!=e&&e.severity?Et[e.severity]:void 0})}},t.terminateSession=function(){if(T)try{!function(t){T&&h&&h.removeItem(t)}(Ct)}catch(t){n("Failed to terminate session",t)}}}));
2
2
  //# sourceMappingURL=dash0.umd.cjs.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dash0/sdk-web",
3
- "version": "0.13.0",
3
+ "version": "0.13.1",
4
4
  "description": "Dash0's Web SDK to collect telemetry from end-users' web browsers",
5
5
  "type": "module",
6
6
  "main": "dist/dash0.umd.cjs",