(self.webpackChunkfareharbor_com=self.webpackChunkfareharbor_com||[]).push([[6373],{99833:function(t,e,n){var r;!function(o,i){"use strict";var a="function",s="undefined",u="object",c="string",p="major",l="model",f="name",d="type",h="vendor",_="version",v="architecture",g="console",m="mobile",y="tablet",T="smarttv",b="wearable",E="embedded",w="Amazon",S="Apple",O="ASUS",A="BlackBerry",R="Browser",L="Chrome",P="Firefox",C="Google",N="Huawei",x="LG",I="Microsoft",D="Motorola",k="Opera",M="Samsung",j="Sharp",U="Sony",B="Xiaomi",H="Zebra",F="Facebook",V="Chromium OS",G="Mac OS",X=" Browser",z=function(t){for(var e={},n=0;n0?2===s.length?typeof s[1]==a?this[s[0]]=s[1].call(this,p):this[s[0]]=s[1]:3===s.length?typeof s[1]!==a||s[1].exec&&s[1].test?this[s[0]]=p?p.replace(s[1],s[2]):i:this[s[0]]=p?s[1].call(this,p,s[2]):i:4===s.length&&(this[s[0]]=p?s[3].call(this,p.replace(s[1],s[2])):i):this[s]=p||i;l+=2}},K=function(t,e){for(var n in e)if(typeof e[n]===u&&e[n].length>0){for(var r=0;r2&&(t[l]="iPad",t[d]=y),t},this.getEngine=function(){var t={};return t[f]=i,t[_]=i,Z.call(t,r,T.engine),t},this.getOS=function(){var t={};return t[f]=i,t[_]=i,Z.call(t,r,T.os),b&&!t[f]&&g&&g.platform&&"Unknown"!=g.platform&&(t[f]=g.platform.replace(/chrome os/i,V).replace(/macos/i,G)),t},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return r},this.setUA=function(t){return r=typeof t===c&&t.length>500?W(t,500):t,this},this.setUA(r),this};J.VERSION="1.0.39",J.BROWSER=z([f,_,p]),J.CPU=z([v]),J.DEVICE=z([l,h,d,g,m,T,y,b,E]),J.ENGINE=J.OS=z([f,_]),typeof e!==s?(t.exports&&(e=t.exports=J),e.UAParser=J):n.amdO?(r=function(){return J}.call(e,n,e,t))===i||(t.exports=r):typeof o!==s&&(o.UAParser=J);var tt=typeof o!==s&&(o.jQuery||o.Zepto);if(tt&&!tt.ua){var et=new J;tt.ua=et.getResult(),tt.ua.get=function(){return et.getUA()},tt.ua.set=function(t){et.setUA(t);var e=et.getResult();for(var n in e)tt.ua[n]=e[n]}}}("object"==typeof window?window:this)},49698:function(t,e,n){"use strict";var r="object"==typeof globalThis?globalThis:"object"==typeof self?self:"object"==typeof window?window:"object"==typeof n.g?n.g:{},o="1.8.0",i=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;var a=function(t){var e=new Set([t]),n=new Set,r=t.match(i);if(!r)return function(){return!1};var o=+r[1],a=+r[2],s=+r[3];if(null!=r[4])return function(e){return e===t};function u(t){return n.add(t),!1}function c(t){return e.add(t),!0}return function(t){if(e.has(t))return!0;if(n.has(t))return!1;var r=t.match(i);if(!r)return u(t);var p=+r[1],l=+r[2],f=+r[3];return null!=r[4]||o!==p?u(t):0===o?a===l&&s<=f?c(t):u(t):a<=l?c(t):u(t)}}(o),s=o.split(".")[0],u=Symbol.for("opentelemetry.js.api."+s),c=r;function p(t,e,n,r){var i;void 0===r&&(r=!1);var a=c[u]=null!==(i=c[u])&&void 0!==i?i:{version:o};if(!r&&a[t]){var s=new Error("@opentelemetry/api: Attempted duplicate registration of API: "+t);return n.error(s.stack||s.message),!1}if(a.version!==o){s=new Error("@opentelemetry/api: Registration of version v"+a.version+" for "+t+" does not match previously registered API v"+o);return n.error(s.stack||s.message),!1}return a[t]=e,n.debug("@opentelemetry/api: Registered a global for "+t+" v"+o+"."),!0}function l(t){var e,n,r=null===(e=c[u])||void 0===e?void 0:e.version;if(r&&a(r))return null===(n=c[u])||void 0===n?void 0:n[t]}function f(t,e){e.debug("@opentelemetry/api: Unregistering a global for "+t+" v"+o+".");var n=c[u];n&&delete n[t]}function d(t){return Symbol.for(t)}var h,_=function t(e){var n=this;n._currentContext=e?new Map(e):new Map,n.getValue=function(t){return n._currentContext.get(t)},n.setValue=function(e,r){var o=new t(n._currentContext);return o._currentContext.set(e,r),o},n.deleteValue=function(e){var r=new t(n._currentContext);return r._currentContext.delete(e),r}},v=new _,g=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},m=function(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},b=function(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},A=function(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o=r?o.bind(e):function(){}}return th.ALL&&(t=h.ALL),e=e||{},{error:n("error",h.ERROR),warn:n("warn",h.WARN),info:n("info",h.INFO),debug:n("debug",h.DEBUG),verbose:n("verbose",h.VERBOSE)}}(null!==(o=n.logLevel)&&void 0!==o?o:h.INFO,t);if(s&&!n.suppressOverrideMessage){var c=null!==(i=(new Error).stack)&&void 0!==i?i:"";s.warn("Current logger will be overwritten from "+c),u.warn("Current logger will overwrite one already registered from "+c)}return p("diag",u,e,!0)},e.disable=function(){f("diag",e)},e.createComponentLogger=function(t){return new E(t)},e.verbose=t("verbose"),e.debug=t("debug"),e.info=t("info"),e.warn=t("warn"),e.error=t("error")}return t.instance=function(){return this._instance||(this._instance=new t),this._instance},t}(),L=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},P=function(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},Yt=function(){function t(t,e){var n,r=this;this._attributes=t,this.asyncAttributesPending=null!=e,this._syncAttributes=null!==(n=this._attributes)&&void 0!==n?n:{},this._asyncAttributesPromise=null==e?void 0:e.then((function(t){return r._attributes=Object.assign({},r._attributes,t),r.asyncAttributesPending=!1,t}),(function(t){return Nt.debug("a resource's async attributes promise rejected: %s",t),r.asyncAttributesPending=!1,{}}))}return t.empty=function(){return t.EMPTY},t.default=function(){var e;return new t(((e={})[Bt]="unknown_service",e[Ft]=zt[Ft],e[Ht]=zt[Ht],e[Vt]=zt[Vt],e))},Object.defineProperty(t.prototype,"attributes",{get:function(){var t;return this.asyncAttributesPending&&Nt.error("Accessing resource attributes before async attributes settled"),null!==(t=this._attributes)&&void 0!==t?t:{}},enumerable:!1,configurable:!0}),t.prototype.waitForAsyncAttributes=function(){return Wt(this,void 0,void 0,(function(){return Zt(this,(function(t){switch(t.label){case 0:return this.asyncAttributesPending?[4,this._asyncAttributesPromise]:[3,2];case 1:t.sent(),t.label=2;case 2:return[2]}}))}))},t.prototype.merge=function(e){var n,r=this;if(!e)return this;var o=$t($t({},this._syncAttributes),null!==(n=e._syncAttributes)&&void 0!==n?n:e.attributes);if(!this._asyncAttributesPromise&&!e._asyncAttributesPromise)return new t(o);var i=Promise.all([this._asyncAttributesPromise,e._asyncAttributesPromise]).then((function(t){var n,o=Kt(t,2),i=o[0],a=o[1];return $t($t($t($t({},r._syncAttributes),i),null!==(n=e._syncAttributes)&&void 0!==n?n:e.attributes),a)}));return new t(o,i)},t.EMPTY=new t({}),t}(),Qt=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{u(r.next(t))}catch(t){i(t)}}function s(t){try{u(r.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((r=r.apply(t,e||[])).next())}))},Jt=function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0){var e=JSON.stringify(t.attributes,null,4);Nt.verbose(e)}}))},ee=x.getInstance();!function(t){t.AlwaysOff="always_off",t.AlwaysOn="always_on",t.ParentBasedAlwaysOff="parentbased_always_off",t.ParentBasedAlwaysOn="parentbased_always_on",t.ParentBasedTraceIdRatio="parentbased_traceidratio",t.TraceIdRatio="traceidratio"}(qt||(qt={}));var ne=",",re=["OTEL_SDK_DISABLED"];function oe(t){return re.indexOf(t)>-1}var ie=["OTEL_BSP_EXPORT_TIMEOUT","OTEL_BSP_MAX_EXPORT_BATCH_SIZE","OTEL_BSP_MAX_QUEUE_SIZE","OTEL_BSP_SCHEDULE_DELAY","OTEL_BLRP_EXPORT_TIMEOUT","OTEL_BLRP_MAX_EXPORT_BATCH_SIZE","OTEL_BLRP_MAX_QUEUE_SIZE","OTEL_BLRP_SCHEDULE_DELAY","OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_ATTRIBUTE_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT","OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT","OTEL_SPAN_EVENT_COUNT_LIMIT","OTEL_SPAN_LINK_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT","OTEL_EXPORTER_OTLP_TIMEOUT","OTEL_EXPORTER_OTLP_TRACES_TIMEOUT","OTEL_EXPORTER_OTLP_METRICS_TIMEOUT","OTEL_EXPORTER_OTLP_LOGS_TIMEOUT","OTEL_EXPORTER_JAEGER_AGENT_PORT"];function ae(t){return ie.indexOf(t)>-1}var se=["OTEL_NO_PATCH_MODULES","OTEL_PROPAGATORS"];function ue(t){return se.indexOf(t)>-1}var ce=1/0,pe=128,le={OTEL_SDK_DISABLED:!1,CONTAINER_NAME:"",ECS_CONTAINER_METADATA_URI_V4:"",ECS_CONTAINER_METADATA_URI:"",HOSTNAME:"",KUBERNETES_SERVICE_HOST:"",NAMESPACE:"",OTEL_BSP_EXPORT_TIMEOUT:3e4,OTEL_BSP_MAX_EXPORT_BATCH_SIZE:512,OTEL_BSP_MAX_QUEUE_SIZE:2048,OTEL_BSP_SCHEDULE_DELAY:5e3,OTEL_BLRP_EXPORT_TIMEOUT:3e4,OTEL_BLRP_MAX_EXPORT_BATCH_SIZE:512,OTEL_BLRP_MAX_QUEUE_SIZE:2048,OTEL_BLRP_SCHEDULE_DELAY:5e3,OTEL_EXPORTER_JAEGER_AGENT_HOST:"",OTEL_EXPORTER_JAEGER_AGENT_PORT:6832,OTEL_EXPORTER_JAEGER_ENDPOINT:"",OTEL_EXPORTER_JAEGER_PASSWORD:"",OTEL_EXPORTER_JAEGER_USER:"",OTEL_EXPORTER_OTLP_ENDPOINT:"",OTEL_EXPORTER_OTLP_TRACES_ENDPOINT:"",OTEL_EXPORTER_OTLP_METRICS_ENDPOINT:"",OTEL_EXPORTER_OTLP_LOGS_ENDPOINT:"",OTEL_EXPORTER_OTLP_HEADERS:"",OTEL_EXPORTER_OTLP_TRACES_HEADERS:"",OTEL_EXPORTER_OTLP_METRICS_HEADERS:"",OTEL_EXPORTER_OTLP_LOGS_HEADERS:"",OTEL_EXPORTER_OTLP_TIMEOUT:1e4,OTEL_EXPORTER_OTLP_TRACES_TIMEOUT:1e4,OTEL_EXPORTER_OTLP_METRICS_TIMEOUT:1e4,OTEL_EXPORTER_OTLP_LOGS_TIMEOUT:1e4,OTEL_EXPORTER_ZIPKIN_ENDPOINT:"http://localhost:9411/api/v2/spans",OTEL_LOG_LEVEL:h.INFO,OTEL_NO_PATCH_MODULES:[],OTEL_PROPAGATORS:["tracecontext","baggage"],OTEL_RESOURCE_ATTRIBUTES:"",OTEL_SERVICE_NAME:"",OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT:ce,OTEL_ATTRIBUTE_COUNT_LIMIT:pe,OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT:ce,OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT:pe,OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT:ce,OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT:pe,OTEL_SPAN_EVENT_COUNT_LIMIT:128,OTEL_SPAN_LINK_COUNT_LIMIT:128,OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT:128,OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT:128,OTEL_TRACES_EXPORTER:"",OTEL_TRACES_SAMPLER:qt.ParentBasedAlwaysOn,OTEL_TRACES_SAMPLER_ARG:"",OTEL_LOGS_EXPORTER:"",OTEL_EXPORTER_OTLP_INSECURE:"",OTEL_EXPORTER_OTLP_TRACES_INSECURE:"",OTEL_EXPORTER_OTLP_METRICS_INSECURE:"",OTEL_EXPORTER_OTLP_LOGS_INSECURE:"",OTEL_EXPORTER_OTLP_CERTIFICATE:"",OTEL_EXPORTER_OTLP_TRACES_CERTIFICATE:"",OTEL_EXPORTER_OTLP_METRICS_CERTIFICATE:"",OTEL_EXPORTER_OTLP_LOGS_CERTIFICATE:"",OTEL_EXPORTER_OTLP_COMPRESSION:"",OTEL_EXPORTER_OTLP_TRACES_COMPRESSION:"",OTEL_EXPORTER_OTLP_METRICS_COMPRESSION:"",OTEL_EXPORTER_OTLP_LOGS_COMPRESSION:"",OTEL_EXPORTER_OTLP_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_TRACES_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_METRICS_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_LOGS_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_TRACES_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_METRICS_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_LOGS_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_TRACES_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_METRICS_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_LOGS_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE:"cumulative"};function fe(t,e,n){if(void 0!==n[t]){var r=String(n[t]);e[t]="true"===r.toLowerCase()}}function de(t,e,n,r,o){if(void 0===r&&(r=-1/0),void 0===o&&(o=1/0),void 0!==n[t]){var i=Number(n[t]);isNaN(i)||(e[t]=io?o:i)}}function he(t,e,n,r){void 0===r&&(r=ne);var o=n[t];"string"==typeof o&&(e[t]=o.split(r).map((function(t){return t.trim()})))}var _e={ALL:h.ALL,VERBOSE:h.VERBOSE,DEBUG:h.DEBUG,INFO:h.INFO,WARN:h.WARN,ERROR:h.ERROR,NONE:h.NONE};function ve(t,e,n){var r=n[t];if("string"==typeof r){var o=_e[r.toUpperCase()];null!=o&&(e[t]=o)}}function ge(t){var e={};for(var n in le){var r=n;if("OTEL_LOG_LEVEL"===r)ve(r,e,t);else if(oe(r))fe(r,e,t);else if(ae(r))de(r,e,t);else if(ue(r))he(r,e,t);else{var o=t[r];null!=o&&(e[r]=String(o))}}return e}var me="object"==typeof globalThis?globalThis:"object"==typeof self?self:"object"==typeof window?window:"object"==typeof n.g?n.g:{};function ye(){var t=ge(me);return Object.assign({},le,t)}var Te,be=function(){function t(){var t=this;this._promise=new Promise((function(e,n){t._resolve=e,t._reject=n}))}return Object.defineProperty(t.prototype,"promise",{get:function(){return this._promise},enumerable:!1,configurable:!0}),t.prototype.resolve=function(t){this._resolve(t)},t.prototype.reject=function(t){this._reject(t)},t}(),Ee=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},we=function(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;othis._maxQueueSize&&(Nt.warn("BatchSpanProcessor: maxExportBatchSize must be smaller or equal to maxQueueSize, setting maxExportBatchSize to match maxQueueSize"),this._maxExportBatchSize=this._maxQueueSize)}return t.prototype.forceFlush=function(){return this._shutdownOnce.isCalled?this._shutdownOnce.promise:this._flushAll()},t.prototype.onStart=function(t,e){},t.prototype.onEnd=function(t){this._shutdownOnce.isCalled||t.spanContext().traceFlags&S.SAMPLED&&this._addToBuffer(t)},t.prototype.shutdown=function(){return this._shutdownOnce.call()},t.prototype._shutdown=function(){var t=this;return Promise.resolve().then((function(){return t.onShutdown()})).then((function(){return t._flushAll()})).then((function(){return t._exporter.shutdown()}))},t.prototype._addToBuffer=function(t){if(this._finishedSpans.length>=this._maxQueueSize)return 0===this._droppedSpansCount&&Nt.debug("maxQueueSize reached, dropping spans"),void this._droppedSpansCount++;this._droppedSpansCount>0&&(Nt.warn("Dropped "+this._droppedSpansCount+" spans because maxQueueSize reached"),this._droppedSpansCount=0),this._finishedSpans.push(t),this._maybeStartTimer()},t.prototype._flushAll=function(){var t=this;return new Promise((function(e,n){for(var r=[],o=0,i=Math.ceil(t._finishedSpans.length/t._maxExportBatchSize);o0&&(t._clearTimer(),t._maybeStartTimer())})).catch((function(e){t._isExporting=!1,Le(e)}))};if(this._finishedSpans.length>=this._maxExportBatchSize)return e();void 0===this._timer&&(this._timer=setTimeout((function(){return e()}),this._scheduledDelayMillis),this._timer)}},t.prototype._clearTimer=function(){void 0!==this._timer&&(clearTimeout(this._timer),this._timer=void 0)},t}(),Ne=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),xe=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.onInit(n),r}return Ne(e,t),e.prototype.onInit=function(t){var e=this;!0!==(null==t?void 0:t.disableAutoFlushOnDocumentHide)&&"undefined"!=typeof document&&(this._visibilityChangeListener=function(){"hidden"===document.visibilityState&&e.forceFlush()},this._pageHideListener=function(){e.forceFlush()},document.addEventListener("visibilitychange",this._visibilityChangeListener),document.addEventListener("pagehide",this._pageHideListener))},e.prototype.onShutdown=function(){"undefined"!=typeof document&&(this._visibilityChangeListener&&document.removeEventListener("visibilitychange",this._visibilityChangeListener),this._pageHideListener&&document.removeEventListener("pagehide",this._pageHideListener))},e}(Ce);!function(t){t[t.NOT_RECORD=0]="NOT_RECORD",t[t.RECORD=1]="RECORD",t[t.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"}(Pe||(Pe={}));var Ie=function(){function t(){}return t.prototype.shouldSample=function(){return{decision:Pe.NOT_RECORD}},t.prototype.toString=function(){return"AlwaysOffSampler"},t}(),De=function(){function t(){}return t.prototype.shouldSample=function(){return{decision:Pe.RECORD_AND_SAMPLED}},t.prototype.toString=function(){return"AlwaysOnSampler"},t}(),ke=function(){function t(t){void 0===t&&(t=0),this._ratio=t,this._ratio=this._normalize(t),this._upperBound=Math.floor(4294967295*this._ratio)}return t.prototype.shouldSample=function(t,e){return{decision:q(e)&&this._accumulate(e)=1?1:t<=0?0:t},t.prototype._accumulate=function(t){for(var e=0,n=0;n>>0}return e},t}(),Me=function(){function t(){}return t.prototype.inject=function(t,e){},t.prototype.extract=function(t,e){return t},t.prototype.fields=function(){return[]},t}(),je={get:function(t,e){if(null!=t)return t[e]},keys:function(t){return null==t?[]:Object.keys(t)}},Ue={set:function(t,e,n){null!=t&&(t[e]=n)}},Be=d("OpenTelemetry Baggage Key");function He(t){return t.getValue(Be)||void 0}function Fe(){return He(x.getInstance().active())}function Ve(t,e){return t.setValue(Be,e)}function Ge(t){return t.deleteValue(Be)}var Xe=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},ze=function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},qe=function(){function t(t){this._entries=t?new Map(t):new Map}return t.prototype.getEntry=function(t){var e=this._entries.get(t);if(e)return Object.assign({},e)},t.prototype.getAllEntries=function(){return Array.from(this._entries.entries()).map((function(t){var e=Xe(t,2);return[e[0],e[1]]}))},t.prototype.setEntry=function(e,n){var r=new t(this._entries);return r._entries.set(e,n),r},t.prototype.removeEntry=function(e){var n=new t(this._entries);return n._entries.delete(e),n},t.prototype.removeEntries=function(){for(var e,n,r=[],o=0;ohn)){if(n++,bn(t)||bn(e)||yn(e))o=_n(e);else if(mn(t)){if(o=t.slice(),mn(e))for(var i=0,a=e.length;i=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},wn=function(){function t(t){var e;void 0===t&&(t={}),this._propagators=null!==(e=t.propagators)&&void 0!==e?e:[],this._fields=Array.from(new Set(this._propagators.map((function(t){return"function"==typeof t.fields?t.fields():[]})).reduce((function(t,e){return t.concat(e)}),[])))}return t.prototype.inject=function(t,e,n){var r,o;try{for(var i=En(this._propagators),a=i.next();!a.done;a=i.next()){var s=a.value;try{s.inject(t,e,n)}catch(t){Nt.warn("Failed to inject with "+s.constructor.name+". Err: "+t.message)}}}catch(t){r={error:t}}finally{try{a&&!a.done&&(o=i.return)&&o.call(i)}finally{if(r)throw r.error}}},t.prototype.extract=function(t,e,n){return this._propagators.reduce((function(t,r){try{return r.extract(t,e,n)}catch(t){Nt.warn("Failed to inject with "+r.constructor.name+". Err: "+t.message)}return t}),t)},t.prototype.fields=function(){return this._fields.slice()},t}(),Sn="[_0-9a-z-*/]",On=new RegExp("^(?:"+("[a-z]"+Sn+"{0,255}")+"|"+("[a-z0-9]"+Sn+"{0,240}@[a-z]"+Sn+"{0,13}")+")$"),An=/^[ -~]{0,255}[!-~]$/,Rn=/,|=/;var Ln=function(){function t(t){this._internalState=new Map,t&&this._parse(t)}return t.prototype.set=function(t,e){var n=this._clone();return n._internalState.has(t)&&n._internalState.delete(t),n._internalState.set(t,e),n},t.prototype.unset=function(t){var e=this._clone();return e._internalState.delete(t),e},t.prototype.get=function(t){return this._internalState.get(t)},t.prototype.serialize=function(){var t=this;return this._keys().reduce((function(e,n){return e.push(n+"="+t.get(n)),e}),[]).join(",")},t.prototype._parse=function(t){t.length>512||(this._internalState=t.split(",").reverse().reduce((function(t,e){var n=e.trim(),r=n.indexOf("=");if(-1!==r){var o=n.slice(0,r),i=n.slice(r+1,e.length);(function(t){return On.test(t)})(o)&&function(t){return An.test(t)&&!Rn.test(t)}(i)&&t.set(o,i)}return t}),new Map),this._internalState.size>32&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,32))))},t.prototype._keys=function(){return Array.from(this._internalState.keys()).reverse()},t.prototype._clone=function(){var e=new t;return e._internalState=new Map(this._internalState),e},t}(),Pn="traceparent",Cn="tracestate",Nn=new RegExp("^\\s?((?!ff)[\\da-f]{2})-((?![0]{32})[\\da-f]{32})-((?![0]{16})[\\da-f]{16})-([\\da-f]{2})(-.*)?\\s?$");var xn=function(){function t(){}return t.prototype.inject=function(t,e,n){var r=rt.getSpanContext(t);if(r&&!Ae(t)&&$(r)){var o="00-"+r.traceId+"-"+r.spanId+"-0"+Number(r.traceFlags||S.NONE).toString(16);n.set(e,Pn,o),r.traceState&&n.set(e,Cn,r.traceState.serialize())}},t.prototype.extract=function(t,e,n){var r=n.get(e,Pn);if(!r)return t;var o=Array.isArray(r)?r[0]:r;if("string"!=typeof o)return t;var i=function(t){var e=Nn.exec(t);return e?"00"===e[1]&&e[5]?null:{traceId:e[2],spanId:e[3],traceFlags:parseInt(e[4],16)}:null}(o);if(!i)return t;i.isRemote=!0;var a=n.get(e,Cn);if(a){var s=Array.isArray(a)?a.join(","):a;i.traceState=new Ln("string"==typeof s?s:void 0)}return rt.setSpanContext(t,i)},t.prototype.fields=function(){return[Pn,Cn]},t}(),In="=",Dn=";",kn=",",Mn="baggage",jn=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a};function Un(t){var e=t.split(Dn);if(!(e.length<=0)){var n=e.shift();if(n){var r=n.indexOf(In);if(!(r<=0)){var o,i,a=decodeURIComponent(n.substring(0,r).trim()),s=decodeURIComponent(n.substring(r+1).trim());return e.length>0&&("string"!=typeof(i=e.join(Dn))&&(We.error("Cannot create baggage metadata from unknown type: "+typeof i),i=""),o={__TYPE__:$e,toString:function(){return i}}),{key:a,value:s,metadata:o}}}}}function Bn(t){return"string"!=typeof t||0===t.length?{}:t.split(kn).map((function(t){return Un(t)})).filter((function(t){return void 0!==t&&t.value.length>0})).reduce((function(t,e){return t[e.key]=e.value,t}),{})}var Hn,Fn,Vn=function(){function t(){}return t.prototype.inject=function(t,e,n){var r=en.getBaggage(t);if(r&&!Ae(t)){var o=function(t){return t.getAllEntries().map((function(t){var e=jn(t,2),n=e[0],r=e[1],o=encodeURIComponent(n)+"="+encodeURIComponent(r.value);return void 0!==r.metadata&&(o+=Dn+r.metadata.toString()),o}))}(r).filter((function(t){return t.length<=4096})).slice(0,180),i=function(t){return t.reduce((function(t,e){var n=""+t+(""!==t?kn:"")+e;return n.length>8192?t:n}),"")}(o);i.length>0&&n.set(e,Mn,i)}},t.prototype.extract=function(t,e,n){var r=n.get(e,Mn),o=Array.isArray(r)?r.join(kn):r;if(!o)return t;var i={};return 0===o.length?t:(o.split(kn).forEach((function(t){var e=Un(t);if(e){var n={value:e.value};e.metadata&&(n.metadata=e.metadata),i[e.key]=n}})),0===Object.entries(i).length?t:en.setBaggage(t,en.createBaggage(i)))},t.prototype.fields=function(){return[Mn]},t}();!function(t){t[t.INTERNAL=0]="INTERNAL",t[t.SERVER=1]="SERVER",t[t.CLIENT=2]="CLIENT",t[t.PRODUCER=3]="PRODUCER",t[t.CONSUMER=4]="CONSUMER"}(Hn||(Hn={})),function(t){t[t.NOT_RECORD=0]="NOT_RECORD",t[t.RECORD=1]="RECORD",t[t.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"}(Fn||(Fn={}));var Gn,Xn=function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},zn=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a};function qn(t){var e,n,r={};if("object"!=typeof t||null==t)return r;try{for(var o=Xn(Object.entries(t)),i=o.next();!i.done;i=o.next()){var a=zn(i.value,2),s=a[0],u=a[1];$n(s)?Wn(u)?Array.isArray(u)?r[s]=u.slice():r[s]=u:Nt.warn("Invalid attribute value set for key: "+s):Nt.warn("Invalid attribute key: "+s)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}return r}function $n(t){return"string"==typeof t&&t.length>0}function Wn(t){return null==t||(Array.isArray(t)?function(t){var e,n,r;try{for(var o=Xn(t),i=o.next();!i.done;i=o.next()){var a=i.value;if(null!=a){if(!r){if(Zn(a)){r=typeof a;continue}return!1}if(typeof a!==r)return!1}}}catch(t){e={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}return!0}(t):Zn(t))}function Zn(t){switch(typeof t){case"number":case"boolean":case"string":return!0}return!1}!function(t){t[t.UNSET=0]="UNSET",t[t.OK=1]="OK",t[t.ERROR=2]="ERROR"}(Gn||(Gn={}));var Kn=performance,Yn=Math.pow(10,6),Qn=Math.pow(10,9);function Jn(t){var e=t/1e3;return[Math.trunc(e),Math.round(t%1e3*Yn)]}function tr(){var t=Kn.timeOrigin;if("number"!=typeof t){var e=Kn;t=e.timing&&e.timing.fetchStart}return t}function er(t){return or(Jn(tr()),Jn("number"==typeof t?t:Kn.now()))}function nr(t){return Array.isArray(t)&&2===t.length&&"number"==typeof t[0]&&"number"==typeof t[1]}function rr(t){return nr(t)||"number"==typeof t||t instanceof Date}function or(t,e){var n=[t[0]+e[0],t[1]+e[1]];return n[1]>=Qn&&(n[1]-=Qn,n[0]+=1),n}var ir="exception.type",ar="exception.message",sr="exception.stacktrace",ur="http.url",cr="http.user_agent",pr="http.response_content_length",lr="http.response_content_length_uncompressed",fr=ir,dr=ar,hr=sr,_r=ur,vr=cr,gr=pr,mr=lr,yr=function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Tr=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},br=function(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o=this._spanLimits.attributeCountLimit&&!Object.prototype.hasOwnProperty.call(this.attributes,t)?(this._droppedAttributesCount++,this):(this.attributes[t]=this._truncateToSize(e),this):(Nt.warn("Invalid attribute value set for key: "+t),this)},t.prototype.setAttributes=function(t){var e,n;try{for(var r=yr(Object.entries(t)),o=r.next();!o.done;o=r.next()){var i=Tr(o.value,2),a=i[0],s=i[1];this.setAttribute(a,s)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}return this},t.prototype.addEvent=function(t,e,n){if(this._isSpanEnded())return this;if(0===this._spanLimits.eventCountLimit)return Nt.warn("No events allowed."),this._droppedEventsCount++,this;this.events.length>=this._spanLimits.eventCountLimit&&(0===this._droppedEventsCount&&Nt.debug("Dropping extra events."),this.events.shift(),this._droppedEventsCount++),rr(e)&&(rr(n)||(n=e),e=void 0);var r=qn(e);return this.events.push({name:t,attributes:r,time:this._getTime(n),droppedAttributesCount:0}),this},t.prototype.addLink=function(t){return this.links.push(t),this},t.prototype.addLinks=function(t){var e;return(e=this.links).push.apply(e,br([],Tr(t),!1)),this},t.prototype.setStatus=function(t){return this._isSpanEnded()||(this.status=t),this},t.prototype.updateName=function(t){return this._isSpanEnded()||(this.name=t),this},t.prototype.end=function(t){this._isSpanEnded()?Nt.error(this.name+" "+this._spanContext.traceId+"-"+this._spanContext.spanId+" - You can only call end() on a span once."):(this._ended=!0,this.endTime=this._getTime(t),this._duration=function(t,e){var n=e[0]-t[0],r=e[1]-t[1];return r<0&&(n-=1,r+=Qn),[n,r]}(this.startTime,this.endTime),this._duration[0]<0&&(Nt.warn("Inconsistent start and end time, startTime > endTime. Setting span duration to 0ms.",this.startTime,this.endTime),this.endTime=this.startTime.slice(),this._duration=[0,0]),this._droppedEventsCount>0&&Nt.warn("Dropped "+this._droppedEventsCount+" events because eventCountLimit reached"),this._spanProcessor.onEnd(this))},t.prototype._getTime=function(t){if("number"==typeof t&&t1?(Nt.error("OTEL_TRACES_SAMPLER_ARG="+t.OTEL_TRACES_SAMPLER_ARG+" was given, but it is out of range ([0..1]), defaulting to "+Ar+"."),Ar):e}function Cr(t){var e,n,r,o,i,a,s,u,c,p,l,f,d=Object.assign({},t.spanLimits),h=ge(me);return d.attributeCountLimit=null!==(a=null!==(i=null!==(o=null!==(n=null===(e=t.spanLimits)||void 0===e?void 0:e.attributeCountLimit)&&void 0!==n?n:null===(r=t.generalLimits)||void 0===r?void 0:r.attributeCountLimit)&&void 0!==o?o:h.OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT)&&void 0!==i?i:h.OTEL_ATTRIBUTE_COUNT_LIMIT)&&void 0!==a?a:pe,d.attributeValueLengthLimit=null!==(f=null!==(l=null!==(p=null!==(u=null===(s=t.spanLimits)||void 0===s?void 0:s.attributeValueLengthLimit)&&void 0!==u?u:null===(c=t.generalLimits)||void 0===c?void 0:c.attributeValueLengthLimit)&&void 0!==p?p:h.OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT)&&void 0!==l?l:h.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT)&&void 0!==f?f:ce,Object.assign({},t,{spanLimits:d})}var Nr=function(){this.generateTraceId=Ir(16),this.generateSpanId=Ir(8)},xr=Array(32);function Ir(t){return function(){for(var e=0;e<2*t;e++)xr[e]=Math.floor(16*Math.random())+48,xr[e]>=58&&(xr[e]+=39);return String.fromCharCode.apply(null,xr.slice(0,2*t))}}var Dr,kr=function(){function t(t,e,n){this._tracerProvider=n;var r,o,i,a,s=(r=e,o={sampler:Lr()},i=Rr(),(a=Object.assign({},i,o,r)).generalLimits=Object.assign({},i.generalLimits,r.generalLimits||{}),a.spanLimits=Object.assign({},i.spanLimits,r.spanLimits||{}),a);this._sampler=s.sampler,this._generalLimits=s.generalLimits,this._spanLimits=s.spanLimits,this._idGenerator=e.idGenerator||new Nr,this.resource=n.resource,this.instrumentationLibrary=t}return t.prototype.startSpan=function(t,e,n){var r,o,i;void 0===e&&(e={}),void 0===n&&(n=ee.active()),e.root&&(n=rt.deleteSpan(n));var a=rt.getSpan(n);if(Ae(n))return Nt.debug("Instrumentation suppressed, returning Noop Span"),rt.wrapSpanContext(k);var s,u,c,p=null==a?void 0:a.spanContext(),l=this._idGenerator.generateSpanId();p&&rt.isSpanContextValid(p)?(s=p.traceId,u=p.traceState,c=p.spanId):s=this._idGenerator.generateTraceId();var f=null!==(r=e.kind)&&void 0!==r?r:Hn.INTERNAL,d=(null!==(o=e.links)&&void 0!==o?o:[]).map((function(t){return{context:t.context,attributes:qn(t.attributes)}})),h=qn(e.attributes),_=this._sampler.shouldSample(n,s,t,f,h,d);u=null!==(i=_.traceState)&&void 0!==i?i:u;var v={traceId:s,spanId:l,traceFlags:_.decision===Fn.RECORD_AND_SAMPLED?S.SAMPLED:S.NONE,traceState:u};if(_.decision===Fn.NOT_RECORD)return Nt.debug("Recording is off, propagating context in a non-recording span"),rt.wrapSpanContext(v);var g=qn(Object.assign(h,_.attributes));return new Er(this,n,t,v,f,c,d,e.startTime,void 0,g)},t.prototype.startActiveSpan=function(t,e,n,r){var o,i,a;if(!(arguments.length<2)){2===arguments.length?a=e:3===arguments.length?(o=e,a=n):(o=e,i=n,a=r);var s=null!=i?i:ee.active(),u=this.startSpan(t,o,s),c=rt.setSpan(s,u);return ee.with(c,a,void 0,u)}},t.prototype.getGeneralLimits=function(){return this._generalLimits},t.prototype.getSpanLimits=function(){return this._spanLimits},t.prototype.getActiveSpanProcessor=function(){return this._tracerProvider.getActiveSpanProcessor()},t}(),Mr=function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},jr=function(){function t(t){this._spanProcessors=t}return t.prototype.forceFlush=function(){var t,e,n=[];try{for(var r=Mr(this._spanProcessors),o=r.next();!o.done;o=r.next()){var i=o.value;n.push(i.forceFlush())}}catch(e){t={error:e}}finally{try{o&&!o.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}return new Promise((function(t){Promise.all(n).then((function(){t()})).catch((function(e){Le(e||new Error("MultiSpanProcessor: forceFlush failed")),t()}))}))},t.prototype.onStart=function(t,e){var n,r;try{for(var o=Mr(this._spanProcessors),i=o.next();!i.done;i=o.next()){i.value.onStart(t,e)}}catch(t){n={error:t}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}},t.prototype.onEnd=function(t){var e,n;try{for(var r=Mr(this._spanProcessors),o=r.next();!o.done;o=r.next()){o.value.onEnd(t)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}},t.prototype.shutdown=function(){var t,e,n=[];try{for(var r=Mr(this._spanProcessors),o=r.next();!o.done;o=r.next()){var i=o.value;n.push(i.shutdown())}}catch(e){t={error:e}}finally{try{o&&!o.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}return new Promise((function(t,e){Promise.all(n).then((function(){t()}),e)}))},t}(),Ur=function(){function t(){}return t.prototype.onStart=function(t,e){},t.prototype.onEnd=function(t){},t.prototype.shutdown=function(){return Promise.resolve()},t.prototype.forceFlush=function(){return Promise.resolve()},t}();!function(t){t[t.resolved=0]="resolved",t[t.timeout=1]="timeout",t[t.error=2]="error",t[t.unresolved=3]="unresolved"}(Dr||(Dr={}));var Br=function(){function t(t){var e;void 0===t&&(t={}),this._registeredSpanProcessors=[],this._tracers=new Map;var n=function(){for(var t=[],e=0;e0;)n=vn(n,t.shift(),0,r);return n}({},Rr(),Cr(t));this.resource=null!==(e=n.resource)&&void 0!==e?e:Yt.empty(),this.resource=Yt.default().merge(this.resource),this._config=Object.assign({},n,{resource:this.resource});var r=this._buildExporterFromEnv();if(void 0!==r){var o=new xe(r);this.activeSpanProcessor=o}else this.activeSpanProcessor=new Ur}return t.prototype.getTracer=function(t,e,n){var r=t+"@"+(e||"")+":"+((null==n?void 0:n.schemaUrl)||"");return this._tracers.has(r)||this._tracers.set(r,new kr({name:t,version:e,schemaUrl:null==n?void 0:n.schemaUrl},this._config,this)),this._tracers.get(r)},t.prototype.addSpanProcessor=function(t){0===this._registeredSpanProcessors.length&&this.activeSpanProcessor.shutdown().catch((function(t){return Nt.error("Error while trying to shutdown current span processor",t)})),this._registeredSpanProcessors.push(t),this.activeSpanProcessor=new jr(this._registeredSpanProcessors)},t.prototype.getActiveSpanProcessor=function(){return this.activeSpanProcessor},t.prototype.register=function(t){void 0===t&&(t={}),rt.setGlobalTracerProvider(this),void 0===t.propagator&&(t.propagator=this._buildPropagatorFromEnv()),t.contextManager&&ee.setGlobalContextManager(t.contextManager),t.propagator&&en.setGlobalPropagator(t.propagator)},t.prototype.forceFlush=function(){var t=this._config.forceFlushTimeoutMillis,e=this._registeredSpanProcessors.map((function(e){return new Promise((function(n){var r,o=setTimeout((function(){n(new Error("Span processor did not completed within timeout period of "+t+" ms")),r=Dr.timeout}),t);e.forceFlush().then((function(){clearTimeout(o),r!==Dr.timeout&&(r=Dr.resolved,n(r))})).catch((function(t){clearTimeout(o),r=Dr.error,n(t)}))}))}));return new Promise((function(t,n){Promise.all(e).then((function(e){var r=e.filter((function(t){return t!==Dr.resolved}));r.length>0?n(r):t()})).catch((function(t){return n([t])}))}))},t.prototype.shutdown=function(){return this.activeSpanProcessor.shutdown()},t.prototype._getPropagator=function(t){var e;return null===(e=this.constructor._registeredPropagators.get(t))||void 0===e?void 0:e()},t.prototype._getSpanExporter=function(t){var e;return null===(e=this.constructor._registeredExporters.get(t))||void 0===e?void 0:e()},t.prototype._buildPropagatorFromEnv=function(){var t=this,e=Array.from(new Set(ye().OTEL_PROPAGATORS)),n=e.map((function(e){var n=t._getPropagator(e);return n||Nt.warn('Propagator "'+e+'" requested through environment variable is unavailable.'),n})).reduce((function(t,e){return e&&t.push(e),t}),[]);return 0===n.length?void 0:1===e.length?n[0]:new wn({propagators:n})},t.prototype._buildExporterFromEnv=function(){var t=ye().OTEL_TRACES_EXPORTER;if("none"!==t&&""!==t){var e=this._getSpanExporter(t);return e||Nt.error('Exporter "'+t+'" requested through environment variable is unavailable.'),e}},t._registeredPropagators=new Map([["tracecontext",function(){return new xn}],["baggage",function(){return new Vn}]]),t._registeredExporters=new Map,t}(),Hr=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},Fr=function(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},_o=function(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},yo=function(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o=r?o.bind(e):function(){}}return tfo.ALL&&(t=fo.ALL),e=e||{},{error:n("error",fo.ERROR),warn:n("warn",fo.WARN),info:n("info",fo.INFO),debug:n("debug",fo.DEBUG),verbose:n("verbose",fo.VERBOSE)}}(null!==(o=n.logLevel)&&void 0!==o?o:fo.INFO,t);if(s&&!n.suppressOverrideMessage){var c=null!==(i=(new Error).stack)&&void 0!==i?i:"";s.warn("Current logger will be overwritten from "+c),u.warn("Current logger will overwrite one already registered from "+c)}return co("diag",u,e,!0)},e.disable=function(){lo("diag",e)},e.createComponentLogger=function(t){return new vo(t)},e.verbose=t("verbose"),e.debug=t("debug"),e.info=t("info"),e.warn=t("warn"),e.error=t("error")}return t.instance=function(){return this._instance||(this._instance=new t),this._instance},t}(),bo=To.instance(),Eo=[{n:"error",c:"error"},{n:"warn",c:"warn"},{n:"info",c:"info"},{n:"debug",c:"debug"},{n:"verbose",c:"trace"}],wo=function(){function t(t){return function(){for(var e=[],n=0;n0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},No=function(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},Do=function(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},Xo=function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},zo=function(){function t(t){this._entries=t?new Map(t):new Map}return t.prototype.getEntry=function(t){var e=this._entries.get(t);if(e)return Object.assign({},e)},t.prototype.getAllEntries=function(){return Array.from(this._entries.entries()).map((function(t){var e=Go(t,2);return[e[0],e[1]]}))},t.prototype.setEntry=function(e,n){var r=new t(this._entries);return r._entries.set(e,n),r},t.prototype.removeEntry=function(e){var n=new t(this._entries);return n._entries.delete(e),n},t.prototype.removeEntries=function(){for(var e,n,r=[],o=0;o0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},Ki=1e4;function Yi(t){return"number"==typeof t?t<=0?Qi(t,Ki):t:function(){var t,e=Number(null!==(t=ye().OTEL_EXPORTER_OTLP_TRACES_TIMEOUT)&&void 0!==t?t:ye().OTEL_EXPORTER_OTLP_TIMEOUT);return e<=0?Qi(e,Ki):e}()}function Qi(t,e){return Nt.warn("Timeout must be greater than 0",t),e}var Ji=function(){function t(t){void 0===t&&(t={}),this._sendingPromises=[],this.url=this.getDefaultUrl(t),"string"==typeof t.hostname&&(this.hostname=t.hostname),this.shutdown=this.shutdown.bind(this),this._shutdownOnce=new Se(this._shutdown,this),this._concurrencyLimit="number"==typeof t.concurrencyLimit?t.concurrencyLimit:30,this.timeoutMillis=Yi(t.timeoutMillis),this.onInit(t)}return t.prototype.export=function(t,e){this._shutdownOnce.isCalled?e({code:Te.FAILED,error:new Error("Exporter has been shutdown")}):this._sendingPromises.length>=this._concurrencyLimit?e({code:Te.FAILED,error:new Error("Concurrent export limit reached")}):this._export(t).then((function(){e({code:Te.SUCCESS})})).catch((function(t){e({code:Te.FAILED,error:t})}))},t.prototype._export=function(t){var e=this;return new Promise((function(n,r){try{Nt.debug("items to be sent",t),e.send(t,n,r)}catch(t){r(t)}}))},t.prototype.shutdown=function(){return this._shutdownOnce.call()},t.prototype.forceFlush=function(){return Promise.all(this._sendingPromises).then((function(){}))},t.prototype._shutdown=function(){return Nt.debug("shutdown started"),this.onShutdown(),this.forceFlush()},t}(),ta=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ea=function(t){function e(e,n,r){var o=t.call(this,e)||this;return o.name="OTLPExporterError",o.data=r,o.code=n,o}return ta(e,t),e}(Error),na=function(){return na=Object.assign||function(t){for(var e,n=1,r=arguments.length;n0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a};function oa(t,e,n,r,o,i){var a,s,u=!1,c=setTimeout((function(){if(clearTimeout(a),u=!0,s.readyState===XMLHttpRequest.DONE){var t=new ea("Request Timeout");i(t)}else s.abort()}),r),p=function(r,l){void 0===r&&(r=5),void 0===l&&(l=1e3),(s=new XMLHttpRequest).open("POST",e);Object.entries(na(na({},{Accept:"application/json","Content-Type":"application/json"}),n)).forEach((function(t){var e=ra(t,2),n=e[0],r=e[1];s.setRequestHeader(n,r)})),s.send(t),s.onreadystatechange=function(){if(s.readyState===XMLHttpRequest.DONE&&!1===u)if(s.status>=200&&s.status<=299)Nt.debug("xhr success",t),o(),clearTimeout(c),clearTimeout(a);else if(s.status&&(f=s.status,[429,502,503,504].includes(f))&&r>0){var e=void 0;l*=1.5,e=s.getResponseHeader("Retry-After")?function(t){if(null==t)return-1;var e=Number.parseInt(t,10);if(Number.isInteger(e))return e>0?1e3*e:-1;var n=new Date(t).getTime()-Date.now();return n>=0?n:0}(s.getResponseHeader("Retry-After")):Math.round(Math.random()*(5e3-l)+l),a=setTimeout((function(){p(r-1,l)}),e)}else{var n=new ea("Failed to export with XHR (status: "+s.status+")",s.status);i(n),clearTimeout(c),clearTimeout(a)}var f},s.onabort=function(){if(u){var t=new ea("Request Timeout");i(t)}clearTimeout(c),clearTimeout(a)},s.onerror=function(){if(u){var t=new ea("Request Timeout");i(t)}clearTimeout(c),clearTimeout(a)}};p()}var ia=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),aa=function(){return aa=Object.assign||function(t){for(var e,n=1,r=arguments.length;n0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a};function ca(t){return{name:t.name,version:t.version}}function pa(t){return Object.keys(t).map((function(e){return la(e,t[e])}))}function la(t,e){return{key:t,value:fa(e)}}function fa(t){var e=typeof t;return"string"===e?{stringValue:t}:"number"===e?Number.isInteger(t)?{intValue:t}:{doubleValue:t}:"boolean"===e?{boolValue:t}:t instanceof Uint8Array?{bytesValue:t}:Array.isArray(t)?{arrayValue:{values:t.map(fa)}}:"object"===e&&null!=t?{kvlistValue:{values:Object.entries(t).map((function(t){var e=ua(t,2);return la(e[0],e[1])}))}}:{}}function da(t,e){var n,r=t.spanContext(),o=t.status;return{traceId:e.encodeSpanContext(r.traceId),spanId:e.encodeSpanContext(r.spanId),parentSpanId:e.encodeOptionalSpanContext(t.parentSpanId),traceState:null===(n=r.traceState)||void 0===n?void 0:n.serialize(),name:t.name,kind:null==t.kind?0:t.kind+1,startTimeUnixNano:e.encodeHrTime(t.startTime),endTimeUnixNano:e.encodeHrTime(t.endTime),attributes:pa(t.attributes),droppedAttributesCount:t.droppedAttributesCount,events:t.events.map((function(t){return function(t,e){return{attributes:t.attributes?pa(t.attributes):[],name:t.name,timeUnixNano:e.encodeHrTime(t.time),droppedAttributesCount:t.droppedAttributesCount||0}}(t,e)})),droppedEventsCount:t.droppedEventsCount,status:{code:o.code,message:o.message},links:t.links.map((function(t){return function(t,e){var n;return{attributes:t.attributes?pa(t.attributes):[],spanId:e.encodeSpanContext(t.context.spanId),traceId:e.encodeSpanContext(t.context.traceId),traceState:null===(n=t.context.traceState)||void 0===n?void 0:n.serialize(),droppedAttributesCount:t.droppedAttributesCount||0}}(t,e)})),droppedLinksCount:t.droppedLinksCount}}function ha(t){return t>=48&&t<=57?t-48:t>=97&&t<=102?t-87:t-55}function _a(t){for(var e=new Uint8Array(t.length/2),n=0,r=0;r>BigInt(32)))}}var ma="undefined"!=typeof BigInt?function(t){return va(t).toString()}:function(t){return t[0]*Qn+t[1]};function ya(t){return t}function Ta(t){if(void 0!==t)return _a(t)}var ba={encodeHrTime:ga,encodeSpanContext:_a,encodeOptionalSpanContext:Ta};function Ea(t){var e,n;if(void 0===t)return ba;var r=null===(e=t.useLongBits)||void 0===e||e,o=null!==(n=t.useHex)&&void 0!==n&&n;return{encodeHrTime:r?ga:ma,encodeSpanContext:o?ya:_a,encodeOptionalSpanContext:o?ya:Ta}}function wa(t){return{attributes:pa(t.attributes),droppedAttributesCount:0}}var Sa,Oa,Aa,Ra=function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},La=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a};function Pa(t,e){for(var n=function(t){var e,n,r=new Map;try{for(var o=Ra(t),i=o.next();!i.done;i=o.next()){var a=i.value,s=r.get(a.resource);s||(s=new Map,r.set(a.resource,s));var u=a.instrumentationLibrary.name+"@"+(a.instrumentationLibrary.version||"")+":"+(a.instrumentationLibrary.schemaUrl||""),c=s.get(u);c||(c=[],s.set(u,c)),c.push(a)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}return r}(t),r=[],o=n.entries(),i=o.next();!i.done;){for(var a=La(i.value,2),s=a[0],u=[],c=a[1].values(),p=c.next();!p.done;){var l=p.value;if(l.length>0){var f=l.map((function(t){return da(t,e)}));u.push({scope:ca(l[0].instrumentationLibrary),spans:f,schemaUrl:l[0].instrumentationLibrary.schemaUrl})}p=c.next()}var d={resource:wa(s),scopeSpans:u,schemaUrl:void 0};r.push(d),i=o.next()}return r}!function(t){t[t.INT=0]="INT",t[t.DOUBLE=1]="DOUBLE"}(Sa||(Sa={})),function(t){t[t.HISTOGRAM=0]="HISTOGRAM",t[t.EXPONENTIAL_HISTOGRAM=1]="EXPONENTIAL_HISTOGRAM",t[t.GAUGE=2]="GAUGE",t[t.SUM=3]="SUM"}(Oa||(Oa={})),function(t){t[t.DELTA=0]="DELTA",t[t.CUMULATIVE=1]="CUMULATIVE"}(Aa||(Aa={}));var Ca={serializeRequest:function(t){var e={resourceSpans:Pa(t,Ea({useHex:!0,useLongBits:!1}))};return(new TextEncoder).encode(JSON.stringify(e))},deserializeResponse:function(t){var e=new TextDecoder;return JSON.parse(e.decode(t))}},Na=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),xa="v1/traces",Ia="http://localhost:4318/"+xa,Da=function(t){function e(e){void 0===e&&(e={});var n=t.call(this,e,Ca,"application/json")||this;return n._headers=Object.assign(n._headers,Bn(ye().OTEL_EXPORTER_OTLP_TRACES_HEADERS)),n}return Na(e,t),e.prototype.getDefaultUrl=function(t){return"string"==typeof t.url?t.url:ye().OTEL_EXPORTER_OTLP_TRACES_ENDPOINT.length>0?function(t){try{var e=new URL(t);return""===e.pathname&&(e.pathname=e.pathname+"/"),e.toString()}catch(e){return Nt.warn("Could not parse export URL: '"+t+"'"),t}}(ye().OTEL_EXPORTER_OTLP_TRACES_ENDPOINT):ye().OTEL_EXPORTER_OTLP_ENDPOINT.length>0?(e=ye().OTEL_EXPORTER_OTLP_ENDPOINT,n=xa,e.endsWith("/")||(e+="/"),e+n):Ia;var e,n},e}(sa),ka=n(81132);const Ma=Array(32);class ja{constructor(){var t;this._idGenerator=(t=16,function(){for(let e=0;e<2*t;e++)Ma[e]=Math.floor(16*Math.random())+48,Ma[e]>=58&&(Ma[e]+=39);return String.fromCharCode.apply(null,Ma.slice(0,2*t))}),this._sessionId=this._idGenerator()}onStart(t){t.setAttribute("session.id",this._sessionId)}onEnd(){}forceFlush(){return Promise.resolve()}shutdown(){return Promise.resolve()}}class Ua{constructor(t={}){var e,n,r,o;if(this._resource=null!==(e=t.resource)&&void 0!==e?e:new Yt({}),this._resourceDetectors=null!==(n=t.resourceDetectors)&&void 0!==n?n:[Jr],this._serviceName=t.serviceName,this._autoDetectResources=null===(r=t.autoDetectResources)||void 0===r||r,t.spanProcessor||t.traceExporter){const e={};t.sampler&&(e.sampler=t.sampler),t.spanLimits&&(e.spanLimits=t.spanLimits),t.idGenerator&&(e.idGenerator=t.idGenerator);const n=null!==(o=t.spanProcessor)&&void 0!==o?o:new xe(t.traceExporter);this._tracerProviderConfig={tracerConfig:e,spanProcessor:n,contextManager:t.contextManager,textMapPropagator:t.textMapPropagator}}let i=[];t.instrumentations&&(i=t.instrumentations),this._instrumentations=i}start(){var t,e,n;if(this._disabled)return;if(function(t){var e,n,r=t.tracerProvider||rt.getTracerProvider(),o=t.meterProvider||wt.getMeterProvider(),i=t.loggerProvider||Ct.getLoggerProvider(),a=null!==(n=null===(e=t.instrumentations)||void 0===e?void 0:e.flat())&&void 0!==n?n:[];(function(t,e,n,r){for(var o=0,i=t.length;o{}))}}const Ba="0.7.0";const Ha={path:!0,hash:!0,hostname:!0,referrer:!0,url:!1,search:!1};function Fa(t){if(!1===t||!(null===window||void 0===window?void 0:window.location))return new Yt({});const e=function(t){if(!t)return Ha;return Object.assign(Object.assign({},Ha),t)}(t),{href:n,pathname:r,search:o,hash:i,hostname:a}=window.location,s={"entry_page.url":Va(e.url,n),"entry_page.path":Va(e.path,r),"entry_page.search":Va(e.search,o),"entry_page.hash":Va(e.hash,i),"entry_page.hostname":Va(e.hostname,a),"entry_page.referrer":Va(e.referrer,document.referrer)};return new Yt(s)}function Va(t,e){if(t)return e}const Ga=t=>{var e;return null!==(e=null==t?void 0:t.effectiveType)&&void 0!==e?e:"unknown"};function Xa(){const{browserName:t,browserVersion:e,deviceType:n}=(t=>{const e=new(eo())(t),{name:n,version:r}=e.getBrowser();return{browserName:null!=n?n:"unknown",browserVersion:null!=r?r:"unknown",deviceType:(o=e.getDevice().type,i=n,o||i?o||"desktop":"unknown")};var o,i})(navigator.userAgent);return new Yt({"user_agent.original":navigator.userAgent,"browser.mobile":navigator.userAgent.includes("Mobi"),"browser.touch_screen_enabled":navigator.maxTouchPoints>0,"browser.language":navigator.language,"browser.name":t,"browser.version":e,"device.type":n,"network.effectiveType":Ga(navigator.connection),"screen.width":window.screen.width,"screen.height":window.screen.height,"screen.size":(r=window.screen.width,r<=768?"small":r>768&&r<=1024?"medium":r>1024?"large":"unknown")});var r}function za(t){let e=qa(t[0]);for(let n=1;n`@honeycombio/opentelemetry-web: ${t}`,Ya=/^[a-f0-9]*$/,Qa=/^hc[a-z]ic_[a-z0-9]*$/;function Ja(t){return null!=t&&0!==t.length&&(32===t.length?Ya.test(t):64===t.length&&Qa.test(t))}const ts=t=>{return(null==t?void 0:t.tracesEndpoint)?t.tracesEndpoint:(null==t?void 0:t.endpoint)?(e=t.endpoint).endsWith($a)||e.endsWith(`${$a}/`)?e:e.endsWith("/")?e+$a:e+"/"+$a:Wa;var e},es=t=>(null==t?void 0:t.tracesApiKey)||(null==t?void 0:t.apiKey),ns=t=>"number"==typeof(null==t?void 0:t.sampleRate)&&Number.isSafeInteger(null==t?void 0:t.sampleRate)&&(null==t?void 0:t.sampleRate)>=0?null==t?void 0:t.sampleRate:1,rs=Ka("❌ Missing API Key. Set `apiKey` in HoneycombOptions. Telemetry will not be exported."),os=Ka(`❌ Missing Service Name. Set \`serviceName\` in HoneycombOptions. Defaulting to '${Za.serviceName}'`),is=Ka("🔕 Dataset is ignored in favor of service name."),as=Ka("❌ Missing dataset. Specify either HONEYCOMB_DATASET environment variable or dataset in the options parameter."),ss=Ka("⏭️ Skipping options validation. To re-enable, set skipOptionsValidation option or HONEYCOMB_SKIP_OPTIONS_VALIDATION to false."),us=Ka("🔨 Default deterministic sampler has been overridden. Honeycomb requires a resource attribute called SampleRate to properly show weighted values. Non-deterministic sampleRate could lead to missing spans in Honeycomb. See our docs for more details. https://docs.honeycomb.io/getting-data-in/opentelemetry/node-distro/#sampling-without-the-honeycomb-sdk"),cs=Ka("🔕 Disabling local visualizations - must have both service name and API key configured."),ps=Ka("🔕 Failed to get proper auth response from Honeycomb. No local visualization available.");function ls(t){if(!(null==t?void 0:t.debug))return;bo.setLogger(new wo,fo.DEBUG),bo.debug(Ka("🐝 Honeycomb Web SDK Debug Mode Enabled 🐝"));const e=ts(t),n=Object.assign(Object.assign(Object.assign({},Za),t),{tracesEndpoint:e});!function(t){const e=es(t)||"";if(!e)return void bo.debug(rs);bo.debug(Ka(`API Key configured for traces: '${e}'`))}(n),function(t){const e=t.serviceName||Za.serviceName;if(e===Za.serviceName)return void bo.debug(os);bo.debug(`@honeycombio/opentelemetry-web: Service Name configured for traces: '${e}'`)}(n),function(t){const e=ts(t);if(!e)return void bo.debug(Ka("No endpoint configured for traces"));bo.debug(Ka(`Endpoint configured for traces: '${e}'`))}(n),function(t){const e=ns(t);if(!e)return void bo.debug("No sampler configured for traces");bo.debug(Ka(`Sample Rate configured for traces: '${e}'`))}(n)}class fs{constructor(){}onStart(t,e){var n,r;(null!==(r=null===(n=Yo.getBaggage(e))||void 0===n?void 0:n.getAllEntries())&&void 0!==r?r:[]).forEach((e=>{t.setAttribute(e[0],e[1].value),bo.debug(`@honeycombio/opentelemetry-web: 🚨 Baggage in all outgoing headers: ${e[0]}=${e[1].value} `)}))}onEnd(){}forceFlush(){return Promise.resolve()}shutdown(){return Promise.resolve()}}class ds{constructor(){}onStart(t){const{href:e,pathname:n,search:r,hash:o,hostname:i}=window.location;t.setAttributes({"browser.width":window.innerWidth,"browser.height":window.innerHeight,"page.hash":o,"page.url":e,"page.route":n,"page.hostname":i,"page.search":r,"url.path":n})}onEnd(){}forceFlush(){return Promise.resolve()}shutdown(){return Promise.resolve()}}const hs="x-honeycomb-team",_s="x-honeycomb-dataset";function vs(t){const e=es(t);return new Da({url:ts(t),headers:Object.assign({[hs]:e,[_s]:Ja(e)?null==t?void 0:t.dataset:void 0},null==t?void 0:t.headers)})}class gs{constructor(t){this._exporters=t}export(t,e){this._exporters.forEach((n=>n.export(t,e))),e({code:Te.SUCCESS})}async shutdown(){const t=[];this._exporters.forEach((e=>t.push(e.shutdown()))),await Promise.all(t)}}class ms{constructor(t,e){if(this._traceUrl="",!t||!e)return void console.debug(cs);fetch("https://api.honeycomb.io/1/auth",{headers:{"x-honeycomb-team":e}}).then((t=>{if(t.ok)return t.json();throw new Error})).then((n=>{var r,o,i;const a=n;if(!(null===(r=a.team)||void 0===r?void 0:r.slug))throw new Error;this._traceUrl=function(t,e,n,r){let o=`https://ui.honeycomb.io/${n}`;!Ja(t)&&r&&(o+=`/environments/${r}`);return o+=`/datasets/${e}/trace?trace_id`,o}(e,t,null===(o=a.team)||void 0===o?void 0:o.slug,null===(i=a.environment)||void 0===i?void 0:i.slug)})).catch((()=>{console.log(ps)}))}export(t,e){this._traceUrl&&t.forEach((t=>{t.parentSpanId||console.log(Ka(`Honeycomb link: ${this._traceUrl}=${t.spanContext().traceId}`))})),e({code:Te.SUCCESS})}shutdown(){return Promise.resolve()}}const ys=t=>{const e=new Ts,n=[];var r;return(null==t?void 0:t.localVisualizations)&&n.push(function(t){const e=es(t);return new ms(null==t?void 0:t.serviceName,e)}(t)),(null==t?void 0:t.traceExporter)&&n.push(null==t?void 0:t.traceExporter),e.addProcessor(new xe((r=[vs(t),...n],new gs(r)))),e.addProcessor(new fs),e.addProcessor(new ds),(null==t?void 0:t.spanProcessor)&&e.addProcessor(null==t?void 0:t.spanProcessor),(null==t?void 0:t.spanProcessors)&&t.spanProcessors.forEach((t=>{e.addProcessor(t)})),e};class Ts{constructor(){this.spanProcessors=[]}addProcessor(t){this.spanProcessors.push(t)}getSpanProcessors(){return this.spanProcessors}onStart(t,e){this.spanProcessors.forEach((n=>{n.onStart(t,e)}))}onEnd(t){this.spanProcessors.forEach((e=>{e.onEnd(t)}))}forceFlush(){return Promise.all(this.spanProcessors.map((t=>t.forceFlush()))).then((()=>{}))}shutdown(){return Promise.all(this.spanProcessors.map((t=>t.forceFlush()))).then((()=>{}))}}const bs=t=>{const e=ns(t);return new Es(e)};class Es{constructor(t){switch(this._sampleRate=t,t){case 0:this._sampler=new Ie;break;case 1:this._sampler=new De;break;default:{const e=1/t;this._sampler=new ke(e);break}}}shouldSample(t,e,n,r,o,i){const a=this._sampler.shouldSample(t,e,n,r,o,i);return Object.assign(Object.assign({},a),{attributes:Object.assign(Object.assign({},a.attributes),{SampleRate:this._sampleRate})})}toString(){return`DeterministicSampler(${this._sampler.toString()})`}}var ws,Ss,Os=function(){var t=self.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0];if(t&&t.responseStart>0&&t.responseStart(e||100)-1)return n||o;if(n=n?o+">"+n:o,r.id)break;t=r.parentNode}}catch(t){}return n},Ps=-1,Cs=function(){return Ps},Ns=function(t){addEventListener("pageshow",(function(e){e.persisted&&(Ps=e.timeStamp,t(e))}),!0)},xs=function(){var t=Os();return t&&t.activationStart||0},Is=function(t,e){var n=Os(),r="navigate";return Cs()>=0?r="back-forward-cache":n&&(document.prerendering||xs()>0?r="prerender":document.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:t,value:void 0===e?-1:e,rating:"good",delta:0,entries:[],id:"v4-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:r}},Ds=function(t,e,n){try{if(PerformanceObserver.supportedEntryTypes.includes(t)){var r=new PerformanceObserver((function(t){Promise.resolve().then((function(){e(t.getEntries())}))}));return r.observe(Object.assign({type:t,buffered:!0},n||{})),r}}catch(t){}},ks=function(t,e,n,r){var o,i;return function(a){e.value>=0&&(a||r)&&((i=e.value-(o||0))||void 0===o)&&(o=e.value,e.delta=i,e.rating=function(t,e){return t>e[1]?"poor":t>e[0]?"needs-improvement":"good"}(e.value,n),t(e))}},Ms=function(t){requestAnimationFrame((function(){return requestAnimationFrame((function(){return t()}))}))},js=function(t){document.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&t()}))},Us=function(t){var e=!1;return function(){e||(t(),e=!0)}},Bs=-1,Hs=function(){return"hidden"!==document.visibilityState||document.prerendering?1/0:0},Fs=function(t){"hidden"===document.visibilityState&&Bs>-1&&(Bs="visibilitychange"===t.type?t.timeStamp:0,Gs())},Vs=function(){addEventListener("visibilitychange",Fs,!0),addEventListener("prerenderingchange",Fs,!0)},Gs=function(){removeEventListener("visibilitychange",Fs,!0),removeEventListener("prerenderingchange",Fs,!0)},Xs=function(){return Bs<0&&(Bs=Hs(),Vs(),Ns((function(){setTimeout((function(){Bs=Hs(),Vs()}),0)}))),{get firstHiddenTime(){return Bs}}},zs=function(t){document.prerendering?addEventListener("prerenderingchange",(function(){return t()}),!0):t()},qs=[1800,3e3],$s=function(t,e){e=e||{},zs((function(){var n,r=Xs(),o=Is("FCP"),i=Ds("paint",(function(t){t.forEach((function(t){"first-contentful-paint"===t.name&&(i.disconnect(),t.startTimee.latency){if(n)t.duration>n.latency?(n.entries=[t],n.latency=t.duration):t.duration===n.latency&&t.startTime===n.entries[0].startTime&&n.entries.push(t);else{var r={id:t.interactionId,latency:t.duration,entries:[t]};nu.set(r.id,r),eu.push(r)}eu.sort((function(t,e){return e.latency-t.latency})),eu.length>10&&eu.splice(10).forEach((function(t){return nu.delete(t.id)}))}}},au=function(t){var e=self.requestIdleCallback||self.setTimeout,n=-1;return t=Us(t),"hidden"===document.visibilityState?t():(n=e(t),js(t)),n},su=[200,500],uu=function(t,e){"PerformanceEventTiming"in self&&"interactionId"in PerformanceEventTiming.prototype&&(e=e||{},zs((function(){var n;tu();var r,o=Is("INP"),i=function(t){au((function(){t.forEach(iu);var e=function(){var t=Math.min(eu.length-1,Math.floor((Js()-ru)/50));return eu[t]}();e&&e.latency!==o.value&&(o.value=e.latency,o.entries=e.entries,r())}))},a=Ds("event",i,{durationThreshold:null!==(n=e.durationThreshold)&&void 0!==n?n:40});r=ks(t,o,su,e.reportAllChanges),a&&(a.observe({type:"first-input",buffered:!0}),js((function(){i(a.takeRecords()),r(!0)})),Ns((function(){ru=Js(),eu.length=0,nu.clear(),o=Is("INP"),r=ks(t,o,su,e.reportAllChanges)})))})))},cu=[],pu=[],lu=0,fu=new WeakMap,du=new Map,hu=-1,_u=function(t){cu=cu.concat(t),vu()},vu=function(){hu<0&&(hu=au(gu))},gu=function(){du.size>10&&du.forEach((function(t,e){nu.has(e)||du.delete(e)}));var t=eu.map((function(t){return fu.get(t.entries[0])})),e=pu.length-50;pu=pu.filter((function(n,r){return r>=e||t.includes(n)}));for(var n=new Set,r=0;rlu&&e>i||n.has(t)})),hu=-1};ou.push((function(t){t.interactionId&&t.target&&!du.has(t.interactionId)&&du.set(t.interactionId,t.target)}),(function(t){var e,n=t.startTime+t.duration;lu=Math.max(lu,t.processingEnd);for(var r=pu.length-1;r>=0;r--){var o=pu[r];if(Math.abs(n-o.renderTime)<=8){(e=o).startTime=Math.min(t.startTime,e.startTime),e.processingStart=Math.min(t.processingStart,e.processingStart),e.processingEnd=Math.max(t.processingEnd,e.processingEnd),e.entries.push(t);break}}e||(e={startTime:t.startTime,processingStart:t.processingStart,processingEnd:t.processingEnd,renderTime:n,entries:[t]},pu.push(e)),(t.interactionId||"first-input"===t.entryType)&&fu.set(t,e),vu()}));var mu,yu,Tu,bu,Eu,wu=function(t,e){for(var n,r=[],o=0;n=cu[o];o++)if(!(n.startTime+n.duratione)break;r.push(n)}return r},Su=[2500,4e3],Ou={},Au=[800,1800],Ru=function t(e){document.prerendering?zs((function(){return t(e)})):"complete"!==document.readyState?addEventListener("load",(function(){return t(e)}),!0):setTimeout(e,0)},Lu=function(t,e){e=e||{};var n=Is("TTFB"),r=ks(t,n,Au,e.reportAllChanges);Ru((function(){var o=Os();o&&(n.value=Math.max(o.responseStart-xs(),0),n.entries=[o],r(!0),Ns((function(){n=Is("TTFB",0),(r=ks(t,n,Au,e.reportAllChanges))(!0)})))}))},Pu={passive:!0,capture:!0},Cu=new Date,Nu=function(t,e){mu||(mu=e,yu=t,Tu=new Date,Du(removeEventListener),xu())},xu=function(){if(yu>=0&&yu1e12?new Date:performance.now())-t.timeStamp;"pointerdown"==t.type?function(t,e){var n=function(){Nu(t,e),o()},r=function(){o()},o=function(){removeEventListener("pointerup",n,Pu),removeEventListener("pointercancel",r,Pu)};addEventListener("pointerup",n,Pu),addEventListener("pointercancel",r,Pu)}(e,t):Nu(e,t)}},Du=function(t){["mousedown","keydown","touchstart","pointerdown"].forEach((function(e){return t(e,Iu,Pu)}))},ku=[100,300],Mu=function(t,e){!function(t,e){e=e||{},zs((function(){var n,r=Xs(),o=Is("FID"),i=function(t){t.startTime{if(!this.isEnabled())return;const{name:n,attribution:r}=t,{largestShiftTarget:o,largestShiftTime:i,largestShiftValue:a,loadState:s,largestShiftEntry:u}=r,c=this.getAttrPrefix(n),p=this.tracer.startSpan(n);p.setAttributes(Object.assign(Object.assign({},this.getSharedAttributes(t)),{[`${c}.largest_shift_target`]:o,[`${c}.element`]:o,[`${c}.largest_shift_time`]:i,[`${c}.largest_shift_value`]:a,[`${c}.load_state`]:s,[`${c}.had_recent_input`]:null==u?void 0:u.hadRecentInput})),e&&e(t,p),p.end()},this.onReportLCP=(t,e)=>{if(!this.isEnabled())return;const{name:n,attribution:r}=t,{element:o,url:i,timeToFirstByte:a,resourceLoadDelay:s,resourceLoadDuration:u,elementRenderDelay:c}=r,p=this.getAttrPrefix(n),l=this.tracer.startSpan(n);l.setAttributes(Object.assign(Object.assign({},this.getSharedAttributes(t)),{[`${p}.element`]:o,[`${p}.url`]:i,[`${p}.time_to_first_byte`]:a,[`${p}.resource_load_delay`]:s,[`${p}.resource_load_duration`]:u,[`${p}.element_render_delay`]:c,[`${p}.resource_load_time`]:u})),e&&e(t,l),l.end()},this.onReportINP=(t,e,n=!1)=>{if(!this.isEnabled())return;const{name:r,attribution:o}=t,{inputDelay:i,interactionTarget:a,interactionTime:s,interactionType:u,loadState:c,nextPaintTime:p,presentationDelay:l,processingDuration:f,longAnimationFrameEntries:d}=o,h=d,_=this.getAttrPrefix(r),v=i+f+l;this.tracer.startActiveSpan(r,{startTime:s},(r=>{const o=Object.assign(Object.assign({},this.getSharedAttributes(t)),{[`${_}.input_delay`]:i,[`${_}.interaction_target`]:a,[`${_}.interaction_time`]:s,[`${_}.interaction_type`]:u,[`${_}.load_state`]:c,[`${_}.next_paint_time`]:p,[`${_}.presentation_delay`]:l,[`${_}.processing_duration`]:f,[`${_}.duration`]:v,[`${_}.element`]:a,[`${_}.event_type`]:u});r.setAttributes(o),e&&e(t,r),n&&h.forEach((t=>{this.processPerformanceLongAnimationFrameTimingSpans(_,t)})),r.end(s+v)}))},this.onReportFCP=(t,e)=>{if(!this.isEnabled())return;const{name:n,attribution:r}=t,{timeToFirstByte:o,firstByteToFCP:i,loadState:a}=r,s=this.getAttrPrefix(n),u=this.tracer.startSpan(n);u.setAttributes(Object.assign(Object.assign({},this.getSharedAttributes(t)),{[`${s}.time_to_first_byte`]:o,[`${s}.time_since_first_byte`]:i,[`${s}.load_state`]:a})),e&&e(t,u),u.end()},this.onReportFID=(t,e)=>{if(!this.isEnabled())return;const{name:n,attribution:r}=t,{eventTarget:o,eventType:i,loadState:a}=r,s=this.getAttrPrefix(n),u=this.tracer.startSpan(n);u.setAttributes(Object.assign(Object.assign({},this.getSharedAttributes(t)),{[`${s}.element`]:o,[`${s}.event_type`]:i,[`${s}.load_state`]:a})),e&&e(t,u),u.end()},this.onReportTTFB=(t,e)=>{if(!this.isEnabled())return;const{name:n,attribution:r}=t,{cacheDuration:o,connectionDuration:i,dnsDuration:a,requestDuration:s,waitingDuration:u}=r,c=this.getAttrPrefix(n),p=Object.assign(Object.assign({},this.getSharedAttributes(t)),{[`${c}.waiting_duration`]:u,[`${c}.dns_duration`]:a,[`${c}.connection_duration`]:i,[`${c}.request_duration`]:s,[`${c}.cache_duration`]:o,[`${c}.waiting_time`]:u,[`${c}.dns_time`]:a,[`${c}.connection_time`]:i,[`${c}.request_time`]:s}),l=this.tracer.startSpan(n);l.setAttributes(p),e&&e(t,l),l.end()},this.vitalsToTrack=[...e],this.lcpOpts=n,this.clsOpts=r,this.inpOpts=o,this.fidOpts=i,this.fcpOpts=a,this.ttfbOpts=s,this._isEnabled=t,this._setupWebVitalsCallbacks()}init(){}_setupWebVitalsCallbacks(){this.vitalsToTrack.includes("CLS")&&function(t,e){!function(t,e){e=e||{},$s(Us((function(){var n,r=Is("CLS",0),o=0,i=[],a=function(t){t.forEach((function(t){if(!t.hadRecentInput){var e=i[0],n=i[i.length-1];o&&t.startTime-n.startTime<1e3&&t.startTime-e.startTime<5e3?(o+=t.value,i.push(t)):(o=t.value,i=[t])}})),o>r.value&&(r.value=o,r.entries=i,n())},s=Ds("layout-shift",a);s&&(n=ks(t,r,Ws,e.reportAllChanges),js((function(){a(s.takeRecords()),n(!0)})),Ns((function(){o=0,r=Is("CLS",0),n=ks(t,r,Ws,e.reportAllChanges),Ms((function(){return n()}))})),setTimeout(n,0))})))}((function(e){var n=function(t){var e,n={};if(t.entries.length){var r=t.entries.reduce((function(t,e){return t&&t.value>e.value?t:e}));if(r&&r.sources&&r.sources.length){var o=(e=r.sources).find((function(t){return t.node&&1===t.node.nodeType}))||e[0];o&&(n={largestShiftTarget:Ls(o.node),largestShiftTime:r.startTime,largestShiftValue:r.value,largestShiftSource:o,largestShiftEntry:r,loadState:As(r.startTime)})}}return Object.assign(t,{attribution:n})}(e);t(n)}),e)}((t=>{var e;this.onReportCLS(t,null===(e=this.clsOpts)||void 0===e?void 0:e.applyCustomAttributes)}),this.clsOpts),this.vitalsToTrack.includes("LCP")&&function(t,e){!function(t,e){e=e||{},zs((function(){var n,r=Xs(),o=Is("LCP"),i=function(t){e.reportAllChanges||(t=t.slice(-1)),t.forEach((function(t){t.startTime{var e;this.onReportLCP(t,null===(e=this.lcpOpts)||void 0===e?void 0:e.applyCustomAttributes)}),this.lcpOpts),this.vitalsToTrack.includes("INP")&&function(t,e){Ss||(Ss=Ds("long-animation-frame",_u)),uu((function(e){var n=function(t){var e=t.entries[0],n=fu.get(e),r=e.processingStart,o=n.processingEnd,i=n.entries.sort((function(t,e){return t.processingStart-e.processingStart})),a=wu(e.startTime,o),s=t.entries.find((function(t){return t.target})),u=s&&s.target||du.get(e.interactionId),c=[e.startTime+e.duration,o].concat(a.map((function(t){return t.startTime+t.duration}))),p=Math.max.apply(Math,c),l={interactionTarget:Ls(u),interactionTargetElement:u,interactionType:e.name.startsWith("key")?"keyboard":"pointer",interactionTime:e.startTime,nextPaintTime:p,processedEventEntries:i,longAnimationFrameEntries:a,inputDelay:r-e.startTime,processingDuration:o-r,presentationDelay:Math.max(p-o,0),loadState:As(e.startTime)};return Object.assign(t,{attribution:l})}(e);t(n)}),e)}((t=>{var e,n;this.onReportINP(t,null===(e=this.inpOpts)||void 0===e?void 0:e.applyCustomAttributes,null===(n=this.inpOpts)||void 0===n?void 0:n.includeTimingsAsSpans)}),this.inpOpts),this.vitalsToTrack.includes("FID")&&Mu((t=>{var e;this.onReportFID(t,null===(e=this.fidOpts)||void 0===e?void 0:e.applyCustomAttributes)}),this.fidOpts),this.vitalsToTrack.includes("TTFB")&&function(t,e){Lu((function(e){var n=function(t){var e={waitingDuration:0,cacheDuration:0,dnsDuration:0,connectionDuration:0,requestDuration:0};if(t.entries.length){var n=t.entries[0],r=n.activationStart||0,o=Math.max((n.workerStart||n.fetchStart)-r,0),i=Math.max(n.domainLookupStart-r,0),a=Math.max(n.connectStart-r,0),s=Math.max(n.connectEnd-r,0);e={waitingDuration:o,cacheDuration:i-o,dnsDuration:a-i,connectionDuration:s-a,requestDuration:t.value-s,navigationEntry:n}}return Object.assign(t,{attribution:e})}(e);t(n)}),e)}((t=>{var e;this.onReportTTFB(t,null===(e=this.ttfbOpts)||void 0===e?void 0:e.applyCustomAttributes)}),this.ttfbOpts),this.vitalsToTrack.includes("FCP")&&function(t,e){$s((function(e){var n=function(t){var e={timeToFirstByte:0,firstByteToFCP:t.value,loadState:As(Cs())};if(t.entries.length){var n=Os(),r=t.entries[t.entries.length-1];if(n){var o=n.activationStart||0,i=Math.max(0,n.responseStart-o);e={timeToFirstByte:i,firstByteToFCP:t.value-i,loadState:As(t.entries[0].startTime),navigationEntry:n,fcpEntry:r}}}return Object.assign(t,{attribution:e})}(e);t(n)}),e)}((t=>{var e;this.onReportFCP(t,null===(e=this.fcpOpts)||void 0===e?void 0:e.applyCustomAttributes)}),this.fcpOpts)}getAttrPrefix(t){return t.toLowerCase()}getSharedAttributes(t){const{name:e,id:n,delta:r,rating:o,value:i,navigationType:a}=t,s=this.getAttrPrefix(e);return{[`${s}.id`]:n,[`${s}.delta`]:r,[`${s}.value`]:i,[`${s}.rating`]:o,[`${s}.navigation_type`]:a}}getAttributesForPerformanceLongAnimationFrameTiming(t,e){return{[`${t}.duration`]:e.duration,[`${t}.entryType`]:e.entryType,[`${t}.name`]:e.name,[`${t}.renderStart`]:e.renderStart,[`${t}.startTime`]:e.startTime}}getAttributesForPerformanceScriptTiming(t,e){return{[`${t}.entry_type`]:e.entryType,[`${t}.start_time`]:e.startTime,[`${t}.execution_start`]:e.executionStart,[`${t}.duration`]:e.duration,[`${t}.forced_style_and_layout_duration`]:e.forcedStyleAndLayoutDuration,[`${t}.invoker`]:e.invoker,[`${t}.pause_duration`]:e.pauseDuration,[`${t}.source_url`]:e.sourceURL,[`${t}.source_function_name`]:e.sourceFunctionName,[`${t}.source_char_position`]:e.sourceCharPosition,[`${t}.window_attribution`]:e.windowAttribution}}processPerformanceLongAnimationFrameTimingSpans(t,e){if(!e)return;const n=`${t}.timing`,r=this.getAttributesForPerformanceLongAnimationFrameTiming(n,e);this.tracer.startActiveSpan(e.name,{startTime:e.startTime},(t=>{t.setAttributes(r),this.processPerformanceScriptTimingSpans(n,e.scripts),t.end(e.startTime+e.duration)}))}processPerformanceScriptTimingSpans(t,e){if(!e)return;if(!(null==e?void 0:e.length))return;const n=`${t}.script`;e.map((t=>{this.tracer.startActiveSpan(t.name,{startTime:t.startTime},(e=>{const r=this.getAttributesForPerformanceScriptTiming(n,t);e.setAttributes(r),e.end(t.startTime+t.duration)}))}))}disable(){this.isEnabled()?(this._isEnabled=!1,this._diag.debug("Instrumentation disabled")):this._diag.debug("Instrumentation already disabled")}enable(){this.isEnabled()?this._diag.debug("Instrumentation already enabled"):(this._isEnabled=!0,this._diag.debug("Instrumentation enabled"),this._diag.debug(`Sending spans for ${this.vitalsToTrack.join(",")}`))}isEnabled(){return this._isEnabled}}class Bu extends ju{constructor({enabled:t=!0}={}){super("@honeycombio/instrumentation-global-errors",Ba,{enabled:t}),this.onError=t=>{const e="reason"in t?t.reason:t.error,n=null==e?void 0:e.message,r=null==e?void 0:e.name,o={[fr]:r,[dr]:n,[hr]:null==e?void 0:e.stack};if(!n||!r)return;const i=this.tracer.startSpan("exception",{attributes:o},Wi.active());i.setStatus({code:Vi.ERROR,message:n}),i.end()},t&&this.enable(),this._isEnabled=t}init(){}disable(){this.isEnabled()?(this._isEnabled=!1,window.removeEventListener("error",this.onError),window.removeEventListener("unhandledrejection",this.onError),this._diag.debug("Instrumentation disabled")):this._diag.debug("Instrumentation already disabled")}enable(){this.isEnabled()?this._diag.debug("Instrumentation already enabled"):(this._isEnabled=!0,window.addEventListener("error",this.onError),window.addEventListener("unhandledrejection",this.onError),this._diag.debug("Instrumentation enabled"))}isEnabled(){return this._isEnabled}}function Hu(t,e){return e in t}function Fu(t,e,n,r){var o=void 0,i=void 0;Hu(n,e)&&"number"==typeof n[e]&&(o=n[e]);var a=r||Eu.FETCH_START;if(Hu(n,a)&&"number"==typeof n[a]&&(i=n[a]),void 0!==o&&void 0!==i&&o>=i)return t.addEvent(e,o),t}function Vu(t,e){Fu(t,Eu.FETCH_START,e),Fu(t,Eu.DOMAIN_LOOKUP_START,e),Fu(t,Eu.DOMAIN_LOOKUP_END,e),Fu(t,Eu.CONNECT_START,e),Hu(e,"name")&&e.name.startsWith("https:")&&Fu(t,Eu.SECURE_CONNECTION_START,e),Fu(t,Eu.CONNECT_END,e),Fu(t,Eu.REQUEST_START,e),Fu(t,Eu.RESPONSE_START,e),Fu(t,Eu.RESPONSE_END,e);var n=e[Eu.ENCODED_BODY_SIZE];void 0!==n&&t.setAttribute(gr,n);var r=e[Eu.DECODED_BODY_SIZE];void 0!==r&&n!==r&&t.setAttribute(mr,r)}function Gu(t,e){if(t.nodeType===Node.DOCUMENT_NODE)return"/";var n=function(t,e){var n=t.nodeType,r=function(t){if(!t.parentNode)return 0;var e=[t.nodeType];t.nodeType===Node.CDATA_SECTION_NODE&&e.push(Node.TEXT_NODE);var n=Array.from(t.parentNode.childNodes);if(n=n.filter((function(n){var r=n.localName;return e.indexOf(n.nodeType)>=0&&r===t.localName})),n.length>=1)return n.indexOf(t)+1;return 0}(t),o="";if(n===Node.ELEMENT_NODE){var i=t.getAttribute("id");if(e&&i)return'//*[@id="'+i+'"]';o=t.localName}else if(n===Node.TEXT_NODE||n===Node.CDATA_SECTION_NODE)o="text()";else{if(n!==Node.COMMENT_NODE)return"";o="comment()"}if(o&&r>1)return"/"+o+"["+r+"]";return"/"+o}(t,e);if(e&&n.indexOf("@id")>0)return n;var r="";return t.parentNode&&(r+=Gu(t.parentNode,!1)),r+=n}!function(t){t.CONNECT_END="connectEnd",t.CONNECT_START="connectStart",t.DECODED_BODY_SIZE="decodedBodySize",t.DOM_COMPLETE="domComplete",t.DOM_CONTENT_LOADED_EVENT_END="domContentLoadedEventEnd",t.DOM_CONTENT_LOADED_EVENT_START="domContentLoadedEventStart",t.DOM_INTERACTIVE="domInteractive",t.DOMAIN_LOOKUP_END="domainLookupEnd",t.DOMAIN_LOOKUP_START="domainLookupStart",t.ENCODED_BODY_SIZE="encodedBodySize",t.FETCH_START="fetchStart",t.LOAD_EVENT_END="loadEventEnd",t.LOAD_EVENT_START="loadEventStart",t.NAVIGATION_START="navigationStart",t.REDIRECT_END="redirectEnd",t.REDIRECT_START="redirectStart",t.REQUEST_START="requestStart",t.RESPONSE_END="responseEnd",t.RESPONSE_START="responseStart",t.SECURE_CONNECTION_START="secureConnectionStart",t.UNLOAD_EVENT_END="unloadEventEnd",t.UNLOAD_EVENT_START="unloadEventStart"}(Eu||(Eu={}));function Xu(t,e,n){var r,o;try{o=t()}catch(t){r=t}finally{if(e(r,o),r&&!n)throw r;return o}}var zu="object"==typeof globalThis?globalThis:"object"==typeof self?self:"object"==typeof window?window:"object"==typeof n.g?n.g:{},qu=Symbol.for("io.opentelemetry.js.api.logs"),$u=zu;var Wu,Zu=function(){function t(){}return t.prototype.emit=function(t){},t}(),Ku=(new Zu,function(){function t(){}return t.prototype.getLogger=function(t,e,n){return new Zu},t}()),Yu=new Ku,Qu=function(){function t(){}return t.getInstance=function(){return this._instance||(this._instance=new t),this._instance},t.prototype.setGlobalLoggerProvider=function(t){return $u[qu]?this.getLoggerProvider():($u[qu]=(e=1,n=t,r=Yu,function(t){return t===e?n:r}),t);var e,n,r},t.prototype.getLoggerProvider=function(){var t,e;return null!==(e=null===(t=$u[qu])||void 0===t?void 0:t.call($u,1))&&void 0!==e?e:Yu},t.prototype.getLogger=function(t,e,n){return this.getLoggerProvider().getLogger(t,e,n)},t.prototype.disable=function(){delete $u[qu]},t}(),Ju=Qu.getInstance(),tc=function(){return tc=Object.assign||function(t){for(var e,n=1,r=arguments.length;n=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};function wc(t,e){return"string"==typeof e?t===e:!!t.match(e)}var Sc,Oc=performance,Ac=Math.pow(10,6),Rc=Math.pow(10,9);function Lc(t){var e=t/1e3;return[Math.trunc(e),Math.round(t%1e3*Ac)]}function Pc(){var t=Oc.timeOrigin;if("number"!=typeof t){var e=Oc;t=e.timing&&e.timing.fetchStart}return t}function Cc(t){return function(t,e){var n=[t[0]+e[0],t[1]+e[1]];n[1]>=Rc&&(n[1]-=Rc,n[0]+=1);return n}(Lc(Pc()),Lc("number"==typeof t?t:Oc.now()))}function Nc(t){if(Ic(t))return t;if("number"==typeof t)return t=i)return t.addEvent(e,o),t}function sf(t,e){af(t,Sc.FETCH_START,e),af(t,Sc.DOMAIN_LOOKUP_START,e),af(t,Sc.DOMAIN_LOOKUP_END,e),af(t,Sc.CONNECT_START,e),of(e,"name")&&e.name.startsWith("https:")&&af(t,Sc.SECURE_CONNECTION_START,e),af(t,Sc.CONNECT_END,e),af(t,Sc.REQUEST_START,e),af(t,Sc.RESPONSE_START,e),af(t,Sc.RESPONSE_END,e);var n=e[Sc.ENCODED_BODY_SIZE];void 0!==n&&t.setAttribute(rf.HTTP_RESPONSE_CONTENT_LENGTH,n);var r=e[Sc.DECODED_BODY_SIZE];void 0!==r&&n!==r&&t.setAttribute(rf.HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED,r)}function uf(){return"undefined"!=typeof location?location.origin:void 0}function cf(t,e,n,r,o,i){void 0===o&&(o=new WeakSet);var a=pf(t),s=function(t,e,n,r,o,i){var a=xc(e),s=xc(n),u=r.filter((function(e){var n=xc(Nc(e[Sc.FETCH_START])),r=xc(Nc(e[Sc.RESPONSE_END]));return e.initiatorType.toLowerCase()===(i||"xmlhttprequest")&&e.name===t&&n>=a&&r<=s}));u.length>0&&(u=u.filter((function(t){return!o.has(t)})));return u}(t=a.toString(),e,n,r,o,i);if(0===s.length)return{mainRequest:void 0};if(1===s.length)return{mainRequest:s[0]};var u=function(t){return t.slice().sort((function(t,e){var n=t[Sc.FETCH_START],r=e[Sc.FETCH_START];return n>r?1:n1){var c=u[0],p=function(t,e,n){for(var r,o=xc(n),i=xc(Nc(e)),a=t[1],s=t.length,u=1;u=i&&(!r||l0&&this._diag.debug("headers inject skipped due to CORS policy"))}if(t instanceof Request)en.inject(ee.active(),t.headers,{set:function(t,e,n){return t.set(e,"string"==typeof n?n:String(n))}});else if(t.headers instanceof Headers)en.inject(ee.active(),t.headers,{set:function(t,e,n){return t.set(e,"string"==typeof n?n:String(n))}});else if(t.headers instanceof Map)en.inject(ee.active(),t.headers,{set:function(t,e,n){return t.set(e,"string"==typeof n?n:String(n))}});else{n={};en.inject(ee.active(),n),t.headers=Object.assign({},n,t.headers||{})}},e.prototype._clearResources=function(){0===this._tasksCount&&this._getConfig().clearTimingResources&&(performance.clearResourceTimings(),this._usedResources=new WeakSet)},e.prototype._createSpan=function(t,e){var n;if(void 0===e&&(e={}),!function(t,e){var n,r;if(!e)return!1;try{for(var o=Ec(e),i=o.next();!i.done;i=o.next())if(wc(t,i.value))return!0}catch(t){n={error:t}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return!1}(t,this._getConfig().ignoreUrls)){var r=(e.method||"GET").toUpperCase(),o="HTTP "+r;return this.tracer.startSpan(o,{kind:Hn.CLIENT,attributes:(n={},n[Mc.COMPONENT]=this.moduleName,n[rf.HTTP_METHOD]=r,n[rf.HTTP_URL]=t,n)})}this._diag.debug("ignoring span as url matches ignored url")},e.prototype._findResourceAndAddNetworkEvents=function(t,e,n){var r=e.entries;if(!r.length){if(!performance.getEntriesByType)return;r=performance.getEntriesByType("resource")}var o=cf(e.spanUrl,e.startTime,n,r,this._usedResources,"fetch");if(o.mainRequest){var i=o.mainRequest;this._markResourceAsUsed(i);var a=o.corsPreFlightRequest;a&&(this._addChildSpan(t,a),this._markResourceAsUsed(a)),this._getConfig().ignoreNetworkEvents||sf(t,i)}},e.prototype._markResourceAsUsed=function(t){this._usedResources.add(t)},e.prototype._endSpan=function(t,e,n){var r=this,o=Lc(Date.now()),i=Cc();this._addFinalSpanAttributes(t,n),setTimeout((function(){var n;null===(n=e.observer)||void 0===n||n.disconnect(),r._findResourceAndAddNetworkEvents(t,e,i),r._tasksCount--,r._clearResources(),t.end(o)}),300)},e.prototype._patchConstructor=function(){var t=this;return function(e){var n=t;return function(){for(var t=[],r=0;r=200&&e.status<400?n._endSpan(t,u,e):n._endSpan(t,u,{status:e.status,statusText:e.statusText,url:i})}function l(t,e,n){try{var r=n.clone(),o=n.clone(),i=r.body;if(i){var a=i.getReader(),s=function(){a.read().then((function(e){e.done?p(t,o):s()}),(function(e){c(t,e)}))};s()}else p(t,n)}finally{e(n)}}function f(t,e,n){try{c(t,n)}finally{e(n)}}return new Promise((function(t,r){return ee.with(rt.setSpan(ee.active(),s),(function(){return n._addHeaders(a,i),n._tasksCount++,e.apply(o,a instanceof Request?[a]:[i,a]).then(l.bind(o,s,t),f.bind(o,s,r))}))}))}}},e.prototype._applyAttributesAfterFetch=function(t,e,n){var r=this,o=this._getConfig().applyCustomAttributesOnSpan;o&&uc((function(){return o(t,e,n)}),(function(t){t&&r._diag.error("applyCustomAttributesOnSpan",t)}),!0)},e.prototype._prepareSpanData=function(t){var e=Cc(),n=[];if("function"!=typeof PerformanceObserver)return{entries:n,startTime:e,spanUrl:t};var r=new PerformanceObserver((function(e){e.getEntries().forEach((function(e){"fetch"===e.initiatorType&&e.name===t&&n.push(e)}))}));return r.observe({entryTypes:["resource"]}),{entries:n,observer:r,startTime:e,spanUrl:t}},e.prototype.enable=function(){vf?this._diag.warn("this instrumentation is intended for web usage only, it does not instrument Node.js's fetch()"):(cc(fetch)&&(this._unwrap(hf,"fetch"),this._diag.debug("removing previous patch for constructor")),this._wrap(hf,"fetch",this._patchConstructor()))},e.prototype.disable=function(){vf||(this._unwrap(hf,"fetch"),this._usedResources=new WeakSet)},e}(bc);!function(t){t.EVENT_TYPE="event_type",t.TARGET_ELEMENT="target_element",t.TARGET_XPATH="target_xpath",t.HTTP_URL="http.url"}(ff||(ff={}));var mf="0.38.0",yf=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Tf=["click"];function bf(){return!1}var Ef=function(t){function e(e){var n,r=t.call(this,"@opentelemetry/instrumentation-user-interaction",mf,e)||this;return r.version=mf,r.moduleName="user-interaction",r._spansData=new WeakMap,r._wrappedListeners=new WeakMap,r._eventsSpanMap=new WeakMap,r._eventNames=new Set(null!==(n=null==e?void 0:e.eventNames)&&void 0!==n?n:Tf),r._shouldPreventSpanCreation="function"==typeof(null==e?void 0:e.shouldPreventSpanCreation)?e.shouldPreventSpanCreation:bf,r}return yf(e,t),e.prototype.init=function(){},e.prototype._checkForTimeout=function(t,e){var n=this._spansData.get(e);n&&("setTimeout"===t.source?n.hrTimeLastTimeout=er():"Promise.then"!==t.source&&"setTimeout"!==t.source&&(n.hrTimeLastTimeout=void 0))},e.prototype._allowEventName=function(t){return this._eventNames.has(t)},e.prototype._createSpan=function(t,e,n){var r;if(t instanceof HTMLElement&&t.getAttribute&&!t.hasAttribute("disabled")&&this._allowEventName(e)){var o=Gu(t,!0);try{var i=this.tracer.startSpan(e,{attributes:(r={},r[ff.EVENT_TYPE]=e,r[ff.TARGET_ELEMENT]=t.tagName,r[ff.TARGET_XPATH]=o,r[ff.HTTP_URL]=window.location.href,r)},n?rt.setSpan(ee.active(),n):void 0);if(!0===this._shouldPreventSpanCreation(e,t,i))return;return this._spansData.set(i,{taskCount:0}),i}catch(t){this._diag.error("failed to start create new user interaction span",t)}}},e.prototype._decrementTask=function(t){var e=this._spansData.get(t);e&&(e.taskCount--,0===e.taskCount&&this._tryToEndSpan(t,e.hrTimeLastTimeout))},e.prototype._getCurrentSpan=function(t){var e=t.get("OT_ZONE_CONTEXT");return e?rt.getSpan(e):e},e.prototype._incrementTask=function(t){var e=this._spansData.get(t);e&&e.taskCount++},e.prototype.addPatchedListener=function(t,e,n,r){var o=this._wrappedListeners.get(n);o||(o=new Map,this._wrappedListeners.set(n,o));var i=o.get(e);return i||(i=new Map,o.set(e,i)),!i.has(t)&&(i.set(t,r),!0)},e.prototype.removePatchedListener=function(t,e,n){var r=this._wrappedListeners.get(n);if(r){var o=r.get(e);if(o){var i=o.get(t);return i&&(o.delete(t),0===o.size&&(r.delete(e),0===r.size&&this._wrappedListeners.delete(n))),i}}},e.prototype._invokeListener=function(t,e,n){return"function"==typeof t?t.apply(e,n):t.handleEvent(n[0])},e.prototype._patchAddEventListener=function(){var t=this;return function(e){return function(n,r,o){if(!r)return e.call(this,n,r,o);var i=o&&"object"==typeof o&&o.once,a=function(){for(var e,o=this,a=[],s=0;s=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};function Of(t,e){return"string"==typeof e?t===e:!!t.match(e)}var Af,Rf,Lf,Pf=Math.pow(10,6),Cf=Math.pow(10,9);function Nf(t){var e=t/1e3;return[Math.trunc(e),Math.round(t%1e3*Pf)]}function xf(){var t=wf.timeOrigin;if("number"!=typeof t){var e=wf;t=e.timing&&e.timing.fetchStart}return t}function If(t){return function(t,e){var n=[t[0]+e[0],t[1]+e[1]];n[1]>=Cf&&(n[1]-=Cf,n[0]+=1);return n}(Nf(xf()),Nf("number"==typeof t?t:wf.now()))}function Df(t){if(Mf(t))return t;if("number"==typeof t)return t=i)return t.addEvent(e,o),t}function Bf(t,e){Uf(t,Af.FETCH_START,e),Uf(t,Af.DOMAIN_LOOKUP_START,e),Uf(t,Af.DOMAIN_LOOKUP_END,e),Uf(t,Af.CONNECT_START,e),jf(e,"name")&&e.name.startsWith("https:")&&Uf(t,Af.SECURE_CONNECTION_START,e),Uf(t,Af.CONNECT_END,e),Uf(t,Af.REQUEST_START,e),Uf(t,Af.RESPONSE_START,e),Uf(t,Af.RESPONSE_END,e);var n=e[Af.ENCODED_BODY_SIZE];void 0!==n&&t.setAttribute(rf.HTTP_RESPONSE_CONTENT_LENGTH,n);var r=e[Af.DECODED_BODY_SIZE];void 0!==r&&n!==r&&t.setAttribute(rf.HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED,r)}function Hf(){return"undefined"!=typeof location?location.origin:void 0}function Ff(t,e,n,r,o,i){void 0===o&&(o=new WeakSet);var a=Vf(t),s=function(t,e,n,r,o,i){var a=kf(e),s=kf(n),u=r.filter((function(e){var n=kf(Df(e[Af.FETCH_START])),r=kf(Df(e[Af.RESPONSE_END]));return e.initiatorType.toLowerCase()===(i||"xmlhttprequest")&&e.name===t&&n>=a&&r<=s}));u.length>0&&(u=u.filter((function(t){return!o.has(t)})));return u}(t=a.toString(),e,n,r,o,i);if(0===s.length)return{mainRequest:void 0};if(1===s.length)return{mainRequest:s[0]};var u=function(t){return t.slice().sort((function(t,e){var n=t[Af.FETCH_START],r=e[Af.FETCH_START];return n>r?1:n1){var c=u[0],p=function(t,e,n){for(var r,o=kf(n),i=kf(Df(e)),a=t[1],s=t.length,u=1;u=i&&(!r||l0&&this._diag.debug("headers inject skipped due to CORS policy"))}var r={};en.inject(ee.active(),r),Object.keys(r).forEach((function(e){t.setRequestHeader(e,String(r[e]))}))},e.prototype._addChildSpan=function(t,e){var n=this;ee.with(rt.setSpan(ee.active(),t),(function(){var t=n.tracer.startSpan("CORS Preflight",{startTime:e[Af.FETCH_START]});n._getConfig().ignoreNetworkEvents||Bf(t,e),t.end(e[Af.RESPONSE_END])}))},e.prototype._addFinalSpanAttributes=function(t,e,n){if("string"==typeof n){var r=Vf(n);void 0!==e.status&&t.setAttribute(rf.HTTP_STATUS_CODE,e.status),void 0!==e.statusText&&t.setAttribute(Gf.HTTP_STATUS_TEXT,e.statusText),t.setAttribute(rf.HTTP_HOST,r.host),t.setAttribute(rf.HTTP_SCHEME,r.protocol.replace(":","")),t.setAttribute(rf.HTTP_USER_AGENT,navigator.userAgent)}},e.prototype._applyAttributesAfterXHR=function(t,e){var n=this,r=this._getConfig().applyCustomAttributesOnSpan;"function"==typeof r&&uc((function(){return r(t,e)}),(function(t){t&&n._diag.error("applyCustomAttributesOnSpan",t)}),!0)},e.prototype._addResourceObserver=function(t,e){var n=this._xhrMem.get(t);n&&"function"==typeof PerformanceObserver&&"function"==typeof PerformanceResourceTiming&&(n.createdResources={observer:new PerformanceObserver((function(t){var r=t.getEntries(),o=Vf(e);r.forEach((function(t){"xmlhttprequest"===t.initiatorType&&t.name===o.href&&n.createdResources&&n.createdResources.entries.push(t)}))})),entries:[]},n.createdResources.observer.observe({entryTypes:["resource"]}))},e.prototype._clearResources=function(){0===this._tasksCount&&this._getConfig().clearTimingResources&&(wf.clearResourceTimings(),this._xhrMem=new WeakMap,this._usedResources=new WeakSet)},e.prototype._findResourceAndAddNetworkEvents=function(t,e,n,r,o){if(n&&r&&o&&t.createdResources){var i=t.createdResources.entries;i&&i.length||(i=wf.getEntriesByType("resource"));var a=Ff(Vf(n).href,r,o,i,this._usedResources);if(a.mainRequest){var s=a.mainRequest;this._markResourceAsUsed(s);var u=a.corsPreFlightRequest;u&&(this._addChildSpan(e,u),this._markResourceAsUsed(u)),this._getConfig().ignoreNetworkEvents||Bf(e,s)}}},e.prototype._cleanPreviousSpanInformation=function(t){var e=this._xhrMem.get(t);if(e){var n=e.callbackToRemoveEvents;n&&n(),this._xhrMem.delete(t)}},e.prototype._createSpan=function(t,e,n){var r;if(!function(t,e){var n,r;if(!e)return!1;try{for(var o=Sf(e),i=o.next();!i.done;i=o.next())if(Of(t,i.value))return!0}catch(t){n={error:t}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return!1}(e,this._getConfig().ignoreUrls)){var o=n.toUpperCase(),i=this.tracer.startSpan(o,{kind:Hn.CLIENT,attributes:(r={},r[rf.HTTP_METHOD]=n,r[rf.HTTP_URL]=Vf(e).toString(),r)});return i.addEvent(Lf.METHOD_OPEN),this._cleanPreviousSpanInformation(t),this._xhrMem.set(t,{span:i,spanUrl:e}),i}this._diag.debug("ignoring span as url matches ignored url")},e.prototype._markResourceAsUsed=function(t){this._usedResources.add(t)},e.prototype._patchOpen=function(){var t=this;return function(e){var n=t;return function(){for(var t=[],r=0;r{if(!(null==t?void 0:t.skipOptionsValidation))return(null==t?void 0:t.apiKey)||console.warn(rs),(null==t?void 0:t.serviceName)||console.warn(os),(null==t?void 0:t.apiKey)&&!Ja(null==t?void 0:t.apiKey)&&(null==t?void 0:t.dataset)&&console.warn(is),(null==t?void 0:t.apiKey)&&Ja(null==t?void 0:t.apiKey)&&!(null==t?void 0:t.dataset)&&console.warn(as),(null==t?void 0:t.sampler)&&console.debug(us),t;console.debug(ss)})(t),(null==t?void 0:t.debug)&&ls(t)}}(Ad);Rd.start()},81132:function(t){"use strict";function e(t){return"function"==typeof t}var n=console.error.bind(console);function r(t,e,n){var r=!!t[e]&&t.propertyIsEnumerable(e);Object.defineProperty(t,e,{configurable:!0,enumerable:r,writable:!0,value:n})}function o(t){t&&t.logger&&(e(t.logger)?n=t.logger:n("new logger isn't a function, not replacing"))}function i(t,o,i){if(t&&t[o]){if(!i)return n("no wrapper function"),void n((new Error).stack);if(e(t[o])&&e(i)){var a=t[o],s=i(a,o);return r(s,"__original",a),r(s,"__unwrap",(function(){t[o]===s&&r(t,o,a)})),r(s,"__wrapped",!0),r(t,o,s),s}n("original object and wrapper must be functions")}else n("no original function "+o+" to wrap")}function a(t,e){return t&&t[e]?t[e].__unwrap?t[e].__unwrap():void n("no original to unwrap to -- has "+e+" already been unwrapped?"):(n("no function to unwrap."),void n((new Error).stack))}o.wrap=i,o.massWrap=function(t,e,r){if(!t)return n("must provide one or more modules to patch"),void n((new Error).stack);Array.isArray(t)||(t=[t]),e&&Array.isArray(e)?t.forEach((function(t){e.forEach((function(e){i(t,e,r)}))})):n("must provide one or more functions to wrap on modules")},o.unwrap=a,o.massUnwrap=function(t,e){if(!t)return n("must provide one or more modules to patch"),void n((new Error).stack);Array.isArray(t)||(t=[t]),e&&Array.isArray(e)?t.forEach((function(t){e.forEach((function(e){a(t,e)}))})):n("must provide one or more functions to unwrap on modules")},t.exports=o}},function(t){var e;e=49698,t(t.s=e)}]);